7#include "GaudiKernel/SystemOfUnits.h"
24 ISvcLocator *pSvcLocator)
31 <<
" ******************");
34 showerShapesAll = std::make_unique<egammaMonitoring::ShowerShapesHistograms>(
35 "showerShapesAll",
"Shower Shapes ",
"/MONITORING/showerShapesAll/",
39 std::make_unique<egammaMonitoring::ShowerShapesHistograms>(
40 "showerShapes10GeV",
"Shower Shapes - 10 GeV",
43 isolationAll = std::make_unique<egammaMonitoring::IsolationHistograms>(
44 "isolationAll",
"Isolation ",
"/MONITORING/isolationAll/",
rootHistSvc);
51 clusterAll = std::make_unique<egammaMonitoring::ClusterHistograms>(
52 "clustersAll",
"Clusters",
"/MONITORING/clusterAll/",
rootHistSvc);
54 cluster10GeV = std::make_unique<egammaMonitoring::ClusterHistograms>(
55 "clusters10GeV",
"Clusters - 10 GeV",
"/MONITORING/cluster10GeV/",
59 "clustersPromptAll",
"Clusters from Prompt",
63 "clustersPrompt10GeV",
"Clusters from Prompt - 10 GeV",
71 m_clusterReco = std::make_unique<egammaMonitoring::RecoClusterHistograms>(
72 "clustersReco",
"Clusters from Z->ee candidates in data",
75 std::make_unique<egammaMonitoring::RecoElectronHistograms>(
76 "recoElectronAll",
"Reco electrons from Z->ee candidates in data",
78 m_diElectron = std::make_unique<egammaMonitoring::DiObjectHistograms>(
79 "diElectrons",
"Z->ee candidates in data",
"/MONITORING/diElectrons/",
90 std::make_unique<egammaMonitoring::RecoElectronHistograms>(
91 "recoElectronAll",
"Electrons Reco Electron",
95 std::make_unique<egammaMonitoring::TruthElectronHistograms>(
96 "truthElectronAll",
"All Truth Electrons",
100 std::make_unique<egammaMonitoring::TruthElectronHistograms>(
101 "truthPromptElectronAll",
"All Truth Prompt Electrons",
102 "/MONITORING/truthPromptElectronAll/",
rootHistSvc);
105 std::make_unique<egammaMonitoring::TruthElectronHistograms>(
106 "truthElectronRecoElectronAll",
"Truth Electrons Reco Electron",
107 "/MONITORING/truthElectronRecoElectronAll/",
rootHistSvc);
110 std::make_unique<egammaMonitoring::TruthElectronHistograms>(
111 "truthPromptElectronWithTrack",
"Truth Prompt Electrons With Track",
112 "/MONITORING/truthPromptElectronWithTrack/",
rootHistSvc);
115 std::make_unique<egammaMonitoring::TruthElectronHistograms>(
116 "truthPromptElectronWithGSFTrack",
117 "Truth Prompt Electrons With GSFTrack",
118 "/MONITORING/truthPromptElectronWithGSFTrack/",
rootHistSvc);
121 std::make_unique<egammaMonitoring::TruthElectronHistograms>(
122 "truthPromptElectronWithReco",
123 "Truth Prompt Electrons With GSFTrack or just with a fwd cluster",
124 "/MONITORING/truthPromptElectronWithReco/",
rootHistSvc);
127 std::make_unique<egammaMonitoring::TruthElectronHistograms>(
128 "truthPromptElectronWithRecoTrack",
129 "Truth Prompt Electrons With GSFTrack",
130 "/MONITORING/truthPromptElectronWithRecoTrack/",
rootHistSvc);
133 std::make_unique<egammaMonitoring::TruthElectronHistograms>(
134 "truthRecoElectronLooseLH",
"LLH Electrons Reco Electron",
135 "/MONITORING/truthRecoElectronLooseLH/",
rootHistSvc);
138 std::make_unique<egammaMonitoring::TruthElectronHistograms>(
139 "truthRecoElectronMediumLH",
"MLH Electrons Reco Electron",
140 "/MONITORING/truthRecoElectronMediumLH/",
rootHistSvc);
143 std::make_unique<egammaMonitoring::TruthElectronHistograms>(
144 "truthRecoElectronTightLH",
"TLH Electrons Reco Electron",
145 "/MONITORING/truthRecoElectronTightLH/",
rootHistSvc);
177 recoPhotonAll = std::make_unique<egammaMonitoring::RecoPhotonHistograms>(
178 "recoPhotonAll",
"Reco Photon",
"/MONITORING/recoPhotonAll/",
183 "clusterConvPhoton",
"Clusters from Converted Photons",
187 "clusterConvPhotonSi",
"Clusters from Converted Photons - Si",
191 std::make_unique<egammaMonitoring::ClusterHistograms>(
192 "clusterConvPhotonSiSi",
"Clusters from Converted Photons - SiSi",
193 "/MONITORING/clusterConvPhotonSiSi/",
rootHistSvc);
196 "clusterUnconvPhoton",
"Clusters from Converted Photons",
207 std::make_unique<egammaMonitoring::ClusterHistograms>(
208 "clusterConvPhotonTRT",
"Clusters from Converted Photons - TRT",
212 std::make_unique<egammaMonitoring::ClusterHistograms>(
213 "clusterConvPhotonTRTTRT",
214 "Clusters from Converted Photons - TRTTRT",
215 "/MONITORING/clusterConvPhotonTRTTRT/",
rootHistSvc);
218 std::make_unique<egammaMonitoring::ClusterHistograms>(
219 "clusterConvPhotonSiTRT",
220 "Clusters from Converted Photons - SiTRT",
221 "/MONITORING/clusterConvPhotonSiTRT/",
rootHistSvc);
224 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
225 "truthConvRecoConv1TRT",
"truthConvRecoConv1TRT",
226 "/MONITORING/truthConvRecoConv1TRT/",
rootHistSvc);
229 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
230 "truthConvRecoConv2TRT",
"truthConvRecoConv2TRT",
231 "/MONITORING/truthConvRecoConv2TRT/",
rootHistSvc);
234 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
235 "truthConvRecoConv2SiTRT",
"truthConvRecoConv2SiTRT",
236 "/MONITORING/truthConvRecoConv2SiTRT/",
rootHistSvc);
239 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
240 "truthUnconvRecoConv1TRT",
"truthUnconvRecoConv1TRT",
241 "/MONITORING/truthUnconvRecoConv1TRT/",
rootHistSvc);
244 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
245 "truthUnconvRecoConv2TRT",
"truthUnconvRecoConv2TRT",
246 "/MONITORING/truthUnconvRecoConv2TRT/",
rootHistSvc);
249 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
250 "truthUnconvRecoConv2SiTRT",
"truthUnconvRecoConv2SiTRT",
251 "/MONITORING/truthUnconvRecoConv2SiTRT/",
rootHistSvc);
265 truthPhotonAll = std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
266 "truthPhotonAll",
"truthPhotonAll",
"/MONITORING/truthPhotonAll/",
270 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
271 "truthPhotonAllUnconv",
"truthPhotonAllUnconv",
275 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
276 "truthPhotonAllConv",
"truthPhotonAllConv",
280 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
281 "truthPhotonAllLateConv",
"truthPhotonAllLateConv",
282 "/MONITORING/truthPhotonAllLateConv/",
rootHistSvc);
286 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
287 "truthPhotonRecoPhoton",
"truthPhotonRecoPhoton",
288 "/MONITORING/truthPhotonRecoPhoton/",
rootHistSvc);
291 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
292 "truthPhotonRecoPhotonOrElectron",
293 "truthPhotonRecoPhotonOrElectron",
294 "/MONITORING/truthPhotonRecoPhotonOrElectron/",
rootHistSvc);
297 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
298 "truthConvPhoton",
"truthConvPhoton",
302 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
303 "truthConvRecoConv",
"truthConvRecoConv",
307 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
308 "truthConvRecoConv1Si",
"truthConvRecoConv1Si",
312 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
313 "truthConvRecoConv2Si",
"truthConvRecoConv2Si",
317 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
318 "truthConvRecoUnconv",
"truthConvRecoUnconv",
322 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
323 "truthUnconvPhoton",
"truthUnconvPhoton",
327 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
328 "truthUnconvRecoConv",
"truthUnconvRecoConv",
332 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
333 "truthUnconvRecoConv1Si",
"truthUnconvRecoConv1Si",
334 "/MONITORING/truthUnconvRecoConv1Si/",
rootHistSvc);
337 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
338 "truthUnconvRecoConv2Si",
"truthUnconvRecoConv2Si",
339 "/MONITORING/truthUnconvRecoConv2Si/",
rootHistSvc);
342 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
343 "truthUnconvRecoUnconv",
"truthUnconvRecoUnconv",
344 "/MONITORING/truthUnconvRecoUnconv/",
rootHistSvc);
347 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
348 "recoPhotonUnconvLoose",
"Loose Photons Reco Photon",
349 "/MONITORING/recoPhotonUnconvLoose/",
rootHistSvc);
352 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
353 "recoPhotonUnconvTight",
"Tight Photons Reco Photon",
354 "/MONITORING/recoPhotonUnconvTight/",
rootHistSvc);
357 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
358 "recoPhotonConvLoose",
"Loose Photons Reco Photon",
362 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
363 "recoPhotonConvTight",
"Tight Photons Reco Photon",
367 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
368 "recoPhotonUnconvIsoFixedCutTight",
369 "Isolation Fixed Cut Tight Photons Reco Photon",
370 "/MONITORING/recoPhotonUnconvIsoFixedCutTight/",
rootHistSvc);
373 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
374 "recoPhotonUnconvIsoFixedCutTightCaloOnly",
375 "Isolation Fixed Cut Tight Calo Only Photons Reco Photon",
376 "/MONITORING/recoPhotonUnconvIsoFixedCutTightCaloOnly/",
380 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
381 "recoPhotonUnconvIsoFixedCutLoose",
382 "Isolation Fixed Cut Loose Photons Reco Photon",
383 "/MONITORING/recoPhotonUnconvIsoFixedCutLoose/",
rootHistSvc);
386 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
387 "recoPhotonConvIsoFixedCutTight",
388 "Isolation Fixed Cut Tight Photons Reco Photon",
389 "/MONITORING/recoPhotonConvIsoFixedCutTight/",
rootHistSvc);
392 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
393 "recoPhotonConvIsoFixedCutTightCaloOnly",
394 "Isolation Fixed Cut Tight Calo Only Photons Reco Photon",
395 "/MONITORING/recoPhotonConvIsoFixedCutTightCaloOnly/",
rootHistSvc);
398 std::make_unique<egammaMonitoring::TruthPhotonHistograms>(
399 "recoPhotonConvIsoFixedCutLoose",
400 "Isolation Fixed Cut Loose Photons Reco Photon",
401 "/MONITORING/recoPhotonConvIsoFixedCutLoose/",
rootHistSvc);
406 static const std::string typeMatch[5] = {
"",
"MatchElectron",
"NotElectron",
407 "MatchPion",
"NotMatched"};
408 static const std::string typeTrk[2] = {
"",
"TRT"};
409 static const std::string ptTrk[2] = {
"",
"highpT"};
410 static const std::string ctypeMatch[5] = {
411 "",
" match to electrons",
" not matched to electrons",
412 " match to pions",
" not matched"};
413 static const std::string ctypeTrk[2] = {
"",
" TRTSA"};
414 static const std::string cptTrk[2] = {
"",
" pT > 3 GeV"};
416 for (
int im = 0; im < 5; im++) {
417 std::string mN = typeMatch[im];
418 for (
int it = 0; it < (
m_hasTRT ? 2 : 1); it++) {
419 std::string tN = typeTrk[it];
420 for (
int ip = 0; ip < 2; ip++) {
421 std::string pN = ptTrk[ip];
424 "InDetTracks" + typeTrk[it] + typeMatch[im] + ptTrk[ip];
425 std::string fN =
"/MONITORING/" + nN +
"/";
427 "InDet Tracks" + ctypeTrk[it] + ctypeMatch[im] + cptTrk[ip];
431 std::make_unique<egammaMonitoring::TrackHistograms>(
484 m_dR1 =
new TH1D(
"dR1",
";#Delta R;Events", 1000, 0, 0.1);
486 m_dR2 =
new TH1D(
"dR2",
";#Delta R;Events", 1000, 0, 0.1);
520 return StatusCode::SUCCESS;
527 const float mu = eventInfo->averageInteractionsPerCrossing();
551 ATH_MSG_DEBUG(
"------------ Truth Egamma Container ---------------");
552 for (
const auto *egtruth : *egTruthParticles) {
564 if (egtruth->pt() > 10 * Gaudi::Units::GeV) {
569 ATH_MSG_DEBUG(
"------------ Truth Particles Container ---------------");
570 unsigned int promptElectronTruthIndex =
571 std::numeric_limits<unsigned int>::max();
572 for (
const auto *truth : *truthParticles) {
574 if (!truth)
continue;
575 if (std::abs(truth->pdgId()) != 11)
continue;
583 bool haspVtx = truth->hasProdVtx();
587 rProd = pvtx->
perp();
589 bool hasdVtx = truth->hasDecayVtx();
597 << truth <<
" TO " << TO <<
" TT " << TT
598 <<
" Rprod = " << rProd <<
" Rdec = " << rDec
599 <<
" eventNumber " << eventInfo->eventNumber());
607 promptElectronTruthIndex = truth->index();
618 for (
const auto *tp : *InDetTPs) {
629 if ((nPi + nSCT) < 7)
continue;
633 if (!truth || std::abs(truth->
pdgId()) != 11)
continue;
640 truth->index() == promptElectronTruthIndex) {
656 if (firstElTruth->index() == promptElectronTruthIndex) {
664 for (
const auto *gsf : *GSFTracks) {
670 if (!truth)
continue;
678 if ((nPi + nSCT) < 7)
continue;
685 truth->index() == promptElectronTruthIndex) {
698 << firstElTruth->index());
702 if (firstElTruth->index() == promptElectronTruthIndex) {
709 ATH_MSG_DEBUG(
"------------ Reco central electrons ---------------");
710 bool foundPromptElectron =
false;
712 for (
const auto *elrec : *RecoEl) {
714 if (!elrec)
continue;
722 if (elrec->pt() > 10 * Gaudi::Units::GeV) {
732 if (std::abs(truth->
pdgId()) != 11 || foundPromptElectron)
740 truth->index() == promptElectronTruthIndex) {
745 if (!firstElTruth)
continue;
749 if (firstElTruth->index() == promptElectronTruthIndex) {
751 elTruth = firstElTruth;
755 foundPromptElectron =
true;
766 for (
const auto *el : *RecoFwdEl) {
772 if (el->pt() > 10 * Gaudi::Units::GeV) {
788 if (std::abs(truth->
pdgId()) != 11 &&
789 promptElectronTruthIndex < truthParticles->
size()) {
791 double dR1 = vtruth->
p4().DeltaR(el->caloCluster()->p4());
792 double dR2 = truth->
p4().DeltaR(el->caloCluster()->p4());
799 if (std::abs(truth->
pdgId()) != 11)
continue;
804 truth->index() == promptElectronTruthIndex) {
810 if (!firstElTruth)
continue;
811 if (firstElTruth->index() == promptElectronTruthIndex) {
813 elTruth = firstElTruth;
817 if (foundPromptElectron) {
818 ATH_MSG_DEBUG(
"A fwd electron also reconstructed as central "
821 <<
" event = " << eventInfo->eventNumber());
823 if (el->nTrackParticles() > 0)
826 foundPromptElectron =
true;
828 if (el->nTrackParticles() > 0)
848 for (
const auto *phrec : *RecoPh) {
857 if (phrec->pt() > 10 * Gaudi::Units::GeV) {
864 for (
const auto *egtruth : *egTruthParticles) {
872 bool isTrueLateConv =
883 if (!isTrueConv && !isTrueLateConv)
886 if (photon || electron)
894 if (egtruth->pt() > 10 * Gaudi::Units::GeV) {
988 for (
const auto *tp : *InDetTPs) {
1000 if (tp->pt() > 3000.) {
1026 if (tp->pt() > 3000.) {
1045 return StatusCode::SUCCESS;
1054 ATH_MSG_INFO(
"Number of events with electron reconstructed "
1055 "as both Central and Forward "
1060 "trackingEfficiency",
"/MONITORING/trackingEfficiency/",
rootHistSvc);
1064 "GSFEfficiency",
"/MONITORING/GSFEfficiency/",
rootHistSvc);
1068 "matchingEfficiency",
"/MONITORING/matchingEfficiency/",
rootHistSvc);
1072 "reconstructionEfficiency",
"/MONITORING/reconstructionEfficiency/",
1077 "recoElectronLooseLHEfficiency",
1078 "/MONITORING/recoElectronLooseLHEfficiency/",
rootHistSvc);
1082 "recoElectronMediumLHEfficiency",
1083 "/MONITORING/recoElectronMediumLHEfficiency/",
rootHistSvc);
1087 "recoElectronTightLHEfficiency",
1088 "/MONITORING/recoElectronTightLHEfficiency/",
rootHistSvc);
1097 "truthPhotonRecoPhotonEfficiency",
1098 "/MONITORING/truthPhotonRecoPhotonEfficiency/",
rootHistSvc);
1102 "truthPhotonRecoPhotonOrElectronEfficiency",
1103 "/MONITORING/truthPhotonRecoPhotonOrElectronEfficiency/",
rootHistSvc);
1107 "truthPhotonConvRecoEfficiency",
1108 "/MONITORING/truthPhotonConvRecoEfficiency/",
rootHistSvc);
1112 "truthPhotonUnconvRecoEfficiency",
1113 "/MONITORING/truthPhotonUnconvRecoEfficiency/",
rootHistSvc);
1117 "truthPhotonConvRecoConvEfficiency",
1118 "/MONITORING/truthPhotonConvRecoConvEfficiency/",
rootHistSvc);
1122 "truthPhotonConvRecoConv1SiEfficiency",
1123 "/MONITORING/truthPhotonConvRecoConv1SiEfficiency/",
rootHistSvc);
1127 "truthPhotonConvRecoConv2SiEfficiency",
1128 "/MONITORING/truthPhotonConvRecoConv2SiEfficiency/",
rootHistSvc);
1132 "truthPhotonConvRecoUnconvEfficiency",
1133 "/MONITORING/truthPhotonConvRecoUnconvEfficiency/",
rootHistSvc);
1137 "truthPhotonUnconvRecoConvEfficiency",
1138 "/MONITORING/truthPhotonUnconvRecoConvEfficiency/",
rootHistSvc);
1142 "truthPhotonUnconvRecoConv1SiEfficiency",
1143 "/MONITORING/truthPhotonUnconvRecoConv1SiEfficiency/",
rootHistSvc);
1147 "truthPhotonUnconvRecoConv2SiEfficiency",
1148 "/MONITORING/truthPhotonUnconvRecoConv2SiEfficiency/",
rootHistSvc);
1152 "truthPhotonUnconvRecoUnconvEfficiency",
1153 "/MONITORING/truthPhotonUnconvRecoUnconvEfficiency/",
rootHistSvc);
1157 "truthPhotonRecoConvEfficiency",
1158 "/MONITORING/truthPhotonRecoConvEfficiency/",
rootHistSvc);
1162 "truthPhotonRecoUnconvEfficiency",
1163 "/MONITORING/truthPhotonRecoUnconvEfficiency/",
rootHistSvc);
1167 "recoPhotonUnconvIsoFixedCutTightEfficiency",
1168 "/MONITORING/recoPhotonUnconvIsoFixedCutTightEfficiency/",
rootHistSvc);
1173 recoPhotonUnconvIsoFixedCutTightCaloOnlyEfficiency(
1174 "recoPhotonUnconvIsoFixedCutTightCaloOnlyEfficiency",
1175 "/MONITORING/recoPhotonUnconvIsoFixedCutTightCaloOnlyEfficiency/",
1181 "recoPhotonUnconvIsoFixedCutLooseEfficiency",
1182 "/MONITORING/recoPhotonUnconvIsoFixedCutLooseEfficiency/",
rootHistSvc);
1187 "recoPhotonConvIsoFixedCutTightEfficiency",
1188 "/MONITORING/recoPhotonConvIsoFixedCutTightEfficiency/",
rootHistSvc);
1192 recoPhotonConvIsoFixedCutTightCaloOnlyEfficiency(
1193 "recoPhotonConvIsoFixedCutTightCaloOnlyEfficiency",
1194 "/MONITORING/recoPhotonConvIsoFixedCutTightCaloOnlyEfficiency/",
1200 "recoPhotonConvIsoFixedCutLooseEfficiency",
1201 "/MONITORING/recoPhotonConvIsoFixedCutLooseEfficiency/",
rootHistSvc);
1205 "recoPhotonConvLooseEfficiency",
1206 "/MONITORING/recoPhotonConvLooseEfficiency/",
rootHistSvc);
1210 "recoPhotonConvTightEfficiency",
1211 "/MONITORING/recoPhotonConvTightEfficiency/",
rootHistSvc);
1215 "recoPhotonUnconvLooseEfficiency",
1216 "/MONITORING/recoPhotonUnconvLooseEfficiency/",
rootHistSvc);
1220 "recoPhotonUnconvTightEfficiency",
1221 "/MONITORING/recoPhotonUnconvTightEfficiency/",
rootHistSvc);
1226 "truthPhotonRecoPhotonWidth",
"/MONITORING/truthPhotonRecoPhotonWidth/",
1230 "truthPhotonConvPhotonWidth",
"/MONITORING/truthPhotonConvPhotonWidth/",
1234 "truthPhotonConvRecoConvWidth",
1235 "/MONITORING/truthPhotonConvRecoConvWidth/",
rootHistSvc);
1238 "truthPhotonConvRecoConv1SiWidth",
1239 "/MONITORING/truthPhotonConvRecoConv1SiWidth/",
rootHistSvc);
1243 "truthPhotonConvRecoConv2SiWidth",
1244 "/MONITORING/truthPhotonConvRecoConv2SiWidth/",
rootHistSvc);
1249 "truthPhotonConvRecoConv1TRTEfficiency",
1250 "/MONITORING/truthPhotonConvRecoConv1TRTEfficiency/",
rootHistSvc);
1254 "truthPhotonConvRecoConv2TRTEfficiency",
1255 "/MONITORING/truthPhotonConvRecoConv2TRTEfficiency/",
rootHistSvc);
1259 "truthPhotonConvRecoConv2SiTRTEfficiency",
1260 "/MONITORING/truthPhotonConvRecoConv2SiTRTEfficiency/",
rootHistSvc);
1264 "truthPhotonUnconvRecoConv1TRTEfficiency",
1265 "/MONITORING/truthPhotonUnconvRecoConv1TRTEfficiency/",
rootHistSvc);
1269 "truthPhotonUnconvRecoConv2TRTEfficiency",
1270 "/MONITORING/truthPhotonUnconvRecoConv2TRTEfficiency/",
rootHistSvc);
1274 truthPhotonUnconvRecoConv2SiTRTEfficiency(
1275 "truthPhotonUnconvRecoConv2SiTRTEfficiency",
1276 "/MONITORING/truthPhotonUnconvRecoConv2SiTRTEfficiency/",
1282 "truthPhotonConvRecoConv1TRTWidth",
1283 "/MONITORING/truthPhotonConvRecoConv1TRTWidth/",
rootHistSvc);
1287 "truthPhotonConvRecoConv2TRTWidth",
1288 "/MONITORING/truthPhotonConvRecoConv2TRTWidth/",
rootHistSvc);
1292 "truthPhotonConvRecoConv2SiTRTWidth",
1293 "/MONITORING/truthPhotonConvRecoConv2SiTRTWidth/",
rootHistSvc);
1298 "truthPhotonConvRecoUnconvWidth",
1299 "/MONITORING/truthPhotonConvRecoUnconvWidth/",
rootHistSvc);
1303 "truthPhotonUnconvPhotonWidth",
1304 "/MONITORING/truthPhotonUnconvPhotonWidth/",
rootHistSvc);
1307 "truthPhotonUnconvRecoConvWidth",
1308 "/MONITORING/truthPhotonUnconvRecoConvWidth/",
rootHistSvc);
1312 "truthPhotonUnconvRecoUnconvWidth",
1313 "/MONITORING/truthPhotonUnconvRecoUnconvWidth/",
rootHistSvc);
1320 return StatusCode::SUCCESS;
1325 return truth && abs(truth->
pdgId()) == 11;
1330 return truth && abs(truth->
pdgId()) == 211;
1344 double pTL = -9e9, pTSL = -9e9;
1345 for (
const auto *el : *RecoEl) {
1346 double pt = el->pt();
1354 }
else if (pt > pTSL) {
1361 return StatusCode::SUCCESS;
1372 if (e1->pt() > 10 * Gaudi::Units::GeV)
1374 if (e2->pt() > 10 * Gaudi::Units::GeV)
1379 return StatusCode::SUCCESS;
1385 double xmi = 66, xma = 116, eps = 0.01;
1386 int ib1 = hRef->FindBin(xmi + eps);
1387 int ib2 = hRef->FindBin(xma - eps);
1388 TH1D *hmee =
new TH1D(
"mee",
";m_{ee} [GeV];Events / 0.5 GeV", ib2 - ib1 + 1,
1390 for (
int ib = ib1; ib <= ib2; ib++) {
1391 double c = hRef->GetBinContent(ib);
1392 double ec = hRef->GetBinError(ib);
1393 hmee->SetBinContent(ib - ib1 + 1, c);
1394 hmee->SetBinError(ib - ib1 + 1, ec);
1398 TString vsX[3] = {
"Et",
"Etetale0p8",
"Eta"};
1399 TString coo[3] = {
"x",
"x",
"y"};
1400 for (
int iL = 0; iL < 5; iL++) {
1403 nRef =
m_clusterReco->m_histo3DMap[Form(
"hNcellsvseteta_Lr%i", iL)];
1406 for (
int iX = 0; iX < 3; iX++) {
1407 if (iL == 4 && iX == 2)
1411 int ieta08 = nRef->GetYaxis()->FindBin(0.79);
1412 nRef->GetYaxis()->SetRange(1, ieta08);
1413 }
else if (iX == 2) {
1414 nRef->GetYaxis()->SetRange(1, 25);
1416 TH2D *nRefvsX = (TH2D *)nRef->Project3D(Form(
"z%s", coo[iX].
Data()));
1419 pN = Form(
"pn%ivs%s", iL, vsX[iX].
Data());
1421 pN = Form(
"pEopvs%s", vsX[iX].
Data());
1422 TProfile *pRefvsX = nRefvsX->ProfileX(pN.Data());
1423 pRefvsX->SetTitle(pN.Data());
1424 pRefvsX->GetXaxis()->SetTitle(iX < 2 ?
"E_{T} [GeV]" :
"|#eta|");
1425 pRefvsX->GetYaxis()->SetTitle(iL < 4 ? Form(
"nCells_Lr%i", iL) :
"E/p");
1427 Form(
"/MONITORING/Data/%s", pRefvsX->GetName()), pRefvsX));
1431 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
bool isValid() const
Test to see if the link can be dereferenced.
ATLAS-specific HepMC functions.
std::pair< std::vector< unsigned int >, bool > res
size_t size() const
Number of registered mappings.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
bool msgLvl(const MSG::Level lvl) const
SG::ReadHandleKey< xAOD::ElectronContainer > m_ElectronsKey
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonConvRecoConv1Si
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonUnconvRecoConv2SiTRT
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonConvRecoConv
EgammaMonitoring(const std::string &name, ISvcLocator *pSvcLocator)
std::map< std::string, std::unique_ptr< egammaMonitoring::TrackHistograms > > mapTrkHistograms
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonRecoPhotonOrElectron
Gaudi::Property< bool > m_hasTRT
is it run 3 or run 4 and later ?
std::unique_ptr< egammaMonitoring::RecoElectronHistograms > recoElectronAll
ToolHandle< CP::IIsolationSelectionTool > m_IsoFixedCutTightCaloOnly
std::unique_ptr< egammaMonitoring::IHistograms > recoPhotonUnconvIsoFixedCutTightCaloOnly
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonAllConv
virtual StatusCode finalize()
std::unique_ptr< egammaMonitoring::IsolationHistograms > isolationAll
ToolHandle< IAsgPhotonIsEMSelector > m_Tight_Photon
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonConvPhoton
ToolHandle< IAsgElectronLikelihoodTool > m_Tight_Ele
std::unique_ptr< egammaMonitoring::ClusterHistograms > clusterConvPhotonTRTTRT
std::unique_ptr< egammaMonitoring::ShowerShapesHistograms > showerShapesAll
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_egTruthParticlesKey
static bool notMatchedToTruth(const xAOD::TrackParticle &tp)
std::unique_ptr< egammaMonitoring::IHistograms > recoPhotonUnconvLoose
std::unique_ptr< egammaMonitoring::IHistograms > recoPhotonUnconvTight
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticlesKey
std::unique_ptr< egammaMonitoring::ClusterHistograms > clusterConvPhotonSiTRT
ToolHandle< IAsgPhotonIsEMSelector > m_Loose_Photon
StatusCode ZeeSelection(float mu, const EventContext &ctx)
std::unique_ptr< egammaMonitoring::IHistograms > recoPhotonConvLoose
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonConvRecoConv2SiTRT
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonUnconvRecoUnconv
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_GSFTrackParticlesKey
std::unique_ptr< egammaMonitoring::IHistograms > recoPhotonUnconvIsoFixedCutTight
virtual StatusCode initialize()
SG::ReadHandleKey< xAOD::ElectronContainer > m_FwdElectronsKey
std::unique_ptr< egammaMonitoring::ClusterHistograms > clusterConvPhotonSiSi
std::unique_ptr< egammaMonitoring::TruthElectronHistograms > truthRecoElectronLoose
static bool matchedToPion(const xAOD::TrackParticle &tp)
std::unique_ptr< egammaMonitoring::DiObjectHistograms > m_diElectron
ToolHandle< IAsgElectronLikelihoodTool > m_Medium_Ele
std::unique_ptr< egammaMonitoring::TruthElectronHistograms > truthPromptElectronWithGSFTrack
std::unique_ptr< egammaMonitoring::IHistograms > recoPhotonConvIsoFixedCutTightCaloOnly
std::unique_ptr< egammaMonitoring::IHistograms > recoPhotonConvTight
std::unique_ptr< egammaMonitoring::ClusterHistograms > clusterPrompt10GeV
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonConvRecoConv1TRT
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonUnconvPhoton
ToolHandle< IAsgElectronLikelihoodTool > m_Medium_FwdEle
static bool matchedToElectron(const xAOD::TrackParticle &tp)
std::unique_ptr< egammaMonitoring::IHistograms > recoPhotonUnconvIsoFixedCutLoose
std::unique_ptr< egammaMonitoring::RecoPhotonHistograms > recoPhotonAll
std::unique_ptr< egammaMonitoring::TruthElectronHistograms > truthPromptElectronWithRecoTrack
std::unique_ptr< egammaMonitoring::ClusterHistograms > clusterConvPhotonTRT
std::unique_ptr< egammaMonitoring::ShowerShapesHistograms > showerShapes10GeV
std::unique_ptr< egammaMonitoring::TruthElectronHistograms > truthPromptElectronWithTrack
SmartIF< ITHistSvc > rootHistSvc
Tools and services ///.
std::unique_ptr< egammaMonitoring::ClusterHistograms > clusterPromptAll
std::unique_ptr< egammaMonitoring::ClusterHistograms > clusterAll
std::unique_ptr< egammaMonitoring::ClusterHistograms > clusterConvPhoton
ToolHandle< IAsgElectronLikelihoodTool > m_Loose_Ele
Selector tools.
ToolHandle< IAsgElectronLikelihoodTool > m_Tight_FwdEle
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonConvRecoConv2Si
std::unique_ptr< egammaMonitoring::IHistograms > recoPhotonConvIsoFixedCutLoose
ToolHandle< CP::IIsolationSelectionTool > m_IsoFixedCutTight
ToolHandle< CP::IIsolationSelectionTool > m_IsoFixedCutLoose
std::unique_ptr< egammaMonitoring::TruthElectronHistograms > truthElectronAll
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonAll
std::unique_ptr< egammaMonitoring::TruthElectronHistograms > truthElectronRecoElectronAll
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
ToolHandle< IMCTruthClassifier > m_mcTruthClassifier
std::unique_ptr< egammaMonitoring::TruthElectronHistograms > truthRecoElectronMedium
SG::ReadHandleKey< xAOD::PhotonContainer > m_PhotonsKey
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonRecoPhoton
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonAllLateConv
virtual StatusCode execute(const EventContext &ctx)
Execute method.
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonUnconvRecoConv1Si
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonUnconvRecoConv
std::unique_ptr< egammaMonitoring::ClusterHistograms > clusterUnconvPhoton
std::unique_ptr< egammaMonitoring::RecoClusterHistograms > m_clusterReco
std::unique_ptr< egammaMonitoring::TruthElectronHistograms > truthPromptElectronAll
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonUnconvRecoConv2Si
Gaudi::Property< std::string > m_sampleType
Sample name ///.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_InDetTrackParticlesKey
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonAllUnconv
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonUnconvRecoConv2TRT
std::unique_ptr< egammaMonitoring::IHistograms > recoPhotonConvIsoFixedCutTight
ToolHandle< IAsgElectronLikelihoodTool > m_Loose_FwdEle
std::unique_ptr< egammaMonitoring::ClusterHistograms > cluster10GeV
std::unique_ptr< egammaMonitoring::TruthElectronHistograms > truthPromptElectronWithReco
std::unique_ptr< egammaMonitoring::TruthElectronHistograms > truthRecoElectronTight
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonConvRecoUnconv
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonUnconvRecoConv1TRT
std::unique_ptr< egammaMonitoring::ClusterHistograms > clusterConvPhotonSi
std::unique_ptr< egammaMonitoring::IHistograms > truthPhotonConvRecoConv2TRT
StatusCode divide(IHistograms *pass, IHistograms *total)
StatusCode fill(IHistograms *input)
int pdgId() const
PDG ID code.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
float perp() const
Vertex transverse distance from the beam line.
bool isGenStable(const T &p)
Determine if the particle is stable at the generator (not det-sim) level,.
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
xAOD::EgammaParameters::ConversionType conversionType(const xAOD::Photon *ph)
return the photon conversion type (see EgammaEnums)
bool isTrueConvertedPhoton(const xAOD::Photon *ph, float maxRadius=800.)
is the object matched to a true converted photon with R < maxRadius
const xAOD::TruthParticle * getBkgElectronMother(const xAOD::Electron *el, const bool allTheWayBack=true)
Helper wrapper function for calling the function above extracting the truth from a reco electron.
const xAOD::Photon * getRecoPhoton(const xAOD::TruthParticle *particle)
return the reco photon associated to the given TruthParticle (if any)
std::size_t numberOfSiHits(const xAOD::TrackParticle *tp)
return the number of Si hits in the track particle
const xAOD::Electron * getRecoElectron(const xAOD::TruthParticle *)
return the reco electron associated to the given TruthParticle (if any)
@ singleSi
one track only, with Si hits
@ doubleTRT
two tracks, none with Si hits (TRT only)
@ singleTRT
one track only, no Si hits (TRT only)
@ doubleSi
two tracks, both with Si hits
@ doubleSiTRT
two tracks, only one with Si hits
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any).
TruthVertex_v1 TruthVertex
Typedef to implementation.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TruthParticle_v1 TruthParticle
Typedef to implementation.
Photon_v1 Photon
Definition of the current "egamma version".
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Electron_v1 Electron
Definition of the current "egamma version".