@@ -1113,10 +1113,6 @@ struct DndetaMFTPbPb {
11131113 {
11141114 auto occ = getOccupancy (collision, eventCuts.occupancyEstimator );
11151115 float c = getRecoCent (collision);
1116- auto bc = collision.template foundBC_as <CollBCs>();
1117- double ir = rateFetcher.fetch (ccdb.service , bc.timestamp (), bc.runNumber (),
1118- " ZNC hadronic" ) *
1119- 1 .e -3 ;
11201116
11211117 if constexpr (has_reco_cent<C>) {
11221118 registry.fill (HIST (" Events/Centrality/Selection" ), 1 ., c, occ);
@@ -1128,6 +1124,8 @@ struct DndetaMFTPbPb {
11281124 return ;
11291125 }
11301126 if (eventCuts.cfgSelInteractionRate ) {
1127+ auto bc = collision.template foundBC_as <CollBCs>();
1128+ double ir = rateFetcher.fetch (ccdb.service , bc.timestamp (), bc.runNumber ()," ZNC hadronic" ) * 1 .e -3 ;
11311129 if (!isIRSelected (bc, true )) {
11321130 return ;
11331131 }
@@ -1138,10 +1136,14 @@ struct DndetaMFTPbPb {
11381136 registry.fill (HIST (" Events/Centrality/Selection" ), 2 ., c, occ);
11391137 qaregistry.fill (HIST (" Events/Centrality/hZvtxCent" ), z, c, occ);
11401138 qaregistry.fill (HIST (" Events/Centrality/hCent" ), c, occ);
1141- qaregistry.fill (HIST (" hCentOccIRate" ), c, occ, ir);
1139+ if (eventCuts.cfgSelInteractionRate ) {
1140+ qaregistry.fill (HIST (" hCentOccIRate" ), c, occ, ir);
1141+ }
11421142
11431143 } else {
1144- qaregistry.fill (HIST (" hOccIRate" ), occ, ir);
1144+ if (eventCuts.cfgSelInteractionRate ) {
1145+ qaregistry.fill (HIST (" hOccIRate" ), occ, ir);
1146+ }
11451147 registry.fill (HIST (" Events/Selection" ), 2 ., occ);
11461148 }
11471149
@@ -1164,10 +1166,6 @@ struct DndetaMFTPbPb {
11641166 {
11651167 auto occ = getOccupancy (collision, eventCuts.occupancyEstimator );
11661168 float c = getRecoCent (collision);
1167- auto bc = collision.template foundBC_as <CollBCs>();
1168- double ir = rateFetcher.fetch (ccdb.service , bc.timestamp (), bc.runNumber (),
1169- " ZNC hadronic" ) *
1170- 1 .e -3 ;
11711169
11721170 if constexpr (has_reco_cent<C>) {
11731171 registry.fill (HIST (" Events/Centrality/Selection" ), 1 ., c, occ);
@@ -1179,6 +1177,8 @@ struct DndetaMFTPbPb {
11791177 return ;
11801178 }
11811179 if (eventCuts.cfgSelInteractionRate ) {
1180+ auto bc = collision.template foundBC_as <CollBCs>();
1181+ double ir = rateFetcher.fetch (ccdb.service , bc.timestamp (), bc.runNumber (), " ZNC hadronic" ) * 1 .e -3 ;
11821182 if (!isIRSelected (bc, true )) {
11831183 return ;
11841184 }
@@ -1187,10 +1187,14 @@ struct DndetaMFTPbPb {
11871187 auto z = collision.posZ ();
11881188 if constexpr (has_reco_cent<C>) {
11891189 registry.fill (HIST (" Events/Centrality/Selection" ), 2 ., c, occ);
1190- qaregistry.fill (HIST (" hCentOccIRate" ), c, occ, ir);
1190+ if (eventCuts.cfgSelInteractionRate ) {
1191+ qaregistry.fill (HIST (" hCentOccIRate" ), c, occ, ir);
1192+ }
11911193 } else {
11921194 registry.fill (HIST (" Events/Selection" ), 2 ., occ);
1193- qaregistry.fill (HIST (" hOccIRate" ), occ, ir);
1195+ if (eventCuts.cfgSelInteractionRate ) {
1196+ qaregistry.fill (HIST (" hOccIRate" ), occ, ir);
1197+ }
11941198 }
11951199
11961200 auto nBestTrks = countBestTracks<C, true >(tracks, besttracks, z, c, occ);
0 commit comments