Skip to content

Commit a62bd63

Browse files
authored
Adding selection on deltaEta and delta Phi (#6248)
1 parent a60b3af commit a62bd63

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

PWGLF/Tasks/Resonances/k892analysis.cxx

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ struct k892analysis {
113113
Configurable<bool> cfgCutsOnMother{"cfgCutsOnMother", false, "Enamble additional cuts on mother"};
114114
Configurable<double> cMaxPtMotherCut{"cMaxPtMotherCut", 15.0, "Maximum pt of mother cut"};
115115
Configurable<double> cMaxMinvMotherCut{"cMaxMinvMotherCut", 1.5, "Maximum Minv of mother cut"};
116+
Configurable<bool> cfgCutsOnDaughters{"cfgCutsOnDaughters", false, "Enamble additional cuts on daughters"};
117+
Configurable<int> cetaphiBins{"cetaphiBins", 400, "number of eta and phi bins"};
118+
Configurable<double> cMaxDeltaEtaCut{"cMaxDeltaEtaCut", 0.7, "Maximum deltaEta between daughters"};
119+
Configurable<double> cMaxDeltaPhiCut{"cMaxDeltaPhiCut", 1.5, "Maximum deltaPhi between daughters"};
116120

117121
void init(o2::framework::InitContext&)
118122
{
@@ -204,6 +208,28 @@ struct k892analysis {
204208
histos.add("QAafter/TOF_Nsigma_ka_all", "TOF NSigma for Pion;#it{p}_{T} (GeV/#it{c});#sigma_{TOF}^{Kaon};", {HistType::kTH3F, {centAxis, ptAxisQA, pidQAAxis}});
205209
histos.add("QAafter/TPC_Nsigmaka_all", "TPC NSigma for Kaon;#it{p}_{T} (GeV/#it{c});#sigma_{TPC}^{Kaon};", {HistType::kTH3F, {centAxis, ptAxisQA, pidQAAxis}});
206210

211+
// eta phi QA
212+
if (cfgCutsOnDaughters) {
213+
histos.add("QAbefore/deltaEta", "deltaEta of kaon and pion candidates", HistType::kTH1F, {{cetaphiBins, 0.0, 3.15}});
214+
histos.add("QAbefore/deltaPhi", "deltaPhi of kaon and pion candidates", HistType::kTH1F, {{cetaphiBins, 0.0, 3.15}});
215+
histos.add("QAbefore/Eta", "Eta of tracks candidates", HistType::kTH1F, {{cetaphiBins, -1.6, 1.6}});
216+
histos.add("QAbefore/Phi", "Phi of tracks candidates", HistType::kTH1F, {{cetaphiBins, 0.0, 6.30}});
217+
218+
histos.add("QAafter/deltaEta", "deltaEta of kaon and pion candidates", HistType::kTH1F, {{cetaphiBins, 0.0, 3.15}});
219+
histos.add("QAafter/deltaPhi", "deltaPhi of kaon and pion candidates", HistType::kTH1F, {{cetaphiBins, 0.0, 3.15}});
220+
histos.add("QAafter/EtaPi", "Eta of pion candidates", HistType::kTH1F, {{cetaphiBins, -1.6, 1.6}});
221+
histos.add("QAafter/PhiPi", "Phi of pion candidates", HistType::kTH1F, {{cetaphiBins, 0.0, 6.30}});
222+
histos.add("QAafter/EtaKa", "Eta of kaon candidates", HistType::kTH1F, {{cetaphiBins, -1.6, 1.6}});
223+
histos.add("QAafter/PhiKa", "Phi of kaon candidates", HistType::kTH1F, {{cetaphiBins, 0.0, 6.30}});
224+
225+
histos.add("QAafter/deltaEtaafter", "deltaEta of kaon and pion candidates", HistType::kTH1F, {{cetaphiBins, 0.0, 3.15}});
226+
histos.add("QAafter/deltaPhiafter", "deltaPhi of kaon and pion candidates", HistType::kTH1F, {{cetaphiBins, 0.0, 3.15}});
227+
histos.add("QAafter/EtaPiafter", "Eta of pion candidates", HistType::kTH1F, {{cetaphiBins, -1.6, 1.6}});
228+
histos.add("QAafter/PhiPiafter", "Phi of pion candidates", HistType::kTH1F, {{cetaphiBins, 0.0, 6.30}});
229+
histos.add("QAafter/EtaKaafter", "Eta of kaon candidates", HistType::kTH1F, {{cetaphiBins, -1.6, 1.6}});
230+
histos.add("QAafter/PhiKaafter", "Phi of kaon candidates", HistType::kTH1F, {{cetaphiBins, 0.0, 6.30}});
231+
}
232+
207233
// 3d histogram
208234
histos.add("h3k892invmassDS", "Invariant mass of K(892)0 differnt sign", kTH3F, {centAxis, ptAxis, invMassAxis});
209235
histos.add("h3k892invmassDSAnti", "Invariant mass of Anti-K(892)0 differnt sign", kTH3F, {centAxis, ptAxis, invMassAxis});
@@ -450,6 +476,10 @@ struct k892analysis {
450476
auto trk2NSigmaKaTPC = trk2.tpcNSigmaKa();
451477
auto trk2NSigmaKaTOF = (isTrk2hasTOF) ? trk2.tofNSigmaKa() : -999.;
452478

479+
auto deltaEta = TMath::Abs(trk1.eta() - trk2.eta());
480+
auto deltaPhi = TMath::Abs(trk1.phi() - trk2.phi());
481+
deltaPhi = (deltaPhi > TMath::Pi()) ? (2 * TMath::Pi() - deltaPhi) : deltaPhi;
482+
453483
if constexpr (!IsMix) {
454484
//// QA plots before the selection
455485
// --- PID QA Pion
@@ -470,6 +500,13 @@ struct k892analysis {
470500
histos.fill(HIST("QAbefore/trkDCAxy_ka"), trk2.dcaXY());
471501
histos.fill(HIST("QAbefore/trkDCAz_pi"), trk1.dcaZ());
472502
histos.fill(HIST("QAbefore/trkDCAz_ka"), trk2.dcaZ());
503+
504+
if (cfgCutsOnDaughters) {
505+
histos.fill(HIST("QAbefore/Eta"), trk1.eta());
506+
histos.fill(HIST("QAbefore/Phi"), trk1.phi());
507+
histos.fill(HIST("QAbefore/deltaEta"), deltaEta);
508+
histos.fill(HIST("QAbefore/deltaPhi"), deltaPhi);
509+
}
473510
}
474511

475512
// Apply the selection
@@ -508,6 +545,16 @@ struct k892analysis {
508545
histos.fill(HIST("QAafter/trkDCAxy_ka"), trk2.dcaXY());
509546
histos.fill(HIST("QAafter/trkDCAz_pi"), trk1.dcaZ());
510547
histos.fill(HIST("QAafter/trkDCAz_ka"), trk2.dcaZ());
548+
549+
if (cfgCutsOnDaughters) {
550+
histos.fill(HIST("QAafter/EtaPi"), trk1.eta());
551+
histos.fill(HIST("QAafter/PhiPi"), trk1.phi());
552+
histos.fill(HIST("QAafter/EtaKa"), trk2.eta());
553+
histos.fill(HIST("QAafter/PhiKa"), trk2.phi());
554+
555+
histos.fill(HIST("QAafter/deltaEta"), deltaEta);
556+
histos.fill(HIST("QAafter/deltaPhi"), deltaPhi);
557+
}
511558
}
512559

513560
//// Resonance reconstruction
@@ -524,6 +571,22 @@ struct k892analysis {
524571
continue;
525572
}
526573

574+
if (cfgCutsOnDaughters) {
575+
if (deltaEta >= cMaxDeltaEtaCut)
576+
continue;
577+
if (deltaPhi >= cMaxDeltaPhiCut)
578+
continue;
579+
580+
if constexpr (!IsMix) {
581+
histos.fill(HIST("QAafter/EtaPiafter"), trk1.eta());
582+
histos.fill(HIST("QAafter/PhiPiafter"), trk1.phi());
583+
histos.fill(HIST("QAafter/EtaKaafter"), trk2.eta());
584+
histos.fill(HIST("QAafter/PhiKaafter"), trk2.phi());
585+
histos.fill(HIST("QAafter/deltaEtaafter"), deltaEta);
586+
histos.fill(HIST("QAafter/deltaPhiafter"), deltaPhi);
587+
}
588+
}
589+
527590
//// Un-like sign pair only
528591
if (trk1.sign() * trk2.sign() < 0) {
529592
if constexpr (!IsMix) {

0 commit comments

Comments
 (0)