CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
EcalTBDigiProducer Class Reference

#include <EcalTBDigiProducer.h>

Inheritance diagram for EcalTBDigiProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 EcalTBDigiProducer (const edm::ParameterSet &params)
 
virtual void produce (edm::Event &event, const edm::EventSetup &eventSetup)
 
virtual ~EcalTBDigiProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Types

typedef EcalTDigitizer
< EBDigitizerTraits
EBDigitizer
 
typedef EcalTDigitizer
< EEDigitizerTraits
EEDigitizer
 

Private Member Functions

void checkCalibrations (const edm::EventSetup &eventSetup)
 
void fillTBTDCRawInfo (EcalTBTDCRawInfo &theTBTDCRawInfo)
 
void setPhaseShift (const DetId &detId)
 

Private Attributes

bool doPhaseShift
 
bool doReadout
 
std::string EBdigiCollection_
 
double EBs25notCont
 
std::string ecalTBInfoLabel
 
std::string EEdigiCollection_
 
double EEs25notCont
 
std::string m_barrelHitsName
 
std::string m_endcapHitsName
 
std::vector
< EcalTBTDCRecInfoAlgo::EcalTBTDCRanges
tdcRanges
 
EBDigitizertheBarrelDigitizer
 
EcalCodertheCoder
 
CorrelatedNoisifier
< EcalCorrMatrix > * 
theCorrNoise
 
CaloHitRespoNewtheEBResponse
 
const EBShape theEBShape
 
CaloHitRespoNewtheEEResponse
 
const EEShape theEEShape
 
EcalElectronicsSimtheElectronicsSim
 
EEDigitizertheEndcapDigitizer
 
EcalCorrMatrixtheNoiseMatrix
 
const EcalSimParameterMaptheParameterMap
 
EcalTBReadouttheTBReadout
 
const
EcalTrigTowerConstituentsMap
theTTmap
 
double thisPhaseShift
 
double tunePhaseShift
 
bool use2004OffsetConvention_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 37 of file EcalTBDigiProducer.h.

Member Typedef Documentation

Reconstruction algorithm

Definition at line 63 of file EcalTBDigiProducer.h.

Definition at line 64 of file EcalTBDigiProducer.h.

Constructor & Destructor Documentation

EcalTBDigiProducer::EcalTBDigiProducer ( const edm::ParameterSet params)
explicit

output collections names

Test Beam specific part

Definition at line 24 of file EcalTBDigiProducer.cc.

References ecalTPGAnalyzer_cfg::binOfMaximum, doPhaseShift, doReadout, EBdigiCollection_, EBs25notCont, ecalTBInfoLabel, EEdigiCollection_, EEs25notCont, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), getHLTprescales::index, m_barrelHitsName, m_endcapHitsName, runregparse::ranges, EcalTBTDCRecInfoAlgo::EcalTBTDCRanges::runRanges, EcalTBTDCRecInfoAlgo::EcalTBTDCRanges::tdcMax, EcalTBTDCRecInfoAlgo::EcalTBTDCRanges::tdcMin, tdcRanges, theBarrelDigitizer, theCoder, theCorrNoise, theEBResponse, theEBShape, theEEResponse, theEEShape, theElectronicsSim, theEndcapDigitizer, theNoiseMatrix, theParameterMap, theTBReadout, thisPhaseShift, tunePhaseShift, and use2004OffsetConvention_.

25 {
26 
28 
29  EBdigiCollection_ = params.getParameter<std::string>("EBdigiCollection");
30  EEdigiCollection_ = params.getParameter<std::string>("EEdigiCollection");
31 
32  const std::string hitsProducer (
33  params.getParameter<std::string>("hitsProducer") ) ;
34 
35  m_barrelHitsName = hitsProducer + "EcalHitsEB" ;
36  m_endcapHitsName = hitsProducer + "EcalHitsEE" ;
37 
38  produces<EBDigiCollection>( EBdigiCollection_ );
39  produces<EEDigiCollection>( EEdigiCollection_ );
40 
41  produces<EcalTBTDCRawInfo>(); //For TB
42 
43  // initialize the default valuer for hardcoded parameters and the EB/EE shape
44 
45  bool addNoise = params.getParameter<bool>("doNoise");
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");
53  int binOfMaximum = params.getParameter<int>("binOfMaximum");
54  bool doPhotostatistics = params.getParameter<bool>("doPhotostatistics");
55  bool syncPhase = params.getParameter<bool>("syncPhase");
56 
57  // possible phase shift for asynchronous trigger (e.g. test-beam)
58 
59  doPhaseShift = !syncPhase; //For TB
60  thisPhaseShift = 1.; //For TB
61 
62  theParameterMap = new EcalSimParameterMap(simHitToPhotoelectronsBarrel, simHitToPhotoelectronsEndcap,
63  photoelectronsToAnalogBarrel, photoelectronsToAnalogEndcap,
64  samplingFactor, timePhase, readoutFrameSize, binOfMaximum,
65  doPhotostatistics, syncPhase);
66 
67 
70 
71  EcalCorrMatrix thisMatrix;
72 
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];
79  }
80  }
81  }
82  theNoiseMatrix = new EcalCorrMatrix(thisMatrix);
83 
85 
86  theCoder = new EcalCoder(addNoise, theCorrNoise);
87  bool applyConstantTerm = params.getParameter<bool>("applyConstantTerm");
88  double rmsConstantTerm = params.getParameter<double> ("ConstantTerm");
89  theElectronicsSim = new EcalElectronicsSim(theParameterMap, theCoder, applyConstantTerm, rmsConstantTerm);
90 
91 
93  theElectronicsSim,
94  addNoise );
95 
97  theElectronicsSim,
98  addNoise );
99 
100 
101  // not containment corrections
102  EBs25notCont = params.getParameter<double>("EBs25notContainment");
103  EEs25notCont = params.getParameter<double>("EEs25notContainment");
104 
105 //For TB --------------------------------------
106 
108 
109  typedef std::vector< edm::ParameterSet > Parameters;
110  Parameters ranges=params.getParameter<Parameters>("tdcRanges");
111  for(Parameters::iterator itRanges = ranges.begin(); itRanges != ranges.end(); ++itRanges)
112  {
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");
118  tdcRanges.push_back(aRange);
119  }
120 
121  use2004OffsetConvention_ = params.getUntrackedParameter< bool >("use2004OffsetConvention",false);
122 
123  ecalTBInfoLabel = params.getUntrackedParameter<std::string>("EcalTBInfoLabel","SimEcalTBG4Object");
124  doReadout = params.getParameter<bool>("doReadout");
125 
126  theTBReadout = new EcalTBReadout(ecalTBInfoLabel);
127 
128  tunePhaseShift = params.getParameter<double>("tunePhaseShift");
129 
130 //For TB --------------------------------------
131 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
Creates electronics signals from hits.
CaloHitRespoNew * theEBResponse
const EBShape theEBShape
std::string EBdigiCollection_
EcalTBReadout * theTBReadout
EcalCorrMatrix * theNoiseMatrix
CorrelatedNoisifier< EcalCorrMatrix > * theCorrNoise
const EEShape theEEShape
EBDigitizer * theBarrelDigitizer
EcalElectronicsSim * theElectronicsSim
std::string EEdigiCollection_
EEDigitizer * theEndcapDigitizer
math::ErrorD< CaloSamples::MAXSAMPLES >::type EcalCorrMatrix
std::string m_barrelHitsName
std::vector< EcalTBTDCRecInfoAlgo::EcalTBTDCRanges > tdcRanges
EcalTDigitizer< EEDigitizerTraits > EEDigitizer
std::string m_endcapHitsName
std::vector< AlignmentParameters * > Parameters
Definition: Utilities.h:29
EcalTDigitizer< EBDigitizerTraits > EBDigitizer
CaloHitRespoNew * theEEResponse
const EcalSimParameterMap * theParameterMap
EcalTBDigiProducer::~EcalTBDigiProducer ( )
virtual

Definition at line 134 of file EcalTBDigiProducer.cc.

References theBarrelDigitizer, theCoder, theCorrNoise, theEBResponse, theEEResponse, theElectronicsSim, theEndcapDigitizer, theNoiseMatrix, and theParameterMap.

135 {
136  if (theParameterMap) { delete theParameterMap; }
137  if (theEBResponse) { delete theEBResponse; }
138  if (theEEResponse) { delete theEEResponse; }
139  if (theCorrNoise) { delete theCorrNoise; }
140  if (theNoiseMatrix) { delete theNoiseMatrix; }
141  if (theCoder) { delete theCoder; }
142  if (theElectronicsSim){ delete theElectronicsSim; }
143  if (theBarrelDigitizer){ delete theBarrelDigitizer; }
144  if (theEndcapDigitizer){ delete theEndcapDigitizer; }
145 }
CaloHitRespoNew * theEBResponse
EcalCorrMatrix * theNoiseMatrix
CorrelatedNoisifier< EcalCorrMatrix > * theCorrNoise
EBDigitizer * theBarrelDigitizer
EcalElectronicsSim * theElectronicsSim
EEDigitizer * theEndcapDigitizer
CaloHitRespoNew * theEEResponse
const EcalSimParameterMap * theParameterMap

Member Function Documentation

void EcalTBDigiProducer::checkCalibrations ( const edm::EventSetup eventSetup)
private

Definition at line 268 of file EcalTBDigiProducer.cc.

References EBs25notCont, EEs25notCont, EcalMGPAGainRatio::gain12Over6(), EcalMGPAGainRatio::gain6Over1(), edm::EventSetup::get(), EcalADCToGeVConstant::getEBValue(), EcalADCToGeVConstant::getEEValue(), LogDebug, EcalCoder::MAXADC, EcalCoder::NGAINS, edm::ESHandle< class >::product(), EcalCoder::setFullScaleEnergy(), EcalCoder::setGainRatios(), EcalCoder::setIntercalibConstants(), EcalCoder::setPedestals(), and theCoder.

Referenced by produce().

269 {
270 
271  // Pedestals from event setup
272 
274  eventSetup.get<EcalPedestalsRcd>().get( dbPed );
275  const EcalPedestals* thePedestals=dbPed.product();
276 
277  theCoder->setPedestals( thePedestals );
278 
279  // Ecal Intercalibration Constants
281  eventSetup.get<EcalIntercalibConstantsMCRcd>().get(pIcal);
282  const EcalIntercalibConstantsMC *ical = pIcal.product();
283 
285 
286  // ADC -> GeV Scale
288  eventSetup.get<EcalADCToGeVConstantRcd>().get(pAgc);
289  const EcalADCToGeVConstant* agc = pAgc.product();
290 
291  // Gain Ratios
293  eventSetup.get<EcalGainRatiosRcd>().get(pRatio);
294  const EcalGainRatios* gr = pRatio.product();
295 
296  theCoder->setGainRatios( gr );
297 
298  EcalMGPAGainRatio * defaultRatios = new EcalMGPAGainRatio();
299 
300  double theGains[theCoder->NGAINS+1];
301  theGains[0] = 0.;
302  theGains[3] = 1.;
303  theGains[2] = defaultRatios->gain6Over1() ;
304  theGains[1] = theGains[2]*(defaultRatios->gain12Over6()) ;
305 
306  LogDebug("EcalDigi") << " Gains: " << "\n" << " g1 = " << theGains[1] << "\n" << " g2 = " << theGains[2] << "\n" << " g3 = " << theGains[3];
307 
308  delete defaultRatios;
309 
310  const double EBscale = (agc->getEBValue())*theGains[1]*(theCoder->MAXADC)*EBs25notCont;
311  LogDebug("EcalDigi") << " GeV/ADC = " << agc->getEBValue() << "\n" << " notCont = " << EBs25notCont << "\n" << " saturation for EB = " << EBscale << ", " << EBs25notCont;
312  const double EEscale = (agc->getEEValue())*theGains[1]*(theCoder->MAXADC)*EEs25notCont;
313  LogDebug("EcalDigi") << " GeV/ADC = " << agc->getEEValue() << "\n" << " notCont = " << EEs25notCont << "\n" << " saturation for EB = " << EEscale << ", " << EEs25notCont;
314  theCoder->setFullScaleEnergy( EBscale , EEscale );
315 
316 }
#define LogDebug(id)
void setIntercalibConstants(const EcalIntercalibConstantsMC *ical)
Definition: EcalCoder.cc:58
void setPedestals(const EcalPedestals *pedestals)
can be fetched every event from the EventSetup
Definition: EcalCoder.cc:46
float gain6Over1() const
void setGainRatios(const EcalGainRatios *gainRatios)
Definition: EcalCoder.cc:52
void setFullScaleEnergy(double EBscale, double EEscale)
Definition: EcalCoder.cc:37
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
float gain12Over6() const
void EcalTBDigiProducer::fillTBTDCRawInfo ( EcalTBTDCRawInfo theTBTDCRawInfo)
private

Definition at line 377 of file EcalTBDigiProducer.cc.

References LogDebug, EcalTBTDCRawInfo::setSample(), Ecal2004TBTDCRanges_cff::tdcMax, Ecal2004TBTDCRanges_cff::tdcMin, tdcRanges, and thisPhaseShift.

Referenced by produce().

377  {
378 
379  unsigned int thisChannel = 1;
380 
381  unsigned int thisCount = (unsigned int)(thisPhaseShift*(tdcRanges[0].tdcMax[0]-tdcRanges[0].tdcMin[0]) + tdcRanges[0].tdcMin[0]);
382 
383  EcalTBTDCSample theTBTDCSample(thisChannel, thisCount);
384 
385  unsigned int sampleIndex = 0;
386  theTBTDCRawInfo.setSample(sampleIndex, theTBTDCSample);
387 
388  LogDebug("EcalDigi") << theTBTDCSample << "\n" << theTBTDCRawInfo;
389 
390 }
#define LogDebug(id)
std::vector< EcalTBTDCRecInfoAlgo::EcalTBTDCRanges > tdcRanges
void setSample(unsigned int i, const EcalTBTDCSample &sam)
void EcalTBDigiProducer::produce ( edm::Event event,
const edm::EventSetup eventSetup 
)
virtual

Produces the EDM products,

Implements edm::EDProducer.

Definition at line 147 of file EcalTBDigiProducer.cc.

References checkCalibrations(), gather_cfg::cout, doPhaseShift, doReadout, ExpressReco_HICollisions_FallBack::EBDigiCollection, EBdigiCollection_, DetId::Ecal, EcalBarrel, EcalEndcap, ecalTBInfoLabel, ExpressReco_HICollisions_FallBack::EcalTBTDCRawInfo, ExpressReco_HICollisions_FallBack::EEDigiCollection, EEdigiCollection_, fillTBTDCRawInfo(), edm::EventSetup::get(), edm::HandleBase::isValid(), m_barrelHitsName, m_endcapHitsName, EcalTBReadout::performReadout(), edm::Handle< T >::product(), EcalTDigitizer< Traits >::run(), EcalTBReadout::setDetIds(), CaloHitRespoNew::setGeometry(), setPhaseShift(), MixCollection< T >::size(), theBarrelDigitizer, theEBResponse, theEEResponse, theEndcapDigitizer, theTBReadout, theTTmap, and thisPhaseShift.

149 {
150  // Step A: Get Inputs
151 
152 //For TB ----------------
153  edm::ESHandle<CaloGeometry> hGeometry ;
154  eventSetup.get<CaloGeometryRecord>().get( hGeometry ) ;
156  hGeometry->getSubdetectorGeometry( DetId::Ecal, EcalBarrel ) ) ;
158  hGeometry->getSubdetectorGeometry( DetId::Ecal, EcalEndcap ) ) ;
159 
160  // takes no time because gives back const ref
161  const std::vector<DetId>& theBarrelDets (
162  hGeometry->getValidDetIds(DetId::Ecal, EcalBarrel) ) ;
163 // const std::vector<DetId>& theEndcapDets (
164 // hGeometry->getValidDetIds(DetId::Ecal, EcalEndcap) ) ;
165 
166 // theBarrelDigitizer->setDetIds( theBarrelDets ) ;
167 // theEndcapDigitizer->setDetIds( theEndcapDets ) ;
168  theTBReadout ->setDetIds( theBarrelDets ) ;
169 
170 //For TB ----------------
171 
172  checkCalibrations(eventSetup);
173 
174  // Get input
175  edm::Handle<CrossingFrame<PCaloHit> > crossingFrame;
176  event.getByLabel( "mix", m_barrelHitsName, crossingFrame ) ;
177 
178  MixCollection<PCaloHit>* EBHits ( crossingFrame.isValid() ?
179  new MixCollection<PCaloHit>( crossingFrame.product() ) : 0 ) ;
180 
181  const bool isEB ( 0 != EBHits &&
182  0 != EBHits->size() ) ;
183 
184  event.getByLabel( "mix", m_endcapHitsName, crossingFrame ) ;
185  MixCollection<PCaloHit>* EEHits ( crossingFrame.isValid() ?
186  new MixCollection<PCaloHit>( crossingFrame.product() ) : 0 ) ;
187 
188  const bool isEE ( 0 != EEHits &&
189  0 != EEHits->size() ) ;
190 
191 //For TB ----------------------------------------
192  std::auto_ptr<EcalTBTDCRawInfo> TDCproduct(new EcalTBTDCRawInfo(1));
193  if( doPhaseShift )
194  {
195  edm::Handle<PEcalTBInfo> theEcalTBInfo ;
196  event.getByLabel( ecalTBInfoLabel, theEcalTBInfo ) ;
197  thisPhaseShift = theEcalTBInfo->phaseShift();
198 
199  DetId detId( DetId::Ecal, 1 ) ;
200  setPhaseShift( detId );
201 
202  fillTBTDCRawInfo( *TDCproduct ) ; // fill the TDC info in the event
203 
204  }
205 //For TB ----------------------------------------
206 
207  // Step B: Create empty output and then fill it
208  std::auto_ptr<EBDigiCollection> barrelResult( new EBDigiCollection() ) ;
209  std::auto_ptr<EEDigiCollection> endcapResult( new EEDigiCollection() ) ;
210 
211  if ( isEB )
212  {
213  std::auto_ptr<MixCollection<PCaloHit> > barrelHits( EBHits );
214  theBarrelDigitizer->run( *barrelHits, *barrelResult ) ;
215  edm::LogInfo("DigiInfo") << "EB Digis: " << barrelResult->size();
216  std::cout << "EB Digis: " << barrelResult->size()<<std::endl;
217 
218 /*
219  CaloDigiCollectionSorter sorter(5) ;
220 
221  std::vector<EBDataFrame> sortedDigisEB = sorter.sortedVector(*barrelResult);
222  LogDebug("EcalDigi") << "Top 10 EB digis";
223  std::cout<< "Top 10 EB digis\n";
224  for(int i = 0; i < std::min(10,(int) sortedDigisEB.size()); ++i)
225  {
226  LogDebug("EcalDigi") << sortedDigisEB[i];
227  std::cout << sortedDigisEB[i]<<"\n";
228  }
229  std::cout<< std::endl ;
230 */
231  }
232 
233  if( isEE )
234  {
235  std::auto_ptr<MixCollection<PCaloHit> > endcapHits( EEHits );
236  theEndcapDigitizer->run( *endcapHits, *endcapResult ) ;
237  edm::LogInfo("EcalDigi") << "EE Digis: " << endcapResult->size();
238  std::cout << "EE Digis: " << endcapResult->size()<<std::endl;
239  }
240 
241  //For TB -------------------------------------------
242  // perform the TB readout if required,
243  // otherwise simply fill the proper object
244 
245  std::auto_ptr<EBDigiCollection> barrelReadout( new EBDigiCollection() ) ;
246  if ( doReadout )
247  {
249  *theTTmap,
250  *barrelResult,
251  *barrelReadout);
252  }
253  else
254  {
255  barrelResult->swap(*barrelReadout);
256  }
257 
258  // Step D: Put outputs into event
259 //TB event.put(barrelResult, EBdigiCollection_);
260  event.put( barrelReadout, EBdigiCollection_ ) ;
261  event.put( endcapResult, EEdigiCollection_ ) ;
262  event.put( TDCproduct ) ;
263 
264 //For TB -------------------------------------------
265 }
CaloHitRespoNew * theEBResponse
void run(MixCollection< PCaloHit > &input, DigiCollection &output)
const EcalTrigTowerConstituentsMap * theTTmap
std::string EBdigiCollection_
EcalTBReadout * theTBReadout
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)
EBDigitizer * theBarrelDigitizer
void setPhaseShift(const DetId &detId)
std::string EEdigiCollection_
EEDigitizer * theEndcapDigitizer
bool isValid() const
Definition: HandleBase.h:76
std::string m_barrelHitsName
void setDetIds(const std::vector< DetId > &detIds)
tell the readout which cells exist
Definition: EcalTBReadout.h:31
Definition: DetId.h:20
std::string m_endcapHitsName
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: Handle.h:74
CaloHitRespoNew * theEEResponse
tuple cout
Definition: gather_cfg.py:41
void checkCalibrations(const edm::EventSetup &eventSetup)
void EcalTBDigiProducer::setPhaseShift ( const DetId detId)
private

Definition at line 357 of file EcalTBDigiProducer.cc.

References LogDebug, ExpressReco_HICollisions_FallBack::parameters, CaloHitRespoNew::setPhaseShift(), EcalSimParameterMap::simParameters(), DetId::subdetId(), CaloSimParameters::syncPhase(), theEBResponse, theEEResponse, theParameterMap, thisPhaseShift, tunePhaseShift, and use2004OffsetConvention_.

Referenced by produce().

357  {
358 
360  if ( !parameters.syncPhase() ) {
361 
362  int myDet = detId.subdetId();
363 
364  LogDebug("EcalDigi") << "Setting the phase shift " << thisPhaseShift << " and the offset " << tunePhaseShift << " for the subdetector " << myDet;
365 
366  if ( myDet == 1) {
367  double passPhaseShift = thisPhaseShift+tunePhaseShift;
368  if ( use2004OffsetConvention_ ) passPhaseShift = 1.-passPhaseShift;
369  theEBResponse->setPhaseShift(passPhaseShift);
370  theEEResponse->setPhaseShift(passPhaseShift);
371  }
372 
373  }
374 
375 }
#define LogDebug(id)
virtual const CaloSimParameters & simParameters(const DetId &id) const
return the sim parameters relative to the right subdet
CaloHitRespoNew * theEBResponse
Main class for Parameters in different subdetectors.
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
void setPhaseShift(double phaseShift)
CaloHitRespoNew * theEEResponse
const EcalSimParameterMap * theParameterMap
bool syncPhase() const
choice of the ADC time alignment (synchronous for LHC, asynchronous for test beams) ...

Member Data Documentation

bool EcalTBDigiProducer::doPhaseShift
private

Definition at line 109 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), and produce().

bool EcalTBDigiProducer::doReadout
private

Definition at line 112 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), and produce().

std::string EcalTBDigiProducer::EBdigiCollection_
private

Definition at line 89 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), and produce().

double EcalTBDigiProducer::EBs25notCont
private

Definition at line 95 of file EcalTBDigiProducer.h.

Referenced by checkCalibrations(), and EcalTBDigiProducer().

std::string EcalTBDigiProducer::ecalTBInfoLabel
private

Definition at line 107 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), and produce().

std::string EcalTBDigiProducer::EEdigiCollection_
private

Definition at line 90 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), and produce().

double EcalTBDigiProducer::EEs25notCont
private

Definition at line 96 of file EcalTBDigiProducer.h.

Referenced by checkCalibrations(), and EcalTBDigiProducer().

std::string EcalTBDigiProducer::m_barrelHitsName
private

Definition at line 100 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), and produce().

std::string EcalTBDigiProducer::m_endcapHitsName
private

Definition at line 101 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), and produce().

std::vector<EcalTBTDCRecInfoAlgo::EcalTBTDCRanges> EcalTBDigiProducer::tdcRanges
private

Definition at line 114 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), and fillTBTDCRawInfo().

EBDigitizer* EcalTBDigiProducer::theBarrelDigitizer
private

Definition at line 67 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), produce(), and ~EcalTBDigiProducer().

EcalCoder* EcalTBDigiProducer::theCoder
private

Definition at line 87 of file EcalTBDigiProducer.h.

Referenced by checkCalibrations(), EcalTBDigiProducer(), and ~EcalTBDigiProducer().

CorrelatedNoisifier<EcalCorrMatrix>* EcalTBDigiProducer::theCorrNoise
private

Definition at line 81 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), and ~EcalTBDigiProducer().

CaloHitRespoNew* EcalTBDigiProducer::theEBResponse
private
const EBShape EcalTBDigiProducer::theEBShape
private

Definition at line 73 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer().

CaloHitRespoNew* EcalTBDigiProducer::theEEResponse
private
const EEShape EcalTBDigiProducer::theEEShape
private

Definition at line 74 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer().

EcalElectronicsSim* EcalTBDigiProducer::theElectronicsSim
private

Definition at line 84 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), and ~EcalTBDigiProducer().

EEDigitizer* EcalTBDigiProducer::theEndcapDigitizer
private

Definition at line 68 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), produce(), and ~EcalTBDigiProducer().

EcalCorrMatrix* EcalTBDigiProducer::theNoiseMatrix
private

Definition at line 82 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), and ~EcalTBDigiProducer().

const EcalSimParameterMap* EcalTBDigiProducer::theParameterMap
private

Definition at line 72 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), setPhaseShift(), and ~EcalTBDigiProducer().

EcalTBReadout* EcalTBDigiProducer::theTBReadout
private

Definition at line 105 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), and produce().

const EcalTrigTowerConstituentsMap* EcalTBDigiProducer::theTTmap
private

Definition at line 103 of file EcalTBDigiProducer.h.

Referenced by produce().

double EcalTBDigiProducer::thisPhaseShift
private

Definition at line 110 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), fillTBTDCRawInfo(), produce(), and setPhaseShift().

double EcalTBDigiProducer::tunePhaseShift
private

Definition at line 117 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), and setPhaseShift().

bool EcalTBDigiProducer::use2004OffsetConvention_
private

Definition at line 115 of file EcalTBDigiProducer.h.

Referenced by EcalTBDigiProducer(), and setPhaseShift().