58 for (
int i = 0;
i < 18;
i++) {
105 for (
int i = 0;
i < 18;
i++) {
148 std::stringstream LedN, LN;
161 for (
int i = 0;
i < 18;
i++) {
163 meShapeMapL1_[
i] =
dqmStore_->
bookProfile2D(name, name, 850, 0., 850., 10, 0., 10., 4096, 0., 4096.,
"s");
169 name =
"EELDT amplitude " +
Numbers::sEE(i+1) +
" " + LN.str();
170 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");
176 name =
"EELDT timing " +
Numbers::sEE(i+1) +
" " + LN.str();
177 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");
183 name =
"EELDT amplitude over PN " +
Numbers::sEE(i+1) +
" " + LN.str();
184 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");
194 for (
int i = 0;
i < 18;
i++) {
195 name =
"EELDT PNs amplitude " +
Numbers::sEE(
i+1) +
" G01 " + LN.str();
201 name =
"EELDT PNs pedestal " +
Numbers::sEE(i+1) +
" G01 " + LN.str();
210 for (
int i = 0;
i < 18;
i++) {
211 name =
"EELDT PNs amplitude " +
Numbers::sEE(
i+1) +
" G16 " + LN.str();
217 name =
"EELDT PNs pedestal " +
Numbers::sEE(i+1) +
" G16 " + LN.str();
234 for (
int i = 0;
i < 18;
i++) {
236 meShapeMapL2_[
i] =
dqmStore_->
bookProfile2D(name, name, 850, 0., 850., 10, 0., 10., 4096, 0., 4096.,
"s");
242 name =
"EELDT amplitude " +
Numbers::sEE(i+1) +
" " + LN.str();
243 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");
249 name =
"EELDT timing " +
Numbers::sEE(i+1) +
" " + LN.str();
250 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");
256 name =
"EELDT amplitude over PN " +
Numbers::sEE(i+1) +
" " + LN.str();
257 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");
267 for (
int i = 0;
i < 18;
i++) {
268 name =
"EELDT PNs amplitude " +
Numbers::sEE(
i+1) +
" G01 " + LN.str();
274 name =
"EELDT PNs pedestal " +
Numbers::sEE(i+1) +
" G01 " + LN.str();
283 for (
int i = 0;
i < 18;
i++) {
284 name =
"EELDT PNs amplitude " +
Numbers::sEE(
i+1) +
" G16 " + LN.str();
290 name =
"EELDT PNs pedestal " +
Numbers::sEE(i+1) +
" G16 " + LN.str();
305 if ( !
init_ )
return;
313 for (
int i = 0;
i < 18;
i++) {
329 for (
int i = 0;
i < 18;
i++) {
347 for (
int i = 0;
i < 18;
i++) {
355 for (
int i = 0;
i < 18;
i++) {
369 for (
int i = 0;
i < 18;
i++) {
377 for (
int i = 0;
i < 18;
i++) {
404 for (
int i=0;
i<18;
i++) runType[
i] = -1;
406 for (
int i=0;
i<18;
i++) rtHalf[
i] = -1;
408 for (
int i=0;
i<18;
i++) waveLength[
i] = -1;
420 runType[ism-1] = dcchItr->getRunType();
421 rtHalf[ism-1] = dcchItr->getRtHalf();
422 waveLength[ism-1] = dcchItr->getEventSettings().wavelength;
435 if ( ! enable )
return;
443 for (
int i = 0;
i < 80;
i++ ) {
448 std::vector<int> PNs;
456 for(
int i(0);
i < 10;
i++)
478 for (
int i = 0;
i < 10;
i++) {
487 if(iMax >= 0 && max - min > 20.)
494 for(
int i(0);
i < 10;
i++){
495 if(maxpos[
i] > threshold){
503 int need = digis->size();
504 LogDebug(
"EELedTask") <<
"event " <<
ievt_ <<
" digi collection size " << need;
525 for (
int i = 0;
i < 10;
i++) {
533 if ( waveLength[ism-1] == 0 ) meShapeMap =
meShapeMapL1_[ism-1];
534 if ( waveLength[ism-1] == 2 ) meShapeMap =
meShapeMapL2_[ism-1];
542 float xval = float(adc);
544 if ( meShapeMap ) meShapeMap->
Fill(ic - 0.5,
i + 0.5, xval);
550 for (
unsigned int i=0;
i<PNs.size();
i++) {
552 if ( ipn >= 0 && ipn < 80 ) numPN[ipn] =
true;
567 int nep = pns->size();
568 LogDebug(
"EELedTask") <<
"event " <<
ievt_ <<
" pns collection size " << nep;
576 int num = pnItr->id().iPnId();
583 if ( ipn >= 0 && ipn < 80 && numPN[ipn] ==
false )
continue;
587 for (
int i = 0;
i < 4;
i++) {
589 int adc = pnItr->sample(
i).adc();
593 if ( pnItr->sample(
i).gainId() == 0 ) {
597 if ( pnItr->sample(
i).gainId() == 1 ) {
602 float xval = float(adc);
604 if ( mePNPed ) mePNPed->
Fill(num - 0.5, xval);
606 xvalped = xvalped + xval;
610 xvalped = xvalped / 4;
616 for (
int i = 0;
i < 50;
i++) {
618 int adc = pnItr->sample(
i).adc();
620 float xval = float(adc);
622 if ( xval >= xvalmax ) xvalmax = xval;
626 xvalmax = xvalmax - xvalped;
628 if ( pnItr->sample(0).gainId() == 0 ) {
632 if ( pnItr->sample(0).gainId() == 1 ) {
637 if ( mePN ) mePN->
Fill(num - 0.5, xvalmax);
639 if ( ipn >= 0 && ipn < 80 ) adcPN[ipn] = xvalmax;
653 int neh = hits->size();
654 LogDebug(
"EELedTask") <<
"event " <<
ievt_ <<
" hits collection size " << neh;
665 if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
667 float xix = ix - 0.5;
668 float xiy = iy - 0.5;
681 if(waveLength[ism - 1] == 0){
685 if(tower == 1 || tower == 2 || tower == 3 || tower == 4 || tower == 5 || tower == 6 || tower == 9 || tower == 15)
continue;
690 if(tower == 3 || tower == 4 || tower == 10 || tower == 11 || tower == 12 || tower == 18 || tower == 19 || tower == 25)
continue;
696 if ( waveLength[ism-1] == 0 ) {
701 if ( waveLength[ism-1] == 2 ) {
713 float xval = hitItr->amplitude();
714 if ( xval <= 0. ) xval = 0.0;
715 float yval = hitItr->jitter() + 6.0;
716 if ( yval <= 0. ) yval = 0.0;
717 float zval = hitItr->pedestal();
718 if ( zval <= 0. ) zval = 0.0;
720 if ( meAmplMap ) meAmplMap->
Fill(xix, xiy, xval);
723 if ( meTimeMap ) meTimeMap->
Fill(xix, xiy, yval);
730 if ( PNs.size() > 0 ) {
732 if ( ipn >= 0 && ipn < 80 ) {
733 if ( adcPN[ipn] != 0. ) wval = xval / adcPN[ipn];
737 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 std::string sEE(const unsigned ism)
static int ipnEE(const int ism, const int ipnid)
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
MonitorElement * mePnPedMapG01L2_[18]
static unsigned icEE(const unsigned ism, const unsigned ix, const unsigned iy)
void rmdir(const std::string &fullpath)
Some "id" conversions.
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
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]
int towerId() const
get the tower id
MonitorElement * meAmplPNMapL1_[18]
static int ix0EE(const unsigned ism)
static const EcalElectronicsMapping * getElectronicsMapping()
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void beginJob(void)
BeginJob.
static int iy0EE(const unsigned ism)
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
void tag(MonitorElement *me, unsigned int myTag)
MonitorElement * mePnPedMapG01L1_[18]
MonitorElement * meTimeMapL1_[18]
const T & max(const T &a, const T &b)
std::vector< int > ledWavelengths_
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")
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 unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
MonitorElement * meAmplMapL2_[18]
MonitorElement * mePnAmplMapG01L1_[18]
static void getPNs(const int ism, const int ix, const int iy, std::vector< int > &PNsInLM)
static unsigned RtHalf(const EBDetId &id)
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]