#include <EventAction.h>
Public Member Functions | |
void | addTkCaloStateInfo (uint32_t t, std::pair< math::XYZVectorD, math::XYZTLorentzVectorD > p) |
void | addTrack (TrackWithHistory *iTrack, bool inHistory, bool withAncestor) |
void | BeginOfEventAction (const G4Event *evt) |
void | EndOfEventAction (const G4Event *evt) |
EventAction (const edm::ParameterSet &ps, RunManager *, SimTrackManager *) | |
void | prepareForNewPrimary () |
const TrackContainer * | trackContainer () const |
~EventAction () | |
Public Attributes | |
SimActivityRegistry::BeginOfEventSignal | m_beginOfEventSignal |
SimActivityRegistry::EndOfEventSignal | m_endOfEventSignal |
Private Attributes | |
bool | m_debug |
RunManager * | m_runManager |
std::string | m_stopFile |
SimTrackManager * | m_trackManager |
Definition at line 24 of file EventAction.h.
EventAction::EventAction | ( | const edm::ParameterSet & | ps, |
RunManager * | rm, | ||
SimTrackManager * | iManager | ||
) |
Definition at line 13 of file EventAction.cc.
References edm::ParameterSet::getParameter(), m_trackManager, and SimTrackManager::setCollapsePrimaryVertices().
: m_runManager(rm), m_trackManager(iManager), m_stopFile(p.getParameter<std::string>("StopFile")), m_debug(p.getUntrackedParameter<bool>("debug",false)) { m_trackManager->setCollapsePrimaryVertices(p.getParameter<bool>("CollapsePrimaryVertices")); }
EventAction::~EventAction | ( | ) |
Definition at line 24 of file EventAction.cc.
{}
void EventAction::addTkCaloStateInfo | ( | uint32_t | t, |
std::pair< math::XYZVectorD, math::XYZTLorentzVectorD > | p | ||
) |
Definition at line 74 of file EventAction.cc.
References SimTrackManager::addTkCaloStateInfo(), and m_trackManager.
Referenced by TrackingAction::PostUserTrackingAction(), and SteppingAction::UserSteppingAction().
{ m_trackManager->addTkCaloStateInfo(t,p); }
void EventAction::addTrack | ( | TrackWithHistory * | iTrack, |
bool | inHistory, | ||
bool | withAncestor | ||
) |
Definition at line 69 of file EventAction.cc.
References SimTrackManager::addTrack(), and m_trackManager.
Referenced by TrackingAction::PostUserTrackingAction().
{ m_trackManager->addTrack(iTrack, inHistory, withAncestor); }
void EventAction::BeginOfEventAction | ( | const G4Event * | evt | ) |
Definition at line 26 of file EventAction.cc.
References RunManager::abortRun(), gather_cfg::cout, alignCSCRings::e, m_beginOfEventSignal, m_runManager, m_stopFile, m_trackManager, and SimTrackManager::reset().
{ if (std::ifstream(m_stopFile.c_str())) { cout << "BeginOfEventAction: termination signal received at event " << anEvent->GetEventID() << endl; //RunManager::instance()->abortRun(true); m_runManager->abortRun(true); } m_trackManager->reset(); BeginOfEvent e(anEvent); m_beginOfEventSignal(&e); }
void EventAction::EndOfEventAction | ( | const G4Event * | evt | ) |
Definition at line 42 of file EventAction.cc.
References RunManager::abortRun(), SimTrackManager::cleanTkCaloStateInfoMap(), gather_cfg::cout, SimTrackManager::deleteTracks(), alignCSCRings::e, m_endOfEventSignal, m_runManager, m_stopFile, m_trackManager, RunManager::simEvent(), and SimTrackManager::storeTracks().
{ if (std::ifstream(m_stopFile.c_str())) { cout << "EndOfEventAction: termination signal received at event " << anEvent->GetEventID() << endl; //RunManager::instance()->abortRun(true); m_runManager->abortRun(this); } if (anEvent->GetNumberOfPrimaryVertex()==0) { cout << " EndOfEventAction: event " << anEvent->GetEventID() << " must have failed (no G4PrimaryVertices found) and will be skipped " << endl; return; } // m_trackManager->storeTracks(RunManager::instance()->simEvent()); m_trackManager->storeTracks(m_runManager->simEvent()); // dispatch now end of event, and only then delete tracks... EndOfEvent e(anEvent); m_endOfEventSignal(&e); m_trackManager->deleteTracks(); m_trackManager->cleanTkCaloStateInfoMap(); }
void EventAction::prepareForNewPrimary | ( | ) | [inline] |
Definition at line 41 of file EventAction.h.
References SimTrackManager::cleanTracksWithHistory(), and m_trackManager.
Referenced by TrackingAction::PreUserTrackingAction().
{ m_trackManager->cleanTracksWithHistory(); }
const TrackContainer* EventAction::trackContainer | ( | ) | const [inline] |
Definition at line 36 of file EventAction.h.
References m_trackManager, and SimTrackManager::trackContainer().
Referenced by TrackingAction::PostUserTrackingAction().
{ return m_trackManager->trackContainer(); }
Definition at line 43 of file EventAction.h.
Referenced by BeginOfEventAction(), and RunManager::initializeUserActions().
bool EventAction::m_debug [private] |
Definition at line 51 of file EventAction.h.
Definition at line 44 of file EventAction.h.
Referenced by EndOfEventAction(), and RunManager::initializeUserActions().
RunManager* EventAction::m_runManager [private] |
Definition at line 48 of file EventAction.h.
Referenced by BeginOfEventAction(), and EndOfEventAction().
std::string EventAction::m_stopFile [private] |
Definition at line 50 of file EventAction.h.
Referenced by BeginOfEventAction(), and EndOfEventAction().
SimTrackManager* EventAction::m_trackManager [private] |
Definition at line 49 of file EventAction.h.
Referenced by addTkCaloStateInfo(), addTrack(), BeginOfEventAction(), EndOfEventAction(), EventAction(), prepareForNewPrimary(), and trackContainer().