Skip to content

Commit d0374a2

Browse files
nasir mehdi maliknasirmehdimalik
authored andcommitted
added newfn for sl correction
1 parent 10c4a50 commit d0374a2

File tree

4 files changed

+139
-13
lines changed

4 files changed

+139
-13
lines changed

PWGLF/DataModel/LFResonanceTables.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, float);
215215
DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, float); //! Z position of the decay vertex
216216
DECLARE_SOA_COLUMN(Alpha, alpha, float); //! Alpha of the decay vertex
217217
DECLARE_SOA_COLUMN(QtArm, qtarm, float); //! Armenteros Qt of the decay vertex
218-
DECLARE_SOA_COLUMN(TpcSignal10, tpcSignal10, int8_t); //! TPC signal of the track x10
218+
DECLARE_SOA_COLUMN(TpcSignal10, tpcSignal10, int16_t); //! TPC signal of the track x10
219219
DECLARE_SOA_COLUMN(DaughterTPCNSigmaPosPi10, daughterTPCNSigmaPosPi10, int8_t); //! TPC PID x10 of the positive daughter as Pion
220220
DECLARE_SOA_COLUMN(DaughterTPCNSigmaPosKa10, daughterTPCNSigmaPosKa10, int8_t); //! TPC PID x10 of the positive daughter as Kaon
221221
DECLARE_SOA_COLUMN(DaughterTPCNSigmaPosPr10, daughterTPCNSigmaPosPr10, int8_t); //! TPC PID x10 of the positive daughter as Proton
@@ -310,7 +310,7 @@ DECLARE_SOA_DYNAMIC_COLUMN(DaughterTOFNSigmaBachPr, daughterTOFNSigmaBachPr,
310310
[](int8_t daughterTOFNSigmaBachPr10) { return (float)daughterTOFNSigmaBachPr10 / 10.f; });
311311
// TPC signal x10
312312
DECLARE_SOA_DYNAMIC_COLUMN(TpcSignal, tpcSignal,
313-
[](int8_t tpcSignal10) { return (float)tpcSignal10 / 10.f; });
313+
[](int16_t tpcSignal10) { return (float)tpcSignal10 / 100.f; });
314314
// pT, Eta, Phi
315315
// DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, [](float px, float py) -> float { return RecoDecay::sqrtSumOfSquares(px, py); });
316316
DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta, [](float px, float py, float pz) -> float { return RecoDecay::eta(std::array{px, py, pz}); });

PWGLF/TableProducer/Resonances/resonanceInitializer.cxx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ struct ResonanceInitializer {
106106
Configurable<double> dBzInput{"dBzInput", -999, "bz field, -999 is automatic"};
107107
Configurable<bool> cfgFillQA{"cfgFillQA", false, "Fill QA histograms"};
108108
Configurable<bool> cfgBypassCCDB{"cfgBypassCCDB", true, "Bypass loading CCDB part to save CPU time and memory"}; // will be affected to b_z value.
109-
109+
Configurable<bool> cfgDoSignalLoss{"cfgDoSignalLoss", false, "Save reference particles for mT scaling signal loss"};
110110
// Track filter from tpcSkimsTableCreator
111111
Configurable<int> trackSelection{"trackSelection", 0, "Track selection: 0 -> No Cut, 1 -> kGlobalTrack, 2 -> kGlobalTrackWoPtEta, 3 -> kGlobalTrackWoDCA, 4 -> kQualityTracks, 5 -> kInAcceptanceTracks"};
112112
Configurable<int> trackSphDef{"trackSphDef", 0, "Spherocity Definition: |pT| = 1 -> 0, otherwise -> 1"};
@@ -277,8 +277,14 @@ struct ResonanceInitializer {
277277
|| (nabs(aod::mcparticle::pdgCode) == 3324) // Xi(1530)0
278278
|| (nabs(aod::mcparticle::pdgCode) == 10323) // K1(1270)+
279279
|| (nabs(aod::mcparticle::pdgCode) == 123314) // Xi(1820)0
280-
|| (nabs(aod::mcparticle::pdgCode) == 123324); // Xi(1820)-0
281-
280+
|| (nabs(aod::mcparticle::pdgCode) == 123324) // Xi(1820)-0
281+
|| (nabs(aod::mcparticle::pdgCode) == 3124) // Lambda(1520) (Standard)
282+
|| (nabs(aod::mcparticle::pdgCode) == 2212) // Proton
283+
|| (nabs(aod::mcparticle::pdgCode) == 3122) // Lambda0
284+
|| (nabs(aod::mcparticle::pdgCode) == 3312) // Xi-
285+
|| (nabs(aod::mcparticle::pdgCode) == 3322) // Xi0
286+
|| (nabs(aod::mcparticle::pdgCode) == 3334); // Omega-
287+
//
282288
using ResoEvents = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod::CentFT0Cs, aod::CentFT0As, aod::CentFV0As, aod::Mults>;
283289
using ResoEvents001 = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod::CentFT0Cs, aod::CentFT0As, aod::CentFV0As, aod::Mults, aod::MultsExtra, aod::PVMults>;
284290
using ResoRun2Events = soa::Join<aod::Collisions, aod::EvSels, aod::CentRun2V0Ms>;
@@ -759,7 +765,7 @@ struct ResonanceInitializer {
759765
static_cast<int8_t>(std::round(track.tofNSigmaPi() * 10)),
760766
static_cast<int8_t>(std::round(track.tofNSigmaKa() * 10)),
761767
static_cast<int8_t>(std::round(track.tofNSigmaPr() * 10)),
762-
static_cast<int8_t>(std::round(track.tpcSignal() * 10)),
768+
static_cast<int16_t>(std::round(track.tpcSignal() * 100)),
763769
trackFlags);
764770
if (!cfgBypassTrackIndexFill) {
765771
resoTrackTracks(track.globalIndex());
@@ -1182,6 +1188,12 @@ struct ResonanceInitializer {
11821188
void fillMCParticles(SelectedMCPartType const& mcParts, TotalMCParts const& mcParticles)
11831189
{
11841190
for (auto const& mcPart : mcParts) {
1191+
if (!cfgDoSignalLoss) {
1192+
int absPdg = std::abs(mcPart.pdgCode());
1193+
if (absPdg == 2212 || absPdg == 3122 || absPdg == 3312 || absPdg == 3322 || absPdg == 3334) {
1194+
continue;
1195+
}
1196+
}
11851197
std::vector<int> daughterPDGs;
11861198
if (mcPart.has_daughters()) {
11871199
auto daughter01 = mcParticles.rawIteratorAt(mcPart.daughtersIds()[0] - mcParticles.offset());

PWGLF/TableProducer/Resonances/resonanceMergeDF.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ struct ResonanceMergeDF {
159159
(int8_t)(track.tofNSigmaPi() * 10),
160160
(int8_t)(track.tofNSigmaKa() * 10),
161161
(int8_t)(track.tofNSigmaPr() * 10),
162-
(int8_t)(track.tpcSignal() * 10),
162+
static_cast<int16_t>(track.tpcSignal() * 100),
163163
track.trackFlags()));
164164
}
165165

@@ -271,7 +271,7 @@ struct ResonanceMergeDF {
271271
(int8_t)(track.tofNSigmaPi() * 10),
272272
(int8_t)(track.tofNSigmaKa() * 10),
273273
(int8_t)(track.tofNSigmaPr() * 10),
274-
(int8_t)(track.tpcSignal() * 10),
274+
static_cast<int16_t>(track.tpcSignal() * 100),
275275
track.trackFlags()));
276276
}
277277

@@ -458,7 +458,7 @@ struct ResonanceMergeDF {
458458
(int8_t)(track.tofNSigmaPi() * 10),
459459
(int8_t)(track.tofNSigmaKa() * 10),
460460
(int8_t)(track.tofNSigmaPr() * 10),
461-
(int8_t)(track.tpcSignal() * 10),
461+
static_cast<int16_t>(track.tpcSignal() * 100),
462462
track.trackFlags());
463463
}
464464
}
@@ -521,7 +521,7 @@ struct ResonanceMergeDF {
521521
(int8_t)(track.tofNSigmaPi() * 10),
522522
(int8_t)(track.tofNSigmaKa() * 10),
523523
(int8_t)(track.tofNSigmaPr() * 10),
524-
(int8_t)(track.tpcSignal() * 10),
524+
static_cast<int16_t>(track.tpcSignal() * 100),
525525
track.trackFlags());
526526
}
527527
// Cascade candidate

PWGLF/Tasks/Resonances/lambda1520_PbPb.cxx

Lines changed: 117 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@ struct lambdaAnalysis_pb {
140140
Configurable<bool> cEvtMCVtxIn10{"cEvtMCVtxIn10", false, "MC event sel: isVtxIn10"};
141141
Configurable<bool> cEvtMCTriggerTVX{"cEvtMCTriggerTVX", false, "MC event sel: isTriggerTVX"};
142142
Configurable<bool> cEvtMCRecINELgt0{"cEvtMCRecINELgt0", false, "MC event sel: isRecINELgt0"};
143+
const double mMassLambda1520 = 1.5195;
144+
const double mMassProton = 0.93827;
145+
const double mMassLambda0 = 1.11568;
146+
const double mMassXiMinus = 1.32171;
147+
const double mMassXi0 = 1.31486;
148+
const double mMassOmegaMinus = 1.67245;
143149
// Histogram Registry.
144150
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
145151

@@ -239,6 +245,24 @@ struct lambdaAnalysis_pb {
239245
histos.add("Analysis/h3d_reso_lstar_PM", "Resolution #Lambda(1520) p_{T}", kTHnSparseF, {{200, -0.05, 0.05}, axisPt, axisCent});
240246
histos.add("Analysis/h3d_reso_lstar_MP", "Resolution #bar{#Lambda}(1520) p_{T}", kTHnSparseF, {{200, -0.05, 0.05}, axisPt, axisCent});
241247
}
248+
249+
if (doprocessMCGen) {
250+
histos.add("SignalLoss/hMCEventCutflow", "MC Event Cutflow", kTH1F, {{7, 0, 7}});
251+
histos.add("SignalLoss/hGen_mT_scaled_Proton", "mT Scaled #Lambda(1520) from Proton", kTHnSparseF, {axisPt, axisCent});
252+
histos.add("SignalLoss/hGen_mT_scaled_AntiProton", "mT Scaled #bar{#Lambda}(1520) from AntiProton", kTHnSparseF, {axisPt, axisCent});
253+
254+
histos.add("SignalLoss/hGen_mT_scaled_Lambda0", "mT Scaled #Lambda(1520) from Lambda0", kTHnSparseF, {axisPt, axisCent});
255+
histos.add("SignalLoss/hGen_mT_scaled_AntiLambda0", "mT Scaled #bar{#Lambda}(1520) from AntiLambda0", kTHnSparseF, {axisPt, axisCent});
256+
257+
histos.add("SignalLoss/hGen_mT_scaled_XiMinus", "mT Scaled #Lambda(1520) from Xi-", kTHnSparseF, {axisPt, axisCent});
258+
histos.add("SignalLoss/hGen_mT_scaled_XiPlus", "mT Scaled #bar{#Lambda}(1520) from Xi+", kTHnSparseF, {axisPt, axisCent});
259+
260+
histos.add("SignalLoss/hGen_mT_scaled_Xi0", "mT Scaled #Lambda(1520) from Xi0", kTHnSparseF, {axisPt, axisCent});
261+
histos.add("SignalLoss/hGen_mT_scaled_AntiXi0", "mT Scaled #bar{#Lambda}(1520) from AntiXi0", kTHnSparseF, {axisPt, axisCent});
262+
263+
histos.add("SignalLoss/hGen_mT_scaled_OmegaMinus", "mT Scaled #Lambda(1520) from Omega-", kTHnSparseF, {axisPt, axisCent});
264+
histos.add("SignalLoss/hGen_mT_scaled_OmegaPlus", "mT Scaled #bar{#Lambda}(1520) from Omega+", kTHnSparseF, {axisPt, axisCent});
265+
}
242266
}
243267

244268
template <typename T>
@@ -771,10 +795,11 @@ struct lambdaAnalysis_pb {
771795
for (auto const& part : resoParents) {
772796
if (std::abs(part.pdgCode()) != lambda1520id) // // L* pdg_code = 3124
773797
continue;
774-
// if (std::abs(part.y()) > 0.5) { // rapidity cut
775-
// continue;
776-
// }
777798

799+
float _yshift = std::abs(part.y()) - cfgRapidityShift;
800+
801+
if (std::abs(_yshift) > cfgRapidityCut)
802+
continue;
778803
bool pass1 = false;
779804
bool pass2 = false;
780805

@@ -797,6 +822,95 @@ struct lambdaAnalysis_pb {
797822
}
798823
PROCESS_SWITCH(lambdaAnalysis_pb, processMC, "Process Event for MC", false);
799824

825+
void processMCGen(resoMCCols::iterator const& collision,
826+
aod::ResoMCParents const& resoParents)
827+
{
828+
829+
float centrality = collision.cent();
830+
831+
histos.fill(HIST("SignalLoss/hMCEventCutflow"), 0); // All collisions
832+
833+
if (cEvtMCTriggerTVX && !collision.isTriggerTVX())
834+
return;
835+
histos.fill(HIST("SignalLoss/hMCEventCutflow"), 1); // After TriggerTVX
836+
837+
if (cEvtMCVtxIn10 && !collision.isVtxIn10())
838+
return;
839+
histos.fill(HIST("SignalLoss/hMCEventCutflow"), 2); // After VtxIn10
840+
841+
if (cEvtMCINELgt0 && !collision.isINELgt0())
842+
return;
843+
histos.fill(HIST("SignalLoss/hMCEventCutflow"), 3); // After INELgt0
844+
845+
if (cEvtMCSel8 && !collision.isInSel8())
846+
return;
847+
histos.fill(HIST("SignalLoss/hMCEventCutflow"), 4); // After Sel8
848+
849+
if (cEvtMCRecINELgt0 && !collision.isRecINELgt0())
850+
return;
851+
histos.fill(HIST("SignalLoss/hMCEventCutflow"), 5); // After RecINELgt0
852+
853+
if (cEvtMCAfterAllCuts && !collision.isInAfterAllCuts())
854+
return;
855+
histos.fill(HIST("SignalLoss/hMCEventCutflow"), 6); // After AfterAllCuts
856+
857+
for (auto const& part : resoParents) {
858+
859+
float _yshift = std::abs(part.y()) - cfgRapidityShift;
860+
861+
if (std::abs(_yshift) > cfgRapidityCut)
862+
continue;
863+
864+
int pdg = part.pdgCode();
865+
float ptRef = part.pt();
866+
double ptSq = -1.0;
867+
868+
if (pdg == 2212) {
869+
ptSq = (ptRef * ptRef) + (mMassProton * mMassProton) - (mMassLambda1520 * mMassLambda1520);
870+
if (ptSq > 0)
871+
histos.fill(HIST("SignalLoss/hGen_mT_scaled_Proton"), std::sqrt(ptSq), centrality);
872+
} else if (pdg == -2212) {
873+
ptSq = (ptRef * ptRef) + (mMassProton * mMassProton) - (mMassLambda1520 * mMassLambda1520);
874+
if (ptSq > 0)
875+
histos.fill(HIST("SignalLoss/hGen_mT_scaled_AntiProton"), std::sqrt(ptSq), centrality);
876+
} else if (pdg == 3122) {
877+
ptSq = (ptRef * ptRef) + (mMassLambda0 * mMassLambda0) - (mMassLambda1520 * mMassLambda1520);
878+
if (ptSq > 0)
879+
histos.fill(HIST("SignalLoss/hGen_mT_scaled_Lambda0"), std::sqrt(ptSq), centrality);
880+
} else if (pdg == -3122) {
881+
ptSq = (ptRef * ptRef) + (mMassLambda0 * mMassLambda0) - (mMassLambda1520 * mMassLambda1520);
882+
if (ptSq > 0)
883+
histos.fill(HIST("SignalLoss/hGen_mT_scaled_AntiLambda0"), std::sqrt(ptSq), centrality);
884+
} else if (pdg == 3312) {
885+
ptSq = (ptRef * ptRef) + (mMassXiMinus * mMassXiMinus) - (mMassLambda1520 * mMassLambda1520);
886+
if (ptSq > 0)
887+
histos.fill(HIST("SignalLoss/hGen_mT_scaled_XiMinus"), std::sqrt(ptSq), centrality);
888+
} else if (pdg == -3312) {
889+
ptSq = (ptRef * ptRef) + (mMassXiMinus * mMassXiMinus) - (mMassLambda1520 * mMassLambda1520);
890+
if (ptSq > 0)
891+
histos.fill(HIST("SignalLoss/hGen_mT_scaled_XiPlus"), std::sqrt(ptSq), centrality);
892+
} else if (pdg == 3322) {
893+
ptSq = (ptRef * ptRef) + (mMassXi0 * mMassXi0) - (mMassLambda1520 * mMassLambda1520);
894+
if (ptSq > 0)
895+
histos.fill(HIST("SignalLoss/hGen_mT_scaled_Xi0"), std::sqrt(ptSq), centrality);
896+
} else if (pdg == -3322) {
897+
ptSq = (ptRef * ptRef) + (mMassXi0 * mMassXi0) - (mMassLambda1520 * mMassLambda1520);
898+
if (ptSq > 0)
899+
histos.fill(HIST("SignalLoss/hGen_mT_scaled_AntiXi0"), std::sqrt(ptSq), centrality);
900+
} else if (pdg == 3334) {
901+
ptSq = (ptRef * ptRef) + (mMassOmegaMinus * mMassOmegaMinus) - (mMassLambda1520 * mMassLambda1520);
902+
if (ptSq > 0)
903+
histos.fill(HIST("SignalLoss/hGen_mT_scaled_OmegaMinus"), std::sqrt(ptSq), centrality);
904+
} else if (pdg == -3334) {
905+
ptSq = (ptRef * ptRef) + (mMassOmegaMinus * mMassOmegaMinus) - (mMassLambda1520 * mMassLambda1520);
906+
if (ptSq > 0)
907+
histos.fill(HIST("SignalLoss/hGen_mT_scaled_OmegaPlus"), std::sqrt(ptSq), centrality);
908+
}
909+
}
910+
}
911+
912+
PROCESS_SWITCH(lambdaAnalysis_pb, processMCGen, "Process Event for MC", false);
913+
800914
using BinningType2 = ColumnBinningPolicy<aod::collision::PosZ, aod::resocollision::Cent>;
801915

802916
void processMix(resoCols& collisions, resoTracks const& tracks)

0 commit comments

Comments
 (0)