56 for (
int i = 0;
i < 18;
i++) {
60 #ifdef COMMON_NOISE_ANALYSIS
103 for (
int i = 0;
i < 18;
i++) {
113 #ifdef COMMON_NOISE_ANALYSIS
143 for (
int i = 0;
i < 18;
i++) {
144 sprintf(histo,
"EEPT pedestal %s G01",
Numbers::sEE(
i+1).c_str());
145 mePedMapG01_[
i] =
dqmStore_->
bookProfile2D(histo, histo, 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");
150 #ifdef COMMON_NOISE_ANALYSIS
151 sprintf(histo,
"EEPT pedestal 3sum %s G01",
Numbers::sEE(i+1).c_str());
152 mePed3SumMapG01_[
i] =
dqmStore_->
bookProfile2D(histo, histo, 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");
157 sprintf(histo,
"EEPT pedestal 5sum %s G01",
Numbers::sEE(i+1).c_str());
158 mePed5SumMapG01_[
i] =
dqmStore_->
bookProfile2D(histo, histo, 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");
171 for (
int i = 0;
i < 18;
i++) {
172 sprintf(histo,
"EEPT pedestal %s G06",
Numbers::sEE(
i+1).c_str());
173 mePedMapG06_[
i] =
dqmStore_->
bookProfile2D(histo, histo, 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");
178 #ifdef COMMON_NOISE_ANALYSIS
179 sprintf(histo,
"EEPT pedestal 3sum %s G06",
Numbers::sEE(i+1).c_str());
180 mePed3SumMapG06_[
i] =
dqmStore_->
bookProfile2D(histo, histo, 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");
185 sprintf(histo,
"EEPT pedestal 5sum %s G06",
Numbers::sEE(i+1).c_str());
186 mePed5SumMapG06_[
i] =
dqmStore_->
bookProfile2D(histo, histo, 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");
199 for (
int i = 0;
i < 18;
i++) {
200 sprintf(histo,
"EEPT pedestal %s G12",
Numbers::sEE(
i+1).c_str());
201 mePedMapG12_[
i] =
dqmStore_->
bookProfile2D(histo, histo, 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");
206 #ifdef COMMON_NOISE_ANALYSIS
207 sprintf(histo,
"EEPT pedestal 3sum %s G12",
Numbers::sEE(i+1).c_str());
208 mePed3SumMapG12_[
i] =
dqmStore_->
bookProfile2D(histo, histo, 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");
213 sprintf(histo,
"EEPT pedestal 5sum %s G12",
Numbers::sEE(i+1).c_str());
214 mePed5SumMapG12_[
i] =
dqmStore_->
bookProfile2D(histo, histo, 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");
229 for (
int i = 0;
i < 18;
i++) {
230 sprintf(histo,
"EEPDT PNs pedestal %s G01",
Numbers::sEE(
i+1).c_str());
242 for (
int i = 0;
i < 18;
i++) {
243 sprintf(histo,
"EEPDT PNs pedestal %s G16",
Numbers::sEE(
i+1).c_str());
258 if ( !
init_ )
return;
266 for (
int i = 0;
i < 18;
i++ ) {
269 #ifdef COMMON_NOISE_ANALYSIS
282 for (
int i = 0;
i < 18;
i++ ) {
285 #ifdef COMMON_NOISE_ANALYSIS
298 for (
int i = 0;
i < 18;
i++ ) {
301 #ifdef COMMON_NOISE_ANALYSIS
316 for (
int i = 0;
i < 18;
i++ ) {
326 for (
int i = 0;
i < 18;
i++ ) {
351 for (
int i=0;
i<18;
i++) runType[
i] = -1;
363 runType[ism-1] = dcchItr->getRunType();
376 if ( ! enable )
return;
386 int need = digis->size();
387 LogDebug(
"EEPedestalTask") <<
"event " <<
ievt_ <<
" digi collection size " << need;
389 float xmap01[18][50][50];
390 float xmap06[18][50][50];
391 float xmap12[18][50][50];
394 for (
int ix = 1; ix <= 50; ix++ ) {
395 for (
int iy = 1; iy <= 50; iy++ ) {
397 xmap01[
ism-1][ix-1][iy-1] = 0.;
398 xmap06[
ism-1][ix-1][iy-1] = 0.;
399 xmap12[
ism-1][ix-1][iy-1] = 0.;
414 if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
416 float xix = ix - 0.5;
417 float xiy = iy - 0.5;
424 for (
int i = 0;
i < 10;
i++) {
434 float xval = float(adc);
436 if ( mePedMap ) mePedMap->
Fill(xix, xiy, xval);
452 #ifdef COMMON_NOISE_ANALYSIS
454 for (
int ix = 1; ix <= 50; ix++ ) {
455 for (
int iy = 1; iy <= 50; iy++ ) {
460 if (
ism >= 1 &&
ism <= 9 ) xix = 101 - xix;
464 float xix = ix - 0.5;
465 float xiy = iy - 0.5;
471 if ( ix >= 2 && ix <= 49 && iy >= 2 && iy <= 49 ) {
476 for (
int i = -1;
i <= +1;
i++ ) {
477 for (
int j = -1;
j <= +1;
j++ ) {
479 x3val01 = x3val01 + xmap01[
ism-1][ix-1+
i][iy-1+
j];
480 x3val06 = x3val06 + xmap06[
ism-1][ix-1+
i][iy-1+
j];
481 x3val12 = x3val12 + xmap12[
ism-1][ix-1+
i][iy-1+
j];
485 x3val01 = x3val01 / 9.;
486 x3val06 = x3val06 / 9.;
487 x3val12 = x3val12 / 9.;
498 if ( ix >= 3 && ix <= 48 && iy >= 3 && iy <= 48 ) {
503 for (
int i = -2;
i <= +2;
i++ ) {
504 for (
int j = -2;
j <= +2;
j++ ) {
506 x5val01 = x5val01 + xmap01[
ism-1][ix-1+
i][iy-1+
j];
507 x5val06 = x5val06 + xmap06[
ism-1][ix-1+
i][iy-1+
j];
508 x5val12 = x5val12 + xmap12[
ism-1][ix-1+
i][iy-1+
j];
512 x5val01 = x5val01 / 25.;
513 x5val06 = x5val06 / 25.;
514 x5val12 = x5val12 / 25.;
536 int nep = pns->size();
537 LogDebug(
"EEPedestalTask") <<
"event " <<
ievt_ <<
" pns collection size " << nep;
545 int num = pnItr->id().iPnId();
550 for (
int i = 0;
i < 50;
i++) {
552 int adc = pnItr->sample(
i).adc();
559 float xval = float(adc);
561 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
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]
static int iy0EE(const int ism)
Some "id" conversions.
static std::string sEE(const int ism)
edm::InputTag EcalPnDiodeDigiCollection_
std::vector< T >::const_iterator const_iterator
EcalMGPASample sample(int i) const
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_
void tag(MonitorElement *me, unsigned int myTag)
EEPedestalTask(const edm::ParameterSet &ps)
Constructor.
void beginJob(void)
BeginJob.
static int iSM(const int ism, const EcalSubdetector subdet)
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 int ix0EE(const int ism)
static EcalSubdetector subDet(const EBDetId &id)
static bool validEE(const int ism, const int ix, const int iy)
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")