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 67 of file CTPPSAcceptancePlotter.cc.

Constructor & Destructor Documentation

◆ DoubleArmPlots()

CTPPSAcceptancePlotter::DoubleArmPlots::DoubleArmPlots ( )
inline

Definition at line 72 of file CTPPSAcceptancePlotter.cc.

73  : h_m_all(new TH1D("", ";m (GeV)", 100, 0., 2500.)),
74  h_m_acc(new TH1D("", ";m (GeV)", 100, 0., 2500.)),
75  h2_xi_45_vs_xi_56_all(new TH2D("", ";xi_56;xi_45", 25, 0., 0.25, 25, 0., 0.25)),
76  h2_xi_45_vs_xi_56_acc(new TH2D("", ";xi_56;xi_45", 25, 0., 0.25, 25, 0., 0.25)),
77  h2_y_vs_m_all(new TH2D("", ";m (GeV);y", 25, 0., 2500., 25, -1.5, +1.5)),
78  h2_y_vs_m_acc(new TH2D("", ";m (GeV);y", 25, 0., 2500., 25, -1.5, +1.5)) {}

Member Function Documentation

◆ fill()

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

Definition at line 80 of file CTPPSAcceptancePlotter.cc.

References h2_xi_45_vs_xi_56_acc, h2_xi_45_vs_xi_56_all, h2_y_vs_m_acc, h2_y_vs_m_all, h_m_acc, h_m_all, dqm-mbProfile::log, visualization-live-secondInstance_cfg::m, mathSSE::sqrt(), and y.

80  {
81  const double p_nom = 6500.;
82  const double m = 2. * p_nom * sqrt(xi_45 * xi_56);
83  const double y = log(xi_45 / xi_56) / 2.;
84 
85  h_m_all->Fill(m);
86  h2_xi_45_vs_xi_56_all->Fill(xi_56, xi_45);
87  h2_y_vs_m_all->Fill(m, y);
88 
89  if (acc) {
90  h_m_acc->Fill(m);
91  h2_xi_45_vs_xi_56_acc->Fill(xi_56, xi_45);
92  h2_y_vs_m_acc->Fill(m, y);
93  }
94  }
T sqrt(T t)
Definition: SSEVec.h:19

◆ write()

void CTPPSAcceptancePlotter::DoubleArmPlots::write ( ) const
inline

Definition at line 96 of file CTPPSAcceptancePlotter.cc.

References h2_xi_45_vs_xi_56_acc, h2_xi_45_vs_xi_56_all, h2_y_vs_m_acc, h2_y_vs_m_all, h_m_acc, and h_m_all.

96  {
97  h_m_all->Write("h_m_all");
98  h_m_acc->Write("h_m_acc");
99 
100  auto h_m_rat = std::make_unique<TH1D>(*h_m_acc);
101  h_m_rat->Divide(h_m_all.get());
102  h_m_rat->Write("h_m_rat");
103 
104  h2_xi_45_vs_xi_56_all->Write("h2_xi_45_vs_xi_56_all");
105  h2_xi_45_vs_xi_56_acc->Write("h2_xi_45_vs_xi_56_acc");
106 
107  auto h2_xi_45_vs_xi_56_rat = std::make_unique<TH2D>(*h2_xi_45_vs_xi_56_acc);
108  h2_xi_45_vs_xi_56_rat->Divide(h2_xi_45_vs_xi_56_all.get());
109  h2_xi_45_vs_xi_56_rat->Write("h2_xi_45_vs_xi_56_rat");
110 
111  h2_y_vs_m_all->Write("h2_y_vs_m_all");
112  h2_y_vs_m_acc->Write("h2_y_vs_m_acc");
113 
114  auto h2_y_vs_m_rat = std::make_unique<TH2D>(*h2_y_vs_m_acc);
115  h2_y_vs_m_rat->Divide(h2_y_vs_m_all.get());
116  h2_y_vs_m_rat->Write("h2_y_vs_m_rat");
117  }

Member Data Documentation

◆ h2_xi_45_vs_xi_56_acc

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

Definition at line 69 of file CTPPSAcceptancePlotter.cc.

Referenced by fill(), and write().

◆ h2_xi_45_vs_xi_56_all

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

Definition at line 69 of file CTPPSAcceptancePlotter.cc.

Referenced by fill(), and write().

◆ h2_y_vs_m_acc

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

Definition at line 70 of file CTPPSAcceptancePlotter.cc.

Referenced by fill(), and write().

◆ h2_y_vs_m_all

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

Definition at line 70 of file CTPPSAcceptancePlotter.cc.

Referenced by fill(), and write().

◆ h_m_acc

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

Definition at line 68 of file CTPPSAcceptancePlotter.cc.

Referenced by fill(), and write().

◆ h_m_all

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

Definition at line 68 of file CTPPSAcceptancePlotter.cc.

Referenced by fill(), and write().