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
1 change: 1 addition & 0 deletions PWGLF/DataModel/LFResonanceTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,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 82 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 @@ -137,6 +137,7 @@
resocollision::EvtPlResAC,
resocollision::EvtPlResBC,
resocollision::BMagField,
resocollision::IsRecINELgt0,
timestamp::Timestamp,
evsel::NumTracksInTimeRange);
using ResoCollisionDF = ResoCollisionDFs::iterator;
Expand Down Expand Up @@ -174,7 +175,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 178 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 @@ -214,7 +215,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 218 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, int16_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 Down Expand Up @@ -371,13 +372,13 @@
static uint8_t encodeNSigma(float nSigma)
{
const float x = std::abs(nSigma);
if (x <= 1.5)

Check failure on line 375 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 381 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 @@ -387,7 +388,7 @@
{
if (encoded == 0)
return 1.5;
if (encoded > 10)

Check failure on line 391 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 @@ -449,12 +450,12 @@
static uint8_t encodeDCA(float DCA)
{
float x = std::fabs(DCA);
if (x < 0.1)

Check failure on line 453 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 458 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
12 changes: 10 additions & 2 deletions PWGLF/TableProducer/Resonances/resonanceInitializer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,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 263 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 264 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 @@ -1457,11 +1457,16 @@
// Default event selection
if (!colCuts.isSelected(collision))
return;

bool isRecINELgt0 = 0;
if (checkIsRecINELgt0)
isRecINELgt0 = collision.isInelGt0();

if (EventCuts.cfgEvtUseRCTFlagChecker && !rctChecker(collision))
return;
colCuts.fillQA(collision);

resoCollisions(0, 0, 0, collision.posX(), collision.posY(), collision.posZ(), centEst(collision), dBz, 0);
resoCollisions(0, 0, 0, collision.posX(), collision.posY(), collision.posZ(), centEst(collision), dBz, isRecINELgt0);
if (!cfgBypassCollIndexFill) {
resoCollisionColls(collision.globalIndex());
}
Expand Down Expand Up @@ -1664,8 +1669,11 @@
if (EventCuts.cfgEvtUseRCTFlagChecker && !rctChecker(collision))
return;
colCuts.fillQA(collision);
bool isRecINELgt0 = 0;
if (checkIsRecINELgt0)
isRecINELgt0 = collision.isInelGt0();

resoCollisions(0, 0, 0, collision.posX(), collision.posY(), collision.posZ(), centEst(collision), dBz, 0);
resoCollisions(0, 0, 0, collision.posX(), collision.posY(), collision.posZ(), centEst(collision), dBz, isRecINELgt0);
if (!cfgBypassCollIndexFill) {
resoCollisionColls(collision.globalIndex());
}
Expand Down
14 changes: 7 additions & 7 deletions PWGLF/TableProducer/Resonances/resonanceMergeDF.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct ResonanceMergeDF {
Produces<aod::ResoCascadeDFs> reso2cascadesdf;
int df = 0;

std::vector<std::tuple<float, float, float, float, float, float, int>> vecOfTuples;
std::vector<std::tuple<float, float, float, float, float, float, bool, int>> vecOfTuples;
std::vector<std::vector<std::tuple<float, float, float, float,
unsigned char, unsigned char,
int16_t, int16_t, int8_t, int8_t, int8_t,
Expand All @@ -113,7 +113,7 @@ struct ResonanceMergeDF {
{

int nCollisions = nDF;
vecOfTuples.push_back(std::make_tuple(collision.posX(), collision.posY(), collision.posZ(), collision.cent(), 0, 0, 0));
vecOfTuples.push_back(std::make_tuple(collision.posX(), collision.posY(), collision.posZ(), collision.cent(), 0, 0, collision.isRecINELgt0(), 0));
std::vector<std::tuple<float, float, float, float,
unsigned char, unsigned char,
int16_t, int16_t, int8_t, int8_t, int8_t,
Expand Down Expand Up @@ -177,7 +177,7 @@ struct ResonanceMergeDF {
const auto& innerVector = vecOfVecOfTuples[i];

histos.fill(HIST("Event/h1d_ft0_mult_percentile"), std::get<3>(tuple));
resoCollisionsdf(0, std::get<0>(tuple), std::get<1>(tuple), std::get<2>(tuple), std::get<3>(tuple), std::get<4>(tuple), std::get<5>(tuple), 0., 0., 0., 0., 0, std::get<6>(tuple));
resoCollisionsdf(0, std::get<0>(tuple), std::get<1>(tuple), std::get<2>(tuple), std::get<3>(tuple), std::get<4>(tuple), std::get<5>(tuple), 0., 0., 0., 0., std::get<6>(tuple), 0, std::get<7>(tuple));
// LOGF(info, "collisions: Index = %d ) %f - %f - %f %f %d -- %d", std::get<0>(tuple).globalIndex(),std::get<1>(tuple),std::get<2>(tuple), std::get<3>(tuple), std::get<4>(tuple), std::get<5>(tuple).size(),resoCollisionsdf.lastIndex());

for (const auto& tuple : innerVector) {
Expand Down Expand Up @@ -211,7 +211,7 @@ struct ResonanceMergeDF {
{

int nCollisions = nDF;
vecOfTuples.push_back(std::make_tuple(collision.posX(), collision.posY(), collision.posZ(), collision.cent(), 0, 0, 0));
vecOfTuples.push_back(std::make_tuple(collision.posX(), collision.posY(), collision.posZ(), collision.cent(), 0, 0, collision.isRecINELgt0(), 0));
std::vector<std::tuple<float, float, float, float,
unsigned char, unsigned char,
int16_t, int16_t, int8_t, int8_t, int8_t,
Expand Down Expand Up @@ -333,7 +333,7 @@ struct ResonanceMergeDF {
const auto& innerVectorCasc = vecOfVecOfTuplesCasc[i];

histos.fill(HIST("Event/h1d_ft0_mult_percentile"), std::get<3>(tuple));
resoCollisionsdf(0, std::get<0>(tuple), std::get<1>(tuple), std::get<2>(tuple), std::get<3>(tuple), std::get<4>(tuple), std::get<5>(tuple), 0., 0., 0., 0., 0, std::get<6>(tuple));
resoCollisionsdf(0, std::get<0>(tuple), std::get<1>(tuple), std::get<2>(tuple), std::get<3>(tuple), std::get<4>(tuple), std::get<5>(tuple), 0., 0., 0., 0., std::get<6>(tuple), 0, std::get<7>(tuple));
// LOGF(info, "collisions: Index = %d ) %f - %f - %f %f %d -- %d", std::get<0>(tuple).globalIndex(),std::get<1>(tuple),std::get<2>(tuple), std::get<3>(tuple), std::get<4>(tuple), std::get<5>(tuple).size(),resoCollisionsdf.lastIndex());

for (const auto& tuple : innerVector) {
Expand Down Expand Up @@ -417,7 +417,7 @@ struct ResonanceMergeDF {

histos.fill(HIST("Event/h1d_ft0_mult_percentile"), collision.cent());

resoCollisionsdf(0, collision.posX(), collision.posY(), collision.posZ(), collision.cent(), 0, 0, 0., 0., 0., 0., 0, 0);
resoCollisionsdf(0, collision.posX(), collision.posY(), collision.posZ(), collision.cent(), 0, 0, 0., 0., 0., 0., collision.isRecINELgt0(), 0, 0);

for (const auto& track : tracks) {
if (isPrimary && !track.isPrimaryTrack())
Expand Down Expand Up @@ -474,7 +474,7 @@ struct ResonanceMergeDF {
if (collision.cent() < minCent || collision.cent() > maxCent)
return;

resoCollisionsdf(0, collision.posX(), collision.posY(), collision.posZ(), collision.cent(), 0, 0, 0., 0., 0., 0., 0, 0);
resoCollisionsdf(0, collision.posX(), collision.posY(), collision.posZ(), collision.cent(), 0, 0, 0., 0., 0., 0., collision.isRecINELgt0(), 0, 0);
histos.fill(HIST("Event/h1d_ft0_mult_percentile"), collision.cent());

for (const auto& track : tracks) {
Expand Down
20 changes: 17 additions & 3 deletions PWGLF/Tasks/Resonances/lambda1520_PbPb.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ struct lambdaAnalysis_pb {
Configurable<bool> cEvtMCSel8{"cEvtMCSel8", false, "MC event sel: isInSel8"};
Configurable<bool> cEvtMCVtxIn10{"cEvtMCVtxIn10", false, "MC event sel: isVtxIn10"};
Configurable<bool> cEvtMCTriggerTVX{"cEvtMCTriggerTVX", false, "MC event sel: isTriggerTVX"};
Configurable<bool> cEvtMCRecINELgt0{"cEvtMCRecINELgt0", false, "MC event sel: isRecINELgt0"};
Configurable<bool> cEvtRecINELgt0{"cEvtMCRecINELgt0", false, "MC event sel: isRecINELgt0"};
// Histogram Registry.
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};

Expand Down Expand Up @@ -712,6 +712,10 @@ struct lambdaAnalysis_pb {

void processData(resoCols::iterator const& collision, resoTracks const& tracks)
{

if (cEvtRecINELgt0 && !collision.isRecINELgt0()) // Check reco INELgt0 (at least one PV track in |eta| < 1) about the collision
return;

// LOGF(info, " collisions: Index = %d %d", collision.globalIndex(),tracks.size());
histos.fill(HIST("Event/h1d_ft0_mult_percentile"), collision.cent(), 100);
histos.fill(HIST("Event/h_ft0_vz"), collision.posZ());
Expand Down Expand Up @@ -742,7 +746,7 @@ struct lambdaAnalysis_pb {
return;
histos.fill(HIST("Event/hMCEventCutflow"), 4); // After Sel8

if (cEvtMCRecINELgt0 && !collision.isRecINELgt0())
if (cEvtRecINELgt0 && !collision.isRecINELgt0())
return;
histos.fill(HIST("Event/hMCEventCutflow"), 5); // After RecINELgt0

Expand Down Expand Up @@ -840,7 +844,7 @@ struct lambdaAnalysis_pb {
return;
histos.fill(HIST("SignalLoss/hMCEventCutflow"), 4); // After Sel8

if (cEvtMCRecINELgt0 && !collision.isRecINELgt0())
if (cEvtRecINELgt0 && !collision.isRecINELgt0())
return;
histos.fill(HIST("SignalLoss/hMCEventCutflow"), 5); // After RecINELgt0

Expand Down Expand Up @@ -919,6 +923,10 @@ struct lambdaAnalysis_pb {

SameKindPair<resoCols, resoTracks, BinningType2> pairs{binningPositions2, cNumMixEv, -1, collisions, tracksTuple, &cache}; // -1 is the number of the bin to skip
for (auto& [c1, t1, c2, t2] : pairs) {

if (cEvtRecINELgt0 && !c1.isRecINELgt0()) // Check reco INELgt0 (at least one PV track in |eta| < 1) about the collision
return;

// LOGF(info, "processMCMixedDerived: Mixed collisions : %d (%.3f, %.3f,%d), %d (%.3f, %.3f,%d)",c1.globalIndex(), c1.posZ(), c1.cent(),c1.mult(), c2.globalIndex(), c2.posZ(), c2.cent(),c2.mult());
histos.fill(HIST("Event/mixing_vzVsmultpercentile"), c1.cent(), c1.posZ(), c1.evtPl());
fillDataHistos<true, false>(t1, t2, c1.cent());
Expand All @@ -937,6 +945,9 @@ struct lambdaAnalysis_pb {

if (doprocessData)
LOG(error) << "Disable processData() first!";
if (cEvtRecINELgt0 && !collision.isRecINELgt0()) // Check reco INELgt0 (at least one PV track in |eta| < 1) about the collision
return;

auto _occup = 100;
if (ConfEvtOccupancyInTimeRange)
_occup = collision.trackOccupancyInTimeRange();
Expand All @@ -960,6 +971,9 @@ struct lambdaAnalysis_pb {

SameKindPair<resoColDFs, resoTrackDFs, BinningTypeDF> pairs{binningPositions2, cNumMixEv, -1, collisions, tracksTuple, &cache}; // -1 is the number of the bin to skip
for (auto& [c1, t1, c2, t2] : pairs) {
if (cEvtRecINELgt0 && !c1.isRecINELgt0()) // Check reco INELgt0 (at least one PV track in |eta| < 1) about the collision
return;

auto _occup = 100;
if (ConfEvtOccupancyInTimeRange)
_occup = c1.trackOccupancyInTimeRange();
Expand Down
Loading