#include <StdHepToLcioConvertor.hh>


The index "pointers" daughter1, daughter2, mother1 and mother2 are handled as follows,
where idx1 is daughter1/mother1, and idx2 is daughter2/mother2.
idx1 cmp idx2 action
_______________________
-1 -1 do nothing
# -1 use idx1
-1 # use idx2
# == # use idx1
# < # range = idx1 to idx2
# > # use idx1 and idx2 as discrete indices
Definition at line 46 of file StdHepToLcioConvertor.hh.
Public Types | |
| enum | ModuleStatus { eOkay = 0, eNotInitialized = 1, eBadState = 2, eFatalError = 3 } |
Public Member Functions | |
| StdHepToLcioConvertor (lStdHep *rdr) | |
| StdHepToLcioConvertor () | |
| virtual | ~StdHepToLcioConvertor () |
| void | setStdHepReader (lStdHep *rdr) |
| void | fillCurrentMcpCollectionFromStdHep () |
| void | setCurrentMcpCollection (EVENT::LCCollection *mcpColl) |
| EVENT::LCCollection * | getCurrentMcpCollection () |
| IMPL::MCParticleImpl * | createMcpFromStdHep (int ihep) |
| void | setupParents (int ihep, IMPL::MCParticleImpl *) |
| void | addMcpParent (int parIdx, IMPL::MCParticleImpl *parMcp) |
| void | setupDaughters (int ihep, IMPL::MCParticleImpl *) |
| void | addMcpDaughter (int dauIdx, IMPL::MCParticleImpl *parMcp) |
| bool | hasParent (IMPL::MCParticleImpl *dauMcp, IMPL::MCParticleImpl *parMcp) |
| std::vector< int > | makeIndexVec (int idx1, int idx2, std::vector< int > &vec) |
| void | checkParentage (int ihep) |
| void | printIndex (int ihep) |
| void | printMothers (int ihep) |
| void | printDaughters (int ihep) |
| void | printTrack (int ihep) |
| const std::string & | getName () const |
| const ModuleStatus | getStatus () const |
| virtual void | initialize () |
| virtual void | reset () |
| virtual void | cleanup () |
| bool | deleteOnExit () |
| LogStream & | log () |
| virtual void | beginEvent (const G4Event *) |
| virtual void | endEvent (const G4Event *) |
| virtual void | beginRun (const G4Run *) |
| virtual void | endRun (const G4Run *) |
| virtual void | preTracking (const G4Track *) |
| virtual void | postTracking (const G4Track *) |
| virtual void | stepping (const G4Step *) |
| G4ClassificationOfNewTrack | stackingClassifyNewTrack (const G4Track *) |
| void | stackingNewStage () |
| void | stackingPrepareNewEvent () |
Public Attributes | |
| ModuleStatus | m_status |
| std::string | m_name |
| LogStream | m_log |
| bool | m_deleteOnExit |
Private Attributes | |
| EVENT::LCCollection * | m_currentMcpColl |
| lStdHep * | m_reader |
enum slic::Module::ModuleStatus [inherited] |
| slic::StdHepToLcioConvertor::StdHepToLcioConvertor | ( | lStdHep * | rdr | ) |
Definition at line 27 of file StdHepToLcioConvertor.cc.
| slic::StdHepToLcioConvertor::StdHepToLcioConvertor | ( | ) |
Definition at line 34 of file StdHepToLcioConvertor.cc.
| slic::StdHepToLcioConvertor::~StdHepToLcioConvertor | ( | ) | [virtual] |
Definition at line 39 of file StdHepToLcioConvertor.cc.
| void slic::StdHepToLcioConvertor::setStdHepReader | ( | lStdHep * | rdr | ) | [inline] |
Set the lStdHep reader to be used by the convertor.
Definition at line 59 of file StdHepToLcioConvertor.hh.
References m_reader.
Referenced by slic::StdHepEventSource::beginRun().
| void slic::StdHepToLcioConvertor::fillCurrentMcpCollectionFromStdHep | ( | ) |
Create the next MCP collection using current event NOTE: This function depends upon an external read operation for the next event.
Definition at line 52 of file StdHepToLcioConvertor.cc.
References checkParentage(), createMcpFromStdHep(), LOG::debug, LOG::done, LOG::endl, LOG::error, slic::Module::log(), m_currentMcpColl, m_reader, lStdHep::nTracks(), printDaughters(), printIndex(), printMothers(), printTrack(), setupDaughters(), and setupParents().
Referenced by slic::StdHepEventSource::beginEvent().
| void slic::StdHepToLcioConvertor::setCurrentMcpCollection | ( | EVENT::LCCollection * | mcpColl | ) |
Reset the current MCParticle collection.
Definition at line 42 of file StdHepToLcioConvertor.cc.
References m_currentMcpColl.
Referenced by slic::StdHepEventSource::beginEvent().
| EVENT::LCCollection * slic::StdHepToLcioConvertor::getCurrentMcpCollection | ( | ) |
Get the current MCParticle collection.
Definition at line 47 of file StdHepToLcioConvertor.cc.
References m_currentMcpColl.
| IMPL::MCParticleImpl * slic::StdHepToLcioConvertor::createMcpFromStdHep | ( | int | ihep | ) |
Create a single MCParticle from a StdHep track. NOTE: Does not setup mother or daughter links.
Definition at line 149 of file StdHepToLcioConvertor.cc.
References LOG::debug, LOG::done, slic::Module::log(), lStdHep::M(), m_currentMcpColl, slic::LcioMcpManager::m_NAN, m_reader, lStdHep::pid(), lStdHep::Px(), lStdHep::Py(), lStdHep::Pz(), lStdHep::status(), lStdHep::T(), lStdHep::X(), lStdHep::Y(), and lStdHep::Z().
Referenced by fillCurrentMcpCollectionFromStdHep().
| void slic::StdHepToLcioConvertor::setupParents | ( | int | ihep, | |
| IMPL::MCParticleImpl * | mcp | |||
| ) |
Setup the parent pointers of this track.
Definition at line 214 of file StdHepToLcioConvertor.cc.
References addMcpParent(), LOG::debug, LOG::done, slic::Module::log(), m_reader, makeIndexVec(), lStdHep::mother1(), lStdHep::mother2(), and LOG::warning.
Referenced by fillCurrentMcpCollectionFromStdHep().
| void slic::StdHepToLcioConvertor::addMcpParent | ( | int | parIdx, | |
| IMPL::MCParticleImpl * | parMcp | |||
| ) |
Setup the input MCParticle as a parent of this track.
Definition at line 335 of file StdHepToLcioConvertor.cc.
References LOG::debug, LOG::done, LOG::fatal, hasParent(), slic::Module::log(), and m_currentMcpColl.
Referenced by setupParents().
| void slic::StdHepToLcioConvertor::setupDaughters | ( | int | ihep, | |
| IMPL::MCParticleImpl * | mcp | |||
| ) |
Setup the daughter pointers of this track.
Definition at line 246 of file StdHepToLcioConvertor.cc.
References addMcpDaughter(), lStdHep::daughter1(), lStdHep::daughter2(), LOG::debug, LOG::done, LOG::error, slic::Module::log(), m_reader, and makeIndexVec().
Referenced by fillCurrentMcpCollectionFromStdHep().
| void slic::StdHepToLcioConvertor::addMcpDaughter | ( | int | dauIdx, | |
| IMPL::MCParticleImpl * | parMcp | |||
| ) |
Setup the input MCParticle as a parent of this track.
Definition at line 304 of file StdHepToLcioConvertor.cc.
References LOG::debug, LOG::done, LOG::error, hasParent(), slic::Module::log(), and m_currentMcpColl.
Referenced by setupDaughters().
| bool slic::StdHepToLcioConvertor::hasParent | ( | IMPL::MCParticleImpl * | dauMcp, | |
| IMPL::MCParticleImpl * | parMcp | |||
| ) |
Check if an MCParticle has another particle as its parent.
Definition at line 278 of file StdHepToLcioConvertor.cc.
Referenced by addMcpDaughter(), and addMcpParent().
| std::vector< int > slic::StdHepToLcioConvertor::makeIndexVec | ( | int | idx1, | |
| int | idx2, | |||
| std::vector< int > & | vec | |||
| ) |
Given two ihep indices, return a vector of all the included indices (discrete, range, etc.).
Definition at line 379 of file StdHepToLcioConvertor.cc.
References LOG::debug, LOG::done, and slic::Module::log().
Referenced by setupDaughters(), and setupParents().
| void slic::StdHepToLcioConvertor::checkParentage | ( | int | ihep | ) |
Perform various sanity checks on the track's mother and daughter index values.
Definition at line 483 of file StdHepToLcioConvertor.cc.
References lStdHep::daughter1(), lStdHep::daughter2(), LOG::debug, LOG::done, slic::Module::log(), m_reader, lStdHep::mother1(), and lStdHep::mother2().
Referenced by fillCurrentMcpCollectionFromStdHep().
| void slic::StdHepToLcioConvertor::printIndex | ( | int | ihep | ) |
Definition at line 439 of file StdHepToLcioConvertor.cc.
References LOG::debug, LOG::done, and slic::Module::log().
Referenced by fillCurrentMcpCollectionFromStdHep(), and printTrack().
| void slic::StdHepToLcioConvertor::printMothers | ( | int | ihep | ) |
Definition at line 444 of file StdHepToLcioConvertor.cc.
References LOG::debug, LOG::done, slic::Module::log(), m_reader, lStdHep::mother1(), and lStdHep::mother2().
Referenced by fillCurrentMcpCollectionFromStdHep(), and printTrack().
| void slic::StdHepToLcioConvertor::printDaughters | ( | int | ihep | ) |
Definition at line 450 of file StdHepToLcioConvertor.cc.
References lStdHep::daughter1(), lStdHep::daughter2(), LOG::debug, LOG::done, slic::Module::log(), and m_reader.
Referenced by fillCurrentMcpCollectionFromStdHep(), and printTrack().
| void slic::StdHepToLcioConvertor::printTrack | ( | int | ihep | ) |
Definition at line 456 of file StdHepToLcioConvertor.cc.
References LOG::debug, LOG::done, slic::Module::log(), lStdHep::M(), m_reader, lStdHep::pid(), printDaughters(), printIndex(), printMothers(), lStdHep::Px(), lStdHep::Py(), lStdHep::Pz(), lStdHep::status(), lStdHep::T(), lStdHep::X(), lStdHep::Y(), and lStdHep::Z().
Referenced by fillCurrentMcpCollectionFromStdHep().
| const std::string& slic::Module::getName | ( | ) | const [inline, inherited] |
Definition at line 48 of file Module.hh.
References slic::Module::m_name.
Referenced by slic::ModuleRegistry::deregisterModule(), slic::Module::Module(), slic::ModuleRegistry::registerModule(), and slic::Module::~Module().
| const ModuleStatus slic::Module::getStatus | ( | ) | const [inline, inherited] |
| virtual void slic::Module::initialize | ( | ) | [inline, virtual, inherited] |
| virtual void slic::Module::reset | ( | ) | [inline, virtual, inherited] |
Reimplemented in slic::EventSource, slic::EventSourceWithInputFile, slic::LcioManager, and slic::LcioMcpManager.
| virtual void slic::Module::cleanup | ( | void | ) | [inline, virtual, inherited] |
| bool slic::Module::deleteOnExit | ( | ) | [inline, inherited] |
| LogStream& slic::Module::log | ( | ) | [inline, inherited] |
Definition at line 70 of file Module.hh.
References slic::Module::m_log.
Referenced by slic::PhysicsListFactory::addBuilder(), slic::EventDebugger::addDebugEvent(), slic::LcioHitsCollectionBuilder::addMcpContribs(), addMcpDaughter(), addMcpParent(), slic::TrajectoryManager::addTrackIDToTrajectoryLink(), slic::EventAction::BeginOfEventAction(), slic::EventSourceWithInputFile::beginRun(), checkParentage(), slic::LcioMcpPrinter::colLabels(), slic::TrajectoryManager::copySecondaryTrackInformationFromParent(), slic::PhysicsListFactory::create(), slic::LcioMcpFactory::createDaughtersFromPrimary(), slic::EventSourceManager::createEventSource(), slic::LcioHitsCollectionBuilder::createHit(), slic::LcioHitsCollectionBuilder::createHitCollections(), slic::LcioMcpManager::createMcpCollection(), slic::LcioMcpFactory::createMcpFromInitialAndPrimary(), createMcpFromStdHep(), slic::StdHepLoader::dumpCurrentEvent(), slic::StdHepEventSource::dumpCurrentEvent(), slic::ParticleGunEventSource::dumpCurrentEvent(), slic::LcioEventSource::dumpCurrentEvent(), slic::GPSEventSource::dumpCurrentEvent(), slic::EventDebugger::execCleanupMacro(), slic::EventDebugger::execDebugMacro(), fillCurrentMcpCollectionFromStdHep(), slic::TrajectoryManager::fillTrackIDToTrajectoryMap(), slic::LcioMcpFilter::filterSimParticles(), slic::LcioHitsCollectionBuilder::findMcpHitContribByTrackID(), slic::TrajectoryManager::findTrajectory(), slic::LcioMcpPrinter::flagLabels(), slic::LcioMcpPrinter::foot(), slic::G4MagIntegratorStepperFactory::G4MagIntegratorStepperFactory(), slic::EventSourceManager::generate(), slic::LcioEventSource::getCurrentMcpLCCollection(), slic::LcioFileNamer::getFieldValue(), slic::TrajectoryManager::getNumberOfSecondariesAtEnd(), slic::EventSourceManager::getSourceTypeFromFileExtension(), slic::TrajectoryManager::handleSecondaryTrack(), slic::LcioMcpPrinter::head(), slic::SlicApplication::initialize(), slic::PhysicsListManager::initializePhysicsList(), slic::SlicApplication::initializeUI(), slic::LcioMcpPrinter::line(), slic::SlicMain::main(), slic::LcioManager::makeAutoname(), makeIndexVec(), slic::Module::Module(), slic::LcioEventSource::open(), slic::LcioManager::openLcioFile(), slic::StdHepLoader::openStdHepFile(), slic::TrajectoryManager::postTracking(), slic::TrajectoryManager::preTracking(), slic::ModuleRegistry::print(), slic::PhysicsListFactory::printAvailableLists(), slic::PrimaryGeneratorAction::printBeginEventMessage(), slic::RunAction::printBeginOfRunMessage(), printDaughters(), slic::EventAction::printEndEventMessage(), slic::RunAction::printEndOfRunMessage(), printIndex(), slic::LcioMcpMaps::printInitMcpToMcpMap(), slic::LcioMcpMaps::printMaps(), slic::LcioMcpPrinter::printMcp(), slic::LcioMcpPrinter::printMcpCollection(), slic::LcioMcpManager::printMcpCollection(), slic::LcioMcpMaps::printMcpToPrimaryMap(), printMothers(), slic::EventSourceManager::printNumEventsGenerated(), slic::CommandLineProcessor::printOptions(), slic::CommandQueue::printOut(), slic::TrajectoryManager::printPhysVolDbg(), slic::TrajectoryManager::printSecondaries(), slic::SlicApplication::printSplashScreen(), slic::TrajectoryManager::printStatusFlags(), slic::TrajectoryManager::printTrack(), printTrack(), slic::TrajectoryManager::printTrackIDToTrajectoryMap(), slic::LcioMcpMaps::printTrackToMcpMap(), slic::TrajectoryManager::printTrajectory(), slic::CommandLineProcessor::printUsage(), slic::CommandLineProcessor::printVersion(), slic::CommandLineProcessor::process(), slic::StdHepLoader::readNextEvent(), slic::LcioMcpManager::registerMcpCollection(), slic::ModuleRegistry::registerModule(), slic::SlicApplication::run(), slic::LcioMcpPrinter::sep(), slic::PhysicsListManager::setCurrentListName(), slic::LcioManager::setDetectorName(), slic::LcioManager::setFileExistsAction(), slic::EventSourceWithInputFile::setFilename(), slic::LcioHitsCollectionBuilder::setLongFlag(), slic::SlicApplicationMessenger::SetNewValue(), slic::PhysicsMessenger::SetNewValue(), slic::GeneratorMessenger::SetNewValue(), slic::FieldMessenger::SetNewValue(), slic::LcioHitsCollectionBuilder::setPDGFlag(), slic::LcioManager::setRunNumber(), slic::TrajectoryManager::setTrajectoryFinalStatus(), setupDaughters(), slic::EventSourceManager::setupEventSource(), slic::PhysicsListManager::setupOpticalProcesses(), setupParents(), slic::PhysicsListManager::setupUserLimitsProcesses(), slic::SlicApplication::SlicApplication(), slic::EventAction::startEventTimer(), slic::RunAction::startRunTimer(), slic::EventAction::stopEventTimer(), slic::RunAction::stopRunTimer(), slic::Module::~Module(), and slic::SlicApplication::~SlicApplication().
| virtual void slic::Module::beginEvent | ( | const G4Event * | ) | [inline, virtual, inherited] |
| virtual void slic::Module::endEvent | ( | const G4Event * | ) | [inline, virtual, inherited] |
Reimplemented in slic::EventDebugger, slic::EventSource, slic::EventSourceManager, slic::LcioManager, and slic::LcioMcpManager.
| virtual void slic::Module::beginRun | ( | const G4Run * | ) | [inline, virtual, inherited] |
| virtual void slic::Module::endRun | ( | const G4Run * | ) | [inline, virtual, inherited] |
Reimplemented in slic::EventSource, slic::EventSourceManager, and slic::LcioManager.
| virtual void slic::Module::preTracking | ( | const G4Track * | ) | [inline, virtual, inherited] |
| virtual void slic::Module::postTracking | ( | const G4Track * | ) | [inline, virtual, inherited] |
| virtual void slic::Module::stepping | ( | const G4Step * | ) | [inline, virtual, inherited] |
| G4ClassificationOfNewTrack slic::Module::stackingClassifyNewTrack | ( | const G4Track * | ) | [inline, inherited] |
| void slic::Module::stackingNewStage | ( | ) | [inline, inherited] |
| void slic::Module::stackingPrepareNewEvent | ( | ) | [inline, inherited] |
EVENT::LCCollection* slic::StdHepToLcioConvertor::m_currentMcpColl [private] |
Definition at line 131 of file StdHepToLcioConvertor.hh.
Referenced by addMcpDaughter(), addMcpParent(), createMcpFromStdHep(), fillCurrentMcpCollectionFromStdHep(), getCurrentMcpCollection(), and setCurrentMcpCollection().
lStdHep* slic::StdHepToLcioConvertor::m_reader [private] |
Definition at line 134 of file StdHepToLcioConvertor.hh.
Referenced by checkParentage(), createMcpFromStdHep(), fillCurrentMcpCollectionFromStdHep(), printDaughters(), printMothers(), printTrack(), setStdHepReader(), setupDaughters(), and setupParents().
ModuleStatus slic::Module::m_status [inherited] |
std::string slic::Module::m_name [inherited] |
Reimplemented in slic::EventSource.
Definition at line 111 of file Module.hh.
Referenced by slic::Module::getName(), and slic::Module::Module().
LogStream slic::Module::m_log [inherited] |
Definition at line 112 of file Module.hh.
Referenced by slic::Module::log(), and slic::Module::Module().
bool slic::Module::m_deleteOnExit [inherited] |
1.5.4