93 static const Double_t BirkC1 = 0.013 / dP;
94 static const Double_t BirkC2 = 9.6e-6 / (dP * dP);
102 Int_t ivol = vol->getMCid();
108 static Int_t lEDEBUGcounter = 0;
109 if (lEDEBUGcounter < 1)
110 std::cout <<
"EDEBUG-- BmnBC::ProcessHits: entered" << gMC->CurrentVolPath() << endl;
113 if (gMC->IsTrackEntering()) {
124 gMC->TrackPosition(PosIn);
125 fPosIn.SetXYZ(PosIn.
X(), PosIn.
Y(), PosIn.
Z());
127 if (PosIn.
Z() < -810) {
129 }
else if (PosIn.
Z() > -810 && PosIn.
Z() < -730) {
131 }
else if (PosIn.
Z() > -730 && PosIn.
Z() < -472) {
138 gMC->TrackMomentum(MomIn);
141 timeIn = gMC->TrackTime() * 1.0e09;
153 if ((gMC->IsTrackExiting() || gMC->IsTrackStop() || gMC->IsTrackDisappeared()) && (
fELoss > 0)) {
155 gMC->TrackPosition(PosOut);
156 fPosOut.SetXYZ(PosOut.
X(), PosOut.
Y(), PosOut.
Z());
163 if (PosOut.
Z() < -810) {
165 }
else if (PosOut.
Z() > -810 && PosOut.
Z() < -730) {
167 }
else if (PosOut.
Z() > -730 && PosOut.
Z() < -472) {
210 gMC->TrackMomentum(MomOut);
213 timeOut = gMC->TrackTime() * 1.0e09;
224 if (gMC->TrackCharge() != 0) {
228 BirkC1Mod = BirkC1 * 7.2 / 12.6;
232 if (gMC->TrackStep() > 0) {
233 Double_t dedxcm = gMC->Edep() * 1000. / gMC->TrackStep();
235 gMC->Edep() * 1000. / (1. + BirkC1Mod * dedxcm + BirkC2 * dedxcm * dedxcm);
236 curLightYield /= 1000.;
237 lightYield += curLightYield;
239 lengthtrack = gMC->TrackStep();
244 fTrackID = gMC->GetStack()->GetCurrentTrackNumber();
247 part = gMC->GetStack()->GetCurrentTrack();
254 Double_t time = gMC->TrackTime() * 1.0e09;
255 Double_t length = gMC->TrackLength();
258 gMC->CurrentVolID(copyNo);
261 gMC->CurrentVolOffID(1, iCell);
264 if (lEDEBUGcounter < 100) {
265 std::cout <<
"EDEBUG-- BmnBC::ProcessHits: TrackID:" <<
fTrackID <<
268 " " << gMC->CurrentVolPath() <<
" " << tPos.Z() <<
270 " " << ivol <<
"==" << gMC->CurrentVolID(copyNo) <<
"," << copyNo <<
" "
271 << gMC->CurrentVolOffID(1, iCell) <<
" " << iCell <<
" " << gMC->CurrentVolOffName(1) <<
" "
272 << gMC->CurrentVolOffName(0) <<
283 AddHit(
fTrackID, ivol, copyNo,
fPosIn,
fPosOut,
fMomIn,
fMomOut, time, length,
fELoss,
fIsPrimary,
fCharge,
284 fPdgId, lightYield, timeIn, timeOut, lengthtrack);
288 AddHit(
fTrackID, ivol, copyNo,
fPosIn,
fPosOut,
fMomIn,
fMomOut, time, length,
fELoss,
fStation,
fIsPrimary,
382 FairGeoLoader* geoLoad = FairGeoLoader::Instance();
383 FairGeoInterface* geoFace = geoLoad->getGeoInterface();
385 BCGeo->setGeomFile(GetGeometryFileName());
386 geoFace->addGeoModule(BCGeo);
388 Bool_t rc = geoFace->readSet(BCGeo);
390 BCGeo->create(geoLoad->getGeoBuilder());
391 TList* volList = BCGeo->getListOfVolumes();
394 FairRun* fRun = FairRun::Instance();
395 FairRuntimeDb* rtdb = FairRun::Instance()->GetRuntimeDb();
401 FairGeoNode* node =
nullptr;
402 FairGeoVolume* aVol =
nullptr;
404 while ((node = (FairGeoNode*)iter.
Next())) {
405 aVol =
dynamic_cast<FairGeoVolume*
>(node);
407 if (node->isSensitive())
414 par->setInputVersion(fRun->GetRunId(), 1);
415 ProcessNodes(volList);
455 return new (clref[size])
BmnBCPoint(trackID, detID, copyNo, posIn, posOut, momIn, momOut, time, length, eLoss,
456 fStation, isPrimary, charge, pdgId, lightYield, timeIn, timeOut, lengthtrack);
BmnBCPoint * AddHit(Int_t trackID, Int_t detID, Int_t copyNo, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t tof, Double_t length, Double_t eLoss, Int_t fStat, Bool_t isPrimary, Double_t charge, Int_t pdgId, Double_t lightYield, Double_t timeIn, Double_t timeOut, Double_t lengthtrack)
TParticlePDG * GetPDG(Int_t mode=0) const