CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D Class Reference

Public Member Functions

void fill_dxdz (char charge, double abscissa, double slopex, double chi2, int dof)
 
void fill_dydz (char charge, double abscissa, double slopey, double chi2, int dof)
 
void fill_x (char charge, double abscissa, double residx, double chi2, int dof)
 
void fill_x_1d (double residx, double chi2, int dof)
 
void fill_y (char charge, double abscissa, double residy, double chi2, int dof)
 
 MuonSystemMapPlot1D (std::string name, AlignmentMonitorMuonSystemMap1D *module, int bins, double low, double high, bool xy, bool add_1d)
 

Private Attributes

bool m_1d
 
int m_bins
 
TH2F * m_dxdz_2d
 
TH2F * m_dydz_2d
 
std::string m_name
 
TH1F * m_x_1d
 
TH2F * m_x_2d
 
bool m_xy
 
TH2F * m_y_2d
 

Detailed Description

Definition at line 81 of file AlignmentMonitorMuonSystemMap1D.cc.

Constructor & Destructor Documentation

AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::MuonSystemMapPlot1D ( std::string  name,
AlignmentMonitorMuonSystemMap1D module,
int  bins,
double  low,
double  high,
bool  xy,
bool  add_1d 
)

Definition at line 498 of file AlignmentMonitorMuonSystemMap1D.cc.

References AlignmentMonitorBase::book1D(), AlignmentMonitorBase::book2D(), LaserClient_cfi::high, LaserClient_cfi::low, m_1d, m_bins, m_dxdz_2d, m_dydz_2d, m_name, m_x_1d, m_x_2d, m_xy, m_y_2d, LaserClient_cfi::nbins, and svgfig::window().

500  : m_name(name), m_bins(bins), m_xy(xy), m_1d(add_1d) {
501  m_x_2d = m_y_2d = m_dxdz_2d = m_dydz_2d = nullptr;
502  std::stringstream name_x_2d, name_y_2d, name_dxdz_2d, name_dydz_2d;
503  name_x_2d << m_name << "_x_2d";
504  name_y_2d << m_name << "_y_2d";
505  name_dxdz_2d << m_name << "_dxdz_2d";
506  name_dydz_2d << m_name << "_dydz_2d";
507 
508  const int nbins = 200;
509  const double window = 100.;
510 
511  m_x_2d = module->book2D("/iterN/", name_x_2d.str(), "", m_bins, low, high, nbins, -window, window);
512  if (m_xy)
513  m_y_2d = module->book2D("/iterN/", name_y_2d.str(), "", m_bins, low, high, nbins, -window, window);
514  m_dxdz_2d = module->book2D("/iterN/", name_dxdz_2d.str(), "", m_bins, low, high, nbins, -window, window);
515  if (m_xy)
516  m_dydz_2d = module->book2D("/iterN/", name_dydz_2d.str(), "", m_bins, low, high, nbins, -window, window);
517 
518  m_x_1d = nullptr;
519  if (m_1d) {
520  std::stringstream name_x_1d; //, name_y_1d, name_dxdz_1d, name_dydz_1d;
521  name_x_1d << m_name << "_x_1d";
522  m_x_1d = module->book1D("/iterN/", name_x_1d.str(), "", nbins, -window, window);
523  }
524 }
TH2F * book2D(std::string dir, std::string name, std::string title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
Definition: svgfig.py:643
TH1F * book1D(std::string dir, std::string name, std::string title, int nchX, double lowX, double highX)

Member Function Documentation

void AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::fill_dxdz ( char  charge,
double  abscissa,
double  slopex,
double  chi2,
int  dof 
)

Definition at line 552 of file AlignmentMonitorMuonSystemMap1D.cc.

References m_dxdz_2d.

Referenced by AlignmentMonitorMuonSystemMap1D::processMuonResidualsFromTrack().

553  {
554  if (chi2 > 0.) {
555  double residual = slopex * 1000.;
556  //double weight = dof / chi2;
557  m_dxdz_2d->Fill(abscissa, residual);
558  }
559 }
void AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::fill_dydz ( char  charge,
double  abscissa,
double  slopey,
double  chi2,
int  dof 
)

Definition at line 561 of file AlignmentMonitorMuonSystemMap1D.cc.

References DEFINE_EDM_PLUGIN, m_dydz_2d, and m_xy.

Referenced by AlignmentMonitorMuonSystemMap1D::processMuonResidualsFromTrack().

562  {
563  if (m_xy && chi2 > 0.) {
564  double residual = slopey * 1000.;
565  //double weight = dof / chi2;
566  m_dydz_2d->Fill(abscissa, residual);
567  }
568 }
void AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::fill_x ( char  charge,
double  abscissa,
double  residx,
double  chi2,
int  dof 
)

Definition at line 534 of file AlignmentMonitorMuonSystemMap1D.cc.

References m_x_2d.

Referenced by AlignmentMonitorMuonSystemMap1D::processMuonResidualsFromTrack().

535  {
536  if (chi2 > 0.) {
537  double residual = residx * 10.;
538  //double weight = dof / chi2;
539  m_x_2d->Fill(abscissa, residual);
540  }
541 }
void AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::fill_x_1d ( double  residx,
double  chi2,
int  dof 
)

Definition at line 526 of file AlignmentMonitorMuonSystemMap1D.cc.

References m_1d, and m_x_1d.

Referenced by AlignmentMonitorMuonSystemMap1D::processMuonResidualsFromTrack().

526  {
527  if (m_1d && chi2 > 0.) {
528  // assume that residx was in radians
529  double residual = residx * 1000.;
530  m_x_1d->Fill(residual);
531  }
532 }
void AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::fill_y ( char  charge,
double  abscissa,
double  residy,
double  chi2,
int  dof 
)

Definition at line 543 of file AlignmentMonitorMuonSystemMap1D.cc.

References m_xy, and m_y_2d.

Referenced by AlignmentMonitorMuonSystemMap1D::processMuonResidualsFromTrack().

544  {
545  if (m_xy && chi2 > 0.) {
546  double residual = residy * 10.;
547  //double weight = dof / chi2;
548  m_y_2d->Fill(abscissa, residual);
549  }
550 }

Member Data Documentation

bool AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_1d
private

Definition at line 101 of file AlignmentMonitorMuonSystemMap1D.cc.

Referenced by fill_x_1d(), and MuonSystemMapPlot1D().

int AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_bins
private

Definition at line 99 of file AlignmentMonitorMuonSystemMap1D.cc.

Referenced by MuonSystemMapPlot1D().

TH2F * AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_dxdz_2d
private

Definition at line 103 of file AlignmentMonitorMuonSystemMap1D.cc.

Referenced by fill_dxdz(), and MuonSystemMapPlot1D().

TH2F * AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_dydz_2d
private

Definition at line 103 of file AlignmentMonitorMuonSystemMap1D.cc.

Referenced by fill_dydz(), and MuonSystemMapPlot1D().

std::string AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_name
private

Definition at line 98 of file AlignmentMonitorMuonSystemMap1D.cc.

Referenced by MuonSystemMapPlot1D().

TH1F* AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_x_1d
private

Definition at line 102 of file AlignmentMonitorMuonSystemMap1D.cc.

Referenced by fill_x_1d(), and MuonSystemMapPlot1D().

TH2F* AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_x_2d
private

Definition at line 103 of file AlignmentMonitorMuonSystemMap1D.cc.

Referenced by fill_x(), and MuonSystemMapPlot1D().

bool AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_xy
private

Definition at line 100 of file AlignmentMonitorMuonSystemMap1D.cc.

Referenced by fill_dydz(), fill_y(), and MuonSystemMapPlot1D().

TH2F * AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_y_2d
private

Definition at line 103 of file AlignmentMonitorMuonSystemMap1D.cc.

Referenced by fill_y(), and MuonSystemMapPlot1D().