@@ -123,7 +123,7 @@ struct UpcRhoAnalysis {
123123 // Configurable<int> selectedMcGeneratorId{"selectedMcGeneratorId", 0, "flag for selected MC process ID"};
124124
125125 Configurable<float > collisionsPosZMaxCut{" collisionsPosZMaxCut" , 10.0 , " max Z position cut on collisions" };
126- Configurable<int > collisionsNumContribsMaxCut{" collisionsNumContribsMaxCut" , 4 , " max number of contributors cut on collisions" };
126+ Configurable<int > collisionsNumContribsMaxCut{" collisionsNumContribsMaxCut" , 5 , " max number of contributors cut on collisions" };
127127 Configurable<float > znCommonEnergyCut{" znCommonEnergyCut" , 0.0 , " ZN common energy cut" };
128128 Configurable<float > znTimeCut{" znTimeCut" , 2.0 , " ZN time cut" };
129129
@@ -159,6 +159,7 @@ struct UpcRhoAnalysis {
159159 ConfigurableAxis momentumFromPhiAxis{" momentumFromPhiAxis" , {400 , -0.1 , 0.1 }, " p (GeV/#it{c})" };
160160 ConfigurableAxis znCommonEnergyAxis{" znCommonEnergyAxis" , {250 , -5.0 , 20.0 }, " ZN common energy (TeV)" };
161161 ConfigurableAxis znTimeAxis{" znTimeAxis" , {200 , -10.0 , 10.0 }, " ZN time (ns)" };
162+ ConfigurableAxis runNumberAxis{" runNumberAxis" , {1355 , 544012.5 , 545367.5 }, " run number" };
162163
163164 HistogramRegistry rQC{" rQC" , {}, OutputObjHandlingPolicy::AnalysisObject};
164165 HistogramRegistry rTracks{" rTracks" , {}, OutputObjHandlingPolicy::AnalysisObject};
@@ -199,7 +200,7 @@ struct UpcRhoAnalysis {
199200 rQC.add (" QC/tracks/all/hTpcNClsCrossedRows" , " ;TPC crossed rows;counts" , kTH1D , {{200 , 0.0 , 200.0 }});
200201 rQC.add (" QC/tracks/all/hTpcNClsCrossedRowsOverNClsFindable" , " ;TPC crossed rows/findable N_{cls};counts" , kTH1D , {{100 , 0.0 , 10.0 }});
201202 rQC.add (" QC/tracks/all/hPt" , " ;p_{T} (GeV/#it{c});counts" , kTH1D , {ptAxis});
202- rQC.add (" QC/tracks/all/hEta" , " ;y ;counts" , kTH1D , {etaAxis});
203+ rQC.add (" QC/tracks/all/hEta" , " ;#eta ;counts" , kTH1D , {etaAxis});
203204 rQC.add (" QC/tracks/all/hPhi" , " ;#phi;counts" , kTH1D , {phiAxis});
204205 rQC.add (" QC/tracks/all/hTpcSignalVsP" , " ;p (GeV/#it{c});TPC signal;counts" , kTH2D , {ptAxis, {500 , 0.0 , 500.0 }});
205206 rQC.add (" QC/tracks/all/hTpcSignalVsPt" , " ;p_{T} (GeV/#it{c});TPC signal;counts" , kTH2D , {ptAxis, {500 , 0.0 , 500.0 }});
@@ -214,9 +215,12 @@ struct UpcRhoAnalysis {
214215 " TPC crossed rows/N_{clusters}" ,
215216 " TOF requirement" ,
216217 " p_{T}" , " DCA" , " #eta" , " exactly 2 tracks" };
217- rQC.add (" QC/tracks/hSelectionCounter" , " ;;tracks passing selections" , kTH1D , {{static_cast <int >(selectionCounterLabels.size ()), -0.5 , static_cast <float >(selectionCounterLabels.size ()) - 0.5 }});
218- for (int i = 0 ; i < static_cast <int >(selectionCounterLabels.size ()); ++i)
218+ rQC.add (" QC/tracks/hSelectionCounter" , " ;;selection;tracks passing selections" , kTH1D , {{static_cast <int >(selectionCounterLabels.size ()), -0.5 , static_cast <float >(selectionCounterLabels.size ()) - 0.5 }});
219+ rQC.add (" QC/tracks/hSelectionCounterPerRun" , " ;;run number;tracks passing selections" , kTH2D , {{static_cast <int >(selectionCounterLabels.size ()), -0.5 , static_cast <float >(selectionCounterLabels.size ()) - 0.5 }, runNumberAxis});
220+ for (int i = 0 ; i < static_cast <int >(selectionCounterLabels.size ()); ++i) {
219221 rQC.get <TH1>(HIST (" QC/tracks/hSelectionCounter" ))->GetXaxis ()->SetBinLabel (i + 1 , selectionCounterLabels[i].c_str ());
222+ rQC.get <TH2>(HIST (" QC/tracks/hSelectionCounterPerRun" ))->GetXaxis ()->SetBinLabel (i + 1 , selectionCounterLabels[i].c_str ());
223+ }
220224 rQC.add (" QC/tracks/hTofHitCheck" , " ;leading track TOF hit;subleading track TOF hit;counts" , kTH2D , {{2 , -0.5 , 1.5 }, {2 , -0.5 , 1.5 }});
221225
222226 // TRACKS (2D)
@@ -361,60 +365,73 @@ struct UpcRhoAnalysis {
361365 return true ;
362366 }
363367
364- template <typename T>
365- bool trackPassesCuts (const T& track) // track cuts (PID done separately)
368+ template <typename T, typename C >
369+ bool trackPassesCuts (const T& track, const C& collision ) // track cuts (PID done separately)
366370 {
367371 if (!track.isPVContributor ())
368372 return false ;
369373 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 1 );
374+ rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 1 , collision.runNumber ());
370375
371376 if (!track.hasITS ())
372377 return false ;
373378 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 2 );
379+ rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 2 , collision.runNumber ());
374380
375381 if (track.itsNCls () < tracksMinItsNClsCut)
376382 return false ;
377383 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 3 );
384+ rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 3 , collision.runNumber ());
378385
379386 if (track.itsChi2NCl () > tracksMaxItsChi2NClCut)
380387 return false ;
381388 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 4 );
389+ rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 4 , collision.runNumber ());
382390
383391 if (!track.hasTPC ())
384392 return false ;
385393 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 5 );
394+ rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 5 , collision.runNumber ());
386395
387396 if ((track.tpcNClsFindable () - track.tpcNClsFindableMinusFound ()) < tracksMinTpcNClsCut)
388397 return false ;
389398 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 6 );
399+ rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 6 , collision.runNumber ());
390400
391401 if (track.tpcChi2NCl () > tracksMaxTpcChi2NClCut || track.tpcChi2NCl () < tracksMinTpcChi2NClCut)
392402 return false ;
393403 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 7 );
404+ rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 7 , collision.runNumber ());
394405
395406 if (track.tpcNClsCrossedRows () < tracksMinTpcNClsCrossedRowsCut)
396407 return false ;
397408 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 8 );
409+ rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 8 , collision.runNumber ());
398410
399411 if ((static_cast <double >(track.tpcNClsCrossedRows ()) / static_cast <double >(track.tpcNClsFindable ())) < tracksMinTpcNClsCrossedOverFindableCut)
400412 return false ;
401413 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 9 );
414+ rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 9 , collision.runNumber ());
402415
403416 if (requireTof && !track.hasTOF ())
404417 return false ;
405418 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 10 );
419+ rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 10 , collision.runNumber ());
406420
407421 if (track.pt () < tracksMinPtCut)
408422 return false ;
409423 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 11 );
424+ rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 11 , collision.runNumber ());
410425
411426 if (std::abs (track.dcaZ ()) > tracksDcaMaxCut || std::abs (track.dcaXY ()) > (0.0105 + 0.0350 / std::pow (track.pt (), 1.01 )))
412427 return false ;
413428 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 12 );
429+ rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 12 , collision.runNumber ());
414430
415431 if (std::abs (eta (track.px (), track.py (), track.pz ())) > pcEtaCut)
416432 return false ;
417433 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 13 );
434+ rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 13 , collision.runNumber ());
418435 // if all selections passed
419436 return true ;
420437 }
@@ -548,9 +565,10 @@ struct UpcRhoAnalysis {
548565 std::vector<decltype (tracks.begin ())> cutTracks; // store selected tracks
549566 for (const auto & track : tracks) {
550567 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 0 );
568+ rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 0 , collision.runNumber ());
551569 fillTrackQcHistos<0 >(track); // fill QC histograms before cuts
552570
553- if (!trackPassesCuts (track)) // apply track cuts
571+ if (!trackPassesCuts (track, collision )) // apply track cuts
554572 continue ;
555573
556574 fillTrackQcHistos<1 >(track); // fill QC histograms after cuts
@@ -560,8 +578,10 @@ struct UpcRhoAnalysis {
560578
561579 if (cutTracks.size () != 2 ) // further consider only two pion systems
562580 return ;
563- for (int i = 0 ; i < static_cast <int >(cutTracks.size ()); i++)
581+ for (int i = 0 ; i < static_cast <int >(cutTracks.size ()); i++) {
564582 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 14 );
583+ rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 14 , collision.runNumber ());
584+ }
565585 rQC.fill (HIST (" QC/tracks/selected/hTpcNSigmaPi2D" ), cutTracks[0 ].tpcNSigmaPi (), cutTracks[1 ].tpcNSigmaPi ());
566586 rQC.fill (HIST (" QC/tracks/selected/hTpcNSigmaEl2D" ), cutTracks[0 ].tpcNSigmaEl (), cutTracks[1 ].tpcNSigmaEl ());
567587 rQC.fill (HIST (" QC/tracks/selected/hTpcNSigmaKa2D" ), cutTracks[0 ].tpcNSigmaKa (), cutTracks[1 ].tpcNSigmaKa ());
0 commit comments