Skip to content

Commit

Permalink
Merge pull request #6501 from mdhildreth/73X_PreMixingPatches
Browse files Browse the repository at this point in the history
Some missing pieces for PreMixing
  • Loading branch information
davidlange6 committed Nov 20, 2014
2 parents f060c3b + 69a0a8d commit 3c0d894
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Configuration/Applications/python/ConfigBuilder.py
Expand Up @@ -1465,7 +1465,7 @@ def prepare_DIGI2RAW(self, sequence = None):
self.scheduleSequence(sequence.split('.')[-1],'digi2raw_step')
if "DIGIPREMIX" in self.stepMap.keys():
self.executeAndRemember("process.esDigiToRaw.Label = cms.string('mix')") ##terrible hack - bypass zero suppression

self.executeAndRemember("process.SiStripDigiToRaw.FedReadoutMode = cms.string('PREMIX_RAW')") ##special readout mode for StripTracker
return

def prepare_REPACK(self, sequence = None):
Expand Down
17 changes: 12 additions & 5 deletions SimCalorimetry/HcalSimAlgos/interface/HcalSignalGenerator.h
Expand Up @@ -126,14 +126,21 @@ class HcalSignalGenerator : public HcalBaseSignalGenerator

CaloSamples samplesInPE(const DIGI & digi)
{

// For PreMixing, (Note that modifications will need to be made for DataMixing) the
// energy for each channel is kept as fC*10, but stored as an integer in ADC. If this
// results in an overflow, the "standard" ADC conversion is used and that channel is marked
// with an error that allows the "standard" decoding to convert ADC back to fC. So, most
// channels get to fC by just dividing ADC/10; some require special treatment.

// calibration, for future reference: (same block for all Hcal types)
HcalDetId cell = digi.id();
// const HcalCalibrations& calibrations=conditions->getHcalCalibrations(cell);
const HcalQIECoder* channelCoder = theConditions->getHcalCoder (cell);
const HcalQIEShape* channelShape = theConditions->getHcalShape (cell);
HcalCoderDb coder (*channelCoder, *channelShape);
CaloSamples result;
coder.adc2fC(digi, result);
//const HcalQIECoder* channelCoder = theConditions->getHcalCoder (cell);
//const HcalQIEShape* channelShape = theConditions->getHcalShape (cell);
//HcalCoderDb coder (*channelCoder, *channelShape);
CaloSamples result = CaloSamples(cell,digi.size());;
//coder.adc2fC(digi, result);

// first, check if there was an overflow in this fake digi:
bool overflow = false;
Expand Down

0 comments on commit 3c0d894

Please sign in to comment.