37 LogDebug(
"rpcefficiencysecond")<<
"Getting the RPC Geometry";
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();
204 std::stringstream meIdRPC, meIdDT;
205 meIdRPC<<
folderPath<<
"MuonSegEff/RPCDataOccupancyFromDT_"<<rpcId.
rawId();
206 meIdDT<<
folderPath<<
"MuonSegEff/ExpectedOccupancyFromDT_"<<rpcId.
rawId();
209 int NumberWithOutPrediction=0;
216 double sumbuffef = 0.;
217 double sumbuffer = 0.;
218 double averageeff = 0.;
219 int NumberStripsPointed = 0;
221 for(
int i=1;
i<=int((*r)->nstrips());++
i){
223 LogDebug(
"rpcefficiencysecond")<<
"Inside the If";
226 sumbuffef=sumbuffef+buffef;
227 sumbuffer = sumbuffer + buffer*buffer;
228 NumberStripsPointed++;
230 NumberWithOutPrediction++;
232 LogDebug(
"rpcefficiencysecond")<<
"Strip="<<
i<<
" RPC="<<
histoRPC->
getBinContent(
i)<<
" DT="<<
histoDT->
getBinContent(
i)<<
" buffef="<<buffef<<
" buffer="<<buffer<<
" sumbuffef="<<sumbuffef<<
" sumbuffer="<<sumbuffer<<
" NumberStripsPointed="<<NumberStripsPointed<<
" NumberWithOutPrediction"<<NumberWithOutPrediction;
236 if(NumberStripsPointed!=0){
237 averageeff = (sumbuffef/double(NumberStripsPointed))*100.;
243 ef = double(o)/double(p);
244 er =
sqrt(ef*(1.-ef)/
double(p));
250 if(station==1&&geolayer==1) layer = 1;
251 else if(station==1&&geolayer==2) layer = 2;
252 else if(station==2&&geolayer==1) layer = 3;
253 else if(station==2&&geolayer==2) layer = 4;
254 else if(station==3) layer = 5;
255 else if(station==4) layer = 6;
258 LogDebug(
"rpcefficiencysecond")<<
"Pigi "<<camera<<
" "<<rpcsrv.
shortname()<<
" "<<(*r)->id();
261 xBin= (*r)->id().sector();
267 indexWheel[wheel+2]++;
272 std::stringstream meIdRPC,meIdCSC;
274 meIdRPC<<
folderPath<<
"MuonSegEff/RPCDataOccupancyFromCSC_"<<rpcId.
rawId();
275 meIdCSC<<
folderPath<<
"MuonSegEff/ExpectedOccupancyFromCSC_"<<rpcId.
rawId();
276 meIdPRO =
"Profile_"+ rpcsrv.
name();
280 int NumberWithOutPrediction=0;
287 double sumbuffef = 0;
288 double sumbuffer = 0;
289 double averageeff = 0;
290 int NumberStripsPointed = 0;
293 for(
int i=1;
i<=int((*r)->nstrips());++
i){
295 LogDebug(
"rpcefficiencysecond")<<
"Inside the If";
300 sumbuffef=sumbuffef+buffef;
301 sumbuffer = sumbuffer + buffer*buffer;
302 NumberStripsPointed++;
304 NumberWithOutPrediction++;
306 LogDebug(
"rpcefficiencysecond")<<
"Strip="<<
i<<
" RPC="<<
histoRPC->
getBinContent(
i)<<
" CSC="<<
histoCSC->
getBinContent(
i)<<
" buffef="<<buffef<<
" buffer="<<buffer<<
" sumbuffef="<<sumbuffef<<
" sumbuffer="<<sumbuffer<<
" NumberStripsPointed="<<NumberStripsPointed<<
" NumberWithOutPrediction"<<NumberWithOutPrediction;
310 if(NumberStripsPointed!=0){
311 averageeff = (sumbuffef/double(NumberStripsPointed))*100.;
314 int Disk = station*region;
319 }
else if(region == 1){
324 ef = double(o)/double(p);
325 er =
sqrt(ef*(1.-ef)/
double(p));
341 int yBin= (ring-1)*3-(*r)->id().roll()+1;
367 for (
int w =-2;
w<=2;
w++){
376 for (
int w=-2;
w<=2;
w++){
MonitorElement * EffGlobW[5]
T getUntrackedParameter(std::string const &, T const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
RPCEfficiencySecond(const edm::ParameterSet &)
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]
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
edm::ESHandle< RPCGeometry > rpcGeo_
uint32_t rawId() const
get the raw id
virtual std::string name()
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]
virtual std::string shortname()
void labelXAxisSector(MonitorElement *myMe)
int detId2RollNr(const RPCDetId &_id)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
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]
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
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.