CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalEndcapRecHitsMaker.cc
Go to the documentation of this file.
6 
23 
25 
26 #include "CLHEP/GenericFunctions/Erf.hh"
27 
28 #include <algorithm>
29 
31 {
32  edm::ParameterSet RecHitsParameters=p.getParameter<edm::ParameterSet>("ECALEndcap");
33  inputCol_=RecHitsParameters.getParameter<edm::InputTag>("MixedSimHits");
34  noise_ = RecHitsParameters.getParameter<double>("Noise");
35  threshold_ = RecHitsParameters.getParameter<double>("Threshold");
36  SRThreshold_ = RecHitsParameters.getParameter<double> ("SRThreshold");
37  refactor_ = RecHitsParameters.getParameter<double> ("Refactor");
38  refactor_mean_ = RecHitsParameters.getParameter<double> ("Refactor_mean");
39  noiseADC_ = RecHitsParameters.getParameter<double>("NoiseADC");
40  highNoiseParameters_ = RecHitsParameters.getParameter<std::vector<double> > ("HighNoiseParameters");
41 
45  theTTDetIds_.resize(1440);
46  SCofTT_.resize(1440);
47  SCHighInterest_.resize(633,0);
48  treatedSC_.resize(633,false);
49  TTofSC_.resize(633);
50  TTTEnergy_.resize(1440,0.);
51  CrystalsinSC_.resize(633);
52  sinTheta_.resize(EEDetId::kEEhalf,0.);
53  doCustomHighNoise_=false;
54 
55  noisified_ = (noise_==0.);
56  edm::ParameterSet CalibParameters=RecHitsParameters.getParameter<edm::ParameterSet>("ContFact");
57  double c1 = CalibParameters.getParameter<double>("EEs25notContainment");
58  calibfactor_= 1./c1;
59 }
60 
61 
63 {;
64 }
65 
67 {
68 
69  unsigned size=theFiredCells_.size();
70  for(unsigned ic=0;ic<size;++ic)
71  {
73  applyZSCells_[theFiredCells_[ic]] = false;
74  }
75  theFiredCells_.clear();
76  // If the noise is set to 0. No need to simulate it.
77  noisified_ = (noise_==0.);
78 
79  size=theFiredTTs_.size();
80 
81  for(unsigned itt=0;itt<size;++itt)
82  {
83  // std::cout << " TT " << theFiredTTs_[itt] << " " << TTTEnergy_[theFiredTTs_[itt]] << std::endl;
84  TTTEnergy_[theFiredTTs_[itt]]=0.;
85  }
86  theFiredTTs_.clear();
87 
88  size=theFiredSC_.size();
89  for(unsigned isc=0;isc<size;++isc)
90  {
92  treatedSC_[theFiredSC_[isc]]=false;
93  }
94  theFiredSC_.clear();
95 
96 
97 
98 // for(unsigned ic=0;ic<TTTEnergy_.size();++ic)
99 // if(TTTEnergy_[ic]!=0.) std::cout << " TT " << ic << " not cleaned " << std::endl;
100 // for(unsigned ic=0;ic<SCHighInterest_.size();++ic)
101 // if(SCHighInterest_[ic]!=0) std::cout << " SCHighInterest " << ic << SCHighInterest_[ic] << " not cleaned " << std::endl;
102 // for(unsigned ic=0;ic<treatedSC_.size();++ic)
103 // if(treatedSC_[ic]) std::cout << " treatedSC " << ic << treatedSC_[ic] << " not cleaned " << std::endl;
104 }
105 
106 
109 {
110  clean();
111  loadPCaloHits(iEvent, random);
112 
113  unsigned nhit=theFiredCells_.size();
114  unsigned gain, adc;
115  ecalDigis.reserve(nhit);
116  ecalHits.reserve(nhit);
117  for(unsigned ihit=0;ihit<nhit;++ihit)
118  {
119  unsigned icell = theFiredCells_[ihit];
120 
121  EEDetId myDetId(endcapRawId_[icell]);
122  if(doDigis_)
123  {
124  ecalDigis.push_back( myDetId );
125  EEDataFrame myDataFrame( ecalDigis.back() );
126  // myDataFrame.setSize(1); // now useless - by construction fixed at 1 frame - FIXME
127  // The real work is in the following line
128  geVtoGainAdc(theCalorimeterHits_[icell],gain,adc);
129  myDataFrame.setSample(0,EcalMGPASample(adc,gain));
130  //ecalDigis.push_back(myDataFrame);
131  }
132 
133  // If the energy+noise is below the threshold, a hit is nevertheless created, otherwise, there is a risk that a "noisy" hit
134  // is afterwards put in this cell which would not be correct.
135  float energy=theCalorimeterHits_[icell];
136 
137  // the threshold is in amplitude, so the intercalibration constant should be injected
138  if ( energy<threshold_*((*ICMC_)[icell]) && !isHighInterest(myDetId) && applyZSCells_[icell])
139  {
140  theCalorimeterHits_[icell]=0.;
141  // int TThashedindex=towerOf_[icell];
142  // std::cout << " SR " << TTTEnergy_[TThashedindex] << " Cell energy " << energy << " 0 "<< std::endl;
143  energy=0.;
144  }
145  else
146  if( energy > sat_)
147  {
148  energy=sat_;
149  theCalorimeterHits_[icell]=sat_;
150  }
151  if(energy!=0.)
152  {
153  ecalHits.push_back(EcalRecHit(myDetId,energy,0.));
154  }
155  }
156  noisified_ = true;
157 
158 }
159 
161 {
162  // std::cout << " loadPCaloHits " << std::endl;
164  iEvent.getByLabel(inputCol_,cf);
165  std::auto_ptr<MixCollection<PCaloHit> > colcalo(new MixCollection<PCaloHit>(cf.product(),std::pair<int,int>(0,0) ));
166 
167  theFiredCells_.reserve(colcalo->size());
169  MixCollection<PCaloHit>::iterator cficaloend=colcalo->end();
170  for (cficalo=colcalo->begin(); cficalo!=cficaloend;cficalo++)
171  {
172 
173  unsigned hashedindex = EEDetId(cficalo->id()).hashedIndex();
174  // Check if the hit already exists
176  if(theCalorimeterHits_[hashedindex]==0.)
177  {
178  theFiredCells_.push_back(hashedindex);
179  float noise=(noise_==-1.) ? noisesigma_[hashedindex] : noise_ ;
180  if (!noisified_ ) {
181  theCalorimeterHits_[hashedindex] += random->gaussShoot(0.,noise*calib);
182  }
183  }
184  // the famous 1/0.97 calibration factor is applied here !
185  // the miscalibration is applied here:
186 
187  // cficalo->energy can be 0 (a 7x7 grid is always built), in this case, one should not kill the cell (for later noise injection), but it should
188  // be added only once. This is a dirty trick.
189  float energy=(cficalo->energy()==0.) ? 0.000001 : cficalo->energy() ;
190  energy*=calib;
191  theCalorimeterHits_[hashedindex]+=energy;
192 
193  // Now deal with the TTs
194  int TThashedindex=towerOf_[hashedindex];
195 
196  if(TTTEnergy_[TThashedindex]==0.)
197  {
198  theFiredTTs_.push_back(TThashedindex);
199  }
200  // the same dirty trick as before. sinTheta is stored only for one endcap
201  TTTEnergy_[TThashedindex]+=energy*sinTheta_[(hashedindex<EEDetId::kEEhalf)? hashedindex : hashedindex-EEDetId::kEEhalf];
202 
203  }
204  // std::cout << " Noisifying the TT " << std::endl;
205  noisifyTriggerTowers(random);
206  randomNoisifier(random);
207 }
208 
210 {
211  if(noise_==0.) return;
212 
213  // noise should be injected in all the Super-crystals contained in each trigger tower
214  unsigned nTT=theFiredTTs_.size();
215  for(unsigned itt=0;itt<nTT;++itt)
216  {
217  // shoot noise in the trigger tower
218  // std::cout << " Treating " << theFiredTTs_[itt] << " " << theTTDetIds_[theFiredTTs_[itt]] << " " << TTTEnergy_[theFiredTTs_[itt]] << std::endl;
219  noisifySuperCrystals(theFiredTTs_[itt], random);
220  }
221 }
222 
223 // inject noise in all the supercrystals of a given trigger tower
225 {
226  unsigned size=SCofTT_[tthi].size();
227  // get the list of Supercrytals
228  for(unsigned isc=0;isc<size;++isc)
229  {
230  // std::cout << " Looking at SC " << isc << " " << SCofTT_[tthi][isc] << std::endl;
231  // should not do it twice
232  if(treatedSC_[SCofTT_[tthi][isc]]) continue;
233 
234  const std::vector<int> & xtals(CrystalsinSC_[SCofTT_[tthi][isc]]);
235  unsigned nxtals=xtals.size();
236  unsigned count=0;
237 // if (nxtals!=25)
238 // {
239 // std::cout << " This SC has " << nxtals << " crystals " << std::endl;
240 // }
241  for(unsigned ix=0;ix<nxtals;++ix)
242  {
243  unsigned hashedindex=xtals[ix];
244  // check if the crystal has already something or not
245  // std::cout << " Looking at crystal " << EEDetId(endcapRawId_[hashedindex]) << std::endl;
246  if(theCalorimeterHits_[hashedindex]==0.)
247  {
249  float noise = (noise_==-1.) ? noisesigma_[hashedindex]:noise_;
250  float energy = calib*random->gaussShoot(0.,noise);
251  theCalorimeterHits_[hashedindex]=energy;
252  theFiredCells_.push_back(hashedindex);
253  // the corresponding trigger tower should be updated
254  int newtthi=towerOf_[hashedindex];
255  // std::cout << " Updatung TT " << newtthi << std::endl;
256  if(TTTEnergy_[newtthi]==0.)
257  {
258  theFiredTTs_.push_back(newtthi);
259  }
260  TTTEnergy_[newtthi]+=energy*sinTheta_[(hashedindex<EEDetId::kEEhalf)? hashedindex : hashedindex-EEDetId::kEEhalf];
261  ++count;
262  }
263  }
264  treatedSC_[SCofTT_[tthi][isc]]=true;
265  // std::cout << "SC " << SCofTT_[tthi][isc] << " done ; injected " << count << std::endl;
266  }
267 }
268 
269 // injects high noise fluctuations cells. It is assumed that these cells cannot
270 // make of the tower a high interest one.
271 // Two different cases:
272 // 1) noise flat in energy -> use a GaussianTail generator
273 // 2) noise from database (~flat in pT) -> inject noise everywhere
275 {
276  // first of cells where some noise will be injected
278  unsigned ncells= random->poissonShoot(mean);
279 
280  // for debugging
281  // std::vector<int> listofNewTowers;
282 
283  if(noise_==-1. && !doCustomHighNoise_)
285 
286  unsigned icell=0;
287  while(icell < ncells)
288  {
289  unsigned cellindex= (noise_!=-1. || doCustomHighNoise_) ?
290  (unsigned)(floor(random->flatShoot()*EEDetId::kSizeForDenseIndexing)): icell ;
291 
292  if(theCalorimeterHits_[cellindex]==0.)
293  {
294  // if noise_>0 the following is really an energy, if -1. it is a transverse energy
295  double energy=0.;
296  if(noise_>0.)
297  energy=myGaussianTailGenerator_->shoot(random);
298  if(noise_==-1.)
299  {
300  // in this case the generated noise might be below the threshold but it
301  // does not matter, the threshold will be applied anyway
302  // energy/=sinTheta_[(cellindex<EEDetId::kEEhalf)?cellindex : cellindex-EEDetId::kEEhalf];
303  float noisemean = (doCustomHighNoise_)? highNoiseParameters_[0]*(*ICMC_)[cellindex]*adcToGeV_: 0.;
304  float noisesigma = (doCustomHighNoise_)? highNoiseParameters_[1]*(*ICMC_)[cellindex]*adcToGeV_ : noisesigma_[cellindex];
305  energy=random->gaussShoot(noisemean,noisesigma);
306 
307  // in the case of high noise fluctuation, the ZS should not be applied later
308  if(doCustomHighNoise_) applyZSCells_[cellindex]=false;
309  }
311  energy *= calib;
312  theCalorimeterHits_[cellindex]=energy;
313  theFiredCells_.push_back(cellindex);
314  // EEDetId myDetId(EEDetId::unhashIndex(cellindex));
315  // now get the TT
316  int TThashedindex=towerOf_[cellindex];
317  // std::cout << " myDetIds " << myDetId << " "TTHI " << TThashedindex<< std::endl;
318  if(TTTEnergy_[TThashedindex]==0.)
319  {
320  theFiredTTs_.push_back(TThashedindex);
321  TTTEnergy_[TThashedindex]+=energy*sinTheta_[(cellindex<EEDetId::kEEhalf)?cellindex : cellindex-EEDetId::kEEhalf];
322  // listofNewTowers.push_back(TThashedindex);
323  }
324 // else
325 // {
326 // std::vector<int>::const_iterator itcheck=std::find(listofNewTowers.begin(),listofNewTowers.end(),
327 // TThashedindex);
328 // if(itcheck==listofNewTowers.end())
329 // {
330 // const std::vector<int> & scxtals=SCofTT_[TThashedindex];
331 // for(unsigned isc=0;isc<scxtals.size();++isc)
332 // {
333 // const std::vector<int> & xtals(CrystalsinSC_[SCofTT_[TThashedindex][isc]]);
334 // for(unsigned ic=0;ic<xtals.size();++ic)
335 // std::cout << isc << " " << EEDetId::unhashIndex(xtals[ic]) << " " << theCalorimeterHits_[xtals[ic]] << std::endl;
336 // }
337 // }
338 // }
339  if(noise_>0.)
340  ++icell;
341  }
342  if(noise_==-1.)
343  ++icell;
344  }
345  // std::cout << " Injected random noise in " << ncells << " cells " << std::endl;
346 }
347 
348 
349 void EcalEndcapRecHitsMaker::init(const edm::EventSetup &es,bool doDigis,bool domiscalib)
350 {
351  doDigis_=doDigis;
352  doMisCalib_=domiscalib;
353 
354 
356  es.get<EcalADCToGeVConstantRcd>().get(agc);
357 
358  adcToGeV_= agc->getEEValue() ; // ~0.06
359  minAdc_ = 200;
360  maxAdc_ = 4085;
361 
362  geVToAdc1_ = 1./adcToGeV_;
363  geVToAdc2_ = geVToAdc1_/2.;
364  geVToAdc3_ = geVToAdc1_/12.;
365 
366  t1_ = ((int)maxAdc_-(int)minAdc_)*adcToGeV_;
367  t2_ = 2.* t1_ ;
368 
369  sat_ = 12.*t1_*calibfactor_;
370 
372 
374 
376  es.get<CaloGeometryRecord>().get(pG);
377 
379  es.get<IdealGeometryRecord>().get(hetm);
380  eTTmap_ = &(*hetm);
381 
382  const EcalEndcapGeometry * myEcalEndcapGeometry = dynamic_cast<const EcalEndcapGeometry*>(pG->getSubdetectorGeometry(DetId::Ecal,EcalEndcap));
383  const std::vector<DetId>& vec(myEcalEndcapGeometry->getValidDetIds(DetId::Ecal,EcalEndcap));
384  unsigned size=vec.size();
385  for(unsigned ic=0; ic<size; ++ic)
386  {
387  EEDetId myDetId(vec[ic]);
388  int cellhashedindex=myDetId.hashedIndex();
389  endcapRawId_[cellhashedindex]=vec[ic].rawId();
390  // trick to save a bit of memory. sin Theta is identical in EE+/-
391  if (cellhashedindex< EEDetId::kEEhalf)
392  {
393  float sintheta=std::sin(myEcalEndcapGeometry->getGeometry(myDetId)->getPosition().theta());
394  sinTheta_[cellhashedindex]=sintheta;
395  }
396  // a bit of trigger tower and SuperCrystals algebra
397  // first get the trigger tower
398  EcalTrigTowerDetId towid1= eTTmap_->towerOf(vec[ic]);
399  int tthashedindex=TThashedIndexforEE(towid1);
400  towerOf_[cellhashedindex]=tthashedindex;
401 
402  // get the SC of the cell
403  int schi=SChashedIndex(EEDetId(vec[ic]));
404  if(schi<0)
405  {
406  // std::cout << " OOps " << schi << std::endl;
407  EEDetId myID(vec[ic]);
408  // std::cout << " DetId " << myID << " " << myID.isc() << " " << myID.zside() << " " << myID.isc()+(myID.zside()+1)*158 << std::endl;
409  }
410 
411  theTTDetIds_[tthashedindex]=towid1;
412 
413  // check if this SC is already in the list of the corresponding TT
414  std::vector<int>::const_iterator itcheck=find(SCofTT_[tthashedindex].begin(),
415  SCofTT_[tthashedindex].end(),
416  schi);
417  if(itcheck==SCofTT_[tthashedindex].end())
418  SCofTT_[tthashedindex].push_back(schi);
419 
420  // check if this crystal is already in the list of crystals per sc
421  itcheck=find(CrystalsinSC_[schi].begin(),CrystalsinSC_[schi].end(),cellhashedindex);
422  if(itcheck==CrystalsinSC_[schi].end())
423  CrystalsinSC_[schi].push_back(cellhashedindex);
424 
425  // check if the TT is already in the list of sc
426  // std::cout << " SCHI " << schi << " " << TTofSC_.size() << std::endl;
427  // std::cout << TTofSC_[schi].size() << std::endl;
428  itcheck=find(TTofSC_[schi].begin(),TTofSC_[schi].end(),tthashedindex);
429  if(itcheck==TTofSC_[schi].end())
430  TTofSC_[schi].push_back(tthashedindex);
431  }
432  // std::cout << " Made the array " << std::endl;
433  // Stores the miscalibration constants
434  if(doMisCalib_||noise_==-1.)
435  {
436  double rms=0.;
437  double mean=0.;
438  unsigned ncells=0;
439 
440  if(noise_==-1.)
442 
443  // Intercalib constants IC_MC_i
445  es.get<EcalIntercalibConstantsMCRcd>().get(pJcal);
446  const EcalIntercalibConstantsMC* jcal = pJcal.product();
447  const std::vector<float>& ICMC = jcal->endcapItems();
448 
449  // should be saved, used by the zero suppression
450  ICMC_ = &ICMC;
451 
452  // Intercalib constants IC_i
453  // IC = IC_MC * (1+delta)
454  // where delta is the miscalib
456  es.get<EcalIntercalibConstantsRcd>().get(pIcal);
457  const EcalIntercalibConstants* ical = pIcal.product();
458  const std::vector<float>& IC = ical->endcapItems();
459 
460 
461  unsigned nic = IC.size();
462  meanNoiseSigmaEt_ = 0.;
463  for(unsigned ic=0;ic<nic;++ic)
464  {
465  // the miscalibration factor is
466  float factor = IC[ic]/ICMC[ic];
467  // Apply Refactor & refactor_mean
469  rms+=(factor-1.)*(factor-1.);
470  mean+=(factor-1.);
471 
472  // the miscalibration on the noise will be applied later one; so it is really ICMC here
473  if(noise_==-1.)
474  {
475  // the calibfactor will be applied later on
478  // EEDetId myDetId(EEDetId::unhashIndex(ic));
479  // std::cout << " DDD " << myDetId << " " << myDetId.ix() << " " << myDetId.iy() << " " << ic << " " << noiseADC_ << " " << agc->getEEValue() << " " << ICMC[ic] << " " << noisesigma_[ic] << std::endl;
480  }
481  ++ncells;
482  }
483 
484  mean/=(float)ncells;
485  rms/=(float)ncells;
486 
487  rms=sqrt(rms-mean*mean);
488 
489  meanNoiseSigmaEt_ /=(float)ncells;
490 
491  edm::LogInfo("CaloRecHitsProducer") << "Found " << ncells << " cells in the endcap calibration map. RMS is " << rms << std::endl;
492  // std::cout << "Found " << ncells << " cells in the endcap calibration map. RMS is " << rms << std::endl;
493  }
494 
495  // Initialize the Gaussian tail generator
496  // Two options : noise is set by the user (to a positive value). In this case, this value is taken
497  // or the user chose to use the noise from DB. In this case, the noise is flat in pT and not in energy
498  // but the threshold is in energy and not in pT.
499 
501  Genfun::Erf myErf;
502  if( noise_>0. ) {
503  EEHotFraction_ = 0.5-0.5*myErf(threshold_/noise_/sqrt(2.));
505  edm::LogInfo("CaloRecHitsProducer") <<"Uniform noise simulation selected";
506  }
507  else if( noise_==-1 && doCustomHighNoise_)
508  {
509  // computes the hot fraction from the threshold applied on the online amplitude reconstruction
510  //
512  edm::LogInfo("CaloRecHitsProducer")<< " The gaussian model for high noise fluctuation cells after ZS is selected (best model), hot fraction " << EEHotFraction_ << std::endl;
513  }
514 }
515 
516 
517 void EcalEndcapRecHitsMaker::geVtoGainAdc(float e,unsigned & gain, unsigned &adc) const
518 {
519  if(e<t1_)
520  {
521  gain = 1; // x1
522  // std::cout << " E " << e << std::endl;
523  adc = minAdc_ + (unsigned)(e*geVToAdc1_);
524  // std::cout << " e*geVtoAdc1_ " << e*geVToAdc1_ << " " <<(unsigned)(e*geVToAdc1_) << std::endl;
525  }
526  else if (e<t2_)
527  {
528  gain = 2; // x6
529  adc = minAdc_ + (unsigned)(e*geVToAdc2_);
530  }
531  else
532  {
533  gain = 3; // x12
534  adc = std::min(minAdc_+(unsigned)(e*geVToAdc3_),maxAdc_);
535  }
536 }
537 
539 {
540  // std::cout << " is HI " ;
541  int schi=SChashedIndex(detid);
542  // std::cout << detid << " " << schi << " ";
543  // check if it has already been treated or not
544  // 0 <=> not treated
545  // 1 <=> high interest
546  // -1 <=> low interest
547  // std::cout << SCHighInterest_[schi] << std::endl;
548  if(SCHighInterest_[schi]!=0) return (SCHighInterest_[schi]>0);
549 
550  // now look if a TT contributing is of high interest
551  const std::vector<int> & tts(TTofSC_[schi]);
552  unsigned size=tts.size();
553  bool result=false;
554  for(unsigned itt=0;itt<size&&!result;++itt)
555  {
556  // std::cout << " Checking TT " << tts[itt] << std::endl;
557  if(TTTEnergy_[tts[itt]]>SRThreshold_) result=true;
558  }
559  SCHighInterest_[schi]=(result)? 1:-1;
560  theFiredSC_.push_back(schi);
561  return result;
562 }
int adc(sample_type sample)
get the ADC sample (12 bits)
std::vector< bool > treatedSC_
T getParameter(std::string const &) const
bool isHighInterest(const EEDetId &icell)
void geVtoGainAdc(float e, unsigned &gain, unsigned &adc) const
int TThashedIndexforEE(int originalhi) const
double flatShoot(double xmin=0.0, double xmax=1.0) const
std::vector< std::vector< int > > TTofSC_
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< int > SCHighInterest_
std::vector< int > theFiredSC_
std::vector< std::vector< int > > SCofTT_
void push_back(T const &t)
const GaussianTail * myGaussianTailGenerator_
TRandom random
Definition: MVATrainer.cc:138
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
virtual const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const
Get a list of valid detector ids (for the given subdetector)
const EcalTrigTowerConstituentsMap * eTTmap_
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
double shoot(RandomEngineAndDistribution const *) const
Definition: GaussianTail.cc:18
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
#define nTT
Definition: TMEGeom.h:6
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:42
int SChashedIndex(int SC, int z) const
MVATrainerComputer * calib
Definition: MVATrainer.cc:64
int iEvent
Definition: GenABIO.cc:230
std::vector< float > TTTEnergy_
std::vector< float > theCalibConstants_
void loadEcalEndcapRecHits(edm::Event &iEvent, EERecHitCollection &ecalHits, EEDigiCollection &ecalDigis, RandomEngineAndDistribution const *)
void noisifyTriggerTowers(RandomEngineAndDistribution const *)
T sqrt(T t)
Definition: SSEVec.h:48
const std::vector< float > * ICMC_
tuple result
Definition: query.py:137
std::vector< float > theCalorimeterHits_
std::vector< float > sinTheta_
#define end
Definition: vmac.h:37
T min(T a, T b)
Definition: MathUtil.h:58
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:405
void loadPCaloHits(const edm::Event &iEvent, RandomEngineAndDistribution const *)
void reserve(size_t isize)
std::vector< float > noisesigma_
int hashedIndex() const
Definition: EEDetId.h:182
T const * product() const
Definition: Handle.h:81
EcalEndcapRecHitsMaker(edm::ParameterSet const &p)
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
void push_back(id_type iid, data_type const *idata)
void init(const edm::EventSetup &es, bool dodigis, bool domiscalib)
std::vector< int > applyZSCells_
void randomNoisifier(RandomEngineAndDistribution const *)
std::vector< std::vector< int > > CrystalsinSC_
#define begin
Definition: vmac.h:30
std::vector< int > theFiredTTs_
std::vector< int > theFiredCells_
double gaussShoot(double mean=0.0, double sigma=1.0) const
unsigned int poissonShoot(double mean) const
void reserve(size_type n)
std::vector< uint32_t > endcapRawId_
std::vector< EcalTrigTowerDetId > theTTDetIds_
std::vector< double > highNoiseParameters_
void noisifySuperCrystals(int tthi, RandomEngineAndDistribution const *)
const Items & endcapItems() const
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
tuple size
Write out results.