BmnRoot
Loading...
Searching...
No Matches
BmnDchHit.h
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------------------------------
2#ifndef __BMN_DCH_HIT_H
3#define __BMN_DCH_HIT_H 1
4
5#include "BmnHit.h"
6
7#include "TArrayI.h"
8//------------------------------------------------------------------------------------------------------------------------
9class BmnDchHit : public BmnHit {
10
11public:
12
13 BmnDchHit();
14 BmnDchHit(Int_t detectorID, TVector3 pos, TVector3 dpos, Int_t refIndex, Int_t flag, Int_t trackIndex, UChar_t dchlayer);
15 BmnDchHit(Int_t detectorID, TVector3 pos, TVector3 dpos, Int_t refIndex, Int_t flag);
16 BmnDchHit(Int_t detectorID, TVector3 pos, TVector3 dpos, Int_t refIndex);
17
18
19 virtual ~BmnDchHit();
20
21 void Print(const Option_t* opt = 0) const;
22
24 Int_t GetTrackID() const { return fTrackID; } // get track ID
25 Int_t GetFlag() const { return fFlag; } // get flag
26 Int_t GetNofDim() const { return fNofDim; } // get number of measurements per point
27 //Int_t Overlap() const { return fIndex.GetSize()-1; } //
28 //Int_t GetIndex(Int_t indx = 0) const { return fIndex[indx]; } //
29 UChar_t GetLayer() const { return fDchLayer; } //
30 UShort_t GetLayerNumber() const { return fDchLayerNumber; } //
31 TString GetLayerType() const { return fDchLayerType;}
32 Int_t GetWireNumber() { return fWireNumber; }
33 Double_t GetDistanceToWire() { return fDistanceToWire; }
34 Int_t GetDetectorID() const { return fDetectorID; } //
35 Double_t GetPhi() const { return fPhi; } // get rotation angle
36 Double_t GetMeas(Int_t indx = 0) const { return fMeas[indx]; } // get measurement
37 Double_t GetError(Int_t indx = 0) const { return fError[indx]; } // get measurement error
38 //const TArrayI* Index() const { return &fIndex; } ///< Get index array of the hit
39 UChar_t GetDchId() const { return fDchId; }
40 UShort_t GetDchIdNumber() const { return fDchIdNumber; }
41 Int_t GetHitId() const { return fID; }
42 Int_t GetEventID() const { return fEventID; }
43
44 Double_t GetDrift(void) const {return fDriftLength; };
45 void SetDrift(Double_t v) { fDriftLength = v; };
46 Double_t GetWirePosition(void) const {return fWirePos; };
47 void SetWirePosition(Double_t v) { fWirePos = v; };
48 Double_t GetWireDelay(void) const {return fWireDelayLength; };
49 void SetWireDelay(Double_t v) { fWireDelayLength = v; };
50 Double_t GetTShift(void) const {return fTS; };
51 void SetTShift(Double_t v) { fTS = v; };
52 Double_t GetDriftTime(void) const {return fTS; };
53 void SetDriftTime(Double_t v) { fTS = v; };
54
56 //void SetTrackId(Int_t trackID) { fTrackID = trackID; }
57 void SetFlag(Int_t flag) { fFlag = flag; }
58 void SetDchId(UChar_t id) { fDchId = id; }
59 void SetDchIdNumber(UShort_t id) { fDchIdNumber = id; }
60 void SetDchLayerNumber(UShort_t id) { fDchLayerNumber = id; }
61 void SetDchLayerType(TString layer_type) { fDchLayerType = layer_type; }
62 void SetWireNumber(Int_t wire_num) { fWireNumber = wire_num; }
64 void SetNofDim(Int_t dim) { fNofDim = dim; } // set number of measurements per point
65 void SetPhi(Double_t phi) { fPhi = phi; } // set rotation angle
66 void SetMeas(Double_t meas, Int_t indx = 0) { fMeas[indx] = meas; } // set measurement
67 void SetError(Double_t err, Int_t indx = 0) { fError[indx] = err; } // set measurement
68 void SetIndex(Int_t indx);
69 void SetHitId(Int_t idx) { fID = idx; }
70 void SetEventID(Int_t iev) { fEventID = iev; }
71
72 Bool_t IsSortable() const { return kTRUE; }
73 Int_t Compare(const TObject* hit) const;
74
75 Bool_t IsUsed() const {
76 return fUsing;
77 }
78
79 void SetUsing(Bool_t use) {
80 fUsing = use;
81 }
82
83
84
85protected:
86
87 Int_t fEventID; // identifier of event
88 Int_t fID; // identifier of hit in hits array
89 Int_t fDetectorID; // Detector ID
90 UChar_t fDchLayer; // Dch layer ID (0-7)
91 UShort_t fDchLayerNumber; // Dch layer ID (0-7)
92 TString fDchLayerType; // DCH layer type (x, y, v, u)
93 Int_t fWireNumber; // Nearest wire to a MC-track
94 Double_t fDistanceToWire; // Distance from a MC-point to the nearest wire
95 Int_t fTrackID; // track ID
96 Int_t fFlag; // Flag for general purposes [TDC, event tagging...]
97 Int_t fNofDim; // number of measurements per point
98 Double32_t fPhi; // track angle
99 Double32_t fMeas[2]; // measurements (coordinates)
100 Double32_t fError[2]; // measurement errors
101 //TArrayI fIndex; //! // array of indices of overlapped MC points
102 UChar_t fDchId; // DCH Id (1, 2)
103 UShort_t fDchIdNumber; // DCH Id (1, 2)
104
106
107 Bool_t fUsing;
108
109 ClassDef(BmnDchHit,1)
110
111};
112//------------------------------------------------------------------------------------------------------------------------
113#endif
vector< Double_t > dist(vector< Double_t > qp, Double_t mu)
Definition BmnMath.cxx:869
__m128 v
Definition P4_F32vec4.h:1
Int_t fWireNumber
Definition BmnDchHit.h:93
Double_t GetTShift(void) const
Definition BmnDchHit.h:50
void SetDistanceToWire(Double_t dist)
Definition BmnDchHit.h:63
void SetHitId(Int_t idx)
Definition BmnDchHit.h:69
void SetWirePosition(Double_t v)
Definition BmnDchHit.h:47
void SetIndex(Int_t indx)
Add index of detector hit.
void SetPhi(Double_t phi)
Definition BmnDchHit.h:65
TString GetLayerType() const
Definition BmnDchHit.h:31
Double_t GetDistanceToWire()
Definition BmnDchHit.h:33
void SetDchIdNumber(UShort_t id)
Definition BmnDchHit.h:59
Double_t GetDrift(void) const
Definition BmnDchHit.h:44
Double_t GetDriftTime(void) const
Definition BmnDchHit.h:52
Double32_t fError[2]
Definition BmnDchHit.h:100
UChar_t fDchId
Definition BmnDchHit.h:102
void SetDchLayerNumber(UShort_t id)
Definition BmnDchHit.h:60
Int_t fTrackID
Definition BmnDchHit.h:95
Double32_t fWirePos
Definition BmnDchHit.h:105
void Print(const Option_t *opt=0) const
Definition BmnDchHit.cxx:70
void SetDchLayerType(TString layer_type)
Definition BmnDchHit.h:61
Bool_t fUsing
Definition BmnDchHit.h:107
virtual ~BmnDchHit()
Definition BmnDchHit.cxx:67
void SetDrift(Double_t v)
Definition BmnDchHit.h:45
void SetFlag(Int_t flag)
Definition BmnDchHit.h:57
Int_t fDetectorID
Definition BmnDchHit.h:89
Double_t GetPhi() const
Definition BmnDchHit.h:35
void SetUsing(Bool_t use)
Definition BmnDchHit.h:79
UShort_t fDchIdNumber
Definition BmnDchHit.h:103
Int_t fID
Definition BmnDchHit.h:88
UShort_t GetLayerNumber() const
Definition BmnDchHit.h:30
Bool_t IsUsed() const
Definition BmnDchHit.h:75
Int_t GetDetectorID() const
Definition BmnDchHit.h:34
UShort_t GetDchIdNumber() const
Definition BmnDchHit.h:40
Double32_t fTS
Definition BmnDchHit.h:105
Double_t GetError(Int_t indx=0) const
Definition BmnDchHit.h:37
Double_t GetWirePosition(void) const
Definition BmnDchHit.h:46
void SetDchId(UChar_t id)
Definition BmnDchHit.h:58
Int_t GetTrackID() const
Definition BmnDchHit.h:24
void SetWireNumber(Int_t wire_num)
Definition BmnDchHit.h:62
void SetEventID(Int_t iev)
Definition BmnDchHit.h:70
void SetMeas(Double_t meas, Int_t indx=0)
Definition BmnDchHit.h:66
Int_t fFlag
Definition BmnDchHit.h:96
Double_t GetMeas(Int_t indx=0) const
Definition BmnDchHit.h:36
Double_t GetWireDelay(void) const
Definition BmnDchHit.h:48
Double_t fDistanceToWire
Definition BmnDchHit.h:94
Int_t fNofDim
Definition BmnDchHit.h:97
void SetTShift(Double_t v)
Definition BmnDchHit.h:51
Int_t GetNofDim() const
Definition BmnDchHit.h:26
void SetNofDim(Int_t dim)
Definition BmnDchHit.h:64
Int_t GetEventID() const
Definition BmnDchHit.h:42
Int_t Compare(const TObject *hit) const
sort in ascending order in abs(Z)
Definition BmnDchHit.cxx:87
void SetDriftTime(Double_t v)
Definition BmnDchHit.h:53
Double32_t fWireDelayLength
Definition BmnDchHit.h:105
Double32_t fDriftLength
Definition BmnDchHit.h:105
void SetError(Double_t err, Int_t indx=0)
Definition BmnDchHit.h:67
UChar_t GetLayer() const
Definition BmnDchHit.h:29
Double32_t fPhi
Definition BmnDchHit.h:98
Int_t fEventID
Definition BmnDchHit.h:87
UShort_t fDchLayerNumber
Definition BmnDchHit.h:91
Double32_t fMeas[2]
Definition BmnDchHit.h:99
Int_t GetFlag() const
Definition BmnDchHit.h:25
UChar_t fDchLayer
Definition BmnDchHit.h:90
UChar_t GetDchId() const
Definition BmnDchHit.h:39
Bool_t IsSortable() const
Definition BmnDchHit.h:72
TString fDchLayerType
Definition BmnDchHit.h:92
void SetWireDelay(Double_t v)
Definition BmnDchHit.h:49
Int_t GetHitId() const
Definition BmnDchHit.h:41
Int_t GetWireNumber()
Definition BmnDchHit.h:32
const UInt_t dim