StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
1 #ifndef __StEEmcTower_h__
2 #define __StEEmcTower_h__
4 #include "StEEmcElement.h"
5 #include "TVector3.h"
6 #include <vector>
8 class StEEmcTower;
9 typedef std::vector<StEEmcTower*> StEEmcTowerPtrVec_t;
11 class StEEmcTower : public StEEmcElement {
12 public:
14  StEEmcTower();
16  virtual ~StEEmcTower(){ /* nada */ };
19  StEEmcTower( const StEEmcTower &other );
23  TVector3 direction( Float_t zvertex=0.0 ) const;
29  void index(Int_t i);
31  void layer(Int_t l) {mLayer=l;}
34  void et(Float_t e) {mET=e;}
37  Int_t index()const {return mIndex;}
39  Int_t layer()const {return mLayer;}
41  Int_t sector()const {return mSector;}
43  Int_t subsector()const {return mSubsector;}
45  Int_t etabin()const {return mEtabin;}
47  Int_t phibin()const {return mPhibin;}
49  Float_t et()const {return mET;}
52  void neighbor(StEEmcTower *n) {mNeighbors.push_back(n);}
54  Int_t numberOfNeighbors()const { return (Int_t)mNeighbors.size();}
56  StEEmcTower &neighbor(Int_t i) { return *mNeighbors[i]; }
57  const StEEmcTower &neighbor(Int_t i)const { return *mNeighbors[i]; }
61  Bool_t isNeighbor( const StEEmcTower &t ) const;
64  void print() const;
66  void printLine() const;
69  Bool_t operator<( const StEEmcTower &other ) const { return (this->energy() <; }
72  virtual void Clear(Option_t *opts=""){ mET=0.; StEEmcElement::Clear(opts); }
74 protected:
76  Int_t mIndex;
77  Int_t mLayer;
78  Int_t mSector;
79  Int_t mSubsector;
80  Int_t mEtabin;
81  Int_t mPhibin;
83  Float_t mET;
88  StEEmcTowerPtrVec_t mNeighbors;
93 };
94 typedef std::vector<StEEmcTower> StEEmcTowerVec_t;
96 #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
virtual void Clear(Option_t *opts="")
Clears the element.
StEEmcTower & neighbor(Int_t i)
returns a specific neighbor [0,numberOfNeighbors)
Definition: StEEmcTower.h:56
Int_t index() const
Returns index of this tower, pre- or postshower element.
Definition: StEEmcTower.h:37
void layer(Int_t l)
Sets the layer, [0-4]=[TPQR].
Definition: StEEmcTower.h:31
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
virtual void Clear(Option_t *opts="")
Clears the tower.
Definition: StEEmcTower.h:72
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
void et(Float_t e)
Definition: StEEmcTower.h:34
virtual ~StEEmcTower()
Definition: StEEmcTower.h:16
Int_t mSubsector
Definition: StEEmcTower.h:79
TVector3 direction(Float_t zvertex=0.0) const
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