CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
CTPPSTrackDistributionPlotter::RPPlots Struct Reference

Public Member Functions

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

Public Attributes

std::unique_ptr< TH2D > h2_de_x_vs_x
 
std::unique_ptr< TH2D > h2_de_x_vs_y
 
std::unique_ptr< TH2D > h2_de_y_vs_x
 
std::unique_ptr< TH2D > h2_de_y_vs_y
 
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 53 of file CTPPSTrackDistributionPlotter.cc.

Constructor & Destructor Documentation

CTPPSTrackDistributionPlotter::RPPlots::RPPlots ( )
inline

Member Function Documentation

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

Definition at line 96 of file CTPPSTrackDistributionPlotter.cc.

References h2_y_vs_x, h_time, h_x, h_y, and p_y_vs_x.

96  {
97  h2_y_vs_x->Fill(x, y);
98  p_y_vs_x->Fill(x, y);
99  h_x->Fill(x);
100  h_y->Fill(y);
101  h_time->Fill(time);
102  }
void CTPPSTrackDistributionPlotter::RPPlots::init ( bool  pixel,
double  pitch 
)
inline

Definition at line 69 of file CTPPSTrackDistributionPlotter.cc.

References reco::ceil(), funct::cos(), h2_de_x_vs_x, h2_de_x_vs_y, h2_de_y_vs_x, h2_de_y_vs_y, h2_y_vs_x, h_time, h_x, h_y, initialized, M_PI, p_y_vs_x, and digitizers_cfi::pixel.

69  {
70  const double bin_size_x = (pixel) ? pitch * cos(18.4 / 180. * M_PI) : 100E-3;
71 
72  h2_y_vs_x = std::make_unique<TH2D>("", "", 300, -10., +70., 600, -30., +30.);
73  p_y_vs_x = std::make_unique<TProfile>("", "", 300, -10., +70.);
74 
75  int n_mi = ceil(10. / bin_size_x);
76  int n_pl = ceil(70. / bin_size_x);
77 
78  h_x = std::make_unique<TH1D>("", "", n_mi + n_pl, -n_mi * bin_size_x, +n_pl * bin_size_x);
79 
80  h_y = std::make_unique<TH1D>("", "", 300, -15., +15.);
81 
82  h_time = std::make_unique<TH1D>("", ";time", 500, -50., +50.);
83 
84  h2_de_x_vs_x =
85  std::make_unique<TH2D>("h2_de_x_vs_x", "h2_de_x_vs_x;x;distance in x axis", 300, -30., +30., 300, -3., +3.);
86  h2_de_x_vs_y =
87  std::make_unique<TH2D>("h2_de_x_vs_y", "h2_de_x_vs_y;y;distance in x axis", 300, -30., +30., 300, -3., +3.);
88  h2_de_y_vs_x =
89  std::make_unique<TH2D>("h2_de_y_vs_x", "h2_de_y_vs_x;x;distance in y axis", 300, -30., +30., 300, -3., +3.);
90  h2_de_y_vs_y =
91  std::make_unique<TH2D>("h2_de_y_vs_y", "h2_de_y_vs_y;y;distance in y axis", 300, -30., +30., 300, -3., +3.);
92 
93  initialized = true;
94  }
constexpr int32_t ceil(float num)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
#define M_PI
void CTPPSTrackDistributionPlotter::RPPlots::write ( ) const
inline

Definition at line 104 of file CTPPSTrackDistributionPlotter.cc.

References h2_de_x_vs_x, h2_de_x_vs_y, h2_de_y_vs_x, h2_de_y_vs_y, h2_y_vs_x, h_time, h_x, h_y, and p_y_vs_x.

104  {
105  h2_y_vs_x->Write("h2_y_vs_x");
106  p_y_vs_x->Write("p_y_vs_x");
107  h_x->Write("h_x");
108  h_y->Write("h_y");
109  h_time->Write("h_time");
110 
111  h2_de_x_vs_x->Write("h2_de_x_vs_x");
112  h2_de_x_vs_y->Write("h2_de_x_vs_y");
113  h2_de_y_vs_x->Write("h2_de_y_vs_x");
114  h2_de_y_vs_y->Write("h2_de_y_vs_y");
115  }

Member Data Documentation

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

Definition at line 62 of file CTPPSTrackDistributionPlotter.cc.

Referenced by init(), and write().

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

Definition at line 63 of file CTPPSTrackDistributionPlotter.cc.

Referenced by init(), and write().

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

Definition at line 64 of file CTPPSTrackDistributionPlotter.cc.

Referenced by init(), and write().

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

Definition at line 65 of file CTPPSTrackDistributionPlotter.cc.

Referenced by init(), and write().

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

Definition at line 56 of file CTPPSTrackDistributionPlotter.cc.

Referenced by fillOneTrack(), init(), and write().

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

Definition at line 60 of file CTPPSTrackDistributionPlotter.cc.

Referenced by fillOneTrack(), init(), and write().

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

Definition at line 58 of file CTPPSTrackDistributionPlotter.cc.

Referenced by fillOneTrack(), init(), and write().

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

Definition at line 59 of file CTPPSTrackDistributionPlotter.cc.

Referenced by fillOneTrack(), init(), and write().

bool CTPPSTrackDistributionPlotter::RPPlots::initialized

Definition at line 54 of file CTPPSTrackDistributionPlotter.cc.

Referenced by init().

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

Definition at line 57 of file CTPPSTrackDistributionPlotter.cc.

Referenced by fillOneTrack(), init(), and write().