#include <RootTruthParticleCnvTool.h>
Definition at line 13 of file RootTruthParticleCnvTool.h.
 
◆ chargeFromPdgId()
      
        
          | double RootTruthParticleCnvTool::chargeFromPdgId | ( | int | pdgId | ) | const | 
      
 
 
◆ configure()
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::configure | ( |  | ) |  |  | overridevirtual | 
 
 
◆ convert()
Converts a McEventCollection into an TruthParticleContainer (ie: converts it into an AOD compliant collection). 
@in mcEvts the McEventCollection holding the HepMC::GenEvent we want to convert into a TruthParticleContainer @in genEvtIndex the index to the HepMC::GenEvent to be converted @out mcParts a valid pointer to a TruthParticleContainer which will be filled with adaptors to HepMC::GenParticles. 
Create a map to enhance access between GenParticles and TruthParticles
Definition at line 27 of file RootTruthParticleCnvTool.cxx.
   35   if ( 0 == mcCollection ) {
 
   36     ::Warning (
"RootTruthParticleCnvTool",
 
   37                "Null pointer to McEventCollection !");
 
   38     return StatusCode::RECOVERABLE;
 
   41   if ( mcCollection->size() <= genEventIndex ) {
 
   42     ::Warning (
"RootTruthParticleCnvTool",
 
   43                "McEventCollection size: %ui; Requested element nbr : %ui !!",
 
   46                (
unsigned int)mcCollection->size(), 
 
   48     return StatusCode::RECOVERABLE;
 
   51   const HepMC::GenEvent * 
evt = (*mcCollection)[genEventIndex];
 
   52   container->setGenEvent( mcCollection, genEventIndex );
 
   55   container->reserve( 
evt->particles_size() );
 
   60   for ( 
const auto& hepMcPart:  *
evt) {
 
   63     container->push_back( mcPart );
 
   66       visitor->
visit( mcPart );
 
   73       ::Error (
"RootTruthParticleCnvTool",
 
   74                "TruthParticle is not wrapping the GenParticle : %d !!",
 
   78     bcToMcPart[ mcLink.compress() ] = mcPart;
 
   84   container->setParticles( bcToMcPart );
 
   89   if ( m_doEtIsolation.value() ) {
 
   90     const std::string& etIsolName 
 
   91       = m_isolationTool->etIsolationsName( container->genEventName() );
 
   92     if ( etIsolName.empty() ) {
 
   94         << 
"Could not retrieve the name of the TruthEtIsolations container" 
   96       return StatusCode::RECOVERABLE;
 
  100     if ( !m_storeGate->retrieve( etIsols, etIsolName ).isSuccess() ) {
 
  101       m_msg << MSG::WARNING
 
  102         << 
"Could not retrieve the TruthEtIsolations container at [" 
  103         << etIsolName << 
"] !!" 
  105       return StatusCode::RECOVERABLE;
 
  110     container->setEtIsolations( etIsols, genEventIndex );
 
  114   return StatusCode::SUCCESS;
 
 
 
 
◆ execute() [1/2]
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::execute | ( |  | ) | const |  | overridevirtual | 
 
 
◆ execute() [2/2]
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::execute | ( | const EventContext & | ctx | ) | const |  | overridevirtual | 
 
 
◆ finalize()
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::finalize | ( |  | ) |  |  | overridevirtual | 
 
 
◆ FSMState()
  
  | 
        
          | Gaudi::StateMachine::State RootTruthParticleCnvTool::FSMState | ( |  | ) | const |  | overridevirtual | 
 
 
◆ getProperties()
  
  | 
        
          | const std::vector< Gaudi::Details::PropertyBase * > & RootTruthParticleCnvTool::getProperties | ( |  | ) | const |  | overridevirtual | 
 
 
◆ getProperty() [1/3]
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::getProperty | ( | Gaudi::Details::PropertyBase * | p | ) | const |  | overridevirtual | 
 
 
◆ getProperty() [2/3]
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::getProperty | ( | std::string_view | n, |  
          |  |  | std::string & | v |  
          |  | ) |  | const |  | overridevirtual | 
 
 
◆ getProperty() [3/3]
  
  | 
        
          | const Gaudi::Details::PropertyBase & RootTruthParticleCnvTool::getProperty | ( | std::string_view | name | ) | const |  | overridevirtual | 
 
 
◆ hasProperty()
  
  | 
        
          | bool RootTruthParticleCnvTool::hasProperty | ( | std::string_view | name | ) | const |  | overridevirtual | 
 
 
◆ initialize()
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::initialize | ( |  | ) |  |  | overridevirtual | 
 
 
◆ name()
  
  | 
        
          | const std::string & RootTruthParticleCnvTool::name | ( |  | ) | const |  | overridevirtual | 
 
 
◆ parent()
  
  | 
        
          | const IInterface * RootTruthParticleCnvTool::parent | ( |  | ) | const |  | overridevirtual | 
 
 
◆ reinitialize()
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::reinitialize | ( |  | ) |  |  | overridevirtual | 
 
 
◆ restart()
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::restart | ( |  | ) |  |  | overridevirtual | 
 
 
◆ setProperty() [1/2]
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::setProperty | ( | const std::string & | name, |  
          |  |  | const Gaudi::Details::PropertyBase & | p |  
          |  | ) |  |  |  | overridevirtual | 
 
 
◆ setProperty() [2/2]
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::setProperty | ( | const std::string & | s | ) |  |  | overridevirtual | 
 
 
◆ setPropertyRepr()
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::setPropertyRepr | ( | const std::string & | n, |  
          |  |  | const std::string & | r |  
          |  | ) |  |  |  | overridevirtual | 
 
 
◆ start()
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::start | ( |  | ) |  |  | overridevirtual | 
 
 
◆ stop()
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::stop | ( |  | ) |  |  | overridevirtual | 
 
 
◆ sysFinalize()
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::sysFinalize | ( |  | ) |  |  | overridevirtual | 
 
 
◆ sysInitialize()
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::sysInitialize | ( |  | ) |  |  | overridevirtual | 
 
 
◆ sysReinitialize()
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::sysReinitialize | ( |  | ) |  |  | overridevirtual | 
 
 
◆ sysRestart()
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::sysRestart | ( |  | ) |  |  | overridevirtual | 
 
 
◆ sysStart()
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::sysStart | ( |  | ) |  |  | overridevirtual | 
 
 
◆ sysStop()
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::sysStop | ( |  | ) |  |  | overridevirtual | 
 
 
◆ terminate()
  
  | 
        
          | StatusCode RootTruthParticleCnvTool::terminate | ( |  | ) |  |  | overridevirtual | 
 
 
◆ type()
  
  | 
        
          | const std::string & RootTruthParticleCnvTool::type | ( |  | ) | const |  | overridevirtual | 
 
 
The documentation for this class was generated from the following files:
 
virtual int pdgId() const
Return enum indicating particle id the enum file is available in Event/EventKernel/PdtPdg....
HepMC::ConstGenParticlePtr genParticle() const
Retrieve the GenParticle this TruthParticle has been made from (if any)
void setGenEventIndex(size_t index)
set the GenEvent index
a link optimized in size for a GenParticle in a McEventCollection
std::unordered_map< long, const TruthParticle * > Map_t
barcode to TruthParticle dictionary
virtual void visit(TruthParticle *truthParticle) const =0
The method to visit a TruthParticle to apply further modifications to the instance at hand.
void setCharge(const ChargeType charge)
Set the charge of this TruthParticle.