@@ -49,51 +49,51 @@ void addEventHistograms(HistogramRegistry* fRegistry)
4949}
5050
5151template <const int ev_id, typename TCollision>
52- void fillEventInfo (HistogramRegistry* fRegistry , TCollision const & collision)
52+ void fillEventInfo (HistogramRegistry* fRegistry , TCollision const & collision, float weight = 1 . )
5353{
5454 static constexpr std::string_view event_types[2 ] = {" before/" , " after/" };
55- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 1.0 );
55+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 1.0 , weight );
5656 if (collision.selection_bit (o2::aod::evsel::kNoTimeFrameBorder )) {
57- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 2.0 );
57+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 2.0 , weight );
5858 }
5959 if (collision.selection_bit (o2::aod::evsel::kNoITSROFrameBorder )) {
60- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 3.0 );
60+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 3.0 , weight );
6161 }
6262 if (collision.selection_bit (o2::aod::evsel::kNoSameBunchPileup )) {
63- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 4.0 );
63+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 4.0 , weight );
6464 }
6565 if (collision.selection_bit (o2::aod::evsel::kIsVertexITSTPC )) {
66- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 5.0 );
66+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 5.0 , weight );
6767 }
6868 if (collision.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV )) {
69- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 6.0 );
69+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 6.0 , weight );
7070 }
7171 if (collision.selection_bit (o2::aod::evsel::kIsTriggerTVX )) {
72- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 7.0 );
72+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 7.0 , weight );
7373 }
7474 if (collision.sel8 ()) {
75- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 8.0 );
75+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 8.0 , weight );
7676 }
77- if (abs (collision.posZ ()) < 10.0 ) {
78- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 9.0 );
77+ if (std:: abs (collision.posZ ()) < 10.0 ) {
78+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 9.0 , weight );
7979 }
80- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hZvtx" ), collision.posZ ());
80+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hZvtx" ), collision.posZ (), weight );
8181 if (collision.alias_bit (kTVXinEMC )) {
82- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 10.0 );
82+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 10.0 , weight );
8383 }
8484 if (collision.alias_bit (kEMC7 ) || collision.alias_bit (kDMC7 )) {
85- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 11.0 );
85+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCollisionCounter" ), 11.0 , weight );
8686 }
8787
88- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hMultNTracksPV" ), collision.multNTracksPV ());
89- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hMultNTracksPVeta1" ), collision.multNTracksPVeta1 ());
90- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hMultFT0" ), collision.multFT0A (), collision.multFT0C ());
91- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCentFT0A" ), collision.centFT0A ());
92- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCentFT0C" ), collision.centFT0C ());
93- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCentFT0M" ), collision.centFT0M ());
94- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCentFT0CvsMultNTracksPV" ), collision.centFT0C (), collision.multNTracksPV ());
95- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hMultFT0CvsMultNTracksPV" ), collision.multFT0C (), collision.multNTracksPV ());
96- fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hMultFT0CvsOccupancy" ), collision.multFT0C (), collision.trackOccupancyInTimeRange ());
88+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hMultNTracksPV" ), collision.multNTracksPV (), weight );
89+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hMultNTracksPVeta1" ), collision.multNTracksPVeta1 (), weight );
90+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hMultFT0" ), collision.multFT0A (), collision.multFT0C (), weight );
91+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCentFT0A" ), collision.centFT0A (), weight );
92+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCentFT0C" ), collision.centFT0C (), weight );
93+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCentFT0M" ), collision.centFT0M (), weight );
94+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hCentFT0CvsMultNTracksPV" ), collision.centFT0C (), collision.multNTracksPV (), weight );
95+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hMultFT0CvsMultNTracksPV" ), collision.multFT0C (), collision.multNTracksPV (), weight );
96+ fRegistry ->fill (HIST (" Event/" ) + HIST (event_types[ev_id]) + HIST (" hMultFT0CvsOccupancy" ), collision.multFT0C (), collision.trackOccupancyInTimeRange (), weight );
9797}
9898
9999} // namespace o2::aod::pwgem::photonmeson::utils::eventhistogram
0 commit comments