@@ -526,9 +526,6 @@ void FairMCApplication::Stepping()
526526 TrackId = fMC ->GetStack ()->GetCurrentTrackNumber ();
527527 }
528528
529- Int_t copyNo;
530- Int_t id = fMC ->CurrentVolID (copyNo);
531-
532529 // If information about the tracks should be stored the information as to be
533530 // stored for any step.
534531 // Information about each single step has also to be stored for the other
@@ -546,6 +543,8 @@ void FairMCApplication::Stepping()
546543 }
547544 }
548545 if (fRadLenMan || fRadMapMan ) {
546+ Int_t copyNo;
547+ Int_t id = fMC ->CurrentVolID (copyNo);
549548 id = fMC ->CurrentVolID (copyNo);
550549 auto modvoliter = (fParent ? fParent : this )->fModVolMap .find (id);
551550 if (fRadLenMan ) {
@@ -1313,51 +1312,4 @@ void FairMCApplication::AddSensitiveModule(std::string volName, FairModule* modu
13131312{
13141313 fMapSensitiveDetectors [volName] = module ;
13151314}
1316-
1317- FairVolume* FairMCApplication::GetFairVolume ()
1318- {
1319- // Check if the volume with id is in the volume multimap.
1320- // If it is not in the map the volume is not a sensitive volume
1321- // and we do not call nay of our ProcessHits functions.
1322-
1323- // If the volume is in the multimap, check in second step if the current
1324- // copy is alredy inside the multimap.
1325- // If the volume is not in the multimap add the copy of the volume to the
1326- // multimap.
1327- // In any case call the ProcessHits function for this specific detector.
1328- Int_t copyNo;
1329- Int_t id = fMC ->CurrentVolID (copyNo);
1330- fDisVol = 0 ;
1331- Int_t fCopyNo = 0 ;
1332- fVolIter = fVolMap .find (id);
1333-
1334- if (fVolIter != fVolMap .end ()) {
1335-
1336- // Call Process hits for FairVolume with this id, copyNo
1337- do {
1338- fDisVol = fVolIter ->second ;
1339- fCopyNo = fDisVol ->getCopyNo ();
1340- if (copyNo == fCopyNo ) {
1341- return fDisVol ;
1342- }
1343- ++fVolIter ;
1344- } while (fVolIter != fVolMap .upper_bound (id));
1345-
1346- // Create new FairVolume with this id, copyNo.
1347- // Use the FairVolume with the same id found in the map to get
1348- // the link to the detector.
1349- // Seems that this never happens (?)
1350- // cout << "Volume not in map; fDisVol ? " << fDisVol << endl
1351- FairVolume* fNewV = new FairVolume (fMC ->CurrentVolName (), id);
1352- fNewV ->setMCid (id);
1353- fNewV ->setModId (fDisVol ->getModId ());
1354- fNewV ->SetModule (fDisVol ->GetModule ());
1355- fNewV ->setCopyNo (copyNo);
1356- fVolMap .insert (pair<Int_t, FairVolume*>(id, fNewV ));
1357-
1358- return fNewV ;
1359- }
1360- return 0 ;
1361- }
1362-
13631315ClassImp (FairMCApplication)
0 commit comments