3535#include " Common/Core/PID/PIDTOF.h"
3636#include " Common/TableProducer/PID/pidTOFBase.h"
3737#include " Common/Core/EventPlaneHelper.h"
38- #include " PWGLF/DataModel/EPCalibrationTables.h"
3938#include " Common/DataModel/Qvectors.h"
4039
4140#include " DataFormatsParameters/GRPMagField.h"
4443#include " DetectorsBase/GeometryManager.h"
4544#include " DetectorsBase/Propagator.h"
4645
46+ #include " EventFiltering/Zorro.h"
47+
4748#include " Framework/AnalysisDataModel.h"
4849#include " Framework/AnalysisTask.h"
4950#include " Framework/ASoAHelpers.h"
5253
5354#include " ReconstructionDataFormats/Track.h"
5455
56+ #include " PWGLF/DataModel/EPCalibrationTables.h"
5557#include " PWGLF/DataModel/LFSlimNucleiTables.h"
5658
5759#include " TRandom3.h"
@@ -211,6 +213,7 @@ struct nucleiSpectra {
211213 Produces<o2::aod::NucleiTableMC> nucleiTableMC;
212214 Produces<o2::aod::NucleiTableFlow> nucleiTableFlow;
213215 Service<o2::ccdb::BasicCCDBManager> ccdb;
216+ Zorro zorro;
214217
215218 Configurable<bool > cfgCompensatePIDinTracking{" cfgCompensatePIDinTracking" , false , " If true, divide tpcInnerParam by the electric charge" };
216219
@@ -254,6 +257,8 @@ struct nucleiSpectra {
254257 ConfigurableAxis cfgNITSClusBins{" cfgNITSClusBins" , {3 , 4.5 , 7.5 }, " N ITS clusters binning" };
255258 ConfigurableAxis cfgNTPCClusBins{" cfgNTPCClusBins" , {3 , 89.5 , 159.5 }, " N TPC clusters binning" };
256259
260+ Configurable<bool > cfgSkimmedProcessing{" cfgSkimmedProcessing" , false , " Skimmed dataset processing" };
261+
257262 // CCDB options
258263 Configurable<int > cfgMaterialCorrection{" cfgMaterialCorrection" , static_cast <int >(o2::base::Propagator::MatCorrType::USEMatCorrLUT), " Type of material correction" };
259264 Configurable<std::string> cfgCCDBurl{" ccdb-url" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
@@ -308,7 +313,7 @@ struct nucleiSpectra {
308313
309314 float computeEventPlane (float y, float x)
310315 {
311- return 0.5 * TMath::ATan2 (y, x);
316+ return 0.5 * std::atan2 (y, x);
312317 }
313318
314319 template <class collision_t >
@@ -322,6 +327,9 @@ struct nucleiSpectra {
322327 if (mRunNumber == bc.runNumber ()) {
323328 return ;
324329 }
330+ if (cfgSkimmedProcessing) {
331+ zorro.initCCDB (ccdb.service , bc.runNumber (), bc.timestamp (), " fHe3" );
332+ }
325333 auto timestamp = bc.timestamp ();
326334 mRunNumber = bc.runNumber ();
327335
@@ -548,13 +556,13 @@ struct nucleiSpectra {
548556 if (cfgFlowHist->get (iS) && doprocessDataFlow) {
549557 if constexpr (std::is_same<Tcoll, CollWithEP>::value) {
550558 auto deltaPhiInRange = getPhiInRange (fvector.phi () - collision.psiFT0C ());
551- auto v2 = TMath::Cos (2.0 * deltaPhiInRange);
559+ auto v2 = std::cos (2.0 * deltaPhiInRange);
552560 nuclei::hFlowHists[iC][iS]->Fill (collision.centFT0C (), fvector.pt (), nSigma[0 ][iS], tofMass, v2, track.itsNCls (), track.tpcNClsFound (), track.hasTRD ());
553561 }
554562 } else if (cfgFlowHist->get (iS) && doprocessDataFlowAlternative) {
555563 if constexpr (std::is_same<Tcoll, CollWithQvec>::value) {
556564 auto deltaPhiInRange = getPhiInRange (fvector.phi () - computeEventPlane (collision.qvecFT0CIm (), collision.qvecFT0CRe ()));
557- auto v2 = TMath::Cos (2.0 * deltaPhiInRange);
565+ auto v2 = std::cos (2.0 * deltaPhiInRange);
558566 nuclei::hFlowHists[iC][iS]->Fill (collision.centFT0C (), fvector.pt (), nSigma[0 ][iS], tofMass, v2, track.itsNCls (), track.tpcNClsFound (), track.hasTRD ());
559567 }
560568 }
@@ -617,6 +625,10 @@ struct nucleiSpectra {
617625 if (!eventSelection (collision)) {
618626 return ;
619627 }
628+ if (cfgSkimmedProcessing) {
629+ zorro.isSelected (collision.bc_as <aod::BCsWithTimestamps>().globalBC ()); // / Just let Zorro do the accounting
630+ }
631+
620632 fillDataInfo (collision, tracks);
621633 for (auto & c : nuclei::candidates) {
622634 nucleiTable (c.pt , c.eta , c.phi , c.tpcInnerParam , c.beta , c.zVertex , c.DCAxy , c.DCAz , c.TPCsignal , c.ITSchi2 , c.TPCchi2 , c.flags , c.TPCfindableCls , c.TPCcrossedRows , c.ITSclsMap , c.TPCnCls , c.clusterSizesITS );
0 commit comments