32 const std::string hitsProducer (
41 produces<EcalTBTDCRawInfo>();
46 double simHitToPhotoelectronsBarrel = params.
getParameter<
double>(
"simHitToPhotoelectronsBarrel");
47 double simHitToPhotoelectronsEndcap = params.
getParameter<
double>(
"simHitToPhotoelectronsEndcap");
48 double photoelectronsToAnalogBarrel = params.
getParameter<
double>(
"photoelectronsToAnalogBarrel");
49 double photoelectronsToAnalogEndcap = params.
getParameter<
double>(
"photoelectronsToAnalogEndcap");
50 double samplingFactor = params.
getParameter<
double>(
"samplingFactor");
51 double timePhase = params.
getParameter<
double>(
"timePhase");
52 int readoutFrameSize = params.
getParameter<
int>(
"readoutFrameSize");
54 bool doPhotostatistics = params.
getParameter<
bool>(
"doPhotostatistics");
63 photoelectronsToAnalogBarrel, photoelectronsToAnalogEndcap,
64 samplingFactor, timePhase, readoutFrameSize, binOfMaximum,
65 doPhotostatistics, syncPhase);
73 std::vector<double> corrNoiseMatrix = params.
getParameter< std::vector<double> >(
"CorrelatedNoiseMatrix");
74 if ( corrNoiseMatrix.size() == (
unsigned int)(readoutFrameSize*readoutFrameSize) ) {
75 for (
int row = 0 ; row < readoutFrameSize; ++row ) {
76 for (
int column = 0 ; column < readoutFrameSize; ++column ) {
77 int index = column + readoutFrameSize*row;
78 thisMatrix(row,column) = corrNoiseMatrix[
index];
87 bool applyConstantTerm = params.
getParameter<
bool>(
"applyConstantTerm");
88 double rmsConstantTerm = params.
getParameter<
double> (
"ConstantTerm");
109 typedef std::vector< edm::ParameterSet >
Parameters;
111 for(Parameters::iterator itRanges = ranges.begin(); itRanges != ranges.end(); ++itRanges)
114 aRange.
runRanges.first = itRanges->getParameter<
int>(
"startRun");
115 aRange.
runRanges.second = itRanges->getParameter<
int>(
"endRun");
116 aRange.
tdcMin = itRanges->getParameter< std::vector<double> >(
"tdcMin");
117 aRange.
tdcMax = itRanges->getParameter< std::vector<double> >(
"tdcMax");
161 const std::vector<DetId>& theBarrelDets (
181 const bool isEB ( 0 != EBHits &&
182 0 != EBHits->
size() ) ;
188 const bool isEE ( 0 != EEHits &&
189 0 != EEHits->
size() ) ;
213 std::auto_ptr<MixCollection<PCaloHit> > barrelHits( EBHits );
215 edm::LogInfo(
"DigiInfo") <<
"EB Digis: " << barrelResult->size();
216 std::cout <<
"EB Digis: " << barrelResult->size()<<std::endl;
235 std::auto_ptr<MixCollection<PCaloHit> > endcapHits( EEHits );
237 edm::LogInfo(
"EcalDigi") <<
"EE Digis: " << endcapResult->size();
238 std::cout <<
"EE Digis: " << endcapResult->size()<<std::endl;
255 barrelResult->swap(*barrelReadout);
262 event.put( TDCproduct ) ;
304 theGains[1] = theGains[2]*(defaultRatios->
gain12Over6()) ;
306 LogDebug(
"EcalDigi") <<
" Gains: " <<
"\n" <<
" g1 = " << theGains[1] <<
"\n" <<
" g2 = " << theGains[2] <<
"\n" <<
" g3 = " << theGains[3];
308 delete defaultRatios;
379 unsigned int thisChannel = 1;
385 unsigned int sampleIndex = 0;
386 theTBTDCRawInfo.
setSample(sampleIndex, theTBTDCSample);
388 LogDebug(
"EcalDigi") << theTBTDCSample <<
"\n" << theTBTDCRawInfo;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool use2004OffsetConvention_
virtual const CaloSimParameters & simParameters(const DetId &id) const
return the sim parameters relative to the right subdet
virtual void produce(edm::Event &event, const edm::EventSetup &eventSetup)
Creates electronics signals from hits.
CaloHitRespoNew * theEBResponse
void run(MixCollection< PCaloHit > &input, DigiCollection &output)
const EcalTrigTowerConstituentsMap * theTTmap
virtual ~EcalTBDigiProducer()
std::string EBdigiCollection_
void setIntercalibConstants(const EcalIntercalibConstantsMC *ical)
std::vector< double > tdcMax
EcalTBReadout * theTBReadout
Main class for Parameters in different subdetectors.
EcalCorrMatrix * theNoiseMatrix
CorrelatedNoisifier< EcalCorrMatrix > * theCorrNoise
void fillTBTDCRawInfo(EcalTBTDCRawInfo &theTBTDCRawInfo)
void performReadout(edm::Event &event, const EcalTrigTowerConstituentsMap &theTTmap, EBDigiCollection &input, EBDigiCollection &output)
master function to be called once per event
void setGeometry(const CaloSubdetectorGeometry *geometry)
std::vector< double > tdcMin
EBDigitizer * theBarrelDigitizer
void setPhaseShift(const DetId &detId)
void setPedestals(const EcalPedestals *pedestals)
can be fetched every event from the EventSetup
EcalElectronicsSim * theElectronicsSim
std::string EEdigiCollection_
EEDigitizer * theEndcapDigitizer
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
vector< ParameterSet > Parameters
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void setPhaseShift(double phaseShift)
std::string m_barrelHitsName
std::vector< EcalTBTDCRecInfoAlgo::EcalTBTDCRanges > tdcRanges
void setGainRatios(const EcalGainRatios *gainRatios)
void setDetIds(const std::vector< DetId > &detIds)
tell the readout which cells exist
std::pair< int, int > runRanges
EcalTDigitizer< EEDigitizerTraits > EEDigitizer
void setFullScaleEnergy(double EBscale, double EEscale)
std::string m_endcapHitsName
T const * product() const
float gain12Over6() const
T const * product() const
EcalTDigitizer< EBDigitizerTraits > EBDigitizer
void setSample(unsigned int i, const EcalTBTDCSample &sam)
CaloHitRespoNew * theEEResponse
EcalTBDigiProducer(const edm::ParameterSet ¶ms)
const EcalSimParameterMap * theParameterMap
std::string ecalTBInfoLabel
void checkCalibrations(const edm::EventSetup &eventSetup)
bool syncPhase() const
choice of the ADC time alignment (synchronous for LHC, asynchronous for test beams) ...