StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPicoBEmcSmdPHit.h
1 
8 #ifndef StPicoBEmcSmdPHit_h
9 #define StPicoBEmcSmdPHit_h
10 
11 #include <limits>
12 
13 // ROOT headers
14 #include "TObject.h"
15 
16 //_________________
17 class StPicoBEmcSmdPHit: public TObject {
18 
19  public:
23  StPicoBEmcSmdPHit(Int_t id, Int_t adc, Float_t energy);
27  virtual ~StPicoBEmcSmdPHit();
29  virtual void Print(const Char_t* option = "") const;
30 
31  //
32  // Getters
33  //
34 
36  Int_t id() const { return (Int_t)mId; }
38  Int_t adc() const { return (Int_t)mAdc; }
40  Float_t energy() const { return mEnergy; }
41 
42  //
43  // Setters
44  //
45 
47  void setId(Int_t id) { mId = (id > std::numeric_limits<short>::max()) ? -1 : (Short_t)id; }
49  void setAdc(Int_t adc)
50  { mAdc = ( adc > std::numeric_limits<unsigned short>::max() ) ?
51  std::numeric_limits<unsigned short>::max() : (UShort_t)adc; }
53  void setEnergy(Float_t energy) { mEnergy = energy; }
54 
55  private:
56 
58  Short_t mId;
60  Short_t mAdc;
62  Float_t mEnergy;
63 
64  ClassDef(StPicoBEmcSmdPHit, 1);
65 };
66 
67 #endif
Int_t id() const
SMD Phi hit id.
Float_t energy() const
SMD Phi hit energy.
StPicoBEmcSmdPHit()
Default constructor.
void setId(Int_t id)
Set hit id.
void setEnergy(Float_t energy)
Set energy corresponding to the hit.
virtual void Print(const Char_t *option="") const
Print BEMC SmdPhi hit information.
void setAdc(Int_t adc)
Set hit ADC.
virtual ~StPicoBEmcSmdPHit()
Destructor.
Holds BEMC SmdPhi hit information.
Int_t adc() const
SMD Phi hit ADC.