ATLAS Offline Software
Had3ProngPlots.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 "Had3ProngPlots.h"
6 
7 namespace Tau{
8 
9 Had3ProngPlots::Had3ProngPlots(PlotBase* pParent, const std::string& sDir, const std::string& sTauJetContainerName):
10  PlotBase(pParent, sDir),
11  m_oGeneralTauPlots(this, "", sTauJetContainerName),
12  m_tauCoreFrac(nullptr),
13  m_tauEoverPTrk(nullptr),
14  m_tauTrkAvgDist(nullptr),
15  m_tauDRMax(nullptr),
16  m_tauSflight(nullptr),
17  m_tauMtrks(nullptr),
18  m_tauIpSig(nullptr),
19  m_innerTrkAvgDist(nullptr),
20  m_ptRatioEflowApprox(nullptr),
21  m_mEflowApprox(nullptr),
22  m_ChPiEMEOverCaloEME(nullptr),
23  m_EMPOverTrkSysP(nullptr),
24  m_sTauJetContainerName(sTauJetContainerName)
25 {
26 }
27 
29 {
30 }
31 
33 
34  // m_oGeneralTauPlots.initialize();
35  m_tauCoreFrac = Book1D("CentFrac",m_sTauJetContainerName + " Tau CentFrac; CentFrac; # Taus",40,0.,2.);
36  m_tauEoverPTrk = Book1D("EoverPTrk",m_sTauJetContainerName + " Tau E over pLeadTrk; EoverP; # Taus",50,0.,4.);
37  m_tauTrkAvgDist = Book1D("TrkAvgDist",m_sTauJetContainerName + " Tau track avg dist; TrkAvgDist; # Taus",10,-0.2,.8);
38  m_tauDRMax = Book1D("DRMax",m_sTauJetContainerName + " Tau DR Max track-seed; DRMax; # Taus",20,0.,0.5);
39  m_tauSflight = Book1D("Sflight",m_sTauJetContainerName + " Tau flight sign. ; Sflight; # Taus",100,-10.,20.);
40  m_tauMtrks = Book1D("Mtracks",m_sTauJetContainerName + " Tau tracks mass ; Mtrks; # Taus",100,-10.,20.);
41  m_tauIpSig = Book1D("IpSig",m_sTauJetContainerName + " Tau lead track IP signif. ; IpSig; # Taus",30,-15.,15.);
42  m_innerTrkAvgDist = Book1D("innerTrkAvgDist",m_sTauJetContainerName + "Tau innerTrkAvgDist; innerTrkAvgDist; # of Taus", 10,-0.2,.8);
43  m_ptRatioEflowApprox = Book1D("ptRatioEflowApprox",m_sTauJetContainerName + "Tau ptRatioEflowApprox; ptRatioEflowApprox; # of Taus", 10, 0, 10);
44  m_mEflowApprox = Book1D("mEflowApprox",m_sTauJetContainerName + "Tau mEflowApprox; mEflowApprox; #Taus",30,0.0,3000.0);
45  m_ChPiEMEOverCaloEME = Book1D("ChPiEMEOverCaloEME",m_sTauJetContainerName + "Tau ChPiEMEOverCaloEME; ChPiEMEOverCaloEME; # of Taus", 30, -15, 15);
46  m_EMPOverTrkSysP = Book1D("EMPOverTrkSysP",m_sTauJetContainerName + "Tau EMPOverTrkSysP; EMPOverTrkSysP; # of Taus", 81, -1, 80);
47 
48 }
49 
50 void Had3ProngPlots::fill(const xAOD::TauJet& tau, float weight) {
52 
53  float avariable = 0.;
54 
55  bool test = tau.detail(xAOD::TauJetParameters::centFrac, avariable);
56  if(test) m_tauCoreFrac->Fill(avariable, weight);
57 
59  if(test) m_tauEoverPTrk->Fill(avariable, weight);
60 
62  if(test) m_tauTrkAvgDist->Fill(avariable, weight);
63 
64  test = tau.detail(xAOD::TauJetParameters::dRmax, avariable);
65  if(test) m_tauDRMax->Fill(avariable, weight);
66 
68  if(test) m_tauSflight->Fill(avariable, weight);
69 
71  if(test) m_tauMtrks->Fill(avariable/1000., weight);
72 
73  if(tau.nTracks()>0 && tau.track(0)->isAvailable<float>("d0SigTJVA")) {
74  m_tauIpSig->Fill(tau.track(0)->d0SigTJVA(), weight);
75  }
76 
78  if(test) m_innerTrkAvgDist->Fill(avariable, weight);
79 
81  if(test) m_ptRatioEflowApprox->Fill(avariable, weight);
82 
84  if(test) m_mEflowApprox->Fill(avariable, weight);
85 
87  if(test) m_ChPiEMEOverCaloEME->Fill(avariable, weight);
88 
90  if(test) m_EMPOverTrkSysP->Fill(avariable, weight);
91 }
92 
93 }
Tau::Had3ProngPlots::Had3ProngPlots
Had3ProngPlots(PlotBase *pParent, const std::string &sDir, const std::string &sTauJetContainerName)
Definition: Had3ProngPlots.cxx:9
PlotBase::Book1D
TH1F * 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:88
Tau::Had3ProngPlots::m_tauDRMax
TH1 * m_tauDRMax
Definition: Had3ProngPlots.h:24
Tau::Had3ProngPlots::initializePlots
void initializePlots()
Definition: Had3ProngPlots.cxx:32
PlotBase
Definition: PlotBase.h:33
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
TrigInDetValidation_Base.test
test
Definition: TrigInDetValidation_Base.py:144
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:200
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
TH1::Fill
int Fill(double)
Definition: rootspy.cxx:285
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:50
Tau::Had3ProngPlots::m_oGeneralTauPlots
Tau::GeneralTauPlots m_oGeneralTauPlots
Definition: Had3ProngPlots.h:20
Tau::Had3ProngPlots::m_innerTrkAvgDist
TH1 * m_innerTrkAvgDist
Definition: Had3ProngPlots.h:29
xAOD::IParticle::isAvailable
bool isAvailable(const std::string &name, const std::string &clsname="") const
Check if a user property is available for reading or not.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:131
Tau::Had3ProngPlots::~Had3ProngPlots
virtual ~Had3ProngPlots()
Definition: Had3ProngPlots.cxx:28
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
Tau::GeneralTauPlots::fill
void fill(const xAOD::TauJet &tau, float weight)
Definition: GeneralTauPlots.cxx:57
Tau::Had3ProngPlots::m_tauSflight
TH1 * m_tauSflight
Definition: Had3ProngPlots.h:25
xAOD::TauJetParameters::EMPOverTrkSysP
@ EMPOverTrkSysP
Definition: TauDefs.h:279
Had3ProngPlots.h