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

#include <Sherpa_i.h>

Inheritance diagram for Sherpa_i:
Collaboration diagram for Sherpa_i:

Public Member Functions

 Sherpa_i (const std::string &name, ISvcLocator *pSvcLocator)
StatusCode genInitialize ()
 For initializing the generator, if required.
StatusCode callGenerator ()
 For calling the generator on each iteration of the event loop.
StatusCode genFinalize ()
 For finalising the generator, if required.
StatusCode fillEvt (HepMC::GenEvent *evt)
 For filling the HepMC event object.
void getParameters (int &argc, char **&argv)
void compilePlugin (const std::string &)
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
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 ()
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::GenEvent * event_const () const
 Access the current signal event (const)
const McEventCollectionevents_const () const
 Access the current event's McEventCollection (const)
const McEventCollectionevents_const (const EventContext &ctx) const
Particle data accessors
const ServiceHandle< IPartPropSvc > partPropSvc () const
 Access the particle property service.
const HepPDT::ParticleDataTable & particleTable () const
 Get a particle data table.
const HepPDT::ParticleDataTable & pdt () const
 Shorter alias to get a particle data table.
const HepPDT::ParticleData * particleData (int pid) const
 Access an element in the particle data table.

Protected Member Functions

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

SHERPA::Sherpa * p_sherpa {}
std::string m_basefragment
 Sherpa base settings (read from base fragment file)
StringProperty m_runcard {this, "RunCard", ""}
 FIXME unused?
StringArrayProperty m_params {this, "Parameters", {} }
 List of additional Sherpa parameters beyond run card snippet (from JO file)
StringArrayProperty m_openloopslibs {this, "OpenLoopsLibs", {} }
 List of needed OpenLoops process libraries (from JO file)
StringArrayProperty m_extrafiles {this, "ExtraFiles", {} }
 List of any additional needed files, e.g. custom libraries, PDF sets (from JO file)
IntegerProperty m_ncores {this, "NCores", 1}
 Number of cores recommended for multi-core integration file.
DoubleProperty m_memorymb {this, "MemoryMB", 2500.}
 Memory required for integration/evgen.
StringProperty m_plugincode {this, "PluginCode", ""}
 Optional code for plugin library to compile and load at run time.
DoubleProperty m_variation_weight_cap {this, "VariationWeightCap", 10.0}
 Variation weight cap factor.
DoubleProperty m_xsscale {this, "CrossSectionScaleFactor", 1.0}
BooleanProperty m_cleanup {this, "CleanupGeneratedFiles", true}
IntegerProperty m_dsid {this, "Dsid", 999999, "Dataset ID number"}
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.

Private Types

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>

Private Attributes

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

Utility event-mangling functions

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

Detailed Description

Definition at line 18 of file Sherpa_i.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ Sherpa_i()

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

Definition at line 39 of file Sherpa_i.cxx.

40 : GenModule(name, pSvcLocator)
41{
42 #ifdef IS_SHERPA_3
43 declareProperty("BaseFragment", m_inputfiles["Base.yaml"] = "");
44 declareProperty("RunCard", m_inputfiles["Sherpa.yaml"] = "");
45 #endif
46}
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition GenModule.cxx:14

Member Function Documentation

◆ 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 }
#define ATH_MSG_ERROR(x)
static const Attributes_t empty

◆ 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 Sherpa_i::callGenerator ( )
virtual

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

Reimplemented from GenModule.

Definition at line 184 of file Sherpa_i.cxx.

184 {
185 ATH_MSG_DEBUG("Sherpa_i in callGenerator()");
186 //Re-seed the random number stream
187 long seeds[7];
188 const EventContext& ctx = Gaudi::Hive::currentContext();
189 ATHRNG::calculateSeedsMC21(seeds, "SHERPA", ctx.eventID().event_number(), m_dsid, m_randomSeed);
190 p_rndEngine->setSeeds(seeds, 0); // NOT THREAD-SAFE
191
192 do {
193 ATH_MSG_DEBUG("Trying to generate event with Sherpa");
194 } while (p_sherpa->GenerateOneEvent()==false);
195
196 const size_t genEvents = ATOOLS::rpa->gen.NumberOfGeneratedEvents();
197 if (genEvents%1000==0) {
198 ATH_MSG_INFO("Passed "<<genEvents<<" events.");
199 }
200
201 return StatusCode::SUCCESS;
202}
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
CLHEP::HepRandomEngine * p_rndEngine
Definition Sherpa_i.cxx:37
IntegerProperty m_randomSeed
Seed for random number engine.
Definition GenModule.h:84
SHERPA::Sherpa * p_sherpa
Definition Sherpa_i.h:32
IntegerProperty m_dsid
Definition Sherpa_i.h:70
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.

◆ cmTomm()

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

Scale event lengths by x 10.

Definition at line 78 of file GenBase.cxx.

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

◆ compilePlugin()

void Sherpa_i::compilePlugin ( const std::string & pluginCode)

Definition at line 341 of file Sherpa_i.cxx.

341 {
342 // TODO: not very pretty, should we eventually do this in Python instead (base fragment)
343 FILE *file = fopen("Sherpa_iPlugin.C","w");
344 if (!file) {
345 ATH_MSG_ERROR("Cannot open Sherpa_iPlugin.C");
346 }
347 else {
348 fputs(pluginCode.c_str(),file);
349 fclose(file);
350 }
351 std::string command;
352 // Python -> C++ string conversion seems to add quote character as first
353 // and last line if the string contains quotes (like always in a plugin)
354 // thus removing them here
355 command += "tail -n +2 Sherpa_iPlugin.C | head -n -1 > Sherpa_iPlugin.C.tmp; mv Sherpa_iPlugin.C.tmp Sherpa_iPlugin.C; ";
356 command += "g++ -shared -std=c++0x -g ";
357 command += "-I`Sherpa-config --incdir` ";
358 command += "`Sherpa-config --ldflags` ";
359 command += "-I$FASTJETPATH/include ";
360 command += "-fPIC -o libSherpa_iPlugin.so Sherpa_iPlugin.C";
361 ATH_MSG_INFO("Now compiling plugin library using: "+command);
362 if (system(command.c_str())!=0) {
363 ATH_MSG_ERROR("Error compiling plugin library.");
364 }
365}
TFile * file

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< 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 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< 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< 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
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 }
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
const McEventCollection * events_const() const
Access the current event's McEventCollection (const)
Definition GenBase.h:96

◆ 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 {
100 SG::ReadHandle<McEventCollection> ret = SG::makeHandle(m_mcevents_const, ctx);
101 if (!ret.isValid())
102 ATH_MSG_ERROR("No McEventCollection found in StoreGate with key " << m_mcevents_const.key());
103 return ret.cptr();
104 }
SG::ReadHandleKey< McEventCollection > m_mcevents_const
Const handle to the MC event collection.
Definition GenBase.h:163
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< 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 ( )
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}
#define CHECK(...)
Evaluate an expression and check for errors.
ServiceHandle< IIncidentSvc > m_incidentSvc
Handle on the incident service.
Definition GenModule.h:101
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 *)
Definition GenEvent.h:627
GenEvent * newGenEvent(const int a, const int b)
Definition GenEvent.h:625

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

◆ fillEvt()

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

For filling the HepMC event object.

Implements GenModule.

Definition at line 204 of file Sherpa_i.cxx.

204 {
205 ATH_MSG_DEBUG( "Sherpa_i Filling event");
206#ifdef HEPMC3
207 if (!event->run_info()) event->set_run_info(m_runinfo);
208#endif
209 p_sherpa->FillHepMCEvent(*event);
210
211
212#ifdef HEPMC3
213//Weight, MEWeight, WeightNormalisation, NTrials
214 if (event->weights().size()>2) {
215 double nominal = event->weight("Weight");
216 for (const auto& name: event->weight_names()) {
217 if (name == "WeightNormalisation") continue;
218 if (name == "NTrials") continue;
219 if (name == "Weight") continue;
220 if (name == "NTrials") continue;
221 if (std::abs(event->weight(name)) > m_variation_weight_cap*std::abs(nominal)) {
222 ATH_MSG_INFO("Capping variation" << name << " = " << event->weight(name)/nominal << "*nominal");
223 event->weight(name) *= m_variation_weight_cap*std::abs(nominal)/std::abs(event->weight(name));
224 }
225 ATH_MSG_DEBUG("Sherpa WEIGHT " << name << " value="<< event->weight(name));
226 }
227 }
228#else
229 if (event->weights().size()>2) {
230 for (size_t i=0; i<event->weights().size(); ++i) {
231 if (i>3) { // cap variation weights
232 // cap variation weights at m_variation_weight_cap*nominal to avoid spikes from numerical instability
233 if (std::abs(event->weights()[i]) > m_variation_weight_cap*std::abs(event->weights()[0])) {
234 ATH_MSG_INFO("Capping variation" << i << " = " << event->weights()[i]/event->weights()[0] << "*nominal");
235 event->weights()[i] *= m_variation_weight_cap*std::abs(event->weights()[0])/std::abs(event->weights()[i]);
236 }
237 }
238 ATH_MSG_DEBUG("Sherpa WEIGHT " << i << " value="<< event->weights()[i]);
239 }
240 }
241#endif
242
243#ifdef HEPMC3
244 event->set_units(HepMC3::Units::MEV, HepMC3::Units::MM);
245#else
246 GeVToMeV(event); //unit check
247#endif
248
249
250 return StatusCode::SUCCESS;
251}
void GeVToMeV(HepMC::GenEvent *evt)
Scale event energies/momenta by x 1000.
Definition GenBase.cxx:58
DoubleProperty m_variation_weight_cap
Variation weight cap factor.
Definition Sherpa_i.h:64

◆ 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

◆ genFinalize()

StatusCode Sherpa_i::genFinalize ( )
virtual

For finalising the generator, if required.

Reimplemented from GenModule.

Definition at line 253 of file Sherpa_i.cxx.

253 {
254
255 ATH_MSG_INFO("Sherpa_i finalize()");
256
257 std::cout << "MetaData: generator = Sherpa" << SHERPA_VERSION << "." << SHERPA_SUBVERSION << std::endl;
258 std::cout << "MetaData: cross-section (nb)= " << p_sherpa->TotalXS()/1000.0*m_xsscale << std::endl;
259
260 std::cout << "MetaData: PDF = " << p_sherpa->PDFInfo() << std::endl;
261
262 std::cout << "Named variations initialised by Sherpa:" << std::endl;
263 std::cout << *p_sherpa->GetInitHandler()->GetVariations() << std::endl;
264
265 p_sherpa->SummarizeRun();
266
267 if (m_cleanup) {
268 ATH_MSG_INFO("Deleting left-over files from working directory.");
269 system("rm -rf Results.db Process MIG_*.db MPI_*.dat libSherpa*.so libProc*.so");
270 }
271
272 return StatusCode::SUCCESS;
273}
BooleanProperty m_cleanup
Definition Sherpa_i.h:67
DoubleProperty m_xsscale
Definition Sherpa_i.h:66

◆ genInitialize()

StatusCode Sherpa_i::genInitialize ( )
virtual

For initializing the generator, if required.

Reimplemented from GenModule.

Definition at line 50 of file Sherpa_i.cxx.

50 {
51 if (m_plugincode != "") {
53 #ifndef IS_SHERPA_3
54 m_params.value().push_back("SHERPA_LDADD=Sherpa_iPlugin");
55 #endif
56 }
57
58 ATH_MSG_INFO("Sherpa initialising...");
59
60 #ifdef IS_SHERPA_3
61 for (auto& inputfile : m_inputfiles) {
62 // remove first line and last character containing '"'
63 // TODO fix Python/C++ string passing, to not contain " in first place
64 inputfile.second.erase(0, inputfile.second.find("\n") + 1);
65 inputfile.second.pop_back();
66 }
67 #endif
68
69 ATH_MSG_DEBUG("... compiling plugin code");
70 if (m_plugincode != "") {
72 #ifdef IS_SHERPA_3
73 m_inputfiles["Base.yaml"] += "SHERPA_LDADD: Sherpa_iPlugin \n";
74 #else
75 m_params.value().push_back("SHERPA_LDADD=Sherpa_iPlugin");
76 #endif
77 }
78
79 ATH_MSG_DEBUG("... seeding Athena random number generator");
80 p_rndEngine = getRandomEngineDuringInitialize("SHERPA", m_randomSeed, m_dsid); // NOT THREAD-SAFE
81
82 #ifdef IS_SHERPA_3
83 ATH_MSG_DEBUG("... adapting output level");
84 if( msg().level()==MSG::FATAL || msg().level()==MSG::ERROR || msg().level()==MSG::WARNING ){
85 m_inputfiles["Base.yaml"] += "\nEVT_OUTPUT: 0 \n";
86 }
87 else if(msg().level()==MSG::INFO){
88 m_inputfiles["Base.yaml"] += "\nEVT_OUTPUT: 2 \n";
89 }
90 else if(msg().level()==MSG::DEBUG){
91 m_inputfiles["Base.yaml"] += "\nEVT_OUTPUT: 15 \n";
92 }
93 else{
94 m_inputfiles["Base.yaml"] += "\nEVT_OUTPUT: 15 \n";
95 }
96
97 ATH_MSG_DEBUG("... writing input files to directory");
98 for (auto& inputfile : m_inputfiles) {
99 // write input content to file in working directory
100 FILE *file = fopen(inputfile.first.c_str(),"w");
101 if (!file) {
102 ATH_MSG_ERROR("Cannot open " << inputfile.first);
103 return StatusCode::FAILURE;
104 }
105 fputs(inputfile.second.c_str(),file);
106 fclose(file);
107 ATH_MSG_INFO("Sherpa_i using the following settings in "+inputfile.first);
108 ATH_MSG_INFO("\n"+inputfile.second+"\n");
109 }
110
111 ATH_MSG_DEBUG("... go Sherpa!");
112 int argc = 2;
113 char** argv = new char*[2];
114 argv[0] = new char[7];
115 argv[1] = new char[34];
116 strcpy(argv[0], "Sherpa");
117 strcpy(argv[1], "RUNDATA: [Base.yaml, Sherpa.yaml]");
118 p_sherpa = new SHERPA::Sherpa(argc, argv);
119 delete [] argv;
120 #else
121 p_sherpa = new SHERPA::Sherpa();
122 #endif
123
124
125 #ifdef IS_SHERPA_3
126
127 try {
128 p_sherpa->InitializeTheRun();
129 p_sherpa->InitializeTheEventHandler();
130 }
131 catch (const ATOOLS::normal_exit& exception) {
132 ATH_MSG_ERROR("Normal exit caught, this probably means:");
133 ATH_MSG_ERROR("Have to compile Amegic libraries");
134 ATH_MSG_ERROR("You probably want to run ./makelibs");
135 return StatusCode::FAILURE;
136 }
137 catch (const ATOOLS::Exception& exception) {
138 ATH_MSG_ERROR("Unwanted ATOOLS::exception caught.");
139 ATH_MSG_ERROR(exception);
140 return StatusCode::FAILURE;
141 }
142 #else
143
144 try {
145 int argc;
146 char** argv;
147 getParameters(argc, argv);
148 p_sherpa->InitializeTheRun(argc,(char **)argv);
149 delete [] argv;
150
151 p_sherpa->InitializeTheEventHandler();
152 }
153 catch (const ATOOLS::Exception& exception) {
154 if (exception.Class()=="Matrix_Element_Handler" && exception.Type()==ATOOLS::ex::normal_exit) {
155 ATH_MSG_ERROR("Have to compile Amegic libraries");
156 ATH_MSG_ERROR("You probably want to run ./makelibs");
157 }
158 else {
159 ATH_MSG_ERROR("Unwanted ATOOLS::exception caught.");
160 ATH_MSG_ERROR(exception);
161 }
162 return StatusCode::FAILURE;
163 }
164 #endif
165 catch (const std::exception& exception) {
166 ATH_MSG_ERROR("std::exception caught.");
167 return StatusCode::FAILURE;
168 }
169
170 #ifdef HEPMC3
171 m_runinfo = std::make_shared<HepMC3::GenRunInfo>();
173 struct HepMC3::GenRunInfo::ToolInfo generator = {
174 std::string("SHERPA"),
175 std::string(SHERPA_VERSION)+ "." + std::string(SHERPA_SUBVERSION),
176 std::string("Used generator")
177 };
178 m_runinfo->tools().push_back(std::move(generator));
179 #endif
180 return StatusCode::SUCCESS;
181}
CLHEP::HepRandomEngine * getRandomEngineDuringInitialize(const std::string &streamName, unsigned long int randomSeedOffset, unsigned int conditionsRun=1, unsigned int lbn=1) const
Definition GenModule.cxx:53
StringProperty m_plugincode
Optional code for plugin library to compile and load at run time.
Definition Sherpa_i.h:61
StringArrayProperty m_params
List of additional Sherpa parameters beyond run card snippet (from JO file)
Definition Sherpa_i.h:45
void compilePlugin(const std::string &)
Definition Sherpa_i.cxx:341
void getParameters(int &argc, char **&argv)
Definition Sherpa_i.cxx:277
generator
Configure Herwig7 These are the commands corresponding to what would go into the regular Herwig infil...
MsgStream & msg
Definition testRead.cxx:32

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

◆ getParameters()

void Sherpa_i::getParameters ( int & argc,
char **& argv )

Definition at line 277 of file Sherpa_i.cxx.

277 {
278 std::vector<std::string> params;
279
280 // set some ATLAS specific default values as a starting point
281 params.push_back("EXTERNAL_RNG=Atlas_RNG");
282
283 /***
284 Adopt Atlas Debug Level Scheme
285 ***/
286
287 std::string verbose_arg;
288 MsgStream log(msgSvc(), name());
289 if( log.level()==MSG::FATAL || log.level()==MSG::ERROR || log.level()==MSG::WARNING ){
290 params.push_back("OUTPUT=0");
291 }
292 else if(log.level()==MSG::INFO){
293 params.push_back("OUTPUT=2");
294 }
295 else if(log.level()==MSG::DEBUG){
296 params.push_back("OUTPUT=3");
297 }
298 else{
299 params.push_back("OUTPUT=15");
300 }
301
302 // disregard manual RUNDATA setting if run card given in JO
303 if (m_runcard != "") m_params.value().push_back("RUNDATA=Run.dat");
304
305 // allow to overwrite all parameters from JO file
306 params.insert(params.begin()+params.size(), m_params.begin(), m_params.end());
307
308 // create Run.dat file if runcard explicitely given
309 if (m_runcard != "") {
310 FILE *file = fopen("Run.dat","w");
311 if (!file) {
312 ATH_MSG_ERROR("Cannot open Run.dat");
313 }
314 else {
315 fputs(m_runcard.value().c_str(),file);
316 fclose(file);
317 }
318 }
319
320 /***
321 Convert into Sherpas argc/argv arguments
322 ***/
323 argc = 1+params.size();
324 argv = new char * [ 1+params.size() ];
325 argv[0] = new char[7];
326 strcpy(argv[0], "Sherpa");
327
328 ATH_MSG_INFO("Sherpa_i using the following Arguments");
330 for(size_t i=0; i<params.size(); i++) {
331 ATH_MSG_INFO(" [ " << params[i] << " ] ");
332 argv[i+1] = new char[params[i].size()+1];
333 strcpy(argv[i+1], params[i].c_str());
334 }
335 ATH_MSG_INFO("End Sherpa_i Argument List");
336 ATH_MSG_INFO("Further Sherpa initialisation output will be redirected to the LOG_FILE specified above.");
337
338}
StringProperty m_runcard
FIXME unused?
Definition Sherpa_i.h:42
msgSvc
Provide convenience handles for various services.
Definition StdJOSetup.py:36

◆ 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:169
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition RNGWrapper.h:134
ServiceHandle< IAthRNGSvc > m_rndmSvc
Data members.
Definition GenModule.h:99

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

◆ 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 58 of file GenBase.cxx.

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

◆ 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< 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 68 of file GenBase.cxx.

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

◆ mmTocm()

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

Scale event lengths by x 1/10.

Definition at line 87 of file GenBase.cxx.

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

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ outputHandles()

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

Return this algorithm's output handles.

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

◆ particleData()

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

Access an element in the particle data table.

Definition at line 126 of file GenBase.h.

126 {
127 return pdt().particle(HepPDT::ParticleID(std::abs(pid)));
128 }
const HepPDT::ParticleDataTable & pdt() const
Shorter alias to get a particle data table.
Definition GenBase.h:123

◆ 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 }
ServiceHandle< IPartPropSvc > m_ppSvc
Handle on the particle property service.
Definition GenBase.h:160

◆ 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(); }
const HepPDT::ParticleDataTable & particleTable() const
Get a particle data table.
Definition GenBase.h:118

◆ 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();
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< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ 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, AthHistogramAlgorithm, and PyAthena::Alg.

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}
#define ATH_MSG_WARNING(x)
static Double_t sc
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ 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) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_basefragment

std::string Sherpa_i::m_basefragment
protected

Sherpa base settings (read from base fragment file)

Definition at line 39 of file Sherpa_i.h.

◆ m_cleanup

BooleanProperty Sherpa_i::m_cleanup {this, "CleanupGeneratedFiles", true}
protected

Definition at line 67 of file Sherpa_i.h.

67{this, "CleanupGeneratedFiles", true};

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dsid

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

Definition at line 70 of file Sherpa_i.h.

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

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

StringArrayProperty Sherpa_i::m_extrafiles {this, "ExtraFiles", {} }
protected

List of any additional needed files, e.g. custom libraries, PDF sets (from JO file)

Definition at line 52 of file Sherpa_i.h.

52{this, "ExtraFiles", {} };

◆ m_incidentSvc

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

Handle on the incident service.

Definition at line 101 of file GenModule.h.

101{this, "IncidentSvc", "IncidentSvc"};

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

137{};

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

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

◆ m_memorymb

DoubleProperty Sherpa_i::m_memorymb {this, "MemoryMB", 2500.}
protected

Memory required for integration/evgen.

Definition at line 58 of file Sherpa_i.h.

58{this, "MemoryMB", 2500.};

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

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

◆ m_ncores

IntegerProperty Sherpa_i::m_ncores {this, "NCores", 1}
protected

Number of cores recommended for multi-core integration file.

Definition at line 55 of file Sherpa_i.h.

55{this, "NCores", 1};

◆ m_openloopslibs

StringArrayProperty Sherpa_i::m_openloopslibs {this, "OpenLoopsLibs", {} }
protected

List of needed OpenLoops process libraries (from JO file)

Definition at line 49 of file Sherpa_i.h.

49{this, "OpenLoopsLibs", {} };

◆ m_params

StringArrayProperty Sherpa_i::m_params {this, "Parameters", {} }
protected

List of additional Sherpa parameters beyond run card snippet (from JO file)

Definition at line 45 of file Sherpa_i.h.

45{this, "Parameters", {} };

◆ m_plugincode

StringProperty Sherpa_i::m_plugincode {this, "PluginCode", ""}
protected

Optional code for plugin library to compile and load at run time.

Definition at line 61 of file Sherpa_i.h.

61{this, "PluginCode", ""};

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

160{this, "PartPropSvc", "PartPropSvc"};

◆ 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 99 of file GenModule.h.

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

◆ m_runcard

StringProperty Sherpa_i::m_runcard {this, "RunCard", ""}
protected

FIXME unused?

Sherpa run card snippet (from JO file)

Definition at line 42 of file Sherpa_i.h.

42{this, "RunCard", ""};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_variation_weight_cap

DoubleProperty Sherpa_i::m_variation_weight_cap {this, "VariationWeightCap", 10.0}
protected

Variation weight cap factor.

Definition at line 64 of file Sherpa_i.h.

64{this, "VariationWeightCap", 10.0};

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_xsscale

DoubleProperty Sherpa_i::m_xsscale {this, "CrossSectionScaleFactor", 1.0}
protected

Definition at line 66 of file Sherpa_i.h.

66{this, "CrossSectionScaleFactor", 1.0};

◆ p_sherpa

SHERPA::Sherpa* Sherpa_i::p_sherpa {}
protected

Definition at line 32 of file Sherpa_i.h.

32{};

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