#ifndef __EEezPatch_h__ #define __EEezPatch_h__ #include #include #include #include #include "EEezTower.h" #include "EEezStrip.h" #include "EEezCluster.h" class EEezPatch; typedef std::vector EEezPatchPtrVec_t; typedef EEezPatchPtrVec_t::iterator EEezPatchPtrVecIter_t; class EEezPatch : public TObject { public: EEezPatch(); ~EEezPatch(); void print(); virtual void addTower( EEezTower *t ); // Add the specified tower virtual void addStrip( EEezStrip *s ); // Add the specified strip virtual void addCluster( EEezCluster *c); // Add towers/strips in cluster virtual void addNeighbor( EEezPatch *p ); // Add to list of neighbors void addPatch( EEezPatch *p ); // Add a patch to this one void mergeNeighbors(); // Merge neighboring patches EEezTowerPtrVec_t *getTowers(); EEezStripPtrVec_t *getUStrips(); EEezStripPtrVec_t *getVStrips(); EEezPatchPtrVec_t *getNeighbors(); Int_t hasTower( EEezTower *t ); // Determine if tower belongs to patch Int_t hasStrip( EEezStrip *s ); // Determine if strip belongs to patch TH1F *profileU(); // Get SMD U distribution TH1F *profileV(); // Get SMD V distribution TH2F *towers( Option_t *opts = "T" ); // Get energy distribution of towers private: protected: EEezTowerPtrVec_t mTowers; EEezStripPtrVec_t mUStrips; EEezStripPtrVec_t mVStrips; EEezPatchPtrVec_t mNeighbors; TH1F *mProfileU; TH1F *mProfileV; TH2F *mETowers; ClassDef(EEezPatch,1); }; #endif