7 #include "G4RunManagerKernel.hh"
8 #include "G4TransportationManager.hh"
9 #include "G4Navigator.hh"
10 #include "G4PropagatorInField.hh"
11 #include "G4TrackingManager.hh"
12 #include "G4SteppingManager.hh"
13 #include "G4StackManager.hh"
14 #include "G4EventManager.hh"
23 #include "GaudiKernel/Bootstrap.h"
24 #include "GaudiKernel/ISvcLocator.h"
25 #include "GaudiKernel/IMessageSvc.h"
34 m_evtStore(
"StoreGateSvc/StoreGateSvc",
"LooperKiller"),
35 m_detStore(
"StoreGateSvc/DetectorStore",
"LooperKiller"),
36 m_config(
config), m_report(), m_count_steps(0)
47 ATH_MSG_WARNING(
"Track finished on its own. Congrats. Moving on with the event.");
49 G4TransportationManager *tm = G4TransportationManager::GetTransportationManager();
50 tm->GetNavigatorForTracking()->SetVerboseLevel(0);
51 tm->GetPropagatorInField()->SetVerboseLevel(0);
52 G4RunManagerKernel *rmk = G4RunManagerKernel::GetRunManagerKernel();
53 rmk->GetTrackingManager()->SetVerboseLevel(0);
54 rmk->GetTrackingManager()->GetSteppingManager()->SetVerboseLevel(0);
55 rmk->GetStackManager()->SetVerboseLevel(0);
58 ATH_MSG_WARNING(
"LooperKiller triggered!! Hold on to your hats!!!!!!!!" );
61 G4TransportationManager *tm = G4TransportationManager::GetTransportationManager();
65 G4RunManagerKernel *rmk = G4RunManagerKernel::GetRunManagerKernel();
75 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
76 tm->GetNavigatorForTracking()->SetVerboseLevel(0);
77 tm->GetPropagatorInField()->SetVerboseLevel(0);
78 rmk->GetTrackingManager()->SetVerboseLevel(0);
79 rmk->GetTrackingManager()->GetSteppingManager()->SetVerboseLevel(0);
80 rmk->GetStackManager()->SetVerboseLevel(0);
85 if (
part) { pdg_id =
part->pdg_id(); }
90 rmk->GetEventManager()->AbortCurrentEvent();
91 rmk->GetEventManager()->GetNonconstCurrentEvent()->SetEventAborted();
105 const std::string
name = aStep->GetTrack()->GetDefinition()->GetParticleName();
108 <<
" (trackID " << aStep->GetTrack()->GetTrackID()
109 <<
", track pos: "<<aStep->GetTrack()->GetPosition()
110 <<
", mom: "<<aStep->GetTrack()->GetMomentum()
111 <<
", parentID " << aStep->GetTrack()->GetParentID() <<
")");
114 <<
" (trackID " << aStep->GetTrack()->GetTrackID()
115 <<
", track pos: "<<aStep->GetTrack()->GetPosition()
116 <<
", mom: "<<aStep->GetTrack()->GetMomentum()
117 <<
", parentID " << aStep->GetTrack()->GetParentID() <<
"). The event will abort now.");