Skip to content

Commit 5542a86

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

File tree

3 files changed

+135
-8
lines changed

3 files changed

+135
-8
lines changed

PWGLF/DataModel/LFResonanceTables.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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/Tasks/Resonances/lambda1520_PbPb.cxx

Lines changed: 118 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,96 @@ struct lambdaAnalysis_pb {
797822
}
798823
PROCESS_SWITCH(lambdaAnalysis_pb, processMC, "Process Event for MC", false);
799824

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

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

0 commit comments

Comments
 (0)