StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFstRawHit.h
1 #ifndef StFstRawHit_hh
2 #define StFstRawHit_hh
3 
4 #include "StObject.h"
5 #include "StEvent/StFstConsts.h"
6 
7 
14 class StFstRawHit : public StObject
15 {
16 public:
17  //constructors
18  StFstRawHit();
19 
20  template<typename Container>
21  StFstRawHit(int channelId, int geoId,
22  const Container &charges, const Container &chargeErrs = Container{},
23  UChar_t maxTimeBin = 1, UShort_t idTruth = 0);
24 
25  StFstRawHit(const StFstRawHit &rawHit);
26 
27  //accessors
28  int getChannelId() const;
29  int getGeoId() const;
30  int getSeedhitflag() const;
31  unsigned char getDisk() const;
32  unsigned char getWedge() const;
33  unsigned char getPhiStrip() const;
34  unsigned char getRStrip() const;
35  float getCharge(int tb = 0) const;
36  float getChargeErr(int tb = 0) const;
37  unsigned char getMaxTimeBin() const;
38  unsigned char getRdo() const;
39  unsigned char getArm() const;
40  unsigned char getApv() const;
41  unsigned char getSensor() const;
42  unsigned char getChannel() const;
43  static unsigned char getDefaultTimeBin();
44  unsigned short getIdTruth() const;
45 
46  //modifiers
47  void setChannelId(int rChannelId);
48  void setGeoId(int rChannelId);
49  void setSeedhitflag(int rSeedhitflag);
50  void setCharge(float charge, int tb = -1);
51 
54  template<typename Container>
55  void setCharges(const Container& charges) {
56  std::copy( std::begin(charges), std::end(charges), mCharge);
57  }
58 
59  void setChargeErr(float chargeErr, int tb = -1);
60  void setMaxTimeBin(int tb) ;
61  static void setDefaultTimeBin( int tb );
62  void setIdTruth(unsigned short idTruth);
63 
64  using StObject::Print;
65  void Print(int nTimeBins) const;
66 
67 private:
68 
69  Int_t mChannelId;
70  Int_t mGeoId;
71  Int_t mSeedhitflag;
72  Float_t mCharge[kFstNumTimeBins];
73  Float_t mChargeErr[kFstNumTimeBins];
75  UChar_t mMaxTimeBin;
76  UShort_t mIdTruth;
77 
78  static UChar_t mDefaultTimeBin;
79 
80  ClassDef(StFstRawHit, 1)
81 };
82 
83 
86  bool operator() (const StFstRawHit *rawHit1, const StFstRawHit *rawHit2) const;
87 };
88 
89 #endif
unsigned char getChannel() const
0-127
unsigned char getArm() const
0-2
Definition: StFstRawHit.cxx:84
unsigned char getSensor() const
0-2
Definition: StFstRawHit.cxx:94
unsigned char getRStrip() const
0-7
Definition: StFstRawHit.cxx:73
unsigned char getDisk() const
1-3
Definition: StFstRawHit.cxx:57
unsigned char getPhiStrip() const
0-127
Definition: StFstRawHit.cxx:67
int getGeoId() const
0-36863
Definition: StFstRawHit.cxx:51
unsigned char getApv() const
0-15
Definition: StFstRawHit.cxx:89
unsigned short getIdTruth() const
for embedding, 0 as background
Definition: StFstRawHit.cxx:55
int getChannelId() const
0-36863
Definition: StFstRawHit.cxx:50
unsigned char getRdo() const
1-6
Definition: StFstRawHit.cxx:79
void setCharges(const Container &charges)
Definition: StFstRawHit.h:55
int getSeedhitflag() const
0 or 1
Definition: StFstRawHit.cxx:52
unsigned char getWedge() const
1-36
Definition: StFstRawHit.cxx:62