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();
void fill(const G4Step *aStep)
void StudyCheckOverlap(const G4Step *)
bool GetDoComputeEDepInGraphite() const
void msg(const char *fmt,...)
bool GetCreateTrkPlaneH1Output() const
void dumpStepCheckVolumeAndFields(const G4Step *)
bool GetDoComputeEDepInArgonGas() const
std::vector< std::ofstream * > fOutPtrsForMarsCmpApr2017
bool GetCreateAlcoveTrackingOutput() const
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
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4LogicalVolume * TrkPlnH2Logical
bool GetCreateTargetOutput() const
bool doStudyParticleThroughHorns
double fEnergyDepInArgonGasHorn2
void StudyMuonSculptedAbsorberFlux(const G4Step *theStep)
void StudyCheckMagneticTilts(const G4Step *)
void StudyPropagation(const G4Step *)
bool GenerateMuonSculptedAbsorberFlux
LBNFDeDxMap * GetG4MARSDeDxMap() const
bool GetDoComputeEDepInHorns() const
double fEnergyDepInGraphite
bool GetCreateTrkPlaneOutput() const
G4String fStudyGeantinoMode
void StudyParticleThroughHorns(const G4Step *)
static LBNEQuickPiToNuVect * Instance()
void StudyPionsThroughHorn2(const G4Step *)
G4LogicalVolume * TrkPlnDPLogical
LBNERunManager * pRunManager
bool doGenerateHadronFluxFromTargetASCII
void CheckInTrackingDetectorH2Plane(const G4Step *theStep)
void KillNonNuThresholdParticles(const G4Step *theStep)
int fNumStepsCurrentTrack
void CheckHadronsMarsCmpApr2017(const G4Step *theStep)
G4LogicalVolume * TrkPlnLogical
void CheckInAlcoveTrackingPlane(const G4Step *theStep)
void CheckInTrackingDetectorH1Plane(const G4Step *theStep)
void CheckDecay(const G4Step *theStep)
int fNConsecutivSmallSteps
void SetMomentumInfoForParticle(const G4Step *theStep)
void FillHadronFluxFromTargetASCII(const G4Step *theStep) const
QTextStream & endl(QTextStream &s)
int fNumTracksKilledAsStuck
void StudyAbsorption(const G4Step *)
bool GetCreateTrkPlaneH2Output() const