128 Int_t copyNoCellSmallCut = 0;
129 Int_t copyNoCellSmallCut_10mm = 0;
130 Int_t copyNoCellSmallCut_20mm = 0;
131 Int_t copyNoCellSmallTrap = 0;
132 Int_t copyNoCellSmallTrap_10mm = 0;
133 Int_t copyNoCellSmallTrap_20mm = 0;
134 Int_t copyNoCellLargeCut = 0;
135 Int_t copyNoCellLargeTrap = 0;
136 Int_t copyNoSLICECom = 0, copyNoCELLCom = 0;
141 Int_t slice = 0, cell = 0;
165 Int_t ivol = vol->getMCid();
177 gMC->CurrentVolOffID(0, slice);
178 gMC->CurrentVolOffID(1, cell);
179 copyNoSLICECom = slice;
180 copyNoCELLCom = cell;
186 if (gMC->IsTrackEntering()) {
195 gMC->TrackPosition(PosIn);
196 fPos.SetXYZ(PosIn.
X(), PosIn.
Y(), PosIn.
Z());
199 gMC->TrackMomentum(MomIn);
200 fMom.SetXYZ(MomIn.
Px(), MomIn.
Py(), MomIn.
Pz());
202 fTime = gMC->TrackTime() * 1.0e09;
210 if (gMC->IsTrackInside()) {
212 gMC->TrackPosition(tPos);
213 gMC->TrackMomentum(tMom);
214 length += gMC->TrackStep();
218 if (gMC->TrackStep() > 0)
219 QCF = 1. + (BirkConst / gMC->TrackStep()) * gMC->Edep();
222 fELoss += (gMC->Edep()) / QCF;
224 time += gMC->TrackTime() * 1.0e09;
226 if (gMC->IsTrackStop() || gMC->IsTrackDisappeared()) {
232 fTrackID = gMC->GetStack()->GetCurrentTrackNumber();
247 if (copyNoSLICECom == slice && copyNoCELLCom == cell) {
248 if (!
GetHit(slice, cell)) {
262 if (gMC->IsTrackExiting()) {
264 fTrackID = gMC->GetStack()->GetCurrentTrackNumber();
265 time += gMC->TrackTime() * 1.0e09;
266 length += gMC->TrackLength();
270 if (gMC->TrackStep() > 0)
271 QCF = 1. + (BirkConst / gMC->TrackStep()) * gMC->Edep();
274 fELoss += (gMC->Edep()) / QCF;
276 gMC->TrackPosition(tPos);
277 gMC->TrackMomentum(tMom);
283 if (copyNoSLICECom == slice && copyNoCELLCom == cell) {
284 if (!
GetHit(slice, cell)) {
296 Int_t points = gMC->GetStack()->GetCurrentTrack()->GetMother(1);
297 points = (points & (~(1 << 30))) | (1 << 30);
299 gMC->GetStack()->GetCurrentTrack()->SetMother(1, points);
void AddCELL(Int_t trackID, Int_t detID, Int_t idslice, Int_t idcell, TVector3 pos, TVector3 mom, Double_t dt, Double_t dl, Double_t de)
BmnScWallPoint * 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)