26 #include "CLHEP/GenericFunctions/Erf.hh"
57 double c1 = CalibParameters.
getParameter<
double>(
"EEs25notContainment");
70 for(
unsigned ic=0;ic<
size;++ic)
81 for(
unsigned itt=0;itt<
size;++itt)
89 for(
unsigned isc=0;isc<
size;++isc)
117 for(
unsigned ihit=0;ihit<nhit;++ihit)
170 for (cficalo=colcalo->begin(); cficalo!=cficaloend;cficalo++)
189 float energy=(cficalo->energy()==0.) ? 0.000001 : cficalo->energy() ;
194 int TThashedindex=
towerOf_[hashedindex];
215 for(
unsigned itt=0;itt<
nTT;++itt)
228 for(
unsigned isc=0;isc<
size;++isc)
235 unsigned nxtals=xtals.size();
241 for(
unsigned ix=0;ix<nxtals;++ix)
243 unsigned hashedindex=xtals[ix];
287 while(icell < ncells)
305 energy=random->
gaussShoot(noisemean,noisesigma);
316 int TThashedindex=
towerOf_[cellindex];
382 const EcalEndcapGeometry * myEcalEndcapGeometry =
dynamic_cast<const EcalEndcapGeometry*
>(pG->getSubdetectorGeometry(
DetId::Ecal,
EcalEndcap));
384 unsigned size=vec.size();
385 for(
unsigned ic=0; ic<
size; ++ic)
393 float sintheta=
std::sin(myEcalEndcapGeometry->getGeometry(myDetId)->getPosition().theta());
400 towerOf_[cellhashedindex]=tthashedindex;
414 std::vector<int>::const_iterator itcheck=
find(
SCofTT_[tthashedindex].
begin(),
418 SCofTT_[tthashedindex].push_back(schi);
430 TTofSC_[schi].push_back(tthashedindex);
447 const std::vector<float>& ICMC = jcal->
endcapItems();
458 const std::vector<float>& IC = ical->
endcapItems();
461 unsigned nic = IC.size();
463 for(
unsigned ic=0;ic<nic;++ic)
466 float factor = IC[ic]/ICMC[ic];
469 rms+=(factor-1.)*(factor-1.);
487 rms=
sqrt(rms-mean*mean);
491 edm::LogInfo(
"CaloRecHitsProducer") <<
"Found " << ncells <<
" cells in the endcap calibration map. RMS is " << rms << std::endl;
505 edm::LogInfo(
"CaloRecHitsProducer") <<
"Uniform noise simulation selected";
512 edm::LogInfo(
"CaloRecHitsProducer")<<
" The gaussian model for high noise fluctuation cells after ZS is selected (best model), hot fraction " <<
EEHotFraction_ << std::endl;
551 const std::vector<int> & tts(
TTofSC_[schi]);
552 unsigned size=tts.size();
554 for(
unsigned itt=0;itt<size&&!
result;++itt)
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)
std::vector< int > SCHighInterest_
std::vector< int > theFiredSC_
std::vector< std::vector< int > > SCofTT_
void push_back(T const &t)
const GaussianTail * myGaussianTailGenerator_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
const EcalTrigTowerConstituentsMap * eTTmap_
double shoot(RandomEngineAndDistribution const *) const
int hashedIndex(int ieta, int iphi)
int SChashedIndex(int SC, int z) const
MVATrainerComputer * calib
std::vector< float > TTTEnergy_
std::vector< float > theCalibConstants_
void loadEcalEndcapRecHits(edm::Event &iEvent, EERecHitCollection &ecalHits, EEDigiCollection &ecalDigis, RandomEngineAndDistribution const *)
void noisifyTriggerTowers(RandomEngineAndDistribution const *)
const std::vector< float > * ICMC_
std::vector< float > theCalorimeterHits_
std::vector< float > sinTheta_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void loadPCaloHits(const edm::Event &iEvent, RandomEngineAndDistribution const *)
void reserve(size_t isize)
std::vector< float > noisesigma_
T const * product() const
EcalEndcapRecHitsMaker(edm::ParameterSet const &p)
T const * product() const
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_
std::vector< int > theFiredTTs_
~EcalEndcapRecHitsMaker()
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
std::vector< int > towerOf_
tuple size
Write out results.