Skip to content

Commit e9a23b9

Browse files
authored
Merge branch 'AliceO2Group:master' into dev
2 parents ab7aa1d + 93e4fbf commit e9a23b9

File tree

11 files changed

+1423
-932
lines changed

11 files changed

+1423
-932
lines changed

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 50 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ struct OnTheFlyTracker {
107107
Configurable<bool> enableSecondarySmearing{"enableSecondarySmearing", false, "Enable smearing of weak decay daughters"};
108108
Configurable<bool> enableNucleiSmearing{"enableNucleiSmearing", false, "Enable smearing of nuclei"};
109109
Configurable<bool> enablePrimaryVertexing{"enablePrimaryVertexing", true, "Enable primary vertexing"};
110+
Configurable<std::string> primaryVertexOption{"primaryVertexOption", "pvertexer.maxChi2TZDebris=10;pvertexer.acceptableScale2=9;pvertexer.minScale2=2;pvertexer.timeMarginVertexTime=1.3;;pvertexer.maxChi2TZDebris=40;pvertexer.maxChi2Mean=12;pvertexer.maxMultRatDebris=1.;pvertexer.addTimeSigma2Debris=1e-2;pvertexer.meanVertexExtraErrSelection=0.03;", "Option for the primary vertexer"};
110111
Configurable<bool> interpolateLutEfficiencyVsNch{"interpolateLutEfficiencyVsNch", true, "interpolate LUT efficiency as f(Nch)"};
111112

112113
Configurable<bool> populateTracksDCA{"populateTracksDCA", true, "populate TracksDCA table"};
@@ -118,11 +119,13 @@ struct OnTheFlyTracker {
118119
Configurable<bool> doExtraQA{"doExtraQA", false, "do extra 2D QA plots"};
119120
Configurable<bool> extraQAwithoutDecayDaughters{"extraQAwithoutDecayDaughters", false, "remove decay daughters from qa plots (yes/no)"};
120121
Configurable<bool> cleanLutWhenLoaded{"cleanLutWhenLoaded", true, "clean LUTs after being loaded to save disk space"};
121-
Configurable<std::string> primaryVertexOption{"primaryVertexOption", "pvertexer.maxChi2TZDebris=10;pvertexer.acceptableScale2=9;pvertexer.minScale2=2;pvertexer.timeMarginVertexTime=1.3;;pvertexer.maxChi2TZDebris=40;pvertexer.maxChi2Mean=12;pvertexer.maxMultRatDebris=1.;pvertexer.addTimeSigma2Debris=1e-2;pvertexer.meanVertexExtraErrSelection=0.03;", "Option for the primary vertexer"};
122122

123123
struct : ConfigurableGroup {
124124
ConfigurableAxis axisMomentum{"axisMomentum", {VARIABLE_WIDTH, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.2f, 2.4f, 2.6f, 2.8f, 3.0f, 3.2f, 3.4f, 3.6f, 3.8f, 4.0f, 4.4f, 4.8f, 5.2f, 5.6f, 6.0f, 6.5f, 7.0f, 7.5f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 17.0f, 19.0f, 21.0f, 23.0f, 25.0f, 30.0f, 35.0f, 40.0f, 50.0f}, "#it{p} (GeV/#it{c})"};
125125
ConfigurableAxis axisNVertices{"axisNVertices", {20, -0.5, 19.5}, "N_{vertices}"};
126+
ConfigurableAxis axisDeltaVtxCoord{"axisDeltaVtxCoord", {100, -5., 5}, "Delta Vtx coord (cm)"};
127+
ConfigurableAxis axisDeltaMultPVRecoGen{"axisDeltaMultPVRecoGen", {51, -25, 25}, "Delta Multiplicity_{PV} (cm)"};
128+
ConfigurableAxis axisVtxMult{"axisVtxMult", {101, 0, 100}, "Vertex Multiplicity"};
126129
ConfigurableAxis axisMultiplicity{"axisMultiplicity", {100, -0.5, 99.5}, "N_{contributors}"};
127130
ConfigurableAxis axisVertexZ{"axisVertexZ", {40, -20, 20}, "vertex Z (cm)"};
128131
ConfigurableAxis axisDCA{"axisDCA", {400, -200, 200}, "DCA (#mum)"};
@@ -373,24 +376,37 @@ struct OnTheFlyTracker {
373376
// smear un-reco'ed tracks if asked to do so
374377
mSmearer[icfg]->skipUnreconstructed(!processUnreconstructedTracks.value);
375378

376-
insertHist(histPath + "hPtGenerated", "hPtGenerated", {kTH1D, {{axes.axisMomentum}}});
377-
insertHist(histPath + "hPhiGenerated", "hPhiGenerated", {kTH1D, {{100, 0.0f, 2 * M_PI, "#phi (rad)"}}});
378-
379-
insertHist(histPath + "hPtGeneratedEl", "hPtGeneratedEl", {kTH1D, {{axes.axisMomentum}}});
380-
insertHist(histPath + "hPtGeneratedPi", "hPtGeneratedPi", {kTH1D, {{axes.axisMomentum}}});
381-
insertHist(histPath + "hPtGeneratedKa", "hPtGeneratedKa", {kTH1D, {{axes.axisMomentum}}});
382-
insertHist(histPath + "hPtGeneratedPr", "hPtGeneratedPr", {kTH1D, {{axes.axisMomentum}}});
383-
insertHist(histPath + "hPtReconstructed", "hPtReconstructed", {kTH1D, {{axes.axisMomentum}}});
384-
insertHist(histPath + "hPtReconstructedEl", "hPtReconstructedEl", {kTH1D, {{axes.axisMomentum}}});
385-
insertHist(histPath + "hPtReconstructedPi", "hPtReconstructedPi", {kTH1D, {{axes.axisMomentum}}});
386-
insertHist(histPath + "hPtReconstructedKa", "hPtReconstructedKa", {kTH1D, {{axes.axisMomentum}}});
387-
insertHist(histPath + "hPtReconstructedPr", "hPtReconstructedPr", {kTH1D, {{axes.axisMomentum}}});
379+
insertHist(histPath + "hPtGenerated", "hPtGenerated;#it{p}_{T} (GeV/c);Counts", {kTH1D, {{axes.axisMomentum}}});
380+
insertHist(histPath + "hPhiGenerated", "hPhiGenerated;#phi (rad);Counts", {kTH1D, {{100, 0.0f, 2 * M_PI, "#phi (rad)"}}});
381+
382+
insertHist(histPath + "hPtGeneratedEl", "hPtGeneratedEl;Gen #it{p}_{T} (GeV/c);Counts", {kTH1D, {{axes.axisMomentum}}});
383+
insertHist(histPath + "hPtGeneratedPi", "hPtGeneratedPi;Gen #it{p}_{T} (GeV/c);Counts", {kTH1D, {{axes.axisMomentum}}});
384+
insertHist(histPath + "hPtGeneratedKa", "hPtGeneratedKa;Gen #it{p}_{T} (GeV/c);Counts", {kTH1D, {{axes.axisMomentum}}});
385+
insertHist(histPath + "hPtGeneratedPr", "hPtGeneratedPr;Gen #it{p}_{T} (GeV/c);Counts", {kTH1D, {{axes.axisMomentum}}});
386+
insertHist(histPath + "hPtReconstructed", "hPtReconstructed;Reco #it{p}_{T} (GeV/c);Counts", {kTH1D, {{axes.axisMomentum}}});
387+
insertHist(histPath + "hPtReconstructedEl", "hPtReconstructedEl;Reco #it{p}_{T} (GeV/c);Counts", {kTH1D, {{axes.axisMomentum}}});
388+
insertHist(histPath + "hPtReconstructedPi", "hPtReconstructedPi;Reco #it{p}_{T} (GeV/c);Counts", {kTH1D, {{axes.axisMomentum}}});
389+
insertHist(histPath + "hPtReconstructedKa", "hPtReconstructedKa;Reco #it{p}_{T} (GeV/c);Counts", {kTH1D, {{axes.axisMomentum}}});
390+
insertHist(histPath + "hPtReconstructedPr", "hPtReconstructedPr;Reco #it{p}_{T} (GeV/c);Counts", {kTH1D, {{axes.axisMomentum}}});
388391
}
389392
// Collision QA
390-
insertHist(histPath + "hPVz", "hPVz", {kTH1D, {{axes.axisVertexZ}}});
391-
insertHist(histPath + "hLUTMultiplicity", "hLUTMultiplicity", {kTH1D, {{axes.axisMultiplicity}}});
392-
insertHist(histPath + "hSimMultiplicity", "hSimMultiplicity", {kTH1D, {{axes.axisMultiplicity}}});
393-
insertHist(histPath + "hRecoMultiplicity", "hRecoMultiplicity", {kTH1D, {{axes.axisMultiplicity}}});
393+
insertHist(histPath + "hPVz", "hPVz;Primary Vertex Z (cm);Counts", {kTH1D, {{axes.axisVertexZ}}});
394+
insertHist(histPath + "hLUTMultiplicity", "hLUTMultiplicity;dN/d#eta;Counts", {kTH1D, {{axes.axisMultiplicity}}});
395+
insertHist(histPath + "hSimMultiplicity", "hSimMultiplicity;Gen. multiplicity;Counts", {kTH1D, {{axes.axisMultiplicity}}});
396+
insertHist(histPath + "hRecoMultiplicity", "hRecoMultiplicity;Reco Multiplicity;Counts", {kTH1D, {{axes.axisMultiplicity}}});
397+
398+
if (enablePrimaryVertexing) {
399+
insertHist(histPath + "hDeltaXPVRecoGen", "hDeltaXPVRecoGen;Delta X (reco - gen), cm", {kTH1D, {{axes.axisDeltaVtxCoord}}});
400+
insertHist(histPath + "hDeltaYPVRecoGen", "hDeltaYPVRecoGen;Delta Y (reco - gen), cm", {kTH1D, {{axes.axisDeltaVtxCoord}}});
401+
insertHist(histPath + "hDeltaZPVRecoGen", "hDeltaZPVRecoGen;Delta Z (reco - gen), cm", {kTH1D, {{axes.axisDeltaVtxCoord}}});
402+
insertHist(histPath + "hDeltaMultPVRecoGen", "hDeltaMultPVRecoGen;Delta Multiplicity (reco - gen)", {kTH1D, {{axes.axisDeltaMultPVRecoGen}}});
403+
insertHist(histPath + "hVtxMultGen", "hVtxMultGen;Generated Vertex Multiplicity", {kTH1D, {{axes.axisVtxMult}}});
404+
insertHist(histPath + "hVtxMultReco", "hVtxMultReco;Reconstructed Vertex Multiplicity", {kTH1D, {{axes.axisVtxMult}}});
405+
insertHist(histPath + "hVtxTrials", "hVtxTrials;Vertex Reconstruction Trials", {kTH1D, {{2, -0.5, 1.5}}});
406+
// Set the bin labels
407+
getHist(TH1, histPath + "hVtxTrials")->GetXaxis()->SetBinLabel(1, "Tried");
408+
getHist(TH1, histPath + "hVtxTrials")->GetXaxis()->SetBinLabel(2, "Succeeded");
409+
}
394410

395411
if (enableSecondarySmearing) {
396412
fastTracker.emplace_back(std::make_unique<o2::fastsim::FastTracker>());
@@ -431,8 +447,8 @@ struct OnTheFlyTracker {
431447
insertHist(histPath + "h2dDCAzCascadeNegative", "h2dDCAzCascadeNegative", {kTH2F, {axes.axisMomentum, axes.axisDCA}});
432448
insertHist(histPath + "h2dDCAzCascadePositive", "h2dDCAzCascadePositive", {kTH2F, {axes.axisMomentum, axes.axisDCA}});
433449

434-
insertHist(histPath + "h2dDeltaPtVsPt", "h2dDeltaPtVsPt", {kTH2F, {axes.axisMomentum, axes.axisDeltaPt}});
435-
insertHist(histPath + "h2dDeltaEtaVsPt", "h2dDeltaEtaVsPt", {kTH2F, {axes.axisMomentum, axes.axisDeltaEta}});
450+
insertHist(histPath + "h2dDeltaPtVsPt", "h2dDeltaPtVsPt;Gen p_{T};#Delta p_{T}", {kTH2F, {axes.axisMomentum, axes.axisDeltaPt}});
451+
insertHist(histPath + "h2dDeltaEtaVsPt", "h2dDeltaEtaVsPt;Gen p_{T};#Delta #eta", {kTH2F, {axes.axisMomentum, axes.axisDeltaEta}});
436452

437453
insertHist(histPath + "hFastTrackerHits", "hFastTrackerHits", {kTH2F, {axes.axisZ, axes.axisRadius}});
438454
insertHist(histPath + "hFastTrackerQA", "hFastTrackerQA", {kTH1F, {{8, -0.5f, 7.5f}}});
@@ -448,9 +464,9 @@ struct OnTheFlyTracker {
448464
}
449465

450466
if (doExtraQA) {
451-
insertHist(histPath + "h2dPtRes", "h2dPtRes", {kTH2D, {{axes.axisMomentum, axes.axisPtRes}}});
452-
insertHist(histPath + "h2dDCAxy", "h2dDCAxy", {kTH2D, {{axes.axisMomentum, axes.axisDCA}}});
453-
insertHist(histPath + "h2dDCAz", "h2dDCAz", {kTH2D, {{axes.axisMomentum, axes.axisDCA}}});
467+
insertHist(histPath + "h2dPtRes", "h2dPtRes;Gen p_{T};#Delta p_{T} / Reco p_{T}", {kTH2D, {{axes.axisMomentum, axes.axisPtRes}}});
468+
insertHist(histPath + "h2dDCAxy", "h2dDCAxy;p_{T};DCA_{xy}", {kTH2D, {{axes.axisMomentum, axes.axisDCA}}});
469+
insertHist(histPath + "h2dDCAz", "h2dDCAz;p_{T};DCA_{z}", {kTH2D, {{axes.axisMomentum, axes.axisDCA}}});
454470
}
455471

456472
} // end config loop
@@ -471,9 +487,9 @@ struct OnTheFlyTracker {
471487
hCovMatOK->GetXaxis()->SetBinLabel(2, "OK");
472488

473489
if (doExtraQA) {
474-
histos.add("h2dVerticesVsContributors", "h2dVerticesVsContributors", kTH2F, {axes.axisMultiplicity, axes.axisNVertices});
475-
histos.add("h1dVerticesNotReco", "h1dVerticesNotReco", kTH1F, {axes.axisMultiplicity});
476-
histos.add("hRecoVsSimMultiplicity", "hRecoVsSimMultiplicity", kTH2F, {axes.axisMultiplicity, axes.axisMultiplicity});
490+
histos.add("h2dVerticesVsContributors", "h2dVerticesVsContributors;Multiplicity;N vertices", kTH2F, {axes.axisMultiplicity, axes.axisNVertices});
491+
histos.add("h1dVerticesNotReco", "h1dVerticesNotReco;Multiplicity;Vertices Not Reco", kTH1F, {axes.axisMultiplicity});
492+
histos.add("hRecoVsSimMultiplicity", "hRecoVsSimMultiplicity;Reco Mult.;Sim Mult.", kTH2F, {axes.axisMultiplicity, axes.axisMultiplicity});
477493

478494
histos.add("hSimTrackX", "hSimTrackX", kTH1F, {axes.axisX});
479495
histos.add("hRecoTrackX", "hRecoTrackX", kTH1F, {axes.axisX});
@@ -688,7 +704,6 @@ struct OnTheFlyTracker {
688704
std::pair<float, float> vertexReconstructionEfficiencyCounters = {0, 0}; // {nVerticesWithMoreThan2Contributors, nVerticesReconstructed}
689705
void processWithLUTs(aod::McCollision const& mcCollision, aod::McParticles const& mcParticles, int const& icfg)
690706
{
691-
LOG(debug) << "Processing event " << mcCollision.globalIndex() << " with LUTs for configuration " << icfg;
692707
vertexReconstructionEfficiencyCounters.first += 1;
693708
const int lastTrackIndex = tableStoredTracksCov.lastIndex() + 1; // bookkeep the last added track
694709
const std::string histPath = "Configuration_" + std::to_string(icfg) + "/";
@@ -1368,6 +1383,7 @@ struct OnTheFlyTracker {
13681383
o2::vertexing::PVertex primaryVertex;
13691384
if (enablePrimaryVertexing) {
13701385
LOG(debug) << "Starting primary vertexing with " << tracksAlice3.size() << " tracks.";
1386+
fillHist(TH1, histPath + "hVtxMultGen", tracksAlice3.size());
13711387
std::vector<o2::MCCompLabel> lblTracks;
13721388
std::vector<o2::vertexing::PVertex> vertices;
13731389
std::vector<o2::vertexing::GIndex> vertexTrackIDs;
@@ -1382,6 +1398,8 @@ struct OnTheFlyTracker {
13821398
idxVec.emplace_back(i, o2::dataformats::GlobalTrackID::ITS); // let's say ITS
13831399
}
13841400

1401+
getHist(TH1, histPath + "hVtxTrials")->Fill(0); // Tried vertexing
1402+
13851403
// Calculate vertices
13861404
const int n_vertices = vertexer.process(tracksAlice3, // track array
13871405
idxVec,
@@ -1401,6 +1419,7 @@ struct OnTheFlyTracker {
14011419
return; // primary vertex not reconstructed
14021420
}
14031421
vertexReconstructionEfficiencyCounters.second += 1;
1422+
getHist(TH1, histPath + "hVtxTrials")->Fill(1); // Succeeded vertexing
14041423
LOG(debug) << "Vertexing completed with " << n_vertices << " vertices found.";
14051424

14061425
// Find largest vertex
@@ -1414,6 +1433,11 @@ struct OnTheFlyTracker {
14141433
if (doExtraQA) {
14151434
histos.fill(HIST("h2dVerticesVsContributors"), primaryVertex.getNContributors(), n_vertices);
14161435
}
1436+
fillHist(TH1, histPath + "hVtxMultReco", primaryVertex.getNContributors());
1437+
fillHist(TH1, histPath + "hDeltaMultPVRecoGen", static_cast<int>(primaryVertex.getNContributors()) - static_cast<int>(tracksAlice3.size()));
1438+
fillHist(TH1, histPath + "hDeltaXPVRecoGen", primaryVertex.getX() - mcCollision.posX());
1439+
fillHist(TH1, histPath + "hDeltaYPVRecoGen", primaryVertex.getY() - mcCollision.posY());
1440+
fillHist(TH1, histPath + "hDeltaZPVRecoGen", primaryVertex.getZ() - mcCollision.posZ());
14171441
} else {
14181442
primaryVertex.setXYZ(mcCollision.posX(), mcCollision.posY(), mcCollision.posZ());
14191443
}

ALICE3/TableProducer/alice3HfTreeCreator3Prong.cxx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ struct Alice3HfTreeCreator3Prong {
270270
Configurable<bool> fillPid{"fillPid", false, "fill PID info"};
271271
} fillTables;
272272
// parameters for production of training samples
273+
Configurable<bool> fillSwapMassHypo{"fillSwapMassHypo", false, "Flag to fill derived tables with swapped mass hypothesis"};
273274
Configurable<bool> fillOnlySignal{"fillOnlySignal", true, "Flag to fill derived tables with signal"};
274275
Configurable<bool> fillOnlyBackground{"fillOnlyBackground", false, "Flag to fill derived tables with background"};
275276
Configurable<float> downSampleFactor{"downSampleFactor", 1., "Fraction of cands to keep"};
@@ -475,8 +476,10 @@ struct Alice3HfTreeCreator3Prong {
475476
if (cand.isSelMassHypo0()) {
476477
fillRecoTables<CharmHad, false>(cand);
477478
}
478-
if (cand.isSelMassHypo1()) {
479-
fillRecoTables<CharmHad, true>(cand);
479+
if (fillSwapMassHypo) {
480+
if (cand.isSelMassHypo1()) {
481+
fillRecoTables<CharmHad, true>(cand);
482+
}
480483
}
481484
}
482485
fillGenTables<CharmHad>(candsGen);

ALICE3/Tasks/alice3HfTask3Prong.cxx

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ struct Alice3HfTask3Prong {
5858
Configurable<double> yCandRecoMax{"yCandRecoMax", 0.8, "max. cand. rapidity"};
5959
Configurable<std::vector<double>> binsPt{"binsPt", std::vector<double>{hf_cuts_3prongs_alice3::vecBinsPt}, "pT bin limits"};
6060
Configurable<bool> fillThn{"fillThn", false, "fill Thn"};
61+
Configurable<bool> fillSwapMassHypo{"fillSwapMassHypo", false, "Flag to fill derived tables with swapped mass hypothesis"};
6162
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
6263
Configurable<std::string> ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"};
6364
Configurable<std::string> ccdbPathGrpMag{"ccdbPathGrpMag", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object (Run 3)"};
@@ -335,36 +336,40 @@ struct Alice3HfTask3Prong {
335336
registry.get<THnSparse>(HIST("hSparseRec"))->Fill(valuesToFill.data());
336337
}
337338
}
338-
if (candidate.isSelMassHypo1()) {
339-
registry.fill(HIST("hSelectionStatus"), 1., pt);
340-
double mass = hfHelper.getCandMass<CharmHad, true>(candidate);
341-
/// Fill histograms
342-
fillHistogramsRecSig<CharmHad, SignalClasses::Signal>(candidate, mass, true);
343-
if (originType == RecoDecay::OriginType::Prompt) {
344-
fillHistogramsRecSig<CharmHad, SignalClasses::Prompt>(candidate, mass, true);
345-
} else if (originType == RecoDecay::OriginType::NonPrompt) {
346-
fillHistogramsRecSig<CharmHad, SignalClasses::NonPrompt>(candidate, mass, true);
347-
}
348-
if (fillThn) {
349-
std::vector<double> valuesToFill{mass, pt};
350-
if constexpr (SaveMl) {
351-
LOGP(fatal, "Trying to access ML scores, but SaveMl is false!");
352-
valuesToFill.push_back(candidate.mlScore0());
353-
valuesToFill.push_back(candidate.mlScore1());
354-
valuesToFill.push_back(candidate.mlScore2());
339+
if (fillSwapMassHypo) {
340+
if (candidate.isSelMassHypo1()) {
341+
registry.fill(HIST("hSelectionStatus"), 1., pt);
342+
double mass = hfHelper.getCandMass<CharmHad, true>(candidate);
343+
/// Fill histograms
344+
fillHistogramsRecSig<CharmHad, SignalClasses::Signal>(candidate, mass, true);
345+
if (originType == RecoDecay::OriginType::Prompt) {
346+
fillHistogramsRecSig<CharmHad, SignalClasses::Prompt>(candidate, mass, true);
347+
} else if (originType == RecoDecay::OriginType::NonPrompt) {
348+
fillHistogramsRecSig<CharmHad, SignalClasses::NonPrompt>(candidate, mass, true);
349+
}
350+
if (fillThn) {
351+
std::vector<double> valuesToFill{mass, pt};
352+
if constexpr (SaveMl) {
353+
LOGP(fatal, "Trying to access ML scores, but SaveMl is false!");
354+
valuesToFill.push_back(candidate.mlScore0());
355+
valuesToFill.push_back(candidate.mlScore1());
356+
valuesToFill.push_back(candidate.mlScore2());
357+
}
358+
valuesToFill.push_back(static_cast<double>(originType));
359+
registry.get<THnSparse>(HIST("hSparseRec"))->Fill(valuesToFill.data());
355360
}
356-
valuesToFill.push_back(static_cast<double>(originType));
357-
registry.get<THnSparse>(HIST("hSparseRec"))->Fill(valuesToFill.data());
358361
}
359362
}
360363
} else { // Background
361364
if (candidate.isSelMassHypo0()) {
362365
double mass = hfHelper.getCandMass<CharmHad, false>(candidate);
363366
fillHistogramsRecSig<CharmHad, SignalClasses::Bkg>(candidate, mass, false);
364367
}
365-
if (candidate.isSelMassHypo1()) {
366-
double mass = hfHelper.getCandMass<CharmHad, true>(candidate);
367-
fillHistogramsRecSig<CharmHad, SignalClasses::Bkg>(candidate, mass, true);
368+
if (fillSwapMassHypo) {
369+
if (candidate.isSelMassHypo1()) {
370+
double mass = hfHelper.getCandMass<CharmHad, true>(candidate);
371+
fillHistogramsRecSig<CharmHad, SignalClasses::Bkg>(candidate, mass, true);
372+
}
368373
}
369374
}
370375
}

0 commit comments

Comments
 (0)