55 for (
int i = 0;
i < 18;
i++) {
102 for (
int i = 0;
i < 18;
i++) {
152 for (
int i = 0;
i < 18;
i++) {
153 sprintf(histo,
"EELDT shape %s L1",
Numbers::sEE(
i+1).c_str());
154 meShapeMapL1_[
i] =
dqmStore_->
bookProfile2D(histo, histo, 850, 0., 850., 10, 0., 10., 4096, 0., 4096.,
"s");
159 sprintf(histo,
"EELDT amplitude %s L1",
Numbers::sEE(i+1).c_str());
160 meAmplMapL1_[
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.*12.,
"s");
165 sprintf(histo,
"EELDT timing %s L1",
Numbers::sEE(i+1).c_str());
166 meTimeMapL1_[
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., 250, 0., 10.,
"s");
171 sprintf(histo,
"EELDT amplitude over PN %s L1",
Numbers::sEE(i+1).c_str());
172 meAmplPNMapL1_[
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.*12.,
"s");
184 for (
int i = 0;
i < 18;
i++) {
185 sprintf(histo,
"EELDT shape %s L2",
Numbers::sEE(
i+1).c_str());
186 meShapeMapL2_[
i] =
dqmStore_->
bookProfile2D(histo, histo, 850, 0., 850., 10, 0., 10., 4096, 0., 4096.,
"s");
191 sprintf(histo,
"EELDT amplitude %s L2",
Numbers::sEE(i+1).c_str());
192 meAmplMapL2_[
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.*12.,
"s");
197 sprintf(histo,
"EELDT timing %s L2",
Numbers::sEE(i+1).c_str());
198 meTimeMapL2_[
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., 250, 0., 10.,
"s");
203 sprintf(histo,
"EELDT amplitude over PN %s L2",
Numbers::sEE(i+1).c_str());
204 meAmplPNMapL2_[
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.*12.,
"s");
218 for (
int i = 0;
i < 18;
i++) {
219 sprintf(histo,
"EELDT PNs amplitude %s G01 L1",
Numbers::sEE(
i+1).c_str());
224 sprintf(histo,
"EELDT PNs pedestal %s G01 L1",
Numbers::sEE(i+1).c_str());
232 for (
int i = 0;
i < 18;
i++) {
233 sprintf(histo,
"EELDT PNs amplitude %s G16 L1",
Numbers::sEE(
i+1).c_str());
238 sprintf(histo,
"EELDT PNs pedestal %s G16 L1",
Numbers::sEE(i+1).c_str());
252 for (
int i = 0;
i < 18;
i++) {
253 sprintf(histo,
"EELDT PNs amplitude %s G01 L2",
Numbers::sEE(
i+1).c_str());
258 sprintf(histo,
"EELDT PNs pedestal %s G01 L2",
Numbers::sEE(i+1).c_str());
266 for (
int i = 0;
i < 18;
i++) {
267 sprintf(histo,
"EELDT PNs amplitude %s G16 L2",
Numbers::sEE(
i+1).c_str());
272 sprintf(histo,
"EELDT PNs pedestal %s G16 L2",
Numbers::sEE(i+1).c_str());
287 if ( !
init_ )
return;
295 for (
int i = 0;
i < 18;
i++) {
311 for (
int i = 0;
i < 18;
i++) {
329 for (
int i = 0;
i < 18;
i++) {
337 for (
int i = 0;
i < 18;
i++) {
351 for (
int i = 0;
i < 18;
i++) {
359 for (
int i = 0;
i < 18;
i++) {
386 for (
int i=0;
i<18;
i++) runType[
i] = -1;
388 for (
int i=0;
i<18;
i++) rtHalf[
i] = -1;
390 for (
int i=0;
i<18;
i++) waveLength[
i] = -1;
402 runType[ism-1] = dcchItr->getRunType();
403 rtHalf[ism-1] = dcchItr->getRtHalf();
404 waveLength[ism-1] = dcchItr->getEventSettings().wavelength;
417 if ( ! enable )
return;
425 for (
int i = 0;
i < 80;
i++ ) {
430 std::vector<int> PNs;
437 int need = digis->size();
438 LogDebug(
"EELedTask") <<
"event " <<
ievt_ <<
" digi collection size " << need;
459 for (
int i = 0;
i < 10;
i++) {
472 if ( waveLength[ism-1] == 0 ) meShapeMap =
meShapeMapL1_[ism-1];
473 if ( waveLength[ism-1] == 2 ) meShapeMap =
meShapeMapL2_[ism-1];
482 float xval = float(adc);
484 if ( meShapeMap ) meShapeMap->
Fill(ic - 0.5,
i + 0.5, xval);
490 for (
unsigned int i=0;
i<PNs.size();
i++) {
492 if ( ipn >= 0 && ipn < 80 ) numPN[ipn] =
true;
507 int nep = pns->size();
508 LogDebug(
"EELedTask") <<
"event " <<
ievt_ <<
" pns collection size " << nep;
516 int num = pnItr->id().iPnId();
523 if ( ipn >= 0 && ipn < 80 && numPN[ipn] ==
false )
continue;
527 for (
int i = 0;
i < 4;
i++) {
529 int adc = pnItr->sample(
i).adc();
533 if ( pnItr->sample(
i).gainId() == 0 ) {
537 if ( pnItr->sample(
i).gainId() == 1 ) {
542 float xval = float(adc);
544 if ( mePNPed ) mePNPed->
Fill(num - 0.5, xval);
546 xvalped = xvalped + xval;
550 xvalped = xvalped / 4;
556 for (
int i = 0;
i < 50;
i++) {
558 int adc = pnItr->sample(
i).adc();
560 float xval = float(adc);
562 if ( xval >= xvalmax ) xvalmax = xval;
566 xvalmax = xvalmax - xvalped;
568 if ( pnItr->sample(0).gainId() == 0 ) {
572 if ( pnItr->sample(0).gainId() == 1 ) {
577 if ( mePN ) mePN->
Fill(num - 0.5, xvalmax);
579 if ( ipn >= 0 && ipn < 80 ) adcPN[ipn] = xvalmax;
593 int neh = hits->size();
594 LogDebug(
"EELedTask") <<
"event " <<
ievt_ <<
" hits collection size " << neh;
605 if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
607 float xix = ix - 0.5;
608 float xiy = iy - 0.5;
622 if ( waveLength[ism-1] == 0 ) {
627 if ( waveLength[ism-1] == 2 ) {
639 float xval = hitItr->amplitude();
640 if ( xval <= 0. ) xval = 0.0;
641 float yval = hitItr->jitter() + 6.0;
642 if ( yval <= 0. ) yval = 0.0;
643 float zval = hitItr->pedestal();
644 if ( zval <= 0. ) zval = 0.0;
646 if ( meAmplMap ) meAmplMap->
Fill(xix, xiy, xval);
649 if ( meTimeMap ) meTimeMap->
Fill(xix, xiy, yval);
656 if ( PNs.size() > 0 ) {
658 if ( ipn >= 0 && ipn < 80 ) {
659 if ( adcPN[ipn] != 0. ) wval = xval / adcPN[ipn];
663 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]