diff --git a/[refs] b/[refs] index c8d18340de979..9966082b4ae77 100644 --- a/[refs] +++ b/[refs] @@ -1,3 +1,3 @@ --- refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e -"refs/heads/CMSSW_7_1_X": a4636379b6c438553949bfd6323a5bc0572e6f14 +"refs/heads/CMSSW_7_1_X": ff33ea6dbb1db812f6c8d01a5c0301ff2114e599 diff --git a/trunk/FastSimulation/CaloRecHitsProducer/src/EcalEndcapRecHitsMaker.cc b/trunk/FastSimulation/CaloRecHitsProducer/src/EcalEndcapRecHitsMaker.cc index db078bd3f28d6..57e9ab035d3e3 100644 --- a/trunk/FastSimulation/CaloRecHitsProducer/src/EcalEndcapRecHitsMaker.cc +++ b/trunk/FastSimulation/CaloRecHitsProducer/src/EcalEndcapRecHitsMaker.cc @@ -57,8 +57,6 @@ EcalEndcapRecHitsMaker::EcalEndcapRecHitsMaker(edm::ParameterSet const & p, edm::ParameterSet CalibParameters=RecHitsParameters.getParameter("ContFact"); double c1 = CalibParameters.getParameter("EEs25notContainment"); calibfactor_= 1./c1; - - } @@ -149,8 +147,9 @@ void EcalEndcapRecHitsMaker::loadEcalEndcapRecHits(edm::Event &iEvent,EERecHitCo theCalorimeterHits_[icell]=sat_; } if(energy!=0.) - ecalHits.push_back(EcalRecHit(myDetId,energy,0.)); - // std::cout << "AA " << myDetId.ix() << " " << myDetId.iy() << " " << energy << std::endl; + { + ecalHits.push_back(EcalRecHit(myDetId,energy,0.)); + } } noisified_ = true; @@ -171,15 +170,18 @@ void EcalEndcapRecHitsMaker::loadPCaloHits(const edm::Event & iEvent) unsigned hashedindex = EEDetId(cficalo->id()).hashedIndex(); // Check if the hit already exists + float calib=(doMisCalib_) ? calibfactor_*theCalibConstants_[hashedindex]:calibfactor_; if(theCalorimeterHits_[hashedindex]==0.) { theFiredCells_.push_back(hashedindex); float noise=(noise_==-1.) ? noisesigma_[hashedindex] : noise_ ; - if (!noisified_ ) theCalorimeterHits_[hashedindex] += random_->gaussShoot(0.,noise); + if (!noisified_ ) { + theCalorimeterHits_[hashedindex] += random_->gaussShoot(0.,noise*calib); + } } // the famous 1/0.97 calibration factor is applied here ! // the miscalibration is applied here: - float calib=(doMisCalib_) ? calibfactor_*theCalibConstants_[hashedindex]:calibfactor_; + // 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 // be added only once. This is a dirty trick. float energy=(cficalo->energy()==0.) ? 0.000001 : cficalo->energy() ; @@ -458,11 +460,12 @@ void EcalEndcapRecHitsMaker::init(const edm::EventSetup &es,bool doDigis,bool do // the miscalibration on the noise will be applied later one; so it is really ICMC here if(noise_==-1.) - { - noisesigma_[ic]=noiseADC_*agc->getEEValue()*ICMC[ic]; + { + // the calibfactor will be applied later on + noisesigma_[ic]=noiseADC_*adcToGeV_*ICMC[ic]/calibfactor_; meanNoiseSigmaEt_ += noisesigma_[ic] * sinTheta_[(icgetEEValue() << " " << ICMC[ic] << " " << noisesigma_[ic] << std::endl; } ++ncells; }