StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPicoBEmcSmdPHit.cxx
1 //
2 // The StPicoBEmc SmdPhi class holds SMDPhi hits associated with an EMC trigger
3 //
4 
5 // C++ headers
6 #include <limits>
7 
8 // ROOT headers
9 #include "TMath.h"
10 
11 // PicoDst headers
12 #include "StPicoMessMgr.h"
13 #include "StPicoBEmcSmdPHit.h"
14 
15 ClassImp(StPicoBEmcSmdPHit)
16 
17 //_________________
19  mId(-9999),
20  mAdc(-9999),
21  mEnergy(-9999) {
22  /* emtpy */
23 }
24 
25 //_________________
26 StPicoBEmcSmdPHit::StPicoBEmcSmdPHit(Int_t id, Int_t adc, Float_t energy) : TObject() {
27  mId = (id > std::numeric_limits<short>::max()) ? -1 : (Short_t)id;
28  mAdc = ( adc > std::numeric_limits<unsigned short>::max() ) ?
29  std::numeric_limits<unsigned short>::max() : (UShort_t)adc;
30  mEnergy = energy;
31 }
32 
33 //_________________
35  mId = hit.mId;
36  mAdc = hit.mAdc;
37  mEnergy = hit.mEnergy;
38 }
39 
40 //_________________
42  /* empty */
43 }
44 
45 //_________________
46 void StPicoBEmcSmdPHit::Print(const Char_t* option __attribute__((unused)) ) const {
47  LOG_INFO << "id: " << id() << " ADC: " << adc() << " energy: " << energy() << endm;
48 }
Int_t id() const
SMD Phi hit id.
Float_t energy() const
SMD Phi hit energy.
StPicoBEmcSmdPHit()
Default constructor.
virtual void Print(const Char_t *option="") const
Print BEMC SmdPhi hit information.
virtual ~StPicoBEmcSmdPHit()
Destructor.
Holds BEMC SmdPhi hit information.
Int_t adc() const
SMD Phi hit ADC.