CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/DQM/RPCMonitorClient/interface/RPCEfficiencySecond.h

Go to the documentation of this file.
00001 
00012 #include <FWCore/Framework/interface/Frameworkfwd.h>
00013 #include <FWCore/Framework/interface/EDAnalyzer.h>
00014 #include <FWCore/Framework/interface/Event.h>
00015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00016 #include "FWCore/ServiceRegistry/interface/Service.h"
00017 
00018 #include "DQMServices/Core/interface/DQMStore.h"
00019 #include "DQMServices/Core/interface/MonitorElement.h"
00020 
00021 #include <DataFormats/MuonDetId/interface/RPCDetId.h>
00022 
00023 
00024 #include<string>
00025 //#include<vector>
00026 #include<map>
00027 #include<fstream>
00028 
00029 class RPCDetId;
00030 /* class TFile; */
00031 /* class TH1F; */
00032 /* class TFile; */
00033 /* class TCanvas; */
00034 /* class TH2F; */
00035 /* class TString; */
00036 /* class TGaxis; */
00037 
00038 
00039 class RPCEfficiencySecond : public edm::EDAnalyzer {
00040    public:
00041       explicit RPCEfficiencySecond(const edm::ParameterSet&);
00042       ~RPCEfficiencySecond();
00043       int rollY(std::string shortname,std::vector<std::string> rollNames);
00044   
00045  /*  TFile * theFile; */
00046 /*   TFile * theFileout; */
00047 
00048  /*  MonitorElement * statistics; */
00049 /*   MonitorElement * statistics2; */
00050 
00051 /*   MonitorElement * hGlobalResClu1La1; */
00052 /*   MonitorElement * hGlobalResClu1La2; */
00053 /*   MonitorElement * hGlobalResClu1La3; */
00054 /*   MonitorElement * hGlobalResClu1La4; */
00055 /*   MonitorElement * hGlobalResClu1La5; */
00056 /*   MonitorElement * hGlobalResClu1La6; */
00057 
00058 /*   MonitorElement * hGlobalResClu2La1; */
00059 /*   MonitorElement * hGlobalResClu2La2; */
00060 /*   MonitorElement * hGlobalResClu2La3; */
00061 /*   MonitorElement * hGlobalResClu2La4; */
00062 /*   MonitorElement * hGlobalResClu2La5; */
00063 /*   MonitorElement * hGlobalResClu2La6; */
00064 
00065 /*   MonitorElement * hGlobalResClu3La1; */
00066 /*   MonitorElement * hGlobalResClu3La2; */
00067 /*   MonitorElement * hGlobalResClu3La3; */
00068 /*   MonitorElement * hGlobalResClu3La4; */
00069 /*   MonitorElement * hGlobalResClu3La5; */
00070 /*   MonitorElement * hGlobalResClu3La6; */
00071 
00072 /*   //Endcap   */
00073 /*   MonitorElement * hGlobalResClu1R3C; */
00074 /*   MonitorElement * hGlobalResClu1R3B; */
00075 /*   MonitorElement * hGlobalResClu1R3A; */
00076 /*   MonitorElement * hGlobalResClu1R2C; */
00077 /*   MonitorElement * hGlobalResClu1R2B;  */
00078 /*   MonitorElement * hGlobalResClu1R2A; */
00079 
00080 /*   MonitorElement * hGlobalResClu2R3C; */
00081 /*   MonitorElement * hGlobalResClu2R3B; */
00082 /*   MonitorElement * hGlobalResClu2R3A; */
00083 /*   MonitorElement * hGlobalResClu2R2C; */
00084 /*   MonitorElement * hGlobalResClu2R2B; */
00085 /*   MonitorElement * hGlobalResClu2R2A; */
00086 
00087 /*   MonitorElement * hGlobalResClu3R3C; */
00088 /*   MonitorElement * hGlobalResClu3R3B; */
00089 /*   MonitorElement * hGlobalResClu3R3A; */
00090 /*   MonitorElement * hGlobalResClu3R2C; */
00091 /*   MonitorElement * hGlobalResClu3R2B; */
00092 /*   MonitorElement * hGlobalResClu3R2A; */
00093 
00094 /*   MonitorElement * hGlobal2ResClu1La1; */
00095 /*   MonitorElement * hGlobal2ResClu1La2; */
00096 /*   MonitorElement * hGlobal2ResClu1La3; */
00097 /*   MonitorElement * hGlobal2ResClu1La4; */
00098 /*   MonitorElement * hGlobal2ResClu1La5; */
00099 /*   MonitorElement * hGlobal2ResClu1La6; */
00100 
00101 /*   //SecondHistograms */
00102 
00103 /*   MonitorElement * hGlobal2ResClu2La1; */
00104 /*   MonitorElement * hGlobal2ResClu2La2; */
00105 /*   MonitorElement * hGlobal2ResClu2La3; */
00106 /*   MonitorElement * hGlobal2ResClu2La4; */
00107 /*   MonitorElement * hGlobal2ResClu2La5; */
00108 /*   MonitorElement * hGlobal2ResClu2La6; */
00109 
00110 /*   MonitorElement * hGlobal2ResClu3La1; */
00111 /*   MonitorElement * hGlobal2ResClu3La2; */
00112 /*   MonitorElement * hGlobal2ResClu3La3; */
00113 /*   MonitorElement * hGlobal2ResClu3La4; */
00114 /*   MonitorElement * hGlobal2ResClu3La5; */
00115 /*   MonitorElement * hGlobal2ResClu3La6; */
00116 
00117 /*   //Endcap   */
00118 /*   MonitorElement * hGlobal2ResClu1R3C; */
00119 /*   MonitorElement * hGlobal2ResClu1R3B; */
00120 /*   MonitorElement * hGlobal2ResClu1R3A; */
00121 /*   MonitorElement * hGlobal2ResClu1R2C; */
00122 /*   MonitorElement * hGlobal2ResClu1R2B;  */
00123 /*   MonitorElement * hGlobal2ResClu1R2A; */
00124 
00125 /*   MonitorElement * hGlobal2ResClu2R3C; */
00126 /*   MonitorElement * hGlobal2ResClu2R3B; */
00127 /*   MonitorElement * hGlobal2ResClu2R3A; */
00128 /*   MonitorElement * hGlobal2ResClu2R2C; */
00129 /*   MonitorElement * hGlobal2ResClu2R2B; */
00130 /*   MonitorElement * hGlobal2ResClu2R2A; */
00131 
00132 /*   MonitorElement * hGlobal2ResClu3R3C; */
00133 /*   MonitorElement * hGlobal2ResClu3R3B; */
00134 /*   MonitorElement * hGlobal2ResClu3R3A; */
00135 /*   MonitorElement * hGlobal2ResClu3R2C; */
00136 /*   MonitorElement * hGlobal2ResClu3R2B; */
00137 /*   MonitorElement * hGlobal2ResClu3R2A; */
00138 
00139   //Histograms to use
00140   MonitorElement * histoRPC;
00141   MonitorElement * histoDT;
00142   MonitorElement * histoRealRPC;
00143   MonitorElement * histoCSC;
00144   //  MonitorElement * BXDistribution;
00145 
00146   MonitorElement * histoPRO;
00147   MonitorElement * histoeffIdRPC_DT;
00148   MonitorElement * histoeffIdRPC_CSC;
00149 
00150   //For Duplication
00151   MonitorElement * histoRPC2;
00152   MonitorElement * histoDT2;
00153   MonitorElement * histoRealRPC2;
00154   MonitorElement * histoCSC2;
00155   //  MonitorElement * BXDistribution2;
00156 
00157 
00158   //Eff Global Barrel
00159   MonitorElement * EffGlobWm2;
00160   MonitorElement * EffGlobWm1;
00161   MonitorElement * EffGlobW0;
00162   MonitorElement * EffGlobW1;
00163   MonitorElement * EffGlobW2;
00164  
00165   //MonitorElement * EffGlobWm2far;
00166   //MonitorElement * EffGlobWm1far;
00167   //MonitorElement * EffGlobW0far;
00168   //MonitorElement * EffGlobW1far;
00169   //MonitorElement * EffGlobW2far;
00170 
00171  /*  //BX Barrel  */
00172 /*   MonitorElement * BXGlobWm2; */
00173 /*   MonitorElement * BXGlobWm1; */
00174 /*   MonitorElement * BXGlobW0; */
00175 /*   MonitorElement * BXGlobW1; */
00176 /*   MonitorElement * BXGlobW2; */
00177   
00178 /*   MonitorElement * BXGlobWm2far; */
00179 /*   MonitorElement * BXGlobWm1far; */
00180 /*   MonitorElement * BXGlobW0far; */
00181 /*   MonitorElement * BXGlobW1far; */
00182 /*   MonitorElement * BXGlobW2far; */
00183   
00184   //Masked Barrel
00185   //MonitorElement * MaskedGlobWm2;
00186   //MonitorElement * MaskedGlobWm1;
00187   //MonitorElement * MaskedGlobW0;
00188   //MonitorElement * MaskedGlobW1;
00189   //MonitorElement * MaskedGlobW2;
00190   
00191   //MonitorElement * MaskedGlobWm2far;
00192   //MonitorElement * MaskedGlobWm1far;
00193   //MonitorElement * MaskedGlobW0far;
00194   //MonitorElement * MaskedGlobW1far;
00195   //MonitorElement * MaskedGlobW2far;
00196 
00197   //Average Eff Barrel 
00198   //MonitorElement * AverageEffWm2;
00199   //MonitorElement * AverageEffWm1;
00200   //MonitorElement * AverageEffW0;
00201   //MonitorElement * AverageEffW1;
00202   //MonitorElement * AverageEffW2;
00203 
00204   //MonitorElement * AverageEffWm2far;
00205   //MonitorElement * AverageEffWm1far;
00206   //MonitorElement * AverageEffW0far;
00207   //MonitorElement * AverageEffW1far;
00208   //MonitorElement * AverageEffW2far;
00209 
00210   //No Prediction Barrel 
00211   //MonitorElement * NoPredictionWm2;
00212   //MonitorElement * NoPredictionWm1;
00213   //MonitorElement * NoPredictionW0;
00214   //MonitorElement * NoPredictionW1;
00215   //MonitorElement * NoPredictionW2;
00216 
00217   //MonitorElement * NoPredictionWm2far;
00218   //MonitorElement * NoPredictionWm1far;
00219   //MonitorElement * NoPredictionW0far;
00220   //MonitorElement * NoPredictionW1far;
00221   //MonitorElement * NoPredictionW2far;
00222 
00223   //Eff Distro Barrel
00224   MonitorElement * EffDistroWm2;
00225   MonitorElement * EffDistroWm1;
00226   MonitorElement * EffDistroW0;
00227   MonitorElement * EffDistroW1;
00228   MonitorElement * EffDistroW2;
00229 
00230   //MonitorElement * EffDistroWm2far;
00231   //MonitorElement * EffDistroWm1far;
00232   //MonitorElement * EffDistroW0far;
00233   //MonitorElement * EffDistroW1far;
00234   //MonitorElement * EffDistroW2far;
00235  
00236 
00237   //Eff Global EndCap
00238 
00239   MonitorElement * EffGlobDm3;
00240   MonitorElement * EffGlobDm2;
00241   MonitorElement * EffGlobDm1;
00242   MonitorElement * EffGlobD1;
00243   MonitorElement * EffGlobD2;
00244   MonitorElement * EffGlobD3;
00245 
00246   //MonitorElement * EffGlobDm3far;
00247   //MonitorElement * EffGlobDm2far;
00248   //MonitorElement * EffGlobDm1far;
00249   //MonitorElement * EffGlobD1far;
00250   //MonitorElement * EffGlobD2far;
00251   //MonitorElement * EffGlobD3far;
00252 
00253   //BX EndCap
00254 /*   MonitorElement * BXGlobDm3; */
00255 /*   MonitorElement * BXGlobDm2; */
00256 /*   MonitorElement * BXGlobDm1; */
00257 /*   MonitorElement * BXGlobD1; */
00258 /*   MonitorElement * BXGlobD2; */
00259 /*   MonitorElement * BXGlobD3; */
00260   
00261 /*   MonitorElement * BXGlobDm3far; */
00262 /*   MonitorElement * BXGlobDm2far; */
00263 /*   MonitorElement * BXGlobDm1far; */
00264 /*   MonitorElement * BXGlobD1far; */
00265 /*   MonitorElement * BXGlobD2far; */
00266 /*   MonitorElement * BXGlobD3far; */
00267 
00268   //Masked EndCap
00269   //MonitorElement * MaskedGlobDm3;
00270   //MonitorElement * MaskedGlobDm2;
00271   //MonitorElement * MaskedGlobDm1;
00272   //MonitorElement * MaskedGlobD1;
00273   //MonitorElement * MaskedGlobD2;
00274   //MonitorElement * MaskedGlobD3;
00275   
00276   //MonitorElement * MaskedGlobDm3far;
00277   //MonitorElement * MaskedGlobDm2far;
00278   //MonitorElement * MaskedGlobDm1far;
00279   //MonitorElement * MaskedGlobD1far;
00280   //MonitorElement * MaskedGlobD2far;
00281   //MonitorElement * MaskedGlobD3far;
00282 
00283   //Average Eff EndCap
00284   //MonitorElement * AverageEffDm3;
00285   //MonitorElement * AverageEffDm2;
00286   //MonitorElement * AverageEffDm1;
00287   //MonitorElement * AverageEffD1;
00288   //MonitorElement * AverageEffD2;
00289   //MonitorElement * AverageEffD3;
00290 
00291   //MonitorElement * AverageEffDm3far;
00292   //MonitorElement * AverageEffDm2far;
00293   //MonitorElement * AverageEffDm1far;
00294   //MonitorElement * AverageEffD1far;
00295   //MonitorElement * AverageEffD2far;
00296   //MonitorElement * AverageEffD3far;
00297 
00298   //No Prediction EndCap
00299   //MonitorElement * NoPredictionDm3;
00300   //MonitorElement * NoPredictionDm2;
00301   //MonitorElement * NoPredictionDm1;
00302   //MonitorElement * NoPredictionD1;
00303   //MonitorElement * NoPredictionD2;
00304   //MonitorElement * NoPredictionD3;
00305 
00306   //MonitorElement * NoPredictionDm3far;
00307   //MonitorElement * NoPredictionDm2far;
00308   //MonitorElement * NoPredictionDm1far;
00309   //MonitorElement * NoPredictionD1far;
00310   //MonitorElement * NoPredictionD2far;
00311   //MonitorElement * NoPredictionD3far;
00312 
00313   //EffDistro EndCap
00314   MonitorElement * EffDistroDm3;
00315   MonitorElement * EffDistroDm2;
00316   MonitorElement * EffDistroDm1;
00317   MonitorElement * EffDistroD1;
00318   MonitorElement * EffDistroD2;
00319   MonitorElement * EffDistroD3;
00320 
00321   //MonitorElement * EffDistroDm3far;
00322   //MonitorElement * EffDistroDm2far;
00323   //MonitorElement * EffDistroDm1far;
00324   //MonitorElement * EffDistroD1far;
00325   //MonitorElement * EffDistroD2far;
00326   //MonitorElement * EffDistroD3far;
00327 
00328   //Summary Histograms.
00329   MonitorElement * Wheelm2Summary;
00330   MonitorElement * Wheelm1Summary; 
00331   MonitorElement * Wheel0Summary; 
00332   MonitorElement * Wheel1Summary; 
00333   MonitorElement * Wheel2Summary; 
00334 
00335   MonitorElement * Diskm3Summary;
00336   MonitorElement * Diskm2Summary;
00337   MonitorElement * Diskm1Summary;
00338   MonitorElement * Disk1Summary;
00339   MonitorElement * Disk2Summary;
00340   MonitorElement * Disk3Summary;
00341 
00342   //Azimultal Plots
00343 
00344   MonitorElement *  sectorEffWm2;  
00345   MonitorElement * sectorEffWm1;  
00346   MonitorElement * sectorEffW0;  
00347   MonitorElement * sectorEffW1;  
00348   MonitorElement * sectorEffW2;  
00349 
00350   MonitorElement *  OcsectorEffWm2;  
00351   MonitorElement * OcsectorEffWm1;  
00352   MonitorElement * OcsectorEffW0;  
00353   MonitorElement * OcsectorEffW1;  
00354   MonitorElement * OcsectorEffW2;  
00355 
00356   MonitorElement * ExsectorEffWm2;  
00357   MonitorElement * ExsectorEffWm1;  
00358   MonitorElement * ExsectorEffW0;  
00359   MonitorElement * ExsectorEffW1;  
00360   MonitorElement * ExsectorEffW2;  
00361 
00362   MonitorElement * GregD1R2;  
00363   MonitorElement * GregD1R3;  
00364   MonitorElement * GregD2R2;  
00365   MonitorElement * GregD2R3;  
00366   MonitorElement * GregD3R2;  
00367   MonitorElement * GregD3R3;  
00368   MonitorElement * GregDm1R2;  
00369   MonitorElement * GregDm1R3;  
00370   MonitorElement * GregDm2R2;  
00371   MonitorElement * GregDm2R3;  
00372   MonitorElement * GregDm3R2;  
00373   MonitorElement * GregDm3R3;  
00374 
00375   MonitorElement * OcGregD1R2;  
00376   MonitorElement * OcGregD1R3;  
00377   MonitorElement * OcGregD2R2;  
00378   MonitorElement * OcGregD2R3;  
00379   MonitorElement * OcGregD3R2;  
00380   MonitorElement * OcGregD3R3;  
00381   MonitorElement * OcGregDm1R2;  
00382   MonitorElement * OcGregDm1R3;  
00383   MonitorElement * OcGregDm2R2;  
00384   MonitorElement * OcGregDm2R3;  
00385   MonitorElement * OcGregDm3R2;  
00386   MonitorElement * OcGregDm3R3;  
00387 
00388   MonitorElement * ExGregD1R2;  
00389   MonitorElement * ExGregD1R3;  
00390   MonitorElement * ExGregD2R2;  
00391   MonitorElement * ExGregD2R3;  
00392   MonitorElement * ExGregD3R2;  
00393   MonitorElement * ExGregD3R3;  
00394   MonitorElement * ExGregDm1R2;  
00395   MonitorElement * ExGregDm1R3;  
00396   MonitorElement * ExGregDm2R2;  
00397   MonitorElement * ExGregDm2R3;  
00398   MonitorElement * ExGregDm3R2;  
00399   MonitorElement * ExGregDm3R3;  
00400 
00401   MonitorElement * ExpLayerWm2;
00402   MonitorElement * ExpLayerWm1;
00403   MonitorElement * ExpLayerW0;
00404   MonitorElement * ExpLayerW1;
00405   MonitorElement * ExpLayerW2;
00406 
00407   MonitorElement * ObsLayerWm2;
00408   MonitorElement * ObsLayerWm1;
00409   MonitorElement * ObsLayerW0;
00410   MonitorElement * ObsLayerW1;
00411   MonitorElement * ObsLayerW2;
00412 
00413 
00414   
00415  private:
00416   virtual void beginRun(const edm::Run&, const edm::EventSetup& iSetup) ;
00417   virtual void analyze(const edm::Event&, const edm::EventSetup&);
00418   virtual void endJob() ;
00419   virtual void endRun(const edm::Run& , const edm::EventSetup& );
00420 
00421   std::map<std::string, MonitorElement*> bookDetUnitSeg(RPCDetId & detId,int nstrips,std::string folder);
00422   std::map<int, std::map<std::string, MonitorElement*> >  meCollection;
00423   
00424   bool debug;
00425   bool endcap;
00426   bool barrel;
00427   bool SaveFile;
00428   std::string NameFile;
00429   std::string folderPath;
00430   
00431   DQMStore * dbe;
00432   
00433 };
00434