CbmRoot
CbmTrdHit.h
Go to the documentation of this file.
1 
8 #ifndef CBMTRDHIT_H_
9 #define CBMTRDHIT_H_
10 
11 #include <Rtypes.h> // for CLRBIT, SETBIT, TESTBIT, ClassDef
12 #include <RtypesCore.h> // for Bool_t, Double_t, kTRUE, Int_t, Double32_t
13 
14 #include <string> // for string
15 
16 #include "CbmPixelHit.h" // for CbmPixelHit
17 #include "CbmTrdAddress.h" // for CbmTrdAddress
18 
19 class TVector3;
20 
35 class CbmTrdHit : public CbmPixelHit {
36 public:
37  enum CbmTrdHitDef {
38  kType = 0
39  ,
40  kMaxType
41  ,
42  kRowCross
43  ,
44  kOvfl
45  };
49  CbmTrdHit();
50 
60  CbmTrdHit(Int_t address,
61  const TVector3& pos,
62  const TVector3& dpos,
63  Double_t dxy,
64  Int_t refId,
65  Double_t eLoss,
66  Double_t time = 0.,
67  Double_t timeError = 0.);
68 
70  virtual ~CbmTrdHit();
71 
73  Int_t GetPlaneId() const { return CbmTrdAddress::GetLayerId(GetAddress()); }
74 
76  virtual std::string ToString() const;
77 
79  Double_t GetELoss() const { return fELoss; }
80  Bool_t GetClassType() const { return TESTBIT(fDefine, kType); }
81  Bool_t GetMaxType() const { return TESTBIT(fDefine, kMaxType); }
82  Bool_t HasOverFlow() const { return TESTBIT(fDefine, kOvfl); }
83  Bool_t IsRowCross() const { return TESTBIT(fDefine, kRowCross); }
84 
86  void SetELoss(Double_t loss) { fELoss = loss; }
88  void SetOverFlow(Bool_t set = kTRUE) {
89  set ? SETBIT(fDefine, kOvfl) : CLRBIT(fDefine, kOvfl);
90  }
92  void SetRowCross(Bool_t set = kTRUE) {
93  set ? SETBIT(fDefine, kRowCross) : CLRBIT(fDefine, kRowCross);
94  }
96  void SetClassType(Bool_t set = kTRUE) {
97  set ? SETBIT(fDefine, kType) : CLRBIT(fDefine, kType);
98  }
100  void SetMaxType(Bool_t set = kTRUE) {
101  set ? SETBIT(fDefine, kMaxType) : CLRBIT(fDefine, kMaxType);
102  }
103 
104 private:
105  UChar_t fDefine; // hit extra info
106  Double32_t fELoss; // Energy deposit due to TR + dEdx
107 
109 };
110 
111 #endif
CbmTrdHit::GetClassType
Bool_t GetClassType() const
Definition: CbmTrdHit.h:80
CbmTrdHit::fELoss
Double32_t fELoss
Definition: CbmTrdHit.h:106
CbmTrdAddress.h
Helper class to convert unique channel ID back and forth.
CbmTrdHit::~CbmTrdHit
virtual ~CbmTrdHit()
Destructor.
Definition: CbmTrdHit.cxx:37
CbmTrdHit::SetELoss
void SetELoss(Double_t loss)
Definition: CbmTrdHit.h:86
CbmTrdHit::GetELoss
Double_t GetELoss() const
Definition: CbmTrdHit.h:79
CbmTrdHit
data class for a reconstructed Energy-4D measurement in the TRD
Definition: CbmTrdHit.h:35
CbmTrdHit::GetMaxType
Bool_t GetMaxType() const
Definition: CbmTrdHit.h:81
CbmTrdHit::IsRowCross
Bool_t IsRowCross() const
Definition: CbmTrdHit.h:83
CbmTrdHit::SetOverFlow
void SetOverFlow(Bool_t set=kTRUE)
Mark overflow in one or more digits which define the hit.
Definition: CbmTrdHit.h:88
CbmTrdAddress::GetLayerId
static UInt_t GetLayerId(UInt_t address)
Return layer ID from address.
Definition: CbmTrdAddress.h:69
CbmTrdHit::fDefine
UChar_t fDefine
Definition: CbmTrdHit.h:105
CbmTrdHit::ClassDef
ClassDef(CbmTrdHit, 3)
CbmTrdHit::kMaxType
@ kMaxType
set type of pad on which the maximum charge is found
Definition: CbmTrdHit.h:40
dpos
TVector3 dpos
Definition: CbmMvdSensorDigiToHitTask.cxx:61
CbmTrdHit::kOvfl
@ kOvfl
mark over-flow in the data
Definition: CbmTrdHit.h:44
CbmHit::GetAddress
Int_t GetAddress() const
Definition: CbmHit.h:73
CbmTrdHit::kType
@ kType
set type of pad layout
Definition: CbmTrdHit.h:38
CbmTrdHit::SetRowCross
void SetRowCross(Bool_t set=kTRUE)
Mark hit reconstructed between pad rows.
Definition: CbmTrdHit.h:92
CbmPixelHit.h
CbmTrdHit::SetMaxType
void SetMaxType(Bool_t set=kTRUE)
Extra bool definition for the hit (e.g. the type of maximum for triangular pads).
Definition: CbmTrdHit.h:100
CbmTrdHit::ToString
virtual std::string ToString() const
Inherited from CbmBaseHit.
Definition: CbmTrdHit.cxx:39
CbmTrdHit::HasOverFlow
Bool_t HasOverFlow() const
Definition: CbmTrdHit.h:82
CbmTrdHit::CbmTrdHit
CbmTrdHit()
Default constructor.
Definition: CbmTrdHit.cxx:17
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
CbmPixelHit
Definition: CbmPixelHit.h:21
CbmTrdHit::SetClassType
void SetClassType(Bool_t set=kTRUE)
Type of pad layout used in reconstruction R[0], T[1].
Definition: CbmTrdHit.h:96
CbmTrdHit::kRowCross
@ kRowCross
mark hit defined by 2 clusters
Definition: CbmTrdHit.h:42
CbmTrdHit::CbmTrdHitDef
CbmTrdHitDef
Definition: CbmTrdHit.h:37
CbmTrdHit::GetPlaneId
Int_t GetPlaneId() const
Inherited from CbmBaseHit.
Definition: CbmTrdHit.h:73