CMS 3D CMS Logo

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

Go to the documentation of this file.
00001 #include "Validation/TrackerDigis/interface/SiPixelDigiValid.h"
00002 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00003 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
00004 #include "Geometry/TrackerNumberingBuilder/interface/GeometricDet.h"
00005 #include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetType.h"
00006 #include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h"
00007 #include "Geometry/TrackerGeometryBuilder/interface/RectangularPixelTopology.h"
00008 #include "DataFormats/Common/interface/DetSetVector.h"
00009 #include "DataFormats/SiPixelDigi/interface/PixelDigi.h"
00010 #include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
00011 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
00012 #include "Geometry/Records/interface/IdealGeometryRecord.h"
00013 #include "DQMServices/Core/interface/DQMStore.h"
00014 
00015 using namespace std;
00016 using namespace edm;
00017 
00018 SiPixelDigiValid::SiPixelDigiValid(const ParameterSet& ps):dbe_(0){
00019   
00020    
00021  outputFile_ = ps.getUntrackedParameter<string>("outputFile", "pixeldigihisto.root");
00022  src_ =  ps.getParameter<edm::InputTag>( "src" );
00023 
00024 
00025    dbe_ = Service<DQMStore>().operator->();
00026   
00027  if ( dbe_ ) {
00028     dbe_->setCurrentFolder("TrackerDigisV/TrackerDigis/Pixel");
00029 
00030    meDigiMultiLayer1Ring1_ =  dbe_->book1D("digimulti_layer1ring1","Digi Multiplicity ",30, 0., 30.);
00031    meDigiMultiLayer1Ring2_ =  dbe_->book1D("digimulti_layer1ring2","Digi Multiplicity ",30, 0., 30.);
00032    meDigiMultiLayer1Ring3_ =  dbe_->book1D("digimulti_layer1ring3","Digi Multiplicity ",30, 0., 30.);
00033    meDigiMultiLayer1Ring4_ =  dbe_->book1D("digimulti_layer1ring4","Digi Multiplicity ",30, 0., 30.);
00034    meDigiMultiLayer1Ring5_ =  dbe_->book1D("digimulti_layer1ring5","Digi Multiplicity ",30, 0., 30.);
00035    meDigiMultiLayer1Ring6_ =  dbe_->book1D("digimulti_layer1ring6","Digi Multiplicity ",30, 0., 30.);
00036    meDigiMultiLayer1Ring7_ =  dbe_->book1D("digimulti_layer1ring7","Digi Multiplicity ",30, 0., 30.);
00037    meDigiMultiLayer1Ring8_ =  dbe_->book1D("digimulti_layer1ring8","Digi Multiplicity ",30, 0., 30.);
00038 
00039    meDigiMultiLayer2Ring1_ =  dbe_->book1D("digimulti_layer2ring1","Digi Multiplicity ",30, 0., 30.);
00040    meDigiMultiLayer2Ring2_ =  dbe_->book1D("digimulti_layer2ring2","Digi Multiplicity ",30, 0., 30.);
00041    meDigiMultiLayer2Ring3_ =  dbe_->book1D("digimulti_layer2ring3","Digi Multiplicity ",30, 0., 30.);
00042    meDigiMultiLayer2Ring4_ =  dbe_->book1D("digimulti_layer2ring4","Digi Multiplicity ",30, 0., 30.);
00043    meDigiMultiLayer2Ring5_ =  dbe_->book1D("digimulti_layer2ring5","Digi Multiplicity ",30, 0., 30.);
00044    meDigiMultiLayer2Ring6_ =  dbe_->book1D("digimulti_layer2ring6","Digi Multiplicity ",30, 0., 30.);
00045    meDigiMultiLayer2Ring7_ =  dbe_->book1D("digimulti_layer2ring7","Digi Multiplicity ",30, 0., 30.);
00046    meDigiMultiLayer2Ring8_ =  dbe_->book1D("digimulti_layer2ring8","Digi Multiplicity ",30, 0., 30.);
00047 
00048    meDigiMultiLayer3Ring1_ =  dbe_->book1D("digimulti_layer3ring1","Digi Multiplicity ",30, 0., 30.);
00049    meDigiMultiLayer3Ring2_ =  dbe_->book1D("digimulti_layer3ring2","Digi Multiplicity ",30, 0., 30.);
00050    meDigiMultiLayer3Ring3_ =  dbe_->book1D("digimulti_layer3ring3","Digi Multiplicity ",30, 0., 30.);
00051    meDigiMultiLayer3Ring4_ =  dbe_->book1D("digimulti_layer3ring4","Digi Multiplicity ",30, 0., 30.);
00052    meDigiMultiLayer3Ring5_ =  dbe_->book1D("digimulti_layer3ring5","Digi Multiplicity ",30, 0., 30.);
00053    meDigiMultiLayer3Ring6_ =  dbe_->book1D("digimulti_layer3ring6","Digi Multiplicity ",30, 0., 30.);
00054    meDigiMultiLayer3Ring7_ =  dbe_->book1D("digimulti_layer3ring7","Digi Multiplicity ",30, 0., 30.);
00055    meDigiMultiLayer3Ring8_ =  dbe_->book1D("digimulti_layer3ring8","Digi Multiplicity ",30, 0., 30.);
00056   
00058    meAdcLayer1Ring1_ = dbe_->book1D("adc_layer1ring1","Digi charge",50, 0., 300.);
00059    meAdcLayer1Ring2_ = dbe_->book1D("adc_layer1ring2","Digi charge",50, 0., 300.);
00060    meAdcLayer1Ring3_ = dbe_->book1D("adc_layer1ring3","Digi charge",50, 0., 300.);
00061    meAdcLayer1Ring4_ = dbe_->book1D("adc_layer1ring4","Digi charge",50, 0., 300.);
00062    meAdcLayer1Ring5_ = dbe_->book1D("adc_layer1ring5","Digi charge",50, 0., 300.);
00063    meAdcLayer1Ring6_ = dbe_->book1D("adc_layer1ring6","Digi charge",50, 0., 300.);
00064    meAdcLayer1Ring7_ = dbe_->book1D("adc_layer1ring7","Digi charge",50, 0., 300.);
00065    meAdcLayer1Ring8_ = dbe_->book1D("adc_layer1ring8","Digi charge",50, 0., 300.);
00066 
00067    meRowLayer1Ring1_ = dbe_->book1D("row_layer1ring1","Digi row",50, 0., 200.);
00068    meRowLayer1Ring2_ = dbe_->book1D("row_layer1ring2","Digi row",50, 0., 200.);
00069    meRowLayer1Ring3_ = dbe_->book1D("row_layer1ring3","Digi row",50, 0., 200.);
00070    meRowLayer1Ring4_ = dbe_->book1D("row_layer1ring4","Digi row",50, 0., 200.);
00071    meRowLayer1Ring5_ = dbe_->book1D("row_layer1ring5","Digi row",50, 0., 200.);
00072    meRowLayer1Ring6_ = dbe_->book1D("row_layer1ring6","Digi row",50, 0., 200.);
00073    meRowLayer1Ring7_ = dbe_->book1D("row_layer1ring7","Digi row",50, 0., 200.);
00074    meRowLayer1Ring8_ = dbe_->book1D("row_layer1ring8","Digi row",50, 0., 200.);
00075 
00076    meColLayer1Ring1_ = dbe_->book1D("col_layer1ring1","Digi column",50, 0., 500.);
00077    meColLayer1Ring2_ = dbe_->book1D("col_layer1ring2","Digi column",50, 0., 500.);
00078    meColLayer1Ring3_ = dbe_->book1D("col_layer1ring3","Digi column",50, 0., 500.);
00079    meColLayer1Ring4_ = dbe_->book1D("col_layer1ring4","Digi column",50, 0., 500.);
00080    meColLayer1Ring5_ = dbe_->book1D("col_layer1ring5","Digi column",50, 0., 500.);
00081    meColLayer1Ring6_ = dbe_->book1D("col_layer1ring6","Digi column",50, 0., 500.);
00082    meColLayer1Ring7_ = dbe_->book1D("col_layer1ring7","Digi column",50, 0., 500.);
00083    meColLayer1Ring8_ = dbe_->book1D("col_layer1ring8","Digi column",50, 0., 500.);
00084    
00085 
00086    meAdcLayer2Ring1_ = dbe_->book1D("adc_layer2ring1","Digi charge",50, 0., 300.);
00087    meAdcLayer2Ring2_ = dbe_->book1D("adc_layer2ring2","Digi charge",50, 0., 300.);
00088    meAdcLayer2Ring3_ = dbe_->book1D("adc_layer2ring3","Digi charge",50, 0., 300.);
00089    meAdcLayer2Ring4_ = dbe_->book1D("adc_layer2ring4","Digi charge",50, 0., 300.);
00090    meAdcLayer2Ring5_ = dbe_->book1D("adc_layer2ring5","Digi charge",50, 0., 300.);
00091    meAdcLayer2Ring6_ = dbe_->book1D("adc_layer2ring6","Digi charge",50, 0., 300.);
00092    meAdcLayer2Ring7_ = dbe_->book1D("adc_layer2ring7","Digi charge",50, 0., 300.);
00093    meAdcLayer2Ring8_ = dbe_->book1D("adc_layer2ring8","Digi charge",50, 0., 300.);
00094 
00095    meRowLayer2Ring1_ = dbe_->book1D("row_layer2ring1","Digi row",50, 0., 200.);
00096    meRowLayer2Ring2_ = dbe_->book1D("row_layer2ring2","Digi row",50, 0., 200.);
00097    meRowLayer2Ring3_ = dbe_->book1D("row_layer2ring3","Digi row",50, 0., 200.);
00098    meRowLayer2Ring4_ = dbe_->book1D("row_layer2ring4","Digi row",50, 0., 200.);
00099    meRowLayer2Ring5_ = dbe_->book1D("row_layer2ring5","Digi row",50, 0., 200.);
00100    meRowLayer2Ring6_ = dbe_->book1D("row_layer2ring6","Digi row",50, 0., 200.);
00101    meRowLayer2Ring7_ = dbe_->book1D("row_layer2ring7","Digi row",50, 0., 200.);
00102    meRowLayer2Ring8_ = dbe_->book1D("row_layer2ring8","Digi row",50, 0., 200.);
00103 
00104    meColLayer2Ring1_ = dbe_->book1D("col_layer2ring1","Digi column",50, 0., 500.);
00105    meColLayer2Ring2_ = dbe_->book1D("col_layer2ring2","Digi column",50, 0., 500.);
00106    meColLayer2Ring3_ = dbe_->book1D("col_layer2ring3","Digi column",50, 0., 500.);
00107    meColLayer2Ring4_ = dbe_->book1D("col_layer2ring4","Digi column",50, 0., 500.);
00108    meColLayer2Ring5_ = dbe_->book1D("col_layer2ring5","Digi column",50, 0., 500.);
00109    meColLayer2Ring6_ = dbe_->book1D("col_layer2ring6","Digi column",50, 0., 500.);
00110    meColLayer2Ring7_ = dbe_->book1D("col_layer2ring7","Digi column",50, 0., 500.);
00111    meColLayer2Ring8_ = dbe_->book1D("col_layer2ring8","Digi column",50, 0., 500.);
00112 
00113 
00114    meAdcLayer3Ring1_ = dbe_->book1D("adc_layer3ring1","Digi charge",50, 0., 300.);
00115    meAdcLayer3Ring2_ = dbe_->book1D("adc_layer3ring2","Digi charge",50, 0., 300.);
00116    meAdcLayer3Ring3_ = dbe_->book1D("adc_layer3ring3","Digi charge",50, 0., 300.);
00117    meAdcLayer3Ring4_ = dbe_->book1D("adc_layer3ring4","Digi charge",50, 0., 300.);
00118    meAdcLayer3Ring5_ = dbe_->book1D("adc_layer3ring5","Digi charge",50, 0., 300.);
00119    meAdcLayer3Ring6_ = dbe_->book1D("adc_layer3ring6","Digi charge",50, 0., 300.);
00120    meAdcLayer3Ring7_ = dbe_->book1D("adc_layer3ring7","Digi charge",50, 0., 300.);
00121    meAdcLayer3Ring8_ = dbe_->book1D("adc_layer3ring8","Digi charge",50, 0., 300.);
00122 
00123    meRowLayer3Ring1_ = dbe_->book1D("row_layer3ring1","Digi row",50, 0., 200.);
00124    meRowLayer3Ring2_ = dbe_->book1D("row_layer3ring2","Digi row",50, 0., 200.);
00125    meRowLayer3Ring3_ = dbe_->book1D("row_layer3ring3","Digi row",50, 0., 200.);
00126    meRowLayer3Ring4_ = dbe_->book1D("row_layer3ring4","Digi row",50, 0., 200.);
00127    meRowLayer3Ring5_ = dbe_->book1D("row_layer3ring5","Digi row",50, 0., 200.);
00128    meRowLayer3Ring6_ = dbe_->book1D("row_layer3ring6","Digi row",50, 0., 200.);
00129    meRowLayer3Ring7_ = dbe_->book1D("row_layer3ring7","Digi row",50, 0., 200.);
00130    meRowLayer3Ring8_ = dbe_->book1D("row_layer3ring8","Digi row",50, 0., 200.);
00131 
00132    meColLayer3Ring1_ = dbe_->book1D("col_layer3ring1","Digi column",50, 0., 500.);
00133    meColLayer3Ring2_ = dbe_->book1D("col_layer3ring2","Digi column",50, 0., 500.);
00134    meColLayer3Ring3_ = dbe_->book1D("col_layer3ring3","Digi column",50, 0., 500.);
00135    meColLayer3Ring4_ = dbe_->book1D("col_layer3ring4","Digi column",50, 0., 500.);
00136    meColLayer3Ring5_ = dbe_->book1D("col_layer3ring5","Digi column",50, 0., 500.);
00137    meColLayer3Ring6_ = dbe_->book1D("col_layer3ring6","Digi column",50, 0., 500.);
00138    meColLayer3Ring7_ = dbe_->book1D("col_layer3ring7","Digi column",50, 0., 500.);
00139    meColLayer3Ring8_ = dbe_->book1D("col_layer3ring8","Digi column",50, 0., 500.);
00140 
00141    meDigiMultiLayer1Ladders_  =dbe_->bookProfile("digi_layer1_ladders","Digi Num. per ladder",22,0.0,21.0, 100, 0.0, 100);
00142    meDigiMultiLayer2Ladders_  =dbe_->bookProfile("digi_layer2_ladders","Digi Num. per ladder",34,0.0,32.0, 100, 0.0, 100);
00143    meDigiMultiLayer3Ladders_  =dbe_->bookProfile("digi_layer3_ladders","Digi Num. per ladder",46,0.0,45.0, 100, 0.0, 100);
00144  
00145   //Forward Pixel
00146    /* ZMinus Side 1st Disk */
00147    meAdcZmDisk1Panel1Plaq1_ = dbe_->book1D("adc_zm_disk1_panel1_plaq1","Digi charge",50,0.,300.);
00148    meAdcZmDisk1Panel1Plaq2_ = dbe_->book1D("adc_zm_disk1_panel1_plaq2","Digi charge",50,0.,300.);
00149    meAdcZmDisk1Panel1Plaq3_ = dbe_->book1D("adc_zm_disk1_panel1_plaq3","Digi charge",50,0.,300.);
00150    meAdcZmDisk1Panel1Plaq4_ = dbe_->book1D("adc_zm_disk1_panel1_plaq4","Digi charge",50,0.,300.);
00151    meAdcZmDisk1Panel2Plaq1_ = dbe_->book1D("adc_zm_disk1_panel2_plaq1","Digi charge",50,0.,300.);
00152    meAdcZmDisk1Panel2Plaq2_ = dbe_->book1D("adc_zm_disk1_panel2_plaq2","Digi charge",50,0.,300.);
00153    meAdcZmDisk1Panel2Plaq3_ = dbe_->book1D("adc_zm_disk1_panel2_plaq3","Digi charge",50,0.,300.);
00154 
00155    meRowZmDisk1Panel1Plaq1_ = dbe_->book1D("row_zm_disk1_panel1_plaq1","Digi row",50,0.,100.);
00156    meRowZmDisk1Panel1Plaq2_ = dbe_->book1D("row_zm_disk1_panel1_plaq2","Digi row",50,0.,200.);
00157    meRowZmDisk1Panel1Plaq3_ = dbe_->book1D("row_zm_disk1_panel1_plaq3","Digi row",50,0.,200.);
00158    meRowZmDisk1Panel1Plaq4_ = dbe_->book1D("row_zm_disk1_panel1_plaq4","Digi row",50,0.,100.);
00159    meRowZmDisk1Panel2Plaq1_ = dbe_->book1D("row_zm_disk1_panel2_plaq1","Digi row",50,0.,200.);
00160    meRowZmDisk1Panel2Plaq2_ = dbe_->book1D("row_zm_disk1_panel2_plaq2","Digi row",50,0.,200.);
00161    meRowZmDisk1Panel2Plaq3_ = dbe_->book1D("row_zm_disk1_panel2_plaq3","Digi row",50,0.,200.);
00162 
00163    meColZmDisk1Panel1Plaq1_ = dbe_->book1D("col_zm_disk1_panel1_plaq1","Digi column",50,0.,150.);
00164    meColZmDisk1Panel1Plaq2_ = dbe_->book1D("col_zm_disk1_panel1_plaq2","Digi column",50,0.,200.);
00165    meColZmDisk1Panel1Plaq3_ = dbe_->book1D("col_zm_disk1_panel1_plaq3","Digi column",50,0.,250.);
00166    meColZmDisk1Panel1Plaq4_ = dbe_->book1D("col_zm_disk1_panel1_plaq4","Digi column",50,0.,300.);
00167    meColZmDisk1Panel2Plaq1_ = dbe_->book1D("col_zm_disk1_panel2_plaq1","Digi column",50,0.,200.);
00168    meColZmDisk1Panel2Plaq2_ = dbe_->book1D("col_zm_disk1_panel2_plaq2","Digi column",50,0.,250.);
00169    meColZmDisk1Panel2Plaq3_ = dbe_->book1D("col_zm_disk1_panel2_plaq3","Digi column",50,0.,300.);
00170    meNdigiZmDisk1PerPanel1_ = dbe_->book1D("digi_zm_disk1_panel1","Digi Num. Panel1 Of 1st Disk In ZMinus Side ",30,0.,30.);
00171    meNdigiZmDisk1PerPanel2_ = dbe_->book1D("digi_zm_disk1_panel2","Digi Num. Panel2 Of 1st Disk In ZMinus Side ",30,0.,30.);
00172 
00173    /* ZMius Side 2nd disk */
00174    meAdcZmDisk2Panel1Plaq1_ = dbe_->book1D("adc_zm_disk2_panel1_plaq1","Digi charge",50,0.,300.);
00175    meAdcZmDisk2Panel1Plaq2_ = dbe_->book1D("adc_zm_disk2_panel1_plaq2","Digi charge",50,0.,300.);
00176    meAdcZmDisk2Panel1Plaq3_ = dbe_->book1D("adc_zm_disk2_panel1_plaq3","Digi charge",50,0.,300.);
00177    meAdcZmDisk2Panel1Plaq4_ = dbe_->book1D("adc_zm_disk2_panel1_plaq4","Digi charge",50,0.,300.);
00178    meAdcZmDisk2Panel2Plaq1_ = dbe_->book1D("adc_zm_disk2_panel2_plaq1","Digi charge",50,0.,300.);
00179    meAdcZmDisk2Panel2Plaq2_ = dbe_->book1D("adc_zm_disk2_panel2_plaq2","Digi charge",50,0.,300.);
00180    meAdcZmDisk2Panel2Plaq3_ = dbe_->book1D("adc_zm_disk2_panel2_plaq3","Digi charge",50,0.,300.);
00181 
00182    meRowZmDisk2Panel1Plaq1_ = dbe_->book1D("row_zm_disk2_panel1_plaq1","Digi row",50,0.,100.);
00183    meRowZmDisk2Panel1Plaq2_ = dbe_->book1D("row_zm_disk2_panel1_plaq2","Digi row",50,0.,200.);
00184    meRowZmDisk2Panel1Plaq3_ = dbe_->book1D("row_zm_disk2_panel1_plaq3","Digi row",50,0.,200.);
00185    meRowZmDisk2Panel1Plaq4_ = dbe_->book1D("row_zm_disk2_panel1_plaq4","Digi row",50,0.,100.);
00186    meRowZmDisk2Panel2Plaq1_ = dbe_->book1D("row_zm_disk2_panel2_plaq1","Digi row",50,0.,200.);
00187    meRowZmDisk2Panel2Plaq2_ = dbe_->book1D("row_zm_disk2_panel2_plaq2","Digi row",50,0.,200.);
00188    meRowZmDisk2Panel2Plaq3_ = dbe_->book1D("row_zm_disk2_panel2_plaq3","Digi row",50,0.,200.);
00189 
00190    meColZmDisk2Panel1Plaq1_ = dbe_->book1D("col_zm_disk2_panel1_plaq1","Digi Column",50,0.,150.);
00191    meColZmDisk2Panel1Plaq2_ = dbe_->book1D("col_zm_disk2_panel1_plaq2","Digi Column",50,0.,200.);
00192    meColZmDisk2Panel1Plaq3_ = dbe_->book1D("col_zm_disk2_panel1_plaq3","Digi Column",50,0.,250.);
00193    meColZmDisk2Panel1Plaq4_ = dbe_->book1D("col_zm_disk2_panel1_plaq4","Digi Column",50,0.,300.);
00194    meColZmDisk2Panel2Plaq1_ = dbe_->book1D("col_zm_disk2_panel2_plaq1","Digi Column",50,0.,200.);
00195    meColZmDisk2Panel2Plaq2_ = dbe_->book1D("col_zm_disk2_panel2_plaq2","Digi Column",50,0.,250.);
00196    meColZmDisk2Panel2Plaq3_ = dbe_->book1D("col_zm_disk2_panel2_plaq3","Digi Column",50,0.,300.);
00197    meNdigiZmDisk2PerPanel1_ = dbe_->book1D("digi_zm_disk2_panel1","Digi Num. Panel1 Of 2nd Disk In ZMinus Side ",30,0.,30.);
00198    meNdigiZmDisk2PerPanel2_ = dbe_->book1D("digi_zm_disk2_panel2","Digi Num. Panel2 Of 2nd Disk In ZMinus Side ",30,0.,30.);
00199 
00200 
00201    /* ZPlus Side 1st Disk */
00202    meAdcZpDisk1Panel1Plaq1_ = dbe_->book1D("adc_zp_disk1_panel1_plaq1","Digi charge",50,0.,300.);
00203    meAdcZpDisk1Panel1Plaq2_ = dbe_->book1D("adc_zp_disk1_panel1_plaq2","Digi charge",50,0.,300.);
00204    meAdcZpDisk1Panel1Plaq3_ = dbe_->book1D("adc_zp_disk1_panel1_plaq3","Digi charge",50,0.,300.);
00205    meAdcZpDisk1Panel1Plaq4_ = dbe_->book1D("adc_zp_disk1_panel1_plaq4","Digi charge",50,0.,300.);
00206    meAdcZpDisk1Panel2Plaq1_ = dbe_->book1D("adc_zp_disk1_panel2_plaq1","Digi charge",50,0.,300.);
00207    meAdcZpDisk1Panel2Plaq2_ = dbe_->book1D("adc_zp_disk1_panel2_plaq2","Digi charge",50,0.,300.);
00208    meAdcZpDisk1Panel2Plaq3_ = dbe_->book1D("adc_zp_disk1_panel2_plaq3","Digi charge",50,0.,300.);
00209 
00210    meRowZpDisk1Panel1Plaq1_ = dbe_->book1D("row_zp_disk1_panel1_plaq1","Digi row",50,0.,100.);
00211    meRowZpDisk1Panel1Plaq2_ = dbe_->book1D("row_zp_disk1_panel1_plaq2","Digi row",50,0.,200.);
00212    meRowZpDisk1Panel1Plaq3_ = dbe_->book1D("row_zp_disk1_panel1_plaq3","Digi row",50,0.,200.);
00213    meRowZpDisk1Panel1Plaq4_ = dbe_->book1D("row_zp_disk1_panel1_plaq4","Digi row",50,0.,100.);
00214    meRowZpDisk1Panel2Plaq1_ = dbe_->book1D("row_zp_disk1_panel2_plaq1","Digi row",50,0.,200.);
00215    meRowZpDisk1Panel2Plaq2_ = dbe_->book1D("row_zp_disk1_panel2_plaq2","Digi row",50,0.,200.);
00216    meRowZpDisk1Panel2Plaq3_ = dbe_->book1D("row_zp_disk1_panel2_plaq3","Digi row",50,0.,200.);
00217 
00218    meColZpDisk1Panel1Plaq1_ = dbe_->book1D("col_zp_disk1_panel1_plaq1","Digi Column",50,0.,150.);
00219    meColZpDisk1Panel1Plaq2_ = dbe_->book1D("col_zp_disk1_panel1_plaq2","Digi column",50,0.,200.);
00220    meColZpDisk1Panel1Plaq3_ = dbe_->book1D("col_zp_disk1_panel1_plaq3","Digi column",50,0.,250.);
00221    meColZpDisk1Panel1Plaq4_ = dbe_->book1D("col_zp_disk1_panel1_plaq4","Digi column",50,0.,300.);
00222    meColZpDisk1Panel2Plaq1_ = dbe_->book1D("col_zp_disk1_panel2_plaq1","Digi column",50,0.,200.);
00223    meColZpDisk1Panel2Plaq2_ = dbe_->book1D("col_zp_disk1_panel2_plaq2","Digi column",50,0.,250.);
00224    meColZpDisk1Panel2Plaq3_ = dbe_->book1D("col_zp_disk1_panel2_plaq3","Digi column",50,0.,300.);
00225    meNdigiZpDisk1PerPanel1_ = dbe_->book1D("digi_zp_disk1_panel1","Digi Num. Panel1 Of 1st Disk In ZPlus Side ",30,0.,30.);
00226    meNdigiZpDisk1PerPanel2_ = dbe_->book1D("digi_zp_disk1_panel2","Digi Num. Panel2 Of 1st Disk In ZPlus Side ",30,0.,30.);
00227 
00228 
00229    /* ZPlus Side 2nd disk */
00230    meAdcZpDisk2Panel1Plaq1_ = dbe_->book1D("adc_zp_disk2_panel1_plaq1","Digi charge",50,0.,300.);
00231    meAdcZpDisk2Panel1Plaq2_ = dbe_->book1D("adc_zp_disk2_panel1_plaq2","Digi charge",50,0.,300.);
00232    meAdcZpDisk2Panel1Plaq3_ = dbe_->book1D("adc_zp_disk2_panel1_plaq3","Digi charge",50,0.,300.);
00233    meAdcZpDisk2Panel1Plaq4_ = dbe_->book1D("adc_zp_disk2_panel1_plaq4","Digi charge",50,0.,300.);
00234    meAdcZpDisk2Panel2Plaq1_ = dbe_->book1D("adc_zp_disk2_panel2_plaq1","Digi charge",50,0.,300.);
00235    meAdcZpDisk2Panel2Plaq2_ = dbe_->book1D("adc_zp_disk2_panel2_plaq2","Digi charge",50,0.,300.);
00236    meAdcZpDisk2Panel2Plaq3_ = dbe_->book1D("adc_zp_disk2_panel2_plaq3","Digi charge",50,0.,300.);
00237 
00238    meRowZpDisk2Panel1Plaq1_ = dbe_->book1D("row_zp_disk2_panel1_plaq1","Digi row",10,0.,100.);
00239    meRowZpDisk2Panel1Plaq2_ = dbe_->book1D("row_zp_disk2_panel1_plaq2","Digi row",10,0.,200.);
00240    meRowZpDisk2Panel1Plaq3_ = dbe_->book1D("row_zp_disk2_panel1_plaq3","Digi row",10,0.,200.);
00241    meRowZpDisk2Panel1Plaq4_ = dbe_->book1D("row_zp_disk2_panel1_plaq4","Digi row",10,0.,100.);
00242    meRowZpDisk2Panel2Plaq1_ = dbe_->book1D("row_zp_disk2_panel2_plaq1","Digi row",10,0.,200.);
00243    meRowZpDisk2Panel2Plaq2_ = dbe_->book1D("row_zp_disk2_panel2_plaq2","Digi row",10,0.,200.);
00244    meRowZpDisk2Panel2Plaq3_ = dbe_->book1D("row_zp_disk2_panel2_plaq3","Digi row",10,0.,200.);
00245 
00246    meColZpDisk2Panel1Plaq1_ = dbe_->book1D("col_zp_disk2_panel1_plaq1","Digi column",50,0.,150.);
00247    meColZpDisk2Panel1Plaq2_ = dbe_->book1D("col_zp_disk2_panel1_plaq2","Digi column",50,0.,200.);
00248    meColZpDisk2Panel1Plaq3_ = dbe_->book1D("col_zp_disk2_panel1_plaq3","Digi column",50,0.,250.);
00249    meColZpDisk2Panel1Plaq4_ = dbe_->book1D("col_zp_disk2_panel1_plaq4","Digi column",50,0.,300.);
00250    meColZpDisk2Panel2Plaq1_ = dbe_->book1D("col_zp_disk2_panel2_plaq1","Digi column",50,0.,200.);
00251    meColZpDisk2Panel2Plaq2_ = dbe_->book1D("col_zp_disk2_panel2_plaq2","Digi column",50,0.,250.);
00252    meColZpDisk2Panel2Plaq3_ = dbe_->book1D("col_zp_disk2_panel2_plaq3","Digi column",50,0.,300.);
00253    meNdigiZpDisk2PerPanel1_ = dbe_->book1D("digi_zp_disk2_panel1","Digi Num. Panel1 Of 2nd Disk In ZPlus Side ",30,0.,30.);
00254    meNdigiZpDisk2PerPanel2_ = dbe_->book1D("digi_zp_disk2_panel2","Digi Num. Panel2 Of 2nd Disk In ZPlus Side ",30,0.,30.);
00255 
00256  }
00257  
00258 }
00259 
00260 SiPixelDigiValid::~SiPixelDigiValid(){
00261  
00262  // if ( outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_);
00263 }
00264 
00265 
00266 void SiPixelDigiValid::beginJob(){
00267 
00268 }
00269 
00270 void SiPixelDigiValid::endJob() {
00271  if ( outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_);
00272 }
00273 
00274 
00275 void SiPixelDigiValid::analyze(const Event& e, const EventSetup& c){
00276   //Retrieve tracker topology from geometry
00277   edm::ESHandle<TrackerTopology> tTopoHandle;
00278   c.get<IdealGeometryRecord>().get(tTopoHandle);
00279   const TrackerTopology* const tTopo = tTopoHandle.product();
00280 
00281 
00282 
00283  int ndigiperRingLayer1[8];
00284  int ndigiperRingLayer2[8];
00285  int ndigiperRingLayer3[8];
00286  for(int i = 0; i< 8; i++ ) {
00287     ndigiperRingLayer1[i] = 0;
00288     ndigiperRingLayer2[i] = 0;
00289     ndigiperRingLayer3[i] = 0;
00290  }
00291 
00292 int ndigiZpDisk1PerPanel1[24];
00293 int ndigiZpDisk1PerPanel2[24];
00294 int ndigiZpDisk2PerPanel1[24];
00295 int ndigiZpDisk2PerPanel2[24];
00296 int ndigiZmDisk1PerPanel1[24];
00297 int ndigiZmDisk1PerPanel2[24];
00298 int ndigiZmDisk2PerPanel1[24];
00299 int ndigiZmDisk2PerPanel2[24];
00300 
00301 for ( int i =0 ; i< 24; i++) {
00302    ndigiZpDisk1PerPanel1[i] = 0;
00303    ndigiZpDisk1PerPanel2[i] = 0;
00304    ndigiZpDisk2PerPanel1[i] = 0;
00305    ndigiZpDisk2PerPanel2[i] = 0;
00306    ndigiZmDisk1PerPanel1[i] = 0;
00307    ndigiZmDisk1PerPanel2[i] = 0;
00308    ndigiZmDisk2PerPanel1[i] = 0;
00309    ndigiZmDisk2PerPanel2[i] = 0;
00310 }
00311 
00312 int ndigilayer1ladders[20];
00313 int ndigilayer2ladders[32];
00314 int ndigilayer3ladders[44];
00315 
00316 for ( int i =0 ; i< 20; i++) {
00317    ndigilayer1ladders[i]= 0;
00318 }
00319 
00320 for ( int i =0 ; i< 32; i++) {
00321    ndigilayer2ladders[i] = 0;
00322 }
00323 
00324 for ( int i =0 ; i< 44; i++) {
00325    ndigilayer3ladders[i] = 0;
00326 }
00327 
00328  //LogInfo("EventInfo") << " Run = " << e.id().run() << " Event = " << e.id().event();
00329 
00330  edm::ESHandle<TrackerGeometry> tracker;
00331  c.get<TrackerDigiGeometryRecord>().get( tracker );     
00332 
00333  //string digiProducer = "siPixelDigis";
00334  edm::Handle<edm::DetSetVector<PixelDigi> > pixelDigis;
00335  e.getByLabel(src_, pixelDigis);
00336 
00337  edm::DetSetVector<PixelDigi>::const_iterator DSViter = pixelDigis->begin();
00338  for( ; DSViter != pixelDigis->end(); DSViter++) {
00339           unsigned int id = DSViter->id;
00340           DetId  detId(id);
00341           edm::DetSet<PixelDigi>::const_iterator  begin = DSViter->data.begin();
00342           edm::DetSet<PixelDigi>::const_iterator  end   = DSViter->data.end();
00343           edm::DetSet<PixelDigi>::const_iterator  iter;          
00344 
00345           if(detId.subdetId()==PixelSubdetector::PixelBarrel ) {
00346              
00347              unsigned int layer  = tTopo->pxbLayer(id);   // Layer:1,2,3.
00348              unsigned int ladder = tTopo->pxbLadder(id);  // Ladeer: 1-20, 32, 44. 
00349              unsigned int zindex = tTopo->pxbModule(id);  // Z-index: 1-8.
00350              //LogInfo("SiPixelDigiValid")<<"Barrel:: Layer="<<layer<<" Ladder="<<ladder<<" zindex="<<zindex;
00351              for ( iter = begin ; iter != end; iter++ ) {
00352                 if( layer == 1 ) {
00353                      ++ndigilayer1ladders[ladder-1];
00354                      ++ndigiperRingLayer1[zindex-1];
00355                      if (zindex == 1) { 
00356                           meAdcLayer1Ring1_->Fill((*iter).adc());
00357                           meRowLayer1Ring1_->Fill((*iter).row());
00358                           meColLayer1Ring1_->Fill((*iter).column());
00359                      }
00360                      if (zindex == 2) {
00361                           meAdcLayer1Ring2_->Fill((*iter).adc());
00362                           meRowLayer1Ring2_->Fill((*iter).row());
00363                           meColLayer1Ring2_->Fill((*iter).column());
00364                      }
00365 
00366                      if (zindex == 3) {
00367                           meAdcLayer1Ring3_->Fill((*iter).adc());
00368                           meRowLayer1Ring3_->Fill((*iter).row());
00369                           meColLayer1Ring3_->Fill((*iter).column());
00370                      }
00371 
00372                      if (zindex == 4)  {
00373                          meAdcLayer1Ring4_->Fill((*iter).adc());
00374                          meRowLayer1Ring4_->Fill((*iter).row());
00375                          meColLayer1Ring4_->Fill((*iter).column());
00376                      }
00377 
00378                      if (zindex == 5)  {
00379                          meAdcLayer1Ring5_->Fill((*iter).adc());
00380                          meRowLayer1Ring5_->Fill((*iter).row());
00381                          meColLayer1Ring5_->Fill((*iter).column());
00382                      }
00383 
00384                      if (zindex == 6)  {
00385                          meAdcLayer1Ring6_->Fill((*iter).adc());
00386                          meRowLayer1Ring6_->Fill((*iter).row());
00387                          meColLayer1Ring6_->Fill((*iter).column());
00388                      }
00389 
00390                      if (zindex == 7)  {
00391                          meAdcLayer1Ring7_->Fill((*iter).adc());
00392                          meRowLayer1Ring7_->Fill((*iter).row());
00393                          meColLayer1Ring7_->Fill((*iter).column());
00394                      }
00395                      if (zindex == 8)  {
00396                          meAdcLayer1Ring8_->Fill((*iter).adc());
00397                          meRowLayer1Ring8_->Fill((*iter).row());
00398                          meColLayer1Ring8_->Fill((*iter).column());
00399                      }
00400 
00401                 } 
00402                 if( layer == 2 ) {
00403                     ++ndigilayer2ladders[ladder-1];
00404                     ++ndigiperRingLayer2[zindex-1];
00405                     if (zindex == 1) {
00406                           meAdcLayer2Ring1_->Fill((*iter).adc());
00407                           meRowLayer2Ring1_->Fill((*iter).row());
00408                           meColLayer2Ring1_->Fill((*iter).column());
00409                      }
00410                      if (zindex == 2) {
00411                           meAdcLayer2Ring2_->Fill((*iter).adc());
00412                           meRowLayer2Ring2_->Fill((*iter).row());
00413                           meColLayer2Ring2_->Fill((*iter).column());
00414                      }
00415 
00416                      if (zindex == 3) {
00417                           meAdcLayer2Ring3_->Fill((*iter).adc());
00418                           meRowLayer2Ring3_->Fill((*iter).row());
00419                           meColLayer2Ring3_->Fill((*iter).column());
00420                      }
00421 
00422                      if (zindex == 4)  {
00423                          meAdcLayer2Ring4_->Fill((*iter).adc());
00424                          meRowLayer2Ring4_->Fill((*iter).row());
00425                          meColLayer2Ring4_->Fill((*iter).column());
00426                      }
00427 
00428                      if (zindex == 5)  {
00429                          meAdcLayer2Ring5_->Fill((*iter).adc());
00430                          meRowLayer2Ring5_->Fill((*iter).row());
00431                          meColLayer2Ring5_->Fill((*iter).column());
00432                      }
00433 
00434                      if (zindex == 6)  {
00435                          meAdcLayer2Ring6_->Fill((*iter).adc());
00436                          meRowLayer2Ring6_->Fill((*iter).row());
00437                          meColLayer2Ring6_->Fill((*iter).column());
00438                      }
00439 
00440                      if (zindex == 7)  {
00441                          meAdcLayer2Ring7_->Fill((*iter).adc());
00442                          meRowLayer2Ring7_->Fill((*iter).row());
00443                          meColLayer2Ring7_->Fill((*iter).column());
00444                      }
00445                      if (zindex == 8)  {
00446                          meAdcLayer2Ring8_->Fill((*iter).adc());
00447                          meRowLayer2Ring8_->Fill((*iter).row());
00448                          meColLayer2Ring8_->Fill((*iter).column());
00449                      }
00450 
00451                 }
00452                 if( layer == 3 ) {
00453                     ++ndigilayer3ladders[ladder-1];
00454                     ++ndigiperRingLayer3[zindex-1];
00455                     if (zindex == 1) {
00456                           meAdcLayer3Ring1_->Fill((*iter).adc());
00457                           meRowLayer3Ring1_->Fill((*iter).row());
00458                           meColLayer3Ring1_->Fill((*iter).column());
00459                      }
00460                      if (zindex == 2) {
00461                           meAdcLayer3Ring2_->Fill((*iter).adc());
00462                           meRowLayer3Ring2_->Fill((*iter).row());
00463                           meColLayer3Ring2_->Fill((*iter).column());
00464                      }
00465 
00466                      if (zindex == 3) {
00467                           meAdcLayer3Ring3_->Fill((*iter).adc());
00468                           meRowLayer3Ring3_->Fill((*iter).row());
00469                           meColLayer3Ring3_->Fill((*iter).column());
00470                      }
00471 
00472                      if (zindex == 4)  {
00473                          meAdcLayer3Ring4_->Fill((*iter).adc());
00474                          meRowLayer3Ring4_->Fill((*iter).row());
00475                          meColLayer3Ring4_->Fill((*iter).column());
00476                      }
00477 
00478                      if (zindex == 5)  {
00479                          meAdcLayer3Ring5_->Fill((*iter).adc());
00480                          meRowLayer3Ring5_->Fill((*iter).row());
00481                          meColLayer3Ring5_->Fill((*iter).column());
00482                      }
00483 
00484                      if (zindex == 6)  {
00485                          meAdcLayer3Ring6_->Fill((*iter).adc());
00486                          meRowLayer3Ring6_->Fill((*iter).row());
00487                          meColLayer3Ring6_->Fill((*iter).column());
00488                      }
00489 
00490                      if (zindex == 7)  {
00491                          meAdcLayer3Ring7_->Fill((*iter).adc());
00492                          meRowLayer3Ring7_->Fill((*iter).row());
00493                          meColLayer3Ring7_->Fill((*iter).column());
00494                      }
00495                      if (zindex == 8)  {
00496                          meAdcLayer3Ring8_->Fill((*iter).adc());
00497                          meRowLayer3Ring8_->Fill((*iter).row());
00498                          meColLayer3Ring8_->Fill((*iter).column());
00499                      }
00500                 }
00501  
00502              }   
00503            
00504           }
00505  
00506          if(detId.subdetId()==PixelSubdetector::PixelEndcap ){ //Endcap
00507            
00508            unsigned int side  = tTopo->pxfSide(id);
00509            unsigned int disk  = tTopo->pxfDisk(id);
00510            unsigned int blade = tTopo->pxfBlade(id);
00511            unsigned int panel = tTopo->pxfPanel(id);
00512            unsigned int mod   = tTopo->pxfModule(id);
00513            //LogInfo("SiPixelDigiValid")<<"EndcaP="<<side<<" Disk="<<disk<<" Blade="<<blade<<" Panel="<<panel<<" Module="<<mod;
00514            for ( iter = begin ; iter != end; iter++ ) {
00515              if(side == 1 && disk == 1 && panel ==1 ){
00516                      if ( mod == 1 ) {
00517                          meAdcZmDisk1Panel1Plaq1_->Fill((*iter).adc());
00518                          meRowZmDisk1Panel1Plaq1_->Fill((*iter).row());
00519                          meColZmDisk1Panel1Plaq1_->Fill((*iter).column());
00520                      }else if( mod == 2 ) {
00521                          meAdcZmDisk1Panel1Plaq2_->Fill((*iter).adc());
00522                          meRowZmDisk1Panel1Plaq2_->Fill((*iter).row());
00523                          meColZmDisk1Panel1Plaq2_->Fill((*iter).column());
00524                      }else if( mod == 3 ) {
00525                          meAdcZmDisk1Panel1Plaq3_->Fill((*iter).adc());
00526                          meRowZmDisk1Panel1Plaq3_->Fill((*iter).row());
00527                          meColZmDisk1Panel1Plaq3_->Fill((*iter).column());
00528                      }else if( mod == 4 ) {
00529                          meAdcZmDisk1Panel1Plaq4_->Fill((*iter).adc());
00530                          meRowZmDisk1Panel1Plaq4_->Fill((*iter).row());
00531                          meColZmDisk1Panel1Plaq4_->Fill((*iter).column());
00532                      }else {
00533                          //LogError("SiPixelDigiValid")<<" The number of module is Wrong";
00534                      } 
00535                      ++ndigiZmDisk1PerPanel1[blade-1];                
00536              }
00537 
00538              if(side == 1 && disk == 1 && panel ==2 ){
00539                      if ( mod == 1 ) {
00540                          meAdcZmDisk1Panel2Plaq1_->Fill((*iter).adc());
00541                          meRowZmDisk1Panel2Plaq1_->Fill((*iter).row());
00542                          meColZmDisk1Panel2Plaq1_->Fill((*iter).column());
00543                      }else if( mod == 2 ) {
00544                          meAdcZmDisk1Panel2Plaq2_->Fill((*iter).adc());
00545                          meRowZmDisk1Panel2Plaq2_->Fill((*iter).row());
00546                          meColZmDisk1Panel2Plaq2_->Fill((*iter).column());
00547                      }else if( mod == 3 ) {
00548                          meAdcZmDisk1Panel2Plaq3_->Fill((*iter).adc());
00549                          meRowZmDisk1Panel2Plaq3_->Fill((*iter).row());
00550                          meColZmDisk1Panel2Plaq3_->Fill((*iter).column());
00551                      }else {
00552                          //LogError("SiPixelDigiValid")<<" The number of module is Wrong";
00553                      }
00554                      ++ndigiZmDisk1PerPanel2[blade-1];
00555              }
00556 
00557             if(side == 1 && disk == 2 && panel ==1 ){
00558                      if ( mod == 1 ) {
00559                          meAdcZmDisk2Panel1Plaq1_->Fill((*iter).adc());
00560                          meRowZmDisk2Panel1Plaq1_->Fill((*iter).row());
00561                          meColZmDisk2Panel1Plaq1_->Fill((*iter).column());
00562                      }else if( mod == 2 ) {
00563                          meAdcZmDisk2Panel1Plaq2_->Fill((*iter).adc());
00564                          meRowZmDisk2Panel1Plaq2_->Fill((*iter).row());
00565                          meColZmDisk2Panel1Plaq2_->Fill((*iter).column());
00566                      }else if( mod == 3 ) {
00567                          meAdcZmDisk2Panel1Plaq3_->Fill((*iter).adc());
00568                          meRowZmDisk2Panel1Plaq3_->Fill((*iter).row());
00569                          meColZmDisk2Panel1Plaq3_->Fill((*iter).column());
00570                      }else if( mod == 4 ) {
00571                          meAdcZmDisk2Panel1Plaq4_->Fill((*iter).adc());
00572                          meRowZmDisk2Panel1Plaq4_->Fill((*iter).row());
00573                          meColZmDisk2Panel1Plaq4_->Fill((*iter).column());
00574                      }else {
00575                         // LogError("SiPixelDigiValid")<<" The number of module is Wrong";
00576                      }
00577                      ++ndigiZmDisk2PerPanel1[blade-1];
00578              }
00579 
00580              if(side == 1 && disk == 2 && panel ==2 ){
00581                      if ( mod == 1 ) {
00582                          meAdcZmDisk2Panel2Plaq1_->Fill((*iter).adc());
00583                          meRowZmDisk2Panel2Plaq1_->Fill((*iter).row());
00584                          meColZmDisk2Panel2Plaq1_->Fill((*iter).column());
00585                      }else if( mod == 2 ) {
00586                          meAdcZmDisk2Panel2Plaq2_->Fill((*iter).adc());
00587                          meRowZmDisk2Panel2Plaq2_->Fill((*iter).row());
00588                          meColZmDisk2Panel2Plaq2_->Fill((*iter).column());
00589                      }else if( mod == 3 ) {
00590                          meAdcZmDisk2Panel2Plaq3_->Fill((*iter).adc());
00591                          meRowZmDisk2Panel2Plaq3_->Fill((*iter).row());
00592                          meColZmDisk2Panel2Plaq3_->Fill((*iter).column());
00593                      }else {
00594                          //LogError("SiPixelDigiValid")<<" The number of module is Wrong";
00595                      }
00596                      ++ndigiZmDisk2PerPanel2[blade-1];
00597              }
00598 
00599 
00600             if(side == 2 && disk == 1 && panel ==1 ){
00601                      if ( mod == 1 ) {
00602                          meAdcZpDisk1Panel1Plaq1_->Fill((*iter).adc());
00603                          meRowZpDisk1Panel1Plaq1_->Fill((*iter).row());
00604                          meColZpDisk1Panel1Plaq1_->Fill((*iter).column());
00605                      }else if( mod == 2 ) {
00606                          meAdcZpDisk1Panel1Plaq2_->Fill((*iter).adc());
00607                          meRowZpDisk1Panel1Plaq2_->Fill((*iter).row());
00608                          meColZpDisk1Panel1Plaq2_->Fill((*iter).column());
00609                      }else if( mod == 3 ) {
00610                          meAdcZpDisk1Panel1Plaq3_->Fill((*iter).adc());
00611                          meRowZpDisk1Panel1Plaq3_->Fill((*iter).row());
00612                          meColZpDisk1Panel1Plaq3_->Fill((*iter).column());
00613                      }else if( mod == 4 ) {
00614                          meAdcZpDisk1Panel1Plaq4_->Fill((*iter).adc());
00615                          meRowZpDisk1Panel1Plaq4_->Fill((*iter).row());
00616                          meColZpDisk1Panel1Plaq4_->Fill((*iter).column());
00617                      }else {
00618                          //LogError("SiPixelDigiValid")<<" The number of module is Wrong";
00619                      }
00620                      ++ndigiZpDisk1PerPanel1[blade-1];
00621              }
00622 
00623              if(side == 2 && disk == 1 && panel ==2 ){
00624                      if ( mod == 1 ) {
00625                          meAdcZpDisk1Panel2Plaq1_->Fill((*iter).adc());
00626                          meRowZpDisk1Panel2Plaq1_->Fill((*iter).row());
00627                          meColZpDisk1Panel2Plaq1_->Fill((*iter).column());
00628                      }else if( mod == 2 ) {
00629                          meAdcZpDisk1Panel2Plaq2_->Fill((*iter).adc());
00630                          meRowZpDisk1Panel2Plaq2_->Fill((*iter).row());
00631                          meColZpDisk1Panel2Plaq2_->Fill((*iter).column());
00632                      }else if( mod == 3 ) {
00633                          meAdcZpDisk1Panel2Plaq3_->Fill((*iter).adc());
00634                          meRowZpDisk1Panel2Plaq3_->Fill((*iter).row());
00635                          meColZpDisk1Panel2Plaq3_->Fill((*iter).column());
00636                      }else {
00637                          //LogError("SiPixelDigiValid")<<" The number of module is Wrong";
00638                      }
00639                      ++ndigiZpDisk1PerPanel2[blade-1];
00640              }
00641 
00642             if(side == 2 && disk == 2 && panel ==1 ){
00643                      if ( mod == 1 ) {
00644                          meAdcZpDisk2Panel1Plaq1_->Fill((*iter).adc());
00645                          meRowZpDisk2Panel1Plaq1_->Fill((*iter).row());
00646                          meColZpDisk2Panel1Plaq1_->Fill((*iter).column());
00647                      }else if( mod == 2 ) {
00648                          meAdcZpDisk2Panel1Plaq2_->Fill((*iter).adc());
00649                          meRowZpDisk2Panel1Plaq2_->Fill((*iter).row());
00650                          meColZpDisk2Panel1Plaq2_->Fill((*iter).column());
00651                      }else if( mod == 3 ) {
00652                          meAdcZpDisk2Panel1Plaq3_->Fill((*iter).adc());
00653                          meRowZpDisk2Panel1Plaq3_->Fill((*iter).row());
00654                          meColZpDisk2Panel1Plaq3_->Fill((*iter).column());
00655                      }else if( mod == 4 ) {
00656                          meAdcZpDisk2Panel1Plaq4_->Fill((*iter).adc());
00657                          meRowZpDisk2Panel1Plaq4_->Fill((*iter).row());
00658                          meColZpDisk2Panel1Plaq4_->Fill((*iter).column());
00659                      }else {
00660                          //LogError("SiPixelDigiValid")<<" The number of module is Wrong";
00661                      }
00662                      ++ndigiZpDisk2PerPanel1[blade-1];
00663 
00664               }
00665 
00666              if(side == 2 && disk == 2 && panel ==2 ){
00667                      if ( mod == 1 ) {
00668                          meAdcZpDisk2Panel2Plaq1_->Fill((*iter).adc());
00669                          meRowZpDisk2Panel2Plaq1_->Fill((*iter).row());
00670                          meColZpDisk2Panel2Plaq1_->Fill((*iter).column());
00671                      }else if( mod == 2 ) {
00672                          meAdcZpDisk2Panel2Plaq2_->Fill((*iter).adc());
00673                          meRowZpDisk2Panel2Plaq2_->Fill((*iter).row());
00674                          meColZpDisk2Panel2Plaq2_->Fill((*iter).column());
00675                      }else if( mod == 3 ) {
00676                          meAdcZpDisk2Panel2Plaq3_->Fill((*iter).adc());
00677                          meRowZpDisk2Panel2Plaq3_->Fill((*iter).row());
00678                          meColZpDisk2Panel2Plaq3_->Fill((*iter).column());
00679                      }else {
00680                          //LogError("SiPixelDigiValid")<<" The number of module is Wrong";
00681                      }
00682                      ++ndigiZpDisk2PerPanel2[blade-1];
00683               }
00684            } //iterating the digi 
00685 
00686           }//Endcap 
00687 
00688     } // end for loop
00689     
00690     meDigiMultiLayer1Ring1_->Fill(ndigiperRingLayer1[0]);
00691     meDigiMultiLayer1Ring2_->Fill(ndigiperRingLayer1[1]);
00692     meDigiMultiLayer1Ring3_->Fill(ndigiperRingLayer1[2]);
00693     meDigiMultiLayer1Ring4_->Fill(ndigiperRingLayer1[3]);
00694     meDigiMultiLayer1Ring5_->Fill(ndigiperRingLayer1[4]);
00695     meDigiMultiLayer1Ring6_->Fill(ndigiperRingLayer1[5]);
00696     meDigiMultiLayer1Ring7_->Fill(ndigiperRingLayer1[6]);
00697     meDigiMultiLayer1Ring8_->Fill(ndigiperRingLayer1[7]);
00698 
00699     meDigiMultiLayer2Ring1_->Fill(ndigiperRingLayer2[0]);
00700     meDigiMultiLayer2Ring2_->Fill(ndigiperRingLayer2[1]);
00701     meDigiMultiLayer2Ring3_->Fill(ndigiperRingLayer2[2]);
00702     meDigiMultiLayer2Ring4_->Fill(ndigiperRingLayer2[3]);
00703     meDigiMultiLayer2Ring5_->Fill(ndigiperRingLayer2[4]);
00704     meDigiMultiLayer2Ring6_->Fill(ndigiperRingLayer2[5]);
00705     meDigiMultiLayer2Ring7_->Fill(ndigiperRingLayer2[6]);
00706     meDigiMultiLayer2Ring8_->Fill(ndigiperRingLayer2[7]);
00707 
00708     meDigiMultiLayer3Ring1_->Fill(ndigiperRingLayer3[0]);
00709     meDigiMultiLayer3Ring2_->Fill(ndigiperRingLayer3[1]);
00710     meDigiMultiLayer3Ring3_->Fill(ndigiperRingLayer3[2]);
00711     meDigiMultiLayer3Ring4_->Fill(ndigiperRingLayer3[3]);
00712     meDigiMultiLayer3Ring5_->Fill(ndigiperRingLayer3[4]);
00713     meDigiMultiLayer3Ring6_->Fill(ndigiperRingLayer3[5]);
00714     meDigiMultiLayer3Ring7_->Fill(ndigiperRingLayer3[6]);
00715     meDigiMultiLayer3Ring8_->Fill(ndigiperRingLayer3[7]);
00716 
00717     for(int i =0; i< 24; i++) {
00718          meNdigiZmDisk1PerPanel1_->Fill(ndigiZmDisk1PerPanel1[i]);
00719          meNdigiZmDisk1PerPanel2_->Fill(ndigiZmDisk1PerPanel2[i]);
00720          meNdigiZmDisk2PerPanel1_->Fill(ndigiZmDisk2PerPanel1[i]);
00721          meNdigiZmDisk2PerPanel2_->Fill(ndigiZmDisk2PerPanel2[i]);
00722          meNdigiZpDisk1PerPanel1_->Fill(ndigiZpDisk1PerPanel1[i]);
00723          meNdigiZpDisk1PerPanel2_->Fill(ndigiZpDisk1PerPanel2[i]);
00724          meNdigiZpDisk2PerPanel1_->Fill(ndigiZpDisk2PerPanel1[i]);
00725          meNdigiZpDisk2PerPanel2_->Fill(ndigiZpDisk2PerPanel2[i]);
00726     } 
00727     
00728    for (int i =0; i< 20; i++) {
00729        meDigiMultiLayer1Ladders_->Fill(i+1,ndigilayer1ladders[i]);
00730    }
00731 
00732    for (int i =0; i< 32; i++) {
00733        meDigiMultiLayer2Ladders_->Fill(i+1,ndigilayer2ladders[i]);
00734    }
00735 
00736    for (int i =0; i< 44; i++) {
00737        meDigiMultiLayer3Ladders_->Fill(i+1,ndigilayer3ladders[i]);
00738    }
00739 
00740 }