@@ -44,7 +44,9 @@ static constexpr int kCentFT0As = 8;
4444static constexpr int kCentFT0Cs = 9 ;
4545static constexpr int kCentFDDMs = 10 ;
4646static constexpr int kCentNTPVs = 11 ;
47- static constexpr int nTables = 12 ;
47+ static constexpr int kCentNGlobals = 12 ;
48+ static constexpr int kCentMFTs = 13 ;
49+ static constexpr int nTables = 14 ;
4850static constexpr int nParameters = 1 ;
4951static const std::vector<std::string> tableNames{" CentRun2V0Ms" ,
5052 " CentRun2V0As" ,
@@ -57,9 +59,11 @@ static const std::vector<std::string> tableNames{"CentRun2V0Ms",
5759 " CentFT0As" ,
5860 " CentFT0Cs" ,
5961 " CentFDDMs" ,
60- " CentNTPVs" };
62+ " CentNTPVs" ,
63+ " CentNGlobals" ,
64+ " CentMFTs" };
6165static const std::vector<std::string> parameterNames{" Enable" };
62- static const int defaultParameters[nTables][nParameters]{{-1 }, {-1 }, {-1 }, {-1 }, {-1 }, {-1 }, {-1 }, {-1 }, {-1 }, {-1 }, {-1 }, {-1 }};
66+ static const int defaultParameters[nTables][nParameters]{{-1 }, {-1 }, {-1 }, {-1 }, {-1 }, {-1 }, {-1 }, {-1 }, {-1 }, {-1 }, {-1 }, {-1 }, {- 1 }, {- 1 } };
6367
6468struct CentralityTable {
6569 Produces<aod::CentRun2V0Ms> centRun2V0M;
@@ -74,6 +78,8 @@ struct CentralityTable {
7478 Produces<aod::CentFT0Cs> centFT0C;
7579 Produces<aod::CentFDDMs> centFDDM;
7680 Produces<aod::CentNTPVs> centNTPV;
81+ Produces<aod::CentNGlobals> centNGlobals;
82+ Produces<aod::CentMFTs> centMFTs;
7783 Service<o2::ccdb::BasicCCDBManager> ccdb;
7884 Configurable<LabeledArray<int >> enabledTables{" enabledTables" ,
7985 {defaultParameters[0 ], nTables, nParameters, tableNames, parameterNames},
@@ -162,6 +168,8 @@ struct CentralityTable {
162168 calibrationInfo FT0CInfo = calibrationInfo(" FT0C" );
163169 calibrationInfo FDDMInfo = calibrationInfo(" FDD" );
164170 calibrationInfo NTPVInfo = calibrationInfo(" NTracksPV" );
171+ calibrationInfo NGlobalInfo = calibrationInfo(" NGlobal" );
172+ calibrationInfo MFTInfo = calibrationInfo(" MFT" );
165173 std::vector<int > mEnabledTables ; // Vector of enabled tables
166174 std::array<bool , nTables> isTableEnabled;
167175
@@ -438,6 +446,8 @@ struct CentralityTable {
438446 bool enableCentFT0 = true ,
439447 bool enableCentFDD = true ,
440448 bool enableCentNTPV = true ,
449+ bool enableCentNGlobal = false ,
450+ bool enableCentMFT = false ,
441451 typename CollisionType>
442452 void produceRun3Tables (CollisionType const & collisions)
443453 {
@@ -462,6 +472,12 @@ struct CentralityTable {
462472 case kCentNTPVs :
463473 centNTPV.reserve (collisions.size ());
464474 break ;
475+ case kCentNGlobals :
476+ centNGlobals.reserve (collisions.size ());
477+ break ;
478+ case kCentMFTs :
479+ centMFTs.reserve (collisions.size ());
480+ break ;
465481 default :
466482 LOGF (fatal, " Table %d not supported in Run3" , table);
467483 break ;
@@ -505,6 +521,8 @@ struct CentralityTable {
505521 FT0CInfo.mCalibrationStored = false ;
506522 FDDMInfo.mCalibrationStored = false ;
507523 NTPVInfo.mCalibrationStored = false ;
524+ NGlobalInfo.mCalibrationStored = false ;
525+ MFTInfo.mCalibrationStored = false ;
508526 if (callst != nullptr ) {
509527 if (produceHistograms) {
510528 listCalib->Add (callst->Clone (Form (" %i" , bc.runNumber ())));
@@ -552,6 +570,12 @@ struct CentralityTable {
552570 case kCentNTPVs :
553571 getccdb (NTPVInfo, ccdbConfig.genName );
554572 break ;
573+ case kCentNGlobals :
574+ getccdb (NGlobalInfo, ccdbConfig.genName );
575+ break ;
576+ case kCentMFTs :
577+ getccdb (MFTInfo, ccdbConfig.genName );
578+ break ;
555579 default :
556580 LOGF (fatal, " Table %d not supported in Run3" , table);
557581 break ;
@@ -658,6 +682,16 @@ struct CentralityTable {
658682 populateTable (centNTPV, NTPVInfo, collision.multZeqNTracksPV ());
659683 }
660684 break ;
685+ case kCentNGlobals :
686+ if constexpr (enableCentNGlobal) {
687+ populateTable (centNGlobals, NGlobalInfo, collision.multNTracksGlobal ());
688+ }
689+ break ;
690+ case kCentMFTs :
691+ if constexpr (enableCentMFT) {
692+ populateTable (centMFTs, MFTInfo, collision.mftNtracks ());
693+ }
694+ break ;
661695 default :
662696 LOGF (fatal, " Table %d not supported in Run3" , table);
663697 break ;
@@ -666,6 +700,11 @@ struct CentralityTable {
666700 }
667701 }
668702
703+ void processRun3Complete (soa::Join<aod::Collisions, aod::PVMults, aod::MultZeqs, aod::EvSels, aod::MultsGlobal, aod::MFTMults> const & collisions, BCsWithTimestamps const &)
704+ {
705+ produceRun3Tables<true , true , true , true , true , true >(collisions);
706+ }
707+
669708 void processRun3 (soa::Join<aod::Collisions, aod::PVMults, aod::MultZeqs, aod::EvSels> const & collisions, BCsWithTimestamps const &)
670709 {
671710 produceRun3Tables (collisions);
0 commit comments