ATLAS Offline Software
Loading...
Searching...
No Matches
Pythia8_i Class Reference

#include <Pythia8_i.h>

Inheritance diagram for Pythia8_i:
Collaboration diagram for Pythia8_i:

Classes

class  CommandException

Public Member Functions

 Pythia8_i (const std::string &name, ISvcLocator *pSvcLocator)
 ~Pythia8_i ()
virtual StatusCode genInitialize ()
 For initializing the generator, if required.
virtual StatusCode callGenerator ()
 For calling the generator on each iteration of the event loop.
virtual StatusCode fillEvt (HepMC::GenEvent *evt)
 For filling the HepMC event object.
virtual StatusCode fillWeights (HepMC::GenEvent *evt)
virtual StatusCode genFinalize ()
 For finalising the generator, if required.
double pythiaVersion () const
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
Event loop algorithm methods: not to be overloaded
StatusCode initialize ()
StatusCode execute (const EventContext &ctx)
 Execute method.
StatusCode finalize ()
Gen-specific event loop methods: to be overloaded
virtual StatusCode genuserInitialize ()
 For initialization of user code, if required. Called after genInitialize.
Event collection accessors (const and non-const)
HepMC::GenEvent *event ATLAS_NOT_CONST_THREAD_SAFE ()
 Access the current signal event (first in the McEventCollection).
McEventCollection *events ATLAS_NOT_CONST_THREAD_SAFE ()
 Access the current event's McEventCollection.
const HepMC::GenEventevent_const (const EventContext &ctx) const
 Access the current signal event (const).
const McEventCollectionevents_const (const EventContext &ctx) const
 Access the current event's McEventCollection (const).

Static Public Member Functions

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

Protected Member Functions

bool useRndmGenSvc () const
bool useReseed () const
virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

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 {}
BooleanProperty m_useReseed {this,"useReseed", false}
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 , INDIUM =1000491150 ,
  KRYPTON =1000360840 , CALCIUM =1000200400 , ARGON =1000180400 , MAGNESIUM =1000120240 ,
  NEON =1000100200 , OXYGEN =1000080160 , BORON =1000050110 , HELIUM = 1000020040 ,
  NEUTRON =2112 , ANTINEUTRON =-2112 , MUON =13 , ANTIMUON =-13 ,
  ELECTRON =11 , POSITRON =-11 , INVALID =0
}
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

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_internal_event_number {0}
double m_version {-1.}
StringArrayProperty m_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_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", ""}
BooleanProperty m_saveLHE {this, "SaveLHERecord", false}
Pythia8::SuppressSmallPT * m_SuppressSmallPT {}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Features for derived classes to use internally

IntegerProperty m_randomSeed {this, "RandomSeed", 1234567, "Random seed for the built-in random engine"}
 Seed for random number engine.
BooleanProperty m_isAfterburner {this, "IsAfterburner", false, "Set true if generator modifies existing events rather than creating new ones"}
 Flag for normal vs. afterburner generators.
std::shared_ptr< HepMC3::GenRunInfo > m_runinfo {}
 The run info for HepMC3.
ServiceHandle< IAthRNGSvcm_rndmSvc {this, "RndmSvc", "AthRNGSvc"}
 Data members.
ServiceHandle< IIncidentSvc > m_incidentSvc {this, "IncidentSvc", "IncidentSvc"}
 Handle on the incident service.
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

Properties

std::string m_mcEventKey {}
 StoreGate key for the MC event collection (defaults to GEN_EVENT).
BooleanProperty m_mkMcEvent {this, "MakeMcEvent", false, "Create a new MC event collection if it doesn't exist"}
 Flag to determine if a new MC event collection should be made if it doesn't exist.
SG::ReadHandleKey< McEventCollectionm_mcevents_const { this, "McEventKey", "GEN_EVENT", "StoreGate key of the MC event collection" }
 Const handle to the MC event collection.

Detailed Description

Definition at line 58 of file Pythia8_i.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ PDGID

enum Pythia8_i::PDGID
private
Enumerator
PROTON 
ANTIPROTON 
LEAD 
INDIUM 
KRYPTON 
CALCIUM 
ARGON 
MAGNESIUM 
NEON 
OXYGEN 
BORON 
HELIUM 
NEUTRON 
ANTINEUTRON 
MUON 
ANTIMUON 
ELECTRON 
POSITRON 
INVALID 

Definition at line 124 of file Pythia8_i.h.

124{PROTON=2212, ANTIPROTON=-2212, LEAD=1000822080, INDIUM=1000491150, KRYPTON=1000360840, CALCIUM=1000200400, ARGON=1000180400, MAGNESIUM=1000120240, NEON=1000100200, OXYGEN=1000080160, BORON=1000050110, HELIUM= 1000020040, NEUTRON=2112, ANTINEUTRON=-2112, MUON=13, ANTIMUON=-13, ELECTRON=11, POSITRON=-11, INVALID=0};

Constructor & Destructor Documentation

◆ Pythia8_i()

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

Definition at line 68 of file Pythia8_i.cxx.

69: GenModule(name, pSvcLocator)
70{
71 m_particleIDs["PROTON"] = PROTON;
72 m_particleIDs["ANTIPROTON"] = ANTIPROTON;
73 m_particleIDs["ELECTRON"] = ELECTRON;
74 m_particleIDs["POSITRON"] = POSITRON;
75 m_particleIDs["NEUTRON"] = NEUTRON;
76 m_particleIDs["ANTINEUTRON"] = ANTINEUTRON;
77 m_particleIDs["MUON"] = MUON;
78 m_particleIDs["ANTIMUON"] = ANTIMUON;
79 m_particleIDs["LEAD"] = LEAD;
80 m_particleIDs["INDIUM"] = INDIUM;
81 m_particleIDs["KRYPTON"] = KRYPTON;
82 m_particleIDs["CALCIUM"] = CALCIUM;
83 m_particleIDs["ARGON"] = ARGON;
84 m_particleIDs["MAGNESIUM"] = MAGNESIUM;
85 m_particleIDs["NEON"] = NEON;
86 m_particleIDs["OXYGEN"] = OXYGEN;
87 m_particleIDs["BORON"] = BORON;
88 m_particleIDs["HELIUM"] = HELIUM;
89
90}
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition GenModule.cxx:14
std::map< std::string, PDGID > m_particleIDs
Definition Pythia8_i.h:145

◆ ~Pythia8_i()

Pythia8_i::~Pythia8_i ( )

Definition at line 93 of file Pythia8_i.cxx.

93 {
94
95 #ifndef PYTHIA8_3SERIES
96// if(m_userHookPtr != 0) delete m_userHookPtr;
97
98// for(UserHooksPtrType ptr: m_userHooksPtrs){
99// delete ptr;
100// }
101 #endif
102}

Member Function Documentation

◆ ATLAS_NOT_CONST_THREAD_SAFE() [1/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.

◆ ATLAS_NOT_CONST_THREAD_SAFE() [2/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 72 of file GenBase.h.

72 {
73 if (events()->empty())
74 ATH_MSG_ERROR("McEventCollection is empty during first event access");
75 return *(events()->begin());
76 }
#define ATH_MSG_ERROR(x)
static const Attributes_t empty

◆ callGenerator()

StatusCode Pythia8_i::callGenerator ( )
virtual

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

Reimplemented from GenModule.

Reimplemented in MultiPy8Pileup, and Pythia8B_i.

Definition at line 372 of file Pythia8_i.cxx.

372 {
373
374 ATH_MSG_DEBUG(">>> Pythia8_i from callGenerator");
376 //Re-seed the random number stream
377 long seeds[7];
378 const EventContext& ctx = Gaudi::Hive::currentContext();
379 ATHRNG::calculateSeedsMC21(seeds, s_pythia_stream, ctx.eventID().event_number(), m_dsid, m_randomSeed);
380 m_atlasRndmEngine->getEngine()->setSeeds(seeds, 0); // NOT THREAD-SAFE
381 m_seeds.clear();
382 m_seeds.push_back(seeds[0]);
383 m_seeds.push_back(seeds[1]);
384 }
385
386 bool status = m_pythia->next();
387
388 StatusCode returnCode = StatusCode::SUCCESS;
389
390 if(!status){
393 ATH_MSG_ERROR("Exceeded the max number of consecutive event failures.");
394 returnCode = StatusCode::FAILURE;
395 }else{
396 ATH_MSG_INFO("Event generation failed - re-trying.");
397 returnCode = this->callGenerator();
398 }
399 }
400
401 ATH_MSG_DEBUG("Now checking with Tool.empty() second time");
402 if( ! m_athenaTool.empty() ){
403 StatusCode stat = m_athenaTool->ModifyPythiaEvent(*m_pythia);
404 if(stat != StatusCode::SUCCESS) returnCode = stat;
405 }
406
407 m_failureCount = 0;
408
409 m_nAccepted += 1.;
410 // some CKKWL merged events have zero weight (or unfilled event).
411 // start again with such events
412
413 double eventWeight = m_pythia->info.mergingWeight()*m_pythia->info.weight();
414
415
416 if(returnCode != StatusCode::FAILURE &&
417 // Here this is a double, but it may be converted into float at some point downstream
418 (std::abs(eventWeight) < std::numeric_limits<float>::min() ||
419 m_pythia->event.size() < 2)){
420
421 returnCode = this->callGenerator();
422 } else if ( std::abs(eventWeight) < std::numeric_limits<float>::min() &&
423 std::abs(eventWeight) > std::numeric_limits<double>::min() ){
424 ATH_MSG_WARNING("Found event weight " << eventWeight << " between the float and double precision limits. Rejecting event.");
425 } else {
426 m_nMerged += eventWeight;
428
429 // For FxFx cross section:
430 m_sigmaTotal+=m_pythia->info.weight();
431 }
432
433 return returnCode;
434}
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
IntegerProperty m_randomSeed
Seed for random number engine.
Definition GenModule.h:84
IntegerProperty m_dsid
Definition Pythia8_i.h:97
BooleanProperty m_useReseed
Definition Pythia8_i.h:95
double m_nAccepted
Definition Pythia8_i.h:138
unsigned int m_failureCount
Definition Pythia8_i.h:143
double m_sigmaTotal
Definition Pythia8_i.h:140
double m_nMerged
Definition Pythia8_i.h:139
PublicToolHandle< IPythia8Custom > m_athenaTool
Definition Pythia8_i.h:174
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
std::vector< long int > m_seeds
Definition Pythia8_i.h:147
int m_internal_event_number
Definition Pythia8_i.h:108
std::shared_ptr< customRndm > m_atlasRndmEngine
Definition Pythia8_i.h:93
std::unique_ptr< Pythia8::Pythia > m_pythia
Definition Pythia8_i.h:88
UnsignedIntegerProperty m_maxFailures
Definition Pythia8_i.h:90
BooleanProperty m_useRndmGenSvc
Definition Pythia8_i.h:92
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.
::StatusCode StatusCode
StatusCode definition for legacy code.
status
Definition merge.py:16

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

◆ event_const()

const HepMC::GenEvent * GenBase::event_const ( const EventContext & ctx) const
inlineinherited

Access the current signal event (const).

Definition at line 79 of file GenBase.h.

79 {
80 const McEventCollection* coll = events_const(ctx);
81 if (coll->empty())
82 ATH_MSG_ERROR("Const McEventCollection is empty during first event access");
83 return *(coll->begin());
84 }
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
bool empty() const noexcept
Returns true if the collection is empty.
const McEventCollection * events_const(const EventContext &ctx) const
Access the current event's McEventCollection (const).
Definition GenBase.h:93

◆ events_const()

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

Access the current event's McEventCollection (const).

Definition at line 93 of file GenBase.h.

93 {
94 SG::ReadHandle<McEventCollection> ret = SG::makeHandle(m_mcevents_const, ctx);
95 if (!ret.isValid())
96 ATH_MSG_ERROR("No McEventCollection found in StoreGate with key " << m_mcevents_const.key());
97 return ret.cptr();
98 }
SG::ReadHandleKey< McEventCollection > m_mcevents_const
Const handle to the MC event collection.
Definition GenBase.h:117
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())

◆ evtStore()

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

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

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode GenModule::execute ( const EventContext & ctx)
virtualinherited

Execute method.

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 //CLHEP::HepRandomEngine* rndmEngine = this->getRandomEngine("MyStream", ctx);
79
80 // Example 2 - seeded based on the m_randomSeed property (+ slot, run, streamName)
81 //CLHEP::HepRandomEngine* rndmEngine = this->getRandomEngine("MyStream", m_randomSeed.value(), ctx);
82
83 // Call the code that generates an event
84 CHECK(this->callGenerator());
85
86 // Create the MC event and send the GeneratorEvent stored in it to fillEvt
88 CHECK(this->fillEvt(evt));
90
91 // Add the event to the MC event collection
92 if (events()) {
93 // If this is an "afterburner" generator, replace the last event rather than add a new one
95 if (m_isAfterburner.value() || name() == "Tauola" || name() == "Photos") {
96 events()->pop_back();
97 }
98 // Add the event to the end of the collection
99 events()->push_back(evt);
100 ATH_MSG_DEBUG("MC event added to McEventCollection");
101
102 // remove the empty event in case of ParticleDecayer
103 if (name() == "ParticleDecayer") {
104 events()->pop_back();
105 }
106 }
107
108 // Call the incident service to notify that an event has been made
109 m_incidentSvc->fireIncident( Incident(name(), "McEventGenerated") );
110 return StatusCode::SUCCESS;
111}
#define CHECK(...)
Evaluate an expression and check for errors.
ServiceHandle< IIncidentSvc > m_incidentSvc
Handle on the incident service.
Definition GenModule.h:99
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
Definition GenModule.h:66
virtual StatusCode fillEvt(HepMC::GenEvent *evt)=0
For filling the HepMC event object.
BooleanProperty m_isAfterburner
Flag for normal vs. afterburner generators.
Definition GenModule.h:87
void fillBarcodesAttribute(GenEvent *e)
Definition GenEvent.h:393
GenEvent * newGenEvent(const int signal_process_id, const int event_number)
Definition GenEvent.h:360
HepMC3::GenEvent GenEvent
Definition GenEvent.h:39

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::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 & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ fillEvt()

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

For filling the HepMC event object.

Implements GenModule.

Reimplemented in MultiPy8Pileup, and Pythia8B_i.

Definition at line 437 of file Pythia8_i.cxx.

437 {
438
439 ATH_MSG_DEBUG(">>> Pythia8_i from fillEvt");
440
441 evt->set_event_number(m_internal_event_number);
442
443 // if using "getGroupWeight" and | lhastrategy | = 4, then need to convert mb to pb ( done otherwise when calling info.weight(), [...] )
444 if( m_internal_event_number == 1 && std::abs(m_pythia->info.lhaStrategy()) == 4 ) {
446 ATH_MSG_DEBUG(" LHA strategy needs a conversion to fix Pythia8 shower weights bug(s) equal to " << m_conversion);
447 }
448
449
450 if(m_pythia->event.size() < 2){
451 ATH_MSG_ERROR("Something wrong with this event - it contains fewer than 2 particles!");
452 ATH_MSG_ERROR("internal event number is "<<m_internal_event_number);
453 return StatusCode::FAILURE;
454 }
455
456 m_pythiaToHepMC.fill_next_event(*m_pythia, evt, m_internal_event_number);
457
458 // In case we're asked, save the LHE event as an attribute.
459 if(m_saveLHE){
460 auto evtlhe = std::make_shared<HepMC::GenEvent>();
461 m_pythiaToHepMC.fill_next_event(m_pythia->process, evtlhe.get(), m_internal_event_number, &m_pythia->info, &m_pythia->settings);
462 auto extra = std::make_shared<HepMC::ShortEventAttribute>(evtlhe.get());
463 evt->add_attribute(HepMCStr::LHERecord, extra);
464 }
465
466 // in debug mode you can check whether the pdf information is stored
467 if(evt->pdf_info()){
468 ATH_MSG_DEBUG("PDFinfo id1:" << evt->pdf_info()->parton_id[0]);
469 ATH_MSG_DEBUG("PDFinfo id2:" << evt->pdf_info()->parton_id[1]);
470 ATH_MSG_DEBUG("PDFinfo x1:" << evt->pdf_info()->x[0]);
471 ATH_MSG_DEBUG("PDFinfo x2:" << evt->pdf_info()->x[1]);
472 ATH_MSG_DEBUG("PDFinfo scalePDF:" << evt->pdf_info()->scale);
473 ATH_MSG_DEBUG("PDFinfo pdf1:" << evt->pdf_info()->pdf_id[0]);
474 ATH_MSG_DEBUG("PDFinfo pdf2:" << evt->pdf_info()->pdf_id[1]);
475 }
476 else
477 ATH_MSG_DEBUG("No PDF information available in HepMC::GenEvent!");
478
479 // set the randomseeds
481
482 // fill weights
484
485 return StatusCode::SUCCESS;
486}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define PYTHIA8_CONVERSION
Definition Pythia8_i.cxx:32
virtual StatusCode fillWeights(HepMC::GenEvent *evt)
BooleanProperty m_saveLHE
Definition Pythia8_i.h:176
HepMC::Pythia8ToHepMC m_pythiaToHepMC
Definition Pythia8_i.h:89
double m_conversion
Definition Pythia8_i.h:141
void set_random_states(GenEvent *e, std::vector< long int > &a)
Definition GenEvent.h:588

◆ fillWeights()

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

mismatch in weight name!

Definition at line 489 of file Pythia8_i.cxx.

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

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode GenModule::finalize ( )
inlineinherited

Definition at line 55 of file GenModule.h.

55{ return genFinalize(); }
virtual StatusCode genFinalize()
For finalising the generator, if required.
Definition GenModule.h:70

◆ findValue()

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

◆ genFinalize()

StatusCode Pythia8_i::genFinalize ( )
virtual

For finalising the generator, if required.

Reimplemented from GenModule.

Reimplemented in MultiPy8Pileup, and Pythia8B_i.

Definition at line 637 of file Pythia8_i.cxx.

637 {
638
639 ATH_MSG_INFO(">>> Pythia8_i from genFinalize");
640 m_pythia->stat();
641
642 Pythia8::Info info = m_pythia->info;
643 double xs = info.sigmaGen(); // in mb
644
646 const double accfactor = m_nMerged / info.nAccepted();
647 ATH_MSG_DEBUG("Multiplying cross-section by CKKWL merging acceptance of "<<m_nMerged <<"/" <<info.nAccepted() << " = " << accfactor
648 << ": " << xs << " -> " << xs*accfactor);
649 xs *= accfactor;
650 }
651
652 if(m_doFxFxXS){
653 ATH_MSG_DEBUG("Using FxFx cross section recipe: xs = "<< m_sigmaTotal << " / " << 1e9*info.nTried());
654 xs = m_sigmaTotal / (1e9*info.nTried());
655 std::cout << "Using FxFx cross section recipe: xs = "<< m_sigmaTotal << " / " << 1e9*info.nTried() << std::endl;
656 }
657
658 if( ! m_athenaTool.empty()){
659 double xsmod = m_athenaTool->CrossSectionScaleFactor();
660 ATH_MSG_DEBUG("Multiplying cross-section by Pythia Modifier tool factor " << xsmod );
661 xs *= xsmod;
662 }
663
664 xs *= 1000. * 1000.;//convert to nb
665
666 std::cout << "MetaData: cross-section (nb)= " << xs <<std::endl;
667 std::cout << "MetaData: generator= Pythia 8." << std::string(py8version()) <<std::endl;
668
669 if(m_doLHE3Weights || m_weightIDs.size()>1 ){
670 std::cout<<"MetaData: weights = ";
671 for (const auto& w : m_weightNames ) std::cout<< w <<" | ";
672 std::cout<<std::endl;
673 }
674
676 if (info.nTried()>0) ATH_MSG_INFO("Pythia8 efficiency (nAccepted/nTried %) = " << info.nAccepted()*100./info.nTried());
677 else ATH_MSG_INFO("Pythia8 efficiency cannot be computed, nTried <=0");
678 }
679
681 ATH_MSG_INFO("Number of random numbers produced " << m_atlasRndmEngine->getRNCalls());
682 if (m_useReseed) ATH_MSG_INFO("Each event was reseeded ");
683 else ATH_MSG_INFO("Events were not reseeded ");
684}
685
686 return StatusCode::SUCCESS;
687}
BooleanProperty m_computeEfficiency
Definition Pythia8_i.h:137
BooleanProperty m_doFxFxXS
Definition Pythia8_i.h:136
BooleanProperty m_doCKKWLAcceptance
Definition Pythia8_i.h:135

◆ genInitialize()

StatusCode Pythia8_i::genInitialize ( )
virtual

For initializing the generator, if required.

Here one can fill extra information, e.g. the used tools in a format generator name, version string, comment.

Reimplemented from GenModule.

Reimplemented in MultiPy8Pileup, and Pythia8B_i.

Definition at line 105 of file Pythia8_i.cxx.

105 {
106
107 ATH_MSG_DEBUG("Pythia8_i from genInitialize()");
108
109 ATH_MSG_INFO("XML Path is " + xmlpath());
110 m_pythia = std::make_unique<Pythia8::Pythia> (xmlpath());
111 m_runinfo = std::make_shared<HepMC3::GenRunInfo>();
113 struct HepMC3::GenRunInfo::ToolInfo generator={std::string("Pythia8"),py8version(),std::string("Used generator")};
114 m_runinfo->tools().push_back(std::move(generator));
115
116 bool canInit = true;
117
118 m_version = m_pythia->settings.parm("Pythia:versionNumber");
119
120 s_pythia_stream = "PYTHIA8_INIT";
121
122 // By default add "nominal" to the list of shower weight names
124 m_showerWeightNames.insert(m_showerWeightNames.begin(), "nominal");
125
126 // We do explicitly set tune 4C, since it is the starting point for many other tunes
127 // Tune 4C for pp collisions
128 m_pythia->readString("Tune:pp = 5");
129
130 // also use CTEQ6L1 from LHAPDF 6 by default
131 // can be over-written using JO
132 m_pythia->readString("PDF:pSet= LHAPDF6:cteq6l1");
133
134 // switch off verbose event print out
135 m_pythia->readString("Next:numberShowEvent = 0");
136
137 // Add flag to switch off from JO the Pythia8ToHepMC::print_inconsistency internal variable
138 m_pythia->settings.addFlag("AthenaPythia8ToHepMC:print_inconsistency",true);
139
140 // Revert the recoil strategy to the old default of 1, ie. 'recoil to color'
141 // In 8.314, the default option was changed to 0, 'recoil to top' and we
142 // revert it back unless 'recoil to top'
143 // is explicitly needed for the samples
144 if (m_version > 8.313) m_pythia->readString("TimeShower:recoilStrategyRF = 1");
145
146 // Add UserHooks first because these potentially add new settings that must exist prior to parsing commands
147
148 for(const auto &hook: m_userHooks){
149 ATH_MSG_INFO("Adding user hook " + hook + ".");
150 bool canSetHook = true;
151 if (hook == "SuppressSmallPT") {
152 m_SuppressSmallPT = new Pythia8::SuppressSmallPT(m_pt0timesMPI,m_numberAlphaS,m_sameAlphaSAsMPI);
153 canSetHook=m_pythia->setUserHooksPtr(PYTHIA8_PTRWRAP(m_SuppressSmallPT));
154}
155 else {
157 canSetHook = m_pythia->addUserHooksPtr(m_userHooksPtrs.back());
158}
159 if(!canSetHook){
160 ATH_MSG_ERROR("Unable to set requested user hook.");
161 ATH_MSG_ERROR("Pythia 8 initialisation will FAIL!");
162 canInit=false;
163 }
164 }
165
166 for(const std::pair<const std::string, double> &param : Pythia8_UserHooks::UserHooksFactory::userSettings<double>()){
167 m_pythia->settings.addParm(param.first, param.second, false, false, 0., 0.);
168 }
169
170 for(const std::pair<const std::string, int> &param : Pythia8_UserHooks::UserHooksFactory::userSettings<int>()){
171 m_pythia->settings.addMode(param.first, param.second, false, false, 0., 0.);
172 }
173
174 for(const std::pair<const std::string, bool> &param : Pythia8_UserHooks::UserHooksFactory::userSettings<bool>()){
175 m_pythia->settings.addFlag(param.first, param.second);
176 }
177
178 for(const std::pair<const std::string, std::string> &param : Pythia8_UserHooks::UserHooksFactory::userSettings<std::string>()){
179 m_pythia->settings.addWord(param.first, param.second);
180 }
181
182 if( ! m_athenaTool.empty() ){
183 if(m_athenaTool.retrieve().isFailure()){
184 ATH_MSG_ERROR("Unable to retrieve Athena Tool for custom Pythia processing");
185 return StatusCode::FAILURE;
186 }
187 else {
188 StatusCode status = m_athenaTool->InitializePythiaInfo(*m_pythia);
189 if(status != StatusCode::SUCCESS) return status;
190 }
191 }
192
193 // Now apply the settings from the JO
194 for(const std::string &cmd : m_commands){
195
196 if(cmd.compare("")==0) continue;
197 else if (cmd.find("Beams:id") != std::string::npos ) {
198 ATH_MSG_ERROR("With command '" << cmd << "' you are trying to set a beam different from p: please use the Beam1/Beam2 properties instead:");
199 ATH_MSG_ERROR(" example: genSeq.Pythia8.Beam1 = 'LEAD'");
200 ATH_MSG_ERROR(" genSeq.Pythia8.Beam2 = 'ANTINEUTRON'");
201 return StatusCode::FAILURE;
202 }
203 else if (cmd.find("Beams:frameType") != std::string::npos ) {
205 ATH_MSG_WARNING(" Found an explicit 'Beams:frameType' command: this will override transform beams momenta/energy parameters, regardless of its requested value. ");
206 }
207
208 bool read = m_pythia->readString(cmd);
209
210 if(!read){
211 ATH_MSG_ERROR("Pythia could not understand the command '"<< cmd<<"'");
212 return StatusCode::FAILURE;
213 }
214 }
215
218
219 ATH_MSG_INFO("Beam1 = "<<beam1);
220 ATH_MSG_INFO("Beam2 = "<<beam2);
221
222 if(beam1 == 0 || beam2 == 0){
223 ATH_MSG_ERROR("Invalid beam particle!");
224 return StatusCode::FAILURE;
225 }
226
227
228
229 if(m_useRndmGenSvc){
230
231 ATH_MSG_INFO(" !!!!!!!!!!!! WARNING ON PYTHIA RANDOM NUMBERS !!!!!!!!!! ");
232 ATH_MSG_INFO(" THE ATHENA SERVICE AthRNGenSvc IS USED.");
233 ATH_MSG_INFO(" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ");
234
235 m_atlasRndmEngine = std::make_shared<customRndm>();
236 CLHEP::HepRandomEngine* rndmEngine = getRandomEngineDuringInitialize(s_pythia_stream, m_randomSeed, m_dsid); // NOT THREAD-SAFE
237 m_atlasRndmEngine->init(rndmEngine);
238#if PYTHIA_VERSION_INTEGER >= 8310
239 m_pythia->setRndmEnginePtr(m_atlasRndmEngine);
240#else
241 m_pythia->setRndmEnginePtr(m_atlasRndmEngine.get());
242#endif
243 s_pythia_stream = "PYTHIA8";
244 }else{
245 ATH_MSG_INFO(" !!!!!!!!!!!! WARNING ON PYTHIA RANDOM NUMBERS !!!!!!!!!! ");
246 ATH_MSG_INFO(" THE STANDARD PYTHIA8 RANDOM NUMBER SERVICE IS USED.");
247 ATH_MSG_INFO(" THE ATHENA SERVICE AthRNGSvc IS ***NOT*** USED.");
248 ATH_MSG_INFO(" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ");
249 }
250
251 if(m_userProcess != ""){
253 }
254
255
256
257 if(m_userResonances.value() != ""){
258
259 std::vector<std::string> resonanceArgs;
260
261 for (auto&& part : std::views::split(m_userResonances.value(), ':')) resonanceArgs.emplace_back(part.begin(), part.end());
262 if(resonanceArgs.size() != 2){
263 ATH_MSG_ERROR("Cannot Understand UserResonance job option!");
264 ATH_MSG_ERROR("You should specify it as a 'name:id1,id2,id3...'");
265 ATH_MSG_ERROR("Where name is the name of your UserResonance, and id1,id2,id3 are a comma separated list of PDG IDs to which it is applied");
266 canInit = false;
267 }
268 std::vector<std::string> resonanceIds;
269 for (auto&& part : std::views::split(resonanceArgs.back(), ',')) resonanceIds.emplace_back(part.begin(), part.end());
270 if(resonanceIds.size()==0){
271 ATH_MSG_ERROR("You did not specifiy any PDG ids to which your user resonance width should be applied!");
272 ATH_MSG_ERROR("You should specify a list as 'name:id1,id2,id3...'");
273 ATH_MSG_ERROR("Where name is the name of your UserResonance, and id1,id2,id3 are a comma separated list of PDG IDs to which it is applied");
274 canInit=false;
275 }
276
277 for(std::vector<std::string>::const_iterator sId = resonanceIds.begin();
278 sId != resonanceIds.end(); ++sId){
279 int idResIn = 0;
280 auto result = std::from_chars(sId->data(), sId->data() + sId->size(), idResIn);
281 if (result.ec != std::errc()) {
282 ATH_MSG_ERROR("Invalid resonance ID: " + *sId);
283 }
284 m_userResonancePtrs.push_back(Pythia8_UserResonance::UserResonanceFactory::create(resonanceArgs.front(), idResIn));
285 }
286
287 for(std::shared_ptr<Pythia8::ResonanceWidths>& resonance : m_userResonancePtrs) {
288#if PYTHIA_VERSION_INTEGER >= 8310
289 m_pythia->setResonancePtr(resonance);
290#else
291 m_pythia->setResonancePtr(resonance.get());
292#endif
293 }
294
295 }
296
297 if(m_particleDataFile != "") {
298 if(!m_pythia->particleData.reInit(m_particleDataFile, true)){
299 ATH_MSG_ERROR("Unable to read requested particle data table: " + m_particleDataFile + " !!");
300 ATH_MSG_ERROR("Pythia 8 initialisation will FAIL!");
301 canInit = false;
302 }
303 }
304
305 if(m_lheFile != ""){
306 if(m_procPtr){
307 ATH_MSG_ERROR("Both LHE file and user process have been specified");
308 ATH_MSG_ERROR("LHE input does not make sense with a user process!");
309 canInit = false;
310 }
311
312 canInit = canInit && m_pythia->readString("Beams:frameType = 4");
313 canInit = canInit && m_pythia->readString("Beams:LHEF = " + m_lheFile);
314 if(!canInit){
315 ATH_MSG_ERROR("Unable to read requested LHE file: " + m_lheFile + " !");
316 ATH_MSG_ERROR("Pythia 8 initialisation will FAIL!");
317 }
318 }else{
320 canInit = canInit && m_pythia->readString("Beams:frameType = 1");
321 canInit = canInit && m_pythia->readString("Beams:eCM = " + std::to_string(m_collisionEnergy));
322 }
323 canInit = canInit && m_pythia->readString("Beams:idA = " + std::to_string(beam1));
324 canInit = canInit && m_pythia->readString("Beams:idB = " + std::to_string(beam2));
325 }
326
327 if(m_procPtr){
328#if PYTHIA_VERSION_INTEGER >= 8310
329 if(!m_pythia->setSigmaPtr(m_procPtr))
330#else
331 if(!m_pythia->setSigmaPtr(m_procPtr.get()))
332#endif
333 {
334 ATH_MSG_ERROR("Unable to set requested user process: " + m_userProcess + " !!");
335 ATH_MSG_ERROR("Pythia 8 initialisation will FAIL!");
336 canInit = false;
337 }
338 }
339
340 StatusCode returnCode = StatusCode::SUCCESS;
341
342 m_pythia->particleData.listXML(m_outputParticleDataFile.value().substr(0,m_outputParticleDataFile.value().find("xml"))+"orig.xml");
343 m_pythia->settings.writeFile("Settings_before.log",true);
344
345 if(canInit){
346 canInit = m_pythia->init();
347 }
348
349 if(!canInit){
350 returnCode = StatusCode::FAILURE;
351 ATH_MSG_ERROR(" *** Unable to initialise Pythia !! ***");
352 }
353
354 m_pythia->particleData.listXML(m_outputParticleDataFile);
355 m_pythia->settings.writeFile("Settings_after.log",true);
356
357 //counter for event failures;
358 m_failureCount = 0;
359
361
362 // Set set_print_inconsistency to Athena corresponding flag (allowing to change it from JO)
363 m_pythiaToHepMC.set_print_inconsistency( m_pythia->settings.flag("AthenaPythia8ToHepMC:print_inconsistency") );
364
365 m_pythiaToHepMC.set_store_pdf(true);
366 m_pythiaToHepMC.set_store_weights(false);
367
368 return returnCode;
369}
#define PYTHIA8_PTRWRAP(A)
CLHEP::HepRandomEngine * getRandomEngineDuringInitialize(const std::string &streamName, unsigned long int randomSeedOffset, unsigned int conditionsRun=1, unsigned int lbn=1) const
Definition GenModule.cxx:53
static std::map< std::string, T > & userSettings()
static UserHooks * create(const std::string &hookName)
static std::shared_ptr< Sigma2Process > create(const std::string &procName)
static std::shared_ptr< ResonanceWidths > create(const std::string &name, int pdgid)
Call this with the name of the ResonanceWidth and PDG ID to which it will be applied e....
bool m_override_transform_beamenergy
Definition Pythia8_i.h:131
BooleanProperty m_sameAlphaSAsMPI
Definition Pythia8_i.h:102
StringProperty m_userProcess
Definition Pythia8_i.h:149
static std::string xmlpath()
DoubleProperty m_numberAlphaS
Definition Pythia8_i.h:101
Pythia8::SuppressSmallPT * m_SuppressSmallPT
Definition Pythia8_i.h:180
DoubleProperty m_collisionEnergy
Definition Pythia8_i.h:126
StringProperty m_beam1
Definition Pythia8_i.h:129
std::vector< std::shared_ptr< Pythia8::ResonanceWidths > > m_userResonancePtrs
Definition Pythia8_i.h:158
std::shared_ptr< Pythia8::Sigma2Process > m_procPtr
Definition Pythia8_i.h:152
StringProperty m_userResonances
Definition Pythia8_i.h:156
DoubleProperty m_pt0timesMPI
Definition Pythia8_i.h:100
StringArrayProperty m_userHooks
Definition Pythia8_i.h:98
StringProperty m_beam2
Definition Pythia8_i.h:130
double m_version
Definition Pythia8_i.h:110
StringProperty m_particleDataFile
Definition Pythia8_i.h:162
StringArrayProperty m_showerWeightNamesProp
Definition Pythia8_i.h:172
StringProperty m_outputParticleDataFile
Definition Pythia8_i.h:163
StringArrayProperty m_commands
Definition Pythia8_i.h:116
generator
Configure Herwig7 These are the commands corresponding to what would go into the regular Herwig infil...
IovVectorMap_t read(const Folder &theFolder, const SelectionCriterion &choice, const unsigned int limit=10)

◆ 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}
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition RNGWrapper.h:154
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition RNGWrapper.h:108
ServiceHandle< IAthRNGSvc > m_rndmSvc
Data members.
Definition GenModule.h:97

◆ 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}
ServiceHandle< StoreGateSvc > & evtStore()
CLHEP::HepRandomEngine * getRandomEngine(const std::string &streamName, const EventContext &ctx) const
Definition GenModule.cxx:34
void setExtendedEventContext(EventContext &ctx, ExtendedEventContext &&ectx)
Move an extended context into a context object.

◆ 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}
virtual StatusCode initialize() override
Definition GenBase.cxx:17
virtual StatusCode genuserInitialize()
For initialization of user code, if required. Called after genInitialize.
Definition GenModule.h:64
virtual StatusCode genInitialize()
For initializing the generator, if required.
Definition GenModule.h:62

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::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.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::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< Gaudi::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.

◆ pythia_stream()

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

Definition at line 695 of file Pythia8_i.cxx.

695 {
696 return s_pythia_stream;
697}

◆ pythiaVersion()

double Pythia8_i::pythiaVersion ( ) const

Definition at line 690 of file Pythia8_i.cxx.

690 {
691 return m_version;
692}

◆ 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< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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)

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ s_allowedTunes()

int Pythia8_i::s_allowedTunes ( double version)
staticprivate

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::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< Gaudi::Algorithm > >.

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

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::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) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

◆ useReseed()

bool Pythia8_i::useReseed ( ) const
inlineprotected

Definition at line 86 of file Pythia8_i.h.

86{return m_useReseed; }

◆ useRndmGenSvc()

bool Pythia8_i::useRndmGenSvc ( ) const
inlineprotected

Definition at line 85 of file Pythia8_i.h.

85{ return m_useRndmGenSvc; }

◆ xmlpath()

std::string Pythia8_i::xmlpath ( )
static

Definition at line 700 of file Pythia8_i.cxx.

700 {
701
702
703 std::string foundpath = "";
704
705// Try to find the xmldoc directory using PathResolver:
706 foundpath = PathResolverFindCalibDirectory( "Pythia8/xmldoc" );
707
708 return foundpath;
709}
std::string PathResolverFindCalibDirectory(const std::string &logical_file_name)

Member Data Documentation

◆ m_athenaTool

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

Definition at line 174 of file Pythia8_i.h.

174{this, "CustomInterface", ""};

◆ m_atlasRndmEngine

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

Definition at line 93 of file Pythia8_i.h.

93{};

◆ m_beam1

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

Definition at line 129 of file Pythia8_i.h.

129{this, "Beam1", "PROTON"};

◆ m_beam2

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

Definition at line 130 of file Pythia8_i.h.

130{this, "Beam2", "PROTON"};

◆ m_collisionEnergy

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

Definition at line 126 of file Pythia8_i.h.

126{this, "CollisionEnergy", 14000.0};

◆ m_commands

StringArrayProperty Pythia8_i::m_commands
private
Initial value:
{this,
"Commands",
{},
"List of Pythia8 commands",
"GeneratorSettings<std::string>"}

Definition at line 116 of file Pythia8_i.h.

116 {this,
117 "Commands",
118 {},
119 "List of Pythia8 commands",
120 "GeneratorSettings<std::string>"};

◆ m_computeEfficiency

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

Definition at line 137 of file Pythia8_i.h.

137{this, "computeEfficiency", false};

◆ m_conversion

double Pythia8_i::m_conversion {1.}
private

Definition at line 141 of file Pythia8_i.h.

141{1.};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::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}
private

Definition at line 135 of file Pythia8_i.h.

135{this, "CKKWLAcceptance", false};

◆ m_doFxFxXS

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

Definition at line 136 of file Pythia8_i.h.

136{this, "FxFxXS", false};

◆ m_doLHE3Weights

bool Pythia8_i::m_doLHE3Weights {false}
private

Definition at line 169 of file Pythia8_i.h.

169{false};

◆ m_dsid

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

Definition at line 97 of file Pythia8_i.h.

97{this, "Dsid", 999999, "Dataset ID number"};

◆ m_enhanceWeight

double Pythia8_i::m_enhanceWeight {1.0}
private

Definition at line 166 of file Pythia8_i.h.

166{1.0};

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_failureCount

unsigned int Pythia8_i::m_failureCount {0}
private

Definition at line 143 of file Pythia8_i.h.

143{0};

◆ m_incidentSvc

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

Handle on the incident service.

Definition at line 99 of file GenModule.h.

99{this, "IncidentSvc", "IncidentSvc"};

◆ m_internal_event_number

int Pythia8_i::m_internal_event_number {0}
private

Definition at line 108 of file Pythia8_i.h.

108{0};

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

87{this, "IsAfterburner", false, "Set true if generator modifies existing events rather than creating new ones"};

◆ m_lheFile

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

Definition at line 133 of file Pythia8_i.h.

133{this, "LHEFile", ""};

◆ m_maxFailures

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

Definition at line 90 of file Pythia8_i.h.

90{this, "MaxFailures", 10};

◆ m_mcEventKey

std::string GenBase::m_mcEventKey {}
protectedinherited

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

Definition at line 108 of file GenBase.h.

108{};

◆ 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 117 of file GenBase.h.

117{ this, "McEventKey", "GEN_EVENT", "StoreGate key of the MC event collection" };

◆ m_mergingWeight

double Pythia8_i::m_mergingWeight {1.0}
private

Definition at line 165 of file Pythia8_i.h.

165{1.0};

◆ 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 110 of file GenBase.h.

110{this, "MakeMcEvent", false, "Create a new MC event collection if it doesn't exist"};

◆ m_nAccepted

double Pythia8_i::m_nAccepted {0.}
private

Definition at line 138 of file Pythia8_i.h.

138{0.};

◆ m_nMerged

double Pythia8_i::m_nMerged {0.}
private

Definition at line 139 of file Pythia8_i.h.

139{0.};

◆ m_numberAlphaS

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

Definition at line 101 of file Pythia8_i.h.

101{this,"numberAlphaS", 3.0};

◆ m_outputParticleDataFile

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

Definition at line 163 of file Pythia8_i.h.

163{this, "OutputParticleData", "ParticleData.local.xml"};

◆ m_override_transform_beamenergy

bool Pythia8_i::m_override_transform_beamenergy {false}
private

Definition at line 131 of file Pythia8_i.h.

131{false};

◆ m_particleDataFile

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

Definition at line 162 of file Pythia8_i.h.

162{this, "ParticleData", ""};

◆ m_particleIDs

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

Definition at line 145 of file Pythia8_i.h.

◆ m_procPtr

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

Definition at line 152 of file Pythia8_i.h.

152{};

◆ m_pt0timesMPI

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

Definition at line 100 of file Pythia8_i.h.

100{this,"pT0timesMPI", 1.0};

◆ m_pythia

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

Definition at line 88 of file Pythia8_i.h.

88{};

◆ m_pythiaToHepMC

HepMC::Pythia8ToHepMC Pythia8_i::m_pythiaToHepMC
protected

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.

84{this, "RandomSeed", 1234567, "Random seed for the built-in random engine"}; // FIXME make this into an unsigned long int?

◆ m_rndmSvc

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

Data members.

Definition at line 97 of file GenModule.h.

97{this, "RndmSvc", "AthRNGSvc"};

◆ m_runinfo

std::shared_ptr<HepMC3::GenRunInfo> GenModule::m_runinfo {}
protectedinherited

The run info for HepMC3.

Definition at line 90 of file GenModule.h.

90{};

◆ m_sameAlphaSAsMPI

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

Definition at line 102 of file Pythia8_i.h.

102{this,"useSameAlphaSasMPI", false};

◆ m_saveLHE

BooleanProperty Pythia8_i::m_saveLHE {this, "SaveLHERecord", false}
private

Definition at line 176 of file Pythia8_i.h.

176{this, "SaveLHERecord", false};

◆ m_seeds

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

Definition at line 147 of file Pythia8_i.h.

147{};

◆ m_showerWeightNames

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

Definition at line 171 of file Pythia8_i.h.

171{"nominal"};

◆ m_showerWeightNamesProp

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

Definition at line 172 of file Pythia8_i.h.

172{this, "ShowerWeightNames", {} };

◆ m_sigmaTotal

double Pythia8_i::m_sigmaTotal {0.}
private

Definition at line 140 of file Pythia8_i.h.

140{0.};

◆ m_SuppressSmallPT

Pythia8::SuppressSmallPT* Pythia8_i::m_SuppressSmallPT {}
private

Definition at line 180 of file Pythia8_i.h.

180{};

◆ m_useLHAPDF

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

Definition at line 160 of file Pythia8_i.h.

160{this, "UseLHAPDF", true};

◆ m_useReseed

BooleanProperty Pythia8_i::m_useReseed {this,"useReseed", false}
protected

Definition at line 95 of file Pythia8_i.h.

95{this,"useReseed", false};

◆ m_userHooks

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

Definition at line 98 of file Pythia8_i.h.

98{this, "UserHooks", {} };

◆ m_userHooksPtrs

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

Definition at line 154 of file Pythia8_i.h.

154{};

◆ m_userModes

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

Definition at line 122 of file Pythia8_i.h.

◆ m_useRndmGenSvc

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

Definition at line 92 of file Pythia8_i.h.

92{this, "useRndmGenSvc", true, "the max number of consecutive failures"};

◆ m_userParams

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

Definition at line 121 of file Pythia8_i.h.

◆ m_userProcess

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

Definition at line 149 of file Pythia8_i.h.

149{this, "UserProcess", ""};

◆ m_userResonancePtrs

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

Definition at line 158 of file Pythia8_i.h.

◆ m_userResonances

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

Definition at line 156 of file Pythia8_i.h.

156{this, "UserResonances", ""};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_version

double Pythia8_i::m_version {-1.}
private

Definition at line 110 of file Pythia8_i.h.

110{-1.};

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_weightCommands

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

Definition at line 170 of file Pythia8_i.h.

170{};

◆ m_weightIDs

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

Definition at line 167 of file Pythia8_i.h.

167{};

◆ m_weightNames

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

Definition at line 168 of file Pythia8_i.h.

168{};

The documentation for this class was generated from the following files: