Skip to content

Commit

Permalink
subtract ped mean from DIGIs when re-calibrating on-the-fly
Browse files Browse the repository at this point in the history
subtract pedestal mean and update the kev2mip conversion
  • Loading branch information
deguio committed Jun 27, 2019
1 parent e47cb14 commit 1d49340
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -178,7 +178,7 @@
scaleByArea = cms.bool(True),
noise = cms.PSet(refToPSet_ = cms.string("HGCAL_noise_heback")), #scales both for scint raddam and sipm dark current
calibDigis = cms.bool(True),
keV2MIP = cms.double(1./500.0),
keV2MIP = cms.double(1./675.0),
doTimeSamples = cms.bool(False),
nPEperMIP = cms.double(21.0),
nTotalPE = cms.double(7500),
Expand Down
2 changes: 1 addition & 1 deletion SimCalorimetry/HGCalSimProducers/src/HGCHEbackDigitizer.cc
Expand Up @@ -264,7 +264,7 @@ void HGCHEbackDigitizer::runRealisticDigitizer(std::unique_ptr<HGCalDigiCollecti
//const float nPixelTot = nPixel + sqrt(nPixel) * CLHEP::RandGaussQ::shoot(engine, 0., 0.05); //FDG: just a note for now, par to be defined

//scale to calibrated response depending on the calibDigis_ flag
float totalMIPs = calibDigis_ ? (float)npe / scaledPePerMip : nPixel / nPEperMIP_;
float totalMIPs = calibDigis_ ? std::max((npe - meanN), 0.f) / scaledPePerMip : nPixel / nPEperMIP_;

if (debug && totalIniMIPs > 0) {
LogDebug("HGCHEbackDigitizer") << "npeS: " << npeS << " npeN: " << npeN << " npe: " << npe
Expand Down

0 comments on commit 1d49340

Please sign in to comment.