ATLAS Offline Software
Loading...
Searching...
No Matches
EVetoPlots.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 "EVetoPlots.h"
7
8namespace Tau{
9
10EVetoPlots::EVetoPlots(PlotBase* pParent, const std::string& sDir, std::string sTauJetContainerName):
11 PlotBase(pParent, sDir),
12 m_sTauJetContainerName(std::move(sTauJetContainerName))
13{
14}
15
17
18 m_id_RNNEleScore = Book1D("id_RNNEleScore",m_sTauJetContainerName + " RNNEleScore ; RNNEleScore; # Tau",20,0.,1.00);
19 m_id_RNNEleScoreSigTrans = Book1D("id_RNNEleScoreSigTrans",m_sTauJetContainerName + " RNNEleScoreSigTrans ; RNNEleScoreSigTrans; # Tau",20,0.,1.00);
20 m_pt_eleRNNloose = Book1D("Pt_eleRNNloose",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,150.);
21 m_pt_eleRNNmed = Book1D("Pt_eleRNNmed",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,150.);
22 m_pt_eleRNNtight = Book1D("Pt_eleRNNtight",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,150.);
23 m_pt_eleRNNlooseHighPt = Book1D("Pt_eleRNNlooseHighPt",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,1500.);
24 m_pt_eleRNNmedHighPt = Book1D("Pt_eleRNNmedHighPt",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,1500.);
25 m_pt_eleRNNtightHighPt = Book1D("Pt_eleRNNtightHighPt",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,1500.);
26
27 m_id_GNNEleScore = Book1D("id_GNNEleScore",m_sTauJetContainerName + " GNNEleScore ; GNNEleScore; # Tau",75,0.,15.);
28 m_id_GNNEleScoreSigTrans = Book1D("id_GNNEleScoreSigTrans",m_sTauJetContainerName + " GNNEleScoreSigTrans ; GNNEleScoreSigTrans; # Tau",20,0.,1.00);
29 m_pt_eleGNNloose = Book1D("Pt_eleGNNloose",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,150.);
30 m_pt_eleGNNmed = Book1D("Pt_eleGNNmed",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,150.);
31 m_pt_eleGNNtight = Book1D("Pt_eleGNNtight",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,150.);
32 m_pt_eleGNNlooseHighPt = Book1D("Pt_eleGNNlooseHighPt",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,1500.);
33 m_pt_eleGNNmedHighPt = Book1D("Pt_eleGNNmedHighPt",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,1500.);
34 m_pt_eleGNNtightHighPt = Book1D("Pt_eleGNNtightHighPt",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,1500.);
35
36}
37
38 void EVetoPlots::fill(const xAOD::TauJet& tau, float weight) {
39
40 // RNN section
41 static const SG::ConstAccessor<float> RNNEleScoreAcc("RNNEleScore");
42 if(RNNEleScoreAcc.isAvailable(tau)) {
43 m_id_RNNEleScore->Fill(tau.discriminant(xAOD::TauJetParameters::RNNEleScore), weight);
44
45 static const SG::ConstAccessor<float> RNNEleScoreSigTrans_v1Acc("RNNEleScoreSigTrans_v1");
46 if(RNNEleScoreSigTrans_v1Acc.isAvailable(tau)) {
47 m_id_RNNEleScoreSigTrans->Fill(RNNEleScoreSigTrans_v1Acc(tau), weight);
48 }
49
50 static const SG::ConstAccessor<char> acc_RNNEleLoose("EleRNNLoose_v1");
51 if(acc_RNNEleLoose.isAvailable(tau) && acc_RNNEleLoose(tau)){
52 m_pt_eleRNNloose->Fill(tau.pt()/Athena::Units::GeV, weight);
53 m_pt_eleRNNlooseHighPt->Fill(tau.pt()/Athena::Units::GeV, weight);
54 }
55
56 static const SG::ConstAccessor<char> acc_RNNEleMedium("EleRNNMedium_v1");
57 if(acc_RNNEleMedium.isAvailable(tau) && acc_RNNEleMedium(tau)){
58 m_pt_eleRNNmed->Fill(tau.pt()/Athena::Units::GeV, weight);
59 m_pt_eleRNNmedHighPt->Fill(tau.pt()/Athena::Units::GeV, weight);
60 }
61
62 static const SG::ConstAccessor<char> acc_RNNEleTight("EleRNNTight_v1");
63 if(acc_RNNEleTight.isAvailable(tau) && acc_RNNEleTight(tau)){
64 m_pt_eleRNNtight->Fill(tau.pt()/Athena::Units::GeV, weight);
65 m_pt_eleRNNtightHighPt->Fill(tau.pt()/Athena::Units::GeV, weight);
66 }
67 }
68
69 // GNN section
70 static const SG::ConstAccessor<float> GNNEleScoreAcc("TauGNNeVetoScore");
71 if(GNNEleScoreAcc.isAvailable(tau)) {
72 m_id_GNNEleScore->Fill(GNNEleScoreAcc(tau), weight);
73
74 static const SG::ConstAccessor<float> GNNEleScoreSigTrans_v1Acc("TauGNNeVetoSigTrans");
75 m_id_GNNEleScoreSigTrans->Fill(GNNEleScoreSigTrans_v1Acc(tau), weight);
76
77 static const SG::ConstAccessor<char> acc_GNNEleLoose("TauGNNeVeto_L");
78 if(acc_GNNEleLoose(tau)){
79 m_pt_eleGNNloose->Fill(tau.pt()/Athena::Units::GeV, weight);
80 m_pt_eleGNNlooseHighPt->Fill(tau.pt()/Athena::Units::GeV, weight);
81 }
82
83 static const SG::ConstAccessor<char> acc_GNNEleMedium("TauGNNeVeto_M");
84 if(acc_GNNEleMedium(tau)){
85 m_pt_eleGNNmed->Fill(tau.pt()/Athena::Units::GeV, weight);
86 m_pt_eleGNNmedHighPt->Fill(tau.pt()/Athena::Units::GeV, weight);
87 }
88
89 static const SG::ConstAccessor<char> acc_GNNEleTight("TauGNNeVeto_T");
90 if(acc_GNNEleTight(tau)){
91 m_pt_eleGNNtight->Fill(tau.pt()/Athena::Units::GeV, weight);
92 m_pt_eleGNNtightHighPt->Fill(tau.pt()/Athena::Units::GeV, weight);
93 }
94 }
95}
96
97}
Wrapper to avoid constant divisions when using units.
TH1D * Book1D(std::string_view name, std::string_view labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition PlotBase.cxx:94
PlotBase(PlotBase *parent, std::string_view sDir)
Definition PlotBase.cxx:29
Helper class to provide constant type-safe access to aux data.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
TH1 * m_pt_eleGNNtightHighPt
Definition EVetoPlots.h:36
TH1 * m_id_GNNEleScore
Definition EVetoPlots.h:29
TH1 * m_pt_eleGNNlooseHighPt
Definition EVetoPlots.h:34
TH1 * m_pt_eleRNNlooseHighPt
Definition EVetoPlots.h:25
TH1 * m_pt_eleGNNtight
Definition EVetoPlots.h:33
TH1 * m_pt_eleRNNmedHighPt
Definition EVetoPlots.h:26
TH1 * m_id_GNNEleScoreSigTrans
Definition EVetoPlots.h:30
TH1 * m_pt_eleGNNloose
Definition EVetoPlots.h:31
TH1 * m_pt_eleRNNtightHighPt
Definition EVetoPlots.h:27
TH1 * m_pt_eleRNNmed
Definition EVetoPlots.h:23
void fill(const xAOD::TauJet &tau, float weight)
EVetoPlots(PlotBase *pParent, const std::string &sDir, std::string sTauJetContainerName)
TH1 * m_pt_eleGNNmed
Definition EVetoPlots.h:32
TH1 * m_pt_eleRNNloose
Definition EVetoPlots.h:22
TH1 * m_pt_eleGNNmedHighPt
Definition EVetoPlots.h:35
TH1 * m_pt_eleRNNtight
Definition EVetoPlots.h:24
void initializePlots()
TH1 * m_id_RNNEleScoreSigTrans
Definition EVetoPlots.h:21
TH1 * m_id_RNNEleScore
Definition EVetoPlots.h:20
std::string m_sTauJetContainerName
Definition EVetoPlots.h:40
STL namespace.
@ RNNEleScore
RNN score for Ele rejection (not transformed).
Definition TauDefs.h:94
TauJet_v3 TauJet
Definition of the current "tau version".
Definition TauJet.h:17