Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions PWGLF/DataModel/LFResonanceTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
DECLARE_SOA_COLUMN(IsInSel8, isInSel8, bool); //! InSel8
DECLARE_SOA_COLUMN(IsInAfterAllCuts, isInAfterAllCuts, bool); //! InAfterAllCuts
DECLARE_SOA_COLUMN(ImpactParameter, impactParameter, float); //! ImpactParameter
DECLARE_SOA_COLUMN(MCMultiplicity, mcMultiplicity, float); //! MC Multiplicity

Check failure on line 79 in PWGLF/DataModel/LFResonanceTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

} // namespace resocollision
DECLARE_SOA_TABLE(ResoCollisions, "AOD", "RESOCOLLISION",
Expand Down Expand Up @@ -171,7 +171,7 @@
#define requireSign() requireTrackFlag(ResoTrackFlags::kSign)

#define DECLARE_DYN_TRKSEL_COLUMN(name, getter, mask) \
DECLARE_SOA_DYNAMIC_COLUMN(name, getter, [](ResoTrackFlags::flagtype flags) -> bool { return ResoTrackFlags::checkFlag(flags, mask); });

Check failure on line 174 in PWGLF/DataModel/LFResonanceTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

DECLARE_SOA_INDEX_COLUMN(ResoCollision, resoCollision);
DECLARE_SOA_INDEX_COLUMN(ResoCollisionDF, resoCollisionDF);
Expand Down Expand Up @@ -211,7 +211,7 @@
DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, float); //! Y position of the decay vertex
DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, float); //! Z position of the decay vertex
DECLARE_SOA_COLUMN(Alpha, alpha, float); //! Alpha of the decay vertex
DECLARE_SOA_COLUMN(QtArm, qtarm, float); //! Armenteros Qt of the decay vertex

Check failure on line 214 in PWGLF/DataModel/LFResonanceTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TpcSignal10, tpcSignal10, int8_t); //! TPC signal of the track x10
DECLARE_SOA_COLUMN(DaughterTPCNSigmaPosPi10, daughterTPCNSigmaPosPi10, int8_t); //! TPC PID x10 of the positive daughter as Pion
DECLARE_SOA_COLUMN(DaughterTPCNSigmaPosKa10, daughterTPCNSigmaPosKa10, int8_t); //! TPC PID x10 of the positive daughter as Kaon
Expand All @@ -231,9 +231,9 @@
DECLARE_SOA_COLUMN(DaughterTOFNSigmaBachPi10, daughterTOFNSigmaBachPi10, int8_t); //! TOF PID x10 of the bachelor daughter as Pion
DECLARE_SOA_COLUMN(DaughterTOFNSigmaBachKa10, daughterTOFNSigmaBachKa10, int8_t); //! TOF PID x10 of the bachelor daughter as Kaon
DECLARE_SOA_COLUMN(DaughterTOFNSigmaBachPr10, daughterTOFNSigmaBachPr10, int8_t); //! TOF PID x10 of the bachelor daughter as Proton
DECLARE_SOA_COLUMN(NCrossedRowsPos, nCrossedRowsPos, uint8_t); //! Number of TPC crossed rows of the positive daughter
DECLARE_SOA_COLUMN(NCrossedRowsNeg, nCrossedRowsNeg, uint8_t); //! Number of TPC crossed rows of the negative daughter
DECLARE_SOA_COLUMN(NCrossedRowsBach, nCrossedRowsBach, uint8_t); //! Number of TPC crossed rows of the bachelor daughter
DECLARE_SOA_COLUMN(NCrossedRowsPos, nCrossedRowsPos, uint8_t); //! Number of TPC crossed rows of the positive daughter
DECLARE_SOA_COLUMN(NCrossedRowsNeg, nCrossedRowsNeg, uint8_t); //! Number of TPC crossed rows of the negative daughter
DECLARE_SOA_COLUMN(NCrossedRowsBach, nCrossedRowsBach, uint8_t); //! Number of TPC crossed rows of the bachelor daughter
// For MC
DECLARE_SOA_INDEX_COLUMN(McParticle, mcParticle); //! Index of the corresponding MC particle
DECLARE_SOA_COLUMN(IsPhysicalPrimary, isPhysicalPrimary, bool);
Expand Down Expand Up @@ -368,13 +368,13 @@
static uint8_t encodeNSigma(float nSigma)
{
const float x = std::abs(nSigma);
if (x <= 1.5)

Check failure on line 371 in PWGLF/DataModel/LFResonanceTables.h

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.
return 0; // Return 0 when absolute nSigma is smaller than 1.5
float t = (x - 1.5) / 0.2;
int encoded = static_cast<int>(std::ceil(t)); // (1.5,1.7]->1, ..., (3.3,3.5]->10
if (encoded < 1)
encoded = 1;
if (encoded > 10)

Check failure on line 377 in PWGLF/DataModel/LFResonanceTables.h

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.
encoded = 10;
return static_cast<uint8_t>(encoded);
}
Expand All @@ -384,7 +384,7 @@
{
if (encoded == 0)
return 1.5;
if (encoded > 10)

Check failure on line 387 in PWGLF/DataModel/LFResonanceTables.h

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.
encoded = 10;
return 1.5 + static_cast<float>(encoded) * 0.2;
}
Expand Down Expand Up @@ -446,12 +446,12 @@
static uint8_t encodeDCA(float DCA)
{
float x = std::fabs(DCA);
if (x < 0.1)

Check failure on line 449 in PWGLF/DataModel/LFResonanceTables.h

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.
return 0;
int encoded = static_cast<int>(std::ceil((x - 0.1) / 0.1)); // (0.1, 0.2] -> 1, ..., (1.4, 1.5] -> 14
if (encoded < 1)
encoded = 1;
if (encoded > 14)

Check failure on line 454 in PWGLF/DataModel/LFResonanceTables.h

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.
encoded = 15;
return static_cast<uint8_t>(encoded);
}
Expand Down
8 changes: 4 additions & 4 deletions PWGLF/TableProducer/Resonances/resonanceInitializer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@
int evtPlDetId = cfgEvtPl - evtPlRefAId * 10000 - evtPlRefBId * 100;

// MC Resonance parent filter
Partition<aod::McParticles> selectedMCParticles = (nabs(aod::mcparticle::pdgCode) == 313) // K*

Check failure on line 254 in PWGLF/TableProducer/Resonances/resonanceInitializer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
|| (nabs(aod::mcparticle::pdgCode) == 323) // K*pm

Check failure on line 255 in PWGLF/TableProducer/Resonances/resonanceInitializer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
|| (nabs(aod::mcparticle::pdgCode) == 333) // phi
|| (nabs(aod::mcparticle::pdgCode) == 9010221) // f_0(980)
|| (nabs(aod::mcparticle::pdgCode) == 10221) // f_0(1370)
Expand Down Expand Up @@ -796,8 +796,8 @@
v0.dcapostopv(),
v0.dcanegtopv(),
v0.dcav0topv(),
static_cast<uint8_t>(v0.template posTrack_as<TrackType>().tpcNClsCrossedRows()),
static_cast<uint8_t>(v0.template negTrack_as<TrackType>().tpcNClsCrossedRows()),
static_cast<uint8_t>(v0.template posTrack_as<TrackType>().tpcNClsCrossedRows()),
static_cast<uint8_t>(v0.template negTrack_as<TrackType>().tpcNClsCrossedRows()),
v0.mLambda(),
v0.mAntiLambda(),
v0.mK0Short(),
Expand Down Expand Up @@ -1741,7 +1741,7 @@
resoSpheroCollisions(computeSpherocity(tracks, trackSphMin, trackSphDef));
resoEvtPlCollisions(0, 0, 0, 0);
fillMCCollision<false>(collision, mcParticles);
// Loop over all MC particles
// Loop over all MC particles
auto mcParts = selectedMCParticles->sliceBy(perMcCollision, collision.mcCollision().globalIndex());
fillMCParticles(mcParts, mcParticles);

Expand Down Expand Up @@ -1829,7 +1829,7 @@
mult = mcCollision.multMCNParticlesEta10();

fillMCCollision<false>(collision, mcParticles, impactpar, mult);
// Loop over all MC particles
// Loop over all MC particles
auto mcParts = selectedMCParticles->sliceBy(perMcCollision, mcId);
fillMCParticles(mcParts, mcParticles);

Expand Down
11 changes: 5 additions & 6 deletions PWGLF/Tasks/Resonances/xi1530Analysisqa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ struct Xi1530Analysisqa {
Configurable<float> cMaxProperLifetimeCut{"cMaxProperLifetimeCut", 4.7, "Maximum proper lifetime cut for Xi- candidates"};
Configurable<float> cMinNCrossedRowsTPCPos{"cMinNCrossedRowsTPCPos", 50, "Minimum number of crossed rows in TPC for positive track in cascade"};
Configurable<float> cMinNCrossedRowsTPCNeg{"cMinNCrossedRowsTPCNeg", 50, "Minimum number of crossed rows in TPC for negative track in cascade"};
Configurable<float> cMinNCrossedRowsTPCBach{"cMinNCrossedRowsTPCBach", 50, "Minimum number of crossed rows in TPC for bachelor track in cascade"};
Configurable<float> cMinNCrossedRowsTPCBach{"cMinNCrossedRowsTPCBach", 50, "Minimum number of crossed rows in TPC for bachelor track in cascade"};

} cascadeConfig;

Expand Down Expand Up @@ -564,11 +564,11 @@ struct Xi1530Analysisqa {
return false;
if (std::abs(track.pt()) <= primarytrackConfig.cMinPtcut)
return false;
if(track.nCrossedRowsPos() <= cascadeConfig.cMinNCrossedRowsTPCPos)
if (track.nCrossedRowsPos() <= cascadeConfig.cMinNCrossedRowsTPCPos)
return false;
if(track.nCrossedRowsNeg() <= cascadeConfig.cMinNCrossedRowsTPCNeg)
if (track.nCrossedRowsNeg() <= cascadeConfig.cMinNCrossedRowsTPCNeg)
return false;
if(track.nCrossedRowsBach() <= cascadeConfig.cMinNCrossedRowsTPCBach)
if (track.nCrossedRowsBach() <= cascadeConfig.cMinNCrossedRowsTPCBach)
return false;
if (primarytrackConfig.cDCAxyToPVAsPtForCasc) {
if (std::abs(track.dcaXYCascToPV()) >= (primarytrackConfig.cDCAxyToPVByPtCascP0 + primarytrackConfig.cDCAxyToPVByPtCascExp * track.pt()))
Expand Down Expand Up @@ -1353,7 +1353,6 @@ struct Xi1530Analysisqa {
histos.fill(HIST("h3Xi1530Gen"), part.pt(), inCent, multiplicity);
else
histos.fill(HIST("h3Xi1530GenAnti"), part.pt(), inCent, multiplicity);

}
}

Expand Down Expand Up @@ -1433,7 +1432,7 @@ struct Xi1530Analysisqa {
PROCESS_SWITCH(Xi1530Analysisqa, processMCTrue, "Process Event for MC (Generated)", false);
PROCESS_SWITCH(Xi1530Analysisqa, processDataMicro, "Process Event for Data (MicroTrack)", false);
PROCESS_SWITCH(Xi1530Analysisqa, processMEMicro, "Process EventMixing (MicroTrack) ", false);
PROCESS_SWITCH(Xi1530Analysisqa, processMEDF, "Process EventMixing (DataFrame) ", false);
PROCESS_SWITCH(Xi1530Analysisqa, processMEDF, "Process EventMixing (DataFrame) ", false);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
Expand Down
Loading