CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Public Attributes
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData Struct Reference

Classes

struct  EffPlots
 

Public Member Functions

 ArmData ()
 
void UpdateOptics (const LHCInterpolatedOpticalFunctionsSetCollection &ofc)
 
void write () const
 

Public Attributes

double de_x_mean
 
double de_x_sigma
 
double de_y_mean
 
double de_y_sigma
 
std::map< unsigned int, std::map< unsigned int, EffPlots > > effPlots
 
std::unique_ptr< TH2D > h2_de_y_vs_de_x
 
std::unique_ptr< TH1D > h_de_x
 
std::unique_ptr< TH1D > h_de_y
 
unsigned int n_events_with_tracks
 
unsigned int n_exp_prot_max
 
std::vector< double > n_sigmas
 
unsigned int rpId_F
 
unsigned int rpId_N
 
std::shared_ptr< const TSpline3 > s_x_to_xi_N
 

Detailed Description

Definition at line 72 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

Constructor & Destructor Documentation

◆ ArmData()

CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::ArmData ( )
inline

Definition at line 116 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

117  {F} - x_{N} (mm)", 200, -1., +1.)),
118  h_de_y(new TH1D("", ";y_{F} - y_{N} (mm)", 200, -1., +1.)),
119  h2_de_y_vs_de_x(new TH2D("", ";x_{F} - x_{N} (mm);y_{F} - y_{N} (mm)", 100, -1., +1., 100, -1., +1.)),
120 
121  de_x_mean(0.),
122  de_x_sigma(0.),
123  de_y_mean(0.),
124  de_y_sigma(0.) {
125  for (unsigned int nep = 0; nep <= n_exp_prot_max; ++nep) {
126  for (unsigned int nsi = 0; nsi < n_sigmas.size(); ++nsi) {
127  effPlots[nep][nsi] = EffPlots();
128  }
129  }
130  }
131 
132  void write() const {

References effPlots, n_exp_prot_max, and n_sigmas.

Member Function Documentation

◆ UpdateOptics()

void CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::UpdateOptics ( const LHCInterpolatedOpticalFunctionsSetCollection ofc)
inline

Definition at line 179 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

180  : ofc) {
181  CTPPSDetId rpId(p.first);
182  unsigned int decRPId = rpId.arm() * 100 + rpId.station() * 10 + rpId.rp();
183 
184  if (decRPId == rpId_N) {
185  of = &p.second;
186  break;
187  }
188  }
189 
190  if (!of) {
191  edm::LogError("ArmData::UpdateOptics") << "Cannot find optical functions for RP " << rpId_N;
192  return;
193  }
194 
195  std::vector<double> xiValues =
196  of->getXiValues(); // local copy made since the TSpline constructor needs non-const parameters
197  std::vector<double> xDValues = of->getFcnValues()[LHCOpticalFunctionsSet::exd];
198  s_x_to_xi_N = std::make_shared<TSpline3>("", xDValues.data(), xiValues.data(), xiValues.size());
199  }
200  };
201 

References AlCaHLTBitMon_ParallelJobs::p, year_2016_postTS2_cff::rpId, and rpId_N.

◆ write()

void CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::write ( ) const
inline

Definition at line 134 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

139  : n_sigmas) {
140  sprintf(buf, "g_de_y_vs_de_x_n_si=%.1f", n_si);
141  TGraph *g = new TGraph();
142  g->SetName(buf);
143 
144  g->SetPoint(0, de_x_mean - n_si * de_x_sigma, de_y_mean - n_si * de_y_sigma);
145  g->SetPoint(1, de_x_mean + n_si * de_x_sigma, de_y_mean - n_si * de_y_sigma);
146  g->SetPoint(2, de_x_mean + n_si * de_x_sigma, de_y_mean + n_si * de_y_sigma);
147  g->SetPoint(3, de_x_mean - n_si * de_x_sigma, de_y_mean + n_si * de_y_sigma);
148  g->SetPoint(4, de_x_mean - n_si * de_x_sigma, de_y_mean - n_si * de_y_sigma);
149 
150  g->Write();
151  }
152 
153  TDirectory *d_top = gDirectory;
154 
155  for (const auto &nep_p : effPlots) {
156  if (nep_p.first == 0)
157  sprintf(buf, "exp prot all");
158  else
159  sprintf(buf, "exp prot %u", nep_p.first);
160 
161  TDirectory *d_nep = d_top->mkdir(buf);
162 
163  for (const auto &nsi_p : nep_p.second) {
164  sprintf(buf, "nsi = %.1f", n_sigmas[nsi_p.first]);
165 
166  TDirectory *d_nsi = d_nep->mkdir(buf);
167 
168  gDirectory = d_nsi;
169 
170  nsi_p.second.write();
171  }
172  }
173 
174  gDirectory = d_top;
175  }
176 

References visDQMUpload::buf, de_x_mean, de_x_sigma, de_y_mean, de_y_sigma, and g.

Member Data Documentation

◆ de_x_mean

double CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::de_x_mean

Definition at line 82 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

Referenced by write().

◆ de_x_sigma

double CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::de_x_sigma

Definition at line 82 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

Referenced by write().

◆ de_y_mean

double CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::de_y_mean

Definition at line 83 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

Referenced by write().

◆ de_y_sigma

double CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::de_y_sigma

Definition at line 83 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

Referenced by write().

◆ effPlots

std::map<unsigned int, std::map<unsigned int, EffPlots> > CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::effPlots

Definition at line 114 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

Referenced by ArmData().

◆ h2_de_y_vs_de_x

std::unique_ptr<TH2D> CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::h2_de_y_vs_de_x

◆ h_de_x

std::unique_ptr<TH1D> CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::h_de_x

◆ h_de_y

std::unique_ptr<TH1D> CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::h_de_y

◆ n_events_with_tracks

unsigned int CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::n_events_with_tracks

◆ n_exp_prot_max

unsigned int CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::n_exp_prot_max

Definition at line 87 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

Referenced by ArmData().

◆ n_sigmas

std::vector<double> CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::n_sigmas

Definition at line 85 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

Referenced by ArmData().

◆ rpId_F

unsigned int CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::rpId_F

◆ rpId_N

unsigned int CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::rpId_N

Definition at line 73 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

Referenced by UpdateOptics().

◆ s_x_to_xi_N

std::shared_ptr<const TSpline3> CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::s_x_to_xi_N
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::s_x_to_xi_N
std::shared_ptr< const TSpline3 > s_x_to_xi_N
Definition: CTPPSProtonReconstructionEfficiencyEstimatorData.cc:75
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::de_x_sigma
double de_x_sigma
Definition: CTPPSProtonReconstructionEfficiencyEstimatorData.cc:82
LHCOpticalFunctionsSet::exd
Definition: LHCOpticalFunctionsSet.h:16
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::de_x_mean
double de_x_mean
Definition: CTPPSProtonReconstructionEfficiencyEstimatorData.cc:82
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
year_2016_postTS2_cff.rpId
rpId
Definition: year_2016_postTS2_cff.py:23
LHCInterpolatedOpticalFunctionsSetCollection
Definition: LHCInterpolatedOpticalFunctionsSetCollection.h:10
F
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::effPlots
std::map< unsigned int, std::map< unsigned int, EffPlots > > effPlots
Definition: CTPPSProtonReconstructionEfficiencyEstimatorData.cc:114
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::de_y_sigma
double de_y_sigma
Definition: CTPPSProtonReconstructionEfficiencyEstimatorData.cc:83
N
#define N
Definition: blowfish.cc:9
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::UpdateOptics
void UpdateOptics(const LHCInterpolatedOpticalFunctionsSetCollection &ofc)
Definition: CTPPSProtonReconstructionEfficiencyEstimatorData.cc:179
CTPPSDetId
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:31
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::de_y_mean
double de_y_mean
Definition: CTPPSProtonReconstructionEfficiencyEstimatorData.cc:83
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::n_sigmas
std::vector< double > n_sigmas
Definition: CTPPSProtonReconstructionEfficiencyEstimatorData.cc:85
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::rpId_N
unsigned int rpId_N
Definition: CTPPSProtonReconstructionEfficiencyEstimatorData.cc:73
g
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