CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
EcalTrivialConditionRetriever Class Reference

#include <EcalTrivialConditionRetriever.h>

Inheritance diagram for EcalTrivialConditionRetriever:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 EcalTrivialConditionRetriever (const edm::ParameterSet &pset)
 
virtual std::unique_ptr< EcalChannelStatusgetChannelStatusFromConfiguration (const EcalChannelStatusRcd &)
 
virtual std::unique_ptr< EcalSimPulseShapegetEcalSimPulseShapeFromConfiguration (const EcalSimPulseShapeRcd &)
 
virtual std::unique_ptr< EcalIntercalibConstantsgetIntercalibConstantsFromConfiguration (const EcalIntercalibConstantsRcd &)
 
virtual std::unique_ptr< EcalIntercalibConstantsMCgetIntercalibConstantsMCFromConfiguration (const EcalIntercalibConstantsMCRcd &)
 
virtual std::unique_ptr< EcalIntercalibErrorsgetIntercalibErrorsFromConfiguration (const EcalIntercalibErrorsRcd &)
 
virtual std::unique_ptr< EcalMappingElectronicsgetMappingFromConfiguration (const EcalMappingElectronicsRcd &)
 
virtual std::unique_ptr< EcalPFRecHitThresholdsgetPFRecHitThresholdsFromConfiguration (const EcalPFRecHitThresholdsRcd &)
 
virtual std::unique_ptr< EcalTimeCalibConstantsgetTimeCalibConstantsFromConfiguration (const EcalTimeCalibConstantsRcd &)
 
virtual std::unique_ptr< EcalTimeCalibErrorsgetTimeCalibErrorsFromConfiguration (const EcalTimeCalibErrorsRcd &)
 
virtual std::unique_ptr< EcalTPGCrystalStatusgetTrgChannelStatusFromConfiguration (const EcalTPGCrystalStatusRcd &)
 
virtual std::unique_ptr< EcalADCToGeVConstantproduceEcalADCToGeVConstant (const EcalADCToGeVConstantRcd &)
 
virtual std::unique_ptr< AlignmentsproduceEcalAlignmentEB (const EBAlignmentRcd &)
 
virtual std::unique_ptr< AlignmentsproduceEcalAlignmentEE (const EEAlignmentRcd &)
 
virtual std::unique_ptr< AlignmentsproduceEcalAlignmentES (const ESAlignmentRcd &)
 
virtual std::unique_ptr< EcalChannelStatusproduceEcalChannelStatus (const EcalChannelStatusRcd &)
 
virtual std::unique_ptr< EcalClusterCrackCorrParametersproduceEcalClusterCrackCorrParameters (const EcalClusterCrackCorrParametersRcd &)
 
virtual std::unique_ptr< EcalClusterEnergyCorrectionObjectSpecificParametersproduceEcalClusterEnergyCorrectionObjectSpecificParameters (const EcalClusterEnergyCorrectionObjectSpecificParametersRcd &)
 
virtual std::unique_ptr< EcalClusterEnergyCorrectionParametersproduceEcalClusterEnergyCorrectionParameters (const EcalClusterEnergyCorrectionParametersRcd &)
 
virtual std::unique_ptr< EcalClusterEnergyUncertaintyParametersproduceEcalClusterEnergyUncertaintyParameters (const EcalClusterEnergyUncertaintyParametersRcd &)
 
virtual std::unique_ptr< EcalClusterLocalContCorrParametersproduceEcalClusterLocalContCorrParameters (const EcalClusterLocalContCorrParametersRcd &)
 
virtual std::unique_ptr< EcalDAQTowerStatusproduceEcalDAQTowerStatus (const EcalDAQTowerStatusRcd &)
 
virtual std::unique_ptr< EcalDCSTowerStatusproduceEcalDCSTowerStatus (const EcalDCSTowerStatusRcd &)
 
virtual std::unique_ptr< EcalDQMChannelStatusproduceEcalDQMChannelStatus (const EcalDQMChannelStatusRcd &)
 
virtual std::unique_ptr< EcalDQMTowerStatusproduceEcalDQMTowerStatus (const EcalDQMTowerStatusRcd &)
 
virtual std::unique_ptr< EcalGainRatiosproduceEcalGainRatios (const EcalGainRatiosRcd &)
 
virtual std::unique_ptr< EcalIntercalibConstantsproduceEcalIntercalibConstants (const EcalIntercalibConstantsRcd &)
 
virtual std::unique_ptr< EcalIntercalibConstantsMCproduceEcalIntercalibConstantsMC (const EcalIntercalibConstantsMCRcd &)
 
virtual std::unique_ptr< EcalIntercalibErrorsproduceEcalIntercalibErrors (const EcalIntercalibErrorsRcd &)
 
virtual std::unique_ptr< EcalLaserAlphasproduceEcalLaserAlphas (const EcalLaserAlphasRcd &)
 
virtual std::unique_ptr< EcalLaserAPDPNRatiosproduceEcalLaserAPDPNRatios (const EcalLaserAPDPNRatiosRcd &)
 
virtual std::unique_ptr< EcalLaserAPDPNRatiosRefproduceEcalLaserAPDPNRatiosRef (const EcalLaserAPDPNRatiosRefRcd &)
 
virtual std::unique_ptr< EcalLinearCorrectionsproduceEcalLinearCorrections (const EcalLinearCorrectionsRcd &)
 
virtual std::unique_ptr< EcalMappingElectronicsproduceEcalMappingElectronics (const EcalMappingElectronicsRcd &)
 
virtual std::unique_ptr< EcalPedestalsproduceEcalPedestals (const EcalPedestalsRcd &)
 
virtual std::unique_ptr< EcalPFRecHitThresholdsproduceEcalPFRecHitThresholds (const EcalPFRecHitThresholdsRcd &)
 
virtual std::unique_ptr< EcalSampleMaskproduceEcalSampleMask (const EcalSampleMaskRcd &)
 
virtual std::unique_ptr< EcalSamplesCorrelationproduceEcalSamplesCorrelation (const EcalSamplesCorrelationRcd &)
 
virtual std::unique_ptr< EcalTBWeightsproduceEcalTBWeights (const EcalTBWeightsRcd &)
 
virtual std::unique_ptr< EcalTimeBiasCorrectionsproduceEcalTimeBiasCorrections (const EcalTimeBiasCorrectionsRcd &)
 
virtual std::unique_ptr< EcalTimeCalibConstantsproduceEcalTimeCalibConstants (const EcalTimeCalibConstantsRcd &)
 
virtual std::unique_ptr< EcalTimeCalibErrorsproduceEcalTimeCalibErrors (const EcalTimeCalibErrorsRcd &)
 
virtual std::unique_ptr< EcalTimeOffsetConstantproduceEcalTimeOffsetConstant (const EcalTimeOffsetConstantRcd &)
 
virtual std::unique_ptr< EcalTPGCrystalStatusproduceEcalTrgChannelStatus (const EcalTPGCrystalStatusRcd &)
 
virtual std::unique_ptr< EcalWeightXtalGroupsproduceEcalWeightXtalGroups (const EcalWeightXtalGroupsRcd &)
 
 ~EcalTrivialConditionRetriever () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Protected Member Functions

void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
 
- Protected Member Functions inherited from edm::ESProducer
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Private Member Functions

 EcalTrivialConditionRetriever (const EcalTrivialConditionRetriever &)=delete
 
void getWeightsFromConfiguration (const edm::ParameterSet &ps)
 
const EcalTrivialConditionRetrieveroperator= (const EcalTrivialConditionRetriever &)=delete
 

Private Attributes

double adcToGeVEBConstant_
 
double adcToGeVEEConstant_
 
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > amplWeights_
 
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > amplWeightsAft_
 
std::string amplWeightsAftFile_
 
std::string amplWeightsFile_
 
std::string APDSimPulseShapeFile_
 
std::string channelStatusFile_
 
std::vector< EcalWeightSet::EcalChi2WeightMatrixchi2Matrix_
 
std::vector< EcalWeightSet::EcalChi2WeightMatrixchi2MatrixAft_
 
std::string chi2MatrixAftFile_
 
std::string chi2MatrixFile_
 
std::vector< double > crackCorrParameters_
 
std::string EBAlignmentFile_
 
std::vector< double > EBG12samplesCorrelation_
 
std::vector< double > EBG1samplesCorrelation_
 
std::vector< double > EBG6samplesCorrelation_
 
std::string EBLaserAlphaFile_
 
double EBpedMeanX12_
 
double EBpedMeanX1_
 
double EBpedMeanX6_
 
double EBpedRMSX12_
 
double EBpedRMSX1_
 
double EBpedRMSX6_
 
std::string EBSimPulseShapeFile_
 
std::vector< double > EBtimeCorrAmplitudeBins_
 
std::vector< double > EBtimeCorrShiftBins_
 
std::string EEAlignmentFile_
 
std::vector< double > EEG12samplesCorrelation_
 
std::vector< double > EEG1samplesCorrelation_
 
std::vector< double > EEG6samplesCorrelation_
 
std::string EELaserAlphaFile2_
 
std::string EELaserAlphaFile_
 
double EEpedMeanX12_
 
double EEpedMeanX1_
 
double EEpedMeanX6_
 
double EEpedRMSX12_
 
double EEpedRMSX1_
 
double EEpedRMSX6_
 
std::string EESimPulseShapeFile_
 
std::vector< double > EEtimeCorrAmplitudeBins_
 
std::vector< double > EEtimeCorrShiftBins_
 
std::vector< double > energyCorrectionObjectSpecificParameters_
 
std::vector< double > energyCorrectionParameters_
 
std::vector< double > energyUncertaintyParameters_
 
std::string ESAlignmentFile_
 
double gainRatio12over6_
 
double gainRatio6over1_
 
bool getEBAlignmentFromFile_
 
bool getEEAlignmentFromFile_
 
bool getESAlignmentFromFile_
 
bool getLaserAlphaFromFileEB_
 
bool getLaserAlphaFromFileEE_
 
bool getLaserAlphaFromTypeEB_
 
bool getLaserAlphaFromTypeEE_
 
bool getSamplesCorrelationFromFile_
 
bool getSimPulseShapeFromFile_
 
bool getWeightsFromFile_
 
double instLumi_
 
double intercalibConstantMean_
 
double intercalibConstantMeanMC_
 
std::string intercalibConstantsFile_
 
double intercalibConstantSigma_
 
double intercalibConstantSigmaMC_
 
std::string intercalibConstantsMCFile_
 
double intercalibErrorMean_
 
std::string intercalibErrorsFile_
 
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeights_
 
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeightsAft_
 
std::string jittWeightsAftFile_
 
std::string jittWeightsFile_
 
double laserAlphaMean_
 
double laserAlphaMeanEBC_
 
double laserAlphaMeanEBR_
 
double laserAlphaMeanEEC_
 
double laserAlphaMeanEEC_higheta_
 
double laserAlphaMeanEER_
 
double laserAlphaMeanEER_higheta_
 
double laserAlphaSigma_
 
double laserAPDPNMean_
 
double laserAPDPNRefMean_
 
double laserAPDPNRefSigma_
 
double laserAPDPNSigma_
 
unsigned long laserAPDPNTime1_
 
unsigned long laserAPDPNTime2_
 
unsigned long laserAPDPNTime3_
 
double linCorrMean_
 
double linCorrSigma_
 
std::string linearCorrectionsFile_
 
unsigned long linearTime1_
 
unsigned long linearTime2_
 
unsigned long linearTime3_
 
std::vector< double > localContCorrParameters_
 
std::string mappingFile_
 
int nTDCbins_
 
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > pedWeights_
 
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > pedWeightsAft_
 
std::string pedWeightsAftFile_
 
std::string pedWeightsFile_
 
std::string pfRecHitFile_
 
std::string pfRecHitFileEE_
 
double pfRecHitThresholdsEB_
 
double pfRecHitThresholdsEE_
 
double pfRecHitThresholdsNSigmas_
 
double pfRecHitThresholdsNSigmasHEta_
 
bool producedEcalADCToGeVConstant_
 
bool producedEcalAlignmentEB_
 
bool producedEcalAlignmentEE_
 
bool producedEcalAlignmentES_
 
bool producedEcalChannelStatus_
 
bool producedEcalClusterCrackCorrParameters_
 
bool producedEcalClusterEnergyCorrectionObjectSpecificParameters_
 
bool producedEcalClusterEnergyCorrectionParameters_
 
bool producedEcalClusterEnergyUncertaintyParameters_
 
bool producedEcalClusterLocalContCorrParameters_
 
bool producedEcalDAQTowerStatus_
 
bool producedEcalDCSTowerStatus_
 
bool producedEcalDQMChannelStatus_
 
bool producedEcalDQMTowerStatus_
 
bool producedEcalGainRatios_
 
bool producedEcalIntercalibConstants_
 
bool producedEcalIntercalibConstantsMC_
 
bool producedEcalIntercalibErrors_
 
bool producedEcalLaserCorrection_
 
bool producedEcalLinearCorrections_
 
bool producedEcalMappingElectronics_
 
bool producedEcalPedestals_
 
bool producedEcalPFRecHitThresholds_
 
bool producedEcalSampleMask_
 
bool producedEcalSamplesCorrelation_
 
bool producedEcalSimPulseShape_
 
bool producedEcalTimeBiasCorrections_
 
bool producedEcalTimeCalibConstants_
 
bool producedEcalTimeCalibErrors_
 
bool producedEcalTimeOffsetConstant_
 
bool producedEcalTrgChannelStatus_
 
bool producedEcalWeights_
 
unsigned int sampleMaskEB_
 
unsigned int sampleMaskEE_
 
std::string SamplesCorrelationFile_
 
double sim_pulse_shape_APD_thresh_
 
double sim_pulse_shape_EB_thresh_
 
double sim_pulse_shape_EE_thresh_
 
float sim_pulse_shape_TI_
 
double timeCalibConstantMean_
 
std::string timeCalibConstantsFile_
 
double timeCalibConstantSigma_
 
double timeCalibErrorMean_
 
std::string timeCalibErrorsFile_
 
double timeOffsetEBConstant_
 
double timeOffsetEEConstant_
 
double totLumi_
 
std::string trgChannelStatusFile_
 
int verbose_
 
bool weightsForAsynchronousRunning_
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 123 of file EcalTrivialConditionRetriever.h.

Constructor & Destructor Documentation

EcalTrivialConditionRetriever::EcalTrivialConditionRetriever ( const edm::ParameterSet pset)

Definition at line 30 of file EcalTrivialConditionRetriever.cc.

References getChannelStatusFromConfiguration(), getEcalSimPulseShapeFromConfiguration(), getIntercalibConstantsFromConfiguration(), getIntercalibConstantsMCFromConfiguration(), getIntercalibErrorsFromConfiguration(), getMappingFromConfiguration(), edm::ParameterSet::getParameter(), getPFRecHitThresholdsFromConfiguration(), getTimeCalibConstantsFromConfiguration(), getTimeCalibErrorsFromConfiguration(), getTrgChannelStatusFromConfiguration(), edm::ParameterSet::getUntrackedParameter(), callgraph::path, produceEcalADCToGeVConstant(), produceEcalAlignmentEB(), produceEcalAlignmentEE(), produceEcalAlignmentES(), produceEcalChannelStatus(), produceEcalClusterCrackCorrParameters(), produceEcalClusterEnergyCorrectionObjectSpecificParameters(), produceEcalClusterEnergyCorrectionParameters(), produceEcalClusterEnergyUncertaintyParameters(), produceEcalClusterLocalContCorrParameters(), produceEcalDAQTowerStatus(), produceEcalDCSTowerStatus(), produceEcalDQMChannelStatus(), produceEcalDQMTowerStatus(), produceEcalGainRatios(), produceEcalIntercalibConstants(), produceEcalIntercalibConstantsMC(), produceEcalIntercalibErrors(), produceEcalLaserAlphas(), produceEcalLaserAPDPNRatios(), produceEcalLaserAPDPNRatiosRef(), produceEcalLinearCorrections(), produceEcalMappingElectronics(), produceEcalPedestals(), produceEcalPFRecHitThresholds(), produceEcalSampleMask(), produceEcalSamplesCorrelation(), produceEcalTBWeights(), produceEcalTimeBiasCorrections(), produceEcalTimeCalibConstants(), produceEcalTimeCalibErrors(), produceEcalTimeOffsetConstant(), produceEcalTrgChannelStatus(), produceEcalWeightXtalGroups(), str, and AlCaHLTBitMon_QueryRunRegistry::string.

31 {
32  // initilize parameters used to produce cond DB objects
33  totLumi_=ps.getUntrackedParameter<double>("TotLumi",0.0);
34  instLumi_ = ps.getUntrackedParameter<double>("InstLumi",0.0);
35 
36  // initilize parameters used to produce cond DB objects
37  adcToGeVEBConstant_ = ps.getUntrackedParameter<double>("adcToGeVEBConstant",0.035);
38  adcToGeVEEConstant_ = ps.getUntrackedParameter<double>("adcToGeVEEConstant",0.060);
39 
40  intercalibConstantMeanMC_ = ps.getUntrackedParameter<double>("intercalibConstantMeanMC",1.0);
41  intercalibConstantSigmaMC_ = ps.getUntrackedParameter<double>("intercalibConstantSigmaMC",0.0);
42 
43  linCorrMean_ = ps.getUntrackedParameter<double>("linCorrMean",1.0);
44  linCorrSigma_ = ps.getUntrackedParameter<double>("linCorrSigma",0.0);
45 
46  linearTime1_ = (unsigned long)atoi( ps.getUntrackedParameter<std::string>("linearTime1","1").c_str());
47  linearTime2_= (unsigned long)atoi( ps.getUntrackedParameter<std::string>("linearTime2","0").c_str());
48  linearTime3_= (unsigned long)atoi( ps.getUntrackedParameter<std::string>("linearTime3","0").c_str());
49 
50 
51  intercalibConstantMean_ = ps.getUntrackedParameter<double>("intercalibConstantMean",1.0);
52  intercalibConstantSigma_ = ps.getUntrackedParameter<double>("intercalibConstantSigma",0.0);
53  intercalibErrorMean_ = ps.getUntrackedParameter<double>("IntercalibErrorMean",0.0);
54 
55  timeCalibConstantMean_ = ps.getUntrackedParameter<double>("timeCalibConstantMean",0.0);
56  timeCalibConstantSigma_ = ps.getUntrackedParameter<double>("timeCalibConstantSigma",0.0);
57  timeCalibErrorMean_ = ps.getUntrackedParameter<double>("timeCalibErrorMean",0.0);
58 
59  timeOffsetEBConstant_ = ps.getUntrackedParameter<double>("timeOffsetEBConstant",0.0);
60  timeOffsetEEConstant_ = ps.getUntrackedParameter<double>("timeOffsetEEConstant",0.0);
61 
62  laserAlphaMean_ = ps.getUntrackedParameter<double>("laserAlphaMean",1.55);
63  laserAlphaSigma_ = ps.getUntrackedParameter<double>("laserAlphaSigma",0);
64 
65  laserAPDPNTime1_ = (unsigned long)atoi( ps.getUntrackedParameter<std::string>("laserAPDPNTime1","1").c_str());
66  laserAPDPNTime2_= (unsigned long)atoi( ps.getUntrackedParameter<std::string>("laserAPDPNTime2","0").c_str());
67  laserAPDPNTime3_= (unsigned long)atoi( ps.getUntrackedParameter<std::string>("laserAPDPNTime3","0").c_str());
68 
69  laserAPDPNRefMean_ = ps.getUntrackedParameter<double>("laserAPDPNRefMean",1.0);
70  laserAPDPNRefSigma_ = ps.getUntrackedParameter<double>("laserAPDPNRefSigma",0.0);
71 
72  laserAPDPNMean_ = ps.getUntrackedParameter<double>("laserAPDPNMean",1.0);
73  laserAPDPNSigma_ = ps.getUntrackedParameter<double>("laserAPDPNSigma",0.0);
74 
75  pfRecHitThresholdsNSigmas_ = ps.getUntrackedParameter<double>("EcalPFRecHitThresholdNSigmas", 1.0 );
76  pfRecHitThresholdsNSigmasHEta_ = ps.getUntrackedParameter<double>("EcalPFRecHitThresholdNSigmasHEta", 1.0 );
77  pfRecHitThresholdsEB_ = ps.getUntrackedParameter<double>("EcalPFRecHitThresholdEB", 0.0 );
78  pfRecHitThresholdsEE_ = ps.getUntrackedParameter<double>("EcalPFRecHitThresholdEE", 0.0 );
79 
80 
81  localContCorrParameters_ = ps.getUntrackedParameter< std::vector<double> >("localContCorrParameters", std::vector<double>(0) );
82  crackCorrParameters_ = ps.getUntrackedParameter< std::vector<double> >("crackCorrParameters", std::vector<double>(0) );
83  energyCorrectionParameters_ = ps.getUntrackedParameter< std::vector<double> >("energyCorrectionParameters", std::vector<double>(0) );
84  energyUncertaintyParameters_ = ps.getUntrackedParameter< std::vector<double> >("energyUncertaintyParameters", std::vector<double>(0) );
85  energyCorrectionObjectSpecificParameters_ = ps.getUntrackedParameter< std::vector<double> >("energyCorrectionObjectSpecificParameters", std::vector<double>(0) );
86 
87  EBpedMeanX12_ = ps.getUntrackedParameter<double>("EBpedMeanX12", 200.);
88  EBpedRMSX12_ = ps.getUntrackedParameter<double>("EBpedRMSX12", 1.10);
89  EBpedMeanX6_ = ps.getUntrackedParameter<double>("EBpedMeanX6", 200.);
90  EBpedRMSX6_ = ps.getUntrackedParameter<double>("EBpedRMSX6", 0.90);
91  EBpedMeanX1_ = ps.getUntrackedParameter<double>("EBpedMeanX1", 200.);
92  EBpedRMSX1_ = ps.getUntrackedParameter<double>("EBpedRMSX1", 0.62);
93 
94  EEpedMeanX12_ = ps.getUntrackedParameter<double>("EEpedMeanX12", 200.);
95  EEpedRMSX12_ = ps.getUntrackedParameter<double>("EEpedRMSX12", 2.50);
96  EEpedMeanX6_ = ps.getUntrackedParameter<double>("EEpedMeanX6", 200.);
97  EEpedRMSX6_ = ps.getUntrackedParameter<double>("EEpedRMSX6", 2.00);
98  EEpedMeanX1_ = ps.getUntrackedParameter<double>("EEpedMeanX1", 200.);
99  EEpedRMSX1_ = ps.getUntrackedParameter<double>("EEpedRMSX1", 1.40);
100 
101  gainRatio12over6_ = ps.getUntrackedParameter<double>("gainRatio12over6", 2.0);
102  gainRatio6over1_ = ps.getUntrackedParameter<double>("gainRatio6over1", 6.0);
103 
104  getWeightsFromFile_ = ps.getUntrackedParameter<bool>("getWeightsFromFile",false);
105 
106  sampleMaskEB_ = ps.getUntrackedParameter<unsigned int>("sampleMaskEB",1023);
107  sampleMaskEE_ = ps.getUntrackedParameter<unsigned int>("sampleMaskEB",1023);
108 
109  EBtimeCorrAmplitudeBins_ = ps.getUntrackedParameter< std::vector<double> >("EBtimeCorrAmplitudeBins", std::vector<double>() );
110  EBtimeCorrShiftBins_ = ps.getUntrackedParameter< std::vector<double> >("EBtimeCorrShiftBins", std::vector<double>() );
111  EEtimeCorrAmplitudeBins_ = ps.getUntrackedParameter< std::vector<double> >("EEtimeCorrAmplitudeBins", std::vector<double>() );
112  EEtimeCorrShiftBins_ = ps.getUntrackedParameter< std::vector<double> >("EEtimeCorrShiftBins", std::vector<double>() );
113 
114  EBG12samplesCorrelation_ = ps.getUntrackedParameter< std::vector<double> >("EBG12samplesCorrelation", std::vector<double>() );
115  EBG6samplesCorrelation_ = ps.getUntrackedParameter< std::vector<double> >("EBG6samplesCorrelation", std::vector<double>() );
116  EBG1samplesCorrelation_ = ps.getUntrackedParameter< std::vector<double> >("EBG1samplesCorrelation", std::vector<double>() );
117  EEG12samplesCorrelation_ = ps.getUntrackedParameter< std::vector<double> >("EEG12samplesCorrelation", std::vector<double>() );
118  EEG6samplesCorrelation_ = ps.getUntrackedParameter< std::vector<double> >("EEG6samplesCorrelation", std::vector<double>() );
119  EEG1samplesCorrelation_ = ps.getUntrackedParameter< std::vector<double> >("EEG1samplesCorrelation", std::vector<double>() );
120 
121 
122  sim_pulse_shape_EB_thresh_ = ps.getParameter<double>("sim_pulse_shape_EB_thresh" );
123  sim_pulse_shape_EE_thresh_ = ps.getParameter<double>("sim_pulse_shape_EE_thresh" );
124  sim_pulse_shape_APD_thresh_ = ps.getParameter<double>("sim_pulse_shape_APD_thresh");
125 
126  sim_pulse_shape_TI_ = ps.getUntrackedParameter<double>("sim_pulse_shape_TI", 1.0);
127 
128  nTDCbins_ = 1;
129 
130  weightsForAsynchronousRunning_ = ps.getUntrackedParameter<bool>("weightsForTB",false);
131 
132  edm::LogInfo(" EcalTrivialConditionRetriever ");
133 
134 
135 
136  if(totLumi_ > 0 ) {
137 
138  edm::LogInfo(" EcalTrivialConditionRetriever going to create conditions based on the damage deu to ")<<totLumi_<<
139  " fb-1 integrated luminosity";
140 
141  }
142 
144  {
145  getWeightsFromFile_ = true; //override user request
146  //nTDCbins_ = 25;
147  nTDCbins_ = 50; //modif Alex-21-07-2006
148  }
149 
150  std::string path="CalibCalorimetry/EcalTrivialCondModules/data/";
151  std::string weightType;
152  std::ostringstream str;
153 
155  str << "_CMS.txt" ;
156  else
157  str << "_TB.txt" ;
158 
159  weightType = str.str();
160 
161  amplWeightsFile_ = ps.getUntrackedParameter<std::string>("amplWeightsFile",path+"ampWeights"+weightType);
162  amplWeightsAftFile_ = ps.getUntrackedParameter<std::string>("amplWeightsAftFile",path+"ampWeightsAfterGainSwitch"+weightType);
163  pedWeightsFile_ = ps.getUntrackedParameter<std::string>("pedWeightsFile",path+"pedWeights"+weightType);
164  pedWeightsAftFile_ = ps.getUntrackedParameter<std::string>("pedWeightsAftFile",path+"pedWeightsAfterGainSwitch"+weightType);
165  jittWeightsFile_ = ps.getUntrackedParameter<std::string>("jittWeightsFile",path+"timeWeights"+weightType);
166  jittWeightsAftFile_ = ps.getUntrackedParameter<std::string>("jittWeightsAftFile",path+"timeWeightsAfterGainSwitch"+weightType);
167  chi2MatrixFile_ = ps.getUntrackedParameter<std::string>("chi2MatrixFile",path+"chi2Matrix"+weightType);
168  chi2MatrixAftFile_ = ps.getUntrackedParameter<std::string>("chi2MatrixAftFile",path+"chi2MatrixAfterGainSwitch"+weightType);
169 
170  amplWeights_.resize(nTDCbins_);
171  amplWeightsAft_.resize(nTDCbins_);
172  pedWeights_.resize(nTDCbins_);
173  pedWeightsAft_.resize(nTDCbins_);
174  jittWeights_.resize(nTDCbins_);
175  jittWeightsAft_.resize(nTDCbins_);
176  chi2Matrix_.resize(nTDCbins_);
177  chi2MatrixAft_.resize(nTDCbins_);
178 
179  // default weights for MGPA shape after pedestal subtraction
181 
182  producedEcalPedestals_ = ps.getUntrackedParameter<bool>("producedEcalPedestals",true);
183  producedEcalWeights_ = ps.getUntrackedParameter<bool>("producedEcalWeights",true);
184 
185  producedEcalGainRatios_ = ps.getUntrackedParameter<bool>("producedEcalGainRatios",true);
186  producedEcalADCToGeVConstant_ = ps.getUntrackedParameter<bool>("producedEcalADCToGeVConstant",true);
187 
188  producedEcalMappingElectronics_ = ps.getUntrackedParameter<bool>("producedEcalMappingElectronics",true);
189  mappingFile_ = ps.getUntrackedParameter<std::string>("mappingFile","");
190 
191  if ( producedEcalMappingElectronics_ ) {
192  if ( !mappingFile_.empty() ) { // if file provided read channel map
194  } else {
196  }
197  findingRecord<EcalMappingElectronicsRcd>();
198  }
199  // Alignment from file
200  getEBAlignmentFromFile_ = ps.getUntrackedParameter<bool>("getEBAlignmentFromFile",false);
201  if(getEBAlignmentFromFile_) {
202  EBAlignmentFile_ = ps.getUntrackedParameter<std::string>("EBAlignmentFile",path+"EBAlignment.txt");
203  }
204 
205  getEEAlignmentFromFile_ = ps.getUntrackedParameter<bool>("getEEAlignmentFromFile",false);
206  if(getEEAlignmentFromFile_) {
207  EEAlignmentFile_ = ps.getUntrackedParameter<std::string>("EEAlignmentFile",path+"EEAlignment.txt");
208  }
209 
210  getESAlignmentFromFile_ = ps.getUntrackedParameter<bool>("getESAlignmentFromFile",false);
211  if(getESAlignmentFromFile_)
212  ESAlignmentFile_ = ps.getUntrackedParameter<std::string>("ESAlignmentFile",path+"ESAlignment.txt");
213 
214  verbose_ = ps.getUntrackedParameter<int>("verbose", 0);
215 
216  //Tell Producer what we produce
217  //setWhatproduce(this);
220 
221  if (producedEcalWeights_) {
224  }
225 
226  if (producedEcalGainRatios_)
228 
229  if (producedEcalADCToGeVConstant_)
231 
232  // TimeOffsetConstant
233  producedEcalTimeOffsetConstant_ = ps.getUntrackedParameter<bool>("producedEcalTimeOffsetConstant",true);
234  //std::cout << " EcalTrivialConditionRetriever : producedEcalTimeOffsetConstant_" << producedEcalTimeOffsetConstant_ << std::endl;
237  findingRecord<EcalTimeOffsetConstantRcd>();
238  }
239 
240  // linear corrections
241  producedEcalLinearCorrections_ = ps.getUntrackedParameter<bool>("producedEcalLinearCorrections",true);
242  linearCorrectionsFile_ = ps.getUntrackedParameter<std::string>("linearCorrectionsFile","") ;
243 
244  if (producedEcalLinearCorrections_) { // user asks to produce constants
245  if(!linearCorrectionsFile_.empty()) { // if file provided read constants
247  } else { // set all constants to 1. or smear as specified by user
249  }
250  findingRecord<EcalLinearCorrectionsRcd> () ;
251  }
252 
253 
254 
255  // intercalibration constants
256  producedEcalIntercalibConstants_ = ps.getUntrackedParameter<bool>("producedEcalIntercalibConstants",true);
257  intercalibConstantsFile_ = ps.getUntrackedParameter<std::string>("intercalibConstantsFile","") ;
258 
259  intercalibConstantsMCFile_ = ps.getUntrackedParameter<std::string>("intercalibConstantsMCFile","") ;
260 
261  if (producedEcalIntercalibConstants_) { // user asks to produce constants
262  if(!intercalibConstantsFile_.empty()) { // if file provided read constants
264  } else { // set all constants to 1. or smear as specified by user
266  }
267  findingRecord<EcalIntercalibConstantsRcd> () ;
268  }
269  // MC intercalibrations
270  producedEcalIntercalibConstantsMC_ = ps.getUntrackedParameter<bool>("producedEcalIntercalibConstantsMC",true);
271 
272  if (producedEcalIntercalibConstantsMC_) { // user asks to produce constants
273  if(!intercalibConstantsMCFile_.empty()) { // if file provided read constants
275  } else { // set all constants to 1. or smear as specified by user
277  }
278  findingRecord<EcalIntercalibConstantsMCRcd> () ;
279  }
280 
281  // intercalibration constants
282  producedEcalIntercalibErrors_ = ps.getUntrackedParameter<bool>("producedEcalIntercalibErrors",true);
283  intercalibErrorsFile_ = ps.getUntrackedParameter<std::string>("intercalibErrorsFile","") ;
284 
285  if (producedEcalIntercalibErrors_) { // user asks to produce constants
286  if(!intercalibErrorsFile_.empty()) { // if file provided read constants
288  } else { // set all constants to 1. or smear as specified by user
290  }
291  findingRecord<EcalIntercalibErrorsRcd> () ;
292  }
293 
294  // time calibration constants
295  producedEcalTimeCalibConstants_ = ps.getUntrackedParameter<bool>("producedEcalTimeCalibConstants",true);
296  timeCalibConstantsFile_ = ps.getUntrackedParameter<std::string>("timeCalibConstantsFile","") ;
297 
298  if (producedEcalTimeCalibConstants_) { // user asks to produce constants
299  if(!timeCalibConstantsFile_.empty()) { // if file provided read constants
301  } else { // set all constants to 1. or smear as specified by user
303  }
304  findingRecord<EcalTimeCalibConstantsRcd> () ;
305  }
306 
307  // time calibration constants
308  producedEcalTimeCalibErrors_ = ps.getUntrackedParameter<bool>("producedEcalTimeCalibErrors",true);
309  timeCalibErrorsFile_ = ps.getUntrackedParameter<std::string>("timeCalibErrorsFile","") ;
310 
311  if (producedEcalTimeCalibErrors_) { // user asks to produce constants
312  if(!timeCalibErrorsFile_.empty()) { // if file provided read constants
314  } else { // set all constants to 1. or smear as specified by user
316  }
317  findingRecord<EcalTimeCalibErrorsRcd> () ;
318  }
319 
320  // sim pulse shape
321  getSimPulseShapeFromFile_ = ps.getUntrackedParameter<bool>("getSimPulseShapeFromFile",false);
322  producedEcalSimPulseShape_ = ps.getUntrackedParameter<bool>("producedEcalSimPulseShape",true);
323  EBSimPulseShapeFile_ = ps.getUntrackedParameter<std::string>("EBSimPulseShapeFile","") ;
324  EESimPulseShapeFile_ = ps.getUntrackedParameter<std::string>("EESimPulseShapeFile","") ;
325  APDSimPulseShapeFile_ = ps.getUntrackedParameter<std::string>("APDSimPulseShapeFile","") ;
326 
327  if (producedEcalSimPulseShape_) { // user asks to produce constants
329  findingRecord<EcalSimPulseShapeRcd> () ;
330  }
331 
332  producedEcalPFRecHitThresholds_ = ps.getUntrackedParameter<bool>("producedEcalPFRecHitThresholds", false);
333 
334  // new for PFRecHit Thresholds
335  pfRecHitFile_ = ps.getUntrackedParameter<std::string>("PFRecHitFile","");
336  pfRecHitFileEE_ = ps.getUntrackedParameter<std::string>("PFRecHitFileEE","");
337 
338 
339  if (producedEcalPFRecHitThresholds_) { // user asks to produce constants
340  if(!pfRecHitFile_.empty()) { // if file provided read constants
342  } else { // set all constants to 0
344  }
345  findingRecord<EcalPFRecHitThresholdsRcd> () ;
346  }
347 
348 
349  // cluster corrections
350  producedEcalClusterLocalContCorrParameters_ = ps.getUntrackedParameter<bool>("producedEcalClusterLocalContCorrParameters", false);
351  producedEcalClusterCrackCorrParameters_ = ps.getUntrackedParameter<bool>("producedEcalClusterCrackCorrParameters", false);
352  producedEcalClusterEnergyCorrectionParameters_ = ps.getUntrackedParameter<bool>("producedEcalClusterEnergyCorrectionParameters", false);
353  producedEcalClusterEnergyUncertaintyParameters_ = ps.getUntrackedParameter<bool>("producedEcalClusterEnergyUncertaintyParameters", false);
354  producedEcalClusterEnergyCorrectionObjectSpecificParameters_ = ps.getUntrackedParameter<bool>("producedEcalClusterEnergyCorrectionObjectSpecificParameters", false);
355  if ( producedEcalClusterLocalContCorrParameters_ ) {
357  findingRecord<EcalClusterLocalContCorrParametersRcd>();
358  }
359  if ( producedEcalClusterCrackCorrParameters_ ) {
361  findingRecord<EcalClusterCrackCorrParametersRcd>();
362  }
363  if ( producedEcalClusterEnergyCorrectionParameters_ ) {
365  findingRecord<EcalClusterEnergyCorrectionParametersRcd>();
366  }
367  if ( producedEcalClusterEnergyUncertaintyParameters_ ) {
369  findingRecord<EcalClusterEnergyUncertaintyParametersRcd>();
370  }
371  if ( producedEcalClusterEnergyCorrectionObjectSpecificParameters_ ) {
373  findingRecord<EcalClusterEnergyCorrectionObjectSpecificParametersRcd>();
374  }
375 
376  // laser correction
377  producedEcalLaserCorrection_ = ps.getUntrackedParameter<bool>("producedEcalLaserCorrection",false);
378  if (producedEcalLaserCorrection_) { // user asks to produce constants
379  // set all constants to 1. or smear as specified by user
381  findingRecord<EcalLaserAlphasRcd> () ;
382  getLaserAlphaFromFileEB_ = ps.getUntrackedParameter<bool>("getLaserAlphaFromFileEB",false);
383  getLaserAlphaFromFileEE_ = ps.getUntrackedParameter<bool>("getLaserAlphaFromFileEE",false);
384  getLaserAlphaFromTypeEB_ = ps.getUntrackedParameter<bool>("getLaserAlphaFromTypeEB",false);
385  getLaserAlphaFromTypeEE_ = ps.getUntrackedParameter<bool>("getLaserAlphaFromTypeEE",false);
386  edm::LogInfo(" getLaserAlphaFromFileEB_ ") << getLaserAlphaFromFileEB_;
387  edm::LogInfo(" getLaserAlphaFromFileEE_ ") << getLaserAlphaFromFileEE_;
388  edm::LogInfo(" getLaserAlphaFromTypeEB_ ") << getLaserAlphaFromTypeEB_;
389  edm::LogInfo(" getLaserAlphaFromTypeEE_ ") << getLaserAlphaFromTypeEE_;
390  if(getLaserAlphaFromFileEB_) {
391  EBLaserAlphaFile_ = ps.getUntrackedParameter<std::string>("EBLaserAlphaFile",path+"EBLaserAlpha.txt"); // file is used to read the alphas
392  }
393  if(getLaserAlphaFromFileEE_) {
394  EELaserAlphaFile_ = ps.getUntrackedParameter<std::string>("EELaserAlphaFile",path+"EELaserAlpha.txt"); // file is used to read the alphas
395  }
396  if(getLaserAlphaFromTypeEB_) {
397  laserAlphaMeanEBR_ = ps.getUntrackedParameter<double>("laserAlphaMeanEBR",1.55); // alpha russian crystals in EB
398  laserAlphaMeanEBC_ = ps.getUntrackedParameter<double>("laserAlphaMeanEBC",1.00); // alpha chinese crystals in EB
399  EBLaserAlphaFile_ = ps.getUntrackedParameter<std::string>("EBLaserAlphaFile",path+"EBLaserAlpha.txt"); // file to find out which one is russian/chinese
400  }
401  if(getLaserAlphaFromTypeEE_) {
402  laserAlphaMeanEEC_higheta_ = ps.getUntrackedParameter<double>("laserAlphaMeanEEC_higheta",1.00); // alpha chinese crystals in EE for eta>2.5
403  laserAlphaMeanEER_higheta_ = ps.getUntrackedParameter<double>("laserAlphaMeanEER_higheta",1.16); // alpha russian crystals in EE for eta>2
404  laserAlphaMeanEER_ = ps.getUntrackedParameter<double>("laserAlphaMeanEER",1.16); // alpha russian crystals in EE
405  laserAlphaMeanEEC_ = ps.getUntrackedParameter<double>("laserAlphaMeanEEC",1.00); // alpha chinese crystals in EE
406  EELaserAlphaFile_ = ps.getUntrackedParameter<std::string>("EELaserAlphaFile",path+"EELaserAlpha.txt"); // file is used to find out which one is russian or chinese
407  EELaserAlphaFile2_ = ps.getUntrackedParameter<std::string>("EELaserAlphaFile2",path+"EELaserAlpha2.txt"); // file is used to read the alphas
408  }
410  findingRecord<EcalLaserAPDPNRatiosRefRcd> () ;
412  findingRecord<EcalLaserAPDPNRatiosRcd> () ;
413  }
414 
415  // channel status
416  producedEcalChannelStatus_ = ps.getUntrackedParameter<bool>("producedEcalChannelStatus",true);
417  channelStatusFile_ = ps.getUntrackedParameter<std::string>("channelStatusFile","");
418 
419  if ( producedEcalChannelStatus_ ) {
420  if ( !channelStatusFile_.empty() ) { // if file provided read channel map
422  } else { // set all channels to working -- FIXME might be changed
424  }
425  findingRecord<EcalChannelStatusRcd>();
426  }
427  // DQM channel status
428  producedEcalDQMChannelStatus_ = ps.getUntrackedParameter<bool>("producedEcalDQMChannelStatus",true);
429  if ( producedEcalDQMChannelStatus_ ) {
431  findingRecord<EcalDQMChannelStatusRcd>();
432  }
433  // DCS Tower status
434  producedEcalDCSTowerStatus_ = ps.getUntrackedParameter<bool>("producedEcalDCSTowerStatus",true);
435  if ( producedEcalDCSTowerStatus_ ) {
437  findingRecord<EcalDCSTowerStatusRcd>();
438  }
439  // DAQ Tower status
440  producedEcalDAQTowerStatus_ = ps.getUntrackedParameter<bool>("producedEcalDAQTowerStatus",true);
441  if ( producedEcalDAQTowerStatus_ ) {
443  findingRecord<EcalDAQTowerStatusRcd>();
444  }
445  // DQM Tower status
446  producedEcalDQMTowerStatus_ = ps.getUntrackedParameter<bool>("producedEcalDQMTowerStatus",true);
447  if ( producedEcalDQMTowerStatus_ ) {
449  findingRecord<EcalDQMTowerStatusRcd>();
450  }
451 
452  // trigger channel status
453  producedEcalTrgChannelStatus_ = ps.getUntrackedParameter<bool>("producedEcalTrgChannelStatus",true);
454  trgChannelStatusFile_ = ps.getUntrackedParameter<std::string>("trgChannelStatusFile","");
455 
456  if ( producedEcalTrgChannelStatus_ ) {
457  if ( !trgChannelStatusFile_.empty() ) { // if file provided read channel map
459  } else { // set all channels to working -- FIXME might be changed
461  }
462  findingRecord<EcalTPGCrystalStatusRcd>();
463  }
464 
465  // Alignment
466  producedEcalAlignmentEB_ = ps.getUntrackedParameter<bool>("producedEcalAlignmentEB",true);
467  if ( producedEcalAlignmentEB_ ) {
469  findingRecord<EBAlignmentRcd>();
470  }
471  producedEcalAlignmentEE_ = ps.getUntrackedParameter<bool>("producedEcalAlignmentEE",true);
472  if ( producedEcalAlignmentEE_ ) {
474  findingRecord<EEAlignmentRcd>();
475  }
476  producedEcalAlignmentES_ = ps.getUntrackedParameter<bool>("producedEcalAlignmentES",true);
477  if ( producedEcalAlignmentES_ ) {
479  findingRecord<ESAlignmentRcd>();
480  }
481  //Tell Finder what records we find
482  if (producedEcalPedestals_) findingRecord<EcalPedestalsRcd>();
483 
484  if (producedEcalWeights_) {
485  findingRecord<EcalWeightXtalGroupsRcd>();
486  findingRecord<EcalTBWeightsRcd>();
487  }
488 
489  if (producedEcalGainRatios_) findingRecord<EcalGainRatiosRcd>();
490 
491  if (producedEcalADCToGeVConstant_) findingRecord<EcalADCToGeVConstantRcd>();
492 
493  producedEcalSampleMask_ = ps.getUntrackedParameter<bool>("producedEcalSampleMask",true);
494  if (producedEcalSampleMask_) {
496  findingRecord<EcalSampleMaskRcd>();
497  }
498  producedEcalTimeBiasCorrections_ = ps.getUntrackedParameter<bool>("producedEcalTimeBiasCorrections", false);
499  if (producedEcalTimeBiasCorrections_) {
501  findingRecord<EcalTimeBiasCorrectionsRcd>();
502  }
503  producedEcalSamplesCorrelation_ = ps.getUntrackedParameter<bool>("producedEcalSamplesCorrelation", false);
504  if (producedEcalSamplesCorrelation_) {
506  findingRecord<EcalSamplesCorrelationRcd>();
507  getSamplesCorrelationFromFile_ = ps.getUntrackedParameter<bool>("getSamplesCorrelationFromFile",false);
508  if(getSamplesCorrelationFromFile_) {
509  SamplesCorrelationFile_ = ps.getUntrackedParameter<std::string>("SamplesCorrelationFile","EcalSamplesCorrelation.txt");
510  }
511  }
512 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
virtual std::unique_ptr< EcalDQMChannelStatus > produceEcalDQMChannelStatus(const EcalDQMChannelStatusRcd &)
virtual std::unique_ptr< EcalIntercalibConstants > produceEcalIntercalibConstants(const EcalIntercalibConstantsRcd &)
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeightsAft_
virtual std::unique_ptr< EcalIntercalibErrors > produceEcalIntercalibErrors(const EcalIntercalibErrorsRcd &)
virtual std::unique_ptr< EcalLaserAPDPNRatiosRef > produceEcalLaserAPDPNRatiosRef(const EcalLaserAPDPNRatiosRefRcd &)
virtual std::unique_ptr< EcalSamplesCorrelation > produceEcalSamplesCorrelation(const EcalSamplesCorrelationRcd &)
std::vector< double > energyCorrectionObjectSpecificParameters_
virtual std::unique_ptr< EcalTimeCalibConstants > produceEcalTimeCalibConstants(const EcalTimeCalibConstantsRcd &)
virtual std::unique_ptr< EcalMappingElectronics > getMappingFromConfiguration(const EcalMappingElectronicsRcd &)
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > pedWeightsAft_
virtual std::unique_ptr< EcalADCToGeVConstant > produceEcalADCToGeVConstant(const EcalADCToGeVConstantRcd &)
virtual std::unique_ptr< EcalWeightXtalGroups > produceEcalWeightXtalGroups(const EcalWeightXtalGroupsRcd &)
virtual std::unique_ptr< EcalChannelStatus > produceEcalChannelStatus(const EcalChannelStatusRcd &)
void getWeightsFromConfiguration(const edm::ParameterSet &ps)
virtual std::unique_ptr< EcalLaserAlphas > produceEcalLaserAlphas(const EcalLaserAlphasRcd &)
virtual std::unique_ptr< EcalClusterEnergyUncertaintyParameters > produceEcalClusterEnergyUncertaintyParameters(const EcalClusterEnergyUncertaintyParametersRcd &)
virtual std::unique_ptr< Alignments > produceEcalAlignmentEB(const EBAlignmentRcd &)
virtual std::unique_ptr< EcalClusterEnergyCorrectionParameters > produceEcalClusterEnergyCorrectionParameters(const EcalClusterEnergyCorrectionParametersRcd &)
virtual std::unique_ptr< EcalIntercalibConstantsMC > getIntercalibConstantsMCFromConfiguration(const EcalIntercalibConstantsMCRcd &)
virtual std::unique_ptr< EcalDQMTowerStatus > produceEcalDQMTowerStatus(const EcalDQMTowerStatusRcd &)
virtual std::unique_ptr< Alignments > produceEcalAlignmentEE(const EEAlignmentRcd &)
virtual std::unique_ptr< EcalLinearCorrections > produceEcalLinearCorrections(const EcalLinearCorrectionsRcd &)
virtual std::unique_ptr< EcalMappingElectronics > produceEcalMappingElectronics(const EcalMappingElectronicsRcd &)
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > pedWeights_
virtual std::unique_ptr< EcalLaserAPDPNRatios > produceEcalLaserAPDPNRatios(const EcalLaserAPDPNRatiosRcd &)
virtual std::unique_ptr< EcalChannelStatus > getChannelStatusFromConfiguration(const EcalChannelStatusRcd &)
virtual std::unique_ptr< EcalTimeBiasCorrections > produceEcalTimeBiasCorrections(const EcalTimeBiasCorrectionsRcd &)
virtual std::unique_ptr< EcalIntercalibConstants > getIntercalibConstantsFromConfiguration(const EcalIntercalibConstantsRcd &)
virtual std::unique_ptr< EcalIntercalibConstantsMC > produceEcalIntercalibConstantsMC(const EcalIntercalibConstantsMCRcd &)
virtual std::unique_ptr< Alignments > produceEcalAlignmentES(const ESAlignmentRcd &)
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > amplWeights_
std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2MatrixAft_
virtual std::unique_ptr< EcalPedestals > produceEcalPedestals(const EcalPedestalsRcd &)
virtual std::unique_ptr< EcalClusterEnergyCorrectionObjectSpecificParameters > produceEcalClusterEnergyCorrectionObjectSpecificParameters(const EcalClusterEnergyCorrectionObjectSpecificParametersRcd &)
virtual std::unique_ptr< EcalDCSTowerStatus > produceEcalDCSTowerStatus(const EcalDCSTowerStatusRcd &)
virtual std::unique_ptr< EcalClusterLocalContCorrParameters > produceEcalClusterLocalContCorrParameters(const EcalClusterLocalContCorrParametersRcd &)
virtual std::unique_ptr< EcalTimeCalibErrors > getTimeCalibErrorsFromConfiguration(const EcalTimeCalibErrorsRcd &)
virtual std::unique_ptr< EcalGainRatios > produceEcalGainRatios(const EcalGainRatiosRcd &)
virtual std::unique_ptr< EcalTPGCrystalStatus > produceEcalTrgChannelStatus(const EcalTPGCrystalStatusRcd &)
virtual std::unique_ptr< EcalTimeCalibErrors > produceEcalTimeCalibErrors(const EcalTimeCalibErrorsRcd &)
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > amplWeightsAft_
virtual std::unique_ptr< EcalTBWeights > produceEcalTBWeights(const EcalTBWeightsRcd &)
virtual std::unique_ptr< EcalTimeOffsetConstant > produceEcalTimeOffsetConstant(const EcalTimeOffsetConstantRcd &)
virtual std::unique_ptr< EcalPFRecHitThresholds > getPFRecHitThresholdsFromConfiguration(const EcalPFRecHitThresholdsRcd &)
virtual std::unique_ptr< EcalTimeCalibConstants > getTimeCalibConstantsFromConfiguration(const EcalTimeCalibConstantsRcd &)
virtual std::unique_ptr< EcalTPGCrystalStatus > getTrgChannelStatusFromConfiguration(const EcalTPGCrystalStatusRcd &)
virtual std::unique_ptr< EcalPFRecHitThresholds > produceEcalPFRecHitThresholds(const EcalPFRecHitThresholdsRcd &)
virtual std::unique_ptr< EcalSampleMask > produceEcalSampleMask(const EcalSampleMaskRcd &)
virtual std::unique_ptr< EcalIntercalibErrors > getIntercalibErrorsFromConfiguration(const EcalIntercalibErrorsRcd &)
#define str(s)
virtual std::unique_ptr< EcalDAQTowerStatus > produceEcalDAQTowerStatus(const EcalDAQTowerStatusRcd &)
virtual std::unique_ptr< EcalSimPulseShape > getEcalSimPulseShapeFromConfiguration(const EcalSimPulseShapeRcd &)
std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix_
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeights_
virtual std::unique_ptr< EcalClusterCrackCorrParameters > produceEcalClusterCrackCorrParameters(const EcalClusterCrackCorrParametersRcd &)
EcalTrivialConditionRetriever::~EcalTrivialConditionRetriever ( )
override

Definition at line 514 of file EcalTrivialConditionRetriever.cc.

515 {
516 }
EcalTrivialConditionRetriever::EcalTrivialConditionRetriever ( const EcalTrivialConditionRetriever )
privatedelete

Member Function Documentation

std::unique_ptr< EcalChannelStatus > EcalTrivialConditionRetriever::getChannelStatusFromConfiguration ( const EcalChannelStatusRcd )
virtual

Definition at line 2332 of file EcalTrivialConditionRetriever.cc.

References Exception, edm::FileInPath::fullPath(), EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, mps_update::status, str, AlCaHLTBitMon_QueryRunRegistry::string, EBDetId::unhashIndex(), EEDetId::unhashIndex(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

2333 {
2334  auto ecalStatus = std::make_unique<EcalChannelStatus>();
2335 
2336 
2337  // start by setting all statuses to 0
2338 
2339  // barrel
2340  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
2341  if(ieta==0) continue;
2342  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
2343  if (EBDetId::validDetId(ieta,iphi)) {
2344  EBDetId ebid(ieta,iphi);
2345  ecalStatus->setValue( ebid, 0 );
2346  }
2347  }
2348  }
2349  // endcap
2350  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
2351  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
2352  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
2353  if (EEDetId::validDetId(iX,iY,1)) {
2354  EEDetId eedetidpos(iX,iY,1);
2355  ecalStatus->setValue( eedetidpos, 0 );
2356  }
2357  if (EEDetId::validDetId(iX,iY,-1)) {
2358  EEDetId eedetidneg(iX,iY,-1);
2359  ecalStatus->setValue( eedetidneg, 0 );
2360  }
2361  }
2362  }
2363 
2364 
2365 
2366  // overwrite the statuses which are in the file
2367 
2368  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading channel statuses from file " << edm::FileInPath(channelStatusFile_).fullPath().c_str() ;
2369  std::ifstream statusFile(edm::FileInPath(channelStatusFile_).fullPath().c_str());
2370  if ( !statusFile.good() ) {
2371  edm::LogError ("EcalTrivialConditionRetriever")
2372  << "*** Problems opening file: " << channelStatusFile_ ;
2373  throw cms::Exception ("Cannot open ECAL channel status file") ;
2374  }
2375 
2376  std::string EcalSubDet;
2377  std::string str;
2378  int hashIndex(0);
2379  int status(0);
2380 
2381  while (!statusFile.eof())
2382  {
2383  statusFile >> EcalSubDet;
2384  if (EcalSubDet!=std::string("EB") && EcalSubDet!=std::string("EE"))
2385  {
2386  std::getline(statusFile,str);
2387  continue;
2388  }
2389  else
2390  {
2391  statusFile>> hashIndex >> status;
2392  }
2393  // std::cout << EcalSubDet << " " << hashIndex << " " << status;
2394 
2395  if(EcalSubDet==std::string("EB"))
2396  {
2397  EBDetId ebid = EBDetId::unhashIndex(hashIndex);
2398  ecalStatus->setValue( ebid, status );
2399  }
2400  else if(EcalSubDet==std::string("EE"))
2401  {
2402  EEDetId eedetid = EEDetId::unhashIndex(hashIndex);
2403  ecalStatus->setValue( eedetid, status );
2404  }
2405  else
2406  {
2407  edm::LogError ("EcalTrivialConditionRetriever")
2408  << " *** " << EcalSubDet << " is neither EB nor EE ";
2409  }
2410 
2411  }
2412  // the file is supposed to be in the form -- FIXME
2413 
2414 
2415  statusFile.close();
2416  return ecalStatus;
2417 }
static const int MIN_IPHI
Definition: EBDetId.h:135
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:65
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:110
std::string fullPath() const
Definition: FileInPath.cc:163
static const int IY_MAX
Definition: EEDetId.h:302
#define str(s)
std::unique_ptr< EcalSimPulseShape > EcalTrivialConditionRetriever::getEcalSimPulseShapeFromConfiguration ( const EcalSimPulseShapeRcd )
virtual

Definition at line 3729 of file EcalTrivialConditionRetriever.cc.

References popcon2dropbox::copy(), and mps_fire::result.

Referenced by EcalTrivialConditionRetriever(), and produceEcalSamplesCorrelation().

3730 {
3731  auto result = std::make_unique<EcalSimPulseShape>();
3732 
3733  // save time interval to be used for the pulse shape
3734  result->time_interval = sim_pulse_shape_TI_;
3735 
3736  // containers to store the shape info
3737  std::vector<double> EBshape;
3738  std::vector<double> EEshape;
3739  std::vector<double> APDshape;
3740 
3741  // --- get the 3 shapes from the user provided txt files
3742  if (!EBSimPulseShapeFile_.empty() )
3743  {
3744  std::ifstream shapeEBFile;
3745  shapeEBFile.open(EBSimPulseShapeFile_.c_str());
3746  double ww;
3747  while (shapeEBFile >> ww) EBshape.push_back(ww);
3748  shapeEBFile.close();
3749  }
3750  if (!EESimPulseShapeFile_.empty() )
3751  {
3752  std::ifstream shapeEEFile;
3753  shapeEEFile.open(EESimPulseShapeFile_.c_str());
3754  double ww;
3755  while (shapeEEFile >> ww) EEshape.push_back(ww);
3756  shapeEEFile.close();
3757  }
3758  if (!APDSimPulseShapeFile_.empty()) {
3759  std::ifstream shapeAPDFile;
3760  shapeAPDFile.open(APDSimPulseShapeFile_.c_str());
3761  double ww;
3762  while (shapeAPDFile >> ww) APDshape.push_back(ww);
3763  shapeAPDFile.close();
3764  }
3765 
3766  // --- save threshold
3767  result->barrel_thresh = sim_pulse_shape_EB_thresh_;
3768  result->endcap_thresh = sim_pulse_shape_EE_thresh_;
3769  result->apd_thresh = sim_pulse_shape_APD_thresh_;
3770 
3771  // --- copy
3772  copy(EBshape.begin(), EBshape.end(),
3773  back_inserter(result->barrel_shape));
3774  copy(EEshape.begin(), EEshape.end(),
3775  back_inserter(result->endcap_shape));
3776  copy(APDshape.begin(), APDshape.end(),
3777  back_inserter(result->apd_shape));
3778 
3779  return result;
3780 }
def copy(args, dbName)
std::unique_ptr< EcalIntercalibConstants > EcalTrivialConditionRetriever::getIntercalibConstantsFromConfiguration ( const EcalIntercalibConstantsRcd )
virtual

Definition at line 2744 of file EcalTrivialConditionRetriever.cc.

References EBDetId::approxEta(), EnergyResolutionVsLumi::calcresolutitonConstantTerm(), particleFlowCaloResolution_cfi::constantTerm, EcalCondObjectContainer< T >::end(), PVValHelper::eta, Exception, EcalCondObjectContainer< T >::find(), EcalCondObjectContainer< T >::getMap(), getPFRecHitThresholdsFromConfiguration(), h, mps_fire::i, cuy::ii, EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, mps_splice::line, cmsBatch::log, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MAX_SM, EBDetId::MIN_IPHI, EBDetId::MIN_SM, alignCSCRings::r, DetId::rawId(), EcalFloatCondObjectContainerXMLTranslator::readXML(), EnergyResolutionVsLumi::setInstLumi(), EnergyResolutionVsLumi::setLumi(), EcalCondObjectContainer< T >::setValue(), EBDetId::SMCRYSTALMODE, mathSSE::sqrt(), str, AlCaHLTBitMon_QueryRunRegistry::string, funct::tan(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever(), and produceEcalTrgChannelStatus().

2745 {
2746  std::unique_ptr<EcalIntercalibConstants> ical;
2747  // std::make_unique<EcalIntercalibConstants>();
2748 
2749  // Read the values from a txt file
2750  // -------------------------------
2751 
2752  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading intercalibration constants from file "
2753  << intercalibConstantsFile_.c_str() ;
2754 
2755  if(intercalibConstantsFile_.find(".xml")!= std::string::npos) {
2756 
2757  edm::LogInfo("generating Intercalib from xml file");
2758 
2759  EcalCondHeader h;
2762 
2763 
2764  if(totLumi_ !=0 || instLumi_!=0) {
2765  edm::LogInfo("implementing ageing for intercalib");
2766 
2768 
2769  if(intercalibConstantsMCFile_.find(".xml")!= std::string::npos) {
2770 
2771  edm::LogInfo("generating IntercalibMC from xml file");
2772 
2773  EcalCondHeader h;
2775 
2776  } else {
2777  edm::LogInfo("please provide the xml file of the EcalIntercalibConstantsMC");
2778  }
2779 
2780 
2781  TRandom3 * gRandom = new TRandom3();
2782 
2783  EnergyResolutionVsLumi ageing;
2784  ageing.setLumi(totLumi_);
2785  ageing.setInstLumi(instLumi_);
2786 
2787 
2788  const EcalIntercalibConstantMap& mymap= rcd->getMap();
2789  const EcalIntercalibConstantMCMap& mymapMC= rcdMC->getMap();
2790 
2791  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
2792  if(ieta==0) continue;
2793 
2794  double eta=EBDetId::approxEta(EBDetId(ieta,1));
2795  eta = fabs(eta);
2796  double constantTerm= ageing.calcresolutitonConstantTerm(eta);
2797  edm::LogInfo("EB at eta=")<<eta<<" constant term is "<<constantTerm;
2798 
2799  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
2800  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
2801  if (EBDetId::validDetId(ieta,iphi))
2802  {
2803  EBDetId ebid(ieta,iphi);
2805  EcalIntercalibConstant icalconstant=1;
2806  if(idref!=mymap.end())icalconstant=(*idref);
2807 
2808  EcalIntercalibConstantsMC::const_iterator idrefMC=mymapMC.find(ebid);
2809  EcalIntercalibConstantMC icalconstantMC=1;
2810  if(idrefMC!=mymapMC.end())icalconstantMC=(*idrefMC);
2811 
2812  double r = gRandom->Gaus(0,constantTerm);
2813 
2814  if(iphi==10) edm::LogInfo ("EB at eta=")<<eta<<" IC="<<icalconstant<<" ICMC="<<icalconstantMC<<" smear="<<r<<" ";
2815 
2816  icalconstant = icalconstant + r*1.29*icalconstantMC;
2817  rcd->setValue( ebid.rawId(), icalconstant );
2818 
2819  if(iphi==10) edm::LogInfo("newIC=")<<icalconstant;
2820 
2821  EcalIntercalibConstant icalconstant2=(*idref);
2822  if(icalconstant !=icalconstant2) edm::LogInfo(">>>> error in smearing intercalib");
2823  }
2824  }
2825  }
2826 
2827  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
2828  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
2829  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
2830  if (EEDetId::validDetId(iX,iY,1))
2831  {
2832 
2833  EEDetId eedetidpos(iX,iY,1);
2834  double eta= -log(tan(0.5*atan(sqrt((iX-50.0)*(iX-50.0)+(iY-50.0)*(iY-50.0))*2.98/328.)));
2835  eta = fabs(eta);
2836  double constantTerm=ageing.calcresolutitonConstantTerm(eta);
2837  if(iX==50) edm::LogInfo ("EE at eta=")<<eta<<" constant term is "<<constantTerm;
2838 
2839 
2840 
2841 
2842  EcalIntercalibConstants::const_iterator idref=mymap.find(eedetidpos);
2843  EcalIntercalibConstant icalconstant=1;
2844  if(idref!=mymap.end())icalconstant=(*idref);
2845 
2846  EcalIntercalibConstantsMC::const_iterator idrefMC=mymapMC.find(eedetidpos);
2847  EcalIntercalibConstantMC icalconstantMC=1;
2848  if(idrefMC!=mymapMC.end())icalconstantMC=(*idrefMC);
2849 
2850  double r = gRandom->Gaus(0,constantTerm);
2851 
2852  if(iX==10) edm::LogInfo("EE at eta=")<<eta<<" IC="<<icalconstant<<" ICMC="<<icalconstantMC<<" smear="<<r<<" ";
2853  icalconstant = icalconstant + r*1.29*icalconstantMC;
2854  rcd->setValue( eedetidpos.rawId(), icalconstant );
2855  if(iX==10) edm::LogInfo("newIC=")<<icalconstant;
2856 
2857 
2858 
2859  }
2860  if(EEDetId::validDetId(iX,iY,-1))
2861  {
2862 
2863  EEDetId eedetidneg(iX,iY,-1);
2864  double eta= -log(tan(0.5*atan(sqrt((iX-50.0)*(iX-50.0)+(iY-50.0)*(iY-50.0))*2.98/328.)));
2865  eta = fabs(eta);
2866  double constantTerm=ageing.calcresolutitonConstantTerm(eta);
2867  EcalIntercalibConstant icalconstant=1;
2868 
2869 
2870  EcalIntercalibConstantsMC::const_iterator idrefMC=mymapMC.find(eedetidneg);
2871  EcalIntercalibConstantMC icalconstantMC=1;
2872  if(idrefMC!=mymapMC.end())icalconstantMC=(*idrefMC);
2873 
2874  double r = gRandom->Gaus(0,constantTerm);
2875  icalconstant = icalconstant + r*1.29*icalconstantMC;
2876  rcd->setValue( eedetidneg.rawId(), icalconstant );
2877 
2878 
2879  }
2880  }
2881  }
2882 
2883  ical = std::unique_ptr<EcalIntercalibConstants>(rcd);
2884 
2885  delete gRandom;
2886 
2887  }
2888 
2889 
2890  } else {
2891 
2892  ical = std::make_unique<EcalIntercalibConstants>();
2893 
2894  FILE *inpFile ;
2895  inpFile = fopen (intercalibConstantsFile_.c_str (),"r") ;
2896  if (!inpFile)
2897  {
2898  edm::LogError ("EcalTrivialConditionRetriever")
2899  << "*** Can not open file: " << intercalibConstantsFile_ ;
2900  throw cms::Exception ("Cannot open inter-calibration coefficients txt file") ;
2901  }
2902 
2903  char line[256] ;
2904  std::ostringstream str ;
2905  fgets (line,255,inpFile) ;
2906  int sm_number=atoi (line) ;
2907  str << "sm: " << sm_number ;
2908 
2909  fgets (line,255,inpFile) ;
2910  //int nevents=atoi (line) ; // not necessary here just for online conddb
2911 
2912  fgets (line,255,inpFile) ;
2913  std::string gen_tag = line ;
2914  str << "gen tag: " << gen_tag ; // should I use this?
2915 
2916  fgets (line,255,inpFile) ;
2917  std::string cali_method = line ;
2918  str << "cali method: " << cali_method << std::endl ; // not important
2919 
2920  fgets (line,255,inpFile) ;
2921  std::string cali_version = line ;
2922  str << "cali version: " << cali_version << std::endl ; // not important
2923 
2924  fgets (line,255,inpFile) ;
2925  std::string cali_type = line ;
2926  str << "cali type: " << cali_type ; // not important
2927 
2928  edm::LogInfo("EcalTrivialConditionRetriever")
2929  << "[PIETRO] Intercalibration file - "
2930  << str.str ();
2931 
2932  float calib[1700]={1} ;
2933  int calib_status[1700]={0} ;
2934 
2935  int ii = 0 ;
2936 
2937  while (fgets (line,255,inpFile))
2938  {
2939  ii++;
2940  int dmy_num = 0 ;
2941  float dmy_calib = 0. ;
2942  float dmy_RMS = 0. ;
2943  int dmy_events = 0 ;
2944  int dmy_status = 0 ;
2945  sscanf (line, "%d %f %f %d %d", &dmy_num, &dmy_calib,
2946  &dmy_RMS, &dmy_events,
2947  &dmy_status) ;
2948  assert (dmy_num >= 1) ;
2949  assert (dmy_num <= 1700) ;
2950  calib[dmy_num-1] = dmy_calib ;
2951  calib_status[dmy_num-1] = dmy_status ;
2952 
2953  // edm::LogInfo ("EcalTrivialConditionRetriever")
2954  // << "[PIETRO] cry = " << dmy_num
2955  // << " calib = " << calib[dmy_num-1]
2956  // << " RMS = " << dmy_RMS
2957  // << " events = " << dmy_events
2958  // << " status = " << calib_status[dmy_num-1]
2959  // << std::endl ;
2960  }
2961 
2962  fclose (inpFile) ; // close inp. file
2963  edm::LogInfo ("EcalTrivialConditionRetriever") << "Read intercalibrations for " << ii << " xtals " ;
2964  if (ii!=1700) edm::LogWarning ("StoreEcalCondition")
2965  << "Some crystals missing, set to 1" << std::endl ;
2966 
2967  // Transfer the data to the inter-calibration coefficients container
2968  // -----------------------------------------------------------------
2969 
2970  // DB supermodule always set to 1 for the TestBeam FIXME
2971  int sm_db=1 ;
2972  // loop over channels
2973  for (int i=0 ; i<1700 ; i++)
2974  {
2975  //if (EBDetId::validDetId(iEta,iPhi)) {
2976  // CANNOT be used -- validDetId only checks ETA PHI method
2977  // doing a check by hand, here is the only place in CMSSW
2978  // outside TB code and EcalRawToDigi where needed
2979  // => no need for changing the DetId interface
2980  //
2981  // checking only sm_db -- guess can change with the above FIXME
2982  if (sm_db >= EBDetId::MIN_SM && sm_db <= EBDetId::MAX_SM) {
2983  EBDetId ebid (sm_db,i+1,EBDetId::SMCRYSTALMODE) ;
2984  if (calib_status[i]) ical->setValue (ebid.rawId (), calib[i]) ;
2985  else ical->setValue (ebid.rawId (), 1.) ;
2986  }
2987  //}
2988  } // loop over channels
2989 
2990 
2991 
2992 
2993  }
2994 
2995  return ical;
2996 
2997 
2998 }
float approxEta() const
Definition: EBDetId.h:102
EcalIntercalibConstantMCMap EcalIntercalibConstantsMC
static const int MIN_IPHI
Definition: EBDetId.h:135
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
const self & getMap() const
double calcresolutitonConstantTerm(double eta)
static const int IX_MIN
Definition: EEDetId.h:290
static int readXML(const std::string &filename, EcalCondHeader &header, EcalFloatCondObjectContainer &record)
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
static const int MIN_SM
Definition: EBDetId.h:145
void setValue(const uint32_t id, const Item &item)
T sqrt(T t)
Definition: SSEVec.h:18
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
ii
Definition: cuy.py:590
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
std::vector< Item >::const_iterator const_iterator
static const int MAX_IETA
Definition: EBDetId.h:136
EcalIntercalibConstantMap EcalIntercalibConstants
const_iterator find(uint32_t rawId) const
static const int MAX_SM
Definition: EBDetId.h:146
static const int IY_MAX
Definition: EEDetId.h:302
const_iterator end() const
float EcalIntercalibConstantMC
static const int SMCRYSTALMODE
Definition: EBDetId.h:159
#define str(s)
float EcalIntercalibConstant
std::unique_ptr< EcalIntercalibConstantsMC > EcalTrivialConditionRetriever::getIntercalibConstantsMCFromConfiguration ( const EcalIntercalibConstantsMCRcd )
virtual

Definition at line 3094 of file EcalTrivialConditionRetriever.cc.

References getIntercalibErrorsFromConfiguration(), h, and EcalFloatCondObjectContainerXMLTranslator::readXML().

Referenced by EcalTrivialConditionRetriever(), and getPFRecHitThresholdsFromConfiguration().

3095 {
3096  std::unique_ptr<EcalIntercalibConstantsMC> ical;
3097  // std::make_unique<EcalIntercalibConstants>();
3098 
3099  // Read the values from a xml file
3100  // -------------------------------
3101 
3102  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading intercalibration constants MC from file "
3103  << intercalibConstantsMCFile_.c_str() ;
3104 
3105  if(intercalibConstantsMCFile_.find(".xml")!= std::string::npos) {
3106 
3107  edm::LogInfo ("generating Intercalib MC from xml file");
3108 
3109  EcalCondHeader h;
3112 
3113  ical = std::unique_ptr<EcalIntercalibConstants>(rcd);
3114 
3115  } else {
3116 
3117  edm::LogInfo ("ERROR>>> please provide a xml file");
3118  }
3119 
3120 
3121  return ical;
3122 
3123 }
EcalIntercalibConstantMCMap EcalIntercalibConstantsMC
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
static int readXML(const std::string &filename, EcalCondHeader &header, EcalFloatCondObjectContainer &record)
std::unique_ptr< EcalIntercalibErrors > EcalTrivialConditionRetriever::getIntercalibErrorsFromConfiguration ( const EcalIntercalibErrorsRcd )
virtual

Definition at line 3133 of file EcalTrivialConditionRetriever.cc.

References Exception, getTimeCalibConstantsFromConfiguration(), mps_fire::i, cuy::ii, mps_splice::line, EBDetId::MAX_SM, EBDetId::MIN_SM, DetId::rawId(), EBDetId::SMCRYSTALMODE, str, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by EcalTrivialConditionRetriever(), and getIntercalibConstantsMCFromConfiguration().

3134 {
3135  auto ical = std::make_unique<EcalIntercalibErrors>();
3136 
3137  // Read the values from a txt file
3138  // -------------------------------
3139 
3140  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading intercalibration constants from file "
3141  << intercalibErrorsFile_.c_str() ;
3142 
3143  FILE *inpFile ;
3144  inpFile = fopen (intercalibErrorsFile_.c_str (),"r") ;
3145  if (!inpFile)
3146  {
3147  edm::LogError ("EcalTrivialConditionRetriever")
3148  << "*** Can not open file: " << intercalibErrorsFile_ ;
3149  throw cms::Exception ("Cannot open inter-calibration coefficients txt file") ;
3150  }
3151 
3152  char line[256] ;
3153  std::ostringstream str ;
3154  fgets (line,255,inpFile) ;
3155  int sm_number=atoi (line) ;
3156  str << "sm: " << sm_number ;
3157 
3158  fgets (line,255,inpFile) ;
3159  //int nevents=atoi (line) ; // not necessary here just for online conddb
3160 
3161  fgets (line,255,inpFile) ;
3162  std::string gen_tag = line ;
3163  str << "gen tag: " << gen_tag ; // should I use this?
3164 
3165  fgets (line,255,inpFile) ;
3166  std::string cali_method = line ;
3167  str << "cali method: " << cali_method << std::endl ; // not important
3168 
3169  fgets (line,255,inpFile) ;
3170  std::string cali_version = line ;
3171  str << "cali version: " << cali_version << std::endl ; // not important
3172 
3173  fgets (line,255,inpFile) ;
3174  std::string cali_type = line ;
3175  str << "cali type: " << cali_type ; // not important
3176 
3177  edm::LogInfo("EcalTrivialConditionRetriever")
3178  << "[PIETRO] Intercalibration file - "
3179  << str.str () << std::endl ;
3180 
3181  float calib[1700]={1} ;
3182  int calib_status[1700]={0} ;
3183 
3184  int ii = 0 ;
3185 
3186  while (fgets (line,255,inpFile))
3187  {
3188  ii++;
3189  int dmy_num = 0 ;
3190  float dmy_calib = 0. ;
3191  float dmy_RMS = 0. ;
3192  int dmy_events = 0 ;
3193  int dmy_status = 0 ;
3194  sscanf (line, "%d %f %f %d %d", &dmy_num, &dmy_calib,
3195  &dmy_RMS, &dmy_events,
3196  &dmy_status) ;
3197  assert (dmy_num >= 1) ;
3198  assert (dmy_num <= 1700) ;
3199  calib[dmy_num-1] = dmy_calib ;
3200  calib_status[dmy_num-1] = dmy_status ;
3201 
3202 // edm::LogInfo ("EcalTrivialConditionRetriever")
3203 // << "[PIETRO] cry = " << dmy_num
3204 // << " calib = " << calib[dmy_num-1]
3205 // << " RMS = " << dmy_RMS
3206 // << " events = " << dmy_events
3207 // << " status = " << calib_status[dmy_num-1]
3208 // << std::endl ;
3209  }
3210 
3211  fclose (inpFile) ; // close inp. file
3212  edm::LogInfo ("EcalTrivialConditionRetriever") << "Read intercalibrations for " << ii << " xtals " ;
3213  if (ii!=1700) edm::LogWarning ("StoreEcalCondition")
3214  << "Some crystals missing, set to 1" << std::endl ;
3215 
3216  // Transfer the data to the inter-calibration coefficients container
3217  // -----------------------------------------------------------------
3218 
3219  // DB supermodule always set to 1 for the TestBeam FIXME
3220  int sm_db=1 ;
3221  // loop over channels
3222  for (int i=0 ; i<1700 ; i++)
3223  {
3224  //if (EBDetId::validDetId(iEta,iPhi)) {
3225  // CANNOT be used -- validDetId only checks ETA PHI method
3226  // doing a check by hand, here is the only place in CMSSW
3227  // outside TB code and EcalRawToDigi where needed
3228  // => no need for changing the DetId interface
3229  //
3230  // checking only sm_db -- guess can change with the above FIXME
3231  if (sm_db >= EBDetId::MIN_SM && sm_db <= EBDetId::MAX_SM) {
3232  EBDetId ebid (sm_db,i+1,EBDetId::SMCRYSTALMODE) ;
3233  if (calib_status[i]) ical->setValue (ebid.rawId (), calib[i]) ;
3234  else ical->setValue (ebid.rawId (), 1.) ;
3235  }
3236  //}
3237  } // loop over channels
3238 
3239 // edm::LogInfo ("EcalTrivialConditionRetriever") << "INTERCALIBRATION DONE" ;
3240  return ical;
3241 
3242 
3243 
3244 
3245 
3246 }
static const int MIN_SM
Definition: EBDetId.h:145
ii
Definition: cuy.py:590
static const int MAX_SM
Definition: EBDetId.h:146
static const int SMCRYSTALMODE
Definition: EBDetId.h:159
#define str(s)
std::unique_ptr< EcalMappingElectronics > EcalTrivialConditionRetriever::getMappingFromConfiguration ( const EcalMappingElectronicsRcd )
virtual

Definition at line 3479 of file EcalTrivialConditionRetriever.cc.

References EcalMappingElement::electronicsid, Exception, f, edm::FileInPath::fullPath(), taus_updatedMVAIds_cff::mapping, EcalTriggerElectronicsId::rawId(), EcalElectronicsId::rawId(), EcalMappingElement::triggerid, and EEDetId::XYMODE.

Referenced by EcalTrivialConditionRetriever().

3480 {
3481  auto mapping = std::make_unique<EcalMappingElectronics>();
3482  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading mapping from file " << edm::FileInPath(mappingFile_).fullPath().c_str() ;
3483 
3484  std::ifstream f(edm::FileInPath(mappingFile_).fullPath().c_str());
3485  if (!f.good())
3486  {
3487  edm::LogError("EcalTrivialConditionRetriever") << "File not found";
3488  throw cms::Exception("FileNotFound");
3489  }
3490 
3491  // uint32_t detid, elecid, triggerid;
3492 
3493  int ix, iy, iz, CL;
3494  // int dccid, towerid, stripid, xtalid;
3495  // int tccid, tower, ipseudostrip, xtalinps;
3496  int dccid, towerid, pseudostrip_in_SC, xtal_in_pseudostrip;
3497  int tccid, tower, pseudostrip_in_TCC, pseudostrip_in_TT;
3498 
3499  while ( ! f.eof())
3500  {
3501  // f >> detid >> elecid >> triggerid;
3502  f >> ix >> iy >> iz >> CL >> dccid >> towerid >> pseudostrip_in_SC >> xtal_in_pseudostrip >> tccid >> tower >>
3503  pseudostrip_in_TCC >> pseudostrip_in_TT ;
3504 
3505 // if (!EEDetId::validDetId(ix,iy,iz))
3506 // continue;
3507 
3508  EEDetId detid(ix,iy,iz,EEDetId::XYMODE);
3509  // std::cout << " dcc tower ps_in_SC xtal_in_ps " << dccid << " " << towerid << " " << pseudostrip_in_SC << " " << xtal_in_pseudostrip << std::endl;
3510  EcalElectronicsId elecid(dccid,towerid, pseudostrip_in_SC, xtal_in_pseudostrip);
3511  // std::cout << " tcc tt ps_in_TT xtal_in_ps " << tccid << " " << tower << " " << pseudostrip_in_TT << " " << xtal_in_pseudostrip << std::endl;
3512  EcalTriggerElectronicsId triggerid(tccid, tower, pseudostrip_in_TT, xtal_in_pseudostrip);
3513  EcalMappingElement aElement;
3514  aElement.electronicsid = elecid.rawId();
3515  aElement.triggerid = triggerid.rawId();
3516  (*mapping).setValue(detid, aElement);
3517  }
3518 
3519  f.close();
3520  return mapping;
3521 }
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
static const int XYMODE
Definition: EEDetId.h:335
double f[11][100]
std::string fullPath() const
Definition: FileInPath.cc:163
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
std::unique_ptr< EcalPFRecHitThresholds > EcalTrivialConditionRetriever::getPFRecHitThresholdsFromConfiguration ( const EcalPFRecHitThresholdsRcd )
virtual

Definition at line 3007 of file EcalTrivialConditionRetriever.cc.

References TauDecayModes::dec, PVValHelper::eta, getIntercalibConstantsMCFromConfiguration(), mps_splice::line, cmsBatch::log, mathSSE::sqrt(), funct::tan(), and scrapingFilter_cfi::thresh.

Referenced by EcalTrivialConditionRetriever(), and getIntercalibConstantsFromConfiguration().

3008 {
3009  std::unique_ptr<EcalPFRecHitThresholds> ical;
3010 
3011  // Reads the values from a txt file
3012 
3013 
3014  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading PF RecHit Thresholds from file "
3015  << pfRecHitFile_.c_str() ;
3016 
3017  ical = std::make_unique<EcalPFRecHitThresholds>();
3018 
3019  char line[50];
3020 
3021  FILE *inpFile; // input file
3022  inpFile = fopen(pfRecHitFile_.c_str(),"r");
3023  int nxt=0;
3024 
3025  edm::LogInfo ("Going to multiply the sigmas by ")<<pfRecHitThresholdsNSigmas_;
3026  edm::LogInfo ("We will print some values ");
3027 
3028 
3029  while (fgets(line,50,inpFile)) {
3030  float thresh;
3031  int eta=0;
3032  int phi=0;
3033  int zeta=0;
3034  sscanf(line, "%d %d %d %f", &eta, &phi, &zeta, &thresh);
3035 
3036  thresh=thresh*pfRecHitThresholdsNSigmas_;
3037 
3038  if(phi==50) edm::LogInfo ("EB ")<< std::dec<<eta <<"/"<< std::dec<<phi <<"/"<<std::dec<<zeta<<" thresh: " <<thresh ;
3039  nxt=nxt+1;
3040 
3041  EBDetId ebid(eta, phi);
3042  ical->setValue( ebid, thresh );
3043  }
3044 
3045  fclose(inpFile);
3046 
3047  edm::LogInfo ("Read number of EB crystals: ")<<nxt;
3048 
3049 
3050  edm::LogInfo ("Now reading the EE file ... ");
3051  edm::LogInfo ("We will multiply the sigma in EE by ")<<pfRecHitThresholdsNSigmas_;
3052  edm::LogInfo ("We will multiply the sigma in EE at high eta by")<<pfRecHitThresholdsNSigmasHEta_;
3053  edm::LogInfo ("We will print some values ");
3054 
3055 
3056  FILE *inpFileEE; // input file
3057  inpFileEE = fopen(pfRecHitFileEE_.c_str(),"r");
3058  nxt=0;
3059 
3060  while (fgets(line,40,inpFileEE)) {
3061  float thresh;
3062  int ix=0;
3063  int iy=0;
3064  int iz=0;
3065  sscanf(line, "%d %d %d %f", &ix, &iy,&iz, &thresh);
3066 
3067  double eta= -log(tan(0.5*atan(sqrt((ix-50.5)*(ix-50.5)+
3068  (iy-50.5)*(iy-50.5))*2.98/328.))); // approx eta
3069 
3070  if(eta>2.5) {
3071  thresh=thresh*pfRecHitThresholdsNSigmasHEta_;
3072  } else {
3073  thresh=thresh*pfRecHitThresholdsNSigmas_;
3074  }
3075 
3076  if(ix==50) edm::LogInfo ("EE ")<<std::dec<<ix<<"/"<<std::dec<<iy<<"/"<<std::dec<<iz<<" thresh: " <<thresh <<" eta="<<eta;
3077 
3078  EEDetId eeid(ix,iy,iz);
3079  ical->setValue( eeid, thresh );
3080  nxt=nxt+1;
3081  }
3082 
3083  fclose(inpFileEE);
3084  edm::LogInfo ("Read number of EE crystals: ")<<nxt;
3085  edm::LogInfo ("end PF Rec Hits ... ");
3086 
3087  return ical;
3088 
3089 }
T sqrt(T t)
Definition: SSEVec.h:18
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
std::unique_ptr< EcalTimeCalibConstants > EcalTrivialConditionRetriever::getTimeCalibConstantsFromConfiguration ( const EcalTimeCalibConstantsRcd )
virtual

Definition at line 3253 of file EcalTrivialConditionRetriever.cc.

References Exception, getTimeCalibErrorsFromConfiguration(), mps_fire::i, cuy::ii, mps_splice::line, EBDetId::MAX_SM, EBDetId::MIN_SM, DetId::rawId(), EBDetId::SMCRYSTALMODE, str, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by EcalTrivialConditionRetriever(), and getIntercalibErrorsFromConfiguration().

3254 {
3255  auto ical = std::make_unique<EcalTimeCalibConstants>();
3256 
3257  // Read the values from a txt file
3258  // -------------------------------
3259 
3260  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading time calibration constants from file "
3261  << timeCalibConstantsFile_.c_str() ;
3262 
3263  FILE *inpFile ;
3264  inpFile = fopen (timeCalibConstantsFile_.c_str (),"r") ;
3265  if (!inpFile)
3266  {
3267  edm::LogError ("EcalTrivialConditionRetriever")
3268  << "*** Can not open file: " << timeCalibConstantsFile_ ;
3269  throw cms::Exception ("Cannot open inter-calibration coefficients txt file") ;
3270  }
3271 
3272  char line[256] ;
3273  std::ostringstream str ;
3274  fgets (line,255,inpFile) ;
3275  int sm_number=atoi (line) ;
3276  str << "sm: " << sm_number ;
3277 
3278  fgets (line,255,inpFile) ;
3279  //int nevents=atoi (line) ; // not necessary here just for online conddb
3280 
3281  fgets (line,255,inpFile) ;
3282  std::string gen_tag = line ;
3283  str << "gen tag: " << gen_tag ; // should I use this?
3284 
3285  fgets (line,255,inpFile) ;
3286  std::string cali_method = line ;
3287  str << "cali method: " << cali_method << std::endl ; // not important
3288 
3289  fgets (line,255,inpFile) ;
3290  std::string cali_version = line ;
3291  str << "cali version: " << cali_version << std::endl ; // not important
3292 
3293  fgets (line,255,inpFile) ;
3294  std::string cali_type = line ;
3295  str << "cali type: " << cali_type ; // not important
3296 
3297  edm::LogInfo("EcalTrivialConditionRetriever")
3298  << "TimeCalibration file - "
3299  << str.str () << std::endl ;
3300 
3301  float calib[1700]={1} ;
3302  int calib_status[1700]={0} ;
3303 
3304  int ii = 0 ;
3305 
3306  while (fgets (line,255,inpFile))
3307  {
3308  ii++;
3309  int dmy_num = 0 ;
3310  float dmy_calib = 0. ;
3311  float dmy_RMS = 0. ;
3312  int dmy_events = 0 ;
3313  int dmy_status = 0 ;
3314  sscanf (line, "%d %f %f %d %d", &dmy_num, &dmy_calib,
3315  &dmy_RMS, &dmy_events,
3316  &dmy_status) ;
3317  assert (dmy_num >= 1) ;
3318  assert (dmy_num <= 1700) ;
3319  calib[dmy_num-1] = dmy_calib ;
3320  calib_status[dmy_num-1] = dmy_status ;
3321 
3322 // edm::LogInfo ("EcalTrivialConditionRetriever")
3323 // << "[PIETRO] cry = " << dmy_num
3324 // << " calib = " << calib[dmy_num-1]
3325 // << " RMS = " << dmy_RMS
3326 // << " events = " << dmy_events
3327 // << " status = " << calib_status[dmy_num-1]
3328 // << std::endl ;
3329  }
3330 
3331  fclose (inpFile) ; // close inp. file
3332  edm::LogInfo ("EcalTrivialConditionRetriever") << "Read timeCalibrations for " << ii << " xtals " ;
3333  if (ii!=1700) edm::LogWarning ("StoreEcalCondition")
3334  << "Some crystals missing, set to 1" << std::endl ;
3335 
3336  // Transfer the data to the inter-calibration coefficients container
3337  // -----------------------------------------------------------------
3338 
3339  // DB supermodule always set to 1 for the TestBeam FIXME
3340  int sm_db=1 ;
3341  // loop over channels
3342  for (int i=0 ; i<1700 ; i++)
3343  {
3344  //if (EBDetId::validDetId(iEta,iPhi)) {
3345  // CANNOT be used -- validDetId only checks ETA PHI method
3346  // doing a check by hand, here is the only place in CMSSW
3347  // outside TB code and EcalRawToDigi where needed
3348  // => no need for changing the DetId interface
3349  //
3350  // checking only sm_db -- guess can change with the above FIXME
3351  if (sm_db >= EBDetId::MIN_SM && sm_db <= EBDetId::MAX_SM) {
3352  EBDetId ebid (sm_db,i+1,EBDetId::SMCRYSTALMODE) ;
3353  if (calib_status[i]) ical->setValue (ebid.rawId (), calib[i]) ;
3354  else ical->setValue (ebid.rawId (), 1.) ;
3355  }
3356  //}
3357  } // loop over channels
3358 
3359 // edm::LogInfo ("EcalTrivialConditionRetriever") << "INTERCALIBRATION DONE" ;
3360  return ical;
3361 }
static const int MIN_SM
Definition: EBDetId.h:145
ii
Definition: cuy.py:590
static const int MAX_SM
Definition: EBDetId.h:146
static const int SMCRYSTALMODE
Definition: EBDetId.h:159
#define str(s)
std::unique_ptr< EcalTimeCalibErrors > EcalTrivialConditionRetriever::getTimeCalibErrorsFromConfiguration ( const EcalTimeCalibErrorsRcd )
virtual

Definition at line 3366 of file EcalTrivialConditionRetriever.cc.

References Exception, mps_fire::i, cuy::ii, mps_splice::line, EBDetId::MAX_SM, EBDetId::MIN_SM, DetId::rawId(), EBDetId::SMCRYSTALMODE, str, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by EcalTrivialConditionRetriever(), and getTimeCalibConstantsFromConfiguration().

3367 {
3368  auto ical = std::make_unique<EcalTimeCalibErrors>();
3369 
3370  // Read the values from a txt file
3371  // -------------------------------
3372 
3373  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading timeCalibration constants from file "
3374  << timeCalibErrorsFile_.c_str() ;
3375 
3376  FILE *inpFile ;
3377  inpFile = fopen (timeCalibErrorsFile_.c_str (),"r") ;
3378  if (!inpFile)
3379  {
3380  edm::LogError ("EcalTrivialConditionRetriever")
3381  << "*** Can not open file: " << timeCalibErrorsFile_ ;
3382  throw cms::Exception ("Cannot open inter-calibration coefficients txt file") ;
3383  }
3384 
3385  char line[256] ;
3386  std::ostringstream str ;
3387  fgets (line,255,inpFile) ;
3388  int sm_number=atoi (line) ;
3389  str << "sm: " << sm_number ;
3390 
3391  fgets (line,255,inpFile) ;
3392  //int nevents=atoi (line) ; // not necessary here just for online conddb
3393 
3394  fgets (line,255,inpFile) ;
3395  std::string gen_tag = line ;
3396  str << "gen tag: " << gen_tag ; // should I use this?
3397 
3398  fgets (line,255,inpFile) ;
3399  std::string cali_method = line ;
3400  str << "cali method: " << cali_method << std::endl ; // not important
3401 
3402  fgets (line,255,inpFile) ;
3403  std::string cali_version = line ;
3404  str << "cali version: " << cali_version << std::endl ; // not important
3405 
3406  fgets (line,255,inpFile) ;
3407  std::string cali_type = line ;
3408  str << "cali type: " << cali_type ; // not important
3409 
3410  edm::LogInfo("EcalTrivialConditionRetriever")
3411  << "TimeCalibration file - "
3412  << str.str () << std::endl ;
3413 
3414  float calib[1700]={1} ;
3415  int calib_status[1700]={0} ;
3416 
3417  int ii = 0 ;
3418 
3419  while (fgets (line,255,inpFile))
3420  {
3421  ii++;
3422  int dmy_num = 0 ;
3423  float dmy_calib = 0. ;
3424  float dmy_RMS = 0. ;
3425  int dmy_events = 0 ;
3426  int dmy_status = 0 ;
3427  sscanf (line, "%d %f %f %d %d", &dmy_num, &dmy_calib,
3428  &dmy_RMS, &dmy_events,
3429  &dmy_status) ;
3430  assert (dmy_num >= 1) ;
3431  assert (dmy_num <= 1700) ;
3432  calib[dmy_num-1] = dmy_calib ;
3433  calib_status[dmy_num-1] = dmy_status ;
3434 
3435 // edm::LogInfo ("EcalTrivialConditionRetriever")
3436 // << "[PIETRO] cry = " << dmy_num
3437 // << " calib = " << calib[dmy_num-1]
3438 // << " RMS = " << dmy_RMS
3439 // << " events = " << dmy_events
3440 // << " status = " << calib_status[dmy_num-1]
3441 // << std::endl ;
3442  }
3443 
3444  fclose (inpFile) ; // close inp. file
3445  edm::LogInfo ("EcalTrivialConditionRetriever") << "Read time calibrations for " << ii << " xtals " ;
3446  if (ii!=1700) edm::LogWarning ("StoreEcalCondition")
3447  << "Some crystals missing, set to 1" << std::endl ;
3448 
3449  // Transfer the data to the inter-calibration coefficients container
3450  // -----------------------------------------------------------------
3451 
3452  // DB supermodule always set to 1 for the TestBeam FIXME
3453  int sm_db=1 ;
3454  // loop over channels
3455  for (int i=0 ; i<1700 ; i++)
3456  {
3457  //if (EBDetId::validDetId(iEta,iPhi)) {
3458  // CANNOT be used -- validDetId only checks ETA PHI method
3459  // doing a check by hand, here is the only place in CMSSW
3460  // outside TB code and EcalRawToDigi where needed
3461  // => no need for changing the DetId interface
3462  //
3463  // checking only sm_db -- guess can change with the above FIXME
3464  if (sm_db >= EBDetId::MIN_SM && sm_db <= EBDetId::MAX_SM) {
3465  EBDetId ebid (sm_db,i+1,EBDetId::SMCRYSTALMODE) ;
3466  if (calib_status[i]) ical->setValue (ebid.rawId (), calib[i]) ;
3467  else ical->setValue (ebid.rawId (), 1.) ;
3468  }
3469  //}
3470  } // loop over channels
3471 
3472 // edm::LogInfo ("EcalTrivialConditionRetriever") << "INTERCALIBRATION DONE" ;
3473  return ical;
3474 }
static const int MIN_SM
Definition: EBDetId.h:145
ii
Definition: cuy.py:590
static const int MAX_SM
Definition: EBDetId.h:146
static const int SMCRYSTALMODE
Definition: EBDetId.h:159
#define str(s)
std::unique_ptr< EcalTPGCrystalStatus > EcalTrivialConditionRetriever::getTrgChannelStatusFromConfiguration ( const EcalTPGCrystalStatusRcd )
virtual

Definition at line 2618 of file EcalTrivialConditionRetriever.cc.

References Exception, edm::FileInPath::fullPath(), EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, mps_update::status, str, AlCaHLTBitMon_QueryRunRegistry::string, EBDetId::unhashIndex(), EEDetId::unhashIndex(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

2619 {
2620  auto ecalStatus = std::make_unique<EcalTPGCrystalStatus>();
2621 
2622 
2623  // start by setting all statuses to 0
2624 
2625  // barrel
2626  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
2627  if(ieta==0) continue;
2628  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
2629  if (EBDetId::validDetId(ieta,iphi)) {
2630  EBDetId ebid(ieta,iphi);
2631  ecalStatus->setValue( ebid, 0 );
2632  }
2633  }
2634  }
2635  // endcap
2636  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
2637  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
2638  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
2639  if (EEDetId::validDetId(iX,iY,1)) {
2640  EEDetId eedetidpos(iX,iY,1);
2641  ecalStatus->setValue( eedetidpos, 0 );
2642  }
2643  if (EEDetId::validDetId(iX,iY,-1)) {
2644  EEDetId eedetidneg(iX,iY,-1);
2645  ecalStatus->setValue( eedetidneg, 0 );
2646  }
2647  }
2648  }
2649 
2650 
2651 
2652  // overwrite the statuses which are in the file
2653 
2654  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading channel statuses from file " << edm::FileInPath(channelStatusFile_).fullPath().c_str() ;
2655  std::ifstream statusFile(edm::FileInPath(channelStatusFile_).fullPath().c_str());
2656  if ( !statusFile.good() ) {
2657  edm::LogError ("EcalTrivialConditionRetriever")
2658  << "*** Problems opening file: " << channelStatusFile_ ;
2659  throw cms::Exception ("Cannot open ECAL channel status file") ;
2660  }
2661 
2662  std::string EcalSubDet;
2663  std::string str;
2664  int hashIndex(0);
2665  int status(0);
2666 
2667  while (!statusFile.eof())
2668  {
2669  statusFile >> EcalSubDet;
2670  if (EcalSubDet!=std::string("EB") && EcalSubDet!=std::string("EE"))
2671  {
2672  std::getline(statusFile,str);
2673  continue;
2674  }
2675  else
2676  {
2677  statusFile>> hashIndex >> status;
2678  }
2679  // std::cout << EcalSubDet << " " << hashIndex << " " << status;
2680 
2681  if(EcalSubDet==std::string("EB"))
2682  {
2683  EBDetId ebid = EBDetId::unhashIndex(hashIndex);
2684  ecalStatus->setValue( ebid, status );
2685  }
2686  else if(EcalSubDet==std::string("EE"))
2687  {
2688  EEDetId eedetid = EEDetId::unhashIndex(hashIndex);
2689  ecalStatus->setValue( eedetid, status );
2690  }
2691  else
2692  {
2693  edm::LogError ("EcalTrivialConditionRetriever")
2694  << " *** " << EcalSubDet << " is neither EB nor EE ";
2695  }
2696 
2697  }
2698  // the file is supposed to be in the form -- FIXME
2699 
2700 
2701  statusFile.close();
2702  return ecalStatus;
2703 }
static const int MIN_IPHI
Definition: EBDetId.h:135
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:65
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:110
std::string fullPath() const
Definition: FileInPath.cc:163
static const int IY_MAX
Definition: EEDetId.h:302
#define str(s)
void EcalTrivialConditionRetriever::getWeightsFromConfiguration ( const edm::ParameterSet ps)
private

Definition at line 1724 of file EcalTrivialConditionRetriever.cc.

References begin, Exception, edm::FileInPath::fullPath(), edm::ParameterSet::getUntrackedParameter(), mps_fire::i, checklumidiff::l, and findQualityFiles::size.

1725 {
1726 
1727  std::vector < std::vector<double> > amplwgtv(nTDCbins_);
1728 
1729  if (!getWeightsFromFile_ && nTDCbins_ == 1)
1730  {
1731  std::vector<double> vampl;
1732  //As default using simple 3+1 weights
1733  vampl.push_back( -0.33333 );
1734  vampl.push_back( -0.33333 );
1735  vampl.push_back( -0.33333 );
1736  vampl.push_back( 0. );
1737  vampl.push_back( 0. );
1738  vampl.push_back( 1. );
1739  vampl.push_back( 0. );
1740  vampl.push_back( 0. );
1741  vampl.push_back( 0. );
1742  vampl.push_back( 0. );
1743  amplwgtv[0]= ps.getUntrackedParameter< std::vector<double> >("amplWeights", vampl);
1744  }
1745  else if (getWeightsFromFile_)
1746  {
1747  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading amplitude weights from file " << edm::FileInPath(amplWeightsFile_).fullPath().c_str() ;
1748  std::ifstream amplFile(edm::FileInPath(amplWeightsFile_).fullPath().c_str());
1749  int tdcBin=0;
1750  while (!amplFile.eof() && tdcBin < nTDCbins_)
1751  {
1752  for(int j = 0; j < 10; ++j) {
1753  float ww;
1754  amplFile >> ww;
1755  amplwgtv[tdcBin].push_back(ww);
1756  }
1757  ++tdcBin;
1758  }
1759  assert (tdcBin == nTDCbins_);
1760  //Read from file
1761  }
1762  else
1763  {
1764  //Not supported
1765  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1766  throw cms::Exception("WrongConfig");
1767  }
1768 
1769 
1770  for (int i=0;i<nTDCbins_;i++)
1771  {
1772  assert(amplwgtv[i].size() == 10);
1773  int j=0;
1774  for(std::vector<double>::const_iterator it = amplwgtv[i].begin(); it != amplwgtv[i].end(); ++it)
1775  {
1776  (amplWeights_[i])[j]=*it;
1777  j++;
1778  }
1779  }
1780 
1781 
1782  std::vector < std::vector<double> > amplwgtvAftGain(nTDCbins_);
1783 
1784  if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1785  {
1786  std::vector<double> vamplAftGain;
1787  vamplAftGain.push_back( 0. );
1788  vamplAftGain.push_back( 0. );
1789  vamplAftGain.push_back( 0. );
1790  vamplAftGain.push_back( 0. );
1791  vamplAftGain.push_back( 0. );
1792  vamplAftGain.push_back( 1. );
1793  vamplAftGain.push_back( 0. );
1794  vamplAftGain.push_back( 0. );
1795  vamplAftGain.push_back( 0. );
1796  vamplAftGain.push_back( 0. );
1797  amplwgtvAftGain[0] = ps.getUntrackedParameter< std::vector<double> >("amplWeightsAftGain", vamplAftGain);
1798  }
1799  else if (getWeightsFromFile_)
1800  {
1801  //Read from file
1802  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading amplitude weights aftre gain switch from file " << edm::FileInPath(amplWeightsAftFile_).fullPath().c_str() ;
1803  std::ifstream amplFile(edm::FileInPath(amplWeightsAftFile_).fullPath().c_str());
1804  int tdcBin=0;
1805  while (!amplFile.eof() && tdcBin < nTDCbins_)
1806  {
1807  for(int j = 0; j < 10; ++j) {
1808  float ww;
1809  amplFile >> ww;
1810  amplwgtvAftGain[tdcBin].push_back(ww);
1811  }
1812  ++tdcBin;
1813  }
1814  assert (tdcBin == nTDCbins_);
1815  }
1816  else
1817  {
1818  //Not supported
1819  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1820  throw cms::Exception("WrongConfig");
1821  }
1822 
1823  for (int i=0;i<nTDCbins_;i++)
1824  {
1825  assert(amplwgtvAftGain[i].size() == 10);
1826  int j=0;
1827  for(std::vector<double>::const_iterator it = amplwgtvAftGain[i].begin(); it != amplwgtvAftGain[i].end(); ++it) {
1828  (amplWeightsAft_[i])[j]=*it;
1829  j++;
1830  }
1831  }
1832 
1833  // default weights to reco amplitude w/o pedestal subtraction
1834 
1835  std::vector< std::vector<double> > pedwgtv(nTDCbins_);
1836 
1837  if (!getWeightsFromFile_ && nTDCbins_ == 1)
1838  {
1839  std::vector<double> vped;
1840  vped.push_back( 0.33333 );
1841  vped.push_back( 0.33333 );
1842  vped.push_back( 0.33333 );
1843  vped.push_back( 0. );
1844  vped.push_back( 0. );
1845  vped.push_back( 0. );
1846  vped.push_back( 0. );
1847  vped.push_back( 0. );
1848  vped.push_back( 0. );
1849  vped.push_back( 0. );
1850  pedwgtv[0] = ps.getUntrackedParameter< std::vector<double> >("pedWeights", vped);
1851  }
1852  else if (getWeightsFromFile_)
1853  {
1854  //Read from file
1855  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading pedestal weights from file " << edm::FileInPath(pedWeightsFile_).fullPath().c_str() ;
1856  std::ifstream pedFile(edm::FileInPath(pedWeightsFile_).fullPath().c_str());
1857  int tdcBin=0;
1858  while (!pedFile.eof() && tdcBin < nTDCbins_)
1859  {
1860  for(int j = 0; j < 10; ++j) {
1861  float ww;
1862  pedFile >> ww;
1863  pedwgtv[tdcBin].push_back(ww);
1864  }
1865  ++tdcBin;
1866  }
1867  assert (tdcBin == nTDCbins_);
1868  }
1869  else
1870  {
1871  //Not supported
1872  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1873  throw cms::Exception("WrongConfig");
1874  }
1875 
1876  for (int i=0;i<nTDCbins_;i++)
1877  {
1878  assert(pedwgtv[i].size() == 10);
1879  int j=0;
1880  for(std::vector<double>::const_iterator it = pedwgtv[i].begin(); it != pedwgtv[i].end(); ++it) {
1881  (pedWeights_[i])[j] = *it;
1882  j++;
1883  }
1884  }
1885 
1886  std::vector< std::vector<double> > pedwgtvaft(nTDCbins_);
1887 
1888  if (!getWeightsFromFile_ && nTDCbins_ == 1)
1889  {
1890  std::vector<double> vped;
1891  vped.push_back( 0. );
1892  vped.push_back( 0. );
1893  vped.push_back( 0. );
1894  vped.push_back( 0. );
1895  vped.push_back( 0. );
1896  vped.push_back( 0. );
1897  vped.push_back( 0. );
1898  vped.push_back( 0. );
1899  vped.push_back( 0. );
1900  vped.push_back( 0. );
1901  pedwgtvaft[0] = ps.getUntrackedParameter< std::vector<double> >("pedWeightsAft", vped);
1902  }
1903  else if (getWeightsFromFile_)
1904  {
1905  //Read from file
1906  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading pedestal after gain switch weights from file " << edm::FileInPath(pedWeightsAftFile_).fullPath().c_str() ;
1907  std::ifstream pedFile(edm::FileInPath(pedWeightsAftFile_).fullPath().c_str());
1908  int tdcBin=0;
1909  while (!pedFile.eof() && tdcBin < nTDCbins_)
1910  {
1911  for(int j = 0; j < 10; ++j) {
1912  float ww;
1913  pedFile >> ww;
1914  pedwgtvaft[tdcBin].push_back(ww);
1915  }
1916  ++tdcBin;
1917  }
1918  assert (tdcBin == nTDCbins_);
1919  }
1920  else
1921  {
1922  //Not supported
1923  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1924  throw cms::Exception("WrongConfig");
1925  }
1926 
1927  for (int i=0;i<nTDCbins_;i++)
1928  {
1929  assert(pedwgtvaft[i].size() == 10);
1930  int j=0;
1931  for(std::vector<double>::const_iterator it = pedwgtvaft[i].begin(); it != pedwgtvaft[i].end(); ++it) {
1932  (pedWeightsAft_[i])[j]=*it;
1933  j++;
1934  }
1935  }
1936 
1937 
1938 
1939  // default weights to reco jitter
1940 
1941  std::vector< std::vector<double> > jittwgtv(nTDCbins_);
1942 
1943  if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1944  {
1945  std::vector<double> vjitt;
1946  vjitt.push_back( 0.04066309 );
1947  vjitt.push_back( 0.04066309 );
1948  vjitt.push_back( 0.04066309 );
1949  vjitt.push_back( 0.000 );
1950  vjitt.push_back( 1.325176 );
1951  vjitt.push_back( -0.04997078 );
1952  vjitt.push_back( -0.504338 );
1953  vjitt.push_back( -0.5024844 );
1954  vjitt.push_back( -0.3903718 );
1955  vjitt.push_back( 0.000 );
1956  jittwgtv[0] = ps.getUntrackedParameter< std::vector<double> >("jittWeights", vjitt);
1957  }
1958  else if (getWeightsFromFile_)
1959  {
1960  //Read from file
1961  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading jitter weights from file " << edm::FileInPath(jittWeightsFile_).fullPath().c_str() ;
1962  std::ifstream jittFile(edm::FileInPath(jittWeightsFile_).fullPath().c_str());
1963  int tdcBin=0;
1964  while (!jittFile.eof() && tdcBin < nTDCbins_)
1965  {
1966  for(int j = 0; j < 10; ++j) {
1967  float ww;
1968  jittFile >> ww;
1969  jittwgtv[tdcBin].push_back(ww);
1970  }
1971  ++tdcBin;
1972  }
1973  assert (tdcBin == nTDCbins_);
1974  }
1975  else
1976  {
1977  //Not supported
1978  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1979  throw cms::Exception("WrongConfig");
1980  }
1981 
1982  for (int i=0;i<nTDCbins_;i++)
1983  {
1984  assert(jittwgtv[i].size() == 10);
1985  int j=0;
1986  for(std::vector<double>::const_iterator it = jittwgtv[i].begin(); it != jittwgtv[i].end(); ++it) {
1987  (jittWeights_[i])[j]= *it;
1988  j++;
1989  }
1990  }
1991 
1992  std::vector< std::vector<double> > jittwgtvaft(nTDCbins_);
1993 
1994  if (!getWeightsFromFile_ && nTDCbins_ == 1)
1995  {
1996  std::vector<double> vjitt;
1997  vjitt.push_back( 0. );
1998  vjitt.push_back( 0. );
1999  vjitt.push_back( 0. );
2000  vjitt.push_back( 0. );
2001  vjitt.push_back( 1.097871 );
2002  vjitt.push_back( -0.04551035 );
2003  vjitt.push_back( -0.4159156 );
2004  vjitt.push_back( -0.4185352 );
2005  vjitt.push_back( -0.3367127 );
2006  vjitt.push_back( 0. );
2007  jittwgtvaft[0] = ps.getUntrackedParameter< std::vector<double> >("jittWeightsAft", vjitt);
2008  }
2009  else if (getWeightsFromFile_)
2010  {
2011  //Read from file
2012  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading jitter after gain switch weights from file " << edm::FileInPath(jittWeightsAftFile_).fullPath().c_str() ;
2013  std::ifstream jittFile(edm::FileInPath(jittWeightsAftFile_).fullPath().c_str());
2014  int tdcBin=0;
2015  while (!jittFile.eof() && tdcBin < nTDCbins_)
2016  {
2017  for(int j = 0; j < 10; ++j) {
2018  float ww;
2019  jittFile >> ww;
2020  jittwgtvaft[tdcBin].push_back(ww);
2021  }
2022  ++tdcBin;
2023  }
2024  assert (tdcBin == nTDCbins_);
2025  }
2026  else
2027  {
2028  //Not supported
2029  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
2030  throw cms::Exception("WrongConfig");
2031  }
2032 
2033  for (int i=0;i<nTDCbins_;i++)
2034  {
2035  assert(jittwgtvaft[i].size() == 10);
2036  int j=0;
2037  for(std::vector<double>::const_iterator it = jittwgtvaft[i].begin(); it != jittwgtvaft[i].end(); ++it) {
2038  (jittWeightsAft_[i])[j]= *it;
2039  j++;
2040  }
2041  }
2042 
2043 
2044  std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix(nTDCbins_);
2045  if (!getWeightsFromFile_ && nTDCbins_ == 1 )
2046  {
2047  // chi2Matrix[0].resize(10);
2048  // for (int i=0;i<10;i++)
2049  // chi2Matrix[0][i].resize(10);
2050 
2051  chi2Matrix[0](0,0) = 0.694371;
2052  chi2Matrix[0](0,1) = -0.305629;
2053  chi2Matrix[0](0,2) = -0.305629;
2054  chi2Matrix[0](0,3) = 0.;
2055  chi2Matrix[0](0,4) = 0.;
2056  chi2Matrix[0](0,5) = 0.;
2057  chi2Matrix[0](0,6) = 0.;
2058  chi2Matrix[0](0,7) = 0.;
2059  chi2Matrix[0](0,8) = 0.;
2060  chi2Matrix[0](0,9) = 0.;
2061  chi2Matrix[0](1,0) = -0.305629;
2062  chi2Matrix[0](1,1) = 0.694371;
2063  chi2Matrix[0](1,2) = -0.305629;
2064  chi2Matrix[0](1,3) = 0.;
2065  chi2Matrix[0](1,4) = 0.;
2066  chi2Matrix[0](1,5) = 0.;
2067  chi2Matrix[0](1,6) = 0.;
2068  chi2Matrix[0](1,7) = 0.;
2069  chi2Matrix[0](1,8) = 0.;
2070  chi2Matrix[0](1,9) = 0.;
2071  chi2Matrix[0](2,0) = -0.305629;
2072  chi2Matrix[0](2,1) = -0.305629;
2073  chi2Matrix[0](2,2) = 0.694371;
2074  chi2Matrix[0](2,3) = 0.;
2075  chi2Matrix[0](2,4) = 0.;
2076  chi2Matrix[0](2,5) = 0.;
2077  chi2Matrix[0](2,6) = 0.;
2078  chi2Matrix[0](2,7) = 0.;
2079  chi2Matrix[0](2,8) = 0.;
2080  chi2Matrix[0](2,9) = 0.;
2081  chi2Matrix[0](3,0) = 0.;
2082  chi2Matrix[0](3,1) = 0.;
2083  chi2Matrix[0](3,2) = 0.;
2084  chi2Matrix[0](3,3) = 0.;
2085  chi2Matrix[0](3,4) = 0.;
2086  chi2Matrix[0](3,5) = 0.;
2087  chi2Matrix[0](3,6) = 0.;
2088  chi2Matrix[0](3,7) = 0.;
2089  chi2Matrix[0](3,8) = 0.;
2090  chi2Matrix[0](3,9) = 0.;
2091  chi2Matrix[0](4,0) = 0.;
2092  chi2Matrix[0](4,1) = 0.;
2093  chi2Matrix[0](4,2) = 0.;
2094  chi2Matrix[0](4,3) = 0.;
2095  chi2Matrix[0](4,4) = 0.8027116;
2096  chi2Matrix[0](4,5) = -0.2517103;
2097  chi2Matrix[0](4,6) = -0.2232882;
2098  chi2Matrix[0](4,7) = -0.1716192;
2099  chi2Matrix[0](4,8) = -0.1239006;
2100  chi2Matrix[0](4,9) = 0.;
2101  chi2Matrix[0](5,0) = 0.;
2102  chi2Matrix[0](5,1) = 0.;
2103  chi2Matrix[0](5,2) = 0.;
2104  chi2Matrix[0](5,3) = 0.;
2105  chi2Matrix[0](5,4) = -0.2517103;
2106  chi2Matrix[0](5,5) = 0.6528964;
2107  chi2Matrix[0](5,6) = -0.2972839;
2108  chi2Matrix[0](5,7) = -0.2067162;
2109  chi2Matrix[0](5,8) = -0.1230729;
2110  chi2Matrix[0](5,9) = 0.;
2111  chi2Matrix[0](6,0) = 0.;
2112  chi2Matrix[0](6,1) = 0.;
2113  chi2Matrix[0](6,2) = 0.;
2114  chi2Matrix[0](6,3) = 0.;
2115  chi2Matrix[0](6,4) = -0.2232882;
2116  chi2Matrix[0](6,5) = -0.2972839;
2117  chi2Matrix[0](6,6) = 0.7413607;
2118  chi2Matrix[0](6,7) = -0.1883866;
2119  chi2Matrix[0](6,8) = -0.1235052;
2120  chi2Matrix[0](6,9) = 0.;
2121  chi2Matrix[0](7,0) = 0.;
2122  chi2Matrix[0](7,1) = 0.;
2123  chi2Matrix[0](7,2) = 0.;
2124  chi2Matrix[0](7,3) = 0.;
2125  chi2Matrix[0](7,4) = -0.1716192;
2126  chi2Matrix[0](7,5) = -0.2067162;
2127  chi2Matrix[0](7,6) = -0.1883866;
2128  chi2Matrix[0](7,7) = 0.844935;
2129  chi2Matrix[0](7,8) = -0.124291;
2130  chi2Matrix[0](7,9) = 0.;
2131  chi2Matrix[0](8,0) = 0.;
2132  chi2Matrix[0](8,1) = 0.;
2133  chi2Matrix[0](8,2) = 0.;
2134  chi2Matrix[0](8,3) = 0.;
2135  chi2Matrix[0](8,4) = -0.1239006;
2136  chi2Matrix[0](8,5) = -0.1230729;
2137  chi2Matrix[0](8,6) = -0.1235052;
2138  chi2Matrix[0](8,7) = -0.124291;
2139  chi2Matrix[0](8,8) = 0.8749833;
2140  chi2Matrix[0](8,9) = 0.;
2141  chi2Matrix[0](9,0) = 0.;
2142  chi2Matrix[0](9,1) = 0.;
2143  chi2Matrix[0](9,2) = 0.;
2144  chi2Matrix[0](9,3) = 0.;
2145  chi2Matrix[0](9,4) = 0.;
2146  chi2Matrix[0](9,5) = 0.;
2147  chi2Matrix[0](9,6) = 0.;
2148  chi2Matrix[0](9,7) = 0.;
2149  chi2Matrix[0](9,8) = 0.;
2150  chi2Matrix[0](9,9) = 0.;
2151  }
2152  else if (getWeightsFromFile_)
2153  {
2154  //Read from file
2155  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading chi2Matrix from file " << edm::FileInPath(chi2MatrixFile_).fullPath().c_str() ;
2156  std::ifstream chi2MatrixFile(edm::FileInPath(chi2MatrixFile_).fullPath().c_str());
2157  int tdcBin=0;
2158  while (!chi2MatrixFile.eof() && tdcBin < nTDCbins_)
2159  {
2160  // chi2Matrix[tdcBin].resize(10);
2161  for(int j = 0; j < 10; ++j) {
2162  for(int l = 0; l < 10; ++l) {
2163  float ww;
2164  chi2MatrixFile >> ww;
2165  chi2Matrix[tdcBin](j,l)=ww;
2166  }
2167  }
2168  ++tdcBin;
2169  }
2170  assert (tdcBin == nTDCbins_);
2171  }
2172  else
2173  {
2174  //Not supported
2175  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
2176  throw cms::Exception("WrongConfig");
2177  }
2178 
2179 // for (int i=0;i<nTDCbins_;i++)
2180 // {
2181  // assert(chi2Matrix[i].size() == 10);
2182  chi2Matrix_ = chi2Matrix;
2183 // }
2184 
2185  std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2MatrixAft(nTDCbins_);
2186  if (!getWeightsFromFile_ && nTDCbins_ == 1 )
2187  {
2188  // chi2MatrixAft[0].resize(10);
2189  // for (int i=0;i<10;i++)
2190  // chi2MatrixAft[0][i].resize(10);
2191 
2192  chi2MatrixAft[0](0,0) = 0.;
2193  chi2MatrixAft[0](0,1) = 0.;
2194  chi2MatrixAft[0](0,2) = 0.;
2195  chi2MatrixAft[0](0,3) = 0.;
2196  chi2MatrixAft[0](0,4) = 0.;
2197  chi2MatrixAft[0](0,5) = 0.;
2198  chi2MatrixAft[0](0,6) = 0.;
2199  chi2MatrixAft[0](0,7) = 0.;
2200  chi2MatrixAft[0](0,8) = 0.;
2201  chi2MatrixAft[0](0,9) = 0.;
2202  chi2MatrixAft[0](1,0) = 0.;
2203  chi2MatrixAft[0](1,1) = 0.;
2204  chi2MatrixAft[0](1,2) = 0.;
2205  chi2MatrixAft[0](1,3) = 0.;
2206  chi2MatrixAft[0](1,4) = 0.;
2207  chi2MatrixAft[0](1,5) = 0.;
2208  chi2MatrixAft[0](1,6) = 0.;
2209  chi2MatrixAft[0](1,7) = 0.;
2210  chi2MatrixAft[0](1,8) = 0.;
2211  chi2MatrixAft[0](1,9) = 0.;
2212  chi2MatrixAft[0](2,0) = 0.;
2213  chi2MatrixAft[0](2,1) = 0.;
2214  chi2MatrixAft[0](2,2) = 0.;
2215  chi2MatrixAft[0](2,3) = 0.;
2216  chi2MatrixAft[0](2,4) = 0.;
2217  chi2MatrixAft[0](2,5) = 0.;
2218  chi2MatrixAft[0](2,6) = 0.;
2219  chi2MatrixAft[0](2,7) = 0.;
2220  chi2MatrixAft[0](2,8) = 0.;
2221  chi2MatrixAft[0](2,9) = 0.;
2222  chi2MatrixAft[0](3,0) = 0.;
2223  chi2MatrixAft[0](3,1) = 0.;
2224  chi2MatrixAft[0](3,2) = 0.;
2225  chi2MatrixAft[0](3,3) = 0.;
2226  chi2MatrixAft[0](3,4) = 0.;
2227  chi2MatrixAft[0](3,5) = 0.;
2228  chi2MatrixAft[0](3,6) = 0.;
2229  chi2MatrixAft[0](3,7) = 0.;
2230  chi2MatrixAft[0](3,8) = 0.;
2231  chi2MatrixAft[0](3,9) = 0.;
2232  chi2MatrixAft[0](4,0) = 0.;
2233  chi2MatrixAft[0](4,1) = 0.;
2234  chi2MatrixAft[0](4,2) = 0.;
2235  chi2MatrixAft[0](4,3) = 0.;
2236  chi2MatrixAft[0](4,4) = 0.8030884;
2237  chi2MatrixAft[0](4,5) = -0.2543541;
2238  chi2MatrixAft[0](4,6) = -0.2243544;
2239  chi2MatrixAft[0](4,7) = -0.1698177;
2240  chi2MatrixAft[0](4,8) = -0.1194506;
2241  chi2MatrixAft[0](4,9) = 0.;
2242  chi2MatrixAft[0](5,0) = 0.;
2243  chi2MatrixAft[0](5,1) = 0.;
2244  chi2MatrixAft[0](5,2) = 0.;
2245  chi2MatrixAft[0](5,3) = 0.;
2246  chi2MatrixAft[0](5,4) = -0.2543541;
2247  chi2MatrixAft[0](5,5) = 0.6714465;
2248  chi2MatrixAft[0](5,6) = -0.2898025;
2249  chi2MatrixAft[0](5,7) = -0.2193564;
2250  chi2MatrixAft[0](5,8) = -0.1542964;
2251  chi2MatrixAft[0](5,9) = 0.;
2252  chi2MatrixAft[0](6,0) = 0.;
2253  chi2MatrixAft[0](6,1) = 0.;
2254  chi2MatrixAft[0](6,2) = 0.;
2255  chi2MatrixAft[0](6,3) = 0.;
2256  chi2MatrixAft[0](6,4) = -0.2243544;
2257  chi2MatrixAft[0](6,5) = -0.2898025;
2258  chi2MatrixAft[0](6,6) = 0.7443781;
2259  chi2MatrixAft[0](6,7) = -0.1934846;
2260  chi2MatrixAft[0](6,8) = -0.136098;
2261  chi2MatrixAft[0](6,9) = 0.;
2262  chi2MatrixAft[0](7,0) = 0.;
2263  chi2MatrixAft[0](7,1) = 0.;
2264  chi2MatrixAft[0](7,2) = 0.;
2265  chi2MatrixAft[0](7,3) = 0.;
2266  chi2MatrixAft[0](7,4) = -0.1698177;
2267  chi2MatrixAft[0](7,5) = -0.2193564;
2268  chi2MatrixAft[0](7,6) = -0.1934846;
2269  chi2MatrixAft[0](7,7) = 0.8535482;
2270  chi2MatrixAft[0](7,8) = -0.1030149;
2271  chi2MatrixAft[0](7,9) = 0.;
2272  chi2MatrixAft[0](8,0) = 0.;
2273  chi2MatrixAft[0](8,1) = 0.;
2274  chi2MatrixAft[0](8,2) = 0.;
2275  chi2MatrixAft[0](8,3) = 0.;
2276  chi2MatrixAft[0](8,4) = -0.1194506;
2277  chi2MatrixAft[0](8,5) = -0.1542964;
2278  chi2MatrixAft[0](8,6) = -0.136098;
2279  chi2MatrixAft[0](8,7) = -0.1030149;
2280  chi2MatrixAft[0](8,8) = 0.9275388;
2281  chi2MatrixAft[0](8,9) = 0.;
2282  chi2MatrixAft[0](9,0) = 0.;
2283  chi2MatrixAft[0](9,1) = 0.;
2284  chi2MatrixAft[0](9,2) = 0.;
2285  chi2MatrixAft[0](9,3) = 0.;
2286  chi2MatrixAft[0](9,4) = 0.;
2287  chi2MatrixAft[0](9,5) = 0.;
2288  chi2MatrixAft[0](9,6) = 0.;
2289  chi2MatrixAft[0](9,7) = 0.;
2290  chi2MatrixAft[0](9,8) = 0.;
2291  chi2MatrixAft[0](9,9) = 0.;
2292  }
2293  else if (getWeightsFromFile_)
2294  {
2295  //Read from file
2296  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading chi2MatrixAft from file " << edm::FileInPath(chi2MatrixAftFile_).fullPath().c_str() ;
2297  std::ifstream chi2MatrixAftFile(edm::FileInPath(chi2MatrixAftFile_).fullPath().c_str());
2298  int tdcBin=0;
2299  while (!chi2MatrixAftFile.eof() && tdcBin < nTDCbins_)
2300  {
2301  // chi2MatrixAft[tdcBin].resize(10);
2302  for(int j = 0; j < 10; ++j) {
2303  for(int l = 0; l < 10; ++l) {
2304  float ww;
2305  chi2MatrixAftFile >> ww;
2306  chi2MatrixAft[tdcBin](j,l)=ww;
2307  }
2308  }
2309  ++tdcBin;
2310  }
2311  assert (tdcBin == nTDCbins_);
2312  }
2313  else
2314  {
2315  //Not supported
2316  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
2317  throw cms::Exception("WrongConfig");
2318  }
2319 
2320 // for (int i=0;i<nTDCbins_;i++)
2321 // {
2322  // assert(chi2MatrixAft[i].size() == 10);
2323  chi2MatrixAft_ = chi2MatrixAft;
2324  // }
2325 
2326 }
size
Write out results.
T getUntrackedParameter(std::string const &, T const &) const
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeightsAft_
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_
#define begin
Definition: vmac.h:32
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > amplWeightsAft_
std::string fullPath() const
Definition: FileInPath.cc:163
std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix_
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeights_
const EcalTrivialConditionRetriever& EcalTrivialConditionRetriever::operator= ( const EcalTrivialConditionRetriever )
privatedelete
std::unique_ptr< EcalADCToGeVConstant > EcalTrivialConditionRetriever::produceEcalADCToGeVConstant ( const EcalADCToGeVConstantRcd )
virtual

Definition at line 997 of file EcalTrivialConditionRetriever.cc.

Referenced by EcalTrivialConditionRetriever().

998 {
999  return std::make_unique<EcalADCToGeVConstant>(adcToGeVEBConstant_,adcToGeVEEConstant_);
1000 }
std::unique_ptr< Alignments > EcalTrivialConditionRetriever::produceEcalAlignmentEB ( const EBAlignmentRcd )
virtual

Definition at line 3536 of file EcalTrivialConditionRetriever.cc.

References a, f, Alignments::m_align, and create_public_lumi_plots::transform.

Referenced by EcalTrivialConditionRetriever().

3536  {
3537  double mytrans[3] = {0., 0., 0.};
3538  double myeuler[3] = {0., 0., 0.};
3539  std::ifstream f;
3541  f.open(edm::FileInPath(EBAlignmentFile_).fullPath().c_str());
3542  std::vector<AlignTransform> my_align;
3543  int ieta = 1;
3544  int iphi = 0;
3545  for(int SM = 1 ; SM < 37; SM++ ) {
3546  // make an EBDetId since we need EBDetId::rawId()
3547  if(SM > 18) {
3548  iphi = 1 + (SM - 19) * 20;
3549  ieta = -1;
3550  }
3551  else
3552  iphi = SM * 20;
3553  EBDetId ebdetId(ieta,iphi);
3555  f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
3556  edm::LogInfo (" translation ") << mytrans[0] << " " << mytrans[1] << " " << mytrans[2] << "\n"
3557  << " euler " << myeuler[0] << " " << myeuler[1] << " " << myeuler[2] ;
3558  }
3559  CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
3560  CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
3561  AlignTransform transform( translation, euler, ebdetId );
3562  my_align.push_back(transform);
3563  }
3564  /*
3565  // check
3566  uint32_t m_rawid;
3567  double m_x, m_y, m_z;
3568  double m_phi, m_theta, m_psi;
3569  int SM = 0;
3570  for (std::vector<AlignTransform>::const_iterator i = my_align.begin(); i != my_align.end(); ++i){
3571  m_rawid = i->rawId();
3572  CLHEP::Hep3Vector translation = i->translation();
3573  m_x = translation.x();
3574  m_y = translation.y();
3575  m_z = translation.z();
3576  CLHEP::HepRotation rotation = i->rotation();
3577  m_phi = rotation.getPhi();
3578  m_theta = rotation.getTheta();
3579  m_psi = rotation.getPsi();
3580  SM++;
3581  std::cout << " SM " << SM << " Id " << m_rawid << " x " << m_x << " y " << m_y << " z " << m_z
3582  << " phi " << m_phi << " theta " << m_theta << " psi " << m_psi << std::endl;
3583  }
3584  */
3585  Alignments a;
3586  a.m_align = my_align;
3587 
3588  return std::make_unique<Alignments>(a);
3589 }
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
double f[11][100]
double a
Definition: hdecay.h:121
std::unique_ptr< Alignments > EcalTrivialConditionRetriever::produceEcalAlignmentEE ( const EEAlignmentRcd )
virtual

Definition at line 3592 of file EcalTrivialConditionRetriever.cc.

References a, f, Alignments::m_align, and create_public_lumi_plots::transform.

Referenced by EcalTrivialConditionRetriever().

3592  {
3593  double mytrans[3] = {0., 0., 0.};
3594  double myeuler[3] = {0., 0., 0.};
3595  std::ifstream f;
3597  f.open(edm::FileInPath(EEAlignmentFile_).fullPath().c_str());
3598  std::vector<AlignTransform> my_align;
3599  int ix = 20;
3600  int iy = 50;
3601  int side = -1;
3602  for(int Dee = 0 ; Dee < 4; Dee++ ) {
3603  // make an EEDetId since we need EEDetId::rawId()
3604  if(Dee == 1 || Dee == 3)
3605  ix = 70;
3606  else ix = 20;
3607  if(Dee == 2)
3608  side = 1;
3609  EEDetId eedetId(ix, iy, side);
3611  f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
3612  edm::LogInfo (" translation ") << mytrans[0] << " " << mytrans[1] << " " << mytrans[2] << "\n"
3613  << " euler " << myeuler[0] << " " << myeuler[1] << " " << myeuler[2] ;
3614  }
3615  CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
3616  CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
3617  AlignTransform transform( translation, euler, eedetId );
3618  my_align.push_back(transform);
3619  }
3620  Alignments a;
3621  a.m_align = my_align;
3622  return std::make_unique<Alignments>(a);
3623 }
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
double f[11][100]
double a
Definition: hdecay.h:121
std::unique_ptr< Alignments > EcalTrivialConditionRetriever::produceEcalAlignmentES ( const ESAlignmentRcd )
virtual

Definition at line 3626 of file EcalTrivialConditionRetriever.cc.

References a, f, Alignments::m_align, digitizers_cfi::strip, and create_public_lumi_plots::transform.

Referenced by EcalTrivialConditionRetriever().

3626  {
3627  double mytrans[3] = {0., 0., 0.};
3628  double myeuler[3] = {0., 0., 0.};
3629  std::ifstream f;
3631  f.open(edm::FileInPath(ESAlignmentFile_).fullPath().c_str());
3632  std::vector<AlignTransform> my_align;
3633  // int ix_vect[10] = {10, 30, 30, 50, 10, 30, 10, 30};
3634  int pl_vect[10] = {2, 2, 1, 1, 1, 1, 2, 2};
3635  int iy = 10;
3636  int side = -1;
3637  int strip = 1;
3638  for(int layer = 0 ; layer < 8; layer++ ) {
3639  // make an ESDetId since we need ESDetId::rawId()
3640  int ix = 10 + (layer%2) * 20;
3641  int plane = pl_vect[layer];
3642  if(layer > 3) side = 1;
3643  ESDetId esdetId(strip, ix, iy, plane, side);
3645  f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
3646  edm::LogInfo (" translation ") << mytrans[0] << " " << mytrans[1] << " " << mytrans[2] << "\n"
3647  << " euler " << myeuler[0] << " " << myeuler[1] << " " << myeuler[2];
3648  }
3649  CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
3650  CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
3651  AlignTransform transform( translation, euler, esdetId );
3652  my_align.push_back(transform);
3653  }
3654  Alignments a;
3655  a.m_align = my_align;
3656  return std::make_unique<Alignments>(a);
3657 }
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
double f[11][100]
double a
Definition: hdecay.h:121
std::unique_ptr< EcalChannelStatus > EcalTrivialConditionRetriever::produceEcalChannelStatus ( const EcalChannelStatusRcd )
virtual

Definition at line 2422 of file EcalTrivialConditionRetriever.cc.

References EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

2423 {
2424 
2425  auto ical = std::make_unique<EcalChannelStatus>();
2426  // barrel
2427  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
2428  if(ieta==0) continue;
2429  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
2430  if (EBDetId::validDetId(ieta,iphi)) {
2431  EBDetId ebid(ieta,iphi);
2432  ical->setValue( ebid, 0 );
2433  }
2434  }
2435  }
2436  // endcap
2437  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
2438  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
2439  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
2440  if (EEDetId::validDetId(iX,iY,1)) {
2441  EEDetId eedetidpos(iX,iY,1);
2442  ical->setValue( eedetidpos, 0 );
2443  }
2444  if (EEDetId::validDetId(iX,iY,-1)) {
2445  EEDetId eedetidneg(iX,iY,-1);
2446  ical->setValue( eedetidneg, 0 );
2447  }
2448  }
2449  }
2450  return ical;
2451 }
static const int MIN_IPHI
Definition: EBDetId.h:135
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
static const int IY_MAX
Definition: EEDetId.h:302
std::unique_ptr< EcalClusterCrackCorrParameters > EcalTrivialConditionRetriever::produceEcalClusterCrackCorrParameters ( const EcalClusterCrackCorrParametersRcd )
virtual

Definition at line 1102 of file EcalTrivialConditionRetriever.cc.

References mps_fire::i.

Referenced by EcalTrivialConditionRetriever().

1103 {
1104  auto ipar = std::make_unique<EcalClusterCrackCorrParameters>();
1105  for (size_t i = 0; i < crackCorrParameters_.size(); ++i ) {
1106  ipar->params().push_back( crackCorrParameters_[i] );
1107  }
1108  return ipar;
1109 }
std::unique_ptr< EcalClusterEnergyCorrectionObjectSpecificParameters > EcalTrivialConditionRetriever::produceEcalClusterEnergyCorrectionObjectSpecificParameters ( const EcalClusterEnergyCorrectionObjectSpecificParametersRcd )
virtual

Definition at line 1129 of file EcalTrivialConditionRetriever.cc.

References mps_fire::i.

Referenced by EcalTrivialConditionRetriever().

1130 {
1131  auto ipar = std::make_unique<EcalClusterEnergyCorrectionObjectSpecificParameters>();
1132  for (size_t i = 0; i < energyCorrectionObjectSpecificParameters_.size(); ++i ) {
1133  ipar->params().push_back( energyCorrectionObjectSpecificParameters_[i] );
1134  }
1135  return ipar;
1136 }
std::vector< double > energyCorrectionObjectSpecificParameters_
std::unique_ptr< EcalClusterEnergyCorrectionParameters > EcalTrivialConditionRetriever::produceEcalClusterEnergyCorrectionParameters ( const EcalClusterEnergyCorrectionParametersRcd )
virtual

Definition at line 1111 of file EcalTrivialConditionRetriever.cc.

References mps_fire::i.

Referenced by EcalTrivialConditionRetriever().

1112 {
1113  auto ipar = std::make_unique<EcalClusterEnergyCorrectionParameters>();
1114  for (size_t i = 0; i < energyCorrectionParameters_.size(); ++i ) {
1115  ipar->params().push_back( energyCorrectionParameters_[i] );
1116  }
1117  return ipar;
1118 }
std::unique_ptr< EcalClusterEnergyUncertaintyParameters > EcalTrivialConditionRetriever::produceEcalClusterEnergyUncertaintyParameters ( const EcalClusterEnergyUncertaintyParametersRcd )
virtual

Definition at line 1120 of file EcalTrivialConditionRetriever.cc.

References mps_fire::i.

Referenced by EcalTrivialConditionRetriever().

1121 {
1122  auto ipar = std::make_unique<EcalClusterEnergyUncertaintyParameters>();
1123  for (size_t i = 0; i < energyUncertaintyParameters_.size(); ++i ) {
1124  ipar->params().push_back( energyUncertaintyParameters_[i] );
1125  }
1126  return ipar;
1127 }
std::unique_ptr< EcalClusterLocalContCorrParameters > EcalTrivialConditionRetriever::produceEcalClusterLocalContCorrParameters ( const EcalClusterLocalContCorrParametersRcd )
virtual

Definition at line 1093 of file EcalTrivialConditionRetriever.cc.

References mps_fire::i.

Referenced by EcalTrivialConditionRetriever().

1094 {
1095  auto ipar = std::make_unique<EcalClusterLocalContCorrParameters>();
1096  for (size_t i = 0; i < localContCorrParameters_.size(); ++i ) {
1097  ipar->params().push_back( localContCorrParameters_[i] );
1098  }
1099  return ipar;
1100 }
std::unique_ptr< EcalDAQTowerStatus > EcalTrivialConditionRetriever::produceEcalDAQTowerStatus ( const EcalDAQTowerStatusRcd )
virtual

Definition at line 2575 of file EcalTrivialConditionRetriever.cc.

References EcalBarrel, mps_fire::i, gen::k, mps_update::status, EcalTrigTowerDetId::validDetId(), and EcalScDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

2576 {
2577 
2578  auto ical = std::make_unique<EcalDAQTowerStatus>();
2579 
2580  int status(0);
2581 
2582  // barrel
2583  int iz=0;
2584  for(int k=0 ; k<2; k++ ) {
2585  if(k==0) iz=-1;
2586  if(k==1) iz=+1;
2587  for(int i=1 ; i<73; i++) {
2588  for(int j=1 ; j<18; j++) {
2590  EcalTrigTowerDetId ebid(iz,EcalBarrel,j,i);
2591 
2592  ical->setValue( ebid, status );
2593  }
2594  }
2595  }
2596  }
2597 
2598 
2599  // endcap
2600  for(int k=0 ; k<2; k++ ) {
2601  if(k==0) iz=-1;
2602  if(k==1) iz=+1;
2603  for(int i=1 ; i<21; i++) {
2604  for(int j=1 ; j<21; j++) {
2605  if (EcalScDetId::validDetId(i,j,iz )){
2606  EcalScDetId eeid(i,j,iz);
2607  ical->setValue( eeid, status );
2608  }
2609  }
2610  }
2611  }
2612 
2613  return ical;
2614 }
static bool validDetId(int ix, int iy, int iz)
Definition: EcalScDetId.cc:59
int k[5][pyjets_maxn]
static bool validDetId(int iz, EcalSubdetector sd, int i, int j)
check if a valid index combination
std::unique_ptr< EcalDCSTowerStatus > EcalTrivialConditionRetriever::produceEcalDCSTowerStatus ( const EcalDCSTowerStatusRcd )
virtual

Definition at line 2532 of file EcalTrivialConditionRetriever.cc.

References EcalBarrel, mps_fire::i, gen::k, mps_update::status, EcalTrigTowerDetId::validDetId(), and EcalScDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

2533 {
2534 
2535  auto ical = std::make_unique<EcalDCSTowerStatus>();
2536 
2537  int status(0);
2538 
2539  // barrel
2540  int iz=0;
2541  for(int k=0 ; k<2; k++ ) {
2542  if(k==0) iz=-1;
2543  if(k==1) iz=+1;
2544  for(int i=1 ; i<73; i++) {
2545  for(int j=1 ; j<18; j++) {
2547  EcalTrigTowerDetId ebid(iz,EcalBarrel,j,i);
2548 
2549  ical->setValue( ebid, status );
2550  }
2551  }
2552  }
2553  }
2554 
2555 
2556  // endcap
2557  for(int k=0 ; k<2; k++ ) {
2558  if(k==0) iz=-1;
2559  if(k==1) iz=+1;
2560  for(int i=1 ; i<21; i++) {
2561  for(int j=1 ; j<21; j++) {
2562  if (EcalScDetId::validDetId(i,j,iz )){
2563  EcalScDetId eeid(i,j,iz);
2564  ical->setValue( eeid, status );
2565  }
2566  }
2567  }
2568  }
2569 
2570  return ical;
2571 }
static bool validDetId(int ix, int iy, int iz)
Definition: EcalScDetId.cc:59
int k[5][pyjets_maxn]
static bool validDetId(int iz, EcalSubdetector sd, int i, int j)
check if a valid index combination
std::unique_ptr< EcalDQMChannelStatus > EcalTrivialConditionRetriever::produceEcalDQMChannelStatus ( const EcalDQMChannelStatusRcd )
virtual

Definition at line 2455 of file EcalTrivialConditionRetriever.cc.

References EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

2456 {
2457  uint32_t sta(0);
2458 
2459  auto ical = std::make_unique<EcalDQMChannelStatus>();
2460  // barrel
2461  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
2462  if(ieta==0) continue;
2463  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
2464  if (EBDetId::validDetId(ieta,iphi)) {
2465  EBDetId ebid(ieta,iphi);
2466  ical->setValue( ebid, sta );
2467  }
2468  }
2469  }
2470  // endcap
2471  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
2472  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
2473  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
2474  if (EEDetId::validDetId(iX,iY,1)) {
2475  EEDetId eedetidpos(iX,iY,1);
2476  ical->setValue( eedetidpos, sta );
2477  }
2478  if (EEDetId::validDetId(iX,iY,-1)) {
2479  EEDetId eedetidneg(iX,iY,-1);
2480  ical->setValue( eedetidneg, sta );
2481  }
2482  }
2483  }
2484  return ical;
2485 }
static const int MIN_IPHI
Definition: EBDetId.h:135
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
static const int IY_MAX
Definition: EEDetId.h:302
std::unique_ptr< EcalDQMTowerStatus > EcalTrivialConditionRetriever::produceEcalDQMTowerStatus ( const EcalDQMTowerStatusRcd )
virtual

Definition at line 2489 of file EcalTrivialConditionRetriever.cc.

References EcalBarrel, mps_fire::i, gen::k, EcalTrigTowerDetId::validDetId(), and EcalScDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

2490 {
2491 
2492  auto ical = std::make_unique<EcalDQMTowerStatus>();
2493 
2494  uint32_t sta(0);
2495 
2496  // barrel
2497  int iz=0;
2498  for(int k=0 ; k<2; k++ ) {
2499  if(k==0) iz=-1;
2500  if(k==1) iz=+1;
2501  for(int i=1 ; i<73; i++) {
2502  for(int j=1 ; j<18; j++) {
2504  EcalTrigTowerDetId ebid(iz,EcalBarrel,j,i);
2505 
2506  ical->setValue( ebid, sta );
2507  }
2508  }
2509  }
2510  }
2511 
2512 
2513  // endcap
2514  for(int k=0 ; k<2; k++ ) {
2515  if(k==0) iz=-1;
2516  if(k==1) iz=+1;
2517  for(int i=1 ; i<21; i++) {
2518  for(int j=1 ; j<21; j++) {
2519  if (EcalScDetId::validDetId(i,j,iz )){
2520  EcalScDetId eeid(i,j,iz);
2521  ical->setValue( eeid, sta );
2522  }
2523  }
2524  }
2525  }
2526 
2527  return ical;
2528 }
static bool validDetId(int ix, int iy, int iz)
Definition: EcalScDetId.cc:59
int k[5][pyjets_maxn]
static bool validDetId(int iz, EcalSubdetector sd, int i, int j)
check if a valid index combination
std::unique_ptr< EcalGainRatios > EcalTrivialConditionRetriever::produceEcalGainRatios ( const EcalGainRatiosRcd )
virtual

Definition at line 959 of file EcalTrivialConditionRetriever.cc.

References EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, DetId::rawId(), EcalMGPAGainRatio::setGain12Over6(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

960 {
961  auto gratio = std::make_unique<EcalGainRatios>();
964  gr.setGain6Over1( gainRatio6over1_ );
965 
966  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
967  if(ieta==0) continue;
968  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
969  if (EBDetId::validDetId(ieta,iphi))
970  {
971  EBDetId ebid(ieta,iphi);
972  gratio->setValue( ebid.rawId(), gr );
973  }
974  }
975  }
976 
977  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
978  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
979  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
980  if (EEDetId::validDetId(iX,iY,1))
981  {
982  EEDetId eedetidpos(iX,iY,1);
983  gratio->setValue( eedetidpos.rawId(), gr );
984  }
985  if (EEDetId::validDetId(iX,iY,-1))
986  {
987  EEDetId eedetidneg(iX,iY,-1);
988  gratio->setValue( eedetidneg.rawId(), gr );
989  }
990  }
991  }
992 
993  return gratio;
994 }
static const int MIN_IPHI
Definition: EBDetId.h:135
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
void setGain12Over6(const float &g)
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
static const int IY_MAX
Definition: EEDetId.h:302
std::unique_ptr< EcalIntercalibConstants > EcalTrivialConditionRetriever::produceEcalIntercalibConstants ( const EcalIntercalibConstantsRcd )
virtual

Definition at line 762 of file EcalTrivialConditionRetriever.cc.

References EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, alignCSCRings::r, diffTwoXMLs::r1, rand(), DetId::rawId(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

763 {
764  auto ical = std::make_unique<EcalIntercalibConstants>();
765 
766  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
767  if(ieta==0) continue;
768  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
769  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
770  if (EBDetId::validDetId(ieta,iphi))
771  {
772  EBDetId ebid(ieta,iphi);
773  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
774  ical->setValue( ebid.rawId(), intercalibConstantMean_ + r*intercalibConstantSigma_ );
775  }
776  }
777  }
778 
779  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
780  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
781  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
782  if (EEDetId::validDetId(iX,iY,1))
783  {
784  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
785  EEDetId eedetidpos(iX,iY,1);
786  ical->setValue( eedetidpos.rawId(), intercalibConstantMean_ + r*intercalibConstantSigma_ );
787  }
788  if(EEDetId::validDetId(iX,iY,-1))
789  {
790  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
791  EEDetId eedetidneg(iX,iY,-1);
792  ical->setValue( eedetidneg.rawId(), intercalibConstantMean_ + r1*intercalibConstantSigma_ );
793  }
794  }
795  }
796 
797  return ical;
798 }
static const int MIN_IPHI
Definition: EBDetId.h:135
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:302
std::unique_ptr< EcalIntercalibConstantsMC > EcalTrivialConditionRetriever::produceEcalIntercalibConstantsMC ( const EcalIntercalibConstantsMCRcd )
virtual

Definition at line 801 of file EcalTrivialConditionRetriever.cc.

References EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, alignCSCRings::r, diffTwoXMLs::r1, rand(), DetId::rawId(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

802 {
803  auto ical = std::make_unique<EcalIntercalibConstantsMC>();
804 
805  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
806  if(ieta==0) continue;
807  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
808  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
809  if (EBDetId::validDetId(ieta,iphi))
810  {
811  EBDetId ebid(ieta,iphi);
812  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
813  ical->setValue( ebid.rawId(), intercalibConstantMeanMC_ + r*intercalibConstantSigmaMC_ );
814  }
815  }
816  }
817 
818  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
819  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
820  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
821  if (EEDetId::validDetId(iX,iY,1))
822  {
823  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
824  EEDetId eedetidpos(iX,iY,1);
825  ical->setValue( eedetidpos.rawId(), intercalibConstantMeanMC_ + r*intercalibConstantSigmaMC_ );
826  }
827  if(EEDetId::validDetId(iX,iY,-1))
828  {
829  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
830  EEDetId eedetidneg(iX,iY,-1);
831  ical->setValue( eedetidneg.rawId(), intercalibConstantMeanMC_ + r1*intercalibConstantSigmaMC_ );
832  }
833  }
834  }
835 
836  return ical;
837 }
static const int MIN_IPHI
Definition: EBDetId.h:135
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:302
std::unique_ptr< EcalIntercalibErrors > EcalTrivialConditionRetriever::produceEcalIntercalibErrors ( const EcalIntercalibErrorsRcd )
virtual

Definition at line 840 of file EcalTrivialConditionRetriever.cc.

References EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, DetId::rawId(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

841 {
842  auto ical = std::make_unique<EcalIntercalibErrors>();
843 
844  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
845  if(ieta==0) continue;
846  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
847  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
848  if (EBDetId::validDetId(ieta,iphi))
849  {
850  EBDetId ebid(ieta,iphi);
851  ical->setValue( ebid.rawId(), intercalibErrorMean_);
852  }
853  }
854  }
855 
856  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
857  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
858  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
859  if (EEDetId::validDetId(iX,iY,1))
860  {
861  EEDetId eedetidpos(iX,iY,1);
862  ical->setValue( eedetidpos.rawId(), intercalibErrorMean_ );
863  }
864  if(EEDetId::validDetId(iX,iY,-1))
865  {
866  EEDetId eedetidneg(iX,iY,-1);
867  ical->setValue( eedetidneg.rawId(), intercalibErrorMean_ );
868  }
869  }
870  }
871 
872  return ical;
873 }
static const int MIN_IPHI
Definition: EBDetId.h:135
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
static const int IY_MAX
Definition: EEDetId.h:302
std::unique_ptr< EcalLaserAlphas > EcalTrivialConditionRetriever::produceEcalLaserAlphas ( const EcalLaserAlphasRcd )
virtual

Definition at line 1318 of file EcalTrivialConditionRetriever.cc.

References funct::abs(), alpha, python.rootplot.core::batch, PVValHelper::eta, mps_fire::i, createfilelist::int, EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, cmsBatch::log, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, alignCSCRings::r, diffTwoXMLs::r1, rand(), EBDetId::SMCRYSTALMODE, mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, funct::tan(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

1319 {
1320 
1321  edm::LogInfo(" produceEcalLaserAlphas ");
1322  auto ical = std::make_unique<EcalLaserAlphas>();
1323 
1324  // get Barrel alpha from type
1326  std::ifstream fEB(edm::FileInPath(EBLaserAlphaFile_).fullPath().c_str());
1327  int SMpos[36] = {-10, 4, -7, -16, 6, -9, 11, -17, 5, 18, 3, -8, 1, -3, -13, 14, -6, 2,
1328  15, -18, 8, 17, -2, 9, -1, 10, -5, 7, -12, -11, 16, -4, -15, -14, 12, 13};
1329  // check!
1330  int SMCal[36] = {12,17,10, 1, 8, 4,27,20,23,25, 6,34,35,15,18,30,21, 9,
1331  24,22,13,31,26,16, 2,11, 5, 0,29,28,14,33,32, 3, 7,19};
1332 
1333  for(int SMcons = 0; SMcons < 36; SMcons++) {
1334  int SM = SMpos[SMcons];
1335  if(SM < 0) SM = 17 + abs(SM);
1336  else SM--;
1337  if(SMCal[SM] != SMcons)
1338  edm::LogInfo(" SM pb : read SM ") << SMcons<< " SMpos " << SM
1339  << " SMCal " << SMCal[SM];
1340  }
1341 
1343  int readSM, pos, bar, bar2;
1344  float alpha = 0;
1345  for(int SMcons = 0; SMcons < 36; SMcons++) {
1346  int SM = SMpos[SMcons];
1347  for(int ic = 0; ic < 1700; ic++) {
1348  fEB >> readSM >> pos >> bar >> bar2 >> type >> batch;
1349 
1350  if(readSM != SMcons || pos != ic + 1)
1351  edm::LogInfo(" barrel read pb read SM ") << readSM << " const SM " << SMcons
1352  << " read pos " << pos << " ic " << ic ;
1353  if(SM < 0) SM = 18 + abs(SM);
1354  EBDetId ebdetid(SM, pos, EBDetId::SMCRYSTALMODE);
1355  if(bar == 33101 || bar == 30301 )
1356  alpha = laserAlphaMeanEBR_;
1357  else if(bar == 33106) {
1358  if(bar2 <= 2000)
1359  alpha = laserAlphaMeanEBC_;
1360  else {
1361  edm::LogInfo(" problem with barcode first ") << bar << " last " << bar2
1362  << " read SM " << readSM << " read pos " << pos ;
1363  alpha = laserAlphaMeanEBR_;
1364  }
1365  }
1366  ical->setValue( ebdetid, alpha );
1367 
1368  if (ic==1650 ) {
1369  edm::LogInfo(" ic/alpha ")<<ic<<"/"<<alpha;
1370  }
1371 
1372  }
1373  } // loop over SMcons
1374  fEB.close();
1375  // end laserAlpha from type
1376  } else if(getLaserAlphaFromFileEB_) {
1377  // laser alpha from file
1378  edm::LogInfo("Laser alpha for EB will be taken from File");
1379  int ieta, iphi;
1380  float alpha;
1381  std::ifstream fEB(edm::FileInPath(EBLaserAlphaFile_).fullPath().c_str());
1382  // std::ifstream fEB(EBLaserAlphaFile_.c_str());
1383  for(int ic = 0; ic < 61200; ic++) {
1384  fEB >> ieta>> iphi>>alpha;
1385 
1386  if (EBDetId::validDetId(ieta,iphi)) {
1387  EBDetId ebid(ieta,iphi);
1388  ical->setValue( ebid, alpha );
1389  //std::cout << " ieta/iphi/alpha "<<ieta<<"/"<<iphi<<"/"<<alpha<<std::endl;
1390  }
1391  if (ieta==10) {
1392  edm::LogInfo("I will print some alphas from the file... ieta/iphi/alpha ")<<ieta<<"/"<<iphi<<"/"<<alpha;
1393  }
1394  }
1395  fEB.close();
1396 
1397  } else {
1398  edm::LogInfo("laser alphas from default values");
1399 
1400  // laser alpha from mean and smearing
1401  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
1402  if(ieta==0) continue;
1403  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
1404  if (EBDetId::validDetId(ieta,iphi)) {
1405  EBDetId ebid(ieta,iphi);
1406  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1407  ical->setValue( ebid, laserAlphaMean_ + r*laserAlphaSigma_ );
1408  }
1409  } // loop over iphi
1410  } // loop over ieta
1411  } // do not read a file
1412 
1413  edm::LogInfo(" produceEcalLaserAlphas EE");
1414  // read mean laser per ring per year
1415 
1416  int itype, iring, iyear;
1417  float laser=0;
1418  float las[2][140][6];
1419 
1421  edm::LogInfo(" EE laser alphas from type");
1422 
1423  std::ifstream fRing(edm::FileInPath(EELaserAlphaFile2_).fullPath().c_str());
1424  for(int i = 0; i<1681; i++){
1425 
1426  fRing >> itype>> iring>> iyear>> laser;
1427  edm::LogInfo(" ") <<itype<<" "<<iring<<" "<<iyear<<" "<<laser<<std::endl;
1428  las[itype][iring][iyear]=laser;
1429  }
1430  fRing.close();
1431 
1432 
1433  std::ifstream fEE(edm::FileInPath(EELaserAlphaFile_).fullPath().c_str());
1434  int nxt=0;
1435  for(int crystal = 0; crystal < 14648; crystal++) {
1436  int x, y ,z, bid, bar, bar2;
1437  float LY, alpha = 0;
1438  fEE >> z >> x >> y >> LY >> bid >> bar >> bar2;
1439  if(x < 1 || x > 100 || y < 1 || y > 100)
1440  edm::LogInfo(" wrong coordinates for barcode ") << bar
1441  << " x " << x << " y " << y << " z " << z;
1442  else {
1443  int iyear=4;
1444  int iring = (int)(sqrt( ((float)x-50.5)*((float)x-50.5)
1445  +((float)y-50.5)*((float)y-50.5))+85);
1446 
1447 
1448  double eta= -log(tan(0.5*atan(sqrt((x-50.5)
1449  *(x-50.5)+
1450  (y-50.5)*
1451  (y-50.5))
1452  *2.98/328.)));
1453 
1454 
1455  if(bar == 33201 || (bar == 30399 && bar2 < 568)){
1456  // russian
1457  alpha = laserAlphaMeanEER_;
1458 
1459  double raggio=50.5-sqrt(((float)x-50.5)*((float)x-50.5)+
1460  ((float)y-50.5)*((float)y-50.5));
1461 
1462 
1463  if(raggio>=25){
1464  alpha =1.07;
1465  }
1466  /*
1467  if(raggio>=34){
1468 
1469  if(eta>2.0) {
1470  itype=0;
1471  if(las[itype][iring][iyear]!=999){
1472  alpha=0.8044+0.3555*las[itype][iring][iyear];
1473  }
1474  }
1475 
1476  }
1477  */
1478 
1479  if(x==50) edm::LogInfo("R=")<<raggio<< " x " << x << " y " << y << " z " << z <<"eta="<<eta<<" alpha="<<alpha<<" R";
1480 
1481  } else if((bar == 33106 && bar2 > 2000 && bar2 < 4669)
1482  || (bar == 30399 && bar2 > 567)) {
1483  // SIC
1484  itype=1;
1485  alpha = laserAlphaMeanEEC_;
1486 
1487 
1488  double raggio=50.5-sqrt(((float)x-50.5)*((float)x-50.5)+
1489  ((float)y-50.5)*((float)y-50.5));
1490 
1491 
1492  if(raggio>=25){
1493  alpha =0.80;
1494  }
1495  if(raggio>=34){
1496  float r=sqrt((x-50.5)*(x-50.5)+(y-50.5)*(y-50.5));
1497  if(r<21){
1498  nxt=nxt+1;
1499  // inner SIC crystals
1500 
1501  if(las[itype][iring][iyear]!=999){
1502  alpha=0.7312+0.2688*las[itype][iring][iyear];
1503  }
1504  }
1505  }
1506  if(x==50) edm::LogInfo("R=")<<raggio<< " x " << x << " y " << y << " z " << z <<"eta="<<eta<<" alpha="<<alpha<<" C";
1507 
1508 
1509  } else {
1510  edm::LogInfo(" problem with barcode ") << bar << " " << bar2
1511  << " x " << x << " y " << y << " z " << z;
1512  alpha = laserAlphaMeanEER_;
1513  }
1514 
1515 
1516  }
1517 
1518 
1519  if (EEDetId::validDetId(x, y, z)) {
1520  EEDetId eedetidpos(x, y, z);
1521  ical->setValue( eedetidpos, alpha );
1522  if(x==50) edm::LogInfo (" x ") << x << " y " << y << " alpha " << alpha ;
1523  }
1524  else // should not occur
1525  edm::LogInfo(" problem with EEDetId ") << " x " << x << " y " << y << " z " << z ;
1526  }
1527  fEE.close();
1528  edm::LogInfo("Number of inner SIC crystals with different alpha= ")<<nxt;
1529  // end laserAlpha from type EE
1530 
1531  } else if (getLaserAlphaFromFileEE_) {
1532  edm::LogInfo(" EE laser alphas from file");
1533 
1534  std::ifstream fEE(edm::FileInPath(EELaserAlphaFile_).fullPath().c_str());
1535 
1536  for(int crystal = 0; crystal < 14648; crystal++) {
1537  int x, y ,z;
1538  float alpha = 1;
1539  fEE >> z >> x >> y >> alpha;
1540  if(x < 1 || x > 100 || y < 1 || y > 100 || z==0 || z>1 || z<-1 ) {
1541  edm::LogInfo("ERROR: wrong coordinates for crystal ")
1542  << " x " << x << " y " << y << " z " << z ;
1543  edm::LogInfo(" the format of the file should be z x y alpha ");
1544  } else {
1545  if (EEDetId::validDetId(x, y, z)) {
1546  EEDetId eedetidpos(x, y, z);
1547  ical->setValue( eedetidpos, alpha );
1548  }
1549  else // should not occur
1550  edm::LogInfo(" problem with EEDetId ") << " x " << x << " y " << y << " z " << z ;
1551  }
1552  }
1553  fEE.close();
1554 
1555  // end laser alpha from file EE
1556  } else {
1557  // alphas from python config file
1558  edm::LogInfo(" EE laser alphas from default values");
1559  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
1560  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
1561  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
1562  if (EEDetId::validDetId(iX,iY,1)) {
1563  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1564  EEDetId eedetidpos(iX,iY,1);
1565  ical->setValue( eedetidpos, laserAlphaMean_ + r*laserAlphaSigma_ );
1566  }
1567  if (EEDetId::validDetId(iX,iY,-1)) {
1568  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
1569  EEDetId eedetidneg(iX,iY,-1);
1570  ical->setValue( eedetidneg, laserAlphaMean_ + r1*laserAlphaSigma_ );
1571  }
1572  } // loop over iY
1573  } // loop over iX
1574  }
1575 
1576  return ical;
1577 
1578 }
type
Definition: HCALResponse.h:21
float alpha
Definition: AMPTWrapper.h:95
static const int MIN_IPHI
Definition: EBDetId.h:135
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
T sqrt(T t)
Definition: SSEVec.h:18
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
batch
Use ROOT&#39;s batch mode, unless outputting to C macros, since there is a bug in pyROOT that fails to ex...
Definition: core.py:65
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:302
static const int SMCRYSTALMODE
Definition: EBDetId.h:159
std::unique_ptr< EcalLaserAPDPNRatios > EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios ( const EcalLaserAPDPNRatiosRcd )
virtual

Definition at line 1620 of file EcalTrivialConditionRetriever.cc.

References EBDetId::approxEta(), EnergyResolutionVsLumi::calcampDropTotal(), drop, edm::Timestamp::endOfTime(), PVValHelper::eta, mps_fire::i, EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, cmsBatch::log, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p1, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p2, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p3, alignCSCRings::r, diffTwoXMLs::r1, rand(), EnergyResolutionVsLumi::setInstLumi(), EnergyResolutionVsLumi::setLumi(), mathSSE::sqrt(), EcalLaserAPDPNRatios::EcalLaserTimeStamp::t1, EcalLaserAPDPNRatios::EcalLaserTimeStamp::t2, EcalLaserAPDPNRatios::EcalLaserTimeStamp::t3, funct::tan(), EBDetId::validDetId(), EEDetId::validDetId(), and relativeConstraints::value.

Referenced by EcalTrivialConditionRetriever().

1621 {
1622  EnergyResolutionVsLumi ageing;
1623  ageing.setLumi(totLumi_);
1624  ageing.setInstLumi(instLumi_);
1625 
1626 
1627  auto ical = std::make_unique<EcalLaserAPDPNRatios>();
1628  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
1629  if(ieta==0) continue;
1630 
1631 
1632 
1633  double eta=EBDetId::approxEta(EBDetId(ieta,1));
1634 
1635  eta = fabs(eta);
1636  double drop=ageing.calcampDropTotal(eta);
1637  edm::LogInfo("EB at eta=")<<eta<<" dropping by "<<drop;
1638 
1639  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
1640  if (EBDetId::validDetId(ieta,iphi)) {
1641  EBDetId ebid(ieta,iphi);
1642  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1643 
1645  pairAPDPN.p1 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1646  pairAPDPN.p2 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1647  pairAPDPN.p3 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1648  ical->setValue( ebid, pairAPDPN );
1649  }
1650  }
1651  }
1652 
1653 
1654  edm::LogInfo("----- EE -----");
1655 
1656  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
1657  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
1658  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
1659 
1660 
1661  if (EEDetId::validDetId(iX,iY,1)) {
1662  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1663  EEDetId eedetidpos(iX,iY,1);
1664 
1665  double eta= -log(tan(0.5*atan(sqrt((iX-50.0)
1666  *(iX-50.0)+
1667  (iY-50.0)*
1668  (iY-50.0))
1669  *2.98/328.)));
1670  eta = fabs(eta);
1671  double drop=ageing.calcampDropTotal(eta);
1672  if(iX==50) edm::LogInfo("EE at eta=")<<eta<<" dropping by "<<drop;
1673 
1674 
1676  pairAPDPN.p1 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1677  pairAPDPN.p2 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1678  pairAPDPN.p3 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1679  ical->setValue( eedetidpos, pairAPDPN );
1680  }
1681 
1682  if (EEDetId::validDetId(iX,iY,-1)) {
1683  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
1684  EEDetId eedetidneg(iX,iY,-1);
1685 
1686  double eta= -log(tan(0.5*atan(sqrt((iX-50.0)*(iX-50.0)+(iY-50.0)*(iY-50.0))*2.98/328.)));
1687  eta = fabs(eta);
1688  double drop=ageing.calcampDropTotal(eta);
1689  if(iX==50) edm::LogInfo("EE at eta=")<<eta<<" dropping by "<<drop;
1690 
1691 
1693  pairAPDPN.p1 = laserAPDPNMean_*drop + r1*laserAPDPNSigma_;
1694  pairAPDPN.p2 = laserAPDPNMean_*drop + r1*laserAPDPNSigma_;
1695  pairAPDPN.p3 = laserAPDPNMean_*drop + r1*laserAPDPNSigma_;
1696  ical->setValue( eedetidneg, pairAPDPN );
1697  }
1698  }
1699  }
1700 
1702  // for(int i=1; i<=92; i++){
1703  for(int i=0; i<92; i++){
1704  TimeStamp.t1 = Timestamp(laserAPDPNTime1_);
1705  if(laserAPDPNTime2_ == 0 ){
1706  TimeStamp.t2 = Timestamp(edm::Timestamp::endOfTime().value());
1707  } else {
1708  TimeStamp.t2 = Timestamp(laserAPDPNTime2_);
1709  }
1710  if(laserAPDPNTime3_ == 0 ){
1711  TimeStamp.t3 = Timestamp(edm::Timestamp::endOfTime().value());
1712  } else {
1713  TimeStamp.t3 = Timestamp(laserAPDPNTime3_);
1714  }
1715 
1716  ical->setTime( i, TimeStamp );
1717  }
1718 
1719  return ical;
1720 
1721 }
float approxEta() const
Definition: EBDetId.h:102
static const int MIN_IPHI
Definition: EBDetId.h:135
static Timestamp endOfTime()
Definition: Timestamp.h:102
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
T sqrt(T t)
Definition: SSEVec.h:18
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
const int drop
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:302
double calcampDropTotal(double eta)
std::unique_ptr< EcalLaserAPDPNRatiosRef > EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef ( const EcalLaserAPDPNRatiosRefRcd )
virtual

Definition at line 1584 of file EcalTrivialConditionRetriever.cc.

References EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, alignCSCRings::r, diffTwoXMLs::r1, rand(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

1585 {
1586  auto ical = std::make_unique<EcalLaserAPDPNRatiosRef>();
1587  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
1588  if(ieta==0) continue;
1589  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
1590  if (EBDetId::validDetId(ieta,iphi)) {
1591  EBDetId ebid(ieta,iphi);
1592  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1593  ical->setValue( ebid, laserAPDPNRefMean_ + r*laserAPDPNRefSigma_ );
1594  }
1595  }
1596  }
1597 
1598  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
1599  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
1600  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
1601  if (EEDetId::validDetId(iX,iY,1)) {
1602  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1603  EEDetId eedetidpos(iX,iY,1);
1604  ical->setValue( eedetidpos, laserAPDPNRefMean_ + r*laserAPDPNRefSigma_ );
1605  }
1606 
1607  if (EEDetId::validDetId(iX,iY,-1)) {
1608  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
1609  EEDetId eedetidneg(iX,iY,-1);
1610  ical->setValue( eedetidneg, laserAPDPNRefMean_ + r1*laserAPDPNRefSigma_ );
1611  }
1612  }
1613  }
1614 
1615  return ical;
1616 }
static const int MIN_IPHI
Definition: EBDetId.h:135
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:302
std::unique_ptr< EcalLinearCorrections > EcalTrivialConditionRetriever::produceEcalLinearCorrections ( const EcalLinearCorrectionsRcd )
virtual

Definition at line 647 of file EcalTrivialConditionRetriever.cc.

References edm::Timestamp::endOfTime(), mps_fire::i, EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, EcalTimeDependentCorrections::Values::p1, EcalTimeDependentCorrections::Values::p2, EcalTimeDependentCorrections::Values::p3, alignCSCRings::r, diffTwoXMLs::r1, rand(), EcalTimeDependentCorrections::Times::t1, EcalTimeDependentCorrections::Times::t2, EcalTimeDependentCorrections::Times::t3, EBDetId::validDetId(), EEDetId::validDetId(), and relativeConstraints::value.

Referenced by EcalTrivialConditionRetriever().

648 {
649  auto ical = std::make_unique<EcalLinearCorrections>();
650 
651  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
652  if(ieta==0) continue;
653  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
654  if (EBDetId::validDetId(ieta,iphi)) {
655  EBDetId ebid(ieta,iphi);
656  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
657 
659  pairAPDPN.p1 = linCorrMean_ + r*linCorrSigma_;
660  pairAPDPN.p2 = linCorrMean_ + r*linCorrSigma_;
661  pairAPDPN.p3 = linCorrMean_ + r*linCorrSigma_;
662  ical->setValue( ebid, pairAPDPN );
663  }
664  }
665  }
666 
667  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
668  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
669  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
670  if (EEDetId::validDetId(iX,iY,1)) {
671  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
672  EEDetId eedetidpos(iX,iY,1);
673 
675  pairAPDPN.p1 = linCorrMean_ + r*linCorrSigma_;
676  pairAPDPN.p2 = linCorrMean_ + r*linCorrSigma_;
677  pairAPDPN.p3 = linCorrMean_ + r*linCorrSigma_;
678 
679  ical->setValue( eedetidpos, pairAPDPN );
680  }
681 
682  if (EEDetId::validDetId(iX,iY,-1)) {
683  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
684  EEDetId eedetidneg(iX,iY,-1);
685 
687  pairAPDPN.p1 = linCorrMean_ + r1*linCorrSigma_;
688  pairAPDPN.p2 = linCorrMean_ + r1*linCorrSigma_;
689  pairAPDPN.p3 = linCorrMean_ + r1*linCorrSigma_;
690 
691  ical->setValue( eedetidneg, pairAPDPN );
692  }
693  }
694  }
695 
697  // for(int i=1; i<=92; i++){
698  for(int i=0; i<92; i++){
699  TimeStamp.t1 = Timestamp(linearTime1_);
700  if(linearTime2_ == 0 ){
701  TimeStamp.t2 = Timestamp(edm::Timestamp::endOfTime().value());
702  } else {
703  TimeStamp.t2 = Timestamp(linearTime2_);
704  }
705  if(linearTime3_ == 0 ){
706  TimeStamp.t3 = Timestamp(edm::Timestamp::endOfTime().value());
707  } else {
708  TimeStamp.t3 = Timestamp(linearTime3_);
709  }
710 
711  ical->setTime( i, TimeStamp );
712  }
713 
714  return ical;
715 
716 }
static const int MIN_IPHI
Definition: EBDetId.h:135
static Timestamp endOfTime()
Definition: Timestamp.h:102
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:302
std::unique_ptr< EcalMappingElectronics > EcalTrivialConditionRetriever::produceEcalMappingElectronics ( const EcalMappingElectronicsRcd )
virtual

Definition at line 3526 of file EcalTrivialConditionRetriever.cc.

Referenced by EcalTrivialConditionRetriever().

3527 {
3528 
3529  auto ical = std::make_unique<EcalMappingElectronics>();
3530  return ical;
3531 }
std::unique_ptr< EcalPedestals > EcalTrivialConditionRetriever::produceEcalPedestals ( const EcalPedestalsRcd )
virtual

Definition at line 533 of file EcalTrivialConditionRetriever.cc.

References EBDetId::approxEta(), EnergyResolutionVsLumi::calcnoiseIncreaseADC(), PVValHelper::eta, EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EcalPedestal::mean_x1, EcalPedestal::mean_x12, EcalPedestal::mean_x6, EBDetId::MIN_IPHI, DetId::rawId(), EcalPedestal::rms_x1, EcalPedestal::rms_x12, EcalPedestal::rms_x6, EnergyResolutionVsLumi::setInstLumi(), EnergyResolutionVsLumi::setLumi(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

533  {
534  auto peds = std::make_unique<EcalPedestals>();
535  EcalPedestals::Item EBitem;
536  EcalPedestals::Item EEitem;
537 
538  EBitem.mean_x1 = EBpedMeanX1_;
539  EBitem.rms_x1 = EBpedRMSX1_;
540  EBitem.mean_x6 = EBpedMeanX6_;
541  EBitem.rms_x6 = EBpedRMSX6_;
542  EBitem.mean_x12 = EBpedMeanX12_;
543  EBitem.rms_x12 = EBpedRMSX12_;
544 
545  EEitem.mean_x1 = EEpedMeanX1_;
546  EEitem.rms_x1 = EEpedRMSX1_;
547  EEitem.mean_x6 = EEpedMeanX6_;
548  EEitem.rms_x6 = EEpedRMSX6_;
549  EEitem.mean_x12 = EEpedMeanX12_;
550  EEitem.rms_x12 = EEpedRMSX12_;
551 
552 
553 
554 
555 
556  for(int iEta=-EBDetId::MAX_IETA; iEta<=EBDetId::MAX_IETA ;++iEta) {
557  if(iEta==0) continue;
558 
559  if(totLumi_>0) {
560  double eta=EBDetId::approxEta(EBDetId(iEta,1));
561 
562  EnergyResolutionVsLumi ageing;
563  ageing.setLumi(totLumi_);
564  ageing.setInstLumi(instLumi_);
565  eta = fabs(eta);
566  double noisefactor= ageing.calcnoiseIncreaseADC(eta);
567 
568 
569  EBitem.rms_x1 = EBpedRMSX1_*noisefactor;
570  EBitem.rms_x6 = EBpedRMSX6_*noisefactor;
571  EBitem.rms_x12 = EBpedRMSX12_*noisefactor;
572  edm::LogInfo("rms ped at eta:")<< eta<<" ="<< EBitem.rms_x12;
573  }
574 
575 
576 
577  for(int iPhi=EBDetId::MIN_IPHI; iPhi<=EBDetId::MAX_IPHI; ++iPhi) {
578  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
579  if (EBDetId::validDetId(iEta,iPhi))
580  {
581  EBDetId ebdetid(iEta,iPhi);
582  peds->insert(std::make_pair(ebdetid.rawId(),EBitem));
583  }
584  }
585  }
586 
587  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
588  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
589  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
590  if (EEDetId::validDetId(iX,iY,1))
591  {
592  EEDetId eedetidpos(iX,iY,1);
593  peds->insert(std::make_pair(eedetidpos.rawId(),EEitem));
594  }
595  if(EEDetId::validDetId(iX,iY,-1))
596  {
597  EEDetId eedetidneg(iX,iY,-1);
598  peds->insert(std::make_pair(eedetidneg.rawId(),EEitem));
599  }
600  }
601  }
602 
603  //return std::unique_ptr<EcalPedestals>( peds );
604  return peds;
605 }
float approxEta() const
Definition: EBDetId.h:102
static const int MIN_IPHI
Definition: EBDetId.h:135
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
double calcnoiseIncreaseADC(double eta)
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
static const int IY_MAX
Definition: EEDetId.h:302
std::unique_ptr< EcalPFRecHitThresholds > EcalTrivialConditionRetriever::produceEcalPFRecHitThresholds ( const EcalPFRecHitThresholdsRcd )
virtual

Definition at line 721 of file EcalTrivialConditionRetriever.cc.

References EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, DetId::rawId(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

722 {
723  auto ical = std::make_unique<EcalPFRecHitThresholds>();
724 
725  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
726  if(ieta==0) continue;
727  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
728  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
729  if (EBDetId::validDetId(ieta,iphi))
730  {
731  EBDetId ebid(ieta,iphi);
732  ical->setValue( ebid.rawId(), pfRecHitThresholdsEB_ );
733  }
734  }
735  }
736 
737  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
738  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
739  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
740  if (EEDetId::validDetId(iX,iY,1))
741  {
742  EEDetId eedetidpos(iX,iY,1);
743  ical->setValue( eedetidpos.rawId(), pfRecHitThresholdsEE_ );
744  }
745  if(EEDetId::validDetId(iX,iY,-1))
746  {
747  EEDetId eedetidneg(iX,iY,-1);
748  ical->setValue( eedetidneg.rawId(), pfRecHitThresholdsEE_ );
749  }
750  }
751  }
752 
753  return ical;
754 }
static const int MIN_IPHI
Definition: EBDetId.h:135
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
static const int IY_MAX
Definition: EEDetId.h:302
std::unique_ptr< EcalSampleMask > EcalTrivialConditionRetriever::produceEcalSampleMask ( const EcalSampleMaskRcd )
virtual

Definition at line 3660 of file EcalTrivialConditionRetriever.cc.

Referenced by EcalTrivialConditionRetriever().

3661 {
3662  return std::unique_ptr<EcalSampleMask>( new EcalSampleMask(sampleMaskEB_, sampleMaskEE_) );
3663 }
std::unique_ptr< EcalSamplesCorrelation > EcalTrivialConditionRetriever::produceEcalSamplesCorrelation ( const EcalSamplesCorrelationRcd )
virtual

Definition at line 3680 of file EcalTrivialConditionRetriever.cc.

References popcon2dropbox::copy(), f, and getEcalSimPulseShapeFromConfiguration().

Referenced by EcalTrivialConditionRetriever().

3680  {
3682  std::ifstream f;
3683  f.open(edm::FileInPath(SamplesCorrelationFile_).fullPath().c_str());
3684  float ww;
3685  for(int j = 0; j < 10; ++j) {
3686  f >> ww;
3687  EBG12samplesCorrelation_.push_back(ww);
3688  }
3689  for(int j = 0; j < 10; ++j) {
3690  f >> ww;
3691  EBG6samplesCorrelation_.push_back(ww);
3692  }
3693  for(int j = 0; j < 10; ++j) {
3694  f >> ww;
3695  EBG1samplesCorrelation_.push_back(ww);
3696  }
3697  for(int j = 0; j < 10; ++j) {
3698  f >> ww;
3699  EEG12samplesCorrelation_.push_back(ww);
3700  }
3701  for(int j = 0; j < 10; ++j) {
3702  f >> ww;
3703  EEG6samplesCorrelation_.push_back(ww);
3704  }
3705  for(int j = 0; j < 10; ++j) {
3706  f >> ww;
3707  EEG1samplesCorrelation_.push_back(ww);
3708  }
3709  f.close();
3710  }
3711  auto ipar = std::make_unique<EcalSamplesCorrelation>();
3713  back_inserter(ipar->EBG12SamplesCorrelation));
3715  back_inserter(ipar->EBG6SamplesCorrelation));
3717  back_inserter(ipar->EBG1SamplesCorrelation));
3719  back_inserter(ipar->EEG12SamplesCorrelation));
3721  back_inserter(ipar->EEG6SamplesCorrelation));
3723  back_inserter(ipar->EEG1SamplesCorrelation));
3724  return ipar;
3725 }
def copy(args, dbName)
double f[11][100]
std::unique_ptr< EcalTBWeights > EcalTrivialConditionRetriever::produceEcalTBWeights ( const EcalTBWeightsRcd )
virtual
   for(size_t i=0; i<3; ++i) {
   std::vector<EcalWeight> tv1, tv2;
   for(size_t j=0; j<10; ++j) {
   double ww = igrp*itdc*r + i*10. + j;

std::cout << "row: " << i << " col: " << j << " - val: " << ww << std::endl; tv1.push_back( EcalWeight(ww) ); tv2.push_back( EcalWeight(100+ww) ); } mat1.push_back(tv1); mat2.push_back(tv2); }

Definition at line 1003 of file EcalTrivialConditionRetriever.cc.

References EcalWeightSet::getChi2WeightsAfterGainSwitch(), EcalWeightSet::getChi2WeightsBeforeGainSwitch(), EcalWeightSet::getWeightsAfterGainSwitch(), and EcalWeightSet::getWeightsBeforeGainSwitch().

Referenced by EcalTrivialConditionRetriever().

1004 {
1005  // create weights for the test-beam
1006  auto tbwgt = std::make_unique<EcalTBWeights>();
1007 
1008  // create weights for each distinct group ID
1009  // int nMaxTDC = 10;
1010 // for(int igrp=-EBDetId::MAX_IETA; igrp<=EBDetId::MAX_IETA; ++igrp) {
1011 // if(igrp==0) continue;
1012  int igrp=1;
1013  for(int itdc=1; itdc<=nTDCbins_; ++itdc) {
1014  // generate random number
1015  // double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1016 
1017  // make a new set of weights
1018  EcalWeightSet wgt;
1019  //typedef std::vector< std::vector<EcalWeight> > EcalWeightSet::EcalWeightMatrix;
1022 
1023 // if(verbose_>=1) {
1024 // std::cout << "initial size of mat1: " << mat1.size() << std::endl;
1025 // std::cout << "initial size of mat2: " << mat2.size() << std::endl;
1026 // }
1027 
1028  // generate random numbers to use as weights
1043  // use values provided by user
1044  mat1.Place_in_row(amplWeights_[itdc-1],0,0);
1045  mat1.Place_in_row(pedWeights_[itdc-1],1,0);
1046  mat1.Place_in_row(jittWeights_[itdc-1],2,0);
1047 
1048  // wdights after gain switch
1049  mat2.Place_in_row(amplWeightsAft_[itdc-1],0,0);
1050  mat2.Place_in_row(pedWeightsAft_[itdc-1],1,0);
1051  mat2.Place_in_row(jittWeightsAft_[itdc-1],2,0);
1052 
1053  // fill the chi2 matrcies with random numbers
1054  // r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1057  mat3=chi2Matrix_[itdc-1];
1058  mat4=chi2MatrixAft_[itdc-1];
1059 
1060  // for(size_t i=0; i<10; ++i)
1061  // {
1062  // mat3.push_back(chi2Matrix_[itdc-1][i]);
1063  // mat4.push_back(chi2MatrixAft_[itdc-1][i]);
1064  // }
1065  // std::vector<EcalWeight> tv1, tv2;
1066  // for(size_t j=0; j<10; ++j) {
1067  // double ww = igrp*itdc*r + i*10. + j;
1068  // tv1.push_back( EcalWeight(1000+ww) );
1069  // tv2.push_back( EcalWeight(1000+100+ww) );
1070  // }
1071 
1072 
1073 
1074 
1075 // if(verbose_>=1) {
1076 // std::cout << "group: " << igrp << " TDC: " << itdc
1077 // << " mat1: " << mat1.size() << " mat2: " << mat2.size()
1078 // << " mat3: " << mat3.size() << " mat4: " << mat4.size()
1079 // << std::endl;
1080 // }
1081 
1082  // put the weight in the container
1083  tbwgt->setValue(std::make_pair(igrp,itdc), wgt);
1084  }
1085  // }
1086  return tbwgt;
1087 }
EcalChi2WeightMatrix & getChi2WeightsBeforeGainSwitch()
Definition: EcalWeightSet.h:31
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeightsAft_
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > pedWeightsAft_
EcalChi2WeightMatrix & getChi2WeightsAfterGainSwitch()
Definition: EcalWeightSet.h:32
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > pedWeights_
EcalWeightMatrix & getWeightsAfterGainSwitch()
Definition: EcalWeightSet.h:30
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > amplWeights_
math::Matrix< 10, 10 >::type EcalChi2WeightMatrix
Definition: EcalWeightSet.h:23
std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2MatrixAft_
EcalWeightMatrix & getWeightsBeforeGainSwitch()
Definition: EcalWeightSet.h:29
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > amplWeightsAft_
math::Matrix< 3, 10 >::type EcalWeightMatrix
Definition: EcalWeightSet.h:22
std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix_
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeights_
std::unique_ptr< EcalTimeBiasCorrections > EcalTrivialConditionRetriever::produceEcalTimeBiasCorrections ( const EcalTimeBiasCorrectionsRcd )
virtual

Definition at line 3666 of file EcalTrivialConditionRetriever.cc.

References popcon2dropbox::copy().

Referenced by EcalTrivialConditionRetriever().

3666  {
3667  auto ipar = std::make_unique<EcalTimeBiasCorrections>();
3669  back_inserter(ipar->EBTimeCorrAmplitudeBins));
3671  back_inserter(ipar->EBTimeCorrShiftBins));
3673  back_inserter(ipar->EETimeCorrAmplitudeBins));
3675  back_inserter(ipar->EETimeCorrShiftBins));
3676  return ipar;
3677 }
def copy(args, dbName)
std::unique_ptr< EcalTimeCalibConstants > EcalTrivialConditionRetriever::produceEcalTimeCalibConstants ( const EcalTimeCalibConstantsRcd )
virtual

Definition at line 876 of file EcalTrivialConditionRetriever.cc.

References EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, alignCSCRings::r, diffTwoXMLs::r1, rand(), DetId::rawId(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

877 {
878  auto ical = std::make_unique<EcalTimeCalibConstants>();
879 
880  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
881  if(ieta==0) continue;
882  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
883  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
884  if (EBDetId::validDetId(ieta,iphi))
885  {
886  EBDetId ebid(ieta,iphi);
887  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
888  ical->setValue( ebid.rawId(), timeCalibConstantMean_ + r*timeCalibConstantSigma_ );
889  }
890  }
891  }
892 
893  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
894  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
895  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
896  if (EEDetId::validDetId(iX,iY,1))
897  {
898  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
899  EEDetId eedetidpos(iX,iY,1);
900  ical->setValue( eedetidpos.rawId(), timeCalibConstantMean_ + r*timeCalibConstantSigma_ );
901  }
902  if(EEDetId::validDetId(iX,iY,-1))
903  {
904  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
905  EEDetId eedetidneg(iX,iY,-1);
906  ical->setValue( eedetidneg.rawId(), timeCalibConstantMean_ + r1*timeCalibConstantSigma_ );
907  }
908  }
909  }
910 
911  return ical;
912 }
static const int MIN_IPHI
Definition: EBDetId.h:135
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:302
std::unique_ptr< EcalTimeCalibErrors > EcalTrivialConditionRetriever::produceEcalTimeCalibErrors ( const EcalTimeCalibErrorsRcd )
virtual

Definition at line 915 of file EcalTrivialConditionRetriever.cc.

References EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, DetId::rawId(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

916 {
917  auto ical = std::make_unique<EcalTimeCalibErrors>();
918 
919  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
920  if(ieta==0) continue;
921  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
922  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
923  if (EBDetId::validDetId(ieta,iphi))
924  {
925  EBDetId ebid(ieta,iphi);
926  ical->setValue( ebid.rawId(), timeCalibErrorMean_);
927  }
928  }
929  }
930 
931  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
932  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
933  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
934  if (EEDetId::validDetId(iX,iY,1))
935  {
936  EEDetId eedetidpos(iX,iY,1);
937  ical->setValue( eedetidpos.rawId(), timeCalibErrorMean_ );
938  }
939  if(EEDetId::validDetId(iX,iY,-1))
940  {
941  EEDetId eedetidneg(iX,iY,-1);
942  ical->setValue( eedetidneg.rawId(), timeCalibErrorMean_ );
943  }
944  }
945  }
946 
947  return ical;
948 }
static const int MIN_IPHI
Definition: EBDetId.h:135
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
static const int IY_MAX
Definition: EEDetId.h:302
std::unique_ptr< EcalTimeOffsetConstant > EcalTrivialConditionRetriever::produceEcalTimeOffsetConstant ( const EcalTimeOffsetConstantRcd )
virtual

Definition at line 951 of file EcalTrivialConditionRetriever.cc.

Referenced by EcalTrivialConditionRetriever().

952 {
953  edm::LogInfo(" produceEcalTimeOffsetConstant: ");
955  return std::make_unique<EcalTimeOffsetConstant>(timeOffsetEBConstant_,timeOffsetEEConstant_);
956 }
std::unique_ptr< EcalTPGCrystalStatus > EcalTrivialConditionRetriever::produceEcalTrgChannelStatus ( const EcalTPGCrystalStatusRcd )
virtual

Definition at line 2708 of file EcalTrivialConditionRetriever.cc.

References getIntercalibConstantsFromConfiguration(), EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

2709 {
2710 
2711  auto ical = std::make_unique<EcalTPGCrystalStatus>();
2712  // barrel
2713  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
2714  if(ieta==0) continue;
2715  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
2716  if (EBDetId::validDetId(ieta,iphi)) {
2717  EBDetId ebid(ieta,iphi);
2718  ical->setValue( ebid, 0 );
2719  }
2720  }
2721  }
2722  // endcap
2723  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
2724  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
2725  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
2726  if (EEDetId::validDetId(iX,iY,1)) {
2727  EEDetId eedetidpos(iX,iY,1);
2728  ical->setValue( eedetidpos, 0 );
2729  }
2730  if (EEDetId::validDetId(iX,iY,-1)) {
2731  EEDetId eedetidneg(iX,iY,-1);
2732  ical->setValue( eedetidneg, 0 );
2733  }
2734  }
2735  }
2736  return ical;
2737 }
static const int MIN_IPHI
Definition: EBDetId.h:135
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
static const int IY_MAX
Definition: EEDetId.h:302
std::unique_ptr< EcalWeightXtalGroups > EcalTrivialConditionRetriever::produceEcalWeightXtalGroups ( const EcalWeightXtalGroupsRcd )
virtual

Definition at line 610 of file EcalTrivialConditionRetriever.cc.

References EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, DetId::rawId(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

611 {
612  auto xtalGroups = std::make_unique<EcalWeightXtalGroups>();
613  EcalXtalGroupId defaultGroupId(1);
614  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
615  if(ieta==0) continue;
616  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
617  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
618  if (EBDetId::validDetId(ieta,iphi))
619  {
620  EBDetId ebid(ieta,iphi);
621  // xtalGroups->setValue(ebid.rawId(), EcalXtalGroupId(ieta) ); // define rings in eta
622  xtalGroups->setValue(ebid.rawId(), defaultGroupId ); // define rings in eta
623  }
624  }
625  }
626 
627  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
628  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
629  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
630  if (EEDetId::validDetId(iX,iY,1))
631  {
632  EEDetId eedetidpos(iX,iY,1);
633  xtalGroups->setValue(eedetidpos.rawId(), defaultGroupId );
634  }
635  if(EEDetId::validDetId(iX,iY,-1))
636  {
637  EEDetId eedetidneg(iX,iY,-1);
638  xtalGroups->setValue(eedetidneg.rawId(), defaultGroupId );
639  }
640  }
641  }
642  return xtalGroups;
643 }
static const int MIN_IPHI
Definition: EBDetId.h:135
static const int IX_MIN
Definition: EEDetId.h:290
static const int IY_MIN
Definition: EEDetId.h:294
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
static const int IY_MAX
Definition: EEDetId.h:302
void EcalTrivialConditionRetriever::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey rk,
const edm::IOVSyncValue iTime,
edm::ValidityInterval oValidity 
)
overrideprotectedvirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 522 of file EcalTrivialConditionRetriever.cc.

References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), edm::eventsetup::EventSetupRecordKey::name(), edm::IOVSyncValue::time(), and edm::Timestamp::value().

525 {
526  if(verbose_>=1) edm::LogInfo("EcalTrivialConditionRetriever::setIntervalFor(): record key = ") << rk.name() << "\ttime: " << iTime.time().value();
527  //For right now, we will just use an infinite interval of validity
529 }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
const Timestamp & time() const
Definition: IOVSyncValue.h:42
TimeValue_t value() const
Definition: Timestamp.h:56

Member Data Documentation

double EcalTrivialConditionRetriever::adcToGeVEBConstant_
private

Definition at line 204 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::adcToGeVEEConstant_
private

Definition at line 205 of file EcalTrivialConditionRetriever.h.

std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > EcalTrivialConditionRetriever::amplWeights_
private

Definition at line 293 of file EcalTrivialConditionRetriever.h.

std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > EcalTrivialConditionRetriever::amplWeightsAft_
private

Definition at line 294 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::amplWeightsAftFile_
private

Definition at line 306 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::amplWeightsFile_
private

Definition at line 305 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::APDSimPulseShapeFile_
private

Definition at line 343 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::channelStatusFile_
private

Definition at line 319 of file EcalTrivialConditionRetriever.h.

std::vector< EcalWeightSet::EcalChi2WeightMatrix > EcalTrivialConditionRetriever::chi2Matrix_
private

Definition at line 302 of file EcalTrivialConditionRetriever.h.

std::vector< EcalWeightSet::EcalChi2WeightMatrix > EcalTrivialConditionRetriever::chi2MatrixAft_
private

Definition at line 303 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::chi2MatrixAftFile_
private

Definition at line 312 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::chi2MatrixFile_
private

Definition at line 311 of file EcalTrivialConditionRetriever.h.

std::vector<double> EcalTrivialConditionRetriever::crackCorrParameters_
private

Definition at line 226 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EBAlignmentFile_
private

Definition at line 322 of file EcalTrivialConditionRetriever.h.

std::vector<double> EcalTrivialConditionRetriever::EBG12samplesCorrelation_
private

Definition at line 334 of file EcalTrivialConditionRetriever.h.

std::vector<double> EcalTrivialConditionRetriever::EBG1samplesCorrelation_
private

Definition at line 336 of file EcalTrivialConditionRetriever.h.

std::vector<double> EcalTrivialConditionRetriever::EBG6samplesCorrelation_
private

Definition at line 335 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EBLaserAlphaFile_
private

Definition at line 325 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedMeanX12_
private

Definition at line 276 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedMeanX1_
private

Definition at line 280 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedMeanX6_
private

Definition at line 278 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedRMSX12_
private

Definition at line 277 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedRMSX1_
private

Definition at line 281 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedRMSX6_
private

Definition at line 279 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EBSimPulseShapeFile_
private

Definition at line 341 of file EcalTrivialConditionRetriever.h.

std::vector<double> EcalTrivialConditionRetriever::EBtimeCorrAmplitudeBins_
private

Definition at line 329 of file EcalTrivialConditionRetriever.h.

std::vector<double> EcalTrivialConditionRetriever::EBtimeCorrShiftBins_
private

Definition at line 330 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EEAlignmentFile_
private

Definition at line 323 of file EcalTrivialConditionRetriever.h.

std::vector<double> EcalTrivialConditionRetriever::EEG12samplesCorrelation_
private

Definition at line 337 of file EcalTrivialConditionRetriever.h.

std::vector<double> EcalTrivialConditionRetriever::EEG1samplesCorrelation_
private

Definition at line 339 of file EcalTrivialConditionRetriever.h.

std::vector<double> EcalTrivialConditionRetriever::EEG6samplesCorrelation_
private

Definition at line 338 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EELaserAlphaFile2_
private

Definition at line 246 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EELaserAlphaFile_
private

Definition at line 326 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedMeanX12_
private

Definition at line 283 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedMeanX1_
private

Definition at line 287 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedMeanX6_
private

Definition at line 285 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedRMSX12_
private

Definition at line 284 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedRMSX1_
private

Definition at line 288 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedRMSX6_
private

Definition at line 286 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EESimPulseShapeFile_
private

Definition at line 342 of file EcalTrivialConditionRetriever.h.

std::vector<double> EcalTrivialConditionRetriever::EEtimeCorrAmplitudeBins_
private

Definition at line 331 of file EcalTrivialConditionRetriever.h.

std::vector<double> EcalTrivialConditionRetriever::EEtimeCorrShiftBins_
private

Definition at line 332 of file EcalTrivialConditionRetriever.h.

std::vector<double> EcalTrivialConditionRetriever::energyCorrectionObjectSpecificParameters_
private

Definition at line 229 of file EcalTrivialConditionRetriever.h.

std::vector<double> EcalTrivialConditionRetriever::energyCorrectionParameters_
private

Definition at line 227 of file EcalTrivialConditionRetriever.h.

std::vector<double> EcalTrivialConditionRetriever::energyUncertaintyParameters_
private

Definition at line 228 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::ESAlignmentFile_
private

Definition at line 324 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::gainRatio12over6_
private

Definition at line 290 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::gainRatio6over1_
private

Definition at line 291 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getEBAlignmentFromFile_
private

Definition at line 379 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getEEAlignmentFromFile_
private

Definition at line 380 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getESAlignmentFromFile_
private

Definition at line 381 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getLaserAlphaFromFileEB_
private

Definition at line 385 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getLaserAlphaFromFileEE_
private

Definition at line 386 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getLaserAlphaFromTypeEB_
private

Definition at line 387 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getLaserAlphaFromTypeEE_
private

Definition at line 388 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getSamplesCorrelationFromFile_
private

Definition at line 392 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getSimPulseShapeFromFile_
private

Definition at line 383 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getWeightsFromFile_
private

Definition at line 348 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::instLumi_
private

Definition at line 251 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::intercalibConstantMean_
private

Definition at line 208 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::intercalibConstantMeanMC_
private

Definition at line 211 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::intercalibConstantsFile_
private

Definition at line 314 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::intercalibConstantSigma_
private

Definition at line 209 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::intercalibConstantSigmaMC_
private

Definition at line 212 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::intercalibConstantsMCFile_
private

Definition at line 315 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::intercalibErrorMean_
private

Definition at line 215 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::intercalibErrorsFile_
private

Definition at line 316 of file EcalTrivialConditionRetriever.h.

std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > EcalTrivialConditionRetriever::jittWeights_
private

Definition at line 299 of file EcalTrivialConditionRetriever.h.

std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > EcalTrivialConditionRetriever::jittWeightsAft_
private

Definition at line 300 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::jittWeightsAftFile_
private

Definition at line 310 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::jittWeightsFile_
private

Definition at line 309 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAlphaMean_
private

Definition at line 254 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAlphaMeanEBC_
private

Definition at line 257 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAlphaMeanEBR_
private

Definition at line 256 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAlphaMeanEEC_
private

Definition at line 259 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAlphaMeanEEC_higheta_
private

Definition at line 241 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAlphaMeanEER_
private

Definition at line 258 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAlphaMeanEER_higheta_
private

Definition at line 240 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAlphaSigma_
private

Definition at line 255 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAPDPNMean_
private

Definition at line 263 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAPDPNRefMean_
private

Definition at line 261 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAPDPNRefSigma_
private

Definition at line 262 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAPDPNSigma_
private

Definition at line 264 of file EcalTrivialConditionRetriever.h.

unsigned long EcalTrivialConditionRetriever::laserAPDPNTime1_
private

Definition at line 265 of file EcalTrivialConditionRetriever.h.

unsigned long EcalTrivialConditionRetriever::laserAPDPNTime2_
private

Definition at line 266 of file EcalTrivialConditionRetriever.h.

unsigned long EcalTrivialConditionRetriever::laserAPDPNTime3_
private

Definition at line 267 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::linCorrMean_
private

Definition at line 269 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::linCorrSigma_
private

Definition at line 270 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::linearCorrectionsFile_
private

Definition at line 313 of file EcalTrivialConditionRetriever.h.

unsigned long EcalTrivialConditionRetriever::linearTime1_
private

Definition at line 272 of file EcalTrivialConditionRetriever.h.

unsigned long EcalTrivialConditionRetriever::linearTime2_
private

Definition at line 273 of file EcalTrivialConditionRetriever.h.

unsigned long EcalTrivialConditionRetriever::linearTime3_
private

Definition at line 274 of file EcalTrivialConditionRetriever.h.

std::vector<double> EcalTrivialConditionRetriever::localContCorrParameters_
private

Definition at line 225 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::mappingFile_
private

Definition at line 321 of file EcalTrivialConditionRetriever.h.

int EcalTrivialConditionRetriever::nTDCbins_
private

Definition at line 346 of file EcalTrivialConditionRetriever.h.

std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > EcalTrivialConditionRetriever::pedWeights_
private

Definition at line 296 of file EcalTrivialConditionRetriever.h.

std::vector< ROOT::Math::SVector<double,EcalDataFrame::MAXSAMPLES> > EcalTrivialConditionRetriever::pedWeightsAft_
private

Definition at line 297 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::pedWeightsAftFile_
private

Definition at line 308 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::pedWeightsFile_
private

Definition at line 307 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::pfRecHitFile_
private

Definition at line 243 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::pfRecHitFileEE_
private

Definition at line 244 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::pfRecHitThresholdsEB_
private

Definition at line 232 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::pfRecHitThresholdsEE_
private

Definition at line 233 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::pfRecHitThresholdsNSigmas_
private

Definition at line 230 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::pfRecHitThresholdsNSigmasHEta_
private

Definition at line 231 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalADCToGeVConstant_
private

Definition at line 360 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalAlignmentEB_
private

Definition at line 374 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalAlignmentEE_
private

Definition at line 375 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalAlignmentES_
private

Definition at line 376 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalChannelStatus_
private

Definition at line 362 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalClusterCrackCorrParameters_
private

Definition at line 369 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalClusterEnergyCorrectionObjectSpecificParameters_
private

Definition at line 372 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalClusterEnergyCorrectionParameters_
private

Definition at line 370 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalClusterEnergyUncertaintyParameters_
private

Definition at line 371 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalClusterLocalContCorrParameters_
private

Definition at line 368 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalDAQTowerStatus_
private

Definition at line 366 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalDCSTowerStatus_
private

Definition at line 365 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalDQMChannelStatus_
private

Definition at line 364 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalDQMTowerStatus_
private

Definition at line 363 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalGainRatios_
private

Definition at line 359 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalIntercalibConstants_
private

Definition at line 353 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalIntercalibConstantsMC_
private

Definition at line 354 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalIntercalibErrors_
private

Definition at line 355 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalLaserCorrection_
private

Definition at line 361 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalLinearCorrections_
private

Definition at line 352 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalMappingElectronics_
private

Definition at line 373 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalPedestals_
private

Definition at line 350 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalPFRecHitThresholds_
private

Definition at line 378 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalSampleMask_
private

Definition at line 389 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalSamplesCorrelation_
private

Definition at line 391 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalSimPulseShape_
private

Definition at line 377 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalTimeBiasCorrections_
private

Definition at line 390 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalTimeCalibConstants_
private

Definition at line 356 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalTimeCalibErrors_
private

Definition at line 357 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalTimeOffsetConstant_
private

Definition at line 358 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalTrgChannelStatus_
private

Definition at line 367 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalWeights_
private

Definition at line 351 of file EcalTrivialConditionRetriever.h.

unsigned int EcalTrivialConditionRetriever::sampleMaskEB_
private

Definition at line 327 of file EcalTrivialConditionRetriever.h.

unsigned int EcalTrivialConditionRetriever::sampleMaskEE_
private

Definition at line 328 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::SamplesCorrelationFile_
private

Definition at line 340 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::sim_pulse_shape_APD_thresh_
private

Definition at line 237 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::sim_pulse_shape_EB_thresh_
private

Definition at line 235 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::sim_pulse_shape_EE_thresh_
private

Definition at line 236 of file EcalTrivialConditionRetriever.h.

float EcalTrivialConditionRetriever::sim_pulse_shape_TI_
private

Definition at line 238 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::timeCalibConstantMean_
private

Definition at line 217 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::timeCalibConstantsFile_
private

Definition at line 317 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::timeCalibConstantSigma_
private

Definition at line 218 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::timeCalibErrorMean_
private

Definition at line 219 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::timeCalibErrorsFile_
private

Definition at line 318 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::timeOffsetEBConstant_
private

Definition at line 221 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::timeOffsetEEConstant_
private

Definition at line 222 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::totLumi_
private

Definition at line 250 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::trgChannelStatusFile_
private

Definition at line 320 of file EcalTrivialConditionRetriever.h.

int EcalTrivialConditionRetriever::verbose_
private

Definition at line 394 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::weightsForAsynchronousRunning_
private

Definition at line 349 of file EcalTrivialConditionRetriever.h.