ATLAS Offline Software
RecoTauPlots.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "RecoTauPlots.h"
6 
7 namespace Tau{
8 
9  RecoTauPlots::RecoTauPlots(PlotBase* pParent, const std::string& sDir, const std::string& sTauJetContainerName):
10  PlotBase(pParent, sDir),
11  m_oParamPlots(this, "", sTauJetContainerName),
12  m_cellBased_neuPFO_Pt(nullptr),
13  m_cellBased_neuPFO_Eta(nullptr),
14  m_cellBased_neuPFO_Phi(nullptr),
15  m_cellBased_neuPFO_E(nullptr),
16  m_cellBased_neuPFO_bdtPi0Score(nullptr),
17  m_pantau_CellBasedInput_isPanTauCandidate(nullptr),
18  m_pantau_CellBasedInput_DecayMode(nullptr),
19  m_pantau_CellBasedInput_BDTValue_1p0n_vs_1p1n(nullptr),
20  m_pantau_CellBasedInput_BDTValue_1p1n_vs_1pXn(nullptr),
21  m_pantau_CellBasedInput_BDTValue_3p0n_vs_3pXn(nullptr),
22  m_pantau_CellBasedInput_BDTVar_Basic_NNeutralConsts(nullptr),
23  m_pantau_CellBasedInput_BDTVar_Charged_JetMoment_EtDRxTotalEt(nullptr),
24  m_pantau_CellBasedInput_BDTVar_Charged_StdDev_Et_WrtEtAllConsts(nullptr),
25  m_pantau_CellBasedInput_BDTVar_Charged_HLV_SumM(nullptr),
26  m_pantau_CellBasedInput_BDTVar_Neutral_HLV_SumM(nullptr),
27  m_pantau_CellBasedInput_BDTVar_Neutral_PID_BDTValues_BDTSort_1(nullptr),
28  m_pantau_CellBasedInput_BDTVar_Neutral_PID_BDTValues_BDTSort_2(nullptr),
29  m_pantau_CellBasedInput_BDTVar_Neutral_Ratio_1stBDTEtOverEtAllConsts(nullptr),
30  m_pantau_CellBasedInput_BDTVar_Neutral_Ratio_EtOverEtAllConsts(nullptr),
31  m_pantau_CellBasedInput_BDTVar_Neutral_Shots_NPhotonsInSeed(nullptr),
32  m_pantau_CellBasedInput_BDTVar_Combined_DeltaR1stNeutralTo1stCharged(nullptr),
33  m_sTauJetContainerName(sTauJetContainerName)
34  {
35  }
36 
38  {
39  }
40 
42 
43  // m_oParamPlots.initialize();
44 
45  m_cellBased_neuPFO_Pt = Book1D("cellBased_PFO_n_Pt",m_sTauJetContainerName + " Neutral PFO pt; pt; # PFO",200,0.,200000.);
46  m_cellBased_neuPFO_Eta = Book1D("cellBased_PFO_n_Eta",m_sTauJetContainerName + " Neutral PFO eta; eta; # PFO",128,-3.2,3.2);
47  m_cellBased_neuPFO_Phi = Book1D("cellBased_PFO_n_Phi",m_sTauJetContainerName + " Neutral PFO phi; phi; # PFO",64,-3.2,3.2);
48  m_cellBased_neuPFO_E = Book1D("cellBased_PFO_n_E",m_sTauJetContainerName + " Neutral PFO E; E; # PFO",200,0.,200000.);
49  m_cellBased_neuPFO_bdtPi0Score = Book1D("cellBased_PFO_n_bdtPi0Score",m_sTauJetContainerName + " Neutral PFO BDT Pi0 Score; Score; # PFO",60,-1.0,1.0);
50 
51  m_pantau_CellBasedInput_isPanTauCandidate = Book1D("pantau_CellBasedInput_isPanTauCandidate",m_sTauJetContainerName +"pantau_CellBasedInput_isPanTauCandidate", 2 ,0 ,2);
52  m_pantau_CellBasedInput_DecayMode = Book1D("pantau_CellBasedInput_DecayMode",m_sTauJetContainerName +"pantau_CellBasedInput_DecayMode", 6, -0.5, 5.5);
53  m_pantau_CellBasedInput_BDTValue_1p0n_vs_1p1n = Book1D("pantau_CellBasedInput_BDTValue_1p0n_vs_1p1n",m_sTauJetContainerName + "pantau_CellBasedInput_BDTValue_1p0n_vs_1p1n",30,-1.,1.);
54  m_pantau_CellBasedInput_BDTValue_1p1n_vs_1pXn = Book1D("pantau_CellBasedInput_BDTValue_1p1n_vs_1pXn",m_sTauJetContainerName + "pantau_CellBasedInput_BDTValue_1p1n_vs_1pXn",30,-1.,1.);
55  m_pantau_CellBasedInput_BDTValue_3p0n_vs_3pXn = Book1D("pantau_CellBasedInput_BDTValue_3p0n_vs_3pXn",m_sTauJetContainerName + "pantau_CellBasedInput_BDTValue_3p0n_vs_3pXn",30,-1.,1.);
56  m_pantau_CellBasedInput_BDTVar_Basic_NNeutralConsts = Book1D("pantau_CellBasedInput_BDTVar_Basic_NNeutralConsts",m_sTauJetContainerName + "pantau_CellBasedInput_BDTVar_Basic_NNeutralConsts",10.,-0.5,9.5);
57  m_pantau_CellBasedInput_BDTVar_Charged_JetMoment_EtDRxTotalEt = Book1D("pantau_CellBasedInput_BDTVar_Charged_JetMoment_EtDRxTotalEt",m_sTauJetContainerName + "pantau_CellBasedInput_BDTVar_Charged_JetMoment_EtDRxTotalEt", 30, 0.0, 4000.0);
58  m_pantau_CellBasedInput_BDTVar_Charged_StdDev_Et_WrtEtAllConsts = Book1D("pantau_CellBasedInput_BDTVar_Charged_StdDev_Et_WrtEtAllConsts",m_sTauJetContainerName + "pantau_CellBasedInput_BDTVar_Charged_StdDev_Et_WrtEtAllConsts",30,0.,0.6);
59  m_pantau_CellBasedInput_BDTVar_Charged_HLV_SumM = Book1D("pantau_CellBasedInput_BDTVar_Charged_HLV_SumM",m_sTauJetContainerName + "pantau_CellBasedInput_BDTVar_Charged_HLV_SumM", 30, 0.0, 4000.0);
60  m_pantau_CellBasedInput_BDTVar_Neutral_HLV_SumM = Book1D("pantau_CellBasedInput_BDTVar_Neutral_HLV_SumM",m_sTauJetContainerName + "pantau_CellBasedInput_BDTVar_Neutral_HLV_SumM", 30, 0.0, 4000.0);
61  m_pantau_CellBasedInput_BDTVar_Neutral_PID_BDTValues_BDTSort_1 = Book1D("pantau_CellBasedInput_BDTVar_Neutral_PID_BDTValues_BDTSort_1",m_sTauJetContainerName + "pantau_CellBasedInput_BDTVar_Neutral_PID_BDTValues_BDTSort_1",30,-1.5,1.5);
62  m_pantau_CellBasedInput_BDTVar_Neutral_PID_BDTValues_BDTSort_2 = Book1D("pantau_CellBasedInput_BDTVar_Neutral_PID_BDTValues_BDTSort_2",m_sTauJetContainerName + "pantau_CellBasedInput_BDTVar_Neutral_PID_BDTValues_BDTSort_2",30,-1.5,1.5);
63  m_pantau_CellBasedInput_BDTVar_Neutral_Ratio_1stBDTEtOverEtAllConsts = Book1D("pantau_CellBasedInput_BDTVar_Neutral_Ratio_1stBDTEtOverEtAllConsts",m_sTauJetContainerName + "pantau_CellBasedInput_BDTVar_Neutral_Ratio_1stBDTEtOverEtAllConsts",30,0.,1.);
64  m_pantau_CellBasedInput_BDTVar_Neutral_Ratio_EtOverEtAllConsts = Book1D("pantau_CellBasedInput_BDTVar_Neutral_Ratio_EtOverEtAllConsts",m_sTauJetContainerName + "pantau_CellBasedInput_BDTVar_Neutral_Ratio_EtOverEtAllConsts",30,-0.5,1.2);
65  m_pantau_CellBasedInput_BDTVar_Neutral_Shots_NPhotonsInSeed = Book1D("pantau_CellBasedInput_BDTVar_Neutral_Shots_NPhotonsInSeed",m_sTauJetContainerName + "pantau_CellBasedInput_BDTVar_Neutral_Shots_NPhotonsInSeed",10,-0.5,9.5);
66  m_pantau_CellBasedInput_BDTVar_Combined_DeltaR1stNeutralTo1stCharged = Book1D("pantau_CellBasedInput_BDTVar_Combined_DeltaR1stNeutralTo1stCharged",m_sTauJetContainerName + "pantau_CellBasedInput_BDTVar_Combined_DeltaR1stNeutralTo1stCharged",30,0.,0.6);
67 
68  }
69 
70  void RecoTauPlots::fill(const xAOD::TauJet& thisTau, float weight) {
71 
72  //Access Particle Flow Object
73 
74  //Neutral Pions
75  const std::vector< ElementLink< xAOD::PFOContainer > >& cellBased_neutralPFO = thisTau.protoNeutralPFOLinks();
76  for(const auto& link : cellBased_neutralPFO) {
77  const xAOD::PFO* PFO = *link;
78  m_cellBased_neuPFO_Pt->Fill(PFO->pt(), weight);
79  m_cellBased_neuPFO_Eta->Fill(PFO->eta(), weight);
80  m_cellBased_neuPFO_Phi->Fill(PFO->phi(), weight);
81  m_cellBased_neuPFO_E->Fill(PFO->e(), weight);
82  m_cellBased_neuPFO_bdtPi0Score->Fill(PFO->bdtPi0Score(), weight);
83  }
84 
85  int panTauInteger = 0;
86  float panTauFloat = 0.;
87 
90 
92  m_pantau_CellBasedInput_DecayMode->Fill(panTauInteger, weight);
93 
96 
99 
102 
105 
108 
111 
114 
117 
120 
123 
126 
129 
132 
135 
136  m_oParamPlots.fill(thisTau, weight);
137  }
138 
139 }
Tau::RecoTauPlots::m_pantau_CellBasedInput_DecayMode
TH1 * m_pantau_CellBasedInput_DecayMode
Definition: RecoTauPlots.h:33
Tau::RecoTauPlots::m_oParamPlots
Tau::ParamPlots m_oParamPlots
Definition: RecoTauPlots.h:22
xAOD::TauJetParameters::PanTau_DecayMode
@ PanTau_DecayMode
Definition: TauDefs.h:360
xAOD::TauJetParameters::PanTau_BDTVar_Neutral_Ratio_1stBDTEtOverEtAllConsts
@ PanTau_BDTVar_Neutral_Ratio_1stBDTEtOverEtAllConsts
Definition: TauDefs.h:372
Tau::RecoTauPlots::m_cellBased_neuPFO_bdtPi0Score
TH1 * m_cellBased_neuPFO_bdtPi0Score
Definition: RecoTauPlots.h:29
xAOD::TauJetParameters::PanTau_BDTVar_Combined_DeltaR1stNeutralTo1stCharged
@ PanTau_BDTVar_Combined_DeltaR1stNeutralTo1stCharged
Definition: TauDefs.h:375
Tau::RecoTauPlots::m_pantau_CellBasedInput_BDTVar_Neutral_Ratio_1stBDTEtOverEtAllConsts
TH1 * m_pantau_CellBasedInput_BDTVar_Neutral_Ratio_1stBDTEtOverEtAllConsts
Definition: RecoTauPlots.h:44
Tau::ParamPlots::fill
void fill(const xAOD::IParticle &prt, float weight)
Definition: PhysicsAnalysis/TauID/TauDQA/src/ParamPlots.cxx:36
PlotBase
Definition: PlotBase.h:34
Tau::RecoTauPlots::m_sTauJetContainerName
std::string m_sTauJetContainerName
Definition: RecoTauPlots.h:52
Tau::RecoTauPlots::m_pantau_CellBasedInput_BDTVar_Charged_StdDev_Et_WrtEtAllConsts
TH1 * m_pantau_CellBasedInput_BDTVar_Charged_StdDev_Et_WrtEtAllConsts
Definition: RecoTauPlots.h:39
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
xAOD::TauJetParameters::PanTau_BDTValue_3p0n_vs_3pXn
@ PanTau_BDTValue_3p0n_vs_3pXn
Definition: TauDefs.h:364
Tau::RecoTauPlots::m_pantau_CellBasedInput_BDTVar_Charged_JetMoment_EtDRxTotalEt
TH1 * m_pantau_CellBasedInput_BDTVar_Charged_JetMoment_EtDRxTotalEt
Definition: RecoTauPlots.h:38
Tau::RecoTauPlots::m_pantau_CellBasedInput_isPanTauCandidate
TH1 * m_pantau_CellBasedInput_isPanTauCandidate
Definition: RecoTauPlots.h:32
Tau::RecoTauPlots::m_pantau_CellBasedInput_BDTVar_Neutral_PID_BDTValues_BDTSort_2
TH1 * m_pantau_CellBasedInput_BDTVar_Neutral_PID_BDTValues_BDTSort_2
Definition: RecoTauPlots.h:43
Tau::RecoTauPlots::m_pantau_CellBasedInput_BDTValue_3p0n_vs_3pXn
TH1 * m_pantau_CellBasedInput_BDTValue_3p0n_vs_3pXn
Definition: RecoTauPlots.h:36
Tau
Definition: EfficiencyPtPlots.cxx:9
xAOD::TauJet_v3::panTauDetail
bool panTauDetail(TauJetParameters::PanTauDetails panTauDetail, int &value) const
Get and set values of pantau details variables via enum.
Definition: TauJet_v3.cxx:367
xAOD::TauJetParameters::PanTau_BDTVar_Neutral_HLV_SumM
@ PanTau_BDTVar_Neutral_HLV_SumM
Definition: TauDefs.h:369
Tau::RecoTauPlots::RecoTauPlots
RecoTauPlots(PlotBase *pParent, const std::string &sDir, const std::string &sTauJetContainerName)
Definition: RecoTauPlots.cxx:9
Tau::RecoTauPlots::~RecoTauPlots
virtual ~RecoTauPlots()
Definition: RecoTauPlots.cxx:37
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
PlotBase::Book1D
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
RecoTauPlots.h
xAOD::TauJetParameters::PanTau_BDTValue_1p1n_vs_1pXn
@ PanTau_BDTValue_1p1n_vs_1pXn
Definition: TauDefs.h:363
Tau::RecoTauPlots::m_pantau_CellBasedInput_BDTVar_Neutral_PID_BDTValues_BDTSort_1
TH1 * m_pantau_CellBasedInput_BDTVar_Neutral_PID_BDTValues_BDTSort_1
Definition: RecoTauPlots.h:42
xAOD::TauJet_v3::protoNeutralPFOLinks
const PFOLinks_t & protoNeutralPFOLinks() const
Tau::RecoTauPlots::m_pantau_CellBasedInput_BDTValue_1p1n_vs_1pXn
TH1 * m_pantau_CellBasedInput_BDTValue_1p1n_vs_1pXn
Definition: RecoTauPlots.h:35
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
Tau::RecoTauPlots::m_cellBased_neuPFO_Phi
TH1 * m_cellBased_neuPFO_Phi
Definition: RecoTauPlots.h:27
xAOD::TauJetParameters::PanTau_BDTValue_1p0n_vs_1p1n
@ PanTau_BDTValue_1p0n_vs_1p1n
Definition: TauDefs.h:362
Tau::RecoTauPlots::m_pantau_CellBasedInput_BDTVar_Neutral_Ratio_EtOverEtAllConsts
TH1 * m_pantau_CellBasedInput_BDTVar_Neutral_Ratio_EtOverEtAllConsts
Definition: RecoTauPlots.h:45
Tau::RecoTauPlots::m_cellBased_neuPFO_Pt
TH1 * m_cellBased_neuPFO_Pt
Definition: RecoTauPlots.h:25
Tau::RecoTauPlots::m_pantau_CellBasedInput_BDTVar_Neutral_HLV_SumM
TH1 * m_pantau_CellBasedInput_BDTVar_Neutral_HLV_SumM
Definition: RecoTauPlots.h:41
PFO
Definition: ClusterMomentPlots.h:15
xAOD::PFO_v1
Class describing a particle flow object.
Definition: PFO_v1.h:35
Tau::RecoTauPlots::m_cellBased_neuPFO_Eta
TH1 * m_cellBased_neuPFO_Eta
Definition: RecoTauPlots.h:26
xAOD::TauJetParameters::PanTau_BDTVar_Neutral_PID_BDTValues_BDTSort_2
@ PanTau_BDTVar_Neutral_PID_BDTValues_BDTSort_2
Definition: TauDefs.h:371
Tau::RecoTauPlots::fill
void fill(const xAOD::TauJet &tau, float weight)
Definition: RecoTauPlots.cxx:70
Tau::RecoTauPlots::m_pantau_CellBasedInput_BDTValue_1p0n_vs_1p1n
TH1 * m_pantau_CellBasedInput_BDTValue_1p0n_vs_1p1n
Definition: RecoTauPlots.h:34
xAOD::TauJetParameters::PanTau_BDTVar_Charged_StdDev_Et_WrtEtAllConsts
@ PanTau_BDTVar_Charged_StdDev_Et_WrtEtAllConsts
Definition: TauDefs.h:368
Tau::RecoTauPlots::initializePlots
void initializePlots()
Definition: RecoTauPlots.cxx:41
xAOD::TauJetParameters::PanTau_isPanTauCandidate
@ PanTau_isPanTauCandidate
Definition: TauDefs.h:357
xAOD::TauJetParameters::PanTau_BDTVar_Basic_NNeutralConsts
@ PanTau_BDTVar_Basic_NNeutralConsts
Definition: TauDefs.h:366
Tau::RecoTauPlots::m_pantau_CellBasedInput_BDTVar_Charged_HLV_SumM
TH1 * m_pantau_CellBasedInput_BDTVar_Charged_HLV_SumM
Definition: RecoTauPlots.h:40
xAOD::TauJetParameters::PanTau_BDTVar_Neutral_Shots_NPhotonsInSeed
@ PanTau_BDTVar_Neutral_Shots_NPhotonsInSeed
Definition: TauDefs.h:374
xAOD::TauJetParameters::PanTau_BDTVar_Charged_HLV_SumM
@ PanTau_BDTVar_Charged_HLV_SumM
Definition: TauDefs.h:379
Tau::RecoTauPlots::m_pantau_CellBasedInput_BDTVar_Combined_DeltaR1stNeutralTo1stCharged
TH1 * m_pantau_CellBasedInput_BDTVar_Combined_DeltaR1stNeutralTo1stCharged
Definition: RecoTauPlots.h:47
Tau::RecoTauPlots::m_pantau_CellBasedInput_BDTVar_Basic_NNeutralConsts
TH1 * m_pantau_CellBasedInput_BDTVar_Basic_NNeutralConsts
Definition: RecoTauPlots.h:37
Tau::RecoTauPlots::m_pantau_CellBasedInput_BDTVar_Neutral_Shots_NPhotonsInSeed
TH1 * m_pantau_CellBasedInput_BDTVar_Neutral_Shots_NPhotonsInSeed
Definition: RecoTauPlots.h:46
xAOD::TauJetParameters::PanTau_BDTVar_Charged_JetMoment_EtDRxTotalEt
@ PanTau_BDTVar_Charged_JetMoment_EtDRxTotalEt
Definition: TauDefs.h:367
xAOD::TauJetParameters::PanTau_BDTVar_Neutral_Ratio_EtOverEtAllConsts
@ PanTau_BDTVar_Neutral_Ratio_EtOverEtAllConsts
Definition: TauDefs.h:373
Tau::RecoTauPlots::m_cellBased_neuPFO_E
TH1 * m_cellBased_neuPFO_E
Definition: RecoTauPlots.h:28
xAOD::TauJetParameters::PanTau_BDTVar_Neutral_PID_BDTValues_BDTSort_1
@ PanTau_BDTVar_Neutral_PID_BDTValues_BDTSort_1
Definition: TauDefs.h:370