Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Starlight_i.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // -------------------------------------------------------------
6 // Generators/Starlight_i.cxx Description: Allows the user
7 // to generate Starlight events and store the result in the
8 // Transient Store.
9 //
10 // AuthorList:
11 // Andrzej Olszewski: Initial Code January 2011
12 // Andrzej Olszewski: Update for Starlight "r193" March 2016
13 //
14 // Random seed set via jo
15 // Random numbers not saved by atlas engine mechanism event by event.
16 
18 
19 #include "CxxUtils/StringParse.h"
20 
21 #include "AtlasHepMC/GenEvent.h"
22 #include "AtlasHepMC/GenVertex.h"
23 #include "AtlasHepMC/GenParticle.h"
24 
25 #include <stdlib.h>
26 #include <iostream>
27 #include <fstream>
28 
30 #include "CLHEP/Vector/LorentzVector.h"
31 
32 #include "reportingUtils.h"
33 #include "starlightconstants.h"
34 #include "starlightparticlecodes.h"
35 
36 namespace{
37  static const std::string starlight_stream = "STARLIGHT";
38 }
39 
40 typedef std::vector<std::string> CommandVector;
41 
42 Starlight_i::Starlight_i(const std::string& name, ISvcLocator* pSvcLocator):
43  GenModule(name,pSvcLocator)
44 {
45 }
46 
48  if (m_starlight) delete m_starlight;
49  if (m_event) delete m_event;
50 }
51 
53 {
54  // Initialisation of input parameters
55  //
56  ATH_MSG_INFO( "===> January 20 2011 STARLIGHT INTERFACE VERSION. \n" );
57  ATH_MSG_INFO( "===> STARLIGHT INITIALISING. \n" );
58 
59  //Re-seed the random number stream
60  long seeds[7];
61  ATHRNG::calculateSeedsMC21(seeds, starlight_stream, 0, m_dsid, m_randomSeed);
62 
63  // Create inputParameters and
64  // set the users' initialisation parameters choices
65  bool res = set_user_params();
66  if( !res ) {
67  return StatusCode::FAILURE;
68  }
69 
70  // create the starlight object
71  m_starlight = new starlight();
72  // Set random generator to prevent crash in tests.
73  m_randomGenerator = std::make_shared<randomGenerator>();
74  m_randomGenerator->SetSeed(seeds[0]);
75  m_starlight->setRandomGenerator(m_randomGenerator.get());
76  // set input parameters
77  m_starlight->setInputParameters(&m_inputParameters);
78  // and initialize
79  m_starlight->init();
80 
81  // dump events to lhef (needed for QED showering with Pythia8
82  if(m_lheOutput){
83  ATH_MSG_INFO("===> dumping starlight events to lhef format. \n" );
84  if(!starlight2lhef()) return StatusCode::FAILURE;
85  }
86 
87  return StatusCode::SUCCESS;
88 }
89 
91 {
92  if(m_lheOutput) return StatusCode::SUCCESS;
93  ATH_MSG_DEBUG( " STARLIGHT generating. \n" );
94 
95  //Re-seed the random number stream
96  long seeds[7];
97  const EventContext& ctx = Gaudi::Hive::currentContext();
98  ATHRNG::calculateSeedsMC21(seeds, starlight_stream, ctx.eventID().event_number(),
100  m_randomGenerator->SetSeed(seeds[0]);
101 
102  // Generate event
103  m_event = new upcEvent;
104 #ifdef UPCXEVENT_H
105  (*m_event) = m_starlight->produceUpcEvent();
106 #else
107  (*m_event) = m_starlight->produceEvent();
108 #endif
109 
110  // update event counter
111  ++m_events;
112 
113  int numberofTracks = m_event->getParticles()->size();
114  int numberOfVertices = 1; //m_event->getVertices()->size();
115 
116  ATH_MSG_DEBUG( "EVENT: " << m_events << " "
117  << " with " << numberOfVertices << " vertices "
118  << " and " << numberofTracks << " tracks" );
119  ATH_MSG_DEBUG( "VERTEX: "<< 0. << " " << 0. << " " << 0.
120  << " with " << numberofTracks << " tracks" );
121 
122  int ipart = 0;
123  std::vector<starlightParticle>::const_iterator part =
124  (m_event->getParticles())->begin();
125  for (part = m_event->getParticles()->begin();
126  part != m_event->getParticles()->end(); ++part, ++ipart) {
127  ATH_MSG_DEBUG( "TRACK: " << " "
128  << starlightParticleCodes::jetsetToGeant((*part).getCharge() * (*part).getPdgCode()) << " "
129  << (*part).GetPx() << " " << (*part).GetPy() << " "<< (*part).GetPz()
130  << " " << m_events << " " << ipart << " " << 0 << " "
131  << (*part).getCharge() * (*part).getPdgCode() );
132  }
133 
134  ATH_MSG_DEBUG( " Starlight generating done. \n" );
135 
136  return StatusCode::SUCCESS;
137 }
138 
141 {
142  ATH_MSG_DEBUG( " STARLIGHT Ending. \n" );
143 
144  return StatusCode::SUCCESS;
145 }
146 
148 Starlight_i::fillEvt(HepMC::GenEvent* evt)
149 {
150  if(m_lheOutput) return StatusCode::SUCCESS;
151  ATH_MSG_DEBUG( " STARLIGHT Filing. \n" );
152 
153  // Set the event number
154  evt->set_event_number( m_events );
155 
156  // Create the event vertex
158  evt->add_vertex( v1 );
159 
160  // Loop on all final particles and
161  // put them all as outgoing from the event vertex
162  int ipart = 0;
163  std::vector<starlightParticle>::const_iterator part =
164  (m_event->getParticles())->begin();
165  double px_tot=0;
166  double py_tot=0;
167  double pz_tot=0;
168  for (part = m_event->getParticles()->begin();
169  part != m_event->getParticles()->end(); ++part, ++ipart)
170  {
171  int pid = (*part).getPdgCode();
172  int charge = (*part).getCharge();
173  //AO special for pid sign stored in charge
174  int pidsign = pid/std::abs(pid);
175  int chsign = 0;
176  if (charge !=0) chsign = charge/std::abs(charge);
177  if( chsign != pidsign && chsign != 0) pid = -pid;
178 
179  double px = (*part).GetPx();
180  double py = (*part).GetPy();
181  double pz = (*part).GetPz();
182  double e = (*part).GetE();
183  // mass fix implemented only for muons
184  if(std::abs(pid)==13) {
185  float mass = m_inputParameters.muonMass();//0.1056583715;// starlightConstants::muonMass;
186  e = std::sqrt(px*px + py*py + pz*pz + mass*mass);
187  }
188  // mass fix for photons (ALPs)
189  if(std::abs(pid)==22) {
190  e = std::sqrt(px*px + py*py + pz*pz);
191  }
192 
193  ATH_MSG_DEBUG( "saving particle " << ipart );
194  px_tot+=px;
195  py_tot+=py;
196  pz_tot+=pz;
197 
198  if(!m_suppressVMdecay) v1->add_particle_out(
199  HepMC::newGenParticlePtr(HepMC::FourVector(px, py, pz, e), pid, 1) );
200  }
201  if(m_suppressVMdecay) {
202  int pid = 113;
203  double mass = 0.770;
204  if(m_prodParticleId == 443011 || m_prodParticleId == 443013){
205  pid = 443;
206  mass = 3.0969;
207  }
208  if(m_prodParticleId == 444011 || m_prodParticleId == 444013){
209  pid = 100443;
210  mass = 3.6861;
211  }
212  if(m_prodParticleId == 553011 || m_prodParticleId == 553013){
213  pid = 553;
214  mass = 9.4604;
215  }
216  if(m_prodParticleId == 554011 || m_prodParticleId == 554013){
217  pid = 100553;
218  mass = 10.023;
219  }
220  if(m_prodParticleId == 555011 || m_prodParticleId == 555013){
221  pid = 200553;
222  mass = 10.355;
223  }
224  double e = sqrt(px_tot*px_tot + py_tot*py_tot + pz_tot*pz_tot + mass*mass);
225  v1->add_particle_out(
226  HepMC::newGenParticlePtr(HepMC::FourVector(px_tot, py_tot, pz_tot, e), pid, 1) );
227  }
228  ATH_MSG_DEBUG( "Saved " << ipart << " tracks " );
229 
230  // Convert cm->mm and GeV->MeV
231  //
232  GeVToMeV(evt);
233 
234  return StatusCode::SUCCESS;
235 }
236 
237 bool
239 {
240 
241  std::string lheFilename = "events.lhe";
242  std::ofstream lheStream;
243  lheStream.open(lheFilename.c_str(), std::ofstream::trunc);
244  if(!lheStream) {
245  ATH_MSG_ERROR("error: Failed to open file "+lheFilename);
246  return false;
247  }
248 
249  lheStream << "<LesHouchesEvents version=\"1.0\">\n";
250  lheStream << "<!--\n";
251  lheStream << "File generated using Starlight \n";
252  lheStream << "-->\n";
253 
254  float beam_energy=0.;
255  // run-3 beam energy (allowing approximate value of 2877 for gamma of the beams)
256  if(m_beam1Gamma>2870 && m_beam1Gamma<2880) beam_energy = 2.68e+03;
257  // run-2 beam energy
258  else beam_energy = 2.51e+03;
259 
260  lheStream << "<init>\n";
261  lheStream << " 13 -13 "<<beam_energy<<" "<<beam_energy<<" 0 0 0 0 3 1\n";
262  lheStream << " 1.000000e+00 0.000000e+00 1.000000e+00 9999\n";
263  lheStream << "</init>\n";
264 
265 
266  std::unique_ptr<upcEvent> uevent(new upcEvent);
267 
268  for(unsigned int i=0; i<m_maxevents; i++) {
269  lheStream << "<event>\n";
270 #ifdef UPCXEVENT_H
271  (*uevent) = m_starlight->produceUpcEvent();
272 #else
273  (*uevent) = m_starlight->produceEvent();
274 #endif
275  int ipart = 0;
276  CLHEP::HepLorentzVector photon_system(0);
277  double ptscale =0;
278  std::vector<starlightParticle>::const_iterator part = (uevent->getParticles())->begin();
279  for (part = uevent->getParticles()->begin(); part != uevent->getParticles()->end(); ++part, ++ipart)
280  {
281  CLHEP::HepLorentzVector particle_sl((*part).GetPx(), (*part).GetPy(), (*part).GetPz(), (*part).GetE());
282  photon_system += particle_sl;
283  ptscale += std::sqrt((*part).GetPx()*(*part).GetPx() + (*part).GetPy()*(*part).GetPy());
284  }
285 
286  // avg pt is the correct scale here
287  ptscale /= static_cast<float> (ipart);
288  lheStream << " 4 9999 1.000000e+00 "<<ptscale<<" 7.297e-03 2.569093e-01\n";
289 
291  lheStream << " -11 -1 0 0 0 0 0.0000000000e+00 0.0000000000e+00 "
292  << photon_system.m()/2.*std::exp(photon_system.rapidity())<<" "
293  <<photon_system.m()/2.*std::exp(photon_system.rapidity())
294  << " 0.0000000000e+00 0. 9.\n";
295  lheStream << " 11 -1 0 0 0 0 0.0000000000e+00 0.0000000000e+00 "
296  << -photon_system.m()/2.*std::exp(-photon_system.rapidity())<<" "
297  <<photon_system.m()/2.*std::exp(-photon_system.rapidity())
298  << " 0.0000000000e+00 0. 9.\n";
299  }
300 
301  else{
302  lheStream << " 22 -1 0 0 0 0 0.0000000000e+00 0.0000000000e+00 "
303  << photon_system.m()/2.*std::exp(photon_system.rapidity())<<" "
304  <<photon_system.m()/2.*std::exp(photon_system.rapidity())
305  <<" 0.0000000000e+00 0. 9.\n";
306  lheStream << " 22 -1 0 0 0 0 0.0000000000e+00 0.0000000000e+00 "
307  << -photon_system.m()/2.*std::exp(-photon_system.rapidity())<<" "
308  <<photon_system.m()/2.*std::exp(-photon_system.rapidity())
309  <<" 0.0000000000e+00 0. 9.\n";
310  }
311 
312  for (part = uevent->getParticles()->begin(); part != uevent->getParticles()->end(); ++part, ++ipart)
313  {
314  int pid = (*part).getPdgCode();
315  int charge = (*part).getCharge();
316  //AO special for pid sign stored in charge
317  int pidsign = pid/std::abs(pid);
318  int chsign = charge/std::abs(charge);
319  if( chsign != pidsign ) pid = -pid;
320 
321  double px = (*part).GetPx();
322  double py = (*part).GetPy();
323  double pz = (*part).GetPz();
324  double e = (*part).GetE();
325  double mass = (*part).getMass();
326  if(std::abs(pid)==11) mass = m_inputParameters.mel();
327  else if(std::abs(pid)==13) mass = m_inputParameters.muonMass();
328  else if(std::abs(pid)==15) mass = m_inputParameters.tauMass();
329 
330  lheStream << pid<<" 1 1 2 0 0 "<<px<<" "<<py<<" "<<pz<<" "<<e<<" "<<mass<<" 0. 9.\n";
331 
332  }
333  lheStream << "</event>\n";
334  }
335 
336 
337  lheStream << "</LesHouchesEvents>";
338  lheStream.close();
339 
340  return true;
341 }
342 
344 {
345  // Set starlight user initialization parameters
346 
347  // write python starlight config parameters to tmp file
348  // if external config file not specified
349  if (m_configFileName.empty()) {
350  m_configFileName = "tmp.slight.in";
351  if (!prepare_params_file()) {
352  printWarn <<
353  "problems initializing input parameters. cannot initialize starlight.";
354  return false;
355  }
356  }
357 
358  m_inputParameters.configureFromFile(m_configFileName);
359  if (!m_inputParameters.init()) {
360  ATH_MSG_WARNING( "problems initializing input parameters. cannot initialize starlight. " );
361  return false;
362  }
363 
364  return true;
365 }
366 
368 {
369  // Write initialization parameters to tmp file
370 
372  {
373  ATH_MSG_INFO( " Command is: " << *i );
374 
375  StringParse mystring(*i);
376  std::string myparam = mystring.piece<std::string>(1);
377  if (myparam == "beam1Z")
378  {
379  m_beam1Z = mystring.piece<double>(2);
380  }
381  else if (myparam == "beam1A")
382  {
383  m_beam1A = mystring.piece<double>(2);
384  }
385  else if (myparam == "beam2Z")
386  {
387  m_beam2Z = mystring.piece<double>(2);
388  }
389  else if (myparam == "beam2A")
390  {
391  m_beam2A = mystring.piece<double>(2);
392  }
393  else if (myparam == "beam1Gamma")
394  {
395  m_beam1Gamma = mystring.piece<double>(2);
396  }
397  else if (myparam == "beam2Gamma")
398  {
399  m_beam2Gamma = mystring.piece<double>(2);
400  }
401  else if (myparam == "maxW")
402  {
403  m_maxW = mystring.piece<double>(2);
404  }
405  else if (myparam == "minW")
406  {
407  m_minW = mystring.piece<double>(2);
408  }
409  else if (myparam == "nmbWBins")
410  {
411  m_nmbWBins = mystring.piece<double>(2);
412  }
413  else if (myparam == "maxRapidity")
414  {
415  m_maxRapidity = mystring.piece<double>(2);
416  }
417  else if (myparam == "nmbRapidityBins")
418  {
419  m_nmbRapidityBins = mystring.piece<double>(2);
420  }
421  else if (myparam == "accCutPt")
422  {
423  m_accCutPt = mystring.piece<double>(2);
424  }
425  else if (myparam == "minPt")
426  {
427  m_minPt = mystring.piece<double>(2);
428  }
429  else if (myparam == "maxPt")
430  {
431  m_maxPt = mystring.piece<double>(2);
432  }
433  else if (myparam == "accCutEta")
434  {
435  m_accCutEta = mystring.piece<double>(2);
436  }
437  else if (myparam == "minEta")
438  {
439  m_minEta = mystring.piece<double>(2);
440  }
441  else if (myparam == "maxEta")
442  {
443  m_maxEta = mystring.piece<double>(2);
444  }
445  else if (myparam == "productionMode")
446  {
447  m_productionMode = mystring.piece<double>(2);
448  }
449  else if (myparam == "axionMass")
450  {
451  m_axionMass = mystring.piece<double>(2);
452  }
453  else if (myparam == "nmbEventsTot")
454  {
455  m_nmbEventsTot = mystring.piece<double>(2);
456  }
457  else if (myparam == "prodParticleId")
458  {
459  m_prodParticleId = mystring.piece<double>(2);
460  }
461  else if (myparam == "randomSeed")
462  {
463  m_randomSeed = mystring.piece<double>(2);
464  }
465  else if (myparam == "outputFormat")
466  {
467  m_outputFormat = mystring.piece<double>(2);
468  }
469  else if (myparam == "beamBreakupMode")
470  {
471  m_beamBreakupMode = mystring.piece<double>(2);
472  }
473  else if (myparam == "interferenceEnabled")
474  {
475  m_interferenceEnabled = mystring.piece<double>(2);
476  }
477  else if (myparam == "interferenceStrength")
478  {
479  m_interferenceStrength = mystring.piece<double>(2);
480  }
481  else if (myparam == "coherentProduction")
482  {
483  m_coherentProduction = mystring.piece<double>(2);
484  }
485  else if (myparam == "incoherentFactor")
486  {
487  m_incoherentFactor = mystring.piece<double>(2);
488  }
489  else if (myparam == "maxPtInterference")
490  {
491  m_maxPtInterference = mystring.piece<double>(2);
492  }
493  else if (myparam == "nmbPtBinsInterference")
494  {
495  m_nmbPtBinsInterference = mystring.piece<double>(2);
496  }
497  else if (myparam == "xsecMethod")
498  {
499  m_xsecMethod = mystring.piece<double>(2);
500  }
501  else if (myparam == "nThreads")
502  {
503  m_nThreads = mystring.piece<double>(2);
504  }
505  else if (myparam == "pythFullRec")
506  {
507  m_pythFullRec = mystring.piece<double>(2);
508  }
509  else
510  {
511  ATH_MSG_ERROR( " ERROR in STARLIGHT INITIALIZATION PARAMETERS "
512  << myparam << " is an invalid parameter !" );
513  return false;
514  }
515  }
516 
517  std::ofstream configFile;
518  configFile.open(m_configFileName.value().c_str());
519 
520  configFile << "BEAM_1_Z = " << m_beam1Z << std::endl;
521  configFile << "BEAM_1_A = " << m_beam1A << std::endl;
522  configFile << "BEAM_2_Z = " << m_beam2Z << std::endl;
523  configFile << "BEAM_2_A = " << m_beam2A << std::endl;
524  configFile << "BEAM_1_GAMMA = " << m_beam1Gamma << std::endl;
525  configFile << "BEAM_2_GAMMA = " << m_beam2Gamma << std::endl;
526  configFile << "W_MAX = " << m_maxW << std::endl;
527  configFile << "W_MIN = " << m_minW << std::endl;
528  configFile << "W_N_BINS = " << m_nmbWBins << std::endl;
529  configFile << "RAP_MAX = " << m_maxRapidity << std::endl;
530  configFile << "RAP_N_BINS = " << m_nmbRapidityBins << std::endl;
531  configFile << "CUT_PT = " << m_accCutPt << std::endl;
532  configFile << "PT_MIN = " << m_minPt << std::endl;
533  configFile << "PT_MAX = " << m_maxPt << std::endl;
534  configFile << "CUT_ETA = " << m_accCutEta << std::endl;
535  configFile << "ETA_MIN = " << m_minEta << std::endl;
536  configFile << "ETA_MAX = " << m_maxEta << std::endl;
537  configFile << "PROD_MODE = " << m_productionMode << std::endl;
538  configFile << "AXION_MASS = " << m_axionMass << std::endl;
539  configFile << "N_EVENTS = " << m_nmbEventsTot << std::endl;
540  configFile << "PROD_PID = " << m_prodParticleId << std::endl;
541  configFile << "RND_SEED = " << m_randomSeed << std::endl;
542  configFile << "BREAKUP_MODE = " << m_beamBreakupMode << std::endl;
543  configFile << "INTERFERENCE = " << m_interferenceEnabled << std::endl;
544  configFile << "IF_STRENGTH = " << m_interferenceStrength << std::endl;
545  configFile << "INT_PT_MAX = " << m_maxPtInterference << std::endl;
546  configFile << "INT_PT_N_BINS = " << m_nmbPtBinsInterference << std::endl;
547  configFile << "COHERENT = " << m_coherentProduction << std::endl;
548  configFile << "INCO_FACTOR = " << m_incoherentFactor << std::endl;
549  configFile << "XSEC_METHOD = " << m_xsecMethod << std::endl;
550  configFile << "N_THREADS = " << m_nThreads << std::endl;
551  configFile << "PYTHIA_FULL_EVENTRECORD = " << m_pythFullRec << std::endl;
552 
553  configFile.close();
554  return true;
555 }
HepMC::GenVertexPtr
HepMC::GenVertex * GenVertexPtr
Definition: GenVertex.h:59
Starlight_i::m_event
upcEvent * m_event
Definition: Starlight_i.h:55
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
Starlight_i::m_doTauolappLheFormat
BooleanProperty m_doTauolappLheFormat
Definition: Starlight_i.h:45
StringParse
Utility object for parsing a string into tokens and returning them as a variety of types.
Definition: StringParse.h:33
GenEvent.h
taskman.configFile
configFile
Definition: taskman.py:311
test_pyathena.px
px
Definition: test_pyathena.py:18
Starlight_i::m_starlight
starlight * m_starlight
Definition: Starlight_i.h:51
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Starlight_i::m_accCutEta
bool m_accCutEta
Definition: Starlight_i.h:71
Starlight_i::m_maxEta
double m_maxEta
Definition: Starlight_i.h:73
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
Starlight_i::m_beam2A
unsigned int m_beam2A
Definition: Starlight_i.h:60
GenBase::GeVToMeV
void GeVToMeV(HepMC::GenEvent *evt)
Scale event energies/momenta by x 1000.
Definition: GenBase.cxx:58
Starlight_i::m_inputParameters
inputParameters m_inputParameters
Definition: Starlight_i.h:53
Starlight_i::m_productionMode
int m_productionMode
Definition: Starlight_i.h:74
GenVertex.h
Starlight_i::m_suppressVMdecay
BooleanProperty m_suppressVMdecay
Definition: Starlight_i.h:46
StringParse.h
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
Starlight_i::m_beam1A
unsigned int m_beam1A
Definition: Starlight_i.h:58
Starlight_i::m_axionMass
double m_axionMass
Definition: Starlight_i.h:54
Starlight_i::fillEvt
virtual StatusCode fillEvt(HepMC::GenEvent *evt)
For filling the HepMC event object.
Definition: Starlight_i.cxx:148
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
Starlight_i::m_nThreads
int m_nThreads
Definition: Starlight_i.h:88
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
Starlight_i::m_maxPt
double m_maxPt
Definition: Starlight_i.h:70
GenParticle.h
Starlight_i::m_beam1Gamma
double m_beam1Gamma
Definition: Starlight_i.h:61
Starlight_i::m_lheOutput
BooleanProperty m_lheOutput
Definition: Starlight_i.h:43
Starlight_i::m_configFileName
StringProperty m_configFileName
Definition: Starlight_i.h:42
Starlight_i::m_minPt
double m_minPt
Definition: Starlight_i.h:69
Starlight_i::m_beam2Gamma
double m_beam2Gamma
Definition: Starlight_i.h:62
Starlight_i::m_interferenceStrength
double m_interferenceStrength
Definition: Starlight_i.h:80
Starlight_i::m_xsecMethod
bool m_xsecMethod
Definition: Starlight_i.h:87
GenModule
Base class for common behaviour of generator interfaces.
Definition: GenModule.h:39
Starlight_i::starlight2lhef
bool starlight2lhef()
Definition: Starlight_i.cxx:238
Starlight_i::m_pythFullRec
bool m_pythFullRec
Definition: Starlight_i.h:89
Starlight_i::genFinalize
virtual StatusCode genFinalize()
For finalising the generator, if required.
Definition: Starlight_i.cxx:140
Starlight_i::m_randomGenerator
std::shared_ptr< randomGenerator > m_randomGenerator
Definition: Starlight_i.h:52
StringParse::piece
T piece(size_t num) const
Templated function to get the num'th token as any numeric type.
Definition: StringParse.h:44
Starlight_i.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Starlight_i::m_InitializeVector
StringArrayProperty m_InitializeVector
Definition: Starlight_i.h:48
HepMC::newGenVertexPtr
GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), const int i=0)
Definition: GenVertex.h:64
lumiFormat.i
int i
Definition: lumiFormat.py:85
trigbs_createHLTBSTestFile.beam_energy
beam_energy
Definition: trigbs_createHLTBSTestFile.py:124
Starlight_i::m_outputFormat
int m_outputFormat
Definition: Starlight_i.h:77
Starlight_i::Starlight_i
Starlight_i(const std::string &name, ISvcLocator *pSvcLocator)
Definition: Starlight_i.cxx:42
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
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:11
Starlight_i::set_user_params
bool set_user_params()
Definition: Starlight_i.cxx:343
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
Starlight_i::m_prodParticleId
int m_prodParticleId
Definition: Starlight_i.h:76
Starlight_i::m_maxPtInterference
double m_maxPtInterference
Definition: Starlight_i.h:84
Starlight_i::m_accCutPt
bool m_accCutPt
Definition: Starlight_i.h:68
Starlight_i::m_nmbWBins
unsigned int m_nmbWBins
Definition: Starlight_i.h:65
Starlight_i::m_nmbPtBinsInterference
int m_nmbPtBinsInterference
Definition: Starlight_i.h:85
Starlight_i::m_nmbEventsTot
unsigned int m_nmbEventsTot
Definition: Starlight_i.h:75
starlight
Definition: starlight.example.joboption.py:1
Amg::py
@ py
Definition: GeoPrimitives.h:39
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Starlight_i::m_minW
double m_minW
Definition: Starlight_i.h:64
Starlight_i::callGenerator
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
Definition: Starlight_i.cxx:90
charge
double charge(const T &p)
Definition: AtlasPID.h:931
Starlight_i::m_interferenceEnabled
bool m_interferenceEnabled
Definition: Starlight_i.h:79
Starlight_i::m_nmbRapidityBins
unsigned int m_nmbRapidityBins
Definition: Starlight_i.h:67
Starlight_i::m_incoherentFactor
double m_incoherentFactor
Definition: Starlight_i.h:82
RNGWrapper.h
HepMC::newGenParticlePtr
GenParticlePtr newGenParticlePtr(const HepMC::FourVector &mom=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), int pid=0, int status=0)
Definition: GenParticle.h:39
Starlight_i::m_coherentProduction
bool m_coherentProduction
Definition: Starlight_i.h:81
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
GenModule::m_randomSeed
IntegerProperty m_randomSeed
Seed for random number engine.
Definition: GenModule.h:84
Starlight_i::m_dsid
IntegerProperty m_dsid
Definition: Starlight_i.h:41
Starlight_i::m_beamBreakupMode
int m_beamBreakupMode
Definition: Starlight_i.h:78
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
Starlight_i::m_events
int m_events
Definition: Starlight_i.h:50
Starlight_i::m_minEta
double m_minEta
Definition: Starlight_i.h:72
Starlight_i::m_beam1Z
unsigned int m_beam1Z
Definition: Starlight_i.h:57
Starlight_i::m_beam2Z
unsigned int m_beam2Z
Definition: Starlight_i.h:59
Starlight_i::~Starlight_i
virtual ~Starlight_i()
Definition: Starlight_i.cxx:47
Starlight_i::prepare_params_file
bool prepare_params_file()
Definition: Starlight_i.cxx:367
CommandVector
std::vector< std::string > CommandVector
Definition: Starlight_i.cxx:40
Starlight_i::m_maxevents
UnsignedIntegerProperty m_maxevents
Definition: Starlight_i.h:44
Starlight_i::m_maxRapidity
double m_maxRapidity
Definition: Starlight_i.h:66
Starlight_i::m_maxW
double m_maxW
Definition: Starlight_i.h:63
Starlight_i::genInitialize
virtual StatusCode genInitialize()
For initializing the generator, if required.
Definition: Starlight_i.cxx:52