Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Sherpa_i.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "AtlasHepMC/GenEvent.h"
6 #include "GaudiKernel/MsgStream.h"
9 
10 #include "Sherpa_i/Sherpa_i.h"
11 
12 
13 #include "ATOOLS/Org/CXXFLAGS_PACKAGES.H"
14 #ifdef HEPMC3
15 #undef USING__HEPMC2
16 #else
17 #undef USING__HEPMC3
18 #endif
19 #include "SHERPA/Main/Sherpa.H"
20 #include "SHERPA/Initialization/Initialization_Handler.H"
21 #ifdef IS_SHERPA_3
22 #include "ATOOLS/Phys/Variations.H"
23 #else
24 #include "SHERPA/Tools/Variations.H"
25 #endif
26 #include "ATOOLS/Org/Exception.H"
27 #include "ATOOLS/Org/Run_Parameter.H"
28 
29 #include <cstdio>
30 #include <cstring>
31 #include <mutex>
32 #include <signal.h>
33 #include <stdlib.h>
34 #include <sys/stat.h>
35 #include "CLHEP/Random/RandFlat.h"
36 
37 CLHEP::HepRandomEngine* p_rndEngine{};
38 
39 Sherpa_i::Sherpa_i(const std::string& name, ISvcLocator* pSvcLocator)
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 }
47 
48 
49 
51  if (m_plugincode != "") {
52  compilePlugin(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 != "") {
71  compilePlugin(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  fputs(inputfile.second.c_str(),file);
102  fclose(file);
103  ATH_MSG_INFO("Sherpa_i using the following settings in "+inputfile.first);
104  ATH_MSG_INFO("\n"+inputfile.second+"\n");
105  }
106 
107  ATH_MSG_DEBUG("... go Sherpa!");
108  int argc = 2;
109  char** argv = new char*[2];
110  argv[0] = new char[7];
111  argv[1] = new char[34];
112  strcpy(argv[0], "Sherpa");
113  strcpy(argv[1], "RUNDATA: [Base.yaml, Sherpa.yaml]");
114  p_sherpa = new SHERPA::Sherpa(argc, argv);
115  delete [] argv;
116  #else
117  p_sherpa = new SHERPA::Sherpa();
118  #endif
119 
120 
121  /***
122  translate ATOOLS:SignalHandler
123  ***/
124  std::set_terminate(ATOOLS::Terminate);
125  std::set_unexpected(ATOOLS::Terminate);
126  #ifdef IS_SHERPA_3
127  signal(SIGSEGV,ATOOLS::HandleSignal);
128  signal(SIGINT,ATOOLS::HandleSignal);
129  signal(SIGPIPE,ATOOLS::HandleSignal);
130  signal(SIGBUS,ATOOLS::HandleSignal);
131  signal(SIGFPE,ATOOLS::HandleSignal);
132  signal(SIGABRT,ATOOLS::HandleSignal);
133  signal(SIGTERM,ATOOLS::HandleSignal);
134  signal(SIGXCPU,ATOOLS::HandleSignal);
135  signal(SIGUSR1,ATOOLS::HandleSignal);
136 
137  try {
138  p_sherpa->InitializeTheRun();
139  p_sherpa->InitializeTheEventHandler();
140  }
141  catch (const ATOOLS::normal_exit& exception) {
142  ATH_MSG_ERROR("Normal exit caught, this probably means:");
143  ATH_MSG_ERROR("Have to compile Amegic libraries");
144  ATH_MSG_ERROR("You probably want to run ./makelibs");
145  return StatusCode::FAILURE;
146  }
147  catch (const ATOOLS::Exception& exception) {
148  ATH_MSG_ERROR("Unwanted ATOOLS::exception caught.");
150  return StatusCode::FAILURE;
151  }
152  #else
153  signal(SIGSEGV,ATOOLS::SignalHandler);
154  signal(SIGINT,ATOOLS::SignalHandler);
155  signal(SIGBUS,ATOOLS::SignalHandler);
156  signal(SIGFPE,ATOOLS::SignalHandler);
157  signal(SIGABRT,ATOOLS::SignalHandler);
158  signal(SIGTERM,ATOOLS::SignalHandler);
159  signal(SIGXCPU,ATOOLS::SignalHandler);
160 
161  try {
162  int argc;
163  char** argv;
164  getParameters(argc, argv);
165  p_sherpa->InitializeTheRun(argc,(char **)argv);
166  delete [] argv;
167 
168  p_sherpa->InitializeTheEventHandler();
169  }
170  catch (const ATOOLS::Exception& exception) {
171  if (exception.Class()=="Matrix_Element_Handler" && exception.Type()==ATOOLS::ex::normal_exit) {
172  ATH_MSG_ERROR("Have to compile Amegic libraries");
173  ATH_MSG_ERROR("You probably want to run ./makelibs");
174  }
175  else {
176  ATH_MSG_ERROR("Unwanted ATOOLS::exception caught.");
178  }
179  return StatusCode::FAILURE;
180  }
181  #endif
182  catch (const std::exception& exception) {
183  ATH_MSG_ERROR("std::exception caught.");
184  return StatusCode::FAILURE;
185  }
186 
187  #ifdef HEPMC3
188  m_runinfo = std::make_shared<HepMC3::GenRunInfo>();
190  struct HepMC3::GenRunInfo::ToolInfo generator = {
191  std::string("SHERPA"),
192  std::string(SHERPA_VERSION)+ "." + std::string(SHERPA_SUBVERSION),
193  std::string("Used generator")
194  };
195  m_runinfo->tools().push_back(generator);
196  #endif
197  return StatusCode::SUCCESS;
198 }
199 
200 
202  ATH_MSG_DEBUG("Sherpa_i in callGenerator()");
203  //Re-seed the random number stream
204  long seeds[7];
205  const EventContext& ctx = Gaudi::Hive::currentContext();
206  ATHRNG::calculateSeedsMC21(seeds, "SHERPA", ctx.eventID().event_number(), m_dsid, m_randomSeed);
207  p_rndEngine->setSeeds(seeds, 0); // NOT THREAD-SAFE
208 
209  do {
210  ATH_MSG_DEBUG("Trying to generate event with Sherpa");
211  } while (p_sherpa->GenerateOneEvent()==false);
212 
213  const size_t genEvents = ATOOLS::rpa->gen.NumberOfGeneratedEvents();
214  if (genEvents%1000==0) {
215  ATH_MSG_INFO("Passed "<<genEvents<<" events.");
216  }
217 
218  return StatusCode::SUCCESS;
219 }
220 
221 StatusCode Sherpa_i::fillEvt(HepMC::GenEvent* event) {
222  ATH_MSG_DEBUG( "Sherpa_i Filling event");
223 #ifdef HEPMC3
224  if (!event->run_info()) event->set_run_info(m_runinfo);
225 #endif
226  p_sherpa->FillHepMCEvent(*event);
227 
228 
229 #ifdef HEPMC3
230 //Weight, MEWeight, WeightNormalisation, NTrials
231  if (event->weights().size()>2) {
232  double nominal = event->weight("Weight");
233  for (const auto& name: event->weight_names()) {
234  if (name == "WeightNormalisation") continue;
235  if (name == "NTrials") continue;
236  if (name == "Weight") continue;
237  if (name == "NTrials") continue;
238  if (std::abs(event->weight(name)) > m_variation_weight_cap*std::abs(nominal)) {
239  ATH_MSG_INFO("Capping variation" << name << " = " << event->weight(name)/nominal << "*nominal");
240  event->weight(name) *= m_variation_weight_cap*std::abs(nominal)/std::abs(event->weight(name));
241  }
242  ATH_MSG_DEBUG("Sherpa WEIGHT " << name << " value="<< event->weight(name));
243  }
244  }
245 #else
246  if (event->weights().size()>2) {
247  for (size_t i=0; i<event->weights().size(); ++i) {
248  if (i>3) { // cap variation weights
249  // cap variation weights at m_variation_weight_cap*nominal to avoid spikes from numerical instability
250  if (std::abs(event->weights()[i]) > m_variation_weight_cap*std::abs(event->weights()[0])) {
251  ATH_MSG_INFO("Capping variation" << i << " = " << event->weights()[i]/event->weights()[0] << "*nominal");
252  event->weights()[i] *= m_variation_weight_cap*std::abs(event->weights()[0])/std::abs(event->weights()[i]);
253  }
254  }
255  ATH_MSG_DEBUG("Sherpa WEIGHT " << i << " value="<< event->weights()[i]);
256  }
257  }
258 #endif
259 
260 #ifdef HEPMC3
261  event->set_units(HepMC3::Units::MEV, HepMC3::Units::MM);
262 #else
263  GeVToMeV(event); //unit check
264 #endif
265 
266 
267  return StatusCode::SUCCESS;
268 }
269 
271 
272  ATH_MSG_INFO("Sherpa_i finalize()");
273 
274  std::cout << "MetaData: generator = Sherpa" << SHERPA_VERSION << "." << SHERPA_SUBVERSION << std::endl;
275  std::cout << "MetaData: cross-section (nb)= " << p_sherpa->TotalXS()/1000.0*m_xsscale << std::endl;
276 
277  std::cout << "MetaData: PDF = " << p_sherpa->PDFInfo() << std::endl;
278 
279  std::cout << "Named variations initialised by Sherpa:" << std::endl;
280  std::cout << *p_sherpa->GetInitHandler()->GetVariations() << std::endl;
281 
282  p_sherpa->SummarizeRun();
283  delete p_sherpa;
284 
285  if (m_cleanup) {
286  ATH_MSG_INFO("Deleting left-over files from working directory.");
287  system("rm -rf Results.db Process MIG_*.db MPI_*.dat libSherpa*.so libProc*.so");
288  }
289 
290  return StatusCode::SUCCESS;
291 }
292 
293 
294 #ifndef IS_SHERPA_3
295 void Sherpa_i::getParameters(int &argc, char** &argv) {
296  std::vector<std::string> params;
297 
298  // set some ATLAS specific default values as a starting point
299  params.push_back("EXTERNAL_RNG=Atlas_RNG");
300 
301  /***
302  Adopt Atlas Debug Level Scheme
303  ***/
304 
305  std::string verbose_arg;
306  MsgStream log(msgSvc(), name());
307  if( log.level()==MSG::FATAL || log.level()==MSG::ERROR || log.level()==MSG::WARNING ){
308  params.push_back("OUTPUT=0");
309  }
310  else if(log.level()==MSG::INFO){
311  params.push_back("OUTPUT=2");
312  }
313  else if(log.level()==MSG::DEBUG){
314  params.push_back("OUTPUT=3");
315  }
316  else{
317  params.push_back("OUTPUT=15");
318  }
319 
320  // disregard manual RUNDATA setting if run card given in JO
321  if (m_runcard != "") m_params.value().push_back("RUNDATA=Run.dat");
322 
323  // allow to overwrite all parameters from JO file
324  params.insert(params.begin()+params.size(), m_params.begin(), m_params.end());
325 
326  // create Run.dat file if runcard explicitely given
327  if (m_runcard != "") {
328  FILE *file = fopen("Run.dat","w");
329  fputs(m_runcard.value().c_str(),file);
330  fclose(file);
331  }
332 
333  /***
334  Convert into Sherpas argc/argv arguments
335  ***/
336  argc = 1+params.size();
337  argv = new char * [ 1+params.size() ];
338  argv[0] = new char[7];
339  strcpy(argv[0], "Sherpa");
340 
341  ATH_MSG_INFO("Sherpa_i using the following Arguments");
342  ATH_MSG_INFO(m_runcard);
343  for(size_t i=0; i<params.size(); i++) {
344  ATH_MSG_INFO(" [ " << params[i] << " ] ");
345  argv[i+1] = new char[params[i].size()+1];
346  strcpy(argv[i+1], params[i].c_str());
347  }
348  ATH_MSG_INFO("End Sherpa_i Argument List");
349  ATH_MSG_INFO("Further Sherpa initialisation output will be redirected to the LOG_FILE specified above.");
350 
351 }
352 #endif
353 
354 void Sherpa_i::compilePlugin(const std::string& pluginCode) {
355  // TODO: not very pretty, should we eventually do this in Python instead (base fragment)
356  FILE *file = fopen("Sherpa_iPlugin.C","w");
357  fputs(pluginCode.c_str(),file);
358  fclose(file);
359  std::string command;
360  // Python -> C++ string conversion seems to add quote character as first
361  // and last line if the string contains quotes (like always in a plugin)
362  // thus removing them here
363  command += "tail -n +2 Sherpa_iPlugin.C | head -n -1 > Sherpa_iPlugin.C.tmp; mv Sherpa_iPlugin.C.tmp Sherpa_iPlugin.C; ";
364  command += "g++ -shared -std=c++0x -g ";
365  command += "-I`Sherpa-config --incdir` ";
366  command += "`Sherpa-config --ldflags` ";
367  command += "-I$FASTJETPATH/include ";
368  command += "-fPIC -o libSherpa_iPlugin.so Sherpa_iPlugin.C";
369  ATH_MSG_INFO("Now compiling plugin library using: "+command);
370  if (system(command.c_str())!=0) {
371  ATH_MSG_ERROR("Error compiling plugin library.");
372  }
373 }
374 
378 using namespace ATOOLS;
379 
380 Atlas_RNG::Atlas_RNG(CLHEP::HepRandomEngine* engine) :
381  External_RNG(), p_engine(engine), m_filename("Config.conf")
382 {
383 }
384 
386 
387 double Atlas_RNG::Get(){
388 
389  return CLHEP::RandFlat::shoot(p_engine);
390 
391 }
392 
393 const std::string Atlas_RNG::GenerateUID() const {
394  std::string result{""};
395  const int nMax = 26;
396  char alphabet[nMax] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g',
397  'h', 'i', 'j', 'k', 'l', 'm', 'n',
398  'o', 'p', 'q', 'r', 's', 't', 'u',
399  'v', 'w', 'x', 'y', 'z' };
400  for (size_t i = 0; i < 6; ++i) {
401  result += alphabet[rand() % nMax];
402  }
403  return result;
404 }
405 
407  // We set the file name first time the worker calls SaveStatus
408  std::call_once(m_once_flag_atlas_rng, [&](){
409  struct stat info;
410  if ( !stat("/dev/shm", &info)) {
411  m_filename = "/dev/shm/Config.conf.";
412  }
413  m_filename += GenerateUID();
414  std::cout << "RNG state being saved to: " << m_filename << std::endl;
415  });
416  p_engine->saveStatus(m_filename.c_str());
417 }
418 
419 void Atlas_RNG::RestoreStatus() { p_engine->restoreStatus(m_filename.c_str()); }
420 
421 // some getter magic to make this random number generator available to sherpa
422 // DECLARE_GETTER doesn't compile with c++20 in Sherpa versions before 3.
423 #ifdef IS_SHERPA_3
424 DECLARE_GETTER(Atlas_RNG,"Atlas_RNG",External_RNG,RNG_Key);
425 #else
426 namespace ATOOLS {
427 template <> class Getter<External_RNG,RNG_Key,Atlas_RNG,std::less<std::string>>:
428  public Getter_Function<External_RNG,RNG_Key,std::less<std::string>> {
429 private:
430  static Getter<External_RNG,RNG_Key,Atlas_RNG,std::less<std::string>> s_initializer;
431 protected:
432  void PrintInfo(std::ostream &str,const size_t width) const;
433  Object_Type *operator()(const Parameter_Type &parameters) const;
434 public:
435  Getter(const bool &d=true):
436  Getter_Function<External_RNG,RNG_Key,std::less<std::string>>("Atlas_RNG")
437  { SetDisplay(d); }
438 };
439 }
440 ATOOLS::Getter<External_RNG,RNG_Key,Atlas_RNG>
441 ATOOLS::Getter<External_RNG,RNG_Key,Atlas_RNG>::s_initializer(true);
442 #endif
443 
444 External_RNG *ATOOLS::Getter<External_RNG,RNG_Key,Atlas_RNG>::operator()(const RNG_Key &) const
445 { return new Atlas_RNG(p_rndEngine); }
446 
447 void ATOOLS::Getter<External_RNG,RNG_Key,Atlas_RNG>::PrintInfo(std::ostream &str,const size_t) const
448 { str<<"Atlas RNG interface"; }
grepfile.info
info
Definition: grepfile.py:38
ATOOLS::Getter< External_RNG, RNG_Key, Atlas_RNG, std::less< std::string > >::Getter
Getter(const bool &d=true)
Definition: Sherpa_i.cxx:435
Atlas_RNG::Get
double Get()
Definition: Sherpa_i.cxx:387
Sherpa_i::compilePlugin
void compilePlugin(const std::string &)
Definition: Sherpa_i.cxx:354
Sherpa_i::getParameters
void getParameters(int &argc, char **&argv)
Definition: Sherpa_i.cxx:295
GenEvent.h
get_generator_info.result
result
Definition: get_generator_info.py:21
Atlas_RNG::m_filename
std::string m_filename
Definition: Sherpa_i.h:79
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:18
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthMsgStreamMacros.h
Sherpa_i::fillEvt
StatusCode fillEvt(HepMC::GenEvent *evt)
For filling the HepMC event object.
Definition: Sherpa_i.cxx:221
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
hist_file_dump.d
d
Definition: hist_file_dump.py:143
MM
@ MM
Definition: RegSelEnums.h:38
Atlas_RNG
Definition: Sherpa_i.h:77
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
ATOOLS::Getter< External_RNG, RNG_Key, Atlas_RNG, std::less< std::string > >::PrintInfo
void PrintInfo(std::ostream &str, const size_t width) const
GenModule
Base class for common behaviour of generator interfaces.
Definition: GenModule.h:39
PixelModuleFeMask_create_db.remove
string remove
Definition: PixelModuleFeMask_create_db.py:83
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
ATOOLS::Getter< External_RNG, RNG_Key, Atlas_RNG, std::less< std::string > >::s_initializer
static Getter< External_RNG, RNG_Key, Atlas_RNG, std::less< std::string > > s_initializer
Definition: Sherpa_i.cxx:430
Atlas_RNG::GenerateUID
const std::string GenerateUID() const
Definition: Sherpa_i.cxx:393
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
LArG4FSStartPointFilter.rand
rand
Definition: LArG4FSStartPointFilter.py:80
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
lumiFormat.i
int i
Definition: lumiFormat.py:85
LArCellNtuple.argv
argv
Definition: LArCellNtuple.py:152
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Sherpa_i::Sherpa_i
Sherpa_i(const std::string &name, ISvcLocator *pSvcLocator)
Definition: Sherpa_i.cxx:39
calibdata.exception
exception
Definition: calibdata.py:496
file
TFile * file
Definition: tile_monitor.h:29
DQHistogramMergeRegExp.argc
argc
Definition: DQHistogramMergeRegExp.py:20
Atlas_RNG::p_engine
CLHEP::HepRandomEngine * p_engine
Definition: Sherpa_i.h:78
Atlas_RNG::~Atlas_RNG
~Atlas_RNG()
Definition: Sherpa_i.cxx:385
beamspotman.stat
stat
Definition: beamspotman.py:266
Sherpa_i::genFinalize
StatusCode genFinalize()
For finalising the generator, if required.
Definition: Sherpa_i.cxx:270
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
columnar::operator()
decltype(auto) operator()(ObjectId< OT, CM > id) const noexcept
Definition: ColumnAccessor.h:175
Cut::signal
@ signal
Definition: SUSYToolsAlg.cxx:67
CxxUtils::fpcompare::less
bool less(double a, double b)
Compare two FP numbers, working around x87 precision issues.
Definition: fpcompare.h:166
RNGWrapper.h
Atlas_RNG::m_once_flag_atlas_rng
std::once_flag m_once_flag_atlas_rng
Definition: Sherpa_i.h:80
mc.generator
generator
Configure Herwig7 These are the commands corresponding to what would go into the regular Herwig infil...
Definition: mc.MGH7_FxFx_H71-DEFAULT_test.py:18
Atlas_RNG::Atlas_RNG
Atlas_RNG(CLHEP::HepRandomEngine *)
Definition: Sherpa_i.cxx:380
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
Sherpa_i::genInitialize
StatusCode genInitialize()
For initializing the generator, if required.
Definition: Sherpa_i.cxx:50
ATOOLS::Getter< External_RNG, RNG_Key, Atlas_RNG, std::less< std::string > >::operator()
Object_Type * operator()(const Parameter_Type &parameters) const
FullCPAlgorithmsTest_CA.inputfile
dictionary inputfile
Definition: FullCPAlgorithmsTest_CA.py:62
DEBUG
#define DEBUG
Definition: page_access.h:11
ATOOLS
Definition: Sherpa_i.cxx:426
Sherpa_i.h
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
ATHRNG::calculateSeedsMC21
void calculateSeedsMC21(long *seeds, const std::string &algName, uint64_t ev, uint64_t run, uint64_t offset=0)
Set the random seed using a string (e.g.
Definition: RNGWrapper.cxx:37
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
Atlas_RNG::RestoreStatus
void RestoreStatus()
Definition: Sherpa_i.cxx:419
str
Definition: BTagTrackIpAccessor.cxx:11
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
get_generator_info.command
string command
Definition: get_generator_info.py:38
Sherpa_i::callGenerator
StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
Definition: Sherpa_i.cxx:201
Atlas_RNG::SaveStatus
void SaveStatus()
Definition: Sherpa_i.cxx:406
p_rndEngine
CLHEP::HepRandomEngine * p_rndEngine
Definition: Sherpa_i.cxx:37