55 for (
int i = 0;
i < 36;
i++) {
129 for (
int i = 0;
i < 36;
i++) {
203 std::stringstream LaserN, LN;
211 LaserN <<
"Laser" << 1;
216 for (
int i = 0;
i < 36;
i++) {
218 meShapeMapL1_[
i] =
dqmStore_->
bookProfile2D(name, name, 1700, 0., 1700., 10, 0., 10., 4096, 0., 4096.,
"s");
223 name =
"EBLT amplitude " +
Numbers::sEB(i+1) +
" " + LN.str();
224 meAmplMapL1_[
i] =
dqmStore_->
bookProfile2D(name, name, 85, 0., 85., 20, 0., 20., 4096, 0., 4096.*12.,
"s");
228 name =
"EBLT timing " +
Numbers::sEB(i+1) +
" " + LN.str();
229 meTimeMapL1_[
i] =
dqmStore_->
bookProfile2D(name, name, 85, 0., 85., 20, 0., 20., 250, 0., 10.,
"s");
233 name =
"EBLT amplitude over PN " +
Numbers::sEB(i+1) +
" " + LN.str();
234 meAmplPNMapL1_[
i] =
dqmStore_->
bookProfile2D(name, name, 85, 0., 85., 20, 0., 20., 4096, 0., 4096.*12.,
"s");
240 name =
"EBLT amplitude map " + LN.str();
248 for (
int i = 0;
i < 36;
i++) {
249 name =
"EBLT PNs amplitude " +
Numbers::sEB(
i+1) +
" G01 " + LN.str();
255 name =
"EBLT PNs pedestal " +
Numbers::sEB(i+1) +
" G01 " + LN.str();
263 for (
int i = 0;
i < 36;
i++) {
264 name =
"EBLT PNs amplitude " +
Numbers::sEB(
i+1) +
" G16 " + LN.str(),
270 name =
"EBLT PNs pedestal " +
Numbers::sEB(i+1) +
" G16 " + LN.str();
283 LaserN <<
"Laser" << 2;
288 for (
int i = 0;
i < 36;
i++) {
290 meShapeMapL2_[
i] =
dqmStore_->
bookProfile2D(name, name, 1700, 0., 1700., 10, 0., 10., 4096, 0., 4096.,
"s");
295 name =
"EBLT amplitude " +
Numbers::sEB(i+1) +
" " + LN.str();
296 meAmplMapL2_[
i] =
dqmStore_->
bookProfile2D(name, name, 85, 0., 85., 20, 0., 20., 4096, 0., 4096.*12.,
"s");
300 name =
"EBLT timing " +
Numbers::sEB(i+1) +
" " + LN.str();
301 meTimeMapL2_[
i] =
dqmStore_->
bookProfile2D(name, name, 85, 0., 85., 20, 0., 20., 250, 0., 10.,
"s");
305 name =
"EBLT amplitude over PN " +
Numbers::sEB(i+1) +
" " + LN.str();
306 meAmplPNMapL2_[
i] =
dqmStore_->
bookProfile2D(name, name, 85, 0., 85., 20, 0., 20., 4096, 0., 4096.*12.,
"s");
312 name =
"EBLT amplitude map " + LN.str();
320 for (
int i = 0;
i < 36;
i++) {
321 name =
"EBLT PNs amplitude " +
Numbers::sEB(
i+1) +
" G01 " + LN.str();
327 name =
"EBLT PNs pedestal " +
Numbers::sEB(i+1) +
" G01 " + LN.str();
335 for (
int i = 0;
i < 36;
i++) {
336 name =
"EBLT PNs amplitude " +
Numbers::sEB(
i+1) +
" G16 " + LN.str(),
342 name =
"EBLT PNs pedestal " +
Numbers::sEB(i+1) +
" G16 " + LN.str();
355 LaserN <<
"Laser" << 3;
360 for (
int i = 0;
i < 36;
i++) {
362 meShapeMapL3_[
i] =
dqmStore_->
bookProfile2D(name, name, 1700, 0., 1700., 10, 0., 10., 4096, 0., 4096.,
"s");
367 name =
"EBLT amplitude " +
Numbers::sEB(i+1) +
" " + LN.str();
368 meAmplMapL3_[
i] =
dqmStore_->
bookProfile2D(name, name, 85, 0., 85., 20, 0., 20., 4096, 0., 4096.*12.,
"s");
372 name =
"EBLT timing " +
Numbers::sEB(i+1) +
" " + LN.str();
373 meTimeMapL3_[
i] =
dqmStore_->
bookProfile2D(name, name, 85, 0., 85., 20, 0., 20., 250, 0., 10.,
"s");
377 name =
"EBLT amplitude over PN " +
Numbers::sEB(i+1) +
" " + LN.str();
378 meAmplPNMapL3_[
i] =
dqmStore_->
bookProfile2D(name, name, 85, 0., 85., 20, 0., 20., 4096, 0., 4096.*12.,
"s");
384 name =
"EBLT amplitude map " + LN.str();
392 for (
int i = 0;
i < 36;
i++) {
393 name =
"EBLT PNs amplitude " +
Numbers::sEB(
i+1) +
" G01 " + LN.str();
399 name =
"EBLT PNs pedestal " +
Numbers::sEB(i+1) +
" G01 " + LN.str();
407 for (
int i = 0;
i < 36;
i++) {
408 name =
"EBLT PNs amplitude " +
Numbers::sEB(
i+1) +
" G16 " + LN.str(),
414 name =
"EBLT PNs pedestal " +
Numbers::sEB(i+1) +
" G16 " + LN.str();
426 LaserN <<
"Laser" << 4;
431 for (
int i = 0;
i < 36;
i++) {
433 meShapeMapL4_[
i] =
dqmStore_->
bookProfile2D(name, name, 1700, 0., 1700., 10, 0., 10., 4096, 0., 4096.,
"s");
438 name =
"EBLT amplitude " +
Numbers::sEB(i+1) +
" " + LN.str();
439 meAmplMapL4_[
i] =
dqmStore_->
bookProfile2D(name, name, 85, 0., 85., 20, 0., 20., 4096, 0., 4096.*12.,
"s");
443 name =
"EBLT timing " +
Numbers::sEB(i+1) +
" " + LN.str();
444 meTimeMapL4_[
i] =
dqmStore_->
bookProfile2D(name, name, 85, 0., 85., 20, 0., 20., 250, 0., 10.,
"s");
448 name =
"EBLT amplitude over PN " +
Numbers::sEB(i+1) +
" " + LN.str();
449 meAmplPNMapL4_[
i] =
dqmStore_->
bookProfile2D(name, name, 85, 0., 85., 20, 0., 20., 4096, 0., 4096.*12.,
"s");
455 name =
"EBLT amplitude map " + LN.str();
463 for (
int i = 0;
i < 36;
i++) {
464 name =
"EBLT PNs amplitude " +
Numbers::sEB(
i+1) +
" G01 " + LN.str();
470 name =
"EBLT PNs pedestal " +
Numbers::sEB(i+1) +
" G01 " + LN.str();
478 for (
int i = 0;
i < 36;
i++) {
479 name =
"EBLT PNs amplitude " +
Numbers::sEB(
i+1) +
" G16 " + LN.str(),
485 name =
"EBLT PNs pedestal " +
Numbers::sEB(i+1) +
" G16 " + LN.str();
500 if ( !
init_ )
return;
507 for (
int i = 0;
i < 36;
i++) {
523 for (
int i = 0;
i < 36;
i++) {
539 for (
int i = 0;
i < 36;
i++) {
555 for (
int i = 0;
i < 36;
i++) {
573 for (
int i = 0;
i < 36;
i++) {
581 for (
int i = 0;
i < 36;
i++) {
593 for (
int i = 0;
i < 36;
i++) {
601 for (
int i = 0;
i < 36;
i++) {
613 for (
int i = 0;
i < 36;
i++) {
621 for (
int i = 0;
i < 36;
i++) {
633 for (
int i = 0;
i < 36;
i++) {
641 for (
int i = 0;
i < 36;
i++) {
668 for (
int i=0;
i<36;
i++) runType[
i] = -1;
670 for (
int i=0;
i<36;
i++) rtHalf[
i] = -1;
672 for (
int i=0;
i<36;
i++) waveLength[
i] = -1;
684 runType[ism-1] = dcchItr->getRunType();
685 rtHalf[ism-1] = dcchItr->getRtHalf();
686 waveLength[ism-1] = dcchItr->getEventSettings().wavelength;
699 if ( ! enable )
return;
710 for(
int i(0);
i < 10;
i++)
733 for (
int i = 0;
i < 10;
i++) {
742 if(iMax >= 0 && max - min > 20.)
749 for(
int i(0);
i < 10;
i++){
750 if(maxpos[
i] > threshold){
758 int nebd = digis->size();
759 LogDebug(
"EBLaserTask") <<
"event " <<
ievt_ <<
" digi collection size " << nebd;
776 for (
int i = 0;
i < 10;
i++) {
782 if ( rtHalf[ism-1] == 0 || rtHalf[ism-1] == 1 ) {
784 if ( waveLength[ism-1] == 0 ) meShapeMap =
meShapeMapL1_[ism-1];
785 if ( waveLength[ism-1] == 1 ) meShapeMap =
meShapeMapL2_[ism-1];
786 if ( waveLength[ism-1] == 2 ) meShapeMap =
meShapeMapL3_[ism-1];
787 if ( waveLength[ism-1] == 3 ) meShapeMap =
meShapeMapL4_[ism-1];
795 float xval = float(adc);
797 if ( meShapeMap ) meShapeMap->
Fill(ic - 0.5,
i + 0.5, xval);
812 for (
int i = 0;
i < 36;
i++ ) {
821 int nep = pns->size();
822 LogDebug(
"EBLaserTask") <<
"event " <<
ievt_ <<
" pns collection size " << nep;
830 int num = pnItr->id().iPnId();
837 for (
int i = 0;
i < 4;
i++) {
839 int adc = pnItr->sample(
i).adc();
843 if ( pnItr->sample(
i).gainId() == 0 ) {
849 if ( pnItr->sample(
i).gainId() == 1 ) {
856 float xval = float(adc);
858 if ( mePNPed ) mePNPed->
Fill(num - 0.5, xval);
860 xvalped = xvalped + xval;
864 xvalped = xvalped / 4;
870 for (
int i = 0;
i < 50;
i++) {
872 int adc = pnItr->sample(
i).adc();
874 float xval = float(adc);
876 if ( xval >= xvalmax ) xvalmax = xval;
880 xvalmax = xvalmax - xvalped;
882 if ( pnItr->sample(0).gainId() == 0 ) {
888 if ( pnItr->sample(0).gainId() == 1 ) {
895 if ( mePN ) mePN->
Fill(num - 0.5, xvalmax);
897 if ( num == 1 ) adcA[ism-1] = xvalmax;
898 if ( num == 6 ) adcB[ism-1] = xvalmax;
912 int neh = hits->size();
913 LogDebug(
"EBLaserTask") <<
"event " <<
ievt_ <<
" hits collection size " << neh;
920 int ie = (ic-1)/20 + 1;
921 int ip = (ic-1)%20 + 1;
925 float xie = ie - 0.5;
926 float xip = ip - 0.5;
938 if ( rtHalf[ism-1] == 0 || rtHalf[ism-1] == 1 ) {
940 if ( waveLength[ism-1] == 0 ) {
946 if ( waveLength[ism-1] == 1 ) {
952 if ( waveLength[ism-1] == 2 ) {
958 if ( waveLength[ism-1] == 3 ) {
971 float xval = hitItr->amplitude();
972 if ( xval <= 0. ) xval = 0.0;
973 float yval = hitItr->jitter() + 5.0;
974 if ( yval <= 0. ) yval = 0.0;
975 float zval = hitItr->pedestal();
976 if ( zval <= 0. ) zval = 0.0;
978 if ( meAmplMap ) meAmplMap->
Fill(xie, xip, xval);
981 if ( meTimeMap ) meTimeMap->
Fill(xie, xip, yval);
986 if ( rtHalf[ism-1] == 0 ) {
988 if ( adcA[ism-1] != 0. ) wval = xval / adcA[ism-1];
990 }
else if ( rtHalf[ism-1] == 1 ) {
992 if ( adcB[ism-1] != 0. ) wval = xval / adcB[ism-1];
1000 if ( meAmplPNMap ) meAmplPNMap->
Fill(xie, xip, wval);
1002 float xjp =
id.iphi() - 0.5;
1003 float xje =
id.ieta() - 0.5 *
id.zside();
1005 if( meAmplSummaryMap ) meAmplSummaryMap->
Fill(xjp, xje, xval);
int adc(sample_type sample)
get the ADC sample (12 bits)
MonitorElement * mePnAmplMapG16L3_[36]
MonitorElement * meTimeMapL4_[36]
MonitorElement * meShapeMapL3_[36]
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
MonitorElement * meTimeMapL2_[36]
MonitorElement * meAmplSummaryMapL4_
void cleanup(void)
Cleanup.
MonitorElement * meAmplSummaryMapL1_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
edm::InputTag EcalUncalibratedRecHitCollection_
MonitorElement * mePnPedMapG16L3_[36]
void beginJob(void)
BeginJob.
void rmdir(const std::string &fullpath)
MonitorElement * meAmplMapL2_[36]
Some "id" conversions.
static std::string sEB(const unsigned ism)
std::vector< int > laserWavelengths_
edm::InputTag EBDigiCollection_
std::vector< T >::const_iterator const_iterator
EcalMGPASample sample(int i) const
MonitorElement * meAmplPNMapL4_[36]
edm::InputTag EcalRawDataCollection_
virtual ~EBLaserTask()
Destructor.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
MonitorElement * meTimeMapL1_[36]
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
MonitorElement * mePnAmplMapG01L2_[36]
EBLaserTask(const edm::ParameterSet &ps)
Constructor.
void tag(MonitorElement *me, unsigned int myTag)
MonitorElement * mePnPedMapG16L2_[36]
edm::InputTag EcalPnDiodeDigiCollection_
MonitorElement * meTimeMapL3_[36]
const T & max(const T &a, const T &b)
MonitorElement * mePnAmplMapG01L4_[36]
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
MonitorElement * meAmplMapL4_[36]
void removeElement(const std::string &name)
MonitorElement * mePnPedMapG01L3_[36]
MonitorElement * mePnAmplMapG16L2_[36]
MonitorElement * meAmplSummaryMapL2_
MonitorElement * meShapeMapL4_[36]
MonitorElement * meAmplPNMapL1_[36]
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)
MonitorElement * mePnPedMapG01L1_[36]
MonitorElement * mePnAmplMapG16L4_[36]
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
int ic() const
get ECAL/crystal number inside SM
MonitorElement * meAmplPNMapL2_[36]
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
MonitorElement * meAmplMapL1_[36]
MonitorElement * meShapeMapL2_[36]
MonitorElement * meShapeMapL1_[36]
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
MonitorElement * mePnAmplMapG01L3_[36]
static unsigned RtHalf(const EBDetId &id)
MonitorElement * mePnAmplMapG16L1_[36]
static EcalSubdetector subDet(const EBDetId &id)
MonitorElement * mePnAmplMapG01L1_[36]
MonitorElement * mePnPedMapG01L4_[36]
MonitorElement * mePnPedMapG16L1_[36]
int ism(int ieta, int iphi)
MonitorElement * meAmplMapL3_[36]
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)
MonitorElement * meAmplPNMapL3_[36]
MonitorElement * mePnPedMapG16L4_[36]
void setCurrentFolder(const std::string &fullpath)
MonitorElement * mePnPedMapG01L2_[36]
int adc() const
get the ADC sample (12 bits)
MonitorElement * meAmplSummaryMapL3_
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")