CMS 3D CMS Logo

EcalTBWeightUncalibRecHitProducer.cc
Go to the documentation of this file.
1 
15 
16 #include <iostream>
17 #include <iomanip>
18 #include <cmath>
19 
21 
23 
26 
29 
33 
38 
42 
43 #include "CLHEP/Matrix/Matrix.h"
44 #include "CLHEP/Matrix/SymMatrix.h"
45 #include <vector>
46 
47 #define DEBUG
49  : testbeamEEShape(EEShape(
50  false)), // Shapes have been updated in 2018 such as to be able to fetch shape from the DB if EBShape(true)//EEShape(true) are used
51  testbeamEBShape(EBShape(
52  false)) // use false as argument if you would rather prefer to use Phase I hardcoded shapes (18.05.2018 K. Theofilatos)
53 {
54  EBdigiCollection_ = ps.getParameter<edm::InputTag>("EBdigiCollection");
55  EEdigiCollection_ = ps.getParameter<edm::InputTag>("EEdigiCollection");
56  tdcRecInfoCollection_ = ps.getParameter<edm::InputTag>("tdcRecInfoCollection");
57  EBhitCollection_ = ps.getParameter<std::string>("EBhitCollection");
58  EEhitCollection_ = ps.getParameter<std::string>("EEhitCollection");
59  nbTimeBin_ = ps.getParameter<int>("nbTimeBin");
60  use2004OffsetConvention_ = ps.getUntrackedParameter<bool>("use2004OffsetConvention", false);
61  produces<EBUncalibratedRecHitCollection>(EBhitCollection_);
62  produces<EEUncalibratedRecHitCollection>(EEhitCollection_);
63 }
64 
66 
68  using namespace edm;
69 
70  Handle<EBDigiCollection> pEBDigis;
71  const EBDigiCollection* EBdigis = nullptr;
72  if (!EBdigiCollection_.label().empty() || !EBdigiCollection_.instance().empty()) {
73  // evt.getByLabel( digiProducer_, EBdigiCollection_, pEBDigis);
74  evt.getByLabel(EBdigiCollection_, pEBDigis);
75  if (!pEBDigis.isValid()) {
76  edm::LogError("EcalUncalibRecHitError") << "Error! can't get the product " << EBdigiCollection_;
77  } else {
78  EBdigis = pEBDigis.product(); // get a ptr to the produc
79 #ifdef DEBUG
80  LogDebug("EcalUncalibRecHitInfo") << "total # EBdigis: " << EBdigis->size();
81 #endif
82  }
83  }
84 
85  Handle<EEDigiCollection> pEEDigis;
86  const EEDigiCollection* EEdigis = nullptr;
87 
88  if (!EEdigiCollection_.label().empty() || !EEdigiCollection_.instance().empty()) {
89  // evt.getByLabel( digiProducer_, EEdigiCollection_, pEEDigis);
90  evt.getByLabel(EEdigiCollection_, pEEDigis);
91  if (!pEEDigis.isValid()) {
92  edm::LogError("EcalUncalibRecHitError") << "Error! can't get the product " << EEdigiCollection_;
93  } else {
94  EEdigis = pEEDigis.product(); // get a ptr to the produc
95 #ifdef DEBUG
96  LogDebug("EcalUncalibRecHitInfo") << "total # EEdigis: " << EEdigis->size();
97  // std::cout << "total # EEdigis: " << EEdigis->size() << std::endl;
98 #endif
99  }
100  }
101 
102  if (!EBdigis && !EEdigis)
103  return;
104 
105  Handle<EcalTBTDCRecInfo> pRecTDC;
106  const EcalTBTDCRecInfo* recTDC = nullptr;
107 
108  // evt.getByLabel( digiProducer_, EBdigiCollection_, pEBDigis);
109  evt.getByLabel(tdcRecInfoCollection_, pRecTDC);
110  if (pRecTDC.isValid()) {
111  recTDC = pRecTDC.product(); // get a ptr to the product
112  }
113 
114  // fetch map of groups of xtals
116  es.get<EcalWeightXtalGroupsRcd>().get(pGrp);
117  const EcalWeightXtalGroups* grp = pGrp.product();
118  if (!grp)
119  return;
120 
121  const EcalXtalGroupsMap& grpMap = grp->getMap();
122 
123  // Gain Ratios
125  es.get<EcalGainRatiosRcd>().get(pRatio);
126  const EcalGainRatioMap& gainMap = pRatio.product()->getMap(); // map of gain ratios
127 
128  // fetch TB weights
129 #ifdef DEBUG
130  LogDebug("EcalUncalibRecHitDebug") << "Fetching EcalTBWeights from DB ";
131  // std::cout <<"Fetching EcalTBWeights from DB " ;
132 #endif
134  es.get<EcalTBWeightsRcd>().get(pWgts);
135  const EcalTBWeights* wgts = pWgts.product();
136 
137  if (!wgts)
138  return;
139 
140 #ifdef DEBUG
141  LogDebug("EcalUncalibRecHitDebug") << "EcalTBWeightMap.size(): " << std::setprecision(3) << wgts->getMap().size();
142  // std::cout << "EcalTBWeightMap.size(): " << std::setprecision(3) << wgts->getMap().size() ;
143 #endif
144 
145  // fetch the pedestals from the cond DB via EventSetup
146 #ifdef DEBUG
147  LogDebug("EcalUncalibRecHitDebug") << "fetching pedestals....";
148  // std::cout << "fetching pedestals....";
149 #endif
151  es.get<EcalPedestalsRcd>().get(pedHandle);
152  const EcalPedestalsMap& pedMap = pedHandle.product()->getMap(); // map of pedestals
153 #ifdef DEBUG
154  LogDebug("EcalUncalibRecHitDebug") << "done.";
155  // std::cout << "done." ;
156 #endif
157  // collection of reco'ed ampltudes to put in the event
158 
159  auto EBuncalibRechits = std::make_unique<EBUncalibratedRecHitCollection>();
160  auto EEuncalibRechits = std::make_unique<EEUncalibratedRecHitCollection>();
161 
162  EcalPedestalsMapIterator pedIter; // pedestal iterator
163 
164  EcalGainRatioMap::const_iterator gainIter; // gain iterator
165 
166  EcalXtalGroupsMap::const_iterator git; // group iterator
167 
168  EcalTBWeights::EcalTBWeightMap::const_iterator wit; //weights iterator
169  // loop over EB digis
170  //Getting the TDC bin
171  EcalTBWeights::EcalTDCId tdcid(int(nbTimeBin_ / 2) + 1);
172 
173  if (recTDC)
174  if (recTDC->offset() == -999.) {
175  edm::LogError("EcalUncalibRecHitError") << "TDC bin completely out of range. Returning";
176  return;
177  }
178 
179  if (EBdigis) {
180  for (unsigned int idig = 0; idig < EBdigis->size(); ++idig) {
181  EBDataFrame itdg = (*EBdigis)[idig];
182 
183  // counter_++; // verbosity counter
184 
185  // find pedestals for this channel
186 #ifdef DEBUG
187  LogDebug("EcalUncalibRecHitDebug") << "looking up pedestal for crystal: " << EBDetId(itdg.id());
188 #endif
189  pedIter = pedMap.find(itdg.id().rawId());
190  if (pedIter == pedMap.end()) {
191  edm::LogError("EcalUncalibRecHitError")
192  << "error!! could not find pedestals for channel: " << EBDetId(itdg.id())
193  << "\n no uncalib rechit will be made for this digi!";
194  continue;
195  }
196  const EcalPedestals::Item& aped = (*pedIter);
197  double pedVec[3];
198  double pedRMSVec[3];
199  pedVec[0] = aped.mean_x12;
200  pedVec[1] = aped.mean_x6;
201  pedVec[2] = aped.mean_x1;
202  pedRMSVec[0] = aped.rms_x12;
203  pedRMSVec[1] = aped.rms_x6;
204  pedRMSVec[2] = aped.rms_x1;
205 
206  // find gain ratios
207 #ifdef DEBUG
208  LogDebug("EcalUncalibRecHitDebug") << "looking up gainRatios for crystal: " << EBDetId(itdg.id());
209 #endif
210  gainIter = gainMap.find(itdg.id().rawId());
211  if (gainIter == gainMap.end()) {
212  edm::LogError("EcalUncalibRecHitError")
213  << "error!! could not find gain ratios for channel: " << EBDetId(itdg.id())
214  << "\n no uncalib rechit will be made for this digi!";
215  continue;
216  }
217  const EcalMGPAGainRatio& aGain = (*gainIter);
218  double gainRatios[3];
219  gainRatios[0] = 1.;
220  gainRatios[1] = aGain.gain12Over6();
221  gainRatios[2] = aGain.gain6Over1() * aGain.gain12Over6();
222 
223  // lookup group ID for this channel
224  git = grpMap.find(itdg.id().rawId());
225  if (git == grpMap.end()) {
226  edm::LogError("EcalUncalibRecHitError")
227  << "No group id found for this crystal. something wrong with EcalWeightXtalGroups in your DB?"
228  << "\n no uncalib rechit will be made for digi with id: " << EBDetId(itdg.id());
229  continue;
230  }
231  const EcalXtalGroupId& gid = (*git);
232 
233  //GAIN SWITCHING DETECTION ///////////////////////////////////////////////////////////////////////////////////////////////////
234  double sampleGainRef = 1;
235  int sampleSwitch = 999;
236  for (int sample = 0; sample < itdg.size(); ++sample) {
237  double gainSample = itdg.sample(sample).gainId();
238  if (gainSample != sampleGainRef) {
239  sampleGainRef = gainSample;
240  sampleSwitch = sample;
241  }
242  } //loop sample
244 
245  if (recTDC) {
246  int tdcBin = 0;
247  if (recTDC->offset() <= 0.)
248  tdcBin = 1;
249  else if (recTDC->offset() >= 1.)
250  tdcBin = nbTimeBin_;
251  else
252  tdcBin = int(recTDC->offset() * float(nbTimeBin_)) + 1;
253 
254  if (tdcBin < 1 || tdcBin > nbTimeBin_) {
255  edm::LogError("EcalUncalibRecHitError")
256  << "TDC bin out of range " << tdcBin << " offset " << recTDC->offset();
257  continue;
258  }
259 
260  // In case gain switching happens at the sample 4 (5th sample)
261  // (sample 5 (6th sample) in 2004 TDC convention) an extra
262  // set of weights has to be used. This set of weights is assigned to
263  // TDC values going from 25 and up.
264  if (use2004OffsetConvention_ && sampleSwitch == 5)
265  tdcid = EcalTBWeights::EcalTDCId(tdcBin + 25);
266  else if (!use2004OffsetConvention_ && sampleSwitch == 4)
267  tdcid = EcalTBWeights::EcalTDCId(tdcBin + 25);
268  else
269  tdcid = EcalTBWeights::EcalTDCId(tdcBin);
270  } //check TDC
271 
272  // now lookup the correct weights in the map
273  wit = wgts->getMap().find(std::make_pair(gid, tdcid));
274  if (wit == wgts->getMap().end()) { // no weights found for this group ID
275  edm::LogError("EcalUncalibRecHitError")
276  << "No weights found for EcalGroupId: " << gid.id() << " and EcalTDCId: " << tdcid
277  << "\n skipping digi with id: " << EBDetId(itdg.id());
278  continue;
279  }
280  const EcalWeightSet& wset = wit->second; // this is the EcalWeightSet
281 
282  // EcalWeightMatrix is vec<vec:double>>
283 
284 #ifdef DEBUG
285  LogDebug("EcalUncalibRecHitDebug") << "accessing matrices of weights...";
286 #endif
289  //const EcalWeightSet::EcalChi2WeightMatrix& mat3 = wset.getChi2WeightsBeforeGainSwitch();
290  //const EcalWeightSet::EcalChi2WeightMatrix& mat4 = wset.getChi2WeightsAfterGainSwitch();
292  weights[0] = &mat1;
293  weights[1] = &mat2;
294  // weights.push_back(clmat1);
295  // weights.push_back(clmat2);
296  // LogDebug("EcalUncalibRecHitDebug") << "weights before switch:\n" << clmat1 ;
297  // LogDebug("EcalUncalibRecHitDebug") << "weights after switch:\n" << clmat2 ;
298 
299  // build CLHEP chi2 matrices
300  //const EcalWeightSet::EcalChi2WeightMatrix* chi2mat[2];
301  // chi2mat[0]=&mat3;
302  // chi2mat[1]=&mat4;
303 
304  EcalUncalibratedRecHit aHit = EBalgo_.makeRecHit(itdg, pedVec, pedRMSVec, gainRatios, weights, testbeamEBShape);
305  //EBalgo_.makeRecHit(itdg, pedVec, gainRatios, weights, chi2mat);
306  EBuncalibRechits->push_back(aHit);
307 #ifdef DEBUG
308  if (aHit.amplitude() > 0.) {
309  LogDebug("EcalUncalibRecHitDebug") << "processed EBDataFrame with id: " << EBDetId(itdg.id()) << "\n"
310  << "uncalib rechit amplitude: " << aHit.amplitude();
311  }
312 #endif
313  }
314  }
315  // put the collection of reconstructed hits in the event
316  evt.put(std::move(EBuncalibRechits), EBhitCollection_);
317 
318  if (EEdigis) {
319  for (unsigned int idig = 0; idig < EEdigis->size(); ++idig) {
320  EEDataFrame itdg = (*EEdigis)[idig];
321 
322  // counter_++; // verbosity counter
323 
324  // find pedestals for this channel
325 #ifdef DEBUG
326  LogDebug("EcalUncalibRecHitDebug") << "looking up pedestal for crystal: " << EEDetId(itdg.id());
327  // std::cout << "looking up pedestal for crystal: " << EEDetId(itdg.id()) ;
328 #endif
329  pedIter = pedMap.find(itdg.id().rawId());
330  if (pedIter == pedMap.end()) {
331  edm::LogError("EcalUncalibRecHitError")
332  << "error!! could not find pedestals for channel: " << EEDetId(itdg.id())
333  << "\n no uncalib rechit will be made for this digi!";
334  continue;
335  }
336  const EcalPedestals::Item& aped = (*pedIter);
337  double pedVec[3];
338  double pedRMSVec[3];
339  pedVec[0] = aped.mean_x12;
340  pedVec[1] = aped.mean_x6;
341  pedVec[2] = aped.mean_x1;
342  pedRMSVec[0] = aped.rms_x12;
343  pedRMSVec[1] = aped.rms_x6;
344  pedRMSVec[2] = aped.rms_x1;
345 
346  // find gain ratios
347 #ifdef DEBUG
348  LogDebug("EcalUncalibRecHitDebug") << "looking up gainRatios for crystal: " << EEDetId(itdg.id());
349  // std::cout << "looking up gainRatios for crystal: " << EEDetId(itdg.id()) ;
350 #endif
351  gainIter = gainMap.find(itdg.id().rawId());
352  if (gainIter == gainMap.end()) {
353  edm::LogError("EcalUncalibRecHitError")
354  << "error!! could not find gain ratios for channel: " << EEDetId(itdg.id())
355  << "\n no uncalib rechit will be made for this digi!";
356  continue;
357  }
358  const EcalMGPAGainRatio& aGain = (*gainIter);
359  double gainRatios[3];
360  gainRatios[0] = 1.;
361  gainRatios[1] = aGain.gain12Over6();
362  gainRatios[2] = aGain.gain6Over1() * aGain.gain12Over6();
363 
364  // lookup group ID for this channel
365  git = grpMap.find(itdg.id().rawId());
366  if (git == grpMap.end()) {
367  edm::LogError("EcalUncalibRecHitError")
368  << "No group id found for this crystal. something wrong with EcalWeightXtalGroups in your DB?"
369  << "\n no uncalib rechit will be made for digi with id: " << EEDetId(itdg.id());
370  continue;
371  }
372  const EcalXtalGroupId& gid = (*git);
373 
374  //GAIN SWITCHING DETECTION ///////////////////////////////////////////////////////////////////////////////////////////////////
375  double sampleGainRef = 1;
376  int sampleSwitch = 999;
377  for (int sample = 0; sample < itdg.size(); ++sample) {
378  double gainSample = itdg.sample(sample).gainId();
379  if (gainSample != sampleGainRef) {
380  sampleGainRef = gainSample;
381  sampleSwitch = sample;
382  }
383  } //loop sample
385 
386  if (recTDC) {
387  int tdcBin = 0;
388  if (recTDC->offset() <= 0.)
389  tdcBin = 1;
390  else if (recTDC->offset() >= 1.)
391  tdcBin = nbTimeBin_;
392  else
393  tdcBin = int(recTDC->offset() * float(nbTimeBin_)) + 1;
394 
395  if (tdcBin < 1 || tdcBin > nbTimeBin_) {
396  edm::LogError("EcalUncalibRecHitError")
397  << "TDC bin out of range " << tdcBin << " offset " << recTDC->offset();
398  continue;
399  }
400 
401  // In case gain switching happens at the sample 4 (5th sample)
402  // (sample 5 (6th sample) in 2004 TDC convention) an extra
403  // set of weights has to be used. This set of weights is assigned to
404  // TDC values going from 25 and up.
405  if (use2004OffsetConvention_ && sampleSwitch == 5)
406  tdcid = EcalTBWeights::EcalTDCId(tdcBin + 25);
407  else if (!use2004OffsetConvention_ && sampleSwitch == 4)
408  tdcid = EcalTBWeights::EcalTDCId(tdcBin + 25);
409  else
410  tdcid = EcalTBWeights::EcalTDCId(tdcBin);
411  } //check TDC
412 
413  // now lookup the correct weights in the map
414  wit = wgts->getMap().find(std::make_pair(gid, tdcid));
415  if (wit == wgts->getMap().end()) { // no weights found for this group ID
416  edm::LogError("EcalUncalibRecHitError")
417  << "No weights found for EcalGroupId: " << gid.id() << " and EcalTDCId: " << tdcid
418  << "\n skipping digi with id: " << EEDetId(itdg.id());
419  continue;
420  }
421  const EcalWeightSet& wset = wit->second; // this is the EcalWeightSet
422 
423  // EcalWeightMatrix is vec<vec:double>>
424 
425 #ifdef DEBUG
426  LogDebug("EcalUncalibRecHitDebug") << "accessing matrices of weights...";
427  // std::cout << "accessing matrices of weights...";
428 #endif
431  //const EcalWeightSet::EcalChi2WeightMatrix& mat3 = wset.getChi2WeightsBeforeGainSwitch();
432  //const EcalWeightSet::EcalChi2WeightMatrix& mat4 = wset.getChi2WeightsAfterGainSwitch();
434  weights[0] = &mat1;
435  weights[1] = &mat2;
436  // weights.push_back(clmat1);
437  // weights.push_back(clmat2);
438  // LogDebug("EcalUncalibRecHitDebug") << "weights before switch:\n" << clmat1 ;
439  // LogDebug("EcalUncalibRecHitDebug") << "weights after switch:\n" << clmat2 ;
440 
441  // build CLHEP chi2 matrices
442  //const EcalWeightSet::EcalChi2WeightMatrix* chi2mat[2];
443  //chi2mat[0]=&mat3;
444  //chi2mat[1]=&mat4;
445 
446  EcalUncalibratedRecHit aHit = EEalgo_.makeRecHit(itdg, pedVec, pedRMSVec, gainRatios, weights, testbeamEEShape);
447  //EEalgo_.makeRecHit(itdg, pedVec, gainRatios, weights, chi2mat);
448  EEuncalibRechits->push_back(aHit);
449 #ifdef DEBUG
450  if (aHit.amplitude() > 0.) {
451  LogDebug("EcalUncalibRecHitDebug") << "processed EEDataFrame with id: " << EEDetId(itdg.id()) << "\n"
452  << "uncalib rechit amplitude: " << aHit.amplitude()
453 
454  // std::cout << "processed EEDataFrame with id: "
455  // << EEDetId(itdg.id()) << "\n"
456  // << "uncalib rechit amplitude: " << aHit.amplitude() << std::endl;
457  ;
458  }
459 #endif
460  }
461  }
462  // put the collection of reconstructed hits in the event
463  evt.put(std::move(EEuncalibRechits), EEhitCollection_);
464 }
465 
466 // HepMatrix
467 // EcalTBWeightUncalibRecHitProducer::makeMatrixFromVectors(const std::vector< std::vector<EcalWeight> >& vecvec) {
468 // int nrow = vecvec.size();
469 // int ncol = (vecvec[0]).size();
470 // HepMatrix clmat(nrow,ncol);
471 // //LogDebug("EcalUncalibRecHitDebug") << "created HepMatrix(" << nrow << "," << ncol << ")" ;
472 // for(int irow=0;irow<nrow;++irow) {
473 // for(int icol=0;icol<ncol;++icol) {
474 // clmat[irow][icol] = ((vecvec[irow])[icol]).value();
475 // }
476 // }
477 // return clmat;
478 // }
479 
480 // HepMatrix
481 // EcalTBWeightUncalibRecHitProducer::makeDummySymMatrix(int size)
482 // {
483 // HepMatrix clmat(10,10);
484 // //LogDebug("EcalUncalibRecHitDebug") << "created HepMatrix(" << nrow << "," << ncol << ")" ;
485 // for(int irow=0; irow<size; ++irow) {
486 // for(int icol=0 ; icol<size; ++icol) {
487 // clmat[irow][icol] = irow+icol;
488 // }
489 // }
490 // return clmat;
491 // }
EcalCondObjectContainer::getMap
const self & getMap() const
Definition: EcalCondObjectContainer.h:80
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
EcalCondObjectContainer::end
const_iterator end() const
Definition: EcalCondObjectContainer.h:76
EcalDataFrame::sample
EcalMGPASample sample(int i) const
Definition: EcalDataFrame.h:29
EcalTBWeights::getMap
const EcalTBWeightMap & getMap() const
Definition: EcalTBWeights.h:28
Handle.h
HLT_2018_cff.weights
weights
Definition: HLT_2018_cff.py:87167
EcalPedestals.h
MessageLogger.h
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
funct::false
false
Definition: Factorize.h:34
edm::Handle::product
T const * product() const
Definition: Handle.h:70
EcalPedestal::mean_x6
float mean_x6
Definition: EcalPedestals.h:21
edm::InputTag::instance
std::string const & instance() const
Definition: InputTag.h:37
ESHandle.h
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
EcalTBWeightUncalibRecHitProducer.h
EBShape
Definition: EBShape.h:6
EcalUncalibratedRecHit::amplitude
float amplitude() const
Definition: EcalUncalibratedRecHit.h:28
EBDetId
Definition: EBDetId.h:17
edm
HLT enums.
Definition: AlignableModifier.h:19
EBDataFrame
Definition: EBDataFrame.h:11
EcalTBWeightUncalibRecHitProducer::EEalgo_
EcalUncalibRecHitRecWeightsAlgo< EEDataFrame > EEalgo_
Definition: EcalTBWeightUncalibRecHitProducer.h:35
EcalTBWeightUncalibRecHitProducer::~EcalTBWeightUncalibRecHitProducer
~EcalTBWeightUncalibRecHitProducer() override
Definition: EcalTBWeightUncalibRecHitProducer.cc:65
EcalUncalibratedRecHit.h
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
EcalCondObjectContainer< EcalXtalGroupId >
edm::Handle< EBDigiCollection >
EcalXtalGroupId
Definition: EcalXtalGroupId.h:11
EcalWeightXtalGroups.h
EcalRecHitCollections.h
EBDataFrame::id
key_type id() const
Definition: EBDataFrame.h:28
EcalTBWeightsRcd
Definition: EcalTBWeightsRcd.h:5
EcalTBWeightUncalibRecHitProducer::testbeamEEShape
const EEShape testbeamEEShape
Definition: EcalTBWeightUncalibRecHitProducer.h:37
EcalTBWeightUncalibRecHitProducer::EBalgo_
EcalUncalibRecHitRecWeightsAlgo< EBDataFrame > EBalgo_
Definition: EcalTBWeightUncalibRecHitProducer.h:34
EcalTBWeights.h
EcalPedestal::mean_x1
float mean_x1
Definition: EcalPedestals.h:23
EcalWeightSet::EcalWeightMatrix
math::Matrix< 3, 10 >::type EcalWeightMatrix
Definition: EcalWeightSet.h:19
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
EcalMGPASample::gainId
int gainId() const
get the gainId (2 bits)
Definition: EcalMGPASample.h:33
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
EcalTBTDCRecInfo::offset
float offset() const
Definition: EcalTBTDCRecInfo.h:19
EcalPedestal::mean_x12
float mean_x12
Definition: EcalPedestals.h:19
EcalDigiCollections.h
edm::ESHandle
Definition: DTSurvey.h:22
EEDataFrame::id
key_type id() const
Definition: EEDataFrame.h:24
EcalCondObjectContainer::find
const_iterator find(uint32_t rawId) const
Definition: EcalCondObjectContainer.h:53
EcalPedestal::rms_x12
float rms_x12
Definition: EcalPedestals.h:20
EcalMGPAGainRatio.h
edm::Event::getByLabel
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:491
EcalWeightSet::getWeightsAfterGainSwitch
EcalWeightMatrix & getWeightsAfterGainSwitch()
Definition: EcalWeightSet.h:27
EcalXtalGroupId.h
EEShape
Definition: EEShape.h:6
EcalTBWeightUncalibRecHitProducer::EEdigiCollection_
edm::InputTag EEdigiCollection_
Definition: EcalTBWeightUncalibRecHitProducer.h:28
EcalMGPAGainRatio::gain12Over6
float gain12Over6() const
Definition: EcalMGPAGainRatio.h:19
EEDetId
Definition: EEDetId.h:14
EcalGainRatiosRcd
Definition: EcalGainRatiosRcd.h:5
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalTBWeightUncalibRecHitProducer::EEhitCollection_
std::string EEhitCollection_
Definition: EcalTBWeightUncalibRecHitProducer.h:32
EcalWeightSet::getWeightsBeforeGainSwitch
EcalWeightMatrix & getWeightsBeforeGainSwitch()
Definition: EcalWeightSet.h:26
EcalTBWeightUncalibRecHitProducer::EBhitCollection_
std::string EBhitCollection_
Definition: EcalTBWeightUncalibRecHitProducer.h:31
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
EcalTBWeights::EcalTDCId
int EcalTDCId
Definition: EcalTBWeights.h:17
edm::ParameterSet
Definition: ParameterSet.h:36
EcalTBWeightUncalibRecHitProducer::use2004OffsetConvention_
bool use2004OffsetConvention_
Definition: EcalTBWeightUncalibRecHitProducer.h:46
edm::LogError
Definition: MessageLogger.h:183
EcalTBWeightUncalibRecHitProducer::EcalTBWeightUncalibRecHitProducer
EcalTBWeightUncalibRecHitProducer(const edm::ParameterSet &ps)
Definition: EcalTBWeightUncalibRecHitProducer.cc:48
EBDigiCollection
Definition: EcalDigiCollections.h:32
EEDigiCollection
Definition: EcalDigiCollections.h:45
EcalPedestalsMapIterator
EcalPedestalsMap::const_iterator EcalPedestalsMapIterator
Definition: EcalPedestals.h:49
createfilelist.int
int
Definition: createfilelist.py:10
EcalPedestal::rms_x1
float rms_x1
Definition: EcalPedestals.h:24
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:132
edm::EventSetup
Definition: EventSetup.h:57
EcalGainRatiosRcd.h
EcalMGPASample.h
get
#define get
EcalGainRatios.h
EcalWeightSet
Definition: EcalWeightSet.h:17
EcalUncalibratedRecHit
Definition: EcalUncalibratedRecHit.h:8
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
eostools.move
def move(src, dest)
Definition: eostools.py:511
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
EcalTBWeightUncalibRecHitProducer::produce
void produce(edm::Event &evt, const edm::EventSetup &es) override
Definition: EcalTBWeightUncalibRecHitProducer.cc:67
EcalWeight.h
EcalMGPAGainRatio::gain6Over1
float gain6Over1() const
Definition: EcalMGPAGainRatio.h:20
EcalPedestal
Definition: EcalPedestals.h:8
EcalTBWeightUncalibRecHitProducer::tdcRecInfoCollection_
edm::InputTag tdcRecInfoCollection_
Definition: EcalTBWeightUncalibRecHitProducer.h:29
EcalUncalibRecHitRecWeightsAlgo::makeRecHit
virtual EcalUncalibratedRecHit makeRecHit(const C &dataFrame, const double *pedestals, const double *pedestalsRMS, const double *gainRatios, const EcalWeightSet::EcalWeightMatrix **weights, const EcalShapeBase &testbeamPulseShape)
Compute parameters.
Definition: EcalUncalibRecHitRecWeightsAlgo.h:30
EcalDataFrame::size
int size() const
Definition: EcalDataFrame.h:26
EcalTBWeightUncalibRecHitProducer::EBdigiCollection_
edm::InputTag EBdigiCollection_
Definition: EcalTBWeightUncalibRecHitProducer.h:27
EcalPedestalsRcd.h
EcalXtalGroupId::id
unsigned int id() const
Definition: EcalXtalGroupId.h:22
EcalCondObjectContainer< EcalMGPAGainRatio >::const_iterator
std::vector< Item >::const_iterator const_iterator
Definition: EcalCondObjectContainer.h:19
EcalTBTDCRecInfo
Definition: EcalTBTDCRecInfo.h:12
EcalWeightXtalGroupsRcd
Definition: EcalWeightXtalGroupsRcd.h:5
EcalPedestalsRcd
Definition: EcalPedestalsRcd.h:5
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
EEDataFrame
Definition: EEDataFrame.h:12
edm::Event
Definition: Event.h:73
EcalWeightSet.h
EcalTBWeightUncalibRecHitProducer::testbeamEBShape
const EBShape testbeamEBShape
Definition: EcalTBWeightUncalibRecHitProducer.h:38
EcalWeightXtalGroupsRcd.h
edm::InputTag
Definition: InputTag.h:15
EcalTBWeightsRcd.h
EcalTBWeightUncalibRecHitProducer::nbTimeBin_
int nbTimeBin_
Definition: EcalTBWeightUncalibRecHitProducer.h:43
EcalPedestal::rms_x6
float rms_x6
Definition: EcalPedestals.h:22
EcalTBWeights
Definition: EcalTBWeights.h:15
EcalMGPAGainRatio
Definition: EcalMGPAGainRatio.h:13
edm::DataFrameContainer::size
size_type size() const
Definition: DataFrameContainer.h:162