11 #include "G4ProcessManager.hh" 12 #include "G4SteppingManager.hh" 14 #include "G4ParticleDefinition.hh" 15 #include "G4ParticleTypes.hh" 16 #include "G4TrajectoryContainer.hh" 17 #include "G4RunManager.hh" 18 #include "G4VPhysicalVolume.hh" 20 #include "G4VTouchable.hh" 21 #include "G4TouchableHistory.hh" 22 #include "G4EventManager.hh" 23 #include "G4FieldManager.hh" 24 #include "G4TrackingManager.hh" 47 std::cerr <<
" LBNESteppingAction::LBNESteppingAction called ... " <<
std::endl;
73 bool doSergeiStriganovApr2017 =
false;
74 if (doSergeiStriganovApr2017) {
75 std::string dirNameTmp(
"/dune/data/users/lebrun/LBNFMARSApril2017/");
77 std::ofstream *fOutTargetSergei =
new std::ofstream(fNameTgt.c_str());
81 std::ofstream *fOutHornASergei =
new std::ofstream(fNameHornA.c_str());
85 std::ofstream *fOutHornBSergei =
new std::ofstream(fNameHornB.c_str());
89 std::ofstream *fOutHornCSergei =
new std::ofstream(fNameHornC.c_str());
104 int ik = itMRZ->first;
155 if (theStep->GetStepLength() < 1.0e-15) {
158 G4StepPoint *prePtr = theStep->GetPreStepPoint();
159 G4LogicalVolume *volPre = prePtr->GetPhysicalVolume()->GetLogicalVolume();
160 std::cerr <<
" LBNESteppingAction, too man consecutive small steps " <<
std::endl 161 <<
".. from " << volPre->GetName()
162 <<
" detected at " << prePtr->GetPosition() <<
163 " last step length " << theStep->GetStepLength() <<
std::endl;
164 G4Track* aTrack= theStep->GetTrack();
165 std::cerr <<
" ... for track " << aTrack->GetTrackID() <<
" At " << aTrack->GetPosition()
166 <<
" P " << aTrack->GetMomentumDirection() <<
" E " << aTrack->GetTotalEnergy()
167 <<
" name " << aTrack->GetParticleDefinition()->GetParticleName() <<
std::endl;
168 aTrack->SetTrackStatus(fStopAndKill);
169 std::cerr <<
" Track killed .... " <<
std::endl;
179 std::cerr <<
" LBNESteppingAction... Anomalously large number of steps.. kill this event.. " <<
std::endl;
180 G4Exception(
"LBNESteppingAction",
" ", EventMustBeAborted,
" Too many steps.. ");
191 if (aMapDedX != 0) aMapDedX->
fill(theStep);
192 G4StepPoint *postPtr = theStep->GetPreStepPoint();
195 if (postPtr->GetPosition()[2] > 3000.) theStep->GetTrack()->SetTrackStatus(fStopAndKill);
227 G4EventManager::GetEventManager()->GetTrackingManager()->GetSteppingManager()->GetverboseLevel();
230 G4int evtno =
pRunManager->GetCurrentEvent()->GetEventID();
231 std::cout <<
"Event " << evtno <<
": LBNESteppingAction::UserSteppingAction() Called." <<
std::endl;
234 && (
pRunManager->GetCurrentEvent()->GetEventID() < 5))
263 const LBNERunAction *runUserAction =
reinterpret_cast<const LBNERunAction *
>(G4RunManager::GetRunManager()->GetUserRunAction());
266 const std::string tg = theStep->GetTrack()->GetMaterial()->GetName();
270 const G4StepPoint *prePt = theStep->GetPreStepPoint();
271 if ((prePt != 0) && (prePt->GetPhysicalVolume() != 0)) {
272 const G4LogicalVolume *aVol = prePt->GetPhysicalVolume()->GetLogicalVolume();
273 std::string theMatName(aVol->GetMaterial()->GetName());
276 if (theVolName.find(
"orn1") != std::string::npos) {
279 }
else if (theVolName.find(
"orn2") != std::string::npos) {
283 std::string msg(
" Unknow volume that contains Argon, volName "); msg+=theVolName;
284 G4Exception(
"LBNESteppingaction",
"", FatalException, msg.c_str());
306 ->GetUserDetectorConstruction())->GetMuonDetectorLogical();
308 G4StepPoint *postStep = theStep->GetPostStepPoint();
309 if(postStep->GetPhysicalVolume()){
310 G4LogicalVolume *postStepVolume =
311 postStep->GetPhysicalVolume()->GetLogicalVolume();
337 ->GetUserDetectorConstruction())->GetHorn1PlaneLogical();
339 G4StepPoint *postStep = theStep->GetPostStepPoint();
340 if(postStep->GetPhysicalVolume()){
341 G4LogicalVolume *postStepVolume =
342 postStep->GetPhysicalVolume()->GetLogicalVolume();
357 ->GetUserDetectorConstruction())->GetHorn2PlaneLogical();
359 G4StepPoint *postStep = theStep->GetPostStepPoint();
360 if(postStep->GetPhysicalVolume()){
361 G4LogicalVolume *postStepVolume =
362 postStep->GetPhysicalVolume()->GetLogicalVolume();
377 ->GetUserDetectorConstruction())->GetDecayPipePlaneLogical();
379 G4StepPoint *postStep = theStep->GetPostStepPoint();
380 if((postStep != 0) && (postStep->GetPhysicalVolume() != 0)){
381 G4LogicalVolume *postStepVolume =
382 postStep->GetPhysicalVolume()->GetLogicalVolume();
404 G4Track * aTrack = theStep->GetTrack();
405 if(theStep->GetPreStepPoint()->GetProcessDefinedStep()==NULL)
return;
406 G4ThreeVector mom = G4ThreeVector(0.,0.,0.);
408 G4int nSecAtRest = fpSteppingManager->GetfN2ndariesAtRestDoIt();
409 G4int nSecAlong = fpSteppingManager->GetfN2ndariesAlongStepDoIt();
410 G4int nSecPost = fpSteppingManager->GetfN2ndariesPostStepDoIt();
411 G4int nSecTotal = nSecAtRest+nSecAlong+nSecPost;
412 G4TrackVector* secVec = fpSteppingManager->GetfSecondary();
416 if(nSecTotal==0)
return;
419 for(
size_t lp1=(*secVec).size()-nSecTotal; lp1<(*secVec).size(); ++lp1) {
420 G4Track* secTrack = (*secVec)[lp1];
422 G4ParticleDefinition* def = secTrack->GetDefinition();
426 if (def == G4Electron::Electron() || def == G4Positron::Positron() ||
427 def == G4Gamma::Gamma())
continue;
428 mom = theStep->GetPreStepPoint()->GetMomentum();
437 if (trackInformation != 0) {
444 aTrack->SetUserInformation(trackInformation);
450 aTrack->SetUserInformation(newtrackInformation);
464 const LBNERunAction *runUserAction =
reinterpret_cast<const LBNERunAction*
>(G4RunManager::GetRunManager()->GetUserRunAction());
468 const std::string tg = theStep->GetTrack()->GetMaterial()->GetName();
469 if (tgt == tg)
return;
472 const G4StepPoint *prePt = theStep->GetPreStepPoint();
473 if (prePt->GetPhysicalVolume() !=0 && (prePt->GetPosition()[2] > 9900.)) {
474 std::string vName = theStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
475 G4Track * theTrack = theStep->GetTrack();
476 if (vName.find(
"Tunnel") != std::string::npos) theTrack->SetTrackStatus(fStopAndKill);
483 if(theStep->GetPreStepPoint()->GetPhysicalVolume() != NULL &&
484 theStep->GetPostStepPoint()->GetPhysicalVolume()!=NULL) {
487 theStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
489 theStep->GetPostStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
490 if (preStepPointName==
"HadronAbsorberSculpBackWall" || postStepPointName==
"HadronAbsorberSculpBackWall" ||
491 preStepPointName==
"HadronAbsorberSculpAirBuffer" || postStepPointName==
"HadronAbsorberSculpAirBuffer" ||
492 preStepPointName==
"MuonTrackingVol" || postStepPointName==
"MuonTrackingVol" )
498 G4Track * theTrack = theStep->GetTrack();
499 G4ParticleDefinition * particleDefinition = theTrack->GetDefinition();
504 (particleDefinition != G4NeutrinoE::NeutrinoEDefinition())&&
505 (particleDefinition != G4NeutrinoMu::NeutrinoMuDefinition()) &&
506 (particleDefinition != G4NeutrinoTau::NeutrinoTauDefinition()) &&
507 (particleDefinition != G4AntiNeutrinoE::AntiNeutrinoEDefinition()) &&
508 (particleDefinition != G4AntiNeutrinoMu::AntiNeutrinoMuDefinition()) &&
509 (particleDefinition != G4AntiNeutrinoTau::AntiNeutrinoTauDefinition()))
511 theTrack->SetTrackStatus(fStopAndKill);
520 G4Track * theTrack = theStep->GetTrack();
521 G4ParticleDefinition * particleDefinition = theTrack->GetDefinition();
540 if (theStep->GetPostStepPoint()->GetProcessDefinedStep() != NULL)
543 if (theStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName()==
"Decay")
545 G4int nSecAtRest = fpSteppingManager->GetfN2ndariesAtRestDoIt();
546 G4int nSecAlong = fpSteppingManager->GetfN2ndariesAlongStepDoIt();
547 G4int nSecPost = fpSteppingManager->GetfN2ndariesPostStepDoIt();
548 G4int nSecTotal = nSecAtRest+nSecAlong+nSecPost;
549 G4TrackVector* secVec = fpSteppingManager->GetfSecondary();
551 if (particleDefinition==G4PionPlus::PionPlusDefinition())
553 for (
size_t partno=(*secVec).size()-nSecTotal;partno<(*secVec).size();partno++)
555 if ((*secVec)[partno]->GetDefinition()->GetParticleName()==
"nu_mu")
559 if (particleDefinition==G4PionMinus::PionMinusDefinition())
561 for (
size_t partno=(*secVec).size()-nSecTotal;partno<(*secVec).size();partno++)
563 if ((*secVec)[partno]->GetDefinition()->GetParticleName()==
"anti_nu_mu")
567 if (particleDefinition==G4KaonPlus::KaonPlusDefinition())
569 for (
size_t partno=(*secVec).size()-nSecTotal;partno<(*secVec).size();partno++)
571 if ((*secVec)[partno]->GetDefinition()->GetParticleName()==
"nu_mu")
572 {
if (nSecTotal==2) decay_code=5;
573 if (nSecTotal==3) decay_code=7;}
574 if ((*secVec)[partno]->GetDefinition()->GetParticleName()==
"nu_e")
578 if (particleDefinition==G4KaonMinus::KaonMinusDefinition())
580 for (
size_t partno=(*secVec).size()-nSecTotal;partno<(*secVec).size();partno++)
582 if ((*secVec)[partno]->GetDefinition()->GetParticleName()==
"anti_nu_mu")
583 {
if (nSecTotal==2) decay_code=8;
584 if (nSecTotal==3) decay_code=10;}
585 if ((*secVec)[partno]->GetDefinition()->GetParticleName()==
"anti_nu_e")
589 if (particleDefinition==G4KaonZeroLong::KaonZeroLongDefinition())
591 for (
size_t partno=(*secVec).size()-nSecTotal;partno<(*secVec).size();partno++)
593 if ((*secVec)[partno]->GetDefinition()->GetParticleName()==
"nu_e")
595 if ((*secVec)[partno]->GetDefinition()->GetParticleName()==
"anti_nu_e")
597 if ((*secVec)[partno]->GetDefinition()->GetParticleName()==
"nu_mu")
599 if ((*secVec)[partno]->GetDefinition()->GetParticleName()==
"anti_nu_mu")
603 if (particleDefinition==G4MuonPlus::MuonPlusDefinition())
605 for (
size_t partno=(*secVec).size()-nSecTotal;partno<(*secVec).size();partno++)
607 if ((*secVec)[partno]->GetDefinition()->GetParticleName()==
"anti_nu_mu")
611 if (particleDefinition==G4MuonMinus::MuonMinusDefinition())
613 for (
size_t partno=(*secVec).size()-nSecTotal;partno<(*secVec).size();partno++)
615 if ((*secVec)[partno]->GetDefinition()->GetParticleName()==
"nu_mu")
624 theTrack->SetUserInformation(oldinfo);
630 theTrack->SetUserInformation(newinfo);
640 G4Track * theTrack = theStep->GetTrack();
642 if(theStep->GetPreStepPoint()->GetPhysicalVolume() == NULL)
return;
645 theStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
647 theStep->GetPostStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
649 if (((preStepPointName == G4String(
"TargetHallAndHorn1")) && (postStepPointName == G4String(
"Tunnel"))) ||
650 ((preStepPointName == G4String(
"Horn2Hall")) && (postStepPointName == G4String(
"Tunnel"))))
652 theTrack->SetTrackStatus(fStopAndKill);
653 G4VTrajectory* currTrajectory = 0;
654 currTrajectory = (G4EventManager::GetEventManager()->GetTrackingManager()->GimmeTrajectory());
656 if(!currTrajectory) std::cout <<
"Current trajectory is invalid" <<
std::endl;
659 currLBNETrajectory =
dynamic_cast<LBNETrajectory*
>(currTrajectory);
661 if(!currLBNETrajectory) std::cout <<
"Cast failed"<<
std::endl;
665 if(!newtrajectory) std::cout <<
"new trajectory is invalid" <<
std::endl;
672 delete newtrajectory;
684 if(theStep->GetPreStepPoint()->GetPhysicalVolume() == NULL || theStep->GetPostStepPoint()->GetPhysicalVolume()==NULL)
return;
686 G4int
pdg =
abs(theStep->GetTrack()->GetDefinition()->GetPDGEncoding());
687 if (pdg == 12 || pdg == 14 || pdg == 16)
return;
690 theStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
692 theStep->GetPostStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
694 if ((preStepPointName == G4String(
"MuonTrackingVol")) || (postStepPointName == G4String(
"MuonTrackingVol")))
697 G4VTrajectory* currTrajectory = 0;
698 currTrajectory = (G4EventManager::GetEventManager()->GetTrackingManager()->GimmeTrajectory());
700 if(!currTrajectory) std::cout <<
"Current trajectory is invalid" <<
std::endl;
703 currLBNETrajectory =
dynamic_cast<LBNETrajectory*
>(currTrajectory);
705 if(!currLBNETrajectory) std::cout <<
"Cast failed"<<
std::endl;
719 G4Track * theTrack = theStep->GetTrack();
721 if(theStep->GetPreStepPoint()->GetPhysicalVolume() == NULL)
return;
723 std::string preStepPointName = theStep->GetPreStepPoint()->GetPhysicalVolume()->GetName();
725 std::stringstream endName;
726 endName <<
"Horn1TopLevelDown";
728 if (preStepPointName.find(endName.str()) != std::string::npos)
730 theTrack->SetTrackStatus(fStopAndKill);
731 G4VTrajectory* currTrajectory = 0;
732 currTrajectory = (G4EventManager::GetEventManager()->GetTrackingManager()->GimmeTrajectory());
734 if(!currTrajectory) std::cout <<
"Current trajectory is invalid" <<
std::endl;
737 currLBNETrajectory =
dynamic_cast<LBNETrajectory*
>(currTrajectory);
739 if(!currLBNETrajectory) std::cout <<
"Cast failed"<<
std::endl;
743 if(!newtrajectory) std::cout <<
"new trajectory is invalid" <<
std::endl;
750 delete newtrajectory;
757 std::cerr <<
" LBNESteppingAction::OpenAscii Start with filename " <<
std::string(fname) <<
std::endl;
762 G4Exception(
"LBNESteppingAction::OpenAscii",
"I/O Problem ", FatalException, descr.c_str());
766 " id x y z ILDecayChan ILHorn1Neck ILHorn2Entr ILNCDecayChan ILNCHorn1Neck ILNCHorn2Entr ILAlHorn2Entr" <<
std::endl;
784 std::cout <<
" LBNESteppingAction::OpenNtuple Start with filename " <<
std::string(fname) <<
std::endl;
790 G4Exception(
"LBNESteppingAction::OpenNtuple",
"I/O Problem ", FatalException, descr.c_str());
808 G4Track * theTrack = theStep->GetTrack();
809 if (((theTrack->GetParticleDefinition()->GetParticleName()).find(
"geantino") == std::string::npos) && (
810 ((theTrack->GetParticleDefinition()->GetParticleName()).find(
"mu+") == std::string::npos )))
return;
815 G4StepPoint* prePtr = theStep->GetPreStepPoint();
816 if (prePtr == 0)
return;
849 if(theStep->GetPreStepPoint()->GetPhysicalVolume() == NULL)
return;
850 const double ll = theStep->GetStepLength();
851 G4StepPoint* postPtr = theStep->GetPostStepPoint();
863 if (postPtr == NULL)
return;
864 G4VPhysicalVolume *physVol = postPtr->GetPhysicalVolume();
866 G4Material *material = theTrack->GetMaterial();
876 if (
pRunManager->GetCurrentEvent()->GetEventID() < -3) {
877 const double r = std::sqrt(postPtr->GetPosition()[0]*postPtr->GetPosition()[0] +
878 postPtr->GetPosition()[1]*postPtr->GetPosition()[1]);
879 const double t = r/
std::abs(postPtr->GetPosition()[2] + 515.25);
881 std::cerr <<
" r = " << r <<
" theta " << t <<
" z = " << postPtr->GetPosition()[2] <<
882 " In " << vName <<
" material " << material->GetName()
883 <<
" InterLength " << material->GetNuclearInterLength() <<
std::endl;
887 if (ll < 1.0e-10)
return;
890 if (vName.find(
"WaterLayer") != std::string::npos)
waterAbsDecayChan += ll/material->GetNuclearInterLength();
893 if (vName.find(
"WaterLayer") != std::string::npos)
waterAbsHorn1Neck += ll/material->GetNuclearInterLength();
901 if (vName.find(
"WaterLayer") != std::string::npos) {
904 if ((vName.find(
"Horn1") != std::string::npos) && (material->GetName().find(
"Alumin") != std::string::npos))
908 if (vName.find(
"DecayPipe") != std::string::npos) {
910 for (
size_t k=0;
k!=3;
k++)
fOutStudy <<
" " << postPtr->GetPosition()[
k];
915 theTrack->SetTrackStatus(fStopAndKill);
924 G4Track * theTrack = theStep->GetTrack();
925 if ((theTrack->GetParticleDefinition()->GetParticleName()).find(
"geantino") == std::string::npos)
return;
926 G4StepPoint* prePtr = theStep->GetPreStepPoint();
927 if (prePtr == 0)
return;
928 G4StepPoint* postPtr = theStep->GetPostStepPoint();
929 if (postPtr == 0)
return;
930 if (theStep->GetStepLength() < 0.1*CLHEP::mm)
return;
931 G4LogicalVolume *volPost = postPtr->GetPhysicalVolume()->GetLogicalVolume();
932 G4LogicalVolume *volPre = prePtr->GetPhysicalVolume()->GetLogicalVolume();
938 std::cout <<
" LBNESteppingAction::StudyPropagation, critical volume " <<
std::endl 939 <<
".. from " << volNamePre <<
" to " << volNamePost
940 <<
" detected at " << prePtr->GetPosition() <<
" going to " << postPtr->GetPosition() <<
std::endl;
941 const G4VTouchable *preHist = prePtr->GetTouchable();
942 const G4VTouchable *postHist = postPtr->GetTouchable();
943 const G4int nDepthPre = preHist->GetHistoryDepth();
944 const G4int nDepthPost = postHist->GetHistoryDepth();
945 std::cerr <<
" .... History depth for pre point " << nDepthPre <<
" Post " << nDepthPost <<
std::endl;
946 for (
int k=0;
k!=
std::max(nDepthPre, nDepthPost);
k++) {
947 if ((
k <nDepthPre) && (
k <nDepthPost))
948 std::cerr <<
" ............. Translation at depth, pre ... " << preHist->GetTranslation(
k)
949 <<
" Post " << postHist->GetTranslation(
k) <<
std::endl;
950 else if (
k <nDepthPre)
951 std::cerr <<
" ..............Translation at depth, pre ... " << preHist->GetTranslation(
k) <<
std::endl;
952 else if (
k <nDepthPost)
953 std::cerr <<
" ..............Translation at depth, post ... " << postHist->GetTranslation(
k) <<
std::endl;
955 std::cerr <<
" ------------------------------------------- " <<
std::endl;
957 if (volPre->GetMaterial()->GetName() == volPost->GetMaterial()->GetName())
return;
959 for (
int k=0;
k != 3;
k++)
fOutStudy <<
" " << prePtr->GetPosition()[
k];
960 for (
int k=0;
k != 3;
k++)
fOutStudy <<
" " << postPtr->GetPosition()[
k];
961 fOutStudy <<
" " << postPtr->GetPosition()[2];
962 fOutStudy <<
" " << theStep->GetStepLength();
963 fOutStudy <<
" " << volPre->GetMaterial()->GetName();
964 fOutStudy <<
" " << volPost->GetMaterial()->GetName();
966 G4String vName(volPre->GetName());
975 G4Track * theTrack = theStep->GetTrack();
978 if( theTrack->GetNextVolume() == 0 ) {
979 if (
pRunManager->GetCurrentEvent()->GetEventID() < 3)
980 std::cout <<
" Out of world with track length = " << theTrack->GetTrackLength() <<
std::endl;
983 G4StepPoint* prePtr = theStep->GetPreStepPoint();
984 if (prePtr == 0)
return;
985 G4StepPoint* postPtr = theStep->GetPostStepPoint();
987 if (
pRunManager->GetCurrentEvent()->GetEventID() < 3)
988 std::cout <<
" No Post Point, Last step at Z = " << prePtr->GetPosition()[2] <<
" r " <<
989 std::sqrt(prePtr->GetPosition()[0]*prePtr->GetPosition()[0] +
990 prePtr->GetPosition()[1]*prePtr->GetPosition()[1]) <<
std::endl;
994 if (postPtr->GetPhysicalVolume() == 0) {
995 if (
pRunManager->GetCurrentEvent()->GetEventID() < 3)
996 std::cout <<
" No Post Point Volume Last step at Z = " << prePtr->GetPosition()[2] <<
" r " <<
997 std::sqrt(prePtr->GetPosition()[0]*prePtr->GetPosition()[0] +
998 prePtr->GetPosition()[1]*prePtr->GetPosition()[1]) <<
std::endl;
1002 if (prePtr->GetPhysicalVolume() == 0)
return;
1003 G4LogicalVolume *volPost = postPtr->GetPhysicalVolume()->GetLogicalVolume();
1004 G4LogicalVolume *volPre = prePtr->GetPhysicalVolume()->GetLogicalVolume();
1005 if (volPre == 0)
return;
1006 if (volPost == 0)
return;
1009 std::string matNamePre = volPre->GetMaterial()->GetName();
1010 std::string matNamePost = volPost->GetMaterial()->GetName();
1012 if (
pRunManager->GetCurrentEvent()->GetEventID() < 3) {
1013 std::cout <<
" at Z = " << prePtr->GetPosition()[2] <<
" r " <<
1014 std::sqrt(prePtr->GetPosition()[0]*prePtr->GetPosition()[0] +
1015 prePtr->GetPosition()[1]*prePtr->GetPosition()[1])
1016 <<
", " << volNamePre <<
" to " << postPtr->GetPosition() <<
", " 1017 << volNamePost <<
" mat from " << matNamePre <<
" to " << matNamePost;
1018 if (
std::abs(theTrack->GetParticleDefinition()->GetPDGEncoding()) == 13) {
1019 std::cout <<
" Ek " << theTrack->GetKineticEnergy()/CLHEP::GeV <<
std::endl;
1039 for (
int k=0;
k != 3;
k++)
fOutStudy <<
" " << prePtr->GetPosition()[
k];
1040 for (
int k=0;
k != 3;
k++)
fOutStudy <<
" " << postPtr->GetPosition()[
k];
1041 fOutStudy <<
" " << theStep->GetStepLength();
1042 fOutStudy <<
" " << volPre->GetMaterial()->GetName();
1043 fOutStudy <<
" " << volPost->GetMaterial()->GetName();
1052 G4Track * theTrack = theStep->GetTrack();
1053 if ((theTrack->GetParticleDefinition()->GetParticleName()).find(
"mu") == std::string::npos)
return;
1054 if( theTrack->GetNextVolume() == 0 ) {
1055 if (
pRunManager->GetCurrentEvent()->GetEventID() < 3)
1056 std::cout <<
" Out of world with track length = " << theTrack->GetTrackLength() <<
std::endl;
1059 G4StepPoint* prePtr = theStep->GetPreStepPoint();
1060 if (prePtr == 0)
return;
1061 if (
pRunManager->GetCurrentEvent()->GetEventID() < 3)
1062 std::cout <<
" at Z = " << prePtr->GetPosition()[2] <<
" r " <<
1063 std::sqrt(prePtr->GetPosition()[0]*prePtr->GetPosition()[0] +
1064 prePtr->GetPosition()[1]*prePtr->GetPosition()[1]) <<
std::endl;
1065 G4StepPoint* postPtr = theStep->GetPostStepPoint();
1067 if (
pRunManager->GetCurrentEvent()->GetEventID() < 3)
1068 std::cout <<
" No Post Point, Last step at Z = " << prePtr->GetPosition()[2] <<
" r " <<
1069 std::sqrt(prePtr->GetPosition()[0]*prePtr->GetPosition()[0] +
1070 prePtr->GetPosition()[1]*prePtr->GetPosition()[1]) <<
std::endl;
1074 if (postPtr->GetPhysicalVolume() == 0) {
1075 if (
pRunManager->GetCurrentEvent()->GetEventID() < 3)
1076 std::cout <<
" No Post Point Volume Last step at Z = " << prePtr->GetPosition()[2] <<
" r " <<
1077 std::sqrt(prePtr->GetPosition()[0]*prePtr->GetPosition()[0] +
1078 prePtr->GetPosition()[1]*prePtr->GetPosition()[1]) <<
std::endl;
1082 if (prePtr->GetPhysicalVolume() == 0)
return;
1083 G4LogicalVolume *volPost = postPtr->GetPhysicalVolume()->GetLogicalVolume();
1084 G4LogicalVolume *volPre = prePtr->GetPhysicalVolume()->GetLogicalVolume();
1085 if (volPre == 0)
return;
1086 if (volPost == 0)
return;
1096 for (
int k=0;
k != 3;
k++)
fOutStudy <<
" " << postPtr->GetPosition()[
k];
1097 for (
int k=0;
k != 3;
k++)
fOutStudy <<
" " << theTrack->GetMomentumDirection()[
k];
1106 G4Track * theTrack = theStep->GetTrack();
1107 if ((theTrack->GetParticleDefinition()->GetParticleName()).find(
"geantino") == std::string::npos)
return;
1108 if( theTrack->GetNextVolume() == 0 ) {
1109 if (
pRunManager->GetCurrentEvent()->GetEventID() < 3)
1110 std::cout <<
" Out of world with track length = " << theTrack->GetTrackLength() <<
std::endl;
1113 G4StepPoint* prePtr = theStep->GetPreStepPoint();
1114 if (prePtr == 0)
return;
1115 G4StepPoint* postPtr = theStep->GetPostStepPoint();
1116 if (postPtr == 0)
return;
1117 if (postPtr->GetPhysicalVolume() == 0)
return;
1118 if (prePtr->GetPhysicalVolume() == 0)
return;
1119 G4LogicalVolume *volPost = postPtr->GetPhysicalVolume()->GetLogicalVolume();
1120 G4LogicalVolume *volPre = prePtr->GetPhysicalVolume()->GetLogicalVolume();
1121 if (volPre == 0)
return;
1122 if (volPost == 0)
return;
1123 double zPost = postPtr->GetPosition()[2];
1124 double rPost = std::sqrt(postPtr->GetPosition()[0]*postPtr->GetPosition()[0] +
1125 postPtr->GetPosition()[1]*postPtr->GetPosition()[1]);
1130 double lnR = std::log(rPost);
1143 int idEvt =
pRunManager->GetCurrentEvent()->GetEventID();
1146 std::ostringstream fNameStrStr; fNameStrStr <<
"./StepSudiesMagn_Evt" << idEvt <<
".txt";
1152 G4StepPoint* prePtr = theStep->GetPreStepPoint();
1153 if (theStep->GetPreStepPoint()->GetPhysicalVolume() == 0)
return;
1154 if (prePtr == 0)
return;
1155 G4Track * theTrack = theStep->GetTrack();
1156 if ( theTrack->GetNextVolume() == 0 ) {
1160 G4StepPoint* postPtr = theStep->GetPostStepPoint();
1166 G4ThreeVector postVec = postPtr->GetMomentum();
1167 G4ThreeVector preVec = prePtr->GetMomentum();
1170 const double ptPre = std::sqrt(preVec[0]*preVec[0] + preVec[1]*preVec[1])/CLHEP::GeV;
1171 const double ptPost = std::sqrt(postVec[0]*postVec[0] + postVec[1]*postVec[1])/CLHEP::GeV;
1174 const G4Field *aField = 0;
1177 double effInnerRad = 0;
double effOuterRad = 0;
double effSkinD = 0.;
1180 (postPtr->GetPosition()[2] > -500.) && (postPtr->GetPosition()[2] < 5000.)) {
1182 aPlacementHandler->
Find(
"FieldHorn1",
"Horn1PolyM1",
"DetectorConstruction");
1183 aField = pl->
fCurrent->GetFieldManager()->GetDetectorField();
1194 aPlacementHandler->
Find(
"FieldHorn2",
"Horn2Hall",
"DetectorConstruction");
1195 aField = pl->
fCurrent->GetFieldManager()->GetDetectorField();
1203 G4FieldManager *aFieldMgr = postPtr->GetPhysicalVolume()->GetLogicalVolume()->GetFieldManager();
1204 if (aFieldMgr != 0) {
1205 aField = aFieldMgr->GetDetectorField();
1207 if (myFieldPH != 0) {
1218 double pos[3];
for (
size_t k=0;
k!= 3; ++
k) pos[
k] = postPtr->GetPosition()[
k];
1221 if (myFieldPH != 0) {
1227 if((myField == 0) && (myFieldPH == 0)) aField->GetFieldValue(pos, &bf[0]);
1228 fOutStepStudy <<
" " << std::sqrt(bf[0]*bf[0] + bf[1]*bf[1])/CLHEP::tesla;
1230 fOutStepStudy <<
" " << effInnerRad <<
" " << effOuterRad <<
" " << effSkinD;
1237 G4Track * theTrack = theStep->GetTrack();
1238 if (theTrack == 0)
return;
1265 G4StepPoint* prePtr = theStep->GetPreStepPoint();
1266 G4StepPoint* postPtr = theStep->GetPostStepPoint();
1267 if (prePtr->GetPhysicalVolume() == 0)
return;
1268 if (postPtr == 0)
return;
1269 if (postPtr->GetPhysicalVolume() == 0)
return;
1271 G4LogicalVolume *volPost = postPtr->GetPhysicalVolume()->GetLogicalVolume();
1272 G4LogicalVolume *volPre = prePtr->GetPhysicalVolume()->GetLogicalVolume();
1275 bool ofInterest =
false;
1278 (volNamePre.find(
"Horn1") != std::string::npos )) ofInterest=
true;
1279 if ((volNamePre.find(
"Horn2") != std::string::npos) &&
1280 (volNamePost ==
std::string(
"Tunnel"))) ofInterest=
true;
1282 (volNamePost ==
std::string(
"DecayPipeHall"))) ofInterest=
true;
1283 if (!ofInterest)
return;
1284 const double eTot = theTrack->GetTotalEnergy();
1285 const double mass= theTrack->GetParticleDefinition()->GetPDGMass();
1286 const double pTot = std::sqrt(eTot*eTot - mass*mass);
1287 if (pTot < 0.1*CLHEP::GeV)
return;
1288 if (pTot > 50.*CLHEP::GeV)
return;
1289 int pdgInfo = theTrack->GetParticleDefinition()->GetPDGEncoding();
1291 if (
std::abs(pdgInfo) != 211)
return;
1293 fOutStudy <<
" " << theTrack->GetTrackID();
1294 const int stepNum = theTrack->GetCurrentStepNumber();
1295 fOutStudy <<
" " << pdgInfo <<
" " << stepNum;
1296 for (
int k=0;
k != 3;
k++)
fOutStudy <<
" " << postPtr->GetPosition()[
k];
1297 G4ThreeVector
direction = theTrack->GetMomentumDirection();
1298 for (
int k=0;
k != 3;
k++)
fOutStudy <<
" " << 0.001*pTot*direction[
k];
1305 const G4Track * theTrack = theStep->GetTrack();
1306 if (theTrack == 0)
return;
1307 int pID = theTrack->GetParticleDefinition()->GetPDGEncoding();
1309 G4StepPoint* prePtr = theStep->GetPreStepPoint();
1310 if (prePtr == 0)
return;
1311 if (prePtr->GetPhysicalVolume() == 0)
return;
1312 G4StepPoint* postPtr = theStep->GetPostStepPoint();
1313 if (postPtr == 0)
return;
1314 if (postPtr->GetPhysicalVolume() == 0)
return;
1315 G4LogicalVolume *volPost = postPtr->GetPhysicalVolume()->GetLogicalVolume();
1316 G4LogicalVolume *volPre = prePtr->GetPhysicalVolume()->GetLogicalVolume();
1319 if ((volNamePre ==
std::string(
"Horn2Part3Ring")) &&
1320 (volNamePost.find(
"Horn2") != std::string::npos)) {
1322 int sign = (pID > 0) ? 1 : -1;
1323 ptr->
RingHangerPion(theTrack->GetTrackID(),
sign, theTrack->GetMomentum(), postPtr->GetPosition());
1331 if(theStep->GetPreStepPoint()->GetPhysicalVolume() == NULL)
return;
1333 if(theStep->GetPreStepPoint()->GetPhysicalVolume() &&
1334 theStep->GetPostStepPoint()->GetPhysicalVolume()){
1335 G4LogicalVolume *preStepVolume =
1336 theStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
1337 G4LogicalVolume *postStepVolume =
1338 theStep->GetPostStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
1341 G4VTrajectory* currTrajectory = 0;
1342 currTrajectory = (G4EventManager::GetEventManager()->GetTrackingManager()->GimmeTrajectory());
1344 if(!currTrajectory) std::cout <<
"Current trajectory is invalid" <<
std::endl;
1347 currLBNETrajectory =
dynamic_cast<LBNETrajectory*
>(currTrajectory);
1348 if(!currLBNETrajectory) std::cout <<
"Cast failed"<<
std::endl;
1352 if(!newtrajectory) std::cout <<
"new trajectory is invalid" <<
std::endl;
1360 delete newtrajectory;
1370 if(theStep->GetPreStepPoint()->GetPhysicalVolume() == NULL)
return;
1372 theStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetMaterial()->GetName();
1375 std::stringstream endName, posvolname;
1377 posvolname<<
"TargetHallandHorn1";
1378 if(preStepPointName.find(endName.str())!=std::string::npos)
1383 G4VTrajectory* currTrajectory = 0;
1384 currTrajectory = (G4EventManager::GetEventManager()->GetTrackingManager()->GimmeTrajectory());
1386 if(!currTrajectory) std::cout <<
"Current trajectory is invalid" <<
std::endl;
1389 currLBNETrajectory =
dynamic_cast<LBNETrajectory*
>(currTrajectory);
1391 if(!currLBNETrajectory) std::cout <<
"Cast failed"<<
std::endl;
1395 if(!newtrajectory) std::cout <<
"new trajectory is invalid" <<
std::endl;
1402 delete newtrajectory;
1414 if ((theStep->GetPreStepPoint() == 0) || (theStep->GetPostStepPoint() == 0))
return;
1415 if(theStep->GetPreStepPoint()->GetPhysicalVolume() == NULL)
return;
1417 if(theStep->GetPreStepPoint()->GetPhysicalVolume() &&
1418 theStep->GetPostStepPoint()->GetPhysicalVolume()){
1419 G4LogicalVolume *preStepVolume =
1420 theStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
1421 G4LogicalVolume *postStepVolume =
1422 theStep->GetPostStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
1438 if ((theStep->GetPreStepPoint() == 0) || (theStep->GetPostStepPoint() == 0))
return;
1439 if(theStep->GetPreStepPoint()->GetPhysicalVolume() == NULL)
return;
1441 if(theStep->GetPreStepPoint()->GetPhysicalVolume() &&
1442 theStep->GetPostStepPoint()->GetPhysicalVolume()){
1443 G4LogicalVolume *preStepVolume =
1444 theStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
1445 G4LogicalVolume *postStepVolume =
1446 theStep->GetPostStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
1459 if(theStep->GetPreStepPoint()->GetPhysicalVolume() == NULL)
return;
1461 if(theStep->GetPreStepPoint()->GetPhysicalVolume() &&
1462 theStep->GetPostStepPoint()->GetPhysicalVolume()){
1463 G4LogicalVolume *preStepVolume =
1464 theStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
1465 G4LogicalVolume *postStepVolume =
1466 theStep->GetPostStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
1481 const char *clusterEnv =
getenv(
"CLUSTER");
1482 if (clusterEnv != 0) clusterNum = atoi(clusterEnv);
1483 const char *procEnv =
getenv(
"PROCESS");
1484 if (procEnv != 0) procNum = atoi(procEnv);
1485 std::string fName(
"./hadronFluxFromTargetASCII.txt");
1486 if ((clusterNum != 0) || (procNum != 0)) {
1489 std::ostringstream fNStrStr;
1490 fNStrStr <<
"./hadronFluxFromTargetASCII_" 1491 << clusterNum <<
"_" << procNum <<
".txt";
1492 fName = fNStrStr.str();
1497 std::cerr <<
" LBNESteppingAction::InitiateHadronFluxFromTargetASCII, Opening file " <<
1500 std::cerr <<
" O.K., ready for HadronFluxFromTargetASCII.... in... " <<
this <<
std::endl;
1504 G4Track * theTrack = theStep->GetTrack();
1505 if (theTrack->GetPosition()[2] > 3500.)
return;
1507 G4StepPoint* prePtr = theStep->GetPreStepPoint();
1508 if (prePtr == 0)
return;
1509 G4StepPoint* postPtr = theStep->GetPostStepPoint();
1510 if (postPtr == 0)
return;
1511 if (postPtr->GetPhysicalVolume() == 0)
return;
1512 if (prePtr->GetPhysicalVolume() == 0)
return;
1513 G4LogicalVolume *volPost = postPtr->GetPhysicalVolume()->GetLogicalVolume();
1514 G4LogicalVolume *volPre = prePtr->GetPhysicalVolume()->GetLogicalVolume();
1522 if ((volNamePre.find(
"TargetNoSplitHelium") != std::string::npos) &&
1523 (volNamePost.find(
"TargetNoSplitHeContainer") != std::string::npos)) {
1524 double pTotSq = 0;
for (
int k=0;
k != 3;
k++) pTotSq += theTrack->GetMomentum()[
k]*theTrack->GetMomentum()[
k];
1525 if (pTotSq < 2500)
return;
1526 G4int evtno =
pRunManager->GetCurrentEvent()->GetEventID();
1528 << theTrack->GetParticleDefinition()->GetPDGEncoding();
1551 const G4Track* aTrack = aStep->GetTrack();
1552 int pdg = aTrack->GetDynamicParticle()->GetDefinition()->GetPDGEncoding();
1554 const G4StepPoint *prePt = aStep->GetPreStepPoint();
1555 if (prePt == 0)
return;
1556 if (prePt->GetPhysicalVolume() == 0)
return;
1557 if (prePt->GetPosition()[2] < 200000.)
return;
1558 const G4StepPoint *postPt = aStep->GetPostStepPoint();
1559 if (postPt->GetPhysicalVolume() == 0)
return;
1560 G4LogicalVolume *volPost = postPt->GetPhysicalVolume()->GetLogicalVolume();
1561 G4LogicalVolume *volPre = prePt->GetPhysicalVolume()->GetLogicalVolume();
1571 bool ofInterestLBNE = ((volNamePre ==
std::string(
"Tunnel")) && (volNamePost ==
std::string(
"HadronAbsorberTop"))) ||
1574 bool ofInterestLBNF = ((volNamePre ==
std::string(
"Tunnel")) && (volNamePost ==
std::string(
"HadronAbsorberSculpTop"))) ||
1576 (volNamePre.find(
"HadronAbsorberSculp") != std::string::npos);
1577 if ((!ofInterestLBNF) && (!ofInterestLBNE))
return;
1582 if (ofInterestLBNE) {
1583 if (volNamePre ==
std::string(
"AH_Muon_alkair")) aSlice = 30;
1585 if ((volNamePre ==
std::string(
"HadronAbsorberSculpAibufferDiag")) && (volNamePost ==
std::string(
"HadronAbsorberSculpTop"))) {
1587 }
else if ((volNamePre ==
std::string(
"HadronAbsorberSculpSpoilerAir")) && (volNamePost ==
std::string(
"HadronAbsorberSculpTop"))) {
1589 }
else if (volNamePost ==
std::string(
"HadronAbsorberSculpTop")) {
1590 size_t iPosU = volNamePre.find(
"-");
1591 if (iPosU != std::string::npos) {
1593 std::string tSliceStr = volNamePre.substr(iPosU, std::string::npos);
1594 aSlice = atoi(tSliceStr.c_str());
1596 if (volNamePre ==
std::string(
"HadronAbsorberSculpBackWall")) aSlice = 30;
1597 if (volNamePre ==
std::string(
"HadronAbsorberSculpEndIronAC")) aSlice = 29;
1600 if (aSlice < -5)
return;
1601 G4int evtno =
pRunManager->GetCurrentEvent()->GetEventID();
1614 size_t kSelOut = 99;
1615 const G4StepPoint *prePt = aStep->GetPreStepPoint();
1616 if (prePt == 0)
return;
1617 if (prePt->GetPhysicalVolume() == 0)
return;
1618 const G4StepPoint *postPt = aStep->GetPostStepPoint();
1619 if (postPt == 0)
return;
1620 if (postPt->GetPhysicalVolume() == 0)
return;
1621 G4LogicalVolume *volPost = postPt->GetPhysicalVolume()->GetLogicalVolume();
1622 G4LogicalVolume *volPre = prePt->GetPhysicalVolume()->GetLogicalVolume();
1625 if ((volNamePre ==
std::string(
"TargetNoSplitHeContainer")) &&
1626 (volNamePost ==
std::string(
"TargetNoSplitM1"))) kSelOut = 0;
1627 else if ((volNamePre ==
std::string(
"Horn1PolyM1")) &&
1628 (volNamePost ==
std::string(
"TargetHallAndHorn1"))) kSelOut = 1;
1629 else if ((volNamePre ==
std::string(
"LBNFSimpleHorn2Container")) &&
1630 (volNamePost ==
std::string(
"Tunnel"))) kSelOut = 2;
1631 else if ((volNamePre ==
std::string(
"LBNFSimpleHorn3Container")) &&
1632 (volNamePost ==
std::string(
"Tunnel"))) kSelOut = 3;
1634 if (kSelOut == 99)
return;
1635 G4Track* aTrack = aStep->GetTrack();
1636 int pdg = aTrack->GetDynamicParticle()->GetDefinition()->GetPDGEncoding();
1638 if (!isMeson)
return;
1639 G4ThreeVector xyz = postPt->GetPosition();
1640 G4ThreeVector pMom = postPt->GetMomentum();
1641 G4int evtno =
pRunManager->GetCurrentEvent()->GetEventID();
1643 << xyz[0]/10. <<
" " << xyz[1]/10. <<
" " << xyz[2]/10. <<
" " 1644 << pMom[0]/1000. <<
" " << pMom[1]/1000. <<
" " << pMom[2]/1000. <<
" " 1645 << postPt->GetKineticEnergy()/1000. <<
std::endl;
1646 if (kSelOut == 3) aTrack->SetTrackStatus(fStopAndKill);
void FillTrackingPlaneH1Data(const G4Step &aStep)
void fill(const G4Step *aStep)
LBNESteppingActionMessenger * pMessenger
int fGenerateVoxelsIRKMax
TFile * steppingTupleFile
void StudyCheckOverlap(const G4Step *)
bool GetDoComputeEDepInGraphite() const
double fGenerateVoxelsRScale
void msg(const char *fmt,...)
bool fThisParticleGotToHAFront
bool GetCreateTrkPlaneH1Output() const
const LBNEVolumePlacementData * Find(const G4String &name, const char *motherName, const char *method) const
void dumpStepCheckVolumeAndFields(const G4Step *)
bool GetDoComputeEDepInArgonGas() const
std::vector< std::ofstream * > fOutPtrsForMarsCmpApr2017
G4LogicalVolume * fCurrent
static LBNEVolumePlacements * Instance()
bool GetCreateAlcoveTrackingOutput() const
std::map< int, int > fRZVoxelsData
void FillTrackingPlaneH2Data(const G4Step &aStep)
void CheckInTrackingDetectorDPPlane(const G4Step *theStep)
void GenerateVolumeCrossingsRZMap(const G4Step *theStep)
void CheckInTrackingDetectorPlane(const G4Step *theStep)
double fEnergyDepInArgonGasHorn1
void CheckInTargetOutput(const G4Step *theStep)
bool GetCreateTrkPlaneDPOutput() const
G4LogicalVolume * TrkPlnH1Logical
virtual void GetFieldValue(const double Point[3], double *Bfield) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4LogicalVolume * TrkPlnH2Logical
bool GetCreateTargetOutput() const
double GetEffectiveSkinDepthFact() const
bool doStudyParticleThroughHorns
double fEnergyDepInArgonGasHorn2
std::ofstream fOutMuonSculptedAbsorber
void StudyMuonSculptedAbsorberFlux(const G4Step *theStep)
void FillTrackingNtuple(const G4Track &track, LBNETrajectory *currTrajectory)
void StudyCheckMagneticTilts(const G4Step *)
void CheckInTgtEndPlane(const G4Step *theStep)
void FillAlcoveTrackingPlaneData(const G4Step &aStep)
double GetEffectiveInnerRad() const
double fGenerateVoxelsZOffset
virtual void GetFieldValue(const double Point[3], double *Bfield) const
G4String fKeyVolumeForOutput
void InitiateHadronFluxFromTargetASCII() const
static LBNEAnalysis * getInstance()
void StudyPropagation(const G4Step *)
double GetEffectiveOuterRad() const
bool GenerateMuonSculptedAbsorberFlux
LBNFDeDxMap * GetG4MARSDeDxMap() const
bool GetDoComputeEDepInHorns() const
double fEnergyDepInGraphite
bool GetCreateTrkPlaneOutput() const
void FillTrackingPlaneData(const G4Step &aStep)
std::string getenv(std::string const &name)
virtual ~LBNESteppingAction()
G4String fStudyGeantinoMode
void StudyParticleThroughHorns(const G4Step *)
static LBNEQuickPiToNuVect * Instance()
std::ofstream fStrHadronFluxFromTargetASCII
void StudyPionsThroughHorn2(const G4Step *)
double fGenerateVoxelsZScale
bool goneThroughHorn2Entr
double GetEffectiveInnerRad() const
G4String fKeyVolumeForOutputTo
static int max(int a, int b)
G4LogicalVolume * TrkPlnDPLogical
LBNERunManager * pRunManager
double steppingTuple_density
bool doGenerateHadronFluxFromTargetASCII
void OpenNtuple(const char *fname)
void CheckInTrackingDetectorH2Plane(const G4Step *theStep)
double fGenerateVoxelsRMax
std::ofstream fOutStepStudy
void KillNonNuThresholdParticles(const G4Step *theStep)
int fNumStepsCurrentTrack
void FillTrackingPlaneDPData(const G4Step &aStep)
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
double fKillTrackingThreshold
void CheckHadronsMarsCmpApr2017(const G4Step *theStep)
int GetVerboseLevel() const
G4LogicalVolume * TrkPlnLogical
virtual void AppendStep(const G4Step *aStep)
void OpenAscii(const char *fname)
void CheckInAlcoveTrackingPlane(const G4Step *theStep)
double GetEffectiveOuterRad() const
void CheckInTrackingDetectorH1Plane(const G4Step *theStep)
void CheckDecay(const G4Step *theStep)
int fNConsecutivSmallSteps
double GetEffectiveSkinDepthFact() const
bool goneThroughHorn1Neck
double fGenerateVoxelsZMax
int GetNumberOfHornsPolycone() const
void FillTargetOutputData(const G4Step &aStep)
void SetMomentumInfoForParticle(const G4Step *theStep)
void FillHadronFluxFromTargetASCII(const G4Step *theStep) const
G4String fOutMuonSculptedAbsorberFilename
void CheckInHornEndPlane(const G4Step *theStep)
QTextStream & endl(QTextStream &s)
int fNumTracksKilledAsStuck
void StudyAbsorption(const G4Step *)
virtual void UserSteppingAction(const G4Step *)
void RingHangerPion(int trNum1, int sign, G4ThreeVector p, G4ThreeVector xPos)
bool GetCreateTrkPlaneH2Output() const