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

#include <MultiPy8Pileup.h>

Inheritance diagram for MultiPy8Pileup:
Collaboration diagram for MultiPy8Pileup:

Public Member Functions

 MultiPy8Pileup (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~MultiPy8Pileup ()
 
virtual StatusCode genInitialize ()
 For initializing the generator, if required. More...
 
virtual StatusCode genFinalize ()
 For finalising the generator, if required. More...
 
virtual StatusCode callGenerator ()
 For calling the generator on each iteration of the event loop. More...
 
virtual StatusCode fillEvt (HepMC::GenEvent *event)
 For filling the HepMC event object. More...
 
virtual StatusCode fillWeights (HepMC::GenEvent *evt)
 
double pythiaVersion () const
 
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
 

Static Public Member Functions

static const std::string & pythia_stream ()
 
static std::string xmlpath ()
 

Protected Member Functions

bool useRndmGenSvc () const
 
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...
 

Protected Attributes

std::unique_ptr< Pythia8::Pythia > m_pythia {}
 
HepMC::Pythia8ToHepMC m_pythiaToHepMC
 
UnsignedIntegerProperty m_maxFailures {this, "MaxFailures", 10}
 
BooleanProperty m_useRndmGenSvc {this, "useRndmGenSvc", true, "the max number of consecutive failures"}
 
std::shared_ptr< customRndmm_atlasRndmEngine {}
 
IntegerProperty m_dsid {this, "Dsid", 999999, "Dataset ID number"}
 
StringArrayProperty m_userHooks {this, "UserHooks", {} }
 
DoubleProperty m_pt0timesMPI {this,"pT0timesMPI", 1.0}
 
DoubleProperty m_numberAlphaS {this,"numberAlphaS", 3.0}
 
BooleanProperty m_sameAlphaSAsMPI {this,"useSameAlphaSasMPI", false}
 

Private Types

enum  PDGID {
  PROTON =2212, ANTIPROTON =-2212, LEAD =1000822080, NEUTRON =2112,
  ANTINEUTRON =-2112, MUON =13, ANTIMUON =-13, ELECTRON =11,
  POSITRON =-11, INVALID =0
}
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

int nPileupEvents (CLHEP::HepRandomEngine *rndmEngine)
 
void addLHEToHepMC (HepMC::GenEvent *evt)
 
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...
 

Static Private Member Functions

static std::string findValue (const std::string &command, const std::string &key)
 
static int s_allowedTunes (double version)
 

Private Attributes

int m_ncollevent
 
std::vector< int > m_pileupProfile
 
std::vector< float > m_multbcid
 
std::string m_filename
 
int m_ngen
 
int m_nbad
 
std::vector< HepMC::GenEvent * > m_evts
 
std::vector< double > m_pileupProfileIntegral
 
TFile * m_file
 
TH1Dm_htgPileupProfile
 
TH1Dm_htgPileupMu
 
TH1Dm_htgPileupEvents
 
int m_internal_event_number {0}
 
double m_version {-1.}
 
StringArrayProperty m_commands {this, "Commands", {} }
 
std::vector< std::string > m_userParams
 
std::vector< std::string > m_userModes
 
DoubleProperty m_collisionEnergy {this, "CollisionEnergy", 14000.0}
 
StringProperty m_beam1 {this, "Beam1", "PROTON"}
 
StringProperty m_beam2 {this, "Beam2", "PROTON"}
 
bool m_override_transform_beamenergy {false}
 
StringProperty m_lheFile {this, "LHEFile", ""}
 
BooleanProperty m_storeLHE {this, "StoreLHE", false}
 
BooleanProperty m_doCKKWLAcceptance {this, "CKKWLAcceptance", false}
 
BooleanProperty m_doFxFxXS {this, "FxFxXS", false}
 
BooleanProperty m_computeEfficiency {this, "computeEfficiency", false}
 
double m_nAccepted {0.}
 
double m_nMerged {0.}
 
double m_sigmaTotal {0.}
 
double m_conversion {1.}
 
unsigned int m_failureCount {0}
 
std::map< std::string, PDGIDm_particleIDs
 
std::vector< long int > m_seeds {}
 
StringProperty m_userProcess {this, "UserProcess", ""}
 
std::shared_ptr< Pythia8::Sigma2Process > m_procPtr {}
 
std::vector< UserHooksPtrTypem_userHooksPtrs {}
 
StringProperty m_userResonances {this, "UserResonances", ""}
 
std::vector< std::shared_ptr< Pythia8::ResonanceWidths > > m_userResonancePtrs
 
BooleanProperty m_useLHAPDF {this, "UseLHAPDF", true}
 
StringProperty m_particleDataFile {this, "ParticleData", ""}
 
StringProperty m_outputParticleDataFile {this, "OutputParticleData", "ParticleData.local.xml"}
 
double m_mergingWeight {1.0}
 
double m_enhanceWeight {1.0}
 
std::vector< std::string > m_weightIDs {}
 
std::vector< std::string > m_weightNames {}
 
bool m_doLHE3Weights {false}
 
std::vector< std::string > m_weightCommands {}
 
std::vector< std::string > m_showerWeightNames {"nominal"}
 
StringArrayProperty m_showerWeightNamesProp {this, "ShowerWeightNames", {} }
 
PublicToolHandle< IPythia8Customm_athenaTool {this, "CustomInterface", ""}
 
Pythia8::SuppressSmallPT * m_SuppressSmallPT
 
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
 

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...
 

Features for derived classes to use internally

ServiceHandle< IAthRNGSvcm_rndmSvc {this, "RndmSvc", "AthRNGSvc"}
 Data members. More...
 
ServiceHandle< IIncidentSvc > m_incidentSvc {this, "IncidentSvc", "IncidentSvc"}
 Handle on the incident service. More...
 
IntegerProperty m_randomSeed {this, "RandomSeed", 1234567, "Random seed for the built-in random engine"}
 Seed for random number engine. More...
 
BooleanProperty m_isAfterburner {this, "IsAfterburner", false, "Set true if generator modifies existing events rather than creating new ones"}
 Flag for normal vs. afterburner generators. More...
 
CLHEP::HepRandomEngine * getRandomEngine (const std::string &streamName, const EventContext &ctx) const
 
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
 

Detailed Description

Definition at line 23 of file MultiPy8Pileup.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ PDGID

enum Pythia8_i::PDGID
privateinherited
Enumerator
PROTON 
ANTIPROTON 
LEAD 
NEUTRON 
ANTINEUTRON 
MUON 
ANTIMUON 
ELECTRON 
POSITRON 
INVALID 

Definition at line 115 of file Pythia8_i.h.

115 {PROTON=2212, ANTIPROTON=-2212, LEAD=1000822080, NEUTRON=2112, ANTINEUTRON=-2112, MUON=13, ANTIMUON=-13, ELECTRON=11, POSITRON=-11, INVALID=0};

Constructor & Destructor Documentation

◆ MultiPy8Pileup()

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

Definition at line 17 of file MultiPy8Pileup.cxx.

17  :
18  Pythia8_i::Pythia8_i( name, pSvcLocator ),
19  m_ngen(0),
20  m_nbad(0),
21  // m_evnumber(1),
22  m_file(NULL),
23  m_htgPileupProfile(NULL),
24  m_htgPileupMu(NULL),
25  m_htgPileupEvents(NULL)
26 {
27  declareProperty("NCollPerEvent",m_ncollevent=20,"Collisons per event (-1 to use profile)");
28  declareProperty("PileupProfile",m_pileupProfile,"Pileup profile array");
29  declareProperty("MultBCID",m_multbcid,"Pileup multiplier per BCID array");
30  declareProperty("HistFile",m_filename="","Filename for histograms");
31 }

◆ ~MultiPy8Pileup()

MultiPy8Pileup::~MultiPy8Pileup ( )

Definition at line 33 of file MultiPy8Pileup.cxx.

33  {
34 
35 }

Member Function Documentation

◆ addLHEToHepMC()

void Pythia8_i::addLHEToHepMC ( HepMC::GenEvent *  evt)
privateinherited

Definition at line 685 of file Pythia8_i.cxx.

685  {
686 
687 #ifdef HEPMC3
688  HepMC::GenEvent *procEvent = new HepMC::GenEvent();
689 
690  // Adding the LHE event to the HepMC results in undecayed partons in the event record.
691  // Pythia's HepMC converter throws up undecayed partons, so we ignore that
692  // (expected) exception this time
693  m_pythiaToHepMC.fill_next_event(m_pythia->process, procEvent, evt->event_number(), &m_pythia->info, &m_pythia->settings);
694 
695  for(auto p: *procEvent){
696  p->set_status(HepMC::PYTHIA8LHESTATUS);
697  }
698 
699  //This code and the HepMC2 version below assume a correct input, e.g. beams[0]->end_vertex() exists.
700  for(auto& v: procEvent->vertices()) v->set_status(1);
701  auto beams=evt->beams();
702  auto procBeams=procEvent->beams();
703  if(beams[0]->momentum().pz() * procBeams[0]->momentum().pz() < 0.) std::swap(procBeams[0],procBeams[1]);
704  for (auto p: procBeams[0]->end_vertex()->particles_out()) beams[0]->end_vertex()->add_particle_out(p);
705  for (auto p: procBeams[1]->end_vertex()->particles_out()) beams[1]->end_vertex()->add_particle_out(p);
706 
707  HepMC::fillBarcodesAttribute(procEvent);
708 #else
709  HepMC::GenEvent *procEvent = new HepMC::GenEvent(evt->momentum_unit(), evt->length_unit());
710 
711  // Adding the LHE event to the HepMC results in undecayed partons in the event record.
712  // Pythia's HepMC converter throws up undecayed partons, so we ignore that
713  // (expected) exception this time
714  try{
715  m_pythiaToHepMC.fill_next_event(m_pythia->process, procEvent, evt->event_number(), &m_pythia->info, &m_pythia->settings);
716  }catch(HepMC::PartonEndVertexException &ignoreIt){}
717 
718  for(HepMC::GenEvent::particle_iterator p = procEvent->particles_begin();
719  p != procEvent->particles_end(); ++p){
720  (*p)->set_status(HepMC::PYTHIA8LHESTATUS);
721  }
722 
723  std::vector<HepMC::GenParticle*> beams;
724  std::vector<HepMC::GenParticle*> procBeams;
725  beams.push_back(evt->beam_particles().first);
726  beams.push_back(evt->beam_particles().second);
727 
728  if(beams[0]->momentum().pz() * procEvent->beam_particles().first->momentum().pz() > 0.){
729  procBeams.push_back(procEvent->beam_particles().first);
730  procBeams.push_back(procEvent->beam_particles().second);
731  }else{
732  procBeams.push_back(procEvent->beam_particles().second);
733  procBeams.push_back(procEvent->beam_particles().first);
734  }
735 
736  std::map<const HepMC::GenVertex*, HepMC::GenVertex*> vtxCopies;
737 
738  for(HepMC::GenEvent::vertex_const_iterator v = procEvent->vertices_begin();
739  v != procEvent->vertices_end(); ++v ) {
740  if(*v == procBeams[0]->end_vertex() || *v == procBeams[1]->end_vertex()) continue;
741  HepMC::GenVertex* vCopy = new HepMC::GenVertex((*v)->position(), (*v)->id(), (*v)->weights());
742  vCopy->suggest_barcode(-(evt->vertices_size()));
743  vCopy->set_id(1);
744  vtxCopies[*v] = vCopy;
745  evt->add_vertex(vCopy);
746  }
747 
748  for(HepMC::GenEvent::particle_const_iterator p = procEvent->particles_begin();
749  p != procEvent->particles_end(); ++p ){
750  if((*p)->is_beam()) continue;
751 
752  HepMC::GenParticle *pCopy = new HepMC::GenParticle(*(*p));
753  pCopy->suggest_barcode(evt->particles_size());
754 
756  for(size_t ii =0; ii != 2; ++ii){
757  if((*p)->production_vertex() == procBeams[ii]->end_vertex()){
758  beams[ii]->end_vertex()->add_particle_out(pCopy);
759  break;
760  }
761 
762  if(ii == 1){
763  vit = vtxCopies.find((*p)->production_vertex());
764  if(vit != vtxCopies.end()) vit->second->add_particle_out(pCopy);
765  }
766  }
767 
768  vit = vtxCopies.find((*p)->end_vertex());
769  if(vit != vtxCopies.end()) vit->second->add_particle_in(pCopy);
770  }
771 #endif
772 
773  return;
774 }

◆ 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.

◆ callGenerator()

StatusCode MultiPy8Pileup::callGenerator ( )
virtual

For calling the generator on each iteration of the event loop.

Reimplemented from Pythia8_i.

Definition at line 76 of file MultiPy8Pileup.cxx.

76  {
77  // initialise random generators the first time - delayed after Pythia init
78  const EventContext& ctx = Gaudi::Hive::currentContext();
79  CLHEP::HepRandomEngine* rndmEngine = this->getRandomEngine("MultiPy8Pileup", ctx);
80  // decide how many events to generate
81 
82  int muval = ( m_ncollevent > 0 ? m_ncollevent : nPileupEvents(rndmEngine) );
83  if (m_file) m_htgPileupMu->Fill(muval+0.1);
84  m_evts.clear();
85 
86  // loop over all BCID - starting from 1 for in-time pileup
87  int bcid=1;
88  for (std::vector<float>::const_iterator bcitr=m_multbcid.begin();
89  bcitr!=m_multbcid.end();++bcitr,++bcid) {
90  // actual number of minbias in this BCID
91  // Poisson around instantaneous_mu * multiplier value
92  const int nevtraw=CLHEP::RandPoisson::shoot(muval);
93  if (m_file) m_htgPileupEvents->Fill(nevtraw+0.1);
94  const int nevt=(float)nevtraw*(*bcitr);
95 
96  for (int ievt=0;ievt<nevt;++ievt) {
97  ATH_MSG_DEBUG("Request generation of event " << ievt << " of " << nevt
98  << " for BCID " << bcid);
100  if (sc==StatusCode::SUCCESS) {
101  HepMC::GenEvent* evt=new HepMC::GenEvent();
102  if (Pythia8_i::fillEvt(evt)==StatusCode::SUCCESS) {
103  // change the process ID to incorporate the BCID * 10000
106  ATH_MSG_DEBUG("Signal process ID " << pid << " set to " <<
107  HepMC::signal_process_id(evt) << " for BCID " << bcid);
109  m_evts.push_back(evt);
110  ++m_ngen;
111  } else {
112  ATH_MSG_WARNING("Failed to fillEvt for event seq " << ievt);
113  ++m_nbad;
114  }
115  } else {
116  ++m_nbad;
117  ATH_MSG_WARNING("Failed to generate event seq " << ievt);
118  }
119  }
120  }
121  ATH_MSG_DEBUG("callGenerator finished with " << m_evts.size() <<
122  " pileup events in buffer");
123  return StatusCode::SUCCESS;
124 }

◆ 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 }

◆ 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 GenModule::execute ( )
virtualinherited
Todo:
Remove hard-coded alg name checking (already incomplete)

Reimplemented from GenBase.

Definition at line 70 of file GenModule.cxx.

70  {
71  // Examples of how to retrieve the random number engine for a given
72  // stream.
73  // NB getRandomEngine should only be called once per event for a
74  // given stream, as it causes the stream to be re-seeded each time
75  // it is called.
76 
77  // Example 1 - seeded based on the current event number (+ slot, run, streamName)
78  //const EventContext& ctx = Gaudi::Hive::currentContext();
79  //CLHEP::HepRandomEngine* rndmEngine = this->getRandomEngine("MyStream", ctx);
80 
81  // Example 2 - seeded based on the m_randomSeed property (+ slot, run, streamName)
82  //const EventContext& ctx = Gaudi::Hive::currentContext();
83  //CLHEP::HepRandomEngine* rndmEngine = this->getRandomEngine("MyStream", m_randomSeed.value(), ctx);
84 
85  // Call the code that generates an event
86  CHECK(this->callGenerator());
87 
88  // Create the MC event and send the GeneratorEvent stored in it to fillEvt
89  HepMC::GenEvent* evt = HepMC::newGenEvent(1,1);
90  CHECK(this->fillEvt(evt));
92 
93  // Add the event to the MC event collection
94  if (events()) {
95  // If this is an "afterburner" generator, replace the last event rather than add a new one
97  if (m_isAfterburner.value() || name() == "Tauola" || name() == "Photos") {
98  events()->pop_back();
99  }
100  // Add the event to the end of the collection
101  events()->push_back(evt);
102  ATH_MSG_DEBUG("MC event added to McEventCollection");
103 
104  // remove the empty event in case of ParticleDecayer
105  if (name() == "ParticleDecayer") {
106  events()->pop_back();
107  }
108  }
109 
110  // Call the incident service to notify that an event has been made
111  m_incidentSvc->fireIncident( Incident(name(), "McEventGenerated") );
112  return StatusCode::SUCCESS;
113 }

◆ 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 }

◆ fillEvt()

StatusCode MultiPy8Pileup::fillEvt ( HepMC::GenEvent *  evt)
virtual

For filling the HepMC event object.

Reimplemented from Pythia8_i.

Definition at line 126 of file MultiPy8Pileup.cxx.

126  {
127  int nbuf=m_evts.size();
128  if (nbuf>1) {
129  // send extra events into McEventCollection via backdoor
130  for (int i=1;i<nbuf;++i) {
131  events()->push_back(m_evts[i]);
132  }
133  }
134  // send first event back via usual method
135  // have to copy it to the passed in GenEvent
136  if (nbuf>0) {
137  *evt=*m_evts[0];
138  delete m_evts[0];
139  }
140  return StatusCode::SUCCESS;
141 }

◆ fillWeights()

StatusCode Pythia8_i::fillWeights ( HepMC::GenEvent *  evt)
virtualinherited

mismatch in weight name!

Definition at line 478 of file Pythia8_i.cxx.

478  {
479 
480  // reset
481  m_mergingWeight = m_pythia->info.mergingWeightNLO(); // first initialisation, good for the nominal weight in any case (see Merging:includeWeightInXsection).
482  m_enhanceWeight = 1.0; // better to keep the enhancement from UserHooks in a separate variable, to keep the code clear
483 
484 #ifndef PYTHIA8_304SERIES
485  // include Enhance userhook weight
486  for(const auto &hook: m_userHooksPtrs) {
487  if (hook->canEnhanceEmission()) {
488  m_enhanceWeight *= hook->getEnhancedEventWeight();
489  }
490  }
491 #endif // not PYTHIA8_304SERIES
492 
493  // DO NOT try to distinguish between phase space and merging contributions: only their product contains both, so always multiply them in order to be robust
494  double eventWeight = m_pythia->info.weight() * m_mergingWeight * m_enhanceWeight;
495 
496  std::map<std::string,double> fWeights; // temporary weight vector, needed while managing hepmc2 and 3 simultaneously
497 
498  // save as Default the usual pythia8 weight, including enhancements
499  // NB: info.weight() is built upon info.eventWeightLHEF (but includes shower "decorations"), not from the rwgt LHE vector.
500  size_t atlas_specific_weights = 1;
501  fWeights["Default"]=eventWeight;
502  if(m_internal_event_number == 1) {
503  ATH_MSG_INFO("found LHEF version "<< m_pythia->info.LHEFversion() );
504  if (m_pythia->info.LHEFversion() > 1) m_doLHE3Weights = true;
505  m_weightIDs.clear();
506  m_weightIDs.push_back("Default"); // notice that we are assigning a weightname = weightID
507  }
508 
509  // Now systematic weights: a) generator and b) shower variations
510  // merging implies reading from lhe files (while the opposite is not true, ok, but still works)
511  if (m_lheFile!="") {
512  // remember that the true merging component can be disentangled only when there are LHE input events
513 
514  // make sure to get the merging weight correctly: this is needed -only- for systematic weights (generator and parton shower variations)
515  // NB: most robust way, regardless of the specific value of Merging:includeWeightInXsection (if on, info.mergingWeight() is always 1.0 ! )
516  m_mergingWeight *= ( m_pythia->info.weight() / m_pythia->info.eventWeightLHEF ); // this is the actual merging component, regardless of conventions,
517  // needed by systematic variation weights
518  // this includes rare compensation or selection-biased weights
519  }
520 
521 
522  ATH_MSG_DEBUG("Event weights: enhancing weight, merging weight, total weight = "<<m_enhanceWeight<<", "<<m_mergingWeight<<", "<<eventWeight);
523 
524  // we already filled the "Default" weight
525  std::vector<std::string>::const_iterator id = m_weightIDs.begin()+atlas_specific_weights;
526 
527  // a) fill generator weights
528  if(m_pythia->info.getWeightsDetailedSize() != 0){
529  for(std::map<std::string, Pythia8::LHAwgt>::const_iterator wgt = m_pythia->info.rwgt->wgts.begin();
530  wgt != m_pythia->info.rwgt->wgts.end(); ++wgt){
531 
532  if(m_internal_event_number == 1){
533  m_weightIDs.push_back(wgt->first);
534  }else{
535  if(*id != wgt->first){
536  ATH_MSG_ERROR("Mismatch in LHE3 weight id. Found "<<wgt->first<<", expected "<<*id);
537  return StatusCode::FAILURE;
538  }
539  ++id;
540  }
541 
542  std::map<std::string, Pythia8::LHAweight>::const_iterator weightName = m_pythia->info.init_weights->find(wgt->first);
543  if(weightName != m_pythia->info.init_weights->end()){
544  fWeights[weightName->second.contents] = m_mergingWeight * m_enhanceWeight * wgt->second.contents;
545  }else{
546  // if no name was assigned/found, assign a weightname = weightid
547  fWeights[wgt->first] = m_mergingWeight * m_enhanceWeight * wgt->second.contents;
548  }
549 
550  }
551  }
552 
553  // b) shower weight variations
554  // always start from second shower weight: the first was saved already as "Default"
555 
556  for(int iw = 1; iw < m_pythia->info.PYTHIA8_NWEIGHTS(); ++iw){
557 
558  std::string wtName = ((int)m_showerWeightNames.size() == m_pythia->info.PYTHIA8_NWEIGHTS())? m_showerWeightNames[iw]: "ShowerWt_" +std::to_string(iw);
559 
560  fWeights[wtName] = m_mergingWeight * m_enhanceWeight * m_pythia->info.PYTHIA8_WEIGHT(iw)*m_conversion;
561 
562  if(m_internal_event_number == 1) {
563  m_weightIDs.push_back(wtName);
564  ATH_MSG_DEBUG("Shower weight name, value, conversion: "<<wtName<<", "<< fWeights[wtName] <<","<<m_conversion );
565  }
566  }
567 
568  // Now save, as a backup, also the LHEF weight without enhancements (useful for possible, rare, non-default cases)
569  // to make clear that it should not be used in analyses, save it always with a -10 factor (so that its goal is clear even if not checking its name)
570  if (m_lheFile!="")
571  {
572  fWeights["AUX_bare_not_for_analyses"]=(-10.0)*m_pythia->info.eventWeightLHEF;
573  if(m_internal_event_number == 1) m_weightIDs.push_back("AUX_bare_not_for_analyses");
574  }
575 
576  // Sad, but needed: create a string vector with acceptable order of weight names
577  if(m_internal_event_number == 1){
578  m_weightNames.clear();
579  for(const std::string &id : m_weightIDs){
580  if(m_doLHE3Weights) {
581  std::map<std::string, Pythia8::LHAweight>::const_iterator weight = m_pythia->info.init_weights->find(id);
582  if(weight != m_pythia->info.init_weights->end()) m_weightNames.push_back(weight->second.contents);
583  else m_weightNames.push_back(id);
584  }
585  else {
586  m_weightNames.push_back(id);
587  }
588  }
589  if (m_weightNames.size() != fWeights.size() ) {
590  ATH_MSG_ERROR("Something wrong when building list of weight names: " << m_weightNames.size() << " vs "<< fWeights.size() << ", exiting ...");
591  return StatusCode::FAILURE;
592  }
593  }
594 
595  // The following depends on the specific hepmc2/3 implementation
596 #ifdef HEPMC3
597  if (!evt->run_info()) {
598  evt->set_run_info(m_runinfo);
599  }
600  evt->run_info()->set_weight_names(m_weightNames);
601 
602  // for the first event, weight AUX_bare_not_for_analyses is not present in evt->weights(), so we need to book a place for it by hand
603  if (m_internal_event_number == 1 && evt->run_info()->weight_names().size() == evt->weights().size()+1 ) {
604  evt->weights().push_back(1.0);
605  }
606 
607  // added conversion GeV -> MeV to ensure correct units
608  evt->set_units(HepMC3::Units::MEV, HepMC3::Units::MM);
609 
610  evt->weights().resize(fWeights.size(), 1.0);
611  for (auto w: fWeights) {
612  evt->weight(w.first)=w.second;
613  }
614 
615  auto beams=evt->beams();
616  ATH_MSG_DEBUG( " Energy of the beams " << beams[0]->momentum().e() );
617 
618 //uncomment to list HepMC events
619 // std::cout << " print::listing Pythia8 " << std::endl;
620 // HepMC3::Print::listing(std::cout, *evt);
621 
622 #else
623  evt->weights().clear();
624  for (auto w: m_weightNames ) {evt->weights()[w]=fWeights[w];}
625  auto beams=evt->beam_particles();
626  ATH_MSG_DEBUG( " Energy of the beams " << beams.first->momentum().e() );
627 
628 //uncomment to list HepMC events
629 // std::cout << " print::listing Pythia8 " << std::endl;
630 // evt->print();
631 #endif
632 
633  return StatusCode::SUCCESS;
634 }

◆ finalize()

StatusCode GenModule::finalize ( )
inlineinherited

Definition at line 55 of file GenModule.h.

55 { return genFinalize(); }

◆ findValue()

static std::string Pythia8_i::findValue ( const std::string &  command,
const std::string &  key 
)
staticprivateinherited

◆ genFinalize()

StatusCode MultiPy8Pileup::genFinalize ( )
virtual

For finalising the generator, if required.

Reimplemented from Pythia8_i.

Definition at line 143 of file MultiPy8Pileup.cxx.

143  {
144  ATH_MSG_INFO("MultiPy8Pileup finished with " << m_ngen << " good events and " << m_nbad << " failures" );
145 
146  if (m_file) {
147  m_file->cd();
148  m_file->Write();
149  m_file->Close();
150  }
151 
152  return Pythia8_i::genFinalize();
153 }

◆ genInitialize()

StatusCode MultiPy8Pileup::genInitialize ( )
virtual

For initializing the generator, if required.

Reimplemented from Pythia8_i.

Definition at line 37 of file MultiPy8Pileup.cxx.

37  {
38  ATH_MSG_INFO( "In MultiPy8Pileup::genInitialize" );
39 
40  // if filename set, initialise histograms for mu/nevt profiles
41  if (m_filename!="") {
42  m_file = new TFile( m_filename.c_str(), "recreate" );
43  m_file->cd();
44  m_htgPileupProfile = new TH1D( "pileupProfile", "input pileupProfile", 100, 0., 100. );
45  m_htgPileupMu = new TH1D( "generatedMu", "generated pileup mu", 100, 0., 100. );
46  m_htgPileupEvents = new TH1D( "generatedEvents", "generated pileup events", 100, 0., 100. );
47  }
48 
50  m_pileupProfileIntegral.reserve( m_pileupProfile.size() );
51  for ( std::vector< int >::iterator itr = m_pileupProfile.begin(); itr != m_pileupProfile.end(); ++itr ) {
52  m_pileupProfileIntegral.push_back( std::accumulate( m_pileupProfile.begin(), itr + 1, 0. ) );
53  if (m_file)
54  m_htgPileupProfile->SetBinContent( std::distance( m_pileupProfile.begin(), itr ) + 1, *itr );
55  }
56 
57  if ( m_ncollevent > 0 ) {
58  ATH_MSG_INFO("Generate fixed number of " << m_ncollevent << " minbias collisions per bunch crossing");
59  }
60  else {
61  ATH_MSG_INFO("Generate varying minbias collisions per event according to given pileup profile");
62  }
63  m_evts.reserve( 50 );
64 
65  ATH_MSG_INFO("Simulate " << m_multbcid.size() << " bunch crossings per event");
66  int ibc=1;
67  for (std::vector<float>::const_iterator itr=m_multbcid.begin();
68  itr!=m_multbcid.end();++itr,++ibc) {
69  ATH_MSG_INFO("Bunch crossing BCID " << ibc << " mu multiplier " << *itr);
70  }
71 
72  // exit via the base class initialisation
73  return Pythia8_i::genInitialize();
74 }

◆ genuserInitialize()

virtual StatusCode GenModule::genuserInitialize ( )
inlinevirtualinherited

For initialization of user code, if required. Called after genInitialize.

Reimplemented in Pythia8B_i.

Definition at line 64 of file GenModule.h.

64 { return StatusCode::SUCCESS; }

◆ getRandomEngine() [1/2]

CLHEP::HepRandomEngine * GenModule::getRandomEngine ( const std::string &  streamName,
const EventContext &  ctx 
) const
protectedinherited

Definition at line 34 of file GenModule.cxx.

36 {
37  ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this, streamName);
38  std::string rngName = name()+streamName;
39  rngWrapper->setSeed( rngName, ctx );
40  return rngWrapper->getEngine(ctx);
41 }

◆ getRandomEngine() [2/2]

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

Definition at line 44 of file GenModule.cxx.

46 {
47  ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this, streamName);
48  rngWrapper->setSeed( streamName, ctx.slot(), randomSeedOffset, ctx.eventID().run_number() );
49  return rngWrapper->getEngine(ctx);
50 }

◆ getRandomEngineDuringInitialize()

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

Definition at line 53 of file GenModule.cxx.

54 {
55  const size_t slot=0;
56  EventContext ctx;
57  ctx.setSlot( slot );
58  ctx.setEventID (EventIDBase (conditionsRun,
59  EventIDBase::UNDEFEVT, // event
60  EventIDBase::UNDEFNUM, // timestamp
61  EventIDBase::UNDEFNUM, // timestamp ns
62  lbn));
64  Atlas::ExtendedEventContext( evtStore()->hiveProxyDict(),
65  conditionsRun) );
66  return getRandomEngine(streamName, randomSeedOffset, ctx);
67 }

◆ 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 GenModule::initialize ( )
virtualinherited

Reimplemented from GenBase.

Definition at line 21 of file GenModule.cxx.

21  {
22  // Base class initializations
24  // Get the random number service
25  CHECK(m_rndmSvc.retrieve());
26  // Get the incident service
27  CHECK(m_incidentSvc.retrieve());
30  return StatusCode::SUCCESS;
31 }

◆ 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.

◆ 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  }

◆ nPileupEvents()

int MultiPy8Pileup::nPileupEvents ( CLHEP::HepRandomEngine *  rndmEngine)
private

Definition at line 156 of file MultiPy8Pileup.cxx.

156  {
157  // return the instantaneous mu value according to the profile
158  double threshold = rndmEngine->flat() * m_pileupProfileIntegral.back();
160  return std::distance( m_pileupProfileIntegral.begin(), itr );
161 }

◆ 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  }

◆ 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(); }

◆ pythia_stream()

const std::string & Pythia8_i::pythia_stream ( )
staticinherited

Definition at line 782 of file Pythia8_i.cxx.

782  {
783  return s_pythia_stream;
784 }

◆ pythiaVersion()

double Pythia8_i::pythiaVersion ( ) const
inherited

Definition at line 777 of file Pythia8_i.cxx.

777  {
778  return m_version;
779 }

◆ 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  }

◆ s_allowedTunes()

static int Pythia8_i::s_allowedTunes ( double  version)
staticprivateinherited

◆ 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.

◆ 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  }

◆ useRndmGenSvc()

bool Pythia8_i::useRndmGenSvc ( ) const
inlineprotectedinherited

Definition at line 86 of file Pythia8_i.h.

86 { return m_useRndmGenSvc; }

◆ xmlpath()

std::string Pythia8_i::xmlpath ( )
staticinherited

Definition at line 787 of file Pythia8_i.cxx.

787  {
788 
789 
790  std::string foundpath = "";
791 
792 // Try to find the xmldoc directory using PathResolver:
793  foundpath = PathResolverFindCalibDirectory( "Pythia8/xmldoc" );
794 
795  return foundpath;
796 }

Member Data Documentation

◆ m_athenaTool

PublicToolHandle<IPythia8Custom> Pythia8_i::m_athenaTool {this, "CustomInterface", ""}
privateinherited

Definition at line 166 of file Pythia8_i.h.

◆ m_atlasRndmEngine

std::shared_ptr<customRndm> Pythia8_i::m_atlasRndmEngine {}
protectedinherited

Definition at line 93 of file Pythia8_i.h.

◆ m_beam1

StringProperty Pythia8_i::m_beam1 {this, "Beam1", "PROTON"}
privateinherited

Definition at line 120 of file Pythia8_i.h.

◆ m_beam2

StringProperty Pythia8_i::m_beam2 {this, "Beam2", "PROTON"}
privateinherited

Definition at line 121 of file Pythia8_i.h.

◆ m_collisionEnergy

DoubleProperty Pythia8_i::m_collisionEnergy {this, "CollisionEnergy", 14000.0}
privateinherited

Definition at line 117 of file Pythia8_i.h.

◆ m_commands

StringArrayProperty Pythia8_i::m_commands {this, "Commands", {} }
privateinherited

Definition at line 111 of file Pythia8_i.h.

◆ m_computeEfficiency

BooleanProperty Pythia8_i::m_computeEfficiency {this, "computeEfficiency", false}
privateinherited

Definition at line 129 of file Pythia8_i.h.

◆ m_conversion

double Pythia8_i::m_conversion {1.}
privateinherited

Definition at line 133 of file Pythia8_i.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_doCKKWLAcceptance

BooleanProperty Pythia8_i::m_doCKKWLAcceptance {this, "CKKWLAcceptance", false}
privateinherited

Definition at line 127 of file Pythia8_i.h.

◆ m_doFxFxXS

BooleanProperty Pythia8_i::m_doFxFxXS {this, "FxFxXS", false}
privateinherited

Definition at line 128 of file Pythia8_i.h.

◆ m_doLHE3Weights

bool Pythia8_i::m_doLHE3Weights {false}
privateinherited

Definition at line 161 of file Pythia8_i.h.

◆ m_dsid

IntegerProperty Pythia8_i::m_dsid {this, "Dsid", 999999, "Dataset ID number"}
protectedinherited

Definition at line 95 of file Pythia8_i.h.

◆ m_enhanceWeight

double Pythia8_i::m_enhanceWeight {1.0}
privateinherited

Definition at line 158 of file Pythia8_i.h.

◆ m_evts

std::vector< HepMC::GenEvent * > MultiPy8Pileup::m_evts
private

Definition at line 47 of file MultiPy8Pileup.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_failureCount

unsigned int Pythia8_i::m_failureCount {0}
privateinherited

Definition at line 135 of file Pythia8_i.h.

◆ m_file

TFile* MultiPy8Pileup::m_file
private

Definition at line 51 of file MultiPy8Pileup.h.

◆ m_filename

std::string MultiPy8Pileup::m_filename
private

Definition at line 41 of file MultiPy8Pileup.h.

◆ m_htgPileupEvents

TH1D * MultiPy8Pileup::m_htgPileupEvents
private

Definition at line 52 of file MultiPy8Pileup.h.

◆ m_htgPileupMu

TH1D * MultiPy8Pileup::m_htgPileupMu
private

Definition at line 52 of file MultiPy8Pileup.h.

◆ m_htgPileupProfile

TH1D* MultiPy8Pileup::m_htgPileupProfile
private

Definition at line 52 of file MultiPy8Pileup.h.

◆ m_incidentSvc

ServiceHandle<IIncidentSvc> GenModule::m_incidentSvc {this, "IncidentSvc", "IncidentSvc"}
privateinherited

Handle on the incident service.

Definition at line 101 of file GenModule.h.

◆ m_internal_event_number

int Pythia8_i::m_internal_event_number {0}
privateinherited

Definition at line 107 of file Pythia8_i.h.

◆ m_isAfterburner

BooleanProperty GenModule::m_isAfterburner {this, "IsAfterburner", false, "Set true if generator modifies existing events rather than creating new ones"}
protectedinherited

Flag for normal vs. afterburner generators.

Definition at line 87 of file GenModule.h.

◆ m_lheFile

StringProperty Pythia8_i::m_lheFile {this, "LHEFile", ""}
privateinherited

Definition at line 124 of file Pythia8_i.h.

◆ m_maxFailures

UnsignedIntegerProperty Pythia8_i::m_maxFailures {this, "MaxFailures", 10}
protectedinherited

Definition at line 90 of file Pythia8_i.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_mergingWeight

double Pythia8_i::m_mergingWeight {1.0}
privateinherited

Definition at line 157 of file Pythia8_i.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_multbcid

std::vector< float > MultiPy8Pileup::m_multbcid
private

Definition at line 40 of file MultiPy8Pileup.h.

◆ m_nAccepted

double Pythia8_i::m_nAccepted {0.}
privateinherited

Definition at line 130 of file Pythia8_i.h.

◆ m_nbad

int MultiPy8Pileup::m_nbad
private

Definition at line 44 of file MultiPy8Pileup.h.

◆ m_ncollevent

int MultiPy8Pileup::m_ncollevent
private

Definition at line 38 of file MultiPy8Pileup.h.

◆ m_ngen

int MultiPy8Pileup::m_ngen
private

Definition at line 43 of file MultiPy8Pileup.h.

◆ m_nMerged

double Pythia8_i::m_nMerged {0.}
privateinherited

Definition at line 131 of file Pythia8_i.h.

◆ m_numberAlphaS

DoubleProperty Pythia8_i::m_numberAlphaS {this,"numberAlphaS", 3.0}
protectedinherited

Definition at line 99 of file Pythia8_i.h.

◆ m_outputParticleDataFile

StringProperty Pythia8_i::m_outputParticleDataFile {this, "OutputParticleData", "ParticleData.local.xml"}
privateinherited

Definition at line 155 of file Pythia8_i.h.

◆ m_override_transform_beamenergy

bool Pythia8_i::m_override_transform_beamenergy {false}
privateinherited

Definition at line 122 of file Pythia8_i.h.

◆ m_particleDataFile

StringProperty Pythia8_i::m_particleDataFile {this, "ParticleData", ""}
privateinherited

Definition at line 154 of file Pythia8_i.h.

◆ m_particleIDs

std::map<std::string, PDGID> Pythia8_i::m_particleIDs
privateinherited

Definition at line 137 of file Pythia8_i.h.

◆ m_pileupProfile

std::vector< int > MultiPy8Pileup::m_pileupProfile
private

Definition at line 39 of file MultiPy8Pileup.h.

◆ m_pileupProfileIntegral

std::vector< double > MultiPy8Pileup::m_pileupProfileIntegral
private

Definition at line 49 of file MultiPy8Pileup.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_procPtr

std::shared_ptr<Pythia8::Sigma2Process> Pythia8_i::m_procPtr {}
privateinherited

Definition at line 144 of file Pythia8_i.h.

◆ m_pt0timesMPI

DoubleProperty Pythia8_i::m_pt0timesMPI {this,"pT0timesMPI", 1.0}
protectedinherited

Definition at line 98 of file Pythia8_i.h.

◆ m_pythia

std::unique_ptr<Pythia8::Pythia> Pythia8_i::m_pythia {}
protectedinherited

Definition at line 88 of file Pythia8_i.h.

◆ m_pythiaToHepMC

HepMC::Pythia8ToHepMC Pythia8_i::m_pythiaToHepMC
protectedinherited

Definition at line 89 of file Pythia8_i.h.

◆ m_randomSeed

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

Seed for random number engine.

Definition at line 84 of file GenModule.h.

◆ m_rndmSvc

ServiceHandle<IAthRNGSvc> GenModule::m_rndmSvc {this, "RndmSvc", "AthRNGSvc"}
privateinherited

Data members.

Definition at line 99 of file GenModule.h.

◆ m_sameAlphaSAsMPI

BooleanProperty Pythia8_i::m_sameAlphaSAsMPI {this,"useSameAlphaSasMPI", false}
protectedinherited

Definition at line 100 of file Pythia8_i.h.

◆ m_seeds

std::vector<long int> Pythia8_i::m_seeds {}
privateinherited

Definition at line 139 of file Pythia8_i.h.

◆ m_showerWeightNames

std::vector<std::string> Pythia8_i::m_showerWeightNames {"nominal"}
privateinherited

Definition at line 163 of file Pythia8_i.h.

◆ m_showerWeightNamesProp

StringArrayProperty Pythia8_i::m_showerWeightNamesProp {this, "ShowerWeightNames", {} }
privateinherited

Definition at line 164 of file Pythia8_i.h.

◆ m_sigmaTotal

double Pythia8_i::m_sigmaTotal {0.}
privateinherited

Definition at line 132 of file Pythia8_i.h.

◆ m_storeLHE

BooleanProperty Pythia8_i::m_storeLHE {this, "StoreLHE", false}
privateinherited

Definition at line 126 of file Pythia8_i.h.

◆ m_SuppressSmallPT

Pythia8::SuppressSmallPT* Pythia8_i::m_SuppressSmallPT
privateinherited

Definition at line 170 of file Pythia8_i.h.

◆ m_useLHAPDF

BooleanProperty Pythia8_i::m_useLHAPDF {this, "UseLHAPDF", true}
privateinherited

Definition at line 152 of file Pythia8_i.h.

◆ m_userHooks

StringArrayProperty Pythia8_i::m_userHooks {this, "UserHooks", {} }
protectedinherited

Definition at line 96 of file Pythia8_i.h.

◆ m_userHooksPtrs

std::vector<UserHooksPtrType> Pythia8_i::m_userHooksPtrs {}
privateinherited

Definition at line 146 of file Pythia8_i.h.

◆ m_userModes

std::vector<std::string> Pythia8_i::m_userModes
privateinherited

Definition at line 113 of file Pythia8_i.h.

◆ m_useRndmGenSvc

BooleanProperty Pythia8_i::m_useRndmGenSvc {this, "useRndmGenSvc", true, "the max number of consecutive failures"}
protectedinherited

Definition at line 92 of file Pythia8_i.h.

◆ m_userParams

std::vector<std::string> Pythia8_i::m_userParams
privateinherited

Definition at line 112 of file Pythia8_i.h.

◆ m_userProcess

StringProperty Pythia8_i::m_userProcess {this, "UserProcess", ""}
privateinherited

Definition at line 141 of file Pythia8_i.h.

◆ m_userResonancePtrs

std::vector<std::shared_ptr<Pythia8::ResonanceWidths> > Pythia8_i::m_userResonancePtrs
privateinherited

Definition at line 150 of file Pythia8_i.h.

◆ m_userResonances

StringProperty Pythia8_i::m_userResonances {this, "UserResonances", ""}
privateinherited

Definition at line 148 of file Pythia8_i.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_version

double Pythia8_i::m_version {-1.}
privateinherited

Definition at line 109 of file Pythia8_i.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_weightCommands

std::vector<std::string> Pythia8_i::m_weightCommands {}
privateinherited

Definition at line 162 of file Pythia8_i.h.

◆ m_weightIDs

std::vector<std::string> Pythia8_i::m_weightIDs {}
privateinherited

Definition at line 159 of file Pythia8_i.h.

◆ m_weightNames

std::vector<std::string> Pythia8_i::m_weightNames {}
privateinherited

Definition at line 160 of file Pythia8_i.h.


The documentation for this class was generated from the following files:
Pythia8_i::NEUTRON
@ NEUTRON
Definition: Pythia8_i.h:115
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
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
Pythia8_i::m_enhanceWeight
double m_enhanceWeight
Definition: Pythia8_i.h:158
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Pythia8_i::m_version
double m_version
Definition: Pythia8_i.h:109
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
MultiPy8Pileup::m_pileupProfileIntegral
std::vector< double > m_pileupProfileIntegral
Definition: MultiPy8Pileup.h:49
Pythia8_i::m_weightNames
std::vector< std::string > m_weightNames
Definition: Pythia8_i.h:160
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
GenModule::fillEvt
virtual StatusCode fillEvt(HepMC::GenEvent *evt)=0
For filling the HepMC event object.
MultiPy8Pileup::m_multbcid
std::vector< float > m_multbcid
Definition: MultiPy8Pileup.h:40
GenModule::callGenerator
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
Definition: GenModule.h:66
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
HepMC::signal_process_id
int signal_process_id(const GenEvent &e)
Definition: GenEvent.h:513
Pythia8_i::ELECTRON
@ ELECTRON
Definition: Pythia8_i.h:115
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
MultiPy8Pileup::m_evts
std::vector< HepMC::GenEvent * > m_evts
Definition: MultiPy8Pileup.h:47
GenModule::m_incidentSvc
ServiceHandle< IIncidentSvc > m_incidentSvc
Handle on the incident service.
Definition: GenModule.h:101
TH1D
Definition: rootspy.cxx:342
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
HepMC::PYTHIA8LHESTATUS
constexpr int PYTHIA8LHESTATUS
Definition: MagicNumbers.h:43
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
MM
@ MM
Definition: RegSelEnums.h:38
HepMC::newGenEvent
GenEvent * newGenEvent(const int a, const int b)
Definition: GenEvent.h:502
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
MultiPy8Pileup::m_file
TFile * m_file
Definition: MultiPy8Pileup.h:51
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
HepMC::fillBarcodesAttribute
void fillBarcodesAttribute(GenEvent *)
Definition: GenEvent.h:504
empty
bool empty(TH1 *h)
Definition: computils.cxx:294
python.DataFormatRates.events
events
Definition: DataFormatRates.py:105
MultiPy8Pileup::m_filename
std::string m_filename
Definition: MultiPy8Pileup.h:41
MultiPy8Pileup::m_htgPileupProfile
TH1D * m_htgPileupProfile
Definition: MultiPy8Pileup.h:52
Pythia8_i::ANTIPROTON
@ ANTIPROTON
Definition: Pythia8_i.h:115
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
GenModule::getRandomEngine
CLHEP::HepRandomEngine * getRandomEngine(const std::string &streamName, const EventContext &ctx) const
Definition: GenModule.cxx:34
Pythia8_i::ANTINEUTRON
@ ANTINEUTRON
Definition: Pythia8_i.h:115
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Pythia8_i::m_userHooksPtrs
std::vector< UserHooksPtrType > m_userHooksPtrs
Definition: Pythia8_i.h:146
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
PathResolverFindCalibDirectory
std::string PathResolverFindCalibDirectory(const std::string &logical_file_name)
Definition: PathResolver.cxx:432
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
Pythia8_i::m_doLHE3Weights
bool m_doLHE3Weights
Definition: Pythia8_i.h:161
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:269
GenModule::genuserInitialize
virtual StatusCode genuserInitialize()
For initialization of user code, if required. Called after genInitialize.
Definition: GenModule.h:64
GenModule::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Data members.
Definition: GenModule.h:99
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
GenModule::genInitialize
virtual StatusCode genInitialize()
For initializing the generator, if required.
Definition: GenModule.h:62
Pythia8_i::fillEvt
virtual StatusCode fillEvt(HepMC::GenEvent *evt)
For filling the HepMC event object.
Definition: Pythia8_i.cxx:422
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:92
Pythia8_i::m_showerWeightNames
std::vector< std::string > m_showerWeightNames
Definition: Pythia8_i.h:163
ret
T ret(T t)
Definition: rootspy.cxx:260
Atlas::ExtendedEventContext
Definition: ExtendedEventContext.h:23
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
GenBase::m_mcevents_const
SG::ReadHandleKey< McEventCollection > m_mcevents_const
Const handle to the MC event collection.
Definition: GenBase.h:163
GenModule::m_isAfterburner
BooleanProperty m_isAfterburner
Flag for normal vs. afterburner generators.
Definition: GenModule.h:87
Pythia8_i::callGenerator
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
Definition: Pythia8_i.cxx:356
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
Pythia8_i::genFinalize
virtual StatusCode genFinalize()
For finalising the generator, if required.
Definition: Pythia8_i.cxx:637
jobOptions.ParticleID
ParticleID
Definition: jobOptions.decayer.py:85
GenModule::genFinalize
virtual StatusCode genFinalize()
For finalising the generator, if required.
Definition: GenModule.h:70
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
Pythia8_i::m_lheFile
StringProperty m_lheFile
Definition: Pythia8_i.h:124
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
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
MultiPy8Pileup::m_nbad
int m_nbad
Definition: MultiPy8Pileup.h:44
Pythia8_i::m_weightIDs
std::vector< std::string > m_weightIDs
Definition: Pythia8_i.h:159
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
MultiPy8Pileup::m_ngen
int m_ngen
Definition: MultiPy8Pileup.h:43
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
MultiPy8Pileup::m_pileupProfile
std::vector< int > m_pileupProfile
Definition: MultiPy8Pileup.h:39
threshold
Definition: chainparser.cxx:74
TH1D::SetBinContent
void SetBinContent(int, double)
Definition: rootspy.cxx:348
Pythia8_i::LEAD
@ LEAD
Definition: Pythia8_i.h:115
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
MultiPy8Pileup::m_htgPileupEvents
TH1D * m_htgPileupEvents
Definition: MultiPy8Pileup.h:52
MultiPy8Pileup::m_htgPileupMu
TH1D * m_htgPileupMu
Definition: MultiPy8Pileup.h:52
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
Pythia8_i::INVALID
@ INVALID
Definition: Pythia8_i.h:115
Pythia8_i::Pythia8_i
Pythia8_i(const std::string &name, ISvcLocator *pSvcLocator)
Definition: Pythia8_i.cxx:68
MultiPy8Pileup::m_ncollevent
int m_ncollevent
Definition: MultiPy8Pileup.h:38
python.PyAthena.v
v
Definition: PyAthena.py:157
Pythia8_i::POSITRON
@ POSITRON
Definition: Pythia8_i.h:115
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
AthenaPoolExample_Copy.streamName
string streamName
Definition: AthenaPoolExample_Copy.py:39
Pythia8_i::m_mergingWeight
double m_mergingWeight
Definition: Pythia8_i.h:157
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
Pythia8_i::ANTIMUON
@ ANTIMUON
Definition: Pythia8_i.h:115
a
TList * a
Definition: liststreamerinfos.cxx:10
h
MultiPy8Pileup::nPileupEvents
int nPileupEvents(CLHEP::HepRandomEngine *rndmEngine)
Definition: MultiPy8Pileup.cxx:156
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
GenBase::pdt
const HepPDT::ParticleDataTable & pdt() const
Shorter alias to get a particle data table.
Definition: GenBase.h:123
Pythia8_i::m_conversion
double m_conversion
Definition: Pythia8_i.h:133
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
Pythia8_i::m_useRndmGenSvc
BooleanProperty m_useRndmGenSvc
Definition: Pythia8_i.h:92
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
HepMC::set_signal_process_id
void set_signal_process_id(GenEvent *e, const int i)
Definition: GenEvent.h:519
Pythia8_i::PROTON
@ PROTON
Definition: Pythia8_i.h:115
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
Pythia8_i::genInitialize
virtual StatusCode genInitialize()
For initializing the generator, if required.
Definition: Pythia8_i.cxx:96
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
readCCLHist.float
float
Definition: readCCLHist.py:83
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
Pythia8_i::m_internal_event_number
int m_internal_event_number
Definition: Pythia8_i.h:107
Pythia8_i::m_pythia
std::unique_ptr< Pythia8::Pythia > m_pythia
Definition: Pythia8_i.h:88
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
Pythia8_i::m_pythiaToHepMC
HepMC::Pythia8ToHepMC m_pythiaToHepMC
Definition: Pythia8_i.h:89
GenParticle
@ GenParticle
Definition: TruthClasses.h:30
LB_AnalMapSplitter.lbn
lbn
Definition: LB_AnalMapSplitter.py:28
ServiceHandle< ICondSvc >