CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/Validation/TrackerDigis/plugins/SiStripDigiValid.cc

Go to the documentation of this file.
00001 #include "Validation/TrackerDigis/interface/SiStripDigiValid.h"
00002 #include "DataFormats/Common/interface/DetSetVector.h"
00003 #include "DataFormats/SiStripDigi/interface/SiStripDigi.h"
00004 #include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
00005 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
00006 #include "Geometry/Records/interface/IdealGeometryRecord.h"
00007 #include "Geometry/CommonTopologies/interface/RectangularStripTopology.h"
00008 #include "Geometry/CommonTopologies/interface/TrapezoidalStripTopology.h"
00009 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
00010 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00011 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
00012 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00013 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
00014 #include "DQMServices/Core/interface/DQMStore.h"
00015 
00016 using namespace std;
00017 using namespace edm;
00018 
00019 SiStripDigiValid::SiStripDigiValid(const ParameterSet& ps):dbe_(0){
00020 
00021    outputFile_ = ps.getUntrackedParameter<string>("outputFile", "stripdigihisto.root");
00022     src_ =  ps.getParameter<edm::InputTag>( "src" );
00023 
00024    dbe_ = Service<DQMStore>().operator->();
00025 
00026 if ( dbe_ ) {
00027     dbe_->setCurrentFolder("TrackerDigisV/TrackerDigis/Strip");
00028 
00029    for(int i = 0 ;i<3 ; i++) {
00030      Char_t histo[200];
00031      // Z Plus Side
00032      sprintf(histo,"adc_tib_layer1_extmodule%d_zp",i+1);
00033      meAdcTIBLayer1Extzp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00034      sprintf(histo,"adc_tib_layer1_intmodule%d_zp",i+1);
00035      meAdcTIBLayer1Intzp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00036      sprintf(histo,"adc_tib_layer2_extmodule%d_zp",i+1);
00037      meAdcTIBLayer2Extzp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00038      sprintf(histo,"adc_tib_layer2_intmodule%d_zp",i+1);
00039      meAdcTIBLayer2Intzp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00040      sprintf(histo,"adc_tib_layer3_extmodule%d_zp",i+1);
00041      meAdcTIBLayer3Extzp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00042      sprintf(histo,"adc_tib_layer3_intmodule%d_zp",i+1);
00043      meAdcTIBLayer3Intzp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00044      sprintf(histo,"adc_tib_layer4_extmodule%d_zp",i+1);
00045      meAdcTIBLayer4Extzp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00046      sprintf(histo,"adc_tib_layer4_intmodule%d_zp",i+1);
00047      meAdcTIBLayer4Intzp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00048      sprintf(histo,"strip_tib_layer1_extmodule%d_zp",i+1);
00049      meStripTIBLayer1Extzp_[i] =  dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00050      sprintf(histo,"strip_tib_layer1_intmodule%d_zp",i+1);
00051      meStripTIBLayer1Intzp_[i] =  dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00052      sprintf(histo,"strip_tib_layer2_extmodule%d_zp",i+1);
00053      meStripTIBLayer2Extzp_[i] =  dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00054      sprintf(histo,"strip_tib_layer2_intmodule%d_zp",i+1);
00055      meStripTIBLayer2Intzp_[i] =  dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00056      sprintf(histo,"strip_tib_layer3_extmodule%d_zp",i+1);
00057      meStripTIBLayer3Extzp_[i] =  dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00058      sprintf(histo,"strip_tib_layer3_intmodule%d_zp",i+1);
00059      meStripTIBLayer3Intzp_[i] =  dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00060      sprintf(histo,"strip_tib_layer4_extmodule%d_zp",i+1);
00061      meStripTIBLayer4Extzp_[i] =  dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00062      sprintf(histo,"strip_tib_layer4_intmodule%d_zp",i+1);
00063      meStripTIBLayer4Intzp_[i] =  dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00064      //  Z Minus Side
00065      sprintf(histo,"adc_tib_layer1_extmodule%d_zm",i+1);
00066      meAdcTIBLayer1Extzm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00067      sprintf(histo,"adc_tib_layer1_intmodule%d_zm",i+1);
00068      meAdcTIBLayer1Intzm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00069      sprintf(histo,"adc_tib_layer2_extmodule%d_zm",i+1);
00070      meAdcTIBLayer2Extzm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00071      sprintf(histo,"adc_tib_layer2_intmodule%d_zm",i+1);
00072      meAdcTIBLayer2Intzm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00073      sprintf(histo,"adc_tib_layer3_extmodule%d_zm",i+1);
00074      meAdcTIBLayer3Extzm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00075      sprintf(histo,"adc_tib_layer3_intmodule%d_zm",i+1);
00076      meAdcTIBLayer3Intzm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00077      sprintf(histo,"adc_tib_layer4_extmodule%d_zm",i+1);
00078      meAdcTIBLayer4Extzm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00079      sprintf(histo,"adc_tib_layer4_intmodule%d_zm",i+1);
00080      meAdcTIBLayer4Intzm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00081      sprintf(histo,"strip_tib_layer1_extmodule%d_zm",i+1);
00082      meStripTIBLayer1Extzm_[i] =  dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00083      sprintf(histo,"strip_tib_layer1_intmodule%d_zm",i+1);
00084      meStripTIBLayer1Intzm_[i] =  dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00085      sprintf(histo,"strip_tib_layer2_extmodule%d_zm",i+1);
00086      meStripTIBLayer2Extzm_[i] =  dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00087      sprintf(histo,"strip_tib_layer2_intmodule%d_zm",i+1);
00088      meStripTIBLayer2Intzm_[i] =  dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00089      sprintf(histo,"strip_tib_layer3_extmodule%d_zm",i+1);
00090      meStripTIBLayer3Extzm_[i] =  dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00091      sprintf(histo,"strip_tib_layer3_intmodule%d_zm",i+1);
00092      meStripTIBLayer3Intzm_[i] =  dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00093      sprintf(histo,"strip_tib_layer4_extmodule%d_zm",i+1);
00094      meStripTIBLayer4Extzm_[i] =  dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00095      sprintf(histo,"strip_tib_layer4_intmodule%d_zm",i+1);
00096      meStripTIBLayer4Intzm_[i] =  dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00097    
00098    }
00099 
00100    for(int i = 0 ;i<6 ; i++) {
00101      Char_t histo[200];
00102      // Z Plus Side
00103      sprintf(histo,"adc_tob_layer1_module%d_zp",i+1);
00104      meAdcTOBLayer1zp_[i] = dbe_->book1D(histo,"Digis ADC",10,0.,300.);
00105      sprintf(histo,"strip_tob_layer1_module%d_zp",i+1);
00106      meStripTOBLayer1zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00107      sprintf(histo,"adc_tob_layer2_module%d_zp",i+1);
00108      meAdcTOBLayer2zp_[i] = dbe_->book1D(histo,"Digis ADC",10,0.,300.);
00109      sprintf(histo,"strip_tob_layer2_module%d_zp",i+1);
00110      meStripTOBLayer2zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00111      sprintf(histo,"adc_tob_layer3_module%d_zp",i+1);
00112      meAdcTOBLayer3zp_[i] = dbe_->book1D(histo,"Digis ADC",10,0.,300.);
00113      sprintf(histo,"strip_tob_layer3_module%d_zp",i+1);
00114      meStripTOBLayer3zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00115      sprintf(histo,"adc_tob_layer4_module%d_zp",i+1);
00116      meAdcTOBLayer4zp_[i] = dbe_->book1D(histo,"Digis ADC",10,0.,300.);
00117      sprintf(histo,"strip_tob_layer4_module%d_zp",i+1);
00118      meStripTOBLayer4zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00119      sprintf(histo,"adc_tob_layer5_module%d_zp",i+1);
00120      meAdcTOBLayer5zp_[i] = dbe_->book1D(histo,"Digis ADC",10,0.,300.);
00121      sprintf(histo,"strip_tob_layer5_module%d_zp",i+1);
00122      meStripTOBLayer5zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00123      sprintf(histo,"adc_tob_layer6_module%d_zp",i+1);
00124      meAdcTOBLayer6zp_[i] = dbe_->book1D(histo,"Digis ADC",10,0.,300.);
00125      sprintf(histo,"strip_tob_layer6_module%d_zp",i+1);
00126      meStripTOBLayer6zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00127      // Z Minus Side
00128      sprintf(histo,"adc_tob_layer1_module%d_zm",i+1);
00129      meAdcTOBLayer1zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00130      sprintf(histo,"strip_tob_layer1_module%d_zm",i+1);
00131      meStripTOBLayer1zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00132      sprintf(histo,"adc_tob_layer2_module%d_zm",i+1);
00133      meAdcTOBLayer2zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00134      sprintf(histo,"strip_tob_layer2_module%d_zm",i+1);
00135      meStripTOBLayer2zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00136      sprintf(histo,"adc_tob_layer3_module%d_zm",i+1);
00137      meAdcTOBLayer3zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00138      sprintf(histo,"strip_tob_layer3_module%d_zm",i+1);
00139      meStripTOBLayer3zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00140      sprintf(histo,"adc_tob_layer4_module%d_zm",i+1);
00141      meAdcTOBLayer4zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00142      sprintf(histo,"strip_tob_layer4_module%d_zm",i+1);
00143      meStripTOBLayer4zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00144      sprintf(histo,"adc_tob_layer5_module%d_zm",i+1);
00145      meAdcTOBLayer5zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00146      sprintf(histo,"strip_tob_layer5_module%d_zm",i+1);
00147      meStripTOBLayer5zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00148      sprintf(histo,"adc_tob_layer6_module%d_zm",i+1);
00149      meAdcTOBLayer6zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00150      sprintf(histo,"strip_tob_layer6_module%d_zm",i+1);
00151      meStripTOBLayer6zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00152    }           
00153  
00154    for(int i = 0 ;i<3 ; i++) {
00155      Char_t histo[200];
00156      // Z Plus Side
00157      sprintf(histo,"adc_tid_wheel1_ring%d_zp",i+1);
00158      meAdcTIDWheel1zp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00159      sprintf(histo,"adc_tid_wheel2_ring%d_zp",i+1);
00160      meAdcTIDWheel2zp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00161      sprintf(histo,"adc_tid_wheel3_ring%d_zp",i+1);
00162      meAdcTIDWheel3zp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00163      sprintf(histo,"strip_tid_wheel1_ring%d_zp",i+1);
00164      meStripTIDWheel1zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.); 
00165      sprintf(histo,"strip_tid_wheel2_ring%d_zp",i+1);
00166      meStripTIDWheel2zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00167      sprintf(histo,"strip_tid_wheel3_ring%d_zp",i+1);
00168      meStripTIDWheel3zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00169      // Z minus Side
00170      sprintf(histo,"adc_tid_wheel1_ring%d_zm",i+1);
00171      meAdcTIDWheel1zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00172      sprintf(histo,"adc_tid_wheel2_ring%d_zm",i+1);
00173      meAdcTIDWheel2zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00174      sprintf(histo,"adc_tid_wheel3_ring%d_zm",i+1);
00175      meAdcTIDWheel3zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00176      sprintf(histo,"strip_tid_wheel1_ring%d_zm",i+1);
00177      meStripTIDWheel1zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00178      sprintf(histo,"strip_tid_wheel2_ring%d_zm",i+1);
00179      meStripTIDWheel2zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00180      sprintf(histo,"strip_tid_wheel3_ring%d_zm",i+1);
00181      meStripTIDWheel3zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00182 
00183    }
00184   
00185    for(int i = 0 ;i<7 ; i++) {
00186      Char_t histo[200];
00187      // Z Plus Side
00188      sprintf(histo,"adc_tec_wheel1_ring%d_zp",i+1);
00189      meAdcTECWheel1zp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00190      sprintf(histo,"adc_tec_wheel2_ring%d_zp",i+1);
00191      meAdcTECWheel2zp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00192      sprintf(histo,"adc_tec_wheel3_ring%d_zp",i+1);
00193      meAdcTECWheel3zp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00194      sprintf(histo,"strip_tec_wheel1_ring%d_zp",i+1);
00195      meStripTECWheel1zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00196      sprintf(histo,"strip_tec_wheel2_ring%d_zp",i+1);
00197      meStripTECWheel2zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00198      sprintf(histo,"strip_tec_wheel3_ring%d_zp",i+1);
00199      meStripTECWheel3zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00200 
00201      // Z Minus Side
00202      sprintf(histo,"adc_tec_wheel1_ring%d_zm",i+1);
00203      meAdcTECWheel1zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00204      sprintf(histo,"adc_tec_wheel2_ring%d_zm",i+1);
00205      meAdcTECWheel2zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00206      sprintf(histo,"adc_tec_wheel3_ring%d_zm",i+1);
00207      meAdcTECWheel3zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00208      sprintf(histo,"strip_tec_wheel1_ring%d_zm",i+1);
00209      meStripTECWheel1zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00210      sprintf(histo,"strip_tec_wheel2_ring%d_zm",i+1);
00211      meStripTECWheel2zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00212      sprintf(histo,"strip_tec_wheel3_ring%d_zm",i+1);
00213      meStripTECWheel3zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00214    }
00215 
00216    for(int i = 0 ;i<6 ; i++) {
00217      Char_t histo[200];
00218      // Z Plus Side
00219      sprintf(histo,"adc_tec_wheel4_ring%d_zp",i+1);
00220      meAdcTECWheel4zp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00221      sprintf(histo,"adc_tec_wheel5_ring%d_zp",i+1);
00222      meAdcTECWheel5zp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00223      sprintf(histo,"adc_tec_wheel6_ring%d_zp",i+1);
00224      meAdcTECWheel6zp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00225      sprintf(histo,"strip_tec_wheel4_ring%d_zp",i+1);
00226      meStripTECWheel4zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00227      sprintf(histo,"strip_tec_wheel5_ring%d_zp",i+1);
00228      meStripTECWheel5zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00229      sprintf(histo,"strip_tec_wheel6_ring%d_zp",i+1);
00230      meStripTECWheel6zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00231 
00232      // Z Minus Side
00233      sprintf(histo,"adc_tec_wheel4_ring%d_zm",i+1);
00234      meAdcTECWheel4zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00235      sprintf(histo,"adc_tec_wheel5_ring%d_zm",i+1);
00236      meAdcTECWheel5zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00237      sprintf(histo,"adc_tec_wheel6_ring%d_zm",i+1);
00238      meAdcTECWheel6zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00239      sprintf(histo,"strip_tec_wheel4_ring%d_zm",i+1);
00240      meStripTECWheel4zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00241      sprintf(histo,"strip_tec_wheel5_ring%d_zm",i+1);
00242      meStripTECWheel5zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00243      sprintf(histo,"strip_tec_wheel6_ring%d_zm",i+1);
00244      meStripTECWheel6zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00245    }
00246 
00247    for(int i = 0 ;i<5 ; i++) {
00248      Char_t histo[200];
00249      // Z Plus Side
00250      sprintf(histo,"adc_tec_wheel7_ring%d_zp",i+1);
00251      meAdcTECWheel7zp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00252      sprintf(histo,"adc_tec_wheel8_ring%d_zp",i+1);
00253      meAdcTECWheel8zp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00254      sprintf(histo,"strip_tec_wheel7_ring%d_zp",i+1);
00255      meStripTECWheel7zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00256      sprintf(histo,"strip_tec_wheel8_ring%d_zp",i+1);
00257      meStripTECWheel8zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00258 
00259      // Z Minus Side
00260      sprintf(histo,"adc_tec_wheel7_ring%d_zm",i+1);
00261      meAdcTECWheel7zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00262      sprintf(histo,"adc_tec_wheel8_ring%d_zm",i+1);
00263      meAdcTECWheel8zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00264      sprintf(histo,"strip_tec_wheel7_ring%d_zm",i+1);
00265      meStripTECWheel7zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00266      sprintf(histo,"strip_tec_wheel8_ring%d_zm",i+1);
00267      meStripTECWheel8zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00268    }
00269 
00270    for(int i = 0 ;i<4 ; i++) {
00271      Char_t histo[200];
00272      // Z Plus Side
00273      sprintf(histo,"adc_tec_wheel9_ring%d_zp",i+1);
00274      meAdcTECWheel9zp_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00275      sprintf(histo,"strip_tec_wheel9_ring%d_zp",i+1);
00276      meStripTECWheel9zp_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00277 
00278      // Z Minus Side
00279      sprintf(histo,"adc_tec_wheel9_ring%d_zm",i+1);
00280      meAdcTECWheel9zm_[i] = dbe_->book1D(histo,"Digis ADC",50,0.,300.);
00281      sprintf(histo,"strip_tec_wheel9_ring%d_zm",i+1);
00282      meStripTECWheel9zm_[i] = dbe_->book1D(histo,"Digis Strip Num.",200,0.,800.);
00283    }
00284 
00285    
00286    for(int i = 0 ;i<4 ; i++) {
00287       Char_t histo[200];
00288       sprintf(histo,"ndigi_tib_layer_%d_zm",i+1);
00289       meNDigiTIBLayerzm_[i] = dbe_->book1D(histo, "Digi Multiplicity",100,0.,500.);
00290       sprintf(histo,"ndigi_tib_layer_%d_zp",i+1); 
00291       meNDigiTIBLayerzp_[i] = dbe_->book1D(histo, "Digi Multiplicity",100,0.,500.);
00292    }
00293 
00294    for(int i = 0 ;i<6 ; i++) {
00295       Char_t histo[200];
00296       sprintf(histo,"ndigi_tob_layer_%d_zm",i+1);
00297       meNDigiTOBLayerzm_[i] = dbe_->book1D(histo, "Digi Multiplicity",100,0.,500.);
00298       sprintf(histo,"ndigi_tob_layer_%d_zp",i+1);
00299       meNDigiTOBLayerzp_[i] = dbe_->book1D(histo, "Digi Multiplicity",100,0.,500.);
00300 
00301    }
00302 
00303    for(int i = 0 ;i<3 ; i++) {
00304       Char_t histo[200];
00305       sprintf(histo,"ndigi_tid_wheel_%d_zm",i+1);
00306       meNDigiTIDWheelzm_[i] = dbe_->book1D(histo, "Digi Multiplicity",100,0.,500.);
00307       sprintf(histo,"ndigi_tid_wheel_%d_zp",i+1);
00308       meNDigiTIDWheelzp_[i] = dbe_->book1D(histo, "Digi Multiplicity",100,0.,500.);
00309    }
00310 
00311   for(int i = 0 ;i<9 ; i++) {
00312       Char_t histo[200];
00313       sprintf(histo,"ndigi_tec_wheel_%d_zm",i+1);
00314       meNDigiTECWheelzm_[i] = dbe_->book1D(histo, "Digi Multiplicity",100,0.,500.);
00315       sprintf(histo,"ndigi_tec_wheel_%d_zp",i+1);
00316       meNDigiTECWheelzp_[i] = dbe_->book1D(histo, "Digi Multiplicity",100,0.,500.);
00317 
00318    }
00319  }
00320 
00321 }
00322 
00323 SiStripDigiValid::~SiStripDigiValid(){
00324 
00325   //if ( outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_);
00326 }
00327 
00328 
00329 void SiStripDigiValid::beginJob(){
00330 
00331 }
00332 
00333 void SiStripDigiValid::endJob() {
00334  if ( outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_);
00335 
00336 }
00337 
00338 
00339 void SiStripDigiValid::analyze(const Event& e, const EventSetup& c){
00340   //Retrieve tracker topology from geometry
00341   edm::ESHandle<TrackerTopology> tTopoHandle;
00342   c.get<IdealGeometryRecord>().get(tTopoHandle);
00343   const TrackerTopology* const tTopo = tTopoHandle.product();
00344 
00345 
00346 
00347  int ndigilayertibzp[4];
00348  int ndigilayertibzm[4];
00349  
00350  for( int i = 0; i< 4; i++ ) {
00351     ndigilayertibzp[i] = 0;
00352     ndigilayertibzm[i] = 0;
00353  }
00354 
00355  int ndigilayertobzp[6];
00356  int ndigilayertobzm[6];
00357 
00358  for( int i = 0; i< 6; i++ ) {
00359     ndigilayertobzp[i] = 0;
00360     ndigilayertobzm[i] = 0;
00361  }
00362 
00363  int ndigiwheeltidzp[3];
00364  int ndigiwheeltidzm[3];
00365 
00366  for( int i = 0; i< 3; i++ ) {
00367    ndigiwheeltidzp[i] = 0;
00368    ndigiwheeltidzm[i] = 0;
00369  }
00370 
00371  int ndigiwheelteczp[9];
00372  int ndigiwheelteczm[9];
00373 
00374  for( int i = 0; i< 9; i++ ) {
00375    ndigiwheelteczp[i] = 0;
00376    ndigiwheelteczm[i] = 0;
00377  }
00378 
00379 
00380 
00381  //LogInfo("EventInfo") << " Run = " << e.id().run() << " Event = " << e.id().event();
00382  ESHandle<TrackerGeometry> tracker;
00383  c.get<TrackerDigiGeometryRecord>().get( tracker );
00384 
00385  std::string digiProducer = "siStripDigis";
00386  edm::Handle<edm::DetSetVector<SiStripDigi> > stripDigis;
00387  e.getByLabel(src_, stripDigis);
00388  edm::DetSetVector<SiStripDigi>::const_iterator DSViter = stripDigis->begin();
00389  for( ; DSViter != stripDigis->end(); DSViter++) {
00390          unsigned int id = DSViter->id;
00391          DetId  detId(id);
00392          edm::DetSet<SiStripDigi>::const_iterator  begin = DSViter->data.begin();
00393          edm::DetSet<SiStripDigi>::const_iterator  end   = DSViter->data.end();
00394          edm::DetSet<SiStripDigi>::const_iterator  iter;
00395 
00396         if(detId.subdetId()==StripSubdetector::TIB){
00397              
00398              for ( iter = begin ; iter != end; iter++ ) { // loop digis
00399                if( tTopo->tibStringInfo(id)[0] == 1) {
00400                  ++ndigilayertibzm[tTopo->tibLayer(id)-1];
00401                  if( tTopo->tibLayer(id) == 1 ) { 
00402                     if ( tTopo->tibStringInfo(id)[1] == 1 ) {
00403                        if( tTopo->tibModule(id) == 1 ) { meAdcTIBLayer1Intzm_[0] -> Fill((*iter).adc()); meStripTIBLayer1Intzm_[0] ->Fill((*iter).strip()); }
00404                        if( tTopo->tibModule(id) == 2 ) { meAdcTIBLayer1Intzm_[1] -> Fill((*iter).adc()); meStripTIBLayer1Intzm_[1] ->Fill((*iter).strip()); }
00405                        if( tTopo->tibModule(id) == 3 ) { meAdcTIBLayer1Intzm_[2] -> Fill((*iter).adc()); meStripTIBLayer1Intzm_[2] ->Fill((*iter).strip()); }
00406                     }else {
00407                        if( tTopo->tibModule(id) == 1 ) { meAdcTIBLayer1Extzm_[0] -> Fill((*iter).adc()); meStripTIBLayer1Extzm_[0] ->Fill((*iter).strip()); }
00408                        if( tTopo->tibModule(id) == 2 ) { meAdcTIBLayer1Extzm_[1] -> Fill((*iter).adc()); meStripTIBLayer1Extzm_[1] ->Fill((*iter).strip()); }
00409                        if( tTopo->tibModule(id) == 3 ) { meAdcTIBLayer1Extzm_[2] -> Fill((*iter).adc()); meStripTIBLayer1Extzm_[2] ->Fill((*iter).strip()); }
00410                    } 
00411                  }
00412                  if( tTopo->tibLayer(id) == 2 ) {
00413                     if ( tTopo->tibStringInfo(id)[1] == 1 ) {
00414                        if( tTopo->tibModule(id) == 1 ) { meAdcTIBLayer2Intzm_[0] -> Fill((*iter).adc()); meStripTIBLayer2Intzm_[0] ->Fill((*iter).strip()); }
00415                        if( tTopo->tibModule(id) == 2 ) { meAdcTIBLayer2Intzm_[1] -> Fill((*iter).adc()); meStripTIBLayer2Intzm_[1] ->Fill((*iter).strip()); }
00416                        if( tTopo->tibModule(id) == 3 ) { meAdcTIBLayer2Intzm_[2] -> Fill((*iter).adc()); meStripTIBLayer2Intzm_[2] ->Fill((*iter).strip()); }
00417                     }else {
00418                        if( tTopo->tibModule(id) == 1 ) { meAdcTIBLayer2Extzm_[0] -> Fill((*iter).adc()); meStripTIBLayer2Extzm_[0] ->Fill((*iter).strip()); }
00419                        if( tTopo->tibModule(id) == 2 ) { meAdcTIBLayer2Extzm_[1] -> Fill((*iter).adc()); meStripTIBLayer2Extzm_[1] ->Fill((*iter).strip()); }
00420                        if( tTopo->tibModule(id) == 3 ) { meAdcTIBLayer2Extzm_[2] -> Fill((*iter).adc()); meStripTIBLayer2Extzm_[2] ->Fill((*iter).strip()); }
00421                    }
00422                  }
00423                  if( tTopo->tibLayer(id) == 3 ) {
00424                     if ( tTopo->tibStringInfo(id)[1] == 1 ) {
00425                        if( tTopo->tibModule(id) == 1 ) { meAdcTIBLayer3Intzm_[0] -> Fill((*iter).adc()); meStripTIBLayer3Intzm_[0] ->Fill((*iter).strip()); }
00426                        if( tTopo->tibModule(id) == 2 ) { meAdcTIBLayer3Intzm_[1] -> Fill((*iter).adc()); meStripTIBLayer3Intzm_[1] ->Fill((*iter).strip()); }
00427                        if( tTopo->tibModule(id) == 3 ) { meAdcTIBLayer3Intzm_[2] -> Fill((*iter).adc()); meStripTIBLayer3Intzm_[2] ->Fill((*iter).strip()); }
00428                     }else {
00429                        if( tTopo->tibModule(id) == 1 ) { meAdcTIBLayer3Extzm_[0] -> Fill((*iter).adc()); meStripTIBLayer3Extzm_[0] ->Fill((*iter).strip()); }
00430                        if( tTopo->tibModule(id) == 2 ) { meAdcTIBLayer3Extzm_[1] -> Fill((*iter).adc()); meStripTIBLayer3Extzm_[1] ->Fill((*iter).strip()); }
00431                        if( tTopo->tibModule(id) == 3 ) { meAdcTIBLayer3Extzm_[2] -> Fill((*iter).adc()); meStripTIBLayer3Extzm_[2] ->Fill((*iter).strip()); }
00432                    }
00433                  }
00434                  if( tTopo->tibLayer(id) == 4 ) {
00435                     if ( tTopo->tibStringInfo(id)[1] == 1 ) {
00436                        if( tTopo->tibModule(id) == 1 ) { meAdcTIBLayer4Intzm_[0] -> Fill((*iter).adc()); meStripTIBLayer4Intzm_[0] ->Fill((*iter).strip()); }
00437                        if( tTopo->tibModule(id) == 2 ) { meAdcTIBLayer4Intzm_[1] -> Fill((*iter).adc()); meStripTIBLayer4Intzm_[1] ->Fill((*iter).strip()); }
00438                        if( tTopo->tibModule(id) == 3 ) { meAdcTIBLayer4Intzm_[2] -> Fill((*iter).adc()); meStripTIBLayer4Intzm_[2] ->Fill((*iter).strip()); }
00439                     }else {
00440                        if( tTopo->tibModule(id) == 1 ) { meAdcTIBLayer4Extzm_[0] -> Fill((*iter).adc()); meStripTIBLayer4Extzm_[0] ->Fill((*iter).strip()); }
00441                        if( tTopo->tibModule(id) == 2 ) { meAdcTIBLayer4Extzm_[1] -> Fill((*iter).adc()); meStripTIBLayer4Extzm_[1] ->Fill((*iter).strip()); }
00442                        if( tTopo->tibModule(id) == 3 ) { meAdcTIBLayer4Extzm_[2] -> Fill((*iter).adc()); meStripTIBLayer4Extzm_[2] ->Fill((*iter).strip()); }
00443                    }
00444                  }
00445                }else {
00446                  ++ndigilayertibzp[tTopo->tibLayer(id)-1];
00447                  if( tTopo->tibLayer(id) == 1 ) {
00448                     if ( tTopo->tibStringInfo(id)[1] == 1 ) {
00449                        if( tTopo->tibModule(id) == 1 ) { meAdcTIBLayer1Intzp_[0] -> Fill((*iter).adc()); meStripTIBLayer1Intzp_[0] ->Fill((*iter).strip()); }
00450                        if( tTopo->tibModule(id) == 2 ) { meAdcTIBLayer1Intzp_[1] -> Fill((*iter).adc()); meStripTIBLayer1Intzp_[1] ->Fill((*iter).strip()); }
00451                        if( tTopo->tibModule(id) == 3 ) { meAdcTIBLayer1Intzp_[2] -> Fill((*iter).adc()); meStripTIBLayer1Intzp_[2] ->Fill((*iter).strip()); }
00452                     }else {
00453                        if( tTopo->tibModule(id) == 1 ) { meAdcTIBLayer1Extzp_[0] -> Fill((*iter).adc()); meStripTIBLayer1Extzp_[0] ->Fill((*iter).strip()); }
00454                        if( tTopo->tibModule(id) == 2 ) { meAdcTIBLayer1Extzp_[1] -> Fill((*iter).adc()); meStripTIBLayer1Extzp_[1] ->Fill((*iter).strip()); }
00455                        if( tTopo->tibModule(id) == 3 ) { meAdcTIBLayer1Extzp_[2] -> Fill((*iter).adc()); meStripTIBLayer1Extzp_[2] ->Fill((*iter).strip()); }
00456                    } 
00457                  }
00458                  if( tTopo->tibLayer(id) == 2 ) {
00459                     if ( tTopo->tibStringInfo(id)[1] == 1 ) {
00460                        if( tTopo->tibModule(id) == 1 ) { meAdcTIBLayer2Intzp_[0] -> Fill((*iter).adc()); meStripTIBLayer2Intzp_[0] ->Fill((*iter).strip()); }
00461                        if( tTopo->tibModule(id) == 2 ) { meAdcTIBLayer2Intzp_[1] -> Fill((*iter).adc()); meStripTIBLayer2Intzp_[1] ->Fill((*iter).strip()); }
00462                        if( tTopo->tibModule(id) == 3 ) { meAdcTIBLayer2Intzp_[2] -> Fill((*iter).adc()); meStripTIBLayer2Intzp_[2] ->Fill((*iter).strip()); }
00463                     }else {
00464                        if( tTopo->tibModule(id) == 1 ) { meAdcTIBLayer2Extzp_[0] -> Fill((*iter).adc()); meStripTIBLayer2Extzp_[0] ->Fill((*iter).strip()); }
00465                        if( tTopo->tibModule(id) == 2 ) { meAdcTIBLayer2Extzp_[1] -> Fill((*iter).adc()); meStripTIBLayer2Extzp_[1] ->Fill((*iter).strip()); }
00466                        if( tTopo->tibModule(id) == 3 ) { meAdcTIBLayer2Extzp_[2] -> Fill((*iter).adc()); meStripTIBLayer2Extzp_[2] ->Fill((*iter).strip()); }
00467                    }
00468                  }
00469                  if( tTopo->tibLayer(id) == 3 ) {
00470                     if ( tTopo->tibStringInfo(id)[1] == 1 ) {
00471                        if( tTopo->tibModule(id) == 1 ) { meAdcTIBLayer3Intzp_[0] -> Fill((*iter).adc()); meStripTIBLayer3Intzp_[0] ->Fill((*iter).strip()); }
00472                        if( tTopo->tibModule(id) == 2 ) { meAdcTIBLayer3Intzp_[1] -> Fill((*iter).adc()); meStripTIBLayer3Intzp_[1] ->Fill((*iter).strip()); }
00473                        if( tTopo->tibModule(id) == 3 ) { meAdcTIBLayer3Intzp_[2] -> Fill((*iter).adc()); meStripTIBLayer3Intzp_[2] ->Fill((*iter).strip()); }
00474                     }else {
00475                        if( tTopo->tibModule(id) == 1 ) { meAdcTIBLayer3Extzp_[0] -> Fill((*iter).adc()); meStripTIBLayer3Extzp_[0] ->Fill((*iter).strip()); }
00476                        if( tTopo->tibModule(id) == 2 ) { meAdcTIBLayer3Extzp_[1] -> Fill((*iter).adc()); meStripTIBLayer3Extzp_[1] ->Fill((*iter).strip()); }
00477                        if( tTopo->tibModule(id) == 3 ) { meAdcTIBLayer3Extzp_[2] -> Fill((*iter).adc()); meStripTIBLayer3Extzp_[2] ->Fill((*iter).strip()); }
00478                    }
00479                  }
00480                  if( tTopo->tibLayer(id) == 4 ) {
00481                     if ( tTopo->tibStringInfo(id)[1] == 1) {
00482                        if( tTopo->tibModule(id) == 1 ) { meAdcTIBLayer4Intzp_[0] -> Fill((*iter).adc()); meStripTIBLayer4Intzp_[0] ->Fill((*iter).strip()); }
00483                        if( tTopo->tibModule(id) == 2 ) { meAdcTIBLayer4Intzp_[1] -> Fill((*iter).adc()); meStripTIBLayer4Intzp_[1] ->Fill((*iter).strip()); }
00484                        if( tTopo->tibModule(id) == 3 ) { meAdcTIBLayer4Intzp_[2] -> Fill((*iter).adc()); meStripTIBLayer4Intzp_[2] ->Fill((*iter).strip()); }
00485                     }else {
00486                        if( tTopo->tibModule(id) == 1 ) { meAdcTIBLayer4Extzp_[0] -> Fill((*iter).adc()); meStripTIBLayer4Extzp_[0] ->Fill((*iter).strip()); }
00487                        if( tTopo->tibModule(id) == 2 ) { meAdcTIBLayer4Extzp_[1] -> Fill((*iter).adc()); meStripTIBLayer4Extzp_[1] ->Fill((*iter).strip()); }
00488                        if( tTopo->tibModule(id) == 3 ) { meAdcTIBLayer4Extzp_[2] -> Fill((*iter).adc()); meStripTIBLayer4Extzp_[2] ->Fill((*iter).strip()); }
00489                    }
00490                  }
00491 
00492               }
00493             } 
00494         } 
00495         if(detId.subdetId()==StripSubdetector::TOB){
00496               
00497              for ( iter = begin ; iter != end; iter++ ) { // loop digis
00498                if( tTopo->tobRodInfo(id)[0] == 1) {
00499                  ++ndigilayertobzm[tTopo->tobLayer(id)-1];  
00500                  if( tTopo->tobLayer(id) == 1 ) { 
00501                      if ( tTopo->tobModule(id) == 1 ) { meAdcTOBLayer1zm_[0] -> Fill((*iter).adc()); meStripTOBLayer1zm_[0] ->Fill((*iter).strip()); }
00502                      if ( tTopo->tobModule(id) == 2 ) { meAdcTOBLayer1zm_[1] -> Fill((*iter).adc()); meStripTOBLayer1zm_[1] ->Fill((*iter).strip()); }
00503                      if ( tTopo->tobModule(id) == 3 ) { meAdcTOBLayer1zm_[2] -> Fill((*iter).adc()); meStripTOBLayer1zm_[2] ->Fill((*iter).strip()); }
00504                      if ( tTopo->tobModule(id) == 4 ) { meAdcTOBLayer1zm_[3] -> Fill((*iter).adc()); meStripTOBLayer1zm_[3] ->Fill((*iter).strip()); }
00505                      if ( tTopo->tobModule(id) == 5 ) { meAdcTOBLayer1zm_[4] -> Fill((*iter).adc()); meStripTOBLayer1zm_[4] ->Fill((*iter).strip()); }
00506                      if ( tTopo->tobModule(id) == 6 ) { meAdcTOBLayer1zm_[5] -> Fill((*iter).adc()); meStripTOBLayer1zm_[5] ->Fill((*iter).strip()); }
00507                  }
00508                  if( tTopo->tobLayer(id) == 2 ) {
00509                      if ( tTopo->tobModule(id) == 1 ) { meAdcTOBLayer2zm_[0] -> Fill((*iter).adc()); meStripTOBLayer2zm_[0] ->Fill((*iter).strip()); }
00510                      if ( tTopo->tobModule(id) == 2 ) { meAdcTOBLayer2zm_[1] -> Fill((*iter).adc()); meStripTOBLayer2zm_[1] ->Fill((*iter).strip()); }
00511                      if ( tTopo->tobModule(id) == 3 ) { meAdcTOBLayer2zm_[2] -> Fill((*iter).adc()); meStripTOBLayer2zm_[2] ->Fill((*iter).strip()); }
00512                      if ( tTopo->tobModule(id) == 4 ) { meAdcTOBLayer2zm_[3] -> Fill((*iter).adc()); meStripTOBLayer2zm_[3] ->Fill((*iter).strip()); }
00513                      if ( tTopo->tobModule(id) == 5 ) { meAdcTOBLayer2zm_[4] -> Fill((*iter).adc()); meStripTOBLayer2zm_[4] ->Fill((*iter).strip()); }
00514                      if ( tTopo->tobModule(id) == 6 ) { meAdcTOBLayer2zm_[5] -> Fill((*iter).adc()); meStripTOBLayer2zm_[5] ->Fill((*iter).strip()); }
00515                  }
00516                  if( tTopo->tobLayer(id) == 3 ) {
00517                      if ( tTopo->tobModule(id) == 1 ) { meAdcTOBLayer3zm_[0] -> Fill((*iter).adc()); meStripTOBLayer3zm_[0] ->Fill((*iter).strip()); }
00518                      if ( tTopo->tobModule(id) == 2 ) { meAdcTOBLayer3zm_[1] -> Fill((*iter).adc()); meStripTOBLayer3zm_[1] ->Fill((*iter).strip()); }
00519                      if ( tTopo->tobModule(id) == 3 ) { meAdcTOBLayer3zm_[2] -> Fill((*iter).adc()); meStripTOBLayer3zm_[2] ->Fill((*iter).strip()); }
00520                      if ( tTopo->tobModule(id) == 4 ) { meAdcTOBLayer3zm_[3] -> Fill((*iter).adc()); meStripTOBLayer3zm_[3] ->Fill((*iter).strip()); }
00521                      if ( tTopo->tobModule(id) == 5 ) { meAdcTOBLayer3zm_[4] -> Fill((*iter).adc()); meStripTOBLayer3zm_[4] ->Fill((*iter).strip()); }
00522                      if ( tTopo->tobModule(id) == 6 ) { meAdcTOBLayer3zm_[5] -> Fill((*iter).adc()); meStripTOBLayer3zm_[5] ->Fill((*iter).strip()); }
00523                  }
00524                  if( tTopo->tobLayer(id) == 4 ) {
00525                      if ( tTopo->tobModule(id) == 1 ) { meAdcTOBLayer4zm_[0] -> Fill((*iter).adc()); meStripTOBLayer4zm_[0] ->Fill((*iter).strip()); }
00526                      if ( tTopo->tobModule(id) == 2 ) { meAdcTOBLayer4zm_[1] -> Fill((*iter).adc()); meStripTOBLayer4zm_[1] ->Fill((*iter).strip()); }
00527                      if ( tTopo->tobModule(id) == 3 ) { meAdcTOBLayer4zm_[2] -> Fill((*iter).adc()); meStripTOBLayer4zm_[2] ->Fill((*iter).strip()); }
00528                      if ( tTopo->tobModule(id) == 4 ) { meAdcTOBLayer4zm_[3] -> Fill((*iter).adc()); meStripTOBLayer4zm_[3] ->Fill((*iter).strip()); }
00529                      if ( tTopo->tobModule(id) == 5 ) { meAdcTOBLayer4zm_[4] -> Fill((*iter).adc()); meStripTOBLayer4zm_[4] ->Fill((*iter).strip()); }
00530                      if ( tTopo->tobModule(id) == 6 ) { meAdcTOBLayer4zm_[5] -> Fill((*iter).adc()); meStripTOBLayer4zm_[5] ->Fill((*iter).strip()); }
00531                  }
00532                  if( tTopo->tobLayer(id) == 5 ) {
00533                      if ( tTopo->tobModule(id) == 1 ) { meAdcTOBLayer5zm_[0] -> Fill((*iter).adc()); meStripTOBLayer5zm_[0] ->Fill((*iter).strip()); }
00534                      if ( tTopo->tobModule(id) == 2 ) { meAdcTOBLayer5zm_[1] -> Fill((*iter).adc()); meStripTOBLayer5zm_[1] ->Fill((*iter).strip()); }
00535                      if ( tTopo->tobModule(id) == 3 ) { meAdcTOBLayer5zm_[2] -> Fill((*iter).adc()); meStripTOBLayer5zm_[2] ->Fill((*iter).strip()); }
00536                      if ( tTopo->tobModule(id) == 4 ) { meAdcTOBLayer5zm_[3] -> Fill((*iter).adc()); meStripTOBLayer5zm_[3] ->Fill((*iter).strip()); }
00537                      if ( tTopo->tobModule(id) == 5 ) { meAdcTOBLayer5zm_[4] -> Fill((*iter).adc()); meStripTOBLayer5zm_[4] ->Fill((*iter).strip()); }
00538                      if ( tTopo->tobModule(id) == 6 ) { meAdcTOBLayer5zm_[5] -> Fill((*iter).adc()); meStripTOBLayer5zm_[5] ->Fill((*iter).strip()); }
00539                  }
00540                  if( tTopo->tobLayer(id) == 6 ) {
00541                      if ( tTopo->tobModule(id) == 1 ) { meAdcTOBLayer6zm_[0] -> Fill((*iter).adc()); meStripTOBLayer6zm_[0] ->Fill((*iter).strip()); }
00542                      if ( tTopo->tobModule(id) == 2 ) { meAdcTOBLayer6zm_[1] -> Fill((*iter).adc()); meStripTOBLayer6zm_[1] ->Fill((*iter).strip()); }
00543                      if ( tTopo->tobModule(id) == 3 ) { meAdcTOBLayer6zm_[2] -> Fill((*iter).adc()); meStripTOBLayer6zm_[2] ->Fill((*iter).strip()); }
00544                      if ( tTopo->tobModule(id) == 4 ) { meAdcTOBLayer6zm_[3] -> Fill((*iter).adc()); meStripTOBLayer6zm_[3] ->Fill((*iter).strip()); }
00545                      if ( tTopo->tobModule(id) == 5 ) { meAdcTOBLayer6zm_[4] -> Fill((*iter).adc()); meStripTOBLayer6zm_[4] ->Fill((*iter).strip()); }
00546                      if ( tTopo->tobModule(id) == 6 ) { meAdcTOBLayer6zm_[5] -> Fill((*iter).adc()); meStripTOBLayer6zm_[5] ->Fill((*iter).strip()); }
00547                  }
00548 
00549                }else {
00550                  ++ndigilayertobzp[tTopo->tobLayer(id)-1];
00551                  if( tTopo->tobLayer(id) == 1 ) {
00552                      if ( tTopo->tobModule(id) == 1 ) { meAdcTOBLayer1zp_[0] -> Fill((*iter).adc()); meStripTOBLayer1zp_[0] ->Fill((*iter).strip()); }
00553                      if ( tTopo->tobModule(id) == 2 ) { meAdcTOBLayer1zp_[1] -> Fill((*iter).adc()); meStripTOBLayer1zp_[1] ->Fill((*iter).strip()); }
00554                      if ( tTopo->tobModule(id) == 3 ) { meAdcTOBLayer1zp_[2] -> Fill((*iter).adc()); meStripTOBLayer1zp_[2] ->Fill((*iter).strip()); }
00555                      if ( tTopo->tobModule(id) == 4 ) { meAdcTOBLayer1zp_[3] -> Fill((*iter).adc()); meStripTOBLayer1zp_[3] ->Fill((*iter).strip()); }
00556                      if ( tTopo->tobModule(id) == 5 ) { meAdcTOBLayer1zp_[4] -> Fill((*iter).adc()); meStripTOBLayer1zp_[4] ->Fill((*iter).strip()); }
00557                      if ( tTopo->tobModule(id) == 6 ) { meAdcTOBLayer1zp_[5] -> Fill((*iter).adc()); meStripTOBLayer1zp_[5] ->Fill((*iter).strip()); }
00558                  }
00559                  if( tTopo->tobLayer(id) == 2 ) {
00560                      if ( tTopo->tobModule(id) == 1 ) { meAdcTOBLayer2zp_[0] -> Fill((*iter).adc()); meStripTOBLayer2zp_[0] ->Fill((*iter).strip()); }
00561                      if ( tTopo->tobModule(id) == 2 ) { meAdcTOBLayer2zp_[1] -> Fill((*iter).adc()); meStripTOBLayer2zp_[1] ->Fill((*iter).strip()); }
00562                      if ( tTopo->tobModule(id) == 3 ) { meAdcTOBLayer2zp_[2] -> Fill((*iter).adc()); meStripTOBLayer2zp_[2] ->Fill((*iter).strip()); }
00563                      if ( tTopo->tobModule(id) == 4 ) { meAdcTOBLayer2zp_[3] -> Fill((*iter).adc()); meStripTOBLayer2zp_[3] ->Fill((*iter).strip()); }
00564                      if ( tTopo->tobModule(id) == 5 ) { meAdcTOBLayer2zp_[4] -> Fill((*iter).adc()); meStripTOBLayer2zp_[4] ->Fill((*iter).strip()); }
00565                      if ( tTopo->tobModule(id) == 6 ) { meAdcTOBLayer2zp_[5] -> Fill((*iter).adc()); meStripTOBLayer2zp_[5] ->Fill((*iter).strip()); }
00566                  }
00567                  if( tTopo->tobLayer(id) == 3 ) {
00568                      if ( tTopo->tobModule(id) == 1 ) { meAdcTOBLayer3zp_[0] -> Fill((*iter).adc()); meStripTOBLayer3zp_[0] ->Fill((*iter).strip()); }
00569                      if ( tTopo->tobModule(id) == 2 ) { meAdcTOBLayer3zp_[1] -> Fill((*iter).adc()); meStripTOBLayer3zp_[1] ->Fill((*iter).strip()); }
00570                      if ( tTopo->tobModule(id) == 3 ) { meAdcTOBLayer3zp_[2] -> Fill((*iter).adc()); meStripTOBLayer3zp_[2] ->Fill((*iter).strip()); }
00571                      if ( tTopo->tobModule(id) == 4 ) { meAdcTOBLayer3zp_[3] -> Fill((*iter).adc()); meStripTOBLayer3zp_[3] ->Fill((*iter).strip()); }
00572                      if ( tTopo->tobModule(id) == 5 ) { meAdcTOBLayer3zp_[4] -> Fill((*iter).adc()); meStripTOBLayer3zp_[4] ->Fill((*iter).strip()); }
00573                      if ( tTopo->tobModule(id) == 6 ) { meAdcTOBLayer3zp_[5] -> Fill((*iter).adc()); meStripTOBLayer3zp_[5] ->Fill((*iter).strip()); }
00574                  }
00575                  if( tTopo->tobLayer(id) == 4 ) {
00576                      if ( tTopo->tobModule(id) == 1 ) { meAdcTOBLayer4zp_[0] -> Fill((*iter).adc()); meStripTOBLayer4zp_[0] ->Fill((*iter).strip()); }
00577                      if ( tTopo->tobModule(id) == 2 ) { meAdcTOBLayer4zp_[1] -> Fill((*iter).adc()); meStripTOBLayer4zp_[1] ->Fill((*iter).strip()); }
00578                      if ( tTopo->tobModule(id) == 3 ) { meAdcTOBLayer4zp_[2] -> Fill((*iter).adc()); meStripTOBLayer4zp_[2] ->Fill((*iter).strip()); }
00579                      if ( tTopo->tobModule(id) == 4 ) { meAdcTOBLayer4zp_[3] -> Fill((*iter).adc()); meStripTOBLayer4zp_[3] ->Fill((*iter).strip()); }
00580                      if ( tTopo->tobModule(id) == 5 ) { meAdcTOBLayer4zp_[4] -> Fill((*iter).adc()); meStripTOBLayer4zp_[4] ->Fill((*iter).strip()); }
00581                      if ( tTopo->tobModule(id) == 6 ) { meAdcTOBLayer4zp_[5] -> Fill((*iter).adc()); meStripTOBLayer4zp_[5] ->Fill((*iter).strip()); }
00582                  }
00583                  if( tTopo->tobLayer(id) == 5 ) {
00584                      if ( tTopo->tobModule(id) == 1 ) { meAdcTOBLayer5zp_[0] -> Fill((*iter).adc()); meStripTOBLayer5zp_[0] ->Fill((*iter).strip()); }
00585                      if ( tTopo->tobModule(id) == 2 ) { meAdcTOBLayer5zp_[1] -> Fill((*iter).adc()); meStripTOBLayer5zp_[1] ->Fill((*iter).strip()); }
00586                      if ( tTopo->tobModule(id) == 3 ) { meAdcTOBLayer5zp_[2] -> Fill((*iter).adc()); meStripTOBLayer5zp_[2] ->Fill((*iter).strip()); }
00587                      if ( tTopo->tobModule(id) == 4 ) { meAdcTOBLayer5zp_[3] -> Fill((*iter).adc()); meStripTOBLayer5zp_[3] ->Fill((*iter).strip()); }
00588                      if ( tTopo->tobModule(id) == 5 ) { meAdcTOBLayer5zp_[4] -> Fill((*iter).adc()); meStripTOBLayer5zp_[4] ->Fill((*iter).strip()); }
00589                      if ( tTopo->tobModule(id) == 6 ) { meAdcTOBLayer5zp_[5] -> Fill((*iter).adc()); meStripTOBLayer5zp_[5] ->Fill((*iter).strip()); }
00590                  }
00591                  if( tTopo->tobLayer(id) == 6 ) {
00592                      if ( tTopo->tobModule(id) == 1 ) { meAdcTOBLayer6zp_[0] -> Fill((*iter).adc()); meStripTOBLayer6zp_[0] ->Fill((*iter).strip()); }
00593                      if ( tTopo->tobModule(id) == 2 ) { meAdcTOBLayer6zp_[1] -> Fill((*iter).adc()); meStripTOBLayer6zp_[1] ->Fill((*iter).strip()); }
00594                      if ( tTopo->tobModule(id) == 3 ) { meAdcTOBLayer6zp_[2] -> Fill((*iter).adc()); meStripTOBLayer6zp_[2] ->Fill((*iter).strip()); }
00595                      if ( tTopo->tobModule(id) == 4 ) { meAdcTOBLayer6zp_[3] -> Fill((*iter).adc()); meStripTOBLayer6zp_[3] ->Fill((*iter).strip()); }
00596                      if ( tTopo->tobModule(id) == 5 ) { meAdcTOBLayer6zp_[4] -> Fill((*iter).adc()); meStripTOBLayer6zp_[4] ->Fill((*iter).strip()); }
00597                      if ( tTopo->tobModule(id) == 6 ) { meAdcTOBLayer6zp_[5] -> Fill((*iter).adc()); meStripTOBLayer6zp_[5] ->Fill((*iter).strip()); }
00598                  }
00599 
00600 
00601                }
00602              }
00603         }
00604    
00605         if (detId.subdetId()==StripSubdetector::TID) {
00606               
00607             for ( iter = begin ; iter != end; iter++ ) {
00608               if( tTopo->tidSide(id) == 1){
00609                  ++ndigiwheeltidzm[tTopo->tidWheel(id)-1];
00610                 if( tTopo->tidWheel(id) == 1 ) {
00611                    if(tTopo->tidRing(id)== 1) { meAdcTIDWheel1zm_[0] -> Fill((*iter).adc()); meStripTIDWheel1zm_[0] ->Fill((*iter).strip());}
00612                    if(tTopo->tidRing(id)== 2) { meAdcTIDWheel1zm_[1] -> Fill((*iter).adc()); meStripTIDWheel1zm_[1] ->Fill((*iter).strip());}
00613                    if(tTopo->tidRing(id)== 3) { meAdcTIDWheel1zm_[2] -> Fill((*iter).adc()); meStripTIDWheel1zm_[2] ->Fill((*iter).strip());}
00614                 }
00615                 if( tTopo->tidWheel(id) == 2 ) {
00616                    if(tTopo->tidRing(id)== 1) { meAdcTIDWheel2zm_[0] -> Fill((*iter).adc()); meStripTIDWheel2zm_[0] ->Fill((*iter).strip());}
00617                    if(tTopo->tidRing(id)== 2) { meAdcTIDWheel2zm_[1] -> Fill((*iter).adc()); meStripTIDWheel2zm_[1] ->Fill((*iter).strip());}
00618                    if(tTopo->tidRing(id)== 3) { meAdcTIDWheel2zm_[2] -> Fill((*iter).adc()); meStripTIDWheel2zm_[2] ->Fill((*iter).strip());}
00619                 }
00620                 if( tTopo->tidWheel(id) == 3 ) {
00621                    if(tTopo->tidRing(id)== 1) { meAdcTIDWheel3zm_[0] -> Fill((*iter).adc()); meStripTIDWheel3zm_[0] ->Fill((*iter).strip());}
00622                    if(tTopo->tidRing(id)== 2) { meAdcTIDWheel3zm_[1] -> Fill((*iter).adc()); meStripTIDWheel3zm_[1] ->Fill((*iter).strip());}
00623                    if(tTopo->tidRing(id)== 3) { meAdcTIDWheel3zm_[2] -> Fill((*iter).adc()); meStripTIDWheel3zm_[2] ->Fill((*iter).strip());}
00624                 }
00625 
00626               }else{
00627                 ++ndigiwheeltidzp[tTopo->tidWheel(id)-1];
00628                 if( tTopo->tidWheel(id) == 1 ) { 
00629                    if(tTopo->tidRing(id)== 1) { meAdcTIDWheel1zp_[0] -> Fill((*iter).adc()); meStripTIDWheel1zp_[0] ->Fill((*iter).strip());}
00630                    if(tTopo->tidRing(id)== 2) { meAdcTIDWheel1zp_[1] -> Fill((*iter).adc()); meStripTIDWheel1zp_[1] ->Fill((*iter).strip());}
00631                    if(tTopo->tidRing(id)== 3) { meAdcTIDWheel1zp_[2] -> Fill((*iter).adc()); meStripTIDWheel1zp_[2] ->Fill((*iter).strip());}
00632                 }  
00633                 if( tTopo->tidWheel(id) == 2 ) {
00634                    if(tTopo->tidRing(id)== 1) { meAdcTIDWheel2zp_[0] -> Fill((*iter).adc()); meStripTIDWheel2zp_[0] ->Fill((*iter).strip());}
00635                    if(tTopo->tidRing(id)== 2) { meAdcTIDWheel2zp_[1] -> Fill((*iter).adc()); meStripTIDWheel2zp_[1] ->Fill((*iter).strip());}
00636                    if(tTopo->tidRing(id)== 3) { meAdcTIDWheel2zp_[2] -> Fill((*iter).adc()); meStripTIDWheel2zp_[2] ->Fill((*iter).strip());}
00637                 }
00638                 if( tTopo->tidWheel(id) == 3 ) {
00639                    if(tTopo->tidRing(id)== 1) { meAdcTIDWheel3zp_[0] -> Fill((*iter).adc()); meStripTIDWheel3zp_[0] ->Fill((*iter).strip());}
00640                    if(tTopo->tidRing(id)== 2) { meAdcTIDWheel3zp_[1] -> Fill((*iter).adc()); meStripTIDWheel3zp_[1] ->Fill((*iter).strip());}
00641                    if(tTopo->tidRing(id)== 3) { meAdcTIDWheel3zp_[2] -> Fill((*iter).adc()); meStripTIDWheel3zp_[2] ->Fill((*iter).strip());}
00642                 }
00643     
00644               } 
00645             }
00646        }
00647         if (detId.subdetId()==StripSubdetector::TEC) {
00648             
00649             for ( iter = begin ; iter != end; iter++ ) {
00650               if(tTopo->tecSide(id) == 1) {
00651                 ++ndigiwheelteczm[tTopo->tecWheel(id)-1];
00652                 if( tTopo->tecWheel(id) == 1 ) {
00653                    if ( tTopo->tecRing(id) == 1 ) { meAdcTECWheel1zm_[0] -> Fill((*iter).adc()); meStripTECWheel1zm_[0] ->Fill((*iter).strip()); }
00654                    if ( tTopo->tecRing(id) == 2 ) { meAdcTECWheel1zm_[1] -> Fill((*iter).adc()); meStripTECWheel1zm_[1] ->Fill((*iter).strip()); }
00655                    if ( tTopo->tecRing(id) == 3 ) { meAdcTECWheel1zm_[2] -> Fill((*iter).adc()); meStripTECWheel1zm_[2] ->Fill((*iter).strip()); }
00656                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel1zm_[3] -> Fill((*iter).adc()); meStripTECWheel1zm_[3] ->Fill((*iter).strip()); }
00657                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel1zm_[4] -> Fill((*iter).adc()); meStripTECWheel1zm_[4] ->Fill((*iter).strip()); }
00658                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel1zm_[5] -> Fill((*iter).adc()); meStripTECWheel1zm_[5] ->Fill((*iter).strip()); }
00659                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel1zm_[6] -> Fill((*iter).adc()); meStripTECWheel1zm_[6] ->Fill((*iter).strip()); }
00660                 }
00661                 if( tTopo->tecWheel(id) == 2 ) {
00662                    if ( tTopo->tecRing(id) == 1 ) { meAdcTECWheel2zm_[0] -> Fill((*iter).adc()); meStripTECWheel2zm_[0] ->Fill((*iter).strip()); }
00663                    if ( tTopo->tecRing(id) == 2 ) { meAdcTECWheel2zm_[1] -> Fill((*iter).adc()); meStripTECWheel2zm_[1] ->Fill((*iter).strip()); }
00664                    if ( tTopo->tecRing(id) == 3 ) { meAdcTECWheel2zm_[2] -> Fill((*iter).adc()); meStripTECWheel2zm_[2] ->Fill((*iter).strip()); }
00665                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel2zm_[3] -> Fill((*iter).adc()); meStripTECWheel2zm_[3] ->Fill((*iter).strip()); }
00666                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel2zm_[4] -> Fill((*iter).adc()); meStripTECWheel2zm_[4] ->Fill((*iter).strip()); }
00667                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel2zm_[5] -> Fill((*iter).adc()); meStripTECWheel2zm_[5] ->Fill((*iter).strip()); }
00668                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel2zm_[6] -> Fill((*iter).adc()); meStripTECWheel2zm_[6] ->Fill((*iter).strip()); }
00669                 }
00670                 if( tTopo->tecWheel(id) == 3 ) {
00671                    if ( tTopo->tecRing(id) == 1 ) { meAdcTECWheel3zm_[0] -> Fill((*iter).adc()); meStripTECWheel3zm_[0] ->Fill((*iter).strip()); }
00672                    if ( tTopo->tecRing(id) == 2 ) { meAdcTECWheel3zm_[1] -> Fill((*iter).adc()); meStripTECWheel3zm_[1] ->Fill((*iter).strip()); }
00673                    if ( tTopo->tecRing(id) == 3 ) { meAdcTECWheel3zm_[2] -> Fill((*iter).adc()); meStripTECWheel3zm_[2] ->Fill((*iter).strip()); }
00674                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel3zm_[3] -> Fill((*iter).adc()); meStripTECWheel3zm_[3] ->Fill((*iter).strip()); }
00675                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel3zm_[4] -> Fill((*iter).adc()); meStripTECWheel3zm_[4] ->Fill((*iter).strip()); }
00676                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel3zm_[5] -> Fill((*iter).adc()); meStripTECWheel3zm_[5] ->Fill((*iter).strip()); }
00677                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel3zm_[6] -> Fill((*iter).adc()); meStripTECWheel3zm_[6] ->Fill((*iter).strip()); }
00678                 }
00679                 if( tTopo->tecWheel(id) == 4 ) {
00680                    if ( tTopo->tecRing(id) == 2 ) { meAdcTECWheel4zm_[0] -> Fill((*iter).adc()); meStripTECWheel4zm_[0] ->Fill((*iter).strip()); }
00681                    if ( tTopo->tecRing(id) == 3 ) { meAdcTECWheel4zm_[1] -> Fill((*iter).adc()); meStripTECWheel4zm_[1] ->Fill((*iter).strip()); }
00682                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel4zm_[2] -> Fill((*iter).adc()); meStripTECWheel4zm_[2] ->Fill((*iter).strip()); }
00683                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel4zm_[3] -> Fill((*iter).adc()); meStripTECWheel4zm_[3] ->Fill((*iter).strip()); }
00684                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel4zm_[4] -> Fill((*iter).adc()); meStripTECWheel4zm_[4] ->Fill((*iter).strip()); }
00685                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel4zm_[5] -> Fill((*iter).adc()); meStripTECWheel4zm_[5] ->Fill((*iter).strip()); }
00686                 }
00687                 if( tTopo->tecWheel(id) == 5 ) {
00688                    if ( tTopo->tecRing(id) == 2 ) { meAdcTECWheel5zm_[0] -> Fill((*iter).adc()); meStripTECWheel5zm_[0] ->Fill((*iter).strip()); }
00689                    if ( tTopo->tecRing(id) == 3 ) { meAdcTECWheel5zm_[1] -> Fill((*iter).adc()); meStripTECWheel5zm_[1] ->Fill((*iter).strip()); }
00690                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel5zm_[2] -> Fill((*iter).adc()); meStripTECWheel5zm_[2] ->Fill((*iter).strip()); }
00691                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel5zm_[3] -> Fill((*iter).adc()); meStripTECWheel5zm_[3] ->Fill((*iter).strip()); }
00692                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel5zm_[4] -> Fill((*iter).adc()); meStripTECWheel5zm_[4] ->Fill((*iter).strip()); }
00693                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel5zm_[5] -> Fill((*iter).adc()); meStripTECWheel5zm_[5] ->Fill((*iter).strip()); }
00694                 }
00695                 if( tTopo->tecWheel(id) == 6 ) {
00696                    if ( tTopo->tecRing(id) == 2 ) { meAdcTECWheel6zm_[0] -> Fill((*iter).adc()); meStripTECWheel6zm_[0] ->Fill((*iter).strip()); }
00697                    if ( tTopo->tecRing(id) == 3 ) { meAdcTECWheel6zm_[1] -> Fill((*iter).adc()); meStripTECWheel6zm_[1] ->Fill((*iter).strip()); }
00698                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel6zm_[2] -> Fill((*iter).adc()); meStripTECWheel6zm_[2] ->Fill((*iter).strip()); }
00699                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel6zm_[3] -> Fill((*iter).adc()); meStripTECWheel6zm_[3] ->Fill((*iter).strip()); }
00700                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel6zm_[4] -> Fill((*iter).adc()); meStripTECWheel6zm_[4] ->Fill((*iter).strip()); }
00701                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel6zm_[5] -> Fill((*iter).adc()); meStripTECWheel6zm_[5] ->Fill((*iter).strip()); }
00702                 }
00703                 if( tTopo->tecWheel(id) == 7 ) {
00704                    if ( tTopo->tecRing(id) == 3 ) { meAdcTECWheel7zm_[0] -> Fill((*iter).adc()); meStripTECWheel7zm_[0] ->Fill((*iter).strip()); }
00705                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel7zm_[1] -> Fill((*iter).adc()); meStripTECWheel7zm_[1] ->Fill((*iter).strip()); }
00706                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel7zm_[2] -> Fill((*iter).adc()); meStripTECWheel7zm_[2] ->Fill((*iter).strip()); }
00707                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel7zm_[3] -> Fill((*iter).adc()); meStripTECWheel7zm_[3] ->Fill((*iter).strip()); }
00708                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel7zm_[4] -> Fill((*iter).adc()); meStripTECWheel7zm_[4] ->Fill((*iter).strip()); }
00709                 }
00710                 if( tTopo->tecWheel(id) == 8 ) {
00711                    if ( tTopo->tecRing(id) == 3 ) { meAdcTECWheel8zm_[0] -> Fill((*iter).adc()); meStripTECWheel8zm_[0] ->Fill((*iter).strip()); }
00712                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel8zm_[1] -> Fill((*iter).adc()); meStripTECWheel8zm_[1] ->Fill((*iter).strip()); }
00713                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel8zm_[2] -> Fill((*iter).adc()); meStripTECWheel8zm_[2] ->Fill((*iter).strip()); }
00714                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel8zm_[3] -> Fill((*iter).adc()); meStripTECWheel8zm_[3] ->Fill((*iter).strip()); }
00715                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel8zm_[4] -> Fill((*iter).adc()); meStripTECWheel8zm_[4] ->Fill((*iter).strip()); }
00716                 }
00717                 if( tTopo->tecWheel(id) == 9 ) {
00718                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel9zm_[0] -> Fill((*iter).adc()); meStripTECWheel9zm_[0] ->Fill((*iter).strip()); }
00719                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel9zm_[1] -> Fill((*iter).adc()); meStripTECWheel9zm_[1] ->Fill((*iter).strip()); }
00720                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel9zm_[2] -> Fill((*iter).adc()); meStripTECWheel9zm_[2] ->Fill((*iter).strip()); }
00721                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel9zm_[3] -> Fill((*iter).adc()); meStripTECWheel9zm_[3] ->Fill((*iter).strip()); }
00722                 }
00723               }else {
00724                 ++ndigiwheelteczp[tTopo->tecWheel(id)-1];
00725                 if( tTopo->tecWheel(id) == 1 ) {
00726                    if ( tTopo->tecRing(id) == 1 ) { meAdcTECWheel1zp_[0] -> Fill((*iter).adc()); meStripTECWheel1zp_[0] ->Fill((*iter).strip()); }
00727                    if ( tTopo->tecRing(id) == 2 ) { meAdcTECWheel1zp_[1] -> Fill((*iter).adc()); meStripTECWheel1zp_[1] ->Fill((*iter).strip()); }
00728                    if ( tTopo->tecRing(id) == 3 ) { meAdcTECWheel1zp_[2] -> Fill((*iter).adc()); meStripTECWheel1zp_[2] ->Fill((*iter).strip()); }
00729                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel1zp_[3] -> Fill((*iter).adc()); meStripTECWheel1zp_[3] ->Fill((*iter).strip()); }
00730                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel1zp_[4] -> Fill((*iter).adc()); meStripTECWheel1zp_[4] ->Fill((*iter).strip()); }
00731                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel1zp_[5] -> Fill((*iter).adc()); meStripTECWheel1zp_[5] ->Fill((*iter).strip()); }
00732                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel1zp_[6] -> Fill((*iter).adc()); meStripTECWheel1zp_[6] ->Fill((*iter).strip()); }
00733                 }
00734                 if( tTopo->tecWheel(id) == 2 ) {
00735                    if ( tTopo->tecRing(id) == 1 ) { meAdcTECWheel2zp_[0] -> Fill((*iter).adc()); meStripTECWheel2zp_[0] ->Fill((*iter).strip()); }
00736                    if ( tTopo->tecRing(id) == 2 ) { meAdcTECWheel2zp_[1] -> Fill((*iter).adc()); meStripTECWheel2zp_[1] ->Fill((*iter).strip()); }
00737                    if ( tTopo->tecRing(id) == 3 ) { meAdcTECWheel2zp_[2] -> Fill((*iter).adc()); meStripTECWheel2zp_[2] ->Fill((*iter).strip()); }
00738                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel2zp_[3] -> Fill((*iter).adc()); meStripTECWheel2zp_[3] ->Fill((*iter).strip()); }
00739                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel2zp_[4] -> Fill((*iter).adc()); meStripTECWheel2zp_[4] ->Fill((*iter).strip()); }
00740                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel2zp_[5] -> Fill((*iter).adc()); meStripTECWheel2zp_[5] ->Fill((*iter).strip()); }
00741                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel2zp_[6] -> Fill((*iter).adc()); meStripTECWheel2zp_[6] ->Fill((*iter).strip()); }
00742                 }
00743                 if( tTopo->tecWheel(id) == 3 ) {
00744                    if ( tTopo->tecRing(id) == 1 ) { meAdcTECWheel3zp_[0] -> Fill((*iter).adc()); meStripTECWheel3zp_[0] ->Fill((*iter).strip()); }
00745                    if ( tTopo->tecRing(id) == 2 ) { meAdcTECWheel3zp_[1] -> Fill((*iter).adc()); meStripTECWheel3zp_[1] ->Fill((*iter).strip()); }
00746                    if ( tTopo->tecRing(id) == 3 ) { meAdcTECWheel3zp_[2] -> Fill((*iter).adc()); meStripTECWheel3zp_[2] ->Fill((*iter).strip()); }
00747                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel3zp_[3] -> Fill((*iter).adc()); meStripTECWheel3zp_[3] ->Fill((*iter).strip()); }
00748                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel3zp_[4] -> Fill((*iter).adc()); meStripTECWheel3zp_[4] ->Fill((*iter).strip()); }
00749                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel3zp_[5] -> Fill((*iter).adc()); meStripTECWheel3zp_[5] ->Fill((*iter).strip()); }
00750                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel3zp_[6] -> Fill((*iter).adc()); meStripTECWheel3zp_[6] ->Fill((*iter).strip()); }
00751                 }
00752                 if( tTopo->tecWheel(id) == 4 ) {
00753                    if ( tTopo->tecRing(id) == 2 ) { meAdcTECWheel4zp_[0] -> Fill((*iter).adc()); meStripTECWheel4zp_[0] ->Fill((*iter).strip()); }
00754                    if ( tTopo->tecRing(id) == 3 ) { meAdcTECWheel4zp_[1] -> Fill((*iter).adc()); meStripTECWheel4zp_[1] ->Fill((*iter).strip()); }
00755                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel4zp_[2] -> Fill((*iter).adc()); meStripTECWheel4zp_[2] ->Fill((*iter).strip()); }
00756                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel4zp_[3] -> Fill((*iter).adc()); meStripTECWheel4zp_[3] ->Fill((*iter).strip()); }
00757                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel4zp_[4] -> Fill((*iter).adc()); meStripTECWheel4zp_[4] ->Fill((*iter).strip()); }
00758                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel4zp_[5] -> Fill((*iter).adc()); meStripTECWheel4zp_[5] ->Fill((*iter).strip()); }
00759                 }
00760                 if( tTopo->tecWheel(id) == 5 ) {
00761                    if ( tTopo->tecRing(id) == 2 ) { meAdcTECWheel5zp_[0] -> Fill((*iter).adc()); meStripTECWheel5zp_[0] ->Fill((*iter).strip()); }
00762                    if ( tTopo->tecRing(id) == 3 ) { meAdcTECWheel5zp_[1] -> Fill((*iter).adc()); meStripTECWheel5zp_[1] ->Fill((*iter).strip()); }
00763                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel5zp_[2] -> Fill((*iter).adc()); meStripTECWheel5zp_[2] ->Fill((*iter).strip()); }
00764                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel5zp_[3] -> Fill((*iter).adc()); meStripTECWheel5zp_[3] ->Fill((*iter).strip()); }
00765                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel5zp_[4] -> Fill((*iter).adc()); meStripTECWheel5zp_[4] ->Fill((*iter).strip()); }
00766                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel5zp_[5] -> Fill((*iter).adc()); meStripTECWheel5zp_[5] ->Fill((*iter).strip()); }
00767                 }
00768                 if( tTopo->tecWheel(id) == 6 ) {
00769                    if ( tTopo->tecRing(id) == 2 ) { meAdcTECWheel6zp_[0] -> Fill((*iter).adc()); meStripTECWheel6zp_[0] ->Fill((*iter).strip()); }
00770                    if ( tTopo->tecRing(id) == 3 ) { meAdcTECWheel6zp_[1] -> Fill((*iter).adc()); meStripTECWheel6zp_[1] ->Fill((*iter).strip()); }
00771                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel6zp_[2] -> Fill((*iter).adc()); meStripTECWheel6zp_[2] ->Fill((*iter).strip()); }
00772                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel6zp_[3] -> Fill((*iter).adc()); meStripTECWheel6zp_[3] ->Fill((*iter).strip()); }
00773                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel6zp_[4] -> Fill((*iter).adc()); meStripTECWheel6zp_[4] ->Fill((*iter).strip()); }
00774                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel6zp_[5] -> Fill((*iter).adc()); meStripTECWheel6zp_[5] ->Fill((*iter).strip()); }
00775                 }
00776                 if( tTopo->tecWheel(id) == 7 ) {
00777                    if ( tTopo->tecRing(id) == 3 ) { meAdcTECWheel7zp_[0] -> Fill((*iter).adc()); meStripTECWheel7zp_[0] ->Fill((*iter).strip()); }
00778                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel7zp_[1] -> Fill((*iter).adc()); meStripTECWheel7zp_[1] ->Fill((*iter).strip()); }
00779                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel7zp_[2] -> Fill((*iter).adc()); meStripTECWheel7zp_[2] ->Fill((*iter).strip()); }
00780                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel7zp_[3] -> Fill((*iter).adc()); meStripTECWheel7zp_[3] ->Fill((*iter).strip()); }
00781                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel7zp_[4] -> Fill((*iter).adc()); meStripTECWheel7zp_[4] ->Fill((*iter).strip()); }
00782                 }
00783                 if( tTopo->tecWheel(id) == 8 ) {
00784                    if ( tTopo->tecRing(id) == 3 ) { meAdcTECWheel8zp_[0] -> Fill((*iter).adc()); meStripTECWheel8zp_[0] ->Fill((*iter).strip()); }
00785                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel8zp_[1] -> Fill((*iter).adc()); meStripTECWheel8zp_[1] ->Fill((*iter).strip()); }
00786                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel8zp_[2] -> Fill((*iter).adc()); meStripTECWheel8zp_[2] ->Fill((*iter).strip()); }
00787                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel8zp_[3] -> Fill((*iter).adc()); meStripTECWheel8zp_[3] ->Fill((*iter).strip()); }
00788                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel8zp_[4] -> Fill((*iter).adc()); meStripTECWheel8zp_[4] ->Fill((*iter).strip()); }
00789                 }
00790                 if( tTopo->tecWheel(id) == 9 ) {
00791                    if ( tTopo->tecRing(id) == 4 ) { meAdcTECWheel9zp_[0] -> Fill((*iter).adc()); meStripTECWheel9zp_[0] ->Fill((*iter).strip()); }
00792                    if ( tTopo->tecRing(id) == 5 ) { meAdcTECWheel9zp_[1] -> Fill((*iter).adc()); meStripTECWheel9zp_[1] ->Fill((*iter).strip()); }
00793                    if ( tTopo->tecRing(id) == 6 ) { meAdcTECWheel9zp_[2] -> Fill((*iter).adc()); meStripTECWheel9zp_[2] ->Fill((*iter).strip()); }
00794                    if ( tTopo->tecRing(id) == 7 ) { meAdcTECWheel9zp_[3] -> Fill((*iter).adc()); meStripTECWheel9zp_[3] ->Fill((*iter).strip()); }
00795                 }
00796              }
00797            }
00798        }
00799 
00800  }
00801   
00802   for ( int i =0; i< 4; i++ ) {
00803      meNDigiTIBLayerzm_[i]->Fill(ndigilayertibzm[i]);
00804      meNDigiTIBLayerzp_[i]->Fill(ndigilayertibzp[i]);
00805  }
00806  
00807  for ( int i =0; i< 6; i++ ) {
00808      meNDigiTOBLayerzm_[i]->Fill(ndigilayertobzm[i]);
00809      meNDigiTOBLayerzp_[i]->Fill(ndigilayertobzp[i]);
00810  }
00811 
00812 for ( int i =0; i< 3; i++ ) {
00813      meNDigiTIDWheelzm_[i]->Fill(ndigiwheeltidzm[i]);
00814      meNDigiTIDWheelzp_[i]->Fill(ndigiwheeltidzp[i]);
00815  }
00816 
00817 for ( int i =0; i< 9; i++ ) {
00818      meNDigiTECWheelzm_[i]->Fill(ndigiwheelteczm[i]);
00819      meNDigiTECWheelzp_[i]->Fill(ndigiwheelteczp[i]);
00820  }
00821 
00822  
00823 
00824 }
00825