26 #include "CLHEP/GenericFunctions/Erf.hh"
60 double c1 = CalibParameters.
getParameter<
double>(
"EEs25notContainment");
73 for(
unsigned ic=0;ic<
size;++ic)
84 for(
unsigned itt=0;itt<
size;++itt)
92 for(
unsigned isc=0;isc<
size;++isc)
119 for(
unsigned ihit=0;ihit<nhit;++ihit)
172 for (cficalo=colcalo->begin(); cficalo!=cficaloend;cficalo++)
191 float energy=(cficalo->energy()==0.) ? 0.000001 : cficalo->energy() ;
196 int TThashedindex=
towerOf_[hashedindex];
217 for(
unsigned itt=0;itt<
nTT;++itt)
230 for(
unsigned isc=0;isc<
size;++isc)
237 unsigned nxtals=xtals.size();
243 for(
unsigned ix=0;ix<nxtals;++ix)
245 unsigned hashedindex=xtals[ix];
289 while(icell < ncells)
318 int TThashedindex=
towerOf_[cellindex];
386 unsigned size=vec.size();
387 for(
unsigned ic=0; ic<
size; ++ic)
402 towerOf_[cellhashedindex]=tthashedindex;
416 std::vector<int>::const_iterator itcheck=
find(
SCofTT_[tthashedindex].
begin(),
420 SCofTT_[tthashedindex].push_back(schi);
432 TTofSC_[schi].push_back(tthashedindex);
449 const std::vector<float>& ICMC = jcal->
endcapItems();
460 const std::vector<float>& IC = ical->
endcapItems();
463 unsigned nic = IC.size();
465 for(
unsigned ic=0;ic<nic;++ic)
468 float factor = IC[ic]/ICMC[ic];
471 rms+=(factor-1.)*(factor-1.);
489 rms=
sqrt(rms-mean*mean);
493 edm::LogInfo(
"CaloRecHitsProducer") <<
"Found " << ncells <<
" cells in the endcap calibration map. RMS is " << rms << std::endl;
507 edm::LogInfo(
"CaloRecHitsProducer") <<
"Uniform noise simulation selected";
514 edm::LogInfo(
"CaloRecHitsProducer")<<
" The gaussian model for high noise fluctuation cells after ZS is selected (best model), hot fraction " <<
EEHotFraction_ << std::endl;
553 const std::vector<int> & tts(
TTofSC_[schi]);
554 unsigned size=tts.size();
556 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
void loadEcalEndcapRecHits(edm::Event &iEvent, EERecHitCollection &ecalHits, EEDigiCollection &ecalDigis)
int TThashedIndexforEE(int originalhi) 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_
const RandomEngine * random_
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
static EEDetId unhashIndex(int hi)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
double gaussShoot(double mean=0.0, double sigma=1.0) const
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.
Geom::Theta< T > theta() const
int hashedIndex(int ieta, int iphi)
int SChashedIndex(int SC, int z) const
MVATrainerComputer * calib
std::vector< float > TTTEnergy_
std::vector< float > theCalibConstants_
const std::vector< float > * ICMC_
unsigned int poissonShoot(double mean) const
std::vector< float > theCalorimeterHits_
std::vector< float > sinTheta_
void noisifyTriggerTowers()
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void loadPCaloHits(const edm::Event &iEvent)
void reserve(size_t isize)
std::vector< float > noisesigma_
T const * product() const
EcalEndcapRecHitsMaker(edm::ParameterSet const &p, const RandomEngine *random)
T const * product() const
double flatShoot(double xmin=0.0, double xmax=1.0) 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_
std::vector< std::vector< int > > CrystalsinSC_
std::vector< int > theFiredTTs_
~EcalEndcapRecHitsMaker()
std::vector< int > theFiredCells_
void reserve(size_type n)
std::vector< uint32_t > endcapRawId_
std::vector< EcalTrigTowerDetId > theTTDetIds_
std::vector< double > highNoiseParameters_
void noisifySuperCrystals(int tthi)
const Items & endcapItems() const
std::vector< int > towerOf_
tuple size
Write out results.