102 Int_t copyNoStickSens;
103 Int_t copyNoSTICKSENSCom, copyNoSTICKCom;
109 Int_t sticksens, stick;
125 ivol = vol->getMCid();
128 gMC->CurrentVolOffID(0, sticksens);
129 gMC->CurrentVolOffID(1, stick);
130 copyNoSTICKSENSCom = sticksens;
131 copyNoSTICKCom = stick;
137 if (gMC->IsTrackEntering()) {
146 gMC->TrackPosition(PosIn);
147 fPos.SetXYZ(PosIn.
X(), PosIn.
Y(), PosIn.
Z());
150 gMC->TrackMomentum(MomIn);
151 fMom.SetXYZ(MomIn.
Px(), MomIn.
Py(), MomIn.
Pz());
153 fTime = gMC->TrackTime() * 1.0e09;
157 if (gMC->IsTrackInside()) {
159 gMC->TrackPosition(tPos);
160 gMC->TrackMomentum(tMom);
161 length += gMC->TrackStep();
170 time += gMC->TrackTime() * 1.0e09;
172 if (gMC->IsTrackStop() || gMC->IsTrackDisappeared()) {
178 fTrackID = gMC->GetStack()->GetCurrentTrackNumber();
187 if (copyNoSTICKSENSCom == sticksens && copyNoSTICKCom == stick) {
188 if (!
GetHit(sticksens, stick)) {
202 if (gMC->IsTrackExiting()) {
206 fTrackID = gMC->GetStack()->GetCurrentTrackNumber();
207 time += gMC->TrackTime() * 1.0e09;
208 length += gMC->TrackLength();
218 gMC->TrackPosition(tPos);
219 gMC->TrackMomentum(tMom);
222 if (copyNoSTICKSENSCom == sticksens && copyNoSTICKCom == stick) {
223 if (!
GetHit(sticksens, stick)) {
236 Int_t points = gMC->GetStack()->GetCurrentTrack()->GetMother(1);
237 points = (points & (~(1 << 30))) | (1 << 30);
239 gMC->GetStack()->GetCurrentTrack()->SetMother(1, points);
void AddSTICK(Int_t trackID, Int_t detID, Int_t idsticksens, Int_t idstick, TVector3 pos, TVector3 mom, Double_t dt, Double_t dl, Double_t de)
BmnHodoPoint * AddHit(Int_t trackID, Int_t detID, Int_t copyNo, Int_t copyNoMother, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss)