CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RPCEfficiencySecond.cc
Go to the documentation of this file.
1 /***************************************
2 Author:
3 Camilo Carrillo
4 Universidad de los Andes Bogota Colombia
5 camilo.carrilloATcern.ch
6 ****************************************/
7 
8 #include <memory>
9 
10 // user include files
13 
16 
23 
26 
28 
29 #include<string>
30 #include<fstream>
31 #include<iostream>
32 #include <vector>
35 
36 #include "TH1F.h"
37 
38 int RPCEfficiencySecond::rollY(std::string shortname,std::vector<std::string> rollNames){
39  int myy=0;
40  for(int i=1;i<22;i++){
41  //std::cout<<"In map="<<rollNames[i]<<" shortname="<<shortname<<std::endl;
42  if(rollNames[i].compare(shortname)==0){
43  myy=i;
44  return myy;
45  }
46  }
47  if(myy==0){
48  if(debug) std::cout<<"Problem with "<<shortname<<std::endl;
49  }
50  return myy;
51 }
52 
53 
55  SaveFile = iConfig.getUntrackedParameter<bool>("SaveFile", false);
56  NameFile = iConfig.getUntrackedParameter<std::string>("NameFile","RPCEfficiency.root");
57  folderPath = iConfig.getUntrackedParameter<std::string>("folderPath","RPC/RPCEfficiency/");
58  debug = iConfig.getUntrackedParameter<bool>("debug",false);
59  barrel = iConfig.getUntrackedParameter<bool>("barrel");
60  endcap = iConfig.getUntrackedParameter<bool>("endcap");
61 }
62 
64 
66 
68 
69  if(debug) std::cout<<"Booking Residuals Barrel"<<std::endl;
70  dbe->setCurrentFolder(folderPath+"ResidualsBarrel/");
71 
72  //Barrel
73  hGlobal2ResClu1La1 = dbe->book1D("GlobalResidualsClu1La1","RPC Residuals Layer 1 Cluster Size 1",101,-10.,10.);
74  hGlobal2ResClu1La2 = dbe->book1D("GlobalResidualsClu1La2","RPC Residuals Layer 2 Cluster Size 1",101,-10.,10.);
75  hGlobal2ResClu1La3 = dbe->book1D("GlobalResidualsClu1La3","RPC Residuals Layer 3 Cluster Size 1",101,-10.,10.);
76  hGlobal2ResClu1La4 = dbe->book1D("GlobalResidualsClu1La4","RPC Residuals Layer 4 Cluster Size 1",101,-10.,10.);
77  hGlobal2ResClu1La5 = dbe->book1D("GlobalResidualsClu1La5","RPC Residuals Layer 5 Cluster Size 1",101,-10.,10.);
78  hGlobal2ResClu1La6 = dbe->book1D("GlobalResidualsClu1La6","RPC Residuals Layer 6 Cluster Size 1",101,-10.,10.);
79 
80  hGlobal2ResClu2La1 = dbe->book1D("GlobalResidualsClu2La1","RPC Residuals Layer 1 Cluster Size 2",101,-10.,10.);
81  hGlobal2ResClu2La2 = dbe->book1D("GlobalResidualsClu2La2","RPC Residuals Layer 2 Cluster Size 2",101,-10.,10.);
82  hGlobal2ResClu2La3 = dbe->book1D("GlobalResidualsClu2La3","RPC Residuals Layer 3 Cluster Size 2",101,-10.,10.);
83  hGlobal2ResClu2La4 = dbe->book1D("GlobalResidualsClu2La4","RPC Residuals Layer 4 Cluster Size 2",101,-10.,10.);
84  hGlobal2ResClu2La5 = dbe->book1D("GlobalResidualsClu2La5","RPC Residuals Layer 5 Cluster Size 2",101,-10.,10.);
85  hGlobal2ResClu2La6 = dbe->book1D("GlobalResidualsClu2La6","RPC Residuals Layer 6 Cluster Size 2",101,-10.,10.);
86 
87  hGlobal2ResClu3La1 = dbe->book1D("GlobalResidualsClu3La1","RPC Residuals Layer 1 Cluster Size 3",101,-10.,10.);
88  hGlobal2ResClu3La2 = dbe->book1D("GlobalResidualsClu3La2","RPC Residuals Layer 2 Cluster Size 3",101,-10.,10.);
89  hGlobal2ResClu3La3 = dbe->book1D("GlobalResidualsClu3La3","RPC Residuals Layer 3 Cluster Size 3",101,-10.,10.);
90  hGlobal2ResClu3La4 = dbe->book1D("GlobalResidualsClu3La4","RPC Residuals Layer 4 Cluster Size 3",101,-10.,10.);
91  hGlobal2ResClu3La5 = dbe->book1D("GlobalResidualsClu3La5","RPC Residuals Layer 5 Cluster Size 3",101,-10.,10.);
92  hGlobal2ResClu3La6 = dbe->book1D("GlobalResidualsClu3La6","RPC Residuals Layer 6 Cluster Size 3",101,-10.,10.);
93 
94  if(debug) std::cout<<"Booking Residuals EndCaps"<<std::endl;
95  dbe->setCurrentFolder(folderPath+"ResidualsEndCaps/");
96 
97  //Endcap
98  hGlobal2ResClu1R3C = dbe->book1D("GlobalResidualsClu1R3C","RPC Residuals Ring 3 Roll C Cluster Size 1",101,-10.,10.);
99  hGlobal2ResClu1R3B = dbe->book1D("GlobalResidualsClu1R3B","RPC Residuals Ring 3 Roll B Cluster Size 1",101,-10.,10.);
100  hGlobal2ResClu1R3A = dbe->book1D("GlobalResidualsClu1R3A","RPC Residuals Ring 3 Roll A Cluster Size 1",101,-10.,10.);
101  hGlobal2ResClu1R2C = dbe->book1D("GlobalResidualsClu1R2C","RPC Residuals Ring 2 Roll C Cluster Size 1",101,-10.,10.);
102  hGlobal2ResClu1R2B = dbe->book1D("GlobalResidualsClu1R2B","RPC Residuals Ring 2 Roll B Cluster Size 1",101,-10.,10.);
103  hGlobal2ResClu1R2A = dbe->book1D("GlobalResidualsClu1R2A","RPC Residuals Ring 2 Roll A Cluster Size 1",101,-10.,10.);
104 
105  hGlobal2ResClu2R3C = dbe->book1D("GlobalResidualsClu2R3C","RPC Residuals Ring 3 Roll C Cluster Size 2",101,-10.,10.);
106  hGlobal2ResClu2R3B = dbe->book1D("GlobalResidualsClu2R3B","RPC Residuals Ring 3 Roll B Cluster Size 2",101,-10.,10.);
107  hGlobal2ResClu2R3A = dbe->book1D("GlobalResidualsClu2R3A","RPC Residuals Ring 3 Roll A Cluster Size 2",101,-10.,10.);
108  hGlobal2ResClu2R2C = dbe->book1D("GlobalResidualsClu2R2C","RPC Residuals Ring 2 Roll C Cluster Size 2",101,-10.,10.);
109  hGlobal2ResClu2R2B = dbe->book1D("GlobalResidualsClu2R2B","RPC Residuals Ring 2 Roll B Cluster Size 2",101,-10.,10.);
110  hGlobal2ResClu2R2A = dbe->book1D("GlobalResidualsClu2R2A","RPC Residuals Ring 2 Roll A Cluster Size 2",101,-10.,10.);
111 
112  hGlobal2ResClu3R3C = dbe->book1D("GlobalResidualsClu3R3C","RPC Residuals Ring 3 Roll C Cluster Size 3",101,-10.,10.);
113  hGlobal2ResClu3R3B = dbe->book1D("GlobalResidualsClu3R3B","RPC Residuals Ring 3 Roll B Cluster Size 3",101,-10.,10.);
114  hGlobal2ResClu3R3A = dbe->book1D("GlobalResidualsClu3R3A","RPC Residuals Ring 3 Roll A Cluster Size 3",101,-10.,10.);
115  hGlobal2ResClu3R2C = dbe->book1D("GlobalResidualsClu3R2C","RPC Residuals Ring 2 Roll C Cluster Size 3",101,-10.,10.);
116  hGlobal2ResClu3R2B = dbe->book1D("GlobalResidualsClu3R2B","RPC Residuals Ring 2 Roll B Cluster Size 3",101,-10.,10.);
117  hGlobal2ResClu3R2A = dbe->book1D("GlobalResidualsClu3R2A","RPC Residuals Ring 2 Roll A Cluster Size 3",101,-10.,10.);
118 
119  if(debug) std::cout<<"Booking EffDistros"<<std::endl;
121 
122  if(debug) std::cout<<"Booking statistcs2"<<std::endl;
124  statistics2 = dbe->book1D("AllStatistics","Analyzed Events DT and CSC Segments",33,0.5,33.5);
125 
126  //Barrel
127 
128  dbe->setCurrentFolder(folderPath+"Wheel_-2");
129  EffDistroWm2=dbe->book1D("EffDistroWheel_-2near","Efficiency Distribution for Near Side Wheel -2 ",20,0.5,100.5);
130  EffDistroWm2far=dbe->book1D("EffDistroWheel_-2far","Efficiency Distribution for Far Side Wheel -2 ",20,0.5,100.5);
131  EffGlobWm2=dbe->book1D("GlobEfficiencyWheel_-2near","Efficiency Near Side Wheel -2 ",101,0.5,101.5);
132  EffGlobWm2far=dbe->book1D("GlobEfficiencyWheel_-2far","Efficiency Far Side Wheel -2",105,0.5,105.5);
133  BXGlobWm2= dbe->book1D("GlobBXWheel_-2near","BX Near Side Wheel -2",101,0.5,101.5);
134  BXGlobWm2far= dbe->book1D("GlobBXWheel_-2far","BX Far Side Wheel -2",105,0.5,105.5);
135  MaskedGlobWm2= dbe->book1D("GlobMaskedWheel_-2near","Masked Near Side Wheel -2",101,0.5,101.5);
136  MaskedGlobWm2far= dbe->book1D("GlobMaskedWheel_-2far","Masked Far Side Wheel -2",105,0.5,105.5);
137  AverageEffWm2=dbe->book1D("AverageEfficiencyWheel_-2near","Average Efficiency Near Side Wheel -2 ",101,0.5,101.5);
138  AverageEffWm2far =dbe->book1D("AverageEfficiencyWheel_-2far","Average Efficiency Far Side Wheel -2 ",105,0.5,105.5);
139  NoPredictionWm2=dbe->book1D("NoPredictionWheel_-2near","No Predictions Near Side Wheel -2 ",101,0.5,101.5);
140  NoPredictionWm2far=dbe->book1D("NoPredictionWheel_-2far","No Predictions Efficiency Far Side Wheel -2 ",105,0.5,105.5);
141 
142  dbe->setCurrentFolder(folderPath+"Wheel_-1");
143  EffDistroWm1=dbe->book1D("EffDistroWheel_-1near","Efficiency Distribution for Near Side Wheel -1 ",20,0.5,100.5);
144  EffDistroWm1far=dbe->book1D("EffDistroWheel_-1far","Efficiency Distribution for Far Side Wheel -1 ",20,0.5,100.5);
145  EffGlobWm1= dbe->book1D("GlobEfficiencyWheel_-1near","Efficiency Near Side Wheel -1",101,0.5,101.5);
146  EffGlobWm1far=dbe->book1D("GlobEfficiencyWheel_-1far","Efficiency Far Side Wheel -1",105,0.5,105.5);
147  BXGlobWm1= dbe->book1D("GlobBXWheel_-1near","BX Near Side Wheel -1",101,0.5,101.5);
148  BXGlobWm1far= dbe->book1D("GlobBXWheel_-1far","BX Far Side Wheel -1",105,0.5,105.5);
149  MaskedGlobWm1= dbe->book1D("GlobMaskedWheel_-1near","Masked Near Side Wheel -1",101,0.5,101.5);
150  MaskedGlobWm1far= dbe->book1D("GlobMaskedWheel_-1far","Masked Far Side Wheel -1",105,0.5,105.5);
151  AverageEffWm1=dbe->book1D("AverageEfficiencyWheel_-1near","Average Efficiency Near Side Wheel -1 ",101,0.5,101.5);
152  AverageEffWm1far=dbe->book1D("AverageEfficiencyWheel_-1far","Average Efficiency Far Side Wheel -1 ",105,0.5,105.5);
153  NoPredictionWm1=dbe->book1D("NoPredictionWheel_-1near","No Predictions Near Side Wheel -1 ",101,0.5,101.5);
154  NoPredictionWm1far=dbe->book1D("NoPredictionWheel_-1far","No Predictions Efficiency Far Side Wheel -1 ",105,0.5,105.5);
155 
156  dbe->setCurrentFolder(folderPath+"Wheel_0");
157  EffDistroW0=dbe->book1D("EffDistroWheel_0near","Efficiency Distribution for Near Side Wheel 0 ",20,0.5,100.5);
158  EffDistroW0far=dbe->book1D("EffDistroWheel_0far","Efficiency Distribution for Far Side Wheel 0 ",20,0.5,100.5);
159  EffGlobW0 = dbe->book1D("GlobEfficiencyWheel_0near","Efficiency Near Side Wheel 0",101,0.5,101.5);
160  EffGlobW0far =dbe->book1D("GlobEfficiencyWheel_0far","Efficiency Far Side Wheel 0",105,0.5,105.5);
161  BXGlobW0 = dbe->book1D("GlobBXWheel_0near","BX Near Side Wheel 0",101,0.5,101.5);
162  BXGlobW0far = dbe->book1D("GlobBXWheel_0far","BX Far Side Wheel 0",105,0.5,105.5);
163  MaskedGlobW0 = dbe->book1D("GlobMaskedWheel_0near","Masked Near Side Wheel 0",101,0.5,101.5);
164  MaskedGlobW0far = dbe->book1D("GlobMaskedWheel_0far","Masked Far Side Wheel 0",105,0.5,105.5);
165  AverageEffW0=dbe->book1D("AverageEfficiencyWheel_0near","Average Efficiency Near Side Wheel 0 ",101,0.5,101.5);
166  AverageEffW0far=dbe->book1D("AverageEfficiencyWheel_0far","Average Efficiency Far Side Wheel 0 ",105,0.5,105.5);
167  NoPredictionW0=dbe->book1D("NoPredictionWheel_0near","No Predictions Near Side Wheel 0 ",101,0.5,101.5);
168  NoPredictionW0far=dbe->book1D("NoPredictionWheel_0far","No Predictions Efficiency Far Side Wheel 0 ",105,0.5,105.5);
169 
170  dbe->setCurrentFolder(folderPath+"Wheel_1");
171  EffDistroW1=dbe->book1D("EffDistroWheel_1near","Efficiency Distribution for Near Side Wheel 1 ",20,0.5,100.5);
172  EffDistroW1far=dbe->book1D("EffDistroWheel_1far","Efficiency Distribution for Far Side Wheel 1 ",20,0.5,100.5);
173  EffGlobW1 = dbe->book1D("GlobEfficiencyWheel_1near","Efficiency Near Side Wheel 1",101,0.5,101.5);
174  EffGlobW1far =dbe->book1D("GlobEfficiencyWheel_1far","Efficiency Far Side Wheel 1",105,0.5,105.5);
175  BXGlobW1 = dbe->book1D("GlobBXWheel_1near","BX Near Side Wheel 1",101,0.5,101.5);
176  BXGlobW1far = dbe->book1D("GlobBXWheel_1far","BX Far Side Wheel 1",105,0.5,105.5);
177  MaskedGlobW1 = dbe->book1D("GlobMaskedWheel_1near","Masked Near Side Wheel 1",101,0.5,101.5);
178  MaskedGlobW1far = dbe->book1D("GlobMaskedWheel_1far","Masked Far Side Wheel 1",105,0.5,105.5);
179  AverageEffW1=dbe->book1D("AverageEfficiencyWheel_1near","Average Efficiency Near Side Wheel 1 ",101,0.5,101.5);
180  AverageEffW1far=dbe->book1D("AverageEfficiencyWheel_1far","Average Efficiency Far Side Wheel 1 ",105,0.5,105.5);
181  NoPredictionW1=dbe->book1D("NoPredictionWheel_1near","No Predictions Near Side Wheel 1 ",101,0.5,101.5);
182  NoPredictionW1far=dbe->book1D("NoPredictionWheel_1far","No Predictions Efficiency Far Side Wheel 1 ",105,0.5,105.5);
183 
184  dbe->setCurrentFolder(folderPath+"Wheel_2");
185  EffDistroW2=dbe->book1D("EffDistroWheel_2near","Efficiency Distribution for Near Side Wheel 2 ",20,0.5,100.5);
186  EffDistroW2far=dbe->book1D("EffDistroWheel_2far","Efficiency Distribution for Far Side Wheel 2 ",20,0.5,100.5);
187  EffGlobW2 = dbe->book1D("GlobEfficiencyWheel_2near","Efficiency Near Side Wheel 2",101,0.5,101.5);
188  EffGlobW2far =dbe->book1D("GlobEfficiencyWheel_2far","Efficiency Far Side Wheel 2",105,0.5,105.5);
189  BXGlobW2 = dbe->book1D("GlobBXWheel_2near","BX Near Side Wheel 2",101,0.5,101.5);
190  BXGlobW2far = dbe->book1D("GlobBXWheel_2far","BX Far Side Wheel 2",105,0.5,105.5);
191  MaskedGlobW2 = dbe->book1D("GlobMaskedWheel_2near","Masked Near Side Wheel 2",101,0.5,101.5);
192  MaskedGlobW2far = dbe->book1D("GlobMaskedWheel_2far","Masked Far Side Wheel 2",105,0.5,105.5);
193  AverageEffW2=dbe->book1D("AverageEfficiencyWheel_2near","Average Efficiency Near Side Wheel 2 ",101,0.5,101.5);
194  AverageEffW2far=dbe->book1D("AverageEfficiencyWheel_2far","Average Efficiency Far Side Wheel 2 ",105,0.5,105.5);
195  NoPredictionW2=dbe->book1D("NoPredictionWheel_2near","No Predictions Near Side Wheel 2 ",101,0.5,101.5);
196  NoPredictionW2far=dbe->book1D("NoPredictionWheel_2far","No Predictions Efficiency Far Side Wheel 2 ",105,0.5,105.5);
197 
198  //EndCap
199 
200  dbe->setCurrentFolder(folderPath+"Disk_3");
201  EffDistroD3=dbe->book1D("EffDistroDisk_3near","Efficiency Distribution Near Side Disk 3 ",20,0.5,100.5);
202  EffDistroD3far=dbe->book1D("EffDistroDisk_3far","Efficiency Distribution Far Side Disk 3 ",20,0.5,100.5);
203  EffGlobD3 = dbe->book1D("GlobEfficiencyDisk_3near","Efficiency Near Side Disk 3",109,0.5,109.5);
204  EffGlobD3far =dbe->book1D("GlobEfficiencyDisk_3far","Efficiency Far Side Disk 3",109,0.5,109.5);
205  BXGlobD3 = dbe->book1D("GlobBXDisk_3near","BX Near Side Disk 3",109,0.5,109.5);
206  BXGlobD3far = dbe->book1D("GlobBXDisk_3far","BX Far Side Disk 3",109,0.5,109.5);
207  MaskedGlobD3 = dbe->book1D("GlobMaskedDisk_3near","Masked Near Side Disk 3",109,0.5,109.5);
208  MaskedGlobD3far = dbe->book1D("GlobMaskedDisk_3far","Masked Far Side Disk 3",109,0.5,109.5);
209  AverageEffD3=dbe->book1D("AverageEfficiencyDisk_3near","Average Efficiency Near Side Disk 3 ",109,0.5,109.5);
210  AverageEffD3far=dbe->book1D("AverageEfficiencyDisk_3far","Average Efficiency Far Side Disk 3 ",109,0.5,109.5);
211  NoPredictionD3=dbe->book1D("NoPredictionDisk_3near","No Predictions Near Side Disk 3 ",109,0.5,109.5);
212  NoPredictionD3far=dbe->book1D("NoPredictionDisk_3far","No Predictions Efficiency Far Side Disk 3 ",109,0.5,109.5);
213 
214  dbe->setCurrentFolder(folderPath+"Disk_2");
215  EffDistroD2=dbe->book1D("EffDistroDisk_2near","Efficiency Distribution Near Side Disk 2 ",20,0.5,100.5);
216  EffDistroD2far=dbe->book1D("EffDistroDisk_2far","Efficiency Distribution Far Side Disk 2 ",20,0.5,100.5);
217  EffGlobD2 = dbe->book1D("GlobEfficiencyDisk_2near","Efficiency Near Side Disk 2",109,0.5,109.5);
218  EffGlobD2far =dbe->book1D("GlobEfficiencyDisk_2far","Efficiency Far Side Disk 2",109,0.5,109.5);
219  BXGlobD2 = dbe->book1D("GlobBXDisk_2near","BX Near Side Disk 2",109,0.5,109.5);
220  BXGlobD2far = dbe->book1D("GlobBXDisk_2far","BX Far Side Disk 2",109,0.5,109.5);
221  MaskedGlobD2 = dbe->book1D("GlobMaskedDisk_2near","Masked Near Side Disk 2",109,0.5,109.5);
222  MaskedGlobD2far = dbe->book1D("GlobMaskedDisk_2far","Masked Far Side Disk 2",109,0.5,109.5);
223  AverageEffD2=dbe->book1D("AverageEfficiencyDisk_2near","Average Efficiency Near Side Disk 2 ",109,0.5,109.5);
224  AverageEffD2far=dbe->book1D("AverageEfficiencyDisk_2far","Average Efficiency Far Side Disk 2 ",109,0.5,109.5);
225  NoPredictionD2=dbe->book1D("NoPredictionDisk_2near","No Predictions Near Side Disk 2 ",109,0.5,109.5);
226  NoPredictionD2far=dbe->book1D("NoPredictionDisk_2far","No Predictions Efficiency Far Side Disk 2 ",109,0.5,109.5);
227 
228  dbe->setCurrentFolder(folderPath+"Disk_1");
229  EffDistroD1=dbe->book1D("EffDistroDisk_1near","Efficiency Distribution Near Side Disk 1 ",20,0.5,100.5);
230  EffDistroD1far=dbe->book1D("EffDistroDisk_1far","Efficiency Distribution Far Side Disk 1 ",20,0.5,100.5);
231  EffGlobD1 = dbe->book1D("GlobEfficiencyDisk_1near","Efficiency Near Side Disk 1",109,0.5,109.5);
232  EffGlobD1far =dbe->book1D("GlobEfficiencyDisk_1far","Efficiency Far Side Disk 1",109,0.5,109.5);
233  BXGlobD1 = dbe->book1D("GlobBXDisk_1near","BX Near Side Disk 1",109,0.5,109.5);
234  BXGlobD1far = dbe->book1D("GlobBXDisk_1far","BX Far Side Disk 1",109,0.5,109.5);
235  MaskedGlobD1 = dbe->book1D("GlobMaskedDisk_1near","Masked Near Side Disk 1",109,0.5,109.5);
236  MaskedGlobD1far = dbe->book1D("GlobMaskedDisk_1far","Masked Far Side Disk 1",109,0.5,109.5);
237  AverageEffD1=dbe->book1D("AverageEfficiencyDisk_1near","Average Efficiency Near Side Disk 1 ",109,0.5,109.5);
238  AverageEffD1far=dbe->book1D("AverageEfficiencyDisk_1far","Average Efficiency Far Side Disk 1 ",109,0.5,109.5);
239  NoPredictionD1=dbe->book1D("NoPredictionDisk_1near","No Predictions Near Side Disk 1 ",109,0.5,109.5);
240  NoPredictionD1far=dbe->book1D("NoPredictionDisk_1far","No Predictions Efficiency Far Side Disk 1 ",109,0.5,109.5);
241 
242  dbe->setCurrentFolder(folderPath+"Disk_-1");
243  EffDistroDm1=dbe->book1D("EffDistroDisk_m1near","Efficiency Distribution Near Side Disk - 1 ",20,0.5,100.5);
244  EffDistroDm1far=dbe->book1D("EffDistroDisk_m1far","Efficiency Distribution Far Side Disk - 1 ",20,0.5,100.5);
245  EffGlobDm1 = dbe->book1D("GlobEfficiencyDisk_m1near","Efficiency Near Side Disk -1",109,0.5,109.5);
246  EffGlobDm1far =dbe->book1D("GlobEfficiencyDisk_m1far","Efficiency Far Side Disk -1",109,0.5,109.5);
247  BXGlobDm1 = dbe->book1D("GlobBXDisk_m1near","BX Near Side Disk -1",109,0.5,109.5);
248  BXGlobDm1far = dbe->book1D("GlobBXDisk_m1far","BX Far Side Disk -1",109,0.5,109.5);
249  MaskedGlobDm1 = dbe->book1D("GlobMaskedDisk_m1near","Masked Near Side Disk -1",109,0.5,109.5);
250  MaskedGlobDm1far = dbe->book1D("GlobMaskedDisk_m1far","Masked Far Side Disk -1",109,0.5,109.5);
251  AverageEffDm1=dbe->book1D("AverageEfficiencyDisk_m1near","Average Efficiency Near Side Disk -1 ",109,0.5,109.5);
252  AverageEffDm1far=dbe->book1D("AverageEfficiencyDisk_m1far","Average Efficiency Far Side Disk -1 ",109,0.5,109.5);
253  NoPredictionDm1=dbe->book1D("NoPredictionDisk_m1near","No Predictions Near Side Disk -1 ",109,0.5,109.5);
254  NoPredictionDm1far=dbe->book1D("NoPredictionDisk_m1far","No Predictions Efficiency Far Side Disk -1 ",109,0.5,109.5);
255 
256  dbe->setCurrentFolder(folderPath+"Disk_-2");
257  EffDistroDm2=dbe->book1D("EffDistroDisk_m2near","Efficiency Distribution Near Side Disk - 2 ",20,0.5,100.5);
258  EffDistroDm2far=dbe->book1D("EffDistroDisk_m2far","Efficiency Distribution Far Side Disk - 2 ",20,0.5,100.5);
259  EffGlobDm2 = dbe->book1D("GlobEfficiencyDisk_m2near","Efficiency Near Side Disk -2",109,0.5,109.5);
260  EffGlobDm2far =dbe->book1D("GlobEfficiencyDisk_m2far","Efficiency Far Side Disk -2",109,0.5,109.5);
261  BXGlobDm2 = dbe->book1D("GlobBXDisk_m2near","BX Near Side Disk -2",109,0.5,109.5);
262  BXGlobDm2far = dbe->book1D("GlobBXDisk_m2far","BX Far Side Disk -2",109,0.5,109.5);
263  MaskedGlobDm2 = dbe->book1D("GlobMaskedDisk_m2near","Masked Near Side Disk -2",109,0.5,109.5);
264  MaskedGlobDm2far = dbe->book1D("GlobMaskedDisk_m2far","Masked Far Side Disk -2",109,0.5,109.5);
265  AverageEffDm2=dbe->book1D("AverageEfficiencyDisk_m2near","Average Efficiency Near Side Disk -2 ",109,0.5,109.5);
266  AverageEffDm2far=dbe->book1D("AverageEfficiencyDisk_m2far","Average Efficiency Far Side Disk -2 ",109,0.5,109.5);
267  NoPredictionDm2=dbe->book1D("NoPredictionDisk_m2near","No Predictions Near Side Disk -2 ",109,0.5,109.5);
268  NoPredictionDm2far=dbe->book1D("NoPredictionDisk_m2far","No Predictions Efficiency Far Side Disk -2 ",109,0.5,109.5);
269 
270  dbe->setCurrentFolder(folderPath+"Disk_-3");
271  EffDistroDm3=dbe->book1D("EffDistroDisk_m3near","Efficiency Distribution Near Side Disk - 3 ",20,0.5,100.5);
272  EffDistroDm3far=dbe->book1D("EffDistroDisk_m3far","Efficiency Distribution Far Side Disk - 3 ",20,0.5,100.5);
273  EffGlobDm3 = dbe->book1D("GlobEfficiencyDisk_m3near","Efficiency Near Side Disk -3",109,0.5,109.5);
274  EffGlobDm3far =dbe->book1D("GlobEfficiencyDisk_m3far","Efficiency Far Side Disk -3",109,0.5,109.5);
275  BXGlobDm3 = dbe->book1D("GlobBXDisk_m3near","BX Near Side Disk -3",109,0.5,109.5);
276  BXGlobDm3far = dbe->book1D("GlobBXDisk_m3far","BX Far Side Disk -3",109,0.5,109.5);
277  MaskedGlobDm3 = dbe->book1D("GlobMaskedDisk_m3near","Masked Near Side Disk -3",109,0.5,109.5);
278  MaskedGlobDm3far = dbe->book1D("GlobMaskedDisk_m3far","Masked Far Side Disk -3",109,0.5,109.5);
279  AverageEffDm3=dbe->book1D("AverageEfficiencyDisk_m3near","Average Efficiency Near Side Disk -3 ",109,0.5,109.5);
280  AverageEffDm3far=dbe->book1D("AverageEfficiencyDisk_m3far","Average Efficiency Far Side Disk -3 ",109,0.5,109.5);
281  NoPredictionDm3=dbe->book1D("NoPredictionDisk_m3near","No Predictions Near Side Disk -3 ",109,0.5,109.5);
282  NoPredictionDm3far=dbe->book1D("NoPredictionDisk_m3far","No Predictions Efficiency Far Side Disk -3 ",109,0.5,109.5);
283 
284  //Summary Histograms
285 
286 
288  std::string os;
289  os="Efficiency_Roll_vs_Sector_Wheel_-2";
290  Wheelm2Summary = dbe->book2D(os, os, 12, 0.5,12.5, 21, 0.5, 21.5);
291  os="Efficiency_Roll_vs_Sector_Wheel_-1";
292  Wheelm1Summary = dbe->book2D(os, os, 12, 0.5,12.5, 21, 0.5, 21.5);
293  os="Efficiency_Roll_vs_Sector_Wheel_0";
294  Wheel0Summary = dbe->book2D(os, os, 12, 0.5,12.5, 21, 0.5, 21.5);
295  os="Efficiency_Roll_vs_Sector_Wheel_+1";
296  Wheel1Summary = dbe->book2D(os, os, 12, 0.5,12.5, 21, 0.5, 21.5);
297  os="Efficiency_Roll_vs_Sector_Wheel_+2";
298  Wheel2Summary = dbe->book2D(os, os, 12, 0.5,12.5, 21, 0.5, 21.5);
299 
300  os="Efficiency_Roll_vs_Segment_Disk_-3";
301  Diskm3Summary = dbe->book2D(os,os,36,0.5,36.5,6,0.5,6.5);
302  os="Efficiency_Roll_vs_Segment_Disk_-2";
303  Diskm2Summary = dbe->book2D(os,os,36,0.5,36.5,6,0.5,6.5);
304  os="Efficiency_Roll_vs_Segment_Disk_-1";
305  Diskm1Summary = dbe->book2D(os,os,36,0.5,36.5,6,0.5,6.5);
306  os="Efficiency_Roll_vs_Segment_Disk_1";
307  Disk1Summary = dbe->book2D(os,os,36,0.5,36.5,6,0.5,6.5);
308  os="Efficiency_Roll_vs_Segment_Disk_2";
309  Disk2Summary = dbe->book2D(os,os,36,0.5,36.5,6,0.5,6.5);
310  os="Efficiency_Roll_vs_Segment_Disk_3";
311  Disk3Summary = dbe->book2D(os,os,36,0.5,36.5,6,0.5,6.5);
312 
313  //Azimutal Histograms
314 
315  dbe->setCurrentFolder(folderPath+"Azimutal/");
316  sectorEffWm2= dbe->book1D("AzimutalDistroWm2","Efficiency per Sector Wheel -2",12,0.5,12.5);
317  sectorEffWm1= dbe->book1D("AzimutalDistroWm1","Efficiency per Sector Wheel -1",12,0.5,12.5);
318  sectorEffW0= dbe->book1D("AzimutalDistroW0","Efficiency per Sector Wheel 0",12,0.5,12.5);
319  sectorEffW1= dbe->book1D("AzimutalDistroW1","Efficiency per Sector Wheel 1",12,0.5,12.5);
320  sectorEffW2= dbe->book1D("AzimutalDistroW2","Efficiency per Sector Wheel 2",12,0.5,12.5);
321 
322  OcsectorEffWm2= dbe->book1D("AzimutalDistroWm2","Occupancy per Sector Wheel -2",12,0.5,12.5);
323  OcsectorEffWm1= dbe->book1D("AzimutalDistroWm1","Occupancy per Sector Wheel -1",12,0.5,12.5);
324  OcsectorEffW0= dbe->book1D("AzimutalDistroW0","Ocuppancy per Sector Wheel 0",12,0.5,12.5);
325  OcsectorEffW1= dbe->book1D("AzimutalDistroW1","Ocuppancy per Sector Wheel 1",12,0.5,12.5);
326  OcsectorEffW2= dbe->book1D("AzimutalDistroW2","Ocupancy per Sector Wheel 2",12,0.5,12.5);
327 
328 
329  ExsectorEffWm2= dbe->book1D("AzimutalDistroWm2","Expected per Sector Wheel -2",12,0.5,12.5);
330  ExsectorEffWm1= dbe->book1D("AzimutalDistroWm1","Expected per Sector Wheel -1",12,0.5,12.5);
331  ExsectorEffW0= dbe->book1D("AzimutalDistroW0","Expected per Sector Wheel 0",12,0.5,12.5);
332  ExsectorEffW1= dbe->book1D("AzimutalDistroW1","Expected per Sector Wheel 1",12,0.5,12.5);
333  ExsectorEffW2= dbe->book1D("AzimutalDistroW2","Expected per Sector Wheel 2",12,0.5,12.5);
334 
335  GregD1R2= dbe->book1D("GregDistroD1R2","Efficiency for Station 1 Ring 2",36,0.5,36.5);
336  GregD1R3= dbe->book1D("GregDistroD1R3","Efficiency for Station 1 Ring 3",36,0.5,36.5);
337  GregD2R2= dbe->book1D("GregDistroD2R2","Efficiency for Station 2 Ring 2",36,0.5,36.5);
338  GregD2R3= dbe->book1D("GregDistroD2R3","Efficiency for Station 2 Ring 3",36,0.5,36.5);
339  GregD3R2= dbe->book1D("GregDistroD3R2","Efficiency for Station 3 Ring 2",36,0.5,36.5);
340  GregD3R3= dbe->book1D("GregDistroD3R3","Efficiency for Station 3 Ring 3",36,0.5,36.5);
341 
342  OcGregD1R2= dbe->book1D("OcGregDistroD1R2","Occupancy Distribution for Station 1 Ring 2",36,0.5,36.5);
343  OcGregD1R3= dbe->book1D("OcGregDistroD1R3","Occupancy Distribution for Station 1 Ring 3",36,0.5,36.5);
344  OcGregD2R2= dbe->book1D("OcGregDistroD2R2","Occupancy Distribution for Station 2 Ring 2",36,0.5,36.5);
345  OcGregD2R3= dbe->book1D("OcGregDistroD2R3","Occupancy Distribution for Station 2 Ring 3",36,0.5,36.5);
346  OcGregD3R2= dbe->book1D("OcGregDistroD3R2","Occupancy Distribution for Station 3 Ring 2",36,0.5,36.5);
347  OcGregD3R3= dbe->book1D("OcGregDistroD3R3","Occupancy Distribution for Station 3 Ring 3",36,0.5,36.5);
348 
349  ExGregD1R2= dbe->book1D("ExGregDistroD1R2","Expected Distribution for Station 1 Ring 2",36,0.5,36.5);
350  ExGregD1R3= dbe->book1D("ExGregDistroD1R3","Expected Distribution for Station 1 Ring 3",36,0.5,36.5);
351  ExGregD2R2= dbe->book1D("ExGregDistroD2R2","Expected Distribution for Station 2 Ring 2",36,0.5,36.5);
352  ExGregD2R3= dbe->book1D("ExGregDistroD2R3","Expected Distribution for Station 2 Ring 3",36,0.5,36.5);
353  ExGregD3R2= dbe->book1D("ExGregDistroD3R2","Expected Distribution for Station 3 Ring 2",36,0.5,36.5);
354  ExGregD3R3= dbe->book1D("ExGregDistroD3R3","Expected Distribution for Station 3 Ring 3",36,0.5,36.5);
355 }
356 
358 
360 
361  if(debug) std::cout <<"\t Getting the RPC Geometry"<<std::endl;
363  iSetup.get<MuonGeometryRecord>().get(rpcGeo);
364 
365  std::string label,folder;
366  folder = folderPath;
367  label = folder + "MuonSegEff/Statistics";
368  if(debug) std::cout<<"Getting statistcs="<<label<<std::endl;
369  statistics = dbe->get(label);
370  if(!statistics){
371 
372  std::cout<<"Statistics Doesn't exist Not access to a monitor element"<<std::endl;
373  std::cout<<label<<std::endl;
374  edm::LogWarning("Missing rpcSource in the sequence") << " Statistics Doesn't exist.";
375  return;
376  }
377  if(debug) std::cout<<"Cloning statistcs"<<std::endl;
378  for(int i=1;i<=33;i++){
379  if(debug) std::cout<<statistics->getBinContent(i)<<std::endl;
381  }
382 
383  statistics2->setBinLabel(1,"Events ",1);
384  statistics2->setBinLabel(2,"Events with DT seg",1);
385  statistics2->setBinLabel(3,"1 DT seg",1);
386  statistics2->setBinLabel(4,"2 DT seg",1);
387  statistics2->setBinLabel(5,"3 DT seg",1);
388  statistics2->setBinLabel(6,"4 DT seg",1);
389  statistics2->setBinLabel(7,"5 DT seg",1);
390  statistics2->setBinLabel(8,"6 DT seg",1);
391  statistics2->setBinLabel(9,"7 DT seg",1);
392  statistics2->setBinLabel(10,"8 DT seg",1);
393  statistics2->setBinLabel(11,"9 DT seg",1);
394  statistics2->setBinLabel(12,"10 DT seg",1);
395  statistics2->setBinLabel(13,"11 DT seg",1);
396  statistics2->setBinLabel(14,"12 DT seg",1);
397  statistics2->setBinLabel(15,"13 DT seg",1);
398  statistics2->setBinLabel(16,"14 DT seg",1);
399  statistics2->setBinLabel(17,"15 DT seg",1);
400  statistics2->setBinLabel(18,"Events with CSC seg",1);
401  statistics2->setBinLabel(16+3,"1 CSC seg",1);
402  statistics2->setBinLabel(16+4,"2 CSC seg",1);
403  statistics2->setBinLabel(16+5,"3 CSC seg",1);
404  statistics2->setBinLabel(16+6,"4 CSC seg",1);
405  statistics2->setBinLabel(16+7,"5 CSC seg",1);
406  statistics2->setBinLabel(16+8,"6 CSC seg",1);
407  statistics2->setBinLabel(16+9,"7 CSC seg",1);
408  statistics2->setBinLabel(16+10,"8 CSC seg",1);
409  statistics2->setBinLabel(16+11,"9 CSC seg",1);
410  statistics2->setBinLabel(16+12,"10 CSC seg",1);
411  statistics2->setBinLabel(16+13,"11 CSC seg",1);
412  statistics2->setBinLabel(16+14,"12 CSC seg",1);
413  statistics2->setBinLabel(16+15,"13 CSC seg",1);
414  statistics2->setBinLabel(16+16,"14 CSC seg",1);
415  statistics2->setBinLabel(16+17,"15 CSC seg",1);
416 
417  //Cloning Residuals.
418 
419  folder = folderPath+"MuonSegEff/Residuals/Barrel/";
420 
421  label = folder + "GlobalResidualsClu1La1"; hGlobalResClu1La1 = dbe->get(label);
422  label = folder + "GlobalResidualsClu1La2"; hGlobalResClu1La2 = dbe->get(label);
423  label = folder + "GlobalResidualsClu1La3"; hGlobalResClu1La3 = dbe->get(label);
424  label = folder + "GlobalResidualsClu1La4"; hGlobalResClu1La4 = dbe->get(label);
425  label = folder + "GlobalResidualsClu1La5"; hGlobalResClu1La5 = dbe->get(label);
426  label = folder + "GlobalResidualsClu1La6"; hGlobalResClu1La6 = dbe->get(label);
427 
428  label = folder + "GlobalResidualsClu2La1"; hGlobalResClu2La1 = dbe->get(label);
429  label = folder + "GlobalResidualsClu2La2"; hGlobalResClu2La2 = dbe->get(label);
430  label = folder + "GlobalResidualsClu2La3"; hGlobalResClu2La3 = dbe->get(label);
431  label = folder + "GlobalResidualsClu2La4"; hGlobalResClu2La4 = dbe->get(label);
432  label = folder + "GlobalResidualsClu2La5"; hGlobalResClu2La5 = dbe->get(label);
433  label = folder + "GlobalResidualsClu2La6"; hGlobalResClu2La6 = dbe->get(label);
434 
435  label = folder + "GlobalResidualsClu3La1"; hGlobalResClu3La1 = dbe->get(label);
436  label = folder + "GlobalResidualsClu3La2"; hGlobalResClu3La2 = dbe->get(label);
437  label = folder + "GlobalResidualsClu3La3"; hGlobalResClu3La3 = dbe->get(label);
438  label = folder + "GlobalResidualsClu3La4"; hGlobalResClu3La4 = dbe->get(label);
439  label = folder + "GlobalResidualsClu3La5"; hGlobalResClu3La5 = dbe->get(label);
440  label = folder + "GlobalResidualsClu3La6"; hGlobalResClu3La6 = dbe->get(label);
441 
442  if(debug) std::cout<<"Clonning for Barrel"<<std::endl;
443 
444  for(int i=1;i<=101;i++){
445  if(debug) std::cout<<"Global Residual"<<hGlobalResClu1La1->getBinContent(i)<<std::endl;
452 
459 
466  }
467 
468  if(debug) std::cout<<"Clonning the EndCap"<<std::endl;
469  folder = folderPath+"MuonSegEff/Residuals/EndCap/";
470  if(debug) std::cout<<folder<<std::endl;
471 
472  label = folder + "GlobalResidualsClu1R3C"; hGlobalResClu1R3C = dbe->get(label);
473  //if(!hGlobalResClu1R3C)std::cout<<"hGlobal2ResClu1R3C dont exist"<<std::endl;
474  //std::cout<<label<<std::endl;
475  label = folder + "GlobalResidualsClu1R3B"; hGlobalResClu1R3B = dbe->get(label);
476  //if(!hGlobalResClu1R3B)std::cout<<"hGlobal2ResClu1R3B dont exist"<<std::endl;
477  //std::cout<<label<<std::endl;
478  label = folder + "GlobalResidualsClu1R3A"; hGlobalResClu1R3A = dbe->get(label);
479  label = folder + "GlobalResidualsClu1R2C"; hGlobalResClu1R2C = dbe->get(label);
480  label = folder + "GlobalResidualsClu1R2B"; hGlobalResClu1R2B = dbe->get(label);
481  label = folder + "GlobalResidualsClu1R2A"; hGlobalResClu1R2A = dbe->get(label);
482 
483  label = folder + "GlobalResidualsClu2R3C"; hGlobalResClu2R3C = dbe->get(label);
484  label = folder + "GlobalResidualsClu2R3B"; hGlobalResClu2R3B = dbe->get(label);
485  label = folder + "GlobalResidualsClu2R3A"; hGlobalResClu2R3A = dbe->get(label);
486  label = folder + "GlobalResidualsClu2R2C"; hGlobalResClu2R2C = dbe->get(label);
487  label = folder + "GlobalResidualsClu2R2B"; hGlobalResClu2R2B = dbe->get(label);
488  label = folder + "GlobalResidualsClu2R2A"; hGlobalResClu2R2A = dbe->get(label);
489 
490  label = folder + "GlobalResidualsClu3R3C"; hGlobalResClu3R3C = dbe->get(label);
491  label = folder + "GlobalResidualsClu3R3B"; hGlobalResClu3R3B = dbe->get(label);
492  label = folder + "GlobalResidualsClu3R3A"; hGlobalResClu3R3A = dbe->get(label);
493  label = folder + "GlobalResidualsClu3R2C"; hGlobalResClu3R2C = dbe->get(label);
494  label = folder + "GlobalResidualsClu3R2B"; hGlobalResClu3R2B = dbe->get(label);
495  label = folder + "GlobalResidualsClu3R2A"; hGlobalResClu3R2A = dbe->get(label);
496 
497 
498  if(debug) std::cout<<"Going for!"<<std::endl;
499  /*for(int i=1;i<=101;i++){
500  if(debug) std::cout<<i<<std::endl;
501  hGlobal2ResClu1R3C->setBinContent(i,hGlobalResClu1R3C->getBinContent(i)); std::cout<<"hGlobal2ResClu1R3C"<<std::endl;
502  hGlobal2ResClu1R3B->setBinContent(i,hGlobalResClu1R3B->getBinContent(i)); std::cout<<"hGlobal2ResClu1R3B"<<std::endl;
503  hGlobal2ResClu1R3A->setBinContent(i,hGlobalResClu1R3A->getBinContent(i)); std::cout<<"hGlobal2ResClu1R3A"<<std::endl;
504  hGlobal2ResClu1R2C->setBinContent(i,hGlobalResClu1R2C->getBinContent(i)); std::cout<<"hGlobal2ResClu1R2C"<<std::endl;
505  hGlobal2ResClu1R2B->setBinContent(i,hGlobalResClu1R2B->getBinContent(i)); std::cout<<"hGlobal2ResClu1R2B"<<std::endl;
506  hGlobal2ResClu1R2A->setBinContent(i,hGlobalResClu1R2A->getBinContent(i)); std::cout<<"hGlobal2ResClu1R2A"<<std::endl;
507 
508  hGlobal2ResClu2R3C->setBinContent(i,hGlobalResClu2R3C->getBinContent(i)); std::cout<<"hGlobal2ResClu2R3C"<<std::endl;
509  hGlobal2ResClu2R3B->setBinContent(i,hGlobalResClu2R3B->getBinContent(i)); std::cout<<"hGlobal2ResClu2R3B"<<std::endl;
510  hGlobal2ResClu2R3A->setBinContent(i,hGlobalResClu2R3A->getBinContent(i)); std::cout<<"hGlobal2ResClu2R3A"<<std::endl;
511  hGlobal2ResClu2R2C->setBinContent(i,hGlobalResClu2R2C->getBinContent(i)); std::cout<<"hGlobal2ResClu2R2C"<<std::endl;
512  hGlobal2ResClu2R2B->setBinContent(i,hGlobalResClu2R2B->getBinContent(i)); std::cout<<"hGlobal2ResClu2R2B"<<std::endl;
513  hGlobal2ResClu2R2A->setBinContent(i,hGlobalResClu2R2A->getBinContent(i)); std::cout<<"hGlobal2ResClu2R2A"<<std::endl;
514 
515  hGlobal2ResClu3R3C->setBinContent(i,hGlobalResClu3R3C->getBinContent(i)); std::cout<<"hGlobal2ResClu3R3C"<<std::endl;
516  hGlobal2ResClu3R3B->setBinContent(i,hGlobalResClu3R3B->getBinContent(i)); std::cout<<"hGlobal2ResClu3R3B"<<std::endl;
517  hGlobal2ResClu3R3A->setBinContent(i,hGlobalResClu3R3A->getBinContent(i)); std::cout<<"hGlobal2ResClu3R3A"<<std::endl;
518  hGlobal2ResClu3R2C->setBinContent(i,hGlobalResClu3R2C->getBinContent(i)); std::cout<<"hGlobal2ResClu3R2C"<<std::endl;
519  hGlobal2ResClu3R2B->setBinContent(i,hGlobalResClu3R2B->getBinContent(i)); std::cout<<"hGlobal2ResClu3R2B"<<std::endl;
520  hGlobal2ResClu3R2A->setBinContent(i,hGlobalResClu3R2A->getBinContent(i)); std::cout<<"hGlobal2ResClu3R2A"<<std::endl;
521  }*/
522 
523  //Setting Labels in Summary Label.
524  std::stringstream binLabel;
525 
526  if(debug) std::cout<<"Putting Labels"<<std::endl;
527 
528  for(int i=1;i<=12;i++){
529  binLabel.str("");
530  binLabel<<"Sec "<<i;
531  Wheelm2Summary->setBinLabel(i,binLabel.str(),1);
532  Wheelm1Summary->setBinLabel(i,binLabel.str(),1);
533  Wheel0Summary->setBinLabel(i,binLabel.str(),1);
534  Wheel1Summary->setBinLabel(i,binLabel.str(),1);
535  Wheel2Summary->setBinLabel(i,binLabel.str(),1);
536  }
537  binLabel.str("");
538 
539  if(debug) std::cout<<"Default -1 for Barrel GUI"<<std::endl;
540 
541  for(int x = 1;x<=12;x++){
542  for(int y = 1;y<=21;y++){
548  }
549  }
550 
551  for(int i=1;i<=36;i++){
552  binLabel.str("");
553  binLabel<<i;
554  //if(debug) std::cout<<"Labeling EndCaps"<<binLabel.str()<<std::endl;
555  Diskm3Summary->setBinLabel(i,binLabel.str(),1);
556  Diskm2Summary->setBinLabel(i,binLabel.str(),1);
557  Diskm1Summary->setBinLabel(i,binLabel.str(),1);
558  Disk1Summary->setBinLabel(i,binLabel.str(),1);
559  Disk2Summary->setBinLabel(i,binLabel.str(),1);
560  Disk3Summary->setBinLabel(i,binLabel.str(),1);
561  }
562 
563  for(int ri=2;ri<=3;ri++){
564  for(int roll=1;roll<=3;roll++){
565  binLabel.str("");
566  if(roll==3) binLabel<<"Ring "<<ri<<" A";
567  else if(roll==2) binLabel<<"Ring "<<ri<<" B";
568  else if(roll==1) binLabel<<"Ring "<<ri<<" C";
569  //if(debug) std::cout<<"Labeling EndCaps "<<binLabel.str()<<std::endl;
570  Diskm3Summary->setBinLabel((ri-2)*3+roll,binLabel.str(),2);
571  Diskm2Summary->setBinLabel((ri-2)*3+roll,binLabel.str(),2);
572  Diskm1Summary->setBinLabel((ri-2)*3+roll,binLabel.str(),2);
573  Disk1Summary->setBinLabel((ri-2)*3+roll,binLabel.str(),2);
574  Disk2Summary->setBinLabel((ri-2)*3+roll,binLabel.str(),2);
575  Disk3Summary->setBinLabel((ri-2)*3+roll,binLabel.str(),2);
576  }
577  }
578 
579  if(debug) std::cout<<"Default -1 for EndCap GUI"<<std::endl;
580 
581  for(int x = 1;x<=36;x++){
582  for(int y = 1;y<=6;y++){
589  }
590  }
591 
592  binLabel.str("");
593 
594  std::vector<std::string> rollNamesInter (22);
595 
596  rollNamesInter[1]="RB1in B";
597  rollNamesInter[2]="RB1in F";
598  rollNamesInter[3]="RB1out B";
599  rollNamesInter[4]="RB1out F";
600  rollNamesInter[5]="RB2in B";
601  rollNamesInter[6]="RB2in M";
602  rollNamesInter[7]="RB2in F";
603  rollNamesInter[8]="RB2out B";
604  rollNamesInter[9]="RB2out F";
605  rollNamesInter[10]="RB3- B";
606  rollNamesInter[11]="RB3- F";
607  rollNamesInter[12]="RB3+ B";
608  rollNamesInter[13]="RB3+ F";
609  rollNamesInter[14]="RB4,-,-- B";
610  rollNamesInter[15]="RB4,-,-- F";
611  rollNamesInter[16]="RB4+,++ B";
612  rollNamesInter[17]="RB4+,++ F";
613  rollNamesInter[18]="RB4-+ B";
614  rollNamesInter[19]="RB4-+ F";
615  rollNamesInter[20]="RB4+- B";
616  rollNamesInter[21]="RB4+- F";
617 
618  std::vector<std::string> rollNamesExter (22);
619 
620  for(int i=1;i<22;i++){
621  rollNamesExter[i]=rollNamesInter[i];
622  }
623 
624  rollNamesExter[6]="RB2in F";
625  rollNamesExter[7]="RB2out B";
626  rollNamesExter[8]="RB2out M";
627 
628  //for(int i=1;i<22;i++){
629  // std::cout<<rollNamesExter[i]<<std::endl;
630  // }
631 
632  for(int i=1;i<22;i++){
633  Wheelm1Summary->setBinLabel(i,rollNamesInter[i],2);
634  Wheel0Summary->setBinLabel(i,rollNamesInter[i],2);
635  Wheel1Summary->setBinLabel(i,rollNamesInter[i],2);
636  }
637 
638  for(int i=1;i<22;i++){
639  Wheelm2Summary->setBinLabel(i,rollNamesExter[i],2);
640  Wheel2Summary->setBinLabel(i,rollNamesExter[i],2);
641  }
642 
643  int indexWheel[5];
644  for(int j=0;j<5;j++){
645  indexWheel[j]=0;
646  }
647 
648  int indexWheelf[5];
649  for(int j=0;j<5;j++){
650  indexWheelf[j]=0;
651  }
652 
653  int indexDisk[6];
654  for(int j=0;j<6;j++){
655  indexDisk[j]=0;
656  }
657 
658  int indexDiskf[6];
659  for(int j=0;j<6;j++){
660  indexDiskf[j]=0;
661  }
662 
663  for(TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){
664  if(dynamic_cast< RPCChamber* >( *it ) != 0 ){
665  RPCChamber* ch = dynamic_cast< RPCChamber* >( *it );
666  std::vector< const RPCRoll*> roles = (ch->rolls());
667  for(std::vector<const RPCRoll*>::const_iterator r = roles.begin();r != roles.end(); ++r){
668  RPCDetId rpcId = (*r)->id();
669  RPCGeomServ rpcsrv(rpcId);
670  std::string nameRoll = rpcsrv.name();
671  if(debug) std::cout<<"Booking for "<<nameRoll<<std::endl;
672  meCollection[rpcId.rawId()] = bookDetUnitSeg(rpcId,(*r)->nstrips(),folderPath);
673  }
674  }
675  }
676 
677  //if(debug) dbe->showDirStructure();
678 
679  for(TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){
680  if(dynamic_cast< RPCChamber* >( *it ) != 0 ){
681  RPCChamber* ch = dynamic_cast< RPCChamber* >( *it );
682  std::vector< const RPCRoll*> roles = (ch->rolls());
683  for(std::vector<const RPCRoll*>::const_iterator r = roles.begin();r != roles.end(); ++r){
684  RPCDetId rpcId = (*r)->id();
685  RPCGeomServ rpcsrv(rpcId);
686  int sector = rpcId.sector();
687  std::string nameRoll = rpcsrv.name();
688  std::map<std::string, MonitorElement*> meMap=meCollection[rpcId.rawId()];
689  if(debug){
690  std::map<std::string, MonitorElement*>::const_iterator it;
691  for (it = meMap.begin(); it != meMap.end(); ++it){
692  std::cout<<"Histo name:" <<it->first<<std::endl;
693  }
694  }
695 
696  if(meCollection.find(rpcId.rawId())==meCollection.end()){
697  std::cout<<"WARNING!!! Empty RecHit collection map"<<std::endl;
698  }
699 
700  if(debug){
701  std::cout<<rpcId<<std::endl;
702  //printing indexes
703  std::cout<<"indexWheel=";
704  for(int j=0;j<5;j++){
705  std::cout<<indexWheel[j]<<" ";
706  }
707  std::cout<<std::endl;
708  std::cout<<"indexWheelf=";
709  for(int j=0;j<5;j++){
710  std::cout<<indexWheelf[j]<<" ";
711  }
712  std::cout<<std::endl;
713  std::cout<<"indexDisk=";
714  for(int j=0;j<6;j++){
715  std::cout<<indexDisk[j]<<" ";
716  }
717  std::cout<<std::endl;
718  std::cout<<"indexDiskf=";
719  for(int j=0;j<6;j++){
720  std::cout<<indexDiskf[j]<<" ";
721  }
722  std::cout<<std::endl;
723  }
724 
725  if(rpcId.region()==0){
726  std::stringstream meIdRPC, meIdDT, bxDistroId;
727  std::string meIdPRO, meIdRPC2, meIdDT2, bxDistroId2;
728 
730 
731  std::string folder = folderPath+"MuonSegEff";
732 
733  if(debug) std::cout<<"Setting the folder "<<folder<<std::endl;
734 
735  meIdRPC<<folder<<"/RPCDataOccupancyFromDT_"<<rpcId.rawId();
736  meIdDT<<folder<<"/ExpectedOccupancyFromDT_"<<rpcId.rawId();
737  bxDistroId<<folder<<"/BXDistribution_"<<rpcId.rawId();
738 
739  std::string folder2 = folderPath+"RollByRoll/" + folderStr->folderStructure(rpcId);
740 
741  delete folderStr;
742 
743  meIdRPC2 = "RPCDataOccupancyFromDT_" + rpcsrv.name();
744  meIdDT2 = "ExpectedOccupancyFromDT_"+ rpcsrv.name();
745  bxDistroId2 = "BXDistribution_"+ rpcsrv.name();
746 
747  meIdPRO = "Profile_"+ rpcsrv.name();
748 
749  histoRPC= dbe->get(meIdRPC.str());
750  histoDT= dbe->get(meIdDT.str());
751  histoPRO=dbe->get(meIdPRO);
752  BXDistribution = dbe->get(bxDistroId.str());
753 
754  int NumberWithOutPrediction=0;
755  double p = 0.;
756  double o = 0.;
757  float mybxhisto = 0.;
758  float mybxerror = 0.;
759  float ef = 0.;
760  float er = 0.;
761  float buffef = 0.;
762  float buffer = 0.;
763  float sumbuffef = 0.;
764  float sumbuffer = 0.;
765  float averageeff = 0.;
766  float averageerr = 0.;
767  int NumberStripsPointed = 0;
768 
769  if(debug) std::cout<<"Cloning BX"<<std::endl; //problema con sector 9 y sector 11
770 
771  for(int i=1;i<=11;i++){
772  if(debug) std::cout<<i<<"-"<<BXDistribution->getBinContent(i)<<std::endl;
773  meMap[bxDistroId2]->setBinContent(i,BXDistribution->getBinContent(i));
774  }
775 
776  if(histoRPC && histoDT && BXDistribution){
777  if(debug) std::cout <<rpcsrv.name()<<std::endl;
778 
779  for(int i=1;i<=int((*r)->nstrips());++i){
780  if(debug) std::cout<<"Cloning histoDT "<<meIdDT2<<std::endl;
781  meMap[meIdDT2]->setBinContent(i,histoDT->getBinContent(i));
782  if(debug) std::cout<<"Cloning histoRPC:"<<meIdRPC2<<std::endl;
783  meMap[meIdRPC2]->setBinContent(i,histoRPC->getBinContent(i));
784 
785  if(meMap.find(meIdPRO)==meMap.end()){
786  std::cout<<"Empty Map"<<std::endl;
787  }
788 
789  if(histoDT->getBinContent(i)!=0){
790  if(debug) std::cout<<"Inside the If"<<std::endl;
791  buffef = float(histoRPC->getBinContent(i))/float(histoDT->getBinContent(i));
792  meMap[meIdPRO]->setBinContent(i,buffef);
793  buffer = sqrt(buffef*(1.-buffef)/float(histoDT->getBinContent(i)));
794  meMap[meIdPRO]->setBinError(i,buffer);
795  sumbuffef=sumbuffef+buffef;
796  sumbuffer = sumbuffer + buffer*buffer;
797  NumberStripsPointed++;
798  }else{
799  NumberWithOutPrediction++;
800  }
801  if(debug) std::cout<<"\t Strip="<<i<<" RPC="<<histoRPC->getBinContent(i)<<" DT="<<histoDT->getBinContent(i)<<" buffef="<<buffef<<" buffer="<<buffer<<" sumbuffef="<<sumbuffef<<" sumbuffer="<<sumbuffer<<" NumberStripsPointed="<<NumberStripsPointed<<" NumberWithOutPrediction"<<NumberWithOutPrediction<<std::endl;
802  }
803 
804  p=histoDT->getTH1F()->Integral();
805  o=histoRPC->getTH1F()->Integral();
806 
807  if(NumberStripsPointed!=0){
808  averageeff = (sumbuffef/float(NumberStripsPointed))*100.;
809  averageerr = sqrt(sumbuffer/float(NumberStripsPointed))*100.;
810  }
811 
812  mybxhisto = 50.+BXDistribution->getMean()*10;
813  mybxerror = BXDistribution->getRMS()*10;
814 
815  }
816 
817  int Ring = rpcId.ring();
818 
819  if(p!=0){
820  ef = float(o)/float(p);
821  er = sqrt(ef*(1.-ef)/float(p));
822  }
823 
824  ef=ef*100;
825  er=er*100;
826 
827 
828  //Filling azimutal Wheel Histograms
829 
830  int wheel = rpcId.ring();
831  int sector = rpcId.sector();
832  int region = rpcId.region();
833 
834 
835  if(region ==0){
836  if(wheel==-2){ExsectorEffWm2->Fill(sector,p); OcsectorEffWm2->Fill(sector,o);}
837  else if(wheel==-1){ExsectorEffWm1->Fill(sector,p); OcsectorEffWm1->Fill(sector,o);}
838  else if(wheel==0){ExsectorEffW0->Fill(sector,p); OcsectorEffW0->Fill(sector,o);}
839  else if(wheel==1){ExsectorEffW1->Fill(sector,p); OcsectorEffW1->Fill(sector,o);}
840  else if(wheel==2){ExsectorEffW2->Fill(sector,p); OcsectorEffW2->Fill(sector,o);}
841  }
842 
843 
844  std::string camera = rpcsrv.name();
845 
846  float nopredictionsratio = (float(NumberWithOutPrediction)/float((*r)->nstrips()))*100.;
847 
848  //Efficiency for Pigis Histos
849 
850  if(debug) std::cout<<"Pigi "<<camera<<" "<<rpcsrv.shortname()<<" "
851  <<(*r)->id()<<std::endl;
852 
853  if(p > 100){//We need at least 100 predictions to fill the summary plot
854  if(abs((*r)->id().ring())==2){
855  if(debug) std::cout<<rollY(rpcsrv.shortname(),rollNamesExter)
856  <<"--"<<rpcsrv.shortname()
857  <<" "<<rpcsrv.name()
858  <<" averageEff"<<averageeff<<std::endl;
859  if((*r)->id().ring()==2) Wheel2Summary->setBinContent((*r)->id().sector(),rollY(rpcsrv.shortname(),rollNamesExter),averageeff);
860  else Wheelm2Summary->setBinContent((*r)->id().sector(),rollY(rpcsrv.shortname(),rollNamesExter),averageeff);
861  }else{
862  if(debug) std::cout<<rollY(rpcsrv.shortname(),rollNamesInter)
863  <<"--"<<rpcsrv.shortname()
864  <<" "<<rpcsrv.name()
865  <<" averageEff"<<averageeff<<std::endl;
866 
867  if((*r)->id().ring()==-1) Wheelm1Summary->setBinContent((*r)->id().sector(),rollY(rpcsrv.shortname(),rollNamesInter),averageeff);
868  else if((*r)->id().ring()==0) Wheel0Summary->setBinContent((*r)->id().sector(),rollY(rpcsrv.shortname(),rollNamesInter),averageeff);
869  else if((*r)->id().ring()==1) Wheel1Summary->setBinContent((*r)->id().sector(),rollY(rpcsrv.shortname(),rollNamesInter),averageeff);
870  }
871  }
872 
873  //Near Side
874 
875  float maskedratio =0;
876 
877  if((sector==1||sector==2||sector==3||sector==10||sector==11||sector==12)){
878  if(Ring==-2){
879  EffDistroWm2->Fill(averageeff);
880  indexWheel[0]++;
881  EffGlobWm2->setBinContent(indexWheel[0],ef);
882  EffGlobWm2->setBinError(indexWheel[0],er);
883  EffGlobWm2->setBinLabel(indexWheel[0],camera,1);
884 
885  BXGlobWm2->setBinContent(indexWheel[0],mybxhisto);
886  BXGlobWm2->setBinError(indexWheel[0],mybxerror);
887  BXGlobWm2->setBinLabel(indexWheel[0],camera,1);
888 
889  MaskedGlobWm2->setBinContent(indexWheel[0],maskedratio);
890  MaskedGlobWm2->setBinLabel(indexWheel[0],camera,1);
891 
892  AverageEffWm2->setBinContent(indexWheel[0],averageeff);
893  AverageEffWm2->setBinError(indexWheel[0],averageerr);
894  AverageEffWm2->setBinLabel(indexWheel[0],camera,1);
895 
896  NoPredictionWm2->setBinContent(indexWheel[0],nopredictionsratio);
897  NoPredictionWm2->setBinLabel(indexWheel[0],camera,1);
898  }else if(Ring==-1){
899  EffDistroWm1->Fill(averageeff);
900  indexWheel[1]++;
901  EffGlobWm1->setBinContent(indexWheel[1],ef);
902  EffGlobWm1->setBinError(indexWheel[1],er);
903  EffGlobWm1->setBinLabel(indexWheel[1],camera,1);
904 
905  BXGlobWm1->setBinContent(indexWheel[1],mybxhisto);
906  BXGlobWm1->setBinError(indexWheel[1],mybxerror);
907  BXGlobWm1->setBinLabel(indexWheel[1],camera,1);
908 
909  MaskedGlobWm1->setBinContent(indexWheel[1],maskedratio);
910  MaskedGlobWm1->setBinLabel(indexWheel[1],camera,1);
911 
912  AverageEffWm1->setBinContent(indexWheel[1],averageeff);
913  AverageEffWm1->setBinError(indexWheel[1],averageerr);
914  AverageEffWm1->setBinLabel(indexWheel[1],camera,1);
915 
916  NoPredictionWm1->setBinContent(indexWheel[1],nopredictionsratio);
917  NoPredictionWm1->setBinLabel(indexWheel[1],camera,1);
918 
919  }else if(Ring==0){
920  EffDistroW0->Fill(averageeff);
921  indexWheel[2]++;
922  EffGlobW0->setBinContent(indexWheel[2],ef);
923  EffGlobW0->setBinError(indexWheel[2],er);
924  EffGlobW0->setBinLabel(indexWheel[2],camera,1);
925 
926  BXGlobW0->setBinContent(indexWheel[2],mybxhisto);
927  BXGlobW0->setBinError(indexWheel[2],mybxerror);
928  BXGlobW0->setBinLabel(indexWheel[2],camera,1);
929 
930  MaskedGlobW0->setBinContent(indexWheel[2],maskedratio);
931  MaskedGlobW0->setBinLabel(indexWheel[2],camera,1);
932 
933  AverageEffW0->setBinContent(indexWheel[2],averageeff);
934  AverageEffW0->setBinError(indexWheel[2],averageerr);
935  AverageEffW0->setBinLabel(indexWheel[2],camera,1);
936 
937  NoPredictionW0->setBinContent(indexWheel[2],nopredictionsratio);
938  NoPredictionW0->setBinLabel(indexWheel[2],camera,1);
939  }else if(Ring==1){
940  EffDistroW1->Fill(averageeff);
941  indexWheel[3]++;
942  EffGlobW1->setBinContent(indexWheel[3],ef);
943  EffGlobW1->setBinError(indexWheel[3],er);
944  EffGlobW1->setBinLabel(indexWheel[3],camera,1);
945 
946  BXGlobW1->setBinContent(indexWheel[3],mybxhisto);
947  BXGlobW1->setBinError(indexWheel[3],mybxerror);
948  BXGlobW1->setBinLabel(indexWheel[3],camera,1);
949 
950  MaskedGlobW1->setBinContent(indexWheel[3],maskedratio);
951  MaskedGlobW1->setBinLabel(indexWheel[3],camera,1);
952 
953  AverageEffW1->setBinContent(indexWheel[3],averageeff);
954  AverageEffW1->setBinError(indexWheel[3],averageerr);
955  AverageEffW1->setBinLabel(indexWheel[3],camera,1);
956 
957  NoPredictionW1->setBinContent(indexWheel[3],nopredictionsratio);
958  NoPredictionW1->setBinLabel(indexWheel[3],camera,1);
959  }else if(Ring==2){
960  EffDistroW2->Fill(averageeff);
961  indexWheel[4]++;
962  EffGlobW2->setBinContent(indexWheel[4],ef);
963  EffGlobW2->setBinError(indexWheel[4],er);
964  EffGlobW2->setBinLabel(indexWheel[4],camera,1);
965 
966  BXGlobW2->setBinContent(indexWheel[4],mybxhisto);
967  BXGlobW2->setBinError(indexWheel[4],mybxerror);
968  BXGlobW2->setBinLabel(indexWheel[4],camera,1);
969 
970  MaskedGlobW2->setBinContent(indexWheel[4],maskedratio);
971  MaskedGlobW2->setBinLabel(indexWheel[4],camera,1);
972 
973  AverageEffW2->setBinContent(indexWheel[4],averageeff);
974  AverageEffW2->setBinError(indexWheel[4],averageerr);
975  AverageEffW2->setBinLabel(indexWheel[4],camera,1);
976 
977  NoPredictionW2->setBinContent(indexWheel[4],nopredictionsratio);
978  NoPredictionW2->setBinLabel(indexWheel[4],camera,1);
979  }
980  }else{//Far Side
981  if(Ring==-2){
982  EffDistroWm2far->Fill(averageeff);
983  indexWheelf[0]++;
984  EffGlobWm2far->setBinContent(indexWheelf[0],ef);
985  EffGlobWm2far->setBinError(indexWheelf[0],er);
986  EffGlobWm2far->setBinLabel(indexWheelf[0],camera,1);
987 
988  BXGlobWm2far->setBinContent(indexWheelf[0],mybxhisto);
989  BXGlobWm2far->setBinError(indexWheelf[0],mybxerror);
990  BXGlobWm2far->setBinLabel(indexWheelf[0],camera);
991 
992  MaskedGlobWm2far->setBinContent(indexWheelf[0],maskedratio);
993  MaskedGlobWm2far->setBinLabel(indexWheelf[0],camera,1);
994 
995  AverageEffWm2far->setBinContent(indexWheelf[0],averageeff);
996  AverageEffWm2far->setBinError(indexWheelf[0],averageerr);
997  AverageEffWm2far->setBinLabel(indexWheelf[0],camera,1);
998 
999  NoPredictionWm2->setBinContent(indexWheel[0],nopredictionsratio);
1000  NoPredictionWm2->setBinLabel(indexWheel[0],camera,1);
1001 
1002  }else if(Ring==-1){
1003  EffDistroWm1far->Fill(averageeff);
1004  indexWheelf[1]++;
1005  EffGlobWm1far->setBinContent(indexWheelf[1],ef);
1006  EffGlobWm1far->setBinError(indexWheelf[1],er);
1007  EffGlobWm1far->setBinLabel(indexWheelf[1],camera,1);
1008 
1009  BXGlobWm1far->setBinContent(indexWheelf[1],mybxhisto);
1010  BXGlobWm1far->setBinError(indexWheelf[1],mybxerror);
1011  BXGlobWm1far->setBinLabel(indexWheelf[1],camera,1);
1012 
1013  MaskedGlobWm1far->setBinContent(indexWheelf[1],maskedratio);
1014  MaskedGlobWm1far->setBinLabel(indexWheelf[1],camera,1);
1015 
1016  AverageEffWm1far->setBinContent(indexWheelf[1],averageeff);
1017  AverageEffWm1far->setBinError(indexWheelf[1],averageerr);
1018  AverageEffWm1far->setBinLabel(indexWheelf[1],camera,1);
1019 
1020  NoPredictionWm1far->setBinContent(indexWheelf[1],nopredictionsratio);
1021  NoPredictionWm1far->setBinLabel(indexWheelf[1],camera,1);
1022 
1023  }else if(Ring==0){
1024  EffDistroW0far->Fill(averageeff);
1025  indexWheelf[2]++;
1026  EffGlobW0far->setBinContent(indexWheelf[2],ef);
1027  EffGlobW0far->setBinError(indexWheelf[2],er);
1028  EffGlobW0far->setBinLabel(indexWheelf[2],camera,1);
1029 
1030  BXGlobW0far->setBinContent(indexWheelf[2],mybxhisto);
1031  BXGlobW0far->setBinError(indexWheelf[2],mybxerror);
1032  BXGlobW0far->setBinLabel(indexWheelf[2],camera,1);
1033 
1034  MaskedGlobW0far->setBinContent(indexWheelf[2],maskedratio);
1035  MaskedGlobW0far->setBinLabel(indexWheelf[2],camera,1);
1036 
1037  AverageEffW0far->setBinContent(indexWheelf[2],averageeff);
1038  AverageEffW0far->setBinError(indexWheelf[2],averageerr);
1039  AverageEffW0far->setBinLabel(indexWheelf[2],camera,1);
1040 
1041  NoPredictionW0far->setBinContent(indexWheelf[2],nopredictionsratio);
1042  NoPredictionW0far->setBinLabel(indexWheelf[2],camera,1);
1043  }else if(Ring==1){
1044  EffDistroW1far->Fill(averageeff);
1045  indexWheelf[3]++;
1046  EffGlobW1far->setBinContent(indexWheelf[3],ef);
1047  EffGlobW1far->setBinError(indexWheelf[3],er);
1048  EffGlobW1far->setBinLabel(indexWheelf[3],camera,1);
1049 
1050  BXGlobW1far->setBinContent(indexWheelf[3],mybxhisto);
1051  BXGlobW1far->setBinError(indexWheelf[3],mybxerror);
1052  BXGlobW1far->setBinLabel(indexWheelf[3],camera,1);
1053 
1054  MaskedGlobW1far->setBinContent(indexWheelf[3],maskedratio);
1055  MaskedGlobW1far->setBinLabel(indexWheelf[3],camera,1);
1056 
1057  AverageEffW1far->setBinContent(indexWheelf[3],averageeff);
1058  AverageEffW1far->setBinError(indexWheelf[3],averageerr);
1059  AverageEffW1far->setBinLabel(indexWheelf[3],camera,1);
1060 
1061  NoPredictionW1far->setBinContent(indexWheelf[3],nopredictionsratio);
1062  NoPredictionW1far->setBinLabel(indexWheelf[3],camera,1);
1063 
1064  }else if(Ring==2){
1065  EffDistroW2far->Fill(averageeff);
1066  indexWheelf[4]++;
1067  EffGlobW2far->setBinContent(indexWheelf[4],ef);
1068  EffGlobW2far->setBinError(indexWheelf[4],er);
1069  EffGlobW2far->setBinLabel(indexWheelf[4],camera,1);
1070 
1071  BXGlobW2far->setBinContent(indexWheelf[4],mybxhisto);
1072  BXGlobW2far->setBinError(indexWheelf[4],mybxerror);
1073  BXGlobW2far->setBinLabel(indexWheelf[4],camera,1);
1074 
1075  MaskedGlobW2far->setBinContent(indexWheelf[4],maskedratio);
1076  MaskedGlobW2far->setBinLabel(indexWheelf[4],camera,1);
1077 
1078  AverageEffW2far->setBinContent(indexWheelf[4],averageeff);
1079  AverageEffW2far->setBinError(indexWheelf[4],averageerr);
1080  AverageEffW2far->setBinLabel(indexWheelf[4],camera,1);
1081 
1082  NoPredictionW2far->setBinContent(indexWheelf[4],nopredictionsratio);
1083  NoPredictionW2far->setBinLabel(indexWheelf[4],camera,1);
1084  }
1085  }
1086  }else{//EndCap
1087 
1088  std::stringstream meIdRPC,meIdCSC, bxDistroId;
1089  std::string meIdPRO, meIdRPC2, meIdCSC2, bxDistroId2;
1090 
1091  RPCBookFolderStructure * folderStr = new RPCBookFolderStructure();
1092 
1093  std::string folder = folderPath+"MuonSegEff";
1094 
1095  meIdRPC<<folder<<"/RPCDataOccupancyFromCSC_"<<rpcId.rawId();
1096  meIdCSC<<folder<<"/ExpectedOccupancyFromCSC_"<<rpcId.rawId();
1097  bxDistroId<<folder<<"/BXDistribution_"<<rpcId.rawId();
1098 
1099  std::string folder2 = folderPath+"RollByRoll/" + folderStr->folderStructure(rpcId);
1100 
1101  delete folderStr;
1102 
1103  meIdRPC2 = "RPCDataOccupancyFromCSC_" + rpcsrv.name();
1104  meIdCSC2 = "ExpectedOccupancyFromCSC_"+ rpcsrv.name();
1105  bxDistroId2 = "BXDistribution_"+ rpcsrv.name();
1106 
1107  meIdPRO = "Profile_"+ rpcsrv.name();
1108 
1109  histoRPC= dbe->get(meIdRPC.str());
1110  histoCSC= dbe->get(meIdCSC.str());
1111  BXDistribution = dbe->get(bxDistroId.str());
1112 
1113  int NumberWithOutPrediction=0;
1114  double p = 0;
1115  double o = 0;
1116  float mybxhisto = 0;
1117  float mybxerror = 0;
1118  float ef =0;
1119  float er =0;
1120  float buffef = 0;
1121  float buffer = 0;
1122  float sumbuffef = 0;
1123  float sumbuffer = 0;
1124  float averageeff = 0;
1125  float averageerr = 0;
1126  int NumberStripsPointed = 0;
1127 
1128  if(debug) std::cout<<"Cloning BX"<<std::endl;
1129 
1130  for(int i=1;i<=11;i++){
1131  if(debug) std::cout<<i<<"-"<<BXDistribution->getBinContent(i)<<std::endl;
1132  meMap[bxDistroId2]->setBinContent(i,BXDistribution->getBinContent(i));
1133  }
1134 
1135  if(histoRPC && histoCSC && BXDistribution){
1136  if(debug) std::cout <<rpcsrv.name()<<std::endl;
1137 
1138  for(int i=1;i<=int((*r)->nstrips());++i){
1139  if(debug) std::cout<<"Cloning histoCSC "<<meIdCSC2<<std::endl;
1140  meMap[meIdCSC2]->setBinContent(i,histoCSC->getBinContent(i));
1141  if(debug) std::cout<<"Cloning histoRPC:"<<meIdRPC2<<std::endl;
1142  meMap[meIdRPC2]->setBinContent(i,histoRPC->getBinContent(i));
1143 
1144  if(meMap.find(meIdPRO)==meMap.end()){
1145  std::cout<<"Empty Map"<<std::endl;
1146  }
1147 
1148  if(histoCSC->getBinContent(i)!=0){
1149  if(debug) std::cout<<"Inside the If"<<std::endl;
1150  buffef = float(histoRPC->getBinContent(i))/float(histoCSC->getBinContent(i));
1151  meMap[meIdPRO]->setBinContent(i,buffef);
1152  buffer = sqrt(buffef*(1.-buffef)/float(histoCSC->getBinContent(i)));
1153  meMap[meIdPRO]->setBinError(i,buffer);
1154  sumbuffef=sumbuffef+buffef;
1155  sumbuffer = sumbuffer + buffer*buffer;
1156  NumberStripsPointed++;
1157  }else{
1158  NumberWithOutPrediction++;
1159  }
1160 
1161  if(debug) std::cout<<"\t Strip="<<i<<" RPC="<<histoRPC->getBinContent(i)<<" CSC="<<histoCSC->getBinContent(i)<<" buffef="<<buffef<<" buffer="<<buffer<<" sumbuffef="<<sumbuffef<<" sumbuffer="<<sumbuffer<<" NumberStripsPointed="<<NumberStripsPointed<<" NumberWithOutPrediction"<<NumberWithOutPrediction<<std::endl;
1162  }
1163  p=histoCSC->getTH1F()->Integral();
1164  o=histoRPC->getTH1F()->Integral();
1165 
1166  if(NumberStripsPointed!=0){
1167  averageeff = (sumbuffef/float(NumberStripsPointed))*100.;
1168  averageerr = sqrt(sumbuffer/float(NumberStripsPointed))*100.;
1169  }
1170 
1171  mybxhisto = 50.+BXDistribution->getMean()*10;
1172  mybxerror = BXDistribution->getRMS()*10;
1173  }
1174 
1175  int Disk = rpcId.station()*rpcId.region();
1176 
1177  if(p!=0){
1178  ef = float(o)/float(p);
1179  er = sqrt(ef*(1.-ef)/float(p));
1180  }
1181 
1182  ef=ef*100;
1183  er=er*100;
1184 
1185  //Filling azimutal GregHistograms
1186 
1187  if(rpcId.region()==1){
1188  if(rpcId.station()==1 && rpcId.ring()==2){ ExGregD1R2->Fill(rpcsrv.segment(),p);OcGregD1R2->Fill(rpcsrv.segment(),o);}
1189  if(rpcId.station()==1 && rpcId.ring()==3){ ExGregD1R3->Fill(rpcsrv.segment(),p);OcGregD1R3->Fill(rpcsrv.segment(),o);}
1190  if(rpcId.station()==2 && rpcId.ring()==2){ ExGregD2R2->Fill(rpcsrv.segment(),p);OcGregD2R2->Fill(rpcsrv.segment(),o);}
1191  if(rpcId.station()==2 && rpcId.ring()==3){ ExGregD2R3->Fill(rpcsrv.segment(),p);OcGregD2R3->Fill(rpcsrv.segment(),o);}
1192  if(rpcId.station()==3 && rpcId.ring()==2){ ExGregD3R2->Fill(rpcsrv.segment(),p);OcGregD3R2->Fill(rpcsrv.segment(),o);}
1193  if(rpcId.station()==3 && rpcId.ring()==3){ ExGregD3R3->Fill(rpcsrv.segment(),p);OcGregD3R3->Fill(rpcsrv.segment(),o);}
1194  }
1195 
1196 
1197 
1198 
1199 
1200  std::string camera = rpcsrv.name();
1201 
1202  float nopredictionsratio = (float(NumberWithOutPrediction)/float((*r)->nstrips()))*100.;
1203 
1204 
1205  //Efficiency for Pigis Histos
1206 
1207  if(debug) std::cout<<"Pigi "<<camera<<" "<<rpcsrv.shortname()<<" "
1208  <<(*r)->id()<<std::endl;
1209 
1210 
1211 
1212  if(p > 100){ //We need at least 100 predictions to fill the summary plot
1213  int rollY = (*r)->id().roll();
1214  if(rollY==1) rollY=3;
1215  else if(rollY==3) rollY=1;
1216  int Y=((*r)->id().ring()-2)*3+rollY;
1217  if(Disk==-3) Diskm3Summary->setBinContent(rpcsrv.segment(),Y,averageeff);
1218  else if(Disk==-2) Diskm2Summary->setBinContent(rpcsrv.segment(),Y,averageeff);
1219  else if(Disk==-1) Diskm1Summary->setBinContent(rpcsrv.segment(),Y,averageeff);
1220  else if(Disk==1) Disk1Summary->setBinContent(rpcsrv.segment(),Y,averageeff);
1221  else if(Disk==2) Disk2Summary->setBinContent(rpcsrv.segment(),Y,averageeff);
1222  else if(Disk==3) Disk3Summary->setBinContent(rpcsrv.segment(),Y,averageeff);
1223  }
1224 
1225  //Near Side
1226 
1227  float maskedratio =0;
1228 
1229  if(sector==1||sector==2||sector==6){
1230 
1231  if(Disk==-3){
1232  EffDistroDm3->Fill(averageeff);
1233  indexDisk[0]++;
1234  EffGlobDm3->setBinContent(indexDisk[0],ef);
1235  EffGlobDm3->setBinError(indexDisk[0],er);
1236  EffGlobDm3->setBinLabel(indexDisk[0],camera,1);
1237 
1238  BXGlobDm3->setBinContent(indexDisk[0],mybxhisto);
1239  BXGlobDm3->setBinError(indexDisk[0],mybxerror);
1240  BXGlobDm3->setBinLabel(indexDisk[0],camera,1);
1241 
1242  MaskedGlobDm3->setBinContent(indexDisk[0],maskedratio);
1243  MaskedGlobDm3->setBinLabel(indexDisk[0],camera,1);
1244 
1245  AverageEffDm3->setBinContent(indexDisk[0],averageeff);
1246  AverageEffDm3->setBinError(indexDisk[0],averageerr);
1247  AverageEffDm3->setBinLabel(indexDisk[0],camera,1);
1248 
1249  NoPredictionDm3->setBinContent(indexDisk[0],nopredictionsratio);
1250  NoPredictionDm3->setBinLabel(indexDisk[0],camera,1);
1251  }else if(Disk==-2){
1252  EffDistroDm2->Fill(averageeff);
1253  indexDisk[1]++;
1254  EffGlobDm2->setBinContent(indexDisk[1],ef);
1255  EffGlobDm2->setBinError(indexDisk[1],er);
1256  EffGlobDm2->setBinLabel(indexDisk[1],camera,1);
1257 
1258  BXGlobDm2->setBinContent(indexDisk[1],mybxhisto);
1259  BXGlobDm2->setBinError(indexDisk[1],mybxerror);
1260  BXGlobDm2->setBinLabel(indexDisk[1],camera,1);
1261 
1262  MaskedGlobDm2->setBinContent(indexDisk[1],maskedratio);
1263  MaskedGlobDm2->setBinLabel(indexDisk[1],camera,1);
1264 
1265  AverageEffDm2->setBinContent(indexDisk[1],averageeff);
1266  AverageEffDm2->setBinError(indexDisk[1],averageerr);
1267  AverageEffDm2->setBinLabel(indexDisk[1],camera,1);
1268 
1269  NoPredictionDm2->setBinContent(indexDisk[1],nopredictionsratio);
1270  NoPredictionDm2->setBinLabel(indexDisk[1],camera,1);
1271  }else if(Disk==-1){
1272  EffDistroDm1->Fill(averageeff);
1273  indexDisk[2]++;
1274  EffGlobDm1->setBinContent(indexDisk[2],ef);
1275  EffGlobDm1->setBinError(indexDisk[2],er);
1276  EffGlobDm1->setBinLabel(indexDisk[2],camera,1);
1277 
1278  BXGlobDm1->setBinContent(indexDisk[2],mybxhisto);
1279  BXGlobDm1->setBinError(indexDisk[2],mybxerror);
1280  BXGlobDm1->setBinLabel(indexDisk[2],camera,1);
1281 
1282  MaskedGlobDm1->setBinContent(indexDisk[2],maskedratio);
1283  MaskedGlobDm1->setBinLabel(indexDisk[2],camera,1);
1284 
1285  AverageEffDm1->setBinContent(indexDisk[2],averageeff);
1286  AverageEffDm1->setBinError(indexDisk[2],averageerr);
1287  AverageEffDm1->setBinLabel(indexDisk[2],camera,1);
1288 
1289  NoPredictionDm1->setBinContent(indexDisk[2],nopredictionsratio);
1290  NoPredictionDm1->setBinLabel(indexDisk[2],camera,1);
1291 
1292  }else if(Disk==1){
1293  EffDistroD1->Fill(averageeff);
1294  indexDisk[3]++;
1295  EffGlobD1->setBinContent(indexDisk[3],ef);
1296  EffGlobD1->setBinError(indexDisk[3],er);
1297  EffGlobD1->setBinLabel(indexDisk[3],camera,1);
1298 
1299  BXGlobD1->setBinContent(indexDisk[3],mybxhisto);
1300  BXGlobD1->setBinError(indexDisk[3],mybxerror);
1301  BXGlobD1->setBinLabel(indexDisk[3],camera,1);
1302 
1303  MaskedGlobD1->setBinContent(indexDisk[3],maskedratio);
1304  MaskedGlobD1->setBinLabel(indexDisk[3],camera,1);
1305 
1306  AverageEffD1->setBinContent(indexDisk[3],averageeff);
1307  AverageEffD1->setBinError(indexDisk[3],averageerr);
1308  AverageEffD1->setBinLabel(indexDisk[3],camera,1);
1309 
1310  NoPredictionD1->setBinContent(indexDisk[3],nopredictionsratio);
1311  NoPredictionD1->setBinLabel(indexDisk[3],camera,1);
1312  }else if(Disk==2){
1313  EffDistroD2->Fill(averageeff);
1314  indexDisk[4]++;
1315  EffGlobD2->setBinContent(indexDisk[4],ef);
1316  EffGlobD2->setBinError(indexDisk[4],er);
1317  EffGlobD2->setBinLabel(indexDisk[4],camera,1);
1318 
1319  BXGlobD2->setBinContent(indexDisk[4],mybxhisto);
1320  BXGlobD2->setBinError(indexDisk[4],mybxerror);
1321  BXGlobD2->setBinLabel(indexDisk[4],camera,1);
1322 
1323  MaskedGlobD2->setBinContent(indexDisk[4],maskedratio);
1324  MaskedGlobD2->setBinLabel(indexDisk[4],camera,1);
1325 
1326  AverageEffD2->setBinContent(indexDisk[4],averageeff);
1327  AverageEffD2->setBinError(indexDisk[4],averageerr);
1328  AverageEffD2->setBinLabel(indexDisk[4],camera,1);
1329 
1330  NoPredictionD2->setBinContent(indexDisk[4],nopredictionsratio);
1331  NoPredictionD2->setBinLabel(indexDisk[4],camera,1);
1332  }else if(Disk==3){
1333  EffDistroD3->Fill(averageeff);
1334  indexDisk[5]++;
1335  EffGlobD3->setBinContent(indexDisk[5],ef);
1336  EffGlobD3->setBinError(indexDisk[5],er);
1337  EffGlobD3->setBinLabel(indexDisk[5],camera,1);
1338 
1339  BXGlobD3->setBinContent(indexDisk[5],mybxhisto);
1340  BXGlobD3->setBinError(indexDisk[5],mybxerror);
1341  BXGlobD3->setBinLabel(indexDisk[5],camera,1);
1342 
1343  MaskedGlobD3->setBinContent(indexDisk[5],maskedratio);
1344  MaskedGlobD3->setBinLabel(indexDisk[5],camera,1);
1345 
1346  AverageEffD3->setBinContent(indexDisk[5],averageeff);
1347  AverageEffD3->setBinError(indexDisk[5],averageerr);
1348  AverageEffD3->setBinLabel(indexDisk[5],camera,1);
1349 
1350  NoPredictionD3->setBinContent(indexDisk[5],nopredictionsratio);
1351  NoPredictionD3->setBinLabel(indexDisk[5],camera,1);
1352  }
1353  }else{//Far Side
1354 
1355  if(Disk==-3){
1356  EffDistroDm3far->Fill(averageeff);
1357  indexDiskf[0]++;
1358  EffGlobDm3far->setBinContent(indexDiskf[0],ef);
1359  EffGlobDm3far->setBinError(indexDiskf[0],er);
1360  EffGlobDm3far->setBinLabel(indexDiskf[0],camera,1);
1361 
1362  BXGlobDm3far->setBinContent(indexDiskf[0],mybxhisto);
1363  BXGlobDm3far->setBinError(indexDiskf[0],mybxerror);
1364  BXGlobDm3far->setBinLabel(indexDiskf[0],camera);
1365 
1366  MaskedGlobDm3far->setBinContent(indexDiskf[0],maskedratio);
1367  MaskedGlobDm3far->setBinLabel(indexDiskf[0],camera,1);
1368 
1369  AverageEffDm3far->setBinContent(indexDiskf[0],averageeff);
1370  AverageEffDm3far->setBinError(indexDiskf[0],averageerr);
1371  AverageEffDm3far->setBinLabel(indexDiskf[0],camera,1);
1372 
1373  NoPredictionDm3->setBinContent(indexDisk[0],nopredictionsratio);
1374  NoPredictionDm3->setBinLabel(indexDisk[0],camera,1);
1375 
1376  }
1377  else if(Disk==-2){
1378  EffDistroDm2far->Fill(averageeff);
1379  indexDiskf[1]++;
1380  EffGlobDm2far->setBinContent(indexDiskf[1],ef);
1381  EffGlobDm2far->setBinError(indexDiskf[1],er);
1382  EffGlobDm2far->setBinLabel(indexDiskf[1],camera,1);
1383 
1384  BXGlobDm2far->setBinContent(indexDiskf[1],mybxhisto);
1385  BXGlobDm2far->setBinError(indexDiskf[1],mybxerror);
1386  BXGlobDm2far->setBinLabel(indexDiskf[1],camera);
1387 
1388  MaskedGlobDm2far->setBinContent(indexDiskf[1],maskedratio);
1389  MaskedGlobDm2far->setBinLabel(indexDiskf[1],camera,1);
1390 
1391  AverageEffDm2far->setBinContent(indexDiskf[1],averageeff);
1392  AverageEffDm2far->setBinError(indexDiskf[1],averageerr);
1393  AverageEffDm2far->setBinLabel(indexDiskf[1],camera,1);
1394 
1395  NoPredictionDm2->setBinContent(indexDisk[1],nopredictionsratio);
1396  NoPredictionDm2->setBinLabel(indexDisk[1],camera,1);
1397 
1398  }else if(Disk==-1){
1399  EffDistroDm1far->Fill(averageeff);
1400  indexDiskf[2]++;
1401  EffGlobDm1far->setBinContent(indexDiskf[2],ef);
1402  EffGlobDm1far->setBinError(indexDiskf[2],er);
1403  EffGlobDm1far->setBinLabel(indexDiskf[2],camera,1);
1404 
1405  BXGlobDm1far->setBinContent(indexDiskf[2],mybxhisto);
1406  BXGlobDm1far->setBinError(indexDiskf[2],mybxerror);
1407  BXGlobDm1far->setBinLabel(indexDiskf[2],camera,1);
1408 
1409  MaskedGlobDm1far->setBinContent(indexDiskf[2],maskedratio);
1410  MaskedGlobDm1far->setBinLabel(indexDiskf[2],camera,1);
1411 
1412  AverageEffDm1far->setBinContent(indexDiskf[2],averageeff);
1413  AverageEffDm1far->setBinError(indexDiskf[2],averageerr);
1414  AverageEffDm1far->setBinLabel(indexDiskf[2],camera,1);
1415 
1416  NoPredictionDm1far->setBinContent(indexDiskf[2],nopredictionsratio);
1417  NoPredictionDm1far->setBinLabel(indexDiskf[2],camera,1);
1418 
1419  }else if(Disk==1){
1420  EffDistroD1far->Fill(averageeff);
1421  indexDiskf[3]++;
1422  EffGlobD1far->setBinContent(indexDiskf[3],ef);
1423  EffGlobD1far->setBinError(indexDiskf[3],er);
1424  EffGlobD1far->setBinLabel(indexDiskf[3],camera,1);
1425 
1426  BXGlobD1far->setBinContent(indexDiskf[3],mybxhisto);
1427  BXGlobD1far->setBinError(indexDiskf[3],mybxerror);
1428  BXGlobD1far->setBinLabel(indexDiskf[3],camera,1);
1429 
1430  MaskedGlobD1far->setBinContent(indexDiskf[3],maskedratio);
1431  MaskedGlobD1far->setBinLabel(indexDiskf[3],camera,1);
1432 
1433  AverageEffD1far->setBinContent(indexDiskf[3],averageeff);
1434  AverageEffD1far->setBinError(indexDiskf[3],averageerr);
1435  AverageEffD1far->setBinLabel(indexDiskf[3],camera,1);
1436 
1437  NoPredictionD1far->setBinContent(indexDiskf[3],nopredictionsratio);
1438  NoPredictionD1far->setBinLabel(indexDiskf[3],camera,1);
1439 
1440  }else if(Disk==2){
1441  EffDistroD2far->Fill(averageeff);
1442  indexDiskf[4]++;
1443  EffGlobD2far->setBinContent(indexDiskf[4],ef);
1444  EffGlobD2far->setBinError(indexDiskf[4],er);
1445  EffGlobD2far->setBinLabel(indexDiskf[4],camera,1);
1446 
1447  BXGlobD2far->setBinContent(indexDiskf[4],mybxhisto);
1448  BXGlobD2far->setBinError(indexDiskf[4],mybxerror);
1449  BXGlobD2far->setBinLabel(indexDiskf[4],camera,1);
1450 
1451  MaskedGlobD2far->setBinContent(indexDiskf[4],maskedratio);
1452  MaskedGlobD2far->setBinLabel(indexDiskf[4],camera,1);
1453 
1454  AverageEffD2far->setBinContent(indexDiskf[4],averageeff);
1455  AverageEffD2far->setBinError(indexDiskf[4],averageerr);
1456  AverageEffD2far->setBinLabel(indexDiskf[4],camera,1);
1457 
1458  NoPredictionD2far->setBinContent(indexDiskf[4],nopredictionsratio);
1459  NoPredictionD2far->setBinLabel(indexDiskf[4],camera,1);
1460  }else if(Disk==3){
1461  EffDistroD3far->Fill(averageeff);
1462  indexDiskf[5]++;
1463  EffGlobD3far->setBinContent(indexDiskf[5],ef);
1464  EffGlobD3far->setBinError(indexDiskf[5],er);
1465  EffGlobD3far->setBinLabel(indexDiskf[5],camera,1);
1466 
1467  BXGlobD3far->setBinContent(indexDiskf[5],mybxhisto);
1468  BXGlobD3far->setBinError(indexDiskf[5],mybxerror);
1469  BXGlobD3far->setBinLabel(indexDiskf[5],camera,1);
1470 
1471  MaskedGlobD3far->setBinContent(indexDiskf[5],maskedratio);
1472  MaskedGlobD3far->setBinLabel(indexDiskf[5],camera,1);
1473 
1474  AverageEffD3far->setBinContent(indexDiskf[5],averageeff);
1475  AverageEffD3far->setBinError(indexDiskf[5],averageerr);
1476  AverageEffD3far->setBinLabel(indexDiskf[5],camera,1);
1477 
1478  NoPredictionD3far->setBinContent(indexDiskf[5],nopredictionsratio);
1479  NoPredictionD3far->setBinLabel(indexDiskf[5],camera,1);
1480  }
1481  }//Finishing EndCap
1482  }
1483  }
1484  }
1485  }
1486 
1487  float eff,N,err;
1488  int k;
1489  for(k=1;k<=36;k++){
1490  err=0; eff=0; N=ExGregD1R2->getBinContent(k);
1491  if(N!=0.){ eff = OcGregD1R2->getBinContent(k)/N; err=sqrt(eff*(1-eff)/N);}
1492  GregD1R2->setBinContent(k,eff); GregD1R2->setBinError(k,err);
1493 
1494  err=0; eff=0; N=ExGregD1R3->getBinContent(k);
1495  if(N!=0.){eff = OcGregD1R3->getBinContent(k)/N;err=sqrt(eff*(1-eff)/N);}
1496  GregD1R3->setBinContent(k,eff); GregD1R3->setBinError(k,err);
1497 
1498  err=0; eff=0; N=ExGregD2R2->getBinContent(k);
1499  if(N!=0.){ eff = OcGregD2R2->getBinContent(k)/N;err=sqrt(eff*(1-eff)/N);}
1500  GregD2R2->setBinContent(k,eff); GregD2R2->setBinError(k,err);
1501 
1502  err=0; eff=0; N=ExGregD2R3->getBinContent(k);
1503  if(N!=0.){ eff = OcGregD2R3->getBinContent(k)/N;err=sqrt(eff*(1-eff)/N);}
1504  GregD2R3->setBinContent(k,eff); GregD2R3->setBinError(k,err);
1505 
1506  err=0; eff=0; N=ExGregD3R2->getBinContent(k);
1507  if(N!=0.){ eff = OcGregD3R2->getBinContent(k)/N;err=sqrt(eff*(1-eff)/N);}
1508  GregD3R2->setBinContent(k,eff); GregD3R2->setBinError(k,err);
1509 
1510  err=0; eff=0; N=ExGregD3R3->getBinContent(k);
1511  if(N!=0.){ eff = OcGregD3R3->getBinContent(k)/N;err=sqrt(eff*(1-eff)/N);}
1512  GregD3R3->setBinContent(k,eff); GregD3R3->setBinError(k,err);
1513  }
1514 
1515  for(k=1;k<=12;k++){
1516  err=0; eff=0; N=ExsectorEffWm2->getBinContent(k);
1517  if(N!=0.){ eff = OcsectorEffWm2->getBinContent(k)/N;err=sqrt(eff*(1-eff)/N);}
1519 
1520  err=0; eff=0; N=ExsectorEffWm1->getBinContent(k);
1521  if(N!=0.){ eff = OcsectorEffWm1->getBinContent(k)/N;err=sqrt(eff*(1-eff)/N);}
1523 
1524  err=0; eff=0; N=ExsectorEffW0->getBinContent(k);
1525  if(N!=0.){ eff = OcsectorEffW0->getBinContent(k)/N;err=sqrt(eff*(1-eff)/N);}
1527 
1528  err=0; eff=0; N=ExsectorEffW1->getBinContent(k);
1529  if(N!=0.){ eff = OcsectorEffW1->getBinContent(k)/N;err=sqrt(eff*(1-eff)/N);}
1531 
1532  err=0; eff=0; N=ExsectorEffW2->getBinContent(k);
1533  if(N!=0.){ eff = OcsectorEffW2->getBinContent(k)/N;err=sqrt(eff*(1-eff)/N);}
1535  }
1536 
1537  //Ranges for Both
1538  //Barrel
1539 
1540  if(barrel){
1541  EffGlobWm2->setAxisRange(-4.,100.,2);
1542  EffGlobWm1->setAxisRange(-4.,100.,2);
1543  EffGlobW0->setAxisRange(-4.,100.,2);
1544  EffGlobW1->setAxisRange(-4.,100.,2);
1545  EffGlobW2->setAxisRange(-4.,100.,2);
1546 
1547  EffGlobWm2far->setAxisRange(-4.,100.,2);
1548  EffGlobWm1far->setAxisRange(-4.,100.,2);
1549  EffGlobW0far->setAxisRange(-4.,100.,2);
1550  EffGlobW1far->setAxisRange(-4.,100.,2);
1551  EffGlobW2far->setAxisRange(-4.,100.,2);
1552 
1553  AverageEffWm2->setAxisRange(-4.,100.,2);
1554  AverageEffWm1->setAxisRange(-4.,100.,2);
1555  AverageEffW0->setAxisRange(-4.,100.,2);
1556  AverageEffW1->setAxisRange(-4.,100.,2);
1557  AverageEffW2->setAxisRange(-4.,100.,2);
1558 
1559  AverageEffWm2far->setAxisRange(-4.,100.,2);
1560  AverageEffWm1far->setAxisRange(-4.,100.,2);
1561  AverageEffW0far->setAxisRange(-4.,100.,2);
1562  AverageEffW1far->setAxisRange(-4.,100.,2);
1563  AverageEffW2far->setAxisRange(-4.,100.,2);
1564 
1565  MaskedGlobWm2->setAxisRange(-4.,100.,2);
1566  MaskedGlobWm1->setAxisRange(-4.,100.,2);
1567  MaskedGlobW0->setAxisRange(-4.,100.,2);
1568  MaskedGlobW1->setAxisRange(-4.,100.,2);
1569  MaskedGlobW2->setAxisRange(-4.,100.,2);
1570 
1571  MaskedGlobWm2far->setAxisRange(-4.,100.,2);
1572  MaskedGlobWm1far->setAxisRange(-4.,100.,2);
1573  MaskedGlobW0far->setAxisRange(-4.,100.,2);
1574  MaskedGlobW1far->setAxisRange(-4.,100.,2);
1575  MaskedGlobW2far->setAxisRange(-4.,100.,2);
1576 
1577  NoPredictionWm2->setAxisRange(-4.,100.,2);
1578  NoPredictionWm1->setAxisRange(-4.,100.,2);
1579  NoPredictionW0->setAxisRange(-4.,100.,2);
1580  NoPredictionW1->setAxisRange(-4.,100.,2);
1581  NoPredictionW2->setAxisRange(-4.,100.,2);
1582 
1583  NoPredictionWm2far->setAxisRange(-4.,100.,2);
1584  NoPredictionWm1far->setAxisRange(-4.,100.,2);
1585  NoPredictionW0far->setAxisRange(-4.,100.,2);
1586  NoPredictionW1far->setAxisRange(-4.,100.,2);
1587  NoPredictionW2far->setAxisRange(-4.,100.,2);
1588  }
1589  //EndCap
1590 
1591  if(endcap){
1592  EffGlobDm3->setAxisRange(-4.,100.,2);
1593  EffGlobDm2->setAxisRange(-4.,100.,2);
1594  EffGlobDm1->setAxisRange(-4.,100.,2);
1595  EffGlobD1->setAxisRange(-4.,100.,2);
1596  EffGlobD2->setAxisRange(-4.,100.,2);
1597  EffGlobD3->setAxisRange(-4.,100.,2);
1598 
1599  EffGlobDm3far->setAxisRange(-4.,100.,2);
1600  EffGlobDm2far->setAxisRange(-4.,100.,2);
1601  EffGlobDm1far->setAxisRange(-4.,100.,2);
1602  EffGlobD1far->setAxisRange(-4.,100.,2);
1603  EffGlobD2far->setAxisRange(-4.,100.,2);
1604  EffGlobD3far->setAxisRange(-4.,100.,2);
1605 
1606  BXGlobDm3->setAxisRange(-4.,100.,2);
1607  BXGlobDm2->setAxisRange(-4.,100.,2);
1608  BXGlobDm1->setAxisRange(-4.,100.,2);
1609  BXGlobD1->setAxisRange(-4.,100.,2);
1610  BXGlobD2->setAxisRange(-4.,100.,2);
1611  BXGlobD3->setAxisRange(-4.,100.,2);
1612 
1613  BXGlobDm3far->setAxisRange(-4.,100.,2);
1614  BXGlobDm2far->setAxisRange(-4.,100.,2);
1615  BXGlobDm1far->setAxisRange(-4.,100.,2);
1616  BXGlobD1far->setAxisRange(-4.,100.,2);
1617  BXGlobD2far->setAxisRange(-4.,100.,2);
1618  BXGlobD3far->setAxisRange(-4.,100.,2);
1619 
1620  MaskedGlobDm3->setAxisRange(-4.,100.,2);
1621  MaskedGlobDm2->setAxisRange(-4.,100.,2);
1622  MaskedGlobDm1->setAxisRange(-4.,100.,2);
1623  MaskedGlobD1->setAxisRange(-4.,100.,2);
1624  MaskedGlobD2->setAxisRange(-4.,100.,2);
1625  MaskedGlobD3->setAxisRange(-4.,100.,2);
1626 
1627  MaskedGlobDm3far->setAxisRange(-4.,100.,2);
1628  MaskedGlobDm2far->setAxisRange(-4.,100.,2);
1629  MaskedGlobDm1far->setAxisRange(-4.,100.,2);
1630  MaskedGlobD1far->setAxisRange(-4.,100.,2);
1631  MaskedGlobD2far->setAxisRange(-4.,100.,2);
1632  MaskedGlobD3far->setAxisRange(-4.,100.,2);
1633 
1634  AverageEffDm3->setAxisRange(-4.,100.,2);
1635  AverageEffDm2->setAxisRange(-4.,100.,2);
1636  AverageEffDm1->setAxisRange(-4.,100.,2);
1637  AverageEffD1->setAxisRange(-4.,100.,2);
1638  AverageEffD2->setAxisRange(-4.,100.,2);
1639  AverageEffD3->setAxisRange(-4.,100.,2);
1640 
1641  AverageEffDm3far->setAxisRange(-4.,100.,2);
1642  AverageEffDm2far->setAxisRange(-4.,100.,2);
1643  AverageEffDm1far->setAxisRange(-4.,100.,2);
1644  AverageEffD1far->setAxisRange(-4.,100.,2);
1645  AverageEffD2far->setAxisRange(-4.,100.,2);
1646  AverageEffD3far->setAxisRange(-4.,100.,2);
1647 
1648  NoPredictionDm3->setAxisRange(-4.,100.,2);
1649  NoPredictionDm2->setAxisRange(-4.,100.,2);
1650  NoPredictionDm1->setAxisRange(-4.,100.,2);
1651  NoPredictionD1->setAxisRange(-4.,100.,2);
1652  NoPredictionD2->setAxisRange(-4.,100.,2);
1653  NoPredictionD3->setAxisRange(-4.,100.,2);
1654 
1655  NoPredictionDm3far->setAxisRange(-4.,100.,2);
1656  NoPredictionDm2far->setAxisRange(-4.,100.,2);
1657  NoPredictionDm1far->setAxisRange(-4.,100.,2);
1658  NoPredictionD1far->setAxisRange(-4.,100.,2);
1659  NoPredictionD2far->setAxisRange(-4.,100.,2);
1660  NoPredictionD3far->setAxisRange(-4.,100.,2);
1661  }
1662 
1663  //Title for Both
1664 
1665  //Barrel
1666  if(barrel){
1667  EffGlobWm2->setAxisTitle("%",2);
1668  EffGlobWm1->setAxisTitle("%",2);
1669  EffGlobW0->setAxisTitle("%",2);
1670  EffGlobW1->setAxisTitle("%",2);
1671  EffGlobW2->setAxisTitle("%",2);
1672 
1673  EffGlobWm2far->setAxisTitle("%",2);
1674  EffGlobWm1far->setAxisTitle("%",2);
1675  EffGlobW0far->setAxisTitle("%",2);
1676  EffGlobW1far->setAxisTitle("%",2);
1677  EffGlobW2far->setAxisTitle("%",2);
1678 
1679  AverageEffWm2->setAxisTitle("%",2);
1680  AverageEffWm1->setAxisTitle("%",2);
1681  AverageEffW0->setAxisTitle("%",2);
1682  AverageEffW1->setAxisTitle("%",2);
1683  AverageEffW2->setAxisTitle("%",2);
1684 
1687  AverageEffW0far->setAxisTitle("%",2);
1688  AverageEffW1far->setAxisTitle("%",2);
1689  AverageEffW2far->setAxisTitle("%",2);
1690 
1691  MaskedGlobWm2->setAxisTitle("%",2);
1692  MaskedGlobWm1->setAxisTitle("%",2);
1693  MaskedGlobW0->setAxisTitle("%",2);
1694  MaskedGlobW1->setAxisTitle("%",2);
1695  MaskedGlobW2->setAxisTitle("%",2);
1696 
1699  MaskedGlobW0far->setAxisTitle("%",2);
1700  MaskedGlobW1far->setAxisTitle("%",2);
1701  MaskedGlobW2far->setAxisTitle("%",2);
1702 
1703  NoPredictionWm2->setAxisTitle("%",2);
1704  NoPredictionWm1->setAxisTitle("%",2);
1705  NoPredictionW0->setAxisTitle("%",2);
1706  NoPredictionW1->setAxisTitle("%",2);
1707  NoPredictionW2->setAxisTitle("%",2);
1708 
1714  }
1715  //EndCap
1716 
1717  if(endcap){
1718  EffGlobDm3->setAxisTitle("%",2);
1719  EffGlobDm2->setAxisTitle("%",2);
1720  EffGlobDm1->setAxisTitle("%",2);
1721  EffGlobD1->setAxisTitle("%",2);
1722  EffGlobD2->setAxisTitle("%",2);
1723  EffGlobD3->setAxisTitle("%",2);
1724 
1725  EffGlobDm3far->setAxisTitle("%",2);
1726  EffGlobDm2far->setAxisTitle("%",2);
1727  EffGlobDm1far->setAxisTitle("%",2);
1728  EffGlobD1far->setAxisTitle("%",2);
1729  EffGlobD2far->setAxisTitle("%",2);
1730  EffGlobD3far->setAxisTitle("%",2);
1731 
1732  BXGlobDm3->setAxisTitle("%",2);
1733  BXGlobDm2->setAxisTitle("%",2);
1734  BXGlobDm1->setAxisTitle("%",2);
1735  BXGlobD1->setAxisTitle("%",2);
1736  BXGlobD2->setAxisTitle("%",2);
1737  BXGlobD3->setAxisTitle("%",2);
1738 
1739  BXGlobDm3far->setAxisTitle("%",2);
1740  BXGlobDm2far->setAxisTitle("%",2);
1741  BXGlobDm1far->setAxisTitle("%",2);
1742  BXGlobD1far->setAxisTitle("%",2);
1743  BXGlobD2far->setAxisTitle("%",2);
1744  BXGlobD3far->setAxisTitle("%",2);
1745 
1746  MaskedGlobDm3->setAxisTitle("%",2);
1747  MaskedGlobDm2->setAxisTitle("%",2);
1748  MaskedGlobDm1->setAxisTitle("%",2);
1749  MaskedGlobD1->setAxisTitle("%",2);
1750  MaskedGlobD2->setAxisTitle("%",2);
1751  MaskedGlobD3->setAxisTitle("%",2);
1752 
1756  MaskedGlobD1far->setAxisTitle("%",2);
1757  MaskedGlobD2far->setAxisTitle("%",2);
1758  MaskedGlobD3far->setAxisTitle("%",2);
1759 
1760  AverageEffDm3->setAxisTitle("%",2);
1761  AverageEffDm2->setAxisTitle("%",2);
1762  AverageEffDm1->setAxisTitle("%",2);
1763  AverageEffD1->setAxisTitle("%",2);
1764  AverageEffD2->setAxisTitle("%",2);
1765  AverageEffD3->setAxisTitle("%",2);
1766 
1770  AverageEffD1far->setAxisTitle("%",2);
1771  AverageEffD2far->setAxisTitle("%",2);
1772  AverageEffD3far->setAxisTitle("%",2);
1773 
1774  NoPredictionDm3->setAxisTitle("%",2);
1775  NoPredictionDm2->setAxisTitle("%",2);
1776  NoPredictionDm1->setAxisTitle("%",2);
1777  NoPredictionD1->setAxisTitle("%",2);
1778  NoPredictionD2->setAxisTitle("%",2);
1779  NoPredictionD3->setAxisTitle("%",2);
1780 
1787  }
1788 
1789  EffGlobDm3->setAxisTitle("%",2);
1790  EffGlobDm2->setAxisTitle("%",2);
1791  EffGlobDm1->setAxisTitle("%",2);
1792  EffGlobD1->setAxisTitle("%",2);
1793  EffGlobD2->setAxisTitle("%",2);
1794  EffGlobD3->setAxisTitle("%",2);
1795 
1796  EffGlobDm3far->setAxisTitle("%",2);
1797  EffGlobDm2far->setAxisTitle("%",2);
1798  EffGlobDm1far->setAxisTitle("%",2);
1799  EffGlobD1far->setAxisTitle("%",2);
1800  EffGlobD2far->setAxisTitle("%",2);
1801  EffGlobD3far->setAxisTitle("%",2);
1802 
1803  BXGlobDm3->setAxisTitle("%",2);
1804  BXGlobDm2->setAxisTitle("%",2);
1805  BXGlobDm1->setAxisTitle("%",2);
1806  BXGlobD1->setAxisTitle("%",2);
1807  BXGlobD2->setAxisTitle("%",2);
1808  BXGlobD3->setAxisTitle("%",2);
1809 
1810  BXGlobDm3far->setAxisTitle("%",2);
1811  BXGlobDm2far->setAxisTitle("%",2);
1812  BXGlobDm1far->setAxisTitle("%",2);
1813  BXGlobD1far->setAxisTitle("%",2);
1814  BXGlobD2far->setAxisTitle("%",2);
1815  BXGlobD3far->setAxisTitle("%",2);
1816 
1817  MaskedGlobDm3->setAxisTitle("%",2);
1818  MaskedGlobDm2->setAxisTitle("%",2);
1819  MaskedGlobDm1->setAxisTitle("%",2);
1820  MaskedGlobD1->setAxisTitle("%",2);
1821  MaskedGlobD2->setAxisTitle("%",2);
1822  MaskedGlobD3->setAxisTitle("%",2);
1823 
1827  MaskedGlobD1far->setAxisTitle("%",2);
1828  MaskedGlobD2far->setAxisTitle("%",2);
1829  MaskedGlobD3far->setAxisTitle("%",2);
1830 
1831  AverageEffDm3->setAxisTitle("%",2);
1832  AverageEffDm2->setAxisTitle("%",2);
1833  AverageEffDm1->setAxisTitle("%",2);
1834  AverageEffD1->setAxisTitle("%",2);
1835  AverageEffD2->setAxisTitle("%",2);
1836  AverageEffD3->setAxisTitle("%",2);
1837 
1841  AverageEffD1far->setAxisTitle("%",2);
1842  AverageEffD2far->setAxisTitle("%",2);
1843  AverageEffD3far->setAxisTitle("%",2);
1844 
1845  NoPredictionDm3->setAxisTitle("%",2);
1846  NoPredictionDm2->setAxisTitle("%",2);
1847  NoPredictionDm1->setAxisTitle("%",2);
1848  NoPredictionD1->setAxisTitle("%",2);
1849  NoPredictionD2->setAxisTitle("%",2);
1850  NoPredictionD3->setAxisTitle("%",2);
1851 
1858 
1859  if(debug) std::cout<<"Saving RootFile"<<std::endl;
1860  if(SaveFile)dbe->save(NameFile);
1861  if(debug) std::cout<<"RPCEFFICIENCY SECOND DONE"<<std::endl;
1862 
1863 }
1864 
1866 
1867 }
1868 
MonitorElement * EffGlobD1
MonitorElement * MaskedGlobWm1
MonitorElement * GregD3R2
MonitorElement * EffGlobWm1far
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * ExGregD1R3
MonitorElement * hGlobalResClu2R2C
MonitorElement * hGlobal2ResClu1La2
int i
Definition: DBlmapReader.cc:9
MonitorElement * MaskedGlobW2
MonitorElement * MaskedGlobDm3
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * NoPredictionDm1
MonitorElement * EffGlobW2far
MonitorElement * hGlobal2ResClu1La6
MonitorElement * EffGlobDm2far
MonitorElement * OcGregD3R2
MonitorElement * OcGregD1R3
const std::string & label
Definition: MVAComputer.cc:186
MonitorElement * hGlobalResClu3R3A
MonitorElement * ExGregD3R2
MonitorElement * hGlobal2ResClu3R3B
MonitorElement * NoPredictionW0far
RPCEfficiencySecond(const edm::ParameterSet &)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:519
MonitorElement * histoCSC
void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
MonitorElement * BXGlobW1
MonitorElement * AverageEffDm3
MonitorElement * MaskedGlobW2far
MonitorElement * EffDistroD2
MonitorElement * GregD2R3
MonitorElement * hGlobalResClu3La1
MonitorElement * hGlobalResClu2La1
MonitorElement * EffDistroD1
MonitorElement * MaskedGlobWm2far
MonitorElement * EffGlobW1far
MonitorElement * Diskm2Summary
MonitorElement * sectorEffWm2
MonitorElement * NoPredictionD2
MonitorElement * EffGlobDm1far
MonitorElement * MaskedGlobW0far
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:1883
MonitorElement * BXGlobW0
MonitorElement * hGlobalResClu1R2C
MonitorElement * OcGregD2R2
MonitorElement * NoPredictionD1
MonitorElement * MaskedGlobDm2
MonitorElement * BXGlobDm1
MonitorElement * histoDT
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * BXGlobDm2far
#define abs(x)
Definition: mlp_lapack.h:159
MonitorElement * NoPredictionW1far
MonitorElement * EffDistroWm2
MonitorElement * EffDistroW0far
MonitorElement * hGlobal2ResClu1La5
MonitorElement * hGlobalResClu1La6
MonitorElement * BXGlobDm1far
MonitorElement * hGlobalResClu2R3B
MonitorElement * hGlobal2ResClu2R2B
MonitorElement * Disk3Summary
MonitorElement * ExsectorEffW2
MonitorElement * NoPredictionW2
MonitorElement * EffDistroDm2far
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * hGlobalResClu1La2
MonitorElement * EffGlobW1
MonitorElement * hGlobalResClu1La1
MonitorElement * GregD3R3
MonitorElement * hGlobal2ResClu3R2B
MonitorElement * EffGlobD2
MonitorElement * NoPredictionD3
MonitorElement * MaskedGlobD2far
MonitorElement * histoPRO
MonitorElement * OcsectorEffWm2
MonitorElement * ExsectorEffW1
MonitorElement * hGlobal2ResClu2La4
MonitorElement * AverageEffW0far
MonitorElement * EffDistroDm1
MonitorElement * NoPredictionD1far
MonitorElement * hGlobalResClu1R3A
void Fill(long long x)
MonitorElement * EffGlobW0
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
MonitorElement * EffGlobWm2far
MonitorElement * hGlobalResClu2R2B
MonitorElement * MaskedGlobD2
MonitorElement * hGlobal2ResClu2R3A
MonitorElement * EffDistroDm3
MonitorElement * ExsectorEffWm2
MonitorElement * AverageEffD3
MonitorElement * EffDistroWm1
MonitorElement * BXGlobW0far
MonitorElement * hGlobalResClu1R3C
MonitorElement * EffGlobD1far
MonitorElement * NoPredictionD2far
MonitorElement * BXGlobWm1
MonitorElement * hGlobal2ResClu2R3B
virtual void endRun(const edm::Run &, const edm::EventSetup &)
MonitorElement * hGlobalResClu1La4
MonitorElement * Diskm3Summary
MonitorElement * AverageEffDm1far
MonitorElement * AverageEffD2
MonitorElement * BXGlobW1far
int iEvent
Definition: GenABIO.cc:243
virtual std::string name()
Definition: RPCGeomServ.cc:15
MonitorElement * AverageEffWm1far
MonitorElement * hGlobal2ResClu1La4
MonitorElement * hGlobal2ResClu3R2A
MonitorElement * EffDistroWm2far
MonitorElement * Wheelm1Summary
MonitorElement * MaskedGlobD1far
Definition: Ring.h:31
MonitorElement * MaskedGlobWm1far
MonitorElement * hGlobalResClu2La4
MonitorElement * EffGlobDm3far
MonitorElement * EffGlobW2
MonitorElement * MaskedGlobDm1
MonitorElement * hGlobalResClu2R3A
MonitorElement * BXGlobDm2
MonitorElement * EffDistroWm1far
int rollY(std::string shortname, std::vector< std::string > rollNames)
int ring() const
Definition: RPCDetId.h:74
MonitorElement * EffDistroD1far
MonitorElement * OcGregD3R3
T sqrt(T t)
Definition: SSEVec.h:28
MonitorElement * AverageEffDm3far
MonitorElement * EffDistroD3
MonitorElement * Wheel1Summary
MonitorElement * hGlobal2ResClu2R3C
MonitorElement * sectorEffW2
MonitorElement * EffGlobDm2
MonitorElement * statistics2
MonitorElement * BXGlobD3
MonitorElement * hGlobal2ResClu2La2
MonitorElement * hGlobalResClu3La2
MonitorElement * MaskedGlobDm1far
MonitorElement * BXGlobWm2
MonitorElement * MaskedGlobW1far
MonitorElement * MaskedGlobD1
const std::vector< const RPCRoll * > & rolls() const
Return the Rolls.
Definition: RPCChamber.cc:70
int j
Definition: DBlmapReader.cc:9
MonitorElement * NoPredictionWm1far
MonitorElement * hGlobal2ResClu3La6
MonitorElement * MaskedGlobW0
MonitorElement * MaskedGlobWm2
MonitorElement * BXGlobD2far
MonitorElement * hGlobal2ResClu3La4
MonitorElement * AverageEffW2far
MonitorElement * AverageEffWm2far
MonitorElement * MaskedGlobDm2far
MonitorElement * hGlobalResClu1R2B
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * AverageEffDm1
MonitorElement * OcGregD1R2
MonitorElement * hGlobalResClu1La3
MonitorElement * BXGlobDm3
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
MonitorElement * OcsectorEffW0
MonitorElement * hGlobal2ResClu2La6
virtual std::string shortname()
Definition: RPCGeomServ.cc:130
MonitorElement * NoPredictionWm2
MonitorElement * Disk1Summary
MonitorElement * hGlobalResClu3La4
MonitorElement * NoPredictionWm1
MonitorElement * BXGlobD2
MonitorElement * BXGlobD1far
MonitorElement * hGlobalResClu3R2C
MonitorElement * GregD1R3
std::map< int, std::map< std::string, MonitorElement * > > meCollection
MonitorElement * EffDistroW2
MonitorElement * BXGlobD3far
MonitorElement * sectorEffW1
MonitorElement * AverageEffDm2far
MonitorElement * BXGlobWm1far
MonitorElement * hGlobal2ResClu1R3A
int k[5][pyjets_maxn]
MonitorElement * AverageEffWm2
MonitorElement * EffGlobW0far
MonitorElement * hGlobalResClu3R3B
MonitorElement * hGlobalResClu1La5
MonitorElement * ExsectorEffW0
MonitorElement * EffGlobD3far
virtual int segment()
Definition: RPCGeomServ.cc:375
MonitorElement * hGlobal2ResClu2La1
MonitorElement * EffGlobD3
MonitorElement * EffDistroW1
MonitorElement * hGlobalResClu2La3
std::string folderStructure(RPCDetId detId)
MonitorElement * Diskm1Summary
MonitorElement * BXGlobW2far
MonitorElement * GregD1R2
MonitorElement * OcGregD2R3
MonitorElement * AverageEffDm2
MonitorElement * hGlobal2ResClu3La2
const T & get() const
Definition: EventSetup.h:55
TH1F * getTH1F(void) const
MonitorElement * hGlobal2ResClu3La5
MonitorElement * hGlobalResClu2La5
MonitorElement * NoPredictionWm2far
MonitorElement * NoPredictionD3far
MonitorElement * ExGregD2R2
MonitorElement * Wheel2Summary
MonitorElement * EffDistroDm3far
MonitorElement * Disk2Summary
MonitorElement * hGlobalResClu3La6
MonitorElement * hGlobalResClu3La5
MonitorElement * hGlobalResClu2R2A
MonitorElement * hGlobal2ResClu1R2C
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:104
MonitorElement * hGlobalResClu1R2A
MonitorElement * EffGlobWm1
MonitorElement * BXGlobWm2far
MonitorElement * hGlobalResClu2La2
MonitorElement * hGlobal2ResClu3R2C
std::map< std::string, MonitorElement * > bookDetUnitSeg(RPCDetId &detId, int nstrips, std::string folder)
MonitorElement * NoPredictionDm2
MonitorElement * GregD2R2
MonitorElement * hGlobalResClu3R2B
MonitorElement * hGlobalResClu1R3B
MonitorElement * EffGlobWm2
virtual void beginRun(const edm::Run &, const edm::EventSetup &iSetup)
MonitorElement * NoPredictionDm3
MonitorElement * EffDistroDm2
double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * EffDistroD2far
MonitorElement * EffDistroW0
MonitorElement * hGlobal2ResClu1La1
MonitorElement * NoPredictionDm2far
MonitorElement * Wheel0Summary
MonitorElement * OcsectorEffW2
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * EffGlobDm3
MonitorElement * ExsectorEffWm1
MonitorElement * hGlobalResClu3R2A
MonitorElement * AverageEffD3far
MonitorElement * hGlobal2ResClu1R3C
MonitorElement * NoPredictionDm1far
MonitorElement * OcsectorEffW1
MonitorElement * hGlobal2ResClu2La5
MonitorElement * hGlobal2ResClu2R2C
MonitorElement * MaskedGlobD3far
MonitorElement * Wheelm2Summary
MonitorElement * sectorEffW0
MonitorElement * hGlobal2ResClu1R2B
MonitorElement * hGlobal2ResClu3La1
MonitorElement * statistics
MonitorElement * AverageEffW0
MonitorElement * hGlobal2ResClu2La3
MonitorElement * hGlobalResClu2La6
MonitorElement * ExGregD1R2
MonitorElement * AverageEffW1
MonitorElement * AverageEffW1far
tuple cout
Definition: gather_cfg.py:41
MonitorElement * AverageEffD2far
MonitorElement * ExGregD3R3
MonitorElement * AverageEffD1far
MonitorElement * AverageEffWm1
MonitorElement * OcsectorEffWm1
MonitorElement * hGlobal2ResClu3R3A
MonitorElement * ExGregD2R3
MonitorElement * NoPredictionW1
MonitorElement * EffDistroDm1far
MonitorElement * BXGlobD1
MonitorElement * MaskedGlobW1
MonitorElement * BXDistribution
MonitorElement * hGlobal2ResClu1R2A
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:647
MonitorElement * AverageEffD1
MonitorElement * EffDistroW1far
MonitorElement * NoPredictionW2far
MonitorElement * EffGlobDm1
MonitorElement * MaskedGlobDm3far
MonitorElement * EffDistroW2far
MonitorElement * BXGlobW2
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * histoRPC
MonitorElement * hGlobalResClu2R3C
MonitorElement * sectorEffWm1
MonitorElement * AverageEffW2
MonitorElement * hGlobalResClu3R3C
MonitorElement * NoPredictionW0
MonitorElement * hGlobal2ResClu3La3
MonitorElement * BXGlobDm3far
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
MonitorElement * MaskedGlobD3
MonitorElement * EffDistroD3far
MonitorElement * hGlobal2ResClu2R2A
MonitorElement * NoPredictionDm3far
Definition: Run.h:31
MonitorElement * hGlobal2ResClu1R3B
MonitorElement * hGlobalResClu3La3
MonitorElement * hGlobal2ResClu3R3C
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:65
int station() const
Definition: RPCDetId.h:98
MonitorElement * EffGlobD2far
MonitorElement * hGlobal2ResClu1La3