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