51 std::stringstream folderName;
52 std::stringstream MeName; std::stringstream MeTitle;
53 for (
int w =-2;
w<=2;
w++){
58 MeName<<
"EffDistroWheel_"<<
w;
60 MeTitle<<
"Efficiency Distribution for Wheel "<<
w;
63 MeName<<
"GlobEfficiencyWheel_"<<
w;
65 MeTitle<<
"Efficiency Wheel "<<
w;
66 EffGlobW[w+2]=ibooker.
book1D(MeName.str(),MeTitle.str(),206,0.5,206.5);
69 MeName<<
"Efficiency_Roll_vs_Sector_Wheel_"<<
w;
70 WheelSummary[w+2] = ibooker.
book2D(MeName.str(),MeName.str(),12, 0.5,12.5, 21, 0.5, 21.5);
75 MeName<<
"AzimutalDistroW"<<
w;
77 MeTitle<<
"Efficiency per Sector Wheel "<<
w;
80 MeName<<
"AzimutalDistroW"<<w<<
"Ex";
82 MeTitle<<
"Expected per Sector Wheel "<<
w;
85 MeName<<
"AzimutalDistroW"<<w<<
"Oc";
87 MeTitle<<
"Occupancy per Sector Wheel "<<
w;
91 MeName<<
"ExpLayerW"<<
w;
93 MeTitle<<
"Expected Wheel "<<
w;
96 MeName<<
"ObsLayerW"<<
w;
98 MeTitle<<
"Observed Wheel "<<
w;
104 if (
d==0) {
continue;}
109 MeName<<
"EffDistroDisk_"<<
d;
111 MeTitle<<
"Efficiency Distribution Disk "<<
d;
114 MeName<<
"GlobEfficiencyDisk_"<<
d;
116 MeTitle<<
"Efficiency Disk "<<
d;
120 MeName<<
"Efficiency_Roll_vs_Segment_Disk_"<<
d;
126 MeName<<
"GregDistroR2D"<<
d;
128 MeTitle<<
"Efficiency for Station "<<d<<
" Ring 2";
131 MeName<<
"GregDistroR3D"<<
d;
133 MeTitle<<
"Efficiency for Station "<<d<<
" Ring 3";
136 MeName<<
"OcGregDistroR2D"<<
d;
138 MeTitle<<
"Occupancy Distribution for Station "<<d<<
" Ring 2";
141 MeName<<
"OcGregDistroR3D"<<
d;
143 MeTitle<<
"Occupancy Distribution for Station "<<d<<
" Ring 3";
146 MeName<<
"ExGregDistroR2D"<<
d;
148 MeTitle<<
"Expected Distribution for Station "<<d<<
" Ring 2";
151 MeName<<
"ExGregDistroR3D"<<
d;
153 MeTitle<<
"Expected Distribution for Station "<<d<<
" Ring 3";
160 LogDebug(
"rpcefficiencysecond")<<
"Getting the RPC Geometry";
164 std::stringstream binLabel;
165 for (
int w = -2; w<=2 ;w++){
166 for(
int x = 1;
x<=12;
x++){
167 for(
int y = 1;
y<=21;
y++){
173 for(
int x = 1;
x<=36;
x++){
174 for(
int y = 1;
y<=6;
y++){
181 for(
int j=0;j<5;j++){
185 for(
int j=0;j<10;j++){
188 for(TrackingGeometry::DetContainer::const_iterator it=
rpcGeo_->
dets().begin(); it!=
rpcGeo_->
dets().end();it++){
189 if(dynamic_cast< const RPCChamber* >( *it ) != 0 ){
191 std::vector< const RPCRoll*> roles = (ch->
rolls());
192 for(std::vector<const RPCRoll*>::const_iterator
r = roles.begin();
r != roles.end(); ++
r){
198 int region = rpcId.
region();
200 int sector = rpcId.
sector();
202 int geolayer = rpcId.
layer();
209 std::stringstream meIdRPC, meIdDT;
212 meIdRPC<<folder<<
"/RPCDataOccupancyFromDT_"<<rpcId.
rawId();
213 meIdDT<<folder<<
"/ExpectedOccupancyFromDT_"<<rpcId.
rawId();
216 int NumberWithOutPrediction=0;
223 double sumbuffef = 0.;
224 double sumbuffer = 0.;
225 double averageeff = 0.;
226 int NumberStripsPointed = 0;
228 for(
int i=1;
i<=
int((*r)->nstrips());++
i){
230 LogDebug(
"rpcefficiencysecond")<<
"Inside the If";
233 sumbuffef=sumbuffef+buffef;
234 sumbuffer = sumbuffer + buffer*
buffer;
235 NumberStripsPointed++;
237 NumberWithOutPrediction++;
239 LogDebug(
"rpcefficiencysecond")<<
"Strip="<<
i<<
" RPC="<<
histoRPC->
getBinContent(
i)<<
" DT="<<
histoDT->
getBinContent(
i)<<
" buffef="<<buffef<<
" sumbuffef="<<sumbuffef<<
" NumberStripsPointed="<<NumberStripsPointed<<
" NumberWithOutPrediction"<<NumberWithOutPrediction;
243 if(NumberStripsPointed!=0){
244 averageeff = (sumbuffef/double(NumberStripsPointed))*100.;
250 ef = double(o)/double(p);
251 er =
sqrt(ef*(1.-ef)/
double(p));
257 if(station==1&&geolayer==1) layer = 1;
258 else if(station==1&&geolayer==2) layer = 2;
259 else if(station==2&&geolayer==1) layer = 3;
260 else if(station==2&&geolayer==2) layer = 4;
261 else if(station==3) layer = 5;
262 else if(station==4) layer = 6;
265 LogDebug(
"rpcefficiencysecond")<<
"Pigi "<<camera<<
" "<<rpcsrv.shortname()<<
" "<<(*r)->id();
268 xBin= (*r)->id().sector();
274 indexWheel[wheel+2]++;
279 std::stringstream meIdRPC,meIdCSC;
281 meIdRPC<<folder<<
"/RPCDataOccupancyFromCSC_"<<rpcId.
rawId();
282 meIdCSC<<folder<<
"/ExpectedOccupancyFromCSC_"<<rpcId.
rawId();
286 int NumberWithOutPrediction=0;
293 double sumbuffef = 0;
294 double sumbuffer = 0;
295 double averageeff = 0;
296 int NumberStripsPointed = 0;
298 LogDebug(
"rpcefficiencysecond")<<rpcsrv.name();
299 for(
int i=1;
i<=
int((*r)->nstrips());++
i){
301 LogDebug(
"rpcefficiencysecond")<<
"Inside the If";
304 sumbuffef=sumbuffef+buffef;
305 sumbuffer = sumbuffer + buffer*
buffer;
306 NumberStripsPointed++;
308 NumberWithOutPrediction++;
310 LogDebug(
"rpcefficiencysecond")<<
"Strip="<<
i<<
" RPC="<<
histoRPC->
getBinContent(
i)<<
" CSC="<<
histoCSC->
getBinContent(
i)<<
" buffef="<<buffef<<
" buffer="<<buffer<<
" sumbuffef="<<sumbuffef<<
" sumbuffer="<<sumbuffer<<
" NumberStripsPointed="<<NumberStripsPointed<<
" NumberWithOutPrediction"<<NumberWithOutPrediction;
314 if(NumberStripsPointed!=0){
315 averageeff = (sumbuffef/double(NumberStripsPointed))*100.;
318 int Disk = station*region;
323 }
else if(region == 1){
328 ef = double(o)/double(p);
329 er =
sqrt(ef*(1.-ef)/
double(p));
345 int yBin= (ring-1)*3-(*r)->id().roll()+1;
374 for (
int w =-2; w<=2; w++){
383 for (
int w=-2; w<=2; w++){
MonitorElement * EffGlobW[5]
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * histoCSC
void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
MonitorElement * get(const std::string &path)
MonitorElement * OcGregR3D[10]
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 * OcsectorEffW[5]
void labelXAxisSegment(MonitorElement *myMe)
void labelYAxisRoll(MonitorElement *myMe, int region, int ring, bool useRollInfo)
MonitorElement * sectorEffW[5]
edm::ESHandle< RPCGeometry > rpcGeo_
uint32_t rawId() const
get the raw id
void labelYAxisRing(MonitorElement *myMe, int numberOfRings, bool useRollInfo)
MonitorElement * ObsLayerW[5]
MonitorElement * book1D(Args &&...args)
MonitorElement * EffGlobD[10]
const std::vector< const RPCRoll * > & rolls() const
Return the Rolls.
MonitorElement * EffDistroD[10]
MonitorElement * ExpLayerW[5]
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * OcGregR2D[10]
void labelXAxisSector(MonitorElement *myMe)
int detId2RollNr(const RPCDetId &_id)
void setCurrentFolder(const std::string &fullpath)
std::string folderStructure(RPCDetId detId)
MonitorElement * book2D(Args &&...args)
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
MonitorElement * WheelSummary[5]
TH1F * getTH1F(void) const
MonitorElement * ExGregR2D[10]
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
MonitorElement * DiskSummary[10]
double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * ExsectorEffW[5]
MonitorElement * GregR2D[10]
MonitorElement * ExGregR3D[10]
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * histoRPC
MonitorElement * GregR3D[10]
MonitorElement * EffDistroW[5]
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.