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
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 @@ -105,8 +105,8 @@
Produces<aod::FDExtMCParticles> outputDebugPartsMC;
Produces<aod::FDExtMCLabels> outputPartsExtMCLabels;

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

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> ConfUseItsPid{"ConfUseItsPid", false, "Enable Debug tables"};

Check failure on line 109 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"};
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
Expand Down Expand Up @@ -630,7 +630,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 633 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 @@ -642,7 +642,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 645 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 @@ -651,7 +651,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 654 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 @@ -771,7 +771,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 774 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 @@ -850,7 +850,7 @@
}

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

Check failure on line 853 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 @@ -939,7 +939,7 @@
}
}
if (ConfIsActivateCascade.value) {
for (auto& casc : fullCascades) {

Check failure on line 942 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 Expand Up @@ -1121,7 +1121,7 @@
float myEP = TMath::RadToDeg() * colCuts.computeEP(col, EPHarmonic);
// psi from rad(0-pi) to deg, in table psi would be in deg,from 0-180

if ((myqn >= 0 && myqn < 1e6) || (myEP >= 0 && myEP < 180)) {

Check failure on line 1124 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.
outputExtQnCollision(myqn, col.trackOccupancyInTimeRange());
outputExtEPCollision(myEP);
}
Expand Down Expand Up @@ -1232,7 +1232,7 @@
// get magnetic field for run
initCCDB_Mag_Trig(col.bc_as<aod::BCsWithTimestamps>());
// fill the tables
fillCollisionsAndTracksAndV0AndCascade<false, false, true, false, false>(col, tracks, tracks, fullV0s, fullCascades);
fillCollisionsAndTracksAndV0AndCascade<true, false, true, false, false>(col, tracks, tracks, fullV0s, fullCascades);
}
PROCESS_SWITCH(femtoDreamProducerTask, processMC, "Provide MC data", false);

Expand Down
Loading