17#include <fairlogger/Logger.h>
24#if PYTHIA_VERSION_INTEGER >= 8310
25#include "Pythia8/HIInfo.h"
27#include "Pythia8/HIUserHooks.h"
29#include "Pythia8Plugins/PowhegHooks.h"
38#include <unordered_map>
55 LOG(info) <<
"GeneratorPythia8 constructed from GeneratorPythia8Param ConfigurableParam";
71 LOG(info) <<
"Simulation running in Hyperloop => reducing Pythia8 logs";
72 mPythia.readString(
"Print:quiet on");
75 LOG(info) <<
"Instance \'Pythia8\' generator with following parameters";
130 seed = gRandom->TRandom::GetSeed();
134 LOG(info) <<
"Multiple Pythia8 generator instances detected .. automatically adjusting seed further to avoid overlap ";
135 seed = seed ^ gRandom->GetSeed();
139 LOG(info) <<
"GeneratorPythia8: Using random seed from gRandom % 900000001: " << seed;
141 mPythia.readString(
"Random:setSeed on");
164 while (getline(ss, config,
' ')) {
165 TString expandedConfig = config;
166 gSystem->ExpandPathName(expandedConfig);
167 config = expandedConfig.Data();
168 LOG(info) <<
"Reading configuration from file: " << config;
169 if (!
mPythia.readFile(config,
true)) {
170 LOG(fatal) <<
"Failed to init \'Pythia8\': problems with configuration file "
182 LOG(fatal) <<
"Failed to init \'Pythia8\': problem with user hooks configuration ";
188#if PYTHIA_VERSION_INTEGER < 8300
197 mPythia.readString(
"HadronLevel:Decay off");
199 if (
mPythia.settings.mode(
"Beams:frameType") == 4) {
202 int vetoMode =
mPythia.settings.mode(
"POWHEG:veto");
203 int MPIvetoMode =
mPythia.settings.mode(
"POWHEG:MPIveto");
204 bool loadHooks = (vetoMode > 0 || MPIvetoMode > 0);
206 std::shared_ptr<Pythia8::PowhegHooks> powhegHooks;
210 mPythia.readString(
"SpaceShower:pTmaxMatch = 2");
211 mPythia.readString(
"TimeShower:pTmaxMatch = 2");
214 if (MPIvetoMode > 0) {
215 mPythia.readString(
"MultipartonInteractions:pTmaxMatch = 2");
217 powhegHooks = std::make_shared<Pythia8::PowhegHooks>();
218 mPythia.setUserHooksPtr((Pythia8::UserHooksPtr)powhegHooks);
222 mPythia.particleData.addParticle(1000100200,
"20Ne", 6, 30, 0, 19.992440);
225 LOG(fatal) <<
"Failed to init \'Pythia8\': init returned with error";
240#if PYTHIA_VERSION_INTEGER < 8300
241 mPythia.setUserHooksPtr(hooks);
243 mPythia.setUserHooksPtr(std::shared_ptr<Pythia8::UserHooks>(hooks));
257#if PYTHIA_VERSION_INTEGER < 8300
272 auto nParticles =
mPythia.event.size();
273 for (
int iparticle = 0; iparticle < nParticles; iparticle++) {
274 auto& aParticle =
mPythia.event[iparticle];
292 const std::vector<int>& old2New,
294 std::vector<bool>&
done,
297 FirstLastRelative firstLast,
298 const std::string& what,
299 const std::string& ind)
306 int newIdx = old2New[
index];
307 int hepmc =
event[
index].statusHepMC();
311 << newIdx <<
" (" << hepmc <<
") ";
313 LOG(
debug) << ind <<
" already done";
318 using IdList = std::pair<int, int>;
319 constexpr int invalid = 0xFFFFFFF;
320 IdList newRelatives = std::make_pair(invalid, -invalid);
323 auto addId = [](IdList& l,
size_t id) {
324 l.first = std::min(
int(
id), l.first);
325 l.second = std::max(
int(
id), l.second);
329 auto& particle =
event[
index];
330 auto relatives = getter(particle);
332 LOG(
debug) << ind <<
" Check " << what <<
"s ["
333 << std::setw(3) << firstLast(particle).first <<
","
334 << std::setw(3) << firstLast(particle).second <<
"] "
337 for (
auto relativeIdx : relatives) {
338 int newRelative = old2New[relativeIdx];
339 if (newRelative >= 0) {
344 << relativeIdx <<
" -> "
345 << newRelative <<
" to be kept" << std::endl;
346 addId(newRelatives, newRelative);
351 << relativeIdx <<
" not to be kept "
352 << (
done[relativeIdx] ?
"already done" :
"to be done")
356 auto& relative =
event[relativeIdx];
357 if (not
done[relativeIdx]) {
372 auto grandRelatives = firstLast(relative);
373 int grandRelative1 = grandRelatives.first;
374 int grandRelative2 = grandRelatives.second;
375 assert(grandRelative1 != invalid);
376 assert(grandRelative2 != -invalid);
377 if (grandRelative1 > 0) {
378 addId(newRelatives, grandRelative1);
380 if (grandRelative2 > 0) {
381 addId(newRelatives, grandRelative2);
385 << relativeIdx <<
" gave new relatives "
386 << grandRelative1 <<
" -> " << grandRelative2;
389 << (newRelatives.second - newRelatives.first + 1) <<
" new "
392 if (newRelatives.first != invalid) {
395 int newRelative1 = newRelatives.first;
396 int newRelative2 = newRelatives.second;
397 setter(particle, newRelative1, newRelative2);
398 LOG(
debug) << ind <<
" " << what <<
"s: "
399 << firstLast(particle).first <<
" ("
400 << newRelative1 <<
"),"
401 << firstLast(particle).second <<
" ("
402 << newRelative2 <<
")";
405 setter(particle, 0, 0);
414 std::vector<int> old2new(
event.size(), -1);
421 for (
size_t i = 1;
i <
event.size();
i++) {
422 auto& particle =
event[
i];
430 auto getMothers = [](
const Pythia8::Particle& particle) {
return particle.motherList(); };
431 auto setMothers = [](Pythia8::Particle& particle,
int m1,
int m2) { particle.mothers(m1, m2); };
432 auto firstLastMothers = [](
const Pythia8::Particle& particle) {
return std::make_pair(particle.mother1(), particle.mother2()); };
434 std::vector<bool> motherDone(
event.size(),
false);
435 for (
size_t i = 1;
i <
event.size(); ++
i) {
447 auto getDaughters = [](
const Pythia8::Particle& particle) {
452 if (std::abs(particle.status()) == 13) {
453 int d1 = particle.daughter1();
454 int d2 = particle.daughter2();
455 if (d1 == 0
and d2 == 0) {
456 return std::vector<int>();
459 return std::vector<int>{d1};
462 std::vector<int> ret(d2-d1+1);
463 std::iota(ret.begin(), ret.end(), d1);
466 return std::vector<int>{d2,d1};
468 return particle.daughterList(); };
469 auto setDaughters = [](Pythia8::Particle& particle,
int d1,
int d2) { particle.daughters(d1, d2); };
470 auto firstLastDaughters = [](
const Pythia8::Particle& particle) {
return std::make_pair(particle.daughter1(), particle.daughter2()); };
472 std::vector<bool> daughterDone(
event.size(),
false);
473 for (
size_t i =
event.size() - 1;
i > 0; --
i) {
485 Pythia8::Event pruned;
486 pruned.init(
"Pruned event", &
mPythia.particleData);
489 for (
size_t i = 1;
i <
event.size();
i++) {
490 int newIdx = old2new[
i];
495 auto particle =
event[
i];
496 int realIdx = pruned.append(particle);
497 assert(realIdx == newIdx);
513 using IdList = std::pair<int, int>;
515 auto addId = [](IdList& l,
size_t id) {
516 l.first = std::min(
int(
id), l.first);
517 l.second = std::max(
int(
id), l.second);
519 constexpr int invalid = 0xFFFFFFF;
521 std::vector<bool> shareDone(pruned.size(),
false);
522 for (
size_t i = 1;
i < pruned.size();
i++) {
527 auto& particle = pruned[
i];
528 auto daughters = particle.daughterList();
529 IdList allDaughters = std::make_pair(invalid, -invalid);
530 IdList allMothers = std::make_pair(invalid, -invalid);
531 addId(allMothers,
i);
532 for (
auto daughterIdx : daughters) {
534 addId(allDaughters, daughterIdx);
535 auto& daughter = pruned[daughterIdx];
536 auto otherMothers = daughter.motherList();
537 for (
auto otherMotherIdx : otherMothers) {
542 addId(allMothers, otherMotherIdx);
545 auto& otherMother = pruned[otherMotherIdx];
546 int otherDaughter1 = otherMother.daughter1();
547 int otherDaughter2 = otherMother.daughter2();
548 if (otherDaughter1 > 0) {
549 addId(allDaughters, otherDaughter1);
551 if (otherDaughter2 > 0) {
552 addId(allDaughters, otherDaughter2);
563 int minDaughter = allDaughters.first;
564 int maxDaughter = allDaughters.second;
565 int minMother = allMothers.first;
566 int maxMother = allMothers.second;
567 if (minMother != invalid) {
569 for (
size_t motherIdx = minMother; motherIdx <= maxMother;
571 shareDone[motherIdx] =
true;
572 if (minDaughter == invalid) {
573 pruned[motherIdx].daughters(0, 0);
575 pruned[motherIdx].daughters(minDaughter, maxDaughter);
579 if (minDaughter != invalid) {
582 for (
size_t daughterIdx = minDaughter; daughterIdx <= maxDaughter;
584 if (minMother == invalid) {
585 pruned[daughterIdx].mothers(0, 0);
587 pruned[daughterIdx].mothers(minMother, maxMother);
593 LOG(info) <<
"Pythia event was pruned from " <<
event.size()
594 <<
" to " << pruned.size() <<
" particles";
603 mUserFilterFcn = [](Pythia8::Particle
const&) ->
bool {
return true; };
607 LOG(info) <<
"Initializing the callback for user-based particle pruning " <<
filter;
609 if (std::filesystem::exists(expandedFileName)) {
611 mUserFilterFcn = o2::conf::GetFromMacro<UserFilterFcn>(expandedFileName,
"filterPythia()",
"o2::eventgen::GeneratorPythia8::UserFilterFcn",
"o2mc_pythia8_userfilter_hook");
612 LOG(info) <<
"Hook initialized from file " << expandedFileName;
615 LOG(
error) <<
"Did not find a file " << expandedFileName <<
" ; Will not execute hook";
633 std::function<
bool(
const Pythia8::Particle&)> partonSelect = [](
const Pythia8::Particle&) {
return true; };
635 if (not includeParton) {
638 partonSelect = [](
const Pythia8::Particle& particle) {
639 switch (particle.statusHepMC()) {
653 auto finalSelect = [partonSelect,
this](
const Pythia8::Particle& p) {
return partonSelect(p) &&
mUserFilterFcn(p); };
658 auto nParticles =
event.size();
659 for (Int_t iparticle = 1; iparticle < nParticles; iparticle++) {
661 auto particle =
event[iparticle];
662 auto pdg = particle.id();
668 particle.mother1() - 1,
669 particle.mother2() - 1,
670 particle.daughter1() - 1,
671 particle.daughter2() - 1,
681 particle.statusHepMC() == 1);
695 eventHeader->
putInfo<std::string>(Key::generator,
"pythia8");
696 eventHeader->
putInfo<
int>(Key::generatorVersion, PYTHIA_VERSION_INTEGER);
697 eventHeader->
putInfo<std::string>(Key::processName,
mPythia.info.name());
703 eventHeader->
putInfo<
int>(Key::acceptedEvents, info.nAccepted());
704 eventHeader->
putInfo<
int>(Key::attemptedEvents, info.nTried());
707 eventHeader->
putInfo<
int>(Key::pdfParton1Id, info.id1pdf());
708 eventHeader->
putInfo<
int>(Key::pdfParton2Id, info.id2pdf());
709 eventHeader->
putInfo<
float>(Key::pdfX1, info.x1pdf());
710 eventHeader->
putInfo<
float>(Key::pdfX2, info.x2pdf());
711 eventHeader->
putInfo<
float>(Key::pdfScale, info.QFac());
712 eventHeader->
putInfo<
float>(Key::pdfXF1, info.pdf1());
713 eventHeader->
putInfo<
float>(Key::pdfXF2, info.pdf2());
716 eventHeader->
putInfo<
float>(Key::xSection, info.sigmaGen() * 1e9);
717 eventHeader->
putInfo<
float>(Key::xSectionError, info.sigmaErr() * 1e9);
720 eventHeader->
putInfo<
float>(Key::eventScale, info.QRen());
721 eventHeader->
putInfo<
int>(Key::mpi, info.nMPI());
725 auto xsecErr = info.weightContainerPtr->getTotalXsecErr();
726 for (
auto w : info.weightContainerPtr->getTotalXsec()) {
728 eventHeader->
putInfo<
float>(Key::weight + post, info.weightValueByIndex(iw));
729 eventHeader->
putInfo<
float>(Key::xSection + post,
w * 1e9);
730 eventHeader->
putInfo<
float>(Key::xSectionError + post, xsecErr[iw] * 1e9);
734#if PYTHIA_VERSION_INTEGER < 8300
735 auto hiinfo =
mPythia.info.hiinfo;
737 auto hiinfo =
mPythia.info.hiInfo;
742 eventHeader->
SetB(hiinfo->b());
743 eventHeader->
putInfo<
double>(Key::impactParameter, hiinfo->b());
745#if PYTHIA_VERSION_INTEGER >= 8310
746 eventHeader->
putInfo<
double>(Key::planeAngle, hiinfo->phi());
748 auto bImp = hiinfo->b();
751 int nPartProtonProj, nPartNeutronProj, nPartProtonTarg, nPartNeutronTarg;
752 int nRemnProtonProj, nRemnNeutronProj, nRemnProtonTarg, nRemnNeutronTarg;
753 int nFreeNeutronProj, nFreeProtonProj, nFreeNeutronTarg, nFreeProtonTarg;
756 getNpart(nPartProtonProj, nPartNeutronProj, nPartProtonTarg, nPartNeutronTarg);
757 getNremn(nRemnProtonProj, nRemnNeutronProj, nRemnProtonTarg, nRemnNeutronTarg);
758 getNfreeSpec(nFreeNeutronProj, nFreeProtonProj, nFreeNeutronTarg, nFreeProtonTarg);
759 eventHeader->
putInfo<
int>(Key::nColl, nColl);
761 eventHeader->
putInfo<
int>(
"Npart", nPart);
762 eventHeader->
putInfo<
int>(
"Npart_proj_p", nPartProtonProj);
763 eventHeader->
putInfo<
int>(
"Npart_proj_n", nPartNeutronProj);
764 eventHeader->
putInfo<
int>(
"Npart_targ_p", nPartProtonTarg);
765 eventHeader->
putInfo<
int>(
"Npart_targ_n", nPartNeutronTarg);
766 eventHeader->
putInfo<
int>(
"Nremn_proj_p", nRemnProtonProj);
767 eventHeader->
putInfo<
int>(
"Nremn_proj_n", nRemnNeutronProj);
768 eventHeader->
putInfo<
int>(
"Nremn_targ_p", nRemnProtonTarg);
769 eventHeader->
putInfo<
int>(
"Nremn_targ_n", nRemnNeutronTarg);
770 eventHeader->
putInfo<
int>(
"Nfree_proj_n", nFreeNeutronProj);
771 eventHeader->
putInfo<
int>(
"Nfree_proj_p", nFreeProtonProj);
772 eventHeader->
putInfo<
int>(
"Nfree_targ_n", nFreeNeutronTarg);
773 eventHeader->
putInfo<
int>(
"Nfree_targ_p", nFreeProtonTarg);
781 eventHeader->
putInfo<
int>(Key::nPartProjectile,
782 hiinfo->nAbsProj() + hiinfo->nDiffProj());
783 eventHeader->
putInfo<
int>(Key::nPartTarget,
784 hiinfo->nAbsTarg() + hiinfo->nDiffTarg());
785#if PYTHIA_VERSION_INTEGER >= 8313
786 eventHeader->
putInfo<
int>(Key::nCollHard, hiinfo->nCollND());
788 eventHeader->
putInfo<
int>(Key::nCollHard, hiinfo->nCollNDTot());
803 std::set<int> selected;
807 auto dl = inputEvent[
i].daughterList();
815 std::map<int, int> indexMap;
816 int index = outputEvent.size();
817 for (
auto i : selected) {
822 for (
auto i : selected) {
824 auto m1 = indexMap[p.mother1()];
825 auto m2 = indexMap[p.mother2()];
826 auto d1 = indexMap[p.daughter1()];
827 auto d2 = indexMap[p.daughter2()];
831 outputEvent.append(p);
842#if PYTHIA_VERSION_INTEGER < 8300
843 auto hiinfo = info.hiinfo;
845 auto hiinfo = info.hiInfo;
849 LOG(warn) <<
"No heavy-ion information from Pythia";
854 nColl = (hiinfo->nAbsProj() + hiinfo->nDiffProj() +
855 hiinfo->nAbsTarg() + hiinfo->nDiffTarg() -
856 hiinfo->nCollND() - hiinfo->nCollDD());
858 if (not hiinfo->subCollisionsPtr()) {
859#if PYTHIA_VERSION_INTEGER < 8310
860 LOG(fatal) <<
"No sub-collision pointer from Pythia";
866 auto scptr = hiinfo->subCollisionsPtr();
867 for (
auto sc : *scptr) {
870 auto pW = sc.proj->status() == Pythia8::Nucleon::ABS;
871 auto tW = sc.targ->status() == Pythia8::Nucleon::ABS;
887#if PYTHIA_VERSION_INTEGER < 8300
888 auto hiinfo = info.hiinfo;
890 auto hiinfo = info.hiInfo;
898 nPart = (hiinfo->nAbsProj() + hiinfo->nDiffProj() +
899 hiinfo->nAbsTarg() + hiinfo->nDiffTarg());
900 if (not hiinfo->subCollisionsPtr()) {
904 int nProtonProj, nNeutronProj, nProtonTarg, nNeutronTarg;
905 getNpart(info, nProtonProj, nNeutronProj, nProtonTarg, nNeutronTarg);
906 nPart = nProtonProj + nNeutronProj + nProtonTarg + nNeutronTarg;
916#if PYTHIA_VERSION_INTEGER < 8300
917 auto hiinfo = info.hiinfo;
919 auto hiinfo = info.hiInfo;
922 nProtonProj = nNeutronProj = nProtonTarg = nNeutronTarg = 0;
927 nProtonProj = hiinfo->nAbsProj() + hiinfo->nDiffProj();
928 nProtonTarg = hiinfo->nAbsTarg() + hiinfo->nDiffTarg();
929 if (not hiinfo->subCollisionsPtr()) {
930#if PYTHIA_VERSION_INTEGER < 8310
931 LOG(fatal) <<
"No sub-collision pointer from Pythia";
937 std::vector<Pythia8::Nucleon*> projW;
938 std::vector<Pythia8::Nucleon*> targW;
941 auto scptr = hiinfo->subCollisionsPtr();
942 for (
auto sc : *scptr) {
945 auto pW = sc.proj->status() == Pythia8::Nucleon::ABS || sc.proj->status() == Pythia8::Nucleon::DIFF;
946 auto tW = sc.targ->status() == Pythia8::Nucleon::ABS || sc.targ->status() == Pythia8::Nucleon::DIFF;
949 if (pW && std::find(projW.begin(), projW.end(), sc.proj) == projW.end()) {
950 projW.push_back(sc.proj);
951 if (sc.proj->id() == 2212) {
953 }
else if (sc.proj->id() == 2112) {
959 if (tW && std::find(targW.begin(), targW.end(), sc.targ) == targW.end()) {
960 targW.push_back(sc.targ);
961 if (sc.targ->id() == 2212) {
963 }
else if (sc.targ->id() == 2112) {
978 nProtonProj = nNeutronProj = nProtonTarg = nNeutronTarg = 0;
982 auto nparticles =
event.size();
983 for (
int ipa = 0; ipa < nparticles; ++ipa) {
984 const auto particle =
event[ipa];
985 auto pdg = particle.id();
988 if (pdg < 1000000000) {
1000 auto Z = pdg % 1000;
1004 if (particle.pz() > 0.) {
1006 nNeutronProj =
A - Z;
1008 if (particle.pz() < 0.) {
1010 nNeutronTarg =
A - Z;
1016 LOG(warning) <<
" GeneratorPythia8: found more than two nuclear remnants (weird)";
1027#if PYTHIA_VERSION_INTEGER < 8300
1028 auto hiinfo = info.hiinfo;
1030 auto hiinfo = info.hiInfo;
1037 double b = hiinfo->b();
1047 int nneu[2] = {0, 0};
1048 for (
int i = 0;
i < 2;
i++) {
1049 float nave = fneutrons.Eval(
b);
1050 float sigman = fsigman.Eval(
b);
1051 float nfree = gRandom->Gaus(nave, 0.68 * sigman * nave);
1052 nneu[
i] = (int)nfree;
1053 if (nave < 0 || nneu[
i] < 0) {
1056 if (nneu[
i] > 126) {
1061 int npro[2] = {0, 0};
1062 for (
int i = 0;
i < 2;
i++) {
1063 float pave = fprotons.Eval(
b);
1064 float sigmap = fsigman.Eval(
b);
1065 float pfree = gRandom->Gaus(pave, 0.68 * sigmap * pave) / 0.7;
1066 npro[
i] = (int)pfree;
1067 if (pave < 0 || npro[
i] < 0) {
1075 nFreenProj = nneu[0];
1076 nFreenTarg = nneu[1];
1077 nFreepProj = npro[0];
1078 nFreepTarg = npro[1];
o2::monitoring::tags::Key Key
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 bool
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 and
char error[CURL_ERROR_SIZE]
static constexpr long MAX_SEED
bool setInitialSeed(long seed)
std::string mHooksFuncName
void setHooksFuncName(std::string val)
int mThisPythia8InstanceID
void selectFromAncestor(int ancestor, Pythia8::Event &inputEvent, Pythia8::Event &outputEvent)
std::string mHooksFileName
void pruneEvent(Pythia8::Event &event, Select select)
Pythia8GenConfig mGenConfig
void initUserFilterCallback()
static std::atomic< int > Pythia8InstanceCounter
void setHooksFileName(std::string val)
Bool_t generateEvent() override
void investigateRelatives(Pythia8::Event &event, const std::vector< int > &old2New, size_t index, std::vector< bool > &done, GetRelatives getter, SetRelatives setter, FirstLastRelative firstLast, const std::string &what, const std::string &ind="")
void getNpart(int &nPart)
void getNremn(int &nProtonProj, int &nNeutronProj, int &nProtonTarg, int &nNeutronTarg)
void seedGenerator()
performs seeding of the random state of Pythia (called from Init)
void getNcoll(int &nColl)
void setUserHooks(Pythia8::UserHooks *hooks)
void updateHeader(o2::dataformats::MCEventHeader *eventHeader) override
Bool_t importParticles() override
UserFilterFcn mUserFilterFcn
void getNfreeSpec(int &nFreenProj, int &nFreepProj, int &nFreenTarg, int &nFreepTarg)
void setConfig(std::string val)
std::string mInterfaceName
std::vector< TParticle > mParticles
TF1 const & getfProtons() const
TF1 const & getfNeutrons() const
TF1 const & getsigmaNeutrons() const
TF1 const & getsigmaProtons() const
GLuint const GLchar * name
GLboolean GLboolean GLboolean b
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLubyte GLubyte GLubyte GLubyte w
std::vector< InputSpec > select(char const *matcher="")
std::string expandShellVarsInFileName(std::string const &input)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string to_string(gsl::span< T, Size > span)
std::string hooksFuncName
std::string particleFilter
std::string hooksFileName
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"