12 #include "G4TrajectoryContainer.hh" 13 #include "G4PrimaryTransformer.hh" 14 #include "G4TrackingManager.hh" 15 #include "G4TrackStatus.hh" 16 #include "G4UserSteppingAction.hh" 18 #include "G4SDManager.hh" 19 #include "G4StateManager.hh" 20 #include "G4ApplicationState.hh" 21 #include "G4TransportationManager.hh" 22 #include "G4Navigator.hh" 25 : verbose_(iConfig.getParameter<
int>(
"EventVerbose")) {
30 m_navigator = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking();
47 G4ThreeVector center(0, 0, 0);
48 m_navigator->LocateGlobalPointAndSetup(center,
nullptr,
false);
50 G4Track*
track =
nullptr;
52 anEvent->SetHCofThisEvent(
m_sdManager->PrepareNewEvent());
61 <<
"### Event #" << anEvent->GetEventID() <<
" " <<
trackID_ <<
" primary tracks";
74 m_sdManager->TerminateCurrentEvent(anEvent->GetHCofThisEvent());
80 if (trackVector ==
nullptr || trackVector->empty())
82 for (
auto& newTrack : *trackVector) {
86 auto pp = newTrack->GetDynamicParticle()->GetPrimaryParticle();
94 newTrack->SetOriginTouchableHandle(newTrack->GetTouchableHandle());
Log< level::Info, true > LogVerbatim
G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack) final
G4PrimaryTransformer * m_primaryTransformer
G4TrackingManager * m_defTrackManager
TrackingAction * m_trackingAction
void BeginOfEventAction(const G4Event *evt) override
void ProcessOneEvent(G4Event *anEvent)
G4Navigator * m_navigator
void StackTracks(G4TrackVector *, bool IDisSet)
void EndOfEventAction(const G4Event *evt) override
void SetUserAction(EventAction *ptr)
G4StateManager * m_stateManager
EventAction * m_eventAction
G4SDManager * m_sdManager
std::vector< G4Track * > m_tracks
StackingAction * m_stackingAction
CMSSimEventManager(const edm::ParameterSet &iConfig)