Skip to content

Commit 0d71774

Browse files
committed
Update Lc task
1 parent 1ada3d0 commit 0d71774

File tree

7 files changed

+204
-115
lines changed

7 files changed

+204
-115
lines changed

ALICE3/TableProducer/alice3-decayfinder.cxx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ struct alice3decayFinder {
7979

8080
// Vertexing
8181
Configurable<bool> propagateToPCA{"propagateToPCA", true, "create tracks version propagated to PCA"};
82-
Configurable<bool> useAbsDCA{"useAbsDCA", false, "Minimise abs. distance rather than chi2"};
82+
Configurable<bool> useAbsDCA{"useAbsDCA", true, "Minimise abs. distance rather than chi2"};
8383
Configurable<bool> useWeightedFinalPCA{"useWeightedFinalPCA", false, "Recalculate vertex position using track covariances, effective only if useAbsDCA is true"};
8484
Configurable<double> maxR{"maxR", 200., "reject PCA's above this radius"};
8585
Configurable<double> maxDZIni{"maxDZIni", 1e9, "reject (if>0) PCA candidate if tracks DZ exceeds threshold"};
@@ -324,19 +324,21 @@ struct alice3decayFinder {
324324
o2::track::TrackParCov trackParVar0 = getTrackParCov(prong0);
325325
o2::track::TrackParCov trackParVar1 = getTrackParCov(prong1);
326326
o2::track::TrackParCov trackParVar2 = getTrackParCov(prong2);
327-
328327
//}-{}-{}-{}-{}-{}-{}-{}-{}-{}
329328
// Move close to minima
330329
int nCand = 0;
331330
try {
331+
histos.fill(HIST("hCandidateBuilderStatus3Prong"), 0.f); // builds candidate
332332
nCand = fitter3.process(trackParVar0, trackParVar1, trackParVar2);
333333
} catch (...) {
334334
LOG(info) << "Second vertex fit failed";
335335
return false;
336336
}
337+
histos.fill(HIST("hCandidateBuilderStatus3Prong"), 1.f); // builds candidate
337338
if (nCand == 0) {
338339
return false;
339340
}
341+
histos.fill(HIST("hCandidateBuilderStatus3Prong"), 2.f); // builds candidate
340342
//}-{}-{}-{}-{}-{}-{}-{}-{}-{}
341343

342344
auto covMatrixPCA = fitter3.calcPCACovMatrixFlat();
@@ -345,6 +347,7 @@ struct alice3decayFinder {
345347
if (cand3prong.dcaDau > dcaDaughtersSelection) {
346348
return false;
347349
}
350+
histos.fill(HIST("hCandidateBuilderStatus3Prong"), 3.f); // builds candidate
348351

349352
cand3prong.primaryVertex = {primaryVertex.getX(), primaryVertex.getY(), primaryVertex.getZ()};
350353
auto secondaryVertex = fitter3.getPCACandidate();
@@ -571,6 +574,7 @@ struct alice3decayFinder {
571574
}
572575
}
573576
if (doprocessFindLc) {
577+
histos.add("hCandidateBuilderStatus3Prong", "hCandidateBuilderStatus3Prong", kTH1D, {{10, -0.5, 9.5}});
574578
histos.add("h2dGen3Prong", "h2dGen3Prong", kTH2F, {axisPt, axisEta});
575579
histos.add("h2dGen3ProngBar", "h2dGen3ProngBar", kTH2F, {axisPt, axisEta});
576580
histos.add("h3dRec3Prong", "h3dRec3Prong", kTH3F, {axisPt, axisEta, axisLcMass});

ALICE3/TableProducer/alice3-decaypreselector.cxx

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,38 @@
1717
// HF decays. Work in progress: use at your own risk!
1818
//
1919

20-
#include <cmath>
21-
#include <array>
22-
#include <cstdlib>
23-
#include <map>
24-
#include <iterator>
25-
#include <vector>
26-
#include <utility>
20+
#include "PWGLF/DataModel/LFParticleIdentification.h"
21+
#include "PWGLF/DataModel/LFStrangenessTables.h"
2722

28-
#include "Framework/runDataProcessing.h"
29-
#include "Framework/RunningWorkflowInfo.h"
30-
#include "Framework/AnalysisTask.h"
31-
#include "Framework/AnalysisDataModel.h"
32-
#include "Framework/ASoAHelpers.h"
33-
#include "DCAFitter/DCAFitterN.h"
34-
#include "ReconstructionDataFormats/Track.h"
23+
#include "ALICE3/DataModel/A3DecayFinderTables.h"
24+
#include "ALICE3/DataModel/OTFRICH.h"
25+
#include "ALICE3/DataModel/OTFTOF.h"
3526
#include "Common/Core/RecoDecay.h"
36-
#include "Common/Core/trackUtilities.h"
37-
#include "PWGLF/DataModel/LFStrangenessTables.h"
38-
#include "PWGLF/DataModel/LFParticleIdentification.h"
3927
#include "Common/Core/TrackSelection.h"
28+
#include "Common/Core/trackUtilities.h"
4029
#include "Common/DataModel/TrackSelectionTables.h"
41-
#include "DetectorsBase/Propagator.h"
42-
#include "DetectorsBase/GeometryManager.h"
43-
#include "DataFormatsParameters/GRPObject.h"
44-
#include "DataFormatsParameters/GRPMagField.h"
45-
#include "CCDB/BasicCCDBManager.h"
46-
#include "DataFormatsCalibration/MeanVertexObject.h"
47-
#include "ALICE3/DataModel/OTFTOF.h"
48-
#include "ALICE3/DataModel/OTFRICH.h"
49-
#include "ALICE3/DataModel/A3DecayFinderTables.h"
30+
31+
#include <CCDB/BasicCCDBManager.h>
32+
#include <DCAFitter/DCAFitterN.h>
33+
#include <DataFormatsCalibration/MeanVertexObject.h>
34+
#include <DataFormatsParameters/GRPMagField.h>
35+
#include <DataFormatsParameters/GRPObject.h>
36+
#include <DetectorsBase/GeometryManager.h>
37+
#include <DetectorsBase/Propagator.h>
38+
#include <Framework/ASoAHelpers.h>
39+
#include <Framework/AnalysisDataModel.h>
40+
#include <Framework/AnalysisTask.h>
41+
#include <Framework/RunningWorkflowInfo.h>
42+
#include <Framework/runDataProcessing.h>
43+
#include <ReconstructionDataFormats/Track.h>
44+
45+
#include <array>
46+
#include <cmath>
47+
#include <cstdlib>
48+
#include <iterator>
49+
#include <map>
50+
#include <utility>
51+
#include <vector>
5052

5153
using namespace o2;
5254
using namespace o2::framework;

ALICE3/TableProducer/alice3HfSelector3Prong.cxx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ struct Alice3HfSelector3Prong {
120120
labels[1 + aod::SelectionStep::RecoMl] = "ML selection";
121121
static const AxisSpec axisSelections = {kNBinsSelections, 0.5, kNBinsSelections + 0.5, ""};
122122
registry.add("hSelections", "Selections;;#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {axisSelections, {(std::vector<double>)binsPt, "#it{p}_{T} (GeV/#it{c})"}}});
123+
registry.add("hSelectionsTopology", "hSelectionsTopology", {HistType::kTH1D, {{10, -0.5, 9.5, "Selection step"}}});
123124
for (int iBin = 0; iBin < kNBinsSelections; ++iBin) {
124125
registry.get<TH2>(HIST("hSelections"))->GetXaxis()->SetBinLabel(iBin + 1, labels[iBin].data());
125126
}
@@ -151,52 +152,66 @@ struct Alice3HfSelector3Prong {
151152
bool selectionTopol(const T& cand, float candPt)
152153
{
153154
int const ptBin = findBin(binsPt, candPt);
154-
155+
auto fillQAHistogram = [&](float bin) {
156+
if (activateQA) {
157+
registry.fill(HIST("hSelectionsTopology"), bin);
158+
}
159+
};
160+
fillQAHistogram(0.f);
155161
// check that the cand pT is within the analysis range
156162
if (candPt < ptCandMin || candPt >= ptCandMax) {
157163
return false;
158164
}
165+
fillQAHistogram(1.f);
159166

160167
// cut on daughter pT
161168
if (cand.ptProng0() < cuts->get(ptBin, "pT prong 0") ||
162169
cand.ptProng1() < cuts->get(ptBin, "pT prong 1") ||
163170
cand.ptProng2() < cuts->get(ptBin, "pT prong 2")) {
164171
return false;
165172
}
173+
fillQAHistogram(2.f);
166174

167175
// cosine of pointing angle
168176
if (cand.cpa() <= cuts->get(ptBin, "cos pointing angle")) {
169177
return false;
170178
}
179+
fillQAHistogram(3.f);
171180

172181
// cand chi2PCA
173182
if (cand.chi2PCA() > cuts->get(ptBin, "Chi2PCA")) {
174183
return false;
175184
}
185+
fillQAHistogram(4.f);
176186

177187
if (cand.decayLength() <= cuts->get(ptBin, "decay length")) {
178188
return false;
179189
}
190+
fillQAHistogram(5.f);
180191

181192
// cand decay length XY
182193
if (cand.decayLengthXY() <= cuts->get(ptBin, "decLengthXY")) {
183194
return false;
184195
}
196+
fillQAHistogram(6.f);
185197

186198
// cand normalized decay length XY
187199
if (cand.decayLengthXYNormalised() < cuts->get(ptBin, "normDecLXY")) {
188200
return false;
189201
}
202+
fillQAHistogram(7.f);
190203

191204
// cand impact parameter XY
192205
if (std::abs(cand.impactParameterXY()) > cuts->get(ptBin, "impParXY")) {
193206
return false;
194207
}
208+
fillQAHistogram(8.f);
195209

196210
// cand daughter prong DCA
197211
if (!isSelectedCandidateProngDca(cand)) {
198212
return false;
199213
}
214+
fillQAHistogram(9.f);
200215

201216
return true;
202217
}
@@ -292,6 +307,9 @@ struct Alice3HfSelector3Prong {
292307

293308
// looping over 3-prong cands
294309
for (const auto& cand : cands) {
310+
if (activateQA) {
311+
registry.fill(HIST("hSelections"), 1, cand.pt());
312+
}
295313
outputMl = {-1.f, -1.f, -1.f};
296314
pidMask = 0;
297315

ALICE3/Tasks/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ o2physics_add_dpl_workflow(alice3-multicharm
6666

6767
o2physics_add_dpl_workflow(alice3-hf-task-3prong
6868
SOURCES alice3HfTask3Prong.cxx
69-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::SGCutParHolder O2Physics::MLCore
69+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore
7070
COMPONENT_NAME Analysis)
7171

7272
o2physics_add_dpl_workflow(alice3-efficiency

ALICE3/Tasks/alice3-qa-singleparticle.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#include <TDatabasePDG.h>
2424
#include <TMCProcess.h>
2525

26+
#include <vector>
27+
2628
using namespace o2;
2729
using namespace o2::framework;
2830
using namespace o2::framework::expressions;

0 commit comments

Comments
 (0)