Skip to content

Commit 502dbdc

Browse files
authored
[PWGLF] Add kink reconstruction of hyperhelium4sigma (#11128)
1 parent 5e187fe commit 502dbdc

File tree

2 files changed

+142
-60
lines changed

2 files changed

+142
-60
lines changed

PWGLF/TableProducer/Common/kinkBuilder.cxx

Lines changed: 47 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ std::shared_ptr<TH2> h2ClsMapPtMoth;
5656
std::shared_ptr<TH2> h2ClsMapPtDaug;
5757
std::shared_ptr<TH2> h2DeDxDaugSel;
5858
std::shared_ptr<TH2> h2KinkAnglePt;
59-
std::shared_ptr<TH2> h2SigmaMinusMassPt;
59+
std::shared_ptr<TH2> h2MothMassPt;
6060
} // namespace
6161

6262
struct kinkCandidate {
@@ -89,9 +89,13 @@ struct kinkCandidate {
8989

9090
struct kinkBuilder {
9191

92+
enum PartType { kSigmaMinus = 0,
93+
kHyperhelium4sigma };
94+
9295
Produces<aod::KinkCands> outputDataTable;
9396
Service<o2::ccdb::BasicCCDBManager> ccdb;
9497

98+
Configurable<int> hypoMoth{"hypoMoth", kSigmaMinus, "Mother particle hypothesis"};
9599
// Selection criteria
96100
Configurable<float> maxDCAMothToPV{"maxDCAMothToPV", 0.1, "Max DCA of the mother to the PV"};
97101
Configurable<float> minDCADaugToPV{"minDCADaugToPV", 0., "Min DCA of the daughter to the PV"};
@@ -107,7 +111,7 @@ struct kinkBuilder {
107111
o2::base::MatLayerCylSet* lut = nullptr;
108112

109113
// constants
110-
float radToDeg = 180. / M_PI;
114+
float radToDeg = o2::constants::math::Rad2Deg;
111115
svPoolCreator svCreator;
112116

113117
// bethe bloch parameters
@@ -141,8 +145,25 @@ struct kinkBuilder {
141145
float mBz;
142146
std::array<float, 6> mBBparamsDaug;
143147

148+
// mother and daughter tracks' properties (absolute charge and mass)
149+
int charge = 1;
150+
float mothMass = o2::constants::physics::MassSigmaMinus;
151+
float chargedDauMass = o2::constants::physics::MassPiMinus;
152+
float neutDauMass = o2::constants::physics::MassNeutron;
153+
144154
void init(InitContext const&)
145155
{
156+
if (hypoMoth == kSigmaMinus) {
157+
charge = 1;
158+
mothMass = o2::constants::physics::MassSigmaMinus;
159+
chargedDauMass = o2::constants::physics::MassPiMinus;
160+
neutDauMass = o2::constants::physics::MassNeutron;
161+
} else if (hypoMoth == kHyperhelium4sigma) {
162+
charge = 2;
163+
mothMass = o2::constants::physics::MassHyperHelium4;
164+
chargedDauMass = o2::constants::physics::MassAlpha;
165+
neutDauMass = o2::constants::physics::MassPi0;
166+
}
146167

147168
// dummy values, 1 for mother, 0 for daughter
148169
svCreator.setPDGs(1, 0);
@@ -174,13 +195,19 @@ struct kinkBuilder {
174195
const AxisSpec itsClusterMapAxis(128, 0, 127, "ITS cluster map");
175196
const AxisSpec rigidityAxis{rigidityBins, "#it{p}^{TPC}/#it{z}"};
176197
const AxisSpec ptAxis{rigidityBins, "#it{p}_{T} (GeV/#it{c})"};
177-
const AxisSpec sigmaMassAxis{100, 1.1, 1.4, "m (GeV/#it{c}^{2})"};
178198
const AxisSpec kinkAngleAxis{100, 0, 180, "#theta_{kink} (deg)"};
179199
const AxisSpec dedxAxis{dedxBins, "d#it{E}/d#it{x}"};
180200

201+
AxisSpec massAxis(100, 1.1, 1.4, "m (GeV/#it{c}^{2})");
202+
if (hypoMoth == kSigmaMinus) {
203+
massAxis = AxisSpec{100, 1.1, 1.4, "m (GeV/#it{c}^{2})"};
204+
} else if (hypoMoth == kHyperhelium4sigma) {
205+
massAxis = AxisSpec{100, 3.85, 4.25, "m (GeV/#it{c}^{2})"};
206+
}
207+
181208
h2DeDxDaugSel = qaRegistry.add<TH2>("h2DeDxDaugSel", ";p_{TPC}/z (GeV/#it{c}); dE/dx", HistType::kTH2F, {rigidityAxis, dedxAxis});
182209
h2KinkAnglePt = qaRegistry.add<TH2>("h2KinkAnglePt", "; p_{T} (GeV/#it{c}); #theta_{kink} (deg)", HistType::kTH2F, {ptAxis, kinkAngleAxis});
183-
h2SigmaMinusMassPt = qaRegistry.add<TH2>("h2SigmaMinusMassPt", "; p_{T} (GeV/#it{c}); m (GeV/#it{c}^{2})", HistType::kTH2F, {ptAxis, sigmaMassAxis});
210+
h2MothMassPt = qaRegistry.add<TH2>("h2MothMassPt", "; p_{T} (GeV/#it{c}); m (GeV/#it{c}^{2})", HistType::kTH2F, {ptAxis, massAxis});
184211
h2ClsMapPtMoth = qaRegistry.add<TH2>("h2ClsMapPtMoth", "; p_{T} (GeV/#it{c}); ITS cluster map", HistType::kTH2F, {ptAxis, itsClusterMapAxis});
185212
h2ClsMapPtDaug = qaRegistry.add<TH2>("h2ClsMapPtDaug", "; p_{T} (GeV/#it{c}); ITS cluster map", HistType::kTH2F, {ptAxis, itsClusterMapAxis});
186213
}
@@ -225,7 +252,7 @@ struct kinkBuilder {
225252
svCreator.clearPools();
226253
svCreator.fillBC2Coll(collisions, bcs);
227254

228-
for (auto& track : tracks) {
255+
for (const auto& track : tracks) {
229256
if (std::abs(track.eta()) > etaMax)
230257
continue;
231258

@@ -240,7 +267,7 @@ struct kinkBuilder {
240267
}
241268
auto& kinkPool = svCreator.getSVCandPool(collisions, !unlikeSignBkg);
242269

243-
for (auto& svCand : kinkPool) {
270+
for (const auto& svCand : kinkPool) {
244271
kinkCandidate kinkCand;
245272

246273
auto trackMoth = tracks.rawIteratorAt(svCand.tr0Idx);
@@ -338,8 +365,12 @@ struct kinkBuilder {
338365

339366
propMothTrack.getPxPyPzGlo(kinkCand.momMoth);
340367
propDaugTrack.getPxPyPzGlo(kinkCand.momDaug);
341-
float pMoth = propMothTrack.getP();
342-
float pDaug = propDaugTrack.getP();
368+
for (int i = 0; i < 3; i++) {
369+
kinkCand.momMoth[i] *= charge;
370+
kinkCand.momDaug[i] *= charge;
371+
}
372+
float pMoth = propMothTrack.getP() * charge;
373+
float pDaug = propDaugTrack.getP() * charge;
343374
float spKink = kinkCand.momMoth[0] * kinkCand.momDaug[0] + kinkCand.momMoth[1] * kinkCand.momDaug[1] + kinkCand.momMoth[2] * kinkCand.momDaug[2];
344375
kinkCand.kinkAngle = std::acos(spKink / (pMoth * pDaug));
345376

@@ -348,15 +379,15 @@ struct kinkBuilder {
348379
neutDauMom[i] = kinkCand.momMoth[i] - kinkCand.momDaug[i];
349380
}
350381

351-
float piMinusE = std::sqrt(neutDauMom[0] * neutDauMom[0] + neutDauMom[1] * neutDauMom[1] + neutDauMom[2] * neutDauMom[2] + 0.13957 * 0.13957);
352-
float neutronE = std::sqrt(pDaug * pDaug + 0.93957 * 0.93957);
353-
float invMass = std::sqrt((piMinusE + neutronE) * (piMinusE + neutronE) - (pMoth * pMoth));
382+
float chargedDauE = std::sqrt(pDaug * pDaug + chargedDauMass * chargedDauMass);
383+
float neutE = std::sqrt(neutDauMom[0] * neutDauMom[0] + neutDauMom[1] * neutDauMom[1] + neutDauMom[2] * neutDauMom[2] + neutDauMass * neutDauMass);
384+
float invMass = std::sqrt((chargedDauE + neutE) * (chargedDauE + neutE) - (pMoth * pMoth));
354385

355386
h2DeDxDaugSel->Fill(trackDaug.tpcInnerParam() * trackDaug.sign(), trackDaug.tpcSignal());
356-
h2KinkAnglePt->Fill(trackMoth.pt() * trackMoth.sign(), kinkCand.kinkAngle * radToDeg);
357-
h2SigmaMinusMassPt->Fill(trackMoth.pt() * trackMoth.sign(), invMass);
358-
h2ClsMapPtMoth->Fill(trackMoth.pt() * trackMoth.sign(), trackMoth.itsClusterMap());
359-
h2ClsMapPtDaug->Fill(trackDaug.pt() * trackDaug.sign(), trackDaug.itsClusterMap());
387+
h2KinkAnglePt->Fill(trackMoth.pt() * charge * trackMoth.sign(), kinkCand.kinkAngle * radToDeg);
388+
h2MothMassPt->Fill(trackMoth.pt() * charge * trackMoth.sign(), invMass);
389+
h2ClsMapPtMoth->Fill(trackMoth.pt() * charge * trackMoth.sign(), trackMoth.itsClusterMap());
390+
h2ClsMapPtDaug->Fill(trackDaug.pt() * charge * trackDaug.sign(), trackDaug.itsClusterMap());
360391

361392
kinkCand.collisionID = collision.globalIndex();
362393
kinkCand.mothTrackID = trackMoth.globalIndex();
@@ -423,7 +454,7 @@ struct kinkBuilder {
423454
// sort kinkCandidates by collisionID to allow joining with collision table
424455
std::sort(kinkCandidates.begin(), kinkCandidates.end(), [](const kinkCandidate& a, const kinkCandidate& b) { return a.collisionID < b.collisionID; });
425456

426-
for (auto& kinkCand : kinkCandidates) {
457+
for (const auto& kinkCand : kinkCandidates) {
427458
outputDataTable(kinkCand.collisionID, kinkCand.mothTrackID, kinkCand.daugTrackID,
428459
kinkCand.decVtx[0], kinkCand.decVtx[1], kinkCand.decVtx[2],
429460
kinkCand.mothSign, kinkCand.momMoth[0], kinkCand.momMoth[1], kinkCand.momMoth[2],

PWGLF/Tasks/Nuspex/hyperhelium4sigmaAnalysis.cxx

Lines changed: 95 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@
2424
#include "Common/DataModel/EventSelection.h"
2525
#include "Common/DataModel/PIDResponse.h"
2626
#include "CommonConstants/PhysicsConstants.h"
27+
#include "PWGLF/DataModel/LFKinkDecayTables.h"
2728

2829
using namespace o2;
2930
using namespace o2::framework;
3031
using namespace o2::framework::expressions;
31-
using std::array;
32+
33+
using CollisionsFull = soa::Join<aod::Collisions, aod::EvSel>;
3234
using FullTracksExtIU = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksCovIU, aod::pidTPCFullPr, aod::pidTPCFullAl, aod::pidTPCFullTr, aod::pidTPCFullPi>;
3335
using MCLabeledTracksIU = soa::Join<FullTracksExtIU, aod::McTrackLabels>;
3436

@@ -97,17 +99,52 @@ Channel getDecayChannelH4S(TMCParticle const& particle)
9799
return kNDecayChannel;
98100
}
99101
//--------------------------------------------------------------
102+
struct Hyperhelium4sigmaAnalysis {
103+
// Histograms are defined with HistogramRegistry
104+
HistogramRegistry registry{"registry", {}};
105+
106+
// Configurable for event selection
107+
Configurable<float> cutzvertex{"cutzvertex", 10.0f, "Accepted z-vertex range (cm)"};
108+
Configurable<float> cutNSigmaAl{"cutNSigmaAl", 5, "NSigmaTPCAlpha"};
109+
110+
void init(InitContext const&)
111+
{
112+
// Axes
113+
const AxisSpec vertexZAxis{100, -15., 15., "vrtx_{Z} [cm]"};
114+
const AxisSpec ptAxis{50, -10, 10, "#it{p}_{T} (GeV/#it{c})"};
115+
const AxisSpec nSigmaAxis{120, -6.f, 6.f, "n#sigma_{#alpha}"};
116+
const AxisSpec massAxis{100, 3.85, 4.25, "m (GeV/#it{c}^{2})"};
117+
118+
registry.add("hVertexZRec", "hVertexZRec", {HistType::kTH1F, {vertexZAxis}});
100119

120+
registry.add("h2MassHyperhelium4sigmaPt", "h2MassHyperhelium4sigmaPt", {HistType::kTH2F, {ptAxis, massAxis}});
121+
registry.add("h2NSigmaAlPt", "h2NSigmaAlPt", {HistType::kTH2F, {ptAxis, nSigmaAxis}});
122+
}
123+
124+
void process(soa::Join<aod::Collisions, aod::EvSels>::iterator const& collision,
125+
aod::KinkCands const& KinkCands, FullTracksExtIU const&)
126+
{
127+
if (std::abs(collision.posZ()) > cutzvertex || !collision.sel8()) {
128+
return;
129+
}
130+
registry.fill(HIST("hVertexZRec"), collision.posZ());
131+
for (const auto& kinkCand : KinkCands) {
132+
auto dauTrack = kinkCand.trackDaug_as<FullTracksExtIU>();
133+
if (std::abs(dauTrack.tpcNSigmaAl()) > cutNSigmaAl) {
134+
continue;
135+
}
136+
float invMass = RecoDecay::m(std::array{std::array{kinkCand.pxDaug(), kinkCand.pyDaug(), kinkCand.pzDaug()}, std::array{kinkCand.pxDaugNeut(), kinkCand.pyDaugNeut(), kinkCand.pzDaugNeut()}}, std::array{o2::constants::physics::MassAlpha, o2::constants::physics::MassPi0});
137+
registry.fill(HIST("h2MassHyperhelium4sigmaPt"), kinkCand.mothSign() * kinkCand.ptMoth(), invMass);
138+
registry.fill(HIST("h2NSigmaAlPt"), kinkCand.mothSign() * kinkCand.ptDaug(), dauTrack.tpcNSigmaAl());
139+
}
140+
}
141+
};
142+
143+
//--------------------------------------------------------------
101144
// check the performance of mcparticle
102-
struct Hyperhelium4sigmaAnalysis {
145+
struct Hyperhelium4sigmaQa {
103146
// Basic checks
104-
HistogramRegistry registry{
105-
"registry",
106-
{
107-
{"hCollCounter", "hCollCounter", {HistType::kTH1F, {{2, 0.0f, 2.0f}}}},
108-
{"hMcCollCounter", "hMcCollCounter", {HistType::kTH1F, {{2, 0.0f, 2.0f}}}},
109-
},
110-
};
147+
HistogramRegistry registry{"registry", {}};
111148

112149
ConfigurableAxis ptBins{"ptBins", {200, 0.f, 10.f}, "Binning for #it{p}_{T} (GeV/#it{c})"};
113150
ConfigurableAxis ctBins{"ctBins", {100, 0.f, 25.f}, "Binning for c#it{t} (cm)"};
@@ -117,40 +154,45 @@ struct Hyperhelium4sigmaAnalysis {
117154

118155
void init(InitContext&)
119156
{
120-
const AxisSpec ptAxis{ptBins, "#it{p}_{T} (GeV/#it{c})"};
121-
const AxisSpec ctAxis{ctBins, "c#it{t} (cm)"};
122-
const AxisSpec rigidityAxis{rigidityBins, "p/z (GeV/#it{c})"};
123-
const AxisSpec nsigmaAxis{nsigmaBins, "TPC n#sigma"};
124-
const AxisSpec invMassAxis{invMassBins, "Inv Mass (GeV/#it{c}^{2})"};
125-
126-
registry.get<TH1>(HIST("hCollCounter"))->GetXaxis()->SetBinLabel(1, "Reconstructed Collisions");
127-
registry.get<TH1>(HIST("hCollCounter"))->GetXaxis()->SetBinLabel(2, "Selected");
128-
registry.get<TH1>(HIST("hMcCollCounter"))->GetXaxis()->SetBinLabel(1, "MC Collisions");
129-
registry.get<TH1>(HIST("hMcCollCounter"))->GetXaxis()->SetBinLabel(2, "Reconstructed");
130-
131-
auto hGenHyperHelium4SigmaCounter = registry.add<TH1>("hGenHyperHelium4SigmaCounter", "", HistType::kTH1F, {{10, 0.f, 10.f}});
132-
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(1, "H4S All");
133-
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(2, "Matter");
134-
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(3, "AntiMatter");
135-
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(4, "#alpha + #pi^{0}");
136-
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(5, "#bar{#alpha} + #pi^{0}");
137-
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(6, "t + p + #pi^{0}");
138-
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(7, "#bar{t} + #bar{p} + #pi^{0}");
139-
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(8, "t + n + #pi^{+}");
140-
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(9, "#bar{t} + #bar{n} + #pi^{+}");
141-
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(10, "Unexpected");
142-
143-
auto hEvtSelectedHyperHelium4SigmaCounter = registry.add<TH1>("hEvtSelectedHyperHelium4SigmaCounter", "", HistType::kTH1F, {{2, 0.f, 2.f}});
144-
registry.get<TH1>(HIST("hEvtSelectedHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(1, "Generated");
145-
registry.get<TH1>(HIST("hEvtSelectedHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(2, "Survived");
146-
147-
registry.add<TH1>("hGenHyperHelium4SigmaPt", "", HistType::kTH1F, {ptAxis});
148-
registry.add<TH1>("hGenHyperHelium4SigmaCt", "", HistType::kTH1F, {ctAxis});
149-
registry.add<TH1>("hMcRecoInvMass", "", HistType::kTH1F, {invMassAxis});
150-
151-
registry.add<TH2>("hDauHelium4TPCNSigma", "", HistType::kTH2F, {rigidityAxis, nsigmaAxis});
152-
registry.add<TH2>("hDauTritonTPCNSigma", "", HistType::kTH2F, {rigidityAxis, nsigmaAxis});
153-
registry.add<TH2>("hDauProtonTPCNSigma", "", HistType::kTH2F, {rigidityAxis, nsigmaAxis});
157+
if (doprocessMC == true) {
158+
const AxisSpec ptAxis{ptBins, "#it{p}_{T} (GeV/#it{c})"};
159+
const AxisSpec ctAxis{ctBins, "c#it{t} (cm)"};
160+
const AxisSpec rigidityAxis{rigidityBins, "p/z (GeV/#it{c})"};
161+
const AxisSpec nsigmaAxis{nsigmaBins, "TPC n#sigma"};
162+
const AxisSpec invMassAxis{invMassBins, "Inv Mass (GeV/#it{c}^{2})"};
163+
164+
auto hCollCounter = registry.add<TH1>("hCollCounter", "hCollCounter", HistType::kTH1F, {{2, 0.0f, 2.0f}});
165+
registry.get<TH1>(HIST("hCollCounter"))->GetXaxis()->SetBinLabel(1, "Reconstructed Collisions");
166+
registry.get<TH1>(HIST("hCollCounter"))->GetXaxis()->SetBinLabel(2, "Selected");
167+
auto hMcCollCounter = registry.add<TH1>("hMcCollCounter", "hMcCollCounter", HistType::kTH1F, {{2, 0.0f, 2.0f}});
168+
registry.get<TH1>(HIST("hMcCollCounter"))->GetXaxis()->SetBinLabel(1, "MC Collisions");
169+
registry.get<TH1>(HIST("hMcCollCounter"))->GetXaxis()->SetBinLabel(2, "Reconstructed");
170+
171+
auto hGenHyperHelium4SigmaCounter = registry.add<TH1>("hGenHyperHelium4SigmaCounter", "", HistType::kTH1F, {{10, 0.f, 10.f}});
172+
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(1, "H4S All");
173+
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(2, "Matter");
174+
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(3, "AntiMatter");
175+
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(4, "#alpha + #pi^{0}");
176+
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(5, "#bar{#alpha} + #pi^{0}");
177+
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(6, "t + p + #pi^{0}");
178+
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(7, "#bar{t} + #bar{p} + #pi^{0}");
179+
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(8, "t + n + #pi^{+}");
180+
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(9, "#bar{t} + #bar{n} + #pi^{+}");
181+
registry.get<TH1>(HIST("hGenHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(10, "Unexpected");
182+
183+
auto hEvtSelectedHyperHelium4SigmaCounter = registry.add<TH1>("hEvtSelectedHyperHelium4SigmaCounter", "", HistType::kTH1F, {{2, 0.f, 2.f}});
184+
registry.get<TH1>(HIST("hEvtSelectedHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(1, "Generated");
185+
registry.get<TH1>(HIST("hEvtSelectedHyperHelium4SigmaCounter"))->GetXaxis()->SetBinLabel(2, "Survived");
186+
187+
registry.add<TH1>("hGenHyperHelium4SigmaP", "", HistType::kTH1F, {ptAxis});
188+
registry.add<TH1>("hGenHyperHelium4SigmaPt", "", HistType::kTH1F, {ptAxis});
189+
registry.add<TH1>("hGenHyperHelium4SigmaCt", "", HistType::kTH1F, {ctAxis});
190+
registry.add<TH1>("hMcRecoInvMass", "", HistType::kTH1F, {invMassAxis});
191+
192+
registry.add<TH2>("hDauHelium4TPCNSigma", "", HistType::kTH2F, {rigidityAxis, nsigmaAxis});
193+
registry.add<TH2>("hDauTritonTPCNSigma", "", HistType::kTH2F, {rigidityAxis, nsigmaAxis});
194+
registry.add<TH2>("hDauProtonTPCNSigma", "", HistType::kTH2F, {rigidityAxis, nsigmaAxis});
195+
}
154196
}
155197

156198
// Configurable<bool> eventSel8Cut{"eventSel8Cut", true, "flag to enable event sel8 selection"};
@@ -183,7 +225,13 @@ struct Hyperhelium4sigmaAnalysis {
183225
}
184226
}
185227

186-
void process(aod::McCollisions const& mcCollisions, aod::McParticles const& particlesMC, o2::soa::Join<o2::aod::Collisions, o2::aod::McCollisionLabels, o2::aod::EvSels> const& collisions, MCLabeledTracksIU const& tracks)
228+
void processData(o2::aod::Collisions const&)
229+
{
230+
// dummy process function;
231+
}
232+
PROCESS_SWITCH(Hyperhelium4sigmaQa, processData, "process data", true);
233+
234+
void processMC(aod::McCollisions const& mcCollisions, aod::McParticles const& particlesMC, o2::soa::Join<o2::aod::Collisions, o2::aod::McCollisionLabels, o2::aod::EvSels> const& collisions, MCLabeledTracksIU const& tracks)
187235
{
188236
setTrackIDForMC(particlesMC, tracks);
189237
std::vector<int64_t> selectedEvents(collisions.size());
@@ -296,6 +344,7 @@ struct Hyperhelium4sigmaAnalysis {
296344
}
297345
}
298346

347+
registry.fill(HIST("hGenHyperHelium4SigmaP"), mcparticle.p());
299348
registry.fill(HIST("hGenHyperHelium4SigmaPt"), mcparticle.pt());
300349
double ct = RecoDecay::sqrtSumOfSquares(svPos[0] - mcparticle.vx(), svPos[1] - mcparticle.vy(), svPos[2] - mcparticle.vz()) * o2::constants::physics::MassHyperHelium4Sigma / mcparticle.p();
301350
registry.fill(HIST("hGenHyperHelium4SigmaCt"), ct);
@@ -328,11 +377,13 @@ struct Hyperhelium4sigmaAnalysis {
328377
}
329378
}
330379
}
380+
PROCESS_SWITCH(Hyperhelium4sigmaQa, processMC, "do QA for MC prodcutions", false);
331381
};
332382

333383
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
334384
{
335385
return WorkflowSpec{
336386
adaptAnalysisTask<Hyperhelium4sigmaAnalysis>(cfgc),
387+
adaptAnalysisTask<Hyperhelium4sigmaQa>(cfgc),
337388
};
338389
}

0 commit comments

Comments
 (0)