CMS 3D CMS Logo

EcalTrivialConditionRetriever.h
Go to the documentation of this file.
1 //
2 // Created: 2 Mar 2006
3 // Shahram Rahatlou, University of Rome & INFN
4 //
5 #ifndef CalibCalorimetry_EcalPlugins_EcalTrivialConditionRetriever_H
6 #define CalibCalorimetry_EcalPlugins_EcalTrivialConditionRetriever_H
7 // system include files
8 #include <string>
9 #include <vector>
10 
11 // user include files
14 
17 
22 
26 
31 
34 
37 
38 
41 
44 
47 
50 
53 
57 
60 
63 
66 
69 
72 
77 
94 
96 
101 
104 
107 
110 
113 
116 
117 // forward declarations
118 
119 namespace edm{
120  class ParameterSet;
121 }
122 
125 {
126 
127 public:
129  ~EcalTrivialConditionRetriever() override;
130 
131  // ---------- member functions ---------------------------
132  virtual std::unique_ptr<EcalPedestals> produceEcalPedestals( const EcalPedestalsRcd& );
133  virtual std::unique_ptr<EcalWeightXtalGroups> produceEcalWeightXtalGroups( const EcalWeightXtalGroupsRcd& );
134  virtual std::unique_ptr<EcalLinearCorrections> produceEcalLinearCorrections( const EcalLinearCorrectionsRcd& );
135  virtual std::unique_ptr<EcalIntercalibConstants> produceEcalIntercalibConstants( const EcalIntercalibConstantsRcd& );
136  virtual std::unique_ptr<EcalIntercalibConstantsMC> produceEcalIntercalibConstantsMC( const EcalIntercalibConstantsMCRcd& );
137  virtual std::unique_ptr<EcalIntercalibErrors> produceEcalIntercalibErrors( const EcalIntercalibErrorsRcd& );
138  virtual std::unique_ptr<EcalTimeCalibConstants> produceEcalTimeCalibConstants( const EcalTimeCalibConstantsRcd& );
139  virtual std::unique_ptr<EcalTimeCalibErrors> produceEcalTimeCalibErrors( const EcalTimeCalibErrorsRcd& );
140  virtual std::unique_ptr<EcalGainRatios> produceEcalGainRatios( const EcalGainRatiosRcd& );
141  virtual std::unique_ptr<EcalADCToGeVConstant> produceEcalADCToGeVConstant( const EcalADCToGeVConstantRcd& );
142  virtual std::unique_ptr<EcalTBWeights> produceEcalTBWeights( const EcalTBWeightsRcd& );
143  virtual std::unique_ptr<EcalIntercalibConstants> getIntercalibConstantsFromConfiguration ( const EcalIntercalibConstantsRcd& ) ;
144  virtual std::unique_ptr<EcalIntercalibConstantsMC> getIntercalibConstantsMCFromConfiguration ( const EcalIntercalibConstantsMCRcd& ) ;
145  virtual std::unique_ptr<EcalSimPulseShape> getEcalSimPulseShapeFromConfiguration ( const EcalSimPulseShapeRcd& ) ;
146  virtual std::unique_ptr<EcalIntercalibErrors> getIntercalibErrorsFromConfiguration ( const EcalIntercalibErrorsRcd& ) ;
147  virtual std::unique_ptr<EcalTimeCalibConstants> getTimeCalibConstantsFromConfiguration ( const EcalTimeCalibConstantsRcd& ) ;
148  virtual std::unique_ptr<EcalTimeCalibErrors> getTimeCalibErrorsFromConfiguration ( const EcalTimeCalibErrorsRcd& ) ;
149  virtual std::unique_ptr<EcalTimeOffsetConstant> produceEcalTimeOffsetConstant( const EcalTimeOffsetConstantRcd& );
150 
151 
152  virtual std::unique_ptr<EcalLaserAlphas> produceEcalLaserAlphas( const EcalLaserAlphasRcd& );
153  virtual std::unique_ptr<EcalLaserAPDPNRatiosRef> produceEcalLaserAPDPNRatiosRef( const EcalLaserAPDPNRatiosRefRcd& );
154  virtual std::unique_ptr<EcalLaserAPDPNRatios> produceEcalLaserAPDPNRatios( const EcalLaserAPDPNRatiosRcd& );
155 
156  virtual std::unique_ptr<EcalClusterLocalContCorrParameters> produceEcalClusterLocalContCorrParameters( const EcalClusterLocalContCorrParametersRcd& );
157  virtual std::unique_ptr<EcalClusterCrackCorrParameters> produceEcalClusterCrackCorrParameters( const EcalClusterCrackCorrParametersRcd& );
158  virtual std::unique_ptr<EcalClusterEnergyCorrectionParameters> produceEcalClusterEnergyCorrectionParameters( const EcalClusterEnergyCorrectionParametersRcd& );
159  virtual std::unique_ptr<EcalClusterEnergyUncertaintyParameters> produceEcalClusterEnergyUncertaintyParameters( const EcalClusterEnergyUncertaintyParametersRcd& );
160  virtual std::unique_ptr<EcalClusterEnergyCorrectionObjectSpecificParameters> produceEcalClusterEnergyCorrectionObjectSpecificParameters( const EcalClusterEnergyCorrectionObjectSpecificParametersRcd& );
161  virtual std::unique_ptr<EcalPFRecHitThresholds> produceEcalPFRecHitThresholds( const EcalPFRecHitThresholdsRcd& );
162  virtual std::unique_ptr<EcalPFRecHitThresholds> getPFRecHitThresholdsFromConfiguration ( const EcalPFRecHitThresholdsRcd& ) ;
163 
164 
165  virtual std::unique_ptr<EcalChannelStatus> produceEcalChannelStatus( const EcalChannelStatusRcd& );
166  virtual std::unique_ptr<EcalChannelStatus> getChannelStatusFromConfiguration( const EcalChannelStatusRcd& );
167 
168  virtual std::unique_ptr<EcalTPGCrystalStatus> produceEcalTrgChannelStatus( const EcalTPGCrystalStatusRcd& );
169  virtual std::unique_ptr<EcalTPGCrystalStatus> getTrgChannelStatusFromConfiguration( const EcalTPGCrystalStatusRcd& );
170 
171  virtual std::unique_ptr<EcalDCSTowerStatus> produceEcalDCSTowerStatus( const EcalDCSTowerStatusRcd& );
172  virtual std::unique_ptr<EcalDAQTowerStatus> produceEcalDAQTowerStatus( const EcalDAQTowerStatusRcd& );
173  virtual std::unique_ptr<EcalDQMTowerStatus> produceEcalDQMTowerStatus( const EcalDQMTowerStatusRcd& );
174  virtual std::unique_ptr<EcalDQMChannelStatus> produceEcalDQMChannelStatus( const EcalDQMChannelStatusRcd& );
175 
176  virtual std::unique_ptr<EcalMappingElectronics> produceEcalMappingElectronics( const EcalMappingElectronicsRcd& );
177  virtual std::unique_ptr<EcalMappingElectronics> getMappingFromConfiguration( const EcalMappingElectronicsRcd& );
178 
179  // virtual std::unique_ptr<EcalAlignmentEB> produceEcalAlignmentEB( const EcalAlignmentEBRcd& );
180  // virtual std::unique_ptr<EcalAlignmentEE> produceEcalAlignmentEE( const EcalAlignmentEERcd& );
181  // virtual std::unique_ptr<EcalAlignmentES> produceEcalAlignmentES( const EcalAlignmentESRcd& );
182  virtual std::unique_ptr<Alignments> produceEcalAlignmentEB( const EBAlignmentRcd& );
183  virtual std::unique_ptr<Alignments> produceEcalAlignmentEE( const EEAlignmentRcd& );
184  virtual std::unique_ptr<Alignments> produceEcalAlignmentES( const ESAlignmentRcd& );
185 
186  virtual std::unique_ptr<EcalSampleMask> produceEcalSampleMask( const EcalSampleMaskRcd& );
187 
188  virtual std::unique_ptr<EcalTimeBiasCorrections> produceEcalTimeBiasCorrections( const EcalTimeBiasCorrectionsRcd& );
189 
190  virtual std::unique_ptr<EcalSamplesCorrelation> produceEcalSamplesCorrelation( const EcalSamplesCorrelationRcd& );
191 
192 protected:
193  //overriding from ContextRecordIntervalFinder
194  void setIntervalFor( const edm::eventsetup::EventSetupRecordKey&,
195  const edm::IOVSyncValue& ,
196  edm::ValidityInterval& ) override ;
197 private:
198  EcalTrivialConditionRetriever( const EcalTrivialConditionRetriever& ) = delete; // stop default
199  const EcalTrivialConditionRetriever& operator=( const EcalTrivialConditionRetriever& ) = delete; // stop default
200 
201  void getWeightsFromConfiguration(const edm::ParameterSet& ps);
202 
203  // data members
204  double adcToGeVEBConstant_; // ADC -> GeV scale for barrel
205  double adcToGeVEEConstant_; // ADC -> GeV scale for endcap
206 
207 
208  double intercalibConstantMean_; // mean of intercalib constant. default: 1.0
209  double intercalibConstantSigma_; // sigma of intercalib constant
210 
211  double intercalibConstantMeanMC_; // mean of intercalib constant. default: 1.0
212  double intercalibConstantSigmaMC_; // sigma of intercalib constant
213  // Gaussian used to generate intercalib constants for
214  // each channel. no smearing if sigma=0.0 (default)
215  double intercalibErrorMean_; // mean of intercalib constant error
216 
220 
223 
224  // cluster corrections
225  std::vector<double> localContCorrParameters_;
226  std::vector<double> crackCorrParameters_;
227  std::vector<double> energyCorrectionParameters_;
228  std::vector<double> energyUncertaintyParameters_;
234 
239 
242 
245 
247 
248 
249  // ageing parameters
250  double totLumi_;
251  double instLumi_;
252 
253  // laser
260 
265  unsigned long laserAPDPNTime1_;
266  unsigned long laserAPDPNTime2_;
267  unsigned long laserAPDPNTime3_;
268 
269  double linCorrMean_; // mean of lin corr
270  double linCorrSigma_; // sigma of lin corr
271 
272  unsigned long linearTime1_;
273  unsigned long linearTime2_;
274  unsigned long linearTime3_;
275 
276  double EBpedMeanX12_; // pedestal mean pedestal at gain 12
277  double EBpedRMSX12_; // pedestal rms at gain 12
278  double EBpedMeanX6_; // pedestal mean pedestal at gain 6
279  double EBpedRMSX6_; // pedestal rms at gain 6
280  double EBpedMeanX1_; // pedestal mean pedestal at gain 1
281  double EBpedRMSX1_; // pedestal rms at gain 1
282 
283  double EEpedMeanX12_; // pedestal mean pedestal at gain 12
284  double EEpedRMSX12_; // pedestal rms at gain 12
285  double EEpedMeanX6_; // pedestal mean pedestal at gain 6
286  double EEpedRMSX6_; // pedestal rms at gain 6
287  double EEpedMeanX1_; // pedestal mean pedestal at gain 1
288  double EEpedRMSX1_; // pedestal rms at gain 1
289 
290  double gainRatio12over6_; // ratio of MGPA gain12 / gain6
291  double gainRatio6over1_; // ratio of MGPA gain6 / gain1
292 
293  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > amplWeights_; // weights to compute amplitudes after ped subtraction
294  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > amplWeightsAft_; // weights to compute amplitudes after ped subtraction
295 
296  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > pedWeights_; // weights to compute amplitudes w/o ped subtraction
297  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > pedWeightsAft_; // weights to compute amplitudes w/o ped subtraction
298 
299  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > jittWeights_; // weights to compute jitter
300  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > jittWeightsAft_; // weights to compute jitter
301 
302  std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix_;
303  std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2MatrixAft_;
304 
327  unsigned int sampleMaskEB_; // Mask to discard sample in barrel
328  unsigned int sampleMaskEE_; // Mask to discard sample in endcaps
329  std::vector<double> EBtimeCorrAmplitudeBins_;
330  std::vector<double> EBtimeCorrShiftBins_;
331  std::vector<double> EEtimeCorrAmplitudeBins_;
332  std::vector<double> EEtimeCorrShiftBins_;
333 
334  std::vector<double> EBG12samplesCorrelation_;
335  std::vector<double> EBG6samplesCorrelation_;
336  std::vector<double> EBG1samplesCorrelation_;
337  std::vector<double> EEG12samplesCorrelation_;
338  std::vector<double> EEG6samplesCorrelation_;
339  std::vector<double> EEG1samplesCorrelation_;
344 
345 
347 
382 
384 
393 
394  int verbose_; // verbosity
395 
396 };
397 #endif
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeightsAft_
std::vector< double > energyCorrectionObjectSpecificParameters_
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > pedWeightsAft_
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > pedWeights_
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > amplWeights_
std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2MatrixAft_
HLT enums.
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > amplWeightsAft_
std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix_
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeights_