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