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

Definition at line 168 of file PrimaryVertexResolution.cc.

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

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.

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  }

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

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

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

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  }

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

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  }

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

writedatasetfile.args
args
Definition: writedatasetfile.py:18
PrimaryVertexResolution::BinningY::maxPull_
const double maxPull_
Definition: PrimaryVertexResolution.cc:81
PrimaryVertexResolution::DiffPlots::hDiffX_
MonitorElement * hDiffX_
Definition: PrimaryVertexResolution.cc:244
PrimaryVertexResolution::DiffPlots::setLogX
void setLogX(Args &&... args)
Definition: PrimaryVertexResolution.cc:221
PrimaryVertexResolution::DiffPlots::postfix_
std::string postfix_
Definition: PrimaryVertexResolution.cc:242
PrimaryVertexResolution::DiffPlots::hPullZ_
MonitorElement * hPullZ_
Definition: PrimaryVertexResolution.cc:249
PrimaryVertexResolution::BinningY::binsPull_
const int binsPull_
Definition: PrimaryVertexResolution.cc:82
dqm::impl::MonitorElement::getTH2F
virtual TH2F * getTH2F()
Definition: MonitorElement.cc:1004
PrimaryVertexResolution::BinningY::binsResol_
const int binsResol_
Definition: PrimaryVertexResolution.cc:80
PrimaryVertexResolution::DiffPlots::hPullX_
MonitorElement * hPullX_
Definition: PrimaryVertexResolution.cc:247
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
PrimaryVertexResolution::DiffPlots::hDiffY_
MonitorElement * hDiffY_
Definition: PrimaryVertexResolution.cc:245
PrimaryVertexResolution::DiffPlots::hDiffZ_
MonitorElement * hDiffZ_
Definition: PrimaryVertexResolution.cc:246
PrimaryVertexResolution::DiffPlots::binningY_
const BinningY & binningY_
Definition: PrimaryVertexResolution.cc:243
res
Definition: Electron.h:6
PrimaryVertexResolution::DiffPlots::book
void book(DQMStore::IBooker &iBooker, Args &&... args)
Definition: PrimaryVertexResolution.cc:177
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:248
PrimaryVertexResolution::BinningY::maxResol_
const double maxResol_
Definition: PrimaryVertexResolution.cc:79