Skip to content

Commit 2197be7

Browse files
[PWGUD] Added Cos Theta vs Phi (#10148)
1 parent 882323b commit 2197be7

File tree

1 file changed

+56
-7
lines changed

1 file changed

+56
-7
lines changed

PWGUD/Tasks/exclusiveRhoTo4Pi.cxx

Lines changed: 56 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
138138
histosData.add("rapidity_event_non0charge_WTS_PID_Pi_domainB", "Rapidity of Events With Track Selection and PID Selection of Pi for 0.15< p_{T} < 0.80 GeV/c$; y; Events", kTH1F, {{nBinsRapidity, -2.5, 2.5}});
139139
histosData.add("rapidity_event_non0charge_WTS_PID_Pi_domainC", "Rapidity of Events With Track Selection and PID Selection of Pi for p_{T} > 0.80 GeV/c; y; Events", kTH1F, {{nBinsRapidity, -2.5, 2.5}});
140140

141+
// Pair Invariant Mass
142+
histosData.add("invMass_pair_1", "Invariant Mass Distribution of 2 pions 1 ; m(#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{5000, 0, 5}});
143+
histosData.add("invMass_pair_2", "Invariant Mass Distribution of 2 pions 2 ; m(#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{5000, 0, 5}});
144+
histosData.add("invMass_pair_3", "Invariant Mass Distribution of 2 pions 3 ; m(#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{5000, 0, 5}});
145+
histosData.add("invMass_pair_4", "Invariant Mass Distribution of 2 pions 4 ; m(#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{5000, 0, 5}});
146+
141147
// Invariant Mass of 0 charge events
142148
histosData.add("invMass_event_0charge_WTS_PID_Pi_domainA", "Invariant Mass Distribution of 0 charge Events with PID Selection of Pi for p_{T} < 0.15 GeV/c; m(#pi^{+}#pi^{-}#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{nBinsInvariantMass, invariantMassMin, invariantMassMax}}); // pT < 0.15GeV
143149
histosData.add("invMass_event_0charge_WTS_PID_Pi_domainB", "Invariant Mass Distribution of 0 charge Events with PID Selection of Pi for 0.15< p_{T} < 0.80 GeV/c; m(#pi^{+}#pi^{-}#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{nBinsInvariantMass, invariantMassMin, invariantMassMax}}); // 0.15GeV < pT < 0.8GeV
@@ -168,6 +174,8 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
168174
histosData.add("CS_phi_pair_2", "#phi Distribution; #phi; Events", kTH1F, {{nBinsPhi, -3.2, 3.2}});
169175
histosData.add("CS_costheta_pair_1", "#theta Distribution;cos(#theta); Counts", kTH1F, {{nBinsCosTheta, -1, 1}});
170176
histosData.add("CS_costheta_pair_2", "#theta Distribution;cos(#theta); Counts", kTH1F, {{nBinsCosTheta, -1, 1}});
177+
histosData.add("phi_cosTheta_pair_1", "Phi vs cosTheta; #phi; cos(#theta)", kTH2F, {{nBinsPhi, -3.2, 3.2}, {nBinsCosTheta, -1, 1}});
178+
histosData.add("phi_cosTheta_pair_2", "Phi vs cosTheta; #phi; cos(#theta)", kTH2F, {{nBinsPhi, -3.2, 3.2}, {nBinsCosTheta, -1, 1}});
171179

172180
// MC Gen Stuff
173181

@@ -180,7 +188,14 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
180188
histosMCgen.add("MCgen_particle_rapidity", "Generated Rapidity; y; Events", kTH1F, {{nBinsRapidity, -2.5, 2.5}});
181189
histosMCgen.add("MCgen_particle_rapidity_contributed", "Generated Rapidity; y; Events", kTH1F, {{nBinsRapidity, -2.5, 2.5}});
182190

191+
// Pair Invariant Mass
192+
histosMCgen.add("MCgen_invMass_pair_1", "Invariant Mass Distribution of 2 pions 1 ; m(#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{5000, 0, 5}});
193+
histosMCgen.add("MCgen_invMass_pair_2", "Invariant Mass Distribution of 2 pions 2 ; m(#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{5000, 0, 5}});
194+
histosMCgen.add("MCgen_invMass_pair_3", "Invariant Mass Distribution of 2 pions 3 ; m(#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{5000, 0, 5}});
195+
histosMCgen.add("MCgen_invMass_pair_4", "Invariant Mass Distribution of 2 pions 4 ; m(#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{5000, 0, 5}});
196+
183197
// Generated Transverse Momentum, Rapidty and Invariant Mass
198+
histosMCgen.add("MCgen_rhoPrime_pT", "Generated pT; pT [GeV/c]; Events", kTH1F, {{nBinsPt, 0, 2}});
184199
histosMCgen.add("MCgen_4pion_pT", "Generated pT; pT [GeV/c]; Events", kTH1F, {{nBinsPt, 0, 2}});
185200
histosMCgen.add("MCgen_4pion_rapidity", "Generated Rapidity; y; Events", kTH1F, {{nBinsRapidity, -2.5, 2.5}});
186201
histosMCgen.add("MCgen_4pion_invmass", "Invariant Mass of 4-Pions; m(4-pion); Events", kTH1F, {{nBinsInvariantMass, invariantMassMin, invariantMassMax}});
@@ -190,6 +205,8 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
190205
histosMCgen.add("MCgen_CS_phi_pair_2", "#phi Distribution; #phi; Events", kTH1F, {{nBinsPhi, -3.2, 3.2}});
191206
histosMCgen.add("MCgen_CS_costheta_pair_1", "#theta Distribution;cos(#theta); Events", kTH1F, {{nBinsCosTheta, -1, 1}});
192207
histosMCgen.add("MCgen_CS_costheta_pair_2", "#theta Distribution;cos(#theta); Events", kTH1F, {{nBinsCosTheta, -1, 1}});
208+
histosMCgen.add("MCgen_phi_cosTheta_pair_1", "Phi vs cosTheta; #phi; cos(#theta)", kTH2F, {{nBinsPhi, -3.2, 3.2}, {nBinsCosTheta, -1, 1}});
209+
histosMCgen.add("MCgen_phi_cosTheta_pair_2", "Phi vs cosTheta; #phi; cos(#theta)", kTH2F, {{nBinsPhi, -3.2, 3.2}, {nBinsCosTheta, -1, 1}});
193210

194211
// MC Reco Stuff
195212

@@ -247,6 +264,12 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
247264
histosMCreco.add("rapidity_event_non0charge_WTS_PID_Pi_domainB", "Rapidity of Events With Track Selection and PID Selection of Pi for 0.15< p_{T} < 0.80 GeV/c$; y; Events", kTH1F, {{nBinsRapidity, -2.5, 2.5}});
248265
histosMCreco.add("rapidity_event_non0charge_WTS_PID_Pi_domainC", "Rapidity of Events With Track Selection and PID Selection of Pi for p_{T} > 0.80 GeV/c; y; Events", kTH1F, {{nBinsRapidity, -2.5, 2.5}});
249266

267+
// Pair Invariant Mass
268+
histosMCreco.add("invMass_pair_1", "Invariant Mass Distribution of 2 pions 1 ; m(#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{5000, 0, 5}});
269+
histosMCreco.add("invMass_pair_2", "Invariant Mass Distribution of 2 pions 2 ; m(#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{5000, 0, 5}});
270+
histosMCreco.add("invMass_pair_3", "Invariant Mass Distribution of 2 pions 3 ; m(#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{5000, 0, 5}});
271+
histosMCreco.add("invMass_pair_4", "Invariant Mass Distribution of 2 pions 4 ; m(#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{5000, 0, 5}});
272+
250273
// Invariant Mass of 0 charge events
251274
histosMCreco.add("invMass_event_0charge_WTS_PID_Pi_domainA", "Invariant Mass Distribution of 0 charge Events with PID Selection of Pi for p_{T} < 0.15 GeV/c; m(#pi^{+}#pi^{-}#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{nBinsInvariantMass, invariantMassMin, invariantMassMax}}); // pT < 0.15GeV
252275
histosMCreco.add("invMass_event_0charge_WTS_PID_Pi_domainB", "Invariant Mass Distribution of 0 charge Events with PID Selection of Pi for 0.15< p_{T} < 0.80 GeV/c; m(#pi^{+}#pi^{-}#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{nBinsInvariantMass, invariantMassMin, invariantMassMax}}); // 0.15GeV < pT < 0.8GeV
@@ -277,6 +300,8 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
277300
histosMCreco.add("CS_phi_pair_2", "#phi Distribution; #phi; Events", kTH1F, {{nBinsPhi, -3.2, 3.2}});
278301
histosMCreco.add("CS_costheta_pair_1", "#theta Distribution;cos(#theta); Counts", kTH1F, {{nBinsCosTheta, -1, 1}});
279302
histosMCreco.add("CS_costheta_pair_2", "#theta Distribution;cos(#theta); Counts", kTH1F, {{nBinsCosTheta, -1, 1}});
303+
histosMCreco.add("phi_cosTheta_pair_1", "Phi vs cosTheta; #phi; cos(#theta)", kTH2F, {{nBinsPhi, -3.2, 3.2}, {nBinsCosTheta, -1, 1}});
304+
histosMCreco.add("phi_cosTheta_pair_2", "Phi vs cosTheta; #phi; cos(#theta)", kTH2F, {{nBinsPhi, -3.2, 3.2}, {nBinsCosTheta, -1, 1}});
280305

281306
} // End of init function
282307
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -502,6 +527,11 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
502527
histosData.fill(HIST("rapidity_event_0charge_WTS_PID_Pi_domainA"), p1234.Rapidity());
503528
histosData.fill(HIST("invMass_event_0charge_WTS_PID_Pi_domainA"), p1234.M());
504529

530+
histosData.fill(HIST("invMass_pair_1"), (p1 + p3).M());
531+
histosData.fill(HIST("invMass_pair_2"), (p1 + p4).M());
532+
histosData.fill(HIST("invMass_pair_3"), (p2 + p3).M());
533+
histosData.fill(HIST("invMass_pair_4"), (p2 + p4).M());
534+
505535
auto phiPair1 = phiCollinsSoperFrame(k13, k24, k1234);
506536
auto phiPair2 = phiCollinsSoperFrame(k14, k23, k1234);
507537
auto cosThetaPair1 = cosThetaCollinsSoperFrame(k13, k24, k1234);
@@ -511,6 +541,9 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
511541
histosData.fill(HIST("CS_phi_pair_2"), phiPair2);
512542
histosData.fill(HIST("CS_costheta_pair_1"), cosThetaPair1);
513543
histosData.fill(HIST("CS_costheta_pair_2"), cosThetaPair2);
544+
545+
histosData.fill(HIST("phi_cosTheta_pair_1"), phiPair1, cosThetaPair1);
546+
histosData.fill(HIST("phi_cosTheta_pair_2"), phiPair2, cosThetaPair2);
514547
}
515548
if (p1234.Pt() > 0.15 && p1234.Pt() < 0.80) {
516549
histosData.fill(HIST("rapidity_event_0charge_WTS_PID_Pi_domainB"), p1234.Rapidity());
@@ -563,7 +596,7 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
563596
{
564597
std::vector<TLorentzVector> piPlusvectors;
565598
std::vector<TLorentzVector> piMinusvectors;
566-
TLorentzVector tempVector, p1, p2, p3, p4;
599+
TLorentzVector motherVector, tempVector, p1, p2, p3, p4;
567600
TLorentzVector p1234;
568601

569602
bool flag = false;
@@ -577,6 +610,8 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
577610

578611
for (const auto& mother : particle.mothers_as<aod::UDMcParticles>()) {
579612
if (mother.pdgCode() == 30113) {
613+
motherVector.SetXYZM(mother.px(), mother.py(), mother.pz(), o2::constants::physics::MassPionCharged);
614+
histosMCgen.fill(HIST("MCgen_rhoPrime_pT"), motherVector.Pt());
580615
if (flag == false) {
581616
histosMCgen.fill(HIST("rhoPrimeCounts"), 5);
582617
}
@@ -585,16 +620,16 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
585620
if (particle.pdgCode() == 211) {
586621
histosMCgen.fill(HIST("MCgen_particle_pT"), tempVector.Pt());
587622
histosMCgen.fill(HIST("MCgen_particle_rapidity"), tempVector.Rapidity());
588-
if (std::abs(tempVector.Rapidity()) < 0.9) {
589-
piPlusvectors.push_back(tempVector);
590-
}
623+
// if(std::abs(tempVector.Rapidity()) < 0.9){
624+
piPlusvectors.push_back(tempVector);
625+
// }
591626
}
592627
if (particle.pdgCode() == -211) {
593628
histosMCgen.fill(HIST("MCgen_particle_pT"), tempVector.Pt());
594629
histosMCgen.fill(HIST("MCgen_particle_rapidity"), tempVector.Rapidity());
595-
if (std::abs(tempVector.Rapidity()) < 0.9) {
596-
piMinusvectors.push_back(tempVector);
597-
}
630+
// if(std::abs(tempVector.Rapidity()) < 0.9){
631+
piMinusvectors.push_back(tempVector);
632+
// }
598633
}
599634
} // End of Mother ID 30113 rho prime
600635
} // End of loop over mothers
@@ -620,6 +655,11 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
620655
histosMCgen.fill(HIST("MCgen_4pion_rapidity"), p1234.Rapidity());
621656
histosMCgen.fill(HIST("MCgen_4pion_invmass"), p1234.M());
622657

658+
histosMCgen.fill(HIST("MCgen_invMass_pair_1"), (piPlusvectors[0] + piMinusvectors[0]).M());
659+
histosMCgen.fill(HIST("MCgen_invMass_pair_2"), (piPlusvectors[0] + piMinusvectors[1]).M());
660+
histosMCgen.fill(HIST("MCgen_invMass_pair_3"), (piPlusvectors[1] + piMinusvectors[0]).M());
661+
histosMCgen.fill(HIST("MCgen_invMass_pair_4"), (piPlusvectors[1] + piMinusvectors[1]).M());
662+
623663
ROOT::Math::PtEtaPhiMVector k1, k2, k3, k4, k1234, k13, k14, k23, k24;
624664

625665
k1.SetCoordinates(piPlusvectors[0].Pt(), piPlusvectors[0].Eta(), piPlusvectors[0].Phi(), o2::constants::physics::MassPionCharged);
@@ -643,6 +683,8 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
643683
histosMCgen.fill(HIST("MCgen_CS_phi_pair_2"), phiPair2);
644684
histosMCgen.fill(HIST("MCgen_CS_costheta_pair_1"), cosThetaPair1);
645685
histosMCgen.fill(HIST("MCgen_CS_costheta_pair_2"), cosThetaPair2);
686+
histosMCgen.fill(HIST("MCgen_phi_cosTheta_pair_1"), phiPair1, cosThetaPair1);
687+
histosMCgen.fill(HIST("MCgen_phi_cosTheta_pair_2"), phiPair2, cosThetaPair2);
646688

647689
} // End of 4 Pion MC Generation Process function
648690
PROCESS_SWITCH(exclusiveRhoTo4Pi, processMCgen, "The Process for 4 Pion Analysis from MC Generation", false);
@@ -812,6 +854,11 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
812854
histosMCreco.fill(HIST("rapidity_event_0charge_WTS_PID_Pi_domainA"), p1234.Rapidity());
813855
histosMCreco.fill(HIST("invMass_event_0charge_WTS_PID_Pi_domainA"), p1234.M());
814856

857+
histosMCreco.fill(HIST("invMass_pair_1"), (p1 + p3).M());
858+
histosMCreco.fill(HIST("invMass_pair_2"), (p1 + p4).M());
859+
histosMCreco.fill(HIST("invMass_pair_3"), (p2 + p3).M());
860+
histosMCreco.fill(HIST("invMass_pair_4"), (p2 + p4).M());
861+
815862
auto phiPair1 = phiCollinsSoperFrame(k13, k24, k1234);
816863
auto phiPair2 = phiCollinsSoperFrame(k14, k23, k1234);
817864
auto cosThetaPair1 = cosThetaCollinsSoperFrame(k13, k24, k1234);
@@ -821,6 +868,8 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
821868
histosMCreco.fill(HIST("CS_phi_pair_2"), phiPair2);
822869
histosMCreco.fill(HIST("CS_costheta_pair_1"), cosThetaPair1);
823870
histosMCreco.fill(HIST("CS_costheta_pair_2"), cosThetaPair2);
871+
histosMCreco.fill(HIST("phi_cosTheta_pair_1"), phiPair1, cosThetaPair1);
872+
histosMCreco.fill(HIST("phi_cosTheta_pair_2"), phiPair2, cosThetaPair2);
824873
}
825874
if (p1234.Pt() > 0.15 && p1234.Pt() < 0.80) {
826875
histosMCreco.fill(HIST("rapidity_event_0charge_WTS_PID_Pi_domainB"), p1234.Rapidity());

0 commit comments

Comments
 (0)