1313#include < DataFormatsParameters/GRPMagField.h>
1414#include < cmath>
1515#include < vector>
16+ #include < string>
17+ #include < memory>
1618#include " Framework/runDataProcessing.h"
1719#include " Framework/AnalysisTask.h"
1820#include " Framework/ASoAHelpers.h"
@@ -72,6 +74,8 @@ struct FlowGFWPbPb {
7274 O2_DEFINE_CONFIGURABLE (cfgNoCollInTimeRangeStandard, bool , false , " kNoCollInTimeRangeStandard" );
7375 O2_DEFINE_CONFIGURABLE (cfgOccupancy, bool , false , " Bool for event selection on detector occupancy" );
7476 O2_DEFINE_CONFIGURABLE (cfgMultCut, bool , false , " Use additional event cut on mult correlations" );
77+ O2_DEFINE_CONFIGURABLE (ITSonly, bool , false , " ITS only tracks" )
78+ O2_DEFINE_CONFIGURABLE (Global, bool , false , " Global tracks" )
7579
7680 ConfigurableAxis axisVertex{" axisVertex" , {20 , -10 , 10 }, " vertex axis for histograms" };
7781 ConfigurableAxis axisPhi{" axisPhi" , {60 , 0.0 , constants::math::TwoPI}, " phi axis for histograms" };
@@ -118,11 +122,28 @@ struct FlowGFWPbPb {
118122 kc26,
119123 kc28,
120124 kc22etagap,
125+ kc32etagap,
126+ kc34,
121127
122128 // Count the total number of enum
123129 kCount_ExtraProfile
124130 };
125131
132+ enum eventprogress {
133+ kFILTERED ,
134+ kSEL8 ,
135+ kOCCUPANCY ,
136+ kTVXINTRD ,
137+ kNOTIMEFRAMEBORDER ,
138+ kNOITSROFRAMEBORDER ,
139+ kNOPSAMEBUNCHPILEUP ,
140+ kISGOODZVTXFT0VSPV ,
141+ kNOCOLLINTIMERANGESTANDART ,
142+ kAFTERMULTCUTS ,
143+ kCENTRALITY ,
144+ kNOOFEVENTSTEPS
145+ };
146+
126147 // Additional Event selection cuts - Copy from flowGenericFramework.cxx
127148 TF1* fPhiCutLow = nullptr ;
128149 TF1* fPhiCutHigh = nullptr ;
@@ -141,18 +162,18 @@ struct FlowGFWPbPb {
141162 ccdb->setCreatedNotAfter (nolaterthan.value );
142163
143164 // Add some output objects to the histogram registry
144- registry.add (" hEventCount" , " Number of Events;; No. of Events" , {HistType::kTH1D , {{11 , 0 , 11 }}});
145- registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (1 , " Filtered events" );
146- registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (2 , " Sel8" );
147- registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (3 , " Occupancy" );
148- registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (4 , " kTVXinTRD" );
149- registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (5 , " kNoTimeFrameBorder" );
150- registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (6 , " kNoITSROFrameBorder" );
151- registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (7 , " kNoSameBunchPileup" );
152- registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (8 , " kIsGoodZvtxFT0vsPV" );
153- registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (9 , " kNoCollInTimeRangeStandard" );
154- registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (10 , " After Mult cuts" );
155- registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (11 , " Centrality" );
165+ registry.add (" hEventCount" , " Number of Events;; No. of Events" , {HistType::kTH1D , {{kNOOFEVENTSTEPS , - 0.5 , kNOOFEVENTSTEPS - 0.5 }}});
166+ registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (kFILTERED + 1 , " Filtered events" );
167+ registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (kSEL8 + 1 , " Sel8" );
168+ registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (kOCCUPANCY + 1 , " Occupancy" );
169+ registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (kTVXINTRD + 1 , " kTVXinTRD" );
170+ registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (kNOTIMEFRAMEBORDER + 1 , " kNoTimeFrameBorder" );
171+ registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (kNOITSROFRAMEBORDER + 1 , " kNoITSROFrameBorder" );
172+ registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (kNOPSAMEBUNCHPILEUP + 1 , " kNoSameBunchPileup" );
173+ registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (kISGOODZVTXFT0VSPV + 1 , " kIsGoodZvtxFT0vsPV" );
174+ registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (kNOCOLLINTIMERANGESTANDART + 1 , " kNoCollInTimeRangeStandard" );
175+ registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (kAFTERMULTCUTS + 1 , " After Mult cuts" );
176+ registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (kCENTRALITY + 1 , " Centrality" );
156177 registry.add (" hPhi" , " #phi distribution" , {HistType::kTH1D , {axisPhi}});
157178 registry.add (" hPhiWeighted" , " corrected #phi distribution" , {HistType::kTH1D , {axisPhi}});
158179 registry.add (" hEta" , " " , {HistType::kTH1D , {axisEta}});
@@ -183,6 +204,8 @@ struct FlowGFWPbPb {
183204 registry.add (" Global_Tracks" , " Global Tracks;Centrality FT0C;No. of Events" , kTH1F , {axisCentrality});
184205 registry.add (" Events_per_Centrality_Bin" , " Events_per_Centrality_Bin;Centrality FT0C;No. of Events" , kTH1F , {axisCentrality});
185206 registry.add (" Global_Tracks_Nch_vs_Cent" , " Global Tracks;Centrality (%); M (|#eta| < 0.8);" , {HistType::kTH2D , {axisCentrality, axisNch}});
207+ registry.add (" ITSonly" , " ITS only;Centrality FT0C;Nch" , kTH1F , {axisCentrality});
208+ registry.add (" ITSOnly_Tracks_Nch_vs_Cent" , " ITSOnly Tracks;Centrality (%); M (|#eta| < 0.8);" , {HistType::kTH2D , {axisCentrality, axisNch}});
186209
187210 // Track QA
188211 registry.add (" hPt" , " p_{T} distribution before cut" , {HistType::kTH1D , {axisPtHist}});
@@ -201,6 +224,8 @@ struct FlowGFWPbPb {
201224 registry.add (" c26" , " ;Centrality (%) ; C_{2}{6}" , {HistType::kTProfile , {axisCentrality}});
202225 registry.add (" c28" , " ;Centrality (%) ; C_{2}{8}" , {HistType::kTProfile , {axisCentrality}});
203226 registry.add (" c22etagap" , " ;Centrality (%) ; C_{2}{2} (|#eta| < 0.8) " , {HistType::kTProfile , {axisCentrality}});
227+ registry.add (" c32etagap" , " ;Centrality (%) ; C_{3}{2} (|#eta| < 0.8) " , {HistType::kTProfile , {axisCentrality}});
228+ registry.add (" c34" , " ;Centrality (%) ; C_{3}{4} " , {HistType::kTProfile , {axisCentrality}});
204229
205230 // initial array
206231 BootstrapArray.resize (cfgNbootstrap);
@@ -214,6 +239,8 @@ struct FlowGFWPbPb {
214239 BootstrapArray[i][kc26] = registry.add <TProfile>(Form (" BootstrapContainer_%d/c26" , i), " ;Centrality (%) ; C_{2}{6}" , {HistType::kTProfile , {axisCentrality}});
215240 BootstrapArray[i][kc28] = registry.add <TProfile>(Form (" BootstrapContainer_%d/c28" , i), " ;Centrality (%) ; C_{2}{8}" , {HistType::kTProfile , {axisCentrality}});
216241 BootstrapArray[i][kc22etagap] = registry.add <TProfile>(Form (" BootstrapContainer_%d/c22etagap" , i), " ;Centrality (%) ; C_{2}{2} (|#eta| < 0.8)" , {HistType::kTProfile , {axisCentrality}});
242+ BootstrapArray[i][kc32etagap] = registry.add <TProfile>(Form (" BootstrapContainer_%d/c32etagap" , i), " ;Centrality (%) ; C_{3}{2} (|#eta| < 0.8)" , {HistType::kTProfile , {axisCentrality}});
243+ BootstrapArray[i][kc34] = registry.add <TProfile>(Form (" BootstrapContainer_%d/c34" , i), " ;Centrality (%) ; C_{3}{4}" , {HistType::kTProfile , {axisCentrality}});
217244 }
218245
219246 o2::framework::AxisSpec axis = axisPt;
@@ -242,6 +269,8 @@ struct FlowGFWPbPb {
242269 corrconfigs.push_back (fGFW ->GetCorrelatorConfig (" full {2 2 2 -2 -2 -2}" , " ChFull26" , kFALSE ));
243270 corrconfigs.push_back (fGFW ->GetCorrelatorConfig (" full {2 2 2 2 -2 -2 -2 -2}" , " ChFull28" , kFALSE ));
244271 corrconfigs.push_back (fGFW ->GetCorrelatorConfig (" refN10 {2} refP10 {-2}" , " Ch10Gap22" , kFALSE ));
272+ corrconfigs.push_back (fGFW ->GetCorrelatorConfig (" refN10 {3} refP10 {-3}" , " Ch10Gap32" , kFALSE ));
273+ corrconfigs.push_back (fGFW ->GetCorrelatorConfig (" full {3 3 -3 -3}" , " ChFull34" , kFALSE ));
245274 fGFW ->CreateRegions (); // finalize the initialization
246275
247276 if (cfgUseAdditionalEventCut) {
@@ -369,46 +398,46 @@ struct FlowGFWPbPb {
369398 // TRD triggered
370399 return false ;
371400 }
372- registry.fill (HIST (" hEventCount" ), 3.5 );
401+ registry.fill (HIST (" hEventCount" ), kTVXINTRD );
373402 }
374403 if (cfgNoTimeFrameBorder) {
375404 if (!collision.selection_bit (o2::aod::evsel::kNoTimeFrameBorder )) {
376405 // reject collisions close to Time Frame borders
377406 // https://its.cern.ch/jira/browse/O2-4623
378407 return false ;
379408 }
380- registry.fill (HIST (" hEventCount" ), 4.5 );
409+ registry.fill (HIST (" hEventCount" ), kNOTIMEFRAMEBORDER );
381410 }
382411 if (cfgNoITSROFrameBorder) {
383412 if (!collision.selection_bit (o2::aod::evsel::kNoITSROFrameBorder )) {
384413 // reject events affected by the ITS ROF border
385414 // https://its.cern.ch/jira/browse/O2-4309
386415 return false ;
387416 }
388- registry.fill (HIST (" hEventCount" ), 5.5 );
417+ registry.fill (HIST (" hEventCount" ), kNOITSROFRAMEBORDER );
389418 }
390419 if (cfgNoSameBunchPileup) {
391420 if (!collision.selection_bit (o2::aod::evsel::kNoSameBunchPileup )) {
392421 // rejects collisions which are associated with the same "found-by-T0" bunch crossing
393422 // https://indico.cern.ch/event/1396220/#1-event-selection-with-its-rof
394423 return false ;
395424 }
396- registry.fill (HIST (" hEventCount" ), 6.5 );
425+ registry.fill (HIST (" hEventCount" ), kNOPSAMEBUNCHPILEUP );
397426 }
398427 if (cfgIsGoodZvtxFT0vsPV) {
399428 if (!collision.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV )) {
400429 // removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference
401430 // use this cut at low multiplicities with caution
402431 return false ;
403432 }
404- registry.fill (HIST (" hEventCount" ), 7.5 );
433+ registry.fill (HIST (" hEventCount" ), kISGOODZVTXFT0VSPV );
405434 }
406435 if (cfgNoCollInTimeRangeStandard) {
407436 if (!collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard )) {
408437 // no collisions in specified time range
409438 return false ;
410439 }
411- registry.fill (HIST (" hEventCount" ), 8.5 );
440+ registry.fill (HIST (" hEventCount" ), kNOCOLLINTIMERANGESTANDART );
412441 }
413442
414443 float vtxz = -999 ;
@@ -433,7 +462,7 @@ struct FlowGFWPbPb {
433462 return false ;
434463 if (multTrk > fMultCutHigh ->Eval (centrality))
435464 return false ;
436- registry.fill (HIST (" hEventCount" ), 9.5 );
465+ registry.fill (HIST (" hEventCount" ), kAFTERMULTCUTS );
437466 }
438467
439468 // V0A T0A 5 sigma cut
@@ -486,7 +515,7 @@ struct FlowGFWPbPb {
486515
487516 void process (Colls::iterator const & collision, aod::BCsWithTimestamps const &, aodTracks const & tracks)
488517 {
489- registry.fill (HIST (" hEventCount" ), 0.5 );
518+ registry.fill (HIST (" hEventCount" ), kFILTERED );
490519 if (!collision.sel8 ())
491520 return ;
492521
@@ -502,15 +531,15 @@ struct FlowGFWPbPb {
502531 registry.fill (HIST (" BeforeCut_globalTracks_multV0A" ), collision.multFV0A (), tracks.size ());
503532 registry.fill (HIST (" BeforeCut_multV0A_multT0A" ), collision.multFT0A (), collision.multFV0A ());
504533 registry.fill (HIST (" BeforeCut_multT0C_centT0C" ), collision.centFT0C (), collision.multFT0C ());
505- registry.fill (HIST (" hEventCount" ), 1.5 );
534+ registry.fill (HIST (" hEventCount" ), kSEL8 );
506535
507536 const auto centrality = collision.centFT0C ();
508537
509538 if (cfgOccupancy) {
510539 int occupancy = collision.trackOccupancyInTimeRange ();
511540 if (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)
512541 return ;
513- registry.fill (HIST (" hEventCount" ), 2.5 );
542+ registry.fill (HIST (" hEventCount" ), kOCCUPANCY );
514543 }
515544
516545 if (cfgUseAdditionalEventCut && !eventSelected (o2::aod::mult::MultNTracksPV (), collision, tracks.size (), centrality)) {
@@ -530,7 +559,7 @@ struct FlowGFWPbPb {
530559
531560 auto bc = collision.bc_as <aod::BCsWithTimestamps>();
532561 loadCorrections (bc.timestamp ());
533- registry.fill (HIST (" hEventCount" ), 10.5 );
562+ registry.fill (HIST (" hEventCount" ), kCENTRALITY );
534563
535564 // fill event QA after cuts
536565 registry.fill (HIST (" globalTracks_centT0C_Aft" ), collision.centFT0C (), tracks.size ());
@@ -552,6 +581,7 @@ struct FlowGFWPbPb {
552581
553582 // track loop
554583 int globaltracks_nch{0 };
584+ int itstracks_nch{0 };
555585
556586 for (auto & track : tracks) {
557587
@@ -580,21 +610,33 @@ struct FlowGFWPbPb {
580610 }
581611
582612 globaltracks_nch++;
583- registry.fill (HIST (" Global_Tracks" ), collision.centFT0C ());
584- if (WithinPtRef)
585- fGFW ->Fill (track.eta (), fPtAxis ->FindBin (track.pt ()) - 1 , track.phi (), wacc * weff, 1 );
613+ itstracks_nch++;
614+ if (Global == true ) {
615+ registry.fill (HIST (" Global_Tracks" ), collision.centFT0C ());
616+ if (WithinPtRef)
617+ fGFW ->Fill (track.eta (), 1 , track.phi (), wacc * weff, 1 );
618+ }
619+
620+ if (track.hasITS () && ITSonly == true ) {
621+ registry.fill (HIST (" ITSonly" ), collision.centFT0C ());
622+ if (WithinPtRef)
623+ fGFW ->Fill (track.eta (), 1 , track.phi (), wacc * weff, 1 );
624+ }
586625
587626 } // End of track loop
588627
589628 registry.fill (HIST (" Events_per_Centrality_Bin" ), centrality);
590629 registry.fill (HIST (" Global_Tracks_Nch_vs_Cent" ), centrality, globaltracks_nch);
630+ registry.fill (HIST (" ITSOnly_Tracks_Nch_vs_Cent" ), centrality, itstracks_nch);
591631
592632 // Filling c22 with ROOT TProfile
593633 FillProfile (corrconfigs.at (0 ), HIST (" c22" ), centrality);
594634 FillProfile (corrconfigs.at (1 ), HIST (" c24" ), centrality);
595635 FillProfile (corrconfigs.at (2 ), HIST (" c26" ), centrality);
596636 FillProfile (corrconfigs.at (3 ), HIST (" c28" ), centrality);
597637 FillProfile (corrconfigs.at (4 ), HIST (" c22etagap" ), centrality);
638+ FillProfile (corrconfigs.at (5 ), HIST (" c32etagap" ), centrality);
639+ FillProfile (corrconfigs.at (6 ), HIST (" c34" ), centrality);
598640
599641 // Filling Bootstrap Samples
600642 int SampleIndex = static_cast <int >(cfgNbootstrap * l_Random);
@@ -603,6 +645,8 @@ struct FlowGFWPbPb {
603645 FillProfile (corrconfigs.at (2 ), BootstrapArray[SampleIndex][kc26], centrality);
604646 FillProfile (corrconfigs.at (3 ), BootstrapArray[SampleIndex][kc28], centrality);
605647 FillProfile (corrconfigs.at (4 ), BootstrapArray[SampleIndex][kc22etagap], centrality);
648+ FillProfile (corrconfigs.at (5 ), BootstrapArray[SampleIndex][kc32etagap], centrality);
649+ FillProfile (corrconfigs.at (6 ), BootstrapArray[SampleIndex][kc34], centrality);
606650
607651 // Filling Flow Container
608652 for (uint l_ind = 0 ; l_ind < corrconfigs.size (); l_ind++) {
0 commit comments