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
19
20
22
23 m_id_RNNEleScore = Book1D("id_RNNEleScore",m_sTauJetContainerName + " RNNEleScore ; RNNEleScore; # Tau",20,0.,1.00);
24 m_id_RNNEleScoreSigTrans = Book1D("id_RNNEleScoreSigTrans",m_sTauJetContainerName + " RNNEleScoreSigTrans ; RNNEleScoreSigTrans; # Tau",20,0.,1.00);
25 m_pt_eleRNNloose = Book1D("Pt_eleRNNloose",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,150.);
26 m_pt_eleRNNmed = Book1D("Pt_eleRNNmed",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,150.);
27 m_pt_eleRNNtight = Book1D("Pt_eleRNNtight",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,150.);
28 m_pt_eleRNNlooseHighPt = Book1D("Pt_eleRNNlooseHighPt",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,1500.);
29 m_pt_eleRNNmedHighPt = Book1D("Pt_eleRNNmedHighPt",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,1500.);
30 m_pt_eleRNNtightHighPt = Book1D("Pt_eleRNNtightHighPt",m_sTauJetContainerName + " Tau pt; pt; # Taus",20,0.,1500.);
31}
32
33 void EVetoPlots::fill(const xAOD::TauJet& tau, float weight) {
34
35 static const SG::ConstAccessor<float> RNNEleScoreAcc("RNNEleScore");
36 if(RNNEleScoreAcc.isAvailable(tau)) {
38
39 static const SG::ConstAccessor<float> RNNEleScoreSigTrans_v1Acc("RNNEleScoreSigTrans_v1");
40 if(RNNEleScoreSigTrans_v1Acc.isAvailable(tau)) {
41 m_id_RNNEleScoreSigTrans->Fill(RNNEleScoreSigTrans_v1Acc(tau), weight);
42 }
43
44 static const SG::ConstAccessor<char> acc_RNNEleLoose("EleRNNLoose_v1");
45 if(acc_RNNEleLoose.isAvailable(tau) && acc_RNNEleLoose(tau)){
46 m_pt_eleRNNloose->Fill(tau.pt()/Athena::Units::GeV, weight);
47 m_pt_eleRNNlooseHighPt->Fill(tau.pt()/Athena::Units::GeV, weight);
48 }
49
50 static const SG::ConstAccessor<char> acc_RNNEleMedium("EleRNNMedium_v1");
51 if(acc_RNNEleMedium.isAvailable(tau) && acc_RNNEleMedium(tau)){
52 m_pt_eleRNNmed->Fill(tau.pt()/Athena::Units::GeV, weight);
53 m_pt_eleRNNmedHighPt->Fill(tau.pt()/Athena::Units::GeV, weight);
54 }
55
56 static const SG::ConstAccessor<char> acc_RNNEleTight("EleRNNTight_v1");
57 if(acc_RNNEleTight.isAvailable(tau) && acc_RNNEleTight(tau)){
58 m_pt_eleRNNtight->Fill(tau.pt()/Athena::Units::GeV, weight);
59 m_pt_eleRNNtightHighPt->Fill(tau.pt()/Athena::Units::GeV, weight);
60 }
61 }
62}
63
64}
Wrapper to avoid constant divisions when using units.
TH1D * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition PlotBase.cxx:94
PlotBase(PlotBase *parent, const std::string &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_eleRNNlooseHighPt
Definition EVetoPlots.h:25
TH1 * m_pt_eleRNNmedHighPt
Definition EVetoPlots.h:26
virtual ~EVetoPlots()
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_eleRNNloose
Definition EVetoPlots.h:22
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:31
virtual double pt() const
The transverse momentum ( ) of the particle.
double discriminant(TauJetParameters::TauID discID) const
Get value of discriminant.
STL namespace.
@ RNNEleScore
RNN score for Ele rejection (not transformed)
Definition TauDefs.h:94
TauJet_v3 TauJet
Definition of the current "tau version".