CMS 3D CMS Logo

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

Public Member Functions

void fill (double xi, bool acc)
 
 SingleArmPlots ()
 
void write () const
 

Public Attributes

std::unique_ptr< TH1D > h_xi_acc
 
std::unique_ptr< TH1D > h_xi_all
 

Detailed Description

Definition at line 45 of file CTPPSAcceptancePlotter.cc.

Constructor & Destructor Documentation

CTPPSAcceptancePlotter::SingleArmPlots::SingleArmPlots ( )
inline

Definition at line 48 of file CTPPSAcceptancePlotter.cc.

48  :
49  h_xi_all(new TH1D("", ";#xi", 100, 0., 0.25)),
50  h_xi_acc(new TH1D("", ";#xi", 100, 0., 0.25))
51  {}

Member Function Documentation

void CTPPSAcceptancePlotter::SingleArmPlots::fill ( double  xi,
bool  acc 
)
inline

Definition at line 53 of file CTPPSAcceptancePlotter.cc.

54  {
55  h_xi_all->Fill(xi);
56  if (acc)
57  h_xi_acc->Fill(xi);
58  }
void CTPPSAcceptancePlotter::SingleArmPlots::write ( ) const
inline

Definition at line 60 of file CTPPSAcceptancePlotter.cc.

61  {
62  h_xi_all->Write("h_xi_all");
63  h_xi_acc->Write("h_xi_acc");
64 
65  auto h_xi_rat = std::make_unique<TH1D>(*h_xi_acc);
66  h_xi_rat->Divide(h_xi_all.get());
67  h_xi_rat->Write("h_xi_rat");
68  }

Member Data Documentation

std::unique_ptr<TH1D> CTPPSAcceptancePlotter::SingleArmPlots::h_xi_acc

Definition at line 47 of file CTPPSAcceptancePlotter.cc.

std::unique_ptr<TH1D> CTPPSAcceptancePlotter::SingleArmPlots::h_xi_all

Definition at line 47 of file CTPPSAcceptancePlotter.cc.