ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::HgtdClusterValidationPlots Class Reference

#include <HgtdClusterValidationPlots.h>

Inheritance diagram for ActsTrk::HgtdClusterValidationPlots:
Collaboration diagram for ActsTrk::HgtdClusterValidationPlots:

Public Member Functions

 HgtdClusterValidationPlots (PlotBase *pParent, const std::string &sDir)
virtual ~HgtdClusterValidationPlots ()=default
void fill (const xAOD::HGTDCluster *cluster, const InDetDD::HGTD_DetectorElementCollection &hgtdElements, float beamSpotWeight, const HGTD_ID *)
void initialize ()
void finalize ()
void setDetailLevel (int iDetailLevel)
void RegisterSubPlot (PlotBase *pPlotBase)
std::vector< HistDataretrieveBookedHistograms ()
 Retrieve all booked histograms.
std::vector< TreeDataretrieveBookedTrees ()
 Retrieve all booked trees.
std::vector< EfficiencyDataretrieveBookedEfficiencies ()
 Retrieve all booked efficiency objects.
TTree * BookTree (std::string_view name, bool prependDir=true)
 Book a TTree.
const std::string & getDirectory ()
Methods to book monitoring histograms

Note: methods starting with capitals should be deprecated in favour of camel-cased methods

TH1D * Book1D (std::string_view name, std::string_view labels, int nBins, float start, float end, bool prependDir=true)
 Book a TH1D histogram.
TH1D * Book1D (std::string_view name, TH1 *refHist, std::string_view labels, bool prependDir=true)
 Book a TH1D histogram using refHist as reference for number of bins and axis range.
TH2F * Book2D (std::string_view name, std::string_view labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, bool prependDir=true)
 Book a TH2F histogram.
TH2F * Book2D (std::string_view name, TH2 *refHist, std::string_view labels, bool prependDir=true)
 Book a TH2D histogram using refHist as reference for number of bins and axis range.
TH2F * Book2D (std::string_view name, std::string_view labels, int nBinsX, Double_t *binsX, int nBinsY, Double_t startY, Double_t endY, bool prependDir=true)
 Book a TH2F histogram with variable x axis binning.
TH3F * Book3D (std::string_view name, std::string_view labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, int nBinsZ, float startZ, float endZ, bool prependDir=true)
 Book a TH3F histogram.
TH3F * Book3D (std::string_view name, TH3 *refHist, std::string_view labels, bool prependDir=true)
 Book a TH3F histogram using refHist as reference for number of bins and axis range.
TProfile * BookTProfile (std::string_view name, std::string_view labels, int nBinsX, float startX, float endX, float startY=-1, float endY=-1, bool prependDir=true, bool useRMS=false)
 Book a TProfile histogram.
TProfile * BookTProfile (std::string_view name, std::string_view labels, int nBinsX, float *binsX, bool prependDir=true)
 Book a TProfile histogram with variable binning in x-axis.
TProfile * BookTProfileRangeY (std::string_view name, std::string_view labels, int nBinsX, double *binsX, double startY, double endY, bool prependDir=true)
 Book a TProfile histogram with variable binning in x-axis and limits in y-values.
TProfile2D * BookTProfile2D (std::string_view name, std::string_view labels, const int nBinsX, const double xlo, const double xhi, const int nBinsY, const double ylo, const double yhi, bool prependDir=true, bool useRMS=false)
 Book a TProfile 2D histogram with variable binning in x-axis and limits in y-values.
TProfile2D * BookTProfile2D (std::string_view name, std::string_view labels, const int nBinsX, double *binsX, const int nBinsY, double *binsY, bool prependDir=true, bool useRMS=false)
 Book a TProfile 2D histogram with variable binning in x-axis and limits in y-values.
TEfficiency * BookTEfficiency (std::string_view name, std::string_view labels, const int nBinsX, const float xlo, const float xhi, const bool prependDir=true)
 Book a (1-D) TEfficiency histogram.
TEfficiency * BookTEfficiency (std::string_view name, std::string_view labels, const int nBinsX, const float xlo, const float xhi, const int nBinsy, const float ylo, const float yhi, const bool prependDir=true)
 Book a (2-D) TEfficiency histogram.

Protected Attributes

std::vector< PlotBase * > m_vSubNodes
std::vector< HistDatam_vBookedHistograms
std::vector< TreeDatam_vBookedTrees
std::vector< EfficiencyDatam_vBookedEfficiencies
std::string m_sDirectory
int m_iDetailLevel

Private Member Functions

virtual void initializePlots ()
virtual void finalizePlots ()

Static Private Member Functions

static std::string constructPrefix (std::string dir, bool prependDir)

Private Attributes

TH1 * m_barrelEndcap {}
TH1 * m_layer_right {}
TH1 * m_layer_left {}
TH1 * m_phi_module_right {}
TH1 * m_phi_module_left {}
TH1 * m_eta_module_right {}
TH1 * m_eta_module_left {}
TH1 * m_phi_index_right {}
TH1 * m_phi_index_left {}
TH1 * m_eta_index_right {}
TH1 * m_eta_index_left {}
TH1 * m_eta {}
TH1 * m_local_x_right {}
TH1 * m_local_y_right {}
TH1 * m_local_t_right {}
TH1 * m_localCovXX_right {}
TH1 * m_localCovYY_right {}
TH1 * m_localCovTT_right {}
TH2 * m_local_xy_right {}
TH2 * m_global_xy_right {}
TH2 * m_global_zr_right {}
TH1 * m_local_x_left {}
TH1 * m_local_y_left {}
TH1 * m_local_t_left {}
TH1 * m_localCovXX_left {}
TH1 * m_localCovYY_left {}
TH1 * m_localCovTT_left {}
TH1 * m_global_x_left {}
TH1 * m_global_y_left {}
TH1 * m_global_z_left {}
TH1 * m_global_r_left {}
TH1 * m_global_x_right {}
TH1 * m_global_y_right {}
TH1 * m_global_z_right {}
TH1 * m_global_r_right {}
TH2 * m_local_xy_left {}
TH2 * m_global_xy_left {}
TH2 * m_global_zr_left {}

Detailed Description

Definition at line 15 of file HgtdClusterValidationPlots.h.

Constructor & Destructor Documentation

◆ HgtdClusterValidationPlots()

ActsTrk::HgtdClusterValidationPlots::HgtdClusterValidationPlots ( PlotBase * pParent,
const std::string & sDir )

Definition at line 11 of file HgtdClusterValidationPlots.cxx.

13 : PlotBase(pParent, sDir)
14 {
15 m_barrelEndcap = Book1D("barrelEndcap", "HgtdCluster_barrelEndcap;Barrel-Endcap;Entries;", 5, -2, 3, false);
16
17 m_layer_right = Book1D("layer_right", "HgtdCluster_layer_right;Layer;Entries;", 20, -10, 11, false);
18 m_layer_left = Book1D("layer_left", "HgtdCluster_layer_left;Layer;Entries;", 20, -10, 11, false);
19
20 m_phi_module_right = Book1D("phi_module_right", "HgtdCluster_phi_module_right;Phi Module;Entries;", 100, 0, 300, false);
21 m_phi_module_left = Book1D("phi_module_left", "HgtdCluster_phi_module_left;Phi Module;Entries;", 100, 0, 300, false);
22
23 m_eta_module_right = Book1D("eta_module_right", "HgtdCluster_eta_module_right;Eta Module;Entries;", 100, -10, 10, false);
24 m_eta_module_left = Book1D("eta_module_left", "HgtdCluster_eta_module_left;Eta Module;Entries;", 100, -10, 10, false);
25
26 m_phi_index_right = Book1D("phi_index_right", "HgtdCluster_phi_index_right;Phi Index;Entries;", 100, -10, 10, false);
27 m_phi_index_left = Book1D("phi_index_left", "HgtdCluster_phi_index_left;Phi Index;Entries;", 100, -10, 10, false);
28
29 m_eta_index_right = Book1D("eta_index_right", "HgtdCluster_eta_index_right;Eta Index;Entries;", 100, -10, 10, false);
30 m_eta_index_left = Book1D("eta_index_left", "HgtdCluster_eta_index_left;Eta Index;Entries;", 100, -10, 10, false);
31
32 m_local_x_right = Book1D("local_x_right", "HgtdCluster_local_x_right;Local x [mm];Entries;", 100, -30, 30, false);
33 m_local_y_right = Book1D("local_y_right", "HgtdCluster_local_y_right;Local y [mm];Entries;", 100, -30, 30, false);
34 m_local_t_right = Book1D("local_t_right", "HgtdCluster_local_t_right;Local t [ns];Entries;", 30, 0, 50, false);
35
36 m_localCovXX_right = Book1D("localCovXX_right", "HgtdCluster_localCovXX_right;Local Cov XX [mm2];Entries;", 100, 0, 0.5, false);
37 m_localCovYY_right = Book1D("localCovYY_right", "HgtdCluster_localCovYY_right;Local Cov YY [mm2];Entries;", 100, 0, 0.5, false);
38 m_localCovTT_right = Book1D("localCovTT_right", "HgtdCluster_localCovTT_right;Local Cov TT [ns2];Entries;", 100, 0, 0.2, false);
39
40 m_local_xy_right = Book2D("local_xy_right", "HgtdCluster_local_xy_right;Local x [mm];Local y [mm];", 100, -30, 30, 100, -30, 30, false);
41
42 m_local_x_left = Book1D("local_x_left", "HgtdCluster_local_x_left;Local x [mm];Entries;", 100, -30, 30, false);
43 m_local_y_left = Book1D("local_y_left", "HgtdCluster_local_y_left;Local y [mm];Entries;", 100, -30, 30, false);
44 m_local_t_left = Book1D("local_t_left", "HgtdCluster_local_t_left;Local t [ns];Entries;", 30, 0, 50, false);
45
46 m_localCovXX_left = Book1D("localCovXX_left", "HgtdCluster_localCovXX_left;Local Cov XX [mm2];Entries;", 100, 0, 0.5, false);
47 m_localCovYY_left = Book1D("localCovYY_left", "HgtdCluster_localCovYY_left;Local Cov YY [mm2];Entries;", 100, 0, 0.5, false);
48 m_localCovTT_left = Book1D("localCovTT_left", "HgtdCluster_localCovTT_left;Local Cov TT [ns2];Entries;", 100, 0, 0.2, false);
49
50 m_eta = Book1D("eta", "HgtdCluster_eta;Eta;Entries;", 100, -5, 5, false);
51
52 m_global_x_left = Book1D("global_x_left", "HgtdCluster_global_x_left;Global x [mm];Entries;", 100, -1100, 1100, false);
53 m_global_x_right = Book1D("global_x_right", "HgtdCluster_global_x_right;Global x [mm];Entries;", 100, -1100, 1100, false);
54
55 m_global_y_left = Book1D("global_y_left", "HgtdCluster_global_y_left;Global y [mm];Entries;", 100, -1100, 1100, false);
56 m_global_y_right = Book1D("global_y_right", "HgtdCluster_global_y_right;Global y [mm];Entries;", 100, -1100, 1100, false);
57
58 m_global_z_left = Book1D("global_z_left", "HgtdCluster_global_z_left;Global z [mm];Entries;", 100, -4000, -3000, false);
59 m_global_z_right = Book1D("global_z_right", "HgtdCluster_global_z_right;Global z [mm];Entries;", 100, 3000, 4000, false);
60
61 m_global_r_left = Book1D("global_r_left", "HgtdCluster_global_r_left;Global r [mm];Entries;", 100, 0, 900, false);
62 m_global_r_right = Book1D("global_r_right", "HgtdCluster_global_r_right;Global r [mm];Entries;", 100, 0, 900, false);
63
64 m_local_xy_left = Book2D("local_xy_left", "HgtdCluster_local_xy_left;Local x [mm];Local y [mm];", 100, -30, 30, 100, -30, 30, false);
65
66 m_global_xy_left = Book2D("global_xy_left", "HgtdCluster_global_xy_left;Global x [mm];Global y [mm];", 100, -1100, 1100, 100, -1100, 1100, false);
67 m_global_xy_right = Book2D("global_xy_right", "HgtdCluster_global_xy_right;Global x [mm];global y [mm];", 100, -1100, 1100, 100, -1100, 1100, false);
68
69 m_global_zr_left = Book2D("global_zr_left", "HgtdCluster_global_zr_left;Global z [mm];Global r [mm];", 100, -4000, -3000, 100, 0, 900, false);
70 m_global_zr_right = Book2D("global_zr_right", "HgtdCluster_global_zr_right;Global z [mm];Global r [mm];", 100, 3000, 4000, 100, 0, 900, false);
71}
TH1D * Book1D(std::string_view name, std::string_view labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition PlotBase.cxx:94
PlotBase(PlotBase *parent, std::string_view sDir)
Definition PlotBase.cxx:29
TH2F * Book2D(std::string_view name, std::string_view labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, bool prependDir=true)
Book a TH2F histogram.
Definition PlotBase.cxx:123

◆ ~HgtdClusterValidationPlots()

virtual ActsTrk::HgtdClusterValidationPlots::~HgtdClusterValidationPlots ( )
virtualdefault

Member Function Documentation

◆ Book1D() [1/2]

TH1D * PlotBase::Book1D ( std::string_view name,
std::string_view labels,
int nBins,
float start,
float end,
bool prependDir = true )
inherited

Book a TH1D histogram.

Definition at line 94 of file PlotBase.cxx.

95 {
96 std::string prefix = constructPrefix(m_sDirectory, prependDir);
97 Bool_t oldstat = TH1::AddDirectoryStatus();
98 TH1::AddDirectory(false);
99 TH1D *hist = new TH1D(prefix.append(name).c_str(), labels.data(), nBins, start, end);
100 TH1::AddDirectory(oldstat);
101
102 hist->Sumw2();
103 m_vBookedHistograms.emplace_back(hist, m_sDirectory);
104 return hist;
105}
static std::string constructPrefix(std::string dir, bool prependDir)
Definition PlotBase.cxx:289
std::vector< HistData > m_vBookedHistograms
Definition PlotBase.h:98
std::string m_sDirectory
Definition PlotBase.h:101

◆ Book1D() [2/2]

TH1D * PlotBase::Book1D ( std::string_view name,
TH1 * refHist,
std::string_view labels,
bool prependDir = true )
inherited

Book a TH1D histogram using refHist as reference for number of bins and axis range.

Definition at line 108 of file PlotBase.cxx.

108 {
109 std::string prefix = constructPrefix(m_sDirectory, prependDir);
110 Bool_t oldstat = TH1::AddDirectoryStatus();
111 TH1::AddDirectory(false);
112 TH1D *hist = new TH1D(prefix.append(name).c_str(), labels.data(), refHist->GetNbinsX(),
113 refHist->GetXaxis()->GetXbins()->GetArray());
114 hist->Sumw2();
115 TH1::AddDirectory(oldstat);
116
117
118 m_vBookedHistograms.emplace_back(hist, m_sDirectory);
119 return hist;
120}

◆ Book2D() [1/3]

TH2F * PlotBase::Book2D ( std::string_view name,
std::string_view labels,
int nBinsX,
Double_t * binsX,
int nBinsY,
Double_t startY,
Double_t endY,
bool prependDir = true )
inherited

Book a TH2F histogram with variable x axis binning.

Definition at line 144 of file PlotBase.cxx.

145 {
146 std::string prefix = constructPrefix(m_sDirectory, prependDir);
147 Bool_t oldstat = TH2::AddDirectoryStatus();
148 TH2::AddDirectory(false);
149 TH2F *hist = new TH2F(prefix.append(name).c_str(), labels.data(), nBinsX, binsX, nBinsY, startY, endY);
150 hist->Sumw2();
151 TH2::AddDirectory(oldstat);
152 m_vBookedHistograms.emplace_back(hist, m_sDirectory);
153 return hist;
154}
TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)

◆ Book2D() [2/3]

TH2F * PlotBase::Book2D ( std::string_view name,
std::string_view labels,
int nBinsX,
float startX,
float endX,
int nBinsY,
float startY,
float endY,
bool prependDir = true )
inherited

Book a TH2F histogram.

Definition at line 123 of file PlotBase.cxx.

124 {
125 std::string prefix = constructPrefix(m_sDirectory, prependDir);
126 Bool_t oldstat = TH2::AddDirectoryStatus();
127 TH2::AddDirectory(false);
128 TH2F *hist = new TH2F(prefix.append(name).c_str(), labels.data(), nBinsX, startX, endX, nBinsY, startY, endY);
129 hist->Sumw2();
130 TH2::AddDirectory(oldstat);
131
132
133 m_vBookedHistograms.emplace_back(hist, m_sDirectory);
134 return hist;
135}

◆ Book2D() [3/3]

TH2F * PlotBase::Book2D ( std::string_view name,
TH2 * refHist,
std::string_view labels,
bool prependDir = true )
inherited

Book a TH2D histogram using refHist as reference for number of bins and axis range.

Definition at line 138 of file PlotBase.cxx.

138 {
139 return Book2D(name, labels, refHist->GetNbinsX(), refHist->GetXaxis()->GetXmin(), refHist->GetXaxis()->GetXmax(),
140 refHist->GetNbinsY(), refHist->GetYaxis()->GetXmin(), refHist->GetYaxis()->GetXmax(), prependDir);
141}

◆ Book3D() [1/2]

TH3F * PlotBase::Book3D ( std::string_view name,
std::string_view 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 TH3F histogram.

Definition at line 157 of file PlotBase.cxx.

158 {
159 std::string prefix = constructPrefix(m_sDirectory, prependDir);
160 Bool_t oldstat = TH3::AddDirectoryStatus();
161 TH3::AddDirectory(false);
162 TH3F *hist = new TH3F(prefix.append(name).c_str(),
163 labels.data(), nBinsX, startX, endX, nBinsY, startY, endY, nBinsZ, startZ, endZ);
164 hist->Sumw2();
165 TH3::AddDirectory(oldstat);
166 m_vBookedHistograms.emplace_back(hist, m_sDirectory);
167 return hist;
168}

◆ Book3D() [2/2]

TH3F * PlotBase::Book3D ( std::string_view name,
TH3 * refHist,
std::string_view labels,
bool prependDir = true )
inherited

Book a TH3F histogram using refHist as reference for number of bins and axis range.

Definition at line 171 of file PlotBase.cxx.

171 {
172 std::string prefix = constructPrefix(m_sDirectory, prependDir);
173 Bool_t oldstat = TH3::AddDirectoryStatus();
174 TH3::AddDirectory(false);
175 TH3F *hist = new TH3F(prefix.append(name).c_str(), labels.data(), refHist->GetNbinsX(),
176 refHist->GetXaxis()->GetXbins()->GetArray(), refHist->GetNbinsY(),
177 refHist->GetYaxis()->GetXbins()->GetArray(), refHist->GetNbinsZ(),
178 refHist->GetZaxis()->GetXbins()->GetArray());
179 TH3::AddDirectory(oldstat);
180
181 m_vBookedHistograms.emplace_back(hist, m_sDirectory);
182 return hist;
183}

◆ BookTEfficiency() [1/2]

TEfficiency * PlotBase::BookTEfficiency ( std::string_view name,
std::string_view labels,
const int nBinsX,
const float xlo,
const float xhi,
const bool prependDir = true )
inherited

Book a (1-D) TEfficiency histogram.

Definition at line 257 of file PlotBase.cxx.

257 {
258 std::string prefix = constructPrefix(m_sDirectory, prependDir);
259 TEfficiency *hist = new TEfficiency(prefix.append(name).c_str(), labels.data(), nBinsX, xlo, xhi);
260 hist->SetDirectory(nullptr);
261 m_vBookedEfficiencies.emplace_back(hist, m_sDirectory);
262 return hist;
263}
std::vector< EfficiencyData > m_vBookedEfficiencies
Definition PlotBase.h:100

◆ BookTEfficiency() [2/2]

TEfficiency * PlotBase::BookTEfficiency ( std::string_view name,
std::string_view 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 266 of file PlotBase.cxx.

266 {
267 std::string prefix = constructPrefix(m_sDirectory, prependDir);
268
269 TEfficiency *hist = new TEfficiency(prefix.append(name).c_str(), labels.data(), nBinsX, xlo, xhi, nBinsY, ylo, yhi);
270 hist->SetDirectory(nullptr);
271 m_vBookedEfficiencies.emplace_back(hist, m_sDirectory);
272
273 return hist;
274}

◆ BookTProfile() [1/2]

TProfile * PlotBase::BookTProfile ( std::string_view name,
std::string_view labels,
int nBinsX,
float * binsX,
bool prependDir = true )
inherited

Book a TProfile histogram with variable binning in x-axis.

Definition at line 204 of file PlotBase.cxx.

204 {
205 std::string prefix = constructPrefix(m_sDirectory, prependDir);
206 TProfile *hist(nullptr);
207 Bool_t oldstat = TProfile::AddDirectoryStatus();
208 TProfile::AddDirectory(false);
209
210 hist = new TProfile(prefix.append(name).c_str(), labels.data(), nBinsX, binsX);
211 TProfile::AddDirectory(oldstat);
212 m_vBookedHistograms.emplace_back(hist, m_sDirectory);
213 return hist;
214}

◆ BookTProfile() [2/2]

TProfile * PlotBase::BookTProfile ( std::string_view name,
std::string_view 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 186 of file PlotBase.cxx.

187 {
188 std::string prefix = constructPrefix(m_sDirectory, prependDir);
189 TProfile *hist(nullptr);
190 Bool_t oldstat = TProfile::AddDirectoryStatus();
191 TProfile::AddDirectory(false);
192 std::string opt = useRMS ? "S" : "";
193 if ((startY == -1) and (endY == -1)) {
194 hist = new TProfile(prefix.append(name).c_str(), labels.data(), nBinsX, startX, endX, opt.c_str());
195 } else {
196 hist = new TProfile(prefix.append(name).c_str(), labels.data(), nBinsX, startX, endX, startY, endY, opt.c_str());
197 }
198 TProfile::AddDirectory(oldstat);
199 m_vBookedHistograms.emplace_back(hist, m_sDirectory);
200 return hist;
201}

◆ BookTProfile2D() [1/2]

TProfile2D * PlotBase::BookTProfile2D ( std::string_view name,
std::string_view labels,
const int nBinsX,
const double xlo,
const double xhi,
const int nBinsY,
const double ylo,
const double yhi,
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 231 of file PlotBase.cxx.

233 {
234 std::string prefix = constructPrefix(m_sDirectory, prependDir);
235 Bool_t oldstat = TProfile2D::AddDirectoryStatus();
236 TProfile2D::AddDirectory(false);
237 std::string opt = useRMS ? "S" : "";
238 TProfile2D *hist = new TProfile2D(prefix.append(name).c_str(), labels.data(), nBinsX, xlo, xhi, nBinsY, ylo, yhi, opt.c_str());
239 TProfile2D::AddDirectory(oldstat);
240 m_vBookedHistograms.emplace_back(hist, m_sDirectory);
241 return hist;
242}

◆ BookTProfile2D() [2/2]

TProfile2D * PlotBase::BookTProfile2D ( std::string_view name,
std::string_view 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 245 of file PlotBase.cxx.

245 {
246 std::string prefix = constructPrefix(m_sDirectory, prependDir);
247 Bool_t oldstat = TProfile2D::AddDirectoryStatus();
248 TProfile2D::AddDirectory(false);
249 std::string opt = useRMS ? "S" : "";
250 TProfile2D *hist = new TProfile2D(prefix.append(name).c_str(), labels.data(), nBinsX, binsX, nBinsY, binsY, opt.c_str());
251 TProfile2D::AddDirectory(oldstat);
252 m_vBookedHistograms.emplace_back(hist, m_sDirectory);
253 return hist;
254}

◆ BookTProfileRangeY()

TProfile * PlotBase::BookTProfileRangeY ( std::string_view name,
std::string_view 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 217 of file PlotBase.cxx.

218 {
219 std::string prefix = constructPrefix(m_sDirectory, prependDir);
220 TProfile *hist(nullptr);
221 Bool_t oldstat = TProfile::AddDirectoryStatus();
222 TProfile::AddDirectory(false);
223
224 hist = new TProfile(prefix.append(name).c_str(), labels.data(), (Int_t) nBinsX, binsX, startY, endY);
225 TProfile::AddDirectory(oldstat);
226 m_vBookedHistograms.emplace_back(hist, m_sDirectory);
227 return hist;
228}

◆ BookTree()

TTree * PlotBase::BookTree ( std::string_view name,
bool prependDir = true )
inherited

Book a TTree.

Definition at line 277 of file PlotBase.cxx.

277 {
278 std::string prefix = constructPrefix(m_sDirectory, prependDir);
279 TTree *tree = new TTree(prefix.append(name).c_str(), "");
280
281 tree->SetAutoSave(0);
282 tree->SetAutoFlush(0);
283 tree->SetDirectory(nullptr);
284 m_vBookedTrees.emplace_back(tree, m_sDirectory);
285 return tree;
286}
std::vector< TreeData > m_vBookedTrees
Definition PlotBase.h:99
TChain * tree

◆ constructPrefix()

std::string PlotBase::constructPrefix ( std::string dir,
bool prependDir )
staticprivateinherited

Definition at line 289 of file PlotBase.cxx.

289 {
290 if (!prependDir) {
291 return "";
292 }
293 std::replace(dir.begin(), dir.end(), '/', '_');
294 return dir;
295}

◆ fill()

void ActsTrk::HgtdClusterValidationPlots::fill ( const xAOD::HGTDCluster * cluster,
const InDetDD::HGTD_DetectorElementCollection & hgtdElements,
float beamSpotWeight,
const HGTD_ID * hgtdID )

Definition at line 73 of file HgtdClusterValidationPlots.cxx.

77 {
78 const Identifier& id = hgtdID->wafer_id(cluster->identifierHash());
79 const auto *element = InDetDD::HGTDDetEl::getDetectorElement(hgtdID->wafer_hash(hgtdID->wafer_id(id)),hgtdElements);
80
81 const auto& local_position = cluster->template localPosition<3>();
82 const auto& local_covariance = cluster->template localCovariance<3>();
83
84 // compute global position
85 const Amg::Transform3D& T = element->surface().transform();
86 double Ax[3] = {T(0,0),T(1,0),T(2,0)};
87 double Ay[3] = {T(0,1),T(1,1),T(2,1)};
88 double R [3] = {T(0,3),T(1,3),T(2,3)};
89
91 M[0] = local_position(0,0);
92 M[1] = local_position(1,0);
93 Amg::Vector3D globalPos(M[0]*Ax[0]+M[1]*Ay[0]+R[0],M[0]*Ax[1]+M[1]*Ay[1]+R[1],M[0]*Ax[2]+M[1]*Ay[2]+R[2]);
94
95 m_barrelEndcap->Fill(hgtdID->endcap(id));
96 m_eta->Fill(globalPos.eta(), beamSpotWeight);
97
98 // Divide in left and right endcaps
99 if (hgtdID->endcap(id) == -2) {
100 m_layer_left->Fill(hgtdID->layer(id), beamSpotWeight);
101 m_phi_module_left->Fill(hgtdID->phi_module(id), beamSpotWeight);
102 m_eta_module_left->Fill(hgtdID->eta_module(id), beamSpotWeight);
103 m_phi_index_left->Fill(hgtdID->phi_index(id), beamSpotWeight);
104 m_eta_index_left->Fill(hgtdID->eta_index(id), beamSpotWeight);
105
106 m_local_x_left->Fill(local_position(0, 0), beamSpotWeight);
107 m_local_y_left->Fill(local_position(1, 0), beamSpotWeight);
108 m_local_t_left->Fill(xAOD::HGTDCluster::time(local_position), beamSpotWeight);
109
110 m_localCovXX_left->Fill(local_covariance(0, 0), beamSpotWeight);
111 m_localCovYY_left->Fill(local_covariance(1, 1), beamSpotWeight);
112 m_localCovTT_left->Fill(xAOD::HGTDCluster::timeCovariance(local_covariance), beamSpotWeight);
113
114 m_global_x_left->Fill(globalPos.x(), beamSpotWeight);
115 m_global_y_left->Fill(globalPos.y(), beamSpotWeight);
116 m_global_z_left->Fill(globalPos.z(), beamSpotWeight);
117 m_global_r_left->Fill(std::sqrt(globalPos.x()*globalPos.x() + (globalPos.y()*globalPos.y())), beamSpotWeight);
118
119 m_local_xy_left->Fill(local_position(0, 0), local_position(1, 0), beamSpotWeight);
120 m_global_xy_left->Fill(globalPos.x(), globalPos.y(), beamSpotWeight);
121 m_global_zr_left->Fill(globalPos.z(), std::sqrt(globalPos.x()*globalPos.x() + (globalPos.y()*globalPos.y())), beamSpotWeight);
122 } else if (hgtdID->endcap(id) == 2) {
123 m_layer_right->Fill(hgtdID->layer(id), beamSpotWeight);
124 m_phi_module_right->Fill(hgtdID->phi_module(id), beamSpotWeight);
125 m_eta_module_right->Fill(hgtdID->eta_module(id), beamSpotWeight);
126 m_phi_index_right->Fill(hgtdID->phi_index(id), beamSpotWeight);
127 m_eta_index_right->Fill(hgtdID->eta_index(id), beamSpotWeight);
128
129 m_local_x_right->Fill(local_position(0, 0), beamSpotWeight);
130 m_local_y_right->Fill(local_position(1, 0), beamSpotWeight);
131 m_local_t_right->Fill(xAOD::HGTDCluster::time(local_position), beamSpotWeight);
132
133 m_localCovXX_right->Fill(local_covariance(0, 0), beamSpotWeight);
134 m_localCovYY_right->Fill(local_covariance(1, 1), beamSpotWeight);
135 m_localCovTT_right->Fill(xAOD::HGTDCluster::timeCovariance(local_covariance), beamSpotWeight);
136
137 m_global_x_right->Fill(globalPos.x(), beamSpotWeight);
138 m_global_y_right->Fill(globalPos.y(), beamSpotWeight);
139 m_global_z_right->Fill(globalPos.z(), beamSpotWeight);
140 m_global_r_right->Fill(std::sqrt(globalPos.x()*globalPos.x() + (globalPos.y()*globalPos.y())), beamSpotWeight);
141
142 m_local_xy_right->Fill(local_position(0, 0), local_position(1, 0), beamSpotWeight);
143 m_global_xy_right->Fill(globalPos.x(), globalPos.y(), beamSpotWeight);
144 m_global_zr_right->Fill(globalPos.z(), std::sqrt(globalPos.x()*globalPos.x() + (globalPos.y()*globalPos.y())), beamSpotWeight);
145 }
146
147 }
int eta_module(const Identifier &id) const
Definition HGTD_ID.h:491
int eta_index(const Identifier &id) const
Definition HGTD_ID.h:505
Identifier wafer_id(int endcap, int layer, int phi_module, int eta_module) const
For a single crystal.
Definition HGTD_ID.h:289
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Definition HGTD_ID.h:406
int phi_index(const Identifier &id) const
Definition HGTD_ID.h:498
int layer(const Identifier &id) const
Definition HGTD_ID.h:477
int endcap(const Identifier &id) const
Values of different levels (failure returns 0).
Definition HGTD_ID.h:470
int phi_module(const Identifier &id) const
Definition HGTD_ID.h:484
float timeCovariance() const
Return the covariance of the measured time in ns squared.
float time() const
Return the measured time in ns.
DetectorIDHashType identifierHash() const
Returns the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash).
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
const HGTD_DetectorElement * getDetectorElement(const IdentifierHash &hash, const HGTD_DetectorElementCollection &coll)
unsigned long long T

◆ finalize()

void PlotBase::finalize ( )
inherited

Definition at line 47 of file PlotBase.cxx.

47 {
48 for (auto *subNode: m_vSubNodes) {
49 subNode->finalize();
50 }
52}
std::vector< PlotBase * > m_vSubNodes
Definition PlotBase.h:97
virtual void finalizePlots()
Definition PlotBase.h:93

◆ finalizePlots()

◆ getDirectory()

const std::string & PlotBase::getDirectory ( )
inlineinherited

Definition at line 89 of file PlotBase.h.

89{return m_sDirectory;}

◆ initialize()

void PlotBase::initialize ( )
inherited

Definition at line 39 of file PlotBase.cxx.

39 {
40 for (auto *subNode: m_vSubNodes) {
41 subNode->initialize();
42 }
44}
virtual void initializePlots()
Definition PlotBase.h:92

◆ initializePlots()

virtual void PlotBase::initializePlots ( )
inlineprivatevirtualinherited

Reimplemented in DiTau::CorePlots, DiTau::ResolutionPlots, Egamma::ClusMomentumPlots, Egamma::ElectronFrwdPlots, Egamma::ElectronPlots, Egamma::IsolationPlots, Egamma::KinematicsPlots, Egamma::LRTElectronPlots, Egamma::PhotonAmbPlots, Egamma::PhotonCnvPlots, Egamma::PhotonConversionPlots, Egamma::PhotonPlots, Egamma::ShowerShapesPlots, Egamma::TrackPlots, ElectronValidationPlots, IDTPM::DuplicateRatePlots, IDTPM::EfficiencyPlots, IDTPM::FakeRatePlots, IDTPM::HitsOnTracksPlots, IDTPM::NtracksPlots, IDTPM::OfflineElectronPlots, IDTPM::ResolutionPlots, IDTPM::SummaryPlots, IDTPM::TrackParametersPlots, IDTPM::VertexParametersPlots, InDetBasicPlot, InDetPerfNtuple, InDetPerfPlot_Duplicate, InDetPerfPlot_Efficiency, InDetPerfPlot_FakeRate, InDetPerfPlot_HitEfficiency, InDetPerfPlot_HitResidual, InDetPerfPlot_Hits, InDetPerfPlot_nTracks, InDetPerfPlot_Resolution, InDetPerfPlot_TrackParameters, InDetPerfPlot_TrkInJet, InDetPerfPlot_TRTExtension, InDetPerfPlot_Vertex, InDetPerfPlot_VertexTruthMatching, InDetPerfPlot_VerticesVsMu, JetTagDQA::BTaggingValidationPlots, LRTElectronValidationPlots, Muon::BetaPlots, Muon::ChargeDepParamPlots, Muon::HitFracTypePlots, Muon::IsoCorrPlots, Muon::IsoPlots, Muon::MomentumPullPlots, Muon::MomentumTruthPullPlots, Muon::MuonParamElossPlots, Muon::MuonParamPlots, Muon::MuonTree, Muon::RecoInfoPlots, Muon::SlowMuonParamPlots, PFO::ClusterMomentPlots, PFO::ClusterPlots, PFO::FlowElement_LinkerPlots, PFO::LeptonFELinkerPlots, PFO::PFOAlgPropertyPlots, PFO::PFOAttributePlots, PFO::PFOCalibHitClusterMomentPlots, PFO::PFOClusterMomentPlots, PFO::PFOPlots, PFO::PFOPVMatchedPlots, PhotonValidationPlots, PhysVal::BTagPlots, PhysVal::EventInfoPlots, PhysVal::KinematicsPlots, PhysVal::METPlots, PhysVal::TrkAndVtxPlots, RecoLumiPlots, RecoMuonIDTrackPlots, RecoMuonPlots, RecoMuonSegmentPlots, RecoMuonTrackPlots, RecoPhysPlots, RecoVertexPlots, Tau::CorePlots, Tau::DecayModeMigration, Tau::EfficiencyPlots, Tau::EventPlots, Tau::EVetoPlots, Tau::GeneralTauPlots, Tau::ResolutionPlots, Tau::TauIDVariablesPlots, Tau::TauKinematicPlots, Tau::TauParticleFlowPlots, TCCPlots, Trk::DefParamPullPlots, Trk::EfficiencyPlots, Trk::ExtrLayerPlots, Trk::ExtrRegionPlots, Trk::HitResidualPlots, Trk::HitTypePlots, Trk::IDHitPlots, Trk::ImpactPlots, Trk::ParamPlots, Trk::RecoInfoPlots, Trk::ResolutionPlots, Trk::TruthInfoPlots, ZeeValidation::FWDZeePlots, ZeeValidation::ReconElectronsPlots, ZeeValidation::TrueElectronsPlots, ZeeValidation::TrueFwdElectronsPlots, and ZeeValidation::ZeePlots.

Definition at line 92 of file PlotBase.h.

92{;}

◆ RegisterSubPlot()

void PlotBase::RegisterSubPlot ( PlotBase * pPlotBase)
inlineinherited

Definition at line 42 of file PlotBase.h.

42{m_vSubNodes.push_back(pPlotBase);}

◆ retrieveBookedEfficiencies()

std::vector< EfficiencyData > PlotBase::retrieveBookedEfficiencies ( )
inherited

Retrieve all booked efficiency objects.

Definition at line 83 of file PlotBase.cxx.

83 {
84 std::vector<EfficiencyData> vBookedEfficiencies = m_vBookedEfficiencies;
85 for (const auto &subNode: m_vSubNodes) {
86 std::vector<EfficiencyData> subNodeHists = subNode->retrieveBookedEfficiencies();
87 vBookedEfficiencies.insert(vBookedEfficiencies.end(), subNodeHists.begin(), subNodeHists.end());
88 }
89 return vBookedEfficiencies;
90}

◆ retrieveBookedHistograms()

std::vector< HistData > PlotBase::retrieveBookedHistograms ( )
inherited

Retrieve all booked histograms.

Definition at line 63 of file PlotBase.cxx.

63 {
64 std::vector<HistData> vBookedHistograms = m_vBookedHistograms;
65 for (const auto &subNode: m_vSubNodes) {
66 std::vector<HistData> subNodeHists = subNode->retrieveBookedHistograms();
67 vBookedHistograms.insert(vBookedHistograms.end(), subNodeHists.begin(), subNodeHists.end());
68 }
69 return vBookedHistograms;
70}

◆ retrieveBookedTrees()

std::vector< TreeData > PlotBase::retrieveBookedTrees ( )
inherited

Retrieve all booked trees.

Definition at line 73 of file PlotBase.cxx.

73 {
74 std::vector<TreeData> vBookedTrees = m_vBookedTrees;
75 for (auto *subNode: m_vSubNodes) {
76 std::vector<TreeData> subNodeTrees = subNode->retrieveBookedTrees();
77 vBookedTrees.insert(vBookedTrees.end(), subNodeTrees.begin(), subNodeTrees.end());
78 }
79 return vBookedTrees;
80}

◆ setDetailLevel()

void PlotBase::setDetailLevel ( int iDetailLevel)
inherited

Definition at line 55 of file PlotBase.cxx.

55 {
56 for (auto *subNode: m_vSubNodes) {
57 subNode->setDetailLevel(iDetailLevel);
58 }
59 m_iDetailLevel = iDetailLevel;
60}
int m_iDetailLevel
Definition PlotBase.h:102

Member Data Documentation

◆ m_barrelEndcap

TH1* ActsTrk::HgtdClusterValidationPlots::m_barrelEndcap {}
private

Definition at line 27 of file HgtdClusterValidationPlots.h.

27{};

◆ m_eta

TH1* ActsTrk::HgtdClusterValidationPlots::m_eta {}
private

Definition at line 44 of file HgtdClusterValidationPlots.h.

44{};

◆ m_eta_index_left

TH1* ActsTrk::HgtdClusterValidationPlots::m_eta_index_left {}
private

Definition at line 42 of file HgtdClusterValidationPlots.h.

42{};

◆ m_eta_index_right

TH1* ActsTrk::HgtdClusterValidationPlots::m_eta_index_right {}
private

Definition at line 41 of file HgtdClusterValidationPlots.h.

41{};

◆ m_eta_module_left

TH1* ActsTrk::HgtdClusterValidationPlots::m_eta_module_left {}
private

Definition at line 36 of file HgtdClusterValidationPlots.h.

36{};

◆ m_eta_module_right

TH1* ActsTrk::HgtdClusterValidationPlots::m_eta_module_right {}
private

Definition at line 35 of file HgtdClusterValidationPlots.h.

35{};

◆ m_global_r_left

TH1* ActsTrk::HgtdClusterValidationPlots::m_global_r_left {}
private

Definition at line 69 of file HgtdClusterValidationPlots.h.

69{};

◆ m_global_r_right

TH1* ActsTrk::HgtdClusterValidationPlots::m_global_r_right {}
private

Definition at line 74 of file HgtdClusterValidationPlots.h.

74{};

◆ m_global_x_left

TH1* ActsTrk::HgtdClusterValidationPlots::m_global_x_left {}
private

Definition at line 66 of file HgtdClusterValidationPlots.h.

66{};

◆ m_global_x_right

TH1* ActsTrk::HgtdClusterValidationPlots::m_global_x_right {}
private

Definition at line 71 of file HgtdClusterValidationPlots.h.

71{};

◆ m_global_xy_left

TH2* ActsTrk::HgtdClusterValidationPlots::m_global_xy_left {}
private

Definition at line 77 of file HgtdClusterValidationPlots.h.

77{};

◆ m_global_xy_right

TH2* ActsTrk::HgtdClusterValidationPlots::m_global_xy_right {}
private

Definition at line 55 of file HgtdClusterValidationPlots.h.

55{};

◆ m_global_y_left

TH1* ActsTrk::HgtdClusterValidationPlots::m_global_y_left {}
private

Definition at line 67 of file HgtdClusterValidationPlots.h.

67{};

◆ m_global_y_right

TH1* ActsTrk::HgtdClusterValidationPlots::m_global_y_right {}
private

Definition at line 72 of file HgtdClusterValidationPlots.h.

72{};

◆ m_global_z_left

TH1* ActsTrk::HgtdClusterValidationPlots::m_global_z_left {}
private

Definition at line 68 of file HgtdClusterValidationPlots.h.

68{};

◆ m_global_z_right

TH1* ActsTrk::HgtdClusterValidationPlots::m_global_z_right {}
private

Definition at line 73 of file HgtdClusterValidationPlots.h.

73{};

◆ m_global_zr_left

TH2* ActsTrk::HgtdClusterValidationPlots::m_global_zr_left {}
private

Definition at line 78 of file HgtdClusterValidationPlots.h.

78{};

◆ m_global_zr_right

TH2* ActsTrk::HgtdClusterValidationPlots::m_global_zr_right {}
private

Definition at line 56 of file HgtdClusterValidationPlots.h.

56{};

◆ m_iDetailLevel

int PlotBase::m_iDetailLevel
protectedinherited

Definition at line 102 of file PlotBase.h.

◆ m_layer_left

TH1* ActsTrk::HgtdClusterValidationPlots::m_layer_left {}
private

Definition at line 30 of file HgtdClusterValidationPlots.h.

30{};

◆ m_layer_right

TH1* ActsTrk::HgtdClusterValidationPlots::m_layer_right {}
private

Definition at line 29 of file HgtdClusterValidationPlots.h.

29{};

◆ m_local_t_left

TH1* ActsTrk::HgtdClusterValidationPlots::m_local_t_left {}
private

Definition at line 60 of file HgtdClusterValidationPlots.h.

60{};

◆ m_local_t_right

TH1* ActsTrk::HgtdClusterValidationPlots::m_local_t_right {}
private

Definition at line 48 of file HgtdClusterValidationPlots.h.

48{};

◆ m_local_x_left

TH1* ActsTrk::HgtdClusterValidationPlots::m_local_x_left {}
private

Definition at line 58 of file HgtdClusterValidationPlots.h.

58{};

◆ m_local_x_right

TH1* ActsTrk::HgtdClusterValidationPlots::m_local_x_right {}
private

Definition at line 46 of file HgtdClusterValidationPlots.h.

46{};

◆ m_local_xy_left

TH2* ActsTrk::HgtdClusterValidationPlots::m_local_xy_left {}
private

Definition at line 76 of file HgtdClusterValidationPlots.h.

76{};

◆ m_local_xy_right

TH2* ActsTrk::HgtdClusterValidationPlots::m_local_xy_right {}
private

Definition at line 54 of file HgtdClusterValidationPlots.h.

54{};

◆ m_local_y_left

TH1* ActsTrk::HgtdClusterValidationPlots::m_local_y_left {}
private

Definition at line 59 of file HgtdClusterValidationPlots.h.

59{};

◆ m_local_y_right

TH1* ActsTrk::HgtdClusterValidationPlots::m_local_y_right {}
private

Definition at line 47 of file HgtdClusterValidationPlots.h.

47{};

◆ m_localCovTT_left

TH1* ActsTrk::HgtdClusterValidationPlots::m_localCovTT_left {}
private

Definition at line 64 of file HgtdClusterValidationPlots.h.

64{};

◆ m_localCovTT_right

TH1* ActsTrk::HgtdClusterValidationPlots::m_localCovTT_right {}
private

Definition at line 52 of file HgtdClusterValidationPlots.h.

52{};

◆ m_localCovXX_left

TH1* ActsTrk::HgtdClusterValidationPlots::m_localCovXX_left {}
private

Definition at line 62 of file HgtdClusterValidationPlots.h.

62{};

◆ m_localCovXX_right

TH1* ActsTrk::HgtdClusterValidationPlots::m_localCovXX_right {}
private

Definition at line 50 of file HgtdClusterValidationPlots.h.

50{};

◆ m_localCovYY_left

TH1* ActsTrk::HgtdClusterValidationPlots::m_localCovYY_left {}
private

Definition at line 63 of file HgtdClusterValidationPlots.h.

63{};

◆ m_localCovYY_right

TH1* ActsTrk::HgtdClusterValidationPlots::m_localCovYY_right {}
private

Definition at line 51 of file HgtdClusterValidationPlots.h.

51{};

◆ m_phi_index_left

TH1* ActsTrk::HgtdClusterValidationPlots::m_phi_index_left {}
private

Definition at line 39 of file HgtdClusterValidationPlots.h.

39{};

◆ m_phi_index_right

TH1* ActsTrk::HgtdClusterValidationPlots::m_phi_index_right {}
private

Definition at line 38 of file HgtdClusterValidationPlots.h.

38{};

◆ m_phi_module_left

TH1* ActsTrk::HgtdClusterValidationPlots::m_phi_module_left {}
private

Definition at line 33 of file HgtdClusterValidationPlots.h.

33{};

◆ m_phi_module_right

TH1* ActsTrk::HgtdClusterValidationPlots::m_phi_module_right {}
private

Definition at line 32 of file HgtdClusterValidationPlots.h.

32{};

◆ m_sDirectory

std::string PlotBase::m_sDirectory
protectedinherited

Definition at line 101 of file PlotBase.h.

◆ m_vBookedEfficiencies

std::vector<EfficiencyData> PlotBase::m_vBookedEfficiencies
protectedinherited

Definition at line 100 of file PlotBase.h.

◆ m_vBookedHistograms

std::vector<HistData> PlotBase::m_vBookedHistograms
protectedinherited

Definition at line 98 of file PlotBase.h.

◆ m_vBookedTrees

std::vector<TreeData> PlotBase::m_vBookedTrees
protectedinherited

Definition at line 99 of file PlotBase.h.

◆ m_vSubNodes

std::vector<PlotBase*> PlotBase::m_vSubNodes
protectedinherited

Definition at line 97 of file PlotBase.h.


The documentation for this class was generated from the following files: