|
ATLAS Offline Software
|
#include <RecoPhysPlots.h>
Definition at line 12 of file RecoPhysPlots.h.
◆ RecoPhysPlots()
RecoPhysPlots::RecoPhysPlots |
( |
PlotBase * |
pParent, |
|
|
const std::string & |
sDir, |
|
|
std::string |
recObj |
|
) |
| |
◆ Book1D() [1/2]
TH1F * PlotBase::Book1D |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
int |
nBins, |
|
|
float |
start, |
|
|
float |
end, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TH1D histogram.
Definition at line 88 of file PlotBase.cxx.
91 Bool_t oldstat = TH1::AddDirectoryStatus();
92 TH1::AddDirectory(
false);
94 TH1::AddDirectory(oldstat);
◆ Book1D() [2/2]
TH1F * PlotBase::Book1D |
( |
const std::string & |
name, |
|
|
TH1 * |
refHist, |
|
|
const std::string & |
labels, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TH1D histogram using refHist as reference for number of bins and axis range.
Definition at line 102 of file PlotBase.cxx.
104 Bool_t oldstat = TH1::AddDirectoryStatus();
105 TH1::AddDirectory(
false);
107 refHist->GetXaxis()->GetXbins()->GetArray());
109 TH1::AddDirectory(oldstat);
◆ Book2D() [1/3]
TH2F * PlotBase::Book2D |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
int |
nBinsX, |
|
|
Double_t * |
binsX, |
|
|
int |
nBinsY, |
|
|
Double_t |
startY, |
|
|
Double_t |
endY, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TH2D histogram with variable x axis binning.
Definition at line 138 of file PlotBase.cxx.
141 Bool_t oldstat = TH2::AddDirectoryStatus();
142 TH2::AddDirectory(
false);
145 TH2::AddDirectory(oldstat);
◆ Book2D() [2/3]
TH2F * PlotBase::Book2D |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
int |
nBinsX, |
|
|
float |
startX, |
|
|
float |
endX, |
|
|
int |
nBinsY, |
|
|
float |
startY, |
|
|
float |
endY, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TH2D histogram.
Definition at line 117 of file PlotBase.cxx.
120 Bool_t oldstat = TH2::AddDirectoryStatus();
121 TH2::AddDirectory(
false);
124 TH2::AddDirectory(oldstat);
◆ Book2D() [3/3]
TH2F * PlotBase::Book2D |
( |
const std::string & |
name, |
|
|
TH2 * |
refHist, |
|
|
const std::string & |
labels, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TH2D histogram using refHist as reference for number of bins and axis range.
Definition at line 132 of file PlotBase.cxx.
133 return Book2D(
name,
labels, refHist->GetNbinsX(), refHist->GetXaxis()->GetXmin(), refHist->GetXaxis()->GetXmax(),
134 refHist->GetNbinsY(), refHist->GetYaxis()->GetXmin(), refHist->GetYaxis()->GetXmax(), prependDir);
◆ Book3D() [1/2]
TH3F * PlotBase::Book3D |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
int |
nBinsX, |
|
|
float |
startX, |
|
|
float |
endX, |
|
|
int |
nBinsY, |
|
|
float |
startY, |
|
|
float |
endY, |
|
|
int |
nBinsZ, |
|
|
float |
startZ, |
|
|
float |
endZ, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TH3D histogram.
Definition at line 151 of file PlotBase.cxx.
154 Bool_t oldstat = TH3::AddDirectoryStatus();
155 TH3::AddDirectory(
false);
157 labels.c_str(), nBinsX, startX, endX, nBinsY, startY, endY, nBinsZ, startZ, endZ);
159 TH3::AddDirectory(oldstat);
◆ Book3D() [2/2]
TH3F * PlotBase::Book3D |
( |
const std::string & |
name, |
|
|
TH3 * |
refHist, |
|
|
const std::string & |
labels, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TH3D histogram using refHist as reference for number of bins and axis range.
Definition at line 165 of file PlotBase.cxx.
167 Bool_t oldstat = TH3::AddDirectoryStatus();
168 TH3::AddDirectory(
false);
170 refHist->GetXaxis()->GetXbins()->GetArray(), refHist->GetNbinsY(),
171 refHist->GetYaxis()->GetXbins()->GetArray(), refHist->GetNbinsZ(),
172 refHist->GetZaxis()->GetXbins()->GetArray());
173 TH3::AddDirectory(oldstat);
◆ BookTEfficiency() [1/2]
TEfficiency * PlotBase::BookTEfficiency |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
const int |
nBinsX, |
|
|
const float |
xlo, |
|
|
const float |
xhi, |
|
|
const bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a (1-D) TEfficiency histogram.
Definition at line 251 of file PlotBase.cxx.
257 hist->SetDirectory(
nullptr);
◆ BookTEfficiency() [2/2]
TEfficiency * PlotBase::BookTEfficiency |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
const int |
nBinsX, |
|
|
const float |
xlo, |
|
|
const float |
xhi, |
|
|
const int |
nBinsy, |
|
|
const float |
ylo, |
|
|
const float |
yhi, |
|
|
const bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a (2-D) TEfficiency histogram.
Definition at line 264 of file PlotBase.cxx.
268 hist->SetDirectory(
nullptr);
◆ BookTProfile() [1/2]
TProfile * PlotBase::BookTProfile |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
int |
nBinsX, |
|
|
float * |
binsX, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TProfile histogram with variable binning in x-axis.
Definition at line 198 of file PlotBase.cxx.
201 Bool_t oldstat = TProfile::AddDirectoryStatus();
202 TProfile::AddDirectory(
false);
205 TProfile::AddDirectory(oldstat);
◆ BookTProfile() [2/2]
TProfile * PlotBase::BookTProfile |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
int |
nBinsX, |
|
|
float |
startX, |
|
|
float |
endX, |
|
|
float |
startY = -1 , |
|
|
float |
endY = -1 , |
|
|
bool |
prependDir = true , |
|
|
bool |
useRMS = false |
|
) |
| |
|
inherited |
Book a TProfile histogram.
Definition at line 180 of file PlotBase.cxx.
184 Bool_t oldstat = TProfile::AddDirectoryStatus();
185 TProfile::AddDirectory(
false);
186 std::string
opt = useRMS ?
"S" :
"";
187 if ((startY == -1) and (endY == -1)) {
192 TProfile::AddDirectory(oldstat);
◆ BookTProfile2D() [1/2]
Book a TProfile 2D histogram with variable binning in x-axis and limits in y-values.
Definition at line 225 of file PlotBase.cxx.
229 Bool_t oldstat = TProfile2D::AddDirectoryStatus();
230 TProfile2D::AddDirectory(
false);
231 std::string
opt = useRMS ?
"S" :
"";
233 TProfile2D::AddDirectory(oldstat);
◆ BookTProfile2D() [2/2]
TProfile2D * PlotBase::BookTProfile2D |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
const int |
nBinsX, |
|
|
double * |
binsX, |
|
|
const int |
nBinsY, |
|
|
double * |
binsY, |
|
|
bool |
prependDir = true , |
|
|
bool |
useRMS = false |
|
) |
| |
|
inherited |
Book a TProfile 2D histogram with variable binning in x-axis and limits in y-values.
Definition at line 239 of file PlotBase.cxx.
241 Bool_t oldstat = TProfile2D::AddDirectoryStatus();
242 TProfile2D::AddDirectory(
false);
243 std::string
opt = useRMS ?
"S" :
"";
245 TProfile2D::AddDirectory(oldstat);
◆ BookTProfileRangeY()
TProfile * PlotBase::BookTProfileRangeY |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
int |
nBinsX, |
|
|
double * |
binsX, |
|
|
double |
startY, |
|
|
double |
endY, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TProfile histogram with variable binning in x-axis and limits in y-values.
Definition at line 211 of file PlotBase.cxx.
215 Bool_t oldstat = TProfile::AddDirectoryStatus();
216 TProfile::AddDirectory(
false);
219 TProfile::AddDirectory(oldstat);
◆ BookTree()
TTree * PlotBase::BookTree |
( |
const std::string & |
name, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TTree.
Definition at line 275 of file PlotBase.cxx.
279 tree->SetAutoSave(0);
280 tree->SetAutoFlush(0);
281 tree->SetDirectory(
nullptr);
◆ constructPrefix()
std::string PlotBase::constructPrefix |
( |
std::string |
dir, |
|
|
bool |
prependDir |
|
) |
| |
|
staticprivateinherited |
◆ EtaRegionCoarse()
float RecoPhysPlots::EtaRegionCoarse |
( |
double |
eta | ) |
|
Definition at line 170 of file RecoPhysPlots.cxx.
173 if(
eta < -2.50) {
return -1.;}
174 if(
eta < -1.05) {
return 0.5;}
175 if(
eta < 0.00) {
return 1.5;}
176 if(
eta < 1.05) {
return 2.5;}
177 if(
eta < 2.50) {
return 3.5;}
◆ EtaRegionFine()
float RecoPhysPlots::EtaRegionFine |
( |
double |
eta | ) |
|
Definition at line 155 of file RecoPhysPlots.cxx.
157 if (
eta < -2.50) {
return -1.;}
158 if (
eta < -2.00) {
return 0.5;}
159 if (
eta < -1.70) {
return 1.5;}
160 if (
eta < -1.05) {
return 2.5;}
161 if (
eta < 0.00) {
return 3.5;}
162 if (
eta > 2.50) {
return 8.5;}
163 if (
eta > 2.00) {
return 7.5;}
164 if (
eta > 1.70) {
return 6.5;}
165 if (
eta > 1.05) {
return 5.5;}
166 if (
eta > 0.00) {
return 4.5;}
◆ fill() [1/2]
void RecoPhysPlots::fill |
( |
const float |
eta_mu_plus, |
|
|
const float |
eta_mu_minus, |
|
|
const float |
invariant_mass |
|
) |
| |
◆ fill() [2/2]
Definition at line 96 of file RecoPhysPlots.cxx.
97 for (
auto mumu: mumucandidates){
98 const float invariant_mass = (mumu.first->p4() + mumu.second->p4()).M();
99 fill(mumu.first->eta(), mumu.second->eta(), invariant_mass);
◆ finalize()
void PlotBase::finalize |
( |
| ) |
|
|
inherited |
◆ finalizePlots()
virtual void PlotBase::finalizePlots |
( |
| ) |
|
|
inlineprivatevirtualinherited |
Reimplemented in TCCPlots, JetTagDQA::BTaggingValidationPlots, InDetPerfPlot_VertexTruthMatching, ZeeValidation::ReconElectronsPlots, InDetPerfPlot_Efficiency, InDetPerfPlot_Resolution, InDetPerfPlot_TRTExtension, InDetPerfPlot_TrackParameters, ZeeValidation::TrueElectronsPlots, ZeeValidation::TrueFwdElectronsPlots, IDTPM::OfflineElectronPlots, InDetPerfPlot_FakeRate, IDTPM::EfficiencyPlots, IDTPM::TrackParametersPlots, InDetPerfPlot_Duplicate, InDetBasicPlot, and Trk::EfficiencyPlots.
Definition at line 91 of file PlotBase.h.
◆ finalizeRecoPlots()
void RecoPhysPlots::finalizeRecoPlots |
( |
| ) |
|
◆ getDirectory()
std::string PlotBase::getDirectory |
( |
| ) |
|
|
inlineinherited |
◆ initialize()
void PlotBase::initialize |
( |
| ) |
|
|
inherited |
◆ initializePlots()
void RecoPhysPlots::initializePlots |
( |
| ) |
|
|
privatevirtual |
Error check for doZ and doJ both true here;
Reimplemented from PlotBase.
Definition at line 35 of file RecoPhysPlots.cxx.
37 std::string Zsig(
"Z");
38 std::string Jsig(
"Jpsi");
40 bool doZ =
false;
bool doJ =
false;
42 if (!
type.compare(Zsig)) {
name=
"Z"; doZ =
true; }
43 else if (!
type.compare(Jsig)) {
name=
"J/#psi"; doJ =
true; }
44 else {
name=
"other"; }
48 double maxBin = 1000.0;
◆ LabelCombinedEtaRegions()
bool RecoPhysPlots::LabelCombinedEtaRegions |
( |
TAxis * |
axis | ) |
|
Definition at line 196 of file RecoPhysPlots.cxx.
198 axis->SetBinLabel( 1,
"EC-EC");
199 axis->SetBinLabel( 2,
"EC-BC");
200 axis->SetBinLabel( 3,
"EC-BA");
201 axis->SetBinLabel( 4,
"EC-EA");
202 axis->SetBinLabel( 5,
"BC-EC");
203 axis->SetBinLabel( 6,
"BC-BC");
204 axis->SetBinLabel( 7,
"BC-BA");
205 axis->SetBinLabel( 8,
"BC-EA");
206 axis->SetBinLabel( 9,
"BA-EC");
207 axis->SetBinLabel(10,
"BA-BC");
208 axis->SetBinLabel(11,
"BA-BA");
209 axis->SetBinLabel(12,
"BA-EA");
210 axis->SetBinLabel(13,
"EA-EC");
211 axis->SetBinLabel(14,
"EA-BC");
212 axis->SetBinLabel(15,
"EA-BA");
213 axis->SetBinLabel(16,
"EA-EA");
215 axis->SetTitle(
"#eta Region Permutations [+#mu, -#mu]");
◆ LabelLargeEtaRegions()
bool RecoPhysPlots::LabelLargeEtaRegions |
( |
TAxis * |
axis | ) |
|
Definition at line 181 of file RecoPhysPlots.cxx.
183 axis->SetBinLabel(1,
"CSC C");
184 axis->SetBinLabel(2,
"EC C");
185 axis->SetBinLabel(3,
"TRANS C");
186 axis->SetBinLabel(4,
"BARR C");
187 axis->SetBinLabel(5,
"BARR A");
188 axis->SetBinLabel(6,
"TRANS A");
189 axis->SetBinLabel(7,
"EC A");
190 axis->SetBinLabel(8,
" CSC A");
191 axis->SetTitle(
"Detector #eta Regions");
◆ LabelSectorAxis()
bool RecoPhysPlots::LabelSectorAxis |
( |
TAxis * |
axis | ) |
|
Definition at line 220 of file RecoPhysPlots.cxx.
222 axis->SetTitle(
"#phi Sectors 1-16");
223 if(
axis->GetNbins() == 16)
axis->CenterLabels(kTRUE);
226 if(
axis->GetNbins()%16){
230 int nSectorDevisions =
axis->GetNbins()/16;
231 int skip_counter = 1;
233 axis->SetNdivisions(16,nSectorDevisions,0,kFALSE);
236 for (
int i = 1;
i <=
axis->GetNbins();
i++) {
238 if (skip_counter == nSectorDevisions) {
239 axis->SetBinLabel(
i,Form(
"%d",
i/nSectorDevisions));
242 axis->SetBinLabel(
i,
" ");
◆ RegisterSubPlot()
void PlotBase::RegisterSubPlot |
( |
PlotBase * |
pPlotBase | ) |
|
|
inlineinherited |
◆ retrieveBookedEfficiencies()
std::vector< EfficiencyData > PlotBase::retrieveBookedEfficiencies |
( |
| ) |
|
|
inherited |
Retrieve all booked efficiency objects.
Definition at line 77 of file PlotBase.cxx.
80 std::vector<EfficiencyData> subNodeHists = subNode->retrieveBookedEfficiencies();
81 vBookedEfficiencies.insert(vBookedEfficiencies.end(), subNodeHists.begin(), subNodeHists.end());
83 return vBookedEfficiencies;
◆ retrieveBookedHistograms()
std::vector< HistData > PlotBase::retrieveBookedHistograms |
( |
| ) |
|
|
inherited |
Retrieve all booked histograms.
Definition at line 57 of file PlotBase.cxx.
60 std::vector<HistData> subNodeHists = subNode->retrieveBookedHistograms();
61 vBookedHistograms.insert(vBookedHistograms.end(), subNodeHists.begin(), subNodeHists.end());
63 return vBookedHistograms;
◆ retrieveBookedTrees()
std::vector< TreeData > PlotBase::retrieveBookedTrees |
( |
| ) |
|
|
inherited |
Retrieve all booked trees.
Definition at line 67 of file PlotBase.cxx.
70 std::vector<TreeData> subNodeTrees = subNode->retrieveBookedTrees();
71 vBookedTrees.insert(vBookedTrees.end(), subNodeTrees.begin(), subNodeTrees.end());
◆ setDetailLevel()
void PlotBase::setDetailLevel |
( |
int |
iDetailLevel | ) |
|
|
inherited |
Definition at line 49 of file PlotBase.cxx.
51 subNode->setDetailLevel(iDetailLevel);
◆ SetResultsBin()
void RecoPhysPlots::SetResultsBin |
( |
int |
iBin, |
|
|
TH1 * |
pInputHist |
|
) |
| |
|
private |
◆ m_2occupancy
TH1* RecoPhysPlots::m_2occupancy |
◆ m_iDetailLevel
int PlotBase::m_iDetailLevel |
|
protectedinherited |
◆ m_M_BA_BA
TH1* RecoPhysPlots::m_M_BA_BA |
◆ m_M_BA_BC
TH1* RecoPhysPlots::m_M_BA_BC |
◆ m_M_BA_EA
TH1* RecoPhysPlots::m_M_BA_EA |
◆ m_M_BA_EC
TH1* RecoPhysPlots::m_M_BA_EC |
◆ m_M_BC_BA
TH1* RecoPhysPlots::m_M_BC_BA |
◆ m_M_BC_BC
TH1* RecoPhysPlots::m_M_BC_BC |
◆ m_M_BC_EA
TH1* RecoPhysPlots::m_M_BC_EA |
◆ m_M_BC_EC
TH1* RecoPhysPlots::m_M_BC_EC |
◆ m_M_EA_BA
TH1* RecoPhysPlots::m_M_EA_BA |
◆ m_M_EA_BC
TH1* RecoPhysPlots::m_M_EA_BC |
◆ m_M_EA_EA
TH1* RecoPhysPlots::m_M_EA_EA |
◆ m_M_EA_EC
TH1* RecoPhysPlots::m_M_EA_EC |
◆ m_M_EC_BA
TH1* RecoPhysPlots::m_M_EC_BA |
◆ m_M_EC_BC
TH1* RecoPhysPlots::m_M_EC_BC |
◆ m_M_EC_EA
TH1* RecoPhysPlots::m_M_EC_EA |
◆ m_M_EC_EC
TH1* RecoPhysPlots::m_M_EC_EC |
◆ m_M_Mean
TH1* RecoPhysPlots::m_M_Mean |
◆ m_M_Sigma
TH1* RecoPhysPlots::m_M_Sigma |
◆ m_Mass
TH1* RecoPhysPlots::m_Mass |
◆ m_occupancy
TH1* RecoPhysPlots::m_occupancy |
◆ m_sDirectory
std::string PlotBase::m_sDirectory |
|
protectedinherited |
◆ m_vBookedEfficiencies
◆ m_vBookedHistograms
std::vector<HistData> PlotBase::m_vBookedHistograms |
|
protectedinherited |
◆ m_vBookedTrees
std::vector<TreeData> PlotBase::m_vBookedTrees |
|
protectedinherited |
◆ m_vSubNodes
std::vector<PlotBase*> PlotBase::m_vSubNodes |
|
protectedinherited |
◆ type
std::string RecoPhysPlots::type |
The documentation for this class was generated from the following files:
static std::string constructPrefix(std::string dir, bool prependDir)
std::string replace(std::string s, const std::string &s2, const std::string &s3)
std::vector< HistData > m_vBookedHistograms
TH1F * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
void SetResultsBin(int iBin, TH1 *pInputHist)
Scalar eta() const
pseudorapidity method
virtual void initializePlots()
std::vector< EfficiencyData > m_vBookedEfficiencies
TH2F * Book2D(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, bool prependDir=true)
Book a TH2D histogram.
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
void fill(const std::vector< std::pair< const xAOD::Muon *, const xAOD::Muon * > > &mumucandidates)
PlotBase(PlotBase *parent, const std::string &sDir)
bool LabelLargeEtaRegions(TAxis *axis)
std::vector< PlotBase * > m_vSubNodes
void SetBinContent(int, double)
def TProfile(*args, **kwargs)
bool LabelCombinedEtaRegions(TAxis *axis)
float EtaRegionFine(double eta)
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
float EtaRegionCoarse(double eta)
virtual void finalizePlots()
std::vector< TreeData > m_vBookedTrees