Project
Loading...
Searching...
No Matches
Generator.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
13
15#include "Generators/Trigger.h"
20#include <SimConfig/SimConfig.h>
22#include <fairlogger/Logger.h>
23#include <cmath>
24#include "TClonesArray.h"
25#include "TParticle.h"
26#include "TString.h"
27#include "TSystem.h"
28#include "TGrid.h"
30#include <filesystem>
31#include <cstdlib>
32#ifdef GENERATORS_WITH_TPCLOOPERS
35#endif
36#ifdef GENERATORS_WITH_PYTHIA8
39#endif
40
41namespace o2
42{
43namespace eventgen
44{
45
46std::atomic<int> Generator::InstanceCounter{0};
47unsigned int Generator::gTotalNEvents = 0;
48
50{
51 static const bool isHY = std::getenv("IS_HYPERLOOP") && std::atoi(std::getenv("IS_HYPERLOOP"));
52 return isHY;
53}
54/*****************************************************************/
55/*****************************************************************/
56
57Generator::Generator() : FairGenerator("ALICEo2", "ALICEo2 Generator"),
58 mBoost(0.)
59{
63#ifdef GENERATORS_WITH_TPCLOOPERS
64 const auto& simConfig = o2::conf::SimConfig::Instance();
65 const auto& loopersParam = o2::eventgen::GenTPCLoopersParam::Instance();
66 if (!loopersParam.loopersVeto) {
67 bool transport = (simConfig.getMCEngine() != "O2TrivialMCEngine");
68 if (transport) {
69 bool tpcActive = (std::find(simConfig.getReadoutDetectors().begin(), simConfig.getReadoutDetectors().end(), "TPC") != simConfig.getReadoutDetectors().end());
70 if (tpcActive) {
71 if (initTPCLoopersGen()) {
72 mAddTPCLoopers = kTRUE;
73 }
74 } else {
75 LOG(info) << "TPC not active in readout detectors: loopers fast generator disabled.";
76 }
77 }
78 } else {
79 LOG(info) << "Loopers fast generator turned OFF with veto flag.";
80 }
81#endif
82}
83
84/*****************************************************************/
85
86Generator::Generator(const Char_t* name, const Char_t* title) : FairGenerator(name, title),
87 mBoost(0.)
88{
92#ifdef GENERATORS_WITH_TPCLOOPERS
93 const auto& simConfig = o2::conf::SimConfig::Instance();
94 const auto& loopersParam = o2::eventgen::GenTPCLoopersParam::Instance();
95 if (!loopersParam.loopersVeto) {
96 bool transport = (simConfig.getMCEngine() != "O2TrivialMCEngine");
97 if (transport) {
98 bool tpcActive = (std::find(simConfig.getReadoutDetectors().begin(), simConfig.getReadoutDetectors().end(), "TPC") != simConfig.getReadoutDetectors().end());
99 if (tpcActive) {
100 if (initTPCLoopersGen()) {
101 mAddTPCLoopers = kTRUE;
102 }
103 } else {
104 LOG(info) << "TPC not active in readout detectors: loopers fast generator disabled.";
105 }
106 }
107 } else {
108 LOG(info) << "Loopers fast generator turned OFF with veto flag.";
109 }
110#endif
111}
112
113/*****************************************************************/
114
116{
118#ifdef GENERATORS_WITH_TPCLOOPERS
119 if (mTPCLoopersGen) {
120 delete mTPCLoopersGen;
121 mTPCLoopersGen = nullptr;
122 }
123#endif
124#ifdef GENERATORS_WITH_PYTHIA8
125 if (mEventDecayerReport) {
126 LOG(info) << "EventDecayer summary of generator " << GetName();
127 mEventDecayerReport->print();
128 }
129 delete mEventDecayer;
130 delete mEventDecayerReport;
131#endif
132}
133
134/*****************************************************************/
135#ifdef GENERATORS_WITH_TPCLOOPERS
136bool Generator::initTPCLoopersGen()
137{
138 // Expand all environment paths
139 const auto& loopersParam = o2::eventgen::GenTPCLoopersParam::Instance();
140 auto expandPathName = [](const std::string& path) {
141 TString expandedPath = path;
142 gSystem->ExpandPathName(expandedPath);
143 return std::string(expandedPath.Data());
144 };
145 std::string model_pairs = expandPathName(loopersParam.model_pairs);
146 std::string model_compton = expandPathName(loopersParam.model_compton);
147 std::string nclxrate = expandPathName(loopersParam.nclxrate);
148 const std::string scaler_pair = expandPathName(loopersParam.scaler_pair);
149 const std::string scaler_compton = expandPathName(loopersParam.scaler_compton);
150 const std::string poisson = expandPathName(loopersParam.poisson);
151 const std::string gauss = expandPathName(loopersParam.gauss);
152 const auto& flat_gas = loopersParam.flat_gas;
153 const auto& colsys = loopersParam.colsys;
154 if (flat_gas) {
155 if (colsys != "PbPb" && colsys != "pp") {
156 LOG(warning) << "Automatic background loopers configuration supports only 'pp' and 'PbPb' systems.";
157 LOG(warning) << "Fast loopers generator will remain OFF.";
158 return kFALSE;
159 }
160 bool isContext = std::filesystem::exists("collisioncontext.root");
161 if (!isContext) {
162 LOG(warning) << "Warning: No collisioncontext.root file found!";
163 LOG(warning) << "Loopers will be kept OFF.";
164 return kFALSE;
165 }
166 }
167 // Loopers are a detector background continuous in time, and a single simulation covers the whole
168 // timeframe: when several of them feed the same collision context (embedding), only the source
169 // owning a collision generates its loopers, otherwise each source will generate them for the same time intervals.
170 if (!o2::eventgen::GenTPCLoopers::ownsContextCollisions()) {
171 LOG(info) << "All collisions of this simulation are owned by another source of the collision context, which generates their loopers.";
172 LOG(info) << "Fast loopers generator will remain OFF.";
173 return kFALSE;
174 }
175 std::array<float, 2> multiplier = {loopersParam.multiplier[0], loopersParam.multiplier[1]};
176 unsigned int nLoopersPairs = loopersParam.fixedNLoopers[0];
177 unsigned int nLoopersCompton = loopersParam.fixedNLoopers[1];
178 const std::array<std::string, 3> models = {model_pairs, model_compton, nclxrate};
179 const std::array<std::string, 3> local_names = {"WGANpair.onnx", "WGANcompton.onnx", "nclxrate.root"};
180 const std::array<bool, 3> isAlien = {models[0].starts_with("alien://"), models[1].starts_with("alien://"), models[2].starts_with("alien://")};
181 const std::array<bool, 3> isCCDB = {models[0].starts_with("ccdb://"), models[1].starts_with("ccdb://"), models[2].starts_with("ccdb://")};
182 if (std::any_of(isAlien.begin(), isAlien.end(), [](bool v) { return v; })) {
183 if (!gGrid) {
184 TGrid::Connect("alien://");
185 if (!gGrid) {
186 LOG(fatal) << "AliEn connection failed, check token.";
187 exit(1);
188 }
189 }
190 for (size_t i = 0; i < models.size(); ++i) {
191 if (isAlien[i] && !TFile::Cp(models[i].c_str(), local_names[i].c_str())) {
192 LOG(fatal) << "Error: Model file " << models[i] << " does not exist!";
193 exit(1);
194 }
195 }
196 }
197 if (std::any_of(isCCDB.begin(), isCCDB.end(), [](bool v) { return v; })) {
199 ccdb.setURL("http://alice-ccdb.cern.ch");
200 // Get underlying CCDB API from BasicCCDBManager
201 auto& ccdb_api = ccdb.getCCDBAccessor();
202 for (size_t i = 0; i < models.size(); ++i) {
203 if (isCCDB[i]) {
204 auto model_path = models[i].substr(7); // Remove "ccdb://"
205 // Treat filename if provided in the CCDB path
206 auto extension = model_path.find(".onnx");
207 if (extension != std::string::npos) {
208 auto last_slash = model_path.find_last_of('/');
209 model_path = model_path.substr(0, last_slash);
210 }
211 std::map<std::string, std::string> filter;
212 if (!ccdb_api.retrieveBlob(model_path, "./", filter, o2::ccdb::getCurrentTimestamp(), false, local_names[i].c_str())) {
213 LOG(fatal) << "Error: issues in retrieving " << model_path << " from CCDB!";
214 exit(1);
215 }
216 }
217 }
218 }
219 model_pairs = isAlien[0] || isCCDB[0] ? local_names[0] : model_pairs;
220 model_compton = isAlien[1] || isCCDB[1] ? local_names[1] : model_compton;
221 nclxrate = isAlien[2] || isCCDB[2] ? local_names[2] : nclxrate;
222 try {
223 // Create the TPC loopers generator with the provided parameters
224 mTPCLoopersGen = new o2::eventgen::GenTPCLoopers(model_pairs, model_compton, poisson, gauss, scaler_pair, scaler_compton);
225 mTPCLoopersGen->setGeomProtection(loopersParam.geomProtection);
226 const auto& intrate = loopersParam.intrate;
227 // Configure the generator with flat gas loopers defined per orbit with clusters/track info
228 // If intrate is negative (default), automatic IR from collisioncontext.root will be used
229 if (flat_gas) {
230 mTPCLoopersGen->SetRate(nclxrate, (colsys == "PbPb") ? true : false, intrate);
231 mTPCLoopersGen->SetAdjust(loopersParam.adjust_flatgas);
232 } else {
233 // Otherwise, Poisson+Gauss sampling or fixed number of loopers per event will be used
234 // Multiplier is applied only with distribution sampling
235 // This configuration can be used for testing purposes, in all other cases flat gas is recommended
236 mTPCLoopersGen->SetNLoopers(nLoopersPairs, nLoopersCompton);
237 mTPCLoopersGen->SetMultiplier(multiplier);
238 }
239 LOG(info) << "TPC Loopers generator initialized successfully";
240 } catch (const std::exception& e) {
241 LOG(error) << "Failed to initialize TPC Loopers generator: " << e.what();
242 delete mTPCLoopersGen;
243 mTPCLoopersGen = nullptr;
244 return kFALSE;
245 }
246 return kTRUE;
247}
248#endif
249
250/*****************************************************************/
251
252Bool_t
254{
258 return kTRUE;
259}
260
261/*****************************************************************/
262
263Bool_t
265{
266#ifdef GENERATORS_WITH_TPCLOOPERS
267 if (mAddTPCLoopers) {
268 if (!mTPCLoopersGen) {
269 LOG(error) << "Loopers generator not initialized";
270 return kFALSE;
271 }
272
273 // Generate loopers using the initialized TPC loopers generator
274 if (!mTPCLoopersGen->generateEvent()) {
275 LOG(error) << "Failed to generate loopers event";
276 return kFALSE;
277 }
278 const auto nCandidates = mTPCLoopersGen->getNLoopers();
279 if (nCandidates == 0) {
280 LOG(warning) << "No loopers generated for this event";
281 return kTRUE;
282 }
283 const auto& looperParticles = mTPCLoopersGen->importParticles();
284 const auto skippedLoopers = mTPCLoopersGen->getNSkipped();
285 if (looperParticles.empty()) {
286 if (skippedLoopers == nCandidates) {
287 // all candidate loopers were dropped by the geometrical protection
288 LOG(debug) << "All " << skippedLoopers << " candidate loopers were outside the TPC active volume; none added for this event";
289 return kTRUE;
290 }
291 LOG(error) << "Failed to import loopers particles";
292 return kFALSE;
293 }
294 // Append the generated looper particles to the main particle list
295 mParticles.insert(mParticles.end(), looperParticles.begin(), looperParticles.end());
296
297 LOG(debug) << "Added " << looperParticles.size() << " looper particles";
298 if (skippedLoopers > 0) {
299 LOG(debug) << "Geometrical protection skipped " << skippedLoopers << " loopers outside the TPC active volume";
300 }
301 }
302#endif
303 return kTRUE;
304}
305
306/*****************************************************************/
307
308Bool_t
310{
314 while (true) {
316
318 mParticles.clear();
319
321 mSubGeneratorId = -1;
322
324 if (!generateEvent()) {
325 LOG(error) << "ReadEvent failed in generateEvent";
326 return kFALSE;
327 }
328
330 if (!importParticles()) {
331 LOG(error) << "ReadEvent failed in importParticles";
332 return kFALSE;
333 }
334
336 if (!finalizeEvent()) {
337 LOG(error) << "ReadEvent failed in finalizeEvent";
338 return kFALSE;
339 }
340
341 if (mSubGeneratorsIdToDesc.empty() && mSubGeneratorId > -1) {
342 LOG(fatal) << "ReadEvent failed because no SubGenerator description given";
343 }
344
345 if (!mSubGeneratorsIdToDesc.empty() && mSubGeneratorId < 0) {
346 LOG(fatal) << "ReadEvent failed because SubGenerator description given but sub-generator not set";
347 }
348
350 if (triggerEvent()) {
352 break;
353 } else {
355 }
356 }
357
358 auto header = primGen->GetEvent();
359 auto o2header = dynamic_cast<o2::dataformats::MCEventHeader*>(header);
360 if (!header) {
361 LOG(fatal) << "MC event header is not a 'o2::dataformats::MCEventHeader' object";
362 return kFALSE;
363 }
364
366 if (!decayParticles(o2header)) {
367 LOG(error) << "ReadEvent failed in decayParticles";
368 return kFALSE;
369 }
370
372 if (!addTracks(primGen)) {
373 LOG(error) << "ReadEvent failed in addTracks";
374 return kFALSE;
375 }
376
378 updateHeader(o2header);
379 updateSubGeneratorInformation(o2header);
380
382 return kTRUE;
383}
384
385/*****************************************************************/
386
387Bool_t
388 Generator::decayParticles(o2::dataformats::MCEventHeader* header)
389{
390#ifdef GENERATORS_WITH_PYTHIA8
392 return kTRUE;
393 }
394 if (!mEventDecayer) {
395 mEventDecayer = new EventDecayer();
396 if (!mEventDecayer->init()) {
397 LOG(fatal) << "Could not initialise the EventDecayer of generator " << GetName();
398 return kFALSE;
399 }
400 mEventDecayerReport = new EventDecayerReport();
401 }
403 mEventDecayerReport->merge(mEventDecayer->decay(mParticles));
404 if (header) {
405 header->putInfo<std::string>("eventDecayer", mEventDecayer->configSummary());
406 header->putInfo<int>("eventDecayerSeed", mEventDecayer->seed());
407 }
408#endif
409 return kTRUE;
410}
411
412/*****************************************************************/
413
414Bool_t
416{
419 auto o2primGen = dynamic_cast<PrimaryGenerator*>(primGen);
420 if (!o2primGen) {
421 LOG(fatal) << "PrimaryGenerator is not a o2::eventgen::PrimaryGenerator";
422 return kFALSE;
423 }
424
426 for (const auto& particle : mParticles) {
427 o2primGen->AddTrack(particle.GetPdgCode(),
428 particle.Px() * mMomentumUnit,
429 particle.Py() * mMomentumUnit,
430 particle.Pz() * mMomentumUnit,
431 particle.Vx() * mPositionUnit,
432 particle.Vy() * mPositionUnit,
433 particle.Vz() * mPositionUnit,
434 particle.GetMother(0),
435 particle.GetMother(1),
436 particle.GetDaughter(0),
437 particle.GetDaughter(1),
438 particle.TestBit(ParticleStatus::kToBeDone),
439 particle.Energy() * mEnergyUnit,
440 particle.T() * mTimeUnit,
441 particle.GetWeight(),
442 (TMCProcess)particle.GetUniqueID(),
443 particle.GetStatusCode()); // generator status information passed as status code field
444 }
445
447 return kTRUE;
448}
449
450/*****************************************************************/
451
452Bool_t
454{
458 return kTRUE;
459}
460
461/*****************************************************************/
462
463Bool_t
465{
469 if (mTriggers.size() == 0 && mDeepTriggers.size() == 0) {
470 return kTRUE;
471 }
472
474 Bool_t triggered;
475 if (mTriggerMode == kTriggerOFF) {
476 return kTRUE;
477 } else if (mTriggerMode == kTriggerOR) {
478 triggered = kFALSE;
479 } else if (mTriggerMode == kTriggerAND) {
480 triggered = kTRUE;
481 } else {
482 return kTRUE;
483 }
484
486 for (const auto& trigger : mTriggers) {
487 auto retval = trigger(mParticles);
488 if (mTriggerMode == kTriggerOR) {
489 triggered |= retval;
490 }
491 if (mTriggerMode == kTriggerAND) {
492 triggered &= retval;
493 }
494 }
495
497 for (const auto& trigger : mDeepTriggers) {
498 auto retval = trigger(mInterface, mInterfaceName);
499 if (mTriggerMode == kTriggerOR) {
500 triggered |= retval;
501 }
502 if (mTriggerMode == kTriggerAND) {
503 triggered &= retval;
504 }
505 }
506
508 return triggered;
509}
510
511/*****************************************************************/
512
513void Generator::addSubGenerator(int subGeneratorId, std::string const& subGeneratorDescription)
514{
515 if (subGeneratorId < 0) {
516 LOG(fatal) << "Sub-generator IDs must be >= 0, instead, passed value is " << subGeneratorId;
517 }
518 mSubGeneratorsIdToDesc.insert({subGeneratorId, subGeneratorDescription});
519}
520
521/*****************************************************************/
522
523void Generator::updateSubGeneratorInformation(o2::dataformats::MCEventHeader* header) const
524{
525 if (mSubGeneratorId < 0) {
526 return;
527 }
528 header->putInfo<int>(o2::mcgenid::GeneratorProperty::SUBGENERATORID, mSubGeneratorId);
529 header->putInfo<std::unordered_map<int, std::string>>(o2::mcgenid::GeneratorProperty::SUBGENERATORDESCRIPTIONMAP, mSubGeneratorsIdToDesc);
530}
531
532/*****************************************************************/
533/*****************************************************************/
534
535} /* namespace eventgen */
536} /* namespace o2 */
537
std::ostringstream debug
std::vector< std::string > header
int32_t i
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions false
ClassImp(o2::eventgen::Generator)
char error[CURL_ERROR_SIZE]
@ kToBeDone
FairMCEventHeader * GetEvent()
static BasicCCDBManager & instance()
static SimConfig & Instance()
Definition SimConfig.h:112
void setUnits(double positionUnit, double timeUnit, double momentumUnit=1., double energyUnit=1.)
Sets the caller's units in cm, s, GeV/c and GeV, as the unit setters of Generator (default cm,...
EventDecayerReport decay(std::vector< TParticle > &particles)
std::string configSummary() const
virtual void updateHeader(o2::dataformats::MCEventHeader *eventHeader)
Definition Generator.h:81
std::string mInterfaceName
Definition Generator.h:141
Bool_t ReadEvent(FairPrimaryGenerator *primGen) final
static std::atomic< int > InstanceCounter
Definition Generator.h:168
std::vector< Trigger > mTriggers
Definition Generator.h:145
std::function< void(std::vector< TParticle > const &p, int eventCount)> mTriggerOkHook
Definition Generator.h:150
virtual Bool_t generateEvent()=0
std::vector< DeepTrigger > mDeepTriggers
Definition Generator.h:146
std::function< void(std::vector< TParticle > const &p, int eventCount)> mTriggerFalseHook
Definition Generator.h:151
void addSubGenerator(int subGeneratorId, std::string const &subGeneratorDescription)
ETriggerMode_t mTriggerMode
Definition Generator.h:144
static bool isHyperloop()
Definition Generator.cxx:49
Bool_t addTracks(FairPrimaryGenerator *primGen)
std::vector< TParticle > mParticles
Definition Generator.h:161
virtual Bool_t importParticles()=0
Bool_t Init() override
void AddTrack(Int_t pdgid, Double_t px, Double_t py, Double_t pz, Double_t vx, Double_t vy, Double_t vz, Int_t mother1=-1, Int_t mother2=-1, Int_t daughter1=-1, Int_t daughter2=-1, Bool_t wanttracking=true, Double_t e=-9e9, Double_t tof=0., Double_t weight=0., TMCProcess proc=kPPrimary, Int_t generatorStatus=0)
static constexpr Property SUBGENERATORID
static constexpr Property SUBGENERATORDESCRIPTIONMAP
const GLdouble * v
Definition glcorearb.h:832
GLuint const GLchar * name
Definition glcorearb.h:781
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition glcorearb.h:1308
GLsizei const GLchar *const * path
Definition glcorearb.h:3591
long getCurrentTimestamp()
returns the timestamp in long corresponding to "now"
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
void merge(EventDecayerReport const &other)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"