@@ -115,7 +115,6 @@ struct FlowGenericFramework {
115115 O2_DEFINE_CONFIGURABLE (cfgMagField, float , 99999 , " Configurable magnetic field; default CCDB will be queried" );
116116 O2_DEFINE_CONFIGURABLE (cfgTofPtCut, float , 1.0 , " pt cut on TOF for PID" );
117117
118-
119118 Configurable<GFWBinningCuts> cfgGFWBinning{" cfgGFWBinning" , {40 , 16 , 72 , 300 , 0 , 3000 , 0.2 , 10.0 , 0.2 , 3.0 , {0.2 , 0.25 , 0.3 , 0.35 , 0.4 , 0.45 , 0.5 , 0.55 , 0.6 , 0.65 , 0.7 , 0.75 , 0.8 , 0.85 , 0.9 , 0.95 , 1 , 1.1 , 1.2 , 1.3 , 1.4 , 1.5 , 1.6 , 1.7 , 1.8 , 1.9 , 2 , 2.2 , 2.4 , 2.6 , 2.8 , 3 , 3.5 , 4 , 5 , 6 , 8 , 10 }, {0 , 5 , 10 , 20 , 30 , 40 , 50 , 60 , 70 , 80 , 90 }}, " Configuration for binning" };
120119 Configurable<GFWRegions> cfgRegions{" cfgRegions" , {{" refN" , " refP" , " refFull" }, {-0.8 , 0.4 , -0.8 }, {-0.4 , 0.8 , 0.8 }, {0 , 0 , 0 }, {1 , 1 , 1 }}, " Configurations for GFW regions" };
121120
@@ -267,16 +266,15 @@ struct FlowGenericFramework {
267266 registry.get <TH1>(HIST (" eventQA/eventSel" ))->GetXaxis ()->SetBinLabel (10 , " after Mult cuts" );
268267 registry.get <TH1>(HIST (" eventQA/eventSel" ))->GetXaxis ()->SetBinLabel (11 , " has track + within cent" );
269268
270- if (!cfgRunByRun){
271- if (cfgUsePID){
272- registry.add <TH3>(" phi_eta_vtxz_ref" , " " , {HistType::kTH3D , {phiAxis,etaAxis,vtxAxis}});
273- registry.add <TH3>(" phi_eta_vtxz_ch" , " " , {HistType::kTH3D , {phiAxis,etaAxis,vtxAxis}});
274- registry.add <TH3>(" phi_eta_vtxz_pi" , " " , {HistType::kTH3D , {phiAxis,etaAxis,vtxAxis}});
275- registry.add <TH3>(" phi_eta_vtxz_ka" , " " , {HistType::kTH3D , {phiAxis,etaAxis,vtxAxis}});
276- registry.add <TH3>(" phi_eta_vtxz_pr" , " " , {HistType::kTH3D , {phiAxis,etaAxis,vtxAxis}});
277- }
278- else {
279- registry.add <TH3>(" phi_eta_vtxz_ref" , " " , {HistType::kTH3D , {phiAxis,etaAxis,vtxAxis}});
269+ if (!cfgRunByRun) {
270+ if (cfgUsePID) {
271+ registry.add <TH3>(" phi_eta_vtxz_ref" , " " , {HistType::kTH3D , {phiAxis, etaAxis, vtxAxis}});
272+ registry.add <TH3>(" phi_eta_vtxz_ch" , " " , {HistType::kTH3D , {phiAxis, etaAxis, vtxAxis}});
273+ registry.add <TH3>(" phi_eta_vtxz_pi" , " " , {HistType::kTH3D , {phiAxis, etaAxis, vtxAxis}});
274+ registry.add <TH3>(" phi_eta_vtxz_ka" , " " , {HistType::kTH3D , {phiAxis, etaAxis, vtxAxis}});
275+ registry.add <TH3>(" phi_eta_vtxz_pr" , " " , {HistType::kTH3D , {phiAxis, etaAxis, vtxAxis}});
276+ } else {
277+ registry.add <TH3>(" phi_eta_vtxz_ref" , " " , {HistType::kTH3D , {phiAxis, etaAxis, vtxAxis}});
280278 }
281279 }
282280 }
@@ -385,17 +383,16 @@ struct FlowGenericFramework {
385383 uint64_t timestamp = bc.timestamp ();
386384 if (!cfgRunByRun && cfg.correctionsLoaded )
387385 return ;
388- if (!cfgAcceptance.value .empty ()) {
389- std::string runstr = (cfgRunByRun)? " RBR/" : " " ;
386+ if (!cfgAcceptance.value .empty ()) {
387+ std::string runstr = (cfgRunByRun) ? " RBR/" : " " ;
390388 cfg.mAcceptance .clear ();
391- if (cfgUsePID){
392- cfg.mAcceptance .push_back (ccdb->getForTimeStamp <GFWWeights>(cfgAcceptance.value +runstr+" ref/" , timestamp));
393- cfg.mAcceptance .push_back (ccdb->getForTimeStamp <GFWWeights>(cfgAcceptance.value +runstr+" ch/" , timestamp));
394- cfg.mAcceptance .push_back (ccdb->getForTimeStamp <GFWWeights>(cfgAcceptance.value +runstr+" pi/" , timestamp));
395- cfg.mAcceptance .push_back (ccdb->getForTimeStamp <GFWWeights>(cfgAcceptance.value +runstr+" ka/" , timestamp));
396- cfg.mAcceptance .push_back (ccdb->getForTimeStamp <GFWWeights>(cfgAcceptance.value +runstr+" pr/" , timestamp));
397- }
398- else {
389+ if (cfgUsePID) {
390+ cfg.mAcceptance .push_back (ccdb->getForTimeStamp <GFWWeights>(cfgAcceptance.value + runstr + " ref/" , timestamp));
391+ cfg.mAcceptance .push_back (ccdb->getForTimeStamp <GFWWeights>(cfgAcceptance.value + runstr + " ch/" , timestamp));
392+ cfg.mAcceptance .push_back (ccdb->getForTimeStamp <GFWWeights>(cfgAcceptance.value + runstr + " pi/" , timestamp));
393+ cfg.mAcceptance .push_back (ccdb->getForTimeStamp <GFWWeights>(cfgAcceptance.value + runstr + " ka/" , timestamp));
394+ cfg.mAcceptance .push_back (ccdb->getForTimeStamp <GFWWeights>(cfgAcceptance.value + runstr + " pr/" , timestamp));
395+ } else {
399396 cfg.mAcceptance .push_back (ccdb->getForTimeStamp <GFWWeights>(cfgAcceptance.value + runstr, timestamp));
400397 }
401398 }
@@ -413,7 +410,7 @@ struct FlowGenericFramework {
413410 double getAcceptance (TTrack track, const double & vtxz, int index)
414411 { // 0 ref, 1 ch, 2 pi, 3 ka, 4 pr
415412 double wacc = 1 ;
416- if (!cfg.mAcceptance .empty ())
413+ if (!cfg.mAcceptance .empty ())
417414 wacc = cfg.mAcceptance [index]->getNUA (track.phi (), track.eta (), vtxz);
418415 return wacc;
419416 }
@@ -455,7 +452,7 @@ struct FlowGenericFramework {
455452 }
456453
457454 template <typename TCollision>
458- bool eventSelected (TCollision collision, const int & multTrk, const float & centrality, const int & run)
455+ bool eventSelected (TCollision collision, const int & multTrk, const float & centrality, const int & run)
459456 {
460457 if (cfgTVXinTRD) {
461458 if (collision.alias_bit (kTVXinTRD )) {
@@ -464,7 +461,8 @@ struct FlowGenericFramework {
464461 return 0 ;
465462 }
466463 registry.fill (HIST (" eventQA/eventSel" ), 3.5 );
467- if (cfgRunByRun) th1sList[run][hEventSel]->Fill (3.5 );
464+ if (cfgRunByRun)
465+ th1sList[run][hEventSel]->Fill (3.5 );
468466 }
469467
470468 if (cfgNoSameBunchPileupCut) {
@@ -474,7 +472,8 @@ struct FlowGenericFramework {
474472 return 0 ;
475473 }
476474 registry.fill (HIST (" eventQA/eventSel" ), 4.5 );
477- if (cfgRunByRun) th1sList[run][hEventSel]->Fill (4.5 );
475+ if (cfgRunByRun)
476+ th1sList[run][hEventSel]->Fill (4.5 );
478477 }
479478 if (cfgIsGoodZvtxFT0vsPV) {
480479 if (!collision.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV )) {
@@ -483,15 +482,17 @@ struct FlowGenericFramework {
483482 return 0 ;
484483 }
485484 registry.fill (HIST (" eventQA/eventSel" ), 5.5 );
486- if (cfgRunByRun) th1sList[run][hEventSel]->Fill (5.5 );
485+ if (cfgRunByRun)
486+ th1sList[run][hEventSel]->Fill (5.5 );
487487 }
488488 if (cfgNoCollInTimeRangeStandard) {
489489 if (!collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard )) {
490490 // Rejection of the collisions which have other events nearby
491491 return 0 ;
492492 }
493493 registry.fill (HIST (" eventQA/eventSel" ), 6.5 );
494- if (cfgRunByRun) th1sList[run][hEventSel]->Fill (6.5 );
494+ if (cfgRunByRun)
495+ th1sList[run][hEventSel]->Fill (6.5 );
495496 }
496497
497498 if (cfgIsVertexITSTPC) {
@@ -500,15 +501,17 @@ struct FlowGenericFramework {
500501 return 0 ;
501502 }
502503 registry.fill (HIST (" eventQA/eventSel" ), 7.5 );
503- if (cfgRunByRun) th1sList[run][hEventSel]->Fill (7.5 );
504+ if (cfgRunByRun)
505+ th1sList[run][hEventSel]->Fill (7.5 );
504506 }
505507
506508 if (cfgIsGoodITSLayersAll) {
507509 if (!collision.selection_bit (o2::aod::evsel::kIsGoodITSLayersAll )) {
508510 return 0 ;
509511 }
510512 registry.fill (HIST (" eventQA/eventSel" ), 8.5 );
511- if (cfgRunByRun) th1sList[run][hEventSel]->Fill (8.5 );
513+ if (cfgRunByRun)
514+ th1sList[run][hEventSel]->Fill (8.5 );
512515 }
513516 float vtxz = -999 ;
514517 if (collision.numContrib () > 1 ) {
@@ -535,7 +538,8 @@ struct FlowGenericFramework {
535538 if (multTrk > fMultCutHigh ->Eval (centrality))
536539 return 0 ;
537540 registry.fill (HIST (" eventQA/eventSel" ), 9.5 );
538- if (cfgRunByRun) th1sList[run][hEventSel]->Fill (9.5 );
541+ if (cfgRunByRun)
542+ th1sList[run][hEventSel]->Fill (9.5 );
539543 }
540544
541545 /* 22s
@@ -592,12 +596,12 @@ struct FlowGenericFramework {
592596 if (withinPtRef && !pid_index)
593597 th3sList[run][hNUAref]->Fill (track.phi (), track.eta (), vtxz); // pt-subset of charged particles for ref flow
594598 if (withinPtPOI)
595- th3sList[run][hNUAch+ pid_index]->Fill (track.phi (), track.eta (), vtxz); // charged and id'ed particle weights
599+ th3sList[run][hNUAch + pid_index]->Fill (track.phi (), track.eta (), vtxz); // charged and id'ed particle weights
596600 } else {
597601 if (withinPtRef && !pid_index)
598602 registry.fill (HIST (" hPhiEtaVtxz_ref" ), track.phi (), track.eta (), vtxz); // pt-subset of charged particles for ref flow
599- if (withinPtPOI){
600- switch (pid_index){
603+ if (withinPtPOI) {
604+ switch (pid_index) {
601605 case 0 :
602606 registry.fill (HIST (" hPhiEtaVtxz_ch" ), track.phi (), track.eta (), vtxz); // charged particle weights
603607 break ;
@@ -622,7 +626,7 @@ struct FlowGenericFramework {
622626 return ;
623627 }
624628
625- void createRunByRunHistograms (const int & run)
629+ void createRunByRunHistograms (const int & run)
626630 {
627631 AxisSpec phiAxis = {phibins, philow, phiup, " #phi" };
628632 AxisSpec etaAxis = {etabins, -cfgEta, cfgEta, " #eta" };
@@ -648,13 +652,13 @@ struct FlowGenericFramework {
648652 th1sList.insert (std::make_pair (run, histos));
649653 std::vector<std::shared_ptr<TH3>> histos3d (kCount_TH3Names );
650654 if (cfgUsePID) {
651- histos3d[hNUAref] = registry.add <TH3>(Form (" %d/phi_eta_vtxz_ref" , run), " " , {HistType::kTH3D , {phiAxis,etaAxis,vtxAxis}});
652- histos3d[hNUAch] = registry.add <TH3>(Form (" %d/phi_eta_vtxz_ch" , run), " " , {HistType::kTH3D , {phiAxis,etaAxis,vtxAxis}});
653- histos3d[hNUApi] = registry.add <TH3>(Form (" %d/phi_eta_vtxz_pi" , run), " " , {HistType::kTH3D , {phiAxis,etaAxis,vtxAxis}});
654- histos3d[hNUAka] = registry.add <TH3>(Form (" %d/phi_eta_vtxz_ka" , run), " " , {HistType::kTH3D , {phiAxis,etaAxis,vtxAxis}});
655- histos3d[hNUApr] = registry.add <TH3>(Form (" %d/phi_eta_vtxz_pr" , run), " " , {HistType::kTH3D , {phiAxis,etaAxis,vtxAxis}});
655+ histos3d[hNUAref] = registry.add <TH3>(Form (" %d/phi_eta_vtxz_ref" , run), " " , {HistType::kTH3D , {phiAxis, etaAxis, vtxAxis}});
656+ histos3d[hNUAch] = registry.add <TH3>(Form (" %d/phi_eta_vtxz_ch" , run), " " , {HistType::kTH3D , {phiAxis, etaAxis, vtxAxis}});
657+ histos3d[hNUApi] = registry.add <TH3>(Form (" %d/phi_eta_vtxz_pi" , run), " " , {HistType::kTH3D , {phiAxis, etaAxis, vtxAxis}});
658+ histos3d[hNUAka] = registry.add <TH3>(Form (" %d/phi_eta_vtxz_ka" , run), " " , {HistType::kTH3D , {phiAxis, etaAxis, vtxAxis}});
659+ histos3d[hNUApr] = registry.add <TH3>(Form (" %d/phi_eta_vtxz_pr" , run), " " , {HistType::kTH3D , {phiAxis, etaAxis, vtxAxis}});
656660 } else {
657- histos3d[hNUAref] = registry.add <TH3>(Form (" %d/phi_eta_vtxz_ref" , run), " " , {HistType::kTH3D , {phiAxis,etaAxis,vtxAxis}});
661+ histos3d[hNUAref] = registry.add <TH3>(Form (" %d/phi_eta_vtxz_ref" , run), " " , {HistType::kTH3D , {phiAxis, etaAxis, vtxAxis}});
658662 }
659663 th3sList.insert (std::make_pair (run, histos3d));
660664 return ;
@@ -701,9 +705,10 @@ struct FlowGenericFramework {
701705 if (centrality < centbinning.front () || centrality > centbinning.back ())
702706 return ;
703707 registry.fill (HIST (" eventQA/eventSel" ), 10.5 );
704- if (cfgRunByRun) th1sList[run][hEventSel]->Fill (10.5 );
708+ if (cfgRunByRun)
709+ th1sList[run][hEventSel]->Fill (10.5 );
705710 float vtxz = collision.posZ ();
706- if (dt!= kGen && cfgRunByRun){
711+ if (dt != kGen && cfgRunByRun) {
707712 th1sList[run][hVtxZ]->Fill (vtxz);
708713 th1sList[run][hMult]->Fill (tracks.size ());
709714 th1sList[run][hCent]->Fill (centrality);
@@ -754,9 +759,9 @@ struct FlowGenericFramework {
754759 fillGFW<kReco >(mcParticle, vtxz, pidIndex);
755760 }
756761
757- if (cfgFillQA){
762+ if (cfgFillQA) {
758763 fillTrackQA<kReco , kAfter >(track, vtxz);
759- if (cfgRunByRun){
764+ if (cfgRunByRun) {
760765 th1sList[run][hPhi]->Fill (track.phi ());
761766 th1sList[run][hEta]->Fill (track.eta ());
762767 }
@@ -806,9 +811,9 @@ struct FlowGenericFramework {
806811 fillPtSums<kReco >(track, vtxz);
807812 fillGFW<kReco >(track, vtxz, pidIndex);
808813 }
809- if (cfgFillQA){
814+ if (cfgFillQA) {
810815 fillTrackQA<kReco , kAfter >(track, vtxz);
811- if (cfgRunByRun){
816+ if (cfgRunByRun) {
812817 th1sList[run][hPhi]->Fill (track.phi ());
813818 th1sList[run][hEta]->Fill (track.eta ());
814819 }
@@ -910,15 +915,14 @@ struct FlowGenericFramework {
910915 int run = bc.runNumber ();
911916 if (run != lastRun) {
912917 lastRun = run;
913- LOGF (info," run = %d" ,run);
914- if (cfgRunByRun){
915- if (std::find (runNumbers.begin (), runNumbers.end (), run) == runNumbers.end ()){
916- LOGF (info," Creating histograms for run %d" ,run);
918+ LOGF (info, " run = %d" , run);
919+ if (cfgRunByRun) {
920+ if (std::find (runNumbers.begin (), runNumbers.end (), run) == runNumbers.end ()) {
921+ LOGF (info, " Creating histograms for run %d" , run);
917922 createRunByRunHistograms (run);
918923 runNumbers.push_back (run);
919- }
920- else {
921- LOGF (info," run %d already in runNumbers" ,run);
924+ } else {
925+ LOGF (info, " run %d already in runNumbers" , run);
922926 }
923927 if (!cfgFillWeights)
924928 loadCorrections (bc);
@@ -927,18 +931,21 @@ struct FlowGenericFramework {
927931 if (!cfgFillWeights && !cfgRunByRun)
928932 loadCorrections (bc);
929933 registry.fill (HIST (" eventQA/eventSel" ), 0.5 );
930- if (cfgRunByRun) th1sList[run][hEventSel]->Fill (0.5 );
934+ if (cfgRunByRun)
935+ th1sList[run][hEventSel]->Fill (0.5 );
931936 if (!collision.sel8 ())
932937 return ;
933938 registry.fill (HIST (" eventQA/eventSel" ), 1.5 );
934- if (cfgRunByRun) th1sList[run][hEventSel]->Fill (1.5 );
939+ if (cfgRunByRun)
940+ th1sList[run][hEventSel]->Fill (1.5 );
935941 if (cfgOccupancySelection != -999 ) {
936942 int occupancy = collision.trackOccupancyInTimeRange ();
937943 if (occupancy < 0 || occupancy > cfgOccupancySelection)
938944 return ;
939945 }
940946 registry.fill (HIST (" eventQA/eventSel" ), 2.5 );
941- if (cfgRunByRun) th1sList[run][hEventSel]->Fill (2.5 );
947+ if (cfgRunByRun)
948+ th1sList[run][hEventSel]->Fill (2.5 );
942949 const auto centrality = collision.centFT0C ();
943950 if (cfgFillQA)
944951 fillEventQA<kBefore >(collision, tracks);
0 commit comments