Skip to content

Commit 379bf06

Browse files
committed
Implement comments:
- Add configurable PID - Use phi() from LFStrangenessTable - Remove unnecessary dependencies in CMakeList.txt
1 parent 6071621 commit 379bf06

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

PWGLF/Tasks/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,5 @@ o2physics_add_dpl_workflow(v0postprocessing
158158

159159
o2physics_add_dpl_workflow(cascadecorrelations
160160
SOURCES cascadecorrelations.cxx
161-
PUBLIC_LINK_LIBRARIES O2::Framework O2::DetectorsBase O2Physics::AnalysisCore O2::DetectorsVertexing
161+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
162162
COMPONENT_NAME Analysis)

PWGLF/Tasks/cascadecorrelations.cxx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ struct cascadeSelector {
7575
},
7676
};
7777

78+
// Configurables
79+
Configurable<float> tpcNsigmaBachelor{"tpcNsigmaBachelor", 3, "TPC NSigma bachelor (>10 is no cut)"};
80+
Configurable<float> tpcNsigmaProton{"tpcNsigmaProton", 3, "TPC NSigma proton <- lambda (>10 is no cut)"};
81+
Configurable<float> tpcNsigmaPion{"tpcNsigmaPion", 3, "TPC NSigma pion <- lambda (>10 is no cut)"};
82+
7883
void process(soa::Join<aod::Collisions, aod::EvSels>::iterator const& collision, aod::CascDataExt const& Cascades, aod::V0sLinked const&, aod::V0Datas const&, FullTracksExtIUWithPID const&)
7984
{
8085
for (auto& casc : Cascades) {
@@ -95,37 +100,37 @@ struct cascadeSelector {
95100
// Lambda check
96101
if (casc.sign() < 0) {
97102
// Proton check:
98-
if (TMath::Abs(posTrack.tpcNSigmaPr()) > 3) {
103+
if (TMath::Abs(posTrack.tpcNSigmaPr()) > tpcNsigmaProton && tpcNsigmaProton < 9.99) {
99104
cascflags(0);
100105
continue;
101106
}
102107
// Pion check:
103-
if (TMath::Abs(negTrack.tpcNSigmaPi()) > 3) {
108+
if (TMath::Abs(negTrack.tpcNSigmaPi()) > tpcNsigmaPion && tpcNsigmaPion < 9.99) {
104109
cascflags(0);
105110
continue;
106111
}
107112
} else {
108113
// Proton check:
109-
if (TMath::Abs(negTrack.tpcNSigmaPr()) > 3) {
114+
if (TMath::Abs(negTrack.tpcNSigmaPr()) > tpcNsigmaProton && tpcNsigmaProton < 9.99) {
110115
cascflags(0);
111116
continue;
112117
}
113118
// Pion check:
114-
if (TMath::Abs(posTrack.tpcNSigmaPi()) > 3) {
119+
if (TMath::Abs(posTrack.tpcNSigmaPi()) > tpcNsigmaPion && tpcNsigmaPion < 9.99) {
115120
cascflags(0);
116121
continue;
117122
}
118123
}
119124
// Bachelor check
120-
if (TMath::Abs(bachTrack.tpcNSigmaPi()) < 3) {
121-
if (TMath::Abs(bachTrack.tpcNSigmaKa()) < 3) {
125+
if (TMath::Abs(bachTrack.tpcNSigmaPi()) < tpcNsigmaBachelor || tpcNsigmaBachelor >= 10) {
126+
if (TMath::Abs(bachTrack.tpcNSigmaKa()) < tpcNsigmaBachelor || tpcNsigmaBachelor >= 10) {
122127
// TODO: ambiguous! ignore for now
123128
cascflags(0);
124129
continue;
125130
}
126131
cascflags(1);
127132
continue;
128-
} else if (TMath::Abs(bachTrack.tpcNSigmaKa()) < 3) {
133+
} else if (TMath::Abs(bachTrack.tpcNSigmaKa()) < tpcNsigmaBachelor || tpcNsigmaBachelor >=10) {
129134
cascflags(2);
130135
continue;
131136
}
@@ -160,7 +165,6 @@ struct cascadeCorrelations {
160165
if (!(v0.has_v0Data())) {
161166
continue; // reject if no v0data
162167
}
163-
auto v0data = v0.v0Data();
164168

165169
if (casc.sign() < 0) { // FIXME: could be done better...
166170
registry.fill(HIST("hMassXiMinus"), casc.mXi());
@@ -170,7 +174,7 @@ struct cascadeCorrelations {
170174
registry.fill(HIST("hMassOmegaPlus"), casc.mOmega());
171175
}
172176

173-
registry.fill(HIST("hPhi"), RecoDecay::phi(casc.px(), casc.py()));
177+
registry.fill(HIST("hPhi"), casc.phi());
174178
} // casc loop
175179

176180
for (auto& [c0, c1] : combinations(Cascades, Cascades)) { // combinations automatically applies strictly upper in case of 2 identical tables
@@ -182,9 +186,7 @@ struct cascadeCorrelations {
182186
auto v0data0 = lambda0.v0Data();
183187
auto v0data1 = lambda1.v0Data();
184188

185-
double phi0 = RecoDecay::phi(c0.px(), c0.py());
186-
double phi1 = RecoDecay::phi(c1.px(), c1.py());
187-
double dphi = std::fmod(phi0 - phi1 + 2.5 * PI, 2 * PI) - 0.5 * PI;
189+
double dphi = std::fmod(c0.phi() - c1.phi() + 2.5 * PI, 2 * PI) - 0.5 * PI;
188190
if (c0.sign() * c1.sign() < 0) { // opposite-sign
189191
registry.fill(HIST("hDeltaPhiOS"), dphi);
190192
} else { // same-sign

0 commit comments

Comments
 (0)