16#include "TLorentzVector.h"
23#include "GaudiKernel/SystemOfUnits.h"
24#include "GaudiKernel/PhysicalConstants.h"
40 if (evtStore->contains<T>(contName)){
42 if(evtStore->retrieve(container,contName).isFailure())
return nullptr;
87 if (
sc.isFailure())
ATH_MSG_WARNING(
"Could not initialize ManagedMonitorToolBase" );
90 ATH_MSG_INFO(
"IDPerfMonWenu::Initialize() -- Setting up electron LH tool.");
96 std::string confDir =
"ElectronPhotonSelectorTools/offline/mc15_20150712/";
98 ATH_MSG_WARNING(
"electronIDLevel is set to empty! No electron ID cuts will be applied.");
103 ATH_MSG_WARNING(
"Unknown electronIDLevel!! (Accepted values: Loose, Medium, Tight)");
114 ATH_MSG_WARNING(
"Electron likelihood tool initialize() failed! Turning off electron LH cuts!");
117 return StatusCode::SUCCESS;
130 m_Nevents =
new TH1F(
"Nevents",
"Number of events processed", 1, -.5, 0.5);
132 m_Check =
new TH1F(
"Check",
"", 4, 0,4);
134 m_Zee_invmass =
new TH1F(
"Zee_invmass",
"Invariant mass of the two leading em clusters", 90, 0.,180.);
136 m_Zee_invmass_sel =
new TH1F(
"Zee_invmass_sel",
"Invariant mass of the two leading em clusters after Zee selection", 80, 50.,130.);
138 m_Zee_trk_invmass =
new TH1F(
"Zee_trk_invmass",
"Invariant mass of the two tracks", 90, 0.,180.);
140 m_Zee_trk_invmass_scaled =
new TH1F(
"Zee_trk_invmass_scaled",
"Invariant mass of the two tracks scaled to per event", 90, 0.,180.);
142 m_Zee_trk_invmass_sel =
new TH1F(
"Zee_trk_invmass_sel",
"Invariant mass of the two tracks after Zee selection", 90, 0.,180.);
144 m_Zee_Eopasym_perevent =
new TH1F(
"Zee_Eopasym_perevent",
"E/p difference (pos-neg)/(pos+neg) per Z event for Zee EM-clusters", 60, -1.5, 1.5);
146 m_Zee_Eopasym_perevent_central =
new TH1F(
"Zee_Eopasym_perevent_central",
"E/p difference (pos-neg)/(pos+neg) per Z event for Zee EM-clusters with E/p between 0.7 and 1.3", 60, -1.5, 1.5);
219 for (
int region=0; region!=
Nregions; ++region) {
224 m_Zee_Eop.push_back(
new TH1F(name.c_str(),title.c_str(), 60, 0., 10.));
227 title =
"E/p difference (pos-neg) for Zee EM-clusters in " +
m_region_strings[region];
228 m_Zee_Eopdiff.push_back(
new TH1F(name.c_str(),title.c_str(), 10, 0., 2.));
231 title =
"E/p for pos. charged Zee EM-clusters in " +
m_region_strings[region];
232 m_Zee_Eop_plus.push_back(
new TH1F(name.c_str(),title.c_str(), 10, 0., 2.));
235 title =
"E/p for neg. charged Zee EM-clusters in " +
m_region_strings[region];
236 m_Zee_Eop_minus.push_back(
new TH1F(name.c_str(),title.c_str(), 10, 0., 2.));
238 if (region !=
incl)
continue;
239 m_Zee_eta.push_back(
new TH1F(
"Zee_eta",
"Eta of Zee EM-clusters", 15, -3., 3.));
241 m_Zee_phi.push_back(
new TH1F(
"Zee_phi",
"Phi of Zee EM-clusters", 15, -3.15, 3.15));
243 m_Zee_deta.push_back(
new TH1F(
"Zee_deta",
"deltaEta(EM-cluster,track) in Zee events", 50, -0.5, 0.5));
245 m_Zee_deta_vs_eta.push_back(
new TProfile(
"Zee_deta_vs_eta",
"deltaEta(EM-cluster,track) vs. eta in Zee events", 15, -3., 3.));
247 m_Zee_deta_vs_phi.push_back(
new TProfile(
"Zee_deta_vs_phi",
"deltaEta(EM-cluster,track) vs. phi in Zee events", 15, -3.15, 3.15));
249 m_Zee_absdeta_vs_eta.push_back(
new TProfile(
"Zee_absdeta_vs_eta",
"Abs(deltaEta(EM-cluster,track)) vs. eta in Zee events", 15, -3., 3.));
251 m_Zee_absdeta_vs_phi.push_back(
new TProfile(
"Zee_absdeta_vs_phi",
"Abs(deltaEta(EM-cluster,track)) vs. phi in Zee events", 15, -3.15, 3.15));
253 m_Zee_dphi.push_back(
new TH1F(
"Zee_dphi",
"deltaPhi(EM-cluster,track) in Zee events", 50, -0.5, 0.5));
255 m_Zee_dphi_vs_eta.push_back(
new TProfile(
"Zee_dphi_vs_eta",
"deltaPhi(EM-cluster,track) vs. eta in Zee events", 15, -3., 3.));
257 m_Zee_dphi_vs_phi.push_back(
new TProfile(
"Zee_dphi_vs_phi",
"deltaPhi(EM-cluster,track) vs. phi in Zee events", 15, -3.15, 3.15));
259 m_Zee_absdphi_vs_eta.push_back(
new TProfile(
"Zee_absdphi_vs_eta",
"Abs(deltaPhi(EM-cluster,track)) vs. eta in Zee events", 15, -3., 3.));
261 m_Zee_absdphi_vs_phi.push_back(
new TProfile(
"Zee_absdphi_vs_phi",
"Abs(deltaPhi(EM-cluster,track)) vs. phi in Zee events", 15, -3.15, 3.15));
264 m_Zee_dphi_vs_phi_2d.push_back(
new TH2F(
"Zee_dphi_vs_phi_2d",
"deltaPhi(EM-cluster,track) vs. phi in Zee events", 15, -3.15, 3.15 , 64, -0.1, 0.1));
266 m_Zee_deta_vs_phi_2d.push_back(
new TH2F(
"Zee_deta_vs_phi_2d",
"deltaPhi(EM-cluster,track) vs. phi in Zee events", 15, -3.15, 3.15 , 64, -0.1, 0.1));
268 m_Zee_dphi_vs_eta_2d.push_back(
new TH2F(
"Zee_dphi_vs_eta_2d",
"deltaPhi(EM-cluster,track) vs. eta in Zee events", 15, -3., 3. , 64, -0.1, 0.1));
270 m_Zee_deta_vs_eta_2d.push_back(
new TH2F(
"Zee_deta_vs_eta_2d",
"deltaPhi(EM-cluster,track) vs. eta in Zee events", 15, -3., 3. , 64, -0.1, 0.1));
273 m_Zee_trackmatched_eta.push_back(
new TH1F(
"Zee_trackmatched_eta",
"Eta of track-matched Zee EM-clusters", 15, -3., 3.));
275 m_Zee_trackmatched_phi.push_back(
new TH1F(
"Zee_trackmatched_phi",
"Phi of track-matched Zee EM-clusters", 15, -3.15, 3.15));
279 m_Zee_trackmatched_Eopmatched_phi.push_back(
new TH1F(
"Zee_trackmatched_Eopmatched_phi",
"Phi of track-matched and E/p-matched Zee EM-clusters", 15, -3.15, 3.15));
286 m_Zee_trackmatch_eff_vs_eta.push_back(
new TH1F(
"Zee_trackmatch_eff_vs_eta",
"Track-match efficiency for Zee EM-clusters vs. eta", 15, -3., 3.));
288 m_Zee_trackmatch_eff_vs_phi.push_back(
new TH1F(
"Zee_trackmatch_eff_vs_phi",
"Track-match efficiency for Zee EM-clusters vs. phi", 15, -3.15, 3.15));
290 m_Zee_Eopmatch_eff_vs_eta.push_back(
new TH1F(
"Zee_Eopmatch_eff_vs_eta",
"E/p-match efficiency for Zee EM-clusters vs. eta", 15, -3., 3.));
292 m_Zee_Eopmatch_eff_vs_phi.push_back(
new TH1F(
"Zee_Eopmatch_eff_vs_phi",
"E/p-match efficiency for Zee EM-clusters vs. phi", 15, -3.15, 3.15));
294 m_Zee_tightEopmatch_eff_vs_eta.push_back(
new TH1F(
"Zee_tightEopmatch_eff_vs_eta",
"Tight E/p-match efficiency for Zee EM-clusters vs. eta", 15, -3., 3.));
296 m_Zee_tightEopmatch_eff_vs_phi.push_back(
new TH1F(
"Zee_tightEopmatch_eff_vs_phi",
"Tight E/p-match efficiency for Zee EM-clusters vs. phi", 15, -3.15, 3.15));
299 m_Zee_meanEop_vs_p.push_back(
new TProfile(
"Zee_meanEop_vs_p",
"Mean E/p vs p for Zee EM-clusters", 15, 0., 300.));
301 m_Zee_meanEop_vs_invp.push_back(
new TProfile(
"Zee_meanEop_vs_invp",
"Mean E/p vs 1/p for Zee EM-clusters", 15, 0., 0.05));
303 m_Zee_meanEop_vs_E.push_back(
new TProfile(
"Zee_meanEop_vs_E",
"Mean E/p vs E for Zee EM-clusters", 15, 0., 300.));
305 m_Zee_meanEop_vs_chargedp.push_back(
new TProfile(
"Zee_meanEop_vs_chargedp",
"Mean E/p vs charge*p for Zee EM-clusters", 30, -300., 300.));
307 m_Zee_meanEop_vs_chargedE.push_back(
new TProfile(
"Zee_meanEop_vs_chargedE",
"Mean E/p vs charge*E for Zee EM-clusters", 30, -300., 300.));
309 m_Zee_meanEop_vs_phi.push_back(
new TProfile(
"Zee_meanEop_vs_phi",
"Mean E/p vs phi for Zee EM-clusters", 15, -3.15, 3.15));
311 m_Zee_meanEop_vs_eta.push_back(
new TProfile(
"Zee_meanEop_vs_eta",
"Mean E/p vs eta for Zee EM-clusters", 15, -3., 3.));
314 m_Zee_meanEop_vs_p_plus.push_back(
new TProfile(
"Zee_meanEop_vs_p_plus",
"Mean E/p vs p for pos. charged Zee EM-clusters", 15, 0., 300.));
316 m_Zee_meanEop_vs_invp_plus.push_back(
new TProfile(
"Zee_meanEop_vs_invp_plus",
"Mean E/p vs 1/p for pos. charged Zee EM-clusters", 15, 0., 0.05));
318 m_Zee_meanEop_vs_E_plus.push_back(
new TProfile(
"Zee_meanEop_vs_E_plus",
"Mean E/p vs E for pos. charged Zee EM-clusters", 15, 0., 300.));
320 m_Zee_meanEop_vs_phi_plus.push_back(
new TProfile(
"Zee_meanEop_vs_phi_plus",
"Mean E/p vs phi for pos. charged Zee EM-clusters", 15, -3.15, 3.15));
322 m_Zee_meanEop_vs_eta_plus.push_back(
new TProfile(
"Zee_meanEop_vs_eta_plus",
"Mean E/p vs eta for pos. charged Zee EM-clusters", 15, -3., 3.));
325 m_Zee_meanEop_vs_p_minus.push_back(
new TProfile(
"Zee_meanEop_vs_p_minus",
"Mean E/p vs p for neg. charged Zee EM-clusters", 15, 0., 300.));
327 m_Zee_meanEop_vs_invp_minus.push_back(
new TProfile(
"Zee_meanEop_vs_invp_minus",
"Mean E/p vs 1/p for neg. charged Zee EM-clusters", 15, 0., 0.05));
329 m_Zee_meanEop_vs_E_minus.push_back(
new TProfile(
"Zee_meanEop_vs_E_minus",
"Mean E/p vs E for neg. charged Zee EM-clusters", 15, 0., 300.));
331 m_Zee_meanEop_vs_phi_minus.push_back(
new TProfile(
"Zee_meanEop_vs_phi_minus",
"Mean E/p vs phi for neg. charged Zee EM-clusters", 15, -3.15, 3.15));
333 m_Zee_meanEop_vs_eta_minus.push_back(
new TProfile(
"Zee_meanEop_vs_eta_minus",
"Mean E/p vs eta for neg. charged Zee EM-clusters", 15, -3., 3.));
336 m_Zee_Eop_lt1_gt1.push_back(
new TH1F(
"Zee_Eop_lt1_gt1",
"E/p below/above 1 for Zee EM-clusters", 2, 0.5, 1.5));
339 m_Zee_Eopdiff_vs_p.push_back(
new TProfile(
"Zee_Eopdiff_vs_p",
"E/p difference (pos-neg) vs p for Zee EM-clusters", 15, 0., 300.));
341 m_Zee_Eopdiff_vs_invp.push_back(
new TProfile(
"Zee_Eopdiff_vs_invp",
"E/p difference (pos-neg) vs 1/p for Zee EM-clusters", 15, 0., 0.05));
343 m_Zee_Eopdiff_vs_E.push_back(
new TProfile(
"Zee_Eopdiff_vs_E",
"E/p difference (pos-neg) vs E for Zee EM-clusters", 15, 0., 300.));
345 m_Zee_Eopdiff_vs_phi.push_back(
new TProfile(
"Zee_Eopdiff_vs_phi",
"E/p difference (pos-neg) vs phi for Zee EM-clusters", 15, -3.15, 3.15));
347 m_Zee_Eopdiff_vs_eta.push_back(
new TProfile(
"Zee_Eopdiff_vs_eta",
"E/p difference (pos-neg) vs eta for Zee EM-clusters", 15, -3., 3.));
350 m_Zee_Eop_lt1_vs_eta.push_back(
new TH1F(
"Zee_Eop_lt1_vs_eta",
"Eta of Zee EM-clusters with E/p < 1 (not incl. small E/p)", 15, -3., 3.));
352 m_Zee_Eop_lt1_vs_phi.push_back(
new TH1F(
"Zee_Eop_lt1_vs_phi",
"Phi of Zee EM-clusters with E/p < 1 (not incl. small E/p)", 15, -3.15, 3.15));
354 m_Zee_Eop_gt1_vs_eta.push_back(
new TH1F(
"Zee_Eop_gt1_vs_eta",
"Eta of Zee EM-clusters with E/p < 1 (not incl. small E/p)", 15, -3., 3.));
356 m_Zee_Eop_gt1_vs_phi.push_back(
new TH1F(
"Zee_Eop_gt1_vs_phi",
"Phi of Zee EM-clusters with E/p < 1 (not incl. small E/p)", 15, -3.15, 3.15));
358 m_Zee_frac_Eop_lt1_vs_eta.push_back(
new TH1F(
"Zee_frac_Eop_lt1_vs_eta",
"Fraction of Zee EM-clusters with E/p < 1 (not incl. small E/p) vs Eta", 15, -3., 3.));
360 m_Zee_frac_Eop_lt1_vs_phi.push_back(
new TH1F(
"Zee_frac_Eop_lt1_vs_phi",
"Fraction of Zee EM-clusters with E/p < 1 (not incl. small E/p) vs Phi", 15, -3.15, 3.15));
363 m_Zee_Eop_05_25.push_back(
new TH1F(
"Zee_Eop_05_25",
"Number of Zee events with 0.5 < E/p 2.5", 1, 0., 1.));
365 m_Zee_Eop_15_25.push_back(
new TH1F(
"Zee_Eop_15_25",
"Number of Zee events with 1.5 < E/p 2.5", 1, 0., 1.));
367 m_Zee_frac_Eop_05_25_15_25.push_back(
new TH1F(
"Zee_frac_Eop_05_25_15_25",
"Fraction of Zee EM-clusters with 1.5 < E/p < 2.5 and 0.5 < E/p < 2.5", 1, 0., 1.));
373 return StatusCode::SUCCESS;
377 if (doSumw2) histo->Sumw2();
378 if (mon.regHist(histo).isFailure() ) {
384 if (mon.regHist(histo).isFailure() ) {
390 if (doSumw2) histo->Sumw2();
391 if (mon.regHist(histo).isFailure() ) {
399 int nevents = (int)
m_Nevents->GetEntries();
400 const bool firstEvent{nevents == 1};
402 auto formErrorMessage = [] (
const std::string & contName)->std::string {
403 return std::string(std::string(
"No Collection with name ") + contName + std::string(
" found in StoreGate"));
412 return StatusCode::RECOVERABLE;
414 ATH_MSG_VERBOSE(
"This event contains " << electrons->size() <<
" electrons.");
419 const std::string & errMsg = formErrorMessage(
m_photonsName);
422 return StatusCode::RECOVERABLE;
431 return StatusCode::RECOVERABLE;
437 const std::string & errMsg = formErrorMessage(
m_tracksName);
440 return StatusCode::RECOVERABLE;
446 const std::string & errMsg = formErrorMessage(
m_metName);
449 return StatusCode::RECOVERABLE;
465 if((LeadingEMcluster) and (SecondLeadingEMcluster))
466 ATH_MSG_DEBUG(
"Event has a leading and second leading EM cluster!");
468 if (LeadingEMcluster and SecondLeadingEMcluster) {
470 int second_leading_eta_region =
etaRegion(SecondLeadingEMcluster->
etaBE(2));
478 if( track_leading_emcluster and track_second_leading_emcluster)
ATH_MSG_DEBUG(
"Event has a tracks matched to both clusters!");
484 double cluster_invmass =
InvMass(LeadingEMcluster,SecondLeadingEMcluster);
485 ATH_MSG_DEBUG(
"Cluster invariant mass: " << cluster_invmass);
486 if (cluster_invmass > 0.)
m_Zee_invmass->Fill(cluster_invmass);
487 double track_invmass = 0.;
488 if (track_leading_emcluster and track_second_leading_emcluster) {
489 track_invmass =
InvMass(track_leading_emcluster,track_second_leading_emcluster);
494 int selected =
isZee(LeadingEMcluster,SecondLeadingEMcluster,tracks);
495 ATH_MSG_DEBUG(
"Event passed " << 3-selected <<
"/3 Zee cuts");
499 ATH_MSG_DEBUG(
"Event passed selection -- filling histograms");
503 if (track_leading_emcluster && track_second_leading_emcluster) {
504 double eoverp_pos = -99.;
505 double eoverp_neg = -99.;
506 double track_leading_emcluster_p = track_leading_emcluster->
pt()*cosh(track_leading_emcluster->
eta());
507 double track_second_leading_emcluster_p = track_second_leading_emcluster->
pt()*std::cosh(track_second_leading_emcluster->
eta());
509 if (track_leading_emcluster->
charge() == 1. && track_second_leading_emcluster->
charge() == -1.) {
510 eoverp_pos = LeadingEMcluster->
e()/track_leading_emcluster_p;
511 eoverp_neg = SecondLeadingEMcluster->
e()/track_second_leading_emcluster_p;
512 }
else if (track_leading_emcluster->
charge() == -1. && track_second_leading_emcluster->
charge() == 1.) {
513 eoverp_neg = LeadingEMcluster->
e()/track_leading_emcluster_p;
514 eoverp_pos = SecondLeadingEMcluster->
e()/track_second_leading_emcluster_p;
516 double eoverpasym = -99.;
517 if (eoverp_pos+eoverp_neg != 0.) {
518 eoverpasym = (eoverp_pos-eoverp_neg) / (eoverp_pos+eoverp_neg);
533 FillHistosPerCluster(LeadingEMcluster, track_leading_emcluster, leading_eta_region, leading_dEta, leading_dPhi);
538 FillHistosPerCluster(SecondLeadingEMcluster, track_second_leading_emcluster, second_leading_eta_region, second_leading_dEta, second_leading_dPhi);
539 FillHistosPerCluster(SecondLeadingEMcluster, track_second_leading_emcluster,
incl, second_leading_dEta, second_leading_dPhi);
542 return StatusCode::SUCCESS;
546 h_eff->Divide(h_num,h_denom,1.,1.,
"B");
553 for (
int region=0; region!=1; ++region) {
574 return StatusCode::SUCCESS;
581 for (
const auto cl: *clusters) {
582 if (cl == omitCluster)
continue;
583 double deltaR = std::sqrt(std::pow(std::abs(cl->phi() - omitCluster->
phi()),2) + std::pow(std::abs(cl->eta() - omitCluster->
eta()),2));
584 if(
deltaR < 0.005)
continue;
585 if (cl->pt()/Gaudi::Units::GeV < 10.)
continue;
586 if (cl->pt() > max_pt) {
587 leading_emcluster = cl;
591 return leading_emcluster;
598 for (
const auto em: *electrons) {
608 if (cl == omitCluster)
continue;
609 double deltaR = !omitCluster ? 1.0 : std::sqrt(std::pow(std::abs(cl->phi() - omitCluster->
phi()),2) + std::pow(std::abs(cl->eta() - omitCluster->
eta()),2));
610 if(
deltaR < 0.005)
continue;
611 if (cl->pt()/Gaudi::Units::GeV < 20.)
continue;
612 if (cl->pt() > max_pt) {
613 leading_emcluster = cl;
618 return leading_emcluster;
624 double min_dR = 1.0e+20;
625 for (
const auto track: *tracks){
626 double deta = cluster->
etaBE(2)-track->eta();
627 double dphi = cluster->
phi()-track->phi();
628 double dr = std::sqrt(deta*deta + dphi*dphi);
629 if (dr < min_dR && std::abs(deta) < dEta && std::abs(dphi) < dPhi) {
631 matched_track = track;
634 return matched_track;
639 double min_dEta = 1.0e+20;
640 for (
const auto track : *tracks){
641 double deta = std::abs(cluster->
etaBE(2)-track->eta());
642 if (deta < min_dEta && deta < dEta) {
644 matched_track = track;
647 double dPhi = 1.0e+20;
654 double min_dPhi = 1.0e+20;
655 for (
const auto track : *tracks){
657 if (dphi < min_dPhi && dphi < dPhi) {
659 matched_track = track;
662 double dEta = 1.0e+20;
663 if (matched_track ) dEta = cluster->
etaBE(2)-matched_track->
eta();
668 if (EM1 ==
nullptr || EM2 ==
nullptr)
return -99.;
670 if (EM1->pt() != 0 && EM2->pt() != 0.) {
671 TLorentzVector particle1;
672 TLorentzVector particle2;
673 particle1.SetPtEtaPhiE(EM1->pt()/Gaudi::Units::GeV,EM1->eta(),EM1->phi(),EM1->e()/Gaudi::Units::GeV);
674 particle2.SetPtEtaPhiE(EM2->pt()/Gaudi::Units::GeV,EM2->eta(),EM2->phi(),EM2->e()/Gaudi::Units::GeV);
675 invmass = (particle1+particle2).Mag();
681 if (trk1 ==
nullptr || trk2 ==
nullptr)
return -99.;
683 if (trk1->
pt() != 0 && trk2->
pt() != 0.) {
684 TLorentzVector particle1;
685 TLorentzVector particle2;
686 particle1.SetPtEtaPhiE(trk1->
pt()/Gaudi::Units::GeV,trk1->
eta(),trk1->
phi(),trk1->
e()/Gaudi::Units::GeV);
687 particle2.SetPtEtaPhiE(trk2->
pt()/Gaudi::Units::GeV,trk2->
eta(),trk2->
phi(),trk2->
e()/Gaudi::Units::GeV);
688 invmass = (particle1+particle2).Mag();
694 if (EM ==
nullptr ||
met ==
nullptr)
return -99.;
695 double transmass = 0.;
697 transmass = std::sqrt(2.*EM->et()*
met->met()*(1.-std::cos(dphi)));
703 if (cluster ==
nullptr || track ==
nullptr)
return dr;
704 double deta = cluster->
etaBE(2)-track->eta();
705 double dphi = cluster->
phi()-track->phi();
706 dr = std::sqrt(deta*deta + dphi*dphi);
715 if(!track_leading_emcluster || !track_second_leading_emcluster){
716 ATH_MSG_DEBUG(
"Don't have 2 matched tracks! Skipping charge check...");
719 else if(track_leading_emcluster->
charge() != track_second_leading_emcluster->
charge())
721 double invmass =
InvMass(em1,em2);
722 if (em1->
pt()/Gaudi::Units::GeV > 20. &&
723 em2->
pt()/Gaudi::Units::GeV > 20.) --selected;
725 invmass < 110.) --selected;
731 if(phi1>Gaudi::Units::pi) phia=phi1-2.*Gaudi::Units::pi;
733 if(phi2>Gaudi::Units::pi) phib=phi2-2.*Gaudi::Units::pi;
734 double dphi=phia-phib;
735 if(dphi>Gaudi::Units::pi) dphi-=2.*Gaudi::Units::pi;
736 if(dphi<-Gaudi::Units::pi) dphi+=2.*Gaudi::Units::pi;
742 if (std::abs(
eta) <= 1.) region =
barrel;
743 else if (
eta > 1.) region =
eca;
744 else if (
eta < -1.) region =
ecc;
750 if (cluster ==
nullptr)
return;
752 throw(std::out_of_range(
"Region index has negative value in IDPerfMonZee::FillHistosPerCluster"));
755 if (region ==
incl) {
759 if (dEta < 1.0e+20) {
761 if (std::abs(dEta) < 0.05) {
770 if (dPhi < 1.0e+20) {
772 if (std::abs(dPhi) < 0.1) {
783 if (not track)
return;
786 float track_p = track->pt()*std::cosh(track->eta());
787 if (track_p != 0.) eoverp = cluster->
e()/track_p;
789 if (track->charge() == 1.) {
792 else if (track->charge() == -1.) {
795 if (region ==
incl) {
796 auto safeInverseMom = [](
float p){
797 if (p == 0.)
return 10e10;
798 return 1./(p/Gaudi::Units::GeV);
811 if (track->charge() == 1.) {
819 }
else if (track->charge() == -1.) {
Scalar eta() const
pseudorapidity method
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_VERBOSE(x,...)
#define ATH_MSG_INFO(x,...)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
static Environment_t environment()
Returns the running environment of the monitoring application to help ManagedMonitorToolBase objects ...
std::vector< TH2F * > m_Zee_dphi_vs_eta_2d
double electronTrackMatchPhi(const xAOD::TrackParticleContainer *tracks, const xAOD::CaloCluster *cluster, double dPhi=0.1) const
double deltaR(const xAOD::CaloCluster *cluster, const xAOD::TrackParticle *track) const
double InvMass(const xAOD::CaloCluster *EM1, const xAOD::CaloCluster *EM2) const
const xAOD::CaloCluster * getLeadingEMcluster(const xAOD::CaloClusterContainer *clusters, const xAOD::CaloCluster *omitCluster=0) const
std::vector< TProfile * > m_Zee_meanEop_vs_invp_minus
std::vector< TProfile * > m_Zee_deta_vs_eta
std::vector< TProfile * > m_Zee_absdphi_vs_eta
std::vector< TProfile * > m_Zee_meanEop_vs_phi_plus
double signedDeltaPhi(double phi1, double phi2) const
double TransMass(const xAOD::CaloCluster *EM, const xAOD::MissingET *met) const
std::vector< TProfile * > m_Zee_Eopdiff_vs_p
std::vector< TH1F * > m_Zee_trackmatched_tightEopmatched_phi
double m_eoverp_tight_min
std::vector< TProfile * > m_Zee_meanEop_vs_eta
std::vector< TProfile * > m_Zee_meanEop_vs_p_minus
double electronTrackMatchEta(const xAOD::TrackParticleContainer *tracks, const xAOD::CaloCluster *cluster, double dEta=0.05) const
std::vector< TH1F * > m_Zee_Eopmatch_eff_vs_eta
std::vector< std::string > m_region_strings
std::vector< TProfile * > m_Zee_meanEop_vs_phi
std::vector< TProfile * > m_Zee_dphi_vs_eta
std::vector< TH1F * > m_Zee_frac_Eop_lt1_vs_phi
virtual StatusCode bookHistograms()
An inheriting class should either override this function or bookHists().
AsgElectronLikelihoodTool * m_LHTool2015
std::vector< TH1F * > m_Zee_frac_Eop_lt1_vs_eta
std::vector< TProfile * > m_Zee_meanEop_vs_p
void makeEffHisto(TH1F *h_num, TH1F *h_denom, TH1F *h_eff)
std::vector< TProfile * > m_Zee_meanEop_vs_chargedp
TH1F * m_Zee_trk_invmass_scaled
std::vector< TProfile * > m_Zee_Eopdiff_vs_E
std::vector< TH1F * > m_Zee_Eop_gt1_vs_eta
std::vector< TH1F * > m_Zee_trackmatch_eff_vs_phi
std::vector< TH2F * > m_Zee_deta_vs_eta_2d
std::vector< TProfile * > m_Zee_Eopdiff_vs_phi
std::vector< TH2F * > m_Zee_dphi_vs_phi_2d
std::string m_VxPrimContainerName
std::string m_triggerChainName
TH1F * m_Zee_trk_invmass_sel
std::vector< TH1F * > m_Zee_tightEopmatch_eff_vs_phi
std::vector< TProfile * > m_Zee_meanEop_vs_eta_plus
std::vector< TH1F * > m_Zee_Eopdiff
std::vector< TH1F * > m_Zee_trackmatched_Eopmatched_phi
void FillHistosPerCluster(const xAOD::CaloCluster *cluster, const xAOD::TrackParticle *track, int region, float dEta, float dPhi)
std::string m_metRefFinalName
std::vector< TProfile * > m_Zee_meanEop_vs_phi_minus
std::vector< TH1F * > m_Zee_trackmatched_Eopmatched_eta
std::vector< TH1F * > m_Zee_Eop
std::vector< TH1F * > m_Zee_trackmatched_eta
std::vector< TProfile * > m_Zee_deta_vs_phi
TH1F * m_Zee_Eopasym_perevent_central
std::vector< TH1F * > m_Zee_Eop_lt1_gt1
TH1F * m_Zee_Eopasym_perevent
const xAOD::TrackParticle * electronTrackMatch(const xAOD::TrackParticleContainer *tracks, const xAOD::CaloCluster *cluster, double dEta=0.05, double dPhi=0.1) const
std::vector< TProfile * > m_Zee_absdeta_vs_eta
std::vector< TH1F * > m_Zee_trackmatched_tightEopmatched_eta
std::vector< TH1F * > m_Zee_eta
std::vector< TProfile * > m_Zee_absdphi_vs_phi
std::vector< TH2F * > m_Zee_deta_vs_phi_2d
std::vector< TProfile * > m_Zee_meanEop_vs_p_plus
std::vector< TH1F * > m_Zee_Eop_lt1_vs_phi
std::vector< TProfile * > m_Zee_meanEop_vs_invp
std::vector< TH1F * > m_Zee_Eop_minus
std::vector< TH1F * > m_Zee_trackmatch_eff_vs_eta
std::vector< TProfile * > m_Zee_meanEop_vs_E_minus
std::string m_emclustersName
double m_eoverp_tight_max
std::vector< TProfile * > m_Zee_meanEop_vs_invp_plus
std::vector< TProfile * > m_Zee_dphi_vs_phi
virtual StatusCode initialize()
double m_eoverp_standard_max
std::string m_photonsName
std::vector< TH1F * > m_Zee_Eop_15_25
IDPerfMonZee(const std::string &type, const std::string &name, const IInterface *parent)
std::vector< TH1F * > m_Zee_Eop_plus
std::vector< TProfile * > m_Zee_meanEop_vs_E
std::vector< TH1F * > m_Zee_Eopmatch_eff_vs_phi
std::vector< TProfile * > m_Zee_meanEop_vs_eta_minus
std::vector< TH1F * > m_Zee_phi
std::string m_electronsName
std::vector< TProfile * > m_Zee_Eopdiff_vs_eta
std::vector< TProfile * > m_Zee_meanEop_vs_E_plus
std::vector< TH1F * > m_Zee_dphi
int isZee(const xAOD::CaloCluster *em1, const xAOD::CaloCluster *em2, const xAOD::TrackParticleContainer *tracks=0) const
std::vector< TH1F * > m_Zee_Eop_lt1_vs_eta
std::vector< TProfile * > m_Zee_absdeta_vs_phi
std::vector< TH1F * > m_Zee_tightEopmatch_eff_vs_eta
std::vector< TH1F * > m_Zee_Eop_05_25
std::vector< TH1F * > m_Zee_Eop_gt1_vs_phi
std::vector< TH1F * > m_Zee_frac_Eop_05_25_15_25
std::string m_electronIDLevel
double m_eoverp_standard_min
virtual StatusCode procHistograms()
An inheriting class should either override this function or finalHists().
virtual StatusCode fillHistograms(const EventContext &ctx)
An inheriting class should either override this function or fillHists().
std::vector< TH1F * > m_Zee_trackmatched_phi
std::vector< TProfile * > m_Zee_Eopdiff_vs_invp
int etaRegion(double eta)
std::vector< TProfile * > m_Zee_meanEop_vs_chargedE
std::vector< TH1F * > m_Zee_deta
void RegisterHisto(MonGroup &mon, TH1 *histo, bool doSumw2=false)
static const T * getContainer(CONTAINERS eContainer)
virtual double pt() const
The transverse momentum ( ) of the particle (negative for negative-energy clusters).
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double e() const
The total energy of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .).
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
float charge() const
Returns the charge.
virtual double e() const override final
The total energy of the particle.
const SG::AuxVectorData * container() const
Return the container holding this element.
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
MissingET_v1 MissingET
Version control by type defintion.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
MissingETContainer_v1 MissingETContainer
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.