3737#include < Framework/InitContext.h>
3838#include < Framework/OutputObjHeader.h>
3939#include < Framework/runDataProcessing.h>
40+ #include < Framework/O2DatabasePDGPlugin.h>
4041
41- #include < TDatabasePDG.h>
4242#include < THn.h>
4343#include < TProfile3D.h>
44+ #include < TPDGCode.h>
4445
4546#include < RtypesCore.h>
4647
@@ -62,6 +63,8 @@ using MyTracksMC = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod:
6263
6364struct jEPFlowAnalysis {
6465
66+ Service<o2::framework::O2DatabasePDG> pdg;
67+
6568 HistogramRegistry epFlowHistograms{" EPFlow" , {}, OutputObjHandlingPolicy::AnalysisObject, true , true };
6669 EventPlaneHelper helperEP;
6770 FlowJHistManager histManager;
@@ -70,9 +73,9 @@ struct jEPFlowAnalysis {
7073 o2::ccdb::CcdbApi ccdbApi;
7174
7275 struct : ConfigurableGroup {
73- Configurable<std::string> cfgURL{ " cfgURL " ,
76+ Configurable<std::string> cfgUrl{ " cfgUrl " ,
7477 " http://alice-ccdb.cern.ch" , " Address of the CCDB to browse" };
75- Configurable<int64_t > nolaterthan{" ccdb-no-later-than " ,
78+ Configurable<int64_t > nolaterthan{" nolaterthan " ,
7679 std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now ().time_since_epoch ()).count (),
7780 " Latest acceptable timestamp of creation for the object" };
7881 } cfgCcdbParam;
@@ -136,6 +139,8 @@ struct jEPFlowAnalysis {
136139
137140 float cent;
138141
142+ float kMinQvecAmp = 1e-5 ;
143+ float kMinChg = 0.1 ;
139144 std::vector<TProfile3D*> shiftprofile{};
140145 std::string fullCCDBShiftCorrPath;
141146
@@ -327,7 +332,7 @@ struct jEPFlowAnalysis {
327332
328333 void init (InitContext const &)
329334 {
330- ccdb->setURL (cfgCcdbParam.cfgURL );
335+ ccdb->setURL (cfgCcdbParam.cfgUrl );
331336 ccdbApi.init (" http://alice-ccdb.cern.ch" );
332337 ccdb->setCaching (true );
333338 ccdb->setLocalObjectValidityChecking ();
@@ -418,7 +423,7 @@ struct jEPFlowAnalysis {
418423 }
419424 }
420425
421- if (coll.qvecAmp ()[detId] < 1e-5 || coll.qvecAmp ()[refAId] < 1e-5 || coll.qvecAmp ()[refBId] < 1e-5 )
426+ if (coll.qvecAmp ()[detId] < kMinQvecAmp || coll.qvecAmp ()[refAId] < kMinQvecAmp || coll.qvecAmp ()[refBId] < kMinQvecAmp )
422427 return ;
423428
424429 fillvn (coll, tracks);
@@ -447,7 +452,7 @@ struct jEPFlowAnalysis {
447452 }
448453 }
449454
450- for (auto trk : tracks) {
455+ for (const auto & trk : tracks) {
451456 if (!trk.has_mcParticle ()) {
452457 continue ;
453458 }
@@ -479,13 +484,13 @@ struct jEPFlowAnalysis {
479484
480485 float cent = coll.centFT0C ();
481486
482- for (auto & mcParticle : mcParticles) {
487+ for (const auto & mcParticle : mcParticles) {
483488 if (std::abs (mcParticle.eta ()) > cfgTrackCuts.cfgEtaMax )
484489 continue ;
485490
486- auto * p = TDatabasePDG::Instance () ->GetParticle (mcParticle.pdgCode ());
487- if (p) {
488- if (std::abs (p->Charge ()) < 1e-1 ) {
491+ auto p = pdg ->GetParticle (mcParticle.pdgCode ());
492+ if (p != nullptr ) {
493+ if (std::abs (p->Charge ()) < kMinChg ) {
489494 continue ;
490495 }
491496 }
0 commit comments