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