CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes
CTPPSProtonReconstructionSimulationValidator::PlotGroup Struct Reference

Public Member Functions

 PlotGroup ()
 
void write () const
 

Static Public Member Functions

static TGraphErrors profileToRMSGraph (TProfile *p, const char *name="")
 

Public Attributes

std::unique_ptr< TH2D > h2_de_t_vs_t_simu
 
std::unique_ptr< TH1D > h_de_t
 
std::unique_ptr< TH1D > h_de_th_x
 
std::unique_ptr< TH1D > h_de_th_y
 
std::unique_ptr< TH1D > h_de_vtx_y
 
std::unique_ptr< TH1D > h_de_xi
 
std::unique_ptr< TH2D > h_xi_reco_vs_xi_simu
 
std::unique_ptr< TProfile > p_de_t_vs_t_simu
 
std::unique_ptr< TProfile > p_de_t_vs_xi_simu
 
std::unique_ptr< TProfile > p_de_th_x_vs_xi_simu
 
std::unique_ptr< TProfile > p_de_th_y_vs_xi_simu
 
std::unique_ptr< TProfile > p_de_vtx_y_vs_xi_simu
 
std::unique_ptr< TProfile > p_de_xi_vs_xi_simu
 

Detailed Description

Definition at line 66 of file CTPPSProtonReconstructionSimulationValidator.cc.

Constructor & Destructor Documentation

◆ PlotGroup()

CTPPSProtonReconstructionSimulationValidator::PlotGroup::PlotGroup ( )
inline

Definition at line 84 of file CTPPSProtonReconstructionSimulationValidator.cc.

85  : h_de_xi(new TH1D("", ";#xi_{reco} - #xi_{simu}", 100, 0., 0.)),
86  p_de_xi_vs_xi_simu(new TProfile("", ";#xi_{simu};#xi_{reco} - #xi_{simu}", 50, 0., 0.25)),
87  h_xi_reco_vs_xi_simu(new TH2D("", ";#xi_{simu};#xi_{reco}", 100, 0., 0.30, 100, 0., 0.30)),
88 
89  h_de_th_x(new TH1D("", ";#theta_{x,reco} - #theta_{x,simu}", 100, 0., 0.)),
90  p_de_th_x_vs_xi_simu(new TProfile("", ";#xi_{simu};#theta_{x,reco} - #theta_{x,simu}", 50, 0., 0.25)),
91 
92  h_de_th_y(new TH1D("", ";#theta_{y,reco} - #theta_{y,simu}", 100, 0., 0.)),
93  p_de_th_y_vs_xi_simu(new TProfile("", ";#xi_{simu};#theta_{y,reco} - #theta_{y,simu}", 50, 0., 0.25)),
94 
95  h_de_vtx_y(new TH1D("", ";vtx_{y,reco} - vtx_{y,simu} (mm)", 100, 0., 0.)),
96  p_de_vtx_y_vs_xi_simu(new TProfile("", ";#xi_{simu};vtx_{y,reco} - vtx_{y,simu} (mm)", 50, 0., 0.25)),
97 
98  h_de_t(new TH1D("", ";t_{reco} - t_{simu}", 100, -1., +1.)),
99  p_de_t_vs_xi_simu(new TProfile("", ";xi_{simu};t_{reco} - t_{simu}", 50, 0., 0.25)),
100  p_de_t_vs_t_simu(new TProfile("", ";t_{simu};t_{reco} - t_{simu}", 20, 0., 5.)),
101  h2_de_t_vs_t_simu(new TH2D("", ";t_{simu};t_{reco} - t_{simu}", 150, 0., 5., 300, -2., +2.)) {}

Member Function Documentation

◆ profileToRMSGraph()

static TGraphErrors CTPPSProtonReconstructionSimulationValidator::PlotGroup::profileToRMSGraph ( TProfile *  p,
const char *  name = "" 
)
inlinestatic

Definition at line 103 of file CTPPSProtonReconstructionSimulationValidator.cc.

References DummyCfis::c, heavyIonCSV_trainingSettings::idx, N, Skims_PA_cff::name, AlCaHLTBitMon_ParallelJobs::p, mathSSE::sqrt(), and w().

Referenced by write().

103  {
104  TGraphErrors gr_err;
105  gr_err.SetName(name);
106 
107  for (int bi = 1; bi <= p->GetNbinsX(); ++bi) {
108  double c = p->GetBinCenter(bi);
109  double w = p->GetBinWidth(bi);
110 
111  double N = p->GetBinEntries(bi);
112  double Sy = p->GetBinContent(bi) * N;
113  double Syy = p->GetSumw2()->At(bi);
114 
115  double si_sq = Syy / N - Sy * Sy / N / N;
116  double si = (si_sq >= 0.) ? sqrt(si_sq) : 0.;
117  double si_unc_sq = si_sq / 2. / N; // Gaussian approximation
118  double si_unc = (si_unc_sq >= 0.) ? sqrt(si_unc_sq) : 0.;
119 
120  int idx = gr_err.GetN();
121  gr_err.SetPoint(idx, c, si);
122  gr_err.SetPointError(idx, w / 2., si_unc);
123  }
124 
125  return gr_err;
126  }
T w() const
T sqrt(T t)
Definition: SSEVec.h:23
#define N
Definition: blowfish.cc:9

◆ write()

void CTPPSProtonReconstructionSimulationValidator::PlotGroup::write ( ) const
inline

Definition at line 128 of file CTPPSProtonReconstructionSimulationValidator.cc.

References h2_de_t_vs_t_simu, h_de_t, h_de_th_x, h_de_th_y, h_de_vtx_y, h_de_xi, h_xi_reco_vs_xi_simu, p_de_t_vs_t_simu, p_de_t_vs_xi_simu, p_de_th_x_vs_xi_simu, p_de_th_y_vs_xi_simu, p_de_vtx_y_vs_xi_simu, p_de_xi_vs_xi_simu, and profileToRMSGraph().

128  {
129  h_xi_reco_vs_xi_simu->Write("h_xi_reco_vs_xi_simu");
130  h_de_xi->Write("h_de_xi");
131  p_de_xi_vs_xi_simu->Write("p_de_xi_vs_xi_simu");
132  profileToRMSGraph(p_de_xi_vs_xi_simu.get(), "g_rms_de_xi_vs_xi_simu").Write();
133 
134  h_de_th_x->Write("h_de_th_x");
135  p_de_th_x_vs_xi_simu->Write("p_de_th_x_vs_xi_simu");
136  profileToRMSGraph(p_de_th_x_vs_xi_simu.get(), "g_rms_de_th_x_vs_xi_simu").Write();
137 
138  h_de_th_y->Write("h_de_th_y");
139  p_de_th_y_vs_xi_simu->Write("p_de_th_y_vs_xi_simu");
140  profileToRMSGraph(p_de_th_y_vs_xi_simu.get(), "g_rms_de_th_y_vs_xi_simu").Write();
141 
142  h_de_vtx_y->Write("h_de_vtx_y");
143  p_de_vtx_y_vs_xi_simu->Write("p_de_vtx_y_vs_xi_simu");
144  profileToRMSGraph(p_de_vtx_y_vs_xi_simu.get(), "g_rms_de_vtx_y_vs_xi_simu").Write();
145 
146  h_de_t->Write("h_de_t");
147  p_de_t_vs_xi_simu->Write("p_de_t_vs_xi_simu");
148  profileToRMSGraph(p_de_t_vs_xi_simu.get(), "g_rms_de_t_vs_xi_simu").Write();
149  p_de_t_vs_t_simu->Write("p_de_t_vs_t_simu");
150  profileToRMSGraph(p_de_t_vs_t_simu.get(), "g_rms_de_t_vs_t_simu").Write();
151  h2_de_t_vs_t_simu->Write("h2_de_t_vs_t_simu");
152  }

Member Data Documentation

◆ h2_de_t_vs_t_simu

std::unique_ptr<TH2D> CTPPSProtonReconstructionSimulationValidator::PlotGroup::h2_de_t_vs_t_simu

Definition at line 82 of file CTPPSProtonReconstructionSimulationValidator.cc.

Referenced by write().

◆ h_de_t

std::unique_ptr<TH1D> CTPPSProtonReconstructionSimulationValidator::PlotGroup::h_de_t

Definition at line 80 of file CTPPSProtonReconstructionSimulationValidator.cc.

Referenced by write().

◆ h_de_th_x

std::unique_ptr<TH1D> CTPPSProtonReconstructionSimulationValidator::PlotGroup::h_de_th_x

Definition at line 71 of file CTPPSProtonReconstructionSimulationValidator.cc.

Referenced by write().

◆ h_de_th_y

std::unique_ptr<TH1D> CTPPSProtonReconstructionSimulationValidator::PlotGroup::h_de_th_y

Definition at line 74 of file CTPPSProtonReconstructionSimulationValidator.cc.

Referenced by write().

◆ h_de_vtx_y

std::unique_ptr<TH1D> CTPPSProtonReconstructionSimulationValidator::PlotGroup::h_de_vtx_y

Definition at line 77 of file CTPPSProtonReconstructionSimulationValidator.cc.

Referenced by write().

◆ h_de_xi

std::unique_ptr<TH1D> CTPPSProtonReconstructionSimulationValidator::PlotGroup::h_de_xi

Definition at line 67 of file CTPPSProtonReconstructionSimulationValidator.cc.

Referenced by write().

◆ h_xi_reco_vs_xi_simu

std::unique_ptr<TH2D> CTPPSProtonReconstructionSimulationValidator::PlotGroup::h_xi_reco_vs_xi_simu

Definition at line 69 of file CTPPSProtonReconstructionSimulationValidator.cc.

Referenced by write().

◆ p_de_t_vs_t_simu

std::unique_ptr<TProfile> CTPPSProtonReconstructionSimulationValidator::PlotGroup::p_de_t_vs_t_simu

Definition at line 81 of file CTPPSProtonReconstructionSimulationValidator.cc.

Referenced by write().

◆ p_de_t_vs_xi_simu

std::unique_ptr<TProfile> CTPPSProtonReconstructionSimulationValidator::PlotGroup::p_de_t_vs_xi_simu

Definition at line 81 of file CTPPSProtonReconstructionSimulationValidator.cc.

Referenced by write().

◆ p_de_th_x_vs_xi_simu

std::unique_ptr<TProfile> CTPPSProtonReconstructionSimulationValidator::PlotGroup::p_de_th_x_vs_xi_simu

Definition at line 72 of file CTPPSProtonReconstructionSimulationValidator.cc.

Referenced by write().

◆ p_de_th_y_vs_xi_simu

std::unique_ptr<TProfile> CTPPSProtonReconstructionSimulationValidator::PlotGroup::p_de_th_y_vs_xi_simu

Definition at line 75 of file CTPPSProtonReconstructionSimulationValidator.cc.

Referenced by write().

◆ p_de_vtx_y_vs_xi_simu

std::unique_ptr<TProfile> CTPPSProtonReconstructionSimulationValidator::PlotGroup::p_de_vtx_y_vs_xi_simu

Definition at line 78 of file CTPPSProtonReconstructionSimulationValidator.cc.

Referenced by write().

◆ p_de_xi_vs_xi_simu

std::unique_ptr<TProfile> CTPPSProtonReconstructionSimulationValidator::PlotGroup::p_de_xi_vs_xi_simu

Definition at line 68 of file CTPPSProtonReconstructionSimulationValidator.cc.

Referenced by write().