Skip to content

Commit 8a94005

Browse files
[PWGUD] Added 4 More table columns, fixed O2linter errors, whithout disabling them. (#10514)
1 parent 93bfa99 commit 8a94005

File tree

1 file changed

+56
-18
lines changed

1 file changed

+56
-18
lines changed

PWGUD/Tasks/exclusiveRhoTo4Pi.cxx

Lines changed: 56 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "Math/Vector4D.h"
3333
#include "Math/Vector3D.h"
3434
#include "Math/GenVector/Boost.h"
35+
#include "CommonConstants/PhysicsConstants.h"
3536

3637
using namespace std;
3738
using namespace o2;
@@ -43,32 +44,49 @@ namespace o2::aod
4344
{
4445
namespace branch
4546
{
47+
DECLARE_SOA_COLUMN(Fv0signal, fv0signal, double);
48+
DECLARE_SOA_COLUMN(Ft0asignal, ft0asignal, double);
49+
DECLARE_SOA_COLUMN(Ft0csignal, ft0csignal, double);
50+
DECLARE_SOA_COLUMN(Fddasignal, fddasignal, double);
51+
DECLARE_SOA_COLUMN(Fddcsignal, fddcsignal, double);
52+
4653
DECLARE_SOA_COLUMN(Dcaxy, dcaxy, std::vector<double>);
4754
DECLARE_SOA_COLUMN(Dcaz, dcaz, std::vector<double>);
55+
4856
DECLARE_SOA_COLUMN(TpcNsigmaKa, tpcNsigmaKa, std::vector<double>);
4957
DECLARE_SOA_COLUMN(TpcNsigmaPr, tpcNsigmaPr, std::vector<double>);
5058
DECLARE_SOA_COLUMN(TpcNsigmaMu, tpcNsigmaMu, std::vector<double>);
5159
DECLARE_SOA_COLUMN(TpcNsigmaEl, tpcNsigmaEl, std::vector<double>);
60+
5261
DECLARE_SOA_COLUMN(TofNsigmaKa, tofNsigmaKa, std::vector<double>);
5362
DECLARE_SOA_COLUMN(TofNsigmaPr, tofNsigmaPr, std::vector<double>);
5463
DECLARE_SOA_COLUMN(TofNsigmaMu, tofNsigmaMu, std::vector<double>);
5564
DECLARE_SOA_COLUMN(TofNsigmaEl, tofNsigmaEl, std::vector<double>);
65+
5666
DECLARE_SOA_COLUMN(TpcChi2, tpcChi2, std::vector<double>);
5767
DECLARE_SOA_COLUMN(TpcNClsFindable, tpcNClsFindable, std::vector<double>);
5868
DECLARE_SOA_COLUMN(ItsChi2, itsChi2, std::vector<double>);
69+
5970
DECLARE_SOA_COLUMN(PionPt, pionPt, std::vector<double>);
6071
DECLARE_SOA_COLUMN(PionEta, pionEta, std::vector<double>);
6172
DECLARE_SOA_COLUMN(PionRapidity, pionRapidity, std::vector<double>);
73+
6274
DECLARE_SOA_COLUMN(FourPionPt, fourPionPt, double);
6375
DECLARE_SOA_COLUMN(FourPionEta, fourPionEta, double);
6476
DECLARE_SOA_COLUMN(FourPionRapidity, fourPionRapidity, double);
6577
DECLARE_SOA_COLUMN(FourPionMass, fourPionMass, double);
78+
DECLARE_SOA_COLUMN(FourPionPhi, fourPionPhi, double);
6679
DECLARE_SOA_COLUMN(FourPionPhiPair1, fourPionPhiPair1, double);
6780
DECLARE_SOA_COLUMN(FourPionPhiPair2, fourPionPhiPair2, double);
6881
DECLARE_SOA_COLUMN(FourPionCosThetaPair1, fourPionCosThetaPair1, double);
6982
DECLARE_SOA_COLUMN(FourPionCosThetaPair2, fourPionCosThetaPair2, double);
7083
} // namespace branch
7184
DECLARE_SOA_TABLE(UDTree0c, "AOD", "UD0Charge",
85+
branch::Fv0signal,
86+
branch::Ft0asignal,
87+
branch::Ft0csignal,
88+
branch::Fddasignal,
89+
branch::Fddcsignal,
7290
branch::Dcaxy,
7391
branch::Dcaz,
7492
branch::TpcNsigmaKa,
@@ -89,12 +107,18 @@ DECLARE_SOA_TABLE(UDTree0c, "AOD", "UD0Charge",
89107
branch::FourPionEta,
90108
branch::FourPionRapidity,
91109
branch::FourPionMass,
110+
branch::FourPionPhi,
92111
branch::FourPionPhiPair1,
93112
branch::FourPionPhiPair2,
94113
branch::FourPionCosThetaPair1,
95114
branch::FourPionCosThetaPair2);
96115

97116
DECLARE_SOA_TABLE(UDTreen0c, "AOD", "UDn0Charge",
117+
branch::Fv0signal,
118+
branch::Ft0asignal,
119+
branch::Ft0csignal,
120+
branch::Fddasignal,
121+
branch::Fddcsignal,
98122
branch::Dcaxy,
99123
branch::Dcaz,
100124
branch::TpcNsigmaKa,
@@ -114,7 +138,8 @@ DECLARE_SOA_TABLE(UDTreen0c, "AOD", "UDn0Charge",
114138
branch::FourPionPt,
115139
branch::FourPionEta,
116140
branch::FourPionRapidity,
117-
branch::FourPionMass);
141+
branch::FourPionMass,
142+
branch::FourPionPhi);
118143

119144
DECLARE_SOA_TABLE(MCTree, "AOD", "MC0Charge",
120145
branch::PionPt,
@@ -130,6 +155,11 @@ DECLARE_SOA_TABLE(MCTree, "AOD", "MC0Charge",
130155
branch::FourPionCosThetaPair2);
131156

132157
DECLARE_SOA_TABLE(MCUDTree, "AOD", "UDMC0Charge",
158+
branch::Fv0signal,
159+
branch::Ft0asignal,
160+
branch::Ft0csignal,
161+
branch::Fddasignal,
162+
branch::Fddcsignal,
133163
branch::Dcaxy,
134164
branch::Dcaz,
135165
branch::TpcNsigmaKa,
@@ -150,15 +180,19 @@ DECLARE_SOA_TABLE(MCUDTree, "AOD", "UDMC0Charge",
150180
branch::FourPionEta,
151181
branch::FourPionRapidity,
152182
branch::FourPionMass,
183+
branch::FourPionPhi,
153184
branch::FourPionPhiPair1,
154185
branch::FourPionPhiPair2,
155186
branch::FourPionCosThetaPair1,
156187
branch::FourPionCosThetaPair2);
157188
} // namespace o2::aod
158189

159190
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
160-
struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
191+
struct ExclusiveRhoTo4Pi {
161192
SGSelector sgSelector;
193+
int kPiPlus = 211;
194+
int kPiMinus = -211;
195+
int kRhoPrime1700 = 30113;
162196
Produces<aod::UDTree0c> zeroChargeEventsData;
163197
Produces<aod::UDTreen0c> nonzeroChargeEventsData;
164198
Produces<aod::MCTree> zeroChargeEventsMCgen;
@@ -773,12 +807,13 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
773807
fourPiCosThetaPair2 = cosThetaCollinsSoperFrame(k14, k23, k1234);
774808

775809
zeroChargeEventsData(
810+
collision.totalFV0AmplitudeA(), collision.totalFT0AmplitudeA(), collision.totalFT0AmplitudeC(), collision.totalFDDAmplitudeA(), collision.totalFDDAmplitudeC(),
776811
pidcaXY, pidcaZ,
777812
tpcNsigKa, tpcNsigPr, tpcNsigEl, tpcNsigMu,
778813
tofNsigKa, tofNsigPr, tofNsigEl, tofNsigMu,
779814
tpcchi2, tpcNFindableCls, itschi2,
780815
piPt, piEta, piRapidity,
781-
p1234.Pt(), p1234.Eta(), p1234.Rapidity(), p1234.M(),
816+
p1234.Pt(), p1234.Eta(), p1234.Rapidity(), p1234.M(), p1234.Phi(),
782817
fourPiPhiPair1, fourPiPhiPair2, fourPiCosThetaPair1, fourPiCosThetaPair2);
783818

784819
if (std::fabs(p1234.Rapidity()) < 0.5) {
@@ -861,12 +896,13 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
861896
}
862897

863898
nonzeroChargeEventsData(
899+
collision.totalFV0AmplitudeA(), collision.totalFT0AmplitudeA(), collision.totalFT0AmplitudeC(), collision.totalFDDAmplitudeA(), collision.totalFDDAmplitudeC(),
864900
pidcaXY, pidcaZ,
865901
tpcNsigKa, tpcNsigPr, tpcNsigMu, tpcNsigEl,
866902
tofNsigKa, tofNsigPr, tofNsigMu, tofNsigEl,
867903
tpcchi2, tpcNFindableCls, itschi2,
868904
piPt, piEta, piRapidity,
869-
p1234.Pt(), p1234.Eta(), p1234.Rapidity(), p1234.M());
905+
p1234.Pt(), p1234.Eta(), p1234.Rapidity(), p1234.M(), p1234.Phi());
870906

871907
if (std::fabs(p1234.Rapidity()) < 0.5) {
872908
histosData.fill(HIST("pT_event_non0charge_WTS_PID_Pi"), p1234.Pt());
@@ -888,7 +924,7 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
888924
} // End of Analysis for non 0 charge events
889925

890926
} // End of 4 Pion Analysis Process function for Data
891-
PROCESS_SWITCH(exclusiveRhoTo4Pi, processData, "The Process for 4 Pion Analysis from data", true);
927+
PROCESS_SWITCH(ExclusiveRhoTo4Pi, processData, "The Process for 4 Pion Analysis from data", true);
892928
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
893929

894930
// Begin of MC Generation function-----------------------------------------------------------------------------------------------------------------------------------------------
@@ -913,23 +949,23 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
913949
}
914950

915951
for (const auto& mother : particle.mothers_as<aod::UDMcParticles>()) {
916-
if (mother.pdgCode() == 30113) {
952+
if (mother.pdgCode() == kRhoPrime1700) {
917953
motherVector.SetXYZM(mother.px(), mother.py(), mother.pz(), o2::constants::physics::MassPionCharged);
918954
histosMCgen.fill(HIST("MCgen_rhoPrime_pT"), motherVector.Pt());
919955

920956
if (flag == false) {
921957
histosMCgen.fill(HIST("rhoPrimeCounts"), 5);
922958
}
923959
flag = true;
924-
if (particle.pdgCode() == 211) {
960+
if (particle.pdgCode() == kPiPlus) {
925961
histosMCgen.fill(HIST("MCgen_particle_pT"), tempVector.Pt());
926962
histosMCgen.fill(HIST("MCgen_particle_rapidity"), tempVector.Rapidity());
927963
piPlusvectors.push_back(tempVector);
928964
piPt.push_back(tempVector.Pt());
929965
piEta.push_back(tempVector.Eta());
930966
piRapidity.push_back(tempVector.Rapidity());
931967
}
932-
if (particle.pdgCode() == -211) {
968+
if (particle.pdgCode() == kPiMinus) {
933969
histosMCgen.fill(HIST("MCgen_particle_pT"), tempVector.Pt());
934970
histosMCgen.fill(HIST("MCgen_particle_rapidity"), tempVector.Rapidity());
935971
piMinusvectors.push_back(tempVector);
@@ -997,7 +1033,7 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
9971033
phiPair1, phiPair2, cosThetaPair1, cosThetaPair2);
9981034

9991035
} // End of 4 Pion MC Generation Process function
1000-
PROCESS_SWITCH(exclusiveRhoTo4Pi, processMCgen, "The Process for 4 Pion Analysis from MC Generation", false);
1036+
PROCESS_SWITCH(ExclusiveRhoTo4Pi, processMCgen, "The Process for 4 Pion Analysis from MC Generation", false);
10011037

10021038
using CollisionStuff = soa::Join<aod::UDCollisions_001, aod::SGCollisions, aod::UDCollisionsSels, aod::UDZdcsReduced, aod::UDMcCollsLabels>;
10031039
using CollisionTotal = CollisionStuff::iterator;
@@ -1270,13 +1306,15 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
12701306
piRapidity.push_back(p3.Rapidity());
12711307
piRapidity.push_back(p4.Rapidity());
12721308

1273-
zeroChargeEventsMCreco(dcaxy, dcaz,
1274-
tpcNsigKa, tpcNsigPr, tpcNsigMu, tpcNsigEl,
1275-
tofNsigKa, tofNsigPr, tofNsigMu, tofNsigEl,
1276-
tpcchi2, tpcNFindableCls, itschi2,
1277-
piPt, piEta, piRapidity,
1278-
p1234.Pt(), p1234.Eta(), p1234.Rapidity(), p1234.M(),
1279-
phiPair1, phiPair2, cosThetaPair1, cosThetaPair2);
1309+
zeroChargeEventsMCreco(
1310+
collision.totalFV0AmplitudeA(), collision.totalFT0AmplitudeA(), collision.totalFT0AmplitudeC(), collision.totalFDDAmplitudeA(), collision.totalFDDAmplitudeC(),
1311+
dcaxy, dcaz,
1312+
tpcNsigKa, tpcNsigPr, tpcNsigMu, tpcNsigEl,
1313+
tofNsigKa, tofNsigPr, tofNsigMu, tofNsigEl,
1314+
tpcchi2, tpcNFindableCls, itschi2,
1315+
piPt, piEta, piRapidity,
1316+
p1234.Pt(), p1234.Eta(), p1234.Rapidity(), p1234.M(), p1234.Phi(),
1317+
phiPair1, phiPair2, cosThetaPair1, cosThetaPair2);
12801318

12811319
if (std::fabs(p1234.Rapidity()) < 0.5) {
12821320
histosMCreco.fill(HIST("pT_event_0charge_WTS_PID_Pi"), p1234.Pt());
@@ -1339,13 +1377,13 @@ struct exclusiveRhoTo4Pi { // o2-linter: disable=name/workflow-file,name/struct
13391377
} // End of Analysis for non 0 charge events
13401378

13411379
} // End of 4 Pion Analysis Process function for MC Reconstruction
1342-
PROCESS_SWITCH(exclusiveRhoTo4Pi, processMCrec, "The Process for 4 Pion Analysis from MC Reconstruction", false);
1380+
PROCESS_SWITCH(ExclusiveRhoTo4Pi, processMCrec, "The Process for 4 Pion Analysis from MC Reconstruction", false);
13431381

13441382
}; // End of Struct exclusiveRhoTo4Pi
13451383
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
13461384

13471385
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
13481386
{
13491387
return WorkflowSpec{
1350-
adaptAnalysisTask<exclusiveRhoTo4Pi>(cfgc)};
1388+
adaptAnalysisTask<ExclusiveRhoTo4Pi>(cfgc)};
13511389
}

0 commit comments

Comments
 (0)