StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcTower.h
1 #ifndef __StEEmcTower_h__
2 #define __StEEmcTower_h__
3 
4 #include "StEEmcElement.h"
5 
6 #include <vector>
7 
8 class StEEmcTower;
9 
10 typedef std::vector<StEEmcTower*> StEEmcTowerPtrVec_t;
11 
12 class StEEmcTower : public StEEmcElement {
13 
14  public:
15 
16  StEEmcTower();
17  ~StEEmcTower(){ /* nada */ };
18 
20  StEEmcTower( const StEEmcTower &other );
21 
26  void index(Int_t i);
28  void layer(Int_t l);
31  void et(Float_t e);
32 
34  Int_t index();
36  Int_t layer();
38  Int_t sector();
40  Int_t subsector();
42  Int_t etabin();
44  Int_t phibin();
46  Float_t et();
47 
49  void neighbor(StEEmcTower *n);
51  Int_t numberOfNeighbors();
53  StEEmcTower neighbor(Int_t i);
54 
57  Bool_t isNeighbor( StEEmcTower t );
58 
59 
61  void print();
62  void printLine();
63 
64  Bool_t operator<( const StEEmcTower &other ) const { return (this->energy() < other.energy()); }
65 
66  private:
67  protected:
68 
69  Int_t mIndex;
70  Int_t mLayer;
71  Int_t mSector;
72  Int_t mSubsector;
73  Int_t mEtabin;
74  Int_t mPhibin;
75 
76  Float_t mET;
77 
78  StEEmcTowerPtrVec_t mNeighbors;
79 
81 
82 };
83 
84 inline void StEEmcTower::layer(Int_t l){mLayer=l;}
85 
86 inline Int_t StEEmcTower::index(){return mIndex;}
87 inline Int_t StEEmcTower::layer(){return mLayer;}
88 inline Int_t StEEmcTower::sector(){return mSector;}
89 inline Int_t StEEmcTower::subsector(){return mSubsector;}
90 inline Int_t StEEmcTower::etabin(){return mEtabin;}
91 inline Int_t StEEmcTower::phibin(){return mPhibin;}
92 
93 inline void StEEmcTower::neighbor(StEEmcTower *t){mNeighbors.push_back(t);}
94 inline StEEmcTower StEEmcTower::neighbor(Int_t i){ return *mNeighbors[i]; }
95 inline Int_t StEEmcTower::numberOfNeighbors(){ return (Int_t)mNeighbors.size();}
96 
97 inline void StEEmcTower::et(Float_t e){mET=e;}
98 inline Float_t StEEmcTower::et(){return mET;}
99 
100 typedef std::vector<StEEmcTower> StEEmcTowerVec_t;
101 
102 #endif
Int_t numberOfNeighbors() const
get the number of neighboring towers
Definition: StEEmcTower.h:54
Bool_t isNeighbor(const StEEmcTower &t) const
Definition: StEEmcTower.cxx:98
Int_t index() const
Returns index of this tower, pre- or postshower element.
Definition: StEEmcTower.h:37
StEEmcTower()
Constructor.
Definition: StEEmcTower.cxx:24
StEEmcTowerPtrVec_t mNeighbors
Definition: StEEmcTower.h:88
void neighbor(StEEmcTower *n)
add a tower to list of neighbors
Definition: StEEmcTower.h:52
Int_t mEtabin
Definition: StEEmcTower.h:80
Float_t et() const
Returns the &quot;E_T&quot; response of the tower.
Definition: StEEmcTower.h:49
Float_t energy() const
Return the EM energy (towers) or energy deposit for this element (SMD,pre,post). If a fail bit is set...
Definition: StEEmcElement.h:34
Int_t etabin() const
Returns the etabin of this tower, pre- or postshower element.
Definition: StEEmcTower.h:45
Int_t mSector
Definition: StEEmcTower.h:78
Int_t subsector() const
Returns subsector of this tower, pre- or postshower element.
Definition: StEEmcTower.h:43
void print() const
Print a summary of this tower.
Definition: StEEmcTower.cxx:58
void printLine() const
Print a one line summary of this tower.
Definition: StEEmcTower.cxx:70
Base class for representing tower, preshower and postshower elements.
Definition: StEEmcTower.h:11
Bool_t operator<(const StEEmcTower &other) const
A tower is &quot;less than&quot; another tower if its energy is less than it.
Definition: StEEmcTower.h:69
Int_t sector() const
Returns sector of this tower, pre- or postshower element.
Definition: StEEmcTower.h:41
Float_t mET
Equivalent transverse energy, assuming a vertex of 0,0,0.
Definition: StEEmcTower.h:84
Int_t mLayer
Definition: StEEmcTower.h:77
Int_t mPhibin
Definition: StEEmcTower.h:81
Int_t layer() const
Returns layer of this tower element, [0-4]=[TPQR].
Definition: StEEmcTower.h:39
Int_t phibin() const
Returns the phibin of this tower.
Definition: StEEmcTower.h:47
virtual ~StEEmcTower()
Destructor.
Definition: StEEmcTower.h:16
Int_t mSubsector
Definition: StEEmcTower.h:79
Base class for EEMC detectors.
Definition: StEEmcElement.h:9
void energy(Float_t e)
Set the energy (adc-ped+0.5)/gain for this element.
Definition: StEEmcElement.h:21
ClassDef(StEEmcTower, 1)
Makes class available to root.
Int_t mIndex
Definition: StEEmcTower.h:76