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  virtual ~StEEmcElement(){ /* nada */ };
15 
17  void raw(Float_t r) { mRaw=r; }
19  void adc(Float_t a) { mAdc=a; }
21  void energy(Float_t e) { mEnergy=e; }
23  void stat(unsigned s) { mStat=s; }
25  void fail(unsigned f) { mFail=f; }
27  void name(const Char_t *n) { mName=n; }
28 
30  Float_t raw() const { return mRaw; }
32  Float_t adc() const { return mAdc; }
34  Float_t energy() const { return (mFail)?0.:mEnergy; }
36  unsigned stat() const { return mStat; }
38  unsigned fail() const { return mFail; }
40  const Char_t *name() const { return mName.Data(); }
41 
43  void stemc( StEmcRawHit *h ) { mstRawHit=h; }
45  StEmcRawHit *stemc() { return mstRawHit; }
46  const StEmcRawHit *stemc() const { return mstRawHit; }
47 
49  virtual void Clear(Option_t *opts="");
50 
51 protected:
52  Float_t mRaw;
53  Float_t mAdc;
54  Float_t mEnergy;
55  unsigned mStat;
56  unsigned mFail;
57  TString mName;
58  StEmcRawHit *mstRawHit;
59 
61 };
62 
63 #endif
void stat(unsigned s)
Set a status bit for this element.
Definition: StEEmcElement.h:23
virtual void Clear(Option_t *opts="")
Clears the element.
Float_t raw() const
Return raw ADC for this element.
Definition: StEEmcElement.h:30
void name(const Char_t *n)
Set the name for this element.
Definition: StEEmcElement.h:27
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
void raw(Float_t r)
Set the raw ADC for this element.
Definition: StEEmcElement.h:17
StEmcRawHit * stemc()
Returns pointer to StEmcRawHit.
Definition: StEEmcElement.h:45
void fail(unsigned f)
Set a fail bit for this element.
Definition: StEEmcElement.h:25
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
void adc(Float_t a)
Set the pedestal-subtracted ADC for this element.
Definition: StEEmcElement.h:19
void stemc(StEmcRawHit *h)
Sets pointer to the StEmcRawHit when processing an StEvent file.
Definition: StEEmcElement.h:43
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
void energy(Float_t e)
Set the energy (adc-ped+0.5)/gain for this element.
Definition: StEEmcElement.h:21