@@ -655,6 +655,7 @@ struct prefilterPrimaryElectron {
655655 // Operation and minimisation criteria
656656 Configurable<double > d_bz_input{" d_bz" , -999 , " bz field, -999 is automatic" };
657657
658+ Configurable<bool > fillQAHistogram{" fillQAHistogram" , false , " flag to fill QA histograms" };
658659 Configurable<float > max_dcaxy{" max_dcaxy" , 0.3 , " DCAxy To PV for loose track sample" };
659660 Configurable<float > max_dcaz{" max_dcaz" , 0.3 , " DCAz To PV for loose track sample" };
660661 Configurable<float > minpt{" minpt" , 0.1 , " min pt for track for loose track sample" };
@@ -695,7 +696,7 @@ struct prefilterPrimaryElectron {
695696 ccdb->setLocalObjectValidityChecking ();
696697 ccdb->setFatalWhenNull (false );
697698
698- if (!doprocessDummy) {
699+ if (!doprocessDummy && fillQAHistogram ) {
699700 addHistograms ();
700701 }
701702 }
@@ -902,8 +903,10 @@ struct prefilterPrimaryElectron {
902903 if (!checkTrack (collision, track)) {
903904 continue ;
904905 }
905- fRegistry .fill (HIST (" Track/hPt" ), track.pt ());
906- fRegistry .fill (HIST (" Track/hEtaPhi" ), track.phi (), track.eta ());
906+ if (fillQAHistogram) {
907+ fRegistry .fill (HIST (" Track/hPt" ), track.pt ());
908+ fRegistry .fill (HIST (" Track/hEtaPhi" ), track.phi (), track.eta ());
909+ }
907910 if (track.sign () > 0 ) {
908911 posTracks_per_coll.emplace_back (track);
909912 } else {
@@ -934,10 +937,14 @@ struct prefilterPrimaryElectron {
934937 ROOT::Math::PtEtaPhiMVector v2 (empos.pt (), empos.eta (), empos.phi (), o2::constants::physics::MassElectron); // signal track
935938 ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
936939 float phiv = o2::aod::pwgem::dilepton::utils::pairutil::getPhivPair (empos.px (), empos.py (), empos.pz (), pVec_recalc[0 ], pVec_recalc[1 ], pVec_recalc[2 ], empos.sign (), ele.sign (), d_bz);
937- fRegistry .fill (HIST (" Pair/before/uls/hMvsPhiV" ), phiv, v12.M ());
938- fRegistry .fill (HIST (" Pair/before/uls/hMvsPt" ), v12.M (), v12.Pt ());
940+ if (fillQAHistogram) {
941+ fRegistry .fill (HIST (" Pair/before/uls/hMvsPhiV" ), phiv, v12.M ());
942+ fRegistry .fill (HIST (" Pair/before/uls/hMvsPt" ), v12.M (), v12.Pt ());
943+ }
939944 if (v12.M () < max_mee_vec->at (static_cast <int >(max_mee_vec->size ()) - 1 )) {
940- fRegistry .fill (HIST (" Track/hTPCNsigmaEl" ), ele.tpcInnerParam (), ele.tpcNSigmaEl ());
945+ if (fillQAHistogram) {
946+ fRegistry .fill (HIST (" Track/hTPCNsigmaEl" ), ele.tpcInnerParam (), ele.tpcNSigmaEl ());
947+ }
941948 }
942949 for (int i = 0 ; i < static_cast <int >(max_mee_vec->size ()); i++) {
943950 if (v12.M () < max_mee_vec->at (i)) {
@@ -974,10 +981,14 @@ struct prefilterPrimaryElectron {
974981 ROOT::Math::PtEtaPhiMVector v2 (track_par_cov_recalc.getPt (), track_par_cov_recalc.getEta (), track_par_cov_recalc.getPhi (), o2::constants::physics::MassElectron); // loose track
975982 ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
976983 float phiv = o2::aod::pwgem::dilepton::utils::pairutil::getPhivPair (pVec_recalc[0 ], pVec_recalc[1 ], pVec_recalc[2 ], emele.px (), emele.py (), emele.pz (), pos.sign (), emele.sign (), d_bz);
977- fRegistry .fill (HIST (" Pair/before/uls/hMvsPhiV" ), phiv, v12.M ());
978- fRegistry .fill (HIST (" Pair/before/uls/hMvsPt" ), v12.M (), v12.Pt ());
984+ if (fillQAHistogram) {
985+ fRegistry .fill (HIST (" Pair/before/uls/hMvsPhiV" ), phiv, v12.M ());
986+ fRegistry .fill (HIST (" Pair/before/uls/hMvsPt" ), v12.M (), v12.Pt ());
987+ }
979988 if (v12.M () < max_mee_vec->at (static_cast <int >(max_mee_vec->size ()) - 1 )) {
980- fRegistry .fill (HIST (" Track/hTPCNsigmaEl" ), pos.tpcInnerParam (), pos.tpcNSigmaEl ());
989+ if (fillQAHistogram) {
990+ fRegistry .fill (HIST (" Track/hTPCNsigmaEl" ), pos.tpcInnerParam (), pos.tpcNSigmaEl ());
991+ }
981992 }
982993 for (int i = 0 ; i < static_cast <int >(max_mee_vec->size ()); i++) {
983994 if (v12.M () < max_mee_vec->at (i)) {
@@ -1013,8 +1024,10 @@ struct prefilterPrimaryElectron {
10131024 ROOT::Math::PtEtaPhiMVector v2 (track_par_cov_recalc.getPt (), track_par_cov_recalc.getEta (), track_par_cov_recalc.getPhi (), o2::constants::physics::MassElectron); // loose track
10141025 ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
10151026 float phiv = o2::aod::pwgem::dilepton::utils::pairutil::getPhivPair (pVec_recalc[0 ], pVec_recalc[1 ], pVec_recalc[2 ], empos.px (), empos.py (), empos.pz (), pos.sign (), empos.sign (), d_bz);
1016- fRegistry .fill (HIST (" Pair/before/lspp/hMvsPhiV" ), phiv, v12.M ());
1017- fRegistry .fill (HIST (" Pair/before/lspp/hMvsPt" ), v12.M (), v12.Pt ());
1027+ if (fillQAHistogram) {
1028+ fRegistry .fill (HIST (" Pair/before/lspp/hMvsPhiV" ), phiv, v12.M ());
1029+ fRegistry .fill (HIST (" Pair/before/lspp/hMvsPt" ), v12.M (), v12.Pt ());
1030+ }
10181031 } // end of signal positron loop
10191032 } // end of loose positon loop
10201033
@@ -1041,8 +1054,10 @@ struct prefilterPrimaryElectron {
10411054 ROOT::Math::PtEtaPhiMVector v2 (emele.pt (), emele.eta (), emele.phi (), o2::constants::physics::MassElectron); // signal track
10421055 ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
10431056 float phiv = o2::aod::pwgem::dilepton::utils::pairutil::getPhivPair (emele.px (), emele.py (), emele.pz (), pVec_recalc[0 ], pVec_recalc[1 ], pVec_recalc[2 ], emele.sign (), ele.sign (), d_bz);
1044- fRegistry .fill (HIST (" Pair/before/lsmm/hMvsPhiV" ), phiv, v12.M ());
1045- fRegistry .fill (HIST (" Pair/before/lsmm/hMvsPt" ), v12.M (), v12.Pt ());
1057+ if (fillQAHistogram) {
1058+ fRegistry .fill (HIST (" Pair/before/lsmm/hMvsPhiV" ), phiv, v12.M ());
1059+ fRegistry .fill (HIST (" Pair/before/lsmm/hMvsPt" ), v12.M (), v12.Pt ());
1060+ }
10461061
10471062 } // end of signal electron loop
10481063 } // end of loose electron loop
@@ -1071,9 +1086,10 @@ struct prefilterPrimaryElectron {
10711086 ROOT::Math::PtEtaPhiMVector v2 (pos.pt (), pos.eta (), pos.phi (), o2::constants::physics::MassElectron);
10721087 ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
10731088 float phiv = o2::aod::pwgem::dilepton::utils::pairutil::getPhivPair (pos.px (), pos.py (), pos.pz (), ele.px (), ele.py (), ele.pz (), pos.sign (), ele.sign (), d_bz);
1074- fRegistry .fill (HIST (" Pair/after/uls/hMvsPhiV" ), phiv, v12.M ());
1075- fRegistry .fill (HIST (" Pair/after/uls/hMvsPt" ), v12.M (), v12.Pt ());
1076-
1089+ if (fillQAHistogram) {
1090+ fRegistry .fill (HIST (" Pair/after/uls/hMvsPhiV" ), phiv, v12.M ());
1091+ fRegistry .fill (HIST (" Pair/after/uls/hMvsPt" ), v12.M (), v12.Pt ());
1092+ }
10771093 } // end of ULS pairing
10781094 } // end of collision loop
10791095
@@ -1102,15 +1118,19 @@ struct prefilterPrimaryElectron {
11021118 if (!checkTrack (collision, pos)) { // track cut is applied to loose sample
11031119 continue ;
11041120 }
1105- fRegistry .fill (HIST (" Track/hPt" ), pos.pt ());
1106- fRegistry .fill (HIST (" Track/hEtaPhi" ), pos.phi (), pos.eta ());
1121+ if (fillQAHistogram) {
1122+ fRegistry .fill (HIST (" Track/hPt" ), pos.pt ());
1123+ fRegistry .fill (HIST (" Track/hEtaPhi" ), pos.phi (), pos.eta ());
1124+ }
11071125 }
11081126 for (const auto & neg : negTracks_per_coll) {
11091127 if (!checkTrack (collision, neg)) { // track cut is applied to loose sample
11101128 continue ;
11111129 }
1112- fRegistry .fill (HIST (" Track/hPt" ), neg.pt ());
1113- fRegistry .fill (HIST (" Track/hEtaPhi" ), neg.phi (), neg.eta ());
1130+ if (fillQAHistogram) {
1131+ fRegistry .fill (HIST (" Track/hPt" ), neg.pt ());
1132+ fRegistry .fill (HIST (" Track/hEtaPhi" ), neg.phi (), neg.eta ());
1133+ }
11141134 }
11151135
11161136 for (const auto & [ele, empos] : combinations (CombinationsFullIndexPolicy (negTracks_per_coll, positrons_per_coll))) {
@@ -1126,10 +1146,14 @@ struct prefilterPrimaryElectron {
11261146 ROOT::Math::PtEtaPhiMVector v2 (empos.pt (), empos.eta (), empos.phi (), o2::constants::physics::MassElectron); // signal track
11271147 ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
11281148 float phiv = o2::aod::pwgem::dilepton::utils::pairutil::getPhivPair (empos.px (), empos.py (), empos.pz (), ele.px (), ele.py (), ele.pz (), empos.sign (), ele.sign (), d_bz);
1129- fRegistry .fill (HIST (" Pair/before/uls/hMvsPhiV" ), phiv, v12.M ());
1130- fRegistry .fill (HIST (" Pair/before/uls/hMvsPt" ), v12.M (), v12.Pt ());
1149+ if (fillQAHistogram) {
1150+ fRegistry .fill (HIST (" Pair/before/uls/hMvsPhiV" ), phiv, v12.M ());
1151+ fRegistry .fill (HIST (" Pair/before/uls/hMvsPt" ), v12.M (), v12.Pt ());
1152+ }
11311153 if (v12.M () < max_mee_vec->at (static_cast <int >(max_mee_vec->size ()) - 1 )) {
1132- fRegistry .fill (HIST (" Track/hTPCNsigmaEl" ), ele.tpcInnerParam (), ele.tpcNSigmaEl ());
1154+ if (fillQAHistogram) {
1155+ fRegistry .fill (HIST (" Track/hTPCNsigmaEl" ), ele.tpcInnerParam (), ele.tpcNSigmaEl ());
1156+ }
11331157 }
11341158 for (int i = 0 ; i < static_cast <int >(max_mee_vec->size ()); i++) {
11351159 if (v12.M () < max_mee_vec->at (i)) {
@@ -1156,10 +1180,14 @@ struct prefilterPrimaryElectron {
11561180 ROOT::Math::PtEtaPhiMVector v2 (pos.pt (), pos.eta (), pos.phi (), o2::constants::physics::MassElectron); // loose track
11571181 ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
11581182 float phiv = o2::aod::pwgem::dilepton::utils::pairutil::getPhivPair (pos.px (), pos.py (), pos.pz (), emele.px (), emele.py (), emele.pz (), pos.sign (), emele.sign (), d_bz);
1159- fRegistry .fill (HIST (" Pair/before/uls/hMvsPhiV" ), phiv, v12.M ());
1160- fRegistry .fill (HIST (" Pair/before/uls/hMvsPt" ), v12.M (), v12.Pt ());
1183+ if (fillQAHistogram) {
1184+ fRegistry .fill (HIST (" Pair/before/uls/hMvsPhiV" ), phiv, v12.M ());
1185+ fRegistry .fill (HIST (" Pair/before/uls/hMvsPt" ), v12.M (), v12.Pt ());
1186+ }
11611187 if (v12.M () < max_mee_vec->at (static_cast <int >(max_mee_vec->size ()) - 1 )) {
1162- fRegistry .fill (HIST (" Track/hTPCNsigmaEl" ), pos.tpcInnerParam (), pos.tpcNSigmaEl ());
1188+ if (fillQAHistogram) {
1189+ fRegistry .fill (HIST (" Track/hTPCNsigmaEl" ), pos.tpcInnerParam (), pos.tpcNSigmaEl ());
1190+ }
11631191 }
11641192 for (int i = 0 ; i < static_cast <int >(max_mee_vec->size ()); i++) {
11651193 if (v12.M () < max_mee_vec->at (i)) {
@@ -1186,8 +1214,10 @@ struct prefilterPrimaryElectron {
11861214 ROOT::Math::PtEtaPhiMVector v2 (empos.pt (), empos.eta (), empos.phi (), o2::constants::physics::MassElectron); // signal track
11871215 ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
11881216 float phiv = o2::aod::pwgem::dilepton::utils::pairutil::getPhivPair (empos.px (), empos.py (), empos.pz (), pos.px (), pos.py (), pos.pz (), empos.sign (), pos.sign (), d_bz);
1189- fRegistry .fill (HIST (" Pair/before/lspp/hMvsPhiV" ), phiv, v12.M ());
1190- fRegistry .fill (HIST (" Pair/before/lspp/hMvsPt" ), v12.M (), v12.Pt ());
1217+ if (fillQAHistogram) {
1218+ fRegistry .fill (HIST (" Pair/before/lspp/hMvsPhiV" ), phiv, v12.M ());
1219+ fRegistry .fill (HIST (" Pair/before/lspp/hMvsPt" ), v12.M (), v12.Pt ());
1220+ }
11911221 } // end of LS++ pairing
11921222
11931223 for (const auto & [ele, emele] : combinations (CombinationsFullIndexPolicy (negTracks_per_coll, electrons_per_coll))) {
@@ -1203,8 +1233,10 @@ struct prefilterPrimaryElectron {
12031233 ROOT::Math::PtEtaPhiMVector v2 (emele.pt (), emele.eta (), emele.phi (), o2::constants::physics::MassElectron); // signal track
12041234 ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
12051235 float phiv = o2::aod::pwgem::dilepton::utils::pairutil::getPhivPair (emele.px (), emele.py (), emele.pz (), ele.px (), ele.py (), ele.pz (), emele.sign (), ele.sign (), d_bz);
1206- fRegistry .fill (HIST (" Pair/before/lsmm/hMvsPhiV" ), phiv, v12.M ());
1207- fRegistry .fill (HIST (" Pair/before/lsmm/hMvsPt" ), v12.M (), v12.Pt ());
1236+ if (fillQAHistogram) {
1237+ fRegistry .fill (HIST (" Pair/before/lsmm/hMvsPhiV" ), phiv, v12.M ());
1238+ fRegistry .fill (HIST (" Pair/before/lsmm/hMvsPt" ), v12.M (), v12.Pt ());
1239+ }
12081240 } // end of LS-- pairing
12091241
12101242 } // end of collision loop
@@ -1227,8 +1259,10 @@ struct prefilterPrimaryElectron {
12271259 ROOT::Math::PtEtaPhiMVector v2 (pos.pt (), pos.eta (), pos.phi (), o2::constants::physics::MassElectron);
12281260 ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
12291261 float phiv = o2::aod::pwgem::dilepton::utils::pairutil::getPhivPair (pos.px (), pos.py (), pos.pz (), ele.px (), ele.py (), ele.pz (), pos.sign (), ele.sign (), d_bz);
1230- fRegistry .fill (HIST (" Pair/after/uls/hMvsPhiV" ), phiv, v12.M ());
1231- fRegistry .fill (HIST (" Pair/after/uls/hMvsPt" ), v12.M (), v12.Pt ());
1262+ if (fillQAHistogram) {
1263+ fRegistry .fill (HIST (" Pair/after/uls/hMvsPhiV" ), phiv, v12.M ());
1264+ fRegistry .fill (HIST (" Pair/after/uls/hMvsPt" ), v12.M (), v12.Pt ());
1265+ }
12321266 } // end of ULS pairing
12331267 } // end of collision loop
12341268
0 commit comments