46 std::stringstream folderName;
47 std::stringstream MeName; std::stringstream MeTitle;
48 for (
int w =-2;
w<=2;
w++){
53 MeName<<
"EffDistroWheel_"<<
w;
55 MeTitle<<
"Efficiency Distribution for Wheel "<<
w;
58 MeName<<
"GlobEfficiencyWheel_"<<
w;
60 MeTitle<<
"Efficiency Wheel "<<
w;
61 EffGlobW[w+2]=ibooker.
book1D(MeName.str(),MeTitle.str(),206,0.5,206.5);
64 MeName<<
"Efficiency_Roll_vs_Sector_Wheel_"<<
w;
65 WheelSummary[w+2] = ibooker.
book2D(MeName.str(),MeName.str(),12, 0.5,12.5, 21, 0.5, 21.5);
70 MeName<<
"AzimutalDistroW"<<
w;
72 MeTitle<<
"Efficiency per Sector Wheel "<<
w;
75 MeName<<
"AzimutalDistroW"<<w<<
"Ex";
77 MeTitle<<
"Expected per Sector Wheel "<<
w;
80 MeName<<
"AzimutalDistroW"<<w<<
"Oc";
82 MeTitle<<
"Occupancy per Sector Wheel "<<
w;
86 MeName<<
"ExpLayerW"<<
w;
88 MeTitle<<
"Expected Wheel "<<
w;
91 MeName<<
"ObsLayerW"<<
w;
93 MeTitle<<
"Observed Wheel "<<
w;
104 MeName<<
"EffDistroDisk_"<<
d;
106 MeTitle<<
"Efficiency Distribution Disk "<<
d;
109 MeName<<
"GlobEfficiencyDisk_"<<
d;
111 MeTitle<<
"Efficiency Disk "<<
d;
115 MeName<<
"Efficiency_Roll_vs_Segment_Disk_"<<
d;
121 MeName<<
"GregDistroR2D"<<
d;
123 MeTitle<<
"Efficiency for Station "<<d<<
" Ring 2";
126 MeName<<
"GregDistroR3D"<<
d;
128 MeTitle<<
"Efficiency for Station "<<d<<
" Ring 3";
131 MeName<<
"OcGregDistroR2D"<<
d;
133 MeTitle<<
"Occupancy Distribution for Station "<<d<<
" Ring 2";
136 MeName<<
"OcGregDistroR3D"<<
d;
138 MeTitle<<
"Occupancy Distribution for Station "<<d<<
" Ring 3";
141 MeName<<
"ExGregDistroR2D"<<
d;
143 MeTitle<<
"Expected Distribution for Station "<<d<<
" Ring 2";
146 MeName<<
"ExGregDistroR3D"<<
d;
148 MeTitle<<
"Expected Distribution for Station "<<d<<
" Ring 3";
155 LogDebug(
"rpcefficiencysecond")<<
"Getting the RPC Geometry";
159 std::stringstream binLabel;
160 for (
int w = -2; w<=2 ;w++){
161 for(
int x = 1;
x<=12;
x++){
162 for(
int y = 1;
y<=21;
y++){
168 for(
int x = 1;
x<=36;
x++){
169 for(
int y = 1;
y<=6;
y++){
176 for(
int j=0;j<5;j++){
180 for(
int j=0;j<10;j++){
183 for(TrackingGeometry::DetContainer::const_iterator it=
rpcGeo_->
dets().begin(); it!=
rpcGeo_->
dets().end();it++){
184 if(dynamic_cast< const RPCChamber* >( *it ) !=
nullptr ){
186 std::vector< const RPCRoll*> roles = (ch->
rolls());
187 for(std::vector<const RPCRoll*>::const_iterator
r = roles.begin();
r != roles.end(); ++
r){
193 int region = rpcId.
region();
195 int sector = rpcId.
sector();
197 int geolayer = rpcId.
layer();
204 std::stringstream meIdRPC, meIdDT;
207 meIdRPC<<folder<<
"/RPCDataOccupancyFromDT_"<<rpcId.
rawId();
208 meIdDT<<folder<<
"/ExpectedOccupancyFromDT_"<<rpcId.
rawId();
211 int NumberWithOutPrediction=0;
218 double sumbuffef = 0.;
219 double sumbuffer = 0.;
220 double averageeff = 0.;
221 int NumberStripsPointed = 0;
223 for(
int i=1;
i<=
int((*r)->nstrips());++
i){
225 LogDebug(
"rpcefficiencysecond")<<
"Inside the If";
228 sumbuffef=sumbuffef+buffef;
229 sumbuffer = sumbuffer + buffer*
buffer;
230 NumberStripsPointed++;
232 NumberWithOutPrediction++;
234 LogDebug(
"rpcefficiencysecond")<<
"Strip="<<
i<<
" RPC="<<
histoRPC->
getBinContent(
i)<<
" DT="<<
histoDT->
getBinContent(
i)<<
" buffef="<<buffef<<
" sumbuffef="<<sumbuffef<<
" NumberStripsPointed="<<NumberStripsPointed<<
" NumberWithOutPrediction"<<NumberWithOutPrediction;
238 if(NumberStripsPointed!=0){
239 averageeff = (sumbuffef/double(NumberStripsPointed))*100.;
245 ef = double(o)/double(p);
246 er =
sqrt(ef*(1.-ef)/
double(p));
252 if(station==1&&geolayer==1) layer = 1;
253 else if(station==1&&geolayer==2) layer = 2;
254 else if(station==2&&geolayer==1) layer = 3;
255 else if(station==2&&geolayer==2) layer = 4;
256 else if(station==3) layer = 5;
257 else if(station==4) layer = 6;
260 LogDebug(
"rpcefficiencysecond")<<
"Pigi "<<camera<<
" "<<rpcsrv.shortname()<<
" "<<(*r)->id();
263 xBin= (*r)->id().sector();
269 indexWheel[wheel+2]++;
274 std::stringstream meIdRPC,meIdCSC;
276 meIdRPC<<folder<<
"/RPCDataOccupancyFromCSC_"<<rpcId.
rawId();
277 meIdCSC<<folder<<
"/ExpectedOccupancyFromCSC_"<<rpcId.
rawId();
281 int NumberWithOutPrediction=0;
288 double sumbuffef = 0;
289 double sumbuffer = 0;
290 double averageeff = 0;
291 int NumberStripsPointed = 0;
293 LogDebug(
"rpcefficiencysecond")<<rpcsrv.name();
294 for(
int i=1;
i<=
int((*r)->nstrips());++
i){
296 LogDebug(
"rpcefficiencysecond")<<
"Inside the If";
299 sumbuffef=sumbuffef+buffef;
300 sumbuffer = sumbuffer + buffer*
buffer;
301 NumberStripsPointed++;
303 NumberWithOutPrediction++;
305 LogDebug(
"rpcefficiencysecond")<<
"Strip="<<
i<<
" RPC="<<
histoRPC->
getBinContent(
i)<<
" CSC="<<
histoCSC->
getBinContent(
i)<<
" buffef="<<buffef<<
" buffer="<<buffer<<
" sumbuffef="<<sumbuffef<<
" sumbuffer="<<sumbuffer<<
" NumberStripsPointed="<<NumberStripsPointed<<
" NumberWithOutPrediction"<<NumberWithOutPrediction;
309 if(NumberStripsPointed!=0){
310 averageeff = (sumbuffef/double(NumberStripsPointed))*100.;
313 int Disk = station*region;
318 }
else if(region == 1){
323 ef = double(o)/double(p);
324 er =
sqrt(ef*(1.-ef)/
double(p));
340 int yBin= (ring-1)*3-(*r)->id().roll()+1;
369 for (
int w =-2; w<=2; w++){
378 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)
constexpr uint32_t rawId() const
get the raw id
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_
void labelYAxisRing(MonitorElement *myMe, int numberOfRings, bool useRollInfo)
MonitorElement * ObsLayerW[5]
void setCurrentFolder(std::string const &fullpath)
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)
MonitorElement * get(std::string const &path)
int detId2RollNr(const RPCDetId &_id)
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]
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.