Skip to content

Commit a0ff0ba

Browse files
victor-gonzalezVictor
andauthored
[PWGCF] DptDpt - Tracking the TPC sector borders (AliceO2Group#9000)
Co-authored-by: Victor <[email protected]>
1 parent 427e25c commit a0ff0ba

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

PWGCF/TwoParticleCorrelations/Tasks/dptDptEfficiencyAndQc.cxx

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include <TH2F.h>
1717
#include <TProfile2D.h>
18+
#include <TPDGCode.h>
1819
#include <CCDB/BasicCCDBManager.h>
1920
#include <vector>
2021
#include <cstdio>
@@ -23,6 +24,7 @@
2324
#include "ReconstructionDataFormats/PID.h"
2425
#include "Common/Core/TrackSelection.h"
2526
#include "Common/Core/TableHelper.h"
27+
#include "Common/Core/RecoDecay.h"
2628
#include "Common/DataModel/TrackSelectionTables.h"
2729
#include "Common/DataModel/PIDResponse.h"
2830
#include "Framework/ASoAHelpers.h"
@@ -79,6 +81,10 @@ enum BeforeAfter {
7981
kAfter ///< filling after track selection
8082
};
8183

84+
/* the structures for checking the TPC sector borders impact */
85+
constexpr int kNoOfTpcSectors = 18;
86+
constexpr float kTpcPhiSectorWidth = (constants::math::TwoPI) / kNoOfTpcSectors;
87+
8288
/* the configuration of the nsigma axis */
8389
float minNSigma = -4.05f;
8490
float maxNSigma = 4.05f;
@@ -98,7 +104,7 @@ static const std::vector<std::string> allmainsptitles{"e^{#plus}", "e^{#minus}",
98104
static const std::vector<o2::track::PID::ID> mainspecies{o2::track::PID::Pion, o2::track::PID::Kaon, o2::track::PID::Proton};
99105
static const std::vector<std::string> mainspnames{"PionP", "PionM", "KaonP", "KaonM", "ProtonP", "ProtonM"};
100106
static const std::vector<std::string> mainsptitles{"#pi^{#plus}", "#pi^{#minus}", "K^{#plus}", "K^{#minus}", "p", "#bar{p}"};
101-
static const std::vector<int> pdgcodes = {11, 13, 211, 321, 2212};
107+
static const std::vector<int> pdgcodes = {kElectron, kMuonPlus, kPiPlus, kKPlus, kProton};
102108
} // namespace efficiencyandqatask
103109

104110
/* the QA data collecting engine */
@@ -120,9 +126,17 @@ struct QADataCollectingEngine {
120126
std::vector<std::shared_ptr<TH1>> fhPtB{2, nullptr};
121127
std::vector<std::shared_ptr<TH2>> fhPtVsEtaB{2, nullptr};
122128
std::vector<std::shared_ptr<TH2>> fhPtVsZvtxB{2, nullptr};
129+
std::shared_ptr<TH2> fhPhiVsPtPosB{nullptr};
130+
std::shared_ptr<TH2> fhPhiVsInnerWallMomPosB{nullptr};
131+
std::shared_ptr<TH2> fhPhiVsPtNegB{nullptr};
132+
std::shared_ptr<TH2> fhPhiVsInnerWallMomNegB{nullptr};
123133
std::vector<std::vector<std::shared_ptr<TH1>>> fhPtA{2, {nsp, nullptr}};
124134
std::vector<std::vector<std::shared_ptr<TH2>>> fhPtVsEtaA{2, {nsp, nullptr}};
125135
std::vector<std::vector<std::shared_ptr<TH2>>> fhPtVsZvtxA{2, {nsp, nullptr}};
136+
std::vector<std::shared_ptr<TH2>> fhPhiVsPtA{nsp, nullptr};
137+
std::vector<std::shared_ptr<TH2>> fhPhiVsInnerWallMomA{nsp, nullptr};
138+
std::vector<std::shared_ptr<TH2>> fhPhiShiftedVsPtA{nsp, nullptr};
139+
std::vector<std::shared_ptr<TH2>> fhPhiShiftedVsInnerWallMomA{nsp, nullptr};
126140
std::shared_ptr<TH2> fhPtVsEtaItsAcc{nullptr};
127141
std::shared_ptr<TH2> fhPtVsEtaTpcAcc{nullptr};
128142
std::shared_ptr<TH2> fhPtVsEtaItsTpcAcc{nullptr};
@@ -182,11 +196,15 @@ struct QADataCollectingEngine {
182196
using namespace efficiencyandqatask;
183197
using namespace analysis::dptdptfilter;
184198

199+
AxisSpec pidPtAxis{150, 0.1, 5.0, "#it{p}_{T} (GeV/#it{c})"};
185200
AxisSpec pidPAxis{150, 0.1, 5.0, "#it{p} (GeV/#it{c})"};
201+
pidPtAxis.makeLogarithmic();
186202
pidPAxis.makeLogarithmic();
187203
const AxisSpec ptAxis{ptbins, ptlow, ptup, "#it{p}_{T} (GeV/c)"};
188204
const AxisSpec etaAxis{etabins, etalow, etaup, "#eta"};
189-
const AxisSpec phiAxis{360, 0.0f, constants::math::TwoPI, "#varphi"};
205+
const AxisSpec phiAxis{360, 0.0f, constants::math::TwoPI, "#varphi (rad)"};
206+
const AxisSpec phiSectorAxis{144, 0.0f, 0.36, "#varphi (mod(2#pi/18) (rad))"};
207+
const AxisSpec phiShiftedSectorAxis{220, -55.0f, 55.0f, "% of the sector"};
190208
const AxisSpec zvtxAxis{zvtxbins, zvtxlow, zvtxup, "#it{z}_{vtx}"};
191209
const AxisSpec itsNClsAxis{8, -0.5, 7.5, "ITS n clusters"};
192210
const AxisSpec itsCh2Axis{100, 0, 40, "#Chi^{2}/Cls ITS"};
@@ -209,6 +227,10 @@ struct QADataCollectingEngine {
209227

210228
if constexpr (kindOfData == kReco) {
211229
/* only the reconstructed level histograms*/
230+
fhPhiVsPtPosB = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, "Reco", "Before"), "PhiVsPtPos", "#varphi (mod(2#pi/18))", kTH2F, {pidPtAxis, phiSectorAxis});
231+
fhPhiVsInnerWallMomPosB = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, "Reco", "Before"), "PhiVsIwMomPos", "#varphi (mod(2#pi/18)) TPC_{iw} #it{p}", kTH2F, {pidPAxis, phiSectorAxis});
232+
fhPhiVsPtNegB = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, "Reco", "Before"), "PhiVsPtNeg", "#varphi (mod(2#pi/18))", kTH2F, {pidPtAxis, phiSectorAxis});
233+
fhPhiVsInnerWallMomNegB = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, "Reco", "Before"), "PhiVsIwMomNeg", "#varphi (mod(2#pi/18)) TPC_{iw} #it{p}", kTH2F, {pidPAxis, phiSectorAxis});
212234
fhItsNClsVsPtB = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, "Reco", "Before"), "ITSNCls", "ITS clusters", kTH2F, {ptAxis, itsNClsAxis});
213235
fhItsChi2NClsVsPtB = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, "Reco", "Before"), "ITSChi2NCls", "ITS #Chi^{2}", kTH2F, {ptAxis, itsCh2Axis});
214236
fhTpcFindableNClsVsPtB = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, "Reco", "Before"), "TPCFindableNCls", "TPC findable clusters", kTH2F, {ptAxis, tpcNClsAxis});
@@ -227,6 +249,10 @@ struct QADataCollectingEngine {
227249
fhPtVsEtaTpcTofAcc = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, "Efficiency", "Reco"), "ptTpcTofAcc", "TPC&TOF tracks within the acceptance", kTH2F, {etaAxis, ptAxis});
228250
fhPtVsEtaItsTpcTofAcc = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, "Efficiency", "Reco"), "ptItsTpcTofAcc", "ITS&TPC&TOF tracks within the acceptance", kTH2F, {etaAxis, ptAxis});
229251
for (uint isp = 0; isp < nsp; ++isp) {
252+
fhPhiVsPtA[isp] = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, "Reco", "After"), HNAMESTRING("PhiVsPt_%s", tnames[isp].c_str()), HTITLESTRING("#varphi %s (mod(2#pi/18))", tnames[isp].c_str()), kTH2F, {pidPtAxis, phiSectorAxis});
253+
fhPhiVsInnerWallMomA[isp] = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, "Reco", "After"), HNAMESTRING("PhiVsIwMom_%s", tnames[isp].c_str()), HTITLESTRING("#varphi %s (mod(2#pi/18)) TPC_{iw} #it{p}", tnames[isp].c_str()), kTH2F, {pidPAxis, phiSectorAxis});
254+
fhPhiShiftedVsPtA[isp] = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, "Reco", "After"), HNAMESTRING("PhiShiftedVsPt_%s", tnames[isp].c_str()), HTITLESTRING("%s TPC sector %%", tnames[isp].c_str()), kTH2F, {pidPtAxis, phiShiftedSectorAxis});
255+
fhPhiShiftedVsInnerWallMomA[isp] = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, "Reco", "After"), HNAMESTRING("PhiShiftedVsIwMom_%s", tnames[isp].c_str()), HTITLESTRING("%s TPC sector %% TPC_{iw} #it{p}", tnames[isp].c_str()), kTH2F, {pidPAxis, phiShiftedSectorAxis});
230256
fhItsNClsVsPtA[isp] = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, "Reco", "After"), HNAMESTRING("ITSNCls_%s", tnames[isp].c_str()), HTITLESTRING("ITS clusters %s", tnames[isp].c_str()), kTH2F, {ptAxis, itsNClsAxis});
231257
fhItsChi2NClsVsPtA[isp] = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, "Reco", "After"), HNAMESTRING("ITSChi2NCls_%s", tnames[isp].c_str()), HTITLESTRING("ITS #Chi^{2} %s", tnames[isp].c_str()), kTH2F, {ptAxis, itsCh2Axis});
232258
fhTpcFindableNClsVsPtA[isp] = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, "Reco", "After"), HNAMESTRING("TPCFindableNCls_%s", tnames[isp].c_str()), HTITLESTRING("TPC findable clusters %s", tnames[isp].c_str()), kTH2F, {ptAxis, tpcNClsAxis});
@@ -338,6 +364,16 @@ struct QADataCollectingEngine {
338364
bool hastpc = track.hasTPC() && TrackSelectionFlags::checkFlag(track.trackCutFlag(), TrackSelectionTPC);
339365
bool hastof = track.hasTOF();
340366

367+
float phiInTpcSector = std::fmod(track.phi(), kTpcPhiSectorWidth);
368+
float phiShiftedPercentInTpcSector = phiInTpcSector * 100 / kTpcPhiSectorWidth;
369+
phiShiftedPercentInTpcSector = (phiShiftedPercentInTpcSector > 50.0f) ? (phiShiftedPercentInTpcSector - 100.0f) : phiShiftedPercentInTpcSector;
370+
if (track.sign() > 0) {
371+
fhPhiVsPtPosB->Fill(track.pt(), phiInTpcSector);
372+
fhPhiVsInnerWallMomPosB->Fill(track.tpcInnerParam(), phiInTpcSector);
373+
} else {
374+
fhPhiVsPtNegB->Fill(track.pt(), phiInTpcSector);
375+
fhPhiVsInnerWallMomNegB->Fill(track.tpcInnerParam(), phiInTpcSector);
376+
}
341377
fhItsNClsVsPtB->Fill(track.pt(), track.itsNCls());
342378
fhItsChi2NClsVsPtB->Fill(track.pt(), track.itsChi2NCl());
343379
fhTpcFindableNClsVsPtB->Fill(track.pt(), track.tpcNClsFindable());
@@ -357,6 +393,10 @@ struct QADataCollectingEngine {
357393
fillhisto(fhPtVsEtaItsTpcTofAcc, hasits && hastpc && hastof);
358394
}
359395
if (!(track.trackacceptedid() < 0)) {
396+
fhPhiVsPtA[track.trackacceptedid()]->Fill(track.pt(), phiInTpcSector);
397+
fhPhiVsInnerWallMomA[track.trackacceptedid()]->Fill(track.tpcInnerParam(), phiInTpcSector);
398+
fhPhiShiftedVsPtA[track.trackacceptedid()]->Fill(track.pt(), phiShiftedPercentInTpcSector);
399+
fhPhiShiftedVsInnerWallMomA[track.trackacceptedid()]->Fill(track.tpcInnerParam(), phiShiftedPercentInTpcSector);
360400
fhItsNClsVsPtA[track.trackacceptedid()]->Fill(track.pt(), track.itsNCls());
361401
fhItsChi2NClsVsPtA[track.trackacceptedid()]->Fill(track.pt(), track.itsChi2NCl());
362402
fhTpcFindableNClsVsPtA[track.trackacceptedid()]->Fill(track.pt(), track.tpcNClsFindable());

0 commit comments

Comments
 (0)