Skip to content

Commit 8d37dc4

Browse files
committed
adding TF1 to perform cut on TOF beta of kaons
1 parent f10c81e commit 8d37dc4

File tree

1 file changed

+35
-5
lines changed

1 file changed

+35
-5
lines changed

PWGLF/Tasks/Resonances/k892analysispbpb.cxx

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ struct K892analysispbpb {
108108
Configurable<float> cMaxTOFnSigmaPion{"cMaxTOFnSigmaPion", 3.0, "TOF nSigma cut for Pion"}; // TOF
109109
Configurable<bool> cByPassTOF{"cByPassTOF", false, "By pass TOF PID selection"}; // By pass TOF PID selection
110110
Configurable<bool> cTofBetaCut{"cTofBetaCut", false, "selection on TOF beta"};
111-
Configurable<int> cTofBetaCutNsigmaPi{"cTofBetaCutNsigmaPi", 0, "Pi Nsigma selection on TOF beta ~ 1"};
112-
Configurable<int> cTofBetaCutNsigmaKa{"cTofBetaCutNsigmaKa", 3, "Ka Nsigma selection on TOF beta ~ 1"};
111+
Configurable<float> cParMtofKa{"cParMtofKa", 0.02, "m of pol1 selection on TOF beta Ka"};
112+
Configurable<float> cParQtofKa{"cParQtofKa", 0.94, "q of pol1 selection on TOF beta Ka"};
113113

114114
Configurable<bool> cTPClowpt{"cTPClowpt", true, "apply TPC at low pt"};
115115
Configurable<bool> cTOFonlyHighpt{"cTOFonlyHighpt", false, "apply TOF only at high pt"};
@@ -222,6 +222,11 @@ struct K892analysispbpb {
222222
histos.add("QAME/h2k892ptMothervsptPiDSAnti", "Pt of Anti-Mother vs pt pion daughter, Mixed Event", kTH2F, {ptAxisMom, ptAxisDau});
223223
histos.add("QAME/h2k892ptMothervsptKaDS", "Pt of Mother vs pt kaon daughter, Mixed Event", kTH2F, {ptAxisMom, ptAxisDau});
224224
histos.add("QAME/h2k892ptMothervsptKaDSAnti", "Pt of Anti-Mother vs pt pion daughter, Mixed Event", kTH2F, {ptAxisMom, ptAxisDau});
225+
226+
histos.add("h3k892invmassEldaughters_DS", "3d Invariant mass with electron mass on daughters DS", kTH3F, {centAxis, ptAxis, invMassAxis});
227+
histos.add("k892invmassEldaughters_DS", "Invariant mass with electron mass on daughters DS", kTH1F, {invMassAxis});
228+
histos.add("h3k892invmassEldaughters_DSanti", "3d Invariant mass with electron mass on daughters DSanti", kTH3F, {centAxis, ptAxis, invMassAxis});
229+
histos.add("k892invmassEldaughters_DSanti", "Invariant mass with electron mass on daughters DSanti", kTH1F, {invMassAxis});
225230
}
226231

227232
// DCA QA
@@ -337,6 +342,7 @@ struct K892analysispbpb {
337342

338343
double massKa = o2::constants::physics::MassKPlus;
339344
double massPi = o2::constants::physics::MassPiPlus;
345+
double massEl = o2::constants::physics::MassElectron;
340346

341347
template <typename CollType>
342348
bool myEventSelections(const CollType& coll)
@@ -425,7 +431,10 @@ struct K892analysispbpb {
425431

426432
if (candidate.hasTPC() && std::abs(candidate.tpcNSigmaKa()) <= cMaxTPCnSigmaKaon) { // tpc cut, tof when available
427433

428-
if (cTofBetaCut && candidate.hasTOF() && (candidate.beta() + cTofBetaCutNsigmaKa * candidate.betaerror() > 1))
434+
TF1 *TOFKa1 = new TF1("TOFKa1", "[0]*x+[1]",0.0,20);
435+
TOFKa1->SetParameters(cParMtofKa,cParQtofKa);
436+
437+
if (cTofBetaCut && candidate.hasTOF() && (candidate.beta() > TOFKa1->Eval(candidate.p()) || candidate.beta() > 1))
429438
return false;
430439

431440
if (cByPassTOF) // skip tof selection
@@ -463,7 +472,7 @@ struct K892analysispbpb {
463472

464473
if (candidate.hasTPC() && std::abs(candidate.tpcNSigmaPi()) <= cMaxTPCnSigmaPion) { // tpc cut, tof when available
465474

466-
if (cTofBetaCut && candidate.hasTOF() && (candidate.beta() + cTofBetaCutNsigmaPi * candidate.betaerror() > 1))
475+
if (cTofBetaCut && candidate.hasTOF() && (candidate.beta() > 1))
467476
return false;
468477

469478
if (cByPassTOF) // skip tof selection
@@ -498,7 +507,7 @@ struct K892analysispbpb {
498507
}
499508

500509
auto oldindex = -999;
501-
TLorentzVector lDecayDaughter1, lDecayDaughter2, lResonance, ldaughterRot, lResonanceRot;
510+
TLorentzVector lDecayDaughter1, lDecayDaughter2, lResonance, ldaughterRot, lResonanceRot, lDecayDaughterEl1, lDecayDaughterEl2, lResonanceEl;
502511
for (const auto& [trk1, trk2] : combinations(CombinationsFullIndexPolicy(dTracks1, dTracks2))) {
503512
// Full index policy is needed to consider all possible combinations
504513
if (trk1.index() == trk2.index())
@@ -591,6 +600,25 @@ struct K892analysispbpb {
591600
int track1Sign = trk1.sign();
592601
int track2Sign = trk2.sign();
593602

603+
//// Resonance check with electron mass
604+
lDecayDaughterEl1.SetXYZM(trk1.px(), trk1.py(), trk1.pz(), massEl);
605+
lDecayDaughterEl2.SetXYZM(trk2.px(), trk2.py(), trk2.pz(), massEl);
606+
lResonanceEl = lDecayDaughterEl1 + lDecayDaughterEl2;
607+
// Rapidity cut
608+
if constexpr (!IsMix) { // same event
609+
if (additionalQAplots) {
610+
if (std::abs(lResonanceEl.Rapidity()) < 0.5 && lResonanceEl.Pt() < cMaxPtMotherCut && lResonanceEl.M() < cMaxMinvMotherCut) {
611+
if(track1Sign < 0) {
612+
histos.fill(HIST("k892invmassEldaughters_DS"), lResonanceEl.M());
613+
histos.fill(HIST("h3k892invmassEldaughters_DS"), multiplicity, lResonanceEl.Pt(), lResonanceEl.M());
614+
} else {
615+
histos.fill(HIST("k892invmassEldaughters_DSanti"), lResonanceEl.M());
616+
histos.fill(HIST("h3k892invmassEldaughters_DSanti"), multiplicity, lResonanceEl.Pt(), lResonanceEl.M());
617+
}
618+
}
619+
}
620+
}
621+
594622
//// Resonance reconstruction
595623
lDecayDaughter1.SetXYZM(trk1.px(), trk1.py(), trk1.pz(), massPi);
596624
lDecayDaughter2.SetXYZM(trk2.px(), trk2.py(), trk2.pz(), massKa);
@@ -605,6 +633,8 @@ struct K892analysispbpb {
605633
continue;
606634
}
607635

636+
637+
608638
//// Un-like sign pair only
609639
if (track1Sign * track2Sign < 0) {
610640
if constexpr (IsRot) { // rotational background

0 commit comments

Comments
 (0)