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 86 of file CTPPSProtonReconstructionPlotter.cc.

Constructor & Destructor Documentation

◆ SingleRPPlots()

CTPPSProtonReconstructionPlotter::SingleRPPlots::SingleRPPlots ( )
inline

Definition at line 95 of file CTPPSProtonReconstructionPlotter.cc.

References h_xi, m_h_xi_nTracks, and dqmiodumpmetadata::n.

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

Member Function Documentation

◆ fill()

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

Definition at line 105 of file CTPPSProtonReconstructionPlotter.cc.

References h2_th_y_vs_xi, h_xi, h_xi_n1f1, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, m_h_xi_nTracks, beamSpotPI::nTracks, AlCaHLTBitMon_ParallelJobs::p, and p_th_y_vs_xi.

105  {
106  if (p.validFit()) {
107  h_xi->Fill(p.xi());
108 
109  const double th_y = p.thetaY();
110  h2_th_y_vs_xi->Fill(p.xi(), th_y);
111  p_th_y_vs_xi->Fill(p.xi(), th_y);
112 
113  auto it = m_h_xi_nTracks.find(nTracks);
114  if (it != m_h_xi_nTracks.end())
115  it->second->Fill(p.xi());
116 
117  if (n1f1)
118  h_xi_n1f1->Fill(p.xi());
119  }
120  }

◆ write()

void CTPPSProtonReconstructionPlotter::SingleRPPlots::write ( ) const
inline

Definition at line 122 of file CTPPSProtonReconstructionPlotter.cc.

References visDQMUpload::buf, h2_th_y_vs_xi, h_multiplicity, h_xi, h_xi_n1f1, m_h_xi_nTracks, AlCaHLTBitMon_ParallelJobs::p, and p_th_y_vs_xi.

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

Member Data Documentation

◆ h2_th_y_vs_xi

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

Definition at line 89 of file CTPPSProtonReconstructionPlotter.cc.

Referenced by fill(), and write().

◆ h_multiplicity

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

Definition at line 87 of file CTPPSProtonReconstructionPlotter.cc.

Referenced by write().

◆ h_xi

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

Definition at line 88 of file CTPPSProtonReconstructionPlotter.cc.

Referenced by fill(), SingleRPPlots(), and write().

◆ h_xi_n1f1

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

Definition at line 93 of file CTPPSProtonReconstructionPlotter.cc.

Referenced by fill(), and write().

◆ m_h_xi_nTracks

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

Definition at line 92 of file CTPPSProtonReconstructionPlotter.cc.

Referenced by fill(), SingleRPPlots(), and write().

◆ p_th_y_vs_xi

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

Definition at line 90 of file CTPPSProtonReconstructionPlotter.cc.

Referenced by fill(), and write().