Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72959
b: "refs/heads/CMSSW_7_1_X"
c: ff33ea6
h: "refs/heads/CMSSW_7_1_X"
i:
  72957: 8c671d6
  72955: 212f9c2
  72951: dc6cad6
  72943: edc0a42
  72927: e6e87bb
  72895: dd7b208
  72831: 9a80952
  72703: 6a76832
v: v3
  • Loading branch information
Florian Beaudette committed Sep 3, 2009
1 parent 3bf0809 commit 5fb1bbf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e
"refs/heads/CMSSW_7_1_X": a4636379b6c438553949bfd6323a5bc0572e6f14
"refs/heads/CMSSW_7_1_X": ff33ea6dbb1db812f6c8d01a5c0301ff2114e599
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ EcalEndcapRecHitsMaker::EcalEndcapRecHitsMaker(edm::ParameterSet const & p,
edm::ParameterSet CalibParameters=RecHitsParameters.getParameter<edm::ParameterSet>("ContFact");
double c1 = CalibParameters.getParameter<double>("EEs25notContainment");
calibfactor_= 1./c1;


}


Expand Down Expand Up @@ -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;

Expand All @@ -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() ;
Expand Down Expand Up @@ -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_[(ic<EEDetId::kEEhalf)? ic : ic-EEDetId::kEEhalf];
EEDetId myDetId(EEDetId::unhashIndex(ic));
// std::cout << " BB " << myDetId.ix() << " " << myDetId.iy() << " " << noisesigma_[ic] * sinTheta_[(ic<EEDetId::kEEhalf)? ic : ic-EEDetId::kEEhalf] << std::endl;;
// EEDetId myDetId(EEDetId::unhashIndex(ic));
// std::cout << " DDD " << myDetId << " " << myDetId.ix() << " " << myDetId.iy() << " " << ic << " " << noiseADC_ << " " << agc->getEEValue() << " " << ICMC[ic] << " " << noisesigma_[ic] << std::endl;
}
++ncells;
}
Expand Down

0 comments on commit 5fb1bbf

Please sign in to comment.