CMS 3D CMS Logo

PhiSymmetryCalibration.cc
Go to the documentation of this file.
2 
3 // System include files
4 #include <memory>
5 
6 // Framework
10 
18 
19 // Geometry
24 
25 //Channel status
29 
31 
32 using namespace std;
33 #include <fstream>
34 #include <iostream>
35 #include "TH2F.h"
36 #include "TFile.h"
37 #include "TTree.h"
38 #include "TH1F.h"
39 #include "TF1.h"
40 #include "TGraph.h"
41 #include "TCanvas.h"
42 
45 
46 //_____________________________________________________________________________
47 // Class constructor
48 
50  :
51 
52  ecalHitsProducer_(iConfig.getParameter<std::string>("ecalRecHitsProducer")),
53  barrelHits_(iConfig.getParameter<std::string>("barrelHitCollection")),
54  endcapHits_(iConfig.getParameter<std::string>("endcapHitCollection")),
55  eCut_barl_(iConfig.getParameter<double>("eCut_barrel")),
56  ap_(iConfig.getParameter<double>("ap")),
57  b_(iConfig.getParameter<double>("b")),
58  eventSet_(iConfig.getParameter<int>("eventSet")),
59  statusThreshold_(iConfig.getUntrackedParameter<int>("statusThreshold", 3)),
60  reiteration_(iConfig.getUntrackedParameter<bool>("reiteration", false)),
61  oldcalibfile_(iConfig.getUntrackedParameter<std::string>("oldcalibfile", "EcalintercalibConstants.xml")) {
62  isfirstpass_ = true;
63 
68 
69  spectra = true;
70 
71  nevents_ = 0;
72  eventsinrun_ = 0;
73  eventsinlb_ = 0;
74 }
75 
76 //_____________________________________________________________________________
77 // Close files, etc.
78 
80  for (Int_t i = 0; i < kBarlRings; i++) {
81  delete et_spectrum_b_histos[i];
82  delete e_spectrum_b_histos[i];
83  }
84  for (Int_t i = 0; i < kEndcEtaRings; i++) {
85  delete et_spectrum_e_histos[i];
86  delete e_spectrum_e_histos[i];
87  }
88 }
89 
90 //_____________________________________________________________________________
91 // Initialize algorithm
92 
94  // initialize arrays
95  for (int sign = 0; sign < kSides; sign++) {
96  for (int ieta = 0; ieta < kBarlRings; ieta++) {
97  for (int iphi = 0; iphi < kBarlWedges; iphi++) {
98  etsum_barl_[ieta][iphi][sign] = 0.;
99  nhits_barl_[ieta][iphi][sign] = 0;
100  }
101  }
102  for (int ix = 0; ix < kEndcWedgesX; ix++) {
103  for (int iy = 0; iy < kEndcWedgesY; iy++) {
104  etsum_endc_[ix][iy][sign] = 0.;
105  nhits_endc_[ix][iy][sign] = 0;
106  }
107  }
108  }
109 
110  for (int imiscal = 0; imiscal < kNMiscalBinsEB; imiscal++) {
111  miscalEB_[imiscal] = (1 - kMiscalRangeEB) + float(imiscal) * (2 * kMiscalRangeEB / (kNMiscalBinsEB - 1));
112  for (int ieta = 0; ieta < kBarlRings; ieta++)
113  etsum_barl_miscal_[imiscal][ieta] = 0.;
114  }
115 
116  for (int imiscal = 0; imiscal < kNMiscalBinsEE; imiscal++) {
117  miscalEE_[imiscal] = (1 - kMiscalRangeEE) + float(imiscal) * (2 * kMiscalRangeEE / (kNMiscalBinsEE - 1));
118  for (int ring = 0; ring < kEndcEtaRings; ring++)
119  etsum_endc_miscal_[imiscal][ring] = 0.;
120  }
121 
122  // start spectra stuff
123  if (eventSet_ != 1)
124  spectra = false;
125 
126  if (spectra) {
127  ostringstream t;
128  for (Int_t i = 0; i < kBarlRings; i++) {
129  t << "et_spectrum_b_" << i + 1;
130  et_spectrum_b_histos[i] = new TH1F(t.str().c_str(), ";E_{T} [MeV]", 50, 0., 500.);
131  t.str("");
132 
133  t << "e_spectrum_b_" << i + 1;
134  e_spectrum_b_histos[i] = new TH1F(t.str().c_str(), ";E [MeV]", 50, 0., 500.);
135  t.str("");
136  }
137  for (Int_t i = 0; i < kEndcEtaRings; i++) {
138  t << "et_spectrum_e_" << i + 1;
139  et_spectrum_e_histos[i] = new TH1F(t.str().c_str(), ";E_{T} [MeV]", 75, 0., 1500.);
140  t.str("");
141 
142  t << "e_spectrum_e_" << i + 1;
143  e_spectrum_e_histos[i] = new TH1F(t.str().c_str(), ";E [MeV]", 75, 0., 1500.);
144  t.str("");
145  }
146  }
147  // end spectra stuff
148 }
149 
150 //_____________________________________________________________________________
151 // Terminate algorithm
152 
154  edm::LogInfo("Calibration") << "[PhiSymmetryCalibration] At end of job";
155 
156  // start spectra stuff
157  if (spectra) {
158  TFile f("Espectra_plus.root", "recreate");
159 
160  for (int i = 0; i < kBarlRings; i++) {
161  et_spectrum_b_histos[i]->Write();
162  e_spectrum_b_histos[i]->Write();
163  }
164 
165  for (int i = 0; i < kEndcEtaRings; i++) {
166  et_spectrum_e_histos[i]->Write();
167  e_spectrum_e_histos[i]->Write();
168  }
169 
170  f.Close();
171  }
172 
173  if (eventSet_ == 1) {
174  // calculate factors to convert from fractional deviation of ET sum from
175  // the mean to the estimate of the miscalibration factor
176  getKfactors();
177 
178  std::ofstream k_barl_out("k_barl.dat", ios::out);
179  for (int ieta = 0; ieta < kBarlRings; ieta++)
180  k_barl_out << ieta << " " << k_barl_[ieta] << endl;
181  k_barl_out.close();
182 
183  std::ofstream k_endc_out("k_endc.dat", ios::out);
184  for (int ring = 0; ring < kEndcEtaRings; ring++)
185  k_endc_out << ring << " " << k_endc_[ring] << endl;
186  k_endc_out.close();
187  }
188 
189  if (eventSet_ != 0) {
190  // output ET sums
191 
192  stringstream etsum_file_barl;
193  etsum_file_barl << "etsum_barl_" << eventSet_ << ".dat";
194 
195  std::ofstream etsum_barl_out(etsum_file_barl.str().c_str(), ios::out);
196 
197  for (int ieta = 0; ieta < kBarlRings; ieta++) {
198  for (int iphi = 0; iphi < kBarlWedges; iphi++) {
199  for (int sign = 0; sign < kSides; sign++) {
200  etsum_barl_out << eventSet_ << " " << ieta << " " << iphi << " " << sign << " "
201  << etsum_barl_[ieta][iphi][sign] << " " << nhits_barl_[ieta][iphi][sign] << endl;
202  }
203  }
204  }
205  etsum_barl_out.close();
206 
207  stringstream etsum_file_endc;
208  etsum_file_endc << "etsum_endc_" << eventSet_ << ".dat";
209 
210  std::ofstream etsum_endc_out(etsum_file_endc.str().c_str(), ios::out);
211  for (int ix = 0; ix < kEndcWedgesX; ix++) {
212  for (int iy = 0; iy < kEndcWedgesY; iy++) {
213  int ring = e_.endcapRing_[ix][iy];
214  if (ring != -1) {
215  for (int sign = 0; sign < kSides; sign++) {
216  etsum_endc_out << eventSet_ << " " << ix << " " << iy << " " << sign << " " << etsum_endc_[ix][iy][sign]
217  << " " << nhits_endc_[ix][iy][sign] << " " << e_.endcapRing_[ix][iy] << endl;
218  }
219  }
220  }
221  }
222  etsum_endc_out.close();
223  }
224  cout << "Events processed " << nevents_ << endl;
225 }
226 
227 //_____________________________________________________________________________
228 // Called at each event
229 
231  using namespace edm;
232  using namespace std;
233 
234  if (isfirstpass_) {
235  setUp(setup);
236  isfirstpass_ = false;
237  }
238 
239  Handle<EBRecHitCollection> barrelRecHitsHandle;
240  Handle<EERecHitCollection> endcapRecHitsHandle;
241 
242  event.getByLabel(ecalHitsProducer_, barrelHits_, barrelRecHitsHandle);
243  if (!barrelRecHitsHandle.isValid()) {
244  LogError("") << "[PhiSymmetryCalibration] Error! Can't get product!" << std::endl;
245  }
246 
247  event.getByLabel(ecalHitsProducer_, endcapHits_, endcapRecHitsHandle);
248  if (!endcapRecHitsHandle.isValid()) {
249  LogError("") << "[PhiSymmetryCalibration] Error! Can't get product!" << std::endl;
250  }
251 
252  // get the ecal geometry
253  edm::ESHandle<CaloGeometry> geoHandle;
254  setup.get<CaloGeometryRecord>().get(geoHandle);
255  const CaloSubdetectorGeometry* barrelGeometry = geoHandle->getSubdetectorGeometry(DetId::Ecal, EcalBarrel);
256  const CaloSubdetectorGeometry* endcapGeometry = geoHandle->getSubdetectorGeometry(DetId::Ecal, EcalEndcap);
257 
258  bool pass = false;
259  // select interesting EcalRecHits (barrel)
261  for (itb = barrelRecHitsHandle->begin(); itb != barrelRecHitsHandle->end(); itb++) {
262  EBDetId hit = EBDetId(itb->id());
263  float eta = barrelGeometry->getGeometry(hit)->getPosition().eta();
264  float et = itb->energy() / cosh(eta);
265  float e = itb->energy();
266 
267  // if iterating, correct by the previous calib constants found,
268  // which are supplied in the form of correction
269  if (reiteration_) {
270  et = et * oldCalibs_[hit];
271  e = e * oldCalibs_[hit];
272  }
273 
274  float et_thr = eCut_barl_ / cosh(eta) + 1.;
275 
276  int sign = hit.ieta() > 0 ? 1 : 0;
277 
278  if (e > eCut_barl_ && et < et_thr && e_.goodCell_barl[abs(hit.ieta()) - 1][hit.iphi() - 1][sign]) {
279  etsum_barl_[abs(hit.ieta()) - 1][hit.iphi() - 1][sign] += et;
280  nhits_barl_[abs(hit.ieta()) - 1][hit.iphi() - 1][sign]++;
281  pass = true;
282  } //if energy
283 
284  if (eventSet_ == 1) {
285  // apply a miscalibration to all crystals and increment the
286  // ET sum, combined for all crystals
287  for (int imiscal = 0; imiscal < kNMiscalBinsEB; imiscal++) {
288  if (miscalEB_[imiscal] * e > eCut_barl_ && miscalEB_[imiscal] * et < et_thr &&
289  e_.goodCell_barl[abs(hit.ieta()) - 1][hit.iphi() - 1][sign]) {
290  etsum_barl_miscal_[imiscal][abs(hit.ieta()) - 1] += miscalEB_[imiscal] * et;
291  }
292  }
293 
294  // spectra stuff
295  if (spectra && hit.ieta() > 0) //POSITIVE!!!
296  // if(spectra && hit.ieta()<0) //NEGATIVE!!!
297  {
298  et_spectrum_b_histos[abs(hit.ieta()) - 1]->Fill(et * 1000.);
299  e_spectrum_b_histos[abs(hit.ieta()) - 1]->Fill(e * 1000.);
300  } //if spectra
301 
302  } //if eventSet_==1
303  } //for barl
304 
305  // select interesting EcalRecHits (endcaps)
307  for (ite = endcapRecHitsHandle->begin(); ite != endcapRecHitsHandle->end(); ite++) {
308  EEDetId hit = EEDetId(ite->id());
309  float eta = abs(endcapGeometry->getGeometry(hit)->getPosition().eta());
310  //float phi = endcapGeometry->getGeometry(hit)->getPosition().phi();
311 
312  float et = ite->energy() / cosh(eta);
313  float e = ite->energy();
314 
315  // if iterating, multiply by the previous correction factor
316  if (reiteration_) {
317  et = et * oldCalibs_[hit];
318  e = e * oldCalibs_[hit];
319  }
320 
321  int sign = hit.zside() > 0 ? 1 : 0;
322 
323  // changes of eCut_endc_ -> variable linearthr
324  // e_cut = ap + eta_ring*b
325 
326  double eCut_endc = 0;
327  for (int ring = 0; ring < kEndcEtaRings; ring++) {
328  if (eta > e_.etaBoundary_[ring] && eta < e_.etaBoundary_[ring + 1]) {
329  float eta_ring = abs(e_.cellPos_[ring][50].eta());
330  eCut_endc = ap_ + eta_ring * b_;
331  }
332  }
333 
334  float et_thr = eCut_endc / cosh(eta) + 1.;
335 
336  if (e > eCut_endc && et < et_thr && e_.goodCell_endc[hit.ix() - 1][hit.iy() - 1][sign]) {
337  etsum_endc_[hit.ix() - 1][hit.iy() - 1][sign] += et;
338  nhits_endc_[hit.ix() - 1][hit.iy() - 1][sign]++;
339  pass = true;
340  }
341 
342  if (eventSet_ == 1) {
343  // apply a miscalibration to all crystals and increment the
344  // ET sum, combined for all crystals
345  for (int imiscal = 0; imiscal < kNMiscalBinsEE; imiscal++) {
346  if (miscalEE_[imiscal] * e > eCut_endc && et * miscalEE_[imiscal] < et_thr &&
347  e_.goodCell_endc[hit.ix() - 1][hit.iy() - 1][sign]) {
348  int ring = e_.endcapRing_[hit.ix() - 1][hit.iy() - 1];
349  etsum_endc_miscal_[imiscal][ring] += miscalEE_[imiscal] * et;
350  }
351  }
352 
353  // spectra stuff
354  if (spectra && hit.zside() > 0) //POSITIVE!!!
355 
356  {
357  int ring = e_.endcapRing_[hit.ix() - 1][hit.iy() - 1];
358 
359  et_spectrum_e_histos[ring]->Fill(et * 1000.);
360  e_spectrum_e_histos[ring]->Fill(e * 1000.);
361 
362  if (ring == 16) {
363  //int iphi_endc = 0;
364  for (int ip = 0; ip < e_.nRing_[ring]; ip++) {
365  //if (phi==e_.phi_endc_[ip][ring]) iphi_endc=ip;
366  }
367  }
368  } //if spectra
369 
370  } //if eventSet_==1
371  } //for endc
372 
373  if (pass) {
374  nevents_++;
375  eventsinrun_++;
376  eventsinlb_++;
377  }
378 }
379 
381  std::cout << "PHIREPRT : run " << run.run() << " start " << (run.beginTime().value() >> 32) << " end "
382  << (run.endTime().value() >> 32) << " dur "
383  << (run.endTime().value() >> 32) - (run.beginTime().value() >> 32)
384 
385  << " npass " << eventsinrun_ << std::endl;
386  eventsinrun_ = 0;
387 
388  return;
389 }
390 
391 //_____________________________________________________________________________
392 
394  float epsilon_T_eb[kNMiscalBinsEB];
395  float epsilon_M_eb[kNMiscalBinsEB];
396 
397  float epsilon_T_ee[kNMiscalBinsEE];
398  float epsilon_M_ee[kNMiscalBinsEE];
399 
400  std::vector<TGraph*> k_barl_graph(kBarlRings);
401  std::vector<TCanvas*> k_barl_plot(kBarlRings);
402 
403  //Create our own TF1 to avoid threading problems
404  TF1 mypol1("mypol1", "pol1");
405  for (int ieta = 0; ieta < kBarlRings; ieta++) {
406  for (int imiscal = 0; imiscal < kNMiscalBinsEB; imiscal++) {
407  int middlebin = int(kNMiscalBinsEB / 2);
408  epsilon_T_eb[imiscal] = etsum_barl_miscal_[imiscal][ieta] / etsum_barl_miscal_[middlebin][ieta] - 1.;
409  epsilon_M_eb[imiscal] = miscalEB_[imiscal] - 1.;
410  }
411  k_barl_graph[ieta] = new TGraph(kNMiscalBinsEB, epsilon_M_eb, epsilon_T_eb);
412  k_barl_graph[ieta]->Fit(&mypol1);
413 
414  ostringstream t;
415  t << "k_barl_" << ieta + 1;
416  k_barl_plot[ieta] = new TCanvas(t.str().c_str(), "");
417  k_barl_plot[ieta]->SetFillColor(10);
418  k_barl_plot[ieta]->SetGrid();
419  k_barl_graph[ieta]->SetMarkerSize(1.);
420  k_barl_graph[ieta]->SetMarkerColor(4);
421  k_barl_graph[ieta]->SetMarkerStyle(20);
422  k_barl_graph[ieta]->GetXaxis()->SetLimits(-1. * kMiscalRangeEB, kMiscalRangeEB);
423  k_barl_graph[ieta]->GetXaxis()->SetTitleSize(.05);
424  k_barl_graph[ieta]->GetYaxis()->SetTitleSize(.05);
425  k_barl_graph[ieta]->GetXaxis()->SetTitle("#epsilon_{M}");
426  k_barl_graph[ieta]->GetYaxis()->SetTitle("#epsilon_{T}");
427  k_barl_graph[ieta]->Draw("AP");
428 
429  k_barl_[ieta] = k_barl_graph[ieta]->GetFunction("pol1")->GetParameter(1);
430  std::cout << "k_barl_[" << ieta << "]=" << k_barl_[ieta] << std::endl;
431  }
432 
433  std::vector<TGraph*> k_endc_graph(kEndcEtaRings);
434  std::vector<TCanvas*> k_endc_plot(kEndcEtaRings);
435 
436  for (int ring = 0; ring < kEndcEtaRings; ring++) {
437  for (int imiscal = 0; imiscal < kNMiscalBinsEE; imiscal++) {
438  int middlebin = int(kNMiscalBinsEE / 2);
439  epsilon_T_ee[imiscal] = etsum_endc_miscal_[imiscal][ring] / etsum_endc_miscal_[middlebin][ring] - 1.;
440  epsilon_M_ee[imiscal] = miscalEE_[imiscal] - 1.;
441  }
442  k_endc_graph[ring] = new TGraph(kNMiscalBinsEE, epsilon_M_ee, epsilon_T_ee);
443  k_endc_graph[ring]->Fit(&mypol1);
444 
445  ostringstream t;
446  t << "k_endc_" << ring + 1;
447  k_endc_plot[ring] = new TCanvas(t.str().c_str(), "");
448  k_endc_plot[ring]->SetFillColor(10);
449  k_endc_plot[ring]->SetGrid();
450  k_endc_graph[ring]->SetMarkerSize(1.);
451  k_endc_graph[ring]->SetMarkerColor(4);
452  k_endc_graph[ring]->SetMarkerStyle(20);
453  k_endc_graph[ring]->GetXaxis()->SetLimits(-1 * kMiscalRangeEE, kMiscalRangeEE);
454  k_endc_graph[ring]->GetXaxis()->SetTitleSize(.05);
455  k_endc_graph[ring]->GetYaxis()->SetTitleSize(.05);
456  k_endc_graph[ring]->GetXaxis()->SetTitle("#epsilon_{M}");
457  k_endc_graph[ring]->GetYaxis()->SetTitle("#epsilon_{T}");
458  k_endc_graph[ring]->Draw("AP");
459 
460  k_endc_[ring] = k_endc_graph[ring]->GetFunction("pol1")->GetParameter(1);
461  std::cout << "k_endc_[" << ring << "]=" << k_endc_[ring] << std::endl;
462  }
463 
464  TFile f("PhiSymmetryCalibration_kFactors.root", "recreate");
465  for (int ieta = 0; ieta < kBarlRings; ieta++) {
466  k_barl_plot[ieta]->Write();
467  delete k_barl_plot[ieta];
468  delete k_barl_graph[ieta];
469  }
470  for (int ring = 0; ring < kEndcEtaRings; ring++) {
471  k_endc_plot[ring]->Write();
472  delete k_endc_plot[ring];
473  delete k_endc_graph[ring];
474  }
475  f.Close();
476 }
477 
478 //_____________________________________________________________________________
479 
482  setup.get<EcalChannelStatusRcd>().get(chStatus);
483 
484  edm::ESHandle<CaloGeometry> geoHandle;
485  setup.get<CaloGeometryRecord>().get(geoHandle);
486 
487  e_.setup(&(*geoHandle), &(*chStatus), statusThreshold_);
488 
489  if (reiteration_) {
491  // namespace fs = boost::filesystem;
492  // fs::path p(oldcalibfile_.c_str(),fs::native);
493  // if (!fs::exists(p)) edm::LogError("PhiSym") << "File not found: "
494  // << oldcalibfile_ <<endl;
495 
496  edm::FileInPath fip("Calibration/EcalCalibAlgos/data/" + oldcalibfile_);
497 
499  if (ret)
500  edm::LogError("PhiSym") << "Error reading XML files" << endl;
501  ;
502 
503  } else {
504  // in fact if not reiterating, oldCalibs_ will never be used
506  setup.get<EcalIntercalibConstantsRcd>().get(pIcal);
507  oldCalibs_ = *pIcal;
508  }
509 }
510 
512  if ((lb.endTime().value() >> 32) - (lb.beginTime().value() >> 32) < 60)
513  return;
514 
515  std::cout << "PHILB : run " << lb.run() << " id " << lb.id() << " start " << (lb.beginTime().value() >> 32) << " end "
516  << (lb.endTime().value() >> 32) << " dur " << (lb.endTime().value() >> 32) - (lb.beginTime().value() >> 32)
517 
518  << " npass " << eventsinlb_ << std::endl;
519 
520  eventsinlb_ = 0;
521 }
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:543
PhiSymmetryCalibration::ap_
double ap_
Definition: PhiSymmetryCalibration.h:122
kBarlRings
static const int kBarlRings
Definition: EcalGeomPhiSymHelper.h:7
PhiSymmetryCalibration::PhiSymmetryCalibration
PhiSymmetryCalibration(const edm::ParameterSet &iConfig)
Constructor.
Definition: PhiSymmetryCalibration.cc:49
electrons_cff.bool
bool
Definition: electrons_cff.py:366
mps_fire.i
i
Definition: mps_fire.py:428
edm::SortedCollection< EcalRecHit >::const_iterator
std::vector< EcalRecHit >::const_iterator const_iterator
Definition: SortedCollection.h:80
MessageLogger.h
funct::false
false
Definition: Factorize.h:29
PhiSymmetryCalibration::getKfactors
void getKfactors()
Definition: PhiSymmetryCalibration.cc:393
ESHandle.h
PhiSymmetryCalibration::nhits_endc_
unsigned int nhits_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
Definition: PhiSymmetryCalibration.h:79
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
LuminosityBlock.h
EBDetId
Definition: EBDetId.h:17
edm
HLT enums.
Definition: AlignableModifier.h:19
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::LuminosityBlockBase::beginTime
Timestamp const & beginTime() const
Definition: LuminosityBlockBase.h:46
EBDetId.h
EEDetId.h
PhiSymmetryCalibration::etsum_barl_
double etsum_barl_[kBarlRings][kBarlWedges][kSides]
Definition: PhiSymmetryCalibration.h:72
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
PhiSymmetryCalibration::miscalEB_
double miscalEB_[kNMiscalBinsEB]
Definition: PhiSymmetryCalibration.h:90
Validation_hcalonly_cfi.sign
sign
Definition: Validation_hcalonly_cfi.py:32
EcalIntercalibConstantsXMLTranslator.h
edm::Timestamp::value
TimeValue_t value() const
Definition: Timestamp.h:45
edm::LuminosityBlockBase::run
RunNumber_t run() const
Definition: LuminosityBlockBase.h:42
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
PhiSymmetryCalibration::e_
EcalGeomPhiSymHelper e_
Definition: PhiSymmetryCalibration.h:69
EcalGeomPhiSymHelper::goodCell_endc
bool goodCell_endc[kEndcWedgesX][kEndcWedgesX][kSides]
Definition: EcalGeomPhiSymHelper.h:34
h
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
EcalGeomPhiSymHelper::goodCell_barl
bool goodCell_barl[kBarlRings][kBarlWedges][kSides]
Definition: EcalGeomPhiSymHelper.h:33
EcalFloatCondObjectContainerXMLTranslator::readXML
static int readXML(const std::string &filename, EcalCondHeader &header, EcalFloatCondObjectContainer &record)
Definition: EcalFloatCondObjectContainerXMLTranslator.cc:23
edm::Handle
Definition: AssociativeIterator.h:50
PhiSymmetryCalibration::kNMiscalBinsEE
static const int kNMiscalBinsEE
Definition: PhiSymmetryCalibration.h:66
PhiSymmetryCalibration::e_spectrum_e_histos
std::vector< TH1F * > e_spectrum_e_histos
Definition: PhiSymmetryCalibration.h:145
kEndcWedgesY
static const int kEndcWedgesY
Definition: EcalGeomPhiSymHelper.h:12
PhiSymmetryCalibration::isfirstpass_
bool isfirstpass_
Definition: PhiSymmetryCalibration.h:139
EcalBarrel
Definition: EcalSubdetector.h:10
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
EcalRecHitCollections.h
PhiSymmetryCalibration::eCut_barl_
double eCut_barl_
Definition: PhiSymmetryCalibration.h:119
EcalGeomPhiSymHelper::cellPos_
GlobalPoint cellPos_[kEndcWedgesX][kEndcWedgesY]
Definition: EcalGeomPhiSymHelper.h:23
PhiSymmetryCalibration::nevents_
int nevents_
Definition: PhiSymmetryCalibration.h:148
PhiSymmetryCalibration::oldcalibfile_
std::string oldcalibfile_
Definition: PhiSymmetryCalibration.h:134
EcalGeomPhiSymHelper::etaBoundary_
double etaBoundary_[kEndcEtaRings+1]
Definition: EcalGeomPhiSymHelper.h:28
PhiSymmetryCalibration::eventsinrun_
int eventsinrun_
Definition: PhiSymmetryCalibration.h:149
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
EcalGeomPhiSymHelper::setup
void setup(const CaloGeometry *geometry, const EcalChannelStatus *chstatus, int statusThreshold)
Definition: EcalGeomPhiSymHelper.cc:18
EcalIntercalibErrors.h
PhiSymmetryCalibration::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Called at each event.
Definition: PhiSymmetryCalibration.cc:230
PhiSymmetryCalibration::eventsinlb_
int eventsinlb_
Definition: PhiSymmetryCalibration.h:150
edm::FileInPath
Definition: FileInPath.h:61
PhiSymmetryCalibration::etsum_endc_
double etsum_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
Definition: PhiSymmetryCalibration.h:73
PhiSymmetryCalibration::endJob
void endJob() override
Called at end of job.
Definition: PhiSymmetryCalibration.cc:153
edm::LuminosityBlockBase::endTime
Timestamp const & endTime() const
Definition: LuminosityBlockBase.h:47
PhiSymmetryCalibration::miscalEE_
double miscalEE_[kNMiscalBinsEE]
Definition: PhiSymmetryCalibration.h:91
PhiSymmetryCalibration::k_barl_
double k_barl_[kBarlRings]
Definition: PhiSymmetryCalibration.h:88
PhiSymmetryCalibration::kMiscalRangeEE
static const float kMiscalRangeEE
Definition: PhiSymmetryCalibration.h:67
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
PVValHelper::eta
Definition: PVValidationHelpers.h:70
PhiSymmetryCalibration::endRun
void endRun(edm::Run const &, const edm::EventSetup &) override
Definition: PhiSymmetryCalibration.cc:380
EcalGeomPhiSymHelper::endcapRing_
int endcapRing_[kEndcWedgesX][kEndcWedgesY]
Definition: EcalGeomPhiSymHelper.h:29
Run.h
edm::ESHandle< CaloGeometry >
PhiSymmetryCalibration::kMiscalRangeEB
static const float kMiscalRangeEB
Definition: PhiSymmetryCalibration.h:64
PhiSymmetryCalibration::beginJob
void beginJob() override
Called at beginning of job.
Definition: PhiSymmetryCalibration.cc:93
PhiSymmetryCalibration::kNMiscalBinsEB
static const int kNMiscalBinsEB
Definition: PhiSymmetryCalibration.h:63
EEDetId
Definition: EEDetId.h:14
CaloGeometryRecord.h
EcalEndcap
Definition: EcalSubdetector.h:10
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
CaloSubdetectorGeometry.h
edm::ParameterSet
Definition: ParameterSet.h:47
PhiSymmetryCalibration::~PhiSymmetryCalibration
~PhiSymmetryCalibration() override
Destructor.
Definition: PhiSymmetryCalibration.cc:79
PhiSymmetryCalibration::spectra
bool spectra
Definition: PhiSymmetryCalibration.h:147
EcalChannelStatusRcd
Definition: EcalChannelStatusRcd.h:5
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
EcalCondHeader
Definition: EcalCondHeader.h:16
PhiSymmetryCalibration.h
PhiSymmetryCalibration::endLuminosityBlock
void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: PhiSymmetryCalibration.cc:511
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
createfilelist.int
int
Definition: createfilelist.py:10
edm::LuminosityBlockBase::id
LuminosityBlockID id() const
Definition: LuminosityBlockBase.h:44
PhiSymmetryCalibration::setUp
void setUp(const edm::EventSetup &setup)
Definition: PhiSymmetryCalibration.cc:480
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
CaloSubdetectorGeometry::getGeometry
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
Definition: CaloSubdetectorGeometry.cc:36
edm::EventSetup
Definition: EventSetup.h:58
kEndcEtaRings
static const int kEndcEtaRings
Definition: EcalGeomPhiSymHelper.h:14
PhiSymmetryCalibration::reiteration_
bool reiteration_
Definition: PhiSymmetryCalibration.h:133
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DetId::Ecal
Definition: DetId.h:27
get
#define get
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalObjRepresent::Fill
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1053
kSides
static const int kSides
Definition: EcalGeomPhiSymHelper.h:9
PhiSymmetryCalibration::et_spectrum_b_histos
std::vector< TH1F * > et_spectrum_b_histos
Definition: PhiSymmetryCalibration.h:142
CaloCellGeometry.h
kEndcWedgesX
static const int kEndcWedgesX
Definition: EcalGeomPhiSymHelper.h:11
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
PhiSymmetryCalibration::oldCalibs_
EcalIntercalibConstants oldCalibs_
the old calibration constants (when reiterating, the last ones derived)
Definition: PhiSymmetryCalibration.h:137
CaloGeometry.h
PhiSymmetryCalibration::eventSet_
int eventSet_
Definition: PhiSymmetryCalibration.h:125
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
PhiSymmetryCalibration::e_spectrum_b_histos
std::vector< TH1F * > e_spectrum_b_histos
Definition: PhiSymmetryCalibration.h:143
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
PhiSymmetryCalibration::etsum_endc_miscal_
double etsum_endc_miscal_[kNMiscalBinsEE][kEndcEtaRings]
Definition: PhiSymmetryCalibration.h:82
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
kBarlWedges
static const int kBarlWedges
Definition: EcalGeomPhiSymHelper.h:8
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
PhiSymmetryCalibration::b_
double b_
Definition: PhiSymmetryCalibration.h:123
ParameterSet.h
PhiSymmetryCalibration::endcapHits_
std::string endcapHits_
Definition: PhiSymmetryCalibration.h:116
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
event
Definition: event.py:1
PhiSymmetryCalibration::et_spectrum_e_histos
std::vector< TH1F * > et_spectrum_e_histos
Definition: PhiSymmetryCalibration.h:144
edm::Event
Definition: Event.h:73
PhiSymmetryCalibration::ecalHitsProducer_
std::string ecalHitsProducer_
Definition: PhiSymmetryCalibration.h:114
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
PhiSymmetryCalibration::barrelHits_
std::string barrelHits_
Definition: PhiSymmetryCalibration.h:115
EcalIntercalibConstantsRcd
Definition: EcalIntercalibConstantsRcd.h:5
EcalIntercalibConstantsRcd.h
EcalChannelStatus.h
PhiSymmetryCalibration::etsum_barl_miscal_
double etsum_barl_miscal_[kNMiscalBinsEB][kBarlRings]
Definition: PhiSymmetryCalibration.h:81
EcalGeomPhiSymHelper::nRing_
int nRing_[kEndcEtaRings]
Definition: EcalGeomPhiSymHelper.h:30
PhiSymmetryCalibration::k_endc_
double k_endc_[kEndcEtaRings]
Definition: PhiSymmetryCalibration.h:89
EcalChannelStatusCode.h
EcalChannelStatusRcd.h
edm::FileInPath::fullPath
std::string fullPath() const
Definition: FileInPath.cc:161
hit
Definition: SiStripHitEffFromCalibTree.cc:88
PhiSymmetryCalibration::nhits_barl_
unsigned int nhits_barl_[kBarlRings][kBarlWedges][kSides]
Definition: PhiSymmetryCalibration.h:78
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
PhiSymmetryCalibration::statusThreshold_
int statusThreshold_
threshold in channel status beyond which channel is marked bad
Definition: PhiSymmetryCalibration.h:127