CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PrimaryVertexResolution::DiffPlots Class Reference

Public Member Functions

template<typename... Args>
void book (DQMStore::IBooker &iBooker, Args &&... args)
 
template<typename T >
void bookLogX (DQMStore::IBooker &iBooker, const T &binArray)
 
 DiffPlots (const std::string &postfix, const BinningY &binY)
 
template<typename T >
void fill (const Resolution &res, const T ref)
 
template<typename... Args>
void setLogX (Args &&... args)
 

Private Attributes

const BinningYbinningY_
 
MonitorElementhDiffX_ = nullptr
 
MonitorElementhDiffY_ = nullptr
 
MonitorElementhDiffZ_ = nullptr
 
MonitorElementhPullX_ = nullptr
 
MonitorElementhPullY_ = nullptr
 
MonitorElementhPullZ_ = nullptr
 
std::string postfix_
 

Detailed Description

Definition at line 167 of file PrimaryVertexResolution.cc.

Constructor & Destructor Documentation

◆ DiffPlots()

PrimaryVertexResolution::DiffPlots::DiffPlots ( const std::string &  postfix,
const BinningY binY 
)
inlineexplicit

Definition at line 169 of file PrimaryVertexResolution.cc.

169 : postfix_(postfix), binningY_(binY) {}

Member Function Documentation

◆ book()

template<typename... Args>
void PrimaryVertexResolution::DiffPlots::book ( DQMStore::IBooker iBooker,
Args &&...  args 
)
inline

Definition at line 178 of file PrimaryVertexResolution.cc.

178  {
179  const auto binsResol = binningY_.binsResol_;
180  const auto maxResol = binningY_.maxResol_;
181  hDiffX_ = iBooker.book2D("res_x_vs_" + postfix_,
182  "Resolution of X vs. " + postfix_,
183  std::forward<Args>(args)...,
184  binsResol,
185  -maxResol,
186  maxResol);
187  hDiffY_ = iBooker.book2D("res_y_vs_" + postfix_,
188  "Resolution of Y vs. " + postfix_,
189  std::forward<Args>(args)...,
190  binsResol,
191  -maxResol,
192  maxResol);
193  hDiffZ_ = iBooker.book2D("res_z_vs_" + postfix_,
194  "Resolution of Z vs. " + postfix_,
195  std::forward<Args>(args)...,
196  binsResol,
197  -maxResol,
198  maxResol);
199 
200  const auto binsPull = binningY_.binsPull_;
201  const auto maxPull = binningY_.maxPull_;
202  hPullX_ = iBooker.book2D("pull_x_vs_" + postfix_,
203  "Pull of X vs. " + postfix_,
204  std::forward<Args>(args)...,
205  binsPull,
206  -maxPull,
207  maxPull);
208  hPullY_ = iBooker.book2D("pull_y_vs_" + postfix_,
209  "Pull of Y vs. " + postfix_,
210  std::forward<Args>(args)...,
211  binsPull,
212  -maxPull,
213  maxPull);
214  hPullZ_ = iBooker.book2D("pull_z_vs_" + postfix_,
215  "Pull of Z vs. " + postfix_,
216  std::forward<Args>(args)...,
217  binsPull,
218  -maxPull,
219  maxPull);
220  }

References writedatasetfile::args, binningY_, PrimaryVertexResolution::BinningY::binsPull_, PrimaryVertexResolution::BinningY::binsResol_, dqm::implementation::IBooker::book2D(), hDiffX_, hDiffY_, hDiffZ_, hPullX_, hPullY_, hPullZ_, PrimaryVertexResolution::BinningY::maxPull_, PrimaryVertexResolution::BinningY::maxResol_, and postfix_.

Referenced by PrimaryVertexResolution::Plots::book(), and bookLogX().

◆ bookLogX()

template<typename T >
void PrimaryVertexResolution::DiffPlots::bookLogX ( DQMStore::IBooker iBooker,
const T binArray 
)
inline

Definition at line 172 of file PrimaryVertexResolution.cc.

172  {
173  book(iBooker, binArray.size() - 1, binArray.front(), binArray.back());
174  setLogX(binArray.size() - 1, binArray.data());
175  }

References book(), and setLogX().

Referenced by PrimaryVertexResolution::Plots::book().

◆ fill()

template<typename T >
void PrimaryVertexResolution::DiffPlots::fill ( const Resolution res,
const T  ref 
)
inline

Definition at line 233 of file PrimaryVertexResolution.cc.

233  {
234  hDiffX_->Fill(ref, res.resx());
235  hDiffY_->Fill(ref, res.resy());
236  hDiffZ_->Fill(ref, res.resz());
237  hPullX_->Fill(ref, res.pullx());
238  hPullY_->Fill(ref, res.pully());
239  hPullZ_->Fill(ref, res.pullz());
240  }

References dqm::impl::MonitorElement::Fill(), hDiffX_, hDiffY_, hDiffZ_, hPullX_, hPullY_, and hPullZ_.

Referenced by PrimaryVertexResolution::Plots::calculateAndFillResolution().

◆ setLogX()

template<typename... Args>
void PrimaryVertexResolution::DiffPlots::setLogX ( Args &&...  args)
inline

Definition at line 222 of file PrimaryVertexResolution.cc.

222  {
223  hDiffX_->getTH2F()->GetXaxis()->Set(std::forward<Args>(args)...);
224  hDiffY_->getTH2F()->GetXaxis()->Set(std::forward<Args>(args)...);
225  hDiffZ_->getTH2F()->GetXaxis()->Set(std::forward<Args>(args)...);
226 
227  hPullX_->getTH2F()->GetXaxis()->Set(std::forward<Args>(args)...);
228  hPullY_->getTH2F()->GetXaxis()->Set(std::forward<Args>(args)...);
229  hPullZ_->getTH2F()->GetXaxis()->Set(std::forward<Args>(args)...);
230  }

References writedatasetfile::args, dqm::impl::MonitorElement::getTH2F(), hDiffX_, hDiffY_, hDiffZ_, hPullX_, hPullY_, and hPullZ_.

Referenced by bookLogX().

Member Data Documentation

◆ binningY_

const BinningY& PrimaryVertexResolution::DiffPlots::binningY_
private

Definition at line 244 of file PrimaryVertexResolution.cc.

Referenced by book().

◆ hDiffX_

MonitorElement* PrimaryVertexResolution::DiffPlots::hDiffX_ = nullptr
private

Definition at line 245 of file PrimaryVertexResolution.cc.

Referenced by book(), fill(), and setLogX().

◆ hDiffY_

MonitorElement* PrimaryVertexResolution::DiffPlots::hDiffY_ = nullptr
private

Definition at line 246 of file PrimaryVertexResolution.cc.

Referenced by book(), fill(), and setLogX().

◆ hDiffZ_

MonitorElement* PrimaryVertexResolution::DiffPlots::hDiffZ_ = nullptr
private

Definition at line 247 of file PrimaryVertexResolution.cc.

Referenced by book(), fill(), and setLogX().

◆ hPullX_

MonitorElement* PrimaryVertexResolution::DiffPlots::hPullX_ = nullptr
private

Definition at line 248 of file PrimaryVertexResolution.cc.

Referenced by book(), fill(), and setLogX().

◆ hPullY_

MonitorElement* PrimaryVertexResolution::DiffPlots::hPullY_ = nullptr
private

Definition at line 249 of file PrimaryVertexResolution.cc.

Referenced by book(), fill(), and setLogX().

◆ hPullZ_

MonitorElement* PrimaryVertexResolution::DiffPlots::hPullZ_ = nullptr
private

Definition at line 250 of file PrimaryVertexResolution.cc.

Referenced by book(), fill(), and setLogX().

◆ postfix_

std::string PrimaryVertexResolution::DiffPlots::postfix_
private

Definition at line 243 of file PrimaryVertexResolution.cc.

Referenced by book().

writedatasetfile.args
args
Definition: writedatasetfile.py:18
PrimaryVertexResolution::BinningY::maxPull_
const double maxPull_
Definition: PrimaryVertexResolution.cc:82
PrimaryVertexResolution::DiffPlots::hDiffX_
MonitorElement * hDiffX_
Definition: PrimaryVertexResolution.cc:245
PrimaryVertexResolution::DiffPlots::setLogX
void setLogX(Args &&... args)
Definition: PrimaryVertexResolution.cc:222
PrimaryVertexResolution::DiffPlots::postfix_
std::string postfix_
Definition: PrimaryVertexResolution.cc:243
PrimaryVertexResolution::DiffPlots::hPullZ_
MonitorElement * hPullZ_
Definition: PrimaryVertexResolution.cc:250
PrimaryVertexResolution::BinningY::binsPull_
const int binsPull_
Definition: PrimaryVertexResolution.cc:83
dqm::impl::MonitorElement::getTH2F
virtual TH2F * getTH2F()
Definition: MonitorElement.cc:1004
PrimaryVertexResolution::BinningY::binsResol_
const int binsResol_
Definition: PrimaryVertexResolution.cc:81
PrimaryVertexResolution::DiffPlots::hPullX_
MonitorElement * hPullX_
Definition: PrimaryVertexResolution.cc:248
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
PrimaryVertexResolution::DiffPlots::hDiffY_
MonitorElement * hDiffY_
Definition: PrimaryVertexResolution.cc:246
PrimaryVertexResolution::DiffPlots::hDiffZ_
MonitorElement * hDiffZ_
Definition: PrimaryVertexResolution.cc:247
PrimaryVertexResolution::DiffPlots::binningY_
const BinningY & binningY_
Definition: PrimaryVertexResolution.cc:244
res
Definition: Electron.h:6
PrimaryVertexResolution::DiffPlots::book
void book(DQMStore::IBooker &iBooker, Args &&... args)
Definition: PrimaryVertexResolution.cc:178
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
PrimaryVertexResolution::DiffPlots::hPullY_
MonitorElement * hPullY_
Definition: PrimaryVertexResolution.cc:249
PrimaryVertexResolution::BinningY::maxResol_
const double maxResol_
Definition: PrimaryVertexResolution.cc:80