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 
92 
94 
99 
102 
105 
108 
111 
114 
115 // forward declarations
116 
117 namespace edm{
118  class ParameterSet;
119 }
120 
123 {
124 
125 public:
127  ~EcalTrivialConditionRetriever() override;
128 
129  // ---------- member functions ---------------------------
130  virtual std::unique_ptr<EcalPedestals> produceEcalPedestals( const EcalPedestalsRcd& );
131  virtual std::unique_ptr<EcalWeightXtalGroups> produceEcalWeightXtalGroups( const EcalWeightXtalGroupsRcd& );
132  virtual std::unique_ptr<EcalLinearCorrections> produceEcalLinearCorrections( const EcalLinearCorrectionsRcd& );
133  virtual std::unique_ptr<EcalIntercalibConstants> produceEcalIntercalibConstants( const EcalIntercalibConstantsRcd& );
134  virtual std::unique_ptr<EcalIntercalibConstantsMC> produceEcalIntercalibConstantsMC( const EcalIntercalibConstantsMCRcd& );
135  virtual std::unique_ptr<EcalIntercalibErrors> produceEcalIntercalibErrors( const EcalIntercalibErrorsRcd& );
136  virtual std::unique_ptr<EcalTimeCalibConstants> produceEcalTimeCalibConstants( const EcalTimeCalibConstantsRcd& );
137  virtual std::unique_ptr<EcalTimeCalibErrors> produceEcalTimeCalibErrors( const EcalTimeCalibErrorsRcd& );
138  virtual std::unique_ptr<EcalGainRatios> produceEcalGainRatios( const EcalGainRatiosRcd& );
139  virtual std::unique_ptr<EcalADCToGeVConstant> produceEcalADCToGeVConstant( const EcalADCToGeVConstantRcd& );
140  virtual std::unique_ptr<EcalTBWeights> produceEcalTBWeights( const EcalTBWeightsRcd& );
141  virtual std::unique_ptr<EcalIntercalibConstants> getIntercalibConstantsFromConfiguration ( const EcalIntercalibConstantsRcd& ) ;
142  virtual std::unique_ptr<EcalIntercalibConstantsMC> getIntercalibConstantsMCFromConfiguration ( const EcalIntercalibConstantsMCRcd& ) ;
143  virtual std::unique_ptr<EcalSimPulseShape> getEcalSimPulseShapeFromConfiguration ( const EcalSimPulseShapeRcd& ) ;
144  virtual std::unique_ptr<EcalIntercalibErrors> getIntercalibErrorsFromConfiguration ( const EcalIntercalibErrorsRcd& ) ;
145  virtual std::unique_ptr<EcalTimeCalibConstants> getTimeCalibConstantsFromConfiguration ( const EcalTimeCalibConstantsRcd& ) ;
146  virtual std::unique_ptr<EcalTimeCalibErrors> getTimeCalibErrorsFromConfiguration ( const EcalTimeCalibErrorsRcd& ) ;
147  virtual std::unique_ptr<EcalTimeOffsetConstant> produceEcalTimeOffsetConstant( const EcalTimeOffsetConstantRcd& );
148 
149 
150  virtual std::unique_ptr<EcalLaserAlphas> produceEcalLaserAlphas( const EcalLaserAlphasRcd& );
151  virtual std::unique_ptr<EcalLaserAPDPNRatiosRef> produceEcalLaserAPDPNRatiosRef( const EcalLaserAPDPNRatiosRefRcd& );
152  virtual std::unique_ptr<EcalLaserAPDPNRatios> produceEcalLaserAPDPNRatios( const EcalLaserAPDPNRatiosRcd& );
153 
154  virtual std::unique_ptr<EcalClusterLocalContCorrParameters> produceEcalClusterLocalContCorrParameters( const EcalClusterLocalContCorrParametersRcd& );
155  virtual std::unique_ptr<EcalClusterCrackCorrParameters> produceEcalClusterCrackCorrParameters( const EcalClusterCrackCorrParametersRcd& );
156  virtual std::unique_ptr<EcalClusterEnergyCorrectionParameters> produceEcalClusterEnergyCorrectionParameters( const EcalClusterEnergyCorrectionParametersRcd& );
157  virtual std::unique_ptr<EcalClusterEnergyUncertaintyParameters> produceEcalClusterEnergyUncertaintyParameters( const EcalClusterEnergyUncertaintyParametersRcd& );
158  virtual std::unique_ptr<EcalClusterEnergyCorrectionObjectSpecificParameters> produceEcalClusterEnergyCorrectionObjectSpecificParameters( const EcalClusterEnergyCorrectionObjectSpecificParametersRcd& );
159 
160 
161  virtual std::unique_ptr<EcalChannelStatus> produceEcalChannelStatus( const EcalChannelStatusRcd& );
162  virtual std::unique_ptr<EcalChannelStatus> getChannelStatusFromConfiguration( const EcalChannelStatusRcd& );
163 
164  virtual std::unique_ptr<EcalTPGCrystalStatus> produceEcalTrgChannelStatus( const EcalTPGCrystalStatusRcd& );
165  virtual std::unique_ptr<EcalTPGCrystalStatus> getTrgChannelStatusFromConfiguration( const EcalTPGCrystalStatusRcd& );
166 
167  virtual std::unique_ptr<EcalDCSTowerStatus> produceEcalDCSTowerStatus( const EcalDCSTowerStatusRcd& );
168  virtual std::unique_ptr<EcalDAQTowerStatus> produceEcalDAQTowerStatus( const EcalDAQTowerStatusRcd& );
169  virtual std::unique_ptr<EcalDQMTowerStatus> produceEcalDQMTowerStatus( const EcalDQMTowerStatusRcd& );
170  virtual std::unique_ptr<EcalDQMChannelStatus> produceEcalDQMChannelStatus( const EcalDQMChannelStatusRcd& );
171 
172  virtual std::unique_ptr<EcalMappingElectronics> produceEcalMappingElectronics( const EcalMappingElectronicsRcd& );
173  virtual std::unique_ptr<EcalMappingElectronics> getMappingFromConfiguration( const EcalMappingElectronicsRcd& );
174 
175  // virtual std::unique_ptr<EcalAlignmentEB> produceEcalAlignmentEB( const EcalAlignmentEBRcd& );
176  // virtual std::unique_ptr<EcalAlignmentEE> produceEcalAlignmentEE( const EcalAlignmentEERcd& );
177  // virtual std::unique_ptr<EcalAlignmentES> produceEcalAlignmentES( const EcalAlignmentESRcd& );
178  virtual std::unique_ptr<Alignments> produceEcalAlignmentEB( const EBAlignmentRcd& );
179  virtual std::unique_ptr<Alignments> produceEcalAlignmentEE( const EEAlignmentRcd& );
180  virtual std::unique_ptr<Alignments> produceEcalAlignmentES( const ESAlignmentRcd& );
181 
182  virtual std::unique_ptr<EcalSampleMask> produceEcalSampleMask( const EcalSampleMaskRcd& );
183 
184  virtual std::unique_ptr<EcalTimeBiasCorrections> produceEcalTimeBiasCorrections( const EcalTimeBiasCorrectionsRcd& );
185 
186  virtual std::unique_ptr<EcalSamplesCorrelation> produceEcalSamplesCorrelation( const EcalSamplesCorrelationRcd& );
187 
188 protected:
189  //overriding from ContextRecordIntervalFinder
190  void setIntervalFor( const edm::eventsetup::EventSetupRecordKey&,
191  const edm::IOVSyncValue& ,
192  edm::ValidityInterval& ) override ;
193 private:
194  EcalTrivialConditionRetriever( const EcalTrivialConditionRetriever& ) = delete; // stop default
195  const EcalTrivialConditionRetriever& operator=( const EcalTrivialConditionRetriever& ) = delete; // stop default
196 
197  void getWeightsFromConfiguration(const edm::ParameterSet& ps);
198 
199  // data members
200  double adcToGeVEBConstant_; // ADC -> GeV scale for barrel
201  double adcToGeVEEConstant_; // ADC -> GeV scale for endcap
202 
203 
204  double intercalibConstantMean_; // mean of intercalib constant. default: 1.0
205  double intercalibConstantSigma_; // sigma of intercalib constant
206 
207  double intercalibConstantMeanMC_; // mean of intercalib constant. default: 1.0
208  double intercalibConstantSigmaMC_; // sigma of intercalib constant
209  // Gaussian used to generate intercalib constants for
210  // each channel. no smearing if sigma=0.0 (default)
211  double intercalibErrorMean_; // mean of intercalib constant error
212 
216 
219 
220  // cluster corrections
221  std::vector<double> localContCorrParameters_;
222  std::vector<double> crackCorrParameters_;
223  std::vector<double> energyCorrectionParameters_;
224  std::vector<double> energyUncertaintyParameters_;
226 
231 
232 
233  // ageing parameters
234  double totLumi_;
235  double instLumi_;
236 
237  // laser
244 
249  unsigned long laserAPDPNTime1_;
250  unsigned long laserAPDPNTime2_;
251  unsigned long laserAPDPNTime3_;
252 
253  double linCorrMean_; // mean of lin corr
254  double linCorrSigma_; // sigma of lin corr
255 
256  unsigned long linearTime1_;
257  unsigned long linearTime2_;
258  unsigned long linearTime3_;
259 
260  double EBpedMeanX12_; // pedestal mean pedestal at gain 12
261  double EBpedRMSX12_; // pedestal rms at gain 12
262  double EBpedMeanX6_; // pedestal mean pedestal at gain 6
263  double EBpedRMSX6_; // pedestal rms at gain 6
264  double EBpedMeanX1_; // pedestal mean pedestal at gain 1
265  double EBpedRMSX1_; // pedestal rms at gain 1
266 
267  double EEpedMeanX12_; // pedestal mean pedestal at gain 12
268  double EEpedRMSX12_; // pedestal rms at gain 12
269  double EEpedMeanX6_; // pedestal mean pedestal at gain 6
270  double EEpedRMSX6_; // pedestal rms at gain 6
271  double EEpedMeanX1_; // pedestal mean pedestal at gain 1
272  double EEpedRMSX1_; // pedestal rms at gain 1
273 
274  double gainRatio12over6_; // ratio of MGPA gain12 / gain6
275  double gainRatio6over1_; // ratio of MGPA gain6 / gain1
276 
277  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > amplWeights_; // weights to compute amplitudes after ped subtraction
278  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > amplWeightsAft_; // weights to compute amplitudes after ped subtraction
279 
280  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > pedWeights_; // weights to compute amplitudes w/o ped subtraction
281  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > pedWeightsAft_; // weights to compute amplitudes w/o ped subtraction
282 
283  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > jittWeights_; // weights to compute jitter
284  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > jittWeightsAft_; // weights to compute jitter
285 
286  std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix_;
287  std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2MatrixAft_;
288 
311  unsigned int sampleMaskEB_; // Mask to discard sample in barrel
312  unsigned int sampleMaskEE_; // Mask to discard sample in endcaps
313  std::vector<double> EBtimeCorrAmplitudeBins_;
314  std::vector<double> EBtimeCorrShiftBins_;
315  std::vector<double> EEtimeCorrAmplitudeBins_;
316  std::vector<double> EEtimeCorrShiftBins_;
317 
318  std::vector<double> EBG12samplesCorrelation_;
319  std::vector<double> EBG6samplesCorrelation_;
320  std::vector<double> EBG1samplesCorrelation_;
321  std::vector<double> EEG12samplesCorrelation_;
322  std::vector<double> EEG6samplesCorrelation_;
323  std::vector<double> EEG1samplesCorrelation_;
328 
329 
331 
365 
367 
376 
377  int verbose_; // verbosity
378 
379 };
380 #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_