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