55 for (
int i = 0;
i < 18;
i++) {
102 for (
int i = 0;
i < 18;
i++) {
145 std::stringstream LedN, LN;
158 for (
int i = 0;
i < 18;
i++) {
160 meShapeMapL1_[
i] =
dqmStore_->
bookProfile2D(name, name, 850, 0., 850., 10, 0., 10., 4096, 0., 4096.,
"s");
166 name =
"EELDT amplitude " +
Numbers::sEE(i+1) +
" " + LN.str();
167 meAmplMapL1_[
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");
173 name =
"EELDT timing " +
Numbers::sEE(i+1) +
" " + LN.str();
174 meTimeMapL1_[
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., 250, 0., 10.,
"s");
180 name =
"EELDT amplitude over PN " +
Numbers::sEE(i+1) +
" " + LN.str();
181 meAmplPNMapL1_[
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");
191 for (
int i = 0;
i < 18;
i++) {
192 name =
"EELDT PNs amplitude " +
Numbers::sEE(
i+1) +
" G01 " + LN.str();
198 name =
"EELDT PNs pedestal " +
Numbers::sEE(i+1) +
" G01 " + LN.str();
207 for (
int i = 0;
i < 18;
i++) {
208 name =
"EELDT PNs amplitude " +
Numbers::sEE(
i+1) +
" G16 " + LN.str();
214 name =
"EELDT PNs pedestal " +
Numbers::sEE(i+1) +
" G16 " + LN.str();
231 for (
int i = 0;
i < 18;
i++) {
233 meShapeMapL2_[
i] =
dqmStore_->
bookProfile2D(name, name, 850, 0., 850., 10, 0., 10., 4096, 0., 4096.,
"s");
239 name =
"EELDT amplitude " +
Numbers::sEE(i+1) +
" " + LN.str();
240 meAmplMapL2_[
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");
246 name =
"EELDT timing " +
Numbers::sEE(i+1) +
" " + LN.str();
247 meTimeMapL2_[
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., 250, 0., 10.,
"s");
253 name =
"EELDT amplitude over PN " +
Numbers::sEE(i+1) +
" " + LN.str();
254 meAmplPNMapL2_[
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");
264 for (
int i = 0;
i < 18;
i++) {
265 name =
"EELDT PNs amplitude " +
Numbers::sEE(
i+1) +
" G01 " + LN.str();
271 name =
"EELDT PNs pedestal " +
Numbers::sEE(i+1) +
" G01 " + LN.str();
280 for (
int i = 0;
i < 18;
i++) {
281 name =
"EELDT PNs amplitude " +
Numbers::sEE(
i+1) +
" G16 " + LN.str();
287 name =
"EELDT PNs pedestal " +
Numbers::sEE(i+1) +
" G16 " + LN.str();
302 if ( !
init_ )
return;
310 for (
int i = 0;
i < 18;
i++) {
326 for (
int i = 0;
i < 18;
i++) {
344 for (
int i = 0;
i < 18;
i++) {
352 for (
int i = 0;
i < 18;
i++) {
366 for (
int i = 0;
i < 18;
i++) {
374 for (
int i = 0;
i < 18;
i++) {
401 for (
int i=0;
i<18;
i++) runType[
i] = -1;
403 for (
int i=0;
i<18;
i++) rtHalf[
i] = -1;
405 for (
int i=0;
i<18;
i++) waveLength[
i] = -1;
417 runType[ism-1] = dcchItr->getRunType();
418 rtHalf[ism-1] = dcchItr->getRtHalf();
419 waveLength[ism-1] = dcchItr->getEventSettings().wavelength;
432 if ( ! enable )
return;
440 for (
int i = 0;
i < 80;
i++ ) {
445 std::vector<int> PNs;
452 int need = digis->size();
453 LogDebug(
"EELedTask") <<
"event " <<
ievt_ <<
" digi collection size " << need;
474 for (
int i = 0;
i < 10;
i++) {
487 if ( waveLength[ism-1] == 0 ) meShapeMap =
meShapeMapL1_[ism-1];
488 if ( waveLength[ism-1] == 2 ) meShapeMap =
meShapeMapL2_[ism-1];
497 float xval = float(adc);
499 if ( meShapeMap ) meShapeMap->
Fill(ic - 0.5,
i + 0.5, xval);
505 for (
unsigned int i=0;
i<PNs.size();
i++) {
507 if ( ipn >= 0 && ipn < 80 ) numPN[ipn] =
true;
522 int nep = pns->size();
523 LogDebug(
"EELedTask") <<
"event " <<
ievt_ <<
" pns collection size " << nep;
531 int num = pnItr->id().iPnId();
538 if ( ipn >= 0 && ipn < 80 && numPN[ipn] ==
false )
continue;
542 for (
int i = 0;
i < 4;
i++) {
544 int adc = pnItr->sample(
i).adc();
548 if ( pnItr->sample(
i).gainId() == 0 ) {
552 if ( pnItr->sample(
i).gainId() == 1 ) {
557 float xval = float(adc);
559 if ( mePNPed ) mePNPed->
Fill(num - 0.5, xval);
561 xvalped = xvalped + xval;
565 xvalped = xvalped / 4;
571 for (
int i = 0;
i < 50;
i++) {
573 int adc = pnItr->sample(
i).adc();
575 float xval = float(adc);
577 if ( xval >= xvalmax ) xvalmax = xval;
581 xvalmax = xvalmax - xvalped;
583 if ( pnItr->sample(0).gainId() == 0 ) {
587 if ( pnItr->sample(0).gainId() == 1 ) {
592 if ( mePN ) mePN->
Fill(num - 0.5, xvalmax);
594 if ( ipn >= 0 && ipn < 80 ) adcPN[ipn] = xvalmax;
608 int neh = hits->size();
609 LogDebug(
"EELedTask") <<
"event " <<
ievt_ <<
" hits collection size " << neh;
620 if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
622 float xix = ix - 0.5;
623 float xiy = iy - 0.5;
637 if ( waveLength[ism-1] == 0 ) {
642 if ( waveLength[ism-1] == 2 ) {
654 float xval = hitItr->amplitude();
655 if ( xval <= 0. ) xval = 0.0;
656 float yval = hitItr->jitter() + 6.0;
657 if ( yval <= 0. ) yval = 0.0;
658 float zval = hitItr->pedestal();
659 if ( zval <= 0. ) zval = 0.0;
661 if ( meAmplMap ) meAmplMap->
Fill(xix, xiy, xval);
664 if ( meTimeMap ) meTimeMap->
Fill(xix, xiy, yval);
671 if ( PNs.size() > 0 ) {
673 if ( ipn >= 0 && ipn < 80 ) {
674 if ( adcPN[ipn] != 0. ) wval = xval / adcPN[ipn];
678 if ( meAmplPNMap ) meAmplPNMap->
Fill(xix, xiy, wval);
int adc(sample_type sample)
get the ADC sample (12 bits)
Some "id" conversions.
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
static int ipnEE(const int ism, const int ipnid)
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
MonitorElement * mePnPedMapG01L2_[18]
void rmdir(const std::string &fullpath)
static int RtHalf(const EBDetId &id)
static int iy0EE(const int ism)
Some "id" conversions.
static std::string sEE(const int ism)
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
edm::InputTag EcalUncalibratedRecHitCollection_
std::vector< T >::const_iterator const_iterator
EcalMGPASample sample(int i) const
MonitorElement * meAmplPNMapL2_[18]
MonitorElement * mePnAmplMapG01L2_[18]
MonitorElement * meAmplPNMapL1_[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)
void beginJob(void)
BeginJob.
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
void tag(MonitorElement *me, unsigned int myTag)
MonitorElement * mePnPedMapG01L1_[18]
MonitorElement * meTimeMapL1_[18]
static int iSM(const int ism, const EcalSubdetector subdet)
std::vector< int > ledWavelengths_
static int icEE(const int ism, const int ix, const int iy)
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
void removeElement(const std::string &name)
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
MonitorElement * meAmplMapL1_[18]
MonitorElement * meShapeMapL1_[18]
MonitorElement * mePnAmplMapG16L1_[18]
void cleanup(void)
Cleanup.
MonitorElement * meTimeMapL2_[18]
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
MonitorElement * meShapeMapL2_[18]
edm::InputTag EEDigiCollection_
MonitorElement * mePnPedMapG16L2_[18]
static int ix0EE(const int ism)
MonitorElement * meAmplMapL2_[18]
MonitorElement * mePnAmplMapG01L1_[18]
static void getPNs(const int ism, const int ix, const int iy, std::vector< int > &PNsInLM)
static EcalSubdetector subDet(const EBDetId &id)
EELedTask(const edm::ParameterSet &ps)
Constructor.
edm::InputTag EcalPnDiodeDigiCollection_
int ism(int ieta, int iphi)
virtual ~EELedTask()
Destructor.
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::InputTag EcalRawDataCollection_
void setCurrentFolder(const std::string &fullpath)
int adc() const
get the ADC sample (12 bits)
MonitorElement * mePnPedMapG16L1_[18]
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")
MonitorElement * mePnAmplMapG16L2_[18]