ATLAS Offline Software
Had3ProngPlots.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "Had3ProngPlots.h"
7 
8 namespace Tau{
9 
10 Had3ProngPlots::Had3ProngPlots(PlotBase* pParent, const std::string& sDir, const std::string& sTauJetContainerName):
11  PlotBase(pParent, sDir),
12  m_oGeneralTauPlots(this, "", sTauJetContainerName),
13  m_tauCoreFrac(nullptr),
14  m_tauEoverPTrk(nullptr),
15  m_tauTrkAvgDist(nullptr),
16  m_tauDRMax(nullptr),
17  m_tauSflight(nullptr),
18  m_tauMtrks(nullptr),
19  m_tauIpSig(nullptr),
20  m_innerTrkAvgDist(nullptr),
21  m_ptRatioEflowApprox(nullptr),
22  m_mEflowApprox(nullptr),
23  m_ChPiEMEOverCaloEME(nullptr),
24  m_EMPOverTrkSysP(nullptr),
25  m_sTauJetContainerName(sTauJetContainerName)
26 {
27 }
28 
30 {
31 }
32 
34 
35  // m_oGeneralTauPlots.initialize();
36  m_tauCoreFrac = Book1D("CentFrac",m_sTauJetContainerName + " Tau CentFrac; CentFrac; # Taus",40,0.,2.);
37  m_tauEoverPTrk = Book1D("EoverPTrk",m_sTauJetContainerName + " Tau E over pLeadTrk; EoverP; # Taus",50,0.,4.);
38  m_tauTrkAvgDist = Book1D("TrkAvgDist",m_sTauJetContainerName + " Tau track avg dist; TrkAvgDist; # Taus",10,-0.2,.8);
39  m_tauDRMax = Book1D("DRMax",m_sTauJetContainerName + " Tau DR Max track-seed; DRMax; # Taus",20,0.,0.5);
40  m_tauSflight = Book1D("Sflight",m_sTauJetContainerName + " Tau flight sign. ; Sflight; # Taus",100,-10.,20.);
41  m_tauMtrks = Book1D("Mtracks",m_sTauJetContainerName + " Tau tracks mass ; Mtrks; # Taus",100,-10.,20.);
42  m_tauIpSig = Book1D("IpSig",m_sTauJetContainerName + " Tau lead track IP signif. ; IpSig; # Taus",30,-15.,15.);
43  m_innerTrkAvgDist = Book1D("innerTrkAvgDist",m_sTauJetContainerName + "Tau innerTrkAvgDist; innerTrkAvgDist; # of Taus", 10,-0.2,.8);
44  m_ptRatioEflowApprox = Book1D("ptRatioEflowApprox",m_sTauJetContainerName + "Tau ptRatioEflowApprox; ptRatioEflowApprox; # of Taus", 10, 0, 10);
45  m_mEflowApprox = Book1D("mEflowApprox",m_sTauJetContainerName + "Tau mEflowApprox; mEflowApprox; #Taus",30,0.0,3000.0);
46  m_ChPiEMEOverCaloEME = Book1D("ChPiEMEOverCaloEME",m_sTauJetContainerName + "Tau ChPiEMEOverCaloEME; ChPiEMEOverCaloEME; # of Taus", 30, -15, 15);
47  m_EMPOverTrkSysP = Book1D("EMPOverTrkSysP",m_sTauJetContainerName + "Tau EMPOverTrkSysP; EMPOverTrkSysP; # of Taus", 81, -1, 80);
48 
49 }
50 
51 void Had3ProngPlots::fill(const xAOD::TauJet& tau, float weight) {
53 
54  float avariable = 0.;
55 
56  bool test = tau.detail(xAOD::TauJetParameters::centFrac, avariable);
57  if(test) m_tauCoreFrac->Fill(avariable, weight);
58 
60  if(test) m_tauEoverPTrk->Fill(avariable, weight);
61 
63  if(test) m_tauTrkAvgDist->Fill(avariable, weight);
64 
65  test = tau.detail(xAOD::TauJetParameters::dRmax, avariable);
66  if(test) m_tauDRMax->Fill(avariable, weight);
67 
69  if(test) m_tauSflight->Fill(avariable, weight);
70 
72  if(test) m_tauMtrks->Fill(avariable/1000., weight);
73 
74  static const SG::ConstAccessor<float> d0SigTJVAAcc("d0SigTJVA");
75  if(tau.nTracks()>0 && d0SigTJVAAcc.isAvailable(*tau.track(0))) {
76  m_tauIpSig->Fill(tau.track(0)->d0SigTJVA(), weight);
77  }
78 
80  if(test) m_innerTrkAvgDist->Fill(avariable, weight);
81 
83  if(test) m_ptRatioEflowApprox->Fill(avariable, weight);
84 
86  if(test) m_mEflowApprox->Fill(avariable, weight);
87 
89  if(test) m_ChPiEMEOverCaloEME->Fill(avariable, weight);
90 
92  if(test) m_EMPOverTrkSysP->Fill(avariable, weight);
93 }
94 
95 }
Tau::Had3ProngPlots::Had3ProngPlots
Had3ProngPlots(PlotBase *pParent, const std::string &sDir, const std::string &sTauJetContainerName)
Definition: Had3ProngPlots.cxx:10
Tau::Had3ProngPlots::m_tauDRMax
TH1 * m_tauDRMax
Definition: Had3ProngPlots.h:24
Tau::Had3ProngPlots::initializePlots
void initializePlots()
Definition: Had3ProngPlots.cxx:33
PlotBase
Definition: PlotBase.h:34
xAOD::TauJetParameters::trFlightPathSig
@ trFlightPathSig
Definition: TauDefs.h:163
Tau::Had3ProngPlots::m_tauCoreFrac
TH1 * m_tauCoreFrac
Definition: Had3ProngPlots.h:21
xAOD::TauTrack_v1::d0SigTJVA
float d0SigTJVA() const
Definition: TauTrack_v1.cxx:129
Tau::Had3ProngPlots::m_tauEoverPTrk
TH1 * m_tauEoverPTrk
Definition: Had3ProngPlots.h:22
Tau::Had3ProngPlots::m_tauTrkAvgDist
TH1 * m_tauTrkAvgDist
Definition: Had3ProngPlots.h:23
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
Tau::Had3ProngPlots::m_sTauJetContainerName
std::string m_sTauJetContainerName
Definition: Had3ProngPlots.h:38
xAOD::TauJet_v3::nTracks
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
Definition: TauJet_v3.cxx:526
xAOD::TauJetParameters::mEflowApprox
@ mEflowApprox
Definition: TauDefs.h:292
Tau
Definition: EfficiencyPtPlots.cxx:9
SG::ConstAccessor< float >
TrigInDetValidation_Base.test
test
Definition: TrigInDetValidation_Base.py:147
xAOD::TauJetParameters::ptRatioEflowApprox
@ ptRatioEflowApprox
Definition: TauDefs.h:293
Tau::Had3ProngPlots::m_tauIpSig
TH1 * m_tauIpSig
Definition: Had3ProngPlots.h:27
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
xAOD::TauJetParameters::centFrac
@ centFrac
Get centrality fraction.
Definition: TauDefs.h:200
xAOD::TauJetParameters::dRmax
@ dRmax
Get maximal dR of tracks associated to calo-seeded tau.
Definition: TauDefs.h:226
xAOD::TauJetParameters::trkAvgDist
@ trkAvgDist
Get calibrated EM transverse energy (DEPRECATED since r19)
Definition: TauDefs.h:214
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
xAOD::TauJet_v3::track
const TauTrack * track(size_t i, TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged, int *container_index=0) const
Get the pointer to a given tauTrack associated with this tau /*container index needed by trackNonCons...
Definition: TauJet_v3.cxx:450
Tau::Had3ProngPlots::m_EMPOverTrkSysP
TH1 * m_EMPOverTrkSysP
Definition: Had3ProngPlots.h:34
Tau::Had3ProngPlots::m_mEflowApprox
TH1 * m_mEflowApprox
Definition: Had3ProngPlots.h:31
xAOD::TauJetParameters::etOverPtLeadTrk
@ etOverPtLeadTrk
Definition: TauDefs.h:158
Tau::Had3ProngPlots::m_tauMtrks
TH1 * m_tauMtrks
Definition: Had3ProngPlots.h:26
xAOD::TauJetParameters::massTrkSys
@ massTrkSys
Definition: TauDefs.h:161
xAOD::TauJet_v3::detail
bool detail(TauJetParameters::Detail detail, int &value) const
Set veto flag.
Definition: TauJet_v3.cxx:292
Tau::Had3ProngPlots::fill
void fill(const xAOD::TauJet &tau, float weight)
Definition: Had3ProngPlots.cxx:51
Tau::Had3ProngPlots::m_oGeneralTauPlots
Tau::GeneralTauPlots m_oGeneralTauPlots
Definition: Had3ProngPlots.h:20
Tau::Had3ProngPlots::m_innerTrkAvgDist
TH1 * m_innerTrkAvgDist
Definition: Had3ProngPlots.h:29
Tau::Had3ProngPlots::~Had3ProngPlots
virtual ~Had3ProngPlots()
Definition: Had3ProngPlots.cxx:29
Tau::Had3ProngPlots::m_ptRatioEflowApprox
TH1 * m_ptRatioEflowApprox
Definition: Had3ProngPlots.h:30
xAOD::TauJetParameters::innerTrkAvgDist
@ innerTrkAvgDist
Definition: TauDefs.h:287
xAOD::TauJetParameters::ChPiEMEOverCaloEME
@ ChPiEMEOverCaloEME
Definition: TauDefs.h:278
Tau::Had3ProngPlots::m_ChPiEMEOverCaloEME
TH1 * m_ChPiEMEOverCaloEME
Definition: Had3ProngPlots.h:33
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Tau::GeneralTauPlots::fill
void fill(const xAOD::TauJet &tau, float weight)
Definition: GeneralTauPlots.cxx:58
Tau::Had3ProngPlots::m_tauSflight
TH1 * m_tauSflight
Definition: Had3ProngPlots.h:25
ConstAccessor.h
Helper class to provide constant type-safe access to aux data.
xAOD::TauJetParameters::EMPOverTrkSysP
@ EMPOverTrkSysP
Definition: TauDefs.h:279
Had3ProngPlots.h