Skip to content

Commit aafd6bb

Browse files
committed
[PWGUD] MC macro for inclusive measurements
1 parent 38e881f commit aafd6bb

File tree

2 files changed

+392
-0
lines changed

2 files changed

+392
-0
lines changed

PWGUD/Tasks/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,3 +248,8 @@ o2physics_add_dpl_workflow(flow-correlations-upc
248248
SOURCES flowCorrelationsUpc.cxx
249249
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::PWGCFCore
250250
COMPONENT_NAME Analysis)
251+
252+
o2physics_add_dpl_workflow(process-mc-dpmjet-sg-v3
253+
SOURCES ProcessMCDPMJetSGv3.cxx
254+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
255+
COMPONENT_NAME Analysis)
Lines changed: 387 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,387 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
///
12+
/// \brief This task is an empty skeleton that fills a simple eta histogram.
13+
/// it is meant to be a blank page for further developments.
14+
/// \author everyone
15+
16+
#include "Framework/runDataProcessing.h"
17+
#include "Framework/AnalysisTask.h"
18+
#include "Common/DataModel/TrackSelectionTables.h"
19+
#include "Framework/ASoAHelpers.h"
20+
#include "TDatabasePDG.h"
21+
#include "PWGUD/Core/UPCHelpers.h"
22+
#include "PWGUD/DataModel/UDTables.h"
23+
#include "TLorentzVector.h"
24+
#include "TVector3.h"
25+
#include "TMath.h"
26+
27+
using namespace o2;
28+
using namespace o2::framework;
29+
using namespace o2::framework::expressions;
30+
31+
struct ProcessMCDPMJetSGv3 {
32+
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
33+
TDatabasePDG* fPDG = TDatabasePDG::Instance();
34+
35+
Configurable<int> nBinsPt{"nBinsPt", 100, "N bins in pT histo"};
36+
37+
// using myCompleteTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels>;
38+
// using myFilteredTracks = soa::Filtered<myCompleteTracks>;
39+
using BCs = soa::Join<aod::BCsWithTimestamps, aod::BcSels, aod::Run3MatchedToBCSparse>;
40+
41+
Preslice<aod::Tracks> perCollision = aod::track::collisionId;
42+
Preslice<o2::aod::McParticles> perMcCollision = o2::aod::mcparticle::mcCollisionId;
43+
// using MCTCs = soa::Join<aod::Tracks, aod::TracksExtra, /*aod::TracksCov,*/ aod::TracksDCA, aod::TrackSelection,
44+
// aod::McTrackLabels,
45+
// aod::pidTPCFullEl, aod::pidTPCFullMu, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr,
46+
// aod::TOFSignal, aod::pidTOFFullEl, aod::pidTOFFullMu, aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr>;
47+
// using MCTC = MCTCs::iterator;
48+
// define abbreviations
49+
using CCs = soa::Join<aod::UDCollisions, aod::UDCollisionsSels, aod::UDMcCollsLabels>;
50+
using CC = CCs::iterator;
51+
using MCparticles = aod::UDMcParticles::iterator;
52+
using TCs = soa::Join<aod::UDTracks, aod::UDTracksPID, aod::UDTracksExtra, aod::UDTracksFlags, aod::UDTracksDCA, aod::UDMcTrackLabels>;
53+
// using TCs = soa::Join<aod::UDTracks, aod::UDTracksExtra, aod::UDTracksFlags, aod::UDTracksPID, aod::UDMcTrackLabels>;
54+
using TC = TCs::iterator;
55+
56+
double massPion = 0.;
57+
double massKaon = 0.;
58+
double massProton = 0.;
59+
60+
void init(InitContext const&)
61+
{
62+
TParticlePDG* pionPDG = fPDG->GetParticle(211);
63+
if (pionPDG != nullptr) {
64+
massPion = pionPDG->Mass();
65+
}
66+
TParticlePDG* kaonPDG = fPDG->GetParticle(321);
67+
if (kaonPDG != nullptr) {
68+
massKaon = kaonPDG->Mass();
69+
}
70+
TParticlePDG* protonPDG = fPDG->GetParticle(2212);
71+
if (protonPDG != nullptr) {
72+
massProton = protonPDG->Mass();
73+
}
74+
75+
// define axes you want to use
76+
const AxisSpec axisCounter{10, 0, 10, ""};
77+
const AxisSpec axisEta{100, -1.5, +1.5, "#eta"};
78+
const AxisSpec axisPt{5000, 0, 5, "p_{T}"};
79+
const AxisSpec axisPtSmall{1000, 0, 1, "p_{T}"};
80+
const AxisSpec axisMass{nBinsPt, 0, 5, "m_{#pi#pi}"};
81+
const AxisSpec axisMassSmall{nBinsPt, 0, 2, "m_{#pi#pi}"};
82+
const AxisSpec axisDeltaPt{100, -1.0, +1.0, "#Delta(p_{T})"};
83+
const AxisSpec axisBC{1000, -10000.0, +10000.0, "BCs"};
84+
const AxisSpec axisBCext{100000, -10000000.0, +10000000.0, "BCs"};
85+
const AxisSpec axisCosTheta{100, -1.0, +1.0, "cos#theta"};
86+
const AxisSpec axisPhi{600, -TMath::Pi(), -TMath::Pi(), "#varphi"};
87+
88+
// create histograms
89+
histos.add("hdEdx", "p vs dE/dx Signal", kTH2F, {{100, 0.0, 3.0}, {1000, 0.0, 2000.0}});
90+
histos.add("hSigmaPion", "p vs dE/dx sigma pion TPC ", kTH2F, {{300, 0.0, 3.0}, {200, -10.0, 10.0}});
91+
histos.add("hSigmaPionTruth", "p vs dE/dx sigma pion TPC truth", kTH2F, {{300, 0.0, 3.0}, {200, -10.0, 10.0}});
92+
histos.add("hSigmaPionTOF", "p vs dE/dx sigma pion TOF ", kTH2F, {{300, 0.0, 3.0}, {200, -10.0, 10.0}});
93+
histos.add("hSigmaPionTruthTOF", "p vs dE/dx sigma pion TOF truth", kTH2F, {{300, 0.0, 3.0}, {200, -10.0, 10.0}});
94+
histos.add("hSigmaKaon", "p vs dE/dx sigma kaon TPC ", kTH2F, {{300, 0.0, 3.0}, {200, -10.0, 10.0}});
95+
histos.add("hSigmaKaonTruth", "p vs dE/dx sigma kaon TPC truth", kTH2F, {{300, 0.0, 3.0}, {200, -10.0, 10.0}});
96+
histos.add("hSigmaKaonTOF", "p vs dE/dx sigma kaon TOF ", kTH2F, {{300, 0.0, 3.0}, {200, -10.0, 10.0}});
97+
histos.add("hSigmaKaonTruthTOF", "p vs dE/dx sigma kaon TOF truth", kTH2F, {{300, 0.0, 3.0}, {200, -10.0, 10.0}});
98+
histos.add("hSigmaProton", "p vs dE/dx sigma proton TPC ", kTH2F, {{300, 0.0, 3.0}, {200, -10.0, 10.0}});
99+
histos.add("hSigmaProtonTruth", "p vs dE/dx sigma proton TPC truth", kTH2F, {{300, 0.0, 3.0}, {200, -10.0, 10.0}});
100+
histos.add("hSigmaProtonTOF", "p vs dE/dx sigma proton TOF ", kTH2F, {{300, 0.0, 3.0}, {200, -10.0, 10.0}});
101+
histos.add("hSigmaProtonTruthTOF", "p vs dE/dx sigma proton TOF truth", kTH2F, {{300, 0.0, 3.0}, {200, -10.0, 10.0}});
102+
103+
histos.add("hVisibleMultiVsGeneratedMulti", "Multiplicity correlation", kTH2F, {{10000, -0.5, 9999.5}, {1000, -0.5, 999.5}});
104+
105+
histos.add("eventCounter", "eventCounter", kTH1F, {axisCounter});
106+
histos.add("ptResolution", "ptResolution", kTH2F, {axisPt, axisDeltaPt});
107+
108+
histos.add("ptGeneratedPion", "ptGeneratedPion", kTH1F, {axisPt});
109+
histos.add("ptGeneratedKaon", "ptGeneratedKaon", kTH1F, {axisPt});
110+
histos.add("ptGeneratedProton", "ptGeneratedProton", kTH1F, {axisPt});
111+
histos.add("ptGeneratedPionAxE", "ptGeneratedPionAxE", kTH1F, {axisPt});
112+
histos.add("ptGeneratedKaonAxE", "ptGeneratedKaonAxE", kTH1F, {axisPt});
113+
histos.add("ptGeneratedProtonAxE", "ptGeneratedProtonAxE", kTH1F, {axisPt});
114+
histos.add("ptGeneratedProtonAxEPos", "ptGeneratedProtonAxEPos", kTH1F, {axisPt});
115+
histos.add("ptGeneratedProtonAxENeg", "ptGeneratedProtonAxENeg", kTH1F, {axisPt});
116+
histos.add("ptReconstructedPion", "ptReconstructedPion", kTH1F, {axisPt});
117+
histos.add("ptReconstructedKaon", "ptReconstructedKaon", kTH1F, {axisPt});
118+
histos.add("ptReconstructedProton", "ptReconstructedProton", kTH1F, {axisPt});
119+
histos.add("ptReconstructedProtonPos", "ptReconstructedProtonPos", kTH1F, {axisPt});
120+
histos.add("ptReconstructedProtonNeg", "ptReconstructedProtonNeg", kTH1F, {axisPt});
121+
histos.add("ptReconstructedPionTOF", "ptReconstructedPionTOF", kTH1F, {axisPt});
122+
histos.add("ptReconstructedKaonTOF", "ptReconstructedKaonTOF", kTH1F, {axisPt});
123+
histos.add("ptReconstructedProtonTOF", "ptReconstructedProtonTOF", kTH1F, {axisPt});
124+
125+
histos.add("allreconstructedPFPion", "allreconstructedPFPion", kTH1F, {axisPt});
126+
histos.add("allreconstructedPFKaon", "allreconstructedPFKaon", kTH1F, {axisPt});
127+
histos.add("allreconstructedPFProton", "allreconstructedPFProton", kTH1F, {axisPt});
128+
histos.add("allreconstructedPFProtonPos", "allreconstructedPFProtonPos", kTH1F, {axisPt});
129+
histos.add("allreconstructedPFProtonNeg", "allreconstructedPFProtonNeg", kTH1F, {axisPt});
130+
histos.add("allreconstructedPFPionTOF", "allreconstructedPFPionTOF", kTH1F, {axisPt});
131+
histos.add("allreconstructedPFKaonTOF", "allreconstructedPFKaonTOF", kTH1F, {axisPt});
132+
histos.add("allreconstructedPFProtonTOF", "allreconstructedPFProtonTOF", kTH1F, {axisPt});
133+
134+
histos.add("numberOfRecoCollisions", "numberOfRecoCollisions", kTH1F, {{100, -0.5f, 99.5f}});
135+
histos.add("numberOfTracksMC", "numberOfTracksMC", kTH1F, {{100, -0.5f, 99.5f}});
136+
histos.add("numberOfTracksReco", "numberOfTracksReco", kTH1F, {{100, -0.5f, 99.5f}});
137+
138+
histos.add("bcResolution", "bcResolution", kTH1F, {axisBC});
139+
histos.add("mcbcHistogram", "mcbcHistogram", kTH1F, {axisBCext});
140+
histos.add("bcHistogram", "bcHistogram", kTH1F, {axisBCext});
141+
histos.add("mcbcModuloOrbitHistogram", "mcbcModuloOrbitHistogram", kTH1F, {axisBC});
142+
histos.add("bcModuloOrbitHistogram", "bcModuloOrbitHistogram", kTH1F, {axisBC});
143+
}
144+
//-----------------------------------------------------------------------------------------------------------------------
145+
void processSim(aod::UDMcCollision const& mcCollision, aod::UDMcParticles const& mcParticles)
146+
{
147+
histos.fill(HIST("eventCounter"), 0.5);
148+
149+
// auto massPion = 0.;
150+
// TParticlePDG pionPDG = fPDG->GetParticle(211);
151+
// massPion = pionPDG.Mass();
152+
// auto massKaon = 0.;
153+
// TParticlePDG kaonPDG = fPDG->GetParticle(321);
154+
// massKaon = kaonPDG.Mass();
155+
// auto massProton = 0.;
156+
// TParticlePDG protonPDG = fPDG->GetParticle(2212);
157+
// massProton = protonPDG.Mass();
158+
histos.fill(HIST("numberOfTracksMC"), mcParticles.size());
159+
// LOGF(info, "New event! mcParticles.size() = %d", mcParticles.size());
160+
161+
int counterMC = 0;
162+
int counter = 0;
163+
for (const auto& mcParticle : mcParticles) {
164+
if (!mcParticle.isPhysicalPrimary())
165+
continue;
166+
counterMC += 1;
167+
// if(mcParticle.isPhysicalPrimary()) counterMC += 1;
168+
TLorentzVector protoMC;
169+
protoMC.SetXYZM(mcParticle.px(), mcParticle.py(), mcParticle.pz(), massPion);
170+
if (fabs(protoMC.Eta()) < 0.8 && protoMC.Pt() > 0.1) {
171+
counter += 1;
172+
}
173+
if (!mcParticle.isPhysicalPrimary())
174+
continue;
175+
// if(mcParticle.isPhysicalPrimary() && fabs(mcParticle.eta())<0.9){ // do this in the context of the MC loop ! (context matters!!!)
176+
TLorentzVector pMC;
177+
if (abs(mcParticle.pdgCode()) == 211) {
178+
// histos.fill(HIST("ptGeneratedPion"), mcParticle.pt());
179+
pMC.SetXYZM(mcParticle.px(), mcParticle.py(), mcParticle.pz(), massPion);
180+
histos.fill(HIST("ptGeneratedPion"), pMC.Pt());
181+
}
182+
if (abs(mcParticle.pdgCode()) == 321) {
183+
// histos.fill(HIST("ptGenerateKaon"), mcParticle.pt());
184+
pMC.SetXYZM(mcParticle.px(), mcParticle.py(), mcParticle.pz(), massKaon);
185+
histos.fill(HIST("ptGeneratedKaon"), pMC.Pt());
186+
}
187+
if (abs(mcParticle.pdgCode()) == 2212) {
188+
// histos.fill(HIST("ptGeneratedProton"), mcParticle.pt());
189+
pMC.SetXYZM(mcParticle.px(), mcParticle.py(), mcParticle.pz(), massProton);
190+
histos.fill(HIST("ptGeneratedProton"), pMC.Pt());
191+
}
192+
if (abs(pMC.Rapidity()) < 0.8) {
193+
if (abs(mcParticle.pdgCode()) == 211)
194+
histos.fill(HIST("ptGeneratedPionAxE"), pMC.Pt());
195+
if (abs(mcParticle.pdgCode()) == 321)
196+
histos.fill(HIST("ptGeneratedKaonAxE"), pMC.Pt());
197+
if (abs(mcParticle.pdgCode()) == 2212)
198+
histos.fill(HIST("ptGeneratedProtonAxE"), pMC.Pt());
199+
if (mcParticle.pdgCode() == 2212) {
200+
histos.fill(HIST("ptGeneratedProtonAxEPos"), pMC.Pt());
201+
} else {
202+
histos.fill(HIST("ptGeneratedProtonAxENeg"), pMC.Pt());
203+
}
204+
}
205+
}
206+
histos.fill(HIST("hVisibleMultiVsGeneratedMulti"), counterMC, counter);
207+
}
208+
PROCESS_SWITCH(ProcessMCDPMJetSGv3, processSim, "processSim", true);
209+
210+
void processReco(CC const& collision,
211+
TCs const& tracks,
212+
// aod::UDMcCollisions const& /*mccollisions*/,
213+
aod::UDMcParticles const& mcParticles)
214+
{
215+
histos.fill(HIST("numberOfRecoCollisions"), 2.); // number of times coll was reco-ed
216+
Partition<TCs> PVContributors = aod::udtrack::isPVContributor == true;
217+
PVContributors.bindTable(tracks);
218+
219+
// auto massPion = 0.;
220+
// TParticlePDG pionPDG = fPDG->GetParticle(211);
221+
// massPion = pionPDG.Mass();
222+
// auto massKaon = 0.;
223+
// TParticlePDG kaonPDG = fPDG->GetParticle(321);
224+
// massKaon = kaonPDG.Mass();
225+
// auto massProton = 0.;
226+
// TParticlePDG protonPDG = fPDG->GetParticle(2212);
227+
// massProton = protonPDG.Mass();
228+
229+
histos.fill(HIST("numberOfTracksReco"), tracks.size());
230+
231+
int counter = 0;
232+
for (auto& track : tracks) {
233+
if (track.isPVContributor()) {
234+
int NFindable = track.tpcNClsFindable();
235+
if (NFindable < 70) {
236+
continue;
237+
}
238+
// int NMinusFound = track.tpcNClsFindableMinusFound();
239+
// int NCluster = NFindable - NMinusFound;
240+
// if (NCluster < 70) {
241+
// continue;
242+
// }
243+
if (track.pt() < 0.1) {
244+
continue;
245+
}
246+
// if (!(std::abs(track.dcaZ()) < 2.)) {
247+
// continue;
248+
// }
249+
double dcaLimit = 0.0105 + 0.035 / pow(track.pt(), 1.1);
250+
// if (!(std::abs(track.dcaXY()) < dcaLimit)) {
251+
// continue;
252+
// }
253+
254+
double momentum = TMath::Sqrt(track.px() * track.px() + track.py() * track.py() + track.pz() * track.pz());
255+
double dEdx = track.tpcSignal();
256+
histos.fill(HIST("hdEdx"), momentum, dEdx);
257+
258+
TLorentzVector pion;
259+
pion.SetXYZM(track.px(), track.py(), track.pz(), o2::constants::physics::MassPionCharged);
260+
TLorentzVector kaon;
261+
kaon.SetXYZM(track.px(), track.py(), track.pz(), o2::constants::physics::MassKaonCharged);
262+
TLorentzVector proton;
263+
proton.SetXYZM(track.px(), track.py(), track.pz(), o2::constants::physics::MassProton);
264+
auto nSigmaPi = -999.;
265+
auto nSigmaKa = -999.;
266+
auto nSigmaPr = -999.;
267+
auto nSigmaPiTOF = -999.;
268+
auto nSigmaKaTOF = -999.;
269+
auto nSigmaPrTOF = -999.;
270+
// This section makes templates
271+
if (track.hasTPC()) {
272+
nSigmaPi = track.tpcNSigmaPi();
273+
nSigmaKa = track.tpcNSigmaKa();
274+
nSigmaPr = track.tpcNSigmaPr();
275+
if (abs(nSigmaPi) < 3. && abs(pion.Rapidity()) < 0.8) {
276+
histos.fill(HIST("hSigmaPion"), track.pt(), nSigmaPi);
277+
if (track.has_udMcParticle()) {
278+
auto mcParticle = track.udMcParticle();
279+
// if(abs(mcParticle.pdgCode())==211 && mcParticle.isPhysicalPrimary()) howManyPionsHavePionMCandPrimaries += 1;
280+
if (abs(mcParticle.pdgCode()) == 211) {
281+
histos.fill(HIST("hSigmaPionTruth"), track.pt(), nSigmaPi);
282+
histos.fill(HIST("allreconstructedPFPion"), track.pt());
283+
if (mcParticle.isPhysicalPrimary()) {
284+
histos.fill(HIST("ptReconstructedPion"), track.pt());
285+
}
286+
}
287+
}
288+
}
289+
if (abs(nSigmaKa) < 3. && abs(kaon.Rapidity()) < 0.8) {
290+
histos.fill(HIST("hSigmaKaon"), track.pt(), nSigmaKa);
291+
if (track.has_udMcParticle()) {
292+
auto mcParticle = track.udMcParticle();
293+
if (abs(mcParticle.pdgCode()) == 321) {
294+
histos.fill(HIST("hSigmaKaonTruth"), track.pt(), nSigmaKa);
295+
histos.fill(HIST("allreconstructedPFKaon"), track.pt());
296+
if (mcParticle.isPhysicalPrimary()) {
297+
histos.fill(HIST("ptReconstructedKaon"), track.pt());
298+
}
299+
}
300+
}
301+
}
302+
if (abs(nSigmaPr) < 3. && abs(proton.Rapidity()) < 0.8) {
303+
histos.fill(HIST("hSigmaProton"), track.pt(), nSigmaPr);
304+
if (track.has_udMcParticle()) {
305+
auto mcParticle = track.udMcParticle();
306+
if (abs(mcParticle.pdgCode()) == 2212) {
307+
histos.fill(HIST("hSigmaProtonTruth"), track.pt(), nSigmaPr);
308+
histos.fill(HIST("allreconstructedPFProton"), track.pt());
309+
if (mcParticle.pdgCode() == 2212) {
310+
histos.fill(HIST("allreconstructedPFProtonPos"), track.pt());
311+
} else {
312+
histos.fill(HIST("allreconstructedPFProtonNeg"), track.pt());
313+
}
314+
if (mcParticle.isPhysicalPrimary()) {
315+
histos.fill(HIST("ptReconstructedProton"), track.pt());
316+
if (mcParticle.pdgCode() == 2212) {
317+
histos.fill(HIST("ptReconstructedProtonPos"), track.pt());
318+
} else {
319+
histos.fill(HIST("ptReconstructedProtonNeg"), track.pt());
320+
}
321+
}
322+
}
323+
}
324+
}
325+
}
326+
if (track.hasTPC() && track.hasTOF()) {
327+
// if (track.hasTOF()) {
328+
nSigmaPiTOF = track.tofNSigmaPi();
329+
nSigmaKaTOF = track.tofNSigmaKa();
330+
nSigmaPrTOF = track.tofNSigmaPr();
331+
if (abs(nSigmaPiTOF) < 3. && abs(pion.Rapidity()) < 0.8) {
332+
histos.fill(HIST("hSigmaPionTOF"), track.pt(), nSigmaPiTOF);
333+
if (track.has_udMcParticle()) {
334+
auto mcParticle = track.udMcParticle();
335+
// if(abs(mcParticle.pdgCode())==211 && mcParticle.isPhysicalPrimary()) howManyPionsHavePionMCandPrimaries += 1;
336+
if (abs(mcParticle.pdgCode()) == 211) {
337+
histos.fill(HIST("hSigmaPionTruthTOF"), track.pt(), nSigmaPiTOF);
338+
histos.fill(HIST("allreconstructedPFPionTOF"), track.pt());
339+
if (mcParticle.isPhysicalPrimary()) {
340+
histos.fill(HIST("ptReconstructedPionTOF"), track.pt());
341+
}
342+
}
343+
}
344+
}
345+
if (abs(nSigmaKaTOF) < 3. && abs(kaon.Rapidity()) < 0.8) {
346+
histos.fill(HIST("hSigmaKaonTOF"), track.pt(), nSigmaKaTOF);
347+
if (track.has_udMcParticle()) {
348+
auto mcParticle = track.udMcParticle();
349+
if (abs(mcParticle.pdgCode()) == 321) {
350+
histos.fill(HIST("hSigmaKaonTruthTOF"), track.pt(), nSigmaKaTOF);
351+
histos.fill(HIST("allreconstructedPFKaonTOF"), track.pt());
352+
if (mcParticle.isPhysicalPrimary()) {
353+
histos.fill(HIST("ptReconstructedKaonTOF"), track.pt());
354+
}
355+
}
356+
}
357+
}
358+
if (abs(nSigmaPrTOF) < 3. && abs(proton.Rapidity()) < 0.8) {
359+
histos.fill(HIST("hSigmaProtonTOF"), track.pt(), nSigmaPrTOF);
360+
if (track.has_udMcParticle()) {
361+
auto mcParticle = track.udMcParticle();
362+
if (abs(mcParticle.pdgCode()) == 2212) {
363+
histos.fill(HIST("hSigmaProtonTruthTOF"), track.pt(), nSigmaPrTOF);
364+
histos.fill(HIST("allreconstructedPFProtonTOF"), track.pt());
365+
if (mcParticle.isPhysicalPrimary()) {
366+
histos.fill(HIST("ptReconstructedProtonTOF"), track.pt());
367+
}
368+
}
369+
}
370+
}
371+
}
372+
counter++;
373+
// histos.fill(HIST("hVisibleMultiVsGeneratedMulti"), counterMC, counter);
374+
// histos.fill(HIST("hVisibleMultiVsGeneratedMulti"), mcParticles.size(), counter);
375+
}
376+
} // track loop
377+
378+
// } // collision loop
379+
}
380+
PROCESS_SWITCH(ProcessMCDPMJetSGv3, processReco, "processReco", true);
381+
};
382+
383+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
384+
{
385+
return WorkflowSpec{
386+
adaptAnalysisTask<ProcessMCDPMJetSGv3>(cfgc)};
387+
}

0 commit comments

Comments
 (0)