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 70 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

Constructor & Destructor Documentation

◆ ArmData()

CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::ArmData ( )
inline

Definition at line 114 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

115  {F} - x_{N} (mm)", 200, -1., +1.)),
116  h_de_y(new TH1D("", ";y_{F} - y_{N} (mm)", 200, -1., +1.)),
117  h2_de_y_vs_de_x(new TH2D("", ";x_{F} - x_{N} (mm);y_{F} - y_{N} (mm)", 100, -1., +1., 100, -1., +1.)),
118 
119  de_x_mean(0.),
120  de_x_sigma(0.),
121  de_y_mean(0.),
122  de_y_sigma(0.) {
123  for (unsigned int nep = 0; nep <= n_exp_prot_max; ++nep) {
124  for (unsigned int nsi = 0; nsi < n_sigmas.size(); ++nsi) {
125  effPlots[nep][nsi] = EffPlots();
126  }
127  }
128  }
129 
130  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 177 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

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

References protons_cff::decRPId, AlCaHLTBitMon_ParallelJobs::p, profile_2016_postTS2_cff::rpId, and rpId_N.

◆ write()

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

Definition at line 132 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

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

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 80 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

Referenced by write().

◆ de_x_sigma

double CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::de_x_sigma

Definition at line 80 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

Referenced by write().

◆ de_y_mean

double CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::de_y_mean

Definition at line 81 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

Referenced by write().

◆ de_y_sigma

double CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::de_y_sigma

Definition at line 81 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

Referenced by write().

◆ effPlots

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

Definition at line 112 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 85 of file CTPPSProtonReconstructionEfficiencyEstimatorData.cc.

Referenced by ArmData().

◆ n_sigmas

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

Definition at line 83 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 71 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:73
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::de_x_sigma
double de_x_sigma
Definition: CTPPSProtonReconstructionEfficiencyEstimatorData.cc:80
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::de_x_mean
double de_x_mean
Definition: CTPPSProtonReconstructionEfficiencyEstimatorData.cc:80
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:112
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::de_y_sigma
double de_y_sigma
Definition: CTPPSProtonReconstructionEfficiencyEstimatorData.cc:81
LHCOpticalFunctionsSet::exd
Definition: LHCOpticalFunctionsSet.h:16
N
#define N
Definition: blowfish.cc:9
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::UpdateOptics
void UpdateOptics(const LHCInterpolatedOpticalFunctionsSetCollection &ofc)
Definition: CTPPSProtonReconstructionEfficiencyEstimatorData.cc:177
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CTPPSDetId
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:31
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::de_y_mean
double de_y_mean
Definition: CTPPSProtonReconstructionEfficiencyEstimatorData.cc:81
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
visDQMUpload.buf
buf
Definition: visDQMUpload.py:160
profile_2016_postTS2_cff.rpId
rpId
Definition: profile_2016_postTS2_cff.py:21
protons_cff.decRPId
decRPId
Definition: protons_cff.py:56
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::n_sigmas
std::vector< double > n_sigmas
Definition: CTPPSProtonReconstructionEfficiencyEstimatorData.cc:83
CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData::rpId_N
unsigned int rpId_N
Definition: CTPPSProtonReconstructionEfficiencyEstimatorData.cc:71
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