CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
CTPPSTrackDistributionPlotter::RPPlots Struct Reference

Public Member Functions

void fill (double x, double y, double time)
 
void init (bool pixel, double pitch)
 
 RPPlots ()
 
void write () const
 

Public Attributes

std::unique_ptr< TH2D > h2_y_vs_x
 
std::unique_ptr< TH1D > h_time
 
std::unique_ptr< TH1D > h_x
 
std::unique_ptr< TH1D > h_y
 
bool initialized
 
std::unique_ptr< TProfile > p_y_vs_x
 

Detailed Description

Definition at line 51 of file CTPPSTrackDistributionPlotter.cc.

Constructor & Destructor Documentation

CTPPSTrackDistributionPlotter::RPPlots::RPPlots ( )
inline

Member Function Documentation

void CTPPSTrackDistributionPlotter::RPPlots::fill ( double  x,
double  y,
double  time 
)
inline

Definition at line 80 of file CTPPSTrackDistributionPlotter.cc.

80  {
81  h2_y_vs_x->Fill(x, y);
82  p_y_vs_x->Fill(x, y);
83  h_x->Fill(x);
84  h_y->Fill(y);
85  h_time->Fill(time);
86  }
void CTPPSTrackDistributionPlotter::RPPlots::init ( bool  pixel,
double  pitch 
)
inline

Definition at line 62 of file CTPPSTrackDistributionPlotter.cc.

References funct::cos(), M_PI, and digitizers_cfi::pixel.

62  {
63  const double bin_size_x = (pixel) ? pitch * cos(18.4 / 180. * M_PI) : 100E-3;
64 
65  h2_y_vs_x.reset(new TH2D("", "", 300, -10., +70., 600, -30., +30.));
66  p_y_vs_x.reset(new TProfile("", "", 300, -10., +70.));
67 
68  int n_mi = ceil(10. / bin_size_x);
69  int n_pl = ceil(70. / bin_size_x);
70 
71  h_x.reset(new TH1D("", "", n_mi + n_pl, -n_mi * bin_size_x, +n_pl * bin_size_x));
72 
73  h_y.reset(new TH1D("", "", 300, -15., +15.));
74 
75  h_time.reset(new TH1D("", ";time", 500, -50., +50.));
76 
77  initialized = true;
78  }
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
#define M_PI
void CTPPSTrackDistributionPlotter::RPPlots::write ( ) const
inline

Definition at line 88 of file CTPPSTrackDistributionPlotter.cc.

88  {
89  h2_y_vs_x->Write("h2_y_vs_x");
90  p_y_vs_x->Write("p_y_vs_x");
91  h_x->Write("h_x");
92  h_y->Write("h_y");
93  h_time->Write("h_time");
94  }

Member Data Documentation

std::unique_ptr<TH2D> CTPPSTrackDistributionPlotter::RPPlots::h2_y_vs_x

Definition at line 54 of file CTPPSTrackDistributionPlotter.cc.

std::unique_ptr<TH1D> CTPPSTrackDistributionPlotter::RPPlots::h_time

Definition at line 58 of file CTPPSTrackDistributionPlotter.cc.

std::unique_ptr<TH1D> CTPPSTrackDistributionPlotter::RPPlots::h_x

Definition at line 56 of file CTPPSTrackDistributionPlotter.cc.

std::unique_ptr<TH1D> CTPPSTrackDistributionPlotter::RPPlots::h_y

Definition at line 57 of file CTPPSTrackDistributionPlotter.cc.

bool CTPPSTrackDistributionPlotter::RPPlots::initialized

Definition at line 52 of file CTPPSTrackDistributionPlotter.cc.

std::unique_ptr<TProfile> CTPPSTrackDistributionPlotter::RPPlots::p_y_vs_x

Definition at line 55 of file CTPPSTrackDistributionPlotter.cc.