CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::auto_ptr
< EcalChannelStatus
getChannelStatusFromConfiguration (const EcalChannelStatusRcd &)
 
virtual std::auto_ptr
< EcalIntercalibConstants
getIntercalibConstantsFromConfiguration (const EcalIntercalibConstantsRcd &)
 
virtual std::auto_ptr
< EcalIntercalibErrors
getIntercalibErrorsFromConfiguration (const EcalIntercalibErrorsRcd &)
 
virtual std::auto_ptr
< EcalMappingElectronics
getMappingFromConfiguration (const EcalMappingElectronicsRcd &)
 
virtual std::auto_ptr
< EcalTimeCalibConstants
getTimeCalibConstantsFromConfiguration (const EcalTimeCalibConstantsRcd &)
 
virtual std::auto_ptr
< EcalTimeCalibErrors
getTimeCalibErrorsFromConfiguration (const EcalTimeCalibErrorsRcd &)
 
virtual std::auto_ptr
< EcalTPGCrystalStatus
getTrgChannelStatusFromConfiguration (const EcalTPGCrystalStatusRcd &)
 
virtual std::auto_ptr
< EcalADCToGeVConstant
produceEcalADCToGeVConstant (const EcalADCToGeVConstantRcd &)
 
virtual std::auto_ptr< AlignmentsproduceEcalAlignmentEB (const EBAlignmentRcd &)
 
virtual std::auto_ptr< AlignmentsproduceEcalAlignmentEE (const EEAlignmentRcd &)
 
virtual std::auto_ptr< AlignmentsproduceEcalAlignmentES (const ESAlignmentRcd &)
 
virtual std::auto_ptr
< EcalChannelStatus
produceEcalChannelStatus (const EcalChannelStatusRcd &)
 
virtual std::auto_ptr
< EcalClusterCrackCorrParameters
produceEcalClusterCrackCorrParameters (const EcalClusterCrackCorrParametersRcd &)
 
virtual std::auto_ptr
< EcalClusterEnergyCorrectionObjectSpecificParameters
produceEcalClusterEnergyCorrectionObjectSpecificParameters (const EcalClusterEnergyCorrectionObjectSpecificParametersRcd &)
 
virtual std::auto_ptr
< EcalClusterEnergyCorrectionParameters
produceEcalClusterEnergyCorrectionParameters (const EcalClusterEnergyCorrectionParametersRcd &)
 
virtual std::auto_ptr
< EcalClusterEnergyUncertaintyParameters
produceEcalClusterEnergyUncertaintyParameters (const EcalClusterEnergyUncertaintyParametersRcd &)
 
virtual std::auto_ptr
< EcalClusterLocalContCorrParameters
produceEcalClusterLocalContCorrParameters (const EcalClusterLocalContCorrParametersRcd &)
 
virtual std::auto_ptr
< EcalDAQTowerStatus
produceEcalDAQTowerStatus (const EcalDAQTowerStatusRcd &)
 
virtual std::auto_ptr
< EcalDCSTowerStatus
produceEcalDCSTowerStatus (const EcalDCSTowerStatusRcd &)
 
virtual std::auto_ptr
< EcalDQMChannelStatus
produceEcalDQMChannelStatus (const EcalDQMChannelStatusRcd &)
 
virtual std::auto_ptr
< EcalDQMTowerStatus
produceEcalDQMTowerStatus (const EcalDQMTowerStatusRcd &)
 
virtual std::auto_ptr
< EcalGainRatios
produceEcalGainRatios (const EcalGainRatiosRcd &)
 
virtual std::auto_ptr
< EcalIntercalibConstants
produceEcalIntercalibConstants (const EcalIntercalibConstantsRcd &)
 
virtual std::auto_ptr
< EcalIntercalibConstantsMC
produceEcalIntercalibConstantsMC (const EcalIntercalibConstantsMCRcd &)
 
virtual std::auto_ptr
< EcalIntercalibErrors
produceEcalIntercalibErrors (const EcalIntercalibErrorsRcd &)
 
virtual std::auto_ptr
< EcalLaserAlphas
produceEcalLaserAlphas (const EcalLaserAlphasRcd &)
 
virtual std::auto_ptr
< EcalLaserAPDPNRatios
produceEcalLaserAPDPNRatios (const EcalLaserAPDPNRatiosRcd &)
 
virtual std::auto_ptr
< EcalLaserAPDPNRatiosRef
produceEcalLaserAPDPNRatiosRef (const EcalLaserAPDPNRatiosRefRcd &)
 
virtual std::auto_ptr
< EcalMappingElectronics
produceEcalMappingElectronics (const EcalMappingElectronicsRcd &)
 
virtual std::auto_ptr
< EcalPedestals
produceEcalPedestals (const EcalPedestalsRcd &)
 
virtual std::auto_ptr
< EcalTBWeights
produceEcalTBWeights (const EcalTBWeightsRcd &)
 
virtual std::auto_ptr
< EcalTimeCalibConstants
produceEcalTimeCalibConstants (const EcalTimeCalibConstantsRcd &)
 
virtual std::auto_ptr
< EcalTimeCalibErrors
produceEcalTimeCalibErrors (const EcalTimeCalibErrorsRcd &)
 
virtual std::auto_ptr
< EcalTimeOffsetConstant
produceEcalTimeOffsetConstant (const EcalTimeOffsetConstantRcd &)
 
virtual std::auto_ptr
< EcalTPGCrystalStatus
produceEcalTrgChannelStatus (const EcalTPGCrystalStatusRcd &)
 
virtual std::auto_ptr
< EcalWeightXtalGroups
produceEcalWeightXtalGroups (const EcalWeightXtalGroupsRcd &)
 
virtual ~EcalTrivialConditionRetriever ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- 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 ()
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const
eventsetup::ComponentDescription
descriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set
< eventsetup::EventSetupRecordKey
findingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder ()
 

Protected Member Functions

virtual void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 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 &)
 
void getWeightsFromConfiguration (const edm::ParameterSet &ps)
 
const
EcalTrivialConditionRetriever
operator= (const EcalTrivialConditionRetriever &)
 

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 channelStatusFile_
 
std::vector
< EcalWeightSet::EcalChi2WeightMatrix
chi2Matrix_
 
std::vector
< EcalWeightSet::EcalChi2WeightMatrix
chi2MatrixAft_
 
std::string chi2MatrixAftFile_
 
std::string chi2MatrixFile_
 
std::vector< double > crackCorrParameters_
 
std::string EBAlignmentFile_
 
std::string EBLaserAlphaFile_
 
double EBpedMeanX12_
 
double EBpedMeanX1_
 
double EBpedMeanX6_
 
double EBpedRMSX12_
 
double EBpedRMSX1_
 
double EBpedRMSX6_
 
std::string EEAlignmentFile_
 
std::string EELaserAlphaFile_
 
double EEpedMeanX12_
 
double EEpedMeanX1_
 
double EEpedMeanX6_
 
double EEpedRMSX12_
 
double EEpedRMSX1_
 
double EEpedRMSX6_
 
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 getLaserAlphaFromFile_
 
bool getWeightsFromFile_
 
double intercalibConstantMean_
 
double intercalibConstantMeanMC_
 
std::string intercalibConstantsFile_
 
double intercalibConstantSigma_
 
double intercalibConstantSigmaMC_
 
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 laserAlphaSigma_
 
double laserAPDPNMean_
 
double laserAPDPNRefMean_
 
double laserAPDPNRefSigma_
 
double laserAPDPNSigma_
 
unsigned long laserAPDPNTime1_
 
unsigned long laserAPDPNTime2_
 
unsigned long laserAPDPNTime3_
 
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 producedEcalMappingElectronics_
 
bool producedEcalPedestals_
 
bool producedEcalTimeCalibConstants_
 
bool producedEcalTimeCalibErrors_
 
bool producedEcalTimeOffsetConstant_
 
bool producedEcalTrgChannelStatus_
 
bool producedEcalWeights_
 
double timeCalibConstantMean_
 
std::string timeCalibConstantsFile_
 
double timeCalibConstantSigma_
 
double timeCalibErrorMean_
 
std::string timeCalibErrorsFile_
 
double timeOffsetEBConstant_
 
double timeOffsetEEConstant_
 
std::string trgChannelStatusFile_
 
int verbose_
 
bool weightsForAsynchronousRunning_
 

Additional Inherited Members

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

Detailed Description

Definition at line 103 of file EcalTrivialConditionRetriever.h.

Constructor & Destructor Documentation

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

Definition at line 27 of file EcalTrivialConditionRetriever.cc.

References gather_cfg::cout, getChannelStatusFromConfiguration(), getIntercalibConstantsFromConfiguration(), getIntercalibErrorsFromConfiguration(), getMappingFromConfiguration(), getTimeCalibConstantsFromConfiguration(), getTimeCalibErrorsFromConfiguration(), getTrgChannelStatusFromConfiguration(), edm::ParameterSet::getUntrackedParameter(), scaleCards::path, produceEcalADCToGeVConstant(), produceEcalAlignmentEB(), produceEcalAlignmentEE(), produceEcalAlignmentES(), produceEcalChannelStatus(), produceEcalClusterCrackCorrParameters(), produceEcalClusterEnergyCorrectionObjectSpecificParameters(), produceEcalClusterEnergyCorrectionParameters(), produceEcalClusterEnergyUncertaintyParameters(), produceEcalClusterLocalContCorrParameters(), produceEcalDAQTowerStatus(), produceEcalDCSTowerStatus(), produceEcalDQMChannelStatus(), produceEcalDQMTowerStatus(), produceEcalGainRatios(), produceEcalIntercalibConstants(), produceEcalIntercalibConstantsMC(), produceEcalIntercalibErrors(), produceEcalLaserAlphas(), produceEcalLaserAPDPNRatios(), produceEcalLaserAPDPNRatiosRef(), produceEcalMappingElectronics(), produceEcalPedestals(), produceEcalTBWeights(), produceEcalTimeCalibConstants(), produceEcalTimeCalibErrors(), produceEcalTimeOffsetConstant(), produceEcalTrgChannelStatus(), and produceEcalWeightXtalGroups().

28 {
29  // initilize parameters used to produce cond DB objects
30  adcToGeVEBConstant_ = ps.getUntrackedParameter<double>("adcToGeVEBConstant",0.035);
31  adcToGeVEEConstant_ = ps.getUntrackedParameter<double>("adcToGeVEEConstant",0.060);
32 
33  intercalibConstantMeanMC_ = ps.getUntrackedParameter<double>("intercalibConstantMeanMC",1.0);
34  intercalibConstantSigmaMC_ = ps.getUntrackedParameter<double>("intercalibConstantSigmaMC",0.0);
35 
36  intercalibConstantMean_ = ps.getUntrackedParameter<double>("intercalibConstantMean",1.0);
37  intercalibConstantSigma_ = ps.getUntrackedParameter<double>("intercalibConstantSigma",0.0);
38  intercalibErrorMean_ = ps.getUntrackedParameter<double>("IntercalibErrorMean",0.0);
39 
40  timeCalibConstantMean_ = ps.getUntrackedParameter<double>("timeCalibConstantMean",0.0);
41  timeCalibConstantSigma_ = ps.getUntrackedParameter<double>("timeCalibConstantSigma",0.0);
42  timeCalibErrorMean_ = ps.getUntrackedParameter<double>("timeCalibErrorMean",0.0);
43 
44  timeOffsetEBConstant_ = ps.getUntrackedParameter<double>("timeOffsetEBConstant",0.0);
45  timeOffsetEEConstant_ = ps.getUntrackedParameter<double>("timeOffsetEEConstant",0.0);
46 
47  laserAlphaMean_ = ps.getUntrackedParameter<double>("laserAlphaMean",1.55);
48  laserAlphaSigma_ = ps.getUntrackedParameter<double>("laserAlphaSigma",0);
49 
50  laserAPDPNTime1_ = (unsigned long)atoi( ps.getUntrackedParameter<std::string>("laserAPDPNTime1","1").c_str());
51  laserAPDPNTime2_= (unsigned long)atoi( ps.getUntrackedParameter<std::string>("laserAPDPNTime2","0").c_str());
52  laserAPDPNTime3_= (unsigned long)atoi( ps.getUntrackedParameter<std::string>("laserAPDPNTime3","0").c_str());
53 
54  laserAPDPNRefMean_ = ps.getUntrackedParameter<double>("laserAPDPNRefMean",1.0);
55  laserAPDPNRefSigma_ = ps.getUntrackedParameter<double>("laserAPDPNRefSigma",0.0);
56 
57  laserAPDPNMean_ = ps.getUntrackedParameter<double>("laserAPDPNMean",1.0);
58  laserAPDPNSigma_ = ps.getUntrackedParameter<double>("laserAPDPNSigma",0.0);
59 
60  localContCorrParameters_ = ps.getUntrackedParameter< std::vector<double> >("localContCorrParameters", std::vector<double>(0) );
61  crackCorrParameters_ = ps.getUntrackedParameter< std::vector<double> >("crackCorrParameters", std::vector<double>(0) );
62  energyCorrectionParameters_ = ps.getUntrackedParameter< std::vector<double> >("energyCorrectionParameters", std::vector<double>(0) );
63  energyUncertaintyParameters_ = ps.getUntrackedParameter< std::vector<double> >("energyUncertaintyParameters", std::vector<double>(0) );
64  energyCorrectionObjectSpecificParameters_ = ps.getUntrackedParameter< std::vector<double> >("energyCorrectionObjectSpecificParameters", std::vector<double>(0) );
65 
66  EBpedMeanX12_ = ps.getUntrackedParameter<double>("EBpedMeanX12", 200.);
67  EBpedRMSX12_ = ps.getUntrackedParameter<double>("EBpedRMSX12", 1.10);
68  EBpedMeanX6_ = ps.getUntrackedParameter<double>("EBpedMeanX6", 200.);
69  EBpedRMSX6_ = ps.getUntrackedParameter<double>("EBpedRMSX6", 0.90);
70  EBpedMeanX1_ = ps.getUntrackedParameter<double>("EBpedMeanX1", 200.);
71  EBpedRMSX1_ = ps.getUntrackedParameter<double>("EBpedRMSX1", 0.62);
72 
73  EEpedMeanX12_ = ps.getUntrackedParameter<double>("EEpedMeanX12", 200.);
74  EEpedRMSX12_ = ps.getUntrackedParameter<double>("EEpedRMSX12", 2.50);
75  EEpedMeanX6_ = ps.getUntrackedParameter<double>("EEpedMeanX6", 200.);
76  EEpedRMSX6_ = ps.getUntrackedParameter<double>("EEpedRMSX6", 2.00);
77  EEpedMeanX1_ = ps.getUntrackedParameter<double>("EEpedMeanX1", 200.);
78  EEpedRMSX1_ = ps.getUntrackedParameter<double>("EEpedRMSX1", 1.40);
79 
80  gainRatio12over6_ = ps.getUntrackedParameter<double>("gainRatio12over6", 2.0);
81  gainRatio6over1_ = ps.getUntrackedParameter<double>("gainRatio6over1", 6.0);
82 
83  getWeightsFromFile_ = ps.getUntrackedParameter<bool>("getWeightsFromFile",false);
84 
85  nTDCbins_ = 1;
86 
87  std::cout << " EcalTrivialConditionRetriever " << std::endl;
88  weightsForAsynchronousRunning_ = ps.getUntrackedParameter<bool>("weightsForTB",false);
89 
91  {
92  getWeightsFromFile_ = true; //override user request
93  //nTDCbins_ = 25;
94  nTDCbins_ = 50; //modif Alex-21-07-2006
95  }
96 
97  std::string path="CalibCalorimetry/EcalTrivialCondModules/data/";
98  std::string weightType;
99  std::ostringstream str;
100 
102  str << "_CMS.txt" ;
103  else
104  str << "_TB.txt" ;
105 
106  weightType = str.str();
107 
108  amplWeightsFile_ = ps.getUntrackedParameter<std::string>("amplWeightsFile",path+"ampWeights"+weightType);
109  amplWeightsAftFile_ = ps.getUntrackedParameter<std::string>("amplWeightsAftFile",path+"ampWeightsAfterGainSwitch"+weightType);
110  pedWeightsFile_ = ps.getUntrackedParameter<std::string>("pedWeightsFile",path+"pedWeights"+weightType);
111  pedWeightsAftFile_ = ps.getUntrackedParameter<std::string>("pedWeightsAftFile",path+"pedWeightsAfterGainSwitch"+weightType);
112  jittWeightsFile_ = ps.getUntrackedParameter<std::string>("jittWeightsFile",path+"timeWeights"+weightType);
113  jittWeightsAftFile_ = ps.getUntrackedParameter<std::string>("jittWeightsAftFile",path+"timeWeightsAfterGainSwitch"+weightType);
114  chi2MatrixFile_ = ps.getUntrackedParameter<std::string>("chi2MatrixFile",path+"chi2Matrix"+weightType);
115  chi2MatrixAftFile_ = ps.getUntrackedParameter<std::string>("chi2MatrixAftFile",path+"chi2MatrixAfterGainSwitch"+weightType);
116 
117  amplWeights_.resize(nTDCbins_);
118  amplWeightsAft_.resize(nTDCbins_);
119  pedWeights_.resize(nTDCbins_);
120  pedWeightsAft_.resize(nTDCbins_);
121  jittWeights_.resize(nTDCbins_);
122  jittWeightsAft_.resize(nTDCbins_);
123  chi2Matrix_.resize(nTDCbins_);
124  chi2MatrixAft_.resize(nTDCbins_);
125 
126  // default weights for MGPA shape after pedestal subtraction
128 
129  producedEcalPedestals_ = ps.getUntrackedParameter<bool>("producedEcalPedestals",true);
130  producedEcalWeights_ = ps.getUntrackedParameter<bool>("producedEcalWeights",true);
131 
132  producedEcalGainRatios_ = ps.getUntrackedParameter<bool>("producedEcalGainRatios",true);
133  producedEcalADCToGeVConstant_ = ps.getUntrackedParameter<bool>("producedEcalADCToGeVConstant",true);
134 
135  producedEcalMappingElectronics_ = ps.getUntrackedParameter<bool>("producedEcalMappingElectronics",true);
136  mappingFile_ = ps.getUntrackedParameter<std::string>("mappingFile","");
137 
138  if ( producedEcalMappingElectronics_ ) {
139  if ( mappingFile_ != "" ) { // if file provided read channel map
141  } else {
143  }
144  findingRecord<EcalMappingElectronicsRcd>();
145  }
146  // Alignment from file
147  getEBAlignmentFromFile_ = ps.getUntrackedParameter<bool>("getEBAlignmentFromFile",false);
149  EBAlignmentFile_ = ps.getUntrackedParameter<std::string>("EBAlignmentFile",path+"EBAlignment.txt");
150  }
151 
152  getEEAlignmentFromFile_ = ps.getUntrackedParameter<bool>("getEEAlignmentFromFile",false);
154  EEAlignmentFile_ = ps.getUntrackedParameter<std::string>("EEAlignmentFile",path+"EEAlignment.txt");
155  }
156 
157  getESAlignmentFromFile_ = ps.getUntrackedParameter<bool>("getESAlignmentFromFile",false);
159  ESAlignmentFile_ = ps.getUntrackedParameter<std::string>("ESAlignmentFile",path+"ESAlignment.txt");
160 
161  verbose_ = ps.getUntrackedParameter<int>("verbose", 0);
162 
163  //Tell Producer what we produce
164  //setWhatproduce(this);
167 
168  if (producedEcalWeights_) {
171  }
172 
173  if (producedEcalGainRatios_)
175 
176  if (producedEcalADCToGeVConstant_)
178 
179  // TimeOffsetConstant
180  producedEcalTimeOffsetConstant_ = ps.getUntrackedParameter<bool>("producedEcalTimeOffsetConstant",true);
181  //std::cout << " EcalTrivialConditionRetriever : producedEcalTimeOffsetConstant_" << producedEcalTimeOffsetConstant_ << std::endl;
184  findingRecord<EcalTimeOffsetConstantRcd>();
185  }
186 
187  // intercalibration constants
188  producedEcalIntercalibConstants_ = ps.getUntrackedParameter<bool>("producedEcalIntercalibConstants",true);
189  intercalibConstantsFile_ = ps.getUntrackedParameter<std::string>("intercalibConstantsFile","") ;
190 
191  if (producedEcalIntercalibConstants_) { // user asks to produce constants
192  if(intercalibConstantsFile_ != "") { // if file provided read constants
194  } else { // set all constants to 1. or smear as specified by user
196  }
197  findingRecord<EcalIntercalibConstantsRcd> () ;
198  }
199  // MC intercalibrations
200  producedEcalIntercalibConstantsMC_ = ps.getUntrackedParameter<bool>("producedEcalIntercalibConstantsMC",true);
201 
202  if (producedEcalIntercalibConstantsMC_) { // user asks to produce constants
204  findingRecord<EcalIntercalibConstantsMCRcd> () ;
205  }
206 
207  // intercalibration constants
208  producedEcalIntercalibErrors_ = ps.getUntrackedParameter<bool>("producedEcalIntercalibErrors",true);
209  intercalibErrorsFile_ = ps.getUntrackedParameter<std::string>("intercalibErrorsFile","") ;
210 
211  if (producedEcalIntercalibErrors_) { // user asks to produce constants
212  if(intercalibErrorsFile_ != "") { // if file provided read constants
214  } else { // set all constants to 1. or smear as specified by user
216  }
217  findingRecord<EcalIntercalibErrorsRcd> () ;
218  }
219 
220  // time calibration constants
221  producedEcalTimeCalibConstants_ = ps.getUntrackedParameter<bool>("producedEcalTimeCalibConstants",true);
222  timeCalibConstantsFile_ = ps.getUntrackedParameter<std::string>("timeCalibConstantsFile","") ;
223 
224  if (producedEcalTimeCalibConstants_) { // user asks to produce constants
225  if(timeCalibConstantsFile_ != "") { // if file provided read constants
227  } else { // set all constants to 1. or smear as specified by user
229  }
230  findingRecord<EcalTimeCalibConstantsRcd> () ;
231  }
232 
233  // time calibration constants
234  producedEcalTimeCalibErrors_ = ps.getUntrackedParameter<bool>("producedEcalTimeCalibErrors",true);
235  timeCalibErrorsFile_ = ps.getUntrackedParameter<std::string>("timeCalibErrorsFile","") ;
236 
237  if (producedEcalTimeCalibErrors_) { // user asks to produce constants
238  if(timeCalibErrorsFile_ != "") { // if file provided read constants
240  } else { // set all constants to 1. or smear as specified by user
242  }
243  findingRecord<EcalTimeCalibErrorsRcd> () ;
244  }
245 
246  // cluster corrections
247  producedEcalClusterLocalContCorrParameters_ = ps.getUntrackedParameter<bool>("producedEcalClusterLocalContCorrParameters", false);
248  producedEcalClusterCrackCorrParameters_ = ps.getUntrackedParameter<bool>("producedEcalClusterCrackCorrParameters", false);
249  producedEcalClusterEnergyCorrectionParameters_ = ps.getUntrackedParameter<bool>("producedEcalClusterEnergyCorrectionParameters", false);
250  producedEcalClusterEnergyUncertaintyParameters_ = ps.getUntrackedParameter<bool>("producedEcalClusterEnergyUncertaintyParameters", false);
251  producedEcalClusterEnergyCorrectionObjectSpecificParameters_ = ps.getUntrackedParameter<bool>("producedEcalClusterEnergyCorrectionObjectSpecificParameters", false);
254  findingRecord<EcalClusterLocalContCorrParametersRcd>();
255  }
256  if ( producedEcalClusterCrackCorrParameters_ ) {
258  findingRecord<EcalClusterCrackCorrParametersRcd>();
259  }
260  if ( producedEcalClusterEnergyCorrectionParameters_ ) {
262  findingRecord<EcalClusterEnergyCorrectionParametersRcd>();
263  }
264  if ( producedEcalClusterEnergyUncertaintyParameters_ ) {
266  findingRecord<EcalClusterEnergyUncertaintyParametersRcd>();
267  }
268  if ( producedEcalClusterEnergyCorrectionObjectSpecificParameters_ ) {
270  findingRecord<EcalClusterEnergyCorrectionObjectSpecificParametersRcd>();
271  }
272 
273  // laser correction
274  producedEcalLaserCorrection_ = ps.getUntrackedParameter<bool>("producedEcalLaserCorrection",true);
275  if (producedEcalLaserCorrection_) { // user asks to produce constants
276  // set all constants to 1. or smear as specified by user
278  findingRecord<EcalLaserAlphasRcd> () ;
279  getLaserAlphaFromFile_ = ps.getUntrackedParameter<bool>("getLaserAlphaFromFile",false);
280  std::cout << " getLaserAlphaFromFile_ " << getLaserAlphaFromFile_ << std::endl;
281  if(getLaserAlphaFromFile_) {
282  EBLaserAlphaFile_ = ps.getUntrackedParameter<std::string>("EBLaserAlphaFile",path+"EBLaserAlpha.txt");
283  EELaserAlphaFile_ = ps.getUntrackedParameter<std::string>("EELaserAlphaFile",path+"EELaserAlpha.txt");
284  std::cout << " EELaserAlphaFile_ " << EELaserAlphaFile_.c_str() << std::endl;
285  }
287  findingRecord<EcalLaserAPDPNRatiosRefRcd> () ;
289  findingRecord<EcalLaserAPDPNRatiosRcd> () ;
290  }
291 
292  // channel status
293  producedEcalChannelStatus_ = ps.getUntrackedParameter<bool>("producedEcalChannelStatus",true);
294  channelStatusFile_ = ps.getUntrackedParameter<std::string>("channelStatusFile","");
295 
297  if ( channelStatusFile_ != "" ) { // if file provided read channel map
299  } else { // set all channels to working -- FIXME might be changed
301  }
302  findingRecord<EcalChannelStatusRcd>();
303  }
304  // DQM channel status
305  producedEcalDQMChannelStatus_ = ps.getUntrackedParameter<bool>("producedEcalDQMChannelStatus",true);
308  findingRecord<EcalDQMChannelStatusRcd>();
309  }
310  // DCS Tower status
311  producedEcalDCSTowerStatus_ = ps.getUntrackedParameter<bool>("producedEcalDCSTowerStatus",true);
314  findingRecord<EcalDCSTowerStatusRcd>();
315  }
316  // DAQ Tower status
317  producedEcalDAQTowerStatus_ = ps.getUntrackedParameter<bool>("producedEcalDAQTowerStatus",true);
320  findingRecord<EcalDAQTowerStatusRcd>();
321  }
322  // DQM Tower status
323  producedEcalDQMTowerStatus_ = ps.getUntrackedParameter<bool>("producedEcalDQMTowerStatus",true);
326  findingRecord<EcalDQMTowerStatusRcd>();
327  }
328 
329  // trigger channel status
330  producedEcalTrgChannelStatus_ = ps.getUntrackedParameter<bool>("producedEcalTrgChannelStatus",true);
331  trgChannelStatusFile_ = ps.getUntrackedParameter<std::string>("trgChannelStatusFile","");
332 
334  if ( trgChannelStatusFile_ != "" ) { // if file provided read channel map
336  } else { // set all channels to working -- FIXME might be changed
338  }
339  findingRecord<EcalTPGCrystalStatusRcd>();
340  }
341 
342  // Alignment
343  producedEcalAlignmentEB_ = ps.getUntrackedParameter<bool>("producedEcalAlignmentEB",true);
344  if ( producedEcalAlignmentEB_ ) {
346  findingRecord<EBAlignmentRcd>();
347  }
348  producedEcalAlignmentEE_ = ps.getUntrackedParameter<bool>("producedEcalAlignmentEE",true);
349  if ( producedEcalAlignmentEE_ ) {
351  findingRecord<EEAlignmentRcd>();
352  }
353  producedEcalAlignmentES_ = ps.getUntrackedParameter<bool>("producedEcalAlignmentES",true);
354  if ( producedEcalAlignmentES_ ) {
356  findingRecord<ESAlignmentRcd>();
357  }
358  //Tell Finder what records we find
359  if (producedEcalPedestals_) findingRecord<EcalPedestalsRcd>();
360 
361  if (producedEcalWeights_) {
362  findingRecord<EcalWeightXtalGroupsRcd>();
363  findingRecord<EcalTBWeightsRcd>();
364  }
365 
366  if (producedEcalGainRatios_) findingRecord<EcalGainRatiosRcd>();
367 
368  if (producedEcalADCToGeVConstant_) findingRecord<EcalADCToGeVConstantRcd>();
369 
370 }
virtual std::auto_ptr< EcalTimeCalibConstants > produceEcalTimeCalibConstants(const EcalTimeCalibConstantsRcd &)
virtual std::auto_ptr< EcalChannelStatus > produceEcalChannelStatus(const EcalChannelStatusRcd &)
virtual std::auto_ptr< EcalIntercalibConstants > getIntercalibConstantsFromConfiguration(const EcalIntercalibConstantsRcd &)
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeightsAft_
virtual std::auto_ptr< EcalClusterCrackCorrParameters > produceEcalClusterCrackCorrParameters(const EcalClusterCrackCorrParametersRcd &)
virtual std::auto_ptr< EcalTPGCrystalStatus > produceEcalTrgChannelStatus(const EcalTPGCrystalStatusRcd &)
std::vector< double > energyCorrectionObjectSpecificParameters_
virtual std::auto_ptr< EcalChannelStatus > getChannelStatusFromConfiguration(const EcalChannelStatusRcd &)
virtual std::auto_ptr< EcalTBWeights > produceEcalTBWeights(const EcalTBWeightsRcd &)
virtual std::auto_ptr< EcalMappingElectronics > produceEcalMappingElectronics(const EcalMappingElectronicsRcd &)
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > pedWeightsAft_
void getWeightsFromConfiguration(const edm::ParameterSet &ps)
virtual std::auto_ptr< EcalPedestals > produceEcalPedestals(const EcalPedestalsRcd &)
virtual std::auto_ptr< EcalLaserAPDPNRatios > produceEcalLaserAPDPNRatios(const EcalLaserAPDPNRatiosRcd &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
virtual std::auto_ptr< EcalLaserAlphas > produceEcalLaserAlphas(const EcalLaserAlphasRcd &)
virtual std::auto_ptr< EcalTimeCalibConstants > getTimeCalibConstantsFromConfiguration(const EcalTimeCalibConstantsRcd &)
virtual std::auto_ptr< EcalDAQTowerStatus > produceEcalDAQTowerStatus(const EcalDAQTowerStatusRcd &)
virtual std::auto_ptr< Alignments > produceEcalAlignmentEE(const EEAlignmentRcd &)
list path
Definition: scaleCards.py:51
virtual std::auto_ptr< EcalADCToGeVConstant > produceEcalADCToGeVConstant(const EcalADCToGeVConstantRcd &)
virtual std::auto_ptr< EcalClusterLocalContCorrParameters > produceEcalClusterLocalContCorrParameters(const EcalClusterLocalContCorrParametersRcd &)
virtual std::auto_ptr< EcalWeightXtalGroups > produceEcalWeightXtalGroups(const EcalWeightXtalGroupsRcd &)
virtual std::auto_ptr< EcalIntercalibErrors > getIntercalibErrorsFromConfiguration(const EcalIntercalibErrorsRcd &)
virtual std::auto_ptr< Alignments > produceEcalAlignmentEB(const EBAlignmentRcd &)
virtual std::auto_ptr< EcalDQMTowerStatus > produceEcalDQMTowerStatus(const EcalDQMTowerStatusRcd &)
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > pedWeights_
virtual std::auto_ptr< EcalClusterEnergyUncertaintyParameters > produceEcalClusterEnergyUncertaintyParameters(const EcalClusterEnergyUncertaintyParametersRcd &)
virtual std::auto_ptr< EcalMappingElectronics > getMappingFromConfiguration(const EcalMappingElectronicsRcd &)
virtual std::auto_ptr< EcalIntercalibErrors > produceEcalIntercalibErrors(const EcalIntercalibErrorsRcd &)
virtual std::auto_ptr< EcalTimeCalibErrors > produceEcalTimeCalibErrors(const EcalTimeCalibErrorsRcd &)
virtual std::auto_ptr< EcalTPGCrystalStatus > getTrgChannelStatusFromConfiguration(const EcalTPGCrystalStatusRcd &)
virtual std::auto_ptr< EcalClusterEnergyCorrectionParameters > produceEcalClusterEnergyCorrectionParameters(const EcalClusterEnergyCorrectionParametersRcd &)
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > amplWeights_
virtual std::auto_ptr< EcalDCSTowerStatus > produceEcalDCSTowerStatus(const EcalDCSTowerStatusRcd &)
std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2MatrixAft_
virtual std::auto_ptr< EcalIntercalibConstants > produceEcalIntercalibConstants(const EcalIntercalibConstantsRcd &)
virtual std::auto_ptr< EcalIntercalibConstantsMC > produceEcalIntercalibConstantsMC(const EcalIntercalibConstantsMCRcd &)
virtual std::auto_ptr< EcalLaserAPDPNRatiosRef > produceEcalLaserAPDPNRatiosRef(const EcalLaserAPDPNRatiosRefRcd &)
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > amplWeightsAft_
virtual std::auto_ptr< Alignments > produceEcalAlignmentES(const ESAlignmentRcd &)
virtual std::auto_ptr< EcalTimeCalibErrors > getTimeCalibErrorsFromConfiguration(const EcalTimeCalibErrorsRcd &)
virtual std::auto_ptr< EcalTimeOffsetConstant > produceEcalTimeOffsetConstant(const EcalTimeOffsetConstantRcd &)
virtual std::auto_ptr< EcalClusterEnergyCorrectionObjectSpecificParameters > produceEcalClusterEnergyCorrectionObjectSpecificParameters(const EcalClusterEnergyCorrectionObjectSpecificParametersRcd &)
tuple cout
Definition: gather_cfg.py:121
virtual std::auto_ptr< EcalDQMChannelStatus > produceEcalDQMChannelStatus(const EcalDQMChannelStatusRcd &)
virtual std::auto_ptr< EcalGainRatios > produceEcalGainRatios(const EcalGainRatiosRcd &)
std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix_
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeights_
EcalTrivialConditionRetriever::~EcalTrivialConditionRetriever ( )
virtual

Definition at line 372 of file EcalTrivialConditionRetriever.cc.

373 {
374 }
EcalTrivialConditionRetriever::EcalTrivialConditionRetriever ( const EcalTrivialConditionRetriever )
private

Member Function Documentation

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

Definition at line 1703 of file EcalTrivialConditionRetriever.cc.

References edm::hlt::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, ntuplemaker::status, EBDetId::unhashIndex(), EEDetId::unhashIndex(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

1704 {
1705  std::auto_ptr<EcalChannelStatus> ecalStatus = std::auto_ptr<EcalChannelStatus>( new EcalChannelStatus() );
1706 
1707 
1708  // start by setting all statuses to 0
1709 
1710  // barrel
1711  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
1712  if(ieta==0) continue;
1713  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
1714  if (EBDetId::validDetId(ieta,iphi)) {
1715  EBDetId ebid(ieta,iphi);
1716  ecalStatus->setValue( ebid, 0 );
1717  }
1718  }
1719  }
1720  // endcap
1721  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
1722  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
1723  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
1724  if (EEDetId::validDetId(iX,iY,1)) {
1725  EEDetId eedetidpos(iX,iY,1);
1726  ecalStatus->setValue( eedetidpos, 0 );
1727  }
1728  if (EEDetId::validDetId(iX,iY,-1)) {
1729  EEDetId eedetidneg(iX,iY,-1);
1730  ecalStatus->setValue( eedetidneg, 0 );
1731  }
1732  }
1733  }
1734 
1735 
1736 
1737  // overwrite the statuses which are in the file
1738 
1739  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading channel statuses from file " << edm::FileInPath(channelStatusFile_).fullPath().c_str() ;
1740  std::ifstream statusFile(edm::FileInPath(channelStatusFile_).fullPath().c_str());
1741  if ( !statusFile.good() ) {
1742  edm::LogError ("EcalTrivialConditionRetriever")
1743  << "*** Problems opening file: " << channelStatusFile_ ;
1744  throw cms::Exception ("Cannot open ECAL channel status file") ;
1745  }
1746 
1747  std::string EcalSubDet;
1748  std::string str;
1749  int hashIndex(0);
1750  int status(0);
1751 
1752  while (!statusFile.eof())
1753  {
1754  statusFile >> EcalSubDet;
1755  if (EcalSubDet!=std::string("EB") && EcalSubDet!=std::string("EE"))
1756  {
1757  std::getline(statusFile,str);
1758  continue;
1759  }
1760  else
1761  {
1762  statusFile>> hashIndex >> status;
1763  }
1764  // std::cout << EcalSubDet << " " << hashIndex << " " << status;
1765 
1766  if(EcalSubDet==std::string("EB"))
1767  {
1768  EBDetId ebid = EBDetId::unhashIndex(hashIndex);
1769  ecalStatus->setValue( ebid, status );
1770  }
1771  else if(EcalSubDet==std::string("EE"))
1772  {
1773  EEDetId eedetid = EEDetId::unhashIndex(hashIndex);
1774  ecalStatus->setValue( eedetid, status );
1775  }
1776  else
1777  {
1778  edm::LogError ("EcalTrivialConditionRetriever")
1779  << " *** " << EcalSubDet << " is neither EB nor EE ";
1780  }
1781 
1782  }
1783  // the file is supposed to be in the form -- FIXME
1784 
1785 
1786  statusFile.close();
1787  return ecalStatus;
1788 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
static const int MIN_IPHI
Definition: EBDetId.h:121
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:115
static const int IX_MIN
Definition: EEDetId.h:271
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const int IY_MIN
Definition: EEDetId.h:275
EcalChannelStatusMap EcalChannelStatus
static const int IX_MAX
Definition: EEDetId.h:279
static const int MAX_IPHI
Definition: EBDetId.h:123
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.cc:12
static const int MAX_IETA
Definition: EBDetId.h:122
static const int IY_MAX
Definition: EEDetId.h:283
std::string fullPath() const
Definition: FileInPath.cc:171
tuple status
Definition: ntuplemaker.py:245
std::auto_ptr< EcalIntercalibConstants > EcalTrivialConditionRetriever::getIntercalibConstantsFromConfiguration ( const EcalIntercalibConstantsRcd )
virtual

Definition at line 2117 of file EcalTrivialConditionRetriever.cc.

References calib, edm::hlt::Exception, i, geometryCSVtoXML::line, EBDetId::MAX_SM, EBDetId::MIN_SM, DetId::rawId(), and EBDetId::SMCRYSTALMODE.

Referenced by EcalTrivialConditionRetriever().

2118 {
2119  std::auto_ptr<EcalIntercalibConstants> ical =
2120  std::auto_ptr<EcalIntercalibConstants>( new EcalIntercalibConstants() );
2121 
2122  // Read the values from a txt file
2123  // -------------------------------
2124 
2125  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading intercalibration constants from file "
2126  << intercalibConstantsFile_.c_str() ;
2127 
2128  FILE *inpFile ;
2129  inpFile = fopen (intercalibConstantsFile_.c_str (),"r") ;
2130  if (!inpFile)
2131  {
2132  edm::LogError ("EcalTrivialConditionRetriever")
2133  << "*** Can not open file: " << intercalibConstantsFile_ ;
2134  throw cms::Exception ("Cannot open inter-calibration coefficients txt file") ;
2135  }
2136 
2137  char line[256] ;
2138  std::ostringstream str ;
2139  fgets (line,255,inpFile) ;
2140  int sm_number=atoi (line) ;
2141  str << "sm: " << sm_number ;
2142 
2143  fgets (line,255,inpFile) ;
2144  //int nevents=atoi (line) ; // not necessary here just for online conddb
2145 
2146  fgets (line,255,inpFile) ;
2147  std::string gen_tag = line ;
2148  str << "gen tag: " << gen_tag ; // should I use this?
2149 
2150  fgets (line,255,inpFile) ;
2151  std::string cali_method = line ;
2152  str << "cali method: " << cali_method << std::endl ; // not important
2153 
2154  fgets (line,255,inpFile) ;
2155  std::string cali_version = line ;
2156  str << "cali version: " << cali_version << std::endl ; // not important
2157 
2158  fgets (line,255,inpFile) ;
2159  std::string cali_type = line ;
2160  str << "cali type: " << cali_type ; // not important
2161 
2162  edm::LogInfo("EcalTrivialConditionRetriever")
2163  << "[PIETRO] Intercalibration file - "
2164  << str.str () << std::endl ;
2165 
2166  float calib[1700]={1} ;
2167  int calib_status[1700]={0} ;
2168 
2169  int ii = 0 ;
2170 
2171  while (fgets (line,255,inpFile))
2172  {
2173  ii++;
2174  int dmy_num = 0 ;
2175  float dmy_calib = 0. ;
2176  float dmy_RMS = 0. ;
2177  int dmy_events = 0 ;
2178  int dmy_status = 0 ;
2179  sscanf (line, "%d %f %f %d %d", &dmy_num, &dmy_calib,
2180  &dmy_RMS, &dmy_events,
2181  &dmy_status) ;
2182  assert (dmy_num >= 1) ;
2183  assert (dmy_num <= 1700) ;
2184  calib[dmy_num-1] = dmy_calib ;
2185  calib_status[dmy_num-1] = dmy_status ;
2186 
2187 // edm::LogInfo ("EcalTrivialConditionRetriever")
2188 // << "[PIETRO] cry = " << dmy_num
2189 // << " calib = " << calib[dmy_num-1]
2190 // << " RMS = " << dmy_RMS
2191 // << " events = " << dmy_events
2192 // << " status = " << calib_status[dmy_num-1]
2193 // << std::endl ;
2194  }
2195 
2196  fclose (inpFile) ; // close inp. file
2197  edm::LogInfo ("EcalTrivialConditionRetriever") << "Read intercalibrations for " << ii << " xtals " ;
2198  if (ii!=1700) edm::LogWarning ("StoreEcalCondition")
2199  << "Some crystals missing, set to 1" << std::endl ;
2200 
2201  // Transfer the data to the inter-calibration coefficients container
2202  // -----------------------------------------------------------------
2203 
2204  // DB supermodule always set to 1 for the TestBeam FIXME
2205  int sm_db=1 ;
2206  // loop over channels
2207  for (int i=0 ; i<1700 ; i++)
2208  {
2209  //if (EBDetId::validDetId(iEta,iPhi)) {
2210  // CANNOT be used -- validDetId only checks ETA PHI method
2211  // doing a check by hand, here is the only place in CMSSW
2212  // outside TB code and EcalRawToDigi where needed
2213  // => no need for changing the DetId interface
2214  //
2215  // checking only sm_db -- guess can change with the above FIXME
2216  if (sm_db >= EBDetId::MIN_SM && sm_db <= EBDetId::MAX_SM) {
2217  EBDetId ebid (sm_db,i+1,EBDetId::SMCRYSTALMODE) ;
2218  if (calib_status[i]) ical->setValue (ebid.rawId (), calib[i]) ;
2219  else ical->setValue (ebid.rawId (), 1.) ;
2220  }
2221  //}
2222  } // loop over channels
2223 
2224 // edm::LogInfo ("EcalTrivialConditionRetriever") << "INTERCALIBRATION DONE" ;
2225  return ical;
2226 }
int i
Definition: DBlmapReader.cc:9
static const int MIN_SM
Definition: EBDetId.h:131
MVATrainerComputer * calib
Definition: MVATrainer.cc:64
EcalIntercalibConstantMap EcalIntercalibConstants
static const int MAX_SM
Definition: EBDetId.h:132
static const int SMCRYSTALMODE
Definition: EBDetId.h:146
std::auto_ptr< EcalIntercalibErrors > EcalTrivialConditionRetriever::getIntercalibErrorsFromConfiguration ( const EcalIntercalibErrorsRcd )
virtual

Definition at line 2231 of file EcalTrivialConditionRetriever.cc.

References calib, edm::hlt::Exception, i, geometryCSVtoXML::line, EBDetId::MAX_SM, EBDetId::MIN_SM, DetId::rawId(), and EBDetId::SMCRYSTALMODE.

Referenced by EcalTrivialConditionRetriever().

2232 {
2233  std::auto_ptr<EcalIntercalibErrors> ical =
2234  std::auto_ptr<EcalIntercalibErrors>( new EcalIntercalibErrors() );
2235 
2236  // Read the values from a txt file
2237  // -------------------------------
2238 
2239  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading intercalibration constants from file "
2240  << intercalibErrorsFile_.c_str() ;
2241 
2242  FILE *inpFile ;
2243  inpFile = fopen (intercalibErrorsFile_.c_str (),"r") ;
2244  if (!inpFile)
2245  {
2246  edm::LogError ("EcalTrivialConditionRetriever")
2247  << "*** Can not open file: " << intercalibErrorsFile_ ;
2248  throw cms::Exception ("Cannot open inter-calibration coefficients txt file") ;
2249  }
2250 
2251  char line[256] ;
2252  std::ostringstream str ;
2253  fgets (line,255,inpFile) ;
2254  int sm_number=atoi (line) ;
2255  str << "sm: " << sm_number ;
2256 
2257  fgets (line,255,inpFile) ;
2258  //int nevents=atoi (line) ; // not necessary here just for online conddb
2259 
2260  fgets (line,255,inpFile) ;
2261  std::string gen_tag = line ;
2262  str << "gen tag: " << gen_tag ; // should I use this?
2263 
2264  fgets (line,255,inpFile) ;
2265  std::string cali_method = line ;
2266  str << "cali method: " << cali_method << std::endl ; // not important
2267 
2268  fgets (line,255,inpFile) ;
2269  std::string cali_version = line ;
2270  str << "cali version: " << cali_version << std::endl ; // not important
2271 
2272  fgets (line,255,inpFile) ;
2273  std::string cali_type = line ;
2274  str << "cali type: " << cali_type ; // not important
2275 
2276  edm::LogInfo("EcalTrivialConditionRetriever")
2277  << "[PIETRO] Intercalibration file - "
2278  << str.str () << std::endl ;
2279 
2280  float calib[1700]={1} ;
2281  int calib_status[1700]={0} ;
2282 
2283  int ii = 0 ;
2284 
2285  while (fgets (line,255,inpFile))
2286  {
2287  ii++;
2288  int dmy_num = 0 ;
2289  float dmy_calib = 0. ;
2290  float dmy_RMS = 0. ;
2291  int dmy_events = 0 ;
2292  int dmy_status = 0 ;
2293  sscanf (line, "%d %f %f %d %d", &dmy_num, &dmy_calib,
2294  &dmy_RMS, &dmy_events,
2295  &dmy_status) ;
2296  assert (dmy_num >= 1) ;
2297  assert (dmy_num <= 1700) ;
2298  calib[dmy_num-1] = dmy_calib ;
2299  calib_status[dmy_num-1] = dmy_status ;
2300 
2301 // edm::LogInfo ("EcalTrivialConditionRetriever")
2302 // << "[PIETRO] cry = " << dmy_num
2303 // << " calib = " << calib[dmy_num-1]
2304 // << " RMS = " << dmy_RMS
2305 // << " events = " << dmy_events
2306 // << " status = " << calib_status[dmy_num-1]
2307 // << std::endl ;
2308  }
2309 
2310  fclose (inpFile) ; // close inp. file
2311  edm::LogInfo ("EcalTrivialConditionRetriever") << "Read intercalibrations for " << ii << " xtals " ;
2312  if (ii!=1700) edm::LogWarning ("StoreEcalCondition")
2313  << "Some crystals missing, set to 1" << std::endl ;
2314 
2315  // Transfer the data to the inter-calibration coefficients container
2316  // -----------------------------------------------------------------
2317 
2318  // DB supermodule always set to 1 for the TestBeam FIXME
2319  int sm_db=1 ;
2320  // loop over channels
2321  for (int i=0 ; i<1700 ; i++)
2322  {
2323  //if (EBDetId::validDetId(iEta,iPhi)) {
2324  // CANNOT be used -- validDetId only checks ETA PHI method
2325  // doing a check by hand, here is the only place in CMSSW
2326  // outside TB code and EcalRawToDigi where needed
2327  // => no need for changing the DetId interface
2328  //
2329  // checking only sm_db -- guess can change with the above FIXME
2330  if (sm_db >= EBDetId::MIN_SM && sm_db <= EBDetId::MAX_SM) {
2331  EBDetId ebid (sm_db,i+1,EBDetId::SMCRYSTALMODE) ;
2332  if (calib_status[i]) ical->setValue (ebid.rawId (), calib[i]) ;
2333  else ical->setValue (ebid.rawId (), 1.) ;
2334  }
2335  //}
2336  } // loop over channels
2337 
2338 // edm::LogInfo ("EcalTrivialConditionRetriever") << "INTERCALIBRATION DONE" ;
2339  return ical;
2340 }
int i
Definition: DBlmapReader.cc:9
static const int MIN_SM
Definition: EBDetId.h:131
MVATrainerComputer * calib
Definition: MVATrainer.cc:64
EcalIntercalibErrorMap EcalIntercalibErrors
static const int MAX_SM
Definition: EBDetId.h:132
static const int SMCRYSTALMODE
Definition: EBDetId.h:146
std::auto_ptr< EcalMappingElectronics > EcalTrivialConditionRetriever::getMappingFromConfiguration ( const EcalMappingElectronicsRcd )
virtual

Definition at line 2575 of file EcalTrivialConditionRetriever.cc.

References cond::rpcobgas::detid, EcalMappingElement::electronicsid, edm::hlt::Exception, f, edm::FileInPath::fullPath(), EcalTriggerElectronicsId::rawId(), EcalElectronicsId::rawId(), EcalMappingElement::triggerid, and EEDetId::XYMODE.

Referenced by EcalTrivialConditionRetriever().

2576 {
2577  std::auto_ptr<EcalMappingElectronics> mapping = std::auto_ptr<EcalMappingElectronics>( new EcalMappingElectronics() );
2578  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading mapping from file " << edm::FileInPath(mappingFile_).fullPath().c_str() ;
2579 
2580  std::ifstream f(edm::FileInPath(mappingFile_).fullPath().c_str());
2581  if (!f.good())
2582  {
2583  edm::LogError("EcalTrivialConditionRetriever") << "File not found";
2584  throw cms::Exception("FileNotFound");
2585  }
2586 
2587  // uint32_t detid, elecid, triggerid;
2588 
2589  int ix, iy, iz, CL;
2590  // int dccid, towerid, stripid, xtalid;
2591  // int tccid, tower, ipseudostrip, xtalinps;
2592  int dccid, towerid, pseudostrip_in_SC, xtal_in_pseudostrip;
2593  int tccid, tower, pseudostrip_in_TCC, pseudostrip_in_TT;
2594 
2595  while ( ! f.eof())
2596  {
2597  // f >> detid >> elecid >> triggerid;
2598  f >> ix >> iy >> iz >> CL >> dccid >> towerid >> pseudostrip_in_SC >> xtal_in_pseudostrip >> tccid >> tower >>
2599  pseudostrip_in_TCC >> pseudostrip_in_TT ;
2600 
2601 // if (!EEDetId::validDetId(ix,iy,iz))
2602 // continue;
2603 
2604  EEDetId detid(ix,iy,iz,EEDetId::XYMODE);
2605  // std::cout << " dcc tower ps_in_SC xtal_in_ps " << dccid << " " << towerid << " " << pseudostrip_in_SC << " " << xtal_in_pseudostrip << std::endl;
2606  EcalElectronicsId elecid(dccid,towerid, pseudostrip_in_SC, xtal_in_pseudostrip);
2607  // std::cout << " tcc tt ps_in_TT xtal_in_ps " << tccid << " " << tower << " " << pseudostrip_in_TT << " " << xtal_in_pseudostrip << std::endl;
2608  EcalTriggerElectronicsId triggerid(tccid, tower, pseudostrip_in_TT, xtal_in_pseudostrip);
2609  EcalMappingElement aElement;
2610  aElement.electronicsid = elecid.rawId();
2611  aElement.triggerid = triggerid.rawId();
2612  (*mapping).setValue(detid, aElement);
2613  }
2614 
2615  f.close();
2616  return mapping;
2617 }
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:316
EcalMappingElectronicsMap EcalMappingElectronics
double f[11][100]
std::string fullPath() const
Definition: FileInPath.cc:171
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
std::auto_ptr< EcalTimeCalibConstants > EcalTrivialConditionRetriever::getTimeCalibConstantsFromConfiguration ( const EcalTimeCalibConstantsRcd )
virtual

Definition at line 2347 of file EcalTrivialConditionRetriever.cc.

References calib, edm::hlt::Exception, i, geometryCSVtoXML::line, EBDetId::MAX_SM, EBDetId::MIN_SM, DetId::rawId(), and EBDetId::SMCRYSTALMODE.

Referenced by EcalTrivialConditionRetriever().

2348 {
2349  std::auto_ptr<EcalTimeCalibConstants> ical =
2350  std::auto_ptr<EcalTimeCalibConstants>( new EcalTimeCalibConstants() );
2351 
2352  // Read the values from a txt file
2353  // -------------------------------
2354 
2355  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading time calibration constants from file "
2356  << timeCalibConstantsFile_.c_str() ;
2357 
2358  FILE *inpFile ;
2359  inpFile = fopen (timeCalibConstantsFile_.c_str (),"r") ;
2360  if (!inpFile)
2361  {
2362  edm::LogError ("EcalTrivialConditionRetriever")
2363  << "*** Can not open file: " << timeCalibConstantsFile_ ;
2364  throw cms::Exception ("Cannot open inter-calibration coefficients txt file") ;
2365  }
2366 
2367  char line[256] ;
2368  std::ostringstream str ;
2369  fgets (line,255,inpFile) ;
2370  int sm_number=atoi (line) ;
2371  str << "sm: " << sm_number ;
2372 
2373  fgets (line,255,inpFile) ;
2374  //int nevents=atoi (line) ; // not necessary here just for online conddb
2375 
2376  fgets (line,255,inpFile) ;
2377  std::string gen_tag = line ;
2378  str << "gen tag: " << gen_tag ; // should I use this?
2379 
2380  fgets (line,255,inpFile) ;
2381  std::string cali_method = line ;
2382  str << "cali method: " << cali_method << std::endl ; // not important
2383 
2384  fgets (line,255,inpFile) ;
2385  std::string cali_version = line ;
2386  str << "cali version: " << cali_version << std::endl ; // not important
2387 
2388  fgets (line,255,inpFile) ;
2389  std::string cali_type = line ;
2390  str << "cali type: " << cali_type ; // not important
2391 
2392  edm::LogInfo("EcalTrivialConditionRetriever")
2393  << "TimeCalibration file - "
2394  << str.str () << std::endl ;
2395 
2396  float calib[1700]={1} ;
2397  int calib_status[1700]={0} ;
2398 
2399  int ii = 0 ;
2400 
2401  while (fgets (line,255,inpFile))
2402  {
2403  ii++;
2404  int dmy_num = 0 ;
2405  float dmy_calib = 0. ;
2406  float dmy_RMS = 0. ;
2407  int dmy_events = 0 ;
2408  int dmy_status = 0 ;
2409  sscanf (line, "%d %f %f %d %d", &dmy_num, &dmy_calib,
2410  &dmy_RMS, &dmy_events,
2411  &dmy_status) ;
2412  assert (dmy_num >= 1) ;
2413  assert (dmy_num <= 1700) ;
2414  calib[dmy_num-1] = dmy_calib ;
2415  calib_status[dmy_num-1] = dmy_status ;
2416 
2417 // edm::LogInfo ("EcalTrivialConditionRetriever")
2418 // << "[PIETRO] cry = " << dmy_num
2419 // << " calib = " << calib[dmy_num-1]
2420 // << " RMS = " << dmy_RMS
2421 // << " events = " << dmy_events
2422 // << " status = " << calib_status[dmy_num-1]
2423 // << std::endl ;
2424  }
2425 
2426  fclose (inpFile) ; // close inp. file
2427  edm::LogInfo ("EcalTrivialConditionRetriever") << "Read timeCalibrations for " << ii << " xtals " ;
2428  if (ii!=1700) edm::LogWarning ("StoreEcalCondition")
2429  << "Some crystals missing, set to 1" << std::endl ;
2430 
2431  // Transfer the data to the inter-calibration coefficients container
2432  // -----------------------------------------------------------------
2433 
2434  // DB supermodule always set to 1 for the TestBeam FIXME
2435  int sm_db=1 ;
2436  // loop over channels
2437  for (int i=0 ; i<1700 ; i++)
2438  {
2439  //if (EBDetId::validDetId(iEta,iPhi)) {
2440  // CANNOT be used -- validDetId only checks ETA PHI method
2441  // doing a check by hand, here is the only place in CMSSW
2442  // outside TB code and EcalRawToDigi where needed
2443  // => no need for changing the DetId interface
2444  //
2445  // checking only sm_db -- guess can change with the above FIXME
2446  if (sm_db >= EBDetId::MIN_SM && sm_db <= EBDetId::MAX_SM) {
2447  EBDetId ebid (sm_db,i+1,EBDetId::SMCRYSTALMODE) ;
2448  if (calib_status[i]) ical->setValue (ebid.rawId (), calib[i]) ;
2449  else ical->setValue (ebid.rawId (), 1.) ;
2450  }
2451  //}
2452  } // loop over channels
2453 
2454 // edm::LogInfo ("EcalTrivialConditionRetriever") << "INTERCALIBRATION DONE" ;
2455  return ical;
2456 }
int i
Definition: DBlmapReader.cc:9
static const int MIN_SM
Definition: EBDetId.h:131
MVATrainerComputer * calib
Definition: MVATrainer.cc:64
EcalTimeCalibConstantMap EcalTimeCalibConstants
static const int MAX_SM
Definition: EBDetId.h:132
static const int SMCRYSTALMODE
Definition: EBDetId.h:146
std::auto_ptr< EcalTimeCalibErrors > EcalTrivialConditionRetriever::getTimeCalibErrorsFromConfiguration ( const EcalTimeCalibErrorsRcd )
virtual

Definition at line 2461 of file EcalTrivialConditionRetriever.cc.

References calib, edm::hlt::Exception, i, geometryCSVtoXML::line, EBDetId::MAX_SM, EBDetId::MIN_SM, DetId::rawId(), and EBDetId::SMCRYSTALMODE.

Referenced by EcalTrivialConditionRetriever().

2462 {
2463  std::auto_ptr<EcalTimeCalibErrors> ical =
2464  std::auto_ptr<EcalTimeCalibErrors>( new EcalTimeCalibErrors() );
2465 
2466  // Read the values from a txt file
2467  // -------------------------------
2468 
2469  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading timeCalibration constants from file "
2470  << timeCalibErrorsFile_.c_str() ;
2471 
2472  FILE *inpFile ;
2473  inpFile = fopen (timeCalibErrorsFile_.c_str (),"r") ;
2474  if (!inpFile)
2475  {
2476  edm::LogError ("EcalTrivialConditionRetriever")
2477  << "*** Can not open file: " << timeCalibErrorsFile_ ;
2478  throw cms::Exception ("Cannot open inter-calibration coefficients txt file") ;
2479  }
2480 
2481  char line[256] ;
2482  std::ostringstream str ;
2483  fgets (line,255,inpFile) ;
2484  int sm_number=atoi (line) ;
2485  str << "sm: " << sm_number ;
2486 
2487  fgets (line,255,inpFile) ;
2488  //int nevents=atoi (line) ; // not necessary here just for online conddb
2489 
2490  fgets (line,255,inpFile) ;
2491  std::string gen_tag = line ;
2492  str << "gen tag: " << gen_tag ; // should I use this?
2493 
2494  fgets (line,255,inpFile) ;
2495  std::string cali_method = line ;
2496  str << "cali method: " << cali_method << std::endl ; // not important
2497 
2498  fgets (line,255,inpFile) ;
2499  std::string cali_version = line ;
2500  str << "cali version: " << cali_version << std::endl ; // not important
2501 
2502  fgets (line,255,inpFile) ;
2503  std::string cali_type = line ;
2504  str << "cali type: " << cali_type ; // not important
2505 
2506  edm::LogInfo("EcalTrivialConditionRetriever")
2507  << "TimeCalibration file - "
2508  << str.str () << std::endl ;
2509 
2510  float calib[1700]={1} ;
2511  int calib_status[1700]={0} ;
2512 
2513  int ii = 0 ;
2514 
2515  while (fgets (line,255,inpFile))
2516  {
2517  ii++;
2518  int dmy_num = 0 ;
2519  float dmy_calib = 0. ;
2520  float dmy_RMS = 0. ;
2521  int dmy_events = 0 ;
2522  int dmy_status = 0 ;
2523  sscanf (line, "%d %f %f %d %d", &dmy_num, &dmy_calib,
2524  &dmy_RMS, &dmy_events,
2525  &dmy_status) ;
2526  assert (dmy_num >= 1) ;
2527  assert (dmy_num <= 1700) ;
2528  calib[dmy_num-1] = dmy_calib ;
2529  calib_status[dmy_num-1] = dmy_status ;
2530 
2531 // edm::LogInfo ("EcalTrivialConditionRetriever")
2532 // << "[PIETRO] cry = " << dmy_num
2533 // << " calib = " << calib[dmy_num-1]
2534 // << " RMS = " << dmy_RMS
2535 // << " events = " << dmy_events
2536 // << " status = " << calib_status[dmy_num-1]
2537 // << std::endl ;
2538  }
2539 
2540  fclose (inpFile) ; // close inp. file
2541  edm::LogInfo ("EcalTrivialConditionRetriever") << "Read time calibrations for " << ii << " xtals " ;
2542  if (ii!=1700) edm::LogWarning ("StoreEcalCondition")
2543  << "Some crystals missing, set to 1" << std::endl ;
2544 
2545  // Transfer the data to the inter-calibration coefficients container
2546  // -----------------------------------------------------------------
2547 
2548  // DB supermodule always set to 1 for the TestBeam FIXME
2549  int sm_db=1 ;
2550  // loop over channels
2551  for (int i=0 ; i<1700 ; i++)
2552  {
2553  //if (EBDetId::validDetId(iEta,iPhi)) {
2554  // CANNOT be used -- validDetId only checks ETA PHI method
2555  // doing a check by hand, here is the only place in CMSSW
2556  // outside TB code and EcalRawToDigi where needed
2557  // => no need for changing the DetId interface
2558  //
2559  // checking only sm_db -- guess can change with the above FIXME
2560  if (sm_db >= EBDetId::MIN_SM && sm_db <= EBDetId::MAX_SM) {
2561  EBDetId ebid (sm_db,i+1,EBDetId::SMCRYSTALMODE) ;
2562  if (calib_status[i]) ical->setValue (ebid.rawId (), calib[i]) ;
2563  else ical->setValue (ebid.rawId (), 1.) ;
2564  }
2565  //}
2566  } // loop over channels
2567 
2568 // edm::LogInfo ("EcalTrivialConditionRetriever") << "INTERCALIBRATION DONE" ;
2569  return ical;
2570 }
int i
Definition: DBlmapReader.cc:9
EcalTimeCalibErrorMap EcalTimeCalibErrors
static const int MIN_SM
Definition: EBDetId.h:131
MVATrainerComputer * calib
Definition: MVATrainer.cc:64
static const int MAX_SM
Definition: EBDetId.h:132
static const int SMCRYSTALMODE
Definition: EBDetId.h:146
std::auto_ptr< EcalTPGCrystalStatus > EcalTrivialConditionRetriever::getTrgChannelStatusFromConfiguration ( const EcalTPGCrystalStatusRcd )
virtual

Definition at line 1989 of file EcalTrivialConditionRetriever.cc.

References edm::hlt::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, ntuplemaker::status, EBDetId::unhashIndex(), EEDetId::unhashIndex(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

1990 {
1991  std::auto_ptr<EcalTPGCrystalStatus> ecalStatus = std::auto_ptr<EcalTPGCrystalStatus>( new EcalTPGCrystalStatus() );
1992 
1993 
1994  // start by setting all statuses to 0
1995 
1996  // barrel
1997  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
1998  if(ieta==0) continue;
1999  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
2000  if (EBDetId::validDetId(ieta,iphi)) {
2001  EBDetId ebid(ieta,iphi);
2002  ecalStatus->setValue( ebid, 0 );
2003  }
2004  }
2005  }
2006  // endcap
2007  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
2008  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
2009  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
2010  if (EEDetId::validDetId(iX,iY,1)) {
2011  EEDetId eedetidpos(iX,iY,1);
2012  ecalStatus->setValue( eedetidpos, 0 );
2013  }
2014  if (EEDetId::validDetId(iX,iY,-1)) {
2015  EEDetId eedetidneg(iX,iY,-1);
2016  ecalStatus->setValue( eedetidneg, 0 );
2017  }
2018  }
2019  }
2020 
2021 
2022 
2023  // overwrite the statuses which are in the file
2024 
2025  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading channel statuses from file " << edm::FileInPath(channelStatusFile_).fullPath().c_str() ;
2026  std::ifstream statusFile(edm::FileInPath(channelStatusFile_).fullPath().c_str());
2027  if ( !statusFile.good() ) {
2028  edm::LogError ("EcalTrivialConditionRetriever")
2029  << "*** Problems opening file: " << channelStatusFile_ ;
2030  throw cms::Exception ("Cannot open ECAL channel status file") ;
2031  }
2032 
2033  std::string EcalSubDet;
2034  std::string str;
2035  int hashIndex(0);
2036  int status(0);
2037 
2038  while (!statusFile.eof())
2039  {
2040  statusFile >> EcalSubDet;
2041  if (EcalSubDet!=std::string("EB") && EcalSubDet!=std::string("EE"))
2042  {
2043  std::getline(statusFile,str);
2044  continue;
2045  }
2046  else
2047  {
2048  statusFile>> hashIndex >> status;
2049  }
2050  // std::cout << EcalSubDet << " " << hashIndex << " " << status;
2051 
2052  if(EcalSubDet==std::string("EB"))
2053  {
2054  EBDetId ebid = EBDetId::unhashIndex(hashIndex);
2055  ecalStatus->setValue( ebid, status );
2056  }
2057  else if(EcalSubDet==std::string("EE"))
2058  {
2059  EEDetId eedetid = EEDetId::unhashIndex(hashIndex);
2060  ecalStatus->setValue( eedetid, status );
2061  }
2062  else
2063  {
2064  edm::LogError ("EcalTrivialConditionRetriever")
2065  << " *** " << EcalSubDet << " is neither EB nor EE ";
2066  }
2067 
2068  }
2069  // the file is supposed to be in the form -- FIXME
2070 
2071 
2072  statusFile.close();
2073  return ecalStatus;
2074 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
static const int MIN_IPHI
Definition: EBDetId.h:121
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:115
static const int IX_MIN
Definition: EEDetId.h:271
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const int IY_MIN
Definition: EEDetId.h:275
EcalTPGCrystalStatusMap EcalTPGCrystalStatus
static const int IX_MAX
Definition: EEDetId.h:279
static const int MAX_IPHI
Definition: EBDetId.h:123
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.cc:12
static const int MAX_IETA
Definition: EBDetId.h:122
static const int IY_MAX
Definition: EEDetId.h:283
std::string fullPath() const
Definition: FileInPath.cc:171
tuple status
Definition: ntuplemaker.py:245
void EcalTrivialConditionRetriever::getWeightsFromConfiguration ( const edm::ParameterSet ps)
private

Definition at line 1095 of file EcalTrivialConditionRetriever.cc.

References begin, edm::hlt::Exception, edm::FileInPath::fullPath(), edm::ParameterSet::getUntrackedParameter(), i, j, prof2calltree::l, and findQualityFiles::size.

1096 {
1097 
1098  std::vector < std::vector<double> > amplwgtv(nTDCbins_);
1099 
1100  if (!getWeightsFromFile_ && nTDCbins_ == 1)
1101  {
1102  std::vector<double> vampl;
1103  //As default using simple 3+1 weights
1104  vampl.push_back( -0.33333 );
1105  vampl.push_back( -0.33333 );
1106  vampl.push_back( -0.33333 );
1107  vampl.push_back( 0. );
1108  vampl.push_back( 0. );
1109  vampl.push_back( 1. );
1110  vampl.push_back( 0. );
1111  vampl.push_back( 0. );
1112  vampl.push_back( 0. );
1113  vampl.push_back( 0. );
1114  amplwgtv[0]= ps.getUntrackedParameter< std::vector<double> >("amplWeights", vampl);
1115  }
1116  else if (getWeightsFromFile_)
1117  {
1118  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading amplitude weights from file " << edm::FileInPath(amplWeightsFile_).fullPath().c_str() ;
1119  std::ifstream amplFile(edm::FileInPath(amplWeightsFile_).fullPath().c_str());
1120  int tdcBin=0;
1121  while (!amplFile.eof() && tdcBin < nTDCbins_)
1122  {
1123  for(int j = 0; j < 10; ++j) {
1124  float ww;
1125  amplFile >> ww;
1126  amplwgtv[tdcBin].push_back(ww);
1127  }
1128  ++tdcBin;
1129  }
1130  assert (tdcBin == nTDCbins_);
1131  //Read from file
1132  }
1133  else
1134  {
1135  //Not supported
1136  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1137  throw cms::Exception("WrongConfig");
1138  }
1139 
1140 
1141  for (int i=0;i<nTDCbins_;i++)
1142  {
1143  assert(amplwgtv[i].size() == 10);
1144  int j=0;
1145  for(std::vector<double>::const_iterator it = amplwgtv[i].begin(); it != amplwgtv[i].end(); ++it)
1146  {
1147  (amplWeights_[i])[j]=*it;
1148  j++;
1149  }
1150  }
1151 
1152 
1153  std::vector < std::vector<double> > amplwgtvAftGain(nTDCbins_);
1154 
1155  if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1156  {
1157  std::vector<double> vamplAftGain;
1158  vamplAftGain.push_back( 0. );
1159  vamplAftGain.push_back( 0. );
1160  vamplAftGain.push_back( 0. );
1161  vamplAftGain.push_back( 0. );
1162  vamplAftGain.push_back( 0. );
1163  vamplAftGain.push_back( 1. );
1164  vamplAftGain.push_back( 0. );
1165  vamplAftGain.push_back( 0. );
1166  vamplAftGain.push_back( 0. );
1167  vamplAftGain.push_back( 0. );
1168  amplwgtvAftGain[0] = ps.getUntrackedParameter< std::vector<double> >("amplWeightsAftGain", vamplAftGain);
1169  }
1170  else if (getWeightsFromFile_)
1171  {
1172  //Read from file
1173  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading amplitude weights aftre gain switch from file " << edm::FileInPath(amplWeightsAftFile_).fullPath().c_str() ;
1174  std::ifstream amplFile(edm::FileInPath(amplWeightsAftFile_).fullPath().c_str());
1175  int tdcBin=0;
1176  while (!amplFile.eof() && tdcBin < nTDCbins_)
1177  {
1178  for(int j = 0; j < 10; ++j) {
1179  float ww;
1180  amplFile >> ww;
1181  amplwgtvAftGain[tdcBin].push_back(ww);
1182  }
1183  ++tdcBin;
1184  }
1185  assert (tdcBin == nTDCbins_);
1186  }
1187  else
1188  {
1189  //Not supported
1190  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1191  throw cms::Exception("WrongConfig");
1192  }
1193 
1194  for (int i=0;i<nTDCbins_;i++)
1195  {
1196  assert(amplwgtvAftGain[i].size() == 10);
1197  int j=0;
1198  for(std::vector<double>::const_iterator it = amplwgtvAftGain[i].begin(); it != amplwgtvAftGain[i].end(); ++it) {
1199  (amplWeightsAft_[i])[j]=*it;
1200  j++;
1201  }
1202  }
1203 
1204  // default weights to reco amplitude w/o pedestal subtraction
1205 
1206  std::vector< std::vector<double> > pedwgtv(nTDCbins_);
1207 
1208  if (!getWeightsFromFile_ && nTDCbins_ == 1)
1209  {
1210  std::vector<double> vped;
1211  vped.push_back( 0.33333 );
1212  vped.push_back( 0.33333 );
1213  vped.push_back( 0.33333 );
1214  vped.push_back( 0. );
1215  vped.push_back( 0. );
1216  vped.push_back( 0. );
1217  vped.push_back( 0. );
1218  vped.push_back( 0. );
1219  vped.push_back( 0. );
1220  vped.push_back( 0. );
1221  pedwgtv[0] = ps.getUntrackedParameter< std::vector<double> >("pedWeights", vped);
1222  }
1223  else if (getWeightsFromFile_)
1224  {
1225  //Read from file
1226  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading pedestal weights from file " << edm::FileInPath(pedWeightsFile_).fullPath().c_str() ;
1227  std::ifstream pedFile(edm::FileInPath(pedWeightsFile_).fullPath().c_str());
1228  int tdcBin=0;
1229  while (!pedFile.eof() && tdcBin < nTDCbins_)
1230  {
1231  for(int j = 0; j < 10; ++j) {
1232  float ww;
1233  pedFile >> ww;
1234  pedwgtv[tdcBin].push_back(ww);
1235  }
1236  ++tdcBin;
1237  }
1238  assert (tdcBin == nTDCbins_);
1239  }
1240  else
1241  {
1242  //Not supported
1243  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1244  throw cms::Exception("WrongConfig");
1245  }
1246 
1247  for (int i=0;i<nTDCbins_;i++)
1248  {
1249  assert(pedwgtv[i].size() == 10);
1250  int j=0;
1251  for(std::vector<double>::const_iterator it = pedwgtv[i].begin(); it != pedwgtv[i].end(); ++it) {
1252  (pedWeights_[i])[j] = *it;
1253  j++;
1254  }
1255  }
1256 
1257  std::vector< std::vector<double> > pedwgtvaft(nTDCbins_);
1258 
1259  if (!getWeightsFromFile_ && nTDCbins_ == 1)
1260  {
1261  std::vector<double> vped;
1262  vped.push_back( 0. );
1263  vped.push_back( 0. );
1264  vped.push_back( 0. );
1265  vped.push_back( 0. );
1266  vped.push_back( 0. );
1267  vped.push_back( 0. );
1268  vped.push_back( 0. );
1269  vped.push_back( 0. );
1270  vped.push_back( 0. );
1271  vped.push_back( 0. );
1272  pedwgtvaft[0] = ps.getUntrackedParameter< std::vector<double> >("pedWeightsAft", vped);
1273  }
1274  else if (getWeightsFromFile_)
1275  {
1276  //Read from file
1277  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading pedestal after gain switch weights from file " << edm::FileInPath(pedWeightsAftFile_).fullPath().c_str() ;
1278  std::ifstream pedFile(edm::FileInPath(pedWeightsAftFile_).fullPath().c_str());
1279  int tdcBin=0;
1280  while (!pedFile.eof() && tdcBin < nTDCbins_)
1281  {
1282  for(int j = 0; j < 10; ++j) {
1283  float ww;
1284  pedFile >> ww;
1285  pedwgtvaft[tdcBin].push_back(ww);
1286  }
1287  ++tdcBin;
1288  }
1289  assert (tdcBin == nTDCbins_);
1290  }
1291  else
1292  {
1293  //Not supported
1294  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1295  throw cms::Exception("WrongConfig");
1296  }
1297 
1298  for (int i=0;i<nTDCbins_;i++)
1299  {
1300  assert(pedwgtvaft[i].size() == 10);
1301  int j=0;
1302  for(std::vector<double>::const_iterator it = pedwgtvaft[i].begin(); it != pedwgtvaft[i].end(); ++it) {
1303  (pedWeightsAft_[i])[j]=*it;
1304  j++;
1305  }
1306  }
1307 
1308 
1309 
1310  // default weights to reco jitter
1311 
1312  std::vector< std::vector<double> > jittwgtv(nTDCbins_);
1313 
1314  if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1315  {
1316  std::vector<double> vjitt;
1317  vjitt.push_back( 0.04066309 );
1318  vjitt.push_back( 0.04066309 );
1319  vjitt.push_back( 0.04066309 );
1320  vjitt.push_back( 0.000 );
1321  vjitt.push_back( 1.325176 );
1322  vjitt.push_back( -0.04997078 );
1323  vjitt.push_back( -0.504338 );
1324  vjitt.push_back( -0.5024844 );
1325  vjitt.push_back( -0.3903718 );
1326  vjitt.push_back( 0.000 );
1327  jittwgtv[0] = ps.getUntrackedParameter< std::vector<double> >("jittWeights", vjitt);
1328  }
1329  else if (getWeightsFromFile_)
1330  {
1331  //Read from file
1332  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading jitter weights from file " << edm::FileInPath(jittWeightsFile_).fullPath().c_str() ;
1333  std::ifstream jittFile(edm::FileInPath(jittWeightsFile_).fullPath().c_str());
1334  int tdcBin=0;
1335  while (!jittFile.eof() && tdcBin < nTDCbins_)
1336  {
1337  for(int j = 0; j < 10; ++j) {
1338  float ww;
1339  jittFile >> ww;
1340  jittwgtv[tdcBin].push_back(ww);
1341  }
1342  ++tdcBin;
1343  }
1344  assert (tdcBin == nTDCbins_);
1345  }
1346  else
1347  {
1348  //Not supported
1349  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1350  throw cms::Exception("WrongConfig");
1351  }
1352 
1353  for (int i=0;i<nTDCbins_;i++)
1354  {
1355  assert(jittwgtv[i].size() == 10);
1356  int j=0;
1357  for(std::vector<double>::const_iterator it = jittwgtv[i].begin(); it != jittwgtv[i].end(); ++it) {
1358  (jittWeights_[i])[j]= *it;
1359  j++;
1360  }
1361  }
1362 
1363  std::vector< std::vector<double> > jittwgtvaft(nTDCbins_);
1364 
1365  if (!getWeightsFromFile_ && nTDCbins_ == 1)
1366  {
1367  std::vector<double> vjitt;
1368  vjitt.push_back( 0. );
1369  vjitt.push_back( 0. );
1370  vjitt.push_back( 0. );
1371  vjitt.push_back( 0. );
1372  vjitt.push_back( 1.097871 );
1373  vjitt.push_back( -0.04551035 );
1374  vjitt.push_back( -0.4159156 );
1375  vjitt.push_back( -0.4185352 );
1376  vjitt.push_back( -0.3367127 );
1377  vjitt.push_back( 0. );
1378  jittwgtvaft[0] = ps.getUntrackedParameter< std::vector<double> >("jittWeightsAft", vjitt);
1379  }
1380  else if (getWeightsFromFile_)
1381  {
1382  //Read from file
1383  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading jitter after gain switch weights from file " << edm::FileInPath(jittWeightsAftFile_).fullPath().c_str() ;
1384  std::ifstream jittFile(edm::FileInPath(jittWeightsAftFile_).fullPath().c_str());
1385  int tdcBin=0;
1386  while (!jittFile.eof() && tdcBin < nTDCbins_)
1387  {
1388  for(int j = 0; j < 10; ++j) {
1389  float ww;
1390  jittFile >> ww;
1391  jittwgtvaft[tdcBin].push_back(ww);
1392  }
1393  ++tdcBin;
1394  }
1395  assert (tdcBin == nTDCbins_);
1396  }
1397  else
1398  {
1399  //Not supported
1400  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1401  throw cms::Exception("WrongConfig");
1402  }
1403 
1404  for (int i=0;i<nTDCbins_;i++)
1405  {
1406  assert(jittwgtvaft[i].size() == 10);
1407  int j=0;
1408  for(std::vector<double>::const_iterator it = jittwgtvaft[i].begin(); it != jittwgtvaft[i].end(); ++it) {
1409  (jittWeightsAft_[i])[j]= *it;
1410  j++;
1411  }
1412  }
1413 
1414 
1415  std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix(nTDCbins_);
1416  if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1417  {
1418  // chi2Matrix[0].resize(10);
1419  // for (int i=0;i<10;i++)
1420  // chi2Matrix[0][i].resize(10);
1421 
1422  chi2Matrix[0](0,0) = 0.694371;
1423  chi2Matrix[0](0,1) = -0.305629;
1424  chi2Matrix[0](0,2) = -0.305629;
1425  chi2Matrix[0](0,3) = 0.;
1426  chi2Matrix[0](0,4) = 0.;
1427  chi2Matrix[0](0,5) = 0.;
1428  chi2Matrix[0](0,6) = 0.;
1429  chi2Matrix[0](0,7) = 0.;
1430  chi2Matrix[0](0,8) = 0.;
1431  chi2Matrix[0](0,9) = 0.;
1432  chi2Matrix[0](1,0) = -0.305629;
1433  chi2Matrix[0](1,1) = 0.694371;
1434  chi2Matrix[0](1,2) = -0.305629;
1435  chi2Matrix[0](1,3) = 0.;
1436  chi2Matrix[0](1,4) = 0.;
1437  chi2Matrix[0](1,5) = 0.;
1438  chi2Matrix[0](1,6) = 0.;
1439  chi2Matrix[0](1,7) = 0.;
1440  chi2Matrix[0](1,8) = 0.;
1441  chi2Matrix[0](1,9) = 0.;
1442  chi2Matrix[0](2,0) = -0.305629;
1443  chi2Matrix[0](2,1) = -0.305629;
1444  chi2Matrix[0](2,2) = 0.694371;
1445  chi2Matrix[0](2,3) = 0.;
1446  chi2Matrix[0](2,4) = 0.;
1447  chi2Matrix[0](2,5) = 0.;
1448  chi2Matrix[0](2,6) = 0.;
1449  chi2Matrix[0](2,7) = 0.;
1450  chi2Matrix[0](2,8) = 0.;
1451  chi2Matrix[0](2,9) = 0.;
1452  chi2Matrix[0](3,0) = 0.;
1453  chi2Matrix[0](3,1) = 0.;
1454  chi2Matrix[0](3,2) = 0.;
1455  chi2Matrix[0](3,3) = 0.;
1456  chi2Matrix[0](3,4) = 0.;
1457  chi2Matrix[0](3,5) = 0.;
1458  chi2Matrix[0](3,6) = 0.;
1459  chi2Matrix[0](3,7) = 0.;
1460  chi2Matrix[0](3,8) = 0.;
1461  chi2Matrix[0](3,9) = 0.;
1462  chi2Matrix[0](4,0) = 0.;
1463  chi2Matrix[0](4,1) = 0.;
1464  chi2Matrix[0](4,2) = 0.;
1465  chi2Matrix[0](4,3) = 0.;
1466  chi2Matrix[0](4,4) = 0.8027116;
1467  chi2Matrix[0](4,5) = -0.2517103;
1468  chi2Matrix[0](4,6) = -0.2232882;
1469  chi2Matrix[0](4,7) = -0.1716192;
1470  chi2Matrix[0](4,8) = -0.1239006;
1471  chi2Matrix[0](4,9) = 0.;
1472  chi2Matrix[0](5,0) = 0.;
1473  chi2Matrix[0](5,1) = 0.;
1474  chi2Matrix[0](5,2) = 0.;
1475  chi2Matrix[0](5,3) = 0.;
1476  chi2Matrix[0](5,4) = -0.2517103;
1477  chi2Matrix[0](5,5) = 0.6528964;
1478  chi2Matrix[0](5,6) = -0.2972839;
1479  chi2Matrix[0](5,7) = -0.2067162;
1480  chi2Matrix[0](5,8) = -0.1230729;
1481  chi2Matrix[0](5,9) = 0.;
1482  chi2Matrix[0](6,0) = 0.;
1483  chi2Matrix[0](6,1) = 0.;
1484  chi2Matrix[0](6,2) = 0.;
1485  chi2Matrix[0](6,3) = 0.;
1486  chi2Matrix[0](6,4) = -0.2232882;
1487  chi2Matrix[0](6,5) = -0.2972839;
1488  chi2Matrix[0](6,6) = 0.7413607;
1489  chi2Matrix[0](6,7) = -0.1883866;
1490  chi2Matrix[0](6,8) = -0.1235052;
1491  chi2Matrix[0](6,9) = 0.;
1492  chi2Matrix[0](7,0) = 0.;
1493  chi2Matrix[0](7,1) = 0.;
1494  chi2Matrix[0](7,2) = 0.;
1495  chi2Matrix[0](7,3) = 0.;
1496  chi2Matrix[0](7,4) = -0.1716192;
1497  chi2Matrix[0](7,5) = -0.2067162;
1498  chi2Matrix[0](7,6) = -0.1883866;
1499  chi2Matrix[0](7,7) = 0.844935;
1500  chi2Matrix[0](7,8) = -0.124291;
1501  chi2Matrix[0](7,9) = 0.;
1502  chi2Matrix[0](8,0) = 0.;
1503  chi2Matrix[0](8,1) = 0.;
1504  chi2Matrix[0](8,2) = 0.;
1505  chi2Matrix[0](8,3) = 0.;
1506  chi2Matrix[0](8,4) = -0.1239006;
1507  chi2Matrix[0](8,5) = -0.1230729;
1508  chi2Matrix[0](8,6) = -0.1235052;
1509  chi2Matrix[0](8,7) = -0.124291;
1510  chi2Matrix[0](8,8) = 0.8749833;
1511  chi2Matrix[0](8,9) = 0.;
1512  chi2Matrix[0](9,0) = 0.;
1513  chi2Matrix[0](9,1) = 0.;
1514  chi2Matrix[0](9,2) = 0.;
1515  chi2Matrix[0](9,3) = 0.;
1516  chi2Matrix[0](9,4) = 0.;
1517  chi2Matrix[0](9,5) = 0.;
1518  chi2Matrix[0](9,6) = 0.;
1519  chi2Matrix[0](9,7) = 0.;
1520  chi2Matrix[0](9,8) = 0.;
1521  chi2Matrix[0](9,9) = 0.;
1522  }
1523  else if (getWeightsFromFile_)
1524  {
1525  //Read from file
1526  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading chi2Matrix from file " << edm::FileInPath(chi2MatrixFile_).fullPath().c_str() ;
1527  std::ifstream chi2MatrixFile(edm::FileInPath(chi2MatrixFile_).fullPath().c_str());
1528  int tdcBin=0;
1529  while (!chi2MatrixFile.eof() && tdcBin < nTDCbins_)
1530  {
1531  // chi2Matrix[tdcBin].resize(10);
1532  for(int j = 0; j < 10; ++j) {
1533  for(int l = 0; l < 10; ++l) {
1534  float ww;
1535  chi2MatrixFile >> ww;
1536  chi2Matrix[tdcBin](j,l)=ww;
1537  }
1538  }
1539  ++tdcBin;
1540  }
1541  assert (tdcBin == nTDCbins_);
1542  }
1543  else
1544  {
1545  //Not supported
1546  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1547  throw cms::Exception("WrongConfig");
1548  }
1549 
1550 // for (int i=0;i<nTDCbins_;i++)
1551 // {
1552  // assert(chi2Matrix[i].size() == 10);
1553  chi2Matrix_ = chi2Matrix;
1554 // }
1555 
1556  std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2MatrixAft(nTDCbins_);
1557  if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1558  {
1559  // chi2MatrixAft[0].resize(10);
1560  // for (int i=0;i<10;i++)
1561  // chi2MatrixAft[0][i].resize(10);
1562 
1563  chi2MatrixAft[0](0,0) = 0.;
1564  chi2MatrixAft[0](0,1) = 0.;
1565  chi2MatrixAft[0](0,2) = 0.;
1566  chi2MatrixAft[0](0,3) = 0.;
1567  chi2MatrixAft[0](0,4) = 0.;
1568  chi2MatrixAft[0](0,5) = 0.;
1569  chi2MatrixAft[0](0,6) = 0.;
1570  chi2MatrixAft[0](0,7) = 0.;
1571  chi2MatrixAft[0](0,8) = 0.;
1572  chi2MatrixAft[0](0,9) = 0.;
1573  chi2MatrixAft[0](1,0) = 0.;
1574  chi2MatrixAft[0](1,1) = 0.;
1575  chi2MatrixAft[0](1,2) = 0.;
1576  chi2MatrixAft[0](1,3) = 0.;
1577  chi2MatrixAft[0](1,4) = 0.;
1578  chi2MatrixAft[0](1,5) = 0.;
1579  chi2MatrixAft[0](1,6) = 0.;
1580  chi2MatrixAft[0](1,7) = 0.;
1581  chi2MatrixAft[0](1,8) = 0.;
1582  chi2MatrixAft[0](1,9) = 0.;
1583  chi2MatrixAft[0](2,0) = 0.;
1584  chi2MatrixAft[0](2,1) = 0.;
1585  chi2MatrixAft[0](2,2) = 0.;
1586  chi2MatrixAft[0](2,3) = 0.;
1587  chi2MatrixAft[0](2,4) = 0.;
1588  chi2MatrixAft[0](2,5) = 0.;
1589  chi2MatrixAft[0](2,6) = 0.;
1590  chi2MatrixAft[0](2,7) = 0.;
1591  chi2MatrixAft[0](2,8) = 0.;
1592  chi2MatrixAft[0](2,9) = 0.;
1593  chi2MatrixAft[0](3,0) = 0.;
1594  chi2MatrixAft[0](3,1) = 0.;
1595  chi2MatrixAft[0](3,2) = 0.;
1596  chi2MatrixAft[0](3,3) = 0.;
1597  chi2MatrixAft[0](3,4) = 0.;
1598  chi2MatrixAft[0](3,5) = 0.;
1599  chi2MatrixAft[0](3,6) = 0.;
1600  chi2MatrixAft[0](3,7) = 0.;
1601  chi2MatrixAft[0](3,8) = 0.;
1602  chi2MatrixAft[0](3,9) = 0.;
1603  chi2MatrixAft[0](4,0) = 0.;
1604  chi2MatrixAft[0](4,1) = 0.;
1605  chi2MatrixAft[0](4,2) = 0.;
1606  chi2MatrixAft[0](4,3) = 0.;
1607  chi2MatrixAft[0](4,4) = 0.8030884;
1608  chi2MatrixAft[0](4,5) = -0.2543541;
1609  chi2MatrixAft[0](4,6) = -0.2243544;
1610  chi2MatrixAft[0](4,7) = -0.1698177;
1611  chi2MatrixAft[0](4,8) = -0.1194506;
1612  chi2MatrixAft[0](4,9) = 0.;
1613  chi2MatrixAft[0](5,0) = 0.;
1614  chi2MatrixAft[0](5,1) = 0.;
1615  chi2MatrixAft[0](5,2) = 0.;
1616  chi2MatrixAft[0](5,3) = 0.;
1617  chi2MatrixAft[0](5,4) = -0.2543541;
1618  chi2MatrixAft[0](5,5) = 0.6714465;
1619  chi2MatrixAft[0](5,6) = -0.2898025;
1620  chi2MatrixAft[0](5,7) = -0.2193564;
1621  chi2MatrixAft[0](5,8) = -0.1542964;
1622  chi2MatrixAft[0](5,9) = 0.;
1623  chi2MatrixAft[0](6,0) = 0.;
1624  chi2MatrixAft[0](6,1) = 0.;
1625  chi2MatrixAft[0](6,2) = 0.;
1626  chi2MatrixAft[0](6,3) = 0.;
1627  chi2MatrixAft[0](6,4) = -0.2243544;
1628  chi2MatrixAft[0](6,5) = -0.2898025;
1629  chi2MatrixAft[0](6,6) = 0.7443781;
1630  chi2MatrixAft[0](6,7) = -0.1934846;
1631  chi2MatrixAft[0](6,8) = -0.136098;
1632  chi2MatrixAft[0](6,9) = 0.;
1633  chi2MatrixAft[0](7,0) = 0.;
1634  chi2MatrixAft[0](7,1) = 0.;
1635  chi2MatrixAft[0](7,2) = 0.;
1636  chi2MatrixAft[0](7,3) = 0.;
1637  chi2MatrixAft[0](7,4) = -0.1698177;
1638  chi2MatrixAft[0](7,5) = -0.2193564;
1639  chi2MatrixAft[0](7,6) = -0.1934846;
1640  chi2MatrixAft[0](7,7) = 0.8535482;
1641  chi2MatrixAft[0](7,8) = -0.1030149;
1642  chi2MatrixAft[0](7,9) = 0.;
1643  chi2MatrixAft[0](8,0) = 0.;
1644  chi2MatrixAft[0](8,1) = 0.;
1645  chi2MatrixAft[0](8,2) = 0.;
1646  chi2MatrixAft[0](8,3) = 0.;
1647  chi2MatrixAft[0](8,4) = -0.1194506;
1648  chi2MatrixAft[0](8,5) = -0.1542964;
1649  chi2MatrixAft[0](8,6) = -0.136098;
1650  chi2MatrixAft[0](8,7) = -0.1030149;
1651  chi2MatrixAft[0](8,8) = 0.9275388;
1652  chi2MatrixAft[0](8,9) = 0.;
1653  chi2MatrixAft[0](9,0) = 0.;
1654  chi2MatrixAft[0](9,1) = 0.;
1655  chi2MatrixAft[0](9,2) = 0.;
1656  chi2MatrixAft[0](9,3) = 0.;
1657  chi2MatrixAft[0](9,4) = 0.;
1658  chi2MatrixAft[0](9,5) = 0.;
1659  chi2MatrixAft[0](9,6) = 0.;
1660  chi2MatrixAft[0](9,7) = 0.;
1661  chi2MatrixAft[0](9,8) = 0.;
1662  chi2MatrixAft[0](9,9) = 0.;
1663  }
1664  else if (getWeightsFromFile_)
1665  {
1666  //Read from file
1667  edm::LogInfo("EcalTrivialConditionRetriever") << "Reading chi2MatrixAft from file " << edm::FileInPath(chi2MatrixAftFile_).fullPath().c_str() ;
1668  std::ifstream chi2MatrixAftFile(edm::FileInPath(chi2MatrixAftFile_).fullPath().c_str());
1669  int tdcBin=0;
1670  while (!chi2MatrixAftFile.eof() && tdcBin < nTDCbins_)
1671  {
1672  // chi2MatrixAft[tdcBin].resize(10);
1673  for(int j = 0; j < 10; ++j) {
1674  for(int l = 0; l < 10; ++l) {
1675  float ww;
1676  chi2MatrixAftFile >> ww;
1677  chi2MatrixAft[tdcBin](j,l)=ww;
1678  }
1679  }
1680  ++tdcBin;
1681  }
1682  assert (tdcBin == nTDCbins_);
1683  }
1684  else
1685  {
1686  //Not supported
1687  edm::LogError("EcalTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
1688  throw cms::Exception("WrongConfig");
1689  }
1690 
1691 // for (int i=0;i<nTDCbins_;i++)
1692 // {
1693  // assert(chi2MatrixAft[i].size() == 10);
1694  chi2MatrixAft_ = chi2MatrixAft;
1695  // }
1696 
1697 }
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeightsAft_
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > pedWeightsAft_
int j
Definition: DBlmapReader.cc:9
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:31
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > amplWeightsAft_
std::string fullPath() const
Definition: FileInPath.cc:171
tuple size
Write out results.
std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix_
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeights_
const EcalTrivialConditionRetriever& EcalTrivialConditionRetriever::operator= ( const EcalTrivialConditionRetriever )
private
std::auto_ptr< EcalADCToGeVConstant > EcalTrivialConditionRetriever::produceEcalADCToGeVConstant ( const EcalADCToGeVConstantRcd )
virtual
std::auto_ptr< Alignments > EcalTrivialConditionRetriever::produceEcalAlignmentEB ( const EBAlignmentRcd )
virtual

Definition at line 2632 of file EcalTrivialConditionRetriever.cc.

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

Referenced by EcalTrivialConditionRetriever().

2632  {
2633  double mytrans[3] = {0., 0., 0.};
2634  double myeuler[3] = {0., 0., 0.};
2635  std::ifstream f(edm::FileInPath(EBAlignmentFile_).fullPath().c_str());
2636  std::vector<AlignTransform> my_align;
2637  int ieta = 1;
2638  int iphi = 0;
2639  for(int SM = 1 ; SM < 37; SM++ ) {
2640  // make an EBDetId since we need EBDetId::rawId()
2641  if(SM > 18) {
2642  iphi = 1 + (SM - 19) * 20;
2643  ieta = -1;
2644  }
2645  else
2646  iphi = SM * 20;
2647  EBDetId ebdetId(ieta,iphi);
2649  f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
2650  std::cout << " translation " << mytrans[0] << " " << mytrans[1] << " " << mytrans[2] << "\n"
2651  << " euler " << myeuler[0] << " " << myeuler[1] << " " << myeuler[2] << std::endl;
2652  }
2653  CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
2654  CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
2655  AlignTransform transform( translation, euler, ebdetId );
2656  my_align.push_back(transform);
2657  }
2658  /*
2659  // check
2660  uint32_t m_rawid;
2661  double m_x, m_y, m_z;
2662  double m_phi, m_theta, m_psi;
2663  int SM = 0;
2664  for (std::vector<AlignTransform>::const_iterator i = my_align.begin(); i != my_align.end(); ++i){
2665  m_rawid = i->rawId();
2666  CLHEP::Hep3Vector translation = i->translation();
2667  m_x = translation.x();
2668  m_y = translation.y();
2669  m_z = translation.z();
2670  CLHEP::HepRotation rotation = i->rotation();
2671  m_phi = rotation.getPhi();
2672  m_theta = rotation.getTheta();
2673  m_psi = rotation.getPsi();
2674  SM++;
2675  std::cout << " SM " << SM << " Id " << m_rawid << " x " << m_x << " y " << m_y << " z " << m_z
2676  << " phi " << m_phi << " theta " << m_theta << " psi " << m_psi << std::endl;
2677  }
2678  */
2679  Alignments a;
2680  a.m_align = my_align;
2681 
2682  std::auto_ptr<Alignments> ical = std::auto_ptr<Alignments>( new Alignments(a) );
2683  return ical;
2684 }
std::vector< AlignTransform > m_align
Definition: Alignments.h:14
double f[11][100]
double a
Definition: hdecay.h:121
tuple cout
Definition: gather_cfg.py:121
std::auto_ptr< Alignments > EcalTrivialConditionRetriever::produceEcalAlignmentEE ( const EEAlignmentRcd )
virtual

Definition at line 2687 of file EcalTrivialConditionRetriever.cc.

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

Referenced by EcalTrivialConditionRetriever().

2687  {
2688  double mytrans[3] = {0., 0., 0.};
2689  double myeuler[3] = {0., 0., 0.};
2690  std::ifstream f(edm::FileInPath(EEAlignmentFile_).fullPath().c_str());
2691  std::vector<AlignTransform> my_align;
2692  int ix = 20;
2693  int iy = 50;
2694  int side = -1;
2695  for(int Dee = 0 ; Dee < 4; Dee++ ) {
2696  // make an EEDetId since we need EEDetId::rawId()
2697  if(Dee == 1 || Dee == 3)
2698  ix = 70;
2699  else ix = 20;
2700  if(Dee == 2)
2701  side = 1;
2702  EEDetId eedetId(ix, iy, side);
2704  f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
2705  std::cout << " translation " << mytrans[0] << " " << mytrans[1] << " " << mytrans[2] << "\n"
2706  << " euler " << myeuler[0] << " " << myeuler[1] << " " << myeuler[2] << std::endl;
2707  }
2708  CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
2709  CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
2710  AlignTransform transform( translation, euler, eedetId );
2711  my_align.push_back(transform);
2712  }
2713  Alignments a;
2714  a.m_align = my_align;
2715  std::auto_ptr<Alignments> ical = std::auto_ptr<Alignments>( new Alignments(a) );
2716  return ical;
2717 }
std::vector< AlignTransform > m_align
Definition: Alignments.h:14
double f[11][100]
double a
Definition: hdecay.h:121
tuple cout
Definition: gather_cfg.py:121
std::auto_ptr< Alignments > EcalTrivialConditionRetriever::produceEcalAlignmentES ( const ESAlignmentRcd )
virtual

Definition at line 2720 of file EcalTrivialConditionRetriever.cc.

References a, gather_cfg::cout, f, Alignments::m_align, strip(), and create_public_pileup_plots::transform.

Referenced by EcalTrivialConditionRetriever().

2720  {
2721  double mytrans[3] = {0., 0., 0.};
2722  double myeuler[3] = {0., 0., 0.};
2723  std::ifstream f(edm::FileInPath(ESAlignmentFile_).fullPath().c_str());
2724  std::vector<AlignTransform> my_align;
2725  // int ix_vect[10] = {10, 30, 30, 50, 10, 30, 10, 30};
2726  int pl_vect[10] = {2, 2, 1, 1, 1, 1, 2, 2};
2727  int iy = 10;
2728  int side = -1;
2729  int strip = 1;
2730  for(int layer = 0 ; layer < 8; layer++ ) {
2731  // make an ESDetId since we need ESDetId::rawId()
2732  int ix = 10 + (layer%2) * 20;
2733  int plane = pl_vect[layer];
2734  if(layer > 3) side = 1;
2735  ESDetId esdetId(strip, ix, iy, plane, side);
2737  f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
2738  std::cout << " translation " << mytrans[0] << " " << mytrans[1] << " " << mytrans[2] << "\n"
2739  << " euler " << myeuler[0] << " " << myeuler[1] << " " << myeuler[2] << std::endl;
2740  }
2741  CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
2742  CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
2743  AlignTransform transform( translation, euler, esdetId );
2744  my_align.push_back(transform);
2745  }
2746  Alignments a;
2747  a.m_align = my_align;
2748  std::auto_ptr<Alignments> ical = std::auto_ptr<Alignments>( new Alignments(a) );
2749  return ical;
2750 }
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
std::vector< AlignTransform > m_align
Definition: Alignments.h:14
double f[11][100]
double a
Definition: hdecay.h:121
tuple cout
Definition: gather_cfg.py:121
std::auto_ptr< EcalChannelStatus > EcalTrivialConditionRetriever::produceEcalChannelStatus ( const EcalChannelStatusRcd )
virtual

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

1794 {
1795 
1796  std::auto_ptr<EcalChannelStatus> ical = std::auto_ptr<EcalChannelStatus>( new EcalChannelStatus() );
1797  // barrel
1798  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
1799  if(ieta==0) continue;
1800  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
1801  if (EBDetId::validDetId(ieta,iphi)) {
1802  EBDetId ebid(ieta,iphi);
1803  ical->setValue( ebid, 0 );
1804  }
1805  }
1806  }
1807  // endcap
1808  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
1809  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
1810  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
1811  if (EEDetId::validDetId(iX,iY,1)) {
1812  EEDetId eedetidpos(iX,iY,1);
1813  ical->setValue( eedetidpos, 0 );
1814  }
1815  if (EEDetId::validDetId(iX,iY,-1)) {
1816  EEDetId eedetidneg(iX,iY,-1);
1817  ical->setValue( eedetidneg, 0 );
1818  }
1819  }
1820  }
1821  return ical;
1822 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
static const int MIN_IPHI
Definition: EBDetId.h:121
static const int IX_MIN
Definition: EEDetId.h:271
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const int IY_MIN
Definition: EEDetId.h:275
EcalChannelStatusMap EcalChannelStatus
static const int IX_MAX
Definition: EEDetId.h:279
static const int MAX_IPHI
Definition: EBDetId.h:123
static const int MAX_IETA
Definition: EBDetId.h:122
static const int IY_MAX
Definition: EEDetId.h:283
std::auto_ptr< EcalClusterCrackCorrParameters > EcalTrivialConditionRetriever::produceEcalClusterCrackCorrParameters ( const EcalClusterCrackCorrParametersRcd )
virtual

Definition at line 818 of file EcalTrivialConditionRetriever.cc.

References i.

Referenced by EcalTrivialConditionRetriever().

819 {
820  std::auto_ptr<EcalClusterCrackCorrParameters> ipar = std::auto_ptr<EcalClusterCrackCorrParameters>( new EcalClusterCrackCorrParameters() );
821  for (size_t i = 0; i < crackCorrParameters_.size(); ++i ) {
822  ipar->params().push_back( crackCorrParameters_[i] );
823  }
824  return ipar;
825 }
int i
Definition: DBlmapReader.cc:9
EcalFunParams EcalClusterCrackCorrParameters
std::auto_ptr< EcalClusterEnergyCorrectionObjectSpecificParameters > EcalTrivialConditionRetriever::produceEcalClusterEnergyCorrectionObjectSpecificParameters ( const EcalClusterEnergyCorrectionObjectSpecificParametersRcd )
virtual

Definition at line 845 of file EcalTrivialConditionRetriever.cc.

References i.

Referenced by EcalTrivialConditionRetriever().

846 {
847  std::auto_ptr<EcalClusterEnergyCorrectionObjectSpecificParameters> ipar = std::auto_ptr<EcalClusterEnergyCorrectionObjectSpecificParameters>( new EcalClusterEnergyCorrectionObjectSpecificParameters() );
848  for (size_t i = 0; i < energyCorrectionObjectSpecificParameters_.size(); ++i ) {
849  ipar->params().push_back( energyCorrectionObjectSpecificParameters_[i] );
850  }
851  return ipar;
852 }
int i
Definition: DBlmapReader.cc:9
std::vector< double > energyCorrectionObjectSpecificParameters_
EcalFunParams EcalClusterEnergyCorrectionObjectSpecificParameters
std::auto_ptr< EcalClusterEnergyCorrectionParameters > EcalTrivialConditionRetriever::produceEcalClusterEnergyCorrectionParameters ( const EcalClusterEnergyCorrectionParametersRcd )
virtual

Definition at line 827 of file EcalTrivialConditionRetriever.cc.

References i.

Referenced by EcalTrivialConditionRetriever().

828 {
829  std::auto_ptr<EcalClusterEnergyCorrectionParameters> ipar = std::auto_ptr<EcalClusterEnergyCorrectionParameters>( new EcalClusterEnergyCorrectionParameters() );
830  for (size_t i = 0; i < energyCorrectionParameters_.size(); ++i ) {
831  ipar->params().push_back( energyCorrectionParameters_[i] );
832  }
833  return ipar;
834 }
int i
Definition: DBlmapReader.cc:9
EcalFunParams EcalClusterEnergyCorrectionParameters
std::auto_ptr< EcalClusterEnergyUncertaintyParameters > EcalTrivialConditionRetriever::produceEcalClusterEnergyUncertaintyParameters ( const EcalClusterEnergyUncertaintyParametersRcd )
virtual

Definition at line 836 of file EcalTrivialConditionRetriever.cc.

References i.

Referenced by EcalTrivialConditionRetriever().

837 {
838  std::auto_ptr<EcalClusterEnergyUncertaintyParameters> ipar = std::auto_ptr<EcalClusterEnergyUncertaintyParameters>( new EcalClusterEnergyUncertaintyParameters() );
839  for (size_t i = 0; i < energyUncertaintyParameters_.size(); ++i ) {
840  ipar->params().push_back( energyUncertaintyParameters_[i] );
841  }
842  return ipar;
843 }
int i
Definition: DBlmapReader.cc:9
EcalFunParams EcalClusterEnergyUncertaintyParameters
std::auto_ptr< EcalClusterLocalContCorrParameters > EcalTrivialConditionRetriever::produceEcalClusterLocalContCorrParameters ( const EcalClusterLocalContCorrParametersRcd )
virtual

Definition at line 809 of file EcalTrivialConditionRetriever.cc.

References i.

Referenced by EcalTrivialConditionRetriever().

810 {
811  std::auto_ptr<EcalClusterLocalContCorrParameters> ipar = std::auto_ptr<EcalClusterLocalContCorrParameters>( new EcalClusterLocalContCorrParameters() );
812  for (size_t i = 0; i < localContCorrParameters_.size(); ++i ) {
813  ipar->params().push_back( localContCorrParameters_[i] );
814  }
815  return ipar;
816 }
int i
Definition: DBlmapReader.cc:9
EcalFunParams EcalClusterLocalContCorrParameters
std::auto_ptr< EcalDAQTowerStatus > EcalTrivialConditionRetriever::produceEcalDAQTowerStatus ( const EcalDAQTowerStatusRcd )
virtual

Definition at line 1946 of file EcalTrivialConditionRetriever.cc.

References EcalBarrel, i, j, gen::k, ntuplemaker::status, EcalTrigTowerDetId::validDetId(), and EcalScDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

1947 {
1948 
1949  std::auto_ptr<EcalDAQTowerStatus> ical = std::auto_ptr<EcalDAQTowerStatus>( new EcalDAQTowerStatus() );
1950 
1951  int status(0);
1952 
1953  // barrel
1954  int iz=0;
1955  for(int k=0 ; k<2; k++ ) {
1956  if(k==0) iz=-1;
1957  if(k==1) iz=+1;
1958  for(int i=1 ; i<73; i++) {
1959  for(int j=1 ; j<18; j++) {
1961  EcalTrigTowerDetId ebid(iz,EcalBarrel,j,i);
1962 
1963  ical->setValue( ebid, status );
1964  }
1965  }
1966  }
1967  }
1968 
1969 
1970  // endcap
1971  for(int k=0 ; k<2; k++ ) {
1972  if(k==0) iz=-1;
1973  if(k==1) iz=+1;
1974  for(int i=1 ; i<21; i++) {
1975  for(int j=1 ; j<21; j++) {
1976  if (EcalScDetId::validDetId(i,j,iz )){
1977  EcalScDetId eeid(i,j,iz);
1978  ical->setValue( eeid, status );
1979  }
1980  }
1981  }
1982  }
1983 
1984  return ical;
1985 }
EcalDAQTowerStatusMap EcalDAQTowerStatus
static bool validDetId(int ix, int iy, int iz)
Definition: EcalScDetId.cc:63
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
int k[5][pyjets_maxn]
static bool validDetId(int iz, EcalSubdetector sd, int i, int j)
check if a valid index combination
tuple status
Definition: ntuplemaker.py:245
std::auto_ptr< EcalDCSTowerStatus > EcalTrivialConditionRetriever::produceEcalDCSTowerStatus ( const EcalDCSTowerStatusRcd )
virtual

Definition at line 1903 of file EcalTrivialConditionRetriever.cc.

References EcalBarrel, i, j, gen::k, ntuplemaker::status, EcalTrigTowerDetId::validDetId(), and EcalScDetId::validDetId().

Referenced by EcalTrivialConditionRetriever().

1904 {
1905 
1906  std::auto_ptr<EcalDCSTowerStatus> ical = std::auto_ptr<EcalDCSTowerStatus>( new EcalDCSTowerStatus() );
1907 
1908  int status(0);
1909 
1910  // barrel
1911  int iz=0;
1912  for(int k=0 ; k<2; k++ ) {
1913  if(k==0) iz=-1;
1914  if(k==1) iz=+1;
1915  for(int i=1 ; i<73; i++) {
1916  for(int j=1 ; j<18; j++) {
1918  EcalTrigTowerDetId ebid(iz,EcalBarrel,j,i);
1919 
1920  ical->setValue( ebid, status );
1921  }
1922  }
1923  }
1924  }
1925 
1926 
1927  // endcap
1928  for(int k=0 ; k<2; k++ ) {
1929  if(k==0) iz=-1;
1930  if(k==1) iz=+1;
1931  for(int i=1 ; i<21; i++) {
1932  for(int j=1 ; j<21; j++) {
1933  if (EcalScDetId::validDetId(i,j,iz )){
1934  EcalScDetId eeid(i,j,iz);
1935  ical->setValue( eeid, status );
1936  }
1937  }
1938  }
1939  }
1940 
1941  return ical;
1942 }
static bool validDetId(int ix, int iy, int iz)
Definition: EcalScDetId.cc:63
int i
Definition: DBlmapReader.cc:9
EcalDCSTowerStatusMap EcalDCSTowerStatus
int j
Definition: DBlmapReader.cc:9
int k[5][pyjets_maxn]
static bool validDetId(int iz, EcalSubdetector sd, int i, int j)
check if a valid index combination
tuple status
Definition: ntuplemaker.py:245
std::auto_ptr< EcalDQMChannelStatus > EcalTrivialConditionRetriever::produceEcalDQMChannelStatus ( const EcalDQMChannelStatusRcd )
virtual

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

1827 {
1828  uint32_t sta(0);
1829 
1830  std::auto_ptr<EcalDQMChannelStatus> ical = std::auto_ptr<EcalDQMChannelStatus>( new EcalDQMChannelStatus() );
1831  // barrel
1832  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
1833  if(ieta==0) continue;
1834  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
1835  if (EBDetId::validDetId(ieta,iphi)) {
1836  EBDetId ebid(ieta,iphi);
1837  ical->setValue( ebid, sta );
1838  }
1839  }
1840  }
1841  // endcap
1842  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
1843  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
1844  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
1845  if (EEDetId::validDetId(iX,iY,1)) {
1846  EEDetId eedetidpos(iX,iY,1);
1847  ical->setValue( eedetidpos, sta );
1848  }
1849  if (EEDetId::validDetId(iX,iY,-1)) {
1850  EEDetId eedetidneg(iX,iY,-1);
1851  ical->setValue( eedetidneg, sta );
1852  }
1853  }
1854  }
1855  return ical;
1856 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
static const int MIN_IPHI
Definition: EBDetId.h:121
static const int IX_MIN
Definition: EEDetId.h:271
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const int IY_MIN
Definition: EEDetId.h:275
EcalDQMChannelStatusMap EcalDQMChannelStatus
static const int IX_MAX
Definition: EEDetId.h:279
static const int MAX_IPHI
Definition: EBDetId.h:123
static const int MAX_IETA
Definition: EBDetId.h:122
static const int IY_MAX
Definition: EEDetId.h:283
std::auto_ptr< EcalDQMTowerStatus > EcalTrivialConditionRetriever::produceEcalDQMTowerStatus ( const EcalDQMTowerStatusRcd )
virtual

Definition at line 1860 of file EcalTrivialConditionRetriever.cc.

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

Referenced by EcalTrivialConditionRetriever().

1861 {
1862 
1863  std::auto_ptr<EcalDQMTowerStatus> ical = std::auto_ptr<EcalDQMTowerStatus>( new EcalDQMTowerStatus() );
1864 
1865  uint32_t sta(0);
1866 
1867  // barrel
1868  int iz=0;
1869  for(int k=0 ; k<2; k++ ) {
1870  if(k==0) iz=-1;
1871  if(k==1) iz=+1;
1872  for(int i=1 ; i<73; i++) {
1873  for(int j=1 ; j<18; j++) {
1875  EcalTrigTowerDetId ebid(iz,EcalBarrel,j,i);
1876 
1877  ical->setValue( ebid, sta );
1878  }
1879  }
1880  }
1881  }
1882 
1883 
1884  // endcap
1885  for(int k=0 ; k<2; k++ ) {
1886  if(k==0) iz=-1;
1887  if(k==1) iz=+1;
1888  for(int i=1 ; i<21; i++) {
1889  for(int j=1 ; j<21; j++) {
1890  if (EcalScDetId::validDetId(i,j,iz )){
1891  EcalScDetId eeid(i,j,iz);
1892  ical->setValue( eeid, sta );
1893  }
1894  }
1895  }
1896  }
1897 
1898  return ical;
1899 }
static bool validDetId(int ix, int iy, int iz)
Definition: EcalScDetId.cc:63
int i
Definition: DBlmapReader.cc:9
EcalDQMTowerStatusMap EcalDQMTowerStatus
int j
Definition: DBlmapReader.cc:9
int k[5][pyjets_maxn]
static bool validDetId(int iz, EcalSubdetector sd, int i, int j)
check if a valid index combination
std::auto_ptr< EcalGainRatios > EcalTrivialConditionRetriever::produceEcalGainRatios ( const EcalGainRatiosRcd )
virtual

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

677 {
678  std::auto_ptr<EcalGainRatios> gratio = std::auto_ptr<EcalGainRatios>( new EcalGainRatios() );
681  gr.setGain6Over1( gainRatio6over1_ );
682 
683  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
684  if(ieta==0) continue;
685  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
686  if (EBDetId::validDetId(ieta,iphi))
687  {
688  EBDetId ebid(ieta,iphi);
689  gratio->setValue( ebid.rawId(), gr );
690  }
691  }
692  }
693 
694  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
695  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
696  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
697  if (EEDetId::validDetId(iX,iY,1))
698  {
699  EEDetId eedetidpos(iX,iY,1);
700  gratio->setValue( eedetidpos.rawId(), gr );
701  }
702  if (EEDetId::validDetId(iX,iY,-1))
703  {
704  EEDetId eedetidneg(iX,iY,-1);
705  gratio->setValue( eedetidneg.rawId(), gr );
706  }
707  }
708  }
709 
710  return gratio;
711 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
static const int MIN_IPHI
Definition: EBDetId.h:121
static const int IX_MIN
Definition: EEDetId.h:271
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const int IY_MIN
Definition: EEDetId.h:275
void setGain12Over6(const float &g)
EcalGainRatioMap EcalGainRatios
static const int IX_MAX
Definition: EEDetId.h:279
static const int MAX_IPHI
Definition: EBDetId.h:123
static const int MAX_IETA
Definition: EBDetId.h:122
static const int IY_MAX
Definition: EEDetId.h:283
std::auto_ptr< EcalIntercalibConstants > EcalTrivialConditionRetriever::produceEcalIntercalibConstants ( const EcalIntercalibConstantsRcd )
virtual

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

480 {
481  std::auto_ptr<EcalIntercalibConstants> ical = std::auto_ptr<EcalIntercalibConstants>( new EcalIntercalibConstants() );
482 
483  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
484  if(ieta==0) continue;
485  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
486  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
487  if (EBDetId::validDetId(ieta,iphi))
488  {
489  EBDetId ebid(ieta,iphi);
490  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
491  ical->setValue( ebid.rawId(), intercalibConstantMean_ + r*intercalibConstantSigma_ );
492  }
493  }
494  }
495 
496  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
497  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
498  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
499  if (EEDetId::validDetId(iX,iY,1))
500  {
501  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
502  EEDetId eedetidpos(iX,iY,1);
503  ical->setValue( eedetidpos.rawId(), intercalibConstantMean_ + r*intercalibConstantSigma_ );
504  }
505  if(EEDetId::validDetId(iX,iY,-1))
506  {
507  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
508  EEDetId eedetidneg(iX,iY,-1);
509  ical->setValue( eedetidneg.rawId(), intercalibConstantMean_ + r1*intercalibConstantSigma_ );
510  }
511  }
512  }
513 
514  return ical;
515 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
static const int MIN_IPHI
Definition: EBDetId.h:121
static const int IX_MIN
Definition: EEDetId.h:271
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const int IY_MIN
Definition: EEDetId.h:275
static const int IX_MAX
Definition: EEDetId.h:279
static const int MAX_IPHI
Definition: EBDetId.h:123
static const int MAX_IETA
Definition: EBDetId.h:122
EcalIntercalibConstantMap EcalIntercalibConstants
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:283
std::auto_ptr< EcalIntercalibConstantsMC > EcalTrivialConditionRetriever::produceEcalIntercalibConstantsMC ( const EcalIntercalibConstantsMCRcd )
virtual

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

519 {
520  std::auto_ptr<EcalIntercalibConstantsMC> ical = std::auto_ptr<EcalIntercalibConstantsMC>( new EcalIntercalibConstantsMC() );
521 
522  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
523  if(ieta==0) continue;
524  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
525  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
526  if (EBDetId::validDetId(ieta,iphi))
527  {
528  EBDetId ebid(ieta,iphi);
529  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
530  ical->setValue( ebid.rawId(), intercalibConstantMeanMC_ + r*intercalibConstantSigmaMC_ );
531  }
532  }
533  }
534 
535  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
536  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
537  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
538  if (EEDetId::validDetId(iX,iY,1))
539  {
540  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
541  EEDetId eedetidpos(iX,iY,1);
542  ical->setValue( eedetidpos.rawId(), intercalibConstantMeanMC_ + r*intercalibConstantSigmaMC_ );
543  }
544  if(EEDetId::validDetId(iX,iY,-1))
545  {
546  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
547  EEDetId eedetidneg(iX,iY,-1);
548  ical->setValue( eedetidneg.rawId(), intercalibConstantMeanMC_ + r1*intercalibConstantSigmaMC_ );
549  }
550  }
551  }
552 
553  return ical;
554 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
EcalIntercalibConstantMCMap EcalIntercalibConstantsMC
static const int MIN_IPHI
Definition: EBDetId.h:121
static const int IX_MIN
Definition: EEDetId.h:271
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const int IY_MIN
Definition: EEDetId.h:275
static const int IX_MAX
Definition: EEDetId.h:279
static const int MAX_IPHI
Definition: EBDetId.h:123
static const int MAX_IETA
Definition: EBDetId.h:122
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:283
std::auto_ptr< EcalIntercalibErrors > EcalTrivialConditionRetriever::produceEcalIntercalibErrors ( const EcalIntercalibErrorsRcd )
virtual

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

558 {
559  std::auto_ptr<EcalIntercalibErrors> ical = std::auto_ptr<EcalIntercalibErrors>( new EcalIntercalibErrors() );
560 
561  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
562  if(ieta==0) continue;
563  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
564  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
565  if (EBDetId::validDetId(ieta,iphi))
566  {
567  EBDetId ebid(ieta,iphi);
568  ical->setValue( ebid.rawId(), intercalibErrorMean_);
569  }
570  }
571  }
572 
573  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
574  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
575  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
576  if (EEDetId::validDetId(iX,iY,1))
577  {
578  EEDetId eedetidpos(iX,iY,1);
579  ical->setValue( eedetidpos.rawId(), intercalibErrorMean_ );
580  }
581  if(EEDetId::validDetId(iX,iY,-1))
582  {
583  EEDetId eedetidneg(iX,iY,-1);
584  ical->setValue( eedetidneg.rawId(), intercalibErrorMean_ );
585  }
586  }
587  }
588 
589  return ical;
590 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
static const int MIN_IPHI
Definition: EBDetId.h:121
static const int IX_MIN
Definition: EEDetId.h:271
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const int IY_MIN
Definition: EEDetId.h:275
EcalIntercalibErrorMap EcalIntercalibErrors
static const int IX_MAX
Definition: EEDetId.h:279
static const int MAX_IPHI
Definition: EBDetId.h:123
static const int MAX_IETA
Definition: EBDetId.h:122
static const int IY_MAX
Definition: EEDetId.h:283
std::auto_ptr< EcalLaserAlphas > EcalTrivialConditionRetriever::produceEcalLaserAlphas ( const EcalLaserAlphasRcd )
virtual

Definition at line 857 of file EcalTrivialConditionRetriever.cc.

References abs, alpha, python.rootplot.core::batch, edm::check(), gather_cfg::cout, EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, pos, alignCSCRings::r, diffTwoXMLs::r1, rand(), EBDetId::SMCRYSTALMODE, EBDetId::validDetId(), EEDetId::validDetId(), vdt::x, detailsBasic3DVector::y, and detailsBasic3DVector::z.

Referenced by EcalTrivialConditionRetriever().

858 {
859 
860  std::cout << " produceEcalLaserAlphas " << std::endl;
861  std::auto_ptr<EcalLaserAlphas> ical = std::auto_ptr<EcalLaserAlphas>( new EcalLaserAlphas() );
863  std::ifstream fEB(edm::FileInPath(EBLaserAlphaFile_).fullPath().c_str());
864  int SMpos[36] = {-10, 4, -7, -16, 6, -9, 11, -17, 5, 18, 3, -8, 1, -3, -13, 14, -6, 2,
865  15, -18, 8, 17, -2, 9, -1, 10, -5, 7, -12, -11, 16, -4, -15, -14, 12, 13};
866  // check!
867  int SMCal[36] = {12,17,10, 1, 8, 4,27,20,23,25, 6,34,35,15,18,30,21, 9,
868  24,22,13,31,26,16, 2,11, 5, 0,29,28,14,33,32, 3, 7,19};
869  /*
870  int slot_to_constr[37]={-1,12,17,10,1,8,4,27,20,23,25,6,34,35,15,18,30,21,9
871  ,24,22,13,31,26,16,2,11,5,0,29,28,14,33,32,3,7,19};
872  int constr_to_slot[36]={28,4,25,34,6,27,11,35,5,18,3,26,1,21,31,14,24,2,15,
873  36,8,17,20,9,19,10,23,7,30,29,16,22,33,32,12,13 };
874  */
875  for(int SMcons = 0; SMcons < 36; SMcons++) {
876  int SM = SMpos[SMcons];
877  if(SM < 0) SM = 17 + abs(SM);
878  else SM--;
879  if(SMCal[SM] != SMcons)
880  std::cout << " SM pb : read SM " << SMcons<< " SMpos " << SM
881  << " SMCal " << SMCal[SM] << std::endl;
882  }
883  // check
884  std::string type, batch;
885  int readSM, pos, bar, bar2;
886  float alpha = 0;
887  for(int SMcons = 0; SMcons < 36; SMcons++) {
888  int SM = SMpos[SMcons];
889  for(int ic = 0; ic < 1700; ic++) {
890  fEB >> readSM >> pos >> bar >> bar2 >> type >> batch;
891  // if(ic == 0) std::cout << readSM << " " << pos << " " << bar << " " << bar2 << " "
892  // << type << " " << batch << std::endl;
893  if(readSM != SMcons || pos != ic + 1)
894  std::cout << " barrel read pb read SM " << readSM << " const SM " << SMcons
895  << " read pos " << pos << " ic " << ic << std::endl;
896  if(SM < 0) SM = 18 + abs(SM);
897  EBDetId ebdetid(SM, pos, EBDetId::SMCRYSTALMODE);
898  if(bar == 33101 || bar == 30301 )
899  alpha = 1.52;
900  else if(bar == 33106) {
901  if(bar2 <= 2000)
902  alpha = 1.0;
903  else {
904  std::cout << " problem with barcode first " << bar << " last " << bar2
905  << " read SM " << readSM << " read pos " << pos << std::endl;
906  alpha = 0.0;
907  }
908  }
909  ical->setValue( ebdetid, alpha );
910  }
911  } // loop over SMcons
912  } // laserAlpha from a file
913  else {
914  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
915  if(ieta==0) continue;
916  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
917  if (EBDetId::validDetId(ieta,iphi)) {
918  EBDetId ebid(ieta,iphi);
919  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
920  ical->setValue( ebid, laserAlphaMean_ + r*laserAlphaSigma_ );
921  }
922  } // loop over iphi
923  } // loop over ieta
924  } // do not read a file
925 
926  std::cout << " produceEcalLaserAlphas EE" << std::endl;
928  std::ifstream fEE(edm::FileInPath(EELaserAlphaFile_).fullPath().c_str());
929  int check[101][101];
930  for(int x = 1; x < 101; x++)
931  for(int y = 1; y < 101; y++)
932  check[x][y] = -1;
933  for(int crystal = 0; crystal < 14648; crystal++) {
934  int x, y ,z, bid, bar, bar2;
935  float LY, alpha = 0;
936  fEE >> z >> x >> y >> LY >> bid >> bar >> bar2;
937  if(x < 1 || x > 100 || y < 1 || y > 100)
938  std::cout << " wrong coordinates for barcode " << bar
939  << " x " << x << " y " << y << " z " << z << std::endl;
940  else {
941  if(z == 1) check[x][y] = 1;
942  else check[x][y] = 0;
943  if(bar == 33201 || (bar == 30399 && bar2 < 568))
944  alpha = 1.52;
945  else if((bar == 33106 && bar2 > 2000 && bar2 < 4669)
946  || (bar == 30399 && bar2 > 567))
947  alpha = 1.0;
948  else {
949  std::cout << " problem with barcode " << bar << " " << bar2
950  << " x " << x << " y " << y << " z " << z << std::endl;
951  alpha = 0.0;
952  }
953  }
954  if (EEDetId::validDetId(x, y, z)) {
955  EEDetId eedetidpos(x, y, z);
956  ical->setValue( eedetidpos, alpha );
957  }
958  else // should not occur
959  std::cout << " problem with EEDetId " << " x " << x << " y " << y << " z " << z << std::endl;
960  } // loop over crystal in file
961  for(int x = 1; x < 101; x++)
962  for(int y = 1; y < 101; y++)
963  if(check[x][y] == 1) std::cout << " missing x " << x << " y " << y << std::endl;
964  } // laserAlpha from a file
965  else {
966  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
967  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
968  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
969  if (EEDetId::validDetId(iX,iY,1)) {
970  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
971  EEDetId eedetidpos(iX,iY,1);
972  ical->setValue( eedetidpos, laserAlphaMean_ + r*laserAlphaSigma_ );
973  }
974 
975  if (EEDetId::validDetId(iX,iY,-1)) {
976  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
977  EEDetId eedetidneg(iX,iY,-1);
978  ical->setValue( eedetidneg, laserAlphaMean_ + r1*laserAlphaSigma_ );
979  }
980  } // loop over iY
981  } // loop over iX
982  } // do not read a file
983 
984  return ical;
985 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
type
Definition: HCALResponse.h:22
float alpha
Definition: AMPTWrapper.h:95
static const int MIN_IPHI
Definition: EBDetId.h:121
tuple 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:62
#define abs(x)
Definition: mlp_lapack.h:159
static const int IX_MIN
Definition: EEDetId.h:271
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
double double double z
static const int IY_MIN
Definition: EEDetId.h:275
EcalLaserAlphaMap EcalLaserAlphas
bool check(const DataFrame &df, bool capcheck, bool dvercheck)
static const int IX_MAX
Definition: EEDetId.h:279
static const int MAX_IPHI
Definition: EBDetId.h:123
static const int MAX_IETA
Definition: EBDetId.h:122
Signal rand(Signal arg)
Definition: vlib.cc:442
tuple cout
Definition: gather_cfg.py:121
static const int IY_MAX
Definition: EEDetId.h:283
x
Definition: VDTMath.h:216
static const int SMCRYSTALMODE
Definition: EBDetId.h:146
std::auto_ptr< EcalLaserAPDPNRatios > EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios ( const EcalLaserAPDPNRatiosRcd )
virtual

Definition at line 1025 of file EcalTrivialConditionRetriever.cc.

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

Referenced by EcalTrivialConditionRetriever().

1026 {
1027 
1028  std::auto_ptr<EcalLaserAPDPNRatios> ical = std::auto_ptr<EcalLaserAPDPNRatios>( new EcalLaserAPDPNRatios() );
1029  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
1030  if(ieta==0) continue;
1031  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
1032  if (EBDetId::validDetId(ieta,iphi)) {
1033  EBDetId ebid(ieta,iphi);
1034  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1035 
1037  pairAPDPN.p1 = laserAPDPNMean_ + r*laserAPDPNSigma_;
1038  pairAPDPN.p2 = laserAPDPNMean_ + r*laserAPDPNSigma_;
1039  pairAPDPN.p3 = laserAPDPNMean_ + r*laserAPDPNSigma_;
1040  ical->setValue( ebid, pairAPDPN );
1041  }
1042  }
1043  }
1044 
1045  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
1046  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
1047  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
1048  if (EEDetId::validDetId(iX,iY,1)) {
1049  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1050  EEDetId eedetidpos(iX,iY,1);
1051 
1053  pairAPDPN.p1 = laserAPDPNMean_ + r*laserAPDPNSigma_;
1054  pairAPDPN.p2 = laserAPDPNMean_ + r*laserAPDPNSigma_;
1055  pairAPDPN.p3 = laserAPDPNMean_ + r*laserAPDPNSigma_;
1056  ical->setValue( eedetidpos, pairAPDPN );
1057  }
1058 
1059  if (EEDetId::validDetId(iX,iY,-1)) {
1060  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
1061  EEDetId eedetidneg(iX,iY,-1);
1062 
1064  pairAPDPN.p1 = laserAPDPNMean_ + r1*laserAPDPNSigma_;
1065  pairAPDPN.p2 = laserAPDPNMean_ + r1*laserAPDPNSigma_;
1066  pairAPDPN.p3 = laserAPDPNMean_ + r1*laserAPDPNSigma_;
1067  ical->setValue( eedetidneg, pairAPDPN );
1068  }
1069  }
1070  }
1071 
1073  // for(int i=1; i<=92; i++){
1074  for(int i=0; i<92; i++){
1075  TimeStamp.t1 = Timestamp(laserAPDPNTime1_);
1076  if(laserAPDPNTime2_ == 0 ){
1077  TimeStamp.t2 = Timestamp(edm::Timestamp::endOfTime().value());
1078  } else {
1079  TimeStamp.t2 = Timestamp(laserAPDPNTime2_);
1080  }
1081  if(laserAPDPNTime3_ == 0 ){
1082  TimeStamp.t3 = Timestamp(edm::Timestamp::endOfTime().value());
1083  } else {
1084  TimeStamp.t3 = Timestamp(laserAPDPNTime3_);
1085  }
1086 
1087  ical->setTime( i, TimeStamp );
1088  }
1089 
1090  return ical;
1091 
1092 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
int i
Definition: DBlmapReader.cc:9
static const int MIN_IPHI
Definition: EBDetId.h:121
static const int IX_MIN
Definition: EEDetId.h:271
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const int IY_MIN
Definition: EEDetId.h:275
static const int IX_MAX
Definition: EEDetId.h:279
static const int MAX_IPHI
Definition: EBDetId.h:123
static const int MAX_IETA
Definition: EBDetId.h:122
static Timestamp const & endOfTime()
Definition: Timestamp.cc:88
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:283
std::auto_ptr< EcalLaserAPDPNRatiosRef > EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef ( const EcalLaserAPDPNRatiosRefRcd )
virtual

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

990 {
991  std::auto_ptr<EcalLaserAPDPNRatiosRef> ical = std::auto_ptr<EcalLaserAPDPNRatiosRef>( new EcalLaserAPDPNRatiosRef() );
992  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
993  if(ieta==0) continue;
994  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
995  if (EBDetId::validDetId(ieta,iphi)) {
996  EBDetId ebid(ieta,iphi);
997  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
998  ical->setValue( ebid, laserAPDPNRefMean_ + r*laserAPDPNRefSigma_ );
999  }
1000  }
1001  }
1002 
1003  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
1004  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
1005  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
1006  if (EEDetId::validDetId(iX,iY,1)) {
1007  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
1008  EEDetId eedetidpos(iX,iY,1);
1009  ical->setValue( eedetidpos, laserAPDPNRefMean_ + r*laserAPDPNRefSigma_ );
1010  }
1011 
1012  if (EEDetId::validDetId(iX,iY,-1)) {
1013  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
1014  EEDetId eedetidneg(iX,iY,-1);
1015  ical->setValue( eedetidneg, laserAPDPNRefMean_ + r1*laserAPDPNRefSigma_ );
1016  }
1017  }
1018  }
1019 
1020  return ical;
1021 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
static const int MIN_IPHI
Definition: EBDetId.h:121
EcalLaserAPDPNRatiosRefMap EcalLaserAPDPNRatiosRef
static const int IX_MIN
Definition: EEDetId.h:271
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const int IY_MIN
Definition: EEDetId.h:275
static const int IX_MAX
Definition: EEDetId.h:279
static const int MAX_IPHI
Definition: EBDetId.h:123
static const int MAX_IETA
Definition: EBDetId.h:122
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:283
std::auto_ptr< EcalMappingElectronics > EcalTrivialConditionRetriever::produceEcalMappingElectronics ( const EcalMappingElectronicsRcd )
virtual

Definition at line 2622 of file EcalTrivialConditionRetriever.cc.

Referenced by EcalTrivialConditionRetriever().

2623 {
2624 
2625  std::auto_ptr<EcalMappingElectronics> ical = std::auto_ptr<EcalMappingElectronics>( new EcalMappingElectronics() );
2626  return ical;
2627 }
EcalMappingElectronicsMap EcalMappingElectronics
std::auto_ptr< EcalPedestals > EcalTrivialConditionRetriever::produceEcalPedestals ( const EcalPedestalsRcd )
virtual

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

391  {
392  std::auto_ptr<EcalPedestals> peds = std::auto_ptr<EcalPedestals>( new EcalPedestals() );
393  EcalPedestals::Item EBitem;
394  EcalPedestals::Item EEitem;
395 
396  EBitem.mean_x1 = EBpedMeanX1_;
397  EBitem.rms_x1 = EBpedRMSX1_;
398  EBitem.mean_x6 = EBpedMeanX6_;
399  EBitem.rms_x6 = EBpedRMSX6_;
400  EBitem.mean_x12 = EBpedMeanX12_;
401  EBitem.rms_x12 = EBpedRMSX12_;
402 
403  EEitem.mean_x1 = EEpedMeanX1_;
404  EEitem.rms_x1 = EEpedRMSX1_;
405  EEitem.mean_x6 = EEpedMeanX6_;
406  EEitem.rms_x6 = EEpedRMSX6_;
407  EEitem.mean_x12 = EEpedMeanX12_;
408  EEitem.rms_x12 = EEpedRMSX12_;
409 
410  for(int iEta=-EBDetId::MAX_IETA; iEta<=EBDetId::MAX_IETA ;++iEta) {
411  if(iEta==0) continue;
412  for(int iPhi=EBDetId::MIN_IPHI; iPhi<=EBDetId::MAX_IPHI; ++iPhi) {
413  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
414  if (EBDetId::validDetId(iEta,iPhi))
415  {
416  EBDetId ebdetid(iEta,iPhi);
417  peds->insert(std::make_pair(ebdetid.rawId(),EBitem));
418  }
419  }
420  }
421 
422  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
423  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
424  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
425  if (EEDetId::validDetId(iX,iY,1))
426  {
427  EEDetId eedetidpos(iX,iY,1);
428  peds->insert(std::make_pair(eedetidpos.rawId(),EEitem));
429  }
430  if(EEDetId::validDetId(iX,iY,-1))
431  {
432  EEDetId eedetidneg(iX,iY,-1);
433  peds->insert(std::make_pair(eedetidneg.rawId(),EEitem));
434  }
435  }
436  }
437 
438  //return std::auto_ptr<EcalPedestals>( peds );
439  return peds;
440 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
static const int MIN_IPHI
Definition: EBDetId.h:121
static const int IX_MIN
Definition: EEDetId.h:271
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const int IY_MIN
Definition: EEDetId.h:275
static const int IX_MAX
Definition: EEDetId.h:279
EcalPedestalsMap EcalPedestals
Definition: EcalPedestals.h:38
static const int MAX_IPHI
Definition: EBDetId.h:123
static const int MAX_IETA
Definition: EBDetId.h:122
static const int IY_MAX
Definition: EEDetId.h:283
std::auto_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 720 of file EcalTrivialConditionRetriever.cc.

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

Referenced by EcalTrivialConditionRetriever().

721 {
722  // create weights for the test-beam
723  std::auto_ptr<EcalTBWeights> tbwgt = std::auto_ptr<EcalTBWeights>( new EcalTBWeights() );
724 
725  // create weights for each distinct group ID
726  // int nMaxTDC = 10;
727 // for(int igrp=-EBDetId::MAX_IETA; igrp<=EBDetId::MAX_IETA; ++igrp) {
728 // if(igrp==0) continue;
729  int igrp=1;
730  for(int itdc=1; itdc<=nTDCbins_; ++itdc) {
731  // generate random number
732  // double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
733 
734  // make a new set of weights
735  EcalWeightSet wgt;
736  //typedef std::vector< std::vector<EcalWeight> > EcalWeightSet::EcalWeightMatrix;
739 
740 // if(verbose_>=1) {
741 // std::cout << "initial size of mat1: " << mat1.size() << std::endl;
742 // std::cout << "initial size of mat2: " << mat2.size() << std::endl;
743 // }
744 
745  // generate random numbers to use as weights
760  // use values provided by user
761  mat1.Place_in_row(amplWeights_[itdc-1],0,0);
762  mat1.Place_in_row(pedWeights_[itdc-1],1,0);
763  mat1.Place_in_row(jittWeights_[itdc-1],2,0);
764 
765  // wdights after gain switch
766  mat2.Place_in_row(amplWeightsAft_[itdc-1],0,0);
767  mat2.Place_in_row(pedWeightsAft_[itdc-1],1,0);
768  mat2.Place_in_row(jittWeightsAft_[itdc-1],2,0);
769 
770  // fill the chi2 matrcies with random numbers
771  // r = (double)std::rand()/( double(RAND_MAX)+double(1) );
774  mat3=chi2Matrix_[itdc-1];
775  mat4=chi2MatrixAft_[itdc-1];
776 
777  // for(size_t i=0; i<10; ++i)
778  // {
779  // mat3.push_back(chi2Matrix_[itdc-1][i]);
780  // mat4.push_back(chi2MatrixAft_[itdc-1][i]);
781  // }
782  // std::vector<EcalWeight> tv1, tv2;
783  // for(size_t j=0; j<10; ++j) {
784  // double ww = igrp*itdc*r + i*10. + j;
785  // tv1.push_back( EcalWeight(1000+ww) );
786  // tv2.push_back( EcalWeight(1000+100+ww) );
787  // }
788 
789 
790 
791 
792 // if(verbose_>=1) {
793 // std::cout << "group: " << igrp << " TDC: " << itdc
794 // << " mat1: " << mat1.size() << " mat2: " << mat2.size()
795 // << " mat3: " << mat3.size() << " mat4: " << mat4.size()
796 // << std::endl;
797 // }
798 
799  // put the weight in the container
800  tbwgt->setValue(std::make_pair(igrp,itdc), wgt);
801  }
802  // }
803  return tbwgt;
804 }
EcalChi2WeightMatrix & getChi2WeightsBeforeGainSwitch()
Definition: EcalWeightSet.h:29
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeightsAft_
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > pedWeightsAft_
EcalChi2WeightMatrix & getChi2WeightsAfterGainSwitch()
Definition: EcalWeightSet.h:30
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > pedWeights_
EcalWeightMatrix & getWeightsAfterGainSwitch()
Definition: EcalWeightSet.h:28
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > amplWeights_
math::Matrix< 10, 10 >::type EcalChi2WeightMatrix
Definition: EcalWeightSet.h:21
std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2MatrixAft_
EcalWeightMatrix & getWeightsBeforeGainSwitch()
Definition: EcalWeightSet.h:27
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > amplWeightsAft_
math::Matrix< 3, 10 >::type EcalWeightMatrix
Definition: EcalWeightSet.h:20
std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix_
std::vector< ROOT::Math::SVector< double, EcalDataFrame::MAXSAMPLES > > jittWeights_
std::auto_ptr< EcalTimeCalibConstants > EcalTrivialConditionRetriever::produceEcalTimeCalibConstants ( const EcalTimeCalibConstantsRcd )
virtual

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

594 {
595  std::auto_ptr<EcalTimeCalibConstants> ical = std::auto_ptr<EcalTimeCalibConstants>( new EcalTimeCalibConstants() );
596 
597  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
598  if(ieta==0) continue;
599  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
600  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
601  if (EBDetId::validDetId(ieta,iphi))
602  {
603  EBDetId ebid(ieta,iphi);
604  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
605  ical->setValue( ebid.rawId(), timeCalibConstantMean_ + r*timeCalibConstantSigma_ );
606  }
607  }
608  }
609 
610  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
611  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
612  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
613  if (EEDetId::validDetId(iX,iY,1))
614  {
615  double r = (double)std::rand()/( double(RAND_MAX)+double(1) );
616  EEDetId eedetidpos(iX,iY,1);
617  ical->setValue( eedetidpos.rawId(), timeCalibConstantMean_ + r*timeCalibConstantSigma_ );
618  }
619  if(EEDetId::validDetId(iX,iY,-1))
620  {
621  double r1 = (double)std::rand()/( double(RAND_MAX)+double(1) );
622  EEDetId eedetidneg(iX,iY,-1);
623  ical->setValue( eedetidneg.rawId(), timeCalibConstantMean_ + r1*timeCalibConstantSigma_ );
624  }
625  }
626  }
627 
628  return ical;
629 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
static const int MIN_IPHI
Definition: EBDetId.h:121
static const int IX_MIN
Definition: EEDetId.h:271
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const int IY_MIN
Definition: EEDetId.h:275
static const int IX_MAX
Definition: EEDetId.h:279
static const int MAX_IPHI
Definition: EBDetId.h:123
EcalTimeCalibConstantMap EcalTimeCalibConstants
static const int MAX_IETA
Definition: EBDetId.h:122
Signal rand(Signal arg)
Definition: vlib.cc:442
static const int IY_MAX
Definition: EEDetId.h:283
std::auto_ptr< EcalTimeCalibErrors > EcalTrivialConditionRetriever::produceEcalTimeCalibErrors ( const EcalTimeCalibErrorsRcd )
virtual

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

633 {
634  std::auto_ptr<EcalTimeCalibErrors> ical = std::auto_ptr<EcalTimeCalibErrors>( new EcalTimeCalibErrors() );
635 
636  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
637  if(ieta==0) continue;
638  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
639  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
640  if (EBDetId::validDetId(ieta,iphi))
641  {
642  EBDetId ebid(ieta,iphi);
643  ical->setValue( ebid.rawId(), timeCalibErrorMean_);
644  }
645  }
646  }
647 
648  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
649  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
650  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
651  if (EEDetId::validDetId(iX,iY,1))
652  {
653  EEDetId eedetidpos(iX,iY,1);
654  ical->setValue( eedetidpos.rawId(), timeCalibErrorMean_ );
655  }
656  if(EEDetId::validDetId(iX,iY,-1))
657  {
658  EEDetId eedetidneg(iX,iY,-1);
659  ical->setValue( eedetidneg.rawId(), timeCalibErrorMean_ );
660  }
661  }
662  }
663 
664  return ical;
665 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
static const int MIN_IPHI
Definition: EBDetId.h:121
EcalTimeCalibErrorMap EcalTimeCalibErrors
static const int IX_MIN
Definition: EEDetId.h:271
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const int IY_MIN
Definition: EEDetId.h:275
static const int IX_MAX
Definition: EEDetId.h:279
static const int MAX_IPHI
Definition: EBDetId.h:123
static const int MAX_IETA
Definition: EBDetId.h:122
static const int IY_MAX
Definition: EEDetId.h:283
std::auto_ptr< EcalTimeOffsetConstant > EcalTrivialConditionRetriever::produceEcalTimeOffsetConstant ( const EcalTimeOffsetConstantRcd )
virtual

Definition at line 668 of file EcalTrivialConditionRetriever.cc.

References gather_cfg::cout.

Referenced by EcalTrivialConditionRetriever().

669 {
670  std::cout << " produceEcalTimeOffsetConstant: " << std::endl;
671  std::cout << " EB " << timeOffsetEBConstant_ << " EE " << timeOffsetEEConstant_<< std::endl;
672  return std::auto_ptr<EcalTimeOffsetConstant>( new EcalTimeOffsetConstant(timeOffsetEBConstant_,timeOffsetEEConstant_) );
673 }
tuple cout
Definition: gather_cfg.py:121
std::auto_ptr< EcalTPGCrystalStatus > EcalTrivialConditionRetriever::produceEcalTrgChannelStatus ( const EcalTPGCrystalStatusRcd )
virtual

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

2080 {
2081 
2082  std::auto_ptr<EcalTPGCrystalStatus> ical = std::auto_ptr<EcalTPGCrystalStatus>( new EcalTPGCrystalStatus() );
2083  // barrel
2084  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
2085  if(ieta==0) continue;
2086  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
2087  if (EBDetId::validDetId(ieta,iphi)) {
2088  EBDetId ebid(ieta,iphi);
2089  ical->setValue( ebid, 0 );
2090  }
2091  }
2092  }
2093  // endcap
2094  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
2095  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
2096  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
2097  if (EEDetId::validDetId(iX,iY,1)) {
2098  EEDetId eedetidpos(iX,iY,1);
2099  ical->setValue( eedetidpos, 0 );
2100  }
2101  if (EEDetId::validDetId(iX,iY,-1)) {
2102  EEDetId eedetidneg(iX,iY,-1);
2103  ical->setValue( eedetidneg, 0 );
2104  }
2105  }
2106  }
2107  return ical;
2108 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
static const int MIN_IPHI
Definition: EBDetId.h:121
static const int IX_MIN
Definition: EEDetId.h:271
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const int IY_MIN
Definition: EEDetId.h:275
EcalTPGCrystalStatusMap EcalTPGCrystalStatus
static const int IX_MAX
Definition: EEDetId.h:279
static const int MAX_IPHI
Definition: EBDetId.h:123
static const int MAX_IETA
Definition: EBDetId.h:122
static const int IY_MAX
Definition: EEDetId.h:283
std::auto_ptr< EcalWeightXtalGroups > EcalTrivialConditionRetriever::produceEcalWeightXtalGroups ( const EcalWeightXtalGroupsRcd )
virtual

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

444 {
445  std::auto_ptr<EcalWeightXtalGroups> xtalGroups = std::auto_ptr<EcalWeightXtalGroups>( new EcalWeightXtalGroups() );
446  EcalXtalGroupId defaultGroupId(1);
447  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA ;++ieta) {
448  if(ieta==0) continue;
449  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
450  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
451  if (EBDetId::validDetId(ieta,iphi))
452  {
453  EBDetId ebid(ieta,iphi);
454  // xtalGroups->setValue(ebid.rawId(), EcalXtalGroupId(ieta) ); // define rings in eta
455  xtalGroups->setValue(ebid.rawId(), defaultGroupId ); // define rings in eta
456  }
457  }
458  }
459 
460  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
461  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
462  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
463  if (EEDetId::validDetId(iX,iY,1))
464  {
465  EEDetId eedetidpos(iX,iY,1);
466  xtalGroups->setValue(eedetidpos.rawId(), defaultGroupId );
467  }
468  if(EEDetId::validDetId(iX,iY,-1))
469  {
470  EEDetId eedetidneg(iX,iY,-1);
471  xtalGroups->setValue(eedetidneg.rawId(), defaultGroupId );
472  }
473  }
474  }
475  return xtalGroups;
476 }
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.cc:59
static const int MIN_IPHI
Definition: EBDetId.h:121
EcalCondObjectContainer< EcalXtalGroupId > EcalWeightXtalGroups
static const int IX_MIN
Definition: EEDetId.h:271
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
static const int IY_MIN
Definition: EEDetId.h:275
static const int IX_MAX
Definition: EEDetId.h:279
static const int MAX_IPHI
Definition: EBDetId.h:123
static const int MAX_IETA
Definition: EBDetId.h:122
static const int IY_MAX
Definition: EEDetId.h:283
void EcalTrivialConditionRetriever::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey rk,
const edm::IOVSyncValue iTime,
edm::ValidityInterval oValidity 
)
protectedvirtual

Implements edm::EventSetupRecordIntervalFinder.

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

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

Member Data Documentation

double EcalTrivialConditionRetriever::adcToGeVEBConstant_
private

Definition at line 171 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::adcToGeVEEConstant_
private

Definition at line 172 of file EcalTrivialConditionRetriever.h.

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

Definition at line 225 of file EcalTrivialConditionRetriever.h.

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

Definition at line 226 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::amplWeightsAftFile_
private

Definition at line 238 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::amplWeightsFile_
private

Definition at line 237 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::channelStatusFile_
private

Definition at line 249 of file EcalTrivialConditionRetriever.h.

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

Definition at line 234 of file EcalTrivialConditionRetriever.h.

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

Definition at line 235 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::chi2MatrixAftFile_
private

Definition at line 244 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::chi2MatrixFile_
private

Definition at line 243 of file EcalTrivialConditionRetriever.h.

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

Definition at line 192 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EBAlignmentFile_
private

Definition at line 252 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EBLaserAlphaFile_
private

Definition at line 255 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedMeanX12_
private

Definition at line 208 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedMeanX1_
private

Definition at line 212 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedMeanX6_
private

Definition at line 210 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedRMSX12_
private

Definition at line 209 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedRMSX1_
private

Definition at line 213 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EBpedRMSX6_
private

Definition at line 211 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EEAlignmentFile_
private

Definition at line 253 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::EELaserAlphaFile_
private

Definition at line 256 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedMeanX12_
private

Definition at line 215 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedMeanX1_
private

Definition at line 219 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedMeanX6_
private

Definition at line 217 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedRMSX12_
private

Definition at line 216 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedRMSX1_
private

Definition at line 220 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::EEpedRMSX6_
private

Definition at line 218 of file EcalTrivialConditionRetriever.h.

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

Definition at line 195 of file EcalTrivialConditionRetriever.h.

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

Definition at line 193 of file EcalTrivialConditionRetriever.h.

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

Definition at line 194 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::ESAlignmentFile_
private

Definition at line 254 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::gainRatio12over6_
private

Definition at line 222 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::gainRatio6over1_
private

Definition at line 223 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getEBAlignmentFromFile_
private

Definition at line 288 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getEEAlignmentFromFile_
private

Definition at line 289 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getESAlignmentFromFile_
private

Definition at line 290 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getLaserAlphaFromFile_
private

Definition at line 291 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::getWeightsFromFile_
private

Definition at line 260 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::intercalibConstantMean_
private

Definition at line 174 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::intercalibConstantMeanMC_
private

Definition at line 177 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::intercalibConstantsFile_
private

Definition at line 245 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::intercalibConstantSigma_
private

Definition at line 175 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::intercalibConstantSigmaMC_
private

Definition at line 178 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::intercalibErrorMean_
private

Definition at line 181 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::intercalibErrorsFile_
private

Definition at line 246 of file EcalTrivialConditionRetriever.h.

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

Definition at line 231 of file EcalTrivialConditionRetriever.h.

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

Definition at line 232 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::jittWeightsAftFile_
private

Definition at line 242 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::jittWeightsFile_
private

Definition at line 241 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAlphaMean_
private

Definition at line 198 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAlphaSigma_
private

Definition at line 199 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAPDPNMean_
private

Definition at line 202 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAPDPNRefMean_
private

Definition at line 200 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAPDPNRefSigma_
private

Definition at line 201 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::laserAPDPNSigma_
private

Definition at line 203 of file EcalTrivialConditionRetriever.h.

unsigned long EcalTrivialConditionRetriever::laserAPDPNTime1_
private

Definition at line 204 of file EcalTrivialConditionRetriever.h.

unsigned long EcalTrivialConditionRetriever::laserAPDPNTime2_
private

Definition at line 205 of file EcalTrivialConditionRetriever.h.

unsigned long EcalTrivialConditionRetriever::laserAPDPNTime3_
private

Definition at line 206 of file EcalTrivialConditionRetriever.h.

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

Definition at line 191 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::mappingFile_
private

Definition at line 251 of file EcalTrivialConditionRetriever.h.

int EcalTrivialConditionRetriever::nTDCbins_
private

Definition at line 258 of file EcalTrivialConditionRetriever.h.

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

Definition at line 228 of file EcalTrivialConditionRetriever.h.

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

Definition at line 229 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::pedWeightsAftFile_
private

Definition at line 240 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::pedWeightsFile_
private

Definition at line 239 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalADCToGeVConstant_
private

Definition at line 271 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalAlignmentEB_
private

Definition at line 285 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalAlignmentEE_
private

Definition at line 286 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalAlignmentES_
private

Definition at line 287 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalChannelStatus_
private

Definition at line 273 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalClusterCrackCorrParameters_
private

Definition at line 280 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalClusterEnergyCorrectionObjectSpecificParameters_
private

Definition at line 283 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalClusterEnergyCorrectionParameters_
private

Definition at line 281 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalClusterEnergyUncertaintyParameters_
private

Definition at line 282 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalClusterLocalContCorrParameters_
private

Definition at line 279 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalDAQTowerStatus_
private

Definition at line 277 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalDCSTowerStatus_
private

Definition at line 276 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalDQMChannelStatus_
private

Definition at line 275 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalDQMTowerStatus_
private

Definition at line 274 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalGainRatios_
private

Definition at line 270 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalIntercalibConstants_
private

Definition at line 264 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalIntercalibConstantsMC_
private

Definition at line 265 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalIntercalibErrors_
private

Definition at line 266 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalLaserCorrection_
private

Definition at line 272 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalMappingElectronics_
private

Definition at line 284 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalPedestals_
private

Definition at line 262 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalTimeCalibConstants_
private

Definition at line 267 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalTimeCalibErrors_
private

Definition at line 268 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalTimeOffsetConstant_
private

Definition at line 269 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalTrgChannelStatus_
private

Definition at line 278 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::producedEcalWeights_
private

Definition at line 263 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::timeCalibConstantMean_
private

Definition at line 183 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::timeCalibConstantsFile_
private

Definition at line 247 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::timeCalibConstantSigma_
private

Definition at line 184 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::timeCalibErrorMean_
private

Definition at line 185 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::timeCalibErrorsFile_
private

Definition at line 248 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::timeOffsetEBConstant_
private

Definition at line 187 of file EcalTrivialConditionRetriever.h.

double EcalTrivialConditionRetriever::timeOffsetEEConstant_
private

Definition at line 188 of file EcalTrivialConditionRetriever.h.

std::string EcalTrivialConditionRetriever::trgChannelStatusFile_
private

Definition at line 250 of file EcalTrivialConditionRetriever.h.

int EcalTrivialConditionRetriever::verbose_
private

Definition at line 293 of file EcalTrivialConditionRetriever.h.

bool EcalTrivialConditionRetriever::weightsForAsynchronousRunning_
private

Definition at line 261 of file EcalTrivialConditionRetriever.h.