CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Public Attributes
CTPPSTrackDistributionPlotter::ArmPlots Struct Reference

Classes

struct  Stat
 

Public Member Functions

 ArmPlots ()
 
void fill (double x_N, double y_N, double x_F, double y_F)
 
void write () const
 

Static Public Member Functions

static std::unique_ptr< TH1D > buildRMSHistogram (const std::unique_ptr< TProfile > &p)
 
static std::unique_ptr< TH2D > buildRMSHistogram (const std::unique_ptr< TProfile2D > &p)
 

Public Attributes

std::unique_ptr< TH2D > h2_de_x_vs_x
 
std::unique_ptr< TH2D > h2_de_y_vs_de_x
 
std::unique_ptr< TH2D > h2_de_y_vs_x
 
std::unique_ptr< TH1D > h_de_x
 
std::unique_ptr< TH1D > h_de_y
 
std::map< unsigned int, std::map< unsigned int, Stat > > m_stat
 
std::unique_ptr< TProfile2D > p2_de_x_vs_x_y
 
std::unique_ptr< TProfile2D > p2_de_y_vs_x_y
 
std::unique_ptr< TProfile > p_de_x_vs_x
 
std::unique_ptr< TProfile > p_de_x_vs_y
 
std::unique_ptr< TProfile > p_de_y_vs_x
 
std::unique_ptr< TProfile > p_de_y_vs_y
 
unsigned int rpId_F
 
unsigned int rpId_N
 

Detailed Description

Definition at line 120 of file CTPPSTrackDistributionPlotter.cc.

Constructor & Destructor Documentation

◆ ArmPlots()

CTPPSTrackDistributionPlotter::ArmPlots::ArmPlots ( )
inline

Definition at line 136 of file CTPPSTrackDistributionPlotter.cc.

137  : h_de_x(new TH1D("", ";x^{F} - x^{N}", 100, -1., +1.)),
138  h_de_y(new TH1D("", ";y^{F} - y^{N}", 100, -1., +1.)),
139 
140  p_de_x_vs_x(new TProfile("", ";x^{N};x^{F} - x^{N}", 80, 0., 40., "s")),
141  p_de_y_vs_x(new TProfile("", ";x^{N};y^{F} - y^{N}", 80, 0., 40., "s")),
142 
143  p_de_x_vs_y(new TProfile("", ";y^{N};x^{F} - x^{N}", 80, -20., +20., "s")),
144  p_de_y_vs_y(new TProfile("", ";y^{N};y^{F} - y^{N}", 80, -20., +20., "s")),
145 
146  p2_de_x_vs_x_y(new TProfile2D("", ";x;y;x^{F} - x^{N}", 80, 0., 40., 80, -20., +20., "s")),
147  p2_de_y_vs_x_y(new TProfile2D("", ";x;y;y^{F} - y^{N}", 80, 0., 40., 80, -20., +20., "s")),
148 
149  h2_de_x_vs_x(new TH2D("", ";x^{N};x^{F} - x^{N}", 80, 0., 40., 100, -1., +1.)),
150  h2_de_y_vs_x(new TH2D("", ";x^{N};y^{F} - y^{N}", 80, 0., 40., 100, -1., +1.)),
151  h2_de_y_vs_de_x(new TH2D("", ";x^{F} - x^{N};y^{F} - y^{N}", 100, -1., +1., 100, -1., +1.)) {}

Member Function Documentation

◆ buildRMSHistogram() [1/2]

static std::unique_ptr<TH1D> CTPPSTrackDistributionPlotter::ArmPlots::buildRMSHistogram ( const std::unique_ptr< TProfile > &  p)
inlinestatic

Definition at line 213 of file CTPPSTrackDistributionPlotter.cc.

References convertSQLitetoXML_cfg::output, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by write().

213  {
214  std::unique_ptr<TH1D> output =
215  std::make_unique<TH1D>("", p->GetTitle(), p->GetNbinsX(), p->GetXaxis()->GetXmin(), p->GetXaxis()->GetXmax());
216 
217  for (int bi = 1; bi <= output->GetNbinsX(); ++bi)
218  output->SetBinContent(bi, p->GetBinError(bi));
219 
220  return output;
221  }
Definition: output.py:1

◆ buildRMSHistogram() [2/2]

static std::unique_ptr<TH2D> CTPPSTrackDistributionPlotter::ArmPlots::buildRMSHistogram ( const std::unique_ptr< TProfile2D > &  p)
inlinestatic

Definition at line 223 of file CTPPSTrackDistributionPlotter.cc.

References convertSQLitetoXML_cfg::output, and AlCaHLTBitMon_ParallelJobs::p.

223  {
224  std::unique_ptr<TH2D> output = std::make_unique<TH2D>("",
225  p->GetTitle(),
226  p->GetNbinsX(),
227  p->GetXaxis()->GetXmin(),
228  p->GetXaxis()->GetXmax(),
229  p->GetNbinsY(),
230  p->GetYaxis()->GetXmin(),
231  p->GetYaxis()->GetXmax());
232 
233  for (int bi_x = 1; bi_x <= output->GetNbinsX(); ++bi_x)
234  for (int bi_y = 1; bi_y <= output->GetNbinsY(); ++bi_y)
235  output->SetBinContent(bi_x, bi_y, p->GetBinError(bi_x, bi_y));
236 
237  return output;
238  }
Definition: output.py:1

◆ fill()

void CTPPSTrackDistributionPlotter::ArmPlots::fill ( double  x_N,
double  y_N,
double  x_F,
double  y_F 
)
inline

Definition at line 153 of file CTPPSTrackDistributionPlotter.cc.

References h2_de_x_vs_x, h2_de_y_vs_de_x, h2_de_y_vs_x, h_de_x, h_de_y, p2_de_x_vs_x_y, p2_de_y_vs_x_y, p_de_x_vs_x, p_de_x_vs_y, p_de_y_vs_x, and p_de_y_vs_y.

153  {
154  h_de_x->Fill(x_F - x_N);
155  h_de_y->Fill(y_F - y_N);
156 
157  p_de_x_vs_x->Fill(x_N, x_F - x_N);
158  p_de_y_vs_x->Fill(x_N, y_F - y_N);
159 
160  p_de_x_vs_y->Fill(y_N, x_F - x_N);
161  p_de_y_vs_y->Fill(y_N, y_F - y_N);
162 
163  p2_de_x_vs_x_y->Fill(x_N, y_N, x_F - x_N);
164  p2_de_y_vs_x_y->Fill(x_N, y_N, y_F - y_N);
165 
166  h2_de_x_vs_x->Fill(x_N, x_F - x_N);
167  h2_de_y_vs_x->Fill(x_N, y_F - y_N);
168 
169  h2_de_y_vs_de_x->Fill(x_F - x_N, y_F - y_N);
170  }

◆ write()

void CTPPSTrackDistributionPlotter::ArmPlots::write ( ) const
inline

Definition at line 172 of file CTPPSTrackDistributionPlotter.cc.

References visDQMUpload::buf, buildRMSHistogram(), g, h2_de_x_vs_x, h2_de_y_vs_de_x, h2_de_y_vs_x, h_de_x, h_de_y, heavyIonCSV_trainingSettings::idx, visualization-live-secondInstance_cfg::m, m_stat, p2_de_x_vs_x_y, p2_de_y_vs_x_y, p_de_x_vs_x, p_de_x_vs_y, p_de_y_vs_x, and p_de_y_vs_y.

172  {
173  h_de_x->Write("h_de_x");
174  h_de_y->Write("h_de_y");
175 
176  p_de_x_vs_x->Write("p_de_x_vs_x");
177  buildRMSHistogram(p_de_x_vs_x)->Write("h_rms_de_x_vs_x");
178  p_de_y_vs_x->Write("p_de_y_vs_x");
179  buildRMSHistogram(p_de_y_vs_x)->Write("h_rms_de_y_vs_x");
180 
181  p_de_x_vs_y->Write("p_de_x_vs_y");
182  buildRMSHistogram(p_de_x_vs_y)->Write("h_rms_de_x_vs_y");
183  p_de_y_vs_y->Write("p_de_y_vs_y");
184  buildRMSHistogram(p_de_y_vs_y)->Write("h_rms_de_y_vs_y");
185 
186  p2_de_x_vs_x_y->Write("p2_de_x_vs_x_y");
187  buildRMSHistogram(p2_de_x_vs_x_y)->Write("h2_rms_de_x_vs_x_y");
188  p2_de_y_vs_x_y->Write("p2_de_y_vs_x_y");
189  buildRMSHistogram(p2_de_y_vs_x_y)->Write("h2_rms_de_y_vs_x_y");
190 
191  h2_de_x_vs_x->Write("h2_de_x_vs_x");
192  h2_de_y_vs_x->Write("h2_de_y_vs_x");
193 
194  h2_de_y_vs_de_x->Write("h2_de_y_vs_de_x");
195 
196  for (const auto& rp : m_stat) {
197  TGraph* g = new TGraph();
198 
199  char buf[100];
200  sprintf(buf, "g_mean_track_mult_run_%u", rp.first);
201  g->SetName(buf);
202 
203  for (const auto& lsp : rp.second) {
204  const int idx = g->GetN();
205  const double m = (lsp.second.s1 > 0) ? double(lsp.second.sN) / lsp.second.s1 : 0.;
206  g->SetPoint(idx, lsp.first, m);
207  }
208 
209  g->Write();
210  }
211  }
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
std::map< unsigned int, std::map< unsigned int, Stat > > m_stat
static std::unique_ptr< TH1D > buildRMSHistogram(const std::unique_ptr< TProfile > &p)

Member Data Documentation

◆ h2_de_x_vs_x

std::unique_ptr<TH2D> CTPPSTrackDistributionPlotter::ArmPlots::h2_de_x_vs_x

Definition at line 127 of file CTPPSTrackDistributionPlotter.cc.

Referenced by fill(), and write().

◆ h2_de_y_vs_de_x

std::unique_ptr<TH2D> CTPPSTrackDistributionPlotter::ArmPlots::h2_de_y_vs_de_x

Definition at line 128 of file CTPPSTrackDistributionPlotter.cc.

Referenced by fill(), and write().

◆ h2_de_y_vs_x

std::unique_ptr<TH2D> CTPPSTrackDistributionPlotter::ArmPlots::h2_de_y_vs_x

Definition at line 127 of file CTPPSTrackDistributionPlotter.cc.

Referenced by fill(), and write().

◆ h_de_x

std::unique_ptr<TH1D> CTPPSTrackDistributionPlotter::ArmPlots::h_de_x

Definition at line 123 of file CTPPSTrackDistributionPlotter.cc.

Referenced by fill(), and write().

◆ h_de_y

std::unique_ptr<TH1D> CTPPSTrackDistributionPlotter::ArmPlots::h_de_y

Definition at line 123 of file CTPPSTrackDistributionPlotter.cc.

Referenced by fill(), and write().

◆ m_stat

std::map<unsigned int, std::map<unsigned int, Stat> > CTPPSTrackDistributionPlotter::ArmPlots::m_stat

Definition at line 134 of file CTPPSTrackDistributionPlotter.cc.

Referenced by write().

◆ p2_de_x_vs_x_y

std::unique_ptr<TProfile2D> CTPPSTrackDistributionPlotter::ArmPlots::p2_de_x_vs_x_y

Definition at line 126 of file CTPPSTrackDistributionPlotter.cc.

Referenced by fill(), and write().

◆ p2_de_y_vs_x_y

std::unique_ptr<TProfile2D> CTPPSTrackDistributionPlotter::ArmPlots::p2_de_y_vs_x_y

Definition at line 126 of file CTPPSTrackDistributionPlotter.cc.

Referenced by fill(), and write().

◆ p_de_x_vs_x

std::unique_ptr<TProfile> CTPPSTrackDistributionPlotter::ArmPlots::p_de_x_vs_x

Definition at line 124 of file CTPPSTrackDistributionPlotter.cc.

Referenced by fill(), and write().

◆ p_de_x_vs_y

std::unique_ptr<TProfile> CTPPSTrackDistributionPlotter::ArmPlots::p_de_x_vs_y

Definition at line 125 of file CTPPSTrackDistributionPlotter.cc.

Referenced by fill(), and write().

◆ p_de_y_vs_x

std::unique_ptr<TProfile> CTPPSTrackDistributionPlotter::ArmPlots::p_de_y_vs_x

Definition at line 124 of file CTPPSTrackDistributionPlotter.cc.

Referenced by fill(), and write().

◆ p_de_y_vs_y

std::unique_ptr<TProfile> CTPPSTrackDistributionPlotter::ArmPlots::p_de_y_vs_y

Definition at line 125 of file CTPPSTrackDistributionPlotter.cc.

Referenced by fill(), and write().

◆ rpId_F

unsigned int CTPPSTrackDistributionPlotter::ArmPlots::rpId_F

Definition at line 121 of file CTPPSTrackDistributionPlotter.cc.

◆ rpId_N

unsigned int CTPPSTrackDistributionPlotter::ArmPlots::rpId_N

Definition at line 121 of file CTPPSTrackDistributionPlotter.cc.