Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions PWGLF/TableProducer/Nuspex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ o2physics_add_dpl_workflow(hyper-kink-reco-task

o2physics_add_dpl_workflow(hypertriton-reco-task
SOURCES hyperRecoTask.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter O2Physics::EventFilteringUtils
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(lnn-reco-task
Expand Down Expand Up @@ -77,4 +77,4 @@ o2physics_add_dpl_workflow(ebye-maker
o2physics_add_dpl_workflow(cluster-studies-tree-creator
SOURCES LFTreeCreatorClusterStudies.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
COMPONENT_NAME Analysis)
16 changes: 15 additions & 1 deletion PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "DataFormatsParameters/GRPMagField.h"
#include "CCDB/BasicCCDBManager.h"

#include "EventFiltering/Zorro.h"
#include "Common/Core/PID/TPCPIDResponse.h"
#include "DataFormatsTPC/BetheBlochAleph.h"
#include "DCAFitter/DCAFitterN.h"
Expand Down Expand Up @@ -122,6 +123,7 @@ struct hyperRecoTask {
Produces<aod::DataHypCandsFlow> outputDataTableWithFlow;
Produces<aod::MCHypCands> outputMCTable;
Service<o2::ccdb::BasicCCDBManager> ccdb;
Zorro zorro;

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

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

hEvents = qaRegistry.add<TH1>("hEvents", ";Events; ", HistType::kTH1D, {{2, -0.5, 1.5}});
hEvents = qaRegistry.add<TH1>("hEvents", ";Events; ", HistType::kTH1D, {{3, -0.5, 2.5}});
hEvents->GetXaxis()->SetBinLabel(1, "All");
hEvents->GetXaxis()->SetBinLabel(2, "Selected");
hEvents->GetXaxis()->SetBinLabel(3, "Zorro He events");
if (doprocessMC) {
hDecayChannel = qaRegistry.add<TH1>("hDecayChannel", ";Decay channel; ", HistType::kTH1D, {{2, -0.5, 1.5}});
hDecayChannel->GetXaxis()->SetBinLabel(1, "2-body");
Expand All @@ -255,6 +259,9 @@ struct hyperRecoTask {
if (mRunNumber == bc.runNumber()) {
return;
}
if (cfgSkimmedProcessing) {
zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), "fHe");
}
auto run3grp_timestamp = bc.timestamp();

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

if (cfgSkimmedProcessing) {
bool zorroSelected = zorro.isSelected(collision.template bc_as<aod::BCsWithTimestamps>().globalBC()); /// Just let Zorro do the accounting
if (zorroSelected) {
hEvents->Fill(2.);
}
}

goodCollision[collision.globalIndex()] = true;
hEvents->Fill(1.);
hZvtx->Fill(collision.posZ());
Expand Down