58 for (
int i = 0;
i < 18;
i++) {
102 for (
int i = 0;
i < 18;
i++) {
132 std::stringstream GainN, GN;
140 GainN <<
"Gain" << std::setw(2) << std::setfill(
'0') << 1;
142 GN <<
"G" << std::setw(2) << std::setfill(
'0') << 1;
145 for (
int i = 0;
i < 18;
i++) {
147 meShapeMapG01_[
i] =
dqmStore_->
bookProfile2D(name, name, 850, 0., 850., 10, 0., 10., 4096, 0., 4096.,
"s");
153 name =
"EETPT amplitude " +
Numbers::sEE(i+1) +
" " + GN.str();
154 meAmplMapG01_[
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.*12.,
"s");
166 GainN <<
"Gain" << std::setw(2) << std::setfill(
'0') << 6;
168 GN <<
"G" << std::setw(2) << std::setfill(
'0') << 6;
171 for (
int i = 0;
i < 18;
i++) {
173 meShapeMapG06_[
i] =
dqmStore_->
bookProfile2D(name, name, 850, 0., 850., 10, 0., 10., 4096, 0., 4096.,
"s");
179 name =
"EETPT amplitude " +
Numbers::sEE(i+1) +
" " + GN.str();
180 meAmplMapG06_[
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.*12.,
"s");
192 GainN <<
"Gain" << std::setw(2) << std::setfill(
'0') << 12;
194 GN <<
"G" << std::setw(2) << std::setfill(
'0') << 12;
197 for (
int i = 0;
i < 18;
i++) {
199 meShapeMapG12_[
i] =
dqmStore_->
bookProfile2D(name, name, 850, 0., 850., 10, 0., 10., 4096, 0., 4096.,
"s");
205 name =
"EETPT amplitude " +
Numbers::sEE(i+1) +
" " + GN.str();
206 meAmplMapG12_[
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.*12.,
"s");
220 GainN <<
"Gain" << std::setw(2) << std::setfill(
'0') << 1;
222 GN <<
"G" << std::setw(2) << std::setfill(
'0') << 1;
225 for (
int i = 0;
i < 18;
i++) {
226 name =
"EETPT PNs amplitude " +
Numbers::sEE(
i+1) +
" " + GN.str();
231 name =
"EETPT PNs pedestal " +
Numbers::sEE(i+1) +
" " + GN.str();
243 GainN <<
"Gain" << std::setw(2) << std::setfill(
'0') << 16;
245 GN <<
"G" << std::setw(2) << std::setfill(
'0') << 16;
248 for (
int i = 0;
i < 18;
i++) {
249 name =
"EETPT PNs amplitude " +
Numbers::sEE(
i+1) +
" " + GN.str();
254 name =
"EETPT PNs pedestal " +
Numbers::sEE(i+1) +
" " + GN.str();
269 if ( !
init_ )
return;
277 for (
int i = 0;
i < 18;
i++) {
289 for (
int i = 0;
i < 18;
i++) {
301 for (
int i = 0;
i < 18;
i++) {
315 for (
int i = 0;
i < 18;
i++) {
327 for (
int i = 0;
i < 18;
i++) {
354 for (
int i=0;
i<18;
i++) runType[
i] = -1;
356 for (
int i=0;
i<18;
i++) mgpaGain[
i] = -1;
368 runType[ism-1] = dcchItr->getRunType();
369 mgpaGain[ism-1] = dcchItr->getMgpaGain();
382 if ( ! enable )
return;
392 int need = digis->size();
393 LogDebug(
"EETestPulseTask") <<
"event " <<
ievt_ <<
" digi collection size " << need;
411 for (
int i = 0;
i < 10;
i++) {
421 float xval = float(adc);
423 if ( meShapeMap ) meShapeMap->
Fill(ic - 0.5,
i + 0.5, xval);
439 int neh = hits->size();
440 LogDebug(
"EETestPulseTask") <<
"event " <<
ievt_ <<
" hits collection size " << neh;
451 if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
453 float xix = ix - 0.5;
454 float xiy = iy - 0.5;
461 if ( mgpaGain[ism-1] == 3 ) meAmplMap =
meAmplMapG01_[ism-1];
462 if ( mgpaGain[ism-1] == 2 ) meAmplMap =
meAmplMapG06_[ism-1];
463 if ( mgpaGain[ism-1] == 1 ) meAmplMap =
meAmplMapG12_[ism-1];
465 float xval = hitItr->amplitude();
466 if ( xval <= 0. ) xval = 0.0;
472 if ( meAmplMap ) meAmplMap->
Fill(xix, xiy, xval);
486 int nep = pns->size();
487 LogDebug(
"EETestPulseTask") <<
"event " <<
ievt_ <<
" pns collection size " << nep;
495 int num = pnItr->id().iPnId();
502 for (
int i = 0;
i < 4;
i++) {
504 int adc = pnItr->sample(
i).adc();
511 float xval = float(adc);
513 if ( mePNPed ) mePNPed->
Fill(num - 0.5, xval);
515 xvalped = xvalped + xval;
519 xvalped = xvalped / 4;
525 for (
int i = 0;
i < 50;
i++) {
527 int adc = pnItr->sample(
i).adc();
529 float xval = float(adc);
531 if ( xval >= xvalmax ) xvalmax = xval;
535 xvalmax = xvalmax - xvalped;
540 if ( mePN ) mePN->
Fill(num - 0.5, xvalmax);
int adc(sample_type sample)
get the ADC sample (12 bits)
edm::InputTag EEDigiCollection_
virtual ~EETestPulseTask()
Destructor.
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
static std::string sEE(const unsigned ism)
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
static unsigned icEE(const unsigned ism, const unsigned ix, const unsigned iy)
void rmdir(const std::string &fullpath)
Some "id" conversions.
std::vector< int > MGPAGains_
std::vector< T >::const_iterator const_iterator
MonitorElement * meShapeMapG06_[18]
EcalMGPASample sample(int i) const
MonitorElement * mePnAmplMapG01_[18]
static int ix0EE(const unsigned ism)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static int iy0EE(const unsigned ism)
MonitorElement * meAmplMapG01_[18]
void tag(MonitorElement *me, unsigned int myTag)
EETestPulseTask(const edm::ParameterSet &ps)
Constructor.
void cleanup(void)
Cleanup.
MonitorElement * mePnAmplMapG16_[18]
void removeElement(const std::string &name)
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
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)
edm::InputTag EcalUncalibratedRecHitCollection_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
MonitorElement * meAmplMapG12_[18]
void beginJob(void)
BeginJob.
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
MonitorElement * meShapeMapG12_[18]
MonitorElement * mePnPedMapG01_[18]
edm::InputTag EcalRawDataCollection_
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
edm::InputTag EcalPnDiodeDigiCollection_
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
MonitorElement * meAmplMapG06_[18]
MonitorElement * meShapeMapG01_[18]
MonitorElement * mePnPedMapG16_[18]
static EcalSubdetector subDet(const EBDetId &id)
int ism(int ieta, int iphi)
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)
std::vector< int > MGPAGainsPN_
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")