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

Constructor & Destructor Documentation

CTPPSAcceptancePlotter::SingleArmPlots::SingleArmPlots ( )
inline

Definition at line 46 of file CTPPSAcceptancePlotter.cc.

46 : h_xi_all(new TH1D("", ";#xi", 100, 0., 0.25)), h_xi_acc(new TH1D("", ";#xi", 100, 0., 0.25)) {}

Member Function Documentation

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

Definition at line 48 of file CTPPSAcceptancePlotter.cc.

References h_xi_acc, and h_xi_all.

48  {
49  h_xi_all->Fill(xi);
50  if (acc)
51  h_xi_acc->Fill(xi);
52  }
void CTPPSAcceptancePlotter::SingleArmPlots::write ( ) const
inline

Definition at line 54 of file CTPPSAcceptancePlotter.cc.

References h_xi_acc, and h_xi_all.

54  {
55  h_xi_all->Write("h_xi_all");
56  h_xi_acc->Write("h_xi_acc");
57 
58  auto h_xi_rat = std::make_unique<TH1D>(*h_xi_acc);
59  h_xi_rat->Divide(h_xi_all.get());
60  h_xi_rat->Write("h_xi_rat");
61  }

Member Data Documentation

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

Definition at line 45 of file CTPPSAcceptancePlotter.cc.

Referenced by fill(), and write().

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

Definition at line 45 of file CTPPSAcceptancePlotter.cc.

Referenced by fill(), and write().