CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalDbHardcode.cc
Go to the documentation of this file.
1 //
2 // F.Ratnikov (UMd), Dec 14, 2005
3 //
4 #include <vector>
5 #include <string>
6 #include <cmath>
7 #include <sstream>
8 #include <iostream>
9 
10 #include "CLHEP/Random/RandGauss.h"
15 
17 : theDefaultParameters_(3.0,0.5,{0.2,0.2},{0.0,0.0},0,{0.0,0.0,0.0,0.0},{0.9,0.9,0.9,0.9},125,105,0.0,{0.0}), //"generic" set of conditions
18  setHB_(false), setHE_(false), setHF_(false), setHO_(false),
19  setHBUpgrade_(false), setHEUpgrade_(false), setHFUpgrade_(false),
20  useHBUpgrade_(false), useHEUpgrade_(false), useHOUpgrade_(true),
21  useHFUpgrade_(false), testHFQIE10_(false)
22 {
23 }
24 
28  else if(!useHBUpgrade_ && setHB_) return theHBParameters_;
29  else return theDefaultParameters_;
30  }
33  else if(!useHEUpgrade_ && setHE_) return theHEParameters_;
34  else return theDefaultParameters_;
35  }
38  else if(testHFQIE10_ && fId.isHcalDetId()){
39  HcalDetId hid(fId);
40  //special mixed case for HF 2016
41  if(hid.iphi()==39 && hid.zside()==1 && (hid.depth()>=3 || (hid.depth()==2 && (hid.ieta()==30 || hid.ieta()==34))) && setHFUpgrade_) return theHFUpgradeParameters_;
42  else if(setHF_) return theHFParameters_;
43  else return theDefaultParameters_;
44  }
45  else if(!useHFUpgrade_ && setHF_) return theHFParameters_;
46  else return theDefaultParameters_;
47  }
49  if(setHO_) return theHOParameters_;
50  else return theDefaultParameters_;
51  }
52  else return theDefaultParameters_;
53 }
54 
56  int index = 0;
58  HcalDetId hid(fId);
59  if ((hid.ieta() > -5) && (hid.ieta() < 5)) index = 0;
60  else index = 1;
61  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenForward) {
62  HcalDetId hid(fId);
63  if (hid.depth() % 2 == 1) index = 0; //depths 1,3
64  else if (hid.depth() % 2 == 0) index = 1; //depths 2,4
65  }
66  return index;
67 }
68 
71  float value0 = getParameters(fId).pedestal();
72  float value [4] = {value0,value0,value0,value0};
73  if (fSmear) {
74  for (int i = 0; i < 4; i++) {
75  value[i] = 0.0f;
76  while (value [i] <= 0.0f)
77  // ignore correlations, assume 10K pedestal run
78  value [i] = value0 + (float)CLHEP::RandGauss::shoot (0.0, width.getWidth (i) / 100.);
79  }
80  }
81  HcalPedestal result (fId.rawId (),
82  value[0], value[1], value[2], value[3]
83  );
84  return result;
85 }
86 
88  float value = getParameters(fId).pedestalWidth();
89  // everything in fC
90 
92  float width2 = value*value;
93  for (int i = 0; i < 4; i++) {
94  for (int j = 0; j < 4; j++) {
95  result.setSigma (i, j, 0.0);
96  }
97  result.setSigma (i, i, width2);
98  }
99  return result;
100 }
101 
102 HcalGain HcalDbHardcode::makeGain (HcalGenericDetId fId, bool fSmear) { // GeV/fC
103  HcalGainWidth width = makeGainWidth (fId);
104  float value0 = getParameters(fId).gain(getGainIndex(fId));
105  float value [4] = {value0, value0, value0, value0};
106  if (fSmear) {
107  for (int i = 0; i < 4; i++) {
108  value[i] = 0.0f;
109  while (value [i] <= 0.0f) value [i] = value0 + (float)CLHEP::RandGauss::shoot (0.0, width.getValue (i));
110  }
111  }
112  HcalGain result (fId.rawId (), value[0], value[1], value[2], value[3]);
113  return result;
114 }
115 
117  float value = getParameters(fId).gainWidth(getGainIndex(fId));
119  return result;
120 }
121 
123  HcalQIECoder result (fId.rawId ());
124  // slope in ADC/fC
125  const HcalHardcodeParameters& param(getParameters(fId));
126  for (unsigned range = 0; range < 4; range++) {
127  for (unsigned capid = 0; capid < 4; capid++) {
128  result.setOffset (capid, range, param.qieOffset(range));
129  result.setSlope (capid, range, param.qieSlope(range));
130  }
131  }
132 
133  return result;
134 }
135 
137  HcalQIENum qieType = (HcalQIENum)(getParameters(fId).qieType());
138  HcalQIEType result(fId.rawId(),qieType);
139  return result;
140 }
141 
144  float lowEdges [64];
145  for (int i = 0; i < 64; i++) { lowEdges[i] = -1.5 + i; }
146  result.setMinCharges (lowEdges);
147  return result;
148 }
149 
151 
152  // std::cout << " !!! HcalDbHardcode::makeQIEShape " << std::endl;
153 
154  return HcalQIEShape ();
155 }
156 
157 
159 
160  int r1bit[5];
161  r1bit[0] = 9; // [0,9]
162  int syncPhase = 0; r1bit[1] = 1;
163  int binOfMaximum = 0; r1bit[2] = 4;
164  float phase = -25.0f; // [-25.0,25.0]
165  float Xphase = (phase + 32.0f) * 4.0f; // never change this line
166  // (offset 50nsec, 0.25ns step)
167  int Iphase = Xphase; r1bit[3] = 8; // [0,256] offset 50ns, .25ns step
168  int timeSmearing = 0; r1bit[4] = 1; // bool
169 
170  const HcalHardcodeParameters& hparam(getParameters(fId));
171  int pulseShapeID = hparam.mcShape(); // a0
172 
174 
175  syncPhase = 1; // a1 bool
176  binOfMaximum = 5; // a2
177  phase = 5.0f; // a3 [-25.0,25.0]
178  Xphase = (phase + 32.0f) * 4.0f; // never change this line
179  // (offset 50nsec, 0.25ns step)
180  Iphase = Xphase;
181  timeSmearing = 1; // a4
182 
183  }
184 
185  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap) {
186 
187  syncPhase = 1; // a1 bool
188  binOfMaximum = 5; // a2
189  phase = 5.0f; // a3 [-25.0,25.0]
190  Xphase = (phase + 32.0f) * 4.0f; // never change this line
191  // (offset 50nsec, 0.25ns step)
192  Iphase = Xphase;
193  timeSmearing = 1; // a4
194 
195  }
196 
197  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenOuter) {
198 
199  syncPhase = 1; // a1 bool
200  binOfMaximum = 5; // a2
201  phase = 5.0f; // a3 [-25.0,25.0]
202  Xphase = (phase + 32.0f) * 4.0f; // never change this line
203  // (offset 50nsec, 0.25ns step)
204  Iphase = Xphase;
205  timeSmearing = 0; // a4
206 
207  HcalDetId cell = HcalDetId(fId);
208  if (cell.ieta() == 1 && cell.iphi() == 1) pulseShapeID = 125;
209 
210  }
211 
212  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenForward) {
213 
214  syncPhase = 1; // a1 bool
215  binOfMaximum = 3; // a2
216  phase = 14.0f; // a3 [-25.0,25.0]
217  Xphase = (phase + 32.0f) * 4.0f; // never change this line
218  // (offset 50nsec, 0.25ns step)
219  Iphase = Xphase;
220  timeSmearing = 0; // a4
221 
222  }
223 
224  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenZDC) {
225 
226  pulseShapeID = 401; // a0
227  syncPhase = 1; // a1 bool
228  binOfMaximum = 5; // a2
229  phase = -4.0f; // a3 [-25.0,25.0]
230  Xphase = (phase + 32.0f) * 4.0f; // never change this line
231  // (offset 50nsec, 0.25ns step)
232  Iphase = Xphase;
233  timeSmearing = 0; // a4
234 
235  }
236 
237 
238  int rshift[7];
239  rshift[0]=0;
240  for(int k=0; k<5; k++) {
241  rshift[k+1]=rshift[k]+r1bit[k];
242  }
243 
244  int packingScheme = 1; // a5
245  unsigned int param = pulseShapeID |
246  syncPhase<<rshift[1] |
247  (binOfMaximum << rshift[2]) |
248  (Iphase << rshift[3]) |
249  (timeSmearing << rshift[4] | packingScheme << 27);
250 
251  HcalMCParam result(fId.rawId(), param);
252  return result;
253 
254 }
255 
257 
258  // Mostly comes from S.Kunori's macro
259  int p1bit[6];
260 
261  // param1
262  int containmentCorrectionFlag = 0; p1bit[0]=1; // bool
263  int containmentCorrectionPreSample = 0; p1bit[1]=1; // bool
264  float phase = 13.0; // [-25.0,25.0]
265  float Xphase = (phase + 32.0) * 4.0; //never change this line
266  // (offset 50nsec, 0.25ns step)
267  int Iphase = Xphase; p1bit[2]=8; // [0,256]
268  // (offset 50ns, 0.25ns step
269  int firstSample = 4; p1bit[3]=4; // [0,9]
270  int samplesToAdd = 2; p1bit[4]=4; // [0,9]
271  p1bit[5]=9; // [0,9]
272 
273  const HcalHardcodeParameters& hparam(getParameters(fId));
274  int pulseShapeID = hparam.recoShape(); // a5
275 
276  int q2bit[10];
277  // param2.
278  int useLeakCorrection = 0; q2bit[0]=1; // bool
279  int LeakCorrectionID = 0; q2bit[1]=4; // [0,15]
280  int correctForTimeslew = 0; q2bit[2]=1; // bool
281  int timeCorrectionID = 0; q2bit[3]=4; // [0,15]
282  int correctTiming = 0; q2bit[4]=1; // bool
283  int firstAuxTS = 0; q2bit[5]=4; // [0,15]
284  int specialCaseID = 0; q2bit[6]=4; // [0,15]
285  int noiseFlaggingID = 0; q2bit[7]=4; // [0,15]
286  int pileupCleaningID = 0; q2bit[8]=4; // [0,15]
287  int packingScheme = 1; q2bit[9]=4;
288 
289 
292  // param1.
293  containmentCorrectionFlag = 1; // p0
294  containmentCorrectionPreSample = 0; // p1
295  float phase = 6.0;
296  float Xphase = (phase + 32.0) * 4.0; // never change this line
297  //(offset 50nsec, 0.25ns step)
298  Iphase = Xphase; // p2
299  firstSample = 4; // p3
300  samplesToAdd = 2; // p4
301 
302  // param2.
303  useLeakCorrection = 0; // q0
304  LeakCorrectionID = 0; // q1
305  correctForTimeslew = 1; // q2
306  timeCorrectionID = 0; // q3
307  correctTiming = 1; // q4
308  firstAuxTS = 4; // q5
309  specialCaseID = 0; // q6
310  noiseFlaggingID = 1; // q7
311  pileupCleaningID = 0; // q8
312  }
313 
314 
315  else if(fId.genericSubdet() == HcalGenericDetId::HcalGenOuter ) {
316  // param1.
317  containmentCorrectionFlag = 1; // p0
318  containmentCorrectionPreSample = 0; // p1
319  float phase = 13.0;
320  float Xphase = (phase + 32.0) * 4.0; // never change this line
321  // (offset 50nsec, 0.25ns step)
322  Iphase = Xphase; // p2
323  firstSample = 4; // p3
324  samplesToAdd = 4; // p4
325 
326  // param2.
327  useLeakCorrection = 0; // q0
328  LeakCorrectionID = 0; // q1
329  correctForTimeslew = 1; // q2
330  timeCorrectionID = 0; // q3
331  correctTiming = 1; // q4
332  firstAuxTS = 4; // q5
333  specialCaseID = 0; // q6
334  noiseFlaggingID = 1; // q7
335  pileupCleaningID = 0; // q8
336 
337  }
339  // param1.
340  containmentCorrectionFlag = 0; // p0
341  containmentCorrectionPreSample = 0; // p1
342  float phase = 13.0;
343  float Xphase = (phase + 32.0) * 4.0; // never change this line
344  // (offset 50nsec, 0.25ns step)
345  Iphase = Xphase; // p2
346  firstSample = 2; // p3
347  samplesToAdd = 1; // p4
348 
349  // param2.
350  useLeakCorrection = 0; // q0
351  LeakCorrectionID = 0; // q1
352  correctForTimeslew = 0; // q2
353  timeCorrectionID = 0; // q3
354  correctTiming = 1; // q4
355  firstAuxTS = 1; // q5
356  specialCaseID = 0; // q6
357  noiseFlaggingID = 1; // q7
358  pileupCleaningID = 0; // q8
359  }
360 
361 
362  // Packing parameters in two words
363 
364  int p1shift[7]; p1shift[0] = 0;
365  for(int k = 0; k < 6; k++) {
366  int j = k + 1;
367  p1shift[j] = p1shift[k] + p1bit[k];
368  // cout<<" j= "<<j<<" shift "<< p1shift[j]<<endl;
369  }
370  int param1 = 0;
371  param1 = containmentCorrectionFlag |
372  (containmentCorrectionPreSample << p1shift[1]) |
373  (Iphase << p1shift[2]) |
374  (firstSample << p1shift[3]) |
375  (samplesToAdd << p1shift[4]) |
376  (pulseShapeID << p1shift[5]) ;
377 
378  int q2shift[10]; q2shift[0] = 0;
379  for(int k = 0; k < 9; k++) {
380  int j = k + 1;
381  q2shift[j] = q2shift[k] + q2bit[k];
382  // cout<<" j= "<<j<<" shift "<< q2shift[j]<<endl;
383  }
384  int param2 = 0;
385  param2 = useLeakCorrection |
386  (LeakCorrectionID << q2shift[1]) |
387  (correctForTimeslew << q2shift[2]) |
388  (timeCorrectionID << q2shift[3]) |
389  (correctTiming << q2shift[4]) |
390  (firstAuxTS << q2shift[5]) |
391  (specialCaseID << q2shift[6]) |
392  (noiseFlaggingID << q2shift[7]) |
393  (pileupCleaningID << q2shift[8]) |
394  (packingScheme << q2shift[9]) ;
395 
396  HcalRecoParam result(fId.rawId(), param1, param2);
397 
398  return result;
399 }
400 
402  int nhits = 0;
403  float phase = 0.0;
404  float rms = 0.0;
405  if (fId.genericSubdet() == HcalGenericDetId::HcalGenBarrel) {nhits=4; phase = 4.5; rms = 6.5;}
406  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap) {nhits=4;phase = 9.3; rms = 7.8;}
407  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenOuter) {nhits=4;phase = 8.6; rms = 2.3;}
408  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenForward) {nhits=4;phase = 12.4; rms = 12.29;}
409  HcalTimingParam result(fId.rawId(), nhits,phase, rms);
410 
411  return result;
412 }
413 
414 #define EMAP_NHBHECR 9
415 #define EMAP_NHFCR 3
416 #define EMAP_NHOCR 4
417 #define EMAP_NFBR 8
418 #define EMAP_NFCH 3
419 #define EMAP_NHTRS 3
420 #define EMAP_NHSETS 4
421 #define EMAP_NTOPBOT 2
422 #define EMAP_NHTRSHO 4
423 #define EMAP_NHSETSHO 3
424 
426  dcs_map.mapGeomId2DcsId(HcalDetId(HcalBarrel, -16, 1, 1),
428  dcs_map.mapGeomId2DcsId(HcalDetId(HcalForward, -41, 3, 1),
430  dcs_map.mapGeomId2DcsId(HcalDetId(HcalForward, -26, 25, 2),
432  dcs_map.mapGeomId2DcsId(HcalDetId(HcalBarrel, -15, 68, 1),
434  dcs_map.mapGeomId2DcsId(HcalDetId(HcalOuter, -14, 1, 4),
436  dcs_map.mapGeomId2DcsId(HcalDetId(HcalForward, 41, 71, 2),
438 }
439 
440 void HcalDbHardcode::makeHardcodeMap(HcalElectronicsMap& emap, const std::vector<HcalGenericDetId>& cells) {
441  static const int kUTCAMask = 0x4000000; //set bit 26 for uTCA version
442  static const int kLinearIndexMax = 0x7FFFF; //19 bits
443  static const int kTriggerBitMask = 0x02000000; //2^25
444  uint32_t counter = 0;
445  uint32_t counterTrig = 0;
446  for(const auto& fId : cells){
452  {
453  ++counter;
454  assert(counter < kLinearIndexMax);
455  uint32_t raw = counter;
456  raw |= kUTCAMask;
457  HcalElectronicsId elId(raw);
458  emap.mapEId2chId(elId,fId);
459  }
461  ++counterTrig;
462  assert(counterTrig < kLinearIndexMax);
463  uint32_t raw = counterTrig;
464  raw |= kUTCAMask | kTriggerBitMask;
465  HcalElectronicsId elId(raw);
466  emap.mapEId2tId(elId,fId);
467  }
468  }
469  emap.sort();
470 }
471 
472 void HcalDbHardcode::makeHardcodeFrontEndMap(HcalFrontEndMap& emap, const std::vector<HcalGenericDetId>& cells) {
473 
474  std::stringstream mystream;
475  std::string detector[5] = {"XX","HB","HE","HO","HF"};
476  for (const auto& fId : cells) {
477  if (fId.isHcalDetId()) {
478  HcalDetId id = HcalDetId(fId.rawId());
479  HcalSubdetector subdet = id.subdet();
480  int ieta = id.ietaAbs();
481  int iside = id.zside();
482  int iphi = id.iphi();
483  std::string det, rbx;
484  int irm(0);
485  char tempbuff[30];
486  char sidesign = (iside == -1) ? 'M' : 'P';
487  if (subdet == HcalBarrel || subdet == HcalEndcap) {
488  det = detector[subdet];
489  irm = (iphi+1)%4 + 1;
490  int iwedge(0);
491  if (ieta >= 21 && (irm == 1 || irm == 3))
492  iwedge = (iphi + 1 + irm + 1) / 4;
493  else
494  iwedge = (iphi + irm + 1) / 4;
495  if (iwedge > 18) iwedge -= 18;
496  sprintf (tempbuff,"%s%c%2.2i%c",det.c_str(),sidesign,iwedge,'\0');
497  mystream << tempbuff;
498  rbx = mystream.str();
499  mystream.str("");
500  emap.loadObject(id,irm,rbx);
501  } else if (subdet == HcalForward) {
502  det = detector[subdet];
503  int hfphi(0);
504  if ((iside == 1 && ieta == 40) || (iside == -1 && ieta == 41)) {
505  irm = ((iphi + 1) / 2) % 36 + 1;
506  hfphi = ((iphi + 1) / 6) % 12 + 1;
507  } else {
508  irm = ( iphi + 1) / 2;
509  hfphi = (iphi - 1) / 6 + 1;
510  }
511  irm = (irm - 1) % 3 + 1;
512  sprintf (tempbuff,"%s%c%2.2i%c",det.c_str(),sidesign,hfphi,'\0');
513  mystream << tempbuff;
514  rbx = mystream.str();
515  mystream.str("");
516  emap.loadObject(id,irm,rbx);
517  } else if (subdet == HcalOuter) {
518  det = detector[subdet];
519  int ring(0), sector(0);
520  if (ieta <= 4) ring = 0;
521  else if (ieta >= 5 && ieta <= 10) ring = 1;
522  else ring = 2;
523  for (int i = -2; i < iphi; i+=6) sector++;
524  if (sector > 12) sector = 1;
525  irm = ((iphi+1)/2)%6 + 1;
526  if (ring != 0 && sector % 2 != 0) sector++;
527  if (ring == 0)
528  sprintf (tempbuff,"%s%i%2.2d",det.c_str(),ring,sector);
529  else
530  sprintf (tempbuff,"%s%i%c%2.2d",det.c_str(),ring,sidesign,sector);
531  mystream << tempbuff;
532  rbx = mystream.str();
533  mystream.str("");
534  emap.loadObject(id,irm,rbx);
535  }
536  }
537  }
538  emap.sort();
539 }
540 
541 int HcalDbHardcode::getLayersInDepth(int ieta, int depth, const HcalTopology* topo){
542  //check for cached value
543  auto eta_depth_pair = std::make_pair(ieta,depth);
544  auto nLayers = theLayersInDepths_.find(eta_depth_pair);
545  if(nLayers != theLayersInDepths_.end()){
546  return nLayers->second;
547  }
548  else {
549  std::vector<int> segmentation;
550  topo->getDepthSegmentation(ieta,segmentation);
551  //assume depth segmentation vector is sorted
552  int nLayersInDepth = std::distance(std::lower_bound(segmentation.begin(),segmentation.end(),depth),
553  std::upper_bound(segmentation.begin(),segmentation.end(),depth));
554  theLayersInDepths_.insert(std::make_pair(eta_depth_pair,nLayersInDepth));
555  return nLayersInDepth;
556  }
557 }
558 
560  // SiPMParameter defined for each DetId the following quantities:
561  // SiPM type, PhotoElectronToAnalog, Dark Current, two auxiliary words
562  // These numbers come from some measurements done with SiPMs
563  // rule for type: cells with >4 layers use larger device (3.3mm diameter), otherwise 2.8mm
564  HcalSiPMType theType = HcalNoSiPM;
565  double thePe2fC = getParameters(fId).photoelectronsToAnalog();
566  double theDC = getParameters(fId).darkCurrent(0);
568  HcalDetId hid(fId);
569  int nLayersInDepth = getLayersInDepth(hid.ietaAbs(),hid.depth(),topo);
570  if(nLayersInDepth > 4) {
571  theType = HcalHBHamamatsu2;
572  theDC = getParameters(fId).darkCurrent(1);
573  }
574  else {
575  theType = HcalHBHamamatsu1;
576  theDC = getParameters(fId).darkCurrent(0);
577  }
579  HcalDetId hid(fId);
580  int nLayersInDepth = getLayersInDepth(hid.ietaAbs(),hid.depth(),topo);
581  if(nLayersInDepth > 4) {
582  theType = HcalHEHamamatsu2;
583  theDC = getParameters(fId).darkCurrent(1);
584  }
585  else {
586  theType = HcalHEHamamatsu1;
587  theDC = getParameters(fId).darkCurrent(0);
588  }
590  theType = HcalHOHamamatsu;
591  }
592 
593  return HcalSiPMParameter(fId.rawId(), theType, thePe2fC, theDC, 0, 0);
594 }
595 
597  // SiPMCharacteristics are constants for each type of SiPM:
598  // Type, # of pixels, 3 parameters for non-linearity, cross talk parameter, ..
599  // Obtained from data sheet and measurements
600  // types (in order): HcalHOZecotek=1, HcalHOHamamatsu, HcalHEHamamatsu1, HcalHEHamamatsu2, HcalHBHamamatsu1
601  for(unsigned ip = 0; ip < theSiPMCharacteristics_.size(); ++ip){
602  auto& ps = theSiPMCharacteristics_[ip];
603  sipm.loadObject(ip+1,
604  ps.getParameter<int>("pixels"),
605  ps.getParameter<double>("nonlin1"),
606  ps.getParameter<double>("nonlin2"),
607  ps.getParameter<double>("nonlin3"),
608  ps.getParameter<double>("crosstalk"),
609  0,0
610  );
611  }
612 }
613 
615  // For each detId parameters for trigger primitive
616  // mask for channel validity and self trigger information, fine grain
617  // bit information and auxiliary words
618  uint32_t bitInfo = ((44 << 16) | 30);
619  return HcalTPChannelParameter(fId.rawId(), 0, bitInfo, 0, 0);
620 }
621 
623  // Parameters for a given TP algorithm:
624  // FineGrain Algorithm Version for HBHE, ADC threshold fof TDC mask of HF,
625  // TDC mask for HF, Self Trigger bits, auxiliary words
626  tppar.loadObject(0,0,0xFFFFFFFFFFFFFFFF,0,0,0);
627 }
const double pedestalWidth() const
int i
Definition: DBlmapReader.cc:9
HcalGainWidth makeGainWidth(HcalGenericDetId fId)
HcalHardcodeParameters theHOParameters_
tuple correctTiming
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
HcalSiPMParameter makeHardcodeSiPMParameter(HcalGenericDetId fId, const HcalTopology *topo)
bool mapGeomId2DcsId(HcalDetId fId, HcalDcsDetId fDcsId)
Definition: HcalDcsMap.cc:235
std::vector< edm::ParameterSet > theSiPMCharacteristics_
assert(m_qm.get())
HcalRecoParam makeRecoParam(HcalGenericDetId fId)
HcalQIECoder makeQIECoder(HcalGenericDetId fId)
bool mapEId2tId(HcalElectronicsId fElectronicsId, HcalTrigTowerDetId fTriggerId)
HcalMCParam makeMCParam(HcalGenericDetId fId)
void makeHardcodeSiPMCharacteristics(HcalSiPMCharacteristics &sipm)
float getValue(int fCapId) const
get value for capId = 0..3
Definition: HcalGainWidth.h:21
HcalHardcodeParameters theDefaultParameters_
const double gainWidth(unsigned index) const
HcalCalibrationQIECoder makeCalibrationQIECoder(HcalGenericDetId fId)
tuple result
Definition: mps_fire.py:84
const double photoelectronsToAnalog() const
HcalPedestalWidth makePedestalWidth(HcalGenericDetId fId)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId)
HcalHardcodeParameters theHEUpgradeParameters_
void makeHardcodeFrontEndMap(HcalFrontEndMap &emap, const std::vector< HcalGenericDetId > &cells)
HcalTPChannelParameter makeHardcodeTPChannelParameter(HcalGenericDetId fId)
void makeHardcodeMap(HcalElectronicsMap &emap, const std::vector< HcalGenericDetId > &cells)
HcalPedestal makePedestal(HcalGenericDetId fId, bool fSmear=false)
HcalHardcodeParameters theHBUpgradeParameters_
bool loadObject(int type, int pixels, float parLin1, float parLin2, float parLin3, float crossTalk, int auxi1=0, float auxi2=0)
HcalTimingParam makeTimingParam(HcalGenericDetId fId)
HcalQIEType makeQIEType(HcalGenericDetId fId)
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
HcalQIEShape makeQIEShape()
HcalSubdetector
Definition: HcalAssistant.h:31
HcalSiPMType
Definition: HcalSiPMType.h:4
int j
Definition: DBlmapReader.cc:9
double f[11][100]
void makeHardcodeDcsMap(HcalDcsMap &dcs_map)
HcalQIENum
Definition: HcalQIENum.h:4
const double pedestal() const
HcalHardcodeParameters theHBParameters_
const double darkCurrent(unsigned index) const
bool mapEId2chId(HcalElectronicsId fElectronicsId, DetId fId)
bool isHcalDetId() const
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:103
void getDepthSegmentation(unsigned ring, std::vector< int > &readoutDepths) const
void makeHardcodeTPParameters(HcalTPParameters &tppar)
float getWidth(int fCapId) const
get width (sqrt(sigma_i_i)) for capId = 0..3
void loadObject(int version, int adcCut, uint64_t tdcMask, uint32_t tbits, int auxi1, int auxi2)
const double gain(unsigned index) const
bool loadObject(DetId fId, int rm, std::string rbx)
load a new entry
static std::atomic< unsigned int > counter
int getLayersInDepth(int ieta, int depth, const HcalTopology *topo)
HcalHardcodeParameters theHFParameters_
HcalGain makeGain(HcalGenericDetId fId, bool fSmear=false)
const int getGainIndex(HcalGenericDetId fId)
HcalHardcodeParameters theHEParameters_
tuple useLeakCorrection
HcalGenericSubdetector genericSubdet() const
std::map< std::pair< int, int >, int > theLayersInDepths_
Readout chain identification for Hcal.
HcalHardcodeParameters theHFUpgradeParameters_