ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis/TauID/TauDQA/src/EfficiencyPlots.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "EfficiencyPlots.h"
7
8namespace Tau{
9
10 EfficiencyPlots::EfficiencyPlots(PlotBase* pParent, const std::string& sDir, std::string sTauJetContainerName):
11 PlotBase(pParent, sDir),
12 m_sTauJetContainerName(std::move(sTauJetContainerName))
13 {
14 }
15
19
21 {
22 m_eff_pt_jetGNTauloose = BookTProfile("Eff_Pt_jetGNTauloose"," Matched Tau loose GNTau eff in pt; pt; eff", 20, 0., 150.0);
23 m_eff_pt_jetGNTaumed = BookTProfile("Eff_Pt_jetGNTaumed","Matched Tau med GNTau eff in pt; pt; eff", 20, 0.0, 150.0);
24 m_eff_pt_jetGNTautight = BookTProfile("Eff_Pt_jetGNTautight","Matched Tau tight GNTau eff in pt; pt; eff", 20, 0.0, 150.0);
25 m_eff_pt_jetGNTaulooseHighPt = BookTProfile("Eff_Pt_jetGNTaulooseHightPt"," Matched Tau loose GNTau eff in pt; pt; eff", 20, 0.0, 1500.0);
26 m_eff_pt_jetGNTaumedHighPt = BookTProfile("Eff_Pt_jetGNTaumedHightPt","Matched Tau med GNTau eff in pt; pt; eff", 20, 0.0, 1500.0);
27 m_eff_pt_jetGNTautightHighPt = BookTProfile("Eff_Pt_jetGNTautightHightPt","Matched Tau tight GNTau eff in pt; pt; eff", 20, 0.0, 1500.0);
28 m_eff_mu_jetGNTauloose = BookTProfile("Eff_Mu_jetGNTauloose"," Matched Tau loose GNTau eff in <mu>; <mu>; eff", 16, 0., 80.0);
29 m_eff_mu_jetGNTaumed = BookTProfile("Eff_Mu_jetGNTaumed","Matched Tau med GNTau eff in <mu>; <mu>; eff", 16, 0.0, 80.0);
30 m_eff_mu_jetGNTautight = BookTProfile("Eff_Mu_jetGNTautight","Matched Tau tight GNTau eff in <mu>; <mu>; eff", 16, 0.0, 80.0);
31 m_eff_jetGNTauloose = BookTProfile("Eff_jetGNTauloose"," Matched Tau loose GNTau eff total; bin; eff",3,-1.5,1.5);
32 m_eff_jetGNTaumed = BookTProfile("Eff_jetGNTaumed","Matched Tau med GNTau eff total; bin; eff",3,-1.5,1.5);
33 m_eff_jetGNTautight = BookTProfile("Eff_jetGNTautight","Matched Tau tight GNTau eff total; bin; eff",3,-1.5,1.5);
34
35 m_eff_pt_eVetoloose = BookTProfile("Eff_Pt_eVetoloose"," loose eVeto eff in pt; pt; eff", 7, 0.0, 140.0);
36 m_eff_pt_eVetomed = BookTProfile("Eff_Pt_eVetomed"," med eVeto eff in pt; pt; eff", 7, 0.0, 140.0);
37 m_eff_pt_eVetotight = BookTProfile("Eff_Pt_eVetotight","tight eVeto eff in pt; pt; eff", 7, 0.0, 140.0);
38 m_eff_pt_eVetolooseHighPt = BookTProfile("Eff_Pt_eVetolooseHightPt"," loose eVeto eff in pt; pt; eff", 20, 0.0, 1500.0);
39 m_eff_pt_eVetomedHighPt = BookTProfile("Eff_Pt_eVetomedHightPt","med eVeto eff in pt; pt; eff", 20, 0.0, 1500.0);
40 m_eff_pt_eVetotightHighPt = BookTProfile("Eff_Pt_eVetotightHightPt","tight eVeto eff in pt; pt; eff", 20, 0.0, 1500.0);
41 m_eff_eta_eVetoloose = BookTProfile("Eff_Eta_eVetoloose"," loose eVeto eff in eta; eta; eff", 15, -3.0,3.0);
42 m_eff_eta_eVetomed = BookTProfile("Eff_Eta_eVetomed"," med eVeto eff in eta; eta; eff", 15, -3.0,3.0);
43 m_eff_eta_eVetotight = BookTProfile("Eff_Eta_eVetotight","tight eVeto eff in eta; eta; eff", 15, -3.0,3.0);
44 m_eff_eVetoloose = BookTProfile("Eff_eVetoloose"," loose eVeto eff total; bin; eff",3,-1.5,1.5);
45 m_eff_eVetomed = BookTProfile("Eff_eVetomed","med eVeto eff total; bin; eff",3,-1.5,1.5);
46 m_eff_eVetotight = BookTProfile("Eff_eVetotight","tight eVeto eff total; bin; eff",3,-1.5,1.5);
47
48 }
49
50 void EfficiencyPlots::fill(const xAOD::TauJet& tau, float weight, float avg_mu)
51 {
52 static const SG::ConstAccessor<char> acc_GNTauL("GNTauL_v0prune");
53 double pass_loose = acc_GNTauL.withDefault(tau,false);
54 m_eff_pt_jetGNTauloose->Fill(tau.pt()/Athena::Units::GeV, pass_loose, weight);
55 m_eff_pt_jetGNTaulooseHighPt->Fill(tau.pt()/Athena::Units::GeV, pass_loose, weight);
56 m_eff_jetGNTauloose->Fill(0.,pass_loose , weight);
57 m_eff_mu_jetGNTauloose->Fill(avg_mu,pass_loose, weight);
58
59 static const SG::ConstAccessor<char> acc_GNTauM("GNTauM_v0prune");
60 double pass_medium = acc_GNTauM.withDefault(tau,false);
61 m_eff_pt_jetGNTaumed->Fill(tau.pt()/Athena::Units::GeV, pass_medium, weight);
62 m_eff_pt_jetGNTaumedHighPt->Fill(tau.pt()/Athena::Units::GeV, pass_medium, weight);
63 m_eff_jetGNTaumed->Fill(0., pass_medium, weight);
64 m_eff_mu_jetGNTaumed->Fill(avg_mu,pass_medium, weight);
65
66 static const SG::ConstAccessor<char> acc_GNTauT("GNTauT_v0prune");
67 double pass_tight = acc_GNTauT.withDefault(tau,false);
68 m_eff_pt_jetGNTautight->Fill(tau.pt()/Athena::Units::GeV, pass_tight, weight);
69 m_eff_pt_jetGNTautightHighPt->Fill(tau.pt()/Athena::Units::GeV, pass_tight, weight);
70 m_eff_jetGNTautight->Fill(0., pass_tight, weight);
71 m_eff_mu_jetGNTautight->Fill(avg_mu,pass_tight, weight);
72
73 static const SG::ConstAccessor<char> acc_RNNEleLoose("EleRNNLoose_v1");
74 double pass_eVeto_loose = acc_RNNEleLoose.withDefault(tau,false);
75 m_eff_pt_eVetoloose->Fill(tau.pt()/Athena::Units::GeV, pass_eVeto_loose, weight);
76 m_eff_pt_eVetolooseHighPt->Fill(tau.pt()/Athena::Units::GeV, pass_eVeto_loose, weight);
77 m_eff_eVetoloose->Fill(0., pass_eVeto_loose, weight);
78 m_eff_eta_eVetoloose->Fill(tau.eta(), pass_eVeto_loose, weight);
79
80
81 static const SG::ConstAccessor<char> acc_RNNEleMedium("EleRNNMedium_v1");
82 double pass_eVeto_medium = acc_RNNEleMedium.withDefault(tau,false);
83 m_eff_pt_eVetomed->Fill(tau.pt()/Athena::Units::GeV, pass_eVeto_medium, weight);
84 m_eff_pt_eVetomedHighPt->Fill(tau.pt()/Athena::Units::GeV, pass_eVeto_medium, weight);
85 m_eff_eVetomed->Fill(0., pass_eVeto_medium, weight);
86 m_eff_eta_eVetomed->Fill(tau.eta(), pass_eVeto_medium, weight);
87
88 static const SG::ConstAccessor<char> acc_RNNEleTight("EleRNNTight_v1");
89 double pass_eVeto_tight = acc_RNNEleTight.withDefault(tau,false);
90 m_eff_pt_eVetotight->Fill(tau.pt()/Athena::Units::GeV, pass_eVeto_tight, weight);
91 m_eff_pt_eVetotightHighPt->Fill(tau.pt()/Athena::Units::GeV, pass_eVeto_tight, weight);
92 m_eff_eVetotight->Fill(0., pass_eVeto_tight, weight);
93 m_eff_eta_eVetotight->Fill(tau.eta(), pass_eVeto_tight, weight);
94
95 }
96
97
98}
Wrapper to avoid constant divisions when using units.
PlotBase(PlotBase *parent, const std::string &sDir)
Definition PlotBase.cxx:29
TProfile * BookTProfile(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, float startY=-1, float endY=-1, bool prependDir=true, bool useRMS=false)
Book a TProfile histogram.
Definition PlotBase.cxx:186
Helper class to provide constant type-safe access to aux data.
const_reference_type withDefault(const ELT &e, const T &deflt) const
Fetch the variable for one element, as a const reference, with a default.
void fill(const xAOD::TauJet &tau, float weight, float avg_mu)
EfficiencyPlots(PlotBase *pParent, const std::string &sDir, std::string sTauJetContainerName)
virtual double pt() const
The transverse momentum ( ) of the particle.
virtual double eta() const
The pseudorapidity ( ) of the particle.
STL namespace.
TauJet_v3 TauJet
Definition of the current "tau version".