1 #include "../interface/PedestalTask.h"
26 MGPAGains_ = commonParams.getUntrackedParameter<std::vector<int> >(
"MGPAGains");
27 MGPAGainsPN_ = commonParams.getUntrackedParameter<std::vector<int> >(
"MGPAGainsPN");
29 for(std::vector<int>::iterator gainItr(
MGPAGains_.begin()); gainItr !=
MGPAGains_.end(); ++gainItr)
30 if(*gainItr != 1 && *gainItr != 6 && *gainItr != 12)
throw cms::Exception(
"InvalidConfiguration") <<
"MGPA gain" << std::endl;
33 if(*gainItr != 1 && *gainItr != 16)
throw cms::Exception(
"InvalidConfiguration") <<
"PN diode gain" << std::endl;
35 map<string, string> replacements;
41 replacements[
"gain"] = ss.str();
45 case 1: offset = 0;
break;
46 case 6: offset = 1;
break;
47 case 12: offset = 2;
break;
58 replacements[
"pngain"] = ss.str();
62 case 1: offset = 0;
break;
63 case 16: offset = 1;
break;
79 for(std::vector<int>::iterator gainItr(
MGPAGains_.begin()); gainItr !=
MGPAGains_.end(); ++gainItr){
82 case 1: offset = 0;
break;
83 case 6: offset = 1;
break;
84 case 12: offset = 2;
break;
94 case 1: offset = 0;
break;
95 case 16: offset = 1;
break;
109 for(
int iFED(0); iFED < 54; iFED++){
124 DetId id(digiItr->id());
126 int iDCC(
dccId(
id) - 1);
136 case 1: offset = 2; gain = 12;
break;
137 case 2: offset = 1; gain = 6;
break;
138 case 3: offset = 0; gain = 1;
break;
147 for(
int iSample(0); iSample < 10; iSample++)
161 int iDCC(
dccId(
id) - 1);
167 switch(digiItr->sample(0).gainId()){
168 case 0: offset = 0; gain = 1;
break;
169 case 1: offset = 1; gain = 16;
break;
178 for(
int iSample(0); iSample < 50; iSample++)
179 mean += digiItr->sample(iSample).adc();
190 for(
unsigned iGain(0); iGain <
nGain; iGain++){
194 for(
unsigned iPNGain(0); iPNGain <
nPNGain; iPNGain++){
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
std::vector< T >::const_iterator const_iterator
EcalMGPASample sample(int i) const
unsigned dccId(const DetId &)
void runOnDigis(const EcalDigiCollection &)
const_iterator begin() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
int gainId() const
get the gainId (2 bits)
std::vector< int > MGPAGains_
ParameterSet const & getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
unsigned int offset(bool)
std::vector< int > MGPAGainsPN_
static void setMEData(std::vector< MEData > &)
const_iterator end() const
std::vector< MESet * > MEs_
const_iterator end() const
DEFINE_ECALDQM_WORKER(CertificationClient)
bool filterRunType(const std::vector< short > &)
void runOnPnDigis(const EcalPnDiodeDigiCollection &)
bool enable_[BinService::nDCC]
PedestalTask(const edm::ParameterSet &, const edm::ParameterSet &)
const_iterator begin() const
int adc() const
get the ADC sample (12 bits)