Skip to content

Commit a79af05

Browse files
authored
Inclusion of CPR in Track-Track task, update of DetaDphiStar task (#179)
1 parent 5ce9831 commit a79af05

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

PWGCF/FemtoDream/FemtoDreamDetaDphiStar.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ class FemtoDreamDetaDphiStar
8282
auto dphiAvg = AveragePhiStar(part1, part2, 0);
8383
histdetadpi[0][0]->Fill(deta, dphiAvg);
8484
if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
85-
return false;
85+
return true;
8686
} else {
8787
histdetadpi[0][1]->Fill(deta, dphiAvg);
88-
return true;
88+
return false;
8989
}
9090

9191
} else if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kV0) {
@@ -103,7 +103,7 @@ class FemtoDreamDetaDphiStar
103103
auto dphiAvg = AveragePhiStar(part1, *daughter, i);
104104
histdetadpi[i][0]->Fill(deta, dphiAvg);
105105
if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
106-
pass = false;
106+
pass = true;
107107
} else {
108108
histdetadpi[i][1]->Fill(deta, dphiAvg);
109109
}

PWGCF/FemtoDream/femtoDreamPairTaskTrackTrack.cxx

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "FemtoDreamParticleHisto.h"
1818
#include "FemtoDreamPairCleaner.h"
1919
#include "FemtoDreamContainer.h"
20+
#include "FemtoDreamDetaDphiStar.h"
2021
#include "Framework/AnalysisTask.h"
2122
#include "Framework/runDataProcessing.h"
2223
#include "Framework/HistogramRegistry.h"
@@ -34,8 +35,8 @@ static constexpr int nCuts = 5;
3435
static const std::vector<std::string> partNames{"PartOne", "PartTwo"};
3536
static const std::vector<std::string> cutNames{"MinPt", "MaxPt", "MaxEta", "MaxDCAxy", "PIDthr"};
3637
static const float cutsTable[nPart][nCuts]{
37-
{0.4f, 4.05f, 0.4f, 0.1f, 0.75f},
38-
{0.4f, 4.05f, 0.4f, 0.1f, 0.75f}};
38+
{0.5f, 4.05f, 0.8f, 0.1f, 0.75f},
39+
{0.5f, 4.05f, 0.8f, 0.1f, 0.75f}};
3940
} // namespace
4041

4142
struct femtoDreamPairTaskTrackTrack {
@@ -50,7 +51,7 @@ struct femtoDreamPairTaskTrackTrack {
5051

5152
/// Particle 1
5253
Configurable<int> ConfPDGCodePartOne{"ConfPDGCodePartOne", 2212, "Particle 1 - PDG code"};
53-
Configurable<aod::femtodreamparticle::cutContainerType> ConfCutPartOne{"ConfCutPartOne", 693386, "Particle 1 - Selection bit"};
54+
Configurable<aod::femtodreamparticle::cutContainerType> ConfCutPartOne{"ConfCutPartOne", 693318, "Particle 1 - Selection bit"};
5455
Configurable<std::vector<int>> ConfTPCPIDPartOne{"ConfTPCPIDPartOne", std::vector<int>{13}, "Particle 1 - TPC PID bits"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector<std::pair<int, int>>
5556
Configurable<std::vector<int>> ConfCombPIDPartOne{"ConfCombPIDPartOne", std::vector<int>{12}, "Particle 1 - Combined PID bits"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector<std::pair<int, int>>
5657

@@ -68,7 +69,7 @@ struct femtoDreamPairTaskTrackTrack {
6869
/// Particle 2
6970
Configurable<bool> ConfIsSame{"ConfIsSame", false, "Pairs of the same particle"};
7071
Configurable<int> ConfPDGCodePartTwo{"ConfPDGCodePartTwo", 2212, "Particle 2 - PDG code"};
71-
Configurable<aod::femtodreamparticle::cutContainerType> ConfCutPartTwo{"ConfCutPartTwo", 693386, "Particle 2 - Selection bit"};
72+
Configurable<aod::femtodreamparticle::cutContainerType> ConfCutPartTwo{"ConfCutPartTwo", 693318, "Particle 2 - Selection bit"};
7273
Configurable<std::vector<int>> ConfTPCPIDPartTwo{"ConfTPCPIDPartTwo", std::vector<int>{13}, "Particle 2 - TPC PID bits"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector<std::pair<int, int>>
7374
Configurable<std::vector<int>> ConfCombPIDPartTwo{"ConfCombPIDPartTwo", std::vector<int>{12}, "Particle 2 - Combined PID bits"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector<std::pair<int, int>>
7475

@@ -92,11 +93,13 @@ struct femtoDreamPairTaskTrackTrack {
9293
ConfigurableAxis CfgkTBins{"CfgkTBins", {70, 0., 7.}, "binning kT"};
9394
ConfigurableAxis CfgmTBins{"CfgmTBins", {70, 0., 7.}, "binning mT"};
9495
Configurable<int> ConfNEventsMix{"ConfNEventsMix", 5, "Number of events for mixing"};
96+
Configurable<bool> ConfIsCPR{"ConfIsCPR", true, "Close Pair Rejection"};
97+
Configurable<float> ConfBField{"ConfBField", +0.5, "Magnetic Field"};
9598

9699
FemtoDreamContainer<femtoDreamContainer::EventType::same, femtoDreamContainer::Observable::kstar> sameEventCont;
97100
FemtoDreamContainer<femtoDreamContainer::EventType::mixed, femtoDreamContainer::Observable::kstar> mixedEventCont;
98101
FemtoDreamPairCleaner<aod::femtodreamparticle::ParticleType::kTrack, aod::femtodreamparticle::ParticleType::kTrack> pairCleaner;
99-
102+
FemtoDreamDetaDphiStar<aod::femtodreamparticle::ParticleType::kTrack, aod::femtodreamparticle::ParticleType::kTrack> pairCloseRejection;
100103
/// Histogram output
101104
HistogramRegistry qaRegistry{"TrackQA", {}, OutputObjHandlingPolicy::AnalysisObject};
102105
HistogramRegistry resultRegistry{"Correlations", {}, OutputObjHandlingPolicy::AnalysisObject};
@@ -113,6 +116,9 @@ struct femtoDreamPairTaskTrackTrack {
113116
mixedEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins);
114117
mixedEventCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo);
115118
pairCleaner.init(&qaRegistry);
119+
if (ConfIsCPR) {
120+
pairCloseRejection.init(&resultRegistry, &qaRegistry, 0.01, 0.01, ConfBField, false); /// \todo add config for Δη and ΔΦ cut values
121+
}
116122

117123
vecTPCPIDPartOne = ConfTPCPIDPartOne;
118124
vecTPCPIDPartTwo = ConfTPCPIDPartTwo;
@@ -184,6 +190,13 @@ struct femtoDreamPairTaskTrackTrack {
184190
continue;
185191
}
186192

193+
///close pair rejection
194+
if (ConfIsCPR) {
195+
if (pairCloseRejection.isClosePair(p1, p2, parts)) {
196+
continue;
197+
}
198+
}
199+
187200
// track cleaning
188201
if (!pairCleaner.isCleanPair(p1, p2, parts)) {
189202
continue;
@@ -248,6 +261,11 @@ struct femtoDreamPairTaskTrackTrack {
248261
if (!isFullPIDSelected(p1.pidcut(), p1.p(), cfgCutTable->get("PartOne", "PIDthr"), vecTPCPIDPartOne, vecCombPIDPartOne) || !isFullPIDSelected(p2.pidcut(), p2.p(), cfgCutTable->get("PartTwo", "PIDthr"), vecTPCPIDPartTwo, vecCombPIDPartTwo)) {
249262
continue;
250263
}
264+
if (ConfIsCPR) {
265+
if (pairCloseRejection.isClosePair(p1, p2, parts)) {
266+
continue;
267+
}
268+
}
251269
mixedEventCont.setPair(p1, p2, collision1.multV0M()); // < \todo dirty trick, the multiplicity will be of course within the bin width used for the hashes
252270
}
253271
}

0 commit comments

Comments
 (0)