CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
CTPPSAcceptancePlotter::DoubleArmPlots Struct Reference

Public Member Functions

 DoubleArmPlots ()
 
void fill (double xi_45, double xi_56, bool acc)
 
void write () const
 

Public Attributes

std::unique_ptr< TH2D > h2_xi_45_vs_xi_56_acc
 
std::unique_ptr< TH2D > h2_xi_45_vs_xi_56_all
 
std::unique_ptr< TH2D > h2_y_vs_m_acc
 
std::unique_ptr< TH2D > h2_y_vs_m_all
 
std::unique_ptr< TH1D > h_m_acc
 
std::unique_ptr< TH1D > h_m_all
 

Detailed Description

Definition at line 74 of file CTPPSAcceptancePlotter.cc.

Constructor & Destructor Documentation

CTPPSAcceptancePlotter::DoubleArmPlots::DoubleArmPlots ( )
inline

Definition at line 80 of file CTPPSAcceptancePlotter.cc.

80  :
81  h_m_all(new TH1D("", ";m (GeV)", 100, 0., 2500.)),
82  h_m_acc(new TH1D("", ";m (GeV)", 100, 0., 2500.)),
83  h2_xi_45_vs_xi_56_all(new TH2D("", ";xi_56;xi_45", 25, 0., 0.25, 25, 0., 0.25)),
84  h2_xi_45_vs_xi_56_acc(new TH2D("", ";xi_56;xi_45", 25, 0., 0.25, 25, 0., 0.25)),
85  h2_y_vs_m_all(new TH2D("", ";m (GeV);y", 25, 0., 2500., 25, -1.5, +1.5)),
86  h2_y_vs_m_acc(new TH2D("", ";m (GeV);y", 25, 0., 2500., 25, -1.5, +1.5))
87  {}

Member Function Documentation

void CTPPSAcceptancePlotter::DoubleArmPlots::fill ( double  xi_45,
double  xi_56,
bool  acc 
)
inline

Definition at line 89 of file CTPPSAcceptancePlotter.cc.

References cmsBatch::log, funct::m, mathSSE::sqrt(), and y.

90  {
91  const double p_nom = 6500.;
92  const double m = 2. * p_nom * sqrt(xi_45 * xi_56);
93  const double y = log(xi_45 / xi_56) / 2.;
94 
95  h_m_all->Fill(m);
96  h2_xi_45_vs_xi_56_all->Fill(xi_56, xi_45);
97  h2_y_vs_m_all->Fill(m, y);
98 
99  if (acc) {
100  h_m_acc->Fill(m);
101  h2_xi_45_vs_xi_56_acc->Fill(xi_56, xi_45);
102  h2_y_vs_m_acc->Fill(m, y);
103  }
104  }
T sqrt(T t)
Definition: SSEVec.h:18
void CTPPSAcceptancePlotter::DoubleArmPlots::write ( ) const
inline

Definition at line 106 of file CTPPSAcceptancePlotter.cc.

107  {
108  h_m_all->Write("h_m_all");
109  h_m_acc->Write("h_m_acc");
110 
111  auto h_m_rat = std::make_unique<TH1D>(*h_m_acc);
112  h_m_rat->Divide(h_m_all.get());
113  h_m_rat->Write("h_m_rat");
114 
115  h2_xi_45_vs_xi_56_all->Write("h2_xi_45_vs_xi_56_all");
116  h2_xi_45_vs_xi_56_acc->Write("h2_xi_45_vs_xi_56_acc");
117 
118  auto h2_xi_45_vs_xi_56_rat = std::make_unique<TH2D>(*h2_xi_45_vs_xi_56_acc);
119  h2_xi_45_vs_xi_56_rat->Divide(h2_xi_45_vs_xi_56_all.get());
120  h2_xi_45_vs_xi_56_rat->Write("h2_xi_45_vs_xi_56_rat");
121 
122  h2_y_vs_m_all->Write("h2_y_vs_m_all");
123  h2_y_vs_m_acc->Write("h2_y_vs_m_acc");
124 
125  auto h2_y_vs_m_rat = std::make_unique<TH2D>(*h2_y_vs_m_acc);
126  h2_y_vs_m_rat->Divide(h2_y_vs_m_all.get());
127  h2_y_vs_m_rat->Write("h2_y_vs_m_rat");
128  }

Member Data Documentation

std::unique_ptr<TH2D> CTPPSAcceptancePlotter::DoubleArmPlots::h2_xi_45_vs_xi_56_acc

Definition at line 77 of file CTPPSAcceptancePlotter.cc.

std::unique_ptr<TH2D> CTPPSAcceptancePlotter::DoubleArmPlots::h2_xi_45_vs_xi_56_all

Definition at line 77 of file CTPPSAcceptancePlotter.cc.

std::unique_ptr<TH2D> CTPPSAcceptancePlotter::DoubleArmPlots::h2_y_vs_m_acc

Definition at line 78 of file CTPPSAcceptancePlotter.cc.

std::unique_ptr<TH2D> CTPPSAcceptancePlotter::DoubleArmPlots::h2_y_vs_m_all

Definition at line 78 of file CTPPSAcceptancePlotter.cc.

std::unique_ptr<TH1D> CTPPSAcceptancePlotter::DoubleArmPlots::h_m_acc

Definition at line 76 of file CTPPSAcceptancePlotter.cc.

std::unique_ptr<TH1D> CTPPSAcceptancePlotter::DoubleArmPlots::h_m_all

Definition at line 76 of file CTPPSAcceptancePlotter.cc.