53 for (
int i = 0;
i < 18;
i++) {
57 #ifdef COMMON_NOISE_ANALYSIS
100 for (
int i = 0;
i < 18;
i++) {
110 #ifdef COMMON_NOISE_ANALYSIS
133 std::stringstream GainN, GN;
141 GainN <<
"Gain" << std::setw(2) << std::setfill(
'0') << 1;
143 GN <<
"G" << std::setw(2) << std::setfill(
'0') << 1;
146 for (
int i = 0;
i < 18;
i++) {
147 name =
"EEPT pedestal " +
Numbers::sEE(
i+1) +
" " + GN.str();
148 mePedMapG01_[
i] =
dqmStore_->
bookProfile2D(name, name, 50,
Numbers::ix0EE(
i+1)+0.,
Numbers::ix0EE(
i+1)+50., 50,
Numbers::iy0EE(
i+1)+0.,
Numbers::iy0EE(
i+1)+50., 4096, 0., 4096.,
"s");
154 #ifdef COMMON_NOISE_ANALYSIS
155 name =
"EEPT pedestal 3sum " +
Numbers::sEE(i+1) +
" " + GN.str();
156 mePed3SumMapG01_[
i] =
dqmStore_->
bookProfile2D(name, name, 50,
Numbers::ix0EE(i+1)+0.,
Numbers::ix0EE(i+1)+50., 50,
Numbers::iy0EE(i+1)+0.,
Numbers::iy0EE(i+1)+50., 4096, 0., 4096.,
"s");
162 name =
"EEPT pedestal 5sum " +
Numbers::sEE(i+1) +
" " + GN.str();
163 mePed5SumMapG01_[
i] =
dqmStore_->
bookProfile2D(name, name, 50,
Numbers::ix0EE(i+1)+0.,
Numbers::ix0EE(i+1)+50., 50,
Numbers::iy0EE(i+1)+0.,
Numbers::iy0EE(i+1)+50., 4096, 0., 4096.,
"s");
176 GainN <<
"Gain" << std::setw(2) << std::setfill(
'0') << 6;
178 GN <<
"G" << std::setw(2) << std::setfill(
'0') << 6;
181 for (
int i = 0;
i < 18;
i++) {
182 name =
"EEPT pedestal " +
Numbers::sEE(
i+1) +
" " + GN.str();
183 mePedMapG06_[
i] =
dqmStore_->
bookProfile2D(name, name, 50,
Numbers::ix0EE(
i+1)+0.,
Numbers::ix0EE(
i+1)+50., 50,
Numbers::iy0EE(
i+1)+0.,
Numbers::iy0EE(
i+1)+50., 4096, 0., 4096.,
"s");
189 #ifdef COMMON_NOISE_ANALYSIS
190 name =
"EEPT pedestal 3sum " +
Numbers::sEE(i+1) +
" " + GN.str();
191 mePed3SumMapG06_[
i] =
dqmStore_->
bookProfile2D(name, name, 50,
Numbers::ix0EE(i+1)+0.,
Numbers::ix0EE(i+1)+50., 50,
Numbers::iy0EE(i+1)+0.,
Numbers::iy0EE(i+1)+50., 4096, 0., 4096.,
"s");
197 name =
"EEPT pedestal 5sum " +
Numbers::sEE(i+1) +
" " + GN.str();
198 mePed5SumMapG06_[
i] =
dqmStore_->
bookProfile2D(name, name, 50,
Numbers::ix0EE(i+1)+0.,
Numbers::ix0EE(i+1)+50., 50,
Numbers::iy0EE(i+1)+0.,
Numbers::iy0EE(i+1)+50., 4096, 0., 4096.,
"s");
211 GainN <<
"Gain" << std::setw(2) << std::setfill(
'0') << 12;
213 GN <<
"G" << std::setw(2) << std::setfill(
'0') << 12;
216 for (
int i = 0;
i < 18;
i++) {
217 name =
"EEPT pedestal " +
Numbers::sEE(
i+1) +
" " + GN.str();
218 mePedMapG12_[
i] =
dqmStore_->
bookProfile2D(name, name, 50,
Numbers::ix0EE(
i+1)+0.,
Numbers::ix0EE(
i+1)+50., 50,
Numbers::iy0EE(
i+1)+0.,
Numbers::iy0EE(
i+1)+50., 4096, 0., 4096.,
"s");
224 #ifdef COMMON_NOISE_ANALYSIS
225 name =
"EEPT pedestal 3sum " +
Numbers::sEE(i+1) +
" " + GN.str();
226 mePed3SumMapG12_[
i] =
dqmStore_->
bookProfile2D(name, name, 50,
Numbers::ix0EE(i+1)+0.,
Numbers::ix0EE(i+1)+50., 50,
Numbers::iy0EE(i+1)+0.,
Numbers::iy0EE(i+1)+50., 4096, 0., 4096.,
"s");
232 name =
"EEPT pedestal 5sum " +
Numbers::sEE(i+1) +
" " + GN.str();
233 mePed5SumMapG12_[
i] =
dqmStore_->
bookProfile2D(name, name, 50,
Numbers::ix0EE(i+1)+0.,
Numbers::ix0EE(i+1)+50., 50,
Numbers::iy0EE(i+1)+0.,
Numbers::iy0EE(i+1)+50., 4096, 0., 4096.,
"s");
248 GainN <<
"Gain" << std::setw(2) << std::setfill(
'0') << 1;
250 GN <<
"G" << std::setw(2) << std::setfill(
'0') << 1;
253 for (
int i = 0;
i < 18;
i++) {
254 name =
"EEPDT PNs pedestal " +
Numbers::sEE(
i+1) +
" " + GN.str();
266 GainN <<
"Gain" << std::setw(2) << std::setfill(
'0') << 16;
268 GN <<
"G" << std::setw(2) << std::setfill(
'0') << 16;
271 for (
int i = 0;
i < 18;
i++) {
272 name =
"EEPDT PNs pedestal " +
Numbers::sEE(
i+1) +
" " + GN.str();
287 if ( !
init_ )
return;
295 for (
int i = 0;
i < 18;
i++ ) {
298 #ifdef COMMON_NOISE_ANALYSIS
311 for (
int i = 0;
i < 18;
i++ ) {
314 #ifdef COMMON_NOISE_ANALYSIS
327 for (
int i = 0;
i < 18;
i++ ) {
330 #ifdef COMMON_NOISE_ANALYSIS
345 for (
int i = 0;
i < 18;
i++ ) {
355 for (
int i = 0;
i < 18;
i++ ) {
380 for (
int i=0;
i<18;
i++) runType[
i] = -1;
392 runType[ism-1] = dcchItr->getRunType();
401 edm::LogWarning(
"EEPedestalTask") <<
"EcalRawDataCollection not available";
405 if ( ! enable )
return;
415 int need = digis->size();
416 LogDebug(
"EEPedestalTask") <<
"event " <<
ievt_ <<
" digi collection size " << need;
418 float xmap01[18][50][50];
419 float xmap06[18][50][50];
420 float xmap12[18][50][50];
423 for (
int ix = 1; ix <= 50; ix++ ) {
424 for (
int iy = 1; iy <= 50; iy++ ) {
426 xmap01[
ism-1][ix-1][iy-1] = 0.;
427 xmap06[
ism-1][ix-1][iy-1] = 0.;
428 xmap12[
ism-1][ix-1][iy-1] = 0.;
443 if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
445 float xix = ix - 0.5;
446 float xiy = iy - 0.5;
453 for (
int i = 0;
i < 10;
i++) {
463 float xval = float(adc);
465 if ( mePedMap ) mePedMap->
Fill(xix, xiy, xval);
481 #ifdef COMMON_NOISE_ANALYSIS
483 for (
int ix = 1; ix <= 50; ix++ ) {
484 for (
int iy = 1; iy <= 50; iy++ ) {
489 if (
ism >= 1 &&
ism <= 9 ) xix = 101 - xix;
493 float xix = ix - 0.5;
494 float xiy = iy - 0.5;
500 if ( ix >= 2 && ix <= 49 && iy >= 2 && iy <= 49 ) {
505 for (
int i = -1;
i <= +1;
i++ ) {
506 for (
int j = -1;
j <= +1;
j++ ) {
508 x3val01 = x3val01 + xmap01[
ism-1][ix-1+
i][iy-1+
j];
509 x3val06 = x3val06 + xmap06[
ism-1][ix-1+
i][iy-1+
j];
510 x3val12 = x3val12 + xmap12[
ism-1][ix-1+
i][iy-1+
j];
514 x3val01 = x3val01 / 9.;
515 x3val06 = x3val06 / 9.;
516 x3val12 = x3val12 / 9.;
527 if ( ix >= 3 && ix <= 48 && iy >= 3 && iy <= 48 ) {
532 for (
int i = -2;
i <= +2;
i++ ) {
533 for (
int j = -2;
j <= +2;
j++ ) {
535 x5val01 = x5val01 + xmap01[
ism-1][ix-1+
i][iy-1+
j];
536 x5val06 = x5val06 + xmap06[
ism-1][ix-1+
i][iy-1+
j];
537 x5val12 = x5val12 + xmap12[
ism-1][ix-1+
i][iy-1+
j];
541 x5val01 = x5val01 / 25.;
542 x5val06 = x5val06 / 25.;
543 x5val12 = x5val12 / 25.;
565 int nep = pns->size();
566 LogDebug(
"EEPedestalTask") <<
"event " <<
ievt_ <<
" pns collection size " << nep;
574 int num = pnItr->id().iPnId();
579 for (
int i = 0;
i < 50;
i++) {
581 int adc = pnItr->sample(
i).adc();
588 float xval = float(adc);
590 if ( mePNPed ) mePNPed->
Fill(num - 0.5, xval);
598 edm::LogWarning(
"EEPedestalTask") <<
"EcalPnDiodeDigiCollection not available";
int adc(sample_type sample)
get the ADC sample (12 bits)
T getParameter(std::string const &) const
MonitorElement * mePedMapG06_[18]
T getUntrackedParameter(std::string const &, T const &) const
static std::string sEE(const unsigned ism)
static bool validEE(const unsigned ism, const unsigned ix, const unsigned iy)
MonitorElement * mePedMapG12_[18]
void cleanup(void)
Cleanup.
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
void rmdir(const std::string &fullpath)
MonitorElement * mePedMapG01_[18]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Some "id" conversions.
std::vector< EcalDCCHeaderBlock >::const_iterator const_iterator
EcalMGPASample sample(int i) const
static int ix0EE(const unsigned ism)
MonitorElement * mePnPedMapG16_[18]
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)
static int iy0EE(const unsigned ism)
void tag(MonitorElement *me, unsigned int myTag)
EEPedestalTask(const edm::ParameterSet &ps)
Constructor.
void beginJob(void)
BeginJob.
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
virtual ~EEPedestalTask()
Destructor.
void removeElement(const std::string &name)
MonitorElement * mePed3SumMapG06_[18]
MonitorElement * mePed5SumMapG06_[18]
MonitorElement * mePed3SumMapG01_[18]
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
std::vector< int > MGPAGains_
MonitorElement * mePed5SumMapG12_[18]
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
MonitorElement * mePnPedMapG01_[18]
std::vector< int > MGPAGainsPN_
MonitorElement * mePed5SumMapG01_[18]
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
edm::EDGetTokenT< EcalRawDataCollection > EcalRawDataCollection_
edm::EDGetTokenT< EEDigiCollection > EEDigiCollection_
static EcalSubdetector subDet(const EBDetId &id)
int ism(int ieta, int iphi)
MonitorElement * mePed3SumMapG12_[18]
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
edm::EDGetTokenT< EcalPnDiodeDigiCollection > EcalPnDiodeDigiCollection_
void setCurrentFolder(const std::string &fullpath)
int adc() const
get the ADC sample (12 bits)
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")