CMS 3D CMS Logo

RPCEfficiencySecond.cc

Go to the documentation of this file.
00001 /***************************************
00002 Author: 
00003 Camilo Carrillo
00004 Universidad de los Andes Bogota Colombia
00005 camilo.carrilloATcern.ch
00006 ****************************************/
00007 
00008 #include <memory>
00009 
00010 // user include files
00011 #include "FWCore/Framework/interface/Frameworkfwd.h"
00012 #include "FWCore/Framework/interface/EDAnalyzer.h"
00013 
00014 #include "FWCore/Framework/interface/Event.h"
00015 #include "FWCore/Framework/interface/MakerMacros.h"
00016 
00017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00018 #include <Geometry/RPCGeometry/interface/RPCGeometry.h>
00019 #include <Geometry/RPCGeometry/interface/RPCGeomServ.h>
00020 #include <Geometry/CommonDetUnit/interface/GeomDet.h>
00021 #include <Geometry/Records/interface/MuonGeometryRecord.h>
00022 #include "FWCore/Framework/interface/ESHandle.h"
00023 
00024 #include <DataFormats/MuonDetId/interface/RPCDetId.h>
00025 #include "DQMServices/Core/interface/MonitorElement.h"
00026 
00027 #include "Geometry/RPCGeometry/interface/RPCGeomServ.h"
00028 
00029 #include<string>
00030 #include<fstream>
00031 #include "DQMOffline/Muon/interface/RPCEfficiencySecond.h"
00032 #include <DQMOffline/Muon/interface/RPCBookFolderStructure.h>
00033 
00034 #include "TH1F.h"
00035 
00036 RPCEfficiencySecond::RPCEfficiencySecond(const edm::ParameterSet& iConfig){
00037   SaveFile  = iConfig.getUntrackedParameter<bool>("SaveFile", false); 
00038   NameFile  = iConfig.getUntrackedParameter<std::string>("NameFile","RPCEfficiency.root"); 
00039   debug = iConfig.getUntrackedParameter<bool>("debug",false); 
00040   barrel = iConfig.getUntrackedParameter<bool>("barrel"); 
00041   endcap = iConfig.getUntrackedParameter<bool>("endcap"); 
00042 }
00043 
00044 RPCEfficiencySecond::~RPCEfficiencySecond(){}
00045 
00046 
00047 void RPCEfficiencySecond::beginJob(const edm::EventSetup&){
00048   
00049   dbe = edm::Service<DQMStore>().operator->();
00050 
00051   if(debug) std::cout<<"Booking Residuals Barrel"<<std::endl;
00052   dbe->setCurrentFolder("Muons/RPCEfficiency/ResidualsBarrel/");
00053  
00054   //Barrel
00055   
00056   hGlobal2ResClu1La1 = dbe->book1D("GlobalResidualsClu1La1","RPC Residuals Layer 1 Cluster Size 1",101,-10.,10.);
00057   hGlobal2ResClu1La2 = dbe->book1D("GlobalResidualsClu1La2","RPC Residuals Layer 2 Cluster Size 1",101,-10.,10.);
00058   hGlobal2ResClu1La3 = dbe->book1D("GlobalResidualsClu1La3","RPC Residuals Layer 3 Cluster Size 1",101,-10.,10.);
00059   hGlobal2ResClu1La4 = dbe->book1D("GlobalResidualsClu1La4","RPC Residuals Layer 4 Cluster Size 1",101,-10.,10.);
00060   hGlobal2ResClu1La5 = dbe->book1D("GlobalResidualsClu1La5","RPC Residuals Layer 5 Cluster Size 1",101,-10.,10.);
00061   hGlobal2ResClu1La6 = dbe->book1D("GlobalResidualsClu1La6","RPC Residuals Layer 6 Cluster Size 1",101,-10.,10.);
00062 
00063   hGlobal2ResClu2La1 = dbe->book1D("GlobalResidualsClu2La1","RPC Residuals Layer 1 Cluster Size 2",101,-10.,10.);
00064   hGlobal2ResClu2La2 = dbe->book1D("GlobalResidualsClu2La2","RPC Residuals Layer 2 Cluster Size 2",101,-10.,10.);
00065   hGlobal2ResClu2La3 = dbe->book1D("GlobalResidualsClu2La3","RPC Residuals Layer 3 Cluster Size 2",101,-10.,10.);
00066   hGlobal2ResClu2La4 = dbe->book1D("GlobalResidualsClu2La4","RPC Residuals Layer 4 Cluster Size 2",101,-10.,10.);
00067   hGlobal2ResClu2La5 = dbe->book1D("GlobalResidualsClu2La5","RPC Residuals Layer 5 Cluster Size 2",101,-10.,10.);
00068   hGlobal2ResClu2La6 = dbe->book1D("GlobalResidualsClu2La6","RPC Residuals Layer 6 Cluster Size 2",101,-10.,10.);
00069 
00070   hGlobal2ResClu3La1 = dbe->book1D("GlobalResidualsClu3La1","RPC Residuals Layer 1 Cluster Size 3",101,-10.,10.);
00071   hGlobal2ResClu3La2 = dbe->book1D("GlobalResidualsClu3La2","RPC Residuals Layer 2 Cluster Size 3",101,-10.,10.);
00072   hGlobal2ResClu3La3 = dbe->book1D("GlobalResidualsClu3La3","RPC Residuals Layer 3 Cluster Size 3",101,-10.,10.);
00073   hGlobal2ResClu3La4 = dbe->book1D("GlobalResidualsClu3La4","RPC Residuals Layer 4 Cluster Size 3",101,-10.,10.);
00074   hGlobal2ResClu3La5 = dbe->book1D("GlobalResidualsClu3La5","RPC Residuals Layer 5 Cluster Size 3",101,-10.,10.);
00075   hGlobal2ResClu3La6 = dbe->book1D("GlobalResidualsClu3La6","RPC Residuals Layer 6 Cluster Size 3",101,-10.,10.);
00076 
00077   if(debug) std::cout<<"Booking Residuals EndCaps"<<std::endl;
00078   dbe->setCurrentFolder("Muons/RPCEfficiency/ResidualsEndCaps/");
00079 
00080   //Endcap  
00081   hGlobal2ResClu1R3C = dbe->book1D("GlobalResidualsClu1R3C","RPC Residuals Ring 3 Roll C Cluster Size 1",101,-10.,10.);
00082   hGlobal2ResClu1R3B = dbe->book1D("GlobalResidualsClu1R3B","RPC Residuals Ring 3 Roll B Cluster Size 1",101,-10.,10.);
00083   hGlobal2ResClu1R3A = dbe->book1D("GlobalResidualsClu1R3A","RPC Residuals Ring 3 Roll A Cluster Size 1",101,-10.,10.);
00084   hGlobal2ResClu1R2C = dbe->book1D("GlobalResidualsClu1R2C","RPC Residuals Ring 2 Roll C Cluster Size 1",101,-10.,10.);
00085   hGlobal2ResClu1R2B = dbe->book1D("GlobalResidualsClu1R2B","RPC Residuals Ring 2 Roll B Cluster Size 1",101,-10.,10.);
00086   hGlobal2ResClu1R2A = dbe->book1D("GlobalResidualsClu1R2A","RPC Residuals Ring 2 Roll A Cluster Size 1",101,-10.,10.);
00087 
00088   hGlobal2ResClu2R3C = dbe->book1D("GlobalResidualsClu2R3C","RPC Residuals Ring 3 Roll C Cluster Size 2",101,-10.,10.);
00089   hGlobal2ResClu2R3B = dbe->book1D("GlobalResidualsClu2R3B","RPC Residuals Ring 3 Roll B Cluster Size 2",101,-10.,10.);
00090   hGlobal2ResClu2R3A = dbe->book1D("GlobalResidualsClu2R3A","RPC Residuals Ring 3 Roll A Cluster Size 2",101,-10.,10.);
00091   hGlobal2ResClu2R2C = dbe->book1D("GlobalResidualsClu2R2C","RPC Residuals Ring 2 Roll C Cluster Size 2",101,-10.,10.);
00092   hGlobal2ResClu2R2B = dbe->book1D("GlobalResidualsClu2R2B","RPC Residuals Ring 2 Roll B Cluster Size 2",101,-10.,10.);
00093   hGlobal2ResClu2R2A = dbe->book1D("GlobalResidualsClu2R2A","RPC Residuals Ring 2 Roll A Cluster Size 2",101,-10.,10.);
00094 
00095   hGlobal2ResClu3R3C = dbe->book1D("GlobalResidualsClu3R3C","RPC Residuals Ring 3 Roll C Cluster Size 3",101,-10.,10.);
00096   hGlobal2ResClu3R3B = dbe->book1D("GlobalResidualsClu3R3B","RPC Residuals Ring 3 Roll B Cluster Size 3",101,-10.,10.);
00097   hGlobal2ResClu3R3A = dbe->book1D("GlobalResidualsClu3R3A","RPC Residuals Ring 3 Roll A Cluster Size 3",101,-10.,10.);
00098   hGlobal2ResClu3R2C = dbe->book1D("GlobalResidualsClu3R2C","RPC Residuals Ring 2 Roll C Cluster Size 3",101,-10.,10.);
00099   hGlobal2ResClu3R2B = dbe->book1D("GlobalResidualsClu3R2B","RPC Residuals Ring 2 Roll B Cluster Size 3",101,-10.,10.);
00100   hGlobal2ResClu3R2A = dbe->book1D("GlobalResidualsClu3R2A","RPC Residuals Ring 2 Roll A Cluster Size 3",101,-10.,10.);
00101 
00102   if(debug) std::cout<<"Booking EffDistros"<<std::endl;
00103   dbe->setCurrentFolder("Muons/RPCEfficiency/");
00104 
00105   EffDistroWm2=dbe->book1D("EffDistroWheel_-2near","Efficiency Distribution for Near Side Wheel -2 ",20,0.5,100.5);
00106   EffDistroWm2far=dbe->book1D("EffDistroWheel_-2far","Efficiency Distribution for Far Side Wheel -2 ",20,0.5,100.5);
00107   EffDistroWm1=dbe->book1D("EffDistroWheel_-1near","Efficiency Distribution for Near Side Wheel -1 ",20,0.5,100.5);
00108   EffDistroWm1far=dbe->book1D("EffDistroWheel_-1far","Efficiency Distribution for Far Side Wheel -1 ",20,0.5,100.5);
00109   EffDistroW0=dbe->book1D("EffDistroWheel_0near","Efficiency Distribution for Near Side Wheel 0 ",20,0.5,100.5);
00110   EffDistroW0far=dbe->book1D("EffDistroWheel_0far","Efficiency Distribution for Far Side Wheel 0 ",20,0.5,100.5);
00111   EffDistroW1=dbe->book1D("EffDistroWheel_1near","Efficiency Distribution for Near Side Wheel 1 ",20,0.5,100.5);
00112   EffDistroW1far=dbe->book1D("EffDistroWheel_1far","Efficiency Distribution for Far Side Wheel 1 ",20,0.5,100.5);
00113   EffDistroW2=dbe->book1D("EffDistroWheel_2near","Efficiency Distribution for Near Side Wheel 2 ",20,0.5,100.5);
00114   EffDistroW2far=dbe->book1D("EffDistroWheel_2far","Efficiency Distribution for Far Side Wheel 2 ",20,0.5,100.5);
00115   EffDistroD3=dbe->book1D("EffDistroDisk_3near","Efficiency Distribution Near Side Disk 3 ",20,0.5,100.5);
00116   EffDistroD3far=dbe->book1D("EffDistroDisk_3far","Efficiency Distribution Far Side Disk 3 ",20,0.5,100.5);
00117   EffDistroD2=dbe->book1D("EffDistroDisk_2near","Efficiency Distribution Near Side Disk 2 ",20,0.5,100.5);
00118   EffDistroD2far=dbe->book1D("EffDistroDisk_2far","Efficiency Distribution Far Side Disk 2 ",20,0.5,100.5);
00119   EffDistroD1=dbe->book1D("EffDistroDisk_1near","Efficiency Distribution Near Side Disk 1 ",20,0.5,100.5);
00120   EffDistroD1far=dbe->book1D("EffDistroDisk_1far","Efficiency Distribution Far Side Disk 1 ",20,0.5,100.5);
00121   EffDistroDm1=dbe->book1D("EffDistroDisk_m1near","Efficiency Distribution Near Side Disk - 1 ",20,0.5,100.5);
00122   EffDistroDm1far=dbe->book1D("EffDistroDisk_m1far","Efficiency Distribution Far Side Disk - 1 ",20,0.5,100.5);
00123   EffDistroDm2=dbe->book1D("EffDistroDisk_m2near","Efficiency Distribution Near Side Disk - 2 ",20,0.5,100.5);
00124   EffDistroDm2far=dbe->book1D("EffDistroDisk_m2far","Efficiency Distribution Far Side Disk - 2 ",20,0.5,100.5);
00125   EffDistroDm3=dbe->book1D("EffDistroDisk_m3near","Efficiency Distribution Near Side Disk - 3 ",20,0.5,100.5);
00126   EffDistroDm3far=dbe->book1D("EffDistroDisk_m3far","Efficiency Distribution Far Side Disk - 3 ",20,0.5,100.5);
00127 
00128 
00129   if(debug) std::cout<<"Booking statistcs2"<<std::endl;
00130   dbe->setCurrentFolder("Muons/RPCEfficiency/");
00131   statistics2 = dbe->book1D("AllStatistics","Analyzed Events DT and CSC Segments",33,0.5,33.5);
00132  
00133   //Barrel 
00134  
00135   dbe->setCurrentFolder("Muons/RPCEfficiency/Wheel_-2");
00136   EffGlobWm2=dbe->book1D("GlobEfficiencyWheel_-2near","Efficiency Near Side Wheel -2 ",101,0.5,101.5);
00137   EffGlobWm2far=dbe->book1D("GlobEfficiencyWheel_-2far","Efficiency Far Side Wheel -2",105,0.5,105.5);
00138   BXGlobWm2= dbe->book1D("GlobBXWheel_-2near","BX Near Side Wheel -2",101,0.5,101.5);
00139   BXGlobWm2far= dbe->book1D("GlobBXWheel_-2far","BX Far Side Wheel -2",105,0.5,105.5);
00140   MaskedGlobWm2= dbe->book1D("GlobMaskedWheel_-2near","Masked Near Side Wheel -2",101,0.5,101.5);
00141   MaskedGlobWm2far= dbe->book1D("GlobMaskedWheel_-2far","Masked Far Side Wheel -2",105,0.5,105.5);
00142   AverageEffWm2=dbe->book1D("AverageEfficiencyWheel_-2near","Average Efficiency Near Side Wheel -2 ",101,0.5,101.5);
00143   AverageEffWm2far =dbe->book1D("AverageEfficiencyWheel_-2far","Average Efficiency Far Side Wheel -2 ",105,0.5,105.5);
00144   NoPredictionWm2=dbe->book1D("NoPredictionWheel_-2near","No Predictions Near Side Wheel -2 ",101,0.5,101.5);
00145   NoPredictionWm2far=dbe->book1D("NoPredictionWheel_-2far","No Predictions Efficiency Far Side Wheel -2 ",105,0.5,105.5);
00146   
00147   dbe->setCurrentFolder("Muons/RPCEfficiency/Wheel_-1");
00148   EffGlobWm1= dbe->book1D("GlobEfficiencyWheel_-1near","Efficiency Near Side Wheel -1",101,0.5,101.5);
00149   EffGlobWm1far=dbe->book1D("GlobEfficiencyWheel_-1far","Efficiency Far Side Wheel -1",105,0.5,105.5);
00150   BXGlobWm1= dbe->book1D("GlobBXWheel_-1near","BX Near Side Wheel -1",101,0.5,101.5);
00151   BXGlobWm1far= dbe->book1D("GlobBXWheel_-1far","BX Far Side Wheel -1",105,0.5,105.5);
00152   MaskedGlobWm1= dbe->book1D("GlobMaskedWheel_-1near","Masked Near Side Wheel -1",101,0.5,101.5);
00153   MaskedGlobWm1far= dbe->book1D("GlobMaskedWheel_-1far","Masked Far Side Wheel -1",105,0.5,105.5);
00154   AverageEffWm1=dbe->book1D("AverageEfficiencyWheel_-1near","Average Efficiency Near Side Wheel -1 ",101,0.5,101.5);
00155   AverageEffWm1far=dbe->book1D("AverageEfficiencyWheel_-1far","Average Efficiency Far Side Wheel -1 ",105,0.5,105.5);
00156   NoPredictionWm1=dbe->book1D("NoPredictionWheel_-1near","No Predictions Near Side Wheel -1 ",101,0.5,101.5);
00157   NoPredictionWm1far=dbe->book1D("NoPredictionWheel_-1far","No Predictions Efficiency Far Side Wheel -1 ",105,0.5,105.5);
00158 
00159   dbe->setCurrentFolder("Muons/RPCEfficiency/Wheel_0");
00160   EffGlobW0 = dbe->book1D("GlobEfficiencyWheel_0near","Efficiency Near Side Wheel 0",101,0.5,101.5);
00161   EffGlobW0far =dbe->book1D("GlobEfficiencyWheel_0far","Efficiency Far Side Wheel 0",105,0.5,105.5);
00162   BXGlobW0 = dbe->book1D("GlobBXWheel_0near","BX Near Side Wheel 0",101,0.5,101.5);
00163   BXGlobW0far = dbe->book1D("GlobBXWheel_0far","BX Far Side Wheel 0",105,0.5,105.5);
00164   MaskedGlobW0 = dbe->book1D("GlobMaskedWheel_0near","Masked Near Side Wheel 0",101,0.5,101.5);
00165   MaskedGlobW0far = dbe->book1D("GlobMaskedWheel_0far","Masked Far Side Wheel 0",105,0.5,105.5);
00166   AverageEffW0=dbe->book1D("AverageEfficiencyWheel_0near","Average Efficiency Near Side Wheel 0 ",101,0.5,101.5);
00167   AverageEffW0far=dbe->book1D("AverageEfficiencyWheel_0far","Average Efficiency Far Side Wheel 0 ",105,0.5,105.5);
00168   NoPredictionW0=dbe->book1D("NoPredictionWheel_0near","No Predictions Near Side Wheel 0 ",101,0.5,101.5);
00169   NoPredictionW0far=dbe->book1D("NoPredictionWheel_0far","No Predictions Efficiency Far Side Wheel 0 ",105,0.5,105.5);
00170 
00171   dbe->setCurrentFolder("Muons/RPCEfficiency/Wheel_1");
00172   EffGlobW1 = dbe->book1D("GlobEfficiencyWheel_1near","Efficiency Near Side Wheel 1",101,0.5,101.5);
00173   EffGlobW1far =dbe->book1D("GlobEfficiencyWheel_1far","Efficiency Far Side Wheel 1",105,0.5,105.5);  
00174   BXGlobW1 = dbe->book1D("GlobBXWheel_1near","BX Near Side Wheel 1",101,0.5,101.5);
00175   BXGlobW1far = dbe->book1D("GlobBXWheel_1far","BX Far Side Wheel 1",105,0.5,105.5);
00176   MaskedGlobW1 = dbe->book1D("GlobMaskedWheel_1near","Masked Near Side Wheel 1",101,0.5,101.5);
00177   MaskedGlobW1far = dbe->book1D("GlobMaskedWheel_1far","Masked Far Side Wheel 1",105,0.5,105.5);
00178   AverageEffW1=dbe->book1D("AverageEfficiencyWheel_1near","Average Efficiency Near Side Wheel 1 ",101,0.5,101.5);
00179   AverageEffW1far=dbe->book1D("AverageEfficiencyWheel_1far","Average Efficiency Far Side Wheel 1 ",105,0.5,105.5);
00180   NoPredictionW1=dbe->book1D("NoPredictionWheel_1near","No Predictions Near Side Wheel 1 ",101,0.5,101.5);
00181   NoPredictionW1far=dbe->book1D("NoPredictionWheel_1far","No Predictions Efficiency Far Side Wheel 1 ",105,0.5,105.5);
00182 
00183   dbe->setCurrentFolder("Muons/RPCEfficiency/Wheel_2");
00184   EffGlobW2 = dbe->book1D("GlobEfficiencyWheel_2near","Efficiency Near Side Wheel 2",101,0.5,101.5);
00185   EffGlobW2far =dbe->book1D("GlobEfficiencyWheel_2far","Efficiency Far Side Wheel 2",105,0.5,105.5);
00186   BXGlobW2 = dbe->book1D("GlobBXWheel_2near","BX Near Side Wheel 2",101,0.5,101.5);
00187   BXGlobW2far = dbe->book1D("GlobBXWheel_2far","BX Far Side Wheel 2",105,0.5,105.5);
00188   MaskedGlobW2 = dbe->book1D("GlobMaskedWheel_2near","Masked Near Side Wheel 2",101,0.5,101.5);
00189   MaskedGlobW2far = dbe->book1D("GlobMaskedWheel_2far","Masked Far Side Wheel 2",105,0.5,105.5);
00190   AverageEffW2=dbe->book1D("AverageEfficiencyWheel_2near","Average Efficiency Near Side Wheel 2 ",101,0.5,101.5);
00191   AverageEffW2far=dbe->book1D("AverageEfficiencyWheel_2far","Average Efficiency Far Side Wheel 2 ",105,0.5,105.5);
00192   NoPredictionW2=dbe->book1D("NoPredictionWheel_2near","No Predictions Near Side Wheel 2 ",101,0.5,101.5);
00193   NoPredictionW2far=dbe->book1D("NoPredictionWheel_2far","No Predictions Efficiency Far Side Wheel 2 ",105,0.5,105.5);
00194 
00195   //EndCap
00196 
00197   dbe->setCurrentFolder("Muons/RPCEfficiency/Disk_3");
00198   EffGlobD3 = dbe->book1D("GlobEfficiencyDisk_3near","Efficiency Near Side Disk 3",109,0.5,109.5);
00199   EffGlobD3far =dbe->book1D("GlobEfficiencyDisk_3far","Efficiency Far Side Disk 3",109,0.5,109.5);
00200   BXGlobD3 = dbe->book1D("GlobBXDisk_3near","BX Near Side Disk 3",109,0.5,109.5);
00201   BXGlobD3far = dbe->book1D("GlobBXDisk_3far","BX Far Side Disk 3",109,0.5,109.5);
00202   MaskedGlobD3 = dbe->book1D("GlobMaskedDisk_3near","Masked Near Side Disk 3",109,0.5,109.5);
00203   MaskedGlobD3far = dbe->book1D("GlobMaskedDisk_3far","Masked Far Side Disk 3",109,0.5,109.5);
00204   AverageEffD3=dbe->book1D("AverageEfficiencyDisk_3near","Average Efficiency Near Side Disk 3 ",109,0.5,109.5);
00205   AverageEffD3far=dbe->book1D("AverageEfficiencyDisk_3far","Average Efficiency Far Side Disk 3 ",109,0.5,109.5);
00206   NoPredictionD3=dbe->book1D("NoPredictionDisk_3near","No Predictions Near Side Disk 3 ",109,0.5,109.5);
00207   NoPredictionD3far=dbe->book1D("NoPredictionDisk_3far","No Predictions Efficiency Far Side Disk 3 ",109,0.5,109.5);
00208 
00209   dbe->setCurrentFolder("Muons/RPCEfficiency/Disk_2");
00210   EffGlobD2 = dbe->book1D("GlobEfficiencyDisk_2near","Efficiency Near Side Disk 2",109,0.5,109.5);
00211   EffGlobD2far =dbe->book1D("GlobEfficiencyDisk_2far","Efficiency Far Side Disk 2",109,0.5,109.5);
00212   BXGlobD2 = dbe->book1D("GlobBXDisk_2near","BX Near Side Disk 2",109,0.5,109.5);
00213   BXGlobD2far = dbe->book1D("GlobBXDisk_2far","BX Far Side Disk 2",109,0.5,109.5);
00214   MaskedGlobD2 = dbe->book1D("GlobMaskedDisk_2near","Masked Near Side Disk 2",109,0.5,109.5);
00215   MaskedGlobD2far = dbe->book1D("GlobMaskedDisk_2far","Masked Far Side Disk 2",109,0.5,109.5);
00216   AverageEffD2=dbe->book1D("AverageEfficiencyDisk_2near","Average Efficiency Near Side Disk 2 ",109,0.5,109.5);
00217   AverageEffD2far=dbe->book1D("AverageEfficiencyDisk_2far","Average Efficiency Far Side Disk 2 ",109,0.5,109.5);
00218   NoPredictionD2=dbe->book1D("NoPredictionDisk_2near","No Predictions Near Side Disk 2 ",109,0.5,109.5);
00219   NoPredictionD2far=dbe->book1D("NoPredictionDisk_2far","No Predictions Efficiency Far Side Disk 2 ",109,0.5,109.5);
00220 
00221   dbe->setCurrentFolder("Muons/RPCEfficiency/Disk_1");
00222   EffGlobD1 = dbe->book1D("GlobEfficiencyDisk_1near","Efficiency Near Side Disk 1",109,0.5,109.5);
00223   EffGlobD1far =dbe->book1D("GlobEfficiencyDisk_1far","Efficiency Far Side Disk 1",109,0.5,109.5);
00224   BXGlobD1 = dbe->book1D("GlobBXDisk_1near","BX Near Side Disk 1",109,0.5,109.5);
00225   BXGlobD1far = dbe->book1D("GlobBXDisk_1far","BX Far Side Disk 1",109,0.5,109.5);
00226   MaskedGlobD1 = dbe->book1D("GlobMaskedDisk_1near","Masked Near Side Disk 1",109,0.5,109.5);
00227   MaskedGlobD1far = dbe->book1D("GlobMaskedDisk_1far","Masked Far Side Disk 1",109,0.5,109.5);
00228   AverageEffD1=dbe->book1D("AverageEfficiencyDisk_1near","Average Efficiency Near Side Disk 1 ",109,0.5,109.5);
00229   AverageEffD1far=dbe->book1D("AverageEfficiencyDisk_1far","Average Efficiency Far Side Disk 1 ",109,0.5,109.5);
00230   NoPredictionD1=dbe->book1D("NoPredictionDisk_1near","No Predictions Near Side Disk 1 ",109,0.5,109.5);
00231   NoPredictionD1far=dbe->book1D("NoPredictionDisk_1far","No Predictions Efficiency Far Side Disk 1 ",109,0.5,109.5);
00232 
00233   dbe->setCurrentFolder("Muons/RPCEfficiency/Disk_-1");
00234   EffGlobDm1 = dbe->book1D("GlobEfficiencyDisk_m1near","Efficiency Near Side Disk -1",109,0.5,109.5);
00235   EffGlobDm1far =dbe->book1D("GlobEfficiencyDisk_m1far","Efficiency Far Side Disk -1",109,0.5,109.5);
00236   BXGlobDm1 = dbe->book1D("GlobBXDisk_m1near","BX Near Side Disk -1",109,0.5,109.5);
00237   BXGlobDm1far = dbe->book1D("GlobBXDisk_m1far","BX Far Side Disk -1",109,0.5,109.5);
00238   MaskedGlobDm1 = dbe->book1D("GlobMaskedDisk_m1near","Masked Near Side Disk -1",109,0.5,109.5);
00239   MaskedGlobDm1far = dbe->book1D("GlobMaskedDisk_m1far","Masked Far Side Disk -1",109,0.5,109.5);
00240   AverageEffDm1=dbe->book1D("AverageEfficiencyDisk_m1near","Average Efficiency Near Side Disk -1 ",109,0.5,109.5);
00241   AverageEffDm1far=dbe->book1D("AverageEfficiencyDisk_m1far","Average Efficiency Far Side Disk -1 ",109,0.5,109.5);
00242   NoPredictionDm1=dbe->book1D("NoPredictionDisk_m1near","No Predictions Near Side Disk -1 ",109,0.5,109.5);
00243   NoPredictionDm1far=dbe->book1D("NoPredictionDisk_m1far","No Predictions Efficiency Far Side Disk -1 ",109,0.5,109.5);
00244 
00245   dbe->setCurrentFolder("Muons/RPCEfficiency/Disk_-2");
00246   EffGlobDm2 = dbe->book1D("GlobEfficiencyDisk_m2near","Efficiency Near Side Disk -2",109,0.5,109.5);
00247   EffGlobDm2far =dbe->book1D("GlobEfficiencyDisk_m2far","Efficiency Far Side Disk -2",109,0.5,109.5);
00248   BXGlobDm2 = dbe->book1D("GlobBXDisk_m2near","BX Near Side Disk -2",109,0.5,109.5);
00249   BXGlobDm2far = dbe->book1D("GlobBXDisk_m2far","BX Far Side Disk -2",109,0.5,109.5);
00250   MaskedGlobDm2 = dbe->book1D("GlobMaskedDisk_m2near","Masked Near Side Disk -2",109,0.5,109.5);
00251   MaskedGlobDm2far = dbe->book1D("GlobMaskedDisk_m2far","Masked Far Side Disk -2",109,0.5,109.5);
00252   AverageEffDm2=dbe->book1D("AverageEfficiencyDisk_m2near","Average Efficiency Near Side Disk -2 ",109,0.5,109.5);
00253   AverageEffDm2far=dbe->book1D("AverageEfficiencyDisk_m2far","Average Efficiency Far Side Disk -2 ",109,0.5,109.5);
00254   NoPredictionDm2=dbe->book1D("NoPredictionDisk_m2near","No Predictions Near Side Disk -2 ",109,0.5,109.5);
00255   NoPredictionDm2far=dbe->book1D("NoPredictionDisk_m2far","No Predictions Efficiency Far Side Disk -2 ",109,0.5,109.5);
00256 
00257   dbe->setCurrentFolder("Muons/RPCEfficiency/Disk_-3");
00258   EffGlobDm3 = dbe->book1D("GlobEfficiencyDisk_m3near","Efficiency Near Side Disk -3",109,0.5,109.5);
00259   EffGlobDm3far =dbe->book1D("GlobEfficiencyDisk_m3far","Efficiency Far Side Disk -3",109,0.5,109.5);
00260   BXGlobDm3 = dbe->book1D("GlobBXDisk_m3near","BX Near Side Disk -3",109,0.5,109.5);
00261   BXGlobDm3far = dbe->book1D("GlobBXDisk_m3far","BX Far Side Disk -3",109,0.5,109.5);
00262   MaskedGlobDm3 = dbe->book1D("GlobMaskedDisk_m3near","Masked Near Side Disk -3",109,0.5,109.5);
00263   MaskedGlobDm3far = dbe->book1D("GlobMaskedDisk_m3far","Masked Far Side Disk -3",109,0.5,109.5);
00264   AverageEffDm3=dbe->book1D("AverageEfficiencyDisk_m3near","Average Efficiency Near Side Disk -3 ",109,0.5,109.5);
00265   AverageEffDm3far=dbe->book1D("AverageEfficiencyDisk_m3far","Average Efficiency Far Side Disk -3 ",109,0.5,109.5);
00266   NoPredictionDm3=dbe->book1D("NoPredictionDisk_m3near","No Predictions Near Side Disk -3 ",109,0.5,109.5);
00267   NoPredictionDm3far=dbe->book1D("NoPredictionDisk_m3far","No Predictions Efficiency Far Side Disk -3 ",109,0.5,109.5);
00268 }
00269 
00270 void RPCEfficiencySecond::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup){ }
00271 
00272 void RPCEfficiencySecond::endRun(const edm::Run& r, const edm::EventSetup& iSetup){
00273 
00274   if(debug) std::cout <<"\t Getting the RPC Geometry"<<std::endl;
00275   edm::ESHandle<RPCGeometry> rpcGeo;
00276   iSetup.get<MuonGeometryRecord>().get(rpcGeo);
00277   
00278   std::string label,folder;
00279   folder = "Muons/MuonSegEff/";
00280   label = folder + "Statistics";
00281   if(debug) std::cout<<"Getting statistcs="<<label<<std::endl;
00282   statistics = dbe->get(label);
00283   if(!statistics){
00284     std::cout<<"Statistics Doesn't exist Not access to a monitor element"<<std::endl;
00285     edm::LogWarning("Missing rpcSource") << " Statistics Doesn't exist.";
00286     return;
00287   }
00288   if(debug) std::cout<<"Cloning statistcs"<<std::endl;
00289   for(int i=1;i<=33;i++){
00290     if(debug) std::cout<<statistics->getBinContent(i)<<std::endl;
00291     statistics2->setBinContent(i,statistics->getBinContent(i));
00292   }
00293   
00294   statistics2->setBinLabel(1,"Events ",1);
00295   statistics2->setBinLabel(2,"Events with DT seg",1);
00296   statistics2->setBinLabel(3,"1 DT seg",1);
00297   statistics2->setBinLabel(4,"2 DT seg",1);
00298   statistics2->setBinLabel(5,"3 DT seg",1);
00299   statistics2->setBinLabel(6,"4 DT seg",1);
00300   statistics2->setBinLabel(7,"5 DT seg",1);
00301   statistics2->setBinLabel(8,"6 DT seg",1);
00302   statistics2->setBinLabel(9,"7 DT seg",1);
00303   statistics2->setBinLabel(10,"8 DT seg",1);
00304   statistics2->setBinLabel(11,"9 DT seg",1);
00305   statistics2->setBinLabel(12,"10 DT seg",1);
00306   statistics2->setBinLabel(13,"11 DT seg",1);
00307   statistics2->setBinLabel(14,"12 DT seg",1);
00308   statistics2->setBinLabel(15,"13 DT seg",1);
00309   statistics2->setBinLabel(16,"14 DT seg",1);
00310   statistics2->setBinLabel(17,"15 DT seg",1);
00311   statistics2->setBinLabel(18,"Events with CSC seg",1);
00312   statistics2->setBinLabel(16+3,"1 CSC seg",1);
00313   statistics2->setBinLabel(16+4,"2 CSC seg",1);
00314   statistics2->setBinLabel(16+5,"3 CSC seg",1);
00315   statistics2->setBinLabel(16+6,"4 CSC seg",1);
00316   statistics2->setBinLabel(16+7,"5 CSC seg",1);
00317   statistics2->setBinLabel(16+8,"6 CSC seg",1);
00318   statistics2->setBinLabel(16+9,"7 CSC seg",1);
00319   statistics2->setBinLabel(16+10,"8 CSC seg",1);
00320   statistics2->setBinLabel(16+11,"9 CSC seg",1);
00321   statistics2->setBinLabel(16+12,"10 CSC seg",1);
00322   statistics2->setBinLabel(16+13,"11 CSC seg",1);
00323   statistics2->setBinLabel(16+14,"12 CSC seg",1);
00324   statistics2->setBinLabel(16+15,"13 CSC seg",1);
00325   statistics2->setBinLabel(16+16,"14 CSC seg",1);
00326   statistics2->setBinLabel(16+17,"15 CSC seg",1);
00327   
00328   //Cloning Residuals.
00329 
00330   folder = "Muons/MuonSegEff/Residuals/Barrel/";
00331   
00332   label = folder + "GlobalResidualsClu1La1"; hGlobalResClu1La1 = dbe->get(label);
00333   label = folder + "GlobalResidualsClu1La2"; hGlobalResClu1La2 = dbe->get(label);
00334   label = folder + "GlobalResidualsClu1La3"; hGlobalResClu1La3 = dbe->get(label);
00335   label = folder + "GlobalResidualsClu1La4"; hGlobalResClu1La4 = dbe->get(label);
00336   label = folder + "GlobalResidualsClu1La5"; hGlobalResClu1La5 = dbe->get(label);
00337   label = folder + "GlobalResidualsClu1La6"; hGlobalResClu1La6 = dbe->get(label);
00338 
00339   label = folder + "GlobalResidualsClu2La1"; hGlobalResClu2La1 = dbe->get(label);
00340   label = folder + "GlobalResidualsClu2La2"; hGlobalResClu2La2 = dbe->get(label);
00341   label = folder + "GlobalResidualsClu2La3"; hGlobalResClu2La3 = dbe->get(label);
00342   label = folder + "GlobalResidualsClu2La4"; hGlobalResClu2La4 = dbe->get(label);
00343   label = folder + "GlobalResidualsClu2La5"; hGlobalResClu2La5 = dbe->get(label);
00344   label = folder + "GlobalResidualsClu2La6"; hGlobalResClu2La6 = dbe->get(label);
00345 
00346   label = folder + "GlobalResidualsClu3La1"; hGlobalResClu3La1 = dbe->get(label);
00347   label = folder + "GlobalResidualsClu3La2"; hGlobalResClu3La2 = dbe->get(label);
00348   label = folder + "GlobalResidualsClu3La3"; hGlobalResClu3La3 = dbe->get(label);
00349   label = folder + "GlobalResidualsClu3La4"; hGlobalResClu3La4 = dbe->get(label);
00350   label = folder + "GlobalResidualsClu3La5"; hGlobalResClu3La5 = dbe->get(label);
00351   label = folder + "GlobalResidualsClu3La6"; hGlobalResClu3La6 = dbe->get(label);
00352  
00353   if(debug) std::cout<<"Clonning for Barrel"<<std::endl;
00354   
00355   for(int i=1;i<=101;i++){
00356     if(debug) std::cout<<"Global Residual"<<hGlobalResClu1La1->getBinContent(i)<<std::endl;
00357     hGlobal2ResClu1La1->setBinContent(i,hGlobalResClu1La1->getBinContent(i));
00358     hGlobal2ResClu1La2->setBinContent(i,hGlobalResClu1La2->getBinContent(i));
00359     hGlobal2ResClu1La3->setBinContent(i,hGlobalResClu1La3->getBinContent(i));
00360     hGlobal2ResClu1La4->setBinContent(i,hGlobalResClu1La4->getBinContent(i));
00361     hGlobal2ResClu1La5->setBinContent(i,hGlobalResClu1La5->getBinContent(i));
00362     hGlobal2ResClu1La6->setBinContent(i,hGlobalResClu1La6->getBinContent(i));
00363 
00364     hGlobal2ResClu2La1->setBinContent(i,hGlobalResClu2La1->getBinContent(i));
00365     hGlobal2ResClu2La2->setBinContent(i,hGlobalResClu2La2->getBinContent(i));
00366     hGlobal2ResClu2La3->setBinContent(i,hGlobalResClu2La3->getBinContent(i));
00367     hGlobal2ResClu2La4->setBinContent(i,hGlobalResClu2La4->getBinContent(i));
00368     hGlobal2ResClu2La5->setBinContent(i,hGlobalResClu2La5->getBinContent(i));
00369     hGlobal2ResClu2La6->setBinContent(i,hGlobalResClu2La6->getBinContent(i));
00370 
00371     hGlobal2ResClu3La1->setBinContent(i,hGlobalResClu3La1->getBinContent(i));
00372     hGlobal2ResClu3La2->setBinContent(i,hGlobalResClu3La2->getBinContent(i));
00373     hGlobal2ResClu3La3->setBinContent(i,hGlobalResClu3La3->getBinContent(i));
00374     hGlobal2ResClu3La4->setBinContent(i,hGlobalResClu3La4->getBinContent(i));
00375     hGlobal2ResClu3La5->setBinContent(i,hGlobalResClu3La5->getBinContent(i));
00376     hGlobal2ResClu3La6->setBinContent(i,hGlobalResClu3La6->getBinContent(i));
00377   }
00378 
00379   if(debug) std::cout<<"Clonning the EndCap"<<std::endl;
00380   folder = "Muons/MuonSegEff/Residuals/EndCap/";
00381 
00382   label = folder + "GlobalResidualsClu1R3C"; hGlobalResClu1R3C = dbe->get(label); 
00383   label = folder + "GlobalResidualsClu1R3B"; hGlobalResClu1R3B = dbe->get(label); 
00384   label = folder + "GlobalResidualsClu1R3A"; hGlobalResClu1R3A = dbe->get(label);
00385   label = folder + "GlobalResidualsClu1R2C"; hGlobalResClu1R2C = dbe->get(label);
00386   label = folder + "GlobalResidualsClu1R2B"; hGlobalResClu1R2B = dbe->get(label);
00387   label = folder + "GlobalResidualsClu1R2A"; hGlobalResClu1R2A = dbe->get(label);
00388 
00389   label = folder + "GlobalResidualsClu2R3C"; hGlobalResClu2R3C = dbe->get(label);
00390   label = folder + "GlobalResidualsClu2R3B"; hGlobalResClu2R3B = dbe->get(label);
00391   label = folder + "GlobalResidualsClu2R3A"; hGlobalResClu2R3A = dbe->get(label);
00392   label = folder + "GlobalResidualsClu2R2C"; hGlobalResClu2R2C = dbe->get(label);
00393   label = folder + "GlobalResidualsClu2R2B"; hGlobalResClu2R2B = dbe->get(label);
00394   label = folder + "GlobalResidualsClu2R2A"; hGlobalResClu2R2A = dbe->get(label);
00395 
00396   label = folder + "GlobalResidualsClu3R3C"; hGlobalResClu3R3C = dbe->get(label);
00397   label = folder + "GlobalResidualsClu3R3B"; hGlobalResClu3R3B = dbe->get(label);
00398   label = folder + "GlobalResidualsClu3R3A"; hGlobalResClu3R3A = dbe->get(label);
00399   label = folder + "GlobalResidualsClu3R2C"; hGlobalResClu3R2C = dbe->get(label);
00400   label = folder + "GlobalResidualsClu3R2B"; hGlobalResClu3R2B = dbe->get(label);
00401   label = folder + "GlobalResidualsClu3R2A"; hGlobalResClu3R2A = dbe->get(label);
00402 
00403 
00404   if(debug) std::cout<<"Goinf for!"<<std::endl;
00405   for(int i=1;i<=101;i++){
00406     hGlobal2ResClu1R3C->setBinContent(i,hGlobalResClu1R3C->getBinContent(i));
00407     hGlobal2ResClu1R3B->setBinContent(i,hGlobalResClu1R3B->getBinContent(i));
00408     hGlobal2ResClu1R3A->setBinContent(i,hGlobalResClu1R3A->getBinContent(i));
00409     hGlobal2ResClu1R2C->setBinContent(i,hGlobalResClu1R2C->getBinContent(i));
00410     hGlobal2ResClu1R2B->setBinContent(i,hGlobalResClu1R2B->getBinContent(i));
00411     hGlobal2ResClu1R2A->setBinContent(i,hGlobalResClu1R2A->getBinContent(i));
00412 
00413     hGlobal2ResClu2R3C->setBinContent(i,hGlobalResClu2R3C->getBinContent(i));
00414     hGlobal2ResClu2R3B->setBinContent(i,hGlobalResClu2R3B->getBinContent(i));
00415     hGlobal2ResClu2R3A->setBinContent(i,hGlobalResClu2R3A->getBinContent(i));
00416     hGlobal2ResClu2R2C->setBinContent(i,hGlobalResClu2R2C->getBinContent(i));
00417     hGlobal2ResClu2R2B->setBinContent(i,hGlobalResClu2R2B->getBinContent(i));
00418     hGlobal2ResClu2R2A->setBinContent(i,hGlobalResClu2R2A->getBinContent(i));
00419 
00420     hGlobal2ResClu3R3C->setBinContent(i,hGlobalResClu3R3C->getBinContent(i));
00421     hGlobal2ResClu3R3B->setBinContent(i,hGlobalResClu3R3B->getBinContent(i));
00422     hGlobal2ResClu3R3A->setBinContent(i,hGlobalResClu3R3A->getBinContent(i));
00423     hGlobal2ResClu3R2C->setBinContent(i,hGlobalResClu3R2C->getBinContent(i));
00424     hGlobal2ResClu3R2B->setBinContent(i,hGlobalResClu3R2B->getBinContent(i));
00425     hGlobal2ResClu3R2A->setBinContent(i,hGlobalResClu3R2A->getBinContent(i));
00426 
00427   }
00428 
00429   int indexWheel[5];
00430   for(int j=0;j<5;j++){
00431     indexWheel[j]=0;
00432   }
00433   
00434   int indexWheelf[5];
00435   for(int j=0;j<5;j++){
00436     indexWheelf[j]=0;
00437   }
00438 
00439   int indexDisk[6];
00440   for(int j=0;j<6;j++){
00441     indexDisk[j]=0;
00442   }
00443   
00444   int indexDiskf[6];
00445   for(int j=0;j<6;j++){
00446     indexDiskf[j]=0;
00447   }
00448 
00449   for(TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){
00450     if(dynamic_cast< RPCChamber* >( *it ) != 0 ){
00451       RPCChamber* ch = dynamic_cast< RPCChamber* >( *it ); 
00452       std::vector< const RPCRoll*> roles = (ch->rolls());
00453       for(std::vector<const RPCRoll*>::const_iterator r = roles.begin();r != roles.end(); ++r){
00454 
00455         RPCDetId rpcId = (*r)->id();
00456         RPCGeomServ rpcsrv(rpcId);
00457         std::string nameRoll = rpcsrv.name();
00458         if(debug) std::cout<<"Booking for "<<nameRoll<<std::endl;
00459         meCollection[nameRoll] = bookDetUnitSeg(rpcId,(*r)->nstrips());
00460       }
00461     }
00462   }
00463 
00464   //if(debug) dbe->showDirStructure();
00465 
00466   for(TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){
00467     if(dynamic_cast< RPCChamber* >( *it ) != 0 ){
00468       RPCChamber* ch = dynamic_cast< RPCChamber* >( *it ); 
00469       std::vector< const RPCRoll*> roles = (ch->rolls());
00470       for(std::vector<const RPCRoll*>::const_iterator r = roles.begin();r != roles.end(); ++r){
00471 
00472         RPCDetId rpcId = (*r)->id();
00473         RPCGeomServ rpcsrv(rpcId);
00474         int sector = rpcId.sector();    
00475 
00476         std::string nameRoll = rpcsrv.name();
00477 
00478         std::map<std::string, MonitorElement*> meMap=meCollection[nameRoll];
00479 
00480         if(debug){
00481           std::map<std::string, MonitorElement*>::const_iterator it;
00482           for (it = meMap.begin(); it != meMap.end(); ++it){
00483             std::cout<<"Histo name:" <<it->first<<std::endl;
00484           }
00485         }
00486         
00487         if(meCollection.find(nameRoll)==meCollection.end()){
00488           std::cout<<"Empty collection map"<<std::endl;
00489         }
00490 
00491         if(debug){
00492           std::cout<<rpcId<<std::endl;
00493           //printing indexes
00494           std::cout<<"indexWheel=";
00495           for(int j=0;j<5;j++){
00496             std::cout<<indexWheel[j]<<" ";
00497           }
00498           std::cout<<std::endl;
00499           std::cout<<"indexWheelf=";
00500           for(int j=0;j<5;j++){
00501             std::cout<<indexWheelf[j]<<" ";
00502           }
00503           std::cout<<std::endl;
00504           std::cout<<"indexDisk=";
00505           for(int j=0;j<6;j++){
00506             std::cout<<indexDisk[j]<<" ";
00507           }
00508           std::cout<<std::endl;
00509           std::cout<<"indexDiskf=";
00510           for(int j=0;j<6;j++){
00511             std::cout<<indexDiskf[j]<<" ";
00512           }
00513           std::cout<<std::endl;
00514         }
00515         
00516         if(rpcId.region()==0){
00517           std::string detUnitLabel, meIdRPC,  meIdDT,  bxDistroId, meIdRealRPC;
00518           std::string      meIdPRO, meIdRPC2, meIdDT2, bxDistroId2,meIdRealRPC2;
00519           
00520           RPCBookFolderStructure *  folderStr = new RPCBookFolderStructure();
00521           
00522           if(debug) std::cout<<"Setting the folder "<<std::endl;
00523 
00524           std::string folder = "Muons/MuonSegEff/" +  folderStr->folderStructure(rpcId);
00525           meIdRPC = folder +"/RPCDataOccupancyFromDT_" + rpcsrv.name(); 
00526           meIdDT  = folder +"/ExpectedOccupancyFromDT_"+ rpcsrv.name();
00527           bxDistroId =folder+"/BXDistribution_"+ rpcsrv.name();
00528           meIdRealRPC =folder+"/RealDetectedOccupancyFromDT_"+ rpcsrv.name();
00529           
00530           std::string folder2 = "Muons/RPCEfficiency/RollByRoll/" +  folderStr->folderStructure(rpcId); 
00531 
00532           delete folderStr;
00533 
00534           meIdRPC2 = "RPCDataOccupancyFromDT_" + rpcsrv.name(); 
00535           meIdDT2 =  "ExpectedOccupancyFromDT_"+ rpcsrv.name();
00536           bxDistroId2 = "BXDistribution_"+ rpcsrv.name();
00537           meIdRealRPC2 = "RealDetectedOccupancyFromDT_"+ rpcsrv.name();
00538           meIdPRO = "Profile_"+ rpcsrv.name();
00539           
00540           histoRPC= dbe->get(meIdRPC);
00541           histoDT= dbe->get(meIdDT);
00542           histoPRO=dbe->get(meIdPRO);
00543           BXDistribution = dbe->get(bxDistroId);
00544           histoRealRPC = dbe->get(meIdRealRPC);
00545 
00546           int NumberMasked=0;
00547           int NumberWithOutPrediction=0;
00548           double p = 0.;
00549           double o = 0.;
00550           float mybxhisto = 0.;
00551           float mybxerror = 0.;
00552           float ef = 0.;
00553           float er = 0.;
00554           float buffef = 0.;
00555           float buffer = 0.;
00556           float sumbuffef = 0.;
00557           float sumbuffer = 0.;
00558           float averageeff = 0.;
00559           float averageerr = 0.;
00560           int NumberStripsPointed = 0;
00561           
00562           if(debug) std::cout<<"Cloning BX"<<std::endl;
00563           for(int i=1;i<=11;i++){
00564             meMap[bxDistroId2]->setBinContent(i,BXDistribution->getBinContent(i));
00565           }
00566           
00567           if(histoRPC && histoDT && BXDistribution && histoRealRPC){
00568             if(debug) std::cout <<rpcsrv.name()<<std::endl;
00569             
00570             for(int i=1;i<=int((*r)->nstrips());++i){
00571               
00572               if(debug) std::cout<<"Cloning histoDT "<<meIdDT2<<std::endl;
00573               meMap[meIdDT2]->setBinContent(i,histoDT->getBinContent(i));
00574               if(debug) std::cout<<"Cloning histoRPC:"<<meIdRPC2<<std::endl;
00575               meMap[meIdRPC2]->setBinContent(i,histoRPC->getBinContent(i));
00576               if(debug) std::cout<<"Cloning Real RPC "<<meIdRealRPC2<<std::endl;
00577               meMap[meIdRealRPC2]->setBinContent(i,histoRealRPC->getBinContent(i));//clon
00578               
00579               if(meMap.find(meIdPRO)==meMap.end()){
00580                 std::cout<<"Empty Map"<<std::endl;
00581               }
00582 
00583               if(histoRealRPC->getBinContent(i)!=0){//loop on the strips
00584                 if(histoDT->getBinContent(i)!=0){
00585                   if(debug) std::cout<<"Inside the If"<<std::endl;
00586                   buffef = float(histoRPC->getBinContent(i))/float(histoDT->getBinContent(i));
00587                   if(debug) std::cout<<"Setting profile "<<meIdPRO<<std::endl;
00588                   meMap[meIdPRO]->setBinContent(i,buffef); 
00589                   buffer = sqrt(buffef*(1.-buffef)/float(histoDT->getBinContent(i)));
00590                   meMap[meIdPRO]->setBinError(i,buffer);
00591                   sumbuffef=sumbuffef+buffef;
00592                   sumbuffer = sumbuffer + buffer*buffer;
00593                   NumberStripsPointed++;
00594                   if(debug) std::cout<<"After the If"<<std::endl;
00595                 }else{
00596                   NumberWithOutPrediction++;
00597                 }
00598               }else{
00599                 NumberMasked++;
00600               }
00601               if(debug) std::cout<<"\t Strip="<<i<<" RealRPC="<<histoRealRPC->getBinContent(i)<<" RPC="<<histoRPC->getBinContent(i)<<" DT="<<histoDT->getBinContent(i)<<" buffef="<<buffef<<" buffer="<<buffer<<" sumbuffef="<<sumbuffef<<" sumbuffer="<<sumbuffer<<" NumberStripsPointed="<<NumberStripsPointed<<" NumberWithOutPrediction"<<NumberWithOutPrediction<<" Number Masked="<<NumberMasked<<std::endl;
00602             }
00603             
00604             p=histoDT->getTH1F()->Integral();
00605             o=histoRPC->getTH1F()->Integral();
00606             
00607             if(NumberStripsPointed!=0){
00608               averageeff = (sumbuffef/float(NumberStripsPointed))*100.;
00609               averageerr = sqrt(sumbuffer/float(NumberStripsPointed))*100.;
00610             }
00611             
00612             mybxhisto = 50.+BXDistribution->getMean()*10;
00613             mybxerror = BXDistribution->getRMS()*10;
00614             
00615           }
00616           
00617           int Ring = rpcId.ring();
00618           
00619           if(p!=0){
00620             ef = float(o)/float(p); 
00621             er = sqrt(ef*(1.-ef)/float(p));
00622           }
00623             
00624           ef=ef*100;
00625           er=er*100;
00626             
00627           std::string camera = rpcsrv.name();
00628             
00629           float maskedratio = (float(NumberMasked)/float((*r)->nstrips()))*100.;
00630           float nopredictionsratio = (float(NumberWithOutPrediction)/float((*r)->nstrips()))*100.;
00631           
00632           /*std::cout<<"p="<<p<<" o="<<o<<std::endl;
00633           std::cout<<"ef="<<ef<<" +/- er="<<er<<std::endl;
00634           std::cout<<"averageeff="<<averageeff<<" +/- averageerr="<<averageerr<<std::endl;
00635           std::cout<<"maskedratio="<<maskedratio<<std::endl;
00636           std::cout<<"nopredictionsratio="<<nopredictionsratio<<std::endl;
00637           */
00638           //Near Side
00639 
00640           if((sector==1||sector==2||sector==3||sector==10||sector==11||sector==12)){
00641             if(Ring==-2){
00642               EffDistroWm2->Fill(ef);
00643               indexWheel[0]++;  
00644               EffGlobWm2->setBinContent(indexWheel[0],ef);  
00645               EffGlobWm2->setBinError(indexWheel[0],er);  
00646               EffGlobWm2->setBinLabel(indexWheel[0],camera,1);
00647 
00648               BXGlobWm2->setBinContent(indexWheel[0],mybxhisto);  
00649               BXGlobWm2->setBinError(indexWheel[0],mybxerror);  
00650               BXGlobWm2->setBinLabel(indexWheel[0],camera,1);
00651               
00652               MaskedGlobWm2->setBinContent(indexWheel[0],maskedratio);  
00653               MaskedGlobWm2->setBinLabel(indexWheel[0],camera,1);
00654 
00655               AverageEffWm2->setBinContent(indexWheel[0],averageeff);
00656               AverageEffWm2->setBinError(indexWheel[0],averageerr);  
00657               AverageEffWm2->setBinLabel(indexWheel[0],camera,1);
00658               
00659               NoPredictionWm2->setBinContent(indexWheel[0],nopredictionsratio);
00660               NoPredictionWm2->setBinLabel(indexWheel[0],camera,1);
00661             }else if(Ring==-1){
00662               EffDistroWm1->Fill(ef);
00663               indexWheel[1]++;  
00664               EffGlobWm1->setBinContent(indexWheel[1],ef);  
00665               EffGlobWm1->setBinError(indexWheel[1],er);  
00666               EffGlobWm1->setBinLabel(indexWheel[1],camera,1);  
00667               
00668               BXGlobWm1->setBinContent(indexWheel[1],mybxhisto);  
00669               BXGlobWm1->setBinError(indexWheel[1],mybxerror);  
00670               BXGlobWm1->setBinLabel(indexWheel[1],camera,1);
00671               
00672               MaskedGlobWm1->setBinContent(indexWheel[1],maskedratio);  
00673               MaskedGlobWm1->setBinLabel(indexWheel[1],camera,1);
00674 
00675               AverageEffWm1->setBinContent(indexWheel[1],averageeff);
00676               AverageEffWm1->setBinError(indexWheel[1],averageerr);  
00677               AverageEffWm1->setBinLabel(indexWheel[1],camera,1);
00678               
00679               NoPredictionWm1->setBinContent(indexWheel[1],nopredictionsratio);
00680               NoPredictionWm1->setBinLabel(indexWheel[1],camera,1);
00681 
00682             }else if(Ring==0){
00683               EffDistroW0->Fill(ef);
00684               indexWheel[2]++;  
00685               EffGlobW0->setBinContent(indexWheel[2],ef);  
00686               EffGlobW0->setBinError(indexWheel[2],er);  
00687               EffGlobW0->setBinLabel(indexWheel[2],camera,1);  
00688               
00689               BXGlobW0->setBinContent(indexWheel[2],mybxhisto);  
00690               BXGlobW0->setBinError(indexWheel[2],mybxerror);  
00691               BXGlobW0->setBinLabel(indexWheel[2],camera,1);
00692 
00693               MaskedGlobW0->setBinContent(indexWheel[2],maskedratio);  
00694               MaskedGlobW0->setBinLabel(indexWheel[2],camera,1);
00695               
00696               AverageEffW0->setBinContent(indexWheel[2],averageeff);
00697               AverageEffW0->setBinError(indexWheel[2],averageerr);  
00698               AverageEffW0->setBinLabel(indexWheel[2],camera,1);
00699               
00700               NoPredictionW0->setBinContent(indexWheel[2],nopredictionsratio);
00701               NoPredictionW0->setBinLabel(indexWheel[2],camera,1);            
00702             }else if(Ring==1){
00703               EffDistroW1->Fill(ef);
00704               indexWheel[3]++;  
00705               EffGlobW1->setBinContent(indexWheel[3],ef);  
00706               EffGlobW1->setBinError(indexWheel[3],er);  
00707               EffGlobW1->setBinLabel(indexWheel[3],camera,1);  
00708               
00709               BXGlobW1->setBinContent(indexWheel[3],mybxhisto);  
00710               BXGlobW1->setBinError(indexWheel[3],mybxerror);  
00711               BXGlobW1->setBinLabel(indexWheel[3],camera,1);
00712 
00713               MaskedGlobW1->setBinContent(indexWheel[3],maskedratio);  
00714               MaskedGlobW1->setBinLabel(indexWheel[3],camera,1);
00715 
00716               AverageEffW1->setBinContent(indexWheel[3],averageeff);
00717               AverageEffW1->setBinError(indexWheel[3],averageerr);  
00718               AverageEffW1->setBinLabel(indexWheel[3],camera,1);
00719               
00720               NoPredictionW1->setBinContent(indexWheel[3],nopredictionsratio);
00721               NoPredictionW1->setBinLabel(indexWheel[3],camera,1);            
00722             }else if(Ring==2){
00723               EffDistroW2->Fill(ef);
00724               indexWheel[4]++;
00725               EffGlobW2->setBinContent(indexWheel[4],ef);
00726               EffGlobW2->setBinError(indexWheel[4],er);
00727               EffGlobW2->setBinLabel(indexWheel[4],camera,1);
00728 
00729               BXGlobW2->setBinContent(indexWheel[4],mybxhisto);  
00730               BXGlobW2->setBinError(indexWheel[4],mybxerror);  
00731               BXGlobW2->setBinLabel(indexWheel[4],camera,1);
00732               
00733               MaskedGlobW2->setBinContent(indexWheel[4],maskedratio);  
00734               MaskedGlobW2->setBinLabel(indexWheel[4],camera,1);
00735 
00736               AverageEffW2->setBinContent(indexWheel[4],averageeff);
00737               AverageEffW2->setBinError(indexWheel[4],averageerr);  
00738               AverageEffW2->setBinLabel(indexWheel[4],camera,1);
00739               
00740               NoPredictionW2->setBinContent(indexWheel[4],nopredictionsratio);
00741               NoPredictionW2->setBinLabel(indexWheel[4],camera,1);            
00742             }
00743           }else{//Far Side 
00744             if(Ring==-2){
00745               EffDistroWm2far->Fill(ef);
00746               indexWheelf[0]++;  
00747               EffGlobWm2far->setBinContent(indexWheelf[0],ef);  
00748               EffGlobWm2far->setBinError(indexWheelf[0],er);  
00749               EffGlobWm2far->setBinLabel(indexWheelf[0],camera,1);
00750 
00751               BXGlobWm2far->setBinContent(indexWheelf[0],mybxhisto);  
00752               BXGlobWm2far->setBinError(indexWheelf[0],mybxerror);  
00753               BXGlobWm2far->setBinLabel(indexWheelf[0],camera);
00754               
00755               MaskedGlobWm2far->setBinContent(indexWheelf[0],maskedratio);
00756               MaskedGlobWm2far->setBinLabel(indexWheelf[0],camera,1);
00757               
00758               AverageEffWm2far->setBinContent(indexWheelf[0],averageeff);
00759               AverageEffWm2far->setBinError(indexWheelf[0],averageerr);
00760               AverageEffWm2far->setBinLabel(indexWheelf[0],camera,1);
00761 
00762               NoPredictionWm2->setBinContent(indexWheel[0],nopredictionsratio);
00763               NoPredictionWm2->setBinLabel(indexWheel[0],camera,1);
00764 
00765             }else if(Ring==-1){
00766               EffDistroWm1far->Fill(ef);
00767               indexWheelf[1]++;  
00768               EffGlobWm1far->setBinContent(indexWheelf[1],ef);  
00769               EffGlobWm1far->setBinError(indexWheelf[1],er);  
00770               EffGlobWm1far->setBinLabel(indexWheelf[1],camera,1);  
00771               
00772               BXGlobWm1far->setBinContent(indexWheelf[1],mybxhisto);  
00773               BXGlobWm1far->setBinError(indexWheelf[1],mybxerror);  
00774               BXGlobWm1far->setBinLabel(indexWheelf[1],camera,1);
00775               
00776               MaskedGlobWm1far->setBinContent(indexWheelf[1],maskedratio);
00777               MaskedGlobWm1far->setBinLabel(indexWheelf[1],camera,1);
00778 
00779               AverageEffWm1far->setBinContent(indexWheelf[1],averageeff);
00780               AverageEffWm1far->setBinError(indexWheelf[1],averageerr);
00781               AverageEffWm1far->setBinLabel(indexWheelf[1],camera,1);
00782 
00783               NoPredictionWm1far->setBinContent(indexWheelf[1],nopredictionsratio);
00784               NoPredictionWm1far->setBinLabel(indexWheelf[1],camera,1);
00785 
00786             }else  if(Ring==0){
00787               EffDistroW0far->Fill(ef);
00788               indexWheelf[2]++;  
00789               EffGlobW0far->setBinContent(indexWheelf[2],ef);  
00790               EffGlobW0far->setBinError(indexWheelf[2],er);  
00791               EffGlobW0far->setBinLabel(indexWheelf[2],camera,1);  
00792               
00793               BXGlobW0far->setBinContent(indexWheelf[2],mybxhisto);  
00794               BXGlobW0far->setBinError(indexWheelf[2],mybxerror);  
00795               BXGlobW0far->setBinLabel(indexWheelf[2],camera,1);
00796 
00797               MaskedGlobW0far->setBinContent(indexWheelf[2],maskedratio);
00798               MaskedGlobW0far->setBinLabel(indexWheelf[2],camera,1);
00799 
00800               AverageEffW0far->setBinContent(indexWheelf[2],averageeff);
00801               AverageEffW0far->setBinError(indexWheelf[2],averageerr);
00802               AverageEffW0far->setBinLabel(indexWheelf[2],camera,1);
00803 
00804               NoPredictionW0far->setBinContent(indexWheelf[2],nopredictionsratio);
00805               NoPredictionW0far->setBinLabel(indexWheelf[2],camera,1);
00806             }else if(Ring==1){
00807               EffDistroW1far->Fill(ef);
00808               indexWheelf[3]++;  
00809               EffGlobW1far->setBinContent(indexWheelf[3],ef);  
00810               EffGlobW1far->setBinError(indexWheelf[3],er);  
00811               EffGlobW1far->setBinLabel(indexWheelf[3],camera,1);  
00812               
00813               BXGlobW1far->setBinContent(indexWheelf[3],mybxhisto);  
00814               BXGlobW1far->setBinError(indexWheelf[3],mybxerror);  
00815               BXGlobW1far->setBinLabel(indexWheelf[3],camera,1);
00816 
00817               MaskedGlobW1far->setBinContent(indexWheelf[3],maskedratio);
00818               MaskedGlobW1far->setBinLabel(indexWheelf[3],camera,1);
00819               
00820               AverageEffW1far->setBinContent(indexWheelf[3],averageeff);
00821               AverageEffW1far->setBinError(indexWheelf[3],averageerr);
00822               AverageEffW1far->setBinLabel(indexWheelf[3],camera,1);
00823 
00824               NoPredictionW1far->setBinContent(indexWheelf[3],nopredictionsratio);
00825               NoPredictionW1far->setBinLabel(indexWheelf[3],camera,1);
00826 
00827             }else if(Ring==2){
00828               EffDistroW2far->Fill(ef);
00829               indexWheelf[4]++;
00830               EffGlobW2far->setBinContent(indexWheelf[4],ef);
00831               EffGlobW2far->setBinError(indexWheelf[4],er);
00832               EffGlobW2far->setBinLabel(indexWheelf[4],camera,1);
00833 
00834               BXGlobW2far->setBinContent(indexWheelf[4],mybxhisto);  
00835               BXGlobW2far->setBinError(indexWheelf[4],mybxerror);  
00836               BXGlobW2far->setBinLabel(indexWheelf[4],camera,1);
00837               
00838               MaskedGlobW2far->setBinContent(indexWheelf[4],maskedratio);
00839               MaskedGlobW2far->setBinLabel(indexWheelf[4],camera,1);
00840 
00841               AverageEffW2far->setBinContent(indexWheelf[4],averageeff);
00842               AverageEffW2far->setBinError(indexWheelf[4],averageerr);
00843               AverageEffW2far->setBinLabel(indexWheelf[4],camera,1);
00844 
00845               NoPredictionW2far->setBinContent(indexWheelf[4],nopredictionsratio);
00846               NoPredictionW2far->setBinLabel(indexWheelf[4],camera,1);
00847             }
00848           }
00849         }else{//EndCap
00850 
00851           std::string detUnitLabel, meIdRPC,meIdCSC, bxDistroId, meIdRealRPC  ;
00852           std::string      meIdPRO, meIdRPC2, meIdCSC2, bxDistroId2,meIdRealRPC2;
00853           
00854           RPCBookFolderStructure *  folderStr = new RPCBookFolderStructure(); //Anna
00855           std::string folder = "Muons/MuonSegEff/" +  folderStr->folderStructure(rpcId);
00856 
00857           delete folderStr;
00858                 
00859           meIdRPC = folder +"/RPCDataOccupancyFromCSC_"+ rpcsrv.name(); 
00860           meIdCSC =folder+"/ExpectedOccupancyFromCSC_"+ rpcsrv.name();
00861           bxDistroId =folder+"/BXDistribution_"+ rpcsrv.name();
00862           meIdRealRPC =folder+"/RealDetectedOccupancyFromCSC_"+ rpcsrv.name();
00863           
00864           meIdRPC2 = "RPCDataOccupancyFromCSC_" + rpcsrv.name();        
00865           meIdCSC2 =  "ExpectedOccupancyFromCSC_"+ rpcsrv.name();
00866           bxDistroId2 = "BXDistribution_"+ rpcsrv.name();
00867           meIdRealRPC2 = "RealDetectedOccupancyFromCSC_"+ rpcsrv.name();
00868           meIdPRO = "Profile_"+ rpcsrv.name();
00869 
00870           histoRPC= dbe->get(meIdRPC);
00871           histoCSC= dbe->get(meIdCSC);
00872           BXDistribution = dbe->get(bxDistroId);
00873           histoRealRPC = dbe->get(meIdRealRPC);
00874                           
00875           int NumberMasked=0;
00876           int NumberWithOutPrediction=0;
00877           double p = 0;
00878           double o = 0;
00879           float mybxhisto = 0;
00880           float mybxerror = 0;
00881           float ef =0;
00882           float er =0;
00883           float buffef = 0;
00884           float buffer = 0;
00885           float sumbuffef = 0;
00886           float sumbuffer = 0;
00887           float averageeff = 0;
00888           float averageerr = 0;
00889 
00890           int NumberStripsPointed = 0;
00891 
00892           if(histoRPC && histoCSC && BXDistribution && histoRealRPC){
00893             if(debug) std::cout <<rpcsrv.name()<<std::endl;
00894             
00895             for(int i=1;i<=int((*r)->nstrips());++i){
00896               if(histoRealRPC->getBinContent(i)!=0){
00897                 if(histoCSC->getBinContent(i)!=0){
00898                   if(debug) std::cout<<"Inside the If"<<std::endl;
00899                   buffef = float(histoRPC->getBinContent(i))/float(histoCSC->getBinContent(i));
00900                   meMap[meIdPRO]->setBinContent(i,buffef); 
00901                   buffer = sqrt(buffef*(1.-buffef)/float(histoCSC->getBinContent(i)));
00902                   meMap[meIdPRO]->setBinError(i,buffer);
00903                   sumbuffef=sumbuffef+buffef;
00904                   sumbuffer = sumbuffer + buffer*buffer;
00905                   NumberStripsPointed++;
00906                 }else{
00907                   NumberWithOutPrediction++;
00908                 }
00909                 
00910               }else{
00911                 NumberMasked++;
00912               }
00913               if(debug) std::cout<<"\t Strip="<<i<<" RealRPC="<<histoRealRPC->getBinContent(i)<<" RPC="<<histoRPC->getBinContent(i)<<" CSC="<<histoCSC->getBinContent(i)<<" buffef="<<buffef<<" buffer="<<buffer<<" sumbuffef="<<sumbuffef<<" sumbuffer="<<sumbuffer<<" NumberStripsPointed="<<NumberStripsPointed<<" NumberWithOutPrediction"<<NumberWithOutPrediction<<" Number Masked="<<NumberMasked<<std::endl;
00914             }
00915             p=histoCSC->getTH1F()->Integral();
00916             o=histoRPC->getTH1F()->Integral();
00917             
00918             if(NumberStripsPointed!=0){
00919               averageeff = (sumbuffef/float(NumberStripsPointed))*100.;
00920               averageerr = sqrt(sumbuffer/float(NumberStripsPointed))*100.;
00921             }
00922             
00923             mybxhisto = 50.+BXDistribution->getMean()*10;
00924             mybxerror = BXDistribution->getRMS()*10;
00925           }
00926           
00927           int Disk = rpcId.station()*rpcId.region();
00928 
00929           if(p!=0){
00930             ef = float(o)/float(p); 
00931             er = sqrt(ef*(1.-ef)/float(p));
00932           }
00933             
00934           ef=ef*100;
00935           er=er*100;
00936             
00937           std::string camera = rpcsrv.name();
00938             
00939           float maskedratio = (float(NumberMasked)/float((*r)->nstrips()))*100.;
00940           float nopredictionsratio = (float(NumberWithOutPrediction)/float((*r)->nstrips()))*100.;
00941           
00942           /*std::cout<<"p="<<p<<" o="<<o<<std::endl;
00943           std::cout<<"ef="<<ef<<" +/- er="<<er<<std::endl;
00944           std::cout<<"averageeff="<<averageeff<<" +/- averageerr="<<averageerr<<std::endl;
00945           std::cout<<"maskedratio="<<maskedratio<<std::endl;
00946           std::cout<<"nopredictionsratio="<<nopredictionsratio<<std::endl;
00947           */
00948           //Near Side
00949 
00950           if(sector==1||sector==2||sector==6){
00951 
00952             if(Disk==-3){
00953               EffDistroDm3->Fill(ef);
00954               indexDisk[0]++;  
00955               EffGlobDm3->setBinContent(indexDisk[0],ef);  
00956               EffGlobDm3->setBinError(indexDisk[0],er);  
00957               EffGlobDm3->setBinLabel(indexDisk[0],camera,1);
00958 
00959               BXGlobDm3->setBinContent(indexDisk[0],mybxhisto);  
00960               BXGlobDm3->setBinError(indexDisk[0],mybxerror);  
00961               BXGlobDm3->setBinLabel(indexDisk[0],camera,1);
00962               
00963               MaskedGlobDm3->setBinContent(indexDisk[0],maskedratio);  
00964               MaskedGlobDm3->setBinLabel(indexDisk[0],camera,1);
00965 
00966               AverageEffDm3->setBinContent(indexDisk[0],averageeff);
00967               AverageEffDm3->setBinError(indexDisk[0],averageerr);  
00968               AverageEffDm3->setBinLabel(indexDisk[0],camera,1);
00969               
00970               NoPredictionDm3->setBinContent(indexDisk[0],nopredictionsratio);
00971               NoPredictionDm3->setBinLabel(indexDisk[0],camera,1);
00972             }else if(Disk==-2){
00973               EffDistroDm2->Fill(ef);
00974               indexDisk[1]++;  
00975               EffGlobDm2->setBinContent(indexDisk[1],ef);  
00976               EffGlobDm2->setBinError(indexDisk[1],er);  
00977               EffGlobDm2->setBinLabel(indexDisk[1],camera,1);
00978 
00979               BXGlobDm2->setBinContent(indexDisk[1],mybxhisto);  
00980               BXGlobDm2->setBinError(indexDisk[1],mybxerror);  
00981               BXGlobDm2->setBinLabel(indexDisk[1],camera,1);
00982               
00983               MaskedGlobDm2->setBinContent(indexDisk[1],maskedratio);  
00984               MaskedGlobDm2->setBinLabel(indexDisk[1],camera,1);
00985 
00986               AverageEffDm2->setBinContent(indexDisk[1],averageeff);
00987               AverageEffDm2->setBinError(indexDisk[1],averageerr);  
00988               AverageEffDm2->setBinLabel(indexDisk[1],camera,1);
00989               
00990               NoPredictionDm2->setBinContent(indexDisk[1],nopredictionsratio);
00991               NoPredictionDm2->setBinLabel(indexDisk[1],camera,1);
00992             }else if(Disk==-1){
00993               EffDistroDm1->Fill(ef);
00994               indexDisk[2]++;  
00995               EffGlobDm1->setBinContent(indexDisk[2],ef);  
00996               EffGlobDm1->setBinError(indexDisk[2],er);  
00997               EffGlobDm1->setBinLabel(indexDisk[2],camera,1);  
00998               
00999               BXGlobDm1->setBinContent(indexDisk[2],mybxhisto);  
01000               BXGlobDm1->setBinError(indexDisk[2],mybxerror);  
01001               BXGlobDm1->setBinLabel(indexDisk[2],camera,1);
01002               
01003               MaskedGlobDm1->setBinContent(indexDisk[2],maskedratio);  
01004               MaskedGlobDm1->setBinLabel(indexDisk[2],camera,1);
01005 
01006               AverageEffDm1->setBinContent(indexDisk[2],averageeff);
01007               AverageEffDm1->setBinError(indexDisk[2],averageerr);  
01008               AverageEffDm1->setBinLabel(indexDisk[2],camera,1);
01009               
01010               NoPredictionDm1->setBinContent(indexDisk[2],nopredictionsratio);
01011               NoPredictionDm1->setBinLabel(indexDisk[2],camera,1);
01012 
01013             }else if(Disk==1){
01014               EffDistroD1->Fill(ef);
01015               indexDisk[3]++;  
01016               EffGlobD1->setBinContent(indexDisk[3],ef);  
01017               EffGlobD1->setBinError(indexDisk[3],er);  
01018               EffGlobD1->setBinLabel(indexDisk[3],camera,1);  
01019               
01020               BXGlobD1->setBinContent(indexDisk[3],mybxhisto);  
01021               BXGlobD1->setBinError(indexDisk[3],mybxerror);  
01022               BXGlobD1->setBinLabel(indexDisk[3],camera,1);
01023 
01024               MaskedGlobD1->setBinContent(indexDisk[3],maskedratio);  
01025               MaskedGlobD1->setBinLabel(indexDisk[3],camera,1);
01026 
01027               AverageEffD1->setBinContent(indexDisk[3],averageeff);
01028               AverageEffD1->setBinError(indexDisk[3],averageerr);  
01029               AverageEffD1->setBinLabel(indexDisk[3],camera,1);
01030               
01031               NoPredictionD1->setBinContent(indexDisk[3],nopredictionsratio);
01032               NoPredictionD1->setBinLabel(indexDisk[3],camera,1);             
01033             }else if(Disk==2){
01034               EffDistroD2->Fill(ef);
01035               indexDisk[4]++;
01036               EffGlobD2->setBinContent(indexDisk[4],ef);
01037               EffGlobD2->setBinError(indexDisk[4],er);
01038               EffGlobD2->setBinLabel(indexDisk[4],camera,1);
01039 
01040               BXGlobD2->setBinContent(indexDisk[4],mybxhisto);  
01041               BXGlobD2->setBinError(indexDisk[4],mybxerror);  
01042               BXGlobD2->setBinLabel(indexDisk[4],camera,1);
01043               
01044               MaskedGlobD2->setBinContent(indexDisk[4],maskedratio);  
01045               MaskedGlobD2->setBinLabel(indexDisk[4],camera,1);
01046 
01047               AverageEffD2->setBinContent(indexDisk[4],averageeff);
01048               AverageEffD2->setBinError(indexDisk[4],averageerr);  
01049               AverageEffD2->setBinLabel(indexDisk[4],camera,1);
01050               
01051               NoPredictionD2->setBinContent(indexDisk[4],nopredictionsratio);
01052               NoPredictionD2->setBinLabel(indexDisk[4],camera,1);             
01053             }else if(Disk==3){
01054               EffDistroD3->Fill(ef);
01055               indexDisk[5]++;
01056               EffGlobD3->setBinContent(indexDisk[5],ef);
01057               EffGlobD3->setBinError(indexDisk[5],er);
01058               EffGlobD3->setBinLabel(indexDisk[5],camera,1);
01059 
01060               BXGlobD3->setBinContent(indexDisk[5],mybxhisto);  
01061               BXGlobD3->setBinError(indexDisk[5],mybxerror);  
01062               BXGlobD3->setBinLabel(indexDisk[5],camera,1);
01063               
01064               MaskedGlobD3->setBinContent(indexDisk[5],maskedratio);  
01065               MaskedGlobD3->setBinLabel(indexDisk[5],camera,1);
01066 
01067               AverageEffD3->setBinContent(indexDisk[5],averageeff);
01068               AverageEffD3->setBinError(indexDisk[5],averageerr);  
01069               AverageEffD3->setBinLabel(indexDisk[5],camera,1);
01070               
01071               NoPredictionD3->setBinContent(indexDisk[5],nopredictionsratio);
01072               NoPredictionD3->setBinLabel(indexDisk[5],camera,1);             
01073             }
01074           }else{//Far Side 
01075             
01076             if(Disk==-3){
01077               EffDistroDm3far->Fill(ef);
01078               indexDiskf[0]++;  
01079               EffGlobDm3far->setBinContent(indexDiskf[0],ef);  
01080               EffGlobDm3far->setBinError(indexDiskf[0],er);  
01081               EffGlobDm3far->setBinLabel(indexDiskf[0],camera,1);
01082 
01083               BXGlobDm3far->setBinContent(indexDiskf[0],mybxhisto);  
01084               BXGlobDm3far->setBinError(indexDiskf[0],mybxerror);  
01085               BXGlobDm3far->setBinLabel(indexDiskf[0],camera);
01086               
01087               MaskedGlobDm3far->setBinContent(indexDiskf[0],maskedratio);
01088               MaskedGlobDm3far->setBinLabel(indexDiskf[0],camera,1);
01089               
01090               AverageEffDm3far->setBinContent(indexDiskf[0],averageeff);
01091               AverageEffDm3far->setBinError(indexDiskf[0],averageerr);
01092               AverageEffDm3far->setBinLabel(indexDiskf[0],camera,1);
01093 
01094               NoPredictionDm3->setBinContent(indexDisk[0],nopredictionsratio);
01095               NoPredictionDm3->setBinLabel(indexDisk[0],camera,1);
01096 
01097             }
01098             else if(Disk==-2){
01099               EffDistroDm2far->Fill(ef);
01100               indexDiskf[1]++;  
01101               EffGlobDm2far->setBinContent(indexDiskf[1],ef);  
01102               EffGlobDm2far->setBinError(indexDiskf[1],er);  
01103               EffGlobDm2far->setBinLabel(indexDiskf[1],camera,1);
01104 
01105               BXGlobDm2far->setBinContent(indexDiskf[1],mybxhisto);  
01106               BXGlobDm2far->setBinError(indexDiskf[1],mybxerror);  
01107               BXGlobDm2far->setBinLabel(indexDiskf[1],camera);
01108               
01109               MaskedGlobDm2far->setBinContent(indexDiskf[1],maskedratio);
01110               MaskedGlobDm2far->setBinLabel(indexDiskf[1],camera,1);
01111               
01112               AverageEffDm2far->setBinContent(indexDiskf[1],averageeff);
01113               AverageEffDm2far->setBinError(indexDiskf[1],averageerr);
01114               AverageEffDm2far->setBinLabel(indexDiskf[1],camera,1);
01115 
01116               NoPredictionDm2->setBinContent(indexDisk[1],nopredictionsratio);
01117               NoPredictionDm2->setBinLabel(indexDisk[1],camera,1);
01118 
01119             }else if(Disk==-1){
01120               EffDistroDm1far->Fill(ef);
01121               indexDiskf[2]++;  
01122               EffGlobDm1far->setBinContent(indexDiskf[2],ef);  
01123               EffGlobDm1far->setBinError(indexDiskf[2],er);  
01124               EffGlobDm1far->setBinLabel(indexDiskf[2],camera,1);  
01125               
01126               BXGlobDm1far->setBinContent(indexDiskf[2],mybxhisto);  
01127               BXGlobDm1far->setBinError(indexDiskf[2],mybxerror);  
01128               BXGlobDm1far->setBinLabel(indexDiskf[2],camera,1);
01129               
01130               MaskedGlobDm1far->setBinContent(indexDiskf[2],maskedratio);
01131               MaskedGlobDm1far->setBinLabel(indexDiskf[2],camera,1);
01132 
01133               AverageEffDm1far->setBinContent(indexDiskf[2],averageeff);
01134               AverageEffDm1far->setBinError(indexDiskf[2],averageerr);
01135               AverageEffDm1far->setBinLabel(indexDiskf[2],camera,1);
01136 
01137               NoPredictionDm1far->setBinContent(indexDiskf[2],nopredictionsratio);
01138               NoPredictionDm1far->setBinLabel(indexDiskf[2],camera,1);
01139 
01140             }else if(Disk==1){
01141               EffDistroD1far->Fill(ef);
01142               indexDiskf[3]++;  
01143               EffGlobD1far->setBinContent(indexDiskf[3],ef);  
01144               EffGlobD1far->setBinError(indexDiskf[3],er);  
01145               EffGlobD1far->setBinLabel(indexDiskf[3],camera,1);  
01146               
01147               BXGlobD1far->setBinContent(indexDiskf[3],mybxhisto);  
01148               BXGlobD1far->setBinError(indexDiskf[3],mybxerror);  
01149               BXGlobD1far->setBinLabel(indexDiskf[3],camera,1);
01150 
01151               MaskedGlobD1far->setBinContent(indexDiskf[3],maskedratio);
01152               MaskedGlobD1far->setBinLabel(indexDiskf[3],camera,1);
01153               
01154               AverageEffD1far->setBinContent(indexDiskf[3],averageeff);
01155               AverageEffD1far->setBinError(indexDiskf[3],averageerr);
01156               AverageEffD1far->setBinLabel(indexDiskf[3],camera,1);
01157 
01158               NoPredictionD1far->setBinContent(indexDiskf[3],nopredictionsratio);
01159               NoPredictionD1far->setBinLabel(indexDiskf[3],camera,1);
01160 
01161             }else if(Disk==2){
01162               EffDistroD2far->Fill(ef);
01163               indexDiskf[4]++;
01164               EffGlobD2far->setBinContent(indexDiskf[4],ef);
01165               EffGlobD2far->setBinError(indexDiskf[4],er);
01166               EffGlobD2far->setBinLabel(indexDiskf[4],camera,1);
01167 
01168               BXGlobD2far->setBinContent(indexDiskf[4],mybxhisto);  
01169               BXGlobD2far->setBinError(indexDiskf[4],mybxerror);  
01170               BXGlobD2far->setBinLabel(indexDiskf[4],camera,1);
01171               
01172               MaskedGlobD2far->setBinContent(indexDiskf[4],maskedratio);
01173               MaskedGlobD2far->setBinLabel(indexDiskf[4],camera,1);
01174 
01175               AverageEffD2far->setBinContent(indexDiskf[4],averageeff);
01176               AverageEffD2far->setBinError(indexDiskf[4],averageerr);
01177               AverageEffD2far->setBinLabel(indexDiskf[4],camera,1);
01178 
01179               NoPredictionD2far->setBinContent(indexDiskf[4],nopredictionsratio);
01180               NoPredictionD2far->setBinLabel(indexDiskf[4],camera,1);
01181             }else if(Disk==3){
01182               EffDistroD3far->Fill(ef);
01183               indexDiskf[5]++;
01184               EffGlobD3far->setBinContent(indexDiskf[5],ef);
01185               EffGlobD3far->setBinError(indexDiskf[5],er);
01186               EffGlobD3far->setBinLabel(indexDiskf[5],camera,1);
01187 
01188               BXGlobD3far->setBinContent(indexDiskf[5],mybxhisto);  
01189               BXGlobD3far->setBinError(indexDiskf[5],mybxerror);  
01190               BXGlobD3far->setBinLabel(indexDiskf[5],camera,1);
01191               
01192               MaskedGlobD3far->setBinContent(indexDiskf[5],maskedratio);
01193               MaskedGlobD3far->setBinLabel(indexDiskf[5],camera,1);
01194 
01195               AverageEffD3far->setBinContent(indexDiskf[5],averageeff);
01196               AverageEffD3far->setBinError(indexDiskf[5],averageerr);
01197               AverageEffD3far->setBinLabel(indexDiskf[5],camera,1);
01198 
01199               NoPredictionD3far->setBinContent(indexDiskf[5],nopredictionsratio);
01200               NoPredictionD3far->setBinLabel(indexDiskf[5],camera,1);
01201             }
01202           }//Finishing EndCap
01203         }
01204       }
01205     }
01206   }
01207 
01208   //Ranges for Both
01209   //Barrel
01210 
01211   if(barrel){
01212     EffGlobWm2->setAxisRange(-4.,100.,2);
01213     EffGlobWm1->setAxisRange(-4.,100.,2);
01214     EffGlobW0->setAxisRange(-4.,100.,2);
01215     EffGlobW1->setAxisRange(-4.,100.,2);
01216     EffGlobW2->setAxisRange(-4.,100.,2);
01217   
01218     EffGlobWm2far->setAxisRange(-4.,100.,2);
01219     EffGlobWm1far->setAxisRange(-4.,100.,2);
01220     EffGlobW0far->setAxisRange(-4.,100.,2);
01221     EffGlobW1far->setAxisRange(-4.,100.,2);
01222     EffGlobW2far->setAxisRange(-4.,100.,2);
01223 
01224     AverageEffWm2->setAxisRange(-4.,100.,2);
01225     AverageEffWm1->setAxisRange(-4.,100.,2);
01226     AverageEffW0->setAxisRange(-4.,100.,2);
01227     AverageEffW1->setAxisRange(-4.,100.,2);
01228     AverageEffW2->setAxisRange(-4.,100.,2);
01229   
01230     AverageEffWm2far->setAxisRange(-4.,100.,2);
01231     AverageEffWm1far->setAxisRange(-4.,100.,2);
01232     AverageEffW0far->setAxisRange(-4.,100.,2);
01233     AverageEffW1far->setAxisRange(-4.,100.,2);
01234     AverageEffW2far->setAxisRange(-4.,100.,2);
01235 
01236     MaskedGlobWm2->setAxisRange(-4.,100.,2);
01237     MaskedGlobWm1->setAxisRange(-4.,100.,2);
01238     MaskedGlobW0->setAxisRange(-4.,100.,2);
01239     MaskedGlobW1->setAxisRange(-4.,100.,2);
01240     MaskedGlobW2->setAxisRange(-4.,100.,2);
01241   
01242     MaskedGlobWm2far->setAxisRange(-4.,100.,2);
01243     MaskedGlobWm1far->setAxisRange(-4.,100.,2);
01244     MaskedGlobW0far->setAxisRange(-4.,100.,2);
01245     MaskedGlobW1far->setAxisRange(-4.,100.,2);
01246     MaskedGlobW2far->setAxisRange(-4.,100.,2);
01247 
01248     NoPredictionWm2->setAxisRange(-4.,100.,2);
01249     NoPredictionWm1->setAxisRange(-4.,100.,2);
01250     NoPredictionW0->setAxisRange(-4.,100.,2);
01251     NoPredictionW1->setAxisRange(-4.,100.,2);
01252     NoPredictionW2->setAxisRange(-4.,100.,2);
01253   
01254     NoPredictionWm2far->setAxisRange(-4.,100.,2);
01255     NoPredictionWm1far->setAxisRange(-4.,100.,2);
01256     NoPredictionW0far->setAxisRange(-4.,100.,2);
01257     NoPredictionW1far->setAxisRange(-4.,100.,2);
01258     NoPredictionW2far->setAxisRange(-4.,100.,2);
01259   }  
01260   //EndCap
01261 
01262   if(endcap){
01263     EffGlobDm3->setAxisRange(-4.,100.,2);
01264     EffGlobDm2->setAxisRange(-4.,100.,2);
01265     EffGlobDm1->setAxisRange(-4.,100.,2);
01266     EffGlobD1->setAxisRange(-4.,100.,2);
01267     EffGlobD2->setAxisRange(-4.,100.,2);
01268     EffGlobD3->setAxisRange(-4.,100.,2);
01269 
01270     EffGlobDm3far->setAxisRange(-4.,100.,2);
01271     EffGlobDm2far->setAxisRange(-4.,100.,2);
01272     EffGlobDm1far->setAxisRange(-4.,100.,2);
01273     EffGlobD1far->setAxisRange(-4.,100.,2);
01274     EffGlobD2far->setAxisRange(-4.,100.,2);
01275     EffGlobD3far->setAxisRange(-4.,100.,2);
01276 
01277     BXGlobDm3->setAxisRange(-4.,100.,2);
01278     BXGlobDm2->setAxisRange(-4.,100.,2);
01279     BXGlobDm1->setAxisRange(-4.,100.,2);
01280     BXGlobD1->setAxisRange(-4.,100.,2);
01281     BXGlobD2->setAxisRange(-4.,100.,2);
01282     BXGlobD3->setAxisRange(-4.,100.,2);
01283   
01284     BXGlobDm3far->setAxisRange(-4.,100.,2);
01285     BXGlobDm2far->setAxisRange(-4.,100.,2);
01286     BXGlobDm1far->setAxisRange(-4.,100.,2);
01287     BXGlobD1far->setAxisRange(-4.,100.,2);
01288     BXGlobD2far->setAxisRange(-4.,100.,2);
01289     BXGlobD3far->setAxisRange(-4.,100.,2);
01290 
01291     MaskedGlobDm3->setAxisRange(-4.,100.,2);
01292     MaskedGlobDm2->setAxisRange(-4.,100.,2);
01293     MaskedGlobDm1->setAxisRange(-4.,100.,2);
01294     MaskedGlobD1->setAxisRange(-4.,100.,2);
01295     MaskedGlobD2->setAxisRange(-4.,100.,2);
01296     MaskedGlobD3->setAxisRange(-4.,100.,2);
01297   
01298     MaskedGlobDm3far->setAxisRange(-4.,100.,2);
01299     MaskedGlobDm2far->setAxisRange(-4.,100.,2);
01300     MaskedGlobDm1far->setAxisRange(-4.,100.,2);
01301     MaskedGlobD1far->setAxisRange(-4.,100.,2);
01302     MaskedGlobD2far->setAxisRange(-4.,100.,2);
01303     MaskedGlobD3far->setAxisRange(-4.,100.,2);
01304 
01305     AverageEffDm3->setAxisRange(-4.,100.,2);
01306     AverageEffDm2->setAxisRange(-4.,100.,2);
01307     AverageEffDm1->setAxisRange(-4.,100.,2);
01308     AverageEffD1->setAxisRange(-4.,100.,2);
01309     AverageEffD2->setAxisRange(-4.,100.,2);
01310     AverageEffD3->setAxisRange(-4.,100.,2);
01311 
01312     AverageEffDm3far->setAxisRange(-4.,100.,2);
01313     AverageEffDm2far->setAxisRange(-4.,100.,2);
01314     AverageEffDm1far->setAxisRange(-4.,100.,2);
01315     AverageEffD1far->setAxisRange(-4.,100.,2);
01316     AverageEffD2far->setAxisRange(-4.,100.,2);
01317     AverageEffD3far->setAxisRange(-4.,100.,2);
01318 
01319     NoPredictionDm3->setAxisRange(-4.,100.,2);
01320     NoPredictionDm2->setAxisRange(-4.,100.,2);
01321     NoPredictionDm1->setAxisRange(-4.,100.,2);
01322     NoPredictionD1->setAxisRange(-4.,100.,2);
01323     NoPredictionD2->setAxisRange(-4.,100.,2);
01324     NoPredictionD3->setAxisRange(-4.,100.,2);
01325 
01326     NoPredictionDm3far->setAxisRange(-4.,100.,2);
01327     NoPredictionDm2far->setAxisRange(-4.,100.,2);
01328     NoPredictionDm1far->setAxisRange(-4.,100.,2);
01329     NoPredictionD1far->setAxisRange(-4.,100.,2);
01330     NoPredictionD2far->setAxisRange(-4.,100.,2);
01331     NoPredictionD3far->setAxisRange(-4.,100.,2);
01332   }
01333 
01334   //Title for Both
01335 
01336   //Barrel
01337   if(barrel){
01338     EffGlobWm2->setAxisTitle("%",2);
01339     EffGlobWm1->setAxisTitle("%",2);
01340     EffGlobW0->setAxisTitle("%",2);
01341     EffGlobW1->setAxisTitle("%",2);
01342     EffGlobW2->setAxisTitle("%",2);
01343   
01344     EffGlobWm2far->setAxisTitle("%",2);
01345     EffGlobWm1far->setAxisTitle("%",2);
01346     EffGlobW0far->setAxisTitle("%",2);
01347     EffGlobW1far->setAxisTitle("%",2);
01348     EffGlobW2far->setAxisTitle("%",2);
01349 
01350     AverageEffWm2->setAxisTitle("%",2);
01351     AverageEffWm1->setAxisTitle("%",2);
01352     AverageEffW0->setAxisTitle("%",2);
01353     AverageEffW1->setAxisTitle("%",2);
01354     AverageEffW2->setAxisTitle("%",2);
01355   
01356     AverageEffWm2far->setAxisTitle("%",2);
01357     AverageEffWm1far->setAxisTitle("%",2);
01358     AverageEffW0far->setAxisTitle("%",2);
01359     AverageEffW1far->setAxisTitle("%",2);
01360     AverageEffW2far->setAxisTitle("%",2);
01361 
01362     MaskedGlobWm2->setAxisTitle("%",2);
01363     MaskedGlobWm1->setAxisTitle("%",2);
01364     MaskedGlobW0->setAxisTitle("%",2);
01365     MaskedGlobW1->setAxisTitle("%",2);
01366     MaskedGlobW2->setAxisTitle("%",2);
01367   
01368     MaskedGlobWm2far->setAxisTitle("%",2);
01369     MaskedGlobWm1far->setAxisTitle("%",2);
01370     MaskedGlobW0far->setAxisTitle("%",2);
01371     MaskedGlobW1far->setAxisTitle("%",2);
01372     MaskedGlobW2far->setAxisTitle("%",2);
01373 
01374     NoPredictionWm2->setAxisTitle("%",2);
01375     NoPredictionWm1->setAxisTitle("%",2);
01376     NoPredictionW0->setAxisTitle("%",2);
01377     NoPredictionW1->setAxisTitle("%",2);
01378     NoPredictionW2->setAxisTitle("%",2);
01379   
01380     NoPredictionWm2far->setAxisTitle("%",2);
01381     NoPredictionWm1far->setAxisTitle("%",2);
01382     NoPredictionW0far->setAxisTitle("%",2);
01383     NoPredictionW1far->setAxisTitle("%",2);
01384     NoPredictionW2far->setAxisTitle("%",2);
01385   }
01386   //EndCap
01387 
01388   if(endcap){
01389     EffGlobDm3->setAxisTitle("%",2);
01390     EffGlobDm2->setAxisTitle("%",2);
01391     EffGlobDm1->setAxisTitle("%",2);
01392     EffGlobD1->setAxisTitle("%",2);
01393     EffGlobD2->setAxisTitle("%",2);
01394     EffGlobD3->setAxisTitle("%",2);
01395 
01396     EffGlobDm3far->setAxisTitle("%",2);
01397     EffGlobDm2far->setAxisTitle("%",2);
01398     EffGlobDm1far->setAxisTitle("%",2);
01399     EffGlobD1far->setAxisTitle("%",2);
01400     EffGlobD2far->setAxisTitle("%",2);
01401     EffGlobD3far->setAxisTitle("%",2);
01402 
01403     BXGlobDm3->setAxisTitle("%",2);
01404     BXGlobDm2->setAxisTitle("%",2);
01405     BXGlobDm1->setAxisTitle("%",2);
01406     BXGlobD1->setAxisTitle("%",2);
01407     BXGlobD2->setAxisTitle("%",2);
01408     BXGlobD3->setAxisTitle("%",2);
01409   
01410     BXGlobDm3far->setAxisTitle("%",2);
01411     BXGlobDm2far->setAxisTitle("%",2);
01412     BXGlobDm1far->setAxisTitle("%",2);
01413     BXGlobD1far->setAxisTitle("%",2);
01414     BXGlobD2far->setAxisTitle("%",2);
01415     BXGlobD3far->setAxisTitle("%",2);
01416 
01417     MaskedGlobDm3->setAxisTitle("%",2);
01418     MaskedGlobDm2->setAxisTitle("%",2);
01419     MaskedGlobDm1->setAxisTitle("%",2);
01420     MaskedGlobD1->setAxisTitle("%",2);
01421     MaskedGlobD2->setAxisTitle("%",2);
01422     MaskedGlobD3->setAxisTitle("%",2);
01423   
01424     MaskedGlobDm3far->setAxisTitle("%",2);
01425     MaskedGlobDm2far->setAxisTitle("%",2);
01426     MaskedGlobDm1far->setAxisTitle("%",2);
01427     MaskedGlobD1far->setAxisTitle("%",2);
01428     MaskedGlobD2far->setAxisTitle("%",2);
01429     MaskedGlobD3far->setAxisTitle("%",2);
01430 
01431     AverageEffDm3->setAxisTitle("%",2);
01432     AverageEffDm2->setAxisTitle("%",2);
01433     AverageEffDm1->setAxisTitle("%",2);
01434     AverageEffD1->setAxisTitle("%",2);
01435     AverageEffD2->setAxisTitle("%",2);
01436     AverageEffD3->setAxisTitle("%",2);
01437 
01438     AverageEffDm3far->setAxisTitle("%",2);
01439     AverageEffDm2far->setAxisTitle("%",2);
01440     AverageEffDm1far->setAxisTitle("%",2);
01441     AverageEffD1far->setAxisTitle("%",2);
01442     AverageEffD2far->setAxisTitle("%",2);
01443     AverageEffD3far->setAxisTitle("%",2);
01444 
01445     NoPredictionDm3->setAxisTitle("%",2);
01446     NoPredictionDm2->setAxisTitle("%",2);
01447     NoPredictionDm1->setAxisTitle("%",2);
01448     NoPredictionD1->setAxisTitle("%",2);
01449     NoPredictionD2->setAxisTitle("%",2);
01450     NoPredictionD3->setAxisTitle("%",2);
01451   
01452     NoPredictionDm3far->setAxisTitle("%",2);
01453     NoPredictionDm2far->setAxisTitle("%",2);
01454     NoPredictionDm1far->setAxisTitle("%",2);
01455     NoPredictionD1far->setAxisTitle("%",2);
01456     NoPredictionD2far->setAxisTitle("%",2);
01457     NoPredictionD3far->setAxisTitle("%",2);
01458   }
01459   
01460   if(debug) std::cout<<"Saving RootFile"<<std::endl;
01461 
01462   EffGlobDm3->setAxisTitle("%",2);
01463   EffGlobDm2->setAxisTitle("%",2);
01464   EffGlobDm1->setAxisTitle("%",2);
01465   EffGlobD1->setAxisTitle("%",2);
01466   EffGlobD2->setAxisTitle("%",2);
01467   EffGlobD3->setAxisTitle("%",2);
01468 
01469   EffGlobDm3far->setAxisTitle("%",2);
01470   EffGlobDm2far->setAxisTitle("%",2);
01471   EffGlobDm1far->setAxisTitle("%",2);
01472   EffGlobD1far->setAxisTitle("%",2);
01473   EffGlobD2far->setAxisTitle("%",2);
01474   EffGlobD3far->setAxisTitle("%",2);
01475 
01476   BXGlobDm3->setAxisTitle("%",2);
01477   BXGlobDm2->setAxisTitle("%",2);
01478   BXGlobDm1->setAxisTitle("%",2);
01479   BXGlobD1->setAxisTitle("%",2);
01480   BXGlobD2->setAxisTitle("%",2);
01481   BXGlobD3->setAxisTitle("%",2);
01482   
01483   BXGlobDm3far->setAxisTitle("%",2);
01484   BXGlobDm2far->setAxisTitle("%",2);
01485   BXGlobDm1far->setAxisTitle("%",2);
01486   BXGlobD1far->setAxisTitle("%",2);
01487   BXGlobD2far->setAxisTitle("%",2);
01488   BXGlobD3far->setAxisTitle("%",2);
01489 
01490   MaskedGlobDm3->setAxisTitle("%",2);
01491   MaskedGlobDm2->setAxisTitle("%",2);
01492   MaskedGlobDm1->setAxisTitle("%",2);
01493   MaskedGlobD1->setAxisTitle("%",2);
01494   MaskedGlobD2->setAxisTitle("%",2);
01495   MaskedGlobD3->setAxisTitle("%",2);
01496   
01497   MaskedGlobDm3far->setAxisTitle("%",2);
01498   MaskedGlobDm2far->setAxisTitle("%",2);
01499   MaskedGlobDm1far->setAxisTitle("%",2);
01500   MaskedGlobD1far->setAxisTitle("%",2);
01501   MaskedGlobD2far->setAxisTitle("%",2);
01502   MaskedGlobD3far->setAxisTitle("%",2);
01503 
01504   AverageEffDm3->setAxisTitle("%",2);
01505   AverageEffDm2->setAxisTitle("%",2);
01506   AverageEffDm1->setAxisTitle("%",2);
01507   AverageEffD1->setAxisTitle("%",2);
01508   AverageEffD2->setAxisTitle("%",2);
01509   AverageEffD3->setAxisTitle("%",2);
01510 
01511   AverageEffDm3far->setAxisTitle("%",2);
01512   AverageEffDm2far->setAxisTitle("%",2);
01513   AverageEffDm1far->setAxisTitle("%",2);
01514   AverageEffD1far->setAxisTitle("%",2);
01515   AverageEffD2far->setAxisTitle("%",2);
01516   AverageEffD3far->setAxisTitle("%",2);
01517 
01518   NoPredictionDm3->setAxisTitle("%",2);
01519   NoPredictionDm2->setAxisTitle("%",2);
01520   NoPredictionDm1->setAxisTitle("%",2);
01521   NoPredictionD1->setAxisTitle("%",2);
01522   NoPredictionD2->setAxisTitle("%",2);
01523   NoPredictionD3->setAxisTitle("%",2);
01524   
01525   NoPredictionDm3far->setAxisTitle("%",2);
01526   NoPredictionDm2far->setAxisTitle("%",2);
01527   NoPredictionDm1far->setAxisTitle("%",2);
01528   NoPredictionD1far->setAxisTitle("%",2);
01529   NoPredictionD2far->setAxisTitle("%",2);
01530   NoPredictionD3far->setAxisTitle("%",2);
01531   
01532   if(debug) std::cout<<"Saving RootFile"<<std::endl;
01533   if(SaveFile)dbe->save(NameFile);
01534   //dbe->showDirStructure();
01535   std::cout<<"RPCEFFICIENCY SECOND DONE"<<std::endl;
01536 }
01537 
01538 void RPCEfficiencySecond::endJob(){
01539 }
01540 

Generated on Tue Jun 9 17:33:51 2009 for CMSSW by  doxygen 1.5.4