5252#include " PWGJE/DataModel/JetReducedData.h"
5353#include " PWGJE/DataModel/Jet.h"
5454
55+ #include " EventFiltering/Zorro.h"
56+ #include " EventFiltering/ZorroSummary.h"
57+
5558using namespace std ;
5659using namespace o2 ;
5760using namespace o2 ::soa;
@@ -71,6 +74,13 @@ using MCTracks = soa::Join<StrHadronDaughterTracks, aod::McTrackLabels>;
7174
7275struct StrangenessInJets {
7376
77+ // Zorro initialization
78+ Zorro zorro;
79+ OutputObj<ZorroSummary> zorroSummary{" zorroSummary" };
80+ zorroSummary.setObject(zorro.getZorroSummary());
81+ Service<o2::ccdb::BasicCCDBManager> ccdb;
82+ o2::ccdb::CcdbApi ccdbApi;
83+
7484 HistogramRegistry registryData{" registryData" , {}, OutputObjHandlingPolicy::AnalysisObject, true , true };
7585 HistogramRegistry registryMC{" registryMC" , {}, OutputObjHandlingPolicy::AnalysisObject, true , true };
7686 HistogramRegistry registryQC{" registryQC" , {}, OutputObjHandlingPolicy::AnalysisObject, true , true };
@@ -81,6 +91,7 @@ struct StrangenessInJets {
8191 Configurable<double > rJet{" rJet" , 0.3 , " Jet resolution parameter R" };
8292 Configurable<double > zVtx{" zVtx" , 10.0 , " Maximum zVertex" };
8393 Configurable<double > deltaEtaEdge{" deltaEtaEdge" , 0.05 , " eta gap from the edge" };
94+ Configurable<bool > cfgSkimmedProcessing{" cfgSkimmedProcessing" , false , " Skimmed dataset processing" };
8495
8596 // Axis parameters
8697 struct : ConfigurableGroup {
@@ -167,9 +178,6 @@ struct StrangenessInJets {
167178 TH1F* weightsAntiXiInJet;
168179 TH1F* weightsAntiXiInUe;
169180
170- Service<o2::ccdb::BasicCCDBManager> ccdb;
171- o2::ccdb::CcdbApi ccdbApi;
172-
173181 // List of Particles
174182 enum Option { KZeroLambda,
175183 CascadePart,
@@ -180,6 +188,13 @@ struct StrangenessInJets {
180188 // Jet background subtraction
181189 JetBkgSubUtils backgroundSub;
182190
191+ void initCCDB (aod::BCsWithTimestamps::iterator const & bc)
192+ {
193+ if (cfgSkimmedProcessing) {
194+ zorro.initCCDB (ccdb.service , bc.runNumber (), bc.timestamp (), " fOmega" );
195+ }
196+ }
197+
183198 void init (InitContext const &)
184199 {
185200 ccdb->setURL (urlToCcdb.value );
@@ -501,27 +516,38 @@ struct StrangenessInJets {
501516 template <typename JetTrack>
502517 bool passedTrackSelectionForJetReconstruction (const JetTrack& track)
503518 {
519+ const int minTpcCr = 70 ;
520+ const double minCrFindable = 0.8 ;
521+ const double maxChi2Tpc = 4.0 ;
522+ const double maxChi2Its = 36.0 ;
523+ const double maxPseudorapidity = 0.8 ;
524+ const double minPtTrack = 0.1 ;
525+ const double dcaxyMaxTrackPar0 = 0.0105 ;
526+ const double dcaxyMaxTrackPar1 = 0.035 ;
527+ const double dcaxyMaxTrackPar2 = 1.1 ;
528+ const double dcazMaxTrack = 2.0 ;
529+
504530 if (!track.hasITS ())
505531 return false ;
506532 if ((!hasITSHit (track, 1 )) && (!hasITSHit (track, 2 )) && (!hasITSHit (track, 3 )))
507533 return false ;
508534 if (!track.hasTPC ())
509535 return false ;
510- if (track.tpcNClsCrossedRows () < 70 )
536+ if (track.tpcNClsCrossedRows () < minTpcCr )
511537 return false ;
512- if ((static_cast <double >(track.tpcNClsCrossedRows ()) / static_cast <double >(track.tpcNClsFindable ())) < 0.8 )
538+ if ((static_cast <double >(track.tpcNClsCrossedRows ()) / static_cast <double >(track.tpcNClsFindable ())) < minCrFindable )
513539 return false ;
514- if (track.tpcChi2NCl () > 4 )
540+ if (track.tpcChi2NCl () > maxChi2Tpc )
515541 return false ;
516- if (track.itsChi2NCl () > 36 )
542+ if (track.itsChi2NCl () > maxChi2Its )
517543 return false ;
518- if (track.eta () < -0.8 || track.eta () > 0.8 )
544+ if (track.eta () < -maxPseudorapidity || track.eta () > maxPseudorapidity )
519545 return false ;
520- if (track.pt () < 0.1 )
546+ if (track.pt () < minPtTrack )
521547 return false ;
522- if (std::fabs (track.dcaXY ()) > (0.0105 + 0.035 / std::pow (track.pt (), 1.1 )))
548+ if (std::fabs (track.dcaXY ()) > (dcaxyMaxTrackPar0 + dcaxyMaxTrackPar1 / std::pow (track.pt (), dcaxyMaxTrackPar2 )))
523549 return false ;
524- if (std::fabs (track.dcaZ ()) > 2.0 )
550+ if (std::fabs (track.dcaZ ()) > dcazMaxTrack )
525551 return false ;
526552 return true ;
527553 }
@@ -932,9 +958,11 @@ struct StrangenessInJets {
932958 template <typename pionTrack>
933959 bool isHighPurityPion (const pionTrack& track, const float nsigmaTPC, const float nsigmaTOF)
934960 {
935- if (track.p () < 0.6 && std::fabs (nsigmaTPC) < 2.0 )
961+ double nsigmaPi = 2.0 ;
962+ double pThreshold = 0.6 ;
963+ if (track.p () < pThreshold && std::fabs (nsigmaTPC) < nsigmaPi)
936964 return true ;
937- if (track.p () > 0.6 && std::fabs (nsigmaTPC) < 2.0 && std::fabs (nsigmaTOF) < 2.0 )
965+ if (track.p () > pThreshold && std::fabs (nsigmaTPC) < nsigmaPi && std::fabs (nsigmaTOF) < nsigmaPi )
938966 return true ;
939967 return false ;
940968 }
@@ -1016,6 +1044,13 @@ struct StrangenessInJets {
10161044 // event counter: before event selection
10171045 registryData.fill (HIST (" number_of_events_data" ), 0.5 );
10181046
1047+ auto bc = collision.template bc_as <aod::BCsWithTimestamps>();
1048+ initCCDB (bc);
1049+
1050+ if (cfgSkimmedProcessing && !zorro.isSelected (collision.template bc_as <aod::BCsWithTimestamps>().globalBC ())) {
1051+ return ;
1052+ }
1053+
10191054 // event selection
10201055 if (!collision.sel8 () || std::fabs (collision.posZ ()) > zVtx)
10211056 return ;
@@ -1421,7 +1456,7 @@ struct StrangenessInJets {
14211456 continue ;
14221457
14231458 registryMC.fill (HIST (" number_of_events_mc" ), 1.5 );
1424- if (std::fabs (collision.posZ ()) > 10.0 )
1459+ if (std::fabs (collision.posZ ()) > zVtx )
14251460 continue ;
14261461
14271462 registryMC.fill (HIST (" number_of_events_mc" ), 2.5 );
@@ -1886,7 +1921,7 @@ struct StrangenessInJets {
18861921 for (const auto & mccollision : mcCollisions) {
18871922
18881923 // Selection on z_{vertex}
1889- if (std::fabs (mccollision.posZ ()) > 10.0 )
1924+ if (std::fabs (mccollision.posZ ()) > zVtx )
18901925 continue ;
18911926
18921927 // MC Particles per Collision
@@ -1898,9 +1933,10 @@ struct StrangenessInJets {
18981933
18991934 if (!particle.isPhysicalPrimary ())
19001935 continue ;
1901- if (std::fabs (particle.eta ()) > 0.8 )
1936+ if (std::fabs (particle.eta ()) > etaMax )
19021937 continue ;
1903- if (particle.pt () < 0.1 )
1938+ double ptMinPart = 0.1 ;
1939+ if (particle.pt () < ptMinPart)
19041940 continue ;
19051941
19061942 // 4-momentum representation of a particle
@@ -1956,9 +1992,10 @@ struct StrangenessInJets {
19561992
19571993 if (!particle.isPhysicalPrimary ())
19581994 continue ;
1959- if (std::fabs (particle.eta ()) > 0.8 )
1995+ if (std::fabs (particle.eta ()) > etaMax )
19601996 continue ;
1961- if (particle.pt () < 0.1 )
1997+ double ptMinPart = 0.1 ;
1998+ if (particle.pt () < ptMinPart)
19621999 continue ;
19632000
19642001 TVector3 particleDir (particle.px (), particle.py (), particle.pz ());
0 commit comments