CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
CTPPSProtonReconstructionPlotter::SingleRPPlots Struct Reference

Public Member Functions

void fill (const reco::ForwardProton &p, unsigned int nTracks, bool n1f1)
 
 SingleRPPlots ()
 
void write () const
 

Public Attributes

std::unique_ptr< TH2D > h2_th_y_vs_xi
 
std::unique_ptr< TH1D > h_multiplicity
 
std::unique_ptr< TH1D > h_xi
 
std::unique_ptr< TH1D > h_xi_n1f1
 
std::map< unsigned int, TH1D * > m_h_xi_nTracks
 
std::unique_ptr< TProfile > p_th_y_vs_xi
 

Detailed Description

Definition at line 90 of file CTPPSProtonReconstructionPlotter.cc.

Constructor & Destructor Documentation

CTPPSProtonReconstructionPlotter::SingleRPPlots::SingleRPPlots ( )
inline

Definition at line 99 of file CTPPSProtonReconstructionPlotter.cc.

References gen::n.

100  : h_multiplicity(new TH1D("", ";reconstructed protons", 11, -0.5, 10.5)),
101  h_xi(new TH1D("", ";#xi", 100, 0., 0.3)),
102  h2_th_y_vs_xi(new TH2D("", ";#xi;#theta_{y} (rad)", 100, 0., 0.3, 100, -500E-6, +500E-6)),
103  p_th_y_vs_xi(new TProfile("", ";#xi;#theta_{y} (rad)", 100, 0., 0.3)),
104  h_xi_n1f1(new TH1D("", ";#xi", 100, 0., 0.3)) {
105  for (unsigned int n = 2; n <= 10; ++n)
106  m_h_xi_nTracks[n] = new TH1D(*h_xi);
107  }

Member Function Documentation

void CTPPSProtonReconstructionPlotter::SingleRPPlots::fill ( const reco::ForwardProton p,
unsigned int  nTracks,
bool  n1f1 
)
inline

Definition at line 109 of file CTPPSProtonReconstructionPlotter.cc.

References reco::ForwardProton::thetaY(), reco::ForwardProton::validFit(), and reco::ForwardProton::xi().

109  {
110  if (p.validFit()) {
111  h_xi->Fill(p.xi());
112 
113  const double th_y = p.thetaY();
114  h2_th_y_vs_xi->Fill(p.xi(), th_y);
115  p_th_y_vs_xi->Fill(p.xi(), th_y);
116 
117  auto it = m_h_xi_nTracks.find(nTracks);
118  if (it != m_h_xi_nTracks.end())
119  it->second->Fill(p.xi());
120 
121  if (n1f1)
122  h_xi_n1f1->Fill(p.xi());
123  }
124  }
const unsigned int nTracks(const reco::Vertex &sv)
float xi() const
longitudinal fractional momentum loss
Definition: ForwardProton.h:76
bool validFit() const
flag for the fit validity
float thetaY() const
horizontal scattering angle, in rad
Definition: ForwardProton.h:80
void CTPPSProtonReconstructionPlotter::SingleRPPlots::write ( ) const
inline

Definition at line 126 of file CTPPSProtonReconstructionPlotter.cc.

References AlCaHLTBitMon_ParallelJobs::p.

126  {
127  h_multiplicity->Write("h_multiplicity");
128  h_xi->Write("h_xi");
129 
130  h2_th_y_vs_xi->Write("h2_th_y_vs_xi");
131  p_th_y_vs_xi->Write("p_th_y_vs_xi");
132 
133  TDirectory *d_top = gDirectory;
134 
135  gDirectory = d_top->mkdir("h_xi_nTracks");
136  for (const auto p : m_h_xi_nTracks) {
137  char buf[100];
138  sprintf(buf, "h_xi_nTracks_%u", p.first);
139  p.second->Write(buf);
140  }
141 
142  gDirectory = d_top;
143 
144  h_xi_n1f1->Write("h_xi_n1f1");
145  }

Member Data Documentation

std::unique_ptr<TH2D> CTPPSProtonReconstructionPlotter::SingleRPPlots::h2_th_y_vs_xi

Definition at line 93 of file CTPPSProtonReconstructionPlotter.cc.

std::unique_ptr<TH1D> CTPPSProtonReconstructionPlotter::SingleRPPlots::h_multiplicity

Definition at line 91 of file CTPPSProtonReconstructionPlotter.cc.

std::unique_ptr<TH1D> CTPPSProtonReconstructionPlotter::SingleRPPlots::h_xi

Definition at line 92 of file CTPPSProtonReconstructionPlotter.cc.

std::unique_ptr<TH1D> CTPPSProtonReconstructionPlotter::SingleRPPlots::h_xi_n1f1

Definition at line 97 of file CTPPSProtonReconstructionPlotter.cc.

std::map<unsigned int, TH1D *> CTPPSProtonReconstructionPlotter::SingleRPPlots::m_h_xi_nTracks

Definition at line 96 of file CTPPSProtonReconstructionPlotter.cc.

std::unique_ptr<TProfile> CTPPSProtonReconstructionPlotter::SingleRPPlots::p_th_y_vs_xi

Definition at line 94 of file CTPPSProtonReconstructionPlotter.cc.