forked from AliceO2Group/O2Physics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaskSingleElectron.cxx
More file actions
570 lines (493 loc) · 19.6 KB
/
taskSingleElectron.cxx
File metadata and controls
570 lines (493 loc) · 19.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
///
/// \file taskSingleElectron.cxx
/// \brief task for electrons from heavy-flavour hadron decays
/// \author Jonghan Park (Jeonbuk National University), Seul I Jeong (Pusan National University)
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/PIDResponseTOF.h"
#include "Common/DataModel/PIDResponseTPC.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include <CommonConstants/PhysicsConstants.h>
#include <Framework/ASoA.h>
#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisTask.h>
#include <Framework/Configurable.h>
#include <Framework/Expressions.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
#include <Framework/InitContext.h>
#include <Framework/OutputObjHeader.h>
#include <Framework/SliceCache.h>
#include <Framework/runDataProcessing.h>
#include <TPDGCode.h>
#include <map>
using namespace o2;
using namespace o2::constants::math;
using namespace o2::constants::physics;
using namespace o2::framework;
using namespace o2::framework::expressions;
enum SourceType {
NotElec = 0, // not electron
DirectCharm = 1, // electrons from prompt charm hadrons
DirectBeauty = 2, // electrons from primary beauty hadrons
BeautyCharm = 3, // electrons from non-prompt charm hadrons
DirectGamma = 4, // electrons from direct photon
GammaPi0 = 5,
GammaEta = 6,
GammaOmega = 7,
GammaPhi = 8,
GammaEtaPrime = 9,
GammaRho0 = 10,
GammaK0s = 11,
GammaK0l = 12,
GammaKe3 = 13,
GammaLambda0 = 14,
GammaSigma = 15,
Pi0 = 16,
Eta = 17,
Omega = 18,
Phi = 19,
EtaPrime = 20,
Rho0 = 21,
K0s = 22,
K0l = 23,
Ke3 = 24,
Lambda0 = 25,
Sigma = 26,
Else = 27
};
struct HfTaskSingleElectron {
// Produces
// Configurable
Configurable<int> nContribMin{"nContribMin", 2, "min number of contributors"};
Configurable<float> posZMax{"posZMax", 10., "max posZ cut"};
Configurable<float> ptTrackMax{"ptTrackMax", 10., "max pt cut"};
Configurable<float> ptTrackMin{"ptTrackMin", 0.5, "min pt cut"};
Configurable<float> etaTrackMax{"etaTrackMax", 0.8, "eta cut"};
Configurable<int> tpcNCrossedRowMin{"tpcNCrossedRowMin", 70, "max of TPC n cluster crossed rows"};
Configurable<float> tpcNClsFoundOverFindableMin{"tpcNClsFoundOverFindableMin", 0.8, "min # of TPC found/findable clusters"};
Configurable<float> tpcChi2perNClMax{"tpcChi2perNClMax", 4., "min # of tpc chi2 per clusters"};
Configurable<int> itsIBClsMin{"itsIBClsMin", 3, "min # of its clusters in IB"};
Configurable<float> itsChi2perNClMax{"itsChi2perNClMax", 6., "min # of tpc chi2 per clusters"};
Configurable<float> dcaxyMax{"dcaxyMax", 1., "max of track dca in xy"};
Configurable<float> dcazMax{"dcazMax", 2., "max of track dca in z"};
Configurable<float> tofNSigmaMax{"tofNSigmaMax", 3., "max of tof nsigma"};
Configurable<float> tpcNSigmaMin{"tpcNSigmaMin", -1., "min of tpc nsigma"};
Configurable<float> tpcNSigmaMax{"tpcNSigmaMax", 3., "max of tpc nsigma"};
Configurable<int> nBinsP{"nBinsP", 1500, "number of bins of particle momentum"};
Configurable<int> nBinsPt{"nBinsPt", 100, "N bins in pT histo"};
Configurable<int> tpcNSigmaHadronMax{"tpcNSigmaHadronMax", -3, "max of tpc hadron nsigma"};
Configurable<int> tpcNSigmaHadronMin{"tpcNSigmaHadronMin", -5, "min of tpc hadron nsigma"};
// SliceCache
SliceCache cache;
// using declarations
using MyCollisions = soa::Join<aod::Collisions, aod::EvSels>;
using TracksEl = soa::Join<aod::Tracks, aod::TrackSelection, aod::TrackSelectionExtension, aod::TracksExtra, aod::TracksDCA, aod::pidTOFFullEl, aod::pidTPCFullEl>;
using McTracksEl = soa::Join<aod::Tracks, aod::TrackExtra, aod::TracksDCA, aod::pidTOFFullEl, aod::pidTPCFullEl, aod::McTrackLabels>;
// Filter
Filter collZFilter = nabs(aod::collision::posZ) < posZMax;
// Partition
// ConfigurableAxis
ConfigurableAxis axisPtEl{"axisPtEl", {VARIABLE_WIDTH, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.75f, 2.0f, 2.25f, 2.5f, 2.75f, 3.f, 3.5f, 4.0f, 5.0f, 6.0f, 8.0f, 10.0f}, "electron pt bins"};
// Histogram registry
HistogramRegistry histos{"histos"};
void init(InitContext const&)
{
// AxisSpec
const AxisSpec axisEvt{4, 0., 4., "nEvents"};
const AxisSpec axisNCont{100, 0., 100., "nCont"};
const AxisSpec axisPosZ{600, -30., 30., "Z_{pos}"};
const AxisSpec axisEta{30, -1.5, +1.5, "#eta"};
const AxisSpec axisP{nBinsP, 0., 15., "p_{T}"};
const AxisSpec axisPt{nBinsPt, 0., 15., "p_{T}"};
const AxisSpec axisNsig{800, -20., 20.};
const AxisSpec axisTrackIp{4000, -0.2, 0.2, "dca"};
// create histograms
histos.add("nEvents", "Number of events", kTH1D, {{1, 0., 1.}});
histos.add("VtxZ", "VtxZ; cm; entries", kTH1D, {axisPosZ});
histos.add("etaTrack", "etaTrack; #eta; entries", kTH1D, {axisEta});
histos.add("ptTrack", "#it{p}_{T} distribution of selected tracks; #it{p}_{T} (GeV/#it{c}); entries", kTH1D, {axisPt});
// QA plots for trigger track selection
histos.add("tpcNClsTrack", "tpcNClsTrack", kTH1D, {{200, 0, 200}});
histos.add("tpcFoundFindableTrack", "", kTH1D, {{10, 0, 1}});
histos.add("tpcChi2Track", "", kTH1D, {{100, 0, 10}});
histos.add("itsIBClsTrack", "", kTH1D, {{10, 0, 10}});
histos.add("itsChi2Track", "", kTH1D, {{50, 0, 50}});
histos.add("dcaXYTrack", "", kTH1D, {{600, -3, 3}});
histos.add("dcaZTrack", "", kTH1D, {{600, -3, 3}});
// pid
histos.add("tofNSigPt", "", kTH2D, {{axisPtEl}, {axisNsig}});
histos.add("tofNSigPtQA", "", kTH2D, {{axisPtEl}, {axisNsig}});
histos.add("tpcNSigP", "", kTH2D, {{axisP}, {axisNsig}});
histos.add("tpcNSigPt", "", kTH2D, {{axisPtEl}, {axisNsig}});
histos.add("tpcNSigPAfterTofCut", "", kTH2D, {{axisP}, {axisNsig}});
histos.add("tpcNSigPtAfterTofCut", "", kTH2D, {{axisPtEl}, {axisNsig}});
histos.add("tpcNSigPtQA", "", kTH2D, {{axisPtEl}, {axisNsig}});
// track impact parameter
histos.add("dcaTrack", "", kTH2D, {{axisPtEl}, {axisTrackIp}});
histos.add("dcaBeauty", "", kTH2D, {{axisPtEl}, {axisTrackIp}});
histos.add("dcaCharm", "", kTH2D, {{axisPtEl}, {axisTrackIp}});
histos.add("dcaDalitz", "", kTH2D, {{axisPtEl}, {axisTrackIp}});
histos.add("dcaConv", "", kTH2D, {{axisPtEl}, {axisTrackIp}});
histos.add("dcaHadron", "", kTH2D, {{axisPtEl}, {axisTrackIp}});
// QA plots for MC
histos.add("hPdgC", "", kTH1D, {{10001, -0.5, 10000.5}});
histos.add("hPdgB", "", kTH1D, {{10001, -0.5, 10000.5}});
histos.add("hPdgDa", "", kTH1D, {{10001, -0.5, 10000.5}});
histos.add("hPdgCo", "", kTH1D, {{10001, -0.5, 10000.5}});
}
template <typename TrackType>
bool trackSel(const TrackType& track)
{
if ((track.pt() > ptTrackMax) || (track.pt() < ptTrackMin)) {
return false;
}
if (std::abs(track.eta()) > etaTrackMax) {
return false;
}
if (track.tpcNClsCrossedRows() < tpcNCrossedRowMin) {
return false;
}
if (track.tpcCrossedRowsOverFindableCls() < tpcNClsFoundOverFindableMin) {
return false;
}
if (track.tpcChi2NCl() > tpcChi2perNClMax) {
return false;
}
if (!(track.itsNClsInnerBarrel() == itsIBClsMin)) {
return false;
}
if (track.itsChi2NCl() > itsChi2perNClMax) {
return false;
}
if (std::abs(track.dcaXY()) > dcaxyMax) {
return false;
}
if (std::abs(track.dcaZ()) > dcazMax) {
return false;
}
return true;
}
template <typename TrackType>
int getElecSource(const TrackType& track, double& mpt, int& mpdg)
{
auto mcpart = track.mcParticle();
if (std::abs(mcpart.pdgCode()) != kElectron) {
return NotElec;
}
int motherPdg = -999;
int grmotherPdg = -999;
int ggrmotherPdg = -999; // mother, grand mother, grand grand mother pdg
int motherPt = -999.;
int grmotherPt = -999;
int ggrmotherPt = -999.; // mother, grand mother, grand grand mother pt
auto partMother = mcpart.template mothers_as<aod::McParticles>(); // first mother particle of electron
auto partMotherCopy = partMother; // copy of the first mother
auto mctrack = partMother; // will change all the time
motherPt = partMother.front().pt(); // first mother pt
motherPdg = std::abs(partMother.front().pdgCode()); // first mother pdg
mpt = motherPt; // copy of first mother pt
mpdg = motherPdg; // copy of first mother pdg
// check if electron from charm hadrons
if ((static_cast<int>(motherPdg / 100.) % 10) == kCharm || (static_cast<int>(motherPdg / 1000.) % 10) == kCharm) {
// iterate until B hadron is found as an ancestor
while (partMother.size()) {
mctrack = partMother.front().template mothers_as<aod::McParticles>();
if (mctrack.size()) {
auto const& grmothersIdsVec = mctrack.front().mothersIds();
if (grmothersIdsVec.empty()) {
return DirectCharm;
}
grmotherPt = mctrack.front().pt();
grmotherPdg = std::abs(mctrack.front().pdgCode());
if ((static_cast<int>(grmotherPdg / 100.) % 10) == kBottom || (static_cast<int>(grmotherPdg / 1000.) % 10) == kBottom) {
mpt = grmotherPt;
mpdg = grmotherPdg;
return BeautyCharm;
}
}
partMother = mctrack;
}
} else if ((static_cast<int>(motherPdg / 100.) % 10) == kBottom || (static_cast<int>(motherPdg / 1000.) % 10) == kBottom) { // check if electron from beauty hadrons
return DirectBeauty;
} else if (motherPdg == kGamma) { // check if electron from photon conversion
mctrack = partMother.front().template mothers_as<aod::McParticles>();
if (mctrack.size()) {
auto const& grmothersIdsVec = mctrack.front().mothersIds();
if (grmothersIdsVec.empty()) {
return DirectGamma;
}
grmotherPdg = std::abs(mctrack.front().pdgCode());
mpdg = grmotherPdg;
mpt = mctrack.front().pt();
partMother = mctrack;
mctrack = partMother.front().template mothers_as<aod::McParticles>();
if (mctrack.size()) {
auto const& ggrmothersIdsVec = mctrack.front().mothersIds();
if (ggrmothersIdsVec.empty()) {
if (grmotherPdg == kPi0) {
return GammaPi0;
}
if (grmotherPdg == Pdg::kEta) {
return GammaEta;
}
if (grmotherPdg == Pdg::kOmega) {
return GammaOmega;
}
if (grmotherPdg == Pdg::kPhi) {
return GammaPhi;
}
if (grmotherPdg == Pdg::kEtaPrime) {
return GammaEtaPrime;
}
if (grmotherPdg == kRho770_0) {
return GammaRho0;
}
return Else;
}
ggrmotherPdg = mctrack.front().pdgCode();
ggrmotherPt = mctrack.front().pt();
mpdg = ggrmotherPdg;
mpt = ggrmotherPt;
if (grmotherPdg == kPi0) {
if (ggrmotherPdg == kK0Short) {
return GammaK0s;
}
if (ggrmotherPdg == kK0Long) {
return GammaK0l;
}
if (ggrmotherPdg == kKPlus) {
return GammaKe3;
}
if (ggrmotherPdg == kLambda0) {
return GammaLambda0;
}
if (ggrmotherPdg == kSigmaPlus) {
return GammaSigma;
}
mpdg = grmotherPdg;
mpt = grmotherPt;
return GammaPi0;
}
if (grmotherPdg == Pdg::kEta) {
mpdg = grmotherPdg;
mpt = grmotherPt;
return GammaEta;
}
if (grmotherPdg == Pdg::kOmega) {
mpdg = grmotherPdg;
mpt = grmotherPt;
return GammaOmega;
}
if (grmotherPdg == Pdg::kPhi) {
mpdg = grmotherPdg;
mpt = grmotherPt;
return GammaPhi;
}
if (grmotherPdg == Pdg::kEtaPrime) {
mpdg = grmotherPdg;
mpt = grmotherPt;
return GammaEtaPrime;
}
if (grmotherPdg == kRho770_0) {
mpdg = grmotherPdg;
mpt = grmotherPt;
return GammaRho0;
}
return Else;
}
}
} else { // check if electron from Dalitz decays
mctrack = partMother.front().template mothers_as<aod::McParticles>();
if (mctrack.size()) {
auto const& grmothersIdsVec = mctrack.front().mothersIds();
if (grmothersIdsVec.empty()) {
static const std::map<int, SourceType> pdgToSource = {
{kPi0, Pi0},
{Pdg::kEta, Eta},
{Pdg::kOmega, Omega},
{Pdg::kPhi, Phi},
{Pdg::kEtaPrime, EtaPrime},
{kRho770_0, Rho0},
{kKPlus, Ke3},
{kK0Long, K0l}};
auto it = pdgToSource.find(motherPdg);
if (it != pdgToSource.end()) {
return it->second;
}
return Else;
}
if (motherPdg == kPi0) {
grmotherPt = mctrack.front().pt();
grmotherPdg = mctrack.front().pdgCode();
mpt = grmotherPt;
mpdg = grmotherPdg;
if (grmotherPdg == kK0Short) {
return K0s;
}
if (grmotherPdg == kK0Long) {
return K0l;
}
if (grmotherPdg == kKPlus) {
return Ke3;
}
if (grmotherPdg == kLambda0) {
return Lambda0;
}
if (grmotherPdg == kSigmaPlus) {
return Sigma;
}
mpt = motherPt;
mpdg = motherPdg;
return Pi0;
}
if (motherPdg == Pdg::kEta) {
return Eta;
}
if (motherPdg == Pdg::kOmega) {
return Omega;
}
if (motherPdg == Pdg::kPhi) {
return Phi;
}
if (motherPdg == Pdg::kEtaPrime) {
return EtaPrime;
}
if (motherPdg == kRho770_0) {
return Rho0;
}
if (motherPdg == kKPlus) {
return Ke3;
}
if (motherPdg == kK0Long) {
return K0l;
}
return Else;
}
}
return Else;
}
void processData(soa::Filtered<MyCollisions>::iterator const& collision,
TracksEl const& tracks)
{
float const flagAnalysedEvt = 0.5;
if (!collision.sel8()) {
return;
}
if (collision.numContrib() < nContribMin) {
return;
}
histos.fill(HIST("VtxZ"), collision.posZ());
histos.fill(HIST("nEvents"), flagAnalysedEvt);
for (const auto& track : tracks) {
if (!trackSel(track)) {
continue;
}
if (!(track.passedITSRefit() && track.passedTPCRefit())) {
continue;
}
histos.fill(HIST("etaTrack"), track.eta());
histos.fill(HIST("ptTrack"), track.pt());
histos.fill(HIST("tpcNClsTrack"), track.tpcNClsCrossedRows());
histos.fill(HIST("tpcFoundFindableTrack"), track.tpcCrossedRowsOverFindableCls());
histos.fill(HIST("tpcChi2Track"), track.tpcChi2NCl());
histos.fill(HIST("itsIBClsTrack"), track.itsNClsInnerBarrel());
histos.fill(HIST("itsChi2Track"), track.itsChi2NCl());
histos.fill(HIST("dcaXYTrack"), track.dcaXY());
histos.fill(HIST("dcaZTrack"), track.dcaZ());
histos.fill(HIST("tofNSigPt"), track.pt(), track.tofNSigmaEl());
histos.fill(HIST("tpcNSigP"), track.p(), track.tpcNSigmaEl());
histos.fill(HIST("tpcNSigPt"), track.pt(), track.tpcNSigmaEl());
if (std::abs(track.tofNSigmaEl()) > tofNSigmaMax) {
continue;
}
histos.fill(HIST("tofNSigPtQA"), track.pt(), track.tofNSigmaEl());
histos.fill(HIST("tpcNSigPAfterTofCut"), track.p(), track.tpcNSigmaEl());
histos.fill(HIST("tpcNSigPtAfterTofCut"), track.pt(), track.tpcNSigmaEl());
if (track.tpcNSigmaEl() < tpcNSigmaMin || track.tpcNSigmaEl() > tpcNSigmaMax) {
continue;
}
if (track.tpcNSigmaEl() < tpcNSigmaHadronMax && track.tpcNSigmaEl() > tpcNSigmaHadronMin) {
histos.fill(HIST("dcaHadron"), track.pt(), track.dcaXY());
}
histos.fill(HIST("tpcNSigPtQA"), track.pt(), track.tpcNSigmaEl());
histos.fill(HIST("dcaTrack"), track.pt(), track.dcaXY());
}
}
PROCESS_SWITCH(HfTaskSingleElectron, processData, "For real data", true);
void processMc(soa::Filtered<MyCollisions>::iterator const& collision,
McTracksEl const& tracks,
aod::McParticles const&)
{
float const flagAnalysedEvt = 0.5;
if (!collision.sel8()) {
return;
}
if (collision.numContrib() < nContribMin) {
return;
}
histos.fill(HIST("VtxZ"), collision.posZ());
histos.fill(HIST("nEvents"), flagAnalysedEvt);
for (const auto& track : tracks) {
if (!trackSel(track)) {
continue;
}
histos.fill(HIST("etaTrack"), track.eta());
histos.fill(HIST("ptTrack"), track.pt());
histos.fill(HIST("tpcNClsTrack"), track.tpcNClsCrossedRows());
histos.fill(HIST("tpcFoundFindableTrack"), track.tpcCrossedRowsOverFindableCls());
histos.fill(HIST("tpcChi2Track"), track.tpcChi2NCl());
histos.fill(HIST("itsIBClsTrack"), track.itsNClsInnerBarrel());
histos.fill(HIST("dcaXYTrack"), track.dcaXY());
histos.fill(HIST("dcaZTrack"), track.dcaZ());
histos.fill(HIST("tofNSigPt"), track.pt(), track.tofNSigmaEl());
histos.fill(HIST("tpcNSigPt"), track.pt(), track.tpcNSigmaEl());
int mpdg; // electron source pdg code
double mpt; // electron source pt
int const source = getElecSource(track, mpt, mpdg);
if (source == DirectBeauty || source == BeautyCharm) {
histos.fill(HIST("hPdgB"), mpdg);
histos.fill(HIST("dcaBeauty"), track.pt(), track.dcaXY());
}
if (source == DirectCharm) {
histos.fill(HIST("hPdgC"), mpdg);
histos.fill(HIST("dcaCharm"), track.pt(), track.dcaXY());
}
if (source >= GammaPi0 && source <= GammaSigma) {
histos.fill(HIST("hPdgCo"), mpdg);
histos.fill(HIST("dcaConv"), track.pt(), track.dcaXY());
}
if (source >= Pi0 && source <= Sigma) {
histos.fill(HIST("hPdgDa"), mpdg);
histos.fill(HIST("dcaDalitz"), track.pt(), track.dcaXY());
}
if (track.tpcNSigmaEl() < tpcNSigmaHadronMax && track.tpcNSigmaEl() > tpcNSigmaHadronMin)
histos.fill(HIST("dcaHadron"), track.pt(), track.dcaXY());
if (std::abs(track.tofNSigmaEl()) > tofNSigmaMax) {
continue;
}
histos.fill(HIST("tofNSigPtQA"), track.pt(), track.tofNSigmaEl());
histos.fill(HIST("tpcNSigPtAfterTofCut"), track.pt(), track.tpcNSigmaEl());
if (track.tpcNSigmaEl() < tpcNSigmaMin || track.tpcNSigmaEl() > tpcNSigmaMax) {
continue;
}
histos.fill(HIST("tpcNSigPtQA"), track.pt(), track.tpcNSigmaEl());
histos.fill(HIST("dcaTrack"), track.pt(), track.dcaXY());
}
}
PROCESS_SWITCH(HfTaskSingleElectron, processMc, "For real data", false);
};
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<HfTaskSingleElectron>(cfgc)};
}