#include <muonHit.h>
Definition at line 11 of file muonHit.h.
◆ muonHit() [1/4]
◆ muonHit() [2/4]
muonHit::muonHit |
( |
Int_t |
detID, |
|
|
Float_t |
digi, |
|
|
Bool_t |
isValid |
|
) |
| |
Constructor with arguments
- Parameters
-
detID | Detector ID |
digi | digitized/measured TDC |
flag | True/False, false if there is another hit with smaller tdc |
Definition at line 35 of file muonHit.cxx.
37{
38
41}
void setValidity(Bool_t isValid)
◆ muonHit() [3/4]
muonHit::muonHit |
( |
muonPoint * |
p, |
|
|
Double_t |
t0 |
|
) |
| |
Definition at line 43 of file muonHit.cxx.
45{
46
47 TVector3 truePosition = TVector3(
p->GetX(),
p->GetY(),
p->GetZ());
51}
Float_t fdigi
digitized detector hit
void SetDetectorID(Int_t detID)
Double_t SetMuonTimeRes(Double_t mcTime)
Int_t DetIDfromXYZ(TVector3 p)
◆ ~muonHit()
◆ muonHit() [4/4]
muonHit::muonHit |
( |
const muonHit & |
point | ) |
|
|
private |
◆ DetIDfromXYZ()
Int_t muonHit::DetIDfromXYZ |
( |
TVector3 |
p | ) |
|
Definition at line 53 of file muonHit.cxx.
54{
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71 Int_t detID, nStat;
72
76 }
77 nStat = -1;
78 for(Int_t i=0;
i<muStZpos.size();
i++) {
79 if (abs(
p.Z() - muStZpos[i]) <= muStzMax[i]) {
81 break;
82 }
83 }
84
85 if (nStat != -1) {
86 detID=(Int_t)((
p.X()+muStxMax[nStat])/
tileXdim)+tileXn[nStat]
87 *(Int_t)((
p.Y()+muStyMax[nStat])/
tileYdim)+10000*nStat;
88 } else {
89 detID = -1;
90 }
91
92 return detID;
93}
◆ getPos()
TVector3 muonHit::getPos |
( |
| ) |
|
|
inline |
Definition at line 34 of file muonHit.h.
Int_t fDetectorID
Detector unique identifier.
TVector3 XYZfromDetID(Int_t detID)
◆ isValid()
Bool_t muonHit::isValid |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ Print()
void muonHit::Print |
( |
| ) |
const |
|
virtual |
Output to screen
Definition at line 171 of file muonHit.cxx.
171 {
172
173 cout <<
"-I- muonHit: muon hit " <<
" in detector " <<
fDetectorID << endl;
174 cout <<
" TDC " <<
fdigi <<
" ns" << endl;
175
176}
◆ SetMuonTimeRes()
Double_t muonHit::SetMuonTimeRes |
( |
Double_t |
mcTime | ) |
|
Definition at line 164 of file muonHit.cxx.
164 {
165
166 TRandom3 *rand = new TRandom3(0);
168 delete rand;
169 return cTime;
170}
const Double_t muonTimeResSigma
◆ setValidity()
void muonHit::setValidity |
( |
Bool_t |
isValid | ) |
|
◆ stInit()
Definition at line 133 of file muonHit.cxx.
134{
135
136
137 TGeoShape* muShape; TGeoBBox* muonBox;
138 TGeoNavigator*
nav = gGeoManager->GetCurrentNavigator();
139 Double_t
loc[3]={0,0,0}, global[3]={0,0,0};
140
141 TString muDet = "cave/MuonDetector_1";
143 TGeoNode*
node =
nav->GetCurrentNode();
144 TObjArray* nodes =
node->GetVolume()->GetNodes();
145
146 for (Int_t i = 0;
i < nodes->GetEntries();
i++) {
147 node = (TGeoNode*)nodes->At(i);
148 Int_t muStNs = 0;
149 if (TString(
node->GetName()).Contains(
"muondet")) {
150 nav->cd(muDet+
"/"+
node->GetName());
151 TGeoVolume* volu =
node->GetVolume();
152 muShape =
node->GetVolume()->GetShape();
153 muonBox = (TGeoBBox*) muShape;
154 muStxMax.push_back(muonBox->GetDX()); muStyMax.push_back(muonBox->GetDY());
155 muStzMax.push_back(muonBox->GetDZ());
156 nav->LocalToMaster(loc,global); muStZpos.push_back(global[2]);
157 tileXn.push_back(2*muStxMax.at(muStNs)/
tileXdim);
158 tileYn.push_back(2*muStyMax.at(muStNs)/
tileYdim);
159 muStNs++;
160 }
161 }
162}
◆ XYZfromDetID()
TVector3 muonHit::XYZfromDetID |
( |
Int_t |
detID | ) |
|
Definition at line 95 of file muonHit.cxx.
96{
97
98
99
100
101
102 Int_t nStat; TVector3
p;
103
107 }
108 nStat = -1;
109 for(Int_t i=0;
i<=muStZpos.size();
i++) {
110 if (dID < 10000*i) {
112 break;
113 }
114 }
115 if (nStat < 1) {
116 p.SetXYZ(-999999,-999999,-999999);
118 }
119
120
121 p.SetZ(muStZpos[--nStat]);
122 dID -= 10000*(nStat);
123
124 Int_t muXpos, muYpos;
125 muXpos =
tileXdim*((dID%tileXn[nStat])+0.5)-muStxMax[nStat];
126 muYpos =
tileYdim*((Int_t)(dID/tileXn[nStat])+0.5)-muStyMax[nStat];
127 p.SetXYZ(muXpos, muYpos, muStZpos[nStat]);
128
130
131}
◆ flag
◆ hisV
◆ onlyOnce
bool muonHit::onlyOnce =false |
|
staticprivate |
The documentation for this class was generated from the following files: