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
50 if (m_starlight) delete m_starlight;
51 if (m_event) delete m_event;
52}
53
55{
56 // Initialisation of input parameters
57 //
58 ATH_MSG_INFO( "===> January 20 2011 STARLIGHT INTERFACE VERSION. \n" );
59 ATH_MSG_INFO( "===> STARLIGHT INITIALISING. \n" );
60
61 //Re-seed the random number stream
62 long seeds[7];
63 ATHRNG::calculateSeedsMC21(seeds, starlight_stream, 0, m_dsid, m_randomSeed);
64
65 // Create inputParameters and
66 // set the users' initialisation parameters choices
67 bool res = set_user_params();
68 if( !res ) {
69 return StatusCode::FAILURE;
70 }
71
72 // create the starlight object
73 m_starlight = new starlight();
74 // Set random generator to prevent crash in tests.
75 m_randomGenerator = std::make_shared<randomGenerator>();
76 m_randomGenerator->SetSeed(seeds[0]);
77 m_starlight->setRandomGenerator(m_randomGenerator.get());
78 // set input parameters
79 m_starlight->setInputParameters(&m_inputParameters);
80 // and initialize
81 m_starlight->init();
82
83 // dump events to lhef (needed for QED showering with Pythia8
84 if(m_lheOutput){
85 ATH_MSG_INFO("===> dumping starlight events to lhef format. \n" );
86 if(!starlight2lhef()) return StatusCode::FAILURE;
87 }
88
89 return StatusCode::SUCCESS;
90}
91
93{
94 if(m_lheOutput) return StatusCode::SUCCESS;
95 ATH_MSG_DEBUG( " STARLIGHT generating. \n" );
96
97 //Re-seed the random number stream
98 long seeds[7];
99 const EventContext& ctx = Gaudi::Hive::currentContext();
100 ATHRNG::calculateSeedsMC21(seeds, starlight_stream, ctx.eventID().event_number(),
102 m_randomGenerator->SetSeed(seeds[0]);
103
104 // Generate event
105 m_event = new upcEvent;
106#ifdef UPCXEVENT_H
107 (*m_event) = m_starlight->produceUpcEvent();
108#else
109 (*m_event) = m_starlight->produceEvent();
110#endif
111
112 // update event counter
113 ++m_events;
114
115 int numberofTracks = m_event->getParticles()->size();
116 int numberOfVertices = 1; //m_event->getVertices()->size();
117
118 ATH_MSG_DEBUG( "EVENT: " << m_events << " "
119 << " with " << numberOfVertices << " vertices "
120 << " and " << numberofTracks << " tracks" );
121 ATH_MSG_DEBUG( "VERTEX: "<< 0. << " " << 0. << " " << 0.
122 << " with " << numberofTracks << " tracks" );
123
124 int ipart = 0;
125 std::vector<starlightParticle>::const_iterator part =
126 (m_event->getParticles())->begin();
127 for (part = m_event->getParticles()->begin();
128 part != m_event->getParticles()->end(); ++part, ++ipart) {
129 ATH_MSG_DEBUG( "TRACK: " << " "
130 << starlightParticleCodes::jetsetToGeant((*part).getCharge() * (*part).getPdgCode()) << " "
131 << (*part).GetPx() << " " << (*part).GetPy() << " "<< (*part).GetPz()
132 << " " << m_events << " " << ipart << " " << 0 << " "
133 << (*part).getCharge() * (*part).getPdgCode() );
134 }
135
136 ATH_MSG_DEBUG( " Starlight generating done. \n" );
137
138 return StatusCode::SUCCESS;
139}
140
141StatusCode
143{
144 ATH_MSG_DEBUG( " STARLIGHT Ending. \n" );
145
146 return StatusCode::SUCCESS;
147}
148
149StatusCode
150Starlight_i::fillEvt(HepMC::GenEvent* evt)
151{
152 if(m_lheOutput) return StatusCode::SUCCESS;
153 ATH_MSG_DEBUG( " STARLIGHT Filing. \n" );
154
155 // Set the event number
156 evt->set_event_number( m_events );
157
158 // Create the event vertex
160 evt->add_vertex( v1 );
161
162 // Loop on all final particles and
163 // put them all as outgoing from the event vertex
164 int ipart = 0;
165 std::vector<starlightParticle>::const_iterator part =
166 (m_event->getParticles())->begin();
167 double px_tot=0;
168 double py_tot=0;
169 double pz_tot=0;
170 for (part = m_event->getParticles()->begin();
171 part != m_event->getParticles()->end(); ++part, ++ipart)
172 {
173 int pid = (*part).getPdgCode();
174 int charge = (*part).getCharge();
175 //AO special for pid sign stored in charge
176 int pidsign = pid/std::abs(pid);
177 int chsign = 0;
178 if (charge !=0) chsign = charge/std::abs(charge);
179 if( chsign != pidsign && chsign != 0) pid = -pid;
180
181 double px = (*part).GetPx();
182 double py = (*part).GetPy();
183 double pz = (*part).GetPz();
184 double e = (*part).GetE();
185 // mass fix implemented only for muons
186 if(std::abs(pid)==13) {
187 float mass = m_inputParameters.muonMass();//0.1056583715;// starlightConstants::muonMass;
188 e = std::sqrt(px*px + py*py + pz*pz + mass*mass);
189 }
190 // mass fix for photons (ALPs)
191 if(std::abs(pid)==22) {
192 e = std::sqrt(px*px + py*py + pz*pz);
193 }
194
195 ATH_MSG_DEBUG( "saving particle " << ipart );
196 px_tot+=px;
197 py_tot+=py;
198 pz_tot+=pz;
199
200 if(!m_suppressVMdecay) v1->add_particle_out(
201 HepMC::newGenParticlePtr(HepMC::FourVector(px, py, pz, e), pid, 1) );
202 }
204 int pid = 113;
205 double mass = 0.770;
206 if(m_prodParticleId == 443011 || m_prodParticleId == 443013){
207 pid = 443;
208 mass = 3.0969;
209 }
210 if(m_prodParticleId == 444011 || m_prodParticleId == 444013){
211 pid = 100443;
212 mass = 3.6861;
213 }
214 if(m_prodParticleId == 553011 || m_prodParticleId == 553013){
215 pid = 553;
216 mass = 9.4604;
217 }
218 if(m_prodParticleId == 554011 || m_prodParticleId == 554013){
219 pid = 100553;
220 mass = 10.023;
221 }
222 if(m_prodParticleId == 555011 || m_prodParticleId == 555013){
223 pid = 200553;
224 mass = 10.355;
225 }
226 double e = sqrt(px_tot*px_tot + py_tot*py_tot + pz_tot*pz_tot + mass*mass);
227 v1->add_particle_out(
228 HepMC::newGenParticlePtr(HepMC::FourVector(px_tot, py_tot, pz_tot, e), pid, 1) );
229 }
230 ATH_MSG_DEBUG( "Saved " << ipart << " tracks " );
231
232 MC::GeVToMeV(evt); //Only scales momenta and masses
233
234 return StatusCode::SUCCESS;
235}
236
237bool
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 if (ipart == 0)[[unlikely]]{
288 ATH_MSG_WARNING( "Starlight_i::starlight2lhef: ipart is zero.");
289 ptscale = 0;
290 } else {
291 ptscale /= static_cast<float> (ipart);
292 }
293 lheStream << " 4 9999 1.000000e+00 "<<ptscale<<" 7.297e-03 2.569093e-01\n";
294
296 lheStream << " -11 -1 0 0 0 0 0.0000000000e+00 0.0000000000e+00 "
297 << photon_system.m()/2.*std::exp(photon_system.rapidity())<<" "
298 <<photon_system.m()/2.*std::exp(photon_system.rapidity())
299 << " 0.0000000000e+00 0. 9.\n";
300 lheStream << " 11 -1 0 0 0 0 0.0000000000e+00 0.0000000000e+00 "
301 << -photon_system.m()/2.*std::exp(-photon_system.rapidity())<<" "
302 <<photon_system.m()/2.*std::exp(-photon_system.rapidity())
303 << " 0.0000000000e+00 0. 9.\n";
304 }
305
306 else{
307 lheStream << " 22 -1 0 0 0 0 0.0000000000e+00 0.0000000000e+00 "
308 << photon_system.m()/2.*std::exp(photon_system.rapidity())<<" "
309 <<photon_system.m()/2.*std::exp(photon_system.rapidity())
310 <<" 0.0000000000e+00 0. 9.\n";
311 lheStream << " 22 -1 0 0 0 0 0.0000000000e+00 0.0000000000e+00 "
312 << -photon_system.m()/2.*std::exp(-photon_system.rapidity())<<" "
313 <<photon_system.m()/2.*std::exp(-photon_system.rapidity())
314 <<" 0.0000000000e+00 0. 9.\n";
315 }
316
317 for (part = uevent->getParticles()->begin(); part != uevent->getParticles()->end(); ++part, ++ipart)
318 {
319 int pid = (*part).getPdgCode();
320 int charge = (*part).getCharge();
321 //AO special for pid sign stored in charge
322 int pidsign = pid/std::abs(pid);
323 int chsign = charge/std::abs(charge);
324 if( chsign != pidsign ) pid = -pid;
325
326 double px = (*part).GetPx();
327 double py = (*part).GetPy();
328 double pz = (*part).GetPz();
329 double e = (*part).GetE();
330 double mass = (*part).getMass();
331 if(std::abs(pid)==11) mass = m_inputParameters.mel();
332 else if(std::abs(pid)==13) mass = m_inputParameters.muonMass();
333 else if(std::abs(pid)==15) mass = m_inputParameters.tauMass();
334
335 lheStream << pid<<" 1 1 2 0 0 "<<px<<" "<<py<<" "<<pz<<" "<<e<<" "<<mass<<" 0. 9.\n";
336
337 }
338 lheStream << "</event>\n";
339 }
340
341
342 lheStream << "</LesHouchesEvents>";
343 lheStream.close();
344
345 return true;
346}
347
349{
350 // Set starlight user initialization parameters
351
352 // write python starlight config parameters to tmp file
353 // if external config file not specified
354 if (m_configFileName.empty()) {
355 m_configFileName = "tmp.slight.in";
356 if (!prepare_params_file()) {
357 printWarn <<
358 "problems initializing input parameters. cannot initialize starlight.";
359 return false;
360 }
361 }
362
363 m_inputParameters.configureFromFile(m_configFileName);
364 if (!m_inputParameters.init()) {
365 ATH_MSG_WARNING( "problems initializing input parameters. cannot initialize starlight. " );
366 return false;
367 }
368
369 return true;
370}
371
373{
374 // Write initialization parameters to tmp file
375
376 for(CommandVector::iterator i = m_InitializeVector.begin(); i != m_InitializeVector.end(); ++i )
377 {
378 ATH_MSG_INFO( " Command is: " << *i );
379
380 StringParse mystring(*i);
381 std::string myparam = mystring.piece<std::string>(1);
382 if (myparam == "beam1Z")
383 {
384 m_beam1Z = mystring.piece<double>(2);
385 }
386 else if (myparam == "beam1A")
387 {
388 m_beam1A = mystring.piece<double>(2);
389 }
390 else if (myparam == "beam2Z")
391 {
392 m_beam2Z = mystring.piece<double>(2);
393 }
394 else if (myparam == "beam2A")
395 {
396 m_beam2A = mystring.piece<double>(2);
397 }
398 else if (myparam == "beam1Gamma")
399 {
400 m_beam1Gamma = mystring.piece<double>(2);
401 }
402 else if (myparam == "beam2Gamma")
403 {
404 m_beam2Gamma = mystring.piece<double>(2);
405 }
406 else if (myparam == "maxW")
407 {
408 m_maxW = mystring.piece<double>(2);
409 }
410 else if (myparam == "minW")
411 {
412 m_minW = mystring.piece<double>(2);
413 }
414 else if (myparam == "nmbWBins")
415 {
416 m_nmbWBins = mystring.piece<double>(2);
417 }
418 else if (myparam == "maxRapidity")
419 {
420 m_maxRapidity = mystring.piece<double>(2);
421 }
422 else if (myparam == "nmbRapidityBins")
423 {
424 m_nmbRapidityBins = mystring.piece<double>(2);
425 }
426 else if (myparam == "accCutPt")
427 {
428 m_accCutPt = mystring.piece<double>(2);
429 }
430 else if (myparam == "minPt")
431 {
432 m_minPt = mystring.piece<double>(2);
433 }
434 else if (myparam == "maxPt")
435 {
436 m_maxPt = mystring.piece<double>(2);
437 }
438 else if (myparam == "accCutEta")
439 {
440 m_accCutEta = mystring.piece<double>(2);
441 }
442 else if (myparam == "minEta")
443 {
444 m_minEta = mystring.piece<double>(2);
445 }
446 else if (myparam == "maxEta")
447 {
448 m_maxEta = mystring.piece<double>(2);
449 }
450 else if (myparam == "productionMode")
451 {
452 m_productionMode = mystring.piece<double>(2);
453 }
454 else if (myparam == "axionMass")
455 {
456 m_axionMass = mystring.piece<double>(2);
457 }
458 else if (myparam == "nmbEventsTot")
459 {
460 m_nmbEventsTot = mystring.piece<double>(2);
461 }
462 else if (myparam == "prodParticleId")
463 {
464 m_prodParticleId = mystring.piece<double>(2);
465 }
466 else if (myparam == "randomSeed")
467 {
468 m_randomSeed = mystring.piece<double>(2);
469 }
470 else if (myparam == "outputFormat")
471 {
472 m_outputFormat = mystring.piece<double>(2);
473 }
474 else if (myparam == "beamBreakupMode")
475 {
476 m_beamBreakupMode = mystring.piece<double>(2);
477 }
478 else if (myparam == "interferenceEnabled")
479 {
480 m_interferenceEnabled = mystring.piece<double>(2);
481 }
482 else if (myparam == "interferenceStrength")
483 {
484 m_interferenceStrength = mystring.piece<double>(2);
485 }
486 else if (myparam == "coherentProduction")
487 {
488 m_coherentProduction = mystring.piece<double>(2);
489 }
490 else if (myparam == "incoherentFactor")
491 {
492 m_incoherentFactor = mystring.piece<double>(2);
493 }
494 else if (myparam == "maxPtInterference")
495 {
496 m_maxPtInterference = mystring.piece<double>(2);
497 }
498 else if (myparam == "nmbPtBinsInterference")
499 {
500 m_nmbPtBinsInterference = mystring.piece<double>(2);
501 }
502 else if (myparam == "xsecMethod")
503 {
504 m_xsecMethod = mystring.piece<double>(2);
505 }
506 else if (myparam == "nThreads")
507 {
508 m_nThreads = mystring.piece<double>(2);
509 }
510 else if (myparam == "pythFullRec")
511 {
512 m_pythFullRec = mystring.piece<double>(2);
513 }
514 else
515 {
516 ATH_MSG_ERROR( " ERROR in STARLIGHT INITIALIZATION PARAMETERS "
517 << myparam << " is an invalid parameter !" );
518 return false;
519 }
520 }
521
522 std::ofstream configFile;
523 configFile.open(m_configFileName.value().c_str());
524
525 configFile << "BEAM_1_Z = " << m_beam1Z << std::endl;
526 configFile << "BEAM_1_A = " << m_beam1A << std::endl;
527 configFile << "BEAM_2_Z = " << m_beam2Z << std::endl;
528 configFile << "BEAM_2_A = " << m_beam2A << std::endl;
529 configFile << "BEAM_1_GAMMA = " << m_beam1Gamma << std::endl;
530 configFile << "BEAM_2_GAMMA = " << m_beam2Gamma << std::endl;
531 configFile << "W_MAX = " << m_maxW << std::endl;
532 configFile << "W_MIN = " << m_minW << std::endl;
533 configFile << "W_N_BINS = " << m_nmbWBins << std::endl;
534 configFile << "RAP_MAX = " << m_maxRapidity << std::endl;
535 configFile << "RAP_N_BINS = " << m_nmbRapidityBins << std::endl;
536 configFile << "CUT_PT = " << m_accCutPt << std::endl;
537 configFile << "PT_MIN = " << m_minPt << std::endl;
538 configFile << "PT_MAX = " << m_maxPt << std::endl;
539 configFile << "CUT_ETA = " << m_accCutEta << std::endl;
540 configFile << "ETA_MIN = " << m_minEta << std::endl;
541 configFile << "ETA_MAX = " << m_maxEta << std::endl;
542 configFile << "PROD_MODE = " << m_productionMode << std::endl;
543 configFile << "AXION_MASS = " << m_axionMass << std::endl;
544 configFile << "N_EVENTS = " << m_nmbEventsTot << std::endl;
545 configFile << "PROD_PID = " << m_prodParticleId << std::endl;
546 configFile << "RND_SEED = " << m_randomSeed << std::endl;
547 configFile << "BREAKUP_MODE = " << m_beamBreakupMode << std::endl;
548 configFile << "INTERFERENCE = " << m_interferenceEnabled << std::endl;
549 configFile << "IF_STRENGTH = " << m_interferenceStrength << std::endl;
550 configFile << "INT_PT_MAX = " << m_maxPtInterference << std::endl;
551 configFile << "INT_PT_N_BINS = " << m_nmbPtBinsInterference << std::endl;
552 configFile << "COHERENT = " << m_coherentProduction << std::endl;
553 configFile << "INCO_FACTOR = " << m_incoherentFactor << std::endl;
554 configFile << "XSEC_METHOD = " << m_xsecMethod << std::endl;
555 configFile << "N_THREADS = " << m_nThreads << std::endl;
556 configFile << "PYTHIA_FULL_EVENTRECORD = " << m_pythFullRec << std::endl;
557
558 configFile.close();
559 return true;
560}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
double charge(const T &p)
Definition AtlasPID.h:997
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:58
int m_beamBreakupMode
Definition Starlight_i.h:78
double m_interferenceStrength
Definition Starlight_i.h:80
unsigned int m_beam2A
Definition Starlight_i.h:60
unsigned int m_nmbRapidityBins
Definition Starlight_i.h:67
double m_maxW
Definition Starlight_i.h:63
int m_nmbPtBinsInterference
Definition Starlight_i.h:85
bool m_accCutEta
Definition Starlight_i.h:71
int m_productionMode
Definition Starlight_i.h:74
starlight * m_starlight
Definition Starlight_i.h:51
UnsignedIntegerProperty m_maxevents
Definition Starlight_i.h:44
virtual StatusCode fillEvt(HepMC::GenEvent *evt)
For filling the HepMC event object.
double m_incoherentFactor
Definition Starlight_i.h:82
bool set_user_params()
BooleanProperty m_lheOutput
Definition Starlight_i.h:43
IntegerProperty m_dsid
Definition Starlight_i.h:41
double m_maxEta
Definition Starlight_i.h:73
Starlight_i(const std::string &name, ISvcLocator *pSvcLocator)
StringArrayProperty m_InitializeVector
Definition Starlight_i.h:48
unsigned int m_nmbWBins
Definition Starlight_i.h:65
bool prepare_params_file()
bool starlight2lhef()
int m_outputFormat
Definition Starlight_i.h:77
unsigned int m_beam2Z
Definition Starlight_i.h:59
BooleanProperty m_doTauolappLheFormat
Definition Starlight_i.h:45
unsigned int m_nmbEventsTot
Definition Starlight_i.h:75
int m_prodParticleId
Definition Starlight_i.h:76
double m_axionMass
Definition Starlight_i.h:54
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
double m_beam1Gamma
Definition Starlight_i.h:61
bool m_xsecMethod
Definition Starlight_i.h:87
inputParameters m_inputParameters
Definition Starlight_i.h:53
double m_minEta
Definition Starlight_i.h:72
bool m_accCutPt
Definition Starlight_i.h:68
double m_minPt
Definition Starlight_i.h:69
double m_maxRapidity
Definition Starlight_i.h:66
unsigned int m_beam1Z
Definition Starlight_i.h:57
upcEvent * m_event
Definition Starlight_i.h:55
double m_maxPt
Definition Starlight_i.h:70
virtual ~Starlight_i()
double m_minW
Definition Starlight_i.h:64
virtual StatusCode genFinalize()
For finalising the generator, if required.
std::shared_ptr< randomGenerator > m_randomGenerator
Definition Starlight_i.h:52
StringProperty m_configFileName
Definition Starlight_i.h:42
bool m_coherentProduction
Definition Starlight_i.h:81
BooleanProperty m_suppressVMdecay
Definition Starlight_i.h:46
bool m_pythFullRec
Definition Starlight_i.h:89
virtual StatusCode genInitialize()
For initializing the generator, if required.
bool m_interferenceEnabled
Definition Starlight_i.h:79
double m_beam2Gamma
Definition Starlight_i.h:62
double m_maxPtInterference
Definition Starlight_i.h:84
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.
HepMC::GenVertex * GenVertexPtr
Definition GenVertex.h:59
GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), const int i=0)
Definition GenVertex.h:64
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
void GeVToMeV(HepMC::GenEvent *evt)
#define unlikely(x)