ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
EvtInclusiveDecay Class Reference

#include <EvtInclusiveDecay.h>

Inheritance diagram for EvtInclusiveDecay:
Collaboration diagram for EvtInclusiveDecay:

Public Member Functions

 EvtInclusiveDecay (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~EvtInclusiveDecay ()
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 
std::string xmlpath (void)
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Features for derived classes to use internally

ServiceHandle< IAthRNGSvcm_rndmSvc {this, "RndmSvc", "AthRNGSvc"}
 
IntegerProperty m_dsid {this, "Dsid", 999999}
 
IntegerProperty m_randomSeed {this, "RandomSeed", 1234567, "Random seed for the built-in random engine"}
 Seed for random number engine. More...
 
McEventCollectionm_mcEvtColl {}
 
EvtInclusiveAtRndmGenm_evtAtRndmGen {}
 
EvtGen * m_myEvtGen {}
 
std::string m_pdtFile
 
std::string m_decayFile
 
std::string m_userDecayFile
 
std::string m_randomStreamName
 
std::string m_inputKeyName
 
std::string m_outputKeyName
 
bool m_readExisting
 
bool m_prohibitFinalStateDecay
 
bool m_prohibitReDecay
 
bool m_prohibitUnDecay
 
bool m_prohibitRemoveSelfDecay
 
std::vector< int > m_blackList
 
std::set< int > m_blackListSet
 
bool m_allowAllKnownDecays
 
bool m_allowDefaultBDecays
 
std::vector< int > m_whiteList
 
std::set< int > m_whiteListSet
 
bool m_printHepMCBeforeEvtGen
 
bool m_printHepMCAfterEvtGen
 
bool m_printHepMCHighlighted
 
bool m_printHepMCHighLightTopLevelDecays
 
bool m_checkDecayTree
 
bool m_checkDecayChannels
 
std::map< int, long > m_noDecayChannels
 
int m_nRepeatedDecays
 
int m_maxNRepeatedDecays
 
bool m_applyUserSelection
 
bool m_userSelRequireOppositeSignedMu
 
double m_userSelMu1MinPt
 
double m_userSelMu2MinPt
 
double m_userSelMu1MaxEta
 
double m_userSelMu2MaxEta
 
double m_userSelMinDimuMass
 
double m_userSelMaxDimuMass
 
bool m_isfHerwig
 
bool m_setVMtransversePol
 
void reseedRandomEngine (const std::string &streamName, const EventContext &ctx)
 
CLHEP::HepRandomEngine * getRandomEngine (const std::string &streamName, unsigned long int randomSeedOffset, const EventContext &ctx) const
 
CLHEP::HepRandomEngine * getRandomEngineDuringInitialize (const std::string &streamName, unsigned long int randomSeedOffset, unsigned int conditionsRun=1, unsigned int lbn=1) const
 
StatusCode traverseDecayTree (HepMC::GenParticlePtr p, bool isToBeRemoved, std::set< HepMC::GenVertexPtr > &visited, std::set< int > &toBeDecayed)
 
void removeDecayTree (HepMC::GenEvent *hepMC, HepMC::GenParticlePtr p)
 
void decayParticle (HepMC::GenEvent *hepMC, HepMC::GenParticlePtr p)
 
void addEvtGenDecayTree (HepMC::GenEvent *hepMC, HepMC::GenParticlePtr part, EvtParticle *evtPart, EvtVector4R treeStart, double momentumScaleFactor=1.0)
 
bool isToBeDecayed (HepMC::ConstGenParticlePtr p, bool doCrossChecks)
 
bool isDefaultB (const int pId) const
 
bool passesUserSelection (HepMC::GenEvent *hepMC)
 
double invMass (HepMC::ConstGenParticlePtr p1, HepMC::ConstGenParticlePtr p2)
 
void printHepMC (HepMC::GenEvent *hepMC, std::set< int > *barcodeList=nullptr)
 
unsigned int printTree (HepMC::GenParticlePtr p, std::set< HepMC::GenVertexPtr > &visited, int level, std::set< int > *barcodeList=0)
 
std::string pdgName (HepMC::ConstGenParticlePtr p, bool statusHighlighting=false, std::set< int > *barcodeList=nullptr)
 

Utility event-mangling functions

Todo:
Replace with HepMC units when available
ServiceHandle< IPartPropSvc > m_ppSvc {this, "PartPropSvc", "PartPropSvc"}
 Handle on the particle property service. More...
 
SG::ReadHandleKey< McEventCollectionm_mcevents_const { this, "McEventKey", "GEN_EVENT", "StoreGate key of the MC event collection" }
 Const handle to the MC event collection. More...
 
void GeVToMeV (HepMC::GenEvent *evt)
 Scale event energies/momenta by x 1000. More...
 
void MeVToGeV (HepMC::GenEvent *evt)
 Scale event energies/momenta by x 1/1000. More...
 
void cmTomm (HepMC::GenEvent *evt)
 Scale event lengths by x 10. More...
 
void mmTocm (HepMC::GenEvent *evt)
 Scale event lengths by x 1/10. More...
 

Detailed Description

Definition at line 58 of file EvtInclusiveDecay.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ EvtInclusiveDecay()

EvtInclusiveDecay::EvtInclusiveDecay ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 58 of file EvtInclusiveDecay.cxx.

58  :
59  GenBase( name, pSvcLocator ) {
60 
61  // Basic EvtGen configuration: decay and particle definition files, random number stream
62  declareProperty("pdtFile", m_pdtFile = "inclusive.pdt");
63  declareProperty("decayFile", m_decayFile = "2014inclusive.dec");
64  declareProperty("userDecayFile", m_userDecayFile = "");
65  declareProperty("randomStreamName", m_randomStreamName = "EVTGEN");
66  declareProperty("inputKeyName", m_inputKeyName = "GEN_EVENT");
67  declareProperty("outputKeyName",m_outputKeyName = "GEN_EVENT_EVTGEN");
68  declareProperty("readExisting",m_readExisting=false);
69 
70  // Selection of particles to be decayed
71  declareProperty("prohibitFinalStateDecay", m_prohibitFinalStateDecay=false);
72  declareProperty("prohibitReDecay", m_prohibitReDecay=false);
73  declareProperty("prohibitUnDecay", m_prohibitUnDecay=true);
74  declareProperty("prohibitRemoveSelfDecay", m_prohibitRemoveSelfDecay=false);
75  declareProperty("blackList",m_blackList);
76  declareProperty("allowAllKnownDecays", m_allowAllKnownDecays=true);
77  declareProperty("allowDefaultBDecays", m_allowDefaultBDecays=true);
78  declareProperty("whiteList",m_whiteList);
79 
80  // Level of output
81  declareProperty("printHepMCBeforeEvtGen", m_printHepMCBeforeEvtGen=false);
82  declareProperty("printHepMCAfterEvtGen", m_printHepMCAfterEvtGen=false);
83  declareProperty("printHepMCHighlighted", m_printHepMCHighlighted=true);
84  declareProperty("printHepMCHighLightTopLevelDecays", m_printHepMCHighLightTopLevelDecays=true);
85 
86  // Optional checks
87  declareProperty("checkDecayTree", m_checkDecayTree=false);
88  declareProperty("checkDecayChannels", m_checkDecayChannels=false);
89 
90  // Repeated decays
91  declareProperty("maxNRepeatedDecays", m_maxNRepeatedDecays=1);
92 
93  // User selection
94  declareProperty("applyUserSelection", m_applyUserSelection=false);
95  declareProperty("userSelRequireOppositeSignedMu", m_userSelRequireOppositeSignedMu=true);
96  declareProperty("userSelMu1MinPt", m_userSelMu1MinPt=0.);
97  declareProperty("userSelMu2MinPt", m_userSelMu2MinPt=0.);
98  declareProperty("userSelMu1MaxEta", m_userSelMu1MaxEta=102.5);
99  declareProperty("userSelMu2MaxEta", m_userSelMu2MaxEta=102.5);
100  declareProperty("userSelMinDimuMass", m_userSelMinDimuMass=0.);
101  declareProperty("userSelMaxDimuMass", m_userSelMaxDimuMass=-1.); // set to negative to not apply cut
102  declareProperty("isfHerwig", m_isfHerwig=false);
103  declareProperty("setVMtransversePol", m_setVMtransversePol=false);
104 
105  // We have decided to blacklist Tau decays because we are not sure whether the polarization
106  // would be properly passed to EvtGen
107  m_blackList.push_back(15);
108 }

◆ ~EvtInclusiveDecay()

EvtInclusiveDecay::~EvtInclusiveDecay ( )
virtual

Definition at line 112 of file EvtInclusiveDecay.cxx.

112  {
113  delete m_myEvtGen;
114  delete m_evtAtRndmGen;
115 }

Member Function Documentation

◆ addEvtGenDecayTree()

void EvtInclusiveDecay::addEvtGenDecayTree ( HepMC::GenEvent *  hepMC,
HepMC::GenParticlePtr  part,
EvtParticle *  evtPart,
EvtVector4R  treeStart,
double  momentumScaleFactor = 1.0 
)
private

Definition at line 532 of file EvtInclusiveDecay.cxx.

533  {
534  if(evtPart->getNDaug()!=0) {
535  // Add decay vertex, starting from production vertex of particle
536  double ct=(evtPart->getDaug(0)->get4Pos()).get(0)+treeStart.get(0);
537  double x=(evtPart->getDaug(0)->get4Pos()).get(1)+treeStart.get(1);
538  double y=(evtPart->getDaug(0)->get4Pos()).get(2)+treeStart.get(2);
539  double z=(evtPart->getDaug(0)->get4Pos()).get(3)+treeStart.get(3);
540 
541  HepMC::GenVertexPtr end_vtx = HepMC::newGenVertexPtr(HepMC::FourVector(x,y,z,ct));
542 
543  hepMC->add_vertex(end_vtx);
544  end_vtx->add_particle_in(part);
545 
546  // Add decay daughter with their own decay trees
547  for(uint it=0; it<evtPart->getNDaug(); it++) {
548  double e=(evtPart->getDaug(it)->getP4Lab()).get(0) * momentumScaleFactor;
549  double px=(evtPart->getDaug(it)->getP4Lab()).get(1) * momentumScaleFactor;
550  double py=(evtPart->getDaug(it)->getP4Lab()).get(2) * momentumScaleFactor;
551  double pz=(evtPart->getDaug(it)->getP4Lab()).get(3) * momentumScaleFactor;
552  int id=EvtPDL::getStdHep(evtPart->getDaug(it)->getId());
553  int status=1;
554  if(evtPart->getDaug(it)->getNDaug() != 0) status=2;
555  HepMC::GenParticlePtr daughter = HepMC::newGenParticlePtr(HepMC::FourVector(px,py,pz,e),id,status);
556  end_vtx->add_particle_out(daughter);
557  addEvtGenDecayTree(hepMC, daughter, evtPart->getDaug(it), treeStart, momentumScaleFactor);
558  }
559  }
560 }

◆ ATLAS_NOT_CONST_THREAD_SAFE() [1/2]

HepMC::GenEvent* event GenBase::ATLAS_NOT_CONST_THREAD_SAFE ( )
inlineinherited

Access the current signal event (first in the McEventCollection)

Note
This function will make a new McEventCollection if there is not already a valid one and MakeMcEvent=True.

Definition at line 76 of file GenBase.h.

76  {
77  if (events()->empty())
78  ATH_MSG_ERROR("McEventCollection is empty during first event access");
79  return *(events()->begin());
80  }

◆ ATLAS_NOT_CONST_THREAD_SAFE() [2/2]

McEventCollection* events GenBase::ATLAS_NOT_CONST_THREAD_SAFE ( )
inherited

Access the current event's McEventCollection.

Note
This function will make a new McEventCollection if there is not already a valid one and MakeMcEvent=True.

◆ cmTomm()

void GenBase::cmTomm ( HepMC::GenEvent *  evt)
protectedinherited

Scale event lengths by x 10.

Definition at line 81 of file GenBase.cxx.

81  {
82  for (HepMC::GenEvent::vertex_iterator vtx = evt->vertices_begin(); vtx != evt->vertices_end(); ++vtx) {
83  const HepMC::FourVector fv((*vtx)->position().x() * 10,
84  (*vtx)->position().y() * 10,
85  (*vtx)->position().z() * 10,
86  (*vtx)->position().t() * 10);
87  (*vtx)->set_position(fv);
88  }
89 }

◆ decayParticle()

void EvtInclusiveDecay::decayParticle ( HepMC::GenEvent *  hepMC,
HepMC::GenParticlePtr  p 
)
private

Definition at line 493 of file EvtInclusiveDecay.cxx.

493  {
494 // TODO the printout below crashes with segfault for HepMC3 - needs expert action
495  ATH_MSG_DEBUG("Decaying particle " << pdgName(part) << " " << part);
496  if (msgLvl(MSG::VERBOSE)) HepMC::Print::line(std::cout,part);
497 
498  // Remove existing decay tree, if any, and flag particle as being decayed by EvtGen
499  removeDecayTree(hepMC,part);
500  part->set_status(HepMC::EVTGENUNDECAYEDSTATUS);
501 
502  // Create EvtGen version of part and have EvtGen decay it.
503  // Since EvtGen uses GeV, convert particles momentum from MeV to GeV.
504  int id = part->pdg_id();
505  EvtId evtId=EvtPDL::evtIdFromStdHep(id);
506  double en =(part->momentum()).e()/1000.;
507  double px=(part->momentum()).px()/1000.;
508  double py=(part->momentum()).py()/1000.;
509  double pz=(part->momentum()).pz()/1000.;
510  EvtVector4R evtP(en,px,py,pz);
511  EvtParticle* evtPart = EvtParticleFactory::particleFactory(evtId,evtP);
512 
513  // set transverse polarization to vector mesons (relevant for coherent production of J/Psi etc in UPC)
514  if(m_setVMtransversePol && (id==113 || id== 443 || id==100443 || id==553 || id==100553 || id==200553) )evtPart->setVectorSpinDensity();
515 
516  m_myEvtGen->generateDecay(evtPart);
517  if (msgLvl(MSG::VERBOSE)) evtPart->printTree();
518  double ct_s = part->production_vertex()->position().t();
519  double x_s = part->production_vertex()->position().x();
520  double y_s = part->production_vertex()->position().y();
521  double z_s = part->production_vertex()->position().z();
522 
523  EvtVector4R treeStart(ct_s,x_s,y_s,z_s);
524  // Add new decay tree to hepMC, converting back from GeV to MeV.
525  addEvtGenDecayTree(hepMC, part, evtPart, treeStart, 1000.);
526  if(evtPart->getNDaug() !=0) part->set_status(2);
527  evtPart->deleteTree();
528 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ event_const()

const HepMC::GenEvent* GenBase::event_const ( ) const
inlineinherited

Access the current signal event (const)

Definition at line 83 of file GenBase.h.

83  {
84  if (events_const()->empty())
85  ATH_MSG_ERROR("Const McEventCollection is empty during first event access");
86  return *(events_const()->begin());
87  }

◆ events_const() [1/2]

const McEventCollection* GenBase::events_const ( ) const
inlineinherited

Access the current event's McEventCollection (const)

Definition at line 96 of file GenBase.h.

96  {
97  return events_const( getContext() );
98  }

◆ events_const() [2/2]

const McEventCollection* GenBase::events_const ( const EventContext &  ctx) const
inlineinherited

Definition at line 99 of file GenBase.h.

99  {
101  if (!ret.isValid())
102  ATH_MSG_ERROR("No McEventCollection found in StoreGate with key " << m_mcevents_const.key());
103  return ret.cptr();
104  }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode EvtInclusiveDecay::execute ( )
virtual

Reimplemented from GenBase.

Definition at line 220 of file EvtInclusiveDecay.cxx.

220  {
221  ATH_MSG_DEBUG("EvtInclusiveDecay executing");
222 
223  const EventContext& ctx = Gaudi::Hive::currentContext();
225 
226  std::string key = m_inputKeyName;
227  // retrieve event from Transient Store (Storegate)
228 
229  // Load HepMC info
230  // FIXME should be using Read/WriteHandles here
231  const McEventCollection* oldmcEvtColl{};
232  if(m_readExisting) {
233  CHECK(evtStore()->retrieve(oldmcEvtColl, key));
234  // Fill the new McEventCollection with a copy of the initial HepMC::GenEvent
235  m_mcEvtColl = new McEventCollection(*oldmcEvtColl);
236  }
237  else {CHECK(evtStore()->retrieve(m_mcEvtColl, key));}
238 
239  if(m_readExisting) {
240  if(m_outputKeyName!=key) {
242  }
243  }
244 
246  for( mcItr = m_mcEvtColl->begin(); mcItr != m_mcEvtColl->end(); ++mcItr ) {
247  HepMC::GenEvent* hepMC = *mcItr;
248 
249  // Search HepMC record for particles to be decayed by EvtGen
250  // NOTE: In order to ensure repeatability, we use a std::set of barcodes to obtain
251  // an ordered list of particles to be decayed by EvtGen.
252  std::set<HepMC::GenVertexPtr> visited;
253 #ifdef HEPMC3
254  std::set<HepMC::GenParticlePtr> toBeDecayed;
255  for (auto p: hepMC->particles()) {
256  if ( (!p->production_vertex()) ||
257  (p->production_vertex()->particles_in().size() == 0) ) {
258  StatusCode sc = traverseDecayTree(p,false,visited,toBeDecayed);
259  if (sc.isFailure())
260  return StatusCode::FAILURE;
261  }
262  }
263  // Print HepMC in tree format if desired (before doing anything)
265  msg(MSG::INFO) << "Printing HepMC record at " << hepMC << " BEFORE running EvtGen:" << endmsg;
267  printHepMC(hepMC,&toBeDecayed);
268  else
269  printHepMC(hepMC);
270  }
271 #else
272  std::set<int> toBeDecayed;
273  for (HepMC::GenEvent::particle_iterator itp = hepMC->particles_begin(); itp != hepMC->particles_end(); ++itp) {
275  if ( (!p->production_vertex()) ||
276  (p->production_vertex()->particles_in_size() == 0) ) {
277  StatusCode sc = traverseDecayTree(p,false,visited,toBeDecayed);
278  if (sc.isFailure())
279  return StatusCode::FAILURE;
280  }
281  }
282  // Print HepMC in tree format if desired (before doing anything)
284  msg(MSG::INFO) << "Printing HepMC record at " << hepMC << " BEFORE running EvtGen:" << endmsg;
286  printHepMC(hepMC,&toBeDecayed);
287  else
288  printHepMC(hepMC);
289  }
290 #endif
291 
292  // Decay selected particles
293  bool eventPassesCuts(false);
294  int loopCounter(0);
295  while( !eventPassesCuts && loopCounter < m_maxNRepeatedDecays ) {
296 #ifdef HEPMC3
297  for (auto p: toBeDecayed) {
298  if (p==0) {
299  msg(MSG::ERROR ) << "Overlapping decay tree for particle" << p <<endmsg;
300  return StatusCode::FAILURE;
301  }
302  decayParticle(hepMC,p);
304  }
305 #else
306  for (std::set<int>::iterator itb = toBeDecayed.begin(); itb!=toBeDecayed.end(); ++itb) {
307  auto p = hepMC->barcode_to_particle(*itb);
308  if (p==0) {
309  msg(MSG::ERROR ) << "Overlapping decay tree encountered for barcode " << *itb << endmsg;
310  return StatusCode::FAILURE;
311  }
312  decayParticle(hepMC,p);
314  }
315 #endif
316 
318  eventPassesCuts = passesUserSelection(hepMC);
319  else
320  eventPassesCuts = true;
321 
323  loopCounter++;
324  }
325 
326  // Store the number of decay attempts in event weights std::map, only if repeated decays enabled
327 #ifdef HEPMC3
328  if(m_maxNRepeatedDecays > 1)
329  hepMC->weight("nEvtGenDecayAttempts") = loopCounter;
330 #else
331  if(m_maxNRepeatedDecays > 1)
332  hepMC->weights()["nEvtGenDecayAttempts"] = loopCounter;
333 #endif
334  // Print HepMC in tree format if desired (after finishing all EvtGen decays)
336  msg(MSG::INFO) << "Printing HepMC record at " << hepMC << " AFTER running EvtGen:" << endmsg;
338  printHepMC(hepMC,&toBeDecayed);
339  else
340  printHepMC(hepMC);
341  }
342  }
343 
345  CHECK(evtStore()->overwrite(m_mcEvtColl, m_outputKeyName));
346  }
347 
348  return StatusCode::SUCCESS;
349 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode EvtInclusiveDecay::finalize ( )

Definition at line 352 of file EvtInclusiveDecay.cxx.

352  {
353 
354  if (m_checkDecayChannels) {
355  ATH_MSG_INFO("The following particles were checked and didn't have any decay channels:");
356  if (msgLvl(MSG::INFO)) {
357  std::cout << std::endl;
358  std::cout << " Particle code Name from HepPDT # Occurences" << std::endl;
359  std::cout << "------------------------------------------------------" << std::endl;
361  int id = p->first;
362  int count = p->second;
363  std::cout << std::setw(14) << id
364  << std::setw(20) << HepPID::particleName(id)
365  << std::setw(20) << count
366  << std::endl;
367  }
368  std::cout << std::endl;
369  }
370  }
371  ATH_MSG_INFO("Total number of repeated decays: " << m_nRepeatedDecays);
372  ATH_MSG_INFO("EvtInclusiveDecay finalized");
373  return StatusCode::SUCCESS;
374 }

◆ getRandomEngine()

CLHEP::HepRandomEngine * EvtInclusiveDecay::getRandomEngine ( const std::string &  streamName,
unsigned long int  randomSeedOffset,
const EventContext &  ctx 
) const
private

Definition at line 194 of file EvtInclusiveDecay.cxx.

196 {
197  ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this, streamName);
198  rngWrapper->setSeed( streamName, ctx.slot(), randomSeedOffset, ctx.eventID().run_number() );
199  return rngWrapper->getEngine(ctx);
200 }

◆ getRandomEngineDuringInitialize()

CLHEP::HepRandomEngine * EvtInclusiveDecay::getRandomEngineDuringInitialize ( const std::string &  streamName,
unsigned long int  randomSeedOffset,
unsigned int  conditionsRun = 1,
unsigned int  lbn = 1 
) const
private

Definition at line 203 of file EvtInclusiveDecay.cxx.

204 {
205  const size_t slot=0;
206  EventContext ctx;
207  ctx.setSlot( slot );
208  ctx.setEventID (EventIDBase (conditionsRun,
209  EventIDBase::UNDEFEVT, // event
210  EventIDBase::UNDEFNUM, // timestamp
211  EventIDBase::UNDEFNUM, // timestamp ns
212  lbn));
214  Atlas::ExtendedEventContext( evtStore()->hiveProxyDict(),
215  conditionsRun) );
216  return getRandomEngine(streamName, randomSeedOffset, ctx);
217 }

◆ GeVToMeV()

void GenBase::GeVToMeV ( HepMC::GenEvent *  evt)
protectedinherited

Scale event energies/momenta by x 1000.

Todo:
Add HepMC units awareness and do it differently when HepMC provides this functionality directly (and reference-based FourVector accessors)

Definition at line 61 of file GenBase.cxx.

61  {
62  for (HepMC::GenEvent::particle_iterator p = evt->particles_begin(); p != evt->particles_end(); ++p) {
63  const HepMC::FourVector fv((*p)->momentum().px() * 1000,
64  (*p)->momentum().py() * 1000,
65  (*p)->momentum().pz() * 1000,
66  (*p)->momentum().e() * 1000);
67  (*p)->set_momentum(fv);
68  (*p)->set_generated_mass(1000 * (*p)->generated_mass());
69  }
70 }

◆ initialize()

StatusCode EvtInclusiveDecay::initialize ( )
virtual

Reimplemented from GenBase.

Definition at line 119 of file EvtInclusiveDecay.cxx.

119  {
120 
122  // Get the random number service
123  CHECK(m_rndmSvc.retrieve());
124 
125  msg(MSG::INFO) << "EvtInclusiveDecay initialize" << endmsg;
126  msg(MSG::INFO) << "Particle properties definition file = " << m_pdtFile << endmsg;
127  msg(MSG::INFO) << "Main decay file = " << m_decayFile << endmsg;
128  msg(MSG::INFO) << "User decay file = " << m_userDecayFile << endmsg;
129  msg(MSG::INFO) << "Max number of repeated decays = " << m_maxNRepeatedDecays << endmsg;
130  msg(MSG::INFO) << "EvtInclusiveDecay selection parameters:" << endmsg;
131  msg(MSG::INFO) << "* prohibitFinalStateDecay = " << m_prohibitFinalStateDecay << endmsg;
132  msg(MSG::INFO) << "* prohibitReDecay = " << m_prohibitReDecay << endmsg;
133  msg(MSG::INFO) << "* prohibitUnDecay = " << m_prohibitUnDecay << endmsg;
134  msg(MSG::INFO) << "* prohibitRemoveSelfDecay = " << m_prohibitRemoveSelfDecay << endmsg;
135  msg(MSG::INFO) << "* allowAllKnownDecays = " << m_allowAllKnownDecays << endmsg;
136  msg(MSG::INFO) << "* allowDefaultBDecays = " << m_allowDefaultBDecays << endmsg;
137  msg(MSG::INFO) << "User selection parameters:" << endmsg;
138  msg(MSG::INFO) << "* applyUserSelection = " << m_applyUserSelection << endmsg;
139  msg(MSG::INFO) << "* userSelRequireOppositeSignedMu = " << m_userSelRequireOppositeSignedMu << endmsg;
140  msg(MSG::INFO) << "* userSelMu1MinPt = " << m_userSelMu1MinPt << endmsg;
141  msg(MSG::INFO) << "* userSelMu2MinPt = " << m_userSelMu2MinPt << endmsg;
142  msg(MSG::INFO) << "* userSelMu1MaxEta = " << m_userSelMu1MaxEta << endmsg;
143  msg(MSG::INFO) << "* userSelMu2MaxEta = " << m_userSelMu2MaxEta << endmsg;
144  msg(MSG::INFO) << "* userSelMinDimuMass = " << m_userSelMinDimuMass << endmsg;
145  msg(MSG::INFO) << "* userSelMaxDimuMass = " << m_userSelMaxDimuMass << endmsg;
146 
147  // Initialize and print blackList
148  m_blackListSet.insert(m_blackList.begin(),m_blackList.end());
149  msg(MSG::INFO) << "* blackList; = ";
150  for (std::set<int>::iterator i = m_blackListSet.begin(); i!=m_blackListSet.end(); ++i)
151  msg(MSG::INFO) << (*i) << " ";
152  msg(MSG::INFO)<< endmsg;
153 
154  // Initialize and print whiteList
155  m_whiteListSet.insert(m_whiteList.begin(),m_whiteList.end());
156  msg(MSG::INFO) << "* whiteList = ";
157  for (std::set<int>::iterator i = m_whiteListSet.begin(); i!=m_whiteListSet.end(); ++i)
158  msg(MSG::INFO) << (*i) << " ";
159  msg(MSG::INFO) << endmsg;
160 
161  CLHEP::HepRandomEngine* rndmEngine = getRandomEngineDuringInitialize(m_randomStreamName, m_randomSeed, m_dsid);
162  // Obtain random number generator for EvtGen
163  m_evtAtRndmGen = new EvtInclusiveAtRndmGen(rndmEngine);
164 
165  // Create an instance of EvtGen and read particle properties and decay files
166  EvtExternalGenList genList(true,xmlpath(),"gamma");
167  EvtAbsRadCorr* radCorrEngine = genList.getPhotosModel();
168  std::list<EvtDecayBase*> extraModels = genList.getListOfModels();
169 
170  // Create the EvtGen generator object
171  // EvtGen myGenerator("decayFile.dec", "evt.pdl", randomEnginePointer,
172  // radCorrEngine, &extraModels);
173 
174 
175  m_myEvtGen = new EvtGen( m_decayFile.c_str(), m_pdtFile.c_str(), m_evtAtRndmGen, radCorrEngine, &extraModels);
176  if(!m_userDecayFile.empty())
177  m_myEvtGen->readUDecay(m_userDecayFile.c_str());
178 
179  m_nRepeatedDecays = 0;
180 
181  return StatusCode::SUCCESS;
182 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ invMass()

double EvtInclusiveDecay::invMass ( HepMC::ConstGenParticlePtr  p1,
HepMC::ConstGenParticlePtr  p2 
)
private

Definition at line 699 of file EvtInclusiveDecay.cxx.

699  {
700  double p1Px = p1->momentum().px();
701  double p1Py = p1->momentum().py();
702  double p1Pz = p1->momentum().pz();
703  double p1E = p1->momentum().e();
704  double p2Px = p2->momentum().px();
705  double p2Py = p2->momentum().py();
706  double p2Pz = p2->momentum().pz();
707  double p2E = p2->momentum().e();
708  double dimuE = p2E + p1E;
709  double dimuPx = p2Px + p1Px;
710  double dimuPy = p2Py + p1Py;
711  double dimuPz = p2Pz + p1Pz;
712  double invMass = std::sqrt(dimuE*dimuE - dimuPx*dimuPx - dimuPy*dimuPy - dimuPz*dimuPz);
713 
714  return invMass;
715 }

◆ isDefaultB()

bool EvtInclusiveDecay::isDefaultB ( const int  pId) const
private

Definition at line 647 of file EvtInclusiveDecay.cxx.

647  {
648  int id = std::abs(pId);
649  if ( id == 511 ||
650  id == 521 ||
651  id == 531 ||
652  id == 541 ||
653  id == 5122 ||
654  id == 5132 ||
655  id == 5232 ||
656  id == 5112 ||
657  id == 5212 ||
658  id == 5222 )
659  return true;
660  else
661  return false;
662 }

◆ isToBeDecayed()

bool EvtInclusiveDecay::isToBeDecayed ( HepMC::ConstGenParticlePtr  p,
bool  doCrossChecks 
)
private

Definition at line 570 of file EvtInclusiveDecay.cxx.

570  {
571  int id = p->pdg_id();
572  int nDaughters = 0;
573  auto v = p->end_vertex();
574  if (v) nDaughters = v->particles_out_size();
575 
576  // Ignore documentation lines
577  if (p->status() == 3) return false;
578  // And any particles that aren't stable or decayed
579  if(!m_isfHerwig && !MC::isPhysical(p)) return false;
580 
581  // Particularly for Herwig, try to ignore particles that really should
582  // be flagged as documentation lines
583  double m2 = p->momentum().m2();
584  if (m2 < -1.0E-3) {
585  ATH_MSG_DEBUG("Ignoring particle " << pdgName(p) << " with m^2 = " << m2);
586  return false;
587  }
588 
589  // Check whether EvtGen has any decay channels defined for this particle
590  EvtId evtId = EvtPDL::evtIdFromStdHep(id);
591  // std::cout << "EVTID: " << evtId.getId() << " alias " << evtId.getAlias() << std::endl;
592  int nModes = 0;
593  if (evtId.getId()>=0)
594  // nModes = EvtDecayTable::getNMode(evtId.getAlias());
595  nModes = EvtDecayTable::getInstance()->getNMode(evtId.getAlias());
596  if (doCrossChecks) {
597  ATH_MSG_VERBOSE("Checking particle " << pdgName(p)
598  << " (status = " << p->status()
599  <<") -- " << nModes << " decay modes found");
600  if (m_checkDecayChannels && nModes==0) {
602  if (pos != m_noDecayChannels.end())
603  (pos->second)++;
604  else
605  m_noDecayChannels[id] = 1;
606  }
607  }
608 
609  // Check prohibit* settings
610  if (m_prohibitFinalStateDecay && MC::isStable(p)) return false;
611  if (m_prohibitReDecay && nDaughters>0) return false;
612  if (m_prohibitUnDecay && nModes==0) return false;
613  if (m_prohibitRemoveSelfDecay && nDaughters>0) {
614  // For now, check only children - this should be sufficient and checking all
615  // descendants would be very expensive.
616 #ifdef HEPMC3
617  for (auto itd: v->particles_out()) {
618  if (std::abs(itd->pdg_id()) == std::abs(id)) return false;
619  }
620 #else
621  for (HepMC::GenVertex::particle_iterator itd = v->particles_begin(HepMC::children);
622  itd != v->particles_end(HepMC::children);
623  ++itd) {
624  if (std::abs((*itd)->pdg_id()) == std::abs(id)) return false;
625  }
626 #endif
627  }
628 
629  // Check blackList
630  if (m_blackListSet.count(std::abs(id))>0) return false;
631 
632  // Check allow* settings
633  if (m_allowAllKnownDecays && nModes>0) return true;
634  if (m_allowDefaultBDecays && isDefaultB(id)) return true;
635 
636  // Check whiteList
637  if (m_whiteListSet.count(std::abs(id))>0) return true;
638 
639  return false; // Default is NOT to decay through EvtGen
640 }

◆ MeVToGeV()

void GenBase::MeVToGeV ( HepMC::GenEvent *  evt)
protectedinherited

Scale event energies/momenta by x 1/1000.

Definition at line 71 of file GenBase.cxx.

71  {
72  for (HepMC::GenEvent::particle_iterator p = evt->particles_begin(); p != evt->particles_end(); ++p) {
73  const HepMC::FourVector fv((*p)->momentum().px() / 1000,
74  (*p)->momentum().py() / 1000,
75  (*p)->momentum().pz() / 1000,
76  (*p)->momentum().e() / 1000);
77  (*p)->set_momentum(fv);
78  (*p)->set_generated_mass((*p)->generated_mass() / 1000);
79  }
80 }

◆ mmTocm()

void GenBase::mmTocm ( HepMC::GenEvent *  evt)
protectedinherited

Scale event lengths by x 1/10.

Definition at line 90 of file GenBase.cxx.

90  {
91  for (HepMC::GenEvent::vertex_iterator vtx = evt->vertices_begin(); vtx != evt->vertices_end(); ++vtx) {
92  const HepMC::FourVector fv((*vtx)->position().x() / 10,
93  (*vtx)->position().y() / 10,
94  (*vtx)->position().z() / 10,
95  (*vtx)->position().t() / 10);
96  (*vtx)->set_position(fv);
97  }
98 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ particleData()

const HepPDT::ParticleData* GenBase::particleData ( int  pid) const
inlineinherited

Access an element in the particle data table.

Definition at line 126 of file GenBase.h.

126  {
127  return pdt().particle(HepPDT::ParticleID(std::abs(pid)));
128  }

◆ particleTable()

const HepPDT::ParticleDataTable& GenBase::particleTable ( ) const
inlineinherited

Get a particle data table.

Definition at line 118 of file GenBase.h.

118  {
119  return *(m_ppSvc->PDT());
120  }

◆ partPropSvc()

const ServiceHandle<IPartPropSvc> GenBase::partPropSvc ( ) const
inlineinherited

Access the particle property service.

Definition at line 113 of file GenBase.h.

113  {
114  return m_ppSvc;
115  }

◆ passesUserSelection()

bool EvtInclusiveDecay::passesUserSelection ( HepMC::GenEvent *  hepMC)
private

Definition at line 669 of file EvtInclusiveDecay.cxx.

669  {
670  bool passed(false);
671  std::vector<HepMC::GenParticlePtr> *muons = new std::vector<HepMC::GenParticlePtr>;
672 
673  for ( const auto& p: *hepMC) {
674  if( std::abs(p->pdg_id()) == 13 )
675  muons->push_back(p);
676  }
677 
678  for (auto muItr1 = muons->begin(); muItr1 != muons->end(); ++muItr1) {
679  for (auto muItr2 = muItr1+1; muItr2 != muons->end(); ++muItr2) {
680  if( m_userSelRequireOppositeSignedMu && (*muItr1)->pdg_id() * (*muItr2)->pdg_id() > 0)
681  continue;
682  if( !( (*muItr1)->momentum().perp() > m_userSelMu1MinPt && std::abs((*muItr1)->momentum().pseudoRapidity()) < m_userSelMu1MaxEta &&
683  (*muItr2)->momentum().perp() > m_userSelMu2MinPt && std::abs((*muItr2)->momentum().pseudoRapidity()) < m_userSelMu2MaxEta ) &&
684  !( (*muItr2)->momentum().perp() > m_userSelMu1MinPt && std::abs((*muItr2)->momentum().pseudoRapidity()) < m_userSelMu1MaxEta &&
685  (*muItr1)->momentum().perp() > m_userSelMu2MinPt && std::abs((*muItr1)->momentum().pseudoRapidity()) < m_userSelMu2MaxEta ) )
686  continue;
687  double dimuMass = invMass((*muItr1),(*muItr2));
688  if( !( dimuMass > m_userSelMinDimuMass && (dimuMass < m_userSelMaxDimuMass || m_userSelMaxDimuMass < 0.) ) )
689  continue;
690  passed = true;
691  }
692  }
693 
694  delete muons;
695 
696  return passed;
697 }

◆ pdgName()

std::string EvtInclusiveDecay::pdgName ( HepMC::ConstGenParticlePtr  p,
bool  statusHighlighting = false,
std::set< int > *  barcodeList = nullptr 
)
private

Definition at line 872 of file EvtInclusiveDecay.cxx.

872  {
873  std::ostringstream buf;
874  if (statusHighlighting) {
875  if ( ((barcodeList!=0) && (barcodeList->find(HepMC::barcode(p)) != barcodeList->end())) ||
876  ((barcodeList==0) && isToBeDecayed(p,false)) )
877  buf << "\033[7m"; // reverse
878  if (!MC::isStable(p)) {
879  if (MC::isDecayed(p))
880  buf << "\033[33m"; // yellow
881  else
882  buf << "\033[31m"; // red
883  }
884  }
885  buf << p->pdg_id();
886  buf << "/" << HepPID::particleName(p->pdg_id());
887  if (statusHighlighting) {
888  buf << "\033[0m"; // revert color attributes
889  }
890  return buf.str();
891 }

◆ pdt()

const HepPDT::ParticleDataTable& GenBase::pdt ( ) const
inlineinherited

Shorter alias to get a particle data table.

Definition at line 123 of file GenBase.h.

123 { return particleTable(); }

◆ printHepMC()

void EvtInclusiveDecay::printHepMC ( HepMC::GenEvent *  hepMC,
std::set< int > *  barcodeList = nullptr 
)
private

Definition at line 741 of file EvtInclusiveDecay.cxx.

741  {
742  std::set<HepMC::GenVertexPtr> visited;
743  unsigned int nParticlesFound = 0;
744  unsigned int nTreesFound = 0;
745  for (HepMC::GenEvent::particle_iterator itp = hepMC->particles_begin(); itp != hepMC->particles_end(); ++itp) {
747  if ( (!p->production_vertex()) ||
748  (p->production_vertex()->particles_in_size() == 0) ) {
749  nTreesFound++;
750  std::cout << "\n Found new partial decay tree:\n" << std::endl;
751  unsigned int nParticlesVisited = printTree(p,visited,1,barcodeList);
752  std::cout << "\n " << nParticlesVisited << " particles in this subtree" << std::endl;
753  nParticlesFound += nParticlesVisited;
754  }
755  }
756  std::cout << "\n Total of " << nParticlesFound << " particles found in "
757  << nTreesFound << " decay subtrees in HepMC event record\n" << std::endl;
758 }

◆ printTree()

unsigned int EvtInclusiveDecay::printTree ( HepMC::GenParticlePtr  p,
std::set< HepMC::GenVertexPtr > &  visited,
int  level,
std::set< int > *  barcodeList = 0 
)
private

Definition at line 791 of file EvtInclusiveDecay.cxx.

792  {
793  unsigned int nParticlesVisited = 1;
794  for (int i=0; i<level; i++) std::cout << " ";
795  std::cout << pdgName(p,m_printHepMCHighlighted,barcodeList);
796  auto v = p->end_vertex();
797 #ifdef HEPMC3
798  if (v) {
799  if (v->particles_in().size() > 1)
800  std::cout << " [interaction: " << v->particles_in().size() << " particles, vertex " << v << "] --> ";
801  else
802  std::cout << " --> ";
803  if (visited.insert(v).second) {
804  for (auto itp: v->particles_out()) {
805  std::cout << pdgName(itp,m_printHepMCHighlighted,barcodeList) << " ";
806  }
807  std::cout << std::endl;
808  for (auto itp: v->particles_out()) {
809  if (itp->end_vertex())
810  nParticlesVisited += printTree(itp, visited, level+1, barcodeList);
811  else
812  nParticlesVisited++;
813  }
814  } else
815  std:: cout << "see above" << std::endl;
816  } else
817  std::cout << " no decay vertex\n" << std::endl;
818 #else
819  if (v) {
820  if (v->particles_in_size() > 1)
821  std::cout << " [interaction: " << v->particles_in_size() << " particles, vertex " << v << "] --> ";
822  else
823  std::cout << " --> ";
824  if (visited.insert(v).second) {
825  for (HepMC::GenVertex::particle_iterator itp = v->particles_begin(HepMC::children);
826  itp != v->particles_end(HepMC::children);
827  ++itp) {
828  std::cout << pdgName(*itp,m_printHepMCHighlighted,barcodeList) << " ";
829  }
830  std::cout << std::endl;
831  for (HepMC::GenVertex::particle_iterator itp = v->particles_begin(HepMC::children);
832  itp != v->particles_end(HepMC::children);
833  ++itp) {
834  if ((*itp)->end_vertex())
835  nParticlesVisited += printTree(*itp, visited, level+1, barcodeList);
836  else
837  nParticlesVisited++;
838  }
839  } else
840  std:: cout << "see above" << std::endl;
841  } else
842  std::cout << " no decay vertex\n" << std::endl;
843 #endif
844  return nParticlesVisited;
845 }

◆ removeDecayTree()

void EvtInclusiveDecay::removeDecayTree ( HepMC::GenEvent *  hepMC,
HepMC::GenParticlePtr  p 
)
private

Definition at line 449 of file EvtInclusiveDecay.cxx.

449  {
450  auto v = p->end_vertex();
451  if (v) {
452 #ifdef HEPMC3
453  //This is recursive in HepMC3. But explicit deletion is allowed as well.
454  hepMC->remove_vertex(v);
455  p->set_status(1); // For now, flag particle as undecayed (stable)
456  ATH_MSG_DEBUG("Removed existing " << pdgName(p) << " " << p );
457 #else
458  std::set<int> vtxBarCodesToDelete;
459  vtxBarCodesToDelete.insert(v->barcode());
460  for (HepMC::GenVertex::vertex_iterator itv = v->vertices_begin(HepMC::descendants);
461  itv != v->vertices_end(HepMC::descendants);
462  ++itv)
463  vtxBarCodesToDelete.insert((*itv)->barcode());
464  for (std::set<int>::iterator itb = vtxBarCodesToDelete.begin(); itb != vtxBarCodesToDelete.end(); ++itb) {
465  auto vdel = hepMC->barcode_to_vertex(*itb);
466  hepMC->remove_vertex(vdel);
467  delete vdel;
468  }
469  p->set_status(1); // For now, flag particle as undecayed (stable)
470  ATH_MSG_DEBUG("Removed existing " << pdgName(p) << " (barcode " << p->barcode() << ")"
471  << " decay tree with " << vtxBarCodesToDelete.size() << " vertices");
472 #endif
473  }
474 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ reseedRandomEngine()

void EvtInclusiveDecay::reseedRandomEngine ( const std::string &  streamName,
const EventContext &  ctx 
)
private

Definition at line 185 of file EvtInclusiveDecay.cxx.

187 {
188  long seeds[7];
189  ATHRNG::calculateSeedsMC21(seeds, streamName, ctx.eventID().event_number(), m_dsid, m_randomSeed);
190  m_evtAtRndmGen->getEngine()->setSeeds(seeds, 0); // NOT THREAD-SAFE
191 }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ traverseDecayTree()

StatusCode EvtInclusiveDecay::traverseDecayTree ( HepMC::GenParticlePtr  p,
bool  isToBeRemoved,
std::set< HepMC::GenVertexPtr > &  visited,
std::set< int > &  toBeDecayed 
)
private

Definition at line 391 of file EvtInclusiveDecay.cxx.

394  {
395 #endif
396  ATH_MSG_VERBOSE("Inspecting: " << pdgName(p) << " " << p);
397  if (!isToBeRemoved) {
398  if (isToBeDecayed(p,true)) {
399 #ifdef HEPMC3
400  toBeDecayed.insert(p);
401 #else
402  toBeDecayed.insert(HepMC::barcode(p));
403 #endif
404  isToBeRemoved = true;
405  ATH_MSG_VERBOSE("Selected particle for decay: " << pdgName(p) << " " << p );
406 
407  // In principle we could stop the recursion here. However, to prevent
408  // pathological cases in certain decay trees (in particular from Herwig),
409  // we continue in order to mark all descendants of this particle
410  // as visited. Thus none of these descendants can be flagged for further
411  // decay, even if it has several mothers.
412  }
413  }
414  auto v = p->end_vertex();
415 #ifdef HEPMC3
416  if (v) {
417  if (visited.insert(v).second) {
418  if ( isToBeRemoved && (v->particles_in().size()>1) && m_checkDecayTree ) {
419  ATH_MSG_WARNING("Found particle to be decayed with vertex with >1 incoming mother particles in decay tree");
420  ATH_MSG_WARNING( ([&p, &v](){ std::stringstream ss; HepMC::Print::line(ss,p); HepMC::Print::line(ss,v); return ss.str();})());
421  }
422  for (auto itp: v->particles_out()) {
423  ATH_CHECK(traverseDecayTree(itp,isToBeRemoved,visited,toBeDecayed) );
424  }
425  }
426  }
427 #else
428  if (v) {
429  if (visited.insert(v).second) {
430  if ( isToBeRemoved && (v->particles_in_size()>1) && m_checkDecayTree ) {
431  // This is normal for Herwig but should not occur for Pythia
432  ATH_MSG_WARNING("Found particle to be decayed with vertex with >1 incoming mother particles in decay tree");
433  ATH_MSG_WARNING( ([&p, &v](){ std::stringstream ss; HepMC::Print::line(ss,p); HepMC::Print::line(ss,v); return ss.str();})());
434  }
435  for (auto itp = v->particles_begin(HepMC::children); itp != v->particles_end(HepMC::children); ++itp) {
436  ATH_CHECK(traverseDecayTree(*itp,isToBeRemoved,visited,toBeDecayed) );
437  }
438  }
439  }
440 #endif
441  return StatusCode::SUCCESS;
442 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

◆ xmlpath()

std::string EvtInclusiveDecay::xmlpath ( void  )

Definition at line 920 of file EvtInclusiveDecay.cxx.

920  {
921 
922  char *cmtpath = getenv("CMTPATH");
923  char *cmtconfig = getenv("CMTCONFIG");
924 
925  std::string foundpath = "";
926 
927  if(cmtpath != 0 && cmtconfig != 0){
928 
929  std::vector<std::string> cmtpaths;
930  local_split(cmtpaths, cmtpath,':');
931 
932  std::string installPath = "/InstallArea/" + std::string(cmtconfig) + "/share/Pythia8/xmldoc";
933 
934  for(std::vector<std::string>::const_iterator path = cmtpaths.begin();
935  path != cmtpaths.end() && foundpath == ""; ++path){
936  std::string testPath = *path + installPath;
937  std::ifstream testFile(testPath.c_str());
938  if(testFile.good()) foundpath = testPath;
939  testFile.close();
940  }
941  }
942  else {
943 // If the CMT environment is missing, try to find the xmldoc directory
944 // using PathResolver:
945  foundpath = PathResolverFindCalibDirectory( "Pythia8/xmldoc" );
946 
947  }
948 
949 
950  return foundpath;
951 }

Member Data Documentation

◆ m_allowAllKnownDecays

bool EvtInclusiveDecay::m_allowAllKnownDecays
private

Definition at line 143 of file EvtInclusiveDecay.h.

◆ m_allowDefaultBDecays

bool EvtInclusiveDecay::m_allowDefaultBDecays
private

Definition at line 144 of file EvtInclusiveDecay.h.

◆ m_applyUserSelection

bool EvtInclusiveDecay::m_applyUserSelection
private

Definition at line 161 of file EvtInclusiveDecay.h.

◆ m_blackList

std::vector<int> EvtInclusiveDecay::m_blackList
private

Definition at line 140 of file EvtInclusiveDecay.h.

◆ m_blackListSet

std::set<int> EvtInclusiveDecay::m_blackListSet
private

Definition at line 141 of file EvtInclusiveDecay.h.

◆ m_checkDecayChannels

bool EvtInclusiveDecay::m_checkDecayChannels
private

Definition at line 154 of file EvtInclusiveDecay.h.

◆ m_checkDecayTree

bool EvtInclusiveDecay::m_checkDecayTree
private

Definition at line 153 of file EvtInclusiveDecay.h.

◆ m_decayFile

std::string EvtInclusiveDecay::m_decayFile
private

Definition at line 129 of file EvtInclusiveDecay.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dsid

IntegerProperty EvtInclusiveDecay::m_dsid {this, "Dsid", 999999}
private

Definition at line 116 of file EvtInclusiveDecay.h.

◆ m_evtAtRndmGen

EvtInclusiveAtRndmGen* EvtInclusiveDecay::m_evtAtRndmGen {}
private

Definition at line 124 of file EvtInclusiveDecay.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_inputKeyName

std::string EvtInclusiveDecay::m_inputKeyName
private

Definition at line 132 of file EvtInclusiveDecay.h.

◆ m_isfHerwig

bool EvtInclusiveDecay::m_isfHerwig
private

Definition at line 169 of file EvtInclusiveDecay.h.

◆ m_maxNRepeatedDecays

int EvtInclusiveDecay::m_maxNRepeatedDecays
private

Definition at line 159 of file EvtInclusiveDecay.h.

◆ m_mcEventKey

std::string GenBase::m_mcEventKey {}
protectedinherited

StoreGate key for the MC event collection (defaults to GEN_EVENT)

Definition at line 137 of file GenBase.h.

◆ m_mcevents_const

SG::ReadHandleKey<McEventCollection> GenBase::m_mcevents_const { this, "McEventKey", "GEN_EVENT", "StoreGate key of the MC event collection" }
privateinherited

Const handle to the MC event collection.

Definition at line 163 of file GenBase.h.

◆ m_mcEvtColl

McEventCollection* EvtInclusiveDecay::m_mcEvtColl {}
private

Definition at line 121 of file EvtInclusiveDecay.h.

◆ m_mkMcEvent

BooleanProperty GenBase::m_mkMcEvent {this, "MakeMcEvent", false, "Create a new MC event collection if it doesn't exist"}
protectedinherited

Flag to determine if a new MC event collection should be made if it doesn't exist.

Definition at line 139 of file GenBase.h.

◆ m_myEvtGen

EvtGen* EvtInclusiveDecay::m_myEvtGen {}
private

Definition at line 125 of file EvtInclusiveDecay.h.

◆ m_noDecayChannels

std::map<int,long> EvtInclusiveDecay::m_noDecayChannels
private

Definition at line 155 of file EvtInclusiveDecay.h.

◆ m_nRepeatedDecays

int EvtInclusiveDecay::m_nRepeatedDecays
private

Definition at line 157 of file EvtInclusiveDecay.h.

◆ m_outputKeyName

std::string EvtInclusiveDecay::m_outputKeyName
private

Definition at line 133 of file EvtInclusiveDecay.h.

◆ m_pdtFile

std::string EvtInclusiveDecay::m_pdtFile
private

Definition at line 128 of file EvtInclusiveDecay.h.

◆ m_ppSvc

ServiceHandle<IPartPropSvc> GenBase::m_ppSvc {this, "PartPropSvc", "PartPropSvc"}
privateinherited

Handle on the particle property service.

Definition at line 160 of file GenBase.h.

◆ m_printHepMCAfterEvtGen

bool EvtInclusiveDecay::m_printHepMCAfterEvtGen
private

Definition at line 149 of file EvtInclusiveDecay.h.

◆ m_printHepMCBeforeEvtGen

bool EvtInclusiveDecay::m_printHepMCBeforeEvtGen
private

Definition at line 148 of file EvtInclusiveDecay.h.

◆ m_printHepMCHighlighted

bool EvtInclusiveDecay::m_printHepMCHighlighted
private

Definition at line 150 of file EvtInclusiveDecay.h.

◆ m_printHepMCHighLightTopLevelDecays

bool EvtInclusiveDecay::m_printHepMCHighLightTopLevelDecays
private

Definition at line 151 of file EvtInclusiveDecay.h.

◆ m_prohibitFinalStateDecay

bool EvtInclusiveDecay::m_prohibitFinalStateDecay
private

Definition at line 136 of file EvtInclusiveDecay.h.

◆ m_prohibitReDecay

bool EvtInclusiveDecay::m_prohibitReDecay
private

Definition at line 137 of file EvtInclusiveDecay.h.

◆ m_prohibitRemoveSelfDecay

bool EvtInclusiveDecay::m_prohibitRemoveSelfDecay
private

Definition at line 139 of file EvtInclusiveDecay.h.

◆ m_prohibitUnDecay

bool EvtInclusiveDecay::m_prohibitUnDecay
private

Definition at line 138 of file EvtInclusiveDecay.h.

◆ m_randomSeed

IntegerProperty EvtInclusiveDecay::m_randomSeed {this, "RandomSeed", 1234567, "Random seed for the built-in random engine"}
private

Seed for random number engine.

Definition at line 119 of file EvtInclusiveDecay.h.

◆ m_randomStreamName

std::string EvtInclusiveDecay::m_randomStreamName
private

Definition at line 131 of file EvtInclusiveDecay.h.

◆ m_readExisting

bool EvtInclusiveDecay::m_readExisting
private

Definition at line 135 of file EvtInclusiveDecay.h.

◆ m_rndmSvc

ServiceHandle<IAthRNGSvc> EvtInclusiveDecay::m_rndmSvc {this, "RndmSvc", "AthRNGSvc"}
private

Definition at line 113 of file EvtInclusiveDecay.h.

◆ m_setVMtransversePol

bool EvtInclusiveDecay::m_setVMtransversePol
private

Definition at line 170 of file EvtInclusiveDecay.h.

◆ m_userDecayFile

std::string EvtInclusiveDecay::m_userDecayFile
private

Definition at line 130 of file EvtInclusiveDecay.h.

◆ m_userSelMaxDimuMass

double EvtInclusiveDecay::m_userSelMaxDimuMass
private

Definition at line 168 of file EvtInclusiveDecay.h.

◆ m_userSelMinDimuMass

double EvtInclusiveDecay::m_userSelMinDimuMass
private

Definition at line 167 of file EvtInclusiveDecay.h.

◆ m_userSelMu1MaxEta

double EvtInclusiveDecay::m_userSelMu1MaxEta
private

Definition at line 165 of file EvtInclusiveDecay.h.

◆ m_userSelMu1MinPt

double EvtInclusiveDecay::m_userSelMu1MinPt
private

Definition at line 163 of file EvtInclusiveDecay.h.

◆ m_userSelMu2MaxEta

double EvtInclusiveDecay::m_userSelMu2MaxEta
private

Definition at line 166 of file EvtInclusiveDecay.h.

◆ m_userSelMu2MinPt

double EvtInclusiveDecay::m_userSelMu2MinPt
private

Definition at line 164 of file EvtInclusiveDecay.h.

◆ m_userSelRequireOppositeSignedMu

bool EvtInclusiveDecay::m_userSelRequireOppositeSignedMu
private

Definition at line 162 of file EvtInclusiveDecay.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_whiteList

std::vector<int> EvtInclusiveDecay::m_whiteList
private

Definition at line 145 of file EvtInclusiveDecay.h.

◆ m_whiteListSet

std::set<int> EvtInclusiveDecay::m_whiteListSet
private

Definition at line 146 of file EvtInclusiveDecay.h.


The documentation for this class was generated from the following files:
HepMC::GenVertexPtr
HepMC::GenVertex * GenVertexPtr
Definition: GenVertex.h:59
EvtInclusiveDecay::m_checkDecayTree
bool m_checkDecayTree
Definition: EvtInclusiveDecay.h:153
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
EvtInclusiveDecay::isDefaultB
bool isDefaultB(const int pId) const
Definition: EvtInclusiveDecay.cxx:647
ATHRNG::RNGWrapper::setSeed
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition: RNGWrapper.h:169
EvtInclusiveDecay::m_randomStreamName
std::string m_randomStreamName
Definition: EvtInclusiveDecay.h:131
EvtInclusiveDecay::m_allowDefaultBDecays
bool m_allowDefaultBDecays
Definition: EvtInclusiveDecay.h:144
EvtInclusiveDecay::m_maxNRepeatedDecays
int m_maxNRepeatedDecays
Definition: EvtInclusiveDecay.h:159
TruthTest.itp
itp
Definition: TruthTest.py:46
EvtInclusiveDecay::m_whiteList
std::vector< int > m_whiteList
Definition: EvtInclusiveDecay.h:145
test_pyathena.px
px
Definition: test_pyathena.py:18
python.SystemOfUnits.m2
int m2
Definition: SystemOfUnits.py:92
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:126
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
EvtInclusiveDecay::m_allowAllKnownDecays
bool m_allowAllKnownDecays
Definition: EvtInclusiveDecay.h:143
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
EvtInclusiveDecay::m_blackList
std::vector< int > m_blackList
Definition: EvtInclusiveDecay.h:140
EvtInclusiveDecay::m_userSelMinDimuMass
double m_userSelMinDimuMass
Definition: EvtInclusiveDecay.h:167
EvtInclusiveDecay::m_noDecayChannels
std::map< int, long > m_noDecayChannels
Definition: EvtInclusiveDecay.h:155
GenBase::events_const
const McEventCollection * events_const() const
Access the current event's McEventCollection (const)
Definition: GenBase.h:96
SG::ReadHandle< McEventCollection >
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
EvtInclusiveDecay::m_blackListSet
std::set< int > m_blackListSet
Definition: EvtInclusiveDecay.h:141
EvtInclusiveDecay::reseedRandomEngine
void reseedRandomEngine(const std::string &streamName, const EventContext &ctx)
Definition: EvtInclusiveDecay.cxx:185
EvtInclusiveDecay::decayParticle
void decayParticle(HepMC::GenEvent *hepMC, HepMC::GenParticlePtr p)
Definition: EvtInclusiveDecay.cxx:493
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
EvtInclusiveDecay::passesUserSelection
bool passesUserSelection(HepMC::GenEvent *hepMC)
Definition: EvtInclusiveDecay.cxx:669
McEventCollection
McEventCollection
Definition: GeneratorObjectsTPCnv.cxx:60
EvtInclusiveDecay::m_applyUserSelection
bool m_applyUserSelection
Definition: EvtInclusiveDecay.h:161
skel.it
it
Definition: skel.GENtoEVGEN.py:423
EvtInclusiveDecay::getRandomEngineDuringInitialize
CLHEP::HepRandomEngine * getRandomEngineDuringInitialize(const std::string &streamName, unsigned long int randomSeedOffset, unsigned int conditionsRun=1, unsigned int lbn=1) const
Definition: EvtInclusiveDecay.cxx:203
EvtInclusiveDecay::m_userDecayFile
std::string m_userDecayFile
Definition: EvtInclusiveDecay.h:130
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
EvtInclusiveDecay::isToBeDecayed
bool isToBeDecayed(HepMC::ConstGenParticlePtr p, bool doCrossChecks)
Definition: EvtInclusiveDecay.cxx:570
EvtInclusiveDecay::m_printHepMCHighLightTopLevelDecays
bool m_printHepMCHighLightTopLevelDecays
Definition: EvtInclusiveDecay.h:151
EvtInclusiveDecay::m_userSelMu2MaxEta
double m_userSelMu2MaxEta
Definition: EvtInclusiveDecay.h:166
AthCommonMsg< Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
EvtInclusiveDecay::m_decayFile
std::string m_decayFile
Definition: EvtInclusiveDecay.h:129
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
EvtInclusiveDecay::m_evtAtRndmGen
EvtInclusiveAtRndmGen * m_evtAtRndmGen
Definition: EvtInclusiveDecay.h:124
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
HepMC::Print::line
void line(std::ostream &os, const GenEvent &e)
Definition: GenEvent.h:554
x
#define x
EvtInclusiveDecay::m_printHepMCHighlighted
bool m_printHepMCHighlighted
Definition: EvtInclusiveDecay.h:150
HepMC::fillBarcodesAttribute
void fillBarcodesAttribute(GenEvent *)
Definition: GenEvent.h:504
generateDQIndexFiles.installPath
installPath
Definition: generateDQIndexFiles.py:301
empty
bool empty(TH1 *h)
Definition: computils.cxx:294
python.DataFormatRates.events
events
Definition: DataFormatRates.py:105
EvtInclusiveDecay::m_isfHerwig
bool m_isfHerwig
Definition: EvtInclusiveDecay.h:169
EvtInclusiveAtRndmGen::getEngine
CLHEP::HepRandomEngine * getEngine()
Definition: EvtInclusiveDecay.h:51
EvtInclusiveDecay::m_printHepMCAfterEvtGen
bool m_printHepMCAfterEvtGen
Definition: EvtInclusiveDecay.h:149
EvtInclusiveDecay::addEvtGenDecayTree
void addEvtGenDecayTree(HepMC::GenEvent *hepMC, HepMC::GenParticlePtr part, EvtParticle *evtPart, EvtVector4R treeStart, double momentumScaleFactor=1.0)
Definition: EvtInclusiveDecay.cxx:532
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
EvtInclusiveDecay::m_readExisting
bool m_readExisting
Definition: EvtInclusiveDecay.h:135
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
PathResolverFindCalibDirectory
std::string PathResolverFindCalibDirectory(const std::string &logical_file_name)
Definition: PathResolver.cxx:432
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
MC::isPhysical
bool isPhysical(const T &p)
Definition: HepMCHelpers.h:32
GenBase::m_ppSvc
ServiceHandle< IPartPropSvc > m_ppSvc
Handle on the particle property service.
Definition: GenBase.h:160
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
HepMC::EVTGENUNDECAYEDSTATUS
constexpr int EVTGENUNDECAYEDSTATUS
Definition: MagicNumbers.h:42
AthCommonDataStore
Definition: AthCommonDataStore.h:52
G4StepHelper::particleName
std::string particleName(const G4Step *theStep)
TODO.
Definition: StepHelper.cxx:24
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
HepMC::newGenVertexPtr
GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), const int i=0)
Definition: GenVertex.h:64
EvtInclusiveDecay::invMass
double invMass(HepMC::ConstGenParticlePtr p1, HepMC::ConstGenParticlePtr p2)
Definition: EvtInclusiveDecay.cxx:699
lumiFormat.i
int i
Definition: lumiFormat.py:92
EvtInclusiveDecay::getRandomEngine
CLHEP::HepRandomEngine * getRandomEngine(const std::string &streamName, unsigned long int randomSeedOffset, const EventContext &ctx) const
Definition: EvtInclusiveDecay.cxx:194
z
#define z
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
EvtInclusiveDecay::m_pdtFile
std::string m_pdtFile
Definition: EvtInclusiveDecay.h:128
ret
T ret(T t)
Definition: rootspy.cxx:260
Atlas::ExtendedEventContext
Definition: ExtendedEventContext.h:23
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
EvtInclusiveDecay::m_userSelMu1MinPt
double m_userSelMu1MinPt
Definition: EvtInclusiveDecay.h:163
GenBase::m_mcevents_const
SG::ReadHandleKey< McEventCollection > m_mcevents_const
Const handle to the MC event collection.
Definition: GenBase.h:163
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
EvtInclusiveDecay::m_checkDecayChannels
bool m_checkDecayChannels
Definition: EvtInclusiveDecay.h:154
EvtInclusiveDecay::removeDecayTree
void removeDecayTree(HepMC::GenEvent *hepMC, HepMC::GenParticlePtr p)
Definition: EvtInclusiveDecay.cxx:449
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
jobOptions.ParticleID
ParticleID
Definition: jobOptions.decayer.py:85
EvtInclusiveDecay::m_dsid
IntegerProperty m_dsid
Definition: EvtInclusiveDecay.h:116
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
EvtInclusiveDecay::m_userSelMu1MaxEta
double m_userSelMu1MaxEta
Definition: EvtInclusiveDecay.h:165
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
EvtInclusiveDecay::traverseDecayTree
StatusCode traverseDecayTree(HepMC::GenParticlePtr p, bool isToBeRemoved, std::set< HepMC::GenVertexPtr > &visited, std::set< int > &toBeDecayed)
Definition: EvtInclusiveDecay.cxx:391
EvtInclusiveDecay::m_randomSeed
IntegerProperty m_randomSeed
Seed for random number engine.
Definition: EvtInclusiveDecay.h:119
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
EvtInclusiveDecay::printHepMC
void printHepMC(HepMC::GenEvent *hepMC, std::set< int > *barcodeList=nullptr)
Definition: EvtInclusiveDecay.cxx:741
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:33
calibdata.ct
ct
Definition: calibdata.py:418
EvtInclusiveDecay::m_userSelRequireOppositeSignedMu
bool m_userSelRequireOppositeSignedMu
Definition: EvtInclusiveDecay.h:162
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
GenBase::particleTable
const HepPDT::ParticleDataTable & particleTable() const
Get a particle data table.
Definition: GenBase.h:118
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
EvtInclusiveDecay::printTree
unsigned int printTree(HepMC::GenParticlePtr p, std::set< HepMC::GenVertexPtr > &visited, int level, std::set< int > *barcodeList=0)
Definition: EvtInclusiveDecay.cxx:791
Amg::py
@ py
Definition: GeoPrimitives.h:39
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
PlotCalibFromCool.en
en
Definition: PlotCalibFromCool.py:399
EvtInclusiveDecay::m_prohibitFinalStateDecay
bool m_prohibitFinalStateDecay
Definition: EvtInclusiveDecay.h:136
EvtInclusiveDecay::pdgName
std::string pdgName(HepMC::ConstGenParticlePtr p, bool statusHighlighting=false, std::set< int > *barcodeList=nullptr)
Definition: EvtInclusiveDecay.cxx:872
EvtInclusiveDecay::m_prohibitRemoveSelfDecay
bool m_prohibitRemoveSelfDecay
Definition: EvtInclusiveDecay.h:139
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
EvtInclusiveDecay::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Definition: EvtInclusiveDecay.h:113
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
EvtInclusiveDecay::m_mcEvtColl
McEventCollection * m_mcEvtColl
Definition: EvtInclusiveDecay.h:121
python.PyAthena.v
v
Definition: PyAthena.py:157
EvtInclusiveDecay::m_prohibitUnDecay
bool m_prohibitUnDecay
Definition: EvtInclusiveDecay.h:138
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
AthenaPoolExample_Copy.streamName
string streamName
Definition: AthenaPoolExample_Copy.py:39
MC::isStable
bool isStable(const T &p)
Definition: HepMCHelpers.h:30
EvtInclusiveDecay::m_myEvtGen
EvtGen * m_myEvtGen
Definition: EvtInclusiveDecay.h:125
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
a
TList * a
Definition: liststreamerinfos.cxx:10
HepMC::newGenParticlePtr
GenParticlePtr newGenParticlePtr(const HepMC::FourVector &mom=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), int pid=0, int status=0)
Definition: GenParticle.h:39
SCT_ConditionsAlgorithms::CoveritySafe::getenv
std::string getenv(const std::string &variableName)
get an environment variable
Definition: SCT_ConditionsUtilities.cxx:17
y
#define y
h
EvtInclusiveDecay::m_nRepeatedDecays
int m_nRepeatedDecays
Definition: EvtInclusiveDecay.h:157
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
EvtInclusiveDecay::xmlpath
std::string xmlpath(void)
Definition: EvtInclusiveDecay.cxx:920
MC::isDecayed
bool isDecayed(const T &p)
Definition: HepMCHelpers.h:29
GenBase::pdt
const HepPDT::ParticleDataTable & pdt() const
Shorter alias to get a particle data table.
Definition: GenBase.h:123
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
python.DecayParser.children
children
Definition: DecayParser.py:32
ATHRNG::calculateSeedsMC21
void calculateSeedsMC21(long *seeds, const std::string &algName, uint64_t ev, uint64_t run, uint64_t offset=0)
Set the random seed using a string (e.g.
Definition: RNGWrapper.cxx:37
EvtInclusiveDecay::m_setVMtransversePol
bool m_setVMtransversePol
Definition: EvtInclusiveDecay.h:170
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
EvtInclusiveDecay::m_printHepMCBeforeEvtGen
bool m_printHepMCBeforeEvtGen
Definition: EvtInclusiveDecay.h:148
EvtInclusiveDecay::m_outputKeyName
std::string m_outputKeyName
Definition: EvtInclusiveDecay.h:133
GenBase::GenBase
GenBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: GenBase.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
merge.status
status
Definition: merge.py:17
EvtInclusiveDecay::m_userSelMaxDimuMass
double m_userSelMaxDimuMass
Definition: EvtInclusiveDecay.h:168
CscCalibQuery.testFile
testFile
Definition: CscCalibQuery.py:274
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
EvtInclusiveDecay::m_inputKeyName
std::string m_inputKeyName
Definition: EvtInclusiveDecay.h:132
EvtInclusiveDecay::m_userSelMu2MinPt
double m_userSelMu2MinPt
Definition: EvtInclusiveDecay.h:164
EvtInclusiveDecay::m_prohibitReDecay
bool m_prohibitReDecay
Definition: EvtInclusiveDecay.h:137
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Atlas::setExtendedEventContext
void setExtendedEventContext(EventContext &ctx, ExtendedEventContext &&ectx)
Move an extended context into a context object.
Definition: ExtendedEventContext.cxx:50
GenBase::initialize
virtual StatusCode initialize() override
Definition: GenBase.cxx:17
EvtInclusiveDecay::m_whiteListSet
std::set< int > m_whiteListSet
Definition: EvtInclusiveDecay.h:146
EvtInclusiveAtRndmGen
Definition: EvtInclusiveDecay.h:46
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
GenParticle
@ GenParticle
Definition: TruthClasses.h:30
LB_AnalMapSplitter.lbn
lbn
Definition: LB_AnalMapSplitter.py:28
ServiceHandle< ICondSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37