Skip to content

Commit a14d098

Browse files
fmazzascFrancesco Mazzaschi
andauthored
Add Zorro to hypertriton task (#7029)
* zorro draft * Fill histo with zorro events * Fix templatisation * Update CMakeLists.txt * Trigger on both he3 and he4 --------- Co-authored-by: Francesco Mazzaschi <fmazzasc@alipap1.cern.ch>
1 parent 6375829 commit a14d098

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

PWGLF/TableProducer/Nuspex/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ o2physics_add_dpl_workflow(hyper-kink-reco-task
2626

2727
o2physics_add_dpl_workflow(hypertriton-reco-task
2828
SOURCES hyperRecoTask.cxx
29-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter
29+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter O2Physics::EventFilteringUtils
3030
COMPONENT_NAME Analysis)
3131

3232
o2physics_add_dpl_workflow(lnn-reco-task
@@ -77,4 +77,4 @@ o2physics_add_dpl_workflow(ebye-maker
7777
o2physics_add_dpl_workflow(cluster-studies-tree-creator
7878
SOURCES LFTreeCreatorClusterStudies.cxx
7979
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
80-
COMPONENT_NAME Analysis)
80+
COMPONENT_NAME Analysis)

PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "DataFormatsParameters/GRPMagField.h"
3131
#include "CCDB/BasicCCDBManager.h"
3232

33+
#include "EventFiltering/Zorro.h"
3334
#include "Common/Core/PID/TPCPIDResponse.h"
3435
#include "DataFormatsTPC/BetheBlochAleph.h"
3536
#include "DCAFitter/DCAFitterN.h"
@@ -122,6 +123,7 @@ struct hyperRecoTask {
122123
Produces<aod::DataHypCandsFlow> outputDataTableWithFlow;
123124
Produces<aod::MCHypCands> outputMCTable;
124125
Service<o2::ccdb::BasicCCDBManager> ccdb;
126+
Zorro zorro;
125127

126128
// PDG codes
127129
Configurable<int> hyperPdg{"hyperPDG", 1010010030, "PDG code of the hyper-mother (could be 3LamH or 4LamH)"};
@@ -139,6 +141,7 @@ struct hyperRecoTask {
139141
Configurable<float> nTPCClusMinHe{"nTPCClusMinHe", 70, "helium NTPC clusters cut"};
140142
Configurable<float> nTPCClusMinPi{"nTPCClusMinPi", -1., "pion NTPC clusters cut"};
141143
Configurable<bool> mcSignalOnly{"mcSignalOnly", true, "If true, save only signal in MC"};
144+
Configurable<bool> cfgSkimmedProcessing{"cfgSkimmedProcessing", false, "Skimmed dataset processing"};
142145

143146
// Define o2 fitter, 2-prong, active memory (no need to redefine per event)
144147
o2::vertexing::DCAFitterN<2> fitter;
@@ -230,9 +233,10 @@ struct hyperRecoTask {
230233
hH4LMassBefSel = qaRegistry.add<TH1>("hH4LMassBefSel", ";M (GeV/#it{c}^{2}); ", HistType::kTH1D, {{60, 3.76, 3.84}});
231234
hH4LMassTracked = qaRegistry.add<TH1>("hH4LMassTracked", ";M (GeV/#it{c}^{2}); ", HistType::kTH1D, {{60, 3.76, 3.84}});
232235

233-
hEvents = qaRegistry.add<TH1>("hEvents", ";Events; ", HistType::kTH1D, {{2, -0.5, 1.5}});
236+
hEvents = qaRegistry.add<TH1>("hEvents", ";Events; ", HistType::kTH1D, {{3, -0.5, 2.5}});
234237
hEvents->GetXaxis()->SetBinLabel(1, "All");
235238
hEvents->GetXaxis()->SetBinLabel(2, "Selected");
239+
hEvents->GetXaxis()->SetBinLabel(3, "Zorro He events");
236240
if (doprocessMC) {
237241
hDecayChannel = qaRegistry.add<TH1>("hDecayChannel", ";Decay channel; ", HistType::kTH1D, {{2, -0.5, 1.5}});
238242
hDecayChannel->GetXaxis()->SetBinLabel(1, "2-body");
@@ -255,6 +259,9 @@ struct hyperRecoTask {
255259
if (mRunNumber == bc.runNumber()) {
256260
return;
257261
}
262+
if (cfgSkimmedProcessing) {
263+
zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), "fHe");
264+
}
258265
auto run3grp_timestamp = bc.timestamp();
259266

260267
o2::parameters::GRPObject* grpo = ccdb->getForTimeStamp<o2::parameters::GRPObject>(grpPath, run3grp_timestamp);
@@ -317,6 +324,13 @@ struct hyperRecoTask {
317324
continue;
318325
}
319326

327+
if (cfgSkimmedProcessing) {
328+
bool zorroSelected = zorro.isSelected(collision.template bc_as<aod::BCsWithTimestamps>().globalBC()); /// Just let Zorro do the accounting
329+
if (zorroSelected) {
330+
hEvents->Fill(2.);
331+
}
332+
}
333+
320334
goodCollision[collision.globalIndex()] = true;
321335
hEvents->Fill(1.);
322336
hZvtx->Fill(collision.posZ());

0 commit comments

Comments
 (0)