StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcElement.h
1 #ifndef __StEEmcElement_h__
2 #define __StEEmcElement_h__
3 
4 #include <TObject.h>
5 #include <TString.h>
6 
7 class StEmcRawHit;
8 
9 class StEEmcElement : public TObject {
10 
11  public:
12 
13  StEEmcElement();
14  ~StEEmcElement(){ /* nada */ };
15 
17  void raw(Float_t r);
19  void adc(Float_t a);
21  void energy(Float_t e);
23  void stat(unsigned s);
25  void fail(unsigned f);
27  void name(const Char_t *n);
28 
30  Float_t raw();
32  Float_t raw() const;
33 
35  Float_t adc();
37  Float_t adc() const;
38 
40  Float_t energy();
42  Float_t energy() const;
43 
45  unsigned stat();
47  unsigned fail();
49  const Char_t *name();
50 
51  void stemc( StEmcRawHit *h );
52  StEmcRawHit *stemc();
53 
54  void Clear(Option_t *opts="");
55 
56  private:
57  protected:
58 
59  Float_t mRaw; // Raw ADC
60  Float_t mAdc; // Ped subtracted ADC
61  Float_t mEnergy; // EM energy/energy deposit
62  unsigned mStat; // detector problems
63  unsigned mFail; // fatal detector problems
64  TString mName; // Name of this element
65 
66  StEmcRawHit *mstRawHit;
67 
69 
70 };
71 
72 inline void StEEmcElement::raw(Float_t r){ mRaw=r; }
73 inline void StEEmcElement::adc(Float_t a){ mAdc=a; }
74 inline void StEEmcElement::energy(Float_t e){ mEnergy=e; }
75 inline void StEEmcElement::stat(unsigned s){ mStat=s; }
76 inline void StEEmcElement::fail(unsigned f){ mFail=f; }
77 inline void StEEmcElement::name(const Char_t *n){ mName=n; }
78 
79 inline Float_t StEEmcElement::raw(){ return mRaw; }
80 inline Float_t StEEmcElement::raw() const { return mRaw; }
81 
82 inline Float_t StEEmcElement::adc(){ return mAdc; }
83 inline Float_t StEEmcElement::adc() const { return mAdc; }
84 
85 inline Float_t StEEmcElement::energy(){ return (mFail)?0.:mEnergy; }
86 inline Float_t StEEmcElement::energy() const { return (mFail)?0.:mEnergy; }
87 
88 inline unsigned StEEmcElement::stat(){ return mStat; }
89 inline unsigned StEEmcElement::fail(){ return mFail; }
90 inline const Char_t *StEEmcElement::name() { return mName.Data(); }
91 
92 inline void StEEmcElement::stemc( StEmcRawHit *h ){ mstRawHit=h; }
93 inline StEmcRawHit *StEEmcElement::stemc(){ return mstRawHit; }
94 
95 #endif
virtual void Clear(Option_t *opts="")
Clears the element.
Float_t raw() const
Return raw ADC for this element.
Definition: StEEmcElement.h:30
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
StEmcRawHit * stemc()
Returns pointer to StEmcRawHit.
Definition: StEEmcElement.h:45
ClassDef(StEEmcElement, 1)
Raw hit from StEvent.
Float_t mEnergy
Definition: StEEmcElement.h:54
unsigned mFail
Definition: StEEmcElement.h:56
Float_t adc() const
Return the pedestal-subtracted ADC for this element.
Definition: StEEmcElement.h:32
unsigned stat() const
Return the status bit for this element.
Definition: StEEmcElement.h:36
const Char_t * name() const
Return the name of this element.
Definition: StEEmcElement.h:40
unsigned mStat
Definition: StEEmcElement.h:55
Base class for EEMC detectors.
Definition: StEEmcElement.h:9
unsigned fail() const
Return the fail bit for this element.
Definition: StEEmcElement.h:38