Skip to content

Commit 5bba599

Browse files
ddobrigkalibuild
andauthored
[Common] Update QA task for debug / studies (#9980)
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
1 parent ed72300 commit 5bba599

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

Common/Tasks/flowTest.cxx

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ using namespace o2;
3232
using namespace o2::framework;
3333
using namespace o2::framework::expressions;
3434

35+
#define bitcheck(var, nbit) ((var) & (1 << (nbit)))
36+
3537
#include "Framework/runDataProcessing.h"
3638

3739
struct flowTest {
@@ -57,10 +59,13 @@ struct flowTest {
5759
histos.add<TH2>("hPtVsPhiGlobal", "hPtVsPhiGlobal", HistType::kTH2D, {axisPhi, axisPt});
5860
histos.add<TH3>("hBVsPtVsPhiGenerated", "hBVsPtVsPhiGenerated", HistType::kTH3D, {axisB, axisPhi, axisPt});
5961
histos.add<TH3>("hBVsPtVsPhiGlobal", "hBVsPtVsPhiGlobal", HistType::kTH3D, {axisB, axisPhi, axisPt});
62+
histos.add<TH3>("hBVsPtVsPhiGlobalFake", "hBVsPtVsPhiGlobalFake", HistType::kTH3D, {axisB, axisPhi, axisPt});
6063
histos.add<TH3>("hBVsPtVsPhiAny", "hBVsPtVsPhiAny", HistType::kTH3D, {axisB, axisPhi, axisPt});
6164
histos.add<TH3>("hBVsPtVsPhiTPCTrack", "hBVsPtVsPhiTPCTrack", HistType::kTH3D, {axisB, axisPhi, axisPt});
6265
histos.add<TH3>("hBVsPtVsPhiITSTrack", "hBVsPtVsPhiITSTrack", HistType::kTH3D, {axisB, axisPhi, axisPt});
66+
histos.add<TH3>("hBVsPtVsPhiITSTrackFake", "hBVsPtVsPhiITSTrackFake", HistType::kTH3D, {axisB, axisPhi, axisPt});
6367
histos.add<TH3>("hBVsPtVsPhiITSABTrack", "hBVsPtVsPhiITSABTrack", HistType::kTH3D, {axisB, axisPhi, axisPt});
68+
histos.add<TH3>("hBVsPtVsPhiITSABTrackFake", "hBVsPtVsPhiITSABTrackFake", HistType::kTH3D, {axisB, axisPhi, axisPt});
6469

6570
histos.add<TH3>("hBVsPtVsPhiGeneratedK0Short", "hBVsPtVsPhiGeneratedK0Short", HistType::kTH3D, {axisB, axisPhi, axisPt});
6671
histos.add<TH3>("hBVsPtVsPhiGlobalK0Short", "hBVsPtVsPhiGlobalK0Short", HistType::kTH3D, {axisB, axisPhi, axisPt});
@@ -73,7 +78,7 @@ struct flowTest {
7378
histos.add<TH3>("hBVsPtVsPhiGlobalOmega", "hBVsPtVsPhiGlobalOmega", HistType::kTH3D, {axisB, axisPhi, axisPt});
7479
}
7580

76-
using recoTracks = soa::Join<aod::TracksIU, aod::TracksExtra>;
81+
using recoTracks = soa::Join<aod::TracksIU, aod::TracksExtra, aod::McTrackLabels>;
7782

7883
void process(aod::McCollision const& mcCollision, soa::Join<aod::McParticles, aod::ParticlesToTracks> const& mcParticles, recoTracks const&)
7984
{
@@ -114,15 +119,29 @@ struct flowTest {
114119
nCh++;
115120

116121
bool validGlobal = false;
122+
bool validGlobalFake = false;
117123
bool validTrack = false;
118124
bool validTPCTrack = false;
119125
bool validITSTrack = false;
126+
bool validITSTrackFake = false;
120127
bool validITSABTrack = false;
128+
bool validITSABTrackFake = false;
121129
if (mcParticle.has_tracks()) {
122130
auto const& tracks = mcParticle.tracks_as<recoTracks>();
123131
for (auto const& track : tracks) {
132+
bool isITSFake = false;
133+
134+
for (int bit = 0; bit < 7; bit++) {
135+
if (bitcheck(track.mcMask(), bit)) {
136+
isITSFake = true;
137+
}
138+
}
139+
124140
if (track.hasTPC() && track.hasITS()) {
125141
validGlobal = true;
142+
if (isITSFake) {
143+
validGlobalFake = true;
144+
}
126145
}
127146
if (track.hasTPC() || track.hasITS()) {
128147
validTrack = true;
@@ -132,9 +151,15 @@ struct flowTest {
132151
}
133152
if (track.hasITS() && track.itsChi2NCl() > -1e-6) {
134153
validITSTrack = true;
154+
if (isITSFake) {
155+
validITSTrackFake = true;
156+
}
135157
}
136158
if (track.hasITS() && track.itsChi2NCl() < -1e-6) {
137159
validITSABTrack = true;
160+
if (isITSFake) {
161+
validITSABTrackFake = true;
162+
}
138163
}
139164
}
140165
}
@@ -144,15 +169,22 @@ struct flowTest {
144169
histos.fill(HIST("hPtVsPhiGlobal"), deltaPhi, mcParticle.pt());
145170
histos.fill(HIST("hBVsPtVsPhiGlobal"), imp, deltaPhi, mcParticle.pt());
146171
}
172+
if (validGlobalFake) {
173+
histos.fill(HIST("hBVsPtVsPhiGlobalFake"), imp, deltaPhi, mcParticle.pt());
174+
}
147175
// if any track present, fill
148176
if (validTrack)
149177
histos.fill(HIST("hBVsPtVsPhiAny"), imp, deltaPhi, mcParticle.pt());
150178
if (validTPCTrack)
151179
histos.fill(HIST("hBVsPtVsPhiTPCTrack"), imp, deltaPhi, mcParticle.pt());
152180
if (validITSTrack)
153181
histos.fill(HIST("hBVsPtVsPhiITSTrack"), imp, deltaPhi, mcParticle.pt());
182+
if (validITSTrackFake)
183+
histos.fill(HIST("hBVsPtVsPhiITSTrackFake"), imp, deltaPhi, mcParticle.pt());
154184
if (validITSABTrack)
155185
histos.fill(HIST("hBVsPtVsPhiITSABTrack"), imp, deltaPhi, mcParticle.pt());
186+
if (validITSABTrackFake)
187+
histos.fill(HIST("hBVsPtVsPhiITSABTrackFake"), imp, deltaPhi, mcParticle.pt());
156188
}
157189
}
158190
histos.fill(HIST("hNchVsImpactParameter"), imp, nCh);

0 commit comments

Comments
 (0)