55 for (
int i = 0;
i < 18;
i++) {
93 for(
int i=0;
i<2;
i++){
131 for (
int i = 0;
i < 18;
i++) {
195 for(
int i=0;
i<2;
i++){
209 std::stringstream LaserN, LN;
217 LaserN <<
"Laser" << 1;
222 for (
int i = 0;
i < 18;
i++) {
224 meShapeMapL1_[
i] =
dqmStore_->
bookProfile2D(name, name, 850, 0., 850., 10, 0., 10., 4096, 0., 4096.,
"s");
230 name =
"EELT amplitude " +
Numbers::sEE(i+1) +
" " + LN.str();
231 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");
237 name =
"EELT timing " +
Numbers::sEE(i+1) +
" " + LN.str();
238 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");
244 name =
"EELT amplitude over PN " +
Numbers::sEE(i+1) +
" " + LN.str();
245 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");
252 name =
"EELT amplitude map " + LN.str() +
" EE -";
257 name =
"EELT amplitude map " + LN.str() +
" EE +";
266 for (
int i = 0;
i < 18;
i++) {
267 name =
"EELT PNs amplitude " +
Numbers::sEE(
i+1) +
" G01 " + LN.str();
273 name =
"EELT PNs pedestal " +
Numbers::sEE(i+1) +
" G01 " + LN.str();
282 for (
int i = 0;
i < 18;
i++) {
283 name =
"EELT PNs amplitude " +
Numbers::sEE(
i+1) +
" G16 " + LN.str();
289 name =
"EELT PNs pedestal " +
Numbers::sEE(i+1) +
" G16 " + LN.str();
301 LaserN <<
"Laser" << 2;
306 for (
int i = 0;
i < 18;
i++) {
308 meShapeMapL2_[
i] =
dqmStore_->
bookProfile2D(name, name, 850, 0., 850., 10, 0., 10., 4096, 0., 4096.,
"s");
314 name =
"EELT amplitude " +
Numbers::sEE(i+1) +
" " + LN.str();
315 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");
321 name =
"EELT timing " +
Numbers::sEE(i+1) +
" " + LN.str();
322 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");
328 name =
"EELT amplitude over PN " +
Numbers::sEE(i+1) +
" " + LN.str();
329 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");
336 name =
"EELT amplitude map " + LN.str() +
" EE -";
341 name =
"EELT amplitude map " + LN.str() +
" EE +";
346 for (
int i = 0;
i < 18;
i++) {
347 name =
"EELT PNs amplitude " +
Numbers::sEE(
i+1) +
" G01 " + LN.str();
353 name =
"EELT PNs pedestal " +
Numbers::sEE(i+1) +
" G01 " + LN.str();
362 for (
int i = 0;
i < 18;
i++) {
363 name =
"EELT PNs amplitude " +
Numbers::sEE(
i+1) +
" G16 " + LN.str();
369 name =
"EELT PNs pedestal " +
Numbers::sEE(i+1) +
" G16 " + LN.str();
381 LaserN <<
"Laser" << 3;
386 for (
int i = 0;
i < 18;
i++) {
388 meShapeMapL3_[
i] =
dqmStore_->
bookProfile2D(name, name, 850, 0., 850., 10, 0., 10., 4096, 0., 4096.,
"s");
394 name =
"EELT amplitude " +
Numbers::sEE(i+1) +
" " + LN.str();
395 meAmplMapL3_[
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");
401 name =
"EELT timing " +
Numbers::sEE(i+1) +
" " + LN.str();
402 meTimeMapL3_[
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");
408 name =
"EELT amplitude over PN " +
Numbers::sEE(i+1) +
" " + LN.str();
409 meAmplPNMapL3_[
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");
416 name =
"EELT amplitude map " + LN.str() +
" EE -";
421 name =
"EELT amplitude map " + LN.str() +
" EE +";
426 for (
int i = 0;
i < 18;
i++) {
427 name =
"EELT PNs amplitude " +
Numbers::sEE(
i+1) +
" G01 " + LN.str();
433 name =
"EELT PNs pedestal " +
Numbers::sEE(i+1) +
" G01 " + LN.str();
442 for (
int i = 0;
i < 18;
i++) {
443 name =
"EELT PNs amplitude " +
Numbers::sEE(
i+1) +
" G16 " + LN.str();
449 name =
"EELT PNs pedestal " +
Numbers::sEE(i+1) +
" G16 " + LN.str();
461 LaserN <<
"Laser" << 4;
466 for (
int i = 0;
i < 18;
i++) {
468 meShapeMapL4_[
i] =
dqmStore_->
bookProfile2D(name, name, 850, 0., 850., 10, 0., 10., 4096, 0., 4096.,
"s");
474 name =
"EELT amplitude " +
Numbers::sEE(i+1) +
" " + LN.str();
475 meAmplMapL4_[
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");
481 name =
"EELT timing " +
Numbers::sEE(i+1) +
" " + LN.str();
482 meTimeMapL4_[
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");
488 name =
"EELT amplitude over PN " +
Numbers::sEE(i+1) +
" " + LN.str();
489 meAmplPNMapL4_[
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");
496 name =
"EELT amplitude map " + LN.str() +
" EE -";
501 name =
"EELT amplitude map " + LN.str() +
" EE +";
506 for (
int i = 0;
i < 18;
i++) {
507 name =
"EELT PNs amplitude " +
Numbers::sEE(
i+1) +
" G01 " + LN.str();
513 name =
"EELT PNs pedestal " +
Numbers::sEE(i+1) +
" G01 " + LN.str();
522 for (
int i = 0;
i < 18;
i++) {
523 name =
"EELT PNs amplitude " +
Numbers::sEE(
i+1) +
" G16 " + LN.str();
529 name =
"EELT PNs pedestal " +
Numbers::sEE(i+1) +
" G16 " + LN.str();
544 if ( !
init_ )
return;
552 for (
int i = 0;
i < 18;
i++) {
563 for(
int i=0;
i<2;
i++)
570 for (
int i = 0;
i < 18;
i++) {
581 for(
int i=0;
i<2;
i++)
589 for (
int i = 0;
i < 18;
i++) {
600 for(
int i=0;
i<2;
i++)
608 for (
int i = 0;
i < 18;
i++) {
619 for(
int i=0;
i<2;
i++)
629 for (
int i = 0;
i < 18;
i++) {
637 for (
int i = 0;
i < 18;
i++) {
651 for (
int i = 0;
i < 18;
i++) {
659 for (
int i = 0;
i < 18;
i++) {
673 for (
int i = 0;
i < 18;
i++) {
681 for (
int i = 0;
i < 18;
i++) {
695 for (
int i = 0;
i < 18;
i++) {
703 for (
int i = 0;
i < 18;
i++) {
730 for (
int i=0;
i<18;
i++) runType[
i] = -1;
732 for (
int i=0;
i<18;
i++) rtHalf[
i] = -1;
734 for (
int i=0;
i<18;
i++) waveLength[
i] = -1;
746 runType[ism-1] = dcchItr->getRunType();
747 rtHalf[ism-1] = dcchItr->getRtHalf();
748 waveLength[ism-1] = dcchItr->getEventSettings().wavelength;
761 if ( ! enable )
return;
769 for (
int i = 0;
i < 80;
i++ ) {
774 std::vector<int> PNs;
782 for(
int i(0);
i < 10;
i++)
804 for (
int i = 0;
i < 10;
i++) {
813 if(iMax >= 0 && max - min > 20.)
820 for(
int i(0);
i < 10;
i++){
821 if(maxpos[
i] > threshold){
829 int need = digis->size();
830 LogDebug(
"EELaserTask") <<
"event " <<
ievt_ <<
" digi collection size " << need;
850 for (
int i = 0;
i < 10;
i++) {
856 if ( rtHalf[ism-1] == 0 || rtHalf[ism-1] == 1 ) {
858 if ( waveLength[ism-1] == 0 ) meShapeMap =
meShapeMapL1_[ism-1];
859 if ( waveLength[ism-1] == 1 ) meShapeMap =
meShapeMapL2_[ism-1];
860 if ( waveLength[ism-1] == 2 ) meShapeMap =
meShapeMapL3_[ism-1];
861 if ( waveLength[ism-1] == 3 ) meShapeMap =
meShapeMapL4_[ism-1];
869 float xval = float(adc);
871 if ( meShapeMap ) meShapeMap->
Fill(ic - 0.5,
i + 0.5, xval);
877 for (
unsigned int i=0;
i<PNs.size();
i++) {
879 if ( ipn >= 0 && ipn < 80 ) numPN[ipn] =
true;
894 int nep = pns->size();
895 LogDebug(
"EELaserTask") <<
"event " <<
ievt_ <<
" pns collection size " << nep;
903 int num = pnItr->id().iPnId();
910 if ( ipn >= 0 && ipn < 80 && numPN[ipn] ==
false )
continue;
914 for (
int i = 0;
i < 4;
i++) {
916 int adc = pnItr->sample(
i).adc();
920 if ( pnItr->sample(
i).gainId() == 0 ) {
926 if ( pnItr->sample(
i).gainId() == 1 ) {
933 float xval = float(adc);
935 if ( mePNPed ) mePNPed->
Fill(num - 0.5, xval);
937 xvalped = xvalped + xval;
941 xvalped = xvalped / 4;
947 for (
int i = 0;
i < 50;
i++) {
949 int adc = pnItr->sample(
i).adc();
951 float xval = float(adc);
953 if ( xval >= xvalmax ) xvalmax = xval;
957 xvalmax = xvalmax - xvalped;
959 if ( pnItr->sample(0).gainId() == 0 ) {
965 if ( pnItr->sample(0).gainId() == 1 ) {
972 if ( mePN ) mePN->
Fill(num - 0.5, xvalmax);
974 if ( ipn >= 0 && ipn < 80 ) adcPN[ipn] = xvalmax;
988 int neh = hits->size();
989 LogDebug(
"EELaserTask") <<
"event " <<
ievt_ <<
" hits collection size " << neh;
1001 if ( ism >= 1 && ism <= 9 ){
1008 float xix = ix - 0.5;
1009 float xiy = iy - 0.5;
1021 if ( rtHalf[ism-1] == 0 || rtHalf[ism-1] == 1 ) {
1023 if ( waveLength[ism-1] == 0 ) {
1029 if ( waveLength[ism-1] == 1 ) {
1035 if ( waveLength[ism-1] == 2 ) {
1041 if ( waveLength[ism-1] == 3 ) {
1054 float xval = hitItr->amplitude();
1055 if ( xval <= 0. ) xval = 0.0;
1056 float yval = hitItr->jitter() + 5.0;
1057 if ( yval <= 0. ) yval = 0.0;
1058 float zval = hitItr->pedestal();
1059 if ( zval <= 0. ) zval = 0.0;
1061 if ( meAmplMap ) meAmplMap->
Fill(xix, xiy, xval);
1064 if ( meTimeMap ) meTimeMap->
Fill(xix, xiy, yval);
1071 if ( PNs.size() > 0 ) {
1073 if ( ipn >= 0 && ipn < 80 ) {
1074 if ( adcPN[ipn] != 0. ) wval = xval / adcPN[ipn];
1078 if ( meAmplPNMap ) meAmplPNMap->
Fill(xix, xiy, wval);
1080 if( meAmplSummaryMap ) meAmplSummaryMap->
Fill(xix, xiy, xval);
int adc(sample_type sample)
get the ADC sample (12 bits)
MonitorElement * mePnAmplMapG01L2_[18]
edm::InputTag EcalUncalibratedRecHitCollection_
Some "id" conversions.
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
static std::string sEE(const unsigned ism)
MonitorElement * meTimeMapL4_[18]
static int ipnEE(const int ism, const int ipnid)
MonitorElement * mePnAmplMapG16L2_[18]
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
MonitorElement * meTimeMapL3_[18]
static unsigned icEE(const unsigned ism, const unsigned ix, const unsigned iy)
MonitorElement * mePnAmplMapG16L1_[18]
void rmdir(const std::string &fullpath)
Some "id" conversions.
MonitorElement * mePnPedMapG01L4_[18]
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
MonitorElement * mePnPedMapG01L2_[18]
std::vector< T >::const_iterator const_iterator
MonitorElement * meAmplMapL2_[18]
EcalMGPASample sample(int i) const
MonitorElement * mePnAmplMapG01L1_[18]
static int ix0EE(const unsigned ism)
MonitorElement * mePnPedMapG01L3_[18]
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static int iy0EE(const unsigned ism)
void tag(MonitorElement *me, unsigned int myTag)
edm::InputTag EcalPnDiodeDigiCollection_
MonitorElement * mePnPedMapG16L2_[18]
MonitorElement * mePnAmplMapG01L4_[18]
virtual ~EELaserTask()
Destructor.
MonitorElement * meTimeMapL2_[18]
MonitorElement * mePnPedMapG16L4_[18]
MonitorElement * meShapeMapL3_[18]
const T & max(const T &a, const T &b)
MonitorElement * meAmplMapL4_[18]
MonitorElement * mePnPedMapG16L1_[18]
MonitorElement * meTimeMapL1_[18]
void removeElement(const std::string &name)
MonitorElement * meAmplMapL3_[18]
MonitorElement * meAmplSummaryMapL1_[2]
MonitorElement * meAmplSummaryMapL4_[2]
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
MonitorElement * meAmplPNMapL3_[18]
std::vector< int > laserWavelengths_
MonitorElement * mePnPedMapG01L1_[18]
MonitorElement * meAmplMapL1_[18]
EELaserTask(const edm::ParameterSet &ps)
Constructor.
edm::InputTag EcalRawDataCollection_
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
MonitorElement * meAmplSummaryMapL3_[2]
MonitorElement * mePnAmplMapG16L3_[18]
edm::InputTag EEDigiCollection_
MonitorElement * mePnAmplMapG16L4_[18]
MonitorElement * mePnAmplMapG01L3_[18]
void cleanup(void)
Cleanup.
MonitorElement * mePnPedMapG16L3_[18]
MonitorElement * meAmplPNMapL4_[18]
MonitorElement * meAmplPNMapL1_[18]
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
MonitorElement * meAmplSummaryMapL2_[2]
static void getPNs(const int ism, const int ix, const int iy, std::vector< int > &PNsInLM)
static unsigned RtHalf(const EBDetId &id)
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
static EcalSubdetector subDet(const EBDetId &id)
int ism(int ieta, int iphi)
MonitorElement * meAmplPNMapL2_[18]
MonitorElement * meShapeMapL1_[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 beginJob(void)
BeginJob.
void setCurrentFolder(const std::string &fullpath)
MonitorElement * meShapeMapL4_[18]
MonitorElement * meShapeMapL2_[18]
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")