16#include "TLorentzVector.h"
23#include "GaudiKernel/SystemOfUnits.h"
24#include "GaudiKernel/PhysicalConstants.h"
43 if (evtStore->contains<T>(contName)){
45 if(evtStore->retrieve(container,contName).isFailure())
return nullptr;
90 if (
sc.isFailure())
ATH_MSG_WARNING(
"Could not initialize ManagedMonitorToolBase" );
93 ATH_MSG_INFO(
"IDPerfMonWenu::Initialize() -- Setting up electron LH tool.");
99 std::string confDir =
"ElectronPhotonSelectorTools/offline/mc15_20150712/";
101 ATH_MSG_WARNING(
"electronIDLevel is set to empty! No electron ID cuts will be applied.");
106 ATH_MSG_WARNING(
"Unknown electronIDLevel!! (Accepted values: Loose, Medium, Tight)");
117 ATH_MSG_WARNING(
"Electron likelihood tool initialize() failed! Turning off electron LH cuts!");
120 return StatusCode::SUCCESS;
133 m_Nevents =
new TH1F(
"Nevents",
"Number of events processed", 1, -.5, 0.5);
135 m_Check =
new TH1F(
"Check",
"", 4, 0,4);
137 m_Zee_invmass =
new TH1F(
"Zee_invmass",
"Invariant mass of the two leading em clusters", 90, 0.,180.);
139 m_Zee_invmass_sel =
new TH1F(
"Zee_invmass_sel",
"Invariant mass of the two leading em clusters after Zee selection", 80, 50.,130.);
141 m_Zee_trk_invmass =
new TH1F(
"Zee_trk_invmass",
"Invariant mass of the two tracks", 90, 0.,180.);
143 m_Zee_trk_invmass_scaled =
new TH1F(
"Zee_trk_invmass_scaled",
"Invariant mass of the two tracks scaled to per event", 90, 0.,180.);
145 m_Zee_trk_invmass_sel =
new TH1F(
"Zee_trk_invmass_sel",
"Invariant mass of the two tracks after Zee selection", 90, 0.,180.);
147 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);
149 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);
222 for (
int region=0; region!=
Nregions; ++region) {
227 m_Zee_Eop.push_back(
new TH1F(name.c_str(),title.c_str(), 60, 0., 10.));
230 title =
"E/p difference (pos-neg) for Zee EM-clusters in " +
m_region_strings[region];
231 m_Zee_Eopdiff.push_back(
new TH1F(name.c_str(),title.c_str(), 10, 0., 2.));
234 title =
"E/p for pos. charged Zee EM-clusters in " +
m_region_strings[region];
235 m_Zee_Eop_plus.push_back(
new TH1F(name.c_str(),title.c_str(), 10, 0., 2.));
238 title =
"E/p for neg. charged Zee EM-clusters in " +
m_region_strings[region];
239 m_Zee_Eop_minus.push_back(
new TH1F(name.c_str(),title.c_str(), 10, 0., 2.));
241 if (region !=
incl)
continue;
242 m_Zee_eta.push_back(
new TH1F(
"Zee_eta",
"Eta of Zee EM-clusters", 15, -3., 3.));
244 m_Zee_phi.push_back(
new TH1F(
"Zee_phi",
"Phi of Zee EM-clusters", 15, -3.15, 3.15));
246 m_Zee_deta.push_back(
new TH1F(
"Zee_deta",
"deltaEta(EM-cluster,track) in Zee events", 50, -0.5, 0.5));
248 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.));
250 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));
252 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.));
254 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));
256 m_Zee_dphi.push_back(
new TH1F(
"Zee_dphi",
"deltaPhi(EM-cluster,track) in Zee events", 50, -0.5, 0.5));
258 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.));
260 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));
262 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.));
264 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));
267 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));
269 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));
271 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));
273 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));
276 m_Zee_trackmatched_eta.push_back(
new TH1F(
"Zee_trackmatched_eta",
"Eta of track-matched Zee EM-clusters", 15, -3., 3.));
278 m_Zee_trackmatched_phi.push_back(
new TH1F(
"Zee_trackmatched_phi",
"Phi of track-matched Zee EM-clusters", 15, -3.15, 3.15));
282 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));
289 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.));
291 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));
293 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.));
295 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));
297 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.));
299 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));
302 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.));
304 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));
306 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.));
308 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.));
310 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.));
312 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));
314 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.));
317 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.));
319 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));
321 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.));
323 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));
325 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.));
328 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.));
330 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));
332 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.));
334 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));
336 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.));
339 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));
342 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.));
344 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));
346 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.));
348 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));
350 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.));
353 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.));
355 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));
357 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.));
359 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));
361 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.));
363 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));
366 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.));
368 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.));
370 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.));
376 return StatusCode::SUCCESS;
380 if (doSumw2) histo->Sumw2();
381 if (mon.regHist(histo).isFailure() ) {
387 if (mon.regHist(histo).isFailure() ) {
393 if (doSumw2) histo->Sumw2();
394 if (mon.regHist(histo).isFailure() ) {
402 int nevents = (int)
m_Nevents->GetEntries();
403 const bool firstEvent{nevents == 1};
405 auto formErrorMessage = [] (
const std::string & contName)->std::string {
406 return std::string(std::string(
"No Collection with name ") + contName + std::string(
" found in StoreGate"));
415 return StatusCode::RECOVERABLE;
417 ATH_MSG_VERBOSE(
"This event contains " << electrons->size() <<
" electrons.");
422 const std::string & errMsg = formErrorMessage(
m_photonsName);
425 return StatusCode::RECOVERABLE;
434 return StatusCode::RECOVERABLE;
440 const std::string & errMsg = formErrorMessage(
m_tracksName);
443 return StatusCode::RECOVERABLE;
449 const std::string & errMsg = formErrorMessage(
m_metName);
452 return StatusCode::RECOVERABLE;
468 if((LeadingEMcluster) and (SecondLeadingEMcluster))
469 ATH_MSG_DEBUG(
"Event has a leading and second leading EM cluster!");
471 if (LeadingEMcluster and SecondLeadingEMcluster) {
473 int second_leading_eta_region =
etaRegion(SecondLeadingEMcluster->
etaBE(2));
481 if( track_leading_emcluster and track_second_leading_emcluster)
ATH_MSG_DEBUG(
"Event has a tracks matched to both clusters!");
487 double cluster_invmass =
InvMass(LeadingEMcluster,SecondLeadingEMcluster);
488 ATH_MSG_DEBUG(
"Cluster invariant mass: " << cluster_invmass);
489 if (cluster_invmass > 0.)
m_Zee_invmass->Fill(cluster_invmass);
490 double track_invmass = 0.;
491 if (track_leading_emcluster and track_second_leading_emcluster) {
492 track_invmass =
InvMass(track_leading_emcluster,track_second_leading_emcluster);
497 int selected =
isZee(LeadingEMcluster,SecondLeadingEMcluster,tracks);
498 ATH_MSG_DEBUG(
"Event passed " << 3-selected <<
"/3 Zee cuts");
502 ATH_MSG_DEBUG(
"Event passed selection -- filling histograms");
506 if (track_leading_emcluster && track_second_leading_emcluster) {
507 double eoverp_pos = -99.;
508 double eoverp_neg = -99.;
509 double track_leading_emcluster_p = track_leading_emcluster->
pt()*cosh(track_leading_emcluster->
eta());
510 double track_second_leading_emcluster_p = track_second_leading_emcluster->
pt()*std::cosh(track_second_leading_emcluster->
eta());
512 if (track_leading_emcluster->
charge() == 1. && track_second_leading_emcluster->
charge() == -1.) {
513 eoverp_pos = LeadingEMcluster->
e()/track_leading_emcluster_p;
514 eoverp_neg = SecondLeadingEMcluster->
e()/track_second_leading_emcluster_p;
515 }
else if (track_leading_emcluster->
charge() == -1. && track_second_leading_emcluster->
charge() == 1.) {
516 eoverp_neg = LeadingEMcluster->
e()/track_leading_emcluster_p;
517 eoverp_pos = SecondLeadingEMcluster->
e()/track_second_leading_emcluster_p;
519 double eoverpasym = -99.;
520 if (eoverp_pos+eoverp_neg != 0.) {
521 eoverpasym = (eoverp_pos-eoverp_neg) / (eoverp_pos+eoverp_neg);
536 FillHistosPerCluster(LeadingEMcluster, track_leading_emcluster, leading_eta_region, leading_dEta, leading_dPhi);
541 FillHistosPerCluster(SecondLeadingEMcluster, track_second_leading_emcluster, second_leading_eta_region, second_leading_dEta, second_leading_dPhi);
542 FillHistosPerCluster(SecondLeadingEMcluster, track_second_leading_emcluster,
incl, second_leading_dEta, second_leading_dPhi);
545 return StatusCode::SUCCESS;
549 h_eff->Divide(h_num,h_denom,1.,1.,
"B");
556 for (
int region=0; region!=1; ++region) {
577 return StatusCode::SUCCESS;
584 for (
const auto cl: *clusters) {
585 if (cl == omitCluster)
continue;
586 double deltaR = std::sqrt(std::pow(std::abs(cl->phi() - omitCluster->
phi()),2) + std::pow(std::abs(cl->eta() - omitCluster->
eta()),2));
587 if(
deltaR < 0.005)
continue;
588 if (cl->pt()/Gaudi::Units::GeV < 10.)
continue;
589 if (cl->pt() > max_pt) {
590 leading_emcluster = cl;
594 return leading_emcluster;
601 for (
const auto em: *electrons) {
611 if (cl == omitCluster)
continue;
612 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));
613 if(
deltaR < 0.005)
continue;
614 if (cl->pt()/Gaudi::Units::GeV < 20.)
continue;
615 if (cl->pt() > max_pt) {
616 leading_emcluster = cl;
621 return leading_emcluster;
627 double min_dR = 1.0e+20;
628 for (
const auto track: *tracks){
629 double deta = cluster->
etaBE(2)-track->eta();
630 double dphi = cluster->
phi()-track->phi();
631 double dr = std::sqrt(deta*deta + dphi*dphi);
632 if (dr < min_dR && std::abs(deta) < dEta && std::abs(dphi) < dPhi) {
634 matched_track = track;
637 return matched_track;
642 double min_dEta = 1.0e+20;
643 for (
const auto track : *tracks){
644 double deta = std::abs(cluster->
etaBE(2)-track->eta());
645 if (deta < min_dEta && deta < dEta) {
647 matched_track = track;
650 double dPhi = 1.0e+20;
657 double min_dPhi = 1.0e+20;
658 for (
const auto track : *tracks){
660 if (dphi < min_dPhi && dphi < dPhi) {
662 matched_track = track;
665 double dEta = 1.0e+20;
666 if (matched_track ) dEta = cluster->
etaBE(2)-matched_track->
eta();
671 if (EM1 ==
nullptr || EM2 ==
nullptr)
return -99.;
673 if (EM1->pt() != 0 && EM2->pt() != 0.) {
674 TLorentzVector particle1;
675 TLorentzVector particle2;
676 particle1.SetPtEtaPhiE(EM1->pt()/Gaudi::Units::GeV,EM1->eta(),EM1->phi(),EM1->e()/Gaudi::Units::GeV);
677 particle2.SetPtEtaPhiE(EM2->pt()/Gaudi::Units::GeV,EM2->eta(),EM2->phi(),EM2->e()/Gaudi::Units::GeV);
678 invmass = (particle1+particle2).Mag();
684 if (trk1 ==
nullptr || trk2 ==
nullptr)
return -99.;
686 if (trk1->
pt() != 0 && trk2->
pt() != 0.) {
687 TLorentzVector particle1;
688 TLorentzVector particle2;
689 particle1.SetPtEtaPhiE(trk1->
pt()/Gaudi::Units::GeV,trk1->
eta(),trk1->
phi(),trk1->
e()/Gaudi::Units::GeV);
690 particle2.SetPtEtaPhiE(trk2->
pt()/Gaudi::Units::GeV,trk2->
eta(),trk2->
phi(),trk2->
e()/Gaudi::Units::GeV);
691 invmass = (particle1+particle2).Mag();
697 if (EM ==
nullptr ||
met ==
nullptr)
return -99.;
698 double transmass = 0.;
700 transmass = std::sqrt(2.*EM->et()*
met->met()*(1.-std::cos(dphi)));
706 if (cluster ==
nullptr || track ==
nullptr)
return dr;
707 double deta = cluster->
etaBE(2)-track->eta();
708 double dphi = cluster->
phi()-track->phi();
709 dr = std::sqrt(deta*deta + dphi*dphi);
718 if(!track_leading_emcluster || !track_second_leading_emcluster){
719 ATH_MSG_DEBUG(
"Don't have 2 matched tracks! Skipping charge check...");
722 else if(track_leading_emcluster->
charge() != track_second_leading_emcluster->
charge())
724 double invmass =
InvMass(em1,em2);
725 if (em1->
pt()/Gaudi::Units::GeV > 20. &&
726 em2->
pt()/Gaudi::Units::GeV > 20.) --selected;
728 invmass < 110.) --selected;
734 if(phi1>Gaudi::Units::pi) phia=phi1-2.*Gaudi::Units::pi;
736 if(phi2>Gaudi::Units::pi) phib=phi2-2.*Gaudi::Units::pi;
737 double dphi=phia-phib;
738 if(dphi>Gaudi::Units::pi) dphi-=2.*Gaudi::Units::pi;
739 if(dphi<-Gaudi::Units::pi) dphi+=2.*Gaudi::Units::pi;
745 if (std::abs(
eta) <= 1.) region =
barrel;
746 else if (
eta > 1.) region =
eca;
747 else if (
eta < -1.) region =
ecc;
753 if (cluster ==
nullptr)
return;
755 throw(std::out_of_range(
"Region index has negative value in IDPerfMonZee::FillHistosPerCluster"));
758 if (region ==
incl) {
762 if (dEta < 1.0e+20) {
764 if (std::abs(dEta) < 0.05) {
773 if (dPhi < 1.0e+20) {
775 if (std::abs(dPhi) < 0.1) {
786 if (not track)
return;
789 float track_p = track->pt()*std::cosh(track->eta());
790 if (track_p != 0.) eoverp = cluster->
e()/track_p;
792 if (track->charge() == 1.) {
795 else if (track->charge() == -1.) {
798 if (region ==
incl) {
799 auto safeInverseMom = [](
float p){
800 if (p == 0.)
return 10e10;
801 return 1./(p/Gaudi::Units::GeV);
814 if (track->charge() == 1.) {
822 }
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.