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< 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< 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 ()
 
 ~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 >
ESConsumesCollector 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 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 laserAlphaMeanEER_
 
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_
 
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 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 121 of file EcalTrivialConditionRetriever.h.

Constructor & Destructor Documentation

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

Definition at line 30 of file EcalTrivialConditionRetriever.cc.

References gather_cfg::cout, getChannelStatusFromConfiguration(), getEcalSimPulseShapeFromConfiguration(), getIntercalibConstantsFromConfiguration(), getIntercalibConstantsMCFromConfiguration(), getIntercalibErrorsFromConfiguration(), getMappingFromConfiguration(), edm::ParameterSet::getParameter(), 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(), 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  localContCorrParameters_ = ps.getUntrackedParameter< std::vector<double> >("localContCorrParameters", std::vector<double>(0) );
76  crackCorrParameters_ = ps.getUntrackedParameter< std::vector<double> >("crackCorrParameters", std::vector<double>(0) );
77  energyCorrectionParameters_ = ps.getUntrackedParameter< std::vector<double> >("energyCorrectionParameters", std::vector<double>(0) );
78  energyUncertaintyParameters_ = ps.getUntrackedParameter< std::vector<double> >("energyUncertaintyParameters", std::vector<double>(0) );
79  energyCorrectionObjectSpecificParameters_ = ps.getUntrackedParameter< std::vector<double> >("energyCorrectionObjectSpecificParameters", std::vector<double>(0) );
80 
81  EBpedMeanX12_ = ps.getUntrackedParameter<double>("EBpedMeanX12", 200.);
82  EBpedRMSX12_ = ps.getUntrackedParameter<double>("EBpedRMSX12", 1.10);
83  EBpedMeanX6_ = ps.getUntrackedParameter<double>("EBpedMeanX6", 200.);
84  EBpedRMSX6_ = ps.getUntrackedParameter<double>("EBpedRMSX6", 0.90);
85  EBpedMeanX1_ = ps.getUntrackedParameter<double>("EBpedMeanX1", 200.);
86  EBpedRMSX1_ = ps.getUntrackedParameter<double>("EBpedRMSX1", 0.62);
87 
88  EEpedMeanX12_ = ps.getUntrackedParameter<double>("EEpedMeanX12", 200.);
89  EEpedRMSX12_ = ps.getUntrackedParameter<double>("EEpedRMSX12", 2.50);
90  EEpedMeanX6_ = ps.getUntrackedParameter<double>("EEpedMeanX6", 200.);
91  EEpedRMSX6_ = ps.getUntrackedParameter<double>("EEpedRMSX6", 2.00);
92  EEpedMeanX1_ = ps.getUntrackedParameter<double>("EEpedMeanX1", 200.);
93  EEpedRMSX1_ = ps.getUntrackedParameter<double>("EEpedRMSX1", 1.40);
94 
95  gainRatio12over6_ = ps.getUntrackedParameter<double>("gainRatio12over6", 2.0);
96  gainRatio6over1_ = ps.getUntrackedParameter<double>("gainRatio6over1", 6.0);
97 
98  getWeightsFromFile_ = ps.getUntrackedParameter<bool>("getWeightsFromFile",false);
99 
100  sampleMaskEB_ = ps.getUntrackedParameter<unsigned int>("sampleMaskEB",1023);
101  sampleMaskEE_ = ps.getUntrackedParameter<unsigned int>("sampleMaskEB",1023);
102 
103  EBtimeCorrAmplitudeBins_ = ps.getUntrackedParameter< std::vector<double> >("EBtimeCorrAmplitudeBins", std::vector<double>() );
104  EBtimeCorrShiftBins_ = ps.getUntrackedParameter< std::vector<double> >("EBtimeCorrShiftBins", std::vector<double>() );
105  EEtimeCorrAmplitudeBins_ = ps.getUntrackedParameter< std::vector<double> >("EEtimeCorrAmplitudeBins", std::vector<double>() );
106  EEtimeCorrShiftBins_ = ps.getUntrackedParameter< std::vector<double> >("EEtimeCorrShiftBins", std::vector<double>() );
107 
108  EBG12samplesCorrelation_ = ps.getUntrackedParameter< std::vector<double> >("EBG12samplesCorrelation", std::vector<double>() );
109  EBG6samplesCorrelation_ = ps.getUntrackedParameter< std::vector<double> >("EBG6samplesCorrelation", std::vector<double>() );
110  EBG1samplesCorrelation_ = ps.getUntrackedParameter< std::vector<double> >("EBG1samplesCorrelation", std::vector<double>() );
111  EEG12samplesCorrelation_ = ps.getUntrackedParameter< std::vector<double> >("EEG12samplesCorrelation", std::vector<double>() );
112  EEG6samplesCorrelation_ = ps.getUntrackedParameter< std::vector<double> >("EEG6samplesCorrelation", std::vector<double>() );
113  EEG1samplesCorrelation_ = ps.getUntrackedParameter< std::vector<double> >("EEG1samplesCorrelation", std::vector<double>() );
114 
115 
116  sim_pulse_shape_EB_thresh_ = ps.getParameter<double>("sim_pulse_shape_EB_thresh" );
117  sim_pulse_shape_EE_thresh_ = ps.getParameter<double>("sim_pulse_shape_EE_thresh" );
118  sim_pulse_shape_APD_thresh_ = ps.getParameter<double>("sim_pulse_shape_APD_thresh");
119 
120  sim_pulse_shape_TI_ = ps.getUntrackedParameter<double>("sim_pulse_shape_TI", 1.0);
121 
122  nTDCbins_ = 1;
123 
124  weightsForAsynchronousRunning_ = ps.getUntrackedParameter<bool>("weightsForTB",false);
125 
126  std::cout << " EcalTrivialConditionRetriever " << std::endl;
127 
128 
129 
130  if(totLumi_ > 0 ) {
131 
132  std::cout << " EcalTrivialConditionRetriever going to create conditions based on the damage deu to "<<totLumi_<<
133  " fb-1 integrated luminosity" << std::endl;
134 
135  }
136 
138  {
139  getWeightsFromFile_ = true; //override user request
140  //nTDCbins_ = 25;
141  nTDCbins_ = 50; //modif Alex-21-07-2006
142  }
143 
144  std::string path="CalibCalorimetry/EcalTrivialCondModules/data/";
145  std::string weightType;
146  std::ostringstream str;
147 
149  str << "_CMS.txt" ;
150  else
151  str << "_TB.txt" ;
152 
153  weightType = str.str();
154 
155  amplWeightsFile_ = ps.getUntrackedParameter<std::string>("amplWeightsFile",path+"ampWeights"+weightType);
156  amplWeightsAftFile_ = ps.getUntrackedParameter<std::string>("amplWeightsAftFile",path+"ampWeightsAfterGainSwitch"+weightType);
157  pedWeightsFile_ = ps.getUntrackedParameter<std::string>("pedWeightsFile",path+"pedWeights"+weightType);
158  pedWeightsAftFile_ = ps.getUntrackedParameter<std::string>("pedWeightsAftFile",path+"pedWeightsAfterGainSwitch"+weightType);
159  jittWeightsFile_ = ps.getUntrackedParameter<std::string>("jittWeightsFile",path+"timeWeights"+weightType);
160  jittWeightsAftFile_ = ps.getUntrackedParameter<std::string>("jittWeightsAftFile",path+"timeWeightsAfterGainSwitch"+weightType);
161  chi2MatrixFile_ = ps.getUntrackedParameter<std::string>("chi2MatrixFile",path+"chi2Matrix"+weightType);
162  chi2MatrixAftFile_ = ps.getUntrackedParameter<std::string>("chi2MatrixAftFile",path+"chi2MatrixAfterGainSwitch"+weightType);
163 
164  amplWeights_.resize(nTDCbins_);
165  amplWeightsAft_.resize(nTDCbins_);
166  pedWeights_.resize(nTDCbins_);
167  pedWeightsAft_.resize(nTDCbins_);
168  jittWeights_.resize(nTDCbins_);
169  jittWeightsAft_.resize(nTDCbins_);
170  chi2Matrix_.resize(nTDCbins_);
171  chi2MatrixAft_.resize(nTDCbins_);
172 
173  // default weights for MGPA shape after pedestal subtraction
175 
176  producedEcalPedestals_ = ps.getUntrackedParameter<bool>("producedEcalPedestals",true);
177  producedEcalWeights_ = ps.getUntrackedParameter<bool>("producedEcalWeights",true);
178 
179  producedEcalGainRatios_ = ps.getUntrackedParameter<bool>("producedEcalGainRatios",true);
180  producedEcalADCToGeVConstant_ = ps.getUntrackedParameter<bool>("producedEcalADCToGeVConstant",true);
181 
182  producedEcalMappingElectronics_ = ps.getUntrackedParameter<bool>("producedEcalMappingElectronics",true);
183  mappingFile_ = ps.getUntrackedParameter<std::string>("mappingFile","");
184 
185  if ( producedEcalMappingElectronics_ ) {
186  if ( !mappingFile_.empty() ) { // if file provided read channel map
188  } else {
190  }
191  findingRecord<EcalMappingElectronicsRcd>();
192  }
193  // Alignment from file
194  getEBAlignmentFromFile_ = ps.getUntrackedParameter<bool>("getEBAlignmentFromFile",false);
195  if(getEBAlignmentFromFile_) {
196  EBAlignmentFile_ = ps.getUntrackedParameter<std::string>("EBAlignmentFile",path+"EBAlignment.txt");
197  }
198 
199  getEEAlignmentFromFile_ = ps.getUntrackedParameter<bool>("getEEAlignmentFromFile",false);
200  if(getEEAlignmentFromFile_) {
201  EEAlignmentFile_ = ps.getUntrackedParameter<std::string>("EEAlignmentFile",path+"EEAlignment.txt");
202  }
203 
204  getESAlignmentFromFile_ = ps.getUntrackedParameter<bool>("getESAlignmentFromFile",false);
205  if(getESAlignmentFromFile_)
206  ESAlignmentFile_ = ps.getUntrackedParameter<std::string>("ESAlignmentFile",path+"ESAlignment.txt");
207 
208  verbose_ = ps.getUntrackedParameter<int>("verbose", 0);
209 
210  //Tell Producer what we produce
211  //setWhatproduce(this);
214 
215  if (producedEcalWeights_) {
218  }
219 
220  if (producedEcalGainRatios_)
222 
223  if (producedEcalADCToGeVConstant_)
225 
226  // TimeOffsetConstant
227  producedEcalTimeOffsetConstant_ = ps.getUntrackedParameter<bool>("producedEcalTimeOffsetConstant",true);
228  //std::cout << " EcalTrivialConditionRetriever : producedEcalTimeOffsetConstant_" << producedEcalTimeOffsetConstant_ << std::endl;
231  findingRecord<EcalTimeOffsetConstantRcd>();
232  }
233 
234  // linear corrections
235  producedEcalLinearCorrections_ = ps.getUntrackedParameter<bool>("producedEcalLinearCorrections",true);
236  linearCorrectionsFile_ = ps.getUntrackedParameter<std::string>("linearCorrectionsFile","") ;
237 
238  if (producedEcalLinearCorrections_) { // user asks to produce constants
239  if(!linearCorrectionsFile_.empty()) { // if file provided read constants
241  } else { // set all constants to 1. or smear as specified by user
243  }
244  findingRecord<EcalLinearCorrectionsRcd> () ;
245  }
246 
247 
248 
249  // intercalibration constants
250  producedEcalIntercalibConstants_ = ps.getUntrackedParameter<bool>("producedEcalIntercalibConstants",true);
251  intercalibConstantsFile_ = ps.getUntrackedParameter<std::string>("intercalibConstantsFile","") ;
252 
253  intercalibConstantsMCFile_ = ps.getUntrackedParameter<std::string>("intercalibConstantsMCFile","") ;
254 
255  if (producedEcalIntercalibConstants_) { // user asks to produce constants
256  if(!intercalibConstantsFile_.empty()) { // if file provided read constants
258  } else { // set all constants to 1. or smear as specified by user
260  }
261  findingRecord<EcalIntercalibConstantsRcd> () ;
262  }
263  // MC intercalibrations
264  producedEcalIntercalibConstantsMC_ = ps.getUntrackedParameter<bool>("producedEcalIntercalibConstantsMC",true);
265 
266  if (producedEcalIntercalibConstantsMC_) { // user asks to produce constants
267  if(!intercalibConstantsMCFile_.empty()) { // if file provided read constants
269  } else { // set all constants to 1. or smear as specified by user
271  }
272  findingRecord<EcalIntercalibConstantsMCRcd> () ;
273  }
274 
275  // intercalibration constants
276  producedEcalIntercalibErrors_ = ps.getUntrackedParameter<bool>("producedEcalIntercalibErrors",true);
277  intercalibErrorsFile_ = ps.getUntrackedParameter<std::string>("intercalibErrorsFile","") ;
278 
279  if (producedEcalIntercalibErrors_) { // user asks to produce constants
280  if(!intercalibErrorsFile_.empty()) { // if file provided read constants
282  } else { // set all constants to 1. or smear as specified by user
284  }
285  findingRecord<EcalIntercalibErrorsRcd> () ;
286  }
287 
288  // time calibration constants
289  producedEcalTimeCalibConstants_ = ps.getUntrackedParameter<bool>("producedEcalTimeCalibConstants",true);
290  timeCalibConstantsFile_ = ps.getUntrackedParameter<std::string>("timeCalibConstantsFile","") ;
291 
292  if (producedEcalTimeCalibConstants_) { // user asks to produce constants
293  if(!timeCalibConstantsFile_.empty()) { // if file provided read constants
295  } else { // set all constants to 1. or smear as specified by user
297  }
298  findingRecord<EcalTimeCalibConstantsRcd> () ;
299  }
300 
301  // time calibration constants
302  producedEcalTimeCalibErrors_ = ps.getUntrackedParameter<bool>("producedEcalTimeCalibErrors",true);
303  timeCalibErrorsFile_ = ps.getUntrackedParameter<std::string>("timeCalibErrorsFile","") ;
304 
305  if (producedEcalTimeCalibErrors_) { // user asks to produce constants
306  if(!timeCalibErrorsFile_.empty()) { // if file provided read constants
308  } else { // set all constants to 1. or smear as specified by user
310  }
311  findingRecord<EcalTimeCalibErrorsRcd> () ;
312  }
313 
314  // sim pulse shape
315  getSimPulseShapeFromFile_ = ps.getUntrackedParameter<bool>("getSimPulseShapeFromFile",false);
316  producedEcalSimPulseShape_ = ps.getUntrackedParameter<bool>("producedEcalSimPulseShape",true);
317  EBSimPulseShapeFile_ = ps.getUntrackedParameter<std::string>("EBSimPulseShapeFile","") ;
318  EESimPulseShapeFile_ = ps.getUntrackedParameter<std::string>("EESimPulseShapeFile","") ;
319  APDSimPulseShapeFile_ = ps.getUntrackedParameter<std::string>("APDSimPulseShapeFile","") ;
320 
321  if (producedEcalSimPulseShape_) { // user asks to produce constants
323  findingRecord<EcalSimPulseShapeRcd> () ;
324  }
325 
326 
327  // cluster corrections
328  producedEcalClusterLocalContCorrParameters_ = ps.getUntrackedParameter<bool>("producedEcalClusterLocalContCorrParameters", false);
329  producedEcalClusterCrackCorrParameters_ = ps.getUntrackedParameter<bool>("producedEcalClusterCrackCorrParameters", false);
330  producedEcalClusterEnergyCorrectionParameters_ = ps.getUntrackedParameter<bool>("producedEcalClusterEnergyCorrectionParameters", false);
331  producedEcalClusterEnergyUncertaintyParameters_ = ps.getUntrackedParameter<bool>("producedEcalClusterEnergyUncertaintyParameters", false);
332  producedEcalClusterEnergyCorrectionObjectSpecificParameters_ = ps.getUntrackedParameter<bool>("producedEcalClusterEnergyCorrectionObjectSpecificParameters", false);
333  if ( producedEcalClusterLocalContCorrParameters_ ) {
335  findingRecord<EcalClusterLocalContCorrParametersRcd>();
336  }
337  if ( producedEcalClusterCrackCorrParameters_ ) {
339  findingRecord<EcalClusterCrackCorrParametersRcd>();
340  }
341  if ( producedEcalClusterEnergyCorrectionParameters_ ) {
343  findingRecord<EcalClusterEnergyCorrectionParametersRcd>();
344  }
345  if ( producedEcalClusterEnergyUncertaintyParameters_ ) {
347  findingRecord<EcalClusterEnergyUncertaintyParametersRcd>();
348  }
349  if ( producedEcalClusterEnergyCorrectionObjectSpecificParameters_ ) {
351  findingRecord<EcalClusterEnergyCorrectionObjectSpecificParametersRcd>();
352  }
353 
354  // laser correction
355  producedEcalLaserCorrection_ = ps.getUntrackedParameter<bool>("producedEcalLaserCorrection",true);
356  if (producedEcalLaserCorrection_) { // user asks to produce constants
357  // set all constants to 1. or smear as specified by user
359  findingRecord<EcalLaserAlphasRcd> () ;
360  getLaserAlphaFromFileEB_ = ps.getUntrackedParameter<bool>("getLaserAlphaFromFileEB",false);
361  getLaserAlphaFromFileEE_ = ps.getUntrackedParameter<bool>("getLaserAlphaFromFileEE",false);
362  getLaserAlphaFromTypeEB_ = ps.getUntrackedParameter<bool>("getLaserAlphaFromTypeEB",false);
363  getLaserAlphaFromTypeEE_ = ps.getUntrackedParameter<bool>("getLaserAlphaFromTypeEE",false);
364  std::cout << " getLaserAlphaFromFileEB_ " << getLaserAlphaFromFileEB_ << std::endl;
365  std::cout << " getLaserAlphaFromFileEE_ " << getLaserAlphaFromFileEE_ << std::endl;
366  std::cout << " getLaserAlphaFromTypeEB_ " << getLaserAlphaFromTypeEB_ << std::endl;
367  std::cout << " getLaserAlphaFromTypeEE_ " << getLaserAlphaFromTypeEE_ << std::endl;
368  if(getLaserAlphaFromFileEB_) {
369  EBLaserAlphaFile_ = ps.getUntrackedParameter<std::string>("EBLaserAlphaFile",path+"EBLaserAlpha.txt"); // file is used to read the alphas
370  }
371  if(getLaserAlphaFromFileEE_) {
372  EELaserAlphaFile_ = ps.getUntrackedParameter<std::string>("EELaserAlphaFile",path+"EELaserAlpha.txt"); // file is used to read the alphas
373  }
374  if(getLaserAlphaFromTypeEB_) {
375  laserAlphaMeanEBR_ = ps.getUntrackedParameter<double>("laserAlphaMeanEBR",1.55); // alpha russian crystals in EB
376  laserAlphaMeanEBC_ = ps.getUntrackedParameter<double>("laserAlphaMeanEBC",1.00); // alpha chinese crystals in EB
377  EBLaserAlphaFile_ = ps.getUntrackedParameter<std::string>("EBLaserAlphaFile",path+"EBLaserAlpha.txt"); // file to find out which one is russian/chinese
378  }
379  if(getLaserAlphaFromTypeEE_) {
380  laserAlphaMeanEER_ = ps.getUntrackedParameter<double>("laserAlphaMeanEER",1.16); // alpha russian crystals in EE
381  laserAlphaMeanEEC_ = ps.getUntrackedParameter<double>("laserAlphaMeanEEC",1.00); // alpha chinese crystals in EE
382  EELaserAlphaFile_ = ps.getUntrackedParameter<std::string>("EELaserAlphaFile",path+"EELaserAlpha.txt"); // file is used to find out which one is russian or chinese
383  }
385  findingRecord<EcalLaserAPDPNRatiosRefRcd> () ;
387  findingRecord<EcalLaserAPDPNRatiosRcd> () ;
388  }
389 
390  // channel status
391  producedEcalChannelStatus_ = ps.getUntrackedParameter<bool>("producedEcalChannelStatus",true);
392  channelStatusFile_ = ps.getUntrackedParameter<std::string>("channelStatusFile","");
393 
394  if ( producedEcalChannelStatus_ ) {
395  if ( !channelStatusFile_.empty() ) { // if file provided read channel map
397  } else { // set all channels to working -- FIXME might be changed
399  }
400  findingRecord<EcalChannelStatusRcd>();
401  }
402  // DQM channel status
403  producedEcalDQMChannelStatus_ = ps.getUntrackedParameter<bool>("producedEcalDQMChannelStatus",true);
404  if ( producedEcalDQMChannelStatus_ ) {
406  findingRecord<EcalDQMChannelStatusRcd>();
407  }
408  // DCS Tower status
409  producedEcalDCSTowerStatus_ = ps.getUntrackedParameter<bool>("producedEcalDCSTowerStatus",true);
410  if ( producedEcalDCSTowerStatus_ ) {
412  findingRecord<EcalDCSTowerStatusRcd>();
413  }
414  // DAQ Tower status
415  producedEcalDAQTowerStatus_ = ps.getUntrackedParameter<bool>("producedEcalDAQTowerStatus",true);
416  if ( producedEcalDAQTowerStatus_ ) {
418  findingRecord<EcalDAQTowerStatusRcd>();
419  }
420  // DQM Tower status
421  producedEcalDQMTowerStatus_ = ps.getUntrackedParameter<bool>("producedEcalDQMTowerStatus",true);
422  if ( producedEcalDQMTowerStatus_ ) {
424  findingRecord<EcalDQMTowerStatusRcd>();
425  }
426 
427  // trigger channel status
428  producedEcalTrgChannelStatus_ = ps.getUntrackedParameter<bool>("producedEcalTrgChannelStatus",true);
429  trgChannelStatusFile_ = ps.getUntrackedParameter<std::string>("trgChannelStatusFile","");
430 
431  if ( producedEcalTrgChannelStatus_ ) {
432  if ( !trgChannelStatusFile_.empty() ) { // if file provided read channel map
434  } else { // set all channels to working -- FIXME might be changed
436  }
437  findingRecord<EcalTPGCrystalStatusRcd>();
438  }
439 
440  // Alignment
441  producedEcalAlignmentEB_ = ps.getUntrackedParameter<bool>("producedEcalAlignmentEB",true);
442  if ( producedEcalAlignmentEB_ ) {
444  findingRecord<EBAlignmentRcd>();
445  }
446  producedEcalAlignmentEE_ = ps.getUntrackedParameter<bool>("producedEcalAlignmentEE",true);
447  if ( producedEcalAlignmentEE_ ) {
449  findingRecord<EEAlignmentRcd>();
450  }
451  producedEcalAlignmentES_ = ps.getUntrackedParameter<bool>("producedEcalAlignmentES",true);
452  if ( producedEcalAlignmentES_ ) {
454  findingRecord<ESAlignmentRcd>();
455  }
456  //Tell Finder what records we find
457  if (producedEcalPedestals_) findingRecord<EcalPedestalsRcd>();
458 
459  if (producedEcalWeights_) {
460  findingRecord<EcalWeightXtalGroupsRcd>();
461  findingRecord<EcalTBWeightsRcd>();
462  }
463 
464  if (producedEcalGainRatios_) findingRecord<EcalGainRatiosRcd>();
465 
466  if (producedEcalADCToGeVConstant_) findingRecord<EcalADCToGeVConstantRcd>();
467 
468  producedEcalSampleMask_ = ps.getUntrackedParameter<bool>("producedEcalSampleMask",true);
469  if (producedEcalSampleMask_) {
471  findingRecord<EcalSampleMaskRcd>();
472  }
473  producedEcalTimeBiasCorrections_ = ps.getUntrackedParameter<bool>("producedEcalTimeBiasCorrections", false);
474  if (producedEcalTimeBiasCorrections_) {
476  findingRecord<EcalTimeBiasCorrectionsRcd>();
477  }
478  producedEcalSamplesCorrelation_ = ps.getUntrackedParameter<bool>("producedEcalSamplesCorrelation", false);
479  if (producedEcalSamplesCorrelation_) {
481  findingRecord<EcalSamplesCorrelationRcd>();
482  getSamplesCorrelationFromFile_ = ps.getUntrackedParameter<bool>("getSamplesCorrelationFromFile",false);
483  if(getSamplesCorrelationFromFile_) {
484  SamplesCorrelationFile_ = ps.getUntrackedParameter<std::string>("SamplesCorrelationFile","EcalSamplesCorrelation.txt");
485  }
486  }
487 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:116
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< EcalTimeCalibConstants > getTimeCalibConstantsFromConfiguration(const EcalTimeCalibConstantsRcd &)
virtual std::unique_ptr< EcalTPGCrystalStatus > getTrgChannelStatusFromConfiguration(const EcalTPGCrystalStatusRcd &)
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 489 of file EcalTrivialConditionRetriever.cc.

490 {
491 }
EcalTrivialConditionRetriever::EcalTrivialConditionRetriever ( const EcalTrivialConditionRetriever )
privatedelete

Member Function Documentation

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

Definition at line 1998 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().

1999 {
2000  auto ecalStatus = std::make_unique<EcalChannelStatus>();
2001 
2002 
2003  // start by setting all statuses to 0
2004 
2005  // barrel
2006  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
2007  if(ieta==0) continue;
2008  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
2009  if (EBDetId::validDetId(ieta,iphi)) {
2010  EBDetId ebid(ieta,iphi);
2011  ecalStatus->setValue( ebid, 0 );
2012  }
2013  }
2014  }
2015  // endcap
2016  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
2017  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
2018  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
2019  if (EEDetId::validDetId(iX,iY,1)) {
2020  EEDetId eedetidpos(iX,iY,1);
2021  ecalStatus->setValue( eedetidpos, 0 );
2022  }
2023  if (EEDetId::validDetId(iX,iY,-1)) {
2024  EEDetId eedetidneg(iX,iY,-1);
2025  ecalStatus->setValue( eedetidneg, 0 );
2026  }
2027  }
2028  }
2029 
2030 
2031 
2032  // overwrite the statuses which are in the file
2033 
2034  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading channel statuses from file " << edm::FileInPath(channelStatusFile_).fullPath().c_str() ;
2035  std::ifstream statusFile(edm::FileInPath(channelStatusFile_).fullPath().c_str());
2036  if ( !statusFile.good() ) {
2037  edm::LogError ("EcalTrivialConditionRetriever")
2038  << "*** Problems opening file: " << channelStatusFile_ ;
2039  throw cms::Exception ("Cannot open ECAL channel status file") ;
2040  }
2041 
2042  std::string EcalSubDet;
2043  std::string str;
2044  int hashIndex(0);
2045  int status(0);
2046 
2047  while (!statusFile.eof())
2048  {
2049  statusFile >> EcalSubDet;
2050  if (EcalSubDet!=std::string("EB") && EcalSubDet!=std::string("EE"))
2051  {
2052  std::getline(statusFile,str);
2053  continue;
2054  }
2055  else
2056  {
2057  statusFile>> hashIndex >> status;
2058  }
2059  // std::cout << EcalSubDet << " " << hashIndex << " " << status;
2060 
2061  if(EcalSubDet==std::string("EB"))
2062  {
2063  EBDetId ebid = EBDetId::unhashIndex(hashIndex);
2064  ecalStatus->setValue( ebid, status );
2065  }
2066  else if(EcalSubDet==std::string("EE"))
2067  {
2068  EEDetId eedetid = EEDetId::unhashIndex(hashIndex);
2069  ecalStatus->setValue( eedetid, status );
2070  }
2071  else
2072  {
2073  edm::LogError ("EcalTrivialConditionRetriever")
2074  << " *** " << EcalSubDet << " is neither EB nor EE ";
2075  }
2076 
2077  }
2078  // the file is supposed to be in the form -- FIXME
2079 
2080 
2081  statusFile.close();
2082  return ecalStatus;
2083 }
static const int MIN_IPHI
Definition: EBDetId.h:142
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:99
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:114
std::string fullPath() const
Definition: FileInPath.cc:197
static const int IY_MAX
Definition: EEDetId.h:306
#define str(s)
std::unique_ptr< EcalSimPulseShape > EcalTrivialConditionRetriever::getEcalSimPulseShapeFromConfiguration ( const EcalSimPulseShapeRcd )
virtual

Definition at line 3298 of file EcalTrivialConditionRetriever.cc.

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

Referenced by EcalTrivialConditionRetriever(), and produceEcalSamplesCorrelation().

3299 {
3300  auto result = std::make_unique<EcalSimPulseShape>();
3301 
3302  // save time interval to be used for the pulse shape
3303  result->time_interval = sim_pulse_shape_TI_;
3304 
3305  // containers to store the shape info
3306  std::vector<double> EBshape;
3307  std::vector<double> EEshape;
3308  std::vector<double> APDshape;
3309 
3310  // --- get the 3 shapes from the user provided txt files
3311  if (!EBSimPulseShapeFile_.empty() )
3312  {
3313  std::ifstream shapeEBFile;
3314  shapeEBFile.open(EBSimPulseShapeFile_.c_str());
3315  double ww;
3316  while (shapeEBFile >> ww) EBshape.push_back(ww);
3317  shapeEBFile.close();
3318  }
3319  if (!EESimPulseShapeFile_.empty() )
3320  {
3321  std::ifstream shapeEEFile;
3322  shapeEEFile.open(EESimPulseShapeFile_.c_str());
3323  double ww;
3324  while (shapeEEFile >> ww) EEshape.push_back(ww);
3325  shapeEEFile.close();
3326  }
3327  if (!APDSimPulseShapeFile_.empty()) {
3328  std::ifstream shapeAPDFile;
3329  shapeAPDFile.open(APDSimPulseShapeFile_.c_str());
3330  double ww;
3331  while (shapeAPDFile >> ww) APDshape.push_back(ww);
3332  shapeAPDFile.close();
3333  }
3334 
3335  // --- save threshold
3336  result->barrel_thresh = sim_pulse_shape_EB_thresh_;
3337  result->endcap_thresh = sim_pulse_shape_EE_thresh_;
3338  result->apd_thresh = sim_pulse_shape_APD_thresh_;
3339 
3340  // --- copy
3341  copy(EBshape.begin(), EBshape.end(),
3342  back_inserter(result->barrel_shape));
3343  copy(EEshape.begin(), EEshape.end(),
3344  back_inserter(result->endcap_shape));
3345  copy(APDshape.begin(), APDshape.end(),
3346  back_inserter(result->apd_shape));
3347 
3348  return result;
3349 }
def copy(args, dbName)
std::unique_ptr< EcalIntercalibConstants > EcalTrivialConditionRetriever::getIntercalibConstantsFromConfiguration ( const EcalIntercalibConstantsRcd )
virtual

Definition at line 2410 of file EcalTrivialConditionRetriever.cc.

References EBDetId::approxEta(), EnergyResolutionVsLumi::calcresolutitonConstantTerm(), particleFlowCaloResolution_cfi::constantTerm, gather_cfg::cout, EcalCondObjectContainer< T >::end(), PVValHelper::eta, Exception, EcalCondObjectContainer< T >::find(), getIntercalibConstantsMCFromConfiguration(), EcalCondObjectContainer< T >::getMap(), 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().

2411 {
2412  std::unique_ptr<EcalIntercalibConstants> ical;
2413  // std::make_unique<EcalIntercalibConstants>();
2414 
2415  // Read the values from a txt file
2416  // -------------------------------
2417 
2418  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading intercalibration constants from file "
2419  << intercalibConstantsFile_.c_str() ;
2420 
2421  if(intercalibConstantsFile_.find(".xml")!= std::string::npos) {
2422 
2423  std::cout<<"generating Intercalib from xml file"<<std::endl;
2424 
2425  EcalCondHeader h;
2428 
2429 
2430  if(totLumi_ !=0 || instLumi_!=0) {
2431  std::cout<<"implementing ageing for intercalib"<<std::endl;
2432 
2434 
2435  if(intercalibConstantsMCFile_.find(".xml")!= std::string::npos) {
2436 
2437  std::cout<<"generating IntercalibMC from xml file"<<std::endl;
2438 
2439  EcalCondHeader h;
2441 
2442  } else {
2443  std::cout<<"please provide the xml file of the EcalIntercalibConstantsMC"<<std::endl;
2444  }
2445 
2446 
2447  TRandom3 * gRandom = new TRandom3();
2448 
2449  EnergyResolutionVsLumi ageing;
2450  ageing.setLumi(totLumi_);
2451  ageing.setInstLumi(instLumi_);
2452 
2453 
2454  const EcalIntercalibConstantMap& mymap= rcd->getMap();
2455  const EcalIntercalibConstantMCMap& mymapMC= rcdMC->getMap();
2456 
2457  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
2458  if(ieta==0) continue;
2459 
2460  double eta=EBDetId::approxEta(EBDetId(ieta,1));
2461  eta = fabs(eta);
2462  double constantTerm= ageing.calcresolutitonConstantTerm(eta);
2463  std::cout<<"EB at eta="<<eta<<" constant term is "<<constantTerm<<std::endl;
2464 
2465  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
2466  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
2467  if (EBDetId::validDetId(ieta,iphi))
2468  {
2469  EBDetId ebid(ieta,iphi);
2471  EcalIntercalibConstant icalconstant=1;
2472  if(idref!=mymap.end())icalconstant=(*idref);
2473 
2474  EcalIntercalibConstantsMC::const_iterator idrefMC=mymapMC.find(ebid);
2475  EcalIntercalibConstantMC icalconstantMC=1;
2476  if(idrefMC!=mymapMC.end())icalconstantMC=(*idrefMC);
2477 
2478  double r = gRandom->Gaus(0,constantTerm);
2479 
2480  if(iphi==10) std::cout<<"EB at eta="<<eta<<" IC="<<icalconstant<<" ICMC="<<icalconstantMC<<" smear="<<r<<" ";
2481 
2482  icalconstant = icalconstant + r*1.29*icalconstantMC;
2483  rcd->setValue( ebid.rawId(), icalconstant );
2484 
2485  if(iphi==10) std::cout<<"newIC="<<icalconstant<<std::endl;
2486 
2487  EcalIntercalibConstant icalconstant2=(*idref);
2488  if(icalconstant !=icalconstant2) std::cout<<">>>> error in smearing intercalib"<<std::endl;
2489  }
2490  }
2491  }
2492 
2493  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
2494  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
2495  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
2496  if (EEDetId::validDetId(iX,iY,1))
2497  {
2498 
2499  EEDetId eedetidpos(iX,iY,1);
2500  double eta= -log(tan(0.5*atan(sqrt((iX-50.0)*(iX-50.0)+(iY-50.0)*(iY-50.0))*2.98/328.)));
2501  eta = fabs(eta);
2502  double constantTerm=ageing.calcresolutitonConstantTerm(eta);
2503  if(iX==50) std::cout<<"EE at eta="<<eta<<" constant term is "<<constantTerm<<std::endl;
2504 
2505 
2506 
2507 
2508  EcalIntercalibConstants::const_iterator idref=mymap.find(eedetidpos);
2509  EcalIntercalibConstant icalconstant=1;
2510  if(idref!=mymap.end())icalconstant=(*idref);
2511 
2512  EcalIntercalibConstantsMC::const_iterator idrefMC=mymapMC.find(eedetidpos);
2513  EcalIntercalibConstantMC icalconstantMC=1;
2514  if(idrefMC!=mymapMC.end())icalconstantMC=(*idrefMC);
2515 
2516  double r = gRandom->Gaus(0,constantTerm);
2517 
2518  if(iX==10) std::cout<<"EE at eta="<<eta<<" IC="<<icalconstant<<" ICMC="<<icalconstantMC<<" smear="<<r<<" ";
2519  icalconstant = icalconstant + r*1.29*icalconstantMC;
2520  rcd->setValue( eedetidpos.rawId(), icalconstant );
2521  if(iX==10) std::cout<<"newIC="<<icalconstant<<std::endl;
2522 
2523 
2524 
2525  }
2526  if(EEDetId::validDetId(iX,iY,-1))
2527  {
2528 
2529  EEDetId eedetidneg(iX,iY,-1);
2530  double eta= -log(tan(0.5*atan(sqrt((iX-50.0)*(iX-50.0)+(iY-50.0)*(iY-50.0))*2.98/328.)));
2531  eta = fabs(eta);
2532  double constantTerm=ageing.calcresolutitonConstantTerm(eta);
2533  EcalIntercalibConstant icalconstant=1;
2534 
2535 
2536  EcalIntercalibConstantsMC::const_iterator idrefMC=mymapMC.find(eedetidneg);
2537  EcalIntercalibConstantMC icalconstantMC=1;
2538  if(idrefMC!=mymapMC.end())icalconstantMC=(*idrefMC);
2539 
2540  double r = gRandom->Gaus(0,constantTerm);
2541  icalconstant = icalconstant + r*1.29*icalconstantMC;
2542  rcd->setValue( eedetidneg.rawId(), icalconstant );
2543 
2544 
2545  }
2546  }
2547  }
2548 
2549  ical = std::unique_ptr<EcalIntercalibConstants>(rcd);
2550 
2551  delete gRandom;
2552 
2553  }
2554 
2555 
2556  } else {
2557 
2558  ical = std::make_unique<EcalIntercalibConstants>();
2559 
2560  FILE *inpFile ;
2561  inpFile = fopen (intercalibConstantsFile_.c_str (),"r") ;
2562  if (!inpFile)
2563  {
2564  edm::LogError ("EcalTrivialConditionRetriever")
2565  << "*** Can not open file: " << intercalibConstantsFile_ ;
2566  throw cms::Exception ("Cannot open inter-calibration coefficients txt file") ;
2567  }
2568 
2569  char line[256] ;
2570  std::ostringstream str ;
2571  fgets (line,255,inpFile) ;
2572  int sm_number=atoi (line) ;
2573  str << "sm: " << sm_number ;
2574 
2575  fgets (line,255,inpFile) ;
2576  //int nevents=atoi (line) ; // not necessary here just for online conddb
2577 
2578  fgets (line,255,inpFile) ;
2579  std::string gen_tag = line ;
2580  str << "gen tag: " << gen_tag ; // should I use this?
2581 
2582  fgets (line,255,inpFile) ;
2583  std::string cali_method = line ;
2584  str << "cali method: " << cali_method << std::endl ; // not important
2585 
2586  fgets (line,255,inpFile) ;
2587  std::string cali_version = line ;
2588  str << "cali version: " << cali_version << std::endl ; // not important
2589 
2590  fgets (line,255,inpFile) ;
2591  std::string cali_type = line ;
2592  str << "cali type: " << cali_type ; // not important
2593 
2594  edm::LogInfo("EcalTrivialConditionRetriever")
2595  << "[PIETRO] Intercalibration file - "
2596  << str.str () << std::endl ;
2597 
2598  float calib[1700]={1} ;
2599  int calib_status[1700]={0} ;
2600 
2601  int ii = 0 ;
2602 
2603  while (fgets (line,255,inpFile))
2604  {
2605  ii++;
2606  int dmy_num = 0 ;
2607  float dmy_calib = 0. ;
2608  float dmy_RMS = 0. ;
2609  int dmy_events = 0 ;
2610  int dmy_status = 0 ;
2611  sscanf (line, "%d %f %f %d %d", &dmy_num, &dmy_calib,
2612  &dmy_RMS, &dmy_events,
2613  &dmy_status) ;
2614  assert (dmy_num >= 1) ;
2615  assert (dmy_num <= 1700) ;
2616  calib[dmy_num-1] = dmy_calib ;
2617  calib_status[dmy_num-1] = dmy_status ;
2618 
2619  // edm::LogInfo ("EcalTrivialConditionRetriever")
2620  // << "[PIETRO] cry = " << dmy_num
2621  // << " calib = " << calib[dmy_num-1]
2622  // << " RMS = " << dmy_RMS
2623  // << " events = " << dmy_events
2624  // << " status = " << calib_status[dmy_num-1]
2625  // << std::endl ;
2626  }
2627 
2628  fclose (inpFile) ; // close inp. file
2629  edm::LogInfo ("EcalTrivialConditionRetriever") << "Read intercalibrations for " << ii << " xtals " ;
2630  if (ii!=1700) edm::LogWarning ("StoreEcalCondition")
2631  << "Some crystals missing, set to 1" << std::endl ;
2632 
2633  // Transfer the data to the inter-calibration coefficients container
2634  // -----------------------------------------------------------------
2635 
2636  // DB supermodule always set to 1 for the TestBeam FIXME
2637  int sm_db=1 ;
2638  // loop over channels
2639  for (int i=0 ; i<1700 ; i++)
2640  {
2641  //if (EBDetId::validDetId(iEta,iPhi)) {
2642  // CANNOT be used -- validDetId only checks ETA PHI method
2643  // doing a check by hand, here is the only place in CMSSW
2644  // outside TB code and EcalRawToDigi where needed
2645  // => no need for changing the DetId interface
2646  //
2647  // checking only sm_db -- guess can change with the above FIXME
2648  if (sm_db >= EBDetId::MIN_SM && sm_db <= EBDetId::MAX_SM) {
2649  EBDetId ebid (sm_db,i+1,EBDetId::SMCRYSTALMODE) ;
2650  if (calib_status[i]) ical->setValue (ebid.rawId (), calib[i]) ;
2651  else ical->setValue (ebid.rawId (), 1.) ;
2652  }
2653  //}
2654  } // loop over channels
2655 
2656 
2657 
2658 
2659  }
2660 
2661  return ical;
2662 
2663 
2664 }
float approxEta() const
Definition: EBDetId.h:106
EcalIntercalibConstantMCMap EcalIntercalibConstantsMC
static const int MIN_IPHI
Definition: EBDetId.h:142
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:294
static int readXML(const std::string &filename, EcalCondHeader &header, EcalFloatCondObjectContainer &record)
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
static const int MIN_SM
Definition: EBDetId.h:152
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:302
static const int MAX_IPHI
Definition: EBDetId.h:144
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:143
EcalIntercalibConstantMap EcalIntercalibConstants
const_iterator find(uint32_t rawId) const
static const int MAX_SM
Definition: EBDetId.h:153
static const int IY_MAX
Definition: EEDetId.h:306
const_iterator end() const
float EcalIntercalibConstantMC
static const int SMCRYSTALMODE
Definition: EBDetId.h:167
#define str(s)
float EcalIntercalibConstant
std::unique_ptr< EcalIntercalibConstantsMC > EcalTrivialConditionRetriever::getIntercalibConstantsMCFromConfiguration ( const EcalIntercalibConstantsMCRcd )
virtual

Definition at line 2668 of file EcalTrivialConditionRetriever.cc.

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

Referenced by EcalTrivialConditionRetriever(), and getIntercalibConstantsFromConfiguration().

2669 {
2670  std::unique_ptr<EcalIntercalibConstantsMC> ical;
2671  // std::make_unique<EcalIntercalibConstants>();
2672 
2673  // Read the values from a xml file
2674  // -------------------------------
2675 
2676  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading intercalibration constants MC from file "
2677  << intercalibConstantsMCFile_.c_str() ;
2678 
2679  if(intercalibConstantsMCFile_.find(".xml")!= std::string::npos) {
2680 
2681  std::cout<<"generating Intercalib MC from xml file"<<std::endl;
2682 
2683  EcalCondHeader h;
2686 
2687  ical = std::unique_ptr<EcalIntercalibConstants>(rcd);
2688 
2689  } else {
2690 
2691  std::cout <<"ERROR>>> please provide a xml file"<<std::endl;
2692  }
2693 
2694 
2695  return ical;
2696 
2697 }
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 2702 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().

2703 {
2704  auto ical = std::make_unique<EcalIntercalibErrors>();
2705 
2706  // Read the values from a txt file
2707  // -------------------------------
2708 
2709  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading intercalibration constants from file "
2710  << intercalibErrorsFile_.c_str() ;
2711 
2712  FILE *inpFile ;
2713  inpFile = fopen (intercalibErrorsFile_.c_str (),"r") ;
2714  if (!inpFile)
2715  {
2716  edm::LogError ("EcalTrivialConditionRetriever")
2717  << "*** Can not open file: " << intercalibErrorsFile_ ;
2718  throw cms::Exception ("Cannot open inter-calibration coefficients txt file") ;
2719  }
2720 
2721  char line[256] ;
2722  std::ostringstream str ;
2723  fgets (line,255,inpFile) ;
2724  int sm_number=atoi (line) ;
2725  str << "sm: " << sm_number ;
2726 
2727  fgets (line,255,inpFile) ;
2728  //int nevents=atoi (line) ; // not necessary here just for online conddb
2729 
2730  fgets (line,255,inpFile) ;
2731  std::string gen_tag = line ;
2732  str << "gen tag: " << gen_tag ; // should I use this?
2733 
2734  fgets (line,255,inpFile) ;
2735  std::string cali_method = line ;
2736  str << "cali method: " << cali_method << std::endl ; // not important
2737 
2738  fgets (line,255,inpFile) ;
2739  std::string cali_version = line ;
2740  str << "cali version: " << cali_version << std::endl ; // not important
2741 
2742  fgets (line,255,inpFile) ;
2743  std::string cali_type = line ;
2744  str << "cali type: " << cali_type ; // not important
2745 
2746  edm::LogInfo("EcalTrivialConditionRetriever")
2747  << "[PIETRO] Intercalibration file - "
2748  << str.str () << std::endl ;
2749 
2750  float calib[1700]={1} ;
2751  int calib_status[1700]={0} ;
2752 
2753  int ii = 0 ;
2754 
2755  while (fgets (line,255,inpFile))
2756  {
2757  ii++;
2758  int dmy_num = 0 ;
2759  float dmy_calib = 0. ;
2760  float dmy_RMS = 0. ;
2761  int dmy_events = 0 ;
2762  int dmy_status = 0 ;
2763  sscanf (line, "%d %f %f %d %d", &dmy_num, &dmy_calib,
2764  &dmy_RMS, &dmy_events,
2765  &dmy_status) ;
2766  assert (dmy_num >= 1) ;
2767  assert (dmy_num <= 1700) ;
2768  calib[dmy_num-1] = dmy_calib ;
2769  calib_status[dmy_num-1] = dmy_status ;
2770 
2771 // edm::LogInfo ("EcalTrivialConditionRetriever")
2772 // << "[PIETRO] cry = " << dmy_num
2773 // << " calib = " << calib[dmy_num-1]
2774 // << " RMS = " << dmy_RMS
2775 // << " events = " << dmy_events
2776 // << " status = " << calib_status[dmy_num-1]
2777 // << std::endl ;
2778  }
2779 
2780  fclose (inpFile) ; // close inp. file
2781  edm::LogInfo ("EcalTrivialConditionRetriever") << "Read intercalibrations for " << ii << " xtals " ;
2782  if (ii!=1700) edm::LogWarning ("StoreEcalCondition")
2783  << "Some crystals missing, set to 1" << std::endl ;
2784 
2785  // Transfer the data to the inter-calibration coefficients container
2786  // -----------------------------------------------------------------
2787 
2788  // DB supermodule always set to 1 for the TestBeam FIXME
2789  int sm_db=1 ;
2790  // loop over channels
2791  for (int i=0 ; i<1700 ; i++)
2792  {
2793  //if (EBDetId::validDetId(iEta,iPhi)) {
2794  // CANNOT be used -- validDetId only checks ETA PHI method
2795  // doing a check by hand, here is the only place in CMSSW
2796  // outside TB code and EcalRawToDigi where needed
2797  // => no need for changing the DetId interface
2798  //
2799  // checking only sm_db -- guess can change with the above FIXME
2800  if (sm_db >= EBDetId::MIN_SM && sm_db <= EBDetId::MAX_SM) {
2801  EBDetId ebid (sm_db,i+1,EBDetId::SMCRYSTALMODE) ;
2802  if (calib_status[i]) ical->setValue (ebid.rawId (), calib[i]) ;
2803  else ical->setValue (ebid.rawId (), 1.) ;
2804  }
2805  //}
2806  } // loop over channels
2807 
2808 // edm::LogInfo ("EcalTrivialConditionRetriever") << "INTERCALIBRATION DONE" ;
2809  return ical;
2810 
2811 
2812 
2813 
2814 
2815 }
static const int MIN_SM
Definition: EBDetId.h:152
ii
Definition: cuy.py:590
static const int MAX_SM
Definition: EBDetId.h:153
static const int SMCRYSTALMODE
Definition: EBDetId.h:167
#define str(s)
std::unique_ptr< EcalMappingElectronics > EcalTrivialConditionRetriever::getMappingFromConfiguration ( const EcalMappingElectronicsRcd )
virtual

Definition at line 3048 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().

3049 {
3050  auto mapping = std::make_unique<EcalMappingElectronics>();
3051  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading mapping from file " << edm::FileInPath(mappingFile_).fullPath().c_str() ;
3052 
3053  std::ifstream f(edm::FileInPath(mappingFile_).fullPath().c_str());
3054  if (!f.good())
3055  {
3056  edm::LogError("EcalTrivialConditionRetriever") << "File not found";
3057  throw cms::Exception("FileNotFound");
3058  }
3059 
3060  // uint32_t detid, elecid, triggerid;
3061 
3062  int ix, iy, iz, CL;
3063  // int dccid, towerid, stripid, xtalid;
3064  // int tccid, tower, ipseudostrip, xtalinps;
3065  int dccid, towerid, pseudostrip_in_SC, xtal_in_pseudostrip;
3066  int tccid, tower, pseudostrip_in_TCC, pseudostrip_in_TT;
3067 
3068  while ( ! f.eof())
3069  {
3070  // f >> detid >> elecid >> triggerid;
3071  f >> ix >> iy >> iz >> CL >> dccid >> towerid >> pseudostrip_in_SC >> xtal_in_pseudostrip >> tccid >> tower >>
3072  pseudostrip_in_TCC >> pseudostrip_in_TT ;
3073 
3074 // if (!EEDetId::validDetId(ix,iy,iz))
3075 // continue;
3076 
3077  EEDetId detid(ix,iy,iz,EEDetId::XYMODE);
3078  // std::cout << " dcc tower ps_in_SC xtal_in_ps " << dccid << " " << towerid << " " << pseudostrip_in_SC << " " << xtal_in_pseudostrip << std::endl;
3079  EcalElectronicsId elecid(dccid,towerid, pseudostrip_in_SC, xtal_in_pseudostrip);
3080  // std::cout << " tcc tt ps_in_TT xtal_in_ps " << tccid << " " << tower << " " << pseudostrip_in_TT << " " << xtal_in_pseudostrip << std::endl;
3081  EcalTriggerElectronicsId triggerid(tccid, tower, pseudostrip_in_TT, xtal_in_pseudostrip);
3082  EcalMappingElement aElement;
3083  aElement.electronicsid = elecid.rawId();
3084  aElement.triggerid = triggerid.rawId();
3085  (*mapping).setValue(detid, aElement);
3086  }
3087 
3088  f.close();
3089  return mapping;
3090 }
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:339
double f[11][100]
std::string fullPath() const
Definition: FileInPath.cc:197
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
std::unique_ptr< EcalTimeCalibConstants > EcalTrivialConditionRetriever::getTimeCalibConstantsFromConfiguration ( const EcalTimeCalibConstantsRcd )
virtual

Definition at line 2822 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().

2823 {
2824  auto ical = std::make_unique<EcalTimeCalibConstants>();
2825 
2826  // Read the values from a txt file
2827  // -------------------------------
2828 
2829  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading time calibration constants from file "
2830  << timeCalibConstantsFile_.c_str() ;
2831 
2832  FILE *inpFile ;
2833  inpFile = fopen (timeCalibConstantsFile_.c_str (),"r") ;
2834  if (!inpFile)
2835  {
2836  edm::LogError ("EcalTrivialConditionRetriever")
2837  << "*** Can not open file: " << timeCalibConstantsFile_ ;
2838  throw cms::Exception ("Cannot open inter-calibration coefficients txt file") ;
2839  }
2840 
2841  char line[256] ;
2842  std::ostringstream str ;
2843  fgets (line,255,inpFile) ;
2844  int sm_number=atoi (line) ;
2845  str << "sm: " << sm_number ;
2846 
2847  fgets (line,255,inpFile) ;
2848  //int nevents=atoi (line) ; // not necessary here just for online conddb
2849 
2850  fgets (line,255,inpFile) ;
2851  std::string gen_tag = line ;
2852  str << "gen tag: " << gen_tag ; // should I use this?
2853 
2854  fgets (line,255,inpFile) ;
2855  std::string cali_method = line ;
2856  str << "cali method: " << cali_method << std::endl ; // not important
2857 
2858  fgets (line,255,inpFile) ;
2859  std::string cali_version = line ;
2860  str << "cali version: " << cali_version << std::endl ; // not important
2861 
2862  fgets (line,255,inpFile) ;
2863  std::string cali_type = line ;
2864  str << "cali type: " << cali_type ; // not important
2865 
2866  edm::LogInfo("EcalTrivialConditionRetriever")
2867  << "TimeCalibration file - "
2868  << str.str () << std::endl ;
2869 
2870  float calib[1700]={1} ;
2871  int calib_status[1700]={0} ;
2872 
2873  int ii = 0 ;
2874 
2875  while (fgets (line,255,inpFile))
2876  {
2877  ii++;
2878  int dmy_num = 0 ;
2879  float dmy_calib = 0. ;
2880  float dmy_RMS = 0. ;
2881  int dmy_events = 0 ;
2882  int dmy_status = 0 ;
2883  sscanf (line, "%d %f %f %d %d", &dmy_num, &dmy_calib,
2884  &dmy_RMS, &dmy_events,
2885  &dmy_status) ;
2886  assert (dmy_num >= 1) ;
2887  assert (dmy_num <= 1700) ;
2888  calib[dmy_num-1] = dmy_calib ;
2889  calib_status[dmy_num-1] = dmy_status ;
2890 
2891 // edm::LogInfo ("EcalTrivialConditionRetriever")
2892 // << "[PIETRO] cry = " << dmy_num
2893 // << " calib = " << calib[dmy_num-1]
2894 // << " RMS = " << dmy_RMS
2895 // << " events = " << dmy_events
2896 // << " status = " << calib_status[dmy_num-1]
2897 // << std::endl ;
2898  }
2899 
2900  fclose (inpFile) ; // close inp. file
2901  edm::LogInfo ("EcalTrivialConditionRetriever") << "Read timeCalibrations for " << ii << " xtals " ;
2902  if (ii!=1700) edm::LogWarning ("StoreEcalCondition")
2903  << "Some crystals missing, set to 1" << std::endl ;
2904 
2905  // Transfer the data to the inter-calibration coefficients container
2906  // -----------------------------------------------------------------
2907 
2908  // DB supermodule always set to 1 for the TestBeam FIXME
2909  int sm_db=1 ;
2910  // loop over channels
2911  for (int i=0 ; i<1700 ; i++)
2912  {
2913  //if (EBDetId::validDetId(iEta,iPhi)) {
2914  // CANNOT be used -- validDetId only checks ETA PHI method
2915  // doing a check by hand, here is the only place in CMSSW
2916  // outside TB code and EcalRawToDigi where needed
2917  // => no need for changing the DetId interface
2918  //
2919  // checking only sm_db -- guess can change with the above FIXME
2920  if (sm_db >= EBDetId::MIN_SM && sm_db <= EBDetId::MAX_SM) {
2921  EBDetId ebid (sm_db,i+1,EBDetId::SMCRYSTALMODE) ;
2922  if (calib_status[i]) ical->setValue (ebid.rawId (), calib[i]) ;
2923  else ical->setValue (ebid.rawId (), 1.) ;
2924  }
2925  //}
2926  } // loop over channels
2927 
2928 // edm::LogInfo ("EcalTrivialConditionRetriever") << "INTERCALIBRATION DONE" ;
2929  return ical;
2930 }
static const int MIN_SM
Definition: EBDetId.h:152
ii
Definition: cuy.py:590
static const int MAX_SM
Definition: EBDetId.h:153
static const int SMCRYSTALMODE
Definition: EBDetId.h:167
#define str(s)
std::unique_ptr< EcalTimeCalibErrors > EcalTrivialConditionRetriever::getTimeCalibErrorsFromConfiguration ( const EcalTimeCalibErrorsRcd )
virtual

Definition at line 2935 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().

2936 {
2937  auto ical = std::make_unique<EcalTimeCalibErrors>();
2938 
2939  // Read the values from a txt file
2940  // -------------------------------
2941 
2942  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading timeCalibration constants from file "
2943  << timeCalibErrorsFile_.c_str() ;
2944 
2945  FILE *inpFile ;
2946  inpFile = fopen (timeCalibErrorsFile_.c_str (),"r") ;
2947  if (!inpFile)
2948  {
2949  edm::LogError ("EcalTrivialConditionRetriever")
2950  << "*** Can not open file: " << timeCalibErrorsFile_ ;
2951  throw cms::Exception ("Cannot open inter-calibration coefficients txt file") ;
2952  }
2953 
2954  char line[256] ;
2955  std::ostringstream str ;
2956  fgets (line,255,inpFile) ;
2957  int sm_number=atoi (line) ;
2958  str << "sm: " << sm_number ;
2959 
2960  fgets (line,255,inpFile) ;
2961  //int nevents=atoi (line) ; // not necessary here just for online conddb
2962 
2963  fgets (line,255,inpFile) ;
2964  std::string gen_tag = line ;
2965  str << "gen tag: " << gen_tag ; // should I use this?
2966 
2967  fgets (line,255,inpFile) ;
2968  std::string cali_method = line ;
2969  str << "cali method: " << cali_method << std::endl ; // not important
2970 
2971  fgets (line,255,inpFile) ;
2972  std::string cali_version = line ;
2973  str << "cali version: " << cali_version << std::endl ; // not important
2974 
2975  fgets (line,255,inpFile) ;
2976  std::string cali_type = line ;
2977  str << "cali type: " << cali_type ; // not important
2978 
2979  edm::LogInfo("EcalTrivialConditionRetriever")
2980  << "TimeCalibration file - "
2981  << str.str () << std::endl ;
2982 
2983  float calib[1700]={1} ;
2984  int calib_status[1700]={0} ;
2985 
2986  int ii = 0 ;
2987 
2988  while (fgets (line,255,inpFile))
2989  {
2990  ii++;
2991  int dmy_num = 0 ;
2992  float dmy_calib = 0. ;
2993  float dmy_RMS = 0. ;
2994  int dmy_events = 0 ;
2995  int dmy_status = 0 ;
2996  sscanf (line, "%d %f %f %d %d", &dmy_num, &dmy_calib,
2997  &dmy_RMS, &dmy_events,
2998  &dmy_status) ;
2999  assert (dmy_num >= 1) ;
3000  assert (dmy_num <= 1700) ;
3001  calib[dmy_num-1] = dmy_calib ;
3002  calib_status[dmy_num-1] = dmy_status ;
3003 
3004 // edm::LogInfo ("EcalTrivialConditionRetriever")
3005 // << "[PIETRO] cry = " << dmy_num
3006 // << " calib = " << calib[dmy_num-1]
3007 // << " RMS = " << dmy_RMS
3008 // << " events = " << dmy_events
3009 // << " status = " << calib_status[dmy_num-1]
3010 // << std::endl ;
3011  }
3012 
3013  fclose (inpFile) ; // close inp. file
3014  edm::LogInfo ("EcalTrivialConditionRetriever") << "Read time calibrations for " << ii << " xtals " ;
3015  if (ii!=1700) edm::LogWarning ("StoreEcalCondition")
3016  << "Some crystals missing, set to 1" << std::endl ;
3017 
3018  // Transfer the data to the inter-calibration coefficients container
3019  // -----------------------------------------------------------------
3020 
3021  // DB supermodule always set to 1 for the TestBeam FIXME
3022  int sm_db=1 ;
3023  // loop over channels
3024  for (int i=0 ; i<1700 ; i++)
3025  {
3026  //if (EBDetId::validDetId(iEta,iPhi)) {
3027  // CANNOT be used -- validDetId only checks ETA PHI method
3028  // doing a check by hand, here is the only place in CMSSW
3029  // outside TB code and EcalRawToDigi where needed
3030  // => no need for changing the DetId interface
3031  //
3032  // checking only sm_db -- guess can change with the above FIXME
3033  if (sm_db >= EBDetId::MIN_SM && sm_db <= EBDetId::MAX_SM) {
3034  EBDetId ebid (sm_db,i+1,EBDetId::SMCRYSTALMODE) ;
3035  if (calib_status[i]) ical->setValue (ebid.rawId (), calib[i]) ;
3036  else ical->setValue (ebid.rawId (), 1.) ;
3037  }
3038  //}
3039  } // loop over channels
3040 
3041 // edm::LogInfo ("EcalTrivialConditionRetriever") << "INTERCALIBRATION DONE" ;
3042  return ical;
3043 }
static const int MIN_SM
Definition: EBDetId.h:152
ii
Definition: cuy.py:590
static const int MAX_SM
Definition: EBDetId.h:153
static const int SMCRYSTALMODE
Definition: EBDetId.h:167
#define str(s)
std::unique_ptr< EcalTPGCrystalStatus > EcalTrivialConditionRetriever::getTrgChannelStatusFromConfiguration ( const EcalTPGCrystalStatusRcd )
virtual

Definition at line 2284 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().

2285 {
2286  auto ecalStatus = std::make_unique<EcalTPGCrystalStatus>();
2287 
2288 
2289  // start by setting all statuses to 0
2290 
2291  // barrel
2292  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
2293  if(ieta==0) continue;
2294  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
2295  if (EBDetId::validDetId(ieta,iphi)) {
2296  EBDetId ebid(ieta,iphi);
2297  ecalStatus->setValue( ebid, 0 );
2298  }
2299  }
2300  }
2301  // endcap
2302  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
2303  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
2304  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
2305  if (EEDetId::validDetId(iX,iY,1)) {
2306  EEDetId eedetidpos(iX,iY,1);
2307  ecalStatus->setValue( eedetidpos, 0 );
2308  }
2309  if (EEDetId::validDetId(iX,iY,-1)) {
2310  EEDetId eedetidneg(iX,iY,-1);
2311  ecalStatus->setValue( eedetidneg, 0 );
2312  }
2313  }
2314  }
2315 
2316 
2317 
2318  // overwrite the statuses which are in the file
2319 
2320  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading channel statuses from file " << edm::FileInPath(channelStatusFile_).fullPath().c_str() ;
2321  std::ifstream statusFile(edm::FileInPath(channelStatusFile_).fullPath().c_str());
2322  if ( !statusFile.good() ) {
2323  edm::LogError ("EcalTrivialConditionRetriever")
2324  << "*** Problems opening file: " << channelStatusFile_ ;
2325  throw cms::Exception ("Cannot open ECAL channel status file") ;
2326  }
2327 
2328  std::string EcalSubDet;
2329  std::string str;
2330  int hashIndex(0);
2331  int status(0);
2332 
2333  while (!statusFile.eof())
2334  {
2335  statusFile >> EcalSubDet;
2336  if (EcalSubDet!=std::string("EB") && EcalSubDet!=std::string("EE"))
2337  {
2338  std::getline(statusFile,str);
2339  continue;
2340  }
2341  else
2342  {
2343  statusFile>> hashIndex >> status;
2344  }
2345  // std::cout << EcalSubDet << " " << hashIndex << " " << status;
2346 
2347  if(EcalSubDet==std::string("EB"))
2348  {
2349  EBDetId ebid = EBDetId::unhashIndex(hashIndex);
2350  ecalStatus->setValue( ebid, status );
2351  }
2352  else if(EcalSubDet==std::string("EE"))
2353  {
2354  EEDetId eedetid = EEDetId::unhashIndex(hashIndex);
2355  ecalStatus->setValue( eedetid, status );
2356  }
2357  else
2358  {
2359  edm::LogError ("EcalTrivialConditionRetriever")
2360  << " *** " << EcalSubDet << " is neither EB nor EE ";
2361  }
2362 
2363  }
2364  // the file is supposed to be in the form -- FIXME
2365 
2366 
2367  statusFile.close();
2368  return ecalStatus;
2369 }
static const int MIN_IPHI
Definition: EBDetId.h:142
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:99
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:114
std::string fullPath() const
Definition: FileInPath.cc:197
static const int IY_MAX
Definition: EEDetId.h:306
#define str(s)
void EcalTrivialConditionRetriever::getWeightsFromConfiguration ( const edm::ParameterSet ps)
private

Definition at line 1390 of file EcalTrivialConditionRetriever.cc.

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

1391 {
1392 
1393  std::vector < std::vector<double> > amplwgtv(nTDCbins_);
1394 
1395  if (!getWeightsFromFile_ && nTDCbins_ == 1)
1396  {
1397  std::vector<double> vampl;
1398  //As default using simple 3+1 weights
1399  vampl.push_back( -0.33333 );
1400  vampl.push_back( -0.33333 );
1401  vampl.push_back( -0.33333 );
1402  vampl.push_back( 0. );
1403  vampl.push_back( 0. );
1404  vampl.push_back( 1. );
1405  vampl.push_back( 0. );
1406  vampl.push_back( 0. );
1407  vampl.push_back( 0. );
1408  vampl.push_back( 0. );
1409  amplwgtv[0]= ps.getUntrackedParameter< std::vector<double> >("amplWeights", vampl);
1410  }
1411  else if (getWeightsFromFile_)
1412  {
1413  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading amplitude weights from file " << edm::FileInPath(amplWeightsFile_).fullPath().c_str() ;
1414  std::ifstream amplFile(edm::FileInPath(amplWeightsFile_).fullPath().c_str());
1415  int tdcBin=0;
1416  while (!amplFile.eof() && tdcBin < nTDCbins_)
1417  {
1418  for(int j = 0; j < 10; ++j) {
1419  float ww;
1420  amplFile >> ww;
1421  amplwgtv[tdcBin].push_back(ww);
1422  }
1423  ++tdcBin;
1424  }
1425  assert (tdcBin == nTDCbins_);
1426  //Read from file
1427  }
1428  else
1429  {
1430  //Not supported
1431  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1432  throw cms::Exception("WrongConfig");
1433  }
1434 
1435 
1436  for (int i=0;i<nTDCbins_;i++)
1437  {
1438  assert(amplwgtv[i].size() == 10);
1439  int j=0;
1440  for(std::vector<double>::const_iterator it = amplwgtv[i].begin(); it != amplwgtv[i].end(); ++it)
1441  {
1442  (amplWeights_[i])[j]=*it;
1443  j++;
1444  }
1445  }
1446 
1447 
1448  std::vector < std::vector<double> > amplwgtvAftGain(nTDCbins_);
1449 
1450  if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1451  {
1452  std::vector<double> vamplAftGain;
1453  vamplAftGain.push_back( 0. );
1454  vamplAftGain.push_back( 0. );
1455  vamplAftGain.push_back( 0. );
1456  vamplAftGain.push_back( 0. );
1457  vamplAftGain.push_back( 0. );
1458  vamplAftGain.push_back( 1. );
1459  vamplAftGain.push_back( 0. );
1460  vamplAftGain.push_back( 0. );
1461  vamplAftGain.push_back( 0. );
1462  vamplAftGain.push_back( 0. );
1463  amplwgtvAftGain[0] = ps.getUntrackedParameter< std::vector<double> >("amplWeightsAftGain", vamplAftGain);
1464  }
1465  else if (getWeightsFromFile_)
1466  {
1467  //Read from file
1468  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading amplitude weights aftre gain switch from file " << edm::FileInPath(amplWeightsAftFile_).fullPath().c_str() ;
1469  std::ifstream amplFile(edm::FileInPath(amplWeightsAftFile_).fullPath().c_str());
1470  int tdcBin=0;
1471  while (!amplFile.eof() && tdcBin < nTDCbins_)
1472  {
1473  for(int j = 0; j < 10; ++j) {
1474  float ww;
1475  amplFile >> ww;
1476  amplwgtvAftGain[tdcBin].push_back(ww);
1477  }
1478  ++tdcBin;
1479  }
1480  assert (tdcBin == nTDCbins_);
1481  }
1482  else
1483  {
1484  //Not supported
1485  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1486  throw cms::Exception("WrongConfig");
1487  }
1488 
1489  for (int i=0;i<nTDCbins_;i++)
1490  {
1491  assert(amplwgtvAftGain[i].size() == 10);
1492  int j=0;
1493  for(std::vector<double>::const_iterator it = amplwgtvAftGain[i].begin(); it != amplwgtvAftGain[i].end(); ++it) {
1494  (amplWeightsAft_[i])[j]=*it;
1495  j++;
1496  }
1497  }
1498 
1499  // default weights to reco amplitude w/o pedestal subtraction
1500 
1501  std::vector< std::vector<double> > pedwgtv(nTDCbins_);
1502 
1503  if (!getWeightsFromFile_ && nTDCbins_ == 1)
1504  {
1505  std::vector<double> vped;
1506  vped.push_back( 0.33333 );
1507  vped.push_back( 0.33333 );
1508  vped.push_back( 0.33333 );
1509  vped.push_back( 0. );
1510  vped.push_back( 0. );
1511  vped.push_back( 0. );
1512  vped.push_back( 0. );
1513  vped.push_back( 0. );
1514  vped.push_back( 0. );
1515  vped.push_back( 0. );
1516  pedwgtv[0] = ps.getUntrackedParameter< std::vector<double> >("pedWeights", vped);
1517  }
1518  else if (getWeightsFromFile_)
1519  {
1520  //Read from file
1521  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading pedestal weights from file " << edm::FileInPath(pedWeightsFile_).fullPath().c_str() ;
1522  std::ifstream pedFile(edm::FileInPath(pedWeightsFile_).fullPath().c_str());
1523  int tdcBin=0;
1524  while (!pedFile.eof() && tdcBin < nTDCbins_)
1525  {
1526  for(int j = 0; j < 10; ++j) {
1527  float ww;
1528  pedFile >> ww;
1529  pedwgtv[tdcBin].push_back(ww);
1530  }
1531  ++tdcBin;
1532  }
1533  assert (tdcBin == nTDCbins_);
1534  }
1535  else
1536  {
1537  //Not supported
1538  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1539  throw cms::Exception("WrongConfig");
1540  }
1541 
1542  for (int i=0;i<nTDCbins_;i++)
1543  {
1544  assert(pedwgtv[i].size() == 10);
1545  int j=0;
1546  for(std::vector<double>::const_iterator it = pedwgtv[i].begin(); it != pedwgtv[i].end(); ++it) {
1547  (pedWeights_[i])[j] = *it;
1548  j++;
1549  }
1550  }
1551 
1552  std::vector< std::vector<double> > pedwgtvaft(nTDCbins_);
1553 
1554  if (!getWeightsFromFile_ && nTDCbins_ == 1)
1555  {
1556  std::vector<double> vped;
1557  vped.push_back( 0. );
1558  vped.push_back( 0. );
1559  vped.push_back( 0. );
1560  vped.push_back( 0. );
1561  vped.push_back( 0. );
1562  vped.push_back( 0. );
1563  vped.push_back( 0. );
1564  vped.push_back( 0. );
1565  vped.push_back( 0. );
1566  vped.push_back( 0. );
1567  pedwgtvaft[0] = ps.getUntrackedParameter< std::vector<double> >("pedWeightsAft", vped);
1568  }
1569  else if (getWeightsFromFile_)
1570  {
1571  //Read from file
1572  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading pedestal after gain switch weights from file " << edm::FileInPath(pedWeightsAftFile_).fullPath().c_str() ;
1573  std::ifstream pedFile(edm::FileInPath(pedWeightsAftFile_).fullPath().c_str());
1574  int tdcBin=0;
1575  while (!pedFile.eof() && tdcBin < nTDCbins_)
1576  {
1577  for(int j = 0; j < 10; ++j) {
1578  float ww;
1579  pedFile >> ww;
1580  pedwgtvaft[tdcBin].push_back(ww);
1581  }
1582  ++tdcBin;
1583  }
1584  assert (tdcBin == nTDCbins_);
1585  }
1586  else
1587  {
1588  //Not supported
1589  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1590  throw cms::Exception("WrongConfig");
1591  }
1592 
1593  for (int i=0;i<nTDCbins_;i++)
1594  {
1595  assert(pedwgtvaft[i].size() == 10);
1596  int j=0;
1597  for(std::vector<double>::const_iterator it = pedwgtvaft[i].begin(); it != pedwgtvaft[i].end(); ++it) {
1598  (pedWeightsAft_[i])[j]=*it;
1599  j++;
1600  }
1601  }
1602 
1603 
1604 
1605  // default weights to reco jitter
1606 
1607  std::vector< std::vector<double> > jittwgtv(nTDCbins_);
1608 
1609  if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1610  {
1611  std::vector<double> vjitt;
1612  vjitt.push_back( 0.04066309 );
1613  vjitt.push_back( 0.04066309 );
1614  vjitt.push_back( 0.04066309 );
1615  vjitt.push_back( 0.000 );
1616  vjitt.push_back( 1.325176 );
1617  vjitt.push_back( -0.04997078 );
1618  vjitt.push_back( -0.504338 );
1619  vjitt.push_back( -0.5024844 );
1620  vjitt.push_back( -0.3903718 );
1621  vjitt.push_back( 0.000 );
1622  jittwgtv[0] = ps.getUntrackedParameter< std::vector<double> >("jittWeights", vjitt);
1623  }
1624  else if (getWeightsFromFile_)
1625  {
1626  //Read from file
1627  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading jitter weights from file " << edm::FileInPath(jittWeightsFile_).fullPath().c_str() ;
1628  std::ifstream jittFile(edm::FileInPath(jittWeightsFile_).fullPath().c_str());
1629  int tdcBin=0;
1630  while (!jittFile.eof() && tdcBin < nTDCbins_)
1631  {
1632  for(int j = 0; j < 10; ++j) {
1633  float ww;
1634  jittFile >> ww;
1635  jittwgtv[tdcBin].push_back(ww);
1636  }
1637  ++tdcBin;
1638  }
1639  assert (tdcBin == nTDCbins_);
1640  }
1641  else
1642  {
1643  //Not supported
1644  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1645  throw cms::Exception("WrongConfig");
1646  }
1647 
1648  for (int i=0;i<nTDCbins_;i++)
1649  {
1650  assert(jittwgtv[i].size() == 10);
1651  int j=0;
1652  for(std::vector<double>::const_iterator it = jittwgtv[i].begin(); it != jittwgtv[i].end(); ++it) {
1653  (jittWeights_[i])[j]= *it;
1654  j++;
1655  }
1656  }
1657 
1658  std::vector< std::vector<double> > jittwgtvaft(nTDCbins_);
1659 
1660  if (!getWeightsFromFile_ && nTDCbins_ == 1)
1661  {
1662  std::vector<double> vjitt;
1663  vjitt.push_back( 0. );
1664  vjitt.push_back( 0. );
1665  vjitt.push_back( 0. );
1666  vjitt.push_back( 0. );
1667  vjitt.push_back( 1.097871 );
1668  vjitt.push_back( -0.04551035 );
1669  vjitt.push_back( -0.4159156 );
1670  vjitt.push_back( -0.4185352 );
1671  vjitt.push_back( -0.3367127 );
1672  vjitt.push_back( 0. );
1673  jittwgtvaft[0] = ps.getUntrackedParameter< std::vector<double> >("jittWeightsAft", vjitt);
1674  }
1675  else if (getWeightsFromFile_)
1676  {
1677  //Read from file
1678  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading jitter after gain switch weights from file " << edm::FileInPath(jittWeightsAftFile_).fullPath().c_str() ;
1679  std::ifstream jittFile(edm::FileInPath(jittWeightsAftFile_).fullPath().c_str());
1680  int tdcBin=0;
1681  while (!jittFile.eof() && tdcBin < nTDCbins_)
1682  {
1683  for(int j = 0; j < 10; ++j) {
1684  float ww;
1685  jittFile >> ww;
1686  jittwgtvaft[tdcBin].push_back(ww);
1687  }
1688  ++tdcBin;
1689  }
1690  assert (tdcBin == nTDCbins_);
1691  }
1692  else
1693  {
1694  //Not supported
1695  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1696  throw cms::Exception("WrongConfig");
1697  }
1698 
1699  for (int i=0;i<nTDCbins_;i++)
1700  {
1701  assert(jittwgtvaft[i].size() == 10);
1702  int j=0;
1703  for(std::vector<double>::const_iterator it = jittwgtvaft[i].begin(); it != jittwgtvaft[i].end(); ++it) {
1704  (jittWeightsAft_[i])[j]= *it;
1705  j++;
1706  }
1707  }
1708 
1709 
1710  std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix(nTDCbins_);
1711  if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1712  {
1713  // chi2Matrix[0].resize(10);
1714  // for (int i=0;i<10;i++)
1715  // chi2Matrix[0][i].resize(10);
1716 
1717  chi2Matrix[0](0,0) = 0.694371;
1718  chi2Matrix[0](0,1) = -0.305629;
1719  chi2Matrix[0](0,2) = -0.305629;
1720  chi2Matrix[0](0,3) = 0.;
1721  chi2Matrix[0](0,4) = 0.;
1722  chi2Matrix[0](0,5) = 0.;
1723  chi2Matrix[0](0,6) = 0.;
1724  chi2Matrix[0](0,7) = 0.;
1725  chi2Matrix[0](0,8) = 0.;
1726  chi2Matrix[0](0,9) = 0.;
1727  chi2Matrix[0](1,0) = -0.305629;
1728  chi2Matrix[0](1,1) = 0.694371;
1729  chi2Matrix[0](1,2) = -0.305629;
1730  chi2Matrix[0](1,3) = 0.;
1731  chi2Matrix[0](1,4) = 0.;
1732  chi2Matrix[0](1,5) = 0.;
1733  chi2Matrix[0](1,6) = 0.;
1734  chi2Matrix[0](1,7) = 0.;
1735  chi2Matrix[0](1,8) = 0.;
1736  chi2Matrix[0](1,9) = 0.;
1737  chi2Matrix[0](2,0) = -0.305629;
1738  chi2Matrix[0](2,1) = -0.305629;
1739  chi2Matrix[0](2,2) = 0.694371;
1740  chi2Matrix[0](2,3) = 0.;
1741  chi2Matrix[0](2,4) = 0.;
1742  chi2Matrix[0](2,5) = 0.;
1743  chi2Matrix[0](2,6) = 0.;
1744  chi2Matrix[0](2,7) = 0.;
1745  chi2Matrix[0](2,8) = 0.;
1746  chi2Matrix[0](2,9) = 0.;
1747  chi2Matrix[0](3,0) = 0.;
1748  chi2Matrix[0](3,1) = 0.;
1749  chi2Matrix[0](3,2) = 0.;
1750  chi2Matrix[0](3,3) = 0.;
1751  chi2Matrix[0](3,4) = 0.;
1752  chi2Matrix[0](3,5) = 0.;
1753  chi2Matrix[0](3,6) = 0.;
1754  chi2Matrix[0](3,7) = 0.;
1755  chi2Matrix[0](3,8) = 0.;
1756  chi2Matrix[0](3,9) = 0.;
1757  chi2Matrix[0](4,0) = 0.;
1758  chi2Matrix[0](4,1) = 0.;
1759  chi2Matrix[0](4,2) = 0.;
1760  chi2Matrix[0](4,3) = 0.;
1761  chi2Matrix[0](4,4) = 0.8027116;
1762  chi2Matrix[0](4,5) = -0.2517103;
1763  chi2Matrix[0](4,6) = -0.2232882;
1764  chi2Matrix[0](4,7) = -0.1716192;
1765  chi2Matrix[0](4,8) = -0.1239006;
1766  chi2Matrix[0](4,9) = 0.;
1767  chi2Matrix[0](5,0) = 0.;
1768  chi2Matrix[0](5,1) = 0.;
1769  chi2Matrix[0](5,2) = 0.;
1770  chi2Matrix[0](5,3) = 0.;
1771  chi2Matrix[0](5,4) = -0.2517103;
1772  chi2Matrix[0](5,5) = 0.6528964;
1773  chi2Matrix[0](5,6) = -0.2972839;
1774  chi2Matrix[0](5,7) = -0.2067162;
1775  chi2Matrix[0](5,8) = -0.1230729;
1776  chi2Matrix[0](5,9) = 0.;
1777  chi2Matrix[0](6,0) = 0.;
1778  chi2Matrix[0](6,1) = 0.;
1779  chi2Matrix[0](6,2) = 0.;
1780  chi2Matrix[0](6,3) = 0.;
1781  chi2Matrix[0](6,4) = -0.2232882;
1782  chi2Matrix[0](6,5) = -0.2972839;
1783  chi2Matrix[0](6,6) = 0.7413607;
1784  chi2Matrix[0](6,7) = -0.1883866;
1785  chi2Matrix[0](6,8) = -0.1235052;
1786  chi2Matrix[0](6,9) = 0.;
1787  chi2Matrix[0](7,0) = 0.;
1788  chi2Matrix[0](7,1) = 0.;
1789  chi2Matrix[0](7,2) = 0.;
1790  chi2Matrix[0](7,3) = 0.;
1791  chi2Matrix[0](7,4) = -0.1716192;
1792  chi2Matrix[0](7,5) = -0.2067162;
1793  chi2Matrix[0](7,6) = -0.1883866;
1794  chi2Matrix[0](7,7) = 0.844935;
1795  chi2Matrix[0](7,8) = -0.124291;
1796  chi2Matrix[0](7,9) = 0.;
1797  chi2Matrix[0](8,0) = 0.;
1798  chi2Matrix[0](8,1) = 0.;
1799  chi2Matrix[0](8,2) = 0.;
1800  chi2Matrix[0](8,3) = 0.;
1801  chi2Matrix[0](8,4) = -0.1239006;
1802  chi2Matrix[0](8,5) = -0.1230729;
1803  chi2Matrix[0](8,6) = -0.1235052;
1804  chi2Matrix[0](8,7) = -0.124291;
1805  chi2Matrix[0](8,8) = 0.8749833;
1806  chi2Matrix[0](8,9) = 0.;
1807  chi2Matrix[0](9,0) = 0.;
1808  chi2Matrix[0](9,1) = 0.;
1809  chi2Matrix[0](9,2) = 0.;
1810  chi2Matrix[0](9,3) = 0.;
1811  chi2Matrix[0](9,4) = 0.;
1812  chi2Matrix[0](9,5) = 0.;
1813  chi2Matrix[0](9,6) = 0.;
1814  chi2Matrix[0](9,7) = 0.;
1815  chi2Matrix[0](9,8) = 0.;
1816  chi2Matrix[0](9,9) = 0.;
1817  }
1818  else if (getWeightsFromFile_)
1819  {
1820  //Read from file
1821  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading chi2Matrix from file " << edm::FileInPath(chi2MatrixFile_).fullPath().c_str() ;
1822  std::ifstream chi2MatrixFile(edm::FileInPath(chi2MatrixFile_).fullPath().c_str());
1823  int tdcBin=0;
1824  while (!chi2MatrixFile.eof() && tdcBin < nTDCbins_)
1825  {
1826  // chi2Matrix[tdcBin].resize(10);
1827  for(int j = 0; j < 10; ++j) {
1828  for(int l = 0; l < 10; ++l) {
1829  float ww;
1830  chi2MatrixFile >> ww;
1831  chi2Matrix[tdcBin](j,l)=ww;
1832  }
1833  }
1834  ++tdcBin;
1835  }
1836  assert (tdcBin == nTDCbins_);
1837  }
1838  else
1839  {
1840  //Not supported
1841  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1842  throw cms::Exception("WrongConfig");
1843  }
1844 
1845 // for (int i=0;i<nTDCbins_;i++)
1846 // {
1847  // assert(chi2Matrix[i].size() == 10);
1848  chi2Matrix_ = chi2Matrix;
1849 // }
1850 
1851  std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2MatrixAft(nTDCbins_);
1852  if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1853  {
1854  // chi2MatrixAft[0].resize(10);
1855  // for (int i=0;i<10;i++)
1856  // chi2MatrixAft[0][i].resize(10);
1857 
1858  chi2MatrixAft[0](0,0) = 0.;
1859  chi2MatrixAft[0](0,1) = 0.;
1860  chi2MatrixAft[0](0,2) = 0.;
1861  chi2MatrixAft[0](0,3) = 0.;
1862  chi2MatrixAft[0](0,4) = 0.;
1863  chi2MatrixAft[0](0,5) = 0.;
1864  chi2MatrixAft[0](0,6) = 0.;
1865  chi2MatrixAft[0](0,7) = 0.;
1866  chi2MatrixAft[0](0,8) = 0.;
1867  chi2MatrixAft[0](0,9) = 0.;
1868  chi2MatrixAft[0](1,0) = 0.;
1869  chi2MatrixAft[0](1,1) = 0.;
1870  chi2MatrixAft[0](1,2) = 0.;
1871  chi2MatrixAft[0](1,3) = 0.;
1872  chi2MatrixAft[0](1,4) = 0.;
1873  chi2MatrixAft[0](1,5) = 0.;
1874  chi2MatrixAft[0](1,6) = 0.;
1875  chi2MatrixAft[0](1,7) = 0.;
1876  chi2MatrixAft[0](1,8) = 0.;
1877  chi2MatrixAft[0](1,9) = 0.;
1878  chi2MatrixAft[0](2,0) = 0.;
1879  chi2MatrixAft[0](2,1) = 0.;
1880  chi2MatrixAft[0](2,2) = 0.;
1881  chi2MatrixAft[0](2,3) = 0.;
1882  chi2MatrixAft[0](2,4) = 0.;
1883  chi2MatrixAft[0](2,5) = 0.;
1884  chi2MatrixAft[0](2,6) = 0.;
1885  chi2MatrixAft[0](2,7) = 0.;
1886  chi2MatrixAft[0](2,8) = 0.;
1887  chi2MatrixAft[0](2,9) = 0.;
1888  chi2MatrixAft[0](3,0) = 0.;
1889  chi2MatrixAft[0](3,1) = 0.;
1890  chi2MatrixAft[0](3,2) = 0.;
1891  chi2MatrixAft[0](3,3) = 0.;
1892  chi2MatrixAft[0](3,4) = 0.;
1893  chi2MatrixAft[0](3,5) = 0.;
1894  chi2MatrixAft[0](3,6) = 0.;
1895  chi2MatrixAft[0](3,7) = 0.;
1896  chi2MatrixAft[0](3,8) = 0.;
1897  chi2MatrixAft[0](3,9) = 0.;
1898  chi2MatrixAft[0](4,0) = 0.;
1899  chi2MatrixAft[0](4,1) = 0.;
1900  chi2MatrixAft[0](4,2) = 0.;
1901  chi2MatrixAft[0](4,3) = 0.;
1902  chi2MatrixAft[0](4,4) = 0.8030884;
1903  chi2MatrixAft[0](4,5) = -0.2543541;
1904  chi2MatrixAft[0](4,6) = -0.2243544;
1905  chi2MatrixAft[0](4,7) = -0.1698177;
1906  chi2MatrixAft[0](4,8) = -0.1194506;
1907  chi2MatrixAft[0](4,9) = 0.;
1908  chi2MatrixAft[0](5,0) = 0.;
1909  chi2MatrixAft[0](5,1) = 0.;
1910  chi2MatrixAft[0](5,2) = 0.;
1911  chi2MatrixAft[0](5,3) = 0.;
1912  chi2MatrixAft[0](5,4) = -0.2543541;
1913  chi2MatrixAft[0](5,5) = 0.6714465;
1914  chi2MatrixAft[0](5,6) = -0.2898025;
1915  chi2MatrixAft[0](5,7) = -0.2193564;
1916  chi2MatrixAft[0](5,8) = -0.1542964;
1917  chi2MatrixAft[0](5,9) = 0.;
1918  chi2MatrixAft[0](6,0) = 0.;
1919  chi2MatrixAft[0](6,1) = 0.;
1920  chi2MatrixAft[0](6,2) = 0.;
1921  chi2MatrixAft[0](6,3) = 0.;
1922  chi2MatrixAft[0](6,4) = -0.2243544;
1923  chi2MatrixAft[0](6,5) = -0.2898025;
1924  chi2MatrixAft[0](6,6) = 0.7443781;
1925  chi2MatrixAft[0](6,7) = -0.1934846;
1926  chi2MatrixAft[0](6,8) = -0.136098;
1927  chi2MatrixAft[0](6,9) = 0.;
1928  chi2MatrixAft[0](7,0) = 0.;
1929  chi2MatrixAft[0](7,1) = 0.;
1930  chi2MatrixAft[0](7,2) = 0.;
1931  chi2MatrixAft[0](7,3) = 0.;
1932  chi2MatrixAft[0](7,4) = -0.1698177;
1933  chi2MatrixAft[0](7,5) = -0.2193564;
1934  chi2MatrixAft[0](7,6) = -0.1934846;
1935  chi2MatrixAft[0](7,7) = 0.8535482;
1936  chi2MatrixAft[0](7,8) = -0.1030149;
1937  chi2MatrixAft[0](7,9) = 0.;
1938  chi2MatrixAft[0](8,0) = 0.;
1939  chi2MatrixAft[0](8,1) = 0.;
1940  chi2MatrixAft[0](8,2) = 0.;
1941  chi2MatrixAft[0](8,3) = 0.;
1942  chi2MatrixAft[0](8,4) = -0.1194506;
1943  chi2MatrixAft[0](8,5) = -0.1542964;
1944  chi2MatrixAft[0](8,6) = -0.136098;
1945  chi2MatrixAft[0](8,7) = -0.1030149;
1946  chi2MatrixAft[0](8,8) = 0.9275388;
1947  chi2MatrixAft[0](8,9) = 0.;
1948  chi2MatrixAft[0](9,0) = 0.;
1949  chi2MatrixAft[0](9,1) = 0.;
1950  chi2MatrixAft[0](9,2) = 0.;
1951  chi2MatrixAft[0](9,3) = 0.;
1952  chi2MatrixAft[0](9,4) = 0.;
1953  chi2MatrixAft[0](9,5) = 0.;
1954  chi2MatrixAft[0](9,6) = 0.;
1955  chi2MatrixAft[0](9,7) = 0.;
1956  chi2MatrixAft[0](9,8) = 0.;
1957  chi2MatrixAft[0](9,9) = 0.;
1958  }
1959  else if (getWeightsFromFile_)
1960  {
1961  //Read from file
1962  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading chi2MatrixAft from file " << edm::FileInPath(chi2MatrixAftFile_).fullPath().c_str() ;
1963  std::ifstream chi2MatrixAftFile(edm::FileInPath(chi2MatrixAftFile_).fullPath().c_str());
1964  int tdcBin=0;
1965  while (!chi2MatrixAftFile.eof() && tdcBin < nTDCbins_)
1966  {
1967  // chi2MatrixAft[tdcBin].resize(10);
1968  for(int j = 0; j < 10; ++j) {
1969  for(int l = 0; l < 10; ++l) {
1970  float ww;
1971  chi2MatrixAftFile >> ww;
1972  chi2MatrixAft[tdcBin](j,l)=ww;
1973  }
1974  }
1975  ++tdcBin;
1976  }
1977  assert (tdcBin == nTDCbins_);
1978  }
1979  else
1980  {
1981  //Not supported
1982  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1983  throw cms::Exception("WrongConfig");
1984  }
1985 
1986 // for (int i=0;i<nTDCbins_;i++)
1987 // {
1988  // assert(chi2MatrixAft[i].size() == 10);
1989  chi2MatrixAft_ = chi2MatrixAft;
1990  // }
1991 
1992 }
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:197
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 931 of file EcalTrivialConditionRetriever.cc.

Referenced by EcalTrivialConditionRetriever().

932 {
933  return std::make_unique<EcalADCToGeVConstant>(adcToGeVEBConstant_,adcToGeVEEConstant_);
934 }
std::unique_ptr< Alignments > EcalTrivialConditionRetriever::produceEcalAlignmentEB ( const EBAlignmentRcd )
virtual

Definition at line 3105 of file EcalTrivialConditionRetriever.cc.

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

Referenced by EcalTrivialConditionRetriever().

3105  {
3106  double mytrans[3] = {0., 0., 0.};
3107  double myeuler[3] = {0., 0., 0.};
3108  std::ifstream f;
3110  f.open(edm::FileInPath(EBAlignmentFile_).fullPath().c_str());
3111  std::vector<AlignTransform> my_align;
3112  int ieta = 1;
3113  int iphi = 0;
3114  for(int SM = 1 ; SM < 37; SM++ ) {
3115  // make an EBDetId since we need EBDetId::rawId()
3116  if(SM > 18) {
3117  iphi = 1 + (SM - 19) * 20;
3118  ieta = -1;
3119  }
3120  else
3121  iphi = SM * 20;
3122  EBDetId ebdetId(ieta,iphi);
3124  f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
3125  std::cout << " translation " << mytrans[0] << " " << mytrans[1] << " " << mytrans[2] << "\n"
3126  << " euler " << myeuler[0] << " " << myeuler[1] << " " << myeuler[2] << std::endl;
3127  }
3128  CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
3129  CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
3130  AlignTransform transform( translation, euler, ebdetId );
3131  my_align.push_back(transform);
3132  }
3133  /*
3134  // check
3135  uint32_t m_rawid;
3136  double m_x, m_y, m_z;
3137  double m_phi, m_theta, m_psi;
3138  int SM = 0;
3139  for (std::vector<AlignTransform>::const_iterator i = my_align.begin(); i != my_align.end(); ++i){
3140  m_rawid = i->rawId();
3141  CLHEP::Hep3Vector translation = i->translation();
3142  m_x = translation.x();
3143  m_y = translation.y();
3144  m_z = translation.z();
3145  CLHEP::HepRotation rotation = i->rotation();
3146  m_phi = rotation.getPhi();
3147  m_theta = rotation.getTheta();
3148  m_psi = rotation.getPsi();
3149  SM++;
3150  std::cout << " SM " << SM << " Id " << m_rawid << " x " << m_x << " y " << m_y << " z " << m_z
3151  << " phi " << m_phi << " theta " << m_theta << " psi " << m_psi << std::endl;
3152  }
3153  */
3154  Alignments a;
3155  a.m_align = my_align;
3156 
3157  return std::make_unique<Alignments>(a);
3158 }
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 3161 of file EcalTrivialConditionRetriever.cc.

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

Referenced by EcalTrivialConditionRetriever().

3161  {
3162  double mytrans[3] = {0., 0., 0.};
3163  double myeuler[3] = {0., 0., 0.};
3164  std::ifstream f;
3166  f.open(edm::FileInPath(EEAlignmentFile_).fullPath().c_str());
3167  std::vector<AlignTransform> my_align;
3168  int ix = 20;
3169  int iy = 50;
3170  int side = -1;
3171  for(int Dee = 0 ; Dee < 4; Dee++ ) {
3172  // make an EEDetId since we need EEDetId::rawId()
3173  if(Dee == 1 || Dee == 3)
3174  ix = 70;
3175  else ix = 20;
3176  if(Dee == 2)
3177  side = 1;
3178  EEDetId eedetId(ix, iy, side);
3180  f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
3181  std::cout << " translation " << mytrans[0] << " " << mytrans[1] << " " << mytrans[2] << "\n"
3182  << " euler " << myeuler[0] << " " << myeuler[1] << " " << myeuler[2] << std::endl;
3183  }
3184  CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
3185  CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
3186  AlignTransform transform( translation, euler, eedetId );
3187  my_align.push_back(transform);
3188  }
3189  Alignments a;
3190  a.m_align = my_align;
3191  return std::make_unique<Alignments>(a);
3192 }
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 3195 of file EcalTrivialConditionRetriever.cc.

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

Referenced by EcalTrivialConditionRetriever().

3195  {
3196  double mytrans[3] = {0., 0., 0.};
3197  double myeuler[3] = {0., 0., 0.};
3198  std::ifstream f;
3200  f.open(edm::FileInPath(ESAlignmentFile_).fullPath().c_str());
3201  std::vector<AlignTransform> my_align;
3202  // int ix_vect[10] = {10, 30, 30, 50, 10, 30, 10, 30};
3203  int pl_vect[10] = {2, 2, 1, 1, 1, 1, 2, 2};
3204  int iy = 10;
3205  int side = -1;
3206  int strip = 1;
3207  for(int layer = 0 ; layer < 8; layer++ ) {
3208  // make an ESDetId since we need ESDetId::rawId()
3209  int ix = 10 + (layer%2) * 20;
3210  int plane = pl_vect[layer];
3211  if(layer > 3) side = 1;
3212  ESDetId esdetId(strip, ix, iy, plane, side);
3214  f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
3215  std::cout << " translation " << mytrans[0] << " " << mytrans[1] << " " << mytrans[2] << "\n"
3216  << " euler " << myeuler[0] << " " << myeuler[1] << " " << myeuler[2] << std::endl;
3217  }
3218  CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
3219  CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
3220  AlignTransform transform( translation, euler, esdetId );
3221  my_align.push_back(transform);
3222  }
3223  Alignments a;
3224  a.m_align = my_align;
3225  return std::make_unique<Alignments>(a);
3226 }
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 2088 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().

2089 {
2090 
2091  auto ical = std::make_unique<EcalChannelStatus>();
2092  // barrel
2093  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
2094  if(ieta==0) continue;
2095  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
2096  if (EBDetId::validDetId(ieta,iphi)) {
2097  EBDetId ebid(ieta,iphi);
2098  ical->setValue( ebid, 0 );
2099  }
2100  }
2101  }
2102  // endcap
2103  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
2104  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
2105  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
2106  if (EEDetId::validDetId(iX,iY,1)) {
2107  EEDetId eedetidpos(iX,iY,1);
2108  ical->setValue( eedetidpos, 0 );
2109  }
2110  if (EEDetId::validDetId(iX,iY,-1)) {
2111  EEDetId eedetidneg(iX,iY,-1);
2112  ical->setValue( eedetidneg, 0 );
2113  }
2114  }
2115  }
2116  return ical;
2117 }
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
static const int IY_MAX
Definition: EEDetId.h:306
std::unique_ptr< EcalClusterCrackCorrParameters > EcalTrivialConditionRetriever::produceEcalClusterCrackCorrParameters ( const EcalClusterCrackCorrParametersRcd )
virtual

Definition at line 1036 of file EcalTrivialConditionRetriever.cc.

References mps_fire::i.

Referenced by EcalTrivialConditionRetriever().

1037 {
1038  auto ipar = std::make_unique<EcalClusterCrackCorrParameters>();
1039  for (size_t i = 0; i < crackCorrParameters_.size(); ++i ) {
1040  ipar->params().push_back( crackCorrParameters_[i] );
1041  }
1042  return ipar;
1043 }
std::unique_ptr< EcalClusterEnergyCorrectionObjectSpecificParameters > EcalTrivialConditionRetriever::produceEcalClusterEnergyCorrectionObjectSpecificParameters ( const EcalClusterEnergyCorrectionObjectSpecificParametersRcd )
virtual

Definition at line 1063 of file EcalTrivialConditionRetriever.cc.

References mps_fire::i.

Referenced by EcalTrivialConditionRetriever().

1064 {
1065  auto ipar = std::make_unique<EcalClusterEnergyCorrectionObjectSpecificParameters>();
1066  for (size_t i = 0; i < energyCorrectionObjectSpecificParameters_.size(); ++i ) {
1067  ipar->params().push_back( energyCorrectionObjectSpecificParameters_[i] );
1068  }
1069  return ipar;
1070 }
std::vector< double > energyCorrectionObjectSpecificParameters_
std::unique_ptr< EcalClusterEnergyCorrectionParameters > EcalTrivialConditionRetriever::produceEcalClusterEnergyCorrectionParameters ( const EcalClusterEnergyCorrectionParametersRcd )
virtual

Definition at line 1045 of file EcalTrivialConditionRetriever.cc.

References mps_fire::i.

Referenced by EcalTrivialConditionRetriever().

1046 {
1047  auto ipar = std::make_unique<EcalClusterEnergyCorrectionParameters>();
1048  for (size_t i = 0; i < energyCorrectionParameters_.size(); ++i ) {
1049  ipar->params().push_back( energyCorrectionParameters_[i] );
1050  }
1051  return ipar;
1052 }
std::unique_ptr< EcalClusterEnergyUncertaintyParameters > EcalTrivialConditionRetriever::produceEcalClusterEnergyUncertaintyParameters ( const EcalClusterEnergyUncertaintyParametersRcd )
virtual

Definition at line 1054 of file EcalTrivialConditionRetriever.cc.

References mps_fire::i.

Referenced by EcalTrivialConditionRetriever().

1055 {
1056  auto ipar = std::make_unique<EcalClusterEnergyUncertaintyParameters>();
1057  for (size_t i = 0; i < energyUncertaintyParameters_.size(); ++i ) {
1058  ipar->params().push_back( energyUncertaintyParameters_[i] );
1059  }
1060  return ipar;
1061 }
std::unique_ptr< EcalClusterLocalContCorrParameters > EcalTrivialConditionRetriever::produceEcalClusterLocalContCorrParameters ( const EcalClusterLocalContCorrParametersRcd )
virtual

Definition at line 1027 of file EcalTrivialConditionRetriever.cc.

References mps_fire::i.

Referenced by EcalTrivialConditionRetriever().

1028 {
1029  auto ipar = std::make_unique<EcalClusterLocalContCorrParameters>();
1030  for (size_t i = 0; i < localContCorrParameters_.size(); ++i ) {
1031  ipar->params().push_back( localContCorrParameters_[i] );
1032  }
1033  return ipar;
1034 }
std::unique_ptr< EcalDAQTowerStatus > EcalTrivialConditionRetriever::produceEcalDAQTowerStatus ( const EcalDAQTowerStatusRcd )
virtual

Definition at line 2241 of file EcalTrivialConditionRetriever.cc.

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

Referenced by EcalTrivialConditionRetriever().

2242 {
2243 
2244  auto ical = std::make_unique<EcalDAQTowerStatus>();
2245 
2246  int status(0);
2247 
2248  // barrel
2249  int iz=0;
2250  for(int k=0 ; k<2; k++ ) {
2251  if(k==0) iz=-1;
2252  if(k==1) iz=+1;
2253  for(int i=1 ; i<73; i++) {
2254  for(int j=1 ; j<18; j++) {
2256  EcalTrigTowerDetId ebid(iz,EcalBarrel,j,i);
2257 
2258  ical->setValue( ebid, status );
2259  }
2260  }
2261  }
2262  }
2263 
2264 
2265  // endcap
2266  for(int k=0 ; k<2; k++ ) {
2267  if(k==0) iz=-1;
2268  if(k==1) iz=+1;
2269  for(int i=1 ; i<21; i++) {
2270  for(int j=1 ; j<21; j++) {
2271  if (EcalScDetId::validDetId(i,j,iz )){
2272  EcalScDetId eeid(i,j,iz);
2273  ical->setValue( eeid, status );
2274  }
2275  }
2276  }
2277  }
2278 
2279  return ical;
2280 }
static bool validDetId(int ix, int iy, int iz)
Definition: EcalScDetId.cc:64
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 2198 of file EcalTrivialConditionRetriever.cc.

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

Referenced by EcalTrivialConditionRetriever().

2199 {
2200 
2201  auto ical = std::make_unique<EcalDCSTowerStatus>();
2202 
2203  int status(0);
2204 
2205  // barrel
2206  int iz=0;
2207  for(int k=0 ; k<2; k++ ) {
2208  if(k==0) iz=-1;
2209  if(k==1) iz=+1;
2210  for(int i=1 ; i<73; i++) {
2211  for(int j=1 ; j<18; j++) {
2213  EcalTrigTowerDetId ebid(iz,EcalBarrel,j,i);
2214 
2215  ical->setValue( ebid, status );
2216  }
2217  }
2218  }
2219  }
2220 
2221 
2222  // endcap
2223  for(int k=0 ; k<2; k++ ) {
2224  if(k==0) iz=-1;
2225  if(k==1) iz=+1;
2226  for(int i=1 ; i<21; i++) {
2227  for(int j=1 ; j<21; j++) {
2228  if (EcalScDetId::validDetId(i,j,iz )){
2229  EcalScDetId eeid(i,j,iz);
2230  ical->setValue( eeid, status );
2231  }
2232  }
2233  }
2234  }
2235 
2236  return ical;
2237 }
static bool validDetId(int ix, int iy, int iz)
Definition: EcalScDetId.cc:64
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 2121 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().

2122 {
2123  uint32_t sta(0);
2124 
2125  auto ical = std::make_unique<EcalDQMChannelStatus>();
2126  // barrel
2127  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
2128  if(ieta==0) continue;
2129  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
2130  if (EBDetId::validDetId(ieta,iphi)) {
2131  EBDetId ebid(ieta,iphi);
2132  ical->setValue( ebid, sta );
2133  }
2134  }
2135  }
2136  // endcap
2137  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
2138  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
2139  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
2140  if (EEDetId::validDetId(iX,iY,1)) {
2141  EEDetId eedetidpos(iX,iY,1);
2142  ical->setValue( eedetidpos, sta );
2143  }
2144  if (EEDetId::validDetId(iX,iY,-1)) {
2145  EEDetId eedetidneg(iX,iY,-1);
2146  ical->setValue( eedetidneg, sta );
2147  }
2148  }
2149  }
2150  return ical;
2151 }
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
static const int IY_MAX
Definition: EEDetId.h:306
std::unique_ptr< EcalDQMTowerStatus > EcalTrivialConditionRetriever::produceEcalDQMTowerStatus ( const EcalDQMTowerStatusRcd )
virtual

Definition at line 2155 of file EcalTrivialConditionRetriever.cc.

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

Referenced by EcalTrivialConditionRetriever().

2156 {
2157 
2158  auto ical = std::make_unique<EcalDQMTowerStatus>();
2159 
2160  uint32_t sta(0);
2161 
2162  // barrel
2163  int iz=0;
2164  for(int k=0 ; k<2; k++ ) {
2165  if(k==0) iz=-1;
2166  if(k==1) iz=+1;
2167  for(int i=1 ; i<73; i++) {
2168  for(int j=1 ; j<18; j++) {
2170  EcalTrigTowerDetId ebid(iz,EcalBarrel,j,i);
2171 
2172  ical->setValue( ebid, sta );
2173  }
2174  }
2175  }
2176  }
2177 
2178 
2179  // endcap
2180  for(int k=0 ; k<2; k++ ) {
2181  if(k==0) iz=-1;
2182  if(k==1) iz=+1;
2183  for(int i=1 ; i<21; i++) {
2184  for(int j=1 ; j<21; j++) {
2185  if (EcalScDetId::validDetId(i,j,iz )){
2186  EcalScDetId eeid(i,j,iz);
2187  ical->setValue( eeid, sta );
2188  }
2189  }
2190  }
2191  }
2192 
2193  return ical;
2194 }
static bool validDetId(int ix, int iy, int iz)
Definition: EcalScDetId.cc:64
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 893 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().

894 {
895  auto gratio = std::make_unique<EcalGainRatios>();
898  gr.setGain6Over1( gainRatio6over1_ );
899 
900  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
901  if(ieta==0) continue;
902  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
903  if (EBDetId::validDetId(ieta,iphi))
904  {
905  EBDetId ebid(ieta,iphi);
906  gratio->setValue( ebid.rawId(), gr );
907  }
908  }
909  }
910 
911  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
912  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
913  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
914  if (EEDetId::validDetId(iX,iY,1))
915  {
916  EEDetId eedetidpos(iX,iY,1);
917  gratio->setValue( eedetidpos.rawId(), gr );
918  }
919  if (EEDetId::validDetId(iX,iY,-1))
920  {
921  EEDetId eedetidneg(iX,iY,-1);
922  gratio->setValue( eedetidneg.rawId(), gr );
923  }
924  }
925  }
926 
927  return gratio;
928 }
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
void setGain12Over6(const float &g)
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
static const int IY_MAX
Definition: EEDetId.h:306
std::unique_ptr< EcalIntercalibConstants > EcalTrivialConditionRetriever::produceEcalIntercalibConstants ( const EcalIntercalibConstantsRcd )
virtual

Definition at line 696 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().

697 {
698  auto ical = std::make_unique<EcalIntercalibConstants>();
699 
700  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
701  if(ieta==0) continue;
702  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
703  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
704  if (EBDetId::validDetId(ieta,iphi))
705  {
706  EBDetId ebid(ieta,iphi);
707  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
708  ical->setValue( ebid.rawId(), intercalibConstantMean_ + r*intercalibConstantSigma_ );
709  }
710  }
711  }
712 
713  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
714  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
715  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
716  if (EEDetId::validDetId(iX,iY,1))
717  {
718  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
719  EEDetId eedetidpos(iX,iY,1);
720  ical->setValue( eedetidpos.rawId(), intercalibConstantMean_ + r*intercalibConstantSigma_ );
721  }
722  if(EEDetId::validDetId(iX,iY,-1))
723  {
724  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
725  EEDetId eedetidneg(iX,iY,-1);
726  ical->setValue( eedetidneg.rawId(), intercalibConstantMean_ + r1*intercalibConstantSigma_ );
727  }
728  }
729  }
730 
731  return ical;
732 }
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:306
std::unique_ptr< EcalIntercalibConstantsMC > EcalTrivialConditionRetriever::produceEcalIntercalibConstantsMC ( const EcalIntercalibConstantsMCRcd )
virtual

Definition at line 735 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().

736 {
737  auto ical = std::make_unique<EcalIntercalibConstantsMC>();
738 
739  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
740  if(ieta==0) continue;
741  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
742  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
743  if (EBDetId::validDetId(ieta,iphi))
744  {
745  EBDetId ebid(ieta,iphi);
746  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
747  ical->setValue( ebid.rawId(), intercalibConstantMeanMC_ + r*intercalibConstantSigmaMC_ );
748  }
749  }
750  }
751 
752  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
753  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
754  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
755  if (EEDetId::validDetId(iX,iY,1))
756  {
757  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
758  EEDetId eedetidpos(iX,iY,1);
759  ical->setValue( eedetidpos.rawId(), intercalibConstantMeanMC_ + r*intercalibConstantSigmaMC_ );
760  }
761  if(EEDetId::validDetId(iX,iY,-1))
762  {
763  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
764  EEDetId eedetidneg(iX,iY,-1);
765  ical->setValue( eedetidneg.rawId(), intercalibConstantMeanMC_ + r1*intercalibConstantSigmaMC_ );
766  }
767  }
768  }
769 
770  return ical;
771 }
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:306
std::unique_ptr< EcalIntercalibErrors > EcalTrivialConditionRetriever::produceEcalIntercalibErrors ( const EcalIntercalibErrorsRcd )
virtual

Definition at line 774 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().

775 {
776  auto ical = std::make_unique<EcalIntercalibErrors>();
777 
778  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
779  if(ieta==0) continue;
780  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
781  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
782  if (EBDetId::validDetId(ieta,iphi))
783  {
784  EBDetId ebid(ieta,iphi);
785  ical->setValue( ebid.rawId(), intercalibErrorMean_);
786  }
787  }
788  }
789 
790  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
791  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
792  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
793  if (EEDetId::validDetId(iX,iY,1))
794  {
795  EEDetId eedetidpos(iX,iY,1);
796  ical->setValue( eedetidpos.rawId(), intercalibErrorMean_ );
797  }
798  if(EEDetId::validDetId(iX,iY,-1))
799  {
800  EEDetId eedetidneg(iX,iY,-1);
801  ical->setValue( eedetidneg.rawId(), intercalibErrorMean_ );
802  }
803  }
804  }
805 
806  return ical;
807 }
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
static const int IY_MAX
Definition: EEDetId.h:306
std::unique_ptr< EcalLaserAlphas > EcalTrivialConditionRetriever::produceEcalLaserAlphas ( const EcalLaserAlphasRcd )
virtual

Definition at line 1075 of file EcalTrivialConditionRetriever.cc.

References funct::abs(), alpha, python.rootplot.core::batch, gather_cfg::cout, 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::SMCRYSTALMODE, AlCaHLTBitMon_QueryRunRegistry::string, EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

1076 {
1077 
1078  std::cout << " produceEcalLaserAlphas " << std::endl;
1079  auto ical = std::make_unique<EcalLaserAlphas>();
1080 
1081  // get Barrel alpha from type
1083  std::ifstream fEB(edm::FileInPath(EBLaserAlphaFile_).fullPath().c_str());
1084  int SMpos[36] = {-10, 4, -7, -16, 6, -9, 11, -17, 5, 18, 3, -8, 1, -3, -13, 14, -6, 2,
1085  15, -18, 8, 17, -2, 9, -1, 10, -5, 7, -12, -11, 16, -4, -15, -14, 12, 13};
1086  // check!
1087  int SMCal[36] = {12,17,10, 1, 8, 4,27,20,23,25, 6,34,35,15,18,30,21, 9,
1088  24,22,13,31,26,16, 2,11, 5, 0,29,28,14,33,32, 3, 7,19};
1089 
1090  for(int SMcons = 0; SMcons < 36; SMcons++) {
1091  int SM = SMpos[SMcons];
1092  if(SM < 0) SM = 17 + abs(SM);
1093  else SM--;
1094  if(SMCal[SM] != SMcons)
1095  std::cout << " SM pb : read SM " << SMcons<< " SMpos " << SM
1096  << " SMCal " << SMCal[SM] << std::endl;
1097  }
1098 
1100  int readSM, pos, bar, bar2;
1101  float alpha = 0;
1102  for(int SMcons = 0; SMcons < 36; SMcons++) {
1103  int SM = SMpos[SMcons];
1104  for(int ic = 0; ic < 1700; ic++) {
1105  fEB >> readSM >> pos >> bar >> bar2 >> type >> batch;
1106 
1107  if(readSM != SMcons || pos != ic + 1)
1108  std::cout << " barrel read pb read SM " << readSM << " const SM " << SMcons
1109  << " read pos " << pos << " ic " << ic << std::endl;
1110  if(SM < 0) SM = 18 + abs(SM);
1111  EBDetId ebdetid(SM, pos, EBDetId::SMCRYSTALMODE);
1112  if(bar == 33101 || bar == 30301 )
1113  alpha = laserAlphaMeanEBR_;
1114  else if(bar == 33106) {
1115  if(bar2 <= 2000)
1116  alpha = laserAlphaMeanEBC_;
1117  else {
1118  std::cout << " problem with barcode first " << bar << " last " << bar2
1119  << " read SM " << readSM << " read pos " << pos << std::endl;
1120  alpha = laserAlphaMeanEBR_;
1121  }
1122  }
1123  ical->setValue( ebdetid, alpha );
1124 
1125  if( ic==1650 ){
1126  std::cout << " ic/alpha "<<ic<<"/"<<alpha<<std::endl;
1127  }
1128 
1129  }
1130  } // loop over SMcons
1131  fEB.close();
1132  // end laserAlpha from type
1133  } else if(getLaserAlphaFromFileEB_) {
1134  // laser alpha from file
1135  std::cout <<"Laser alpha for EB will be taken from File"<<std::endl;
1136  int ieta, iphi;
1137  float alpha;
1138  std::ifstream fEB(edm::FileInPath(EBLaserAlphaFile_).fullPath().c_str());
1139  // std::ifstream fEB(EBLaserAlphaFile_.c_str());
1140  for(int ic = 0; ic < 61200; ic++) {
1141  fEB >> ieta>> iphi>>alpha;
1142 
1143  if (EBDetId::validDetId(ieta,iphi)) {
1144  EBDetId ebid(ieta,iphi);
1145  ical->setValue( ebid, alpha );
1146  std::cout << " ieta/iphi/alpha "<<ieta<<"/"<<iphi<<"/"<<alpha<<std::endl;
1147  }
1148  if( ieta==10 ){
1149  std::cout << "I will print some alphas from the file... ieta/iphi/alpha "<<ieta<<"/"<<iphi<<"/"<<alpha<<std::endl;
1150  }
1151  }
1152  fEB.close();
1153 
1154  } else {
1155  // laser alpha from mean and smearing
1156  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
1157  if(ieta==0) continue;
1158  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
1159  if (EBDetId::validDetId(ieta,iphi)) {
1160  EBDetId ebid(ieta,iphi);
1161  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1162  ical->setValue( ebid, laserAlphaMean_ + r*laserAlphaSigma_ );
1163  }
1164  } // loop over iphi
1165  } // loop over ieta
1166  } // do not read a file
1167 
1168  std::cout << " produceEcalLaserAlphas EE" << std::endl;
1170  std::ifstream fEE(edm::FileInPath(EELaserAlphaFile_).fullPath().c_str());
1171 
1172  for(int crystal = 0; crystal < 14648; crystal++) {
1173  int x, y ,z, bid, bar, bar2;
1174  float LY, alpha = 0;
1175  fEE >> z >> x >> y >> LY >> bid >> bar >> bar2;
1176  if(x < 1 || x > 100 || y < 1 || y > 100)
1177  std::cout << " wrong coordinates for barcode " << bar
1178  << " x " << x << " y " << y << " z " << z << std::endl;
1179  else {
1180  if(bar == 33201 || (bar == 30399 && bar2 < 568))
1181  alpha = laserAlphaMeanEER_;
1182  else if((bar == 33106 && bar2 > 2000 && bar2 < 4669)
1183  || (bar == 30399 && bar2 > 567))
1184  alpha = laserAlphaMeanEEC_;
1185  else {
1186  std::cout << " problem with barcode " << bar << " " << bar2
1187  << " x " << x << " y " << y << " z " << z << std::endl;
1188  alpha = laserAlphaMeanEER_;
1189  }
1190  }
1191  if (EEDetId::validDetId(x, y, z)) {
1192  EEDetId eedetidpos(x, y, z);
1193  ical->setValue( eedetidpos, alpha );
1194  }
1195  else // should not occur
1196  std::cout << " problem with EEDetId " << " x " << x << " y " << y << " z " << z << std::endl;
1197  }
1198  fEE.close();
1199 
1200  // end laserAlpha from type EE
1201 
1202  } else if (getLaserAlphaFromFileEE_) {
1203 
1204  std::ifstream fEE(edm::FileInPath(EELaserAlphaFile_).fullPath().c_str());
1205 
1206  for(int crystal = 0; crystal < 14648; crystal++) {
1207  int x, y ,z;
1208  float alpha = 1;
1209  fEE >> z >> x >> y >> alpha;
1210  if(x < 1 || x > 100 || y < 1 || y > 100 || z==0 || z>1 || z<-1 ) {
1211  std::cout << "ERROR: wrong coordinates for crystal "
1212  << " x " << x << " y " << y << " z " << z << std::endl;
1213  std::cout << " the format of the file should be z x y alpha " << std::endl;
1214  } else {
1215  if (EEDetId::validDetId(x, y, z)) {
1216  EEDetId eedetidpos(x, y, z);
1217  ical->setValue( eedetidpos, alpha );
1218  }
1219  else // should not occur
1220  std::cout << " problem with EEDetId " << " x " << x << " y " << y << " z " << z << std::endl;
1221  }
1222  }
1223  fEE.close();
1224 
1225  // end laser alpha from file EE
1226  } else {
1227  // alphas from python config file
1228  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
1229  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
1230  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
1231  if (EEDetId::validDetId(iX,iY,1)) {
1232  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1233  EEDetId eedetidpos(iX,iY,1);
1234  ical->setValue( eedetidpos, laserAlphaMean_ + r*laserAlphaSigma_ );
1235  }
1236  if (EEDetId::validDetId(iX,iY,-1)) {
1237  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
1238  EEDetId eedetidneg(iX,iY,-1);
1239  ical->setValue( eedetidneg, laserAlphaMean_ + r1*laserAlphaSigma_ );
1240  }
1241  } // loop over iY
1242  } // loop over iX
1243  }
1244 
1245  return ical;
1246 }
type
Definition: HCALResponse.h:21
float alpha
Definition: AMPTWrapper.h:95
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
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:64
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:306
static const int SMCRYSTALMODE
Definition: EBDetId.h:167
std::unique_ptr< EcalLaserAPDPNRatios > EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios ( const EcalLaserAPDPNRatiosRcd )
virtual

Definition at line 1286 of file EcalTrivialConditionRetriever.cc.

References EBDetId::approxEta(), EnergyResolutionVsLumi::calcampDropTotal(), gather_cfg::cout, 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().

1287 {
1288  EnergyResolutionVsLumi ageing;
1289  ageing.setLumi(totLumi_);
1290  ageing.setInstLumi(instLumi_);
1291 
1292 
1293  auto ical = std::make_unique<EcalLaserAPDPNRatios>();
1294  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
1295  if(ieta==0) continue;
1296 
1297 
1298 
1299  double eta=EBDetId::approxEta(EBDetId(ieta,1));
1300 
1301  eta = fabs(eta);
1302  double drop=ageing.calcampDropTotal(eta);
1303  std::cout<<"EB at eta="<<eta<<" dropping by "<<drop<<std::endl;
1304 
1305  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
1306  if (EBDetId::validDetId(ieta,iphi)) {
1307  EBDetId ebid(ieta,iphi);
1308  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1309 
1311  pairAPDPN.p1 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1312  pairAPDPN.p2 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1313  pairAPDPN.p3 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1314  ical->setValue( ebid, pairAPDPN );
1315  }
1316  }
1317  }
1318 
1319 
1320  std::cout<<"----- EE -----"<<std::endl;
1321 
1322  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
1323  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
1324  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
1325 
1326 
1327  if (EEDetId::validDetId(iX,iY,1)) {
1328  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1329  EEDetId eedetidpos(iX,iY,1);
1330 
1331  double eta= -log(tan(0.5*atan(sqrt((iX-50.0)
1332  *(iX-50.0)+
1333  (iY-50.0)*
1334  (iY-50.0))
1335  *2.98/328.)));
1336  eta = fabs(eta);
1337  double drop=ageing.calcampDropTotal(eta);
1338  if(iX==50) std::cout<<"EE at eta="<<eta<<" dropping by "<<drop<<std::endl;
1339 
1340 
1342  pairAPDPN.p1 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1343  pairAPDPN.p2 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1344  pairAPDPN.p3 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1345  ical->setValue( eedetidpos, pairAPDPN );
1346  }
1347 
1348  if (EEDetId::validDetId(iX,iY,-1)) {
1349  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
1350  EEDetId eedetidneg(iX,iY,-1);
1351 
1352  double eta= -log(tan(0.5*atan(sqrt((iX-50.0)*(iX-50.0)+(iY-50.0)*(iY-50.0))*2.98/328.)));
1353  eta = fabs(eta);
1354  double drop=ageing.calcampDropTotal(eta);
1355  if(iX==50) std::cout<<"EE at eta="<<eta<<" dropping by "<<drop<<std::endl;
1356 
1357 
1359  pairAPDPN.p1 = laserAPDPNMean_*drop + r1*laserAPDPNSigma_;
1360  pairAPDPN.p2 = laserAPDPNMean_*drop + r1*laserAPDPNSigma_;
1361  pairAPDPN.p3 = laserAPDPNMean_*drop + r1*laserAPDPNSigma_;
1362  ical->setValue( eedetidneg, pairAPDPN );
1363  }
1364  }
1365  }
1366 
1368  // for(int i=1; i<=92; i++){
1369  for(int i=0; i<92; i++){
1370  TimeStamp.t1 = Timestamp(laserAPDPNTime1_);
1371  if(laserAPDPNTime2_ == 0 ){
1372  TimeStamp.t2 = Timestamp(edm::Timestamp::endOfTime().value());
1373  } else {
1374  TimeStamp.t2 = Timestamp(laserAPDPNTime2_);
1375  }
1376  if(laserAPDPNTime3_ == 0 ){
1377  TimeStamp.t3 = Timestamp(edm::Timestamp::endOfTime().value());
1378  } else {
1379  TimeStamp.t3 = Timestamp(laserAPDPNTime3_);
1380  }
1381 
1382  ical->setTime( i, TimeStamp );
1383  }
1384 
1385  return ical;
1386 
1387 }
float approxEta() const
Definition: EBDetId.h:106
static const int MIN_IPHI
Definition: EBDetId.h:142
static Timestamp endOfTime()
Definition: Timestamp.h:102
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
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:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:306
double calcampDropTotal(double eta)
std::unique_ptr< EcalLaserAPDPNRatiosRef > EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef ( const EcalLaserAPDPNRatiosRefRcd )
virtual

Definition at line 1250 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().

1251 {
1252  auto ical = std::make_unique<EcalLaserAPDPNRatiosRef>();
1253  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
1254  if(ieta==0) continue;
1255  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
1256  if (EBDetId::validDetId(ieta,iphi)) {
1257  EBDetId ebid(ieta,iphi);
1258  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1259  ical->setValue( ebid, laserAPDPNRefMean_ + r*laserAPDPNRefSigma_ );
1260  }
1261  }
1262  }
1263 
1264  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
1265  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
1266  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
1267  if (EEDetId::validDetId(iX,iY,1)) {
1268  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1269  EEDetId eedetidpos(iX,iY,1);
1270  ical->setValue( eedetidpos, laserAPDPNRefMean_ + r*laserAPDPNRefSigma_ );
1271  }
1272 
1273  if (EEDetId::validDetId(iX,iY,-1)) {
1274  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
1275  EEDetId eedetidneg(iX,iY,-1);
1276  ical->setValue( eedetidneg, laserAPDPNRefMean_ + r1*laserAPDPNRefSigma_ );
1277  }
1278  }
1279  }
1280 
1281  return ical;
1282 }
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:306
std::unique_ptr< EcalLinearCorrections > EcalTrivialConditionRetriever::produceEcalLinearCorrections ( const EcalLinearCorrectionsRcd )
virtual

Definition at line 622 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().

623 {
624  auto ical = std::make_unique<EcalLinearCorrections>();
625 
626  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
627  if(ieta==0) continue;
628  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
629  if (EBDetId::validDetId(ieta,iphi)) {
630  EBDetId ebid(ieta,iphi);
631  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
632 
634  pairAPDPN.p1 = linCorrMean_ + r*linCorrSigma_;
635  pairAPDPN.p2 = linCorrMean_ + r*linCorrSigma_;
636  pairAPDPN.p3 = linCorrMean_ + r*linCorrSigma_;
637  ical->setValue( ebid, pairAPDPN );
638  }
639  }
640  }
641 
642  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
643  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
644  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
645  if (EEDetId::validDetId(iX,iY,1)) {
646  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
647  EEDetId eedetidpos(iX,iY,1);
648 
650  pairAPDPN.p1 = linCorrMean_ + r*linCorrSigma_;
651  pairAPDPN.p2 = linCorrMean_ + r*linCorrSigma_;
652  pairAPDPN.p3 = linCorrMean_ + r*linCorrSigma_;
653 
654  ical->setValue( eedetidpos, pairAPDPN );
655  }
656 
657  if (EEDetId::validDetId(iX,iY,-1)) {
658  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
659  EEDetId eedetidneg(iX,iY,-1);
660 
662  pairAPDPN.p1 = linCorrMean_ + r1*linCorrSigma_;
663  pairAPDPN.p2 = linCorrMean_ + r1*linCorrSigma_;
664  pairAPDPN.p3 = linCorrMean_ + r1*linCorrSigma_;
665 
666  ical->setValue( eedetidneg, pairAPDPN );
667  }
668  }
669  }
670 
672  // for(int i=1; i<=92; i++){
673  for(int i=0; i<92; i++){
674  TimeStamp.t1 = Timestamp(linearTime1_);
675  if(linearTime2_ == 0 ){
676  TimeStamp.t2 = Timestamp(edm::Timestamp::endOfTime().value());
677  } else {
678  TimeStamp.t2 = Timestamp(linearTime2_);
679  }
680  if(linearTime3_ == 0 ){
681  TimeStamp.t3 = Timestamp(edm::Timestamp::endOfTime().value());
682  } else {
683  TimeStamp.t3 = Timestamp(linearTime3_);
684  }
685 
686  ical->setTime( i, TimeStamp );
687  }
688 
689  return ical;
690 
691 }
static const int MIN_IPHI
Definition: EBDetId.h:142
static Timestamp endOfTime()
Definition: Timestamp.h:102
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:306
std::unique_ptr< EcalMappingElectronics > EcalTrivialConditionRetriever::produceEcalMappingElectronics ( const EcalMappingElectronicsRcd )
virtual

Definition at line 3095 of file EcalTrivialConditionRetriever.cc.

Referenced by EcalTrivialConditionRetriever().

3096 {
3097 
3098  auto ical = std::make_unique<EcalMappingElectronics>();
3099  return ical;
3100 }
std::unique_ptr< EcalPedestals > EcalTrivialConditionRetriever::produceEcalPedestals ( const EcalPedestalsRcd )
virtual

Definition at line 508 of file EcalTrivialConditionRetriever.cc.

References EBDetId::approxEta(), EnergyResolutionVsLumi::calcnoiseIncreaseADC(), gather_cfg::cout, 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().

508  {
509  auto peds = std::make_unique<EcalPedestals>();
510  EcalPedestals::Item EBitem;
511  EcalPedestals::Item EEitem;
512 
513  EBitem.mean_x1 = EBpedMeanX1_;
514  EBitem.rms_x1 = EBpedRMSX1_;
515  EBitem.mean_x6 = EBpedMeanX6_;
516  EBitem.rms_x6 = EBpedRMSX6_;
517  EBitem.mean_x12 = EBpedMeanX12_;
518  EBitem.rms_x12 = EBpedRMSX12_;
519 
520  EEitem.mean_x1 = EEpedMeanX1_;
521  EEitem.rms_x1 = EEpedRMSX1_;
522  EEitem.mean_x6 = EEpedMeanX6_;
523  EEitem.rms_x6 = EEpedRMSX6_;
524  EEitem.mean_x12 = EEpedMeanX12_;
525  EEitem.rms_x12 = EEpedRMSX12_;
526 
527 
528 
529 
530 
531  for(int iEta=-EBDetId::MAX_IETA; iEta<=EBDetId::MAX_IETA ;++iEta) {
532  if(iEta==0) continue;
533 
534  if(totLumi_>0) {
535  double eta=EBDetId::approxEta(EBDetId(iEta,1));
536 
537  EnergyResolutionVsLumi ageing;
538  ageing.setLumi(totLumi_);
539  ageing.setInstLumi(instLumi_);
540  eta = fabs(eta);
541  double noisefactor= ageing.calcnoiseIncreaseADC(eta);
542 
543 
544  EBitem.rms_x1 = EBpedRMSX1_*noisefactor;
545  EBitem.rms_x6 = EBpedRMSX6_*noisefactor;
546  EBitem.rms_x12 = EBpedRMSX12_*noisefactor;
547  std::cout << "rms ped at eta:"<< eta<<" ="<< EBitem.rms_x12 << std::endl;
548  }
549 
550 
551 
552  for(int iPhi=EBDetId::MIN_IPHI; iPhi<=EBDetId::MAX_IPHI; ++iPhi) {
553  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
554  if (EBDetId::validDetId(iEta,iPhi))
555  {
556  EBDetId ebdetid(iEta,iPhi);
557  peds->insert(std::make_pair(ebdetid.rawId(),EBitem));
558  }
559  }
560  }
561 
562  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
563  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
564  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
565  if (EEDetId::validDetId(iX,iY,1))
566  {
567  EEDetId eedetidpos(iX,iY,1);
568  peds->insert(std::make_pair(eedetidpos.rawId(),EEitem));
569  }
570  if(EEDetId::validDetId(iX,iY,-1))
571  {
572  EEDetId eedetidneg(iX,iY,-1);
573  peds->insert(std::make_pair(eedetidneg.rawId(),EEitem));
574  }
575  }
576  }
577 
578  //return std::unique_ptr<EcalPedestals>( peds );
579  return peds;
580 }
float approxEta() const
Definition: EBDetId.h:106
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
double calcnoiseIncreaseADC(double eta)
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
static const int IY_MAX
Definition: EEDetId.h:306
std::unique_ptr< EcalSampleMask > EcalTrivialConditionRetriever::produceEcalSampleMask ( const EcalSampleMaskRcd )
virtual

Definition at line 3229 of file EcalTrivialConditionRetriever.cc.

Referenced by EcalTrivialConditionRetriever().

3230 {
3231  return std::unique_ptr<EcalSampleMask>( new EcalSampleMask(sampleMaskEB_, sampleMaskEE_) );
3232 }
std::unique_ptr< EcalSamplesCorrelation > EcalTrivialConditionRetriever::produceEcalSamplesCorrelation ( const EcalSamplesCorrelationRcd )
virtual

Definition at line 3249 of file EcalTrivialConditionRetriever.cc.

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

Referenced by EcalTrivialConditionRetriever().

3249  {
3251  std::ifstream f;
3252  f.open(edm::FileInPath(SamplesCorrelationFile_).fullPath().c_str());
3253  float ww;
3254  for(int j = 0; j < 10; ++j) {
3255  f >> ww;
3256  EBG12samplesCorrelation_.push_back(ww);
3257  }
3258  for(int j = 0; j < 10; ++j) {
3259  f >> ww;
3260  EBG6samplesCorrelation_.push_back(ww);
3261  }
3262  for(int j = 0; j < 10; ++j) {
3263  f >> ww;
3264  EBG1samplesCorrelation_.push_back(ww);
3265  }
3266  for(int j = 0; j < 10; ++j) {
3267  f >> ww;
3268  EEG12samplesCorrelation_.push_back(ww);
3269  }
3270  for(int j = 0; j < 10; ++j) {
3271  f >> ww;
3272  EEG6samplesCorrelation_.push_back(ww);
3273  }
3274  for(int j = 0; j < 10; ++j) {
3275  f >> ww;
3276  EEG1samplesCorrelation_.push_back(ww);
3277  }
3278  f.close();
3279  }
3280  auto ipar = std::make_unique<EcalSamplesCorrelation>();
3282  back_inserter(ipar->EBG12SamplesCorrelation));
3284  back_inserter(ipar->EBG6SamplesCorrelation));
3286  back_inserter(ipar->EBG1SamplesCorrelation));
3288  back_inserter(ipar->EEG12SamplesCorrelation));
3290  back_inserter(ipar->EEG6SamplesCorrelation));
3292  back_inserter(ipar->EEG1SamplesCorrelation));
3293  return ipar;
3294 }
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 937 of file EcalTrivialConditionRetriever.cc.

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

Referenced by EcalTrivialConditionRetriever().

938 {
939  // create weights for the test-beam
940  auto tbwgt = std::make_unique<EcalTBWeights>();
941 
942  // create weights for each distinct group ID
943  // int nMaxTDC = 10;
944 // for(int igrp=-EBDetId::MAX_IETA; igrp<=EBDetId::MAX_IETA; ++igrp) {
945 // if(igrp==0) continue;
946  int igrp=1;
947  for(int itdc=1; itdc<=nTDCbins_; ++itdc) {
948  // generate random number
949  // double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
950 
951  // make a new set of weights
952  EcalWeightSet wgt;
953  //typedef std::vector< std::vector<EcalWeight> > EcalWeightSet::EcalWeightMatrix;
956 
957 // if(verbose_>=1) {
958 // std::cout << "initial size of mat1: " << mat1.size() << std::endl;
959 // std::cout << "initial size of mat2: " << mat2.size() << std::endl;
960 // }
961 
962  // generate random numbers to use as weights
977  // use values provided by user
978  mat1.Place_in_row(amplWeights_[itdc-1],0,0);
979  mat1.Place_in_row(pedWeights_[itdc-1],1,0);
980  mat1.Place_in_row(jittWeights_[itdc-1],2,0);
981 
982  // wdights after gain switch
983  mat2.Place_in_row(amplWeightsAft_[itdc-1],0,0);
984  mat2.Place_in_row(pedWeightsAft_[itdc-1],1,0);
985  mat2.Place_in_row(jittWeightsAft_[itdc-1],2,0);
986 
987  // fill the chi2 matrcies with random numbers
988  // r = (double)std::rand()/( double(RAND_MAX)+double(1) );
991  mat3=chi2Matrix_[itdc-1];
992  mat4=chi2MatrixAft_[itdc-1];
993 
994  // for(size_t i=0; i<10; ++i)
995  // {
996  // mat3.push_back(chi2Matrix_[itdc-1][i]);
997  // mat4.push_back(chi2MatrixAft_[itdc-1][i]);
998  // }
999  // std::vector<EcalWeight> tv1, tv2;
1000  // for(size_t j=0; j<10; ++j) {
1001  // double ww = igrp*itdc*r + i*10. + j;
1002  // tv1.push_back( EcalWeight(1000+ww) );
1003  // tv2.push_back( EcalWeight(1000+100+ww) );
1004  // }
1005 
1006 
1007 
1008 
1009 // if(verbose_>=1) {
1010 // std::cout << "group: " << igrp << " TDC: " << itdc
1011 // << " mat1: " << mat1.size() << " mat2: " << mat2.size()
1012 // << " mat3: " << mat3.size() << " mat4: " << mat4.size()
1013 // << std::endl;
1014 // }
1015 
1016  // put the weight in the container
1017  tbwgt->setValue(std::make_pair(igrp,itdc), wgt);
1018  }
1019  // }
1020  return tbwgt;
1021 }
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 3235 of file EcalTrivialConditionRetriever.cc.

References popcon2dropbox::copy().

Referenced by EcalTrivialConditionRetriever().

3235  {
3236  auto ipar = std::make_unique<EcalTimeBiasCorrections>();
3238  back_inserter(ipar->EBTimeCorrAmplitudeBins));
3240  back_inserter(ipar->EBTimeCorrShiftBins));
3242  back_inserter(ipar->EETimeCorrAmplitudeBins));
3244  back_inserter(ipar->EETimeCorrShiftBins));
3245  return ipar;
3246 }
def copy(args, dbName)
std::unique_ptr< EcalTimeCalibConstants > EcalTrivialConditionRetriever::produceEcalTimeCalibConstants ( const EcalTimeCalibConstantsRcd )
virtual

Definition at line 810 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().

811 {
812  auto ical = std::make_unique<EcalTimeCalibConstants>();
813 
814  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
815  if(ieta==0) continue;
816  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
817  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
818  if (EBDetId::validDetId(ieta,iphi))
819  {
820  EBDetId ebid(ieta,iphi);
821  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
822  ical->setValue( ebid.rawId(), timeCalibConstantMean_ + r*timeCalibConstantSigma_ );
823  }
824  }
825  }
826 
827  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
828  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
829  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
830  if (EEDetId::validDetId(iX,iY,1))
831  {
832  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
833  EEDetId eedetidpos(iX,iY,1);
834  ical->setValue( eedetidpos.rawId(), timeCalibConstantMean_ + r*timeCalibConstantSigma_ );
835  }
836  if(EEDetId::validDetId(iX,iY,-1))
837  {
838  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
839  EEDetId eedetidneg(iX,iY,-1);
840  ical->setValue( eedetidneg.rawId(), timeCalibConstantMean_ + r1*timeCalibConstantSigma_ );
841  }
842  }
843  }
844 
845  return ical;
846 }
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:306
std::unique_ptr< EcalTimeCalibErrors > EcalTrivialConditionRetriever::produceEcalTimeCalibErrors ( const EcalTimeCalibErrorsRcd )
virtual

Definition at line 849 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().

850 {
851  auto ical = std::make_unique<EcalTimeCalibErrors>();
852 
853  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
854  if(ieta==0) continue;
855  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
856  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
857  if (EBDetId::validDetId(ieta,iphi))
858  {
859  EBDetId ebid(ieta,iphi);
860  ical->setValue( ebid.rawId(), timeCalibErrorMean_);
861  }
862  }
863  }
864 
865  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
866  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
867  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
868  if (EEDetId::validDetId(iX,iY,1))
869  {
870  EEDetId eedetidpos(iX,iY,1);
871  ical->setValue( eedetidpos.rawId(), timeCalibErrorMean_ );
872  }
873  if(EEDetId::validDetId(iX,iY,-1))
874  {
875  EEDetId eedetidneg(iX,iY,-1);
876  ical->setValue( eedetidneg.rawId(), timeCalibErrorMean_ );
877  }
878  }
879  }
880 
881  return ical;
882 }
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
static const int IY_MAX
Definition: EEDetId.h:306
std::unique_ptr< EcalTimeOffsetConstant > EcalTrivialConditionRetriever::produceEcalTimeOffsetConstant ( const EcalTimeOffsetConstantRcd )
virtual

Definition at line 885 of file EcalTrivialConditionRetriever.cc.

References gather_cfg::cout.

Referenced by EcalTrivialConditionRetriever().

886 {
887  std::cout << " produceEcalTimeOffsetConstant: " << std::endl;
888  std::cout << " EB " << timeOffsetEBConstant_ << " EE " << timeOffsetEEConstant_<< std::endl;
889  return std::make_unique<EcalTimeOffsetConstant>(timeOffsetEBConstant_,timeOffsetEEConstant_);
890 }
std::unique_ptr< EcalTPGCrystalStatus > EcalTrivialConditionRetriever::produceEcalTrgChannelStatus ( const EcalTPGCrystalStatusRcd )
virtual

Definition at line 2374 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().

2375 {
2376 
2377  auto ical = std::make_unique<EcalTPGCrystalStatus>();
2378  // barrel
2379  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
2380  if(ieta==0) continue;
2381  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
2382  if (EBDetId::validDetId(ieta,iphi)) {
2383  EBDetId ebid(ieta,iphi);
2384  ical->setValue( ebid, 0 );
2385  }
2386  }
2387  }
2388  // endcap
2389  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
2390  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
2391  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
2392  if (EEDetId::validDetId(iX,iY,1)) {
2393  EEDetId eedetidpos(iX,iY,1);
2394  ical->setValue( eedetidpos, 0 );
2395  }
2396  if (EEDetId::validDetId(iX,iY,-1)) {
2397  EEDetId eedetidneg(iX,iY,-1);
2398  ical->setValue( eedetidneg, 0 );
2399  }
2400  }
2401  }
2402  return ical;
2403 }
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
static const int IY_MAX
Definition: EEDetId.h:306
std::unique_ptr< EcalWeightXtalGroups > EcalTrivialConditionRetriever::produceEcalWeightXtalGroups ( const EcalWeightXtalGroupsRcd )
virtual

Definition at line 585 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().

586 {
587  auto xtalGroups = std::make_unique<EcalWeightXtalGroups>();
588  EcalXtalGroupId defaultGroupId(1);
589  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
590  if(ieta==0) continue;
591  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
592  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
593  if (EBDetId::validDetId(ieta,iphi))
594  {
595  EBDetId ebid(ieta,iphi);
596  // xtalGroups->setValue(ebid.rawId(), EcalXtalGroupId(ieta) ); // define rings in eta
597  xtalGroups->setValue(ebid.rawId(), defaultGroupId ); // define rings in eta
598  }
599  }
600  }
601 
602  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
603  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
604  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
605  if (EEDetId::validDetId(iX,iY,1))
606  {
607  EEDetId eedetidpos(iX,iY,1);
608  xtalGroups->setValue(eedetidpos.rawId(), defaultGroupId );
609  }
610  if(EEDetId::validDetId(iX,iY,-1))
611  {
612  EEDetId eedetidneg(iX,iY,-1);
613  xtalGroups->setValue(eedetidneg.rawId(), defaultGroupId );
614  }
615  }
616  }
617  return xtalGroups;
618 }
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
static const int IY_MAX
Definition: EEDetId.h:306
void EcalTrivialConditionRetriever::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey rk,
const edm::IOVSyncValue iTime,
edm::ValidityInterval oValidity 
)
overrideprotectedvirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 497 of file EcalTrivialConditionRetriever.cc.

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

500 {
501  if(verbose_>=1) std::cout << "EcalTrivialConditionRetriever::setIntervalFor(): record key = " << rk.name() << "\ttime: " << iTime.time().value() << std::endl;
502  //For right now, we will just use an infinite interval of validity
504 }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
static const IOVSyncValue & beginOfTime()
const Timestamp & time() const
Definition: IOVSyncValue.h:44
TimeValue_t value() const
Definition: Timestamp.h:56

Member Data Documentation

double EcalTrivialConditionRetriever::adcToGeVEBConstant_
private

Definition at line 200 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::adcToGeVEEConstant_
private

Definition at line 201 of file EcalTrivialConditionRetriever.h.

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

Definition at line 277 of file EcalTrivialConditionRetriever.h.

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

Definition at line 278 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::amplWeightsAftFile_
private

Definition at line 290 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::amplWeightsFile_
private

Definition at line 289 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::APDSimPulseShapeFile_
private

Definition at line 327 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::channelStatusFile_
private

Definition at line 303 of file EcalTrivialConditionRetriever.h.

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

Definition at line 286 of file EcalTrivialConditionRetriever.h.

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

Definition at line 287 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::chi2MatrixAftFile_
private

Definition at line 296 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::chi2MatrixFile_
private

Definition at line 295 of file EcalTrivialConditionRetriever.h.

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

Definition at line 222 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EBAlignmentFile_
private

Definition at line 306 of file EcalTrivialConditionRetriever.h.

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

Definition at line 318 of file EcalTrivialConditionRetriever.h.

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

Definition at line 320 of file EcalTrivialConditionRetriever.h.

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

Definition at line 319 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EBLaserAlphaFile_
private

Definition at line 309 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedMeanX12_
private

Definition at line 260 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedMeanX1_
private

Definition at line 264 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedMeanX6_
private

Definition at line 262 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedRMSX12_
private

Definition at line 261 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedRMSX1_
private

Definition at line 265 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedRMSX6_
private

Definition at line 263 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EBSimPulseShapeFile_
private

Definition at line 325 of file EcalTrivialConditionRetriever.h.

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

Definition at line 313 of file EcalTrivialConditionRetriever.h.

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

Definition at line 314 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EEAlignmentFile_
private

Definition at line 307 of file EcalTrivialConditionRetriever.h.

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

Definition at line 321 of file EcalTrivialConditionRetriever.h.

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

Definition at line 323 of file EcalTrivialConditionRetriever.h.

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

Definition at line 322 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EELaserAlphaFile_
private

Definition at line 310 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedMeanX12_
private

Definition at line 267 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedMeanX1_
private

Definition at line 271 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedMeanX6_
private

Definition at line 269 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedRMSX12_
private

Definition at line 268 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedRMSX1_
private

Definition at line 272 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedRMSX6_
private

Definition at line 270 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EESimPulseShapeFile_
private

Definition at line 326 of file EcalTrivialConditionRetriever.h.

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

Definition at line 315 of file EcalTrivialConditionRetriever.h.

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

Definition at line 316 of file EcalTrivialConditionRetriever.h.

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

Definition at line 225 of file EcalTrivialConditionRetriever.h.

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

Definition at line 223 of file EcalTrivialConditionRetriever.h.

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

Definition at line 224 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::ESAlignmentFile_
private

Definition at line 308 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::gainRatio12over6_
private

Definition at line 274 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::gainRatio6over1_
private

Definition at line 275 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getEBAlignmentFromFile_
private

Definition at line 362 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getEEAlignmentFromFile_
private

Definition at line 363 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getESAlignmentFromFile_
private

Definition at line 364 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getLaserAlphaFromFileEB_
private

Definition at line 368 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getLaserAlphaFromFileEE_
private

Definition at line 369 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getLaserAlphaFromTypeEB_
private

Definition at line 370 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getLaserAlphaFromTypeEE_
private

Definition at line 371 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getSamplesCorrelationFromFile_
private

Definition at line 375 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getSimPulseShapeFromFile_
private

Definition at line 366 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getWeightsFromFile_
private

Definition at line 332 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::instLumi_
private

Definition at line 235 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::intercalibConstantMean_
private

Definition at line 204 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::intercalibConstantMeanMC_
private

Definition at line 207 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::intercalibConstantsFile_
private

Definition at line 298 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::intercalibConstantSigma_
private

Definition at line 205 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::intercalibConstantSigmaMC_
private

Definition at line 208 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::intercalibConstantsMCFile_
private

Definition at line 299 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::intercalibErrorMean_
private

Definition at line 211 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::intercalibErrorsFile_
private

Definition at line 300 of file EcalTrivialConditionRetriever.h.

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

Definition at line 283 of file EcalTrivialConditionRetriever.h.

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

Definition at line 284 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::jittWeightsAftFile_
private

Definition at line 294 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::jittWeightsFile_
private

Definition at line 293 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAlphaMean_
private

Definition at line 238 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAlphaMeanEBC_
private

Definition at line 241 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAlphaMeanEBR_
private

Definition at line 240 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAlphaMeanEEC_
private

Definition at line 243 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAlphaMeanEER_
private

Definition at line 242 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAlphaSigma_
private

Definition at line 239 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAPDPNMean_
private

Definition at line 247 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAPDPNRefMean_
private

Definition at line 245 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAPDPNRefSigma_
private

Definition at line 246 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAPDPNSigma_
private

Definition at line 248 of file EcalTrivialConditionRetriever.h.

unsigned long EcalTrivialConditionRetriever::laserAPDPNTime1_
private

Definition at line 249 of file EcalTrivialConditionRetriever.h.

unsigned long EcalTrivialConditionRetriever::laserAPDPNTime2_
private

Definition at line 250 of file EcalTrivialConditionRetriever.h.

unsigned long EcalTrivialConditionRetriever::laserAPDPNTime3_
private

Definition at line 251 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::linCorrMean_
private

Definition at line 253 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::linCorrSigma_
private

Definition at line 254 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::linearCorrectionsFile_
private

Definition at line 297 of file EcalTrivialConditionRetriever.h.

unsigned long EcalTrivialConditionRetriever::linearTime1_
private

Definition at line 256 of file EcalTrivialConditionRetriever.h.

unsigned long EcalTrivialConditionRetriever::linearTime2_
private

Definition at line 257 of file EcalTrivialConditionRetriever.h.

unsigned long EcalTrivialConditionRetriever::linearTime3_
private

Definition at line 258 of file EcalTrivialConditionRetriever.h.

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

Definition at line 221 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::mappingFile_
private

Definition at line 305 of file EcalTrivialConditionRetriever.h.

int EcalTrivialConditionRetriever::nTDCbins_
private

Definition at line 330 of file EcalTrivialConditionRetriever.h.

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

Definition at line 280 of file EcalTrivialConditionRetriever.h.

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

Definition at line 281 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::pedWeightsAftFile_
private

Definition at line 292 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::pedWeightsFile_
private

Definition at line 291 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalADCToGeVConstant_
private

Definition at line 344 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalAlignmentEB_
private

Definition at line 358 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalAlignmentEE_
private

Definition at line 359 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalAlignmentES_
private

Definition at line 360 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalChannelStatus_
private

Definition at line 346 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalClusterCrackCorrParameters_
private

Definition at line 353 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalClusterEnergyCorrectionObjectSpecificParameters_
private

Definition at line 356 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalClusterEnergyCorrectionParameters_
private

Definition at line 354 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalClusterEnergyUncertaintyParameters_
private

Definition at line 355 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalClusterLocalContCorrParameters_
private

Definition at line 352 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalDAQTowerStatus_
private

Definition at line 350 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalDCSTowerStatus_
private

Definition at line 349 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalDQMChannelStatus_
private

Definition at line 348 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalDQMTowerStatus_
private

Definition at line 347 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalGainRatios_
private

Definition at line 343 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalIntercalibConstants_
private

Definition at line 337 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalIntercalibConstantsMC_
private

Definition at line 338 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalIntercalibErrors_
private

Definition at line 339 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalLaserCorrection_
private

Definition at line 345 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalLinearCorrections_
private

Definition at line 336 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalMappingElectronics_
private

Definition at line 357 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalPedestals_
private

Definition at line 334 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalSampleMask_
private

Definition at line 372 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalSamplesCorrelation_
private

Definition at line 374 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalSimPulseShape_
private

Definition at line 361 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalTimeBiasCorrections_
private

Definition at line 373 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalTimeCalibConstants_
private

Definition at line 340 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalTimeCalibErrors_
private

Definition at line 341 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalTimeOffsetConstant_
private

Definition at line 342 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalTrgChannelStatus_
private

Definition at line 351 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalWeights_
private

Definition at line 335 of file EcalTrivialConditionRetriever.h.

unsigned int EcalTrivialConditionRetriever::sampleMaskEB_
private

Definition at line 311 of file EcalTrivialConditionRetriever.h.

unsigned int EcalTrivialConditionRetriever::sampleMaskEE_
private

Definition at line 312 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::SamplesCorrelationFile_
private

Definition at line 324 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::sim_pulse_shape_APD_thresh_
private

Definition at line 229 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::sim_pulse_shape_EB_thresh_
private

Definition at line 227 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::sim_pulse_shape_EE_thresh_
private

Definition at line 228 of file EcalTrivialConditionRetriever.h.

float EcalTrivialConditionRetriever::sim_pulse_shape_TI_
private

Definition at line 230 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::timeCalibConstantMean_
private

Definition at line 213 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::timeCalibConstantsFile_
private

Definition at line 301 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::timeCalibConstantSigma_
private

Definition at line 214 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::timeCalibErrorMean_
private

Definition at line 215 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::timeCalibErrorsFile_
private

Definition at line 302 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::timeOffsetEBConstant_
private

Definition at line 217 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::timeOffsetEEConstant_
private

Definition at line 218 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::totLumi_
private

Definition at line 234 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::trgChannelStatusFile_
private

Definition at line 304 of file EcalTrivialConditionRetriever.h.

int EcalTrivialConditionRetriever::verbose_
private

Definition at line 377 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::weightsForAsynchronousRunning_
private

Definition at line 333 of file EcalTrivialConditionRetriever.h.