57 for (
int i = 0;
i < 18;
i++) {
61 #ifdef COMMON_NOISE_ANALYSIS
104 for (
int i = 0;
i < 18;
i++) {
114 #ifdef COMMON_NOISE_ANALYSIS
137 std::stringstream GainN, GN;
145 GainN <<
"Gain" << std::setw(2) << std::setfill(
'0') << 1;
147 GN <<
"G" << std::setw(2) << std::setfill(
'0') << 1;
150 for (
int i = 0;
i < 18;
i++) {
151 name =
"EEPT pedestal " +
Numbers::sEE(
i+1) +
" " + GN.str();
152 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");
158 #ifdef COMMON_NOISE_ANALYSIS
159 name =
"EEPT pedestal 3sum " +
Numbers::sEE(i+1) +
" " + GN.str();
160 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");
166 name =
"EEPT pedestal 5sum " +
Numbers::sEE(i+1) +
" " + GN.str();
167 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");
180 GainN <<
"Gain" << std::setw(2) << std::setfill(
'0') << 6;
182 GN <<
"G" << std::setw(2) << std::setfill(
'0') << 6;
185 for (
int i = 0;
i < 18;
i++) {
186 name =
"EEPT pedestal " +
Numbers::sEE(
i+1) +
" " + GN.str();
187 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");
193 #ifdef COMMON_NOISE_ANALYSIS
194 name =
"EEPT pedestal 3sum " +
Numbers::sEE(i+1) +
" " + GN.str();
195 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");
201 name =
"EEPT pedestal 5sum " +
Numbers::sEE(i+1) +
" " + GN.str();
202 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");
215 GainN <<
"Gain" << std::setw(2) << std::setfill(
'0') << 12;
217 GN <<
"G" << std::setw(2) << std::setfill(
'0') << 12;
220 for (
int i = 0;
i < 18;
i++) {
221 name =
"EEPT pedestal " +
Numbers::sEE(
i+1) +
" " + GN.str();
222 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");
228 #ifdef COMMON_NOISE_ANALYSIS
229 name =
"EEPT pedestal 3sum " +
Numbers::sEE(i+1) +
" " + GN.str();
230 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");
236 name =
"EEPT pedestal 5sum " +
Numbers::sEE(i+1) +
" " + GN.str();
237 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");
252 GainN <<
"Gain" << std::setw(2) << std::setfill(
'0') << 1;
254 GN <<
"G" << std::setw(2) << std::setfill(
'0') << 1;
257 for (
int i = 0;
i < 18;
i++) {
258 name =
"EEPDT PNs pedestal " +
Numbers::sEE(
i+1) +
" " + GN.str();
270 GainN <<
"Gain" << std::setw(2) << std::setfill(
'0') << 16;
272 GN <<
"G" << std::setw(2) << std::setfill(
'0') << 16;
275 for (
int i = 0;
i < 18;
i++) {
276 name =
"EEPDT PNs pedestal " +
Numbers::sEE(
i+1) +
" " + GN.str();
291 if ( !
init_ )
return;
299 for (
int i = 0;
i < 18;
i++ ) {
302 #ifdef COMMON_NOISE_ANALYSIS
315 for (
int i = 0;
i < 18;
i++ ) {
318 #ifdef COMMON_NOISE_ANALYSIS
331 for (
int i = 0;
i < 18;
i++ ) {
334 #ifdef COMMON_NOISE_ANALYSIS
349 for (
int i = 0;
i < 18;
i++ ) {
359 for (
int i = 0;
i < 18;
i++ ) {
384 for (
int i=0;
i<18;
i++) runType[
i] = -1;
396 runType[ism-1] = dcchItr->getRunType();
409 if ( ! enable )
return;
419 int need = digis->size();
420 LogDebug(
"EEPedestalTask") <<
"event " <<
ievt_ <<
" digi collection size " << need;
422 float xmap01[18][50][50];
423 float xmap06[18][50][50];
424 float xmap12[18][50][50];
427 for (
int ix = 1; ix <= 50; ix++ ) {
428 for (
int iy = 1; iy <= 50; iy++ ) {
430 xmap01[
ism-1][ix-1][iy-1] = 0.;
431 xmap06[
ism-1][ix-1][iy-1] = 0.;
432 xmap12[
ism-1][ix-1][iy-1] = 0.;
447 if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
449 float xix = ix - 0.5;
450 float xiy = iy - 0.5;
457 for (
int i = 0;
i < 10;
i++) {
467 float xval = float(adc);
469 if ( mePedMap ) mePedMap->
Fill(xix, xiy, xval);
485 #ifdef COMMON_NOISE_ANALYSIS
487 for (
int ix = 1; ix <= 50; ix++ ) {
488 for (
int iy = 1; iy <= 50; iy++ ) {
493 if (
ism >= 1 &&
ism <= 9 ) xix = 101 - xix;
497 float xix = ix - 0.5;
498 float xiy = iy - 0.5;
504 if ( ix >= 2 && ix <= 49 && iy >= 2 && iy <= 49 ) {
509 for (
int i = -1;
i <= +1;
i++ ) {
510 for (
int j = -1;
j <= +1;
j++ ) {
512 x3val01 = x3val01 + xmap01[
ism-1][ix-1+
i][iy-1+
j];
513 x3val06 = x3val06 + xmap06[
ism-1][ix-1+
i][iy-1+
j];
514 x3val12 = x3val12 + xmap12[
ism-1][ix-1+
i][iy-1+
j];
518 x3val01 = x3val01 / 9.;
519 x3val06 = x3val06 / 9.;
520 x3val12 = x3val12 / 9.;
531 if ( ix >= 3 && ix <= 48 && iy >= 3 && iy <= 48 ) {
536 for (
int i = -2;
i <= +2;
i++ ) {
537 for (
int j = -2;
j <= +2;
j++ ) {
539 x5val01 = x5val01 + xmap01[
ism-1][ix-1+
i][iy-1+
j];
540 x5val06 = x5val06 + xmap06[
ism-1][ix-1+
i][iy-1+
j];
541 x5val12 = x5val12 + xmap12[
ism-1][ix-1+
i][iy-1+
j];
545 x5val01 = x5val01 / 25.;
546 x5val06 = x5val06 / 25.;
547 x5val12 = x5val12 / 25.;
569 int nep = pns->size();
570 LogDebug(
"EEPedestalTask") <<
"event " <<
ievt_ <<
" pns collection size " << nep;
578 int num = pnItr->id().iPnId();
583 for (
int i = 0;
i < 50;
i++) {
585 int adc = pnItr->sample(
i).adc();
592 float xval = float(adc);
594 if ( mePNPed ) mePNPed->
Fill(num - 0.5, xval);
int adc(sample_type sample)
get the ADC sample (12 bits)
edm::InputTag EcalRawDataCollection_
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]
Some "id" conversions.
edm::InputTag EcalPnDiodeDigiCollection_
std::vector< T >::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)
edm::InputTag EEDigiCollection_
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::string getName(Reflex::Type &cc)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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)
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)
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")