16#include "TLorentzVector.h"
33#include "GaudiKernel/SystemOfUnits.h"
34#include "GaudiKernel/PhysicalConstants.h"
53 if (evtStore->contains<T>(contName)){
55 if(evtStore->retrieve(
container,contName).isFailure())
return nullptr;
100 if (
sc.isFailure())
ATH_MSG_WARNING(
"Could not initialize ManagedMonitorToolBase" );
103 ATH_MSG_INFO(
"IDPerfMonWenu::Initialize() -- Setting up electron LH tool.");
109 std::string confDir =
"ElectronPhotonSelectorTools/offline/mc15_20150712/";
111 ATH_MSG_WARNING(
"electronIDLevel is set to empty! No electron ID cuts will be applied.");
116 ATH_MSG_WARNING(
"Unknown electronIDLevel!! (Accepted values: Loose, Medium, Tight)");
120 std::string configFile = confDir+
"ElectronLikelihood"+
m_electronIDLevel+
"OfflineConfig2015.conf";
121 ATH_MSG_INFO(
"Likelihood configuration file: " << configFile);
122 if((
m_LHTool2015->setProperty(
"ConfigFile",configFile)).isFailure())
ATH_MSG_WARNING(
"Failure loading ConfigFile in electron likelihood tool.");
127 ATH_MSG_WARNING(
"Electron likelihood tool initialize() failed! Turning off electron LH cuts!");
130 return StatusCode::SUCCESS;
143 m_Nevents =
new TH1F(
"Nevents",
"Number of events processed", 1, -.5, 0.5);
145 m_Check =
new TH1F(
"Check",
"", 4, 0,4);
147 m_Zee_invmass =
new TH1F(
"Zee_invmass",
"Invariant mass of the two leading em clusters", 90, 0.,180.);
149 m_Zee_invmass_sel =
new TH1F(
"Zee_invmass_sel",
"Invariant mass of the two leading em clusters after Zee selection", 80, 50.,130.);
151 m_Zee_trk_invmass =
new TH1F(
"Zee_trk_invmass",
"Invariant mass of the two tracks", 90, 0.,180.);
153 m_Zee_trk_invmass_scaled =
new TH1F(
"Zee_trk_invmass_scaled",
"Invariant mass of the two tracks scaled to per event", 90, 0.,180.);
155 m_Zee_trk_invmass_sel =
new TH1F(
"Zee_trk_invmass_sel",
"Invariant mass of the two tracks after Zee selection", 90, 0.,180.);
157 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);
159 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);
232 for (
int region=0; region!=
Nregions; ++region) {
237 m_Zee_Eop.push_back(
new TH1F(name.c_str(),title.c_str(), 60, 0., 10.));
240 title =
"E/p difference (pos-neg) for Zee EM-clusters in " +
m_region_strings[region];
241 m_Zee_Eopdiff.push_back(
new TH1F(name.c_str(),title.c_str(), 10, 0., 2.));
244 title =
"E/p for pos. charged Zee EM-clusters in " +
m_region_strings[region];
245 m_Zee_Eop_plus.push_back(
new TH1F(name.c_str(),title.c_str(), 10, 0., 2.));
248 title =
"E/p for neg. charged Zee EM-clusters in " +
m_region_strings[region];
249 m_Zee_Eop_minus.push_back(
new TH1F(name.c_str(),title.c_str(), 10, 0., 2.));
251 if (region !=
incl)
continue;
252 m_Zee_eta.push_back(
new TH1F(
"Zee_eta",
"Eta of Zee EM-clusters", 15, -3., 3.));
254 m_Zee_phi.push_back(
new TH1F(
"Zee_phi",
"Phi of Zee EM-clusters", 15, -3.15, 3.15));
256 m_Zee_deta.push_back(
new TH1F(
"Zee_deta",
"deltaEta(EM-cluster,track) in Zee events", 50, -0.5, 0.5));
258 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.));
260 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));
262 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.));
264 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));
266 m_Zee_dphi.push_back(
new TH1F(
"Zee_dphi",
"deltaPhi(EM-cluster,track) in Zee events", 50, -0.5, 0.5));
268 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.));
270 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));
272 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.));
274 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));
277 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));
279 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));
281 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));
283 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));
286 m_Zee_trackmatched_eta.push_back(
new TH1F(
"Zee_trackmatched_eta",
"Eta of track-matched Zee EM-clusters", 15, -3., 3.));
288 m_Zee_trackmatched_phi.push_back(
new TH1F(
"Zee_trackmatched_phi",
"Phi of track-matched Zee EM-clusters", 15, -3.15, 3.15));
292 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));
299 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.));
301 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));
303 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.));
305 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));
307 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.));
309 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));
312 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.));
314 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));
316 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.));
318 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.));
320 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.));
322 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));
324 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.));
327 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.));
329 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));
331 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.));
333 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));
335 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.));
338 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.));
340 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));
342 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.));
344 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));
346 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.));
349 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));
352 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.));
354 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));
356 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.));
358 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));
360 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.));
363 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.));
365 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));
367 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.));
369 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));
371 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.));
373 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));
376 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.));
378 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.));
380 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.));
386 return StatusCode::SUCCESS;
390 if (doSumw2) histo->Sumw2();
391 if (mon.regHist(histo).isFailure() ) {
397 if (mon.regHist(histo).isFailure() ) {
403 if (doSumw2) histo->Sumw2();
404 if (mon.regHist(histo).isFailure() ) {
412 int nevents = (int)
m_Nevents->GetEntries();
413 const bool firstEvent{nevents == 1};
415 auto formErrorMessage = [] (
const std::string & contName)->std::string {
416 return std::string(std::string(
"No Collection with name ") + contName + std::string(
" found in StoreGate"));
425 return StatusCode::RECOVERABLE;
427 ATH_MSG_VERBOSE(
"This event contains " << electrons->size() <<
" electrons.");
432 const std::string & errMsg = formErrorMessage(
m_photonsName);
435 return StatusCode::RECOVERABLE;
444 return StatusCode::RECOVERABLE;
450 const std::string & errMsg = formErrorMessage(
m_tracksName);
453 return StatusCode::RECOVERABLE;
459 const std::string & errMsg = formErrorMessage(
m_metName);
462 return StatusCode::RECOVERABLE;
478 if((LeadingEMcluster) and (SecondLeadingEMcluster))
479 ATH_MSG_DEBUG(
"Event has a leading and second leading EM cluster!");
481 if (LeadingEMcluster and SecondLeadingEMcluster) {
483 int second_leading_eta_region =
etaRegion(SecondLeadingEMcluster->
etaBE(2));
491 if( track_leading_emcluster and track_second_leading_emcluster)
ATH_MSG_DEBUG(
"Event has a tracks matched to both clusters!");
497 double cluster_invmass =
InvMass(LeadingEMcluster,SecondLeadingEMcluster);
498 ATH_MSG_DEBUG(
"Cluster invariant mass: " << cluster_invmass);
499 if (cluster_invmass > 0.)
m_Zee_invmass->Fill(cluster_invmass);
500 double track_invmass = 0.;
501 if (track_leading_emcluster and track_second_leading_emcluster) {
502 track_invmass =
InvMass(track_leading_emcluster,track_second_leading_emcluster);
507 int selected =
isZee(LeadingEMcluster,SecondLeadingEMcluster,tracks);
508 ATH_MSG_DEBUG(
"Event passed " << 3-selected <<
"/3 Zee cuts");
512 ATH_MSG_DEBUG(
"Event passed selection -- filling histograms");
516 if (track_leading_emcluster && track_second_leading_emcluster) {
517 double eoverp_pos = -99.;
518 double eoverp_neg = -99.;
519 double track_leading_emcluster_p = track_leading_emcluster->
pt()*cosh(track_leading_emcluster->
eta());
520 double track_second_leading_emcluster_p = track_second_leading_emcluster->
pt()*std::cosh(track_second_leading_emcluster->
eta());
522 if (track_leading_emcluster->
charge() == 1. && track_second_leading_emcluster->
charge() == -1.) {
523 eoverp_pos = LeadingEMcluster->
e()/track_leading_emcluster_p;
524 eoverp_neg = SecondLeadingEMcluster->
e()/track_second_leading_emcluster_p;
525 }
else if (track_leading_emcluster->
charge() == -1. && track_second_leading_emcluster->
charge() == 1.) {
526 eoverp_neg = LeadingEMcluster->
e()/track_leading_emcluster_p;
527 eoverp_pos = SecondLeadingEMcluster->
e()/track_second_leading_emcluster_p;
529 double eoverpasym = -99.;
530 if (eoverp_pos+eoverp_neg != 0.) {
531 eoverpasym = (eoverp_pos-eoverp_neg) / (eoverp_pos+eoverp_neg);
546 FillHistosPerCluster(LeadingEMcluster, track_leading_emcluster, leading_eta_region, leading_dEta, leading_dPhi);
551 FillHistosPerCluster(SecondLeadingEMcluster, track_second_leading_emcluster, second_leading_eta_region, second_leading_dEta, second_leading_dPhi);
552 FillHistosPerCluster(SecondLeadingEMcluster, track_second_leading_emcluster,
incl, second_leading_dEta, second_leading_dPhi);
555 return StatusCode::SUCCESS;
559 h_eff->Divide(h_num,h_denom,1.,1.,
"B");
566 for (
int region=0; region!=1; ++region) {
587 return StatusCode::SUCCESS;
594 for (
const auto cl: *clusters) {
595 if (cl == omitCluster)
continue;
596 double deltaR = std::sqrt(std::pow(std::abs(cl->phi() - omitCluster->
phi()),2) + std::pow(std::abs(cl->eta() - omitCluster->
eta()),2));
597 if(
deltaR < 0.005)
continue;
598 if (cl->pt()/Gaudi::Units::GeV < 10.)
continue;
599 if (cl->pt() > max_pt) {
600 leading_emcluster = cl;
604 return leading_emcluster;
611 for (
const auto em: *electrons) {
621 if (cl == omitCluster)
continue;
622 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));
623 if(
deltaR < 0.005)
continue;
624 if (cl->pt()/Gaudi::Units::GeV < 20.)
continue;
625 if (cl->pt() > max_pt) {
626 leading_emcluster = cl;
631 return leading_emcluster;
637 double min_dR = 1.0e+20;
638 for (
const auto track: *tracks){
639 double deta = cluster->
etaBE(2)-track->eta();
640 double dphi = cluster->
phi()-track->phi();
641 double dr = std::sqrt(deta*deta + dphi*dphi);
642 if (dr < min_dR && std::abs(deta) < dEta && std::abs(dphi) < dPhi) {
644 matched_track = track;
647 return matched_track;
652 double min_dEta = 1.0e+20;
653 for (
const auto track : *tracks){
654 double deta = std::abs(cluster->
etaBE(2)-track->eta());
655 if (deta < min_dEta && deta < dEta) {
657 matched_track = track;
660 double dPhi = 1.0e+20;
667 double min_dPhi = 1.0e+20;
668 for (
const auto track : *tracks){
670 if (dphi < min_dPhi && dphi < dPhi) {
672 matched_track = track;
675 double dEta = 1.0e+20;
676 if (matched_track ) dEta = cluster->
etaBE(2)-matched_track->
eta();
681 if (EM1 ==
nullptr || EM2 ==
nullptr)
return -99.;
683 if (EM1->pt() != 0 && EM2->pt() != 0.) {
684 TLorentzVector particle1;
685 TLorentzVector particle2;
686 particle1.SetPtEtaPhiE(EM1->pt()/Gaudi::Units::GeV,EM1->eta(),EM1->phi(),EM1->e()/Gaudi::Units::GeV);
687 particle2.SetPtEtaPhiE(EM2->pt()/Gaudi::Units::GeV,EM2->eta(),EM2->phi(),EM2->e()/Gaudi::Units::GeV);
688 invmass = (particle1+particle2).Mag();
694 if (trk1 ==
nullptr || trk2 ==
nullptr)
return -99.;
696 if (trk1->
pt() != 0 && trk2->
pt() != 0.) {
697 TLorentzVector particle1;
698 TLorentzVector particle2;
699 particle1.SetPtEtaPhiE(trk1->
pt()/Gaudi::Units::GeV,trk1->
eta(),trk1->
phi(),trk1->
e()/Gaudi::Units::GeV);
700 particle2.SetPtEtaPhiE(trk2->
pt()/Gaudi::Units::GeV,trk2->
eta(),trk2->
phi(),trk2->
e()/Gaudi::Units::GeV);
701 invmass = (particle1+particle2).Mag();
707 if (EM ==
nullptr ||
met ==
nullptr)
return -99.;
708 double transmass = 0.;
710 transmass = std::sqrt(2.*EM->et()*
met->met()*(1.-std::cos(dphi)));
716 if (cluster ==
nullptr || track ==
nullptr)
return dr;
717 double deta = cluster->
etaBE(2)-track->eta();
718 double dphi = cluster->
phi()-track->phi();
719 dr = std::sqrt(deta*deta + dphi*dphi);
728 if(!track_leading_emcluster || !track_second_leading_emcluster){
729 ATH_MSG_DEBUG(
"Don't have 2 matched tracks! Skipping charge check...");
732 else if(track_leading_emcluster->
charge() != track_second_leading_emcluster->
charge())
734 double invmass =
InvMass(em1,em2);
735 if (em1->
pt()/Gaudi::Units::GeV > 20. &&
736 em2->
pt()/Gaudi::Units::GeV > 20.) --selected;
738 invmass < 110.) --selected;
744 if(phi1>Gaudi::Units::pi) phia=phi1-2.*Gaudi::Units::pi;
746 if(phi2>Gaudi::Units::pi) phib=phi2-2.*Gaudi::Units::pi;
747 double dphi=phia-phib;
748 if(dphi>Gaudi::Units::pi) dphi-=2.*Gaudi::Units::pi;
749 if(dphi<-Gaudi::Units::pi) dphi+=2.*Gaudi::Units::pi;
755 if (std::abs(
eta) <= 1.) region =
barrel;
756 else if (
eta > 1.) region =
eca;
757 else if (
eta < -1.) region =
ecc;
763 if (cluster ==
nullptr)
return;
765 throw(std::out_of_range(
"Region index has negative value in IDPerfMonZee::FillHistosPerCluster"));
768 if (region ==
incl) {
772 if (dEta < 1.0e+20) {
774 if (std::abs(dEta) < 0.05) {
783 if (dPhi < 1.0e+20) {
785 if (std::abs(dPhi) < 0.1) {
796 if (not track)
return;
799 float track_p = track->pt()*std::cosh(track->eta());
800 if (track_p != 0.) eoverp = cluster->
e()/track_p;
802 if (track->charge() == 1.) {
805 else if (track->charge() == -1.) {
808 if (region ==
incl) {
820 if (track->charge() == 1.) {
828 }
else if (track->charge() == -1.) {
Scalar eta() const
pseudorapidity method
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
This is an Identifier helper class for the Pixel subdetector.
This is an Identifier helper class for the SCT subdetector.
This is an Identifier helper class for the TRT subdetector.
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
virtual StatusCode fillHistograms()
An inheriting class should either override this function or fillHists().
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().
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.
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.