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 "EventInfo/EventInfo.h"
25 #include "GaudiKernel/Bootstrap.h"
26 #include "GaudiKernel/ISvcLocator.h"
27 #include "GaudiKernel/IMessageSvc.h"
36 m_evtStore(
"StoreGateSvc/StoreGateSvc",
"LooperKiller"),
37 m_detStore(
"StoreGateSvc/DetectorStore",
"LooperKiller"),
38 m_config(
config), m_report(), m_count_steps(0)
49 ATH_MSG_WARNING(
"Track finished on its own. Congrats. Moving on with the event.");
51 G4TransportationManager *tm = G4TransportationManager::GetTransportationManager();
52 tm->GetNavigatorForTracking()->SetVerboseLevel(0);
53 tm->GetPropagatorInField()->SetVerboseLevel(0);
54 G4RunManagerKernel *rmk = G4RunManagerKernel::GetRunManagerKernel();
55 rmk->GetTrackingManager()->SetVerboseLevel(0);
56 rmk->GetTrackingManager()->GetSteppingManager()->SetVerboseLevel(0);
57 rmk->GetStackManager()->SetVerboseLevel(0);
60 ATH_MSG_WARNING(
"LooperKiller triggered!! Hold on to your hats!!!!!!!!" );
63 G4TransportationManager *tm = G4TransportationManager::GetTransportationManager();
67 G4RunManagerKernel *rmk = G4RunManagerKernel::GetRunManagerKernel();
77 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
78 tm->GetNavigatorForTracking()->SetVerboseLevel(0);
79 tm->GetPropagatorInField()->SetVerboseLevel(0);
80 rmk->GetTrackingManager()->SetVerboseLevel(0);
81 rmk->GetTrackingManager()->GetSteppingManager()->SetVerboseLevel(0);
82 rmk->GetStackManager()->SetVerboseLevel(0);
87 if (
part) { pdg_id =
part->pdg_id(); }
92 rmk->GetEventManager()->AbortCurrentEvent();
93 rmk->GetEventManager()->GetNonconstCurrentEvent()->SetEventAborted();
107 const std::string
name = aStep->GetTrack()->GetDefinition()->GetParticleName();
110 <<
" (trackID " << aStep->GetTrack()->GetTrackID()
111 <<
", track pos: "<<aStep->GetTrack()->GetPosition()
112 <<
", mom: "<<aStep->GetTrack()->GetMomentum()
113 <<
", parentID " << aStep->GetTrack()->GetParentID() <<
")");
117 <<
" (trackID " << aStep->GetTrack()->GetTrackID()
118 <<
", track pos: "<<aStep->GetTrack()->GetPosition()
119 <<
", mom: "<<aStep->GetTrack()->GetMomentum()
120 <<
", parentID " << aStep->GetTrack()->GetParentID() <<
"). The event will abort now.");