CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalTrivialConditionRetriever.h
Go to the documentation of this file.
1 //
2 // $Id: EcalTrivialConditionRetriever.h,v 1.31 2011/11/02 09:35:20 fay Exp $
3 // Created: 2 Mar 2006
4 // Shahram Rahatlou, University of Rome & INFN
5 //
6 #ifndef CalibCalorimetry_EcalPlugins_EcalTrivialConditionRetriever_H
7 #define CalibCalorimetry_EcalPlugins_EcalTrivialConditionRetriever_H
8 // system include files
9 #include <string>
10 #include <vector>
11 
12 // user include files
15 
18 
23 
27 
32 
35 
38 
41 
44 
47 
50 
54 
57 
60 
63 
66 
69 
74 
89 
91 
96 
97 // forward declarations
98 
99 namespace edm{
100  class ParameterSet;
101 }
102 
105 {
106 
107 public:
110 
111  // ---------- member functions ---------------------------
112  virtual std::auto_ptr<EcalPedestals> produceEcalPedestals( const EcalPedestalsRcd& );
113  virtual std::auto_ptr<EcalWeightXtalGroups> produceEcalWeightXtalGroups( const EcalWeightXtalGroupsRcd& );
114  virtual std::auto_ptr<EcalIntercalibConstants> produceEcalIntercalibConstants( const EcalIntercalibConstantsRcd& );
115  virtual std::auto_ptr<EcalIntercalibConstantsMC> produceEcalIntercalibConstantsMC( const EcalIntercalibConstantsMCRcd& );
116  virtual std::auto_ptr<EcalIntercalibErrors> produceEcalIntercalibErrors( const EcalIntercalibErrorsRcd& );
117  virtual std::auto_ptr<EcalTimeCalibConstants> produceEcalTimeCalibConstants( const EcalTimeCalibConstantsRcd& );
118  virtual std::auto_ptr<EcalTimeCalibErrors> produceEcalTimeCalibErrors( const EcalTimeCalibErrorsRcd& );
119  virtual std::auto_ptr<EcalGainRatios> produceEcalGainRatios( const EcalGainRatiosRcd& );
120  virtual std::auto_ptr<EcalADCToGeVConstant> produceEcalADCToGeVConstant( const EcalADCToGeVConstantRcd& );
121  virtual std::auto_ptr<EcalTBWeights> produceEcalTBWeights( const EcalTBWeightsRcd& );
122  virtual std::auto_ptr<EcalIntercalibConstants> getIntercalibConstantsFromConfiguration ( const EcalIntercalibConstantsRcd& ) ;
123  virtual std::auto_ptr<EcalIntercalibErrors> getIntercalibErrorsFromConfiguration ( const EcalIntercalibErrorsRcd& ) ;
124  virtual std::auto_ptr<EcalTimeCalibConstants> getTimeCalibConstantsFromConfiguration ( const EcalTimeCalibConstantsRcd& ) ;
125  virtual std::auto_ptr<EcalTimeCalibErrors> getTimeCalibErrorsFromConfiguration ( const EcalTimeCalibErrorsRcd& ) ;
126  virtual std::auto_ptr<EcalTimeOffsetConstant> produceEcalTimeOffsetConstant( const EcalTimeOffsetConstantRcd& );
127 
128  virtual std::auto_ptr<EcalLaserAlphas> produceEcalLaserAlphas( const EcalLaserAlphasRcd& );
129  virtual std::auto_ptr<EcalLaserAPDPNRatiosRef> produceEcalLaserAPDPNRatiosRef( const EcalLaserAPDPNRatiosRefRcd& );
130  virtual std::auto_ptr<EcalLaserAPDPNRatios> produceEcalLaserAPDPNRatios( const EcalLaserAPDPNRatiosRcd& );
131 
132  virtual std::auto_ptr<EcalClusterLocalContCorrParameters> produceEcalClusterLocalContCorrParameters( const EcalClusterLocalContCorrParametersRcd& );
133  virtual std::auto_ptr<EcalClusterCrackCorrParameters> produceEcalClusterCrackCorrParameters( const EcalClusterCrackCorrParametersRcd& );
134  virtual std::auto_ptr<EcalClusterEnergyCorrectionParameters> produceEcalClusterEnergyCorrectionParameters( const EcalClusterEnergyCorrectionParametersRcd& );
135  virtual std::auto_ptr<EcalClusterEnergyUncertaintyParameters> produceEcalClusterEnergyUncertaintyParameters( const EcalClusterEnergyUncertaintyParametersRcd& );
136  virtual std::auto_ptr<EcalClusterEnergyCorrectionObjectSpecificParameters> produceEcalClusterEnergyCorrectionObjectSpecificParameters( const EcalClusterEnergyCorrectionObjectSpecificParametersRcd& );
137 
138  virtual std::auto_ptr<EcalChannelStatus> produceEcalChannelStatus( const EcalChannelStatusRcd& );
139  virtual std::auto_ptr<EcalChannelStatus> getChannelStatusFromConfiguration( const EcalChannelStatusRcd& );
140 
141  virtual std::auto_ptr<EcalTPGCrystalStatus> produceEcalTrgChannelStatus( const EcalTPGCrystalStatusRcd& );
142  virtual std::auto_ptr<EcalTPGCrystalStatus> getTrgChannelStatusFromConfiguration( const EcalTPGCrystalStatusRcd& );
143 
144  virtual std::auto_ptr<EcalDCSTowerStatus> produceEcalDCSTowerStatus( const EcalDCSTowerStatusRcd& );
145  virtual std::auto_ptr<EcalDAQTowerStatus> produceEcalDAQTowerStatus( const EcalDAQTowerStatusRcd& );
146  virtual std::auto_ptr<EcalDQMTowerStatus> produceEcalDQMTowerStatus( const EcalDQMTowerStatusRcd& );
147  virtual std::auto_ptr<EcalDQMChannelStatus> produceEcalDQMChannelStatus( const EcalDQMChannelStatusRcd& );
148 
149  virtual std::auto_ptr<EcalMappingElectronics> produceEcalMappingElectronics( const EcalMappingElectronicsRcd& );
150  virtual std::auto_ptr<EcalMappingElectronics> getMappingFromConfiguration( const EcalMappingElectronicsRcd& );
151 
152  // virtual std::auto_ptr<EcalAlignmentEB> produceEcalAlignmentEB( const EcalAlignmentEBRcd& );
153  // virtual std::auto_ptr<EcalAlignmentEE> produceEcalAlignmentEE( const EcalAlignmentEERcd& );
154  // virtual std::auto_ptr<EcalAlignmentES> produceEcalAlignmentES( const EcalAlignmentESRcd& );
155  virtual std::auto_ptr<Alignments> produceEcalAlignmentEB( const EBAlignmentRcd& );
156  virtual std::auto_ptr<Alignments> produceEcalAlignmentEE( const EEAlignmentRcd& );
157  virtual std::auto_ptr<Alignments> produceEcalAlignmentES( const ESAlignmentRcd& );
158 
159 protected:
160  //overriding from ContextRecordIntervalFinder
162  const edm::IOVSyncValue& ,
164 private:
167 
169 
170  // data members
171  double adcToGeVEBConstant_; // ADC -> GeV scale for barrel
172  double adcToGeVEEConstant_; // ADC -> GeV scale for endcap
173 
174  double intercalibConstantMean_; // mean of intercalib constant. default: 1.0
175  double intercalibConstantSigma_; // sigma of intercalib constant
176 
177  double intercalibConstantMeanMC_; // mean of intercalib constant. default: 1.0
178  double intercalibConstantSigmaMC_; // sigma of intercalib constant
179  // Gaussian used to generate intercalib constants for
180  // each channel. no smearing if sigma=0.0 (default)
181  double intercalibErrorMean_; // mean of intercalib constant error
182 
186 
189 
190  // cluster corrections
191  std::vector<double> localContCorrParameters_;
192  std::vector<double> crackCorrParameters_;
193  std::vector<double> energyCorrectionParameters_;
194  std::vector<double> energyUncertaintyParameters_;
196 
197  // laser
204  unsigned long laserAPDPNTime1_;
205  unsigned long laserAPDPNTime2_;
206  unsigned long laserAPDPNTime3_;
207 
208  double EBpedMeanX12_; // pedestal mean pedestal at gain 12
209  double EBpedRMSX12_; // pedestal rms at gain 12
210  double EBpedMeanX6_; // pedestal mean pedestal at gain 6
211  double EBpedRMSX6_; // pedestal rms at gain 6
212  double EBpedMeanX1_; // pedestal mean pedestal at gain 1
213  double EBpedRMSX1_; // pedestal rms at gain 1
214 
215  double EEpedMeanX12_; // pedestal mean pedestal at gain 12
216  double EEpedRMSX12_; // pedestal rms at gain 12
217  double EEpedMeanX6_; // pedestal mean pedestal at gain 6
218  double EEpedRMSX6_; // pedestal rms at gain 6
219  double EEpedMeanX1_; // pedestal mean pedestal at gain 1
220  double EEpedRMSX1_; // pedestal rms at gain 1
221 
222  double gainRatio12over6_; // ratio of MGPA gain12 / gain6
223  double gainRatio6over1_; // ratio of MGPA gain6 / gain1
224 
225  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > amplWeights_; // weights to compute amplitudes after ped subtraction
226  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > amplWeightsAft_; // weights to compute amplitudes after ped subtraction
227 
228  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > pedWeights_; // weights to compute amplitudes w/o ped subtraction
229  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > pedWeightsAft_; // weights to compute amplitudes w/o ped subtraction
230 
231  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > jittWeights_; // weights to compute jitter
232  std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > jittWeightsAft_; // weights to compute jitter
233 
234  std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix_;
235  std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2MatrixAft_;
236 
237  std::string amplWeightsFile_;
238  std::string amplWeightsAftFile_;
239  std::string pedWeightsFile_;
240  std::string pedWeightsAftFile_;
241  std::string jittWeightsFile_;
242  std::string jittWeightsAftFile_;
243  std::string chi2MatrixFile_;
244  std::string chi2MatrixAftFile_;
246  std::string intercalibErrorsFile_ ;
248  std::string timeCalibErrorsFile_ ;
249  std::string channelStatusFile_ ;
250  std::string trgChannelStatusFile_ ;
251  std::string mappingFile_ ;
252  std::string EBAlignmentFile_;
253  std::string EEAlignmentFile_;
254  std::string ESAlignmentFile_;
255  std::string EBLaserAlphaFile_;
256  std::string EELaserAlphaFile_;
257 
259 
292 
293  int verbose_; // verbosity
294 
295 };
296 #endif
virtual std::auto_ptr< EcalTimeCalibConstants > produceEcalTimeCalibConstants(const EcalTimeCalibConstantsRcd &)
virtual std::auto_ptr< EcalChannelStatus > produceEcalChannelStatus(const EcalChannelStatusRcd &)
virtual std::auto_ptr< EcalIntercalibConstants > getIntercalibConstantsFromConfiguration(const EcalIntercalibConstantsRcd &)
virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeightsAft_
virtual std::auto_ptr< EcalClusterCrackCorrParameters > produceEcalClusterCrackCorrParameters(const EcalClusterCrackCorrParametersRcd &)
virtual std::auto_ptr< EcalTPGCrystalStatus > produceEcalTrgChannelStatus(const EcalTPGCrystalStatusRcd &)
std::vector< double > energyCorrectionObjectSpecificParameters_
virtual std::auto_ptr< EcalChannelStatus > getChannelStatusFromConfiguration(const EcalChannelStatusRcd &)
virtual std::auto_ptr< EcalTBWeights > produceEcalTBWeights(const EcalTBWeightsRcd &)
virtual std::auto_ptr< EcalMappingElectronics > produceEcalMappingElectronics(const EcalMappingElectronicsRcd &)
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > pedWeightsAft_
void getWeightsFromConfiguration(const edm::ParameterSet &ps)
const EcalTrivialConditionRetriever & operator=(const EcalTrivialConditionRetriever &)
virtual std::auto_ptr< EcalPedestals > produceEcalPedestals(const EcalPedestalsRcd &)
virtual std::auto_ptr< EcalLaserAPDPNRatios > produceEcalLaserAPDPNRatios(const EcalLaserAPDPNRatiosRcd &)
virtual std::auto_ptr< EcalLaserAlphas > produceEcalLaserAlphas(const EcalLaserAlphasRcd &)
virtual std::auto_ptr< EcalTimeCalibConstants > getTimeCalibConstantsFromConfiguration(const EcalTimeCalibConstantsRcd &)
virtual std::auto_ptr< EcalDAQTowerStatus > produceEcalDAQTowerStatus(const EcalDAQTowerStatusRcd &)
virtual std::auto_ptr< Alignments > produceEcalAlignmentEE(const EEAlignmentRcd &)
virtual std::auto_ptr< EcalADCToGeVConstant > produceEcalADCToGeVConstant(const EcalADCToGeVConstantRcd &)
virtual std::auto_ptr< EcalClusterLocalContCorrParameters > produceEcalClusterLocalContCorrParameters(const EcalClusterLocalContCorrParametersRcd &)
virtual std::auto_ptr< EcalWeightXtalGroups > produceEcalWeightXtalGroups(const EcalWeightXtalGroupsRcd &)
virtual std::auto_ptr< EcalIntercalibErrors > getIntercalibErrorsFromConfiguration(const EcalIntercalibErrorsRcd &)
virtual std::auto_ptr< Alignments > produceEcalAlignmentEB(const EBAlignmentRcd &)
virtual std::auto_ptr< EcalDQMTowerStatus > produceEcalDQMTowerStatus(const EcalDQMTowerStatusRcd &)
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > pedWeights_
virtual std::auto_ptr< EcalClusterEnergyUncertaintyParameters > produceEcalClusterEnergyUncertaintyParameters(const EcalClusterEnergyUncertaintyParametersRcd &)
virtual std::auto_ptr< EcalMappingElectronics > getMappingFromConfiguration(const EcalMappingElectronicsRcd &)
virtual std::auto_ptr< EcalIntercalibErrors > produceEcalIntercalibErrors(const EcalIntercalibErrorsRcd &)
virtual std::auto_ptr< EcalTimeCalibErrors > produceEcalTimeCalibErrors(const EcalTimeCalibErrorsRcd &)
virtual std::auto_ptr< EcalTPGCrystalStatus > getTrgChannelStatusFromConfiguration(const EcalTPGCrystalStatusRcd &)
virtual std::auto_ptr< EcalClusterEnergyCorrectionParameters > produceEcalClusterEnergyCorrectionParameters(const EcalClusterEnergyCorrectionParametersRcd &)
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > amplWeights_
virtual std::auto_ptr< EcalDCSTowerStatus > produceEcalDCSTowerStatus(const EcalDCSTowerStatusRcd &)
std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2MatrixAft_
virtual std::auto_ptr< EcalIntercalibConstants > produceEcalIntercalibConstants(const EcalIntercalibConstantsRcd &)
virtual std::auto_ptr< EcalIntercalibConstantsMC > produceEcalIntercalibConstantsMC(const EcalIntercalibConstantsMCRcd &)
EcalTrivialConditionRetriever(const edm::ParameterSet &pset)
virtual std::auto_ptr< EcalLaserAPDPNRatiosRef > produceEcalLaserAPDPNRatiosRef(const EcalLaserAPDPNRatiosRefRcd &)
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > amplWeightsAft_
virtual std::auto_ptr< Alignments > produceEcalAlignmentES(const ESAlignmentRcd &)
virtual std::auto_ptr< EcalTimeCalibErrors > getTimeCalibErrorsFromConfiguration(const EcalTimeCalibErrorsRcd &)
virtual std::auto_ptr< EcalTimeOffsetConstant > produceEcalTimeOffsetConstant(const EcalTimeOffsetConstantRcd &)
virtual std::auto_ptr< EcalClusterEnergyCorrectionObjectSpecificParameters > produceEcalClusterEnergyCorrectionObjectSpecificParameters(const EcalClusterEnergyCorrectionObjectSpecificParametersRcd &)
virtual std::auto_ptr< EcalDQMChannelStatus > produceEcalDQMChannelStatus(const EcalDQMChannelStatusRcd &)
virtual std::auto_ptr< EcalGainRatios > produceEcalGainRatios(const EcalGainRatiosRcd &)
std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix_
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeights_