123 Int_t
id = gMC->CurrentVolID(copyNo);
124 if (
id !=
fVolId)
return false;
126 Double_t charge = gMC->TrackCharge();
127 if (charge == 0.)
return false;
129 if (!gMC->IsTrackEntering())
return false;
132 gMC->CurrentVolOffID(1, copyNo);
135 Double_t globalPos[3];
136 Double_t localPos[3];
137 gMC->TrackPosition(globalPos[0], globalPos[1], globalPos[2]);
138 gMC->Gmtod(globalPos, localPos, 1);
154 hit->
SetWorldPos(TVector3(globalPos[0], globalPos[1], globalPos[2]));
155 hit->
SetLocalPos(TVector3(localPos[0], localPos[1], localPos[2]));
156 hit->
SetTime(gMC->TrackTime());