@@ -99,6 +99,8 @@ bool isSelected = true;
9999std::vector<float > cents; // centrality estimaters
100100uint64_t timestamp = 0 ;
101101double rsTimestamp = 0 ;
102+ int totalTowers = 10 ;
103+ int totalTowersPerSide = 5 ;
102104
103105} // namespace o2::analysis::qvectortask
104106
@@ -275,8 +277,6 @@ struct ZdcQVectors {
275277 registry.get <TH1 >(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (evSel_MultCut + 1 , " Mult & MultPV" );
276278 registry.get <TH1 >(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (evSel_isSelectedZDC + 1 , " isSelected" );
277279
278- int totalTowers = 10 ;
279- int totalTowersPerSide = 5 ;
280280 for (int tower = 0 ; tower < totalTowers; tower++) {
281281 namesEcal[tower] = TString::Format (" hZN%s_mean_t%i_cent" , sides[(tower < totalTowersPerSide) ? 0 : 1 ], tower % 5 );
282282 }
@@ -395,7 +395,6 @@ struct ZdcQVectors {
395395
396396 if (cfgFillCutAnalysis) {
397397 // Tower mean energies vs. centrality used for tower gain equalisation
398- int totalTowers = 10 ;
399398 for (int tower = 0 ; tower < totalTowers; tower++) {
400399 registry.add <TProfile2D>(Form (" CutAnalysis/%s" , namesEcal[tower].Data ()), Form (" %s" , namesEcal[tower].Data ()), kTProfile2D , {axisCent, {nEventSelections + 5 , 0 , nEventSelections + 5 }});
401400 }
@@ -915,7 +914,7 @@ struct ZdcQVectors {
915914 uint16_t eventSelectionFlags = eventSelected (collision, foundBC.zdc (), isEventSelected, tracks.size ());
916915
917916 // ALWAYS use these event selections
918- if (cent < EvSel.cfgCentMin || cent > EvSel.cfgCentMax || !collision. sel8 () || std::abs (collision.posZ ()) > cfgVtxZ) {
917+ if (cent < EvSel.cfgCentMin || cent > EvSel.cfgCentMax || std::abs (collision.posZ ()) > cfgVtxZ || !collision. sel8 () ) {
919918 // event not selected
920919 isSelected = false ;
921920 spTableZDC (runnumber, cents, v, foundBC.timestamp (), 0 , 0 , 0 , 0 , isSelected, eventSelectionFlags);
@@ -957,20 +956,17 @@ struct ZdcQVectors {
957956 registry.get <TProfile>(HIST (" vmean/hvertex_vz" ))->Fill (Form (" %d" , runnumber), v[2 ]);
958957
959958 // Fill to get mean energy per tower in 1% centrality bins
960- if (isZNAhit) {
961- registry.get <TProfile2D>(HIST (" Energy/hZNA_mean_t0_cent" ))->Fill (Form (" %d" , runnumber), cent, zdcCol.energyCommonZNA (), 1 );
962- registry.get <TProfile2D>(HIST (" Energy/hZNA_mean_t1_cent" ))->Fill (Form (" %d" , runnumber), cent, eZN[0 ], 1 );
963- registry.get <TProfile2D>(HIST (" Energy/hZNA_mean_t2_cent" ))->Fill (Form (" %d" , runnumber), cent, eZN[1 ], 1 );
964- registry.get <TProfile2D>(HIST (" Energy/hZNA_mean_t3_cent" ))->Fill (Form (" %d" , runnumber), cent, eZN[2 ], 1 );
965- registry.get <TProfile2D>(HIST (" Energy/hZNA_mean_t4_cent" ))->Fill (Form (" %d" , runnumber), cent, eZN[3 ], 1 );
966- }
967- if (isZNChit) {
968- registry.get <TProfile2D>(HIST (" Energy/hZNC_mean_t0_cent" ))->Fill (Form (" %d" , runnumber), cent, zdcCol.energyCommonZNC (), 1 );
969- registry.get <TProfile2D>(HIST (" Energy/hZNC_mean_t1_cent" ))->Fill (Form (" %d" , runnumber), cent, eZN[4 ], 1 );
970- registry.get <TProfile2D>(HIST (" Energy/hZNC_mean_t2_cent" ))->Fill (Form (" %d" , runnumber), cent, eZN[5 ], 1 );
971- registry.get <TProfile2D>(HIST (" Energy/hZNC_mean_t3_cent" ))->Fill (Form (" %d" , runnumber), cent, eZN[6 ], 1 );
972- registry.get <TProfile2D>(HIST (" Energy/hZNC_mean_t4_cent" ))->Fill (Form (" %d" , runnumber), cent, eZN[7 ], 1 );
973- }
959+
960+ registry.get <TProfile2D>(HIST (" Energy/hZNA_mean_t0_cent" ))->Fill (Form (" %d" , runnumber), cent, zdcCol.energyCommonZNA (), 1 );
961+ registry.get <TProfile2D>(HIST (" Energy/hZNA_mean_t1_cent" ))->Fill (Form (" %d" , runnumber), cent, eZN[0 ], 1 );
962+ registry.get <TProfile2D>(HIST (" Energy/hZNA_mean_t2_cent" ))->Fill (Form (" %d" , runnumber), cent, eZN[1 ], 1 );
963+ registry.get <TProfile2D>(HIST (" Energy/hZNA_mean_t3_cent" ))->Fill (Form (" %d" , runnumber), cent, eZN[2 ], 1 );
964+ registry.get <TProfile2D>(HIST (" Energy/hZNA_mean_t4_cent" ))->Fill (Form (" %d" , runnumber), cent, eZN[3 ], 1 );
965+ registry.get <TProfile2D>(HIST (" Energy/hZNC_mean_t0_cent" ))->Fill (Form (" %d" , runnumber), cent, zdcCol.energyCommonZNC (), 1 );
966+ registry.get <TProfile2D>(HIST (" Energy/hZNC_mean_t1_cent" ))->Fill (Form (" %d" , runnumber), cent, eZN[4 ], 1 );
967+ registry.get <TProfile2D>(HIST (" Energy/hZNC_mean_t2_cent" ))->Fill (Form (" %d" , runnumber), cent, eZN[5 ], 1 );
968+ registry.get <TProfile2D>(HIST (" Energy/hZNC_mean_t3_cent" ))->Fill (Form (" %d" , runnumber), cent, eZN[6 ], 1 );
969+ registry.get <TProfile2D>(HIST (" Energy/hZNC_mean_t4_cent" ))->Fill (Form (" %d" , runnumber), cent, eZN[7 ], 1 );
974970 }
975971
976972 // Now start gain equalisation!
0 commit comments