Skip to content

Commit 9b32251

Browse files
committed
adding ITS PID
1 parent 9b9a7ab commit 9b32251

1 file changed

Lines changed: 29 additions & 2 deletions

File tree

‎PWGLF/Tasks/Resonances/cha01710analysis.cxx‎

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "Common/CCDB/EventSelectionParams.h"
2020
#include "Common/DataModel/Centrality.h"
2121
#include "Common/DataModel/EventSelection.h"
22+
#include "Common/DataModel/PIDResponseITS.h"
2223
#include "Common/DataModel/PIDResponseTOF.h"
2324
#include "Common/DataModel/PIDResponseTPC.h"
2425
#include "Common/DataModel/Qvectors.h"
@@ -37,6 +38,7 @@
3738
#include <Framework/Logger.h>
3839
#include <Framework/OutputObjHeader.h>
3940
#include <Framework/runDataProcessing.h>
41+
#include <ReconstructionDataFormats/PID.h>
4042

4143
#include <Math/Vector4D.h> // IWYU pragma: keep (do not replace with Math/Vector4Dfwd.h)
4244
#include <Math/Vector4Dfwd.h>
@@ -70,6 +72,8 @@ struct Cha01710analysis {
7072

7173
Service<o2::ccdb::BasicCCDBManager> ccdb{};
7274

75+
o2::aod::ITSResponse itsResponse;
76+
7377
Configurable<std::string> cfgUrl{"cfgUrl", "http://alice-ccdb.cern.ch", "CCDB URL"};
7478

7579
struct : ConfigurableGroup {
@@ -110,6 +114,8 @@ struct Cha01710analysis {
110114
Configurable<float> cfgDcaZMax{"cfgDcaZMax", 2.f, "maximum |DCAz| (cm)"};
111115
Configurable<float> cfgTPCNSigmaMax{"cfgTPCNSigmaMax", 3.f, "maximum |TPC nSigma(K)| without TOF"};
112116
Configurable<float> cfgCombinedNSigmaMax{"cfgCombinedNSigmaMax", 3.f, "maximum combined TPC-TOF nSigma(K)"};
117+
Configurable<bool> cfgPIDITSFlag{"cfgPIDITSFlag", true, "PID ITS flag"};
118+
Configurable<float> cfgPIDMaxITSnSigmaKaon{"cfgPIDMaxITSnSigmaKaon", 3.0, "ITS nSigma selection"};
113119
} kaonCuts;
114120

115121
struct : ConfigurableGroup {
@@ -193,6 +199,8 @@ struct Cha01710analysis {
193199
histos.add("Kaon/hTOFNSigma", "charged kaon TOF PID", HistType::kTH2F, {cfgAxisPt, {120, -6., 6.}});
194200
histos.add("Kaon/hTPCNSigmaSelected", "charged kaon TPC PID", HistType::kTH2F, {cfgAxisPt, {120, -6., 6.}});
195201
histos.add("Kaon/hTOFNSigmaSelected", "charged kaon TOF PID", HistType::kTH2F, {cfgAxisPt, {120, -6., 6.}});
202+
histos.add("Kaon/hITSNSigma", "charged kaon ITS PID", HistType::kTH2F, {cfgAxisPt, {120, -6., 6.}});
203+
histos.add("Kaon/hITSNSigmaSelected", "charged kaon ITS PID", HistType::kTH2F, {cfgAxisPt, {120, -6., 6.}});
196204

197205
histos.add("Pair/hSignalPlus", "K0S K+ same-event versus EP", HistType::kTHnSparseF, {cfgAxisMass, cfgAxisPt, cfgAxisCent, cfgAxisEP});
198206
histos.add("Pair/hSignalMinus", "K0S K- same-event versus EP", HistType::kTHnSparseF, {cfgAxisMass, cfgAxisPt, cfgAxisCent, cfgAxisEP});
@@ -263,9 +271,28 @@ struct Cha01710analysis {
263271
histos.fill(HIST("Kaon/hTPCNSigma"), track.pt(), track.tpcNSigmaKa());
264272
if (track.hasTOF()) {
265273
histos.fill(HIST("Kaon/hTOFNSigma"), track.pt(), track.tofNSigmaKa());
266-
return std::hypot(track.tpcNSigmaKa(), track.tofNSigmaKa()) < kaonCuts.cfgCombinedNSigmaMax;
267274
}
268-
return std::abs(track.tpcNSigmaKa()) < kaonCuts.cfgTPCNSigmaMax;
275+
histos.fill(HIST("Kaon/hITSNSigma"), track.pt(), itsResponse.nSigmaITS<o2::track::PID::Kaon>(track));
276+
277+
Configurable<bool> cfgPIDITSFlag{"cfgPIDITSFlag", true, "PID ITS flag"};
278+
Configurable<float> cfgPIDMaxITSnSigmaKaon{"cfgPIDMaxITSnSigmaKaon", 3.0, "ITS nSigma selection"};
279+
280+
if (track.hasTOF()) {
281+
if (std::hypot(track.tpcNSigmaKa(), track.tofNSigmaKa()) > kaonCuts.cfgCombinedNSigmaMax) {
282+
return false;
283+
}
284+
if (kaonCuts.cfgPIDITSFlag && std::abs(itsResponse.nSigmaITS<o2::track::PID::Kaon>(track)) > kaonCuts.cfgPIDMaxITSnSigmaKaon) {
285+
return false;
286+
}
287+
return true;
288+
}
289+
if (std::abs(track.tpcNSigmaKa()) > kaonCuts.cfgTPCNSigmaMax) {
290+
return false;
291+
}
292+
if (kaonCuts.cfgPIDITSFlag && std::abs(itsResponse.nSigmaITS<o2::track::PID::Kaon>(track)) > kaonCuts.cfgPIDMaxITSnSigmaKaon) {
293+
return false;
294+
}
295+
return true;
269296
}
270297

271298
template <typename T>

0 commit comments

Comments
 (0)