Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 2 additions & 23 deletions PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2025 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -75,14 +75,6 @@
aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullTr, aod::pidTOFFullHe>;
} // namespace o2::aod

namespace softwareTriggers
{
static const int nTriggers = 11;
static const std::vector<std::string> triggerNames{"fPPP", "fPPL", "fPLL", "fLLL", "fPD", "fLD", "fDoubleXi", "fDoubleOmega", "fOmegaHighMult", "fTrackedXi", "fTrackedOmega"};
static const float triggerSwitches[1][nTriggers]{
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
} // namespace softwareTriggers

template <typename T>
int getRowDaughters(int daughID, T const& vecID)
{
Expand Down Expand Up @@ -111,18 +103,15 @@
Produces<aod::FDExtMCParticles> outputDebugPartsMC;
Produces<aod::FDExtMCLabels> outputPartsExtMCLabels;

Configurable<bool> ConfIsDebug{"ConfIsDebug", true, "Enable Debug tables"};

Check failure on line 106 in PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<bool> ConfUseItsPid{"ConfUseItsPid", false, "Enable Debug tables"};

Check failure on line 107 in PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<bool> ConfIsRun3{"ConfIsRun3", false, "Running on Run3 or pilot"};

Check failure on line 108 in PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<bool> ConfIsForceGRP{"ConfIsForceGRP", false, "Set true if the magnetic field configuration is not available in the usual CCDB directory (e.g. for Run 2 converted data or unanchorad Monte Carlo)"};
/// Event cuts
FemtoDreamCollisionSelection colCuts;
// Event cuts - Triggers
Configurable<bool> ConfEnableTriggerSelection{"ConfEnableTriggerSelection", false, "Should the trigger selection be enabled for collisions?"};
Configurable<LabeledArray<float>> ConfTriggerSwitches{
"ConfTriggerSwitches",
{softwareTriggers::triggerSwitches[0], 1, softwareTriggers::nTriggers, std::vector<std::string>{"Switch"}, softwareTriggers::triggerNames},
"Turn on which trigger should be checked for recorded events to pass selection"};
Configurable<std::string> ConfSoftwareTriggerNames{"ConfSoftwareTriggerNames", "fPPL", "Names of the software triggers, use comma and no space"};
Configurable<std::string> ConfBaseCCDBPathForTriggers{"ConfBaseCCDBPathForTriggers", "Users/m/mpuccio/EventFiltering/OTS/Chunked/", "Provide ccdb path for trigger table; default - trigger coordination"};

// Event cuts - usual selection criteria
Expand Down Expand Up @@ -304,7 +293,6 @@

int mRunNumber;
float mMagField;
std::string zorroTriggerNames = "";
Service<o2::ccdb::BasicCCDBManager> ccdb; /// Accessing the CCDB
RCTFlagsChecker rctChecker;

Expand Down Expand Up @@ -340,15 +328,6 @@
ResoRegistry.add("AnalysisQA/Reso/PtD1_selected", "Transverse momentum of all processed tracks;p_{T} (GeV/c);Entries", HistType::kTH1F, {{1000, 0, 10}});
ResoRegistry.add("AnalysisQA/Reso/PtD2_selected", "Transverse momentum of all processed tracks;p_{T} (GeV/c);Entries", HistType::kTH1F, {{1000, 0, 10}});

if (ConfEnableTriggerSelection) {
for (const std::string& triggerName : softwareTriggers::triggerNames) {
if (ConfTriggerSwitches->get("Switch", triggerName.c_str())) {
zorroTriggerNames += triggerName + ",";
}
}
zorroTriggerNames.pop_back();
}

rctChecker.init(rctCut.cfgEvtRCTFlagCheckerLabel, false, rctCut.cfgEvtRCTFlagCheckerLimitAcceptAsBad);

colCuts.setCuts(ConfEvtZvtx.value, ConfEvtTriggerCheck.value, ConfEvtTriggerSel.value, ConfEvtOfflineCheck.value, ConfEvtAddOfflineCheck.value, ConfIsRun3.value, ConfEvtMinSphericity.value, ConfEvtSphericityPtmin.value);
Expand Down Expand Up @@ -521,7 +500,7 @@
// Init for zorro to get trigger flags
if (ConfEnableTriggerSelection) {
zorro.setCCDBpath(ConfBaseCCDBPathForTriggers);
zorro.initCCDB(ccdb.service, mRunNumber, timestamp, zorroTriggerNames);
zorro.initCCDB(ccdb.service, mRunNumber, timestamp, ConfSoftwareTriggerNames.value);
}
}

Expand Down Expand Up @@ -650,7 +629,7 @@
TrackRegistry.fill(HIST("AnalysisQA/getGenStatusCode"), particleMC.getGenStatusCode());
TrackRegistry.fill(HIST("AnalysisQA/getProcess"), particleMC.getProcess());
// if this fails, the particle is a fake
if (abs(pdgCode) == abs(ConfTrkPDGCode.value)) {

Check failure on line 632 in PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
// check first if particle is from pile up
// check if the collision associated with the particle is the same as the analyzed collision by checking their Ids
if ((col.has_mcCollision() && (particleMC.mcCollisionId() != col.mcCollisionId())) || !col.has_mcCollision()) {
Expand All @@ -662,7 +641,7 @@
// particle is from a decay -> getProcess() == 4
// particle is generated during transport -> getGenStatusCode() == -1
// list of mothers is not empty
} else if (particleMC.getProcess() == 4 && particleMC.getGenStatusCode() == -1 && !motherparticlesMC.empty()) {

Check failure on line 644 in PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
// get direct mother
auto motherparticleMC = motherparticlesMC.front();
pdgCodeMother = motherparticleMC.pdgCode();
Expand All @@ -671,7 +650,7 @@
// check if particle is material
// particle is from inelastic hadronic interaction -> getProcess() == 23
// particle is generated during transport -> getGenStatusCode() == -1
} else if (particleMC.getProcess() == 23 && particleMC.getGenStatusCode() == -1) {

Check failure on line 653 in PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
particleOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kMaterial;
// cross check to see if we missed a case
} else {
Expand Down Expand Up @@ -791,7 +770,7 @@
std::vector<int> tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index
std::vector<typename TrackTypeWithItsPid::iterator> Daughter1, Daughter2;

for (auto& track : tracksWithItsPid) {

Check failure on line 773 in PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
/// if the most open selection criteria are not fulfilled there is no
/// point looking further at the track
trackCuts.fillQA<aod::femtodreamparticle::ParticleType::kTrack, aod::femtodreamparticle::TrackType::kNoChild, false, 0>(track);
Expand Down Expand Up @@ -870,7 +849,7 @@
}

if (ConfIsActivateV0.value) {
for (auto& v0 : fullV0s) {

Check failure on line 852 in PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.

auto postrack = v0.template posTrack_as<TrackType>();
auto negtrack = v0.template negTrack_as<TrackType>();
Expand Down Expand Up @@ -959,7 +938,7 @@
}
}
if (ConfIsActivateCascade.value) {
for (auto& casc : fullCascades) {

Check failure on line 941 in PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
// get the daughter tracks
const auto& posTrackCasc = casc.template posTrack_as<TrackType>();
const auto& negTrackCasc = casc.template negTrack_as<TrackType>();
Expand Down
Loading