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 166 of file PrimaryVertexResolution.cc.

Constructor & Destructor Documentation

◆ DiffPlots()

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

Member Function Documentation

◆ book()

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

Definition at line 177 of file PrimaryVertexResolution.cc.

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().

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

◆ bookLogX()

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

Definition at line 171 of file PrimaryVertexResolution.cc.

References book(), and setLogX().

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

171  {
172  book(iBooker, binArray.size() - 1, binArray.front(), binArray.back());
173  setLogX(binArray.size() - 1, binArray.data());
174  }
void book(DQMStore::IBooker &iBooker, Args &&... args)

◆ fill()

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

Definition at line 232 of file PrimaryVertexResolution.cc.

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

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

232  {
233  hDiffX_->Fill(ref, res.resx());
234  hDiffY_->Fill(ref, res.resy());
235  hDiffZ_->Fill(ref, res.resz());
236  hPullX_->Fill(ref, res.pullx());
237  hPullY_->Fill(ref, res.pully());
238  hPullZ_->Fill(ref, res.pullz());
239  }
Definition: Electron.h:6
void Fill(long long x)

◆ setLogX()

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

Definition at line 221 of file PrimaryVertexResolution.cc.

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

Referenced by bookLogX().

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

Member Data Documentation

◆ binningY_

const BinningY& PrimaryVertexResolution::DiffPlots::binningY_
private

Definition at line 243 of file PrimaryVertexResolution.cc.

Referenced by book().

◆ hDiffX_

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

Definition at line 244 of file PrimaryVertexResolution.cc.

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

◆ hDiffY_

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

Definition at line 245 of file PrimaryVertexResolution.cc.

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

◆ hDiffZ_

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

Definition at line 246 of file PrimaryVertexResolution.cc.

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

◆ hPullX_

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

Definition at line 247 of file PrimaryVertexResolution.cc.

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

◆ hPullY_

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

Definition at line 248 of file PrimaryVertexResolution.cc.

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

◆ hPullZ_

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

Definition at line 249 of file PrimaryVertexResolution.cc.

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

◆ postfix_

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

Definition at line 242 of file PrimaryVertexResolution.cc.

Referenced by book().