Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-03-23 04:29:26

0001 #include "DQMServices/Core/interface/DQMStore.h"
0002 #include "DataFormats/Common/interface/DetSetVector.h"
0003 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0004 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0005 #include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
0006 #include "DataFormats/SiStripDigi/interface/SiStripDigi.h"
0007 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0008 #include "FWCore/Framework/interface/ESHandle.h"
0009 #include "FWCore/Framework/interface/Event.h"
0010 #include "FWCore/Framework/interface/EventSetup.h"
0011 #include "FWCore/Framework/interface/MakerMacros.h"
0012 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include "FWCore/ServiceRegistry/interface/Service.h"
0015 #include "Geometry/CommonTopologies/interface/RectangularStripTopology.h"
0016 #include "Geometry/CommonTopologies/interface/TrapezoidalStripTopology.h"
0017 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0018 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0019 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
0020 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0021 #include "SiStripDigiValid.h"
0022 
0023 SiStripDigiValid::SiStripDigiValid(const edm::ParameterSet &ps)
0024     : m_topoToken(esConsumes()),
0025       dbe_(nullptr),
0026       runStandalone(ps.getParameter<bool>("runStandalone")),
0027       outputFile_(ps.getUntrackedParameter<std::string>("outputFile", "stripdigihisto.root")),
0028       edmDetSetVector_SiStripDigi_Token_(
0029           consumes<edm::DetSetVector<SiStripDigi>>(ps.getParameter<edm::InputTag>("src"))) {}
0030 
0031 SiStripDigiValid::~SiStripDigiValid() {}
0032 
0033 void SiStripDigiValid::bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &run, const edm::EventSetup &es) {
0034   dbe_ = edm::Service<DQMStore>().operator->();
0035 
0036   if (dbe_) {
0037     ibooker.setCurrentFolder("TrackerDigisV/TrackerDigis/Strip");
0038 
0039     for (int i = 0; i < 3; i++) {
0040       Char_t histo[200];
0041       // Z Plus Side
0042       sprintf(histo, "adc_tib_layer1_extmodule%d_zp", i + 1);
0043       meAdcTIBLayer1Extzp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0044       sprintf(histo, "adc_tib_layer1_intmodule%d_zp", i + 1);
0045       meAdcTIBLayer1Intzp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0046       sprintf(histo, "adc_tib_layer2_extmodule%d_zp", i + 1);
0047       meAdcTIBLayer2Extzp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0048       sprintf(histo, "adc_tib_layer2_intmodule%d_zp", i + 1);
0049       meAdcTIBLayer2Intzp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0050       sprintf(histo, "adc_tib_layer3_extmodule%d_zp", i + 1);
0051       meAdcTIBLayer3Extzp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0052       sprintf(histo, "adc_tib_layer3_intmodule%d_zp", i + 1);
0053       meAdcTIBLayer3Intzp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0054       sprintf(histo, "adc_tib_layer4_extmodule%d_zp", i + 1);
0055       meAdcTIBLayer4Extzp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0056       sprintf(histo, "adc_tib_layer4_intmodule%d_zp", i + 1);
0057       meAdcTIBLayer4Intzp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0058       sprintf(histo, "strip_tib_layer1_extmodule%d_zp", i + 1);
0059       meStripTIBLayer1Extzp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0060       sprintf(histo, "strip_tib_layer1_intmodule%d_zp", i + 1);
0061       meStripTIBLayer1Intzp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0062       sprintf(histo, "strip_tib_layer2_extmodule%d_zp", i + 1);
0063       meStripTIBLayer2Extzp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0064       sprintf(histo, "strip_tib_layer2_intmodule%d_zp", i + 1);
0065       meStripTIBLayer2Intzp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0066       sprintf(histo, "strip_tib_layer3_extmodule%d_zp", i + 1);
0067       meStripTIBLayer3Extzp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0068       sprintf(histo, "strip_tib_layer3_intmodule%d_zp", i + 1);
0069       meStripTIBLayer3Intzp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0070       sprintf(histo, "strip_tib_layer4_extmodule%d_zp", i + 1);
0071       meStripTIBLayer4Extzp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0072       sprintf(histo, "strip_tib_layer4_intmodule%d_zp", i + 1);
0073       meStripTIBLayer4Intzp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0074       //  Z Minus Side
0075       sprintf(histo, "adc_tib_layer1_extmodule%d_zm", i + 1);
0076       meAdcTIBLayer1Extzm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0077       sprintf(histo, "adc_tib_layer1_intmodule%d_zm", i + 1);
0078       meAdcTIBLayer1Intzm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0079       sprintf(histo, "adc_tib_layer2_extmodule%d_zm", i + 1);
0080       meAdcTIBLayer2Extzm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0081       sprintf(histo, "adc_tib_layer2_intmodule%d_zm", i + 1);
0082       meAdcTIBLayer2Intzm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0083       sprintf(histo, "adc_tib_layer3_extmodule%d_zm", i + 1);
0084       meAdcTIBLayer3Extzm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0085       sprintf(histo, "adc_tib_layer3_intmodule%d_zm", i + 1);
0086       meAdcTIBLayer3Intzm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0087       sprintf(histo, "adc_tib_layer4_extmodule%d_zm", i + 1);
0088       meAdcTIBLayer4Extzm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0089       sprintf(histo, "adc_tib_layer4_intmodule%d_zm", i + 1);
0090       meAdcTIBLayer4Intzm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0091       sprintf(histo, "strip_tib_layer1_extmodule%d_zm", i + 1);
0092       meStripTIBLayer1Extzm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0093       sprintf(histo, "strip_tib_layer1_intmodule%d_zm", i + 1);
0094       meStripTIBLayer1Intzm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0095       sprintf(histo, "strip_tib_layer2_extmodule%d_zm", i + 1);
0096       meStripTIBLayer2Extzm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0097       sprintf(histo, "strip_tib_layer2_intmodule%d_zm", i + 1);
0098       meStripTIBLayer2Intzm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0099       sprintf(histo, "strip_tib_layer3_extmodule%d_zm", i + 1);
0100       meStripTIBLayer3Extzm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0101       sprintf(histo, "strip_tib_layer3_intmodule%d_zm", i + 1);
0102       meStripTIBLayer3Intzm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0103       sprintf(histo, "strip_tib_layer4_extmodule%d_zm", i + 1);
0104       meStripTIBLayer4Extzm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0105       sprintf(histo, "strip_tib_layer4_intmodule%d_zm", i + 1);
0106       meStripTIBLayer4Intzm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0107     }
0108 
0109     for (int i = 0; i < 6; i++) {
0110       Char_t histo[200];
0111       // Z Plus Side
0112       sprintf(histo, "adc_tob_layer1_module%d_zp", i + 1);
0113       meAdcTOBLayer1zp_[i] = ibooker.book1D(histo, "Digis ADC", 10, 0., 300.);
0114       sprintf(histo, "strip_tob_layer1_module%d_zp", i + 1);
0115       meStripTOBLayer1zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0116       sprintf(histo, "adc_tob_layer2_module%d_zp", i + 1);
0117       meAdcTOBLayer2zp_[i] = ibooker.book1D(histo, "Digis ADC", 10, 0., 300.);
0118       sprintf(histo, "strip_tob_layer2_module%d_zp", i + 1);
0119       meStripTOBLayer2zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0120       sprintf(histo, "adc_tob_layer3_module%d_zp", i + 1);
0121       meAdcTOBLayer3zp_[i] = ibooker.book1D(histo, "Digis ADC", 10, 0., 300.);
0122       sprintf(histo, "strip_tob_layer3_module%d_zp", i + 1);
0123       meStripTOBLayer3zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0124       sprintf(histo, "adc_tob_layer4_module%d_zp", i + 1);
0125       meAdcTOBLayer4zp_[i] = ibooker.book1D(histo, "Digis ADC", 10, 0., 300.);
0126       sprintf(histo, "strip_tob_layer4_module%d_zp", i + 1);
0127       meStripTOBLayer4zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0128       sprintf(histo, "adc_tob_layer5_module%d_zp", i + 1);
0129       meAdcTOBLayer5zp_[i] = ibooker.book1D(histo, "Digis ADC", 10, 0., 300.);
0130       sprintf(histo, "strip_tob_layer5_module%d_zp", i + 1);
0131       meStripTOBLayer5zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0132       sprintf(histo, "adc_tob_layer6_module%d_zp", i + 1);
0133       meAdcTOBLayer6zp_[i] = ibooker.book1D(histo, "Digis ADC", 10, 0., 300.);
0134       sprintf(histo, "strip_tob_layer6_module%d_zp", i + 1);
0135       meStripTOBLayer6zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0136       // Z Minus Side
0137       sprintf(histo, "adc_tob_layer1_module%d_zm", i + 1);
0138       meAdcTOBLayer1zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0139       sprintf(histo, "strip_tob_layer1_module%d_zm", i + 1);
0140       meStripTOBLayer1zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0141       sprintf(histo, "adc_tob_layer2_module%d_zm", i + 1);
0142       meAdcTOBLayer2zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0143       sprintf(histo, "strip_tob_layer2_module%d_zm", i + 1);
0144       meStripTOBLayer2zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0145       sprintf(histo, "adc_tob_layer3_module%d_zm", i + 1);
0146       meAdcTOBLayer3zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0147       sprintf(histo, "strip_tob_layer3_module%d_zm", i + 1);
0148       meStripTOBLayer3zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0149       sprintf(histo, "adc_tob_layer4_module%d_zm", i + 1);
0150       meAdcTOBLayer4zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0151       sprintf(histo, "strip_tob_layer4_module%d_zm", i + 1);
0152       meStripTOBLayer4zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0153       sprintf(histo, "adc_tob_layer5_module%d_zm", i + 1);
0154       meAdcTOBLayer5zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0155       sprintf(histo, "strip_tob_layer5_module%d_zm", i + 1);
0156       meStripTOBLayer5zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0157       sprintf(histo, "adc_tob_layer6_module%d_zm", i + 1);
0158       meAdcTOBLayer6zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0159       sprintf(histo, "strip_tob_layer6_module%d_zm", i + 1);
0160       meStripTOBLayer6zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0161     }
0162 
0163     for (int i = 0; i < 3; i++) {
0164       Char_t histo[200];
0165       // Z Plus Side
0166       sprintf(histo, "adc_tid_wheel1_ring%d_zp", i + 1);
0167       meAdcTIDWheel1zp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0168       sprintf(histo, "adc_tid_wheel2_ring%d_zp", i + 1);
0169       meAdcTIDWheel2zp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0170       sprintf(histo, "adc_tid_wheel3_ring%d_zp", i + 1);
0171       meAdcTIDWheel3zp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0172       sprintf(histo, "strip_tid_wheel1_ring%d_zp", i + 1);
0173       meStripTIDWheel1zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0174       sprintf(histo, "strip_tid_wheel2_ring%d_zp", i + 1);
0175       meStripTIDWheel2zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0176       sprintf(histo, "strip_tid_wheel3_ring%d_zp", i + 1);
0177       meStripTIDWheel3zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0178       // Z minus Side
0179       sprintf(histo, "adc_tid_wheel1_ring%d_zm", i + 1);
0180       meAdcTIDWheel1zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0181       sprintf(histo, "adc_tid_wheel2_ring%d_zm", i + 1);
0182       meAdcTIDWheel2zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0183       sprintf(histo, "adc_tid_wheel3_ring%d_zm", i + 1);
0184       meAdcTIDWheel3zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0185       sprintf(histo, "strip_tid_wheel1_ring%d_zm", i + 1);
0186       meStripTIDWheel1zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0187       sprintf(histo, "strip_tid_wheel2_ring%d_zm", i + 1);
0188       meStripTIDWheel2zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0189       sprintf(histo, "strip_tid_wheel3_ring%d_zm", i + 1);
0190       meStripTIDWheel3zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0191     }
0192 
0193     for (int i = 0; i < 7; i++) {
0194       Char_t histo[200];
0195       // Z Plus Side
0196       sprintf(histo, "adc_tec_wheel1_ring%d_zp", i + 1);
0197       meAdcTECWheel1zp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0198       sprintf(histo, "adc_tec_wheel2_ring%d_zp", i + 1);
0199       meAdcTECWheel2zp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0200       sprintf(histo, "adc_tec_wheel3_ring%d_zp", i + 1);
0201       meAdcTECWheel3zp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0202       sprintf(histo, "strip_tec_wheel1_ring%d_zp", i + 1);
0203       meStripTECWheel1zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0204       sprintf(histo, "strip_tec_wheel2_ring%d_zp", i + 1);
0205       meStripTECWheel2zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0206       sprintf(histo, "strip_tec_wheel3_ring%d_zp", i + 1);
0207       meStripTECWheel3zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0208 
0209       // Z Minus Side
0210       sprintf(histo, "adc_tec_wheel1_ring%d_zm", i + 1);
0211       meAdcTECWheel1zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0212       sprintf(histo, "adc_tec_wheel2_ring%d_zm", i + 1);
0213       meAdcTECWheel2zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0214       sprintf(histo, "adc_tec_wheel3_ring%d_zm", i + 1);
0215       meAdcTECWheel3zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0216       sprintf(histo, "strip_tec_wheel1_ring%d_zm", i + 1);
0217       meStripTECWheel1zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0218       sprintf(histo, "strip_tec_wheel2_ring%d_zm", i + 1);
0219       meStripTECWheel2zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0220       sprintf(histo, "strip_tec_wheel3_ring%d_zm", i + 1);
0221       meStripTECWheel3zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0222     }
0223 
0224     for (int i = 0; i < 6; i++) {
0225       Char_t histo[200];
0226       // Z Plus Side
0227       sprintf(histo, "adc_tec_wheel4_ring%d_zp", i + 1);
0228       meAdcTECWheel4zp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0229       sprintf(histo, "adc_tec_wheel5_ring%d_zp", i + 1);
0230       meAdcTECWheel5zp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0231       sprintf(histo, "adc_tec_wheel6_ring%d_zp", i + 1);
0232       meAdcTECWheel6zp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0233       sprintf(histo, "strip_tec_wheel4_ring%d_zp", i + 1);
0234       meStripTECWheel4zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0235       sprintf(histo, "strip_tec_wheel5_ring%d_zp", i + 1);
0236       meStripTECWheel5zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0237       sprintf(histo, "strip_tec_wheel6_ring%d_zp", i + 1);
0238       meStripTECWheel6zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0239 
0240       // Z Minus Side
0241       sprintf(histo, "adc_tec_wheel4_ring%d_zm", i + 1);
0242       meAdcTECWheel4zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0243       sprintf(histo, "adc_tec_wheel5_ring%d_zm", i + 1);
0244       meAdcTECWheel5zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0245       sprintf(histo, "adc_tec_wheel6_ring%d_zm", i + 1);
0246       meAdcTECWheel6zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0247       sprintf(histo, "strip_tec_wheel4_ring%d_zm", i + 1);
0248       meStripTECWheel4zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0249       sprintf(histo, "strip_tec_wheel5_ring%d_zm", i + 1);
0250       meStripTECWheel5zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0251       sprintf(histo, "strip_tec_wheel6_ring%d_zm", i + 1);
0252       meStripTECWheel6zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0253     }
0254 
0255     for (int i = 0; i < 5; i++) {
0256       Char_t histo[200];
0257       // Z Plus Side
0258       sprintf(histo, "adc_tec_wheel7_ring%d_zp", i + 1);
0259       meAdcTECWheel7zp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0260       sprintf(histo, "adc_tec_wheel8_ring%d_zp", i + 1);
0261       meAdcTECWheel8zp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0262       sprintf(histo, "strip_tec_wheel7_ring%d_zp", i + 1);
0263       meStripTECWheel7zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0264       sprintf(histo, "strip_tec_wheel8_ring%d_zp", i + 1);
0265       meStripTECWheel8zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0266 
0267       // Z Minus Side
0268       sprintf(histo, "adc_tec_wheel7_ring%d_zm", i + 1);
0269       meAdcTECWheel7zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0270       sprintf(histo, "adc_tec_wheel8_ring%d_zm", i + 1);
0271       meAdcTECWheel8zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0272       sprintf(histo, "strip_tec_wheel7_ring%d_zm", i + 1);
0273       meStripTECWheel7zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0274       sprintf(histo, "strip_tec_wheel8_ring%d_zm", i + 1);
0275       meStripTECWheel8zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0276     }
0277 
0278     for (int i = 0; i < 4; i++) {
0279       Char_t histo[200];
0280       // Z Plus Side
0281       sprintf(histo, "adc_tec_wheel9_ring%d_zp", i + 1);
0282       meAdcTECWheel9zp_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0283       sprintf(histo, "strip_tec_wheel9_ring%d_zp", i + 1);
0284       meStripTECWheel9zp_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0285 
0286       // Z Minus Side
0287       sprintf(histo, "adc_tec_wheel9_ring%d_zm", i + 1);
0288       meAdcTECWheel9zm_[i] = ibooker.book1D(histo, "Digis ADC", 50, 0., 300.);
0289       sprintf(histo, "strip_tec_wheel9_ring%d_zm", i + 1);
0290       meStripTECWheel9zm_[i] = ibooker.book1D(histo, "Digis Strip Num.", 200, 0., 800.);
0291     }
0292 
0293     for (int i = 0; i < 4; i++) {
0294       Char_t histo[200];
0295       sprintf(histo, "ndigi_tib_layer_%d_zm", i + 1);
0296       meNDigiTIBLayerzm_[i] = ibooker.book1D(histo, "Digi Multiplicity", 100, 0., 500.);
0297       sprintf(histo, "ndigi_tib_layer_%d_zp", i + 1);
0298       meNDigiTIBLayerzp_[i] = ibooker.book1D(histo, "Digi Multiplicity", 100, 0., 500.);
0299     }
0300 
0301     for (int i = 0; i < 6; i++) {
0302       Char_t histo[200];
0303       sprintf(histo, "ndigi_tob_layer_%d_zm", i + 1);
0304       meNDigiTOBLayerzm_[i] = ibooker.book1D(histo, "Digi Multiplicity", 100, 0., 500.);
0305       sprintf(histo, "ndigi_tob_layer_%d_zp", i + 1);
0306       meNDigiTOBLayerzp_[i] = ibooker.book1D(histo, "Digi Multiplicity", 100, 0., 500.);
0307     }
0308 
0309     for (int i = 0; i < 3; i++) {
0310       Char_t histo[200];
0311       sprintf(histo, "ndigi_tid_wheel_%d_zm", i + 1);
0312       meNDigiTIDWheelzm_[i] = ibooker.book1D(histo, "Digi Multiplicity", 100, 0., 500.);
0313       sprintf(histo, "ndigi_tid_wheel_%d_zp", i + 1);
0314       meNDigiTIDWheelzp_[i] = ibooker.book1D(histo, "Digi Multiplicity", 100, 0., 500.);
0315     }
0316 
0317     for (int i = 0; i < 9; i++) {
0318       Char_t histo[200];
0319       sprintf(histo, "ndigi_tec_wheel_%d_zm", i + 1);
0320       meNDigiTECWheelzm_[i] = ibooker.book1D(histo, "Digi Multiplicity", 100, 0., 500.);
0321       sprintf(histo, "ndigi_tec_wheel_%d_zp", i + 1);
0322       meNDigiTECWheelzp_[i] = ibooker.book1D(histo, "Digi Multiplicity", 100, 0., 500.);
0323     }
0324   }
0325 }
0326 
0327 void SiStripDigiValid::analyze(const edm::Event &e, const edm::EventSetup &c) {
0328   // Retrieve tracker topology from geometry
0329   const TrackerTopology *const tTopo = &c.getData(m_topoToken);
0330 
0331   int ndigilayertibzp[4];
0332   int ndigilayertibzm[4];
0333 
0334   for (int i = 0; i < 4; i++) {
0335     ndigilayertibzp[i] = 0;
0336     ndigilayertibzm[i] = 0;
0337   }
0338 
0339   int ndigilayertobzp[6];
0340   int ndigilayertobzm[6];
0341 
0342   for (int i = 0; i < 6; i++) {
0343     ndigilayertobzp[i] = 0;
0344     ndigilayertobzm[i] = 0;
0345   }
0346 
0347   int ndigiwheeltidzp[3];
0348   int ndigiwheeltidzm[3];
0349 
0350   for (int i = 0; i < 3; i++) {
0351     ndigiwheeltidzp[i] = 0;
0352     ndigiwheeltidzm[i] = 0;
0353   }
0354 
0355   int ndigiwheelteczp[9];
0356   int ndigiwheelteczm[9];
0357 
0358   for (int i = 0; i < 9; i++) {
0359     ndigiwheelteczp[i] = 0;
0360     ndigiwheelteczm[i] = 0;
0361   }
0362 
0363   // LogInfo("EventInfo") << " Run = " << e.id().run() << " Event = " <<
0364   // e.id().event();
0365 
0366   std::string digiProducer = "siStripDigis";
0367   edm::Handle<edm::DetSetVector<SiStripDigi>> stripDigis;
0368   e.getByToken(edmDetSetVector_SiStripDigi_Token_, stripDigis);
0369   edm::DetSetVector<SiStripDigi>::const_iterator DSViter = stripDigis->begin();
0370   for (; DSViter != stripDigis->end(); DSViter++) {
0371     unsigned int id = DSViter->id;
0372     DetId detId(id);
0373     edm::DetSet<SiStripDigi>::const_iterator begin = DSViter->data.begin();
0374     edm::DetSet<SiStripDigi>::const_iterator end = DSViter->data.end();
0375     edm::DetSet<SiStripDigi>::const_iterator iter;
0376 
0377     if (detId.subdetId() == StripSubdetector::TIB) {
0378       for (iter = begin; iter != end; iter++) {  // loop digis
0379         if (tTopo->tibStringInfo(id)[0] == 1) {
0380           ++ndigilayertibzm[tTopo->tibLayer(id) - 1];
0381           if (tTopo->tibLayer(id) == 1) {
0382             if (tTopo->tibStringInfo(id)[1] == 1) {
0383               if (tTopo->tibModule(id) == 1) {
0384                 meAdcTIBLayer1Intzm_[0]->Fill((*iter).adc());
0385                 meStripTIBLayer1Intzm_[0]->Fill((*iter).strip());
0386               }
0387               if (tTopo->tibModule(id) == 2) {
0388                 meAdcTIBLayer1Intzm_[1]->Fill((*iter).adc());
0389                 meStripTIBLayer1Intzm_[1]->Fill((*iter).strip());
0390               }
0391               if (tTopo->tibModule(id) == 3) {
0392                 meAdcTIBLayer1Intzm_[2]->Fill((*iter).adc());
0393                 meStripTIBLayer1Intzm_[2]->Fill((*iter).strip());
0394               }
0395             } else {
0396               if (tTopo->tibModule(id) == 1) {
0397                 meAdcTIBLayer1Extzm_[0]->Fill((*iter).adc());
0398                 meStripTIBLayer1Extzm_[0]->Fill((*iter).strip());
0399               }
0400               if (tTopo->tibModule(id) == 2) {
0401                 meAdcTIBLayer1Extzm_[1]->Fill((*iter).adc());
0402                 meStripTIBLayer1Extzm_[1]->Fill((*iter).strip());
0403               }
0404               if (tTopo->tibModule(id) == 3) {
0405                 meAdcTIBLayer1Extzm_[2]->Fill((*iter).adc());
0406                 meStripTIBLayer1Extzm_[2]->Fill((*iter).strip());
0407               }
0408             }
0409           }
0410           if (tTopo->tibLayer(id) == 2) {
0411             if (tTopo->tibStringInfo(id)[1] == 1) {
0412               if (tTopo->tibModule(id) == 1) {
0413                 meAdcTIBLayer2Intzm_[0]->Fill((*iter).adc());
0414                 meStripTIBLayer2Intzm_[0]->Fill((*iter).strip());
0415               }
0416               if (tTopo->tibModule(id) == 2) {
0417                 meAdcTIBLayer2Intzm_[1]->Fill((*iter).adc());
0418                 meStripTIBLayer2Intzm_[1]->Fill((*iter).strip());
0419               }
0420               if (tTopo->tibModule(id) == 3) {
0421                 meAdcTIBLayer2Intzm_[2]->Fill((*iter).adc());
0422                 meStripTIBLayer2Intzm_[2]->Fill((*iter).strip());
0423               }
0424             } else {
0425               if (tTopo->tibModule(id) == 1) {
0426                 meAdcTIBLayer2Extzm_[0]->Fill((*iter).adc());
0427                 meStripTIBLayer2Extzm_[0]->Fill((*iter).strip());
0428               }
0429               if (tTopo->tibModule(id) == 2) {
0430                 meAdcTIBLayer2Extzm_[1]->Fill((*iter).adc());
0431                 meStripTIBLayer2Extzm_[1]->Fill((*iter).strip());
0432               }
0433               if (tTopo->tibModule(id) == 3) {
0434                 meAdcTIBLayer2Extzm_[2]->Fill((*iter).adc());
0435                 meStripTIBLayer2Extzm_[2]->Fill((*iter).strip());
0436               }
0437             }
0438           }
0439           if (tTopo->tibLayer(id) == 3) {
0440             if (tTopo->tibStringInfo(id)[1] == 1) {
0441               if (tTopo->tibModule(id) == 1) {
0442                 meAdcTIBLayer3Intzm_[0]->Fill((*iter).adc());
0443                 meStripTIBLayer3Intzm_[0]->Fill((*iter).strip());
0444               }
0445               if (tTopo->tibModule(id) == 2) {
0446                 meAdcTIBLayer3Intzm_[1]->Fill((*iter).adc());
0447                 meStripTIBLayer3Intzm_[1]->Fill((*iter).strip());
0448               }
0449               if (tTopo->tibModule(id) == 3) {
0450                 meAdcTIBLayer3Intzm_[2]->Fill((*iter).adc());
0451                 meStripTIBLayer3Intzm_[2]->Fill((*iter).strip());
0452               }
0453             } else {
0454               if (tTopo->tibModule(id) == 1) {
0455                 meAdcTIBLayer3Extzm_[0]->Fill((*iter).adc());
0456                 meStripTIBLayer3Extzm_[0]->Fill((*iter).strip());
0457               }
0458               if (tTopo->tibModule(id) == 2) {
0459                 meAdcTIBLayer3Extzm_[1]->Fill((*iter).adc());
0460                 meStripTIBLayer3Extzm_[1]->Fill((*iter).strip());
0461               }
0462               if (tTopo->tibModule(id) == 3) {
0463                 meAdcTIBLayer3Extzm_[2]->Fill((*iter).adc());
0464                 meStripTIBLayer3Extzm_[2]->Fill((*iter).strip());
0465               }
0466             }
0467           }
0468           if (tTopo->tibLayer(id) == 4) {
0469             if (tTopo->tibStringInfo(id)[1] == 1) {
0470               if (tTopo->tibModule(id) == 1) {
0471                 meAdcTIBLayer4Intzm_[0]->Fill((*iter).adc());
0472                 meStripTIBLayer4Intzm_[0]->Fill((*iter).strip());
0473               }
0474               if (tTopo->tibModule(id) == 2) {
0475                 meAdcTIBLayer4Intzm_[1]->Fill((*iter).adc());
0476                 meStripTIBLayer4Intzm_[1]->Fill((*iter).strip());
0477               }
0478               if (tTopo->tibModule(id) == 3) {
0479                 meAdcTIBLayer4Intzm_[2]->Fill((*iter).adc());
0480                 meStripTIBLayer4Intzm_[2]->Fill((*iter).strip());
0481               }
0482             } else {
0483               if (tTopo->tibModule(id) == 1) {
0484                 meAdcTIBLayer4Extzm_[0]->Fill((*iter).adc());
0485                 meStripTIBLayer4Extzm_[0]->Fill((*iter).strip());
0486               }
0487               if (tTopo->tibModule(id) == 2) {
0488                 meAdcTIBLayer4Extzm_[1]->Fill((*iter).adc());
0489                 meStripTIBLayer4Extzm_[1]->Fill((*iter).strip());
0490               }
0491               if (tTopo->tibModule(id) == 3) {
0492                 meAdcTIBLayer4Extzm_[2]->Fill((*iter).adc());
0493                 meStripTIBLayer4Extzm_[2]->Fill((*iter).strip());
0494               }
0495             }
0496           }
0497         } else {
0498           ++ndigilayertibzp[tTopo->tibLayer(id) - 1];
0499           if (tTopo->tibLayer(id) == 1) {
0500             if (tTopo->tibStringInfo(id)[1] == 1) {
0501               if (tTopo->tibModule(id) == 1) {
0502                 meAdcTIBLayer1Intzp_[0]->Fill((*iter).adc());
0503                 meStripTIBLayer1Intzp_[0]->Fill((*iter).strip());
0504               }
0505               if (tTopo->tibModule(id) == 2) {
0506                 meAdcTIBLayer1Intzp_[1]->Fill((*iter).adc());
0507                 meStripTIBLayer1Intzp_[1]->Fill((*iter).strip());
0508               }
0509               if (tTopo->tibModule(id) == 3) {
0510                 meAdcTIBLayer1Intzp_[2]->Fill((*iter).adc());
0511                 meStripTIBLayer1Intzp_[2]->Fill((*iter).strip());
0512               }
0513             } else {
0514               if (tTopo->tibModule(id) == 1) {
0515                 meAdcTIBLayer1Extzp_[0]->Fill((*iter).adc());
0516                 meStripTIBLayer1Extzp_[0]->Fill((*iter).strip());
0517               }
0518               if (tTopo->tibModule(id) == 2) {
0519                 meAdcTIBLayer1Extzp_[1]->Fill((*iter).adc());
0520                 meStripTIBLayer1Extzp_[1]->Fill((*iter).strip());
0521               }
0522               if (tTopo->tibModule(id) == 3) {
0523                 meAdcTIBLayer1Extzp_[2]->Fill((*iter).adc());
0524                 meStripTIBLayer1Extzp_[2]->Fill((*iter).strip());
0525               }
0526             }
0527           }
0528           if (tTopo->tibLayer(id) == 2) {
0529             if (tTopo->tibStringInfo(id)[1] == 1) {
0530               if (tTopo->tibModule(id) == 1) {
0531                 meAdcTIBLayer2Intzp_[0]->Fill((*iter).adc());
0532                 meStripTIBLayer2Intzp_[0]->Fill((*iter).strip());
0533               }
0534               if (tTopo->tibModule(id) == 2) {
0535                 meAdcTIBLayer2Intzp_[1]->Fill((*iter).adc());
0536                 meStripTIBLayer2Intzp_[1]->Fill((*iter).strip());
0537               }
0538               if (tTopo->tibModule(id) == 3) {
0539                 meAdcTIBLayer2Intzp_[2]->Fill((*iter).adc());
0540                 meStripTIBLayer2Intzp_[2]->Fill((*iter).strip());
0541               }
0542             } else {
0543               if (tTopo->tibModule(id) == 1) {
0544                 meAdcTIBLayer2Extzp_[0]->Fill((*iter).adc());
0545                 meStripTIBLayer2Extzp_[0]->Fill((*iter).strip());
0546               }
0547               if (tTopo->tibModule(id) == 2) {
0548                 meAdcTIBLayer2Extzp_[1]->Fill((*iter).adc());
0549                 meStripTIBLayer2Extzp_[1]->Fill((*iter).strip());
0550               }
0551               if (tTopo->tibModule(id) == 3) {
0552                 meAdcTIBLayer2Extzp_[2]->Fill((*iter).adc());
0553                 meStripTIBLayer2Extzp_[2]->Fill((*iter).strip());
0554               }
0555             }
0556           }
0557           if (tTopo->tibLayer(id) == 3) {
0558             if (tTopo->tibStringInfo(id)[1] == 1) {
0559               if (tTopo->tibModule(id) == 1) {
0560                 meAdcTIBLayer3Intzp_[0]->Fill((*iter).adc());
0561                 meStripTIBLayer3Intzp_[0]->Fill((*iter).strip());
0562               }
0563               if (tTopo->tibModule(id) == 2) {
0564                 meAdcTIBLayer3Intzp_[1]->Fill((*iter).adc());
0565                 meStripTIBLayer3Intzp_[1]->Fill((*iter).strip());
0566               }
0567               if (tTopo->tibModule(id) == 3) {
0568                 meAdcTIBLayer3Intzp_[2]->Fill((*iter).adc());
0569                 meStripTIBLayer3Intzp_[2]->Fill((*iter).strip());
0570               }
0571             } else {
0572               if (tTopo->tibModule(id) == 1) {
0573                 meAdcTIBLayer3Extzp_[0]->Fill((*iter).adc());
0574                 meStripTIBLayer3Extzp_[0]->Fill((*iter).strip());
0575               }
0576               if (tTopo->tibModule(id) == 2) {
0577                 meAdcTIBLayer3Extzp_[1]->Fill((*iter).adc());
0578                 meStripTIBLayer3Extzp_[1]->Fill((*iter).strip());
0579               }
0580               if (tTopo->tibModule(id) == 3) {
0581                 meAdcTIBLayer3Extzp_[2]->Fill((*iter).adc());
0582                 meStripTIBLayer3Extzp_[2]->Fill((*iter).strip());
0583               }
0584             }
0585           }
0586           if (tTopo->tibLayer(id) == 4) {
0587             if (tTopo->tibStringInfo(id)[1] == 1) {
0588               if (tTopo->tibModule(id) == 1) {
0589                 meAdcTIBLayer4Intzp_[0]->Fill((*iter).adc());
0590                 meStripTIBLayer4Intzp_[0]->Fill((*iter).strip());
0591               }
0592               if (tTopo->tibModule(id) == 2) {
0593                 meAdcTIBLayer4Intzp_[1]->Fill((*iter).adc());
0594                 meStripTIBLayer4Intzp_[1]->Fill((*iter).strip());
0595               }
0596               if (tTopo->tibModule(id) == 3) {
0597                 meAdcTIBLayer4Intzp_[2]->Fill((*iter).adc());
0598                 meStripTIBLayer4Intzp_[2]->Fill((*iter).strip());
0599               }
0600             } else {
0601               if (tTopo->tibModule(id) == 1) {
0602                 meAdcTIBLayer4Extzp_[0]->Fill((*iter).adc());
0603                 meStripTIBLayer4Extzp_[0]->Fill((*iter).strip());
0604               }
0605               if (tTopo->tibModule(id) == 2) {
0606                 meAdcTIBLayer4Extzp_[1]->Fill((*iter).adc());
0607                 meStripTIBLayer4Extzp_[1]->Fill((*iter).strip());
0608               }
0609               if (tTopo->tibModule(id) == 3) {
0610                 meAdcTIBLayer4Extzp_[2]->Fill((*iter).adc());
0611                 meStripTIBLayer4Extzp_[2]->Fill((*iter).strip());
0612               }
0613             }
0614           }
0615         }
0616       }
0617     }
0618     if (detId.subdetId() == StripSubdetector::TOB) {
0619       for (iter = begin; iter != end; iter++) {  // loop digis
0620         if (tTopo->tobRodInfo(id)[0] == 1) {
0621           ++ndigilayertobzm[tTopo->tobLayer(id) - 1];
0622           if (tTopo->tobLayer(id) == 1) {
0623             if (tTopo->tobModule(id) == 1) {
0624               meAdcTOBLayer1zm_[0]->Fill((*iter).adc());
0625               meStripTOBLayer1zm_[0]->Fill((*iter).strip());
0626             }
0627             if (tTopo->tobModule(id) == 2) {
0628               meAdcTOBLayer1zm_[1]->Fill((*iter).adc());
0629               meStripTOBLayer1zm_[1]->Fill((*iter).strip());
0630             }
0631             if (tTopo->tobModule(id) == 3) {
0632               meAdcTOBLayer1zm_[2]->Fill((*iter).adc());
0633               meStripTOBLayer1zm_[2]->Fill((*iter).strip());
0634             }
0635             if (tTopo->tobModule(id) == 4) {
0636               meAdcTOBLayer1zm_[3]->Fill((*iter).adc());
0637               meStripTOBLayer1zm_[3]->Fill((*iter).strip());
0638             }
0639             if (tTopo->tobModule(id) == 5) {
0640               meAdcTOBLayer1zm_[4]->Fill((*iter).adc());
0641               meStripTOBLayer1zm_[4]->Fill((*iter).strip());
0642             }
0643             if (tTopo->tobModule(id) == 6) {
0644               meAdcTOBLayer1zm_[5]->Fill((*iter).adc());
0645               meStripTOBLayer1zm_[5]->Fill((*iter).strip());
0646             }
0647           }
0648           if (tTopo->tobLayer(id) == 2) {
0649             if (tTopo->tobModule(id) == 1) {
0650               meAdcTOBLayer2zm_[0]->Fill((*iter).adc());
0651               meStripTOBLayer2zm_[0]->Fill((*iter).strip());
0652             }
0653             if (tTopo->tobModule(id) == 2) {
0654               meAdcTOBLayer2zm_[1]->Fill((*iter).adc());
0655               meStripTOBLayer2zm_[1]->Fill((*iter).strip());
0656             }
0657             if (tTopo->tobModule(id) == 3) {
0658               meAdcTOBLayer2zm_[2]->Fill((*iter).adc());
0659               meStripTOBLayer2zm_[2]->Fill((*iter).strip());
0660             }
0661             if (tTopo->tobModule(id) == 4) {
0662               meAdcTOBLayer2zm_[3]->Fill((*iter).adc());
0663               meStripTOBLayer2zm_[3]->Fill((*iter).strip());
0664             }
0665             if (tTopo->tobModule(id) == 5) {
0666               meAdcTOBLayer2zm_[4]->Fill((*iter).adc());
0667               meStripTOBLayer2zm_[4]->Fill((*iter).strip());
0668             }
0669             if (tTopo->tobModule(id) == 6) {
0670               meAdcTOBLayer2zm_[5]->Fill((*iter).adc());
0671               meStripTOBLayer2zm_[5]->Fill((*iter).strip());
0672             }
0673           }
0674           if (tTopo->tobLayer(id) == 3) {
0675             if (tTopo->tobModule(id) == 1) {
0676               meAdcTOBLayer3zm_[0]->Fill((*iter).adc());
0677               meStripTOBLayer3zm_[0]->Fill((*iter).strip());
0678             }
0679             if (tTopo->tobModule(id) == 2) {
0680               meAdcTOBLayer3zm_[1]->Fill((*iter).adc());
0681               meStripTOBLayer3zm_[1]->Fill((*iter).strip());
0682             }
0683             if (tTopo->tobModule(id) == 3) {
0684               meAdcTOBLayer3zm_[2]->Fill((*iter).adc());
0685               meStripTOBLayer3zm_[2]->Fill((*iter).strip());
0686             }
0687             if (tTopo->tobModule(id) == 4) {
0688               meAdcTOBLayer3zm_[3]->Fill((*iter).adc());
0689               meStripTOBLayer3zm_[3]->Fill((*iter).strip());
0690             }
0691             if (tTopo->tobModule(id) == 5) {
0692               meAdcTOBLayer3zm_[4]->Fill((*iter).adc());
0693               meStripTOBLayer3zm_[4]->Fill((*iter).strip());
0694             }
0695             if (tTopo->tobModule(id) == 6) {
0696               meAdcTOBLayer3zm_[5]->Fill((*iter).adc());
0697               meStripTOBLayer3zm_[5]->Fill((*iter).strip());
0698             }
0699           }
0700           if (tTopo->tobLayer(id) == 4) {
0701             if (tTopo->tobModule(id) == 1) {
0702               meAdcTOBLayer4zm_[0]->Fill((*iter).adc());
0703               meStripTOBLayer4zm_[0]->Fill((*iter).strip());
0704             }
0705             if (tTopo->tobModule(id) == 2) {
0706               meAdcTOBLayer4zm_[1]->Fill((*iter).adc());
0707               meStripTOBLayer4zm_[1]->Fill((*iter).strip());
0708             }
0709             if (tTopo->tobModule(id) == 3) {
0710               meAdcTOBLayer4zm_[2]->Fill((*iter).adc());
0711               meStripTOBLayer4zm_[2]->Fill((*iter).strip());
0712             }
0713             if (tTopo->tobModule(id) == 4) {
0714               meAdcTOBLayer4zm_[3]->Fill((*iter).adc());
0715               meStripTOBLayer4zm_[3]->Fill((*iter).strip());
0716             }
0717             if (tTopo->tobModule(id) == 5) {
0718               meAdcTOBLayer4zm_[4]->Fill((*iter).adc());
0719               meStripTOBLayer4zm_[4]->Fill((*iter).strip());
0720             }
0721             if (tTopo->tobModule(id) == 6) {
0722               meAdcTOBLayer4zm_[5]->Fill((*iter).adc());
0723               meStripTOBLayer4zm_[5]->Fill((*iter).strip());
0724             }
0725           }
0726           if (tTopo->tobLayer(id) == 5) {
0727             if (tTopo->tobModule(id) == 1) {
0728               meAdcTOBLayer5zm_[0]->Fill((*iter).adc());
0729               meStripTOBLayer5zm_[0]->Fill((*iter).strip());
0730             }
0731             if (tTopo->tobModule(id) == 2) {
0732               meAdcTOBLayer5zm_[1]->Fill((*iter).adc());
0733               meStripTOBLayer5zm_[1]->Fill((*iter).strip());
0734             }
0735             if (tTopo->tobModule(id) == 3) {
0736               meAdcTOBLayer5zm_[2]->Fill((*iter).adc());
0737               meStripTOBLayer5zm_[2]->Fill((*iter).strip());
0738             }
0739             if (tTopo->tobModule(id) == 4) {
0740               meAdcTOBLayer5zm_[3]->Fill((*iter).adc());
0741               meStripTOBLayer5zm_[3]->Fill((*iter).strip());
0742             }
0743             if (tTopo->tobModule(id) == 5) {
0744               meAdcTOBLayer5zm_[4]->Fill((*iter).adc());
0745               meStripTOBLayer5zm_[4]->Fill((*iter).strip());
0746             }
0747             if (tTopo->tobModule(id) == 6) {
0748               meAdcTOBLayer5zm_[5]->Fill((*iter).adc());
0749               meStripTOBLayer5zm_[5]->Fill((*iter).strip());
0750             }
0751           }
0752           if (tTopo->tobLayer(id) == 6) {
0753             if (tTopo->tobModule(id) == 1) {
0754               meAdcTOBLayer6zm_[0]->Fill((*iter).adc());
0755               meStripTOBLayer6zm_[0]->Fill((*iter).strip());
0756             }
0757             if (tTopo->tobModule(id) == 2) {
0758               meAdcTOBLayer6zm_[1]->Fill((*iter).adc());
0759               meStripTOBLayer6zm_[1]->Fill((*iter).strip());
0760             }
0761             if (tTopo->tobModule(id) == 3) {
0762               meAdcTOBLayer6zm_[2]->Fill((*iter).adc());
0763               meStripTOBLayer6zm_[2]->Fill((*iter).strip());
0764             }
0765             if (tTopo->tobModule(id) == 4) {
0766               meAdcTOBLayer6zm_[3]->Fill((*iter).adc());
0767               meStripTOBLayer6zm_[3]->Fill((*iter).strip());
0768             }
0769             if (tTopo->tobModule(id) == 5) {
0770               meAdcTOBLayer6zm_[4]->Fill((*iter).adc());
0771               meStripTOBLayer6zm_[4]->Fill((*iter).strip());
0772             }
0773             if (tTopo->tobModule(id) == 6) {
0774               meAdcTOBLayer6zm_[5]->Fill((*iter).adc());
0775               meStripTOBLayer6zm_[5]->Fill((*iter).strip());
0776             }
0777           }
0778 
0779         } else {
0780           ++ndigilayertobzp[tTopo->tobLayer(id) - 1];
0781           if (tTopo->tobLayer(id) == 1) {
0782             if (tTopo->tobModule(id) == 1) {
0783               meAdcTOBLayer1zp_[0]->Fill((*iter).adc());
0784               meStripTOBLayer1zp_[0]->Fill((*iter).strip());
0785             }
0786             if (tTopo->tobModule(id) == 2) {
0787               meAdcTOBLayer1zp_[1]->Fill((*iter).adc());
0788               meStripTOBLayer1zp_[1]->Fill((*iter).strip());
0789             }
0790             if (tTopo->tobModule(id) == 3) {
0791               meAdcTOBLayer1zp_[2]->Fill((*iter).adc());
0792               meStripTOBLayer1zp_[2]->Fill((*iter).strip());
0793             }
0794             if (tTopo->tobModule(id) == 4) {
0795               meAdcTOBLayer1zp_[3]->Fill((*iter).adc());
0796               meStripTOBLayer1zp_[3]->Fill((*iter).strip());
0797             }
0798             if (tTopo->tobModule(id) == 5) {
0799               meAdcTOBLayer1zp_[4]->Fill((*iter).adc());
0800               meStripTOBLayer1zp_[4]->Fill((*iter).strip());
0801             }
0802             if (tTopo->tobModule(id) == 6) {
0803               meAdcTOBLayer1zp_[5]->Fill((*iter).adc());
0804               meStripTOBLayer1zp_[5]->Fill((*iter).strip());
0805             }
0806           }
0807           if (tTopo->tobLayer(id) == 2) {
0808             if (tTopo->tobModule(id) == 1) {
0809               meAdcTOBLayer2zp_[0]->Fill((*iter).adc());
0810               meStripTOBLayer2zp_[0]->Fill((*iter).strip());
0811             }
0812             if (tTopo->tobModule(id) == 2) {
0813               meAdcTOBLayer2zp_[1]->Fill((*iter).adc());
0814               meStripTOBLayer2zp_[1]->Fill((*iter).strip());
0815             }
0816             if (tTopo->tobModule(id) == 3) {
0817               meAdcTOBLayer2zp_[2]->Fill((*iter).adc());
0818               meStripTOBLayer2zp_[2]->Fill((*iter).strip());
0819             }
0820             if (tTopo->tobModule(id) == 4) {
0821               meAdcTOBLayer2zp_[3]->Fill((*iter).adc());
0822               meStripTOBLayer2zp_[3]->Fill((*iter).strip());
0823             }
0824             if (tTopo->tobModule(id) == 5) {
0825               meAdcTOBLayer2zp_[4]->Fill((*iter).adc());
0826               meStripTOBLayer2zp_[4]->Fill((*iter).strip());
0827             }
0828             if (tTopo->tobModule(id) == 6) {
0829               meAdcTOBLayer2zp_[5]->Fill((*iter).adc());
0830               meStripTOBLayer2zp_[5]->Fill((*iter).strip());
0831             }
0832           }
0833           if (tTopo->tobLayer(id) == 3) {
0834             if (tTopo->tobModule(id) == 1) {
0835               meAdcTOBLayer3zp_[0]->Fill((*iter).adc());
0836               meStripTOBLayer3zp_[0]->Fill((*iter).strip());
0837             }
0838             if (tTopo->tobModule(id) == 2) {
0839               meAdcTOBLayer3zp_[1]->Fill((*iter).adc());
0840               meStripTOBLayer3zp_[1]->Fill((*iter).strip());
0841             }
0842             if (tTopo->tobModule(id) == 3) {
0843               meAdcTOBLayer3zp_[2]->Fill((*iter).adc());
0844               meStripTOBLayer3zp_[2]->Fill((*iter).strip());
0845             }
0846             if (tTopo->tobModule(id) == 4) {
0847               meAdcTOBLayer3zp_[3]->Fill((*iter).adc());
0848               meStripTOBLayer3zp_[3]->Fill((*iter).strip());
0849             }
0850             if (tTopo->tobModule(id) == 5) {
0851               meAdcTOBLayer3zp_[4]->Fill((*iter).adc());
0852               meStripTOBLayer3zp_[4]->Fill((*iter).strip());
0853             }
0854             if (tTopo->tobModule(id) == 6) {
0855               meAdcTOBLayer3zp_[5]->Fill((*iter).adc());
0856               meStripTOBLayer3zp_[5]->Fill((*iter).strip());
0857             }
0858           }
0859           if (tTopo->tobLayer(id) == 4) {
0860             if (tTopo->tobModule(id) == 1) {
0861               meAdcTOBLayer4zp_[0]->Fill((*iter).adc());
0862               meStripTOBLayer4zp_[0]->Fill((*iter).strip());
0863             }
0864             if (tTopo->tobModule(id) == 2) {
0865               meAdcTOBLayer4zp_[1]->Fill((*iter).adc());
0866               meStripTOBLayer4zp_[1]->Fill((*iter).strip());
0867             }
0868             if (tTopo->tobModule(id) == 3) {
0869               meAdcTOBLayer4zp_[2]->Fill((*iter).adc());
0870               meStripTOBLayer4zp_[2]->Fill((*iter).strip());
0871             }
0872             if (tTopo->tobModule(id) == 4) {
0873               meAdcTOBLayer4zp_[3]->Fill((*iter).adc());
0874               meStripTOBLayer4zp_[3]->Fill((*iter).strip());
0875             }
0876             if (tTopo->tobModule(id) == 5) {
0877               meAdcTOBLayer4zp_[4]->Fill((*iter).adc());
0878               meStripTOBLayer4zp_[4]->Fill((*iter).strip());
0879             }
0880             if (tTopo->tobModule(id) == 6) {
0881               meAdcTOBLayer4zp_[5]->Fill((*iter).adc());
0882               meStripTOBLayer4zp_[5]->Fill((*iter).strip());
0883             }
0884           }
0885           if (tTopo->tobLayer(id) == 5) {
0886             if (tTopo->tobModule(id) == 1) {
0887               meAdcTOBLayer5zp_[0]->Fill((*iter).adc());
0888               meStripTOBLayer5zp_[0]->Fill((*iter).strip());
0889             }
0890             if (tTopo->tobModule(id) == 2) {
0891               meAdcTOBLayer5zp_[1]->Fill((*iter).adc());
0892               meStripTOBLayer5zp_[1]->Fill((*iter).strip());
0893             }
0894             if (tTopo->tobModule(id) == 3) {
0895               meAdcTOBLayer5zp_[2]->Fill((*iter).adc());
0896               meStripTOBLayer5zp_[2]->Fill((*iter).strip());
0897             }
0898             if (tTopo->tobModule(id) == 4) {
0899               meAdcTOBLayer5zp_[3]->Fill((*iter).adc());
0900               meStripTOBLayer5zp_[3]->Fill((*iter).strip());
0901             }
0902             if (tTopo->tobModule(id) == 5) {
0903               meAdcTOBLayer5zp_[4]->Fill((*iter).adc());
0904               meStripTOBLayer5zp_[4]->Fill((*iter).strip());
0905             }
0906             if (tTopo->tobModule(id) == 6) {
0907               meAdcTOBLayer5zp_[5]->Fill((*iter).adc());
0908               meStripTOBLayer5zp_[5]->Fill((*iter).strip());
0909             }
0910           }
0911           if (tTopo->tobLayer(id) == 6) {
0912             if (tTopo->tobModule(id) == 1) {
0913               meAdcTOBLayer6zp_[0]->Fill((*iter).adc());
0914               meStripTOBLayer6zp_[0]->Fill((*iter).strip());
0915             }
0916             if (tTopo->tobModule(id) == 2) {
0917               meAdcTOBLayer6zp_[1]->Fill((*iter).adc());
0918               meStripTOBLayer6zp_[1]->Fill((*iter).strip());
0919             }
0920             if (tTopo->tobModule(id) == 3) {
0921               meAdcTOBLayer6zp_[2]->Fill((*iter).adc());
0922               meStripTOBLayer6zp_[2]->Fill((*iter).strip());
0923             }
0924             if (tTopo->tobModule(id) == 4) {
0925               meAdcTOBLayer6zp_[3]->Fill((*iter).adc());
0926               meStripTOBLayer6zp_[3]->Fill((*iter).strip());
0927             }
0928             if (tTopo->tobModule(id) == 5) {
0929               meAdcTOBLayer6zp_[4]->Fill((*iter).adc());
0930               meStripTOBLayer6zp_[4]->Fill((*iter).strip());
0931             }
0932             if (tTopo->tobModule(id) == 6) {
0933               meAdcTOBLayer6zp_[5]->Fill((*iter).adc());
0934               meStripTOBLayer6zp_[5]->Fill((*iter).strip());
0935             }
0936           }
0937         }
0938       }
0939     }
0940 
0941     if (detId.subdetId() == StripSubdetector::TID) {
0942       for (iter = begin; iter != end; iter++) {
0943         if (tTopo->tidSide(id) == 1) {
0944           ++ndigiwheeltidzm[tTopo->tidWheel(id) - 1];
0945           if (tTopo->tidWheel(id) == 1) {
0946             if (tTopo->tidRing(id) == 1) {
0947               meAdcTIDWheel1zm_[0]->Fill((*iter).adc());
0948               meStripTIDWheel1zm_[0]->Fill((*iter).strip());
0949             }
0950             if (tTopo->tidRing(id) == 2) {
0951               meAdcTIDWheel1zm_[1]->Fill((*iter).adc());
0952               meStripTIDWheel1zm_[1]->Fill((*iter).strip());
0953             }
0954             if (tTopo->tidRing(id) == 3) {
0955               meAdcTIDWheel1zm_[2]->Fill((*iter).adc());
0956               meStripTIDWheel1zm_[2]->Fill((*iter).strip());
0957             }
0958           }
0959           if (tTopo->tidWheel(id) == 2) {
0960             if (tTopo->tidRing(id) == 1) {
0961               meAdcTIDWheel2zm_[0]->Fill((*iter).adc());
0962               meStripTIDWheel2zm_[0]->Fill((*iter).strip());
0963             }
0964             if (tTopo->tidRing(id) == 2) {
0965               meAdcTIDWheel2zm_[1]->Fill((*iter).adc());
0966               meStripTIDWheel2zm_[1]->Fill((*iter).strip());
0967             }
0968             if (tTopo->tidRing(id) == 3) {
0969               meAdcTIDWheel2zm_[2]->Fill((*iter).adc());
0970               meStripTIDWheel2zm_[2]->Fill((*iter).strip());
0971             }
0972           }
0973           if (tTopo->tidWheel(id) == 3) {
0974             if (tTopo->tidRing(id) == 1) {
0975               meAdcTIDWheel3zm_[0]->Fill((*iter).adc());
0976               meStripTIDWheel3zm_[0]->Fill((*iter).strip());
0977             }
0978             if (tTopo->tidRing(id) == 2) {
0979               meAdcTIDWheel3zm_[1]->Fill((*iter).adc());
0980               meStripTIDWheel3zm_[1]->Fill((*iter).strip());
0981             }
0982             if (tTopo->tidRing(id) == 3) {
0983               meAdcTIDWheel3zm_[2]->Fill((*iter).adc());
0984               meStripTIDWheel3zm_[2]->Fill((*iter).strip());
0985             }
0986           }
0987 
0988         } else {
0989           ++ndigiwheeltidzp[tTopo->tidWheel(id) - 1];
0990           if (tTopo->tidWheel(id) == 1) {
0991             if (tTopo->tidRing(id) == 1) {
0992               meAdcTIDWheel1zp_[0]->Fill((*iter).adc());
0993               meStripTIDWheel1zp_[0]->Fill((*iter).strip());
0994             }
0995             if (tTopo->tidRing(id) == 2) {
0996               meAdcTIDWheel1zp_[1]->Fill((*iter).adc());
0997               meStripTIDWheel1zp_[1]->Fill((*iter).strip());
0998             }
0999             if (tTopo->tidRing(id) == 3) {
1000               meAdcTIDWheel1zp_[2]->Fill((*iter).adc());
1001               meStripTIDWheel1zp_[2]->Fill((*iter).strip());
1002             }
1003           }
1004           if (tTopo->tidWheel(id) == 2) {
1005             if (tTopo->tidRing(id) == 1) {
1006               meAdcTIDWheel2zp_[0]->Fill((*iter).adc());
1007               meStripTIDWheel2zp_[0]->Fill((*iter).strip());
1008             }
1009             if (tTopo->tidRing(id) == 2) {
1010               meAdcTIDWheel2zp_[1]->Fill((*iter).adc());
1011               meStripTIDWheel2zp_[1]->Fill((*iter).strip());
1012             }
1013             if (tTopo->tidRing(id) == 3) {
1014               meAdcTIDWheel2zp_[2]->Fill((*iter).adc());
1015               meStripTIDWheel2zp_[2]->Fill((*iter).strip());
1016             }
1017           }
1018           if (tTopo->tidWheel(id) == 3) {
1019             if (tTopo->tidRing(id) == 1) {
1020               meAdcTIDWheel3zp_[0]->Fill((*iter).adc());
1021               meStripTIDWheel3zp_[0]->Fill((*iter).strip());
1022             }
1023             if (tTopo->tidRing(id) == 2) {
1024               meAdcTIDWheel3zp_[1]->Fill((*iter).adc());
1025               meStripTIDWheel3zp_[1]->Fill((*iter).strip());
1026             }
1027             if (tTopo->tidRing(id) == 3) {
1028               meAdcTIDWheel3zp_[2]->Fill((*iter).adc());
1029               meStripTIDWheel3zp_[2]->Fill((*iter).strip());
1030             }
1031           }
1032         }
1033       }
1034     }
1035     if (detId.subdetId() == StripSubdetector::TEC) {
1036       for (iter = begin; iter != end; iter++) {
1037         if (tTopo->tecSide(id) == 1) {
1038           ++ndigiwheelteczm[tTopo->tecWheel(id) - 1];
1039           if (tTopo->tecWheel(id) == 1) {
1040             if (tTopo->tecRing(id) == 1) {
1041               meAdcTECWheel1zm_[0]->Fill((*iter).adc());
1042               meStripTECWheel1zm_[0]->Fill((*iter).strip());
1043             }
1044             if (tTopo->tecRing(id) == 2) {
1045               meAdcTECWheel1zm_[1]->Fill((*iter).adc());
1046               meStripTECWheel1zm_[1]->Fill((*iter).strip());
1047             }
1048             if (tTopo->tecRing(id) == 3) {
1049               meAdcTECWheel1zm_[2]->Fill((*iter).adc());
1050               meStripTECWheel1zm_[2]->Fill((*iter).strip());
1051             }
1052             if (tTopo->tecRing(id) == 4) {
1053               meAdcTECWheel1zm_[3]->Fill((*iter).adc());
1054               meStripTECWheel1zm_[3]->Fill((*iter).strip());
1055             }
1056             if (tTopo->tecRing(id) == 5) {
1057               meAdcTECWheel1zm_[4]->Fill((*iter).adc());
1058               meStripTECWheel1zm_[4]->Fill((*iter).strip());
1059             }
1060             if (tTopo->tecRing(id) == 6) {
1061               meAdcTECWheel1zm_[5]->Fill((*iter).adc());
1062               meStripTECWheel1zm_[5]->Fill((*iter).strip());
1063             }
1064             if (tTopo->tecRing(id) == 7) {
1065               meAdcTECWheel1zm_[6]->Fill((*iter).adc());
1066               meStripTECWheel1zm_[6]->Fill((*iter).strip());
1067             }
1068           }
1069           if (tTopo->tecWheel(id) == 2) {
1070             if (tTopo->tecRing(id) == 1) {
1071               meAdcTECWheel2zm_[0]->Fill((*iter).adc());
1072               meStripTECWheel2zm_[0]->Fill((*iter).strip());
1073             }
1074             if (tTopo->tecRing(id) == 2) {
1075               meAdcTECWheel2zm_[1]->Fill((*iter).adc());
1076               meStripTECWheel2zm_[1]->Fill((*iter).strip());
1077             }
1078             if (tTopo->tecRing(id) == 3) {
1079               meAdcTECWheel2zm_[2]->Fill((*iter).adc());
1080               meStripTECWheel2zm_[2]->Fill((*iter).strip());
1081             }
1082             if (tTopo->tecRing(id) == 4) {
1083               meAdcTECWheel2zm_[3]->Fill((*iter).adc());
1084               meStripTECWheel2zm_[3]->Fill((*iter).strip());
1085             }
1086             if (tTopo->tecRing(id) == 5) {
1087               meAdcTECWheel2zm_[4]->Fill((*iter).adc());
1088               meStripTECWheel2zm_[4]->Fill((*iter).strip());
1089             }
1090             if (tTopo->tecRing(id) == 6) {
1091               meAdcTECWheel2zm_[5]->Fill((*iter).adc());
1092               meStripTECWheel2zm_[5]->Fill((*iter).strip());
1093             }
1094             if (tTopo->tecRing(id) == 7) {
1095               meAdcTECWheel2zm_[6]->Fill((*iter).adc());
1096               meStripTECWheel2zm_[6]->Fill((*iter).strip());
1097             }
1098           }
1099           if (tTopo->tecWheel(id) == 3) {
1100             if (tTopo->tecRing(id) == 1) {
1101               meAdcTECWheel3zm_[0]->Fill((*iter).adc());
1102               meStripTECWheel3zm_[0]->Fill((*iter).strip());
1103             }
1104             if (tTopo->tecRing(id) == 2) {
1105               meAdcTECWheel3zm_[1]->Fill((*iter).adc());
1106               meStripTECWheel3zm_[1]->Fill((*iter).strip());
1107             }
1108             if (tTopo->tecRing(id) == 3) {
1109               meAdcTECWheel3zm_[2]->Fill((*iter).adc());
1110               meStripTECWheel3zm_[2]->Fill((*iter).strip());
1111             }
1112             if (tTopo->tecRing(id) == 4) {
1113               meAdcTECWheel3zm_[3]->Fill((*iter).adc());
1114               meStripTECWheel3zm_[3]->Fill((*iter).strip());
1115             }
1116             if (tTopo->tecRing(id) == 5) {
1117               meAdcTECWheel3zm_[4]->Fill((*iter).adc());
1118               meStripTECWheel3zm_[4]->Fill((*iter).strip());
1119             }
1120             if (tTopo->tecRing(id) == 6) {
1121               meAdcTECWheel3zm_[5]->Fill((*iter).adc());
1122               meStripTECWheel3zm_[5]->Fill((*iter).strip());
1123             }
1124             if (tTopo->tecRing(id) == 7) {
1125               meAdcTECWheel3zm_[6]->Fill((*iter).adc());
1126               meStripTECWheel3zm_[6]->Fill((*iter).strip());
1127             }
1128           }
1129           if (tTopo->tecWheel(id) == 4) {
1130             if (tTopo->tecRing(id) == 2) {
1131               meAdcTECWheel4zm_[0]->Fill((*iter).adc());
1132               meStripTECWheel4zm_[0]->Fill((*iter).strip());
1133             }
1134             if (tTopo->tecRing(id) == 3) {
1135               meAdcTECWheel4zm_[1]->Fill((*iter).adc());
1136               meStripTECWheel4zm_[1]->Fill((*iter).strip());
1137             }
1138             if (tTopo->tecRing(id) == 4) {
1139               meAdcTECWheel4zm_[2]->Fill((*iter).adc());
1140               meStripTECWheel4zm_[2]->Fill((*iter).strip());
1141             }
1142             if (tTopo->tecRing(id) == 5) {
1143               meAdcTECWheel4zm_[3]->Fill((*iter).adc());
1144               meStripTECWheel4zm_[3]->Fill((*iter).strip());
1145             }
1146             if (tTopo->tecRing(id) == 6) {
1147               meAdcTECWheel4zm_[4]->Fill((*iter).adc());
1148               meStripTECWheel4zm_[4]->Fill((*iter).strip());
1149             }
1150             if (tTopo->tecRing(id) == 7) {
1151               meAdcTECWheel4zm_[5]->Fill((*iter).adc());
1152               meStripTECWheel4zm_[5]->Fill((*iter).strip());
1153             }
1154           }
1155           if (tTopo->tecWheel(id) == 5) {
1156             if (tTopo->tecRing(id) == 2) {
1157               meAdcTECWheel5zm_[0]->Fill((*iter).adc());
1158               meStripTECWheel5zm_[0]->Fill((*iter).strip());
1159             }
1160             if (tTopo->tecRing(id) == 3) {
1161               meAdcTECWheel5zm_[1]->Fill((*iter).adc());
1162               meStripTECWheel5zm_[1]->Fill((*iter).strip());
1163             }
1164             if (tTopo->tecRing(id) == 4) {
1165               meAdcTECWheel5zm_[2]->Fill((*iter).adc());
1166               meStripTECWheel5zm_[2]->Fill((*iter).strip());
1167             }
1168             if (tTopo->tecRing(id) == 5) {
1169               meAdcTECWheel5zm_[3]->Fill((*iter).adc());
1170               meStripTECWheel5zm_[3]->Fill((*iter).strip());
1171             }
1172             if (tTopo->tecRing(id) == 6) {
1173               meAdcTECWheel5zm_[4]->Fill((*iter).adc());
1174               meStripTECWheel5zm_[4]->Fill((*iter).strip());
1175             }
1176             if (tTopo->tecRing(id) == 7) {
1177               meAdcTECWheel5zm_[5]->Fill((*iter).adc());
1178               meStripTECWheel5zm_[5]->Fill((*iter).strip());
1179             }
1180           }
1181           if (tTopo->tecWheel(id) == 6) {
1182             if (tTopo->tecRing(id) == 2) {
1183               meAdcTECWheel6zm_[0]->Fill((*iter).adc());
1184               meStripTECWheel6zm_[0]->Fill((*iter).strip());
1185             }
1186             if (tTopo->tecRing(id) == 3) {
1187               meAdcTECWheel6zm_[1]->Fill((*iter).adc());
1188               meStripTECWheel6zm_[1]->Fill((*iter).strip());
1189             }
1190             if (tTopo->tecRing(id) == 4) {
1191               meAdcTECWheel6zm_[2]->Fill((*iter).adc());
1192               meStripTECWheel6zm_[2]->Fill((*iter).strip());
1193             }
1194             if (tTopo->tecRing(id) == 5) {
1195               meAdcTECWheel6zm_[3]->Fill((*iter).adc());
1196               meStripTECWheel6zm_[3]->Fill((*iter).strip());
1197             }
1198             if (tTopo->tecRing(id) == 6) {
1199               meAdcTECWheel6zm_[4]->Fill((*iter).adc());
1200               meStripTECWheel6zm_[4]->Fill((*iter).strip());
1201             }
1202             if (tTopo->tecRing(id) == 7) {
1203               meAdcTECWheel6zm_[5]->Fill((*iter).adc());
1204               meStripTECWheel6zm_[5]->Fill((*iter).strip());
1205             }
1206           }
1207           if (tTopo->tecWheel(id) == 7) {
1208             if (tTopo->tecRing(id) == 3) {
1209               meAdcTECWheel7zm_[0]->Fill((*iter).adc());
1210               meStripTECWheel7zm_[0]->Fill((*iter).strip());
1211             }
1212             if (tTopo->tecRing(id) == 4) {
1213               meAdcTECWheel7zm_[1]->Fill((*iter).adc());
1214               meStripTECWheel7zm_[1]->Fill((*iter).strip());
1215             }
1216             if (tTopo->tecRing(id) == 5) {
1217               meAdcTECWheel7zm_[2]->Fill((*iter).adc());
1218               meStripTECWheel7zm_[2]->Fill((*iter).strip());
1219             }
1220             if (tTopo->tecRing(id) == 6) {
1221               meAdcTECWheel7zm_[3]->Fill((*iter).adc());
1222               meStripTECWheel7zm_[3]->Fill((*iter).strip());
1223             }
1224             if (tTopo->tecRing(id) == 7) {
1225               meAdcTECWheel7zm_[4]->Fill((*iter).adc());
1226               meStripTECWheel7zm_[4]->Fill((*iter).strip());
1227             }
1228           }
1229           if (tTopo->tecWheel(id) == 8) {
1230             if (tTopo->tecRing(id) == 3) {
1231               meAdcTECWheel8zm_[0]->Fill((*iter).adc());
1232               meStripTECWheel8zm_[0]->Fill((*iter).strip());
1233             }
1234             if (tTopo->tecRing(id) == 4) {
1235               meAdcTECWheel8zm_[1]->Fill((*iter).adc());
1236               meStripTECWheel8zm_[1]->Fill((*iter).strip());
1237             }
1238             if (tTopo->tecRing(id) == 5) {
1239               meAdcTECWheel8zm_[2]->Fill((*iter).adc());
1240               meStripTECWheel8zm_[2]->Fill((*iter).strip());
1241             }
1242             if (tTopo->tecRing(id) == 6) {
1243               meAdcTECWheel8zm_[3]->Fill((*iter).adc());
1244               meStripTECWheel8zm_[3]->Fill((*iter).strip());
1245             }
1246             if (tTopo->tecRing(id) == 7) {
1247               meAdcTECWheel8zm_[4]->Fill((*iter).adc());
1248               meStripTECWheel8zm_[4]->Fill((*iter).strip());
1249             }
1250           }
1251           if (tTopo->tecWheel(id) == 9) {
1252             if (tTopo->tecRing(id) == 4) {
1253               meAdcTECWheel9zm_[0]->Fill((*iter).adc());
1254               meStripTECWheel9zm_[0]->Fill((*iter).strip());
1255             }
1256             if (tTopo->tecRing(id) == 5) {
1257               meAdcTECWheel9zm_[1]->Fill((*iter).adc());
1258               meStripTECWheel9zm_[1]->Fill((*iter).strip());
1259             }
1260             if (tTopo->tecRing(id) == 6) {
1261               meAdcTECWheel9zm_[2]->Fill((*iter).adc());
1262               meStripTECWheel9zm_[2]->Fill((*iter).strip());
1263             }
1264             if (tTopo->tecRing(id) == 7) {
1265               meAdcTECWheel9zm_[3]->Fill((*iter).adc());
1266               meStripTECWheel9zm_[3]->Fill((*iter).strip());
1267             }
1268           }
1269         } else {
1270           ++ndigiwheelteczp[tTopo->tecWheel(id) - 1];
1271           if (tTopo->tecWheel(id) == 1) {
1272             if (tTopo->tecRing(id) == 1) {
1273               meAdcTECWheel1zp_[0]->Fill((*iter).adc());
1274               meStripTECWheel1zp_[0]->Fill((*iter).strip());
1275             }
1276             if (tTopo->tecRing(id) == 2) {
1277               meAdcTECWheel1zp_[1]->Fill((*iter).adc());
1278               meStripTECWheel1zp_[1]->Fill((*iter).strip());
1279             }
1280             if (tTopo->tecRing(id) == 3) {
1281               meAdcTECWheel1zp_[2]->Fill((*iter).adc());
1282               meStripTECWheel1zp_[2]->Fill((*iter).strip());
1283             }
1284             if (tTopo->tecRing(id) == 4) {
1285               meAdcTECWheel1zp_[3]->Fill((*iter).adc());
1286               meStripTECWheel1zp_[3]->Fill((*iter).strip());
1287             }
1288             if (tTopo->tecRing(id) == 5) {
1289               meAdcTECWheel1zp_[4]->Fill((*iter).adc());
1290               meStripTECWheel1zp_[4]->Fill((*iter).strip());
1291             }
1292             if (tTopo->tecRing(id) == 6) {
1293               meAdcTECWheel1zp_[5]->Fill((*iter).adc());
1294               meStripTECWheel1zp_[5]->Fill((*iter).strip());
1295             }
1296             if (tTopo->tecRing(id) == 7) {
1297               meAdcTECWheel1zp_[6]->Fill((*iter).adc());
1298               meStripTECWheel1zp_[6]->Fill((*iter).strip());
1299             }
1300           }
1301           if (tTopo->tecWheel(id) == 2) {
1302             if (tTopo->tecRing(id) == 1) {
1303               meAdcTECWheel2zp_[0]->Fill((*iter).adc());
1304               meStripTECWheel2zp_[0]->Fill((*iter).strip());
1305             }
1306             if (tTopo->tecRing(id) == 2) {
1307               meAdcTECWheel2zp_[1]->Fill((*iter).adc());
1308               meStripTECWheel2zp_[1]->Fill((*iter).strip());
1309             }
1310             if (tTopo->tecRing(id) == 3) {
1311               meAdcTECWheel2zp_[2]->Fill((*iter).adc());
1312               meStripTECWheel2zp_[2]->Fill((*iter).strip());
1313             }
1314             if (tTopo->tecRing(id) == 4) {
1315               meAdcTECWheel2zp_[3]->Fill((*iter).adc());
1316               meStripTECWheel2zp_[3]->Fill((*iter).strip());
1317             }
1318             if (tTopo->tecRing(id) == 5) {
1319               meAdcTECWheel2zp_[4]->Fill((*iter).adc());
1320               meStripTECWheel2zp_[4]->Fill((*iter).strip());
1321             }
1322             if (tTopo->tecRing(id) == 6) {
1323               meAdcTECWheel2zp_[5]->Fill((*iter).adc());
1324               meStripTECWheel2zp_[5]->Fill((*iter).strip());
1325             }
1326             if (tTopo->tecRing(id) == 7) {
1327               meAdcTECWheel2zp_[6]->Fill((*iter).adc());
1328               meStripTECWheel2zp_[6]->Fill((*iter).strip());
1329             }
1330           }
1331           if (tTopo->tecWheel(id) == 3) {
1332             if (tTopo->tecRing(id) == 1) {
1333               meAdcTECWheel3zp_[0]->Fill((*iter).adc());
1334               meStripTECWheel3zp_[0]->Fill((*iter).strip());
1335             }
1336             if (tTopo->tecRing(id) == 2) {
1337               meAdcTECWheel3zp_[1]->Fill((*iter).adc());
1338               meStripTECWheel3zp_[1]->Fill((*iter).strip());
1339             }
1340             if (tTopo->tecRing(id) == 3) {
1341               meAdcTECWheel3zp_[2]->Fill((*iter).adc());
1342               meStripTECWheel3zp_[2]->Fill((*iter).strip());
1343             }
1344             if (tTopo->tecRing(id) == 4) {
1345               meAdcTECWheel3zp_[3]->Fill((*iter).adc());
1346               meStripTECWheel3zp_[3]->Fill((*iter).strip());
1347             }
1348             if (tTopo->tecRing(id) == 5) {
1349               meAdcTECWheel3zp_[4]->Fill((*iter).adc());
1350               meStripTECWheel3zp_[4]->Fill((*iter).strip());
1351             }
1352             if (tTopo->tecRing(id) == 6) {
1353               meAdcTECWheel3zp_[5]->Fill((*iter).adc());
1354               meStripTECWheel3zp_[5]->Fill((*iter).strip());
1355             }
1356             if (tTopo->tecRing(id) == 7) {
1357               meAdcTECWheel3zp_[6]->Fill((*iter).adc());
1358               meStripTECWheel3zp_[6]->Fill((*iter).strip());
1359             }
1360           }
1361           if (tTopo->tecWheel(id) == 4) {
1362             if (tTopo->tecRing(id) == 2) {
1363               meAdcTECWheel4zp_[0]->Fill((*iter).adc());
1364               meStripTECWheel4zp_[0]->Fill((*iter).strip());
1365             }
1366             if (tTopo->tecRing(id) == 3) {
1367               meAdcTECWheel4zp_[1]->Fill((*iter).adc());
1368               meStripTECWheel4zp_[1]->Fill((*iter).strip());
1369             }
1370             if (tTopo->tecRing(id) == 4) {
1371               meAdcTECWheel4zp_[2]->Fill((*iter).adc());
1372               meStripTECWheel4zp_[2]->Fill((*iter).strip());
1373             }
1374             if (tTopo->tecRing(id) == 5) {
1375               meAdcTECWheel4zp_[3]->Fill((*iter).adc());
1376               meStripTECWheel4zp_[3]->Fill((*iter).strip());
1377             }
1378             if (tTopo->tecRing(id) == 6) {
1379               meAdcTECWheel4zp_[4]->Fill((*iter).adc());
1380               meStripTECWheel4zp_[4]->Fill((*iter).strip());
1381             }
1382             if (tTopo->tecRing(id) == 7) {
1383               meAdcTECWheel4zp_[5]->Fill((*iter).adc());
1384               meStripTECWheel4zp_[5]->Fill((*iter).strip());
1385             }
1386           }
1387           if (tTopo->tecWheel(id) == 5) {
1388             if (tTopo->tecRing(id) == 2) {
1389               meAdcTECWheel5zp_[0]->Fill((*iter).adc());
1390               meStripTECWheel5zp_[0]->Fill((*iter).strip());
1391             }
1392             if (tTopo->tecRing(id) == 3) {
1393               meAdcTECWheel5zp_[1]->Fill((*iter).adc());
1394               meStripTECWheel5zp_[1]->Fill((*iter).strip());
1395             }
1396             if (tTopo->tecRing(id) == 4) {
1397               meAdcTECWheel5zp_[2]->Fill((*iter).adc());
1398               meStripTECWheel5zp_[2]->Fill((*iter).strip());
1399             }
1400             if (tTopo->tecRing(id) == 5) {
1401               meAdcTECWheel5zp_[3]->Fill((*iter).adc());
1402               meStripTECWheel5zp_[3]->Fill((*iter).strip());
1403             }
1404             if (tTopo->tecRing(id) == 6) {
1405               meAdcTECWheel5zp_[4]->Fill((*iter).adc());
1406               meStripTECWheel5zp_[4]->Fill((*iter).strip());
1407             }
1408             if (tTopo->tecRing(id) == 7) {
1409               meAdcTECWheel5zp_[5]->Fill((*iter).adc());
1410               meStripTECWheel5zp_[5]->Fill((*iter).strip());
1411             }
1412           }
1413           if (tTopo->tecWheel(id) == 6) {
1414             if (tTopo->tecRing(id) == 2) {
1415               meAdcTECWheel6zp_[0]->Fill((*iter).adc());
1416               meStripTECWheel6zp_[0]->Fill((*iter).strip());
1417             }
1418             if (tTopo->tecRing(id) == 3) {
1419               meAdcTECWheel6zp_[1]->Fill((*iter).adc());
1420               meStripTECWheel6zp_[1]->Fill((*iter).strip());
1421             }
1422             if (tTopo->tecRing(id) == 4) {
1423               meAdcTECWheel6zp_[2]->Fill((*iter).adc());
1424               meStripTECWheel6zp_[2]->Fill((*iter).strip());
1425             }
1426             if (tTopo->tecRing(id) == 5) {
1427               meAdcTECWheel6zp_[3]->Fill((*iter).adc());
1428               meStripTECWheel6zp_[3]->Fill((*iter).strip());
1429             }
1430             if (tTopo->tecRing(id) == 6) {
1431               meAdcTECWheel6zp_[4]->Fill((*iter).adc());
1432               meStripTECWheel6zp_[4]->Fill((*iter).strip());
1433             }
1434             if (tTopo->tecRing(id) == 7) {
1435               meAdcTECWheel6zp_[5]->Fill((*iter).adc());
1436               meStripTECWheel6zp_[5]->Fill((*iter).strip());
1437             }
1438           }
1439           if (tTopo->tecWheel(id) == 7) {
1440             if (tTopo->tecRing(id) == 3) {
1441               meAdcTECWheel7zp_[0]->Fill((*iter).adc());
1442               meStripTECWheel7zp_[0]->Fill((*iter).strip());
1443             }
1444             if (tTopo->tecRing(id) == 4) {
1445               meAdcTECWheel7zp_[1]->Fill((*iter).adc());
1446               meStripTECWheel7zp_[1]->Fill((*iter).strip());
1447             }
1448             if (tTopo->tecRing(id) == 5) {
1449               meAdcTECWheel7zp_[2]->Fill((*iter).adc());
1450               meStripTECWheel7zp_[2]->Fill((*iter).strip());
1451             }
1452             if (tTopo->tecRing(id) == 6) {
1453               meAdcTECWheel7zp_[3]->Fill((*iter).adc());
1454               meStripTECWheel7zp_[3]->Fill((*iter).strip());
1455             }
1456             if (tTopo->tecRing(id) == 7) {
1457               meAdcTECWheel7zp_[4]->Fill((*iter).adc());
1458               meStripTECWheel7zp_[4]->Fill((*iter).strip());
1459             }
1460           }
1461           if (tTopo->tecWheel(id) == 8) {
1462             if (tTopo->tecRing(id) == 3) {
1463               meAdcTECWheel8zp_[0]->Fill((*iter).adc());
1464               meStripTECWheel8zp_[0]->Fill((*iter).strip());
1465             }
1466             if (tTopo->tecRing(id) == 4) {
1467               meAdcTECWheel8zp_[1]->Fill((*iter).adc());
1468               meStripTECWheel8zp_[1]->Fill((*iter).strip());
1469             }
1470             if (tTopo->tecRing(id) == 5) {
1471               meAdcTECWheel8zp_[2]->Fill((*iter).adc());
1472               meStripTECWheel8zp_[2]->Fill((*iter).strip());
1473             }
1474             if (tTopo->tecRing(id) == 6) {
1475               meAdcTECWheel8zp_[3]->Fill((*iter).adc());
1476               meStripTECWheel8zp_[3]->Fill((*iter).strip());
1477             }
1478             if (tTopo->tecRing(id) == 7) {
1479               meAdcTECWheel8zp_[4]->Fill((*iter).adc());
1480               meStripTECWheel8zp_[4]->Fill((*iter).strip());
1481             }
1482           }
1483           if (tTopo->tecWheel(id) == 9) {
1484             if (tTopo->tecRing(id) == 4) {
1485               meAdcTECWheel9zp_[0]->Fill((*iter).adc());
1486               meStripTECWheel9zp_[0]->Fill((*iter).strip());
1487             }
1488             if (tTopo->tecRing(id) == 5) {
1489               meAdcTECWheel9zp_[1]->Fill((*iter).adc());
1490               meStripTECWheel9zp_[1]->Fill((*iter).strip());
1491             }
1492             if (tTopo->tecRing(id) == 6) {
1493               meAdcTECWheel9zp_[2]->Fill((*iter).adc());
1494               meStripTECWheel9zp_[2]->Fill((*iter).strip());
1495             }
1496             if (tTopo->tecRing(id) == 7) {
1497               meAdcTECWheel9zp_[3]->Fill((*iter).adc());
1498               meStripTECWheel9zp_[3]->Fill((*iter).strip());
1499             }
1500           }
1501         }
1502       }
1503     }
1504   }
1505 
1506   for (int i = 0; i < 4; i++) {
1507     meNDigiTIBLayerzm_[i]->Fill(ndigilayertibzm[i]);
1508     meNDigiTIBLayerzp_[i]->Fill(ndigilayertibzp[i]);
1509   }
1510 
1511   for (int i = 0; i < 6; i++) {
1512     meNDigiTOBLayerzm_[i]->Fill(ndigilayertobzm[i]);
1513     meNDigiTOBLayerzp_[i]->Fill(ndigilayertobzp[i]);
1514   }
1515 
1516   for (int i = 0; i < 3; i++) {
1517     meNDigiTIDWheelzm_[i]->Fill(ndigiwheeltidzm[i]);
1518     meNDigiTIDWheelzp_[i]->Fill(ndigiwheeltidzp[i]);
1519   }
1520 
1521   for (int i = 0; i < 9; i++) {
1522     meNDigiTECWheelzm_[i]->Fill(ndigiwheelteczm[i]);
1523     meNDigiTECWheelzp_[i]->Fill(ndigiwheelteczp[i]);
1524   }
1525 }