CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RPCEfficiency.cc
Go to the documentation of this file.
1 /***************************************
2 Original Author: Camilo Carrillo
3 ****************************************/
4 
6 #include <sstream>
15 
16 //FW Core
18 
19 int distsector_tmp(int sector1,int sector2){
20 
21  if(sector1==13) sector1=4;
22  if(sector1==14) sector1=10;
23 
24  if(sector2==13) sector2=4;
25  if(sector2==14) sector2=10;
26 
27  int distance = abs(sector1 - sector2);
28  if(distance>6) distance = 12-distance;
29  return distance;
30 }
31 
32 
34  incldt=iConfig.getUntrackedParameter<bool>("incldt",true);
35  incldtMB4=iConfig.getUntrackedParameter<bool>("incldtMB4",true);
36  inclcsc=iConfig.getUntrackedParameter<bool>("inclcsc",true);
37  debug=iConfig.getUntrackedParameter<bool>("debug",false);
38 
39  rangestrips = iConfig.getUntrackedParameter<double>("rangestrips",4.);
40  rangestripsRB4=iConfig.getUntrackedParameter<double>("rangestripsRB4",4.);
41  dupli = iConfig.getUntrackedParameter<int>("DuplicationCorrection",2);
42  MinCosAng=iConfig.getUntrackedParameter<double>("MinCosAng",0.96);
43  MaxD=iConfig.getUntrackedParameter<double>("MaxD",80.);
44  MaxDrb4=iConfig.getUntrackedParameter<double>("MaxDrb4",150.);
45 
46 
47  cscSegments= consumes<CSCSegmentCollection>(iConfig.getParameter<edm::InputTag>("cscSegments"));
48  dt4DSegments = consumes<DTRecSegment4DCollection>(iConfig.getParameter<edm::InputTag>("dt4DSegments"));
49  RPCRecHitLabel_ = consumes<RPCRecHitCollection>(iConfig.getParameter<edm::InputTag>("RecHitLabel"));
50 
51  folderPath=iConfig.getUntrackedParameter<std::string>("folderPath","RPC/RPCEfficiency/");
52 
53  EffSaveRootFile = iConfig.getUntrackedParameter<bool>("EffSaveRootFile", false);
54  EffRootFileName = iConfig.getUntrackedParameter<std::string>("EffRootFileName", "RPCEfficiency.root");
55 
56 }
57 
58 
59 void RPCEfficiency::bookHistograms(DQMStore::IBooker & ibooker, edm::Run const & run, edm::EventSetup const & iSetup ) {
60 
61  std::string folder;
62  ibooker.cd();
64  statistics = ibooker.book1D("Statistics","All Statistics",33,0.5,33.5);
65 
66 
67  statistics->setBinLabel(1,"Events ",1);
68  statistics->setBinLabel(2,"Events with DT seg",1);
69 
70  std::stringstream sstr;
71  for( int i = 1; i<=15; i++ ){ //DT form bin 3 to bin 17
72  sstr.str("");
73  sstr<<i<<" DT seg";
74  statistics->setBinLabel(i+2, sstr.str() ,1);
75  }
76 
77  statistics->setBinLabel(18,"Events with CSC seg",1);
78  for( int i = 1; i<=15; i++ ){ //CSC form bin 19 to bin 33
79  sstr.str("");
80  sstr<<i<<" CSC seg";
81  statistics->setBinLabel(i+18, sstr.str(),1);
82  }
83 
84 
85  LogDebug("rpcefficiency")<<"booking Global histograms with "<<folderPath;
86 
87  folder = folderPath+"MuonSegEff/"+"Residuals/Barrel";
88  ibooker.setCurrentFolder(folder);
89 
90  //Barrel
91  std::stringstream histoName, histoTitle;
92 
93  for (int layer = 1 ; layer<= 6 ;layer++){
94  histoName.str("");
95  histoTitle.str("");
96  histoName<<"GlobalResidualsClu1La"<<layer;
97  histoTitle<<"RPC Residuals Layer "<<layer<<" Cluster Size 1";
98  hGlobalResClu1La[layer-1] = ibooker.book1D(histoName.str(), histoTitle.str(),101,-10.,10.);
99 
100  histoName.str("");
101  histoTitle.str("");
102  histoName<<"GlobalResidualsClu2La"<<layer;
103  histoTitle<<"RPC Residuals Layer "<<layer<<" Cluster Size 2";
104  hGlobalResClu2La[layer-1] = ibooker.book1D(histoName.str(), histoTitle.str(),101,-10.,10.);
105 
106  histoName.str("");
107  histoTitle.str("");
108  histoName<<"GlobalResidualsClu3La"<<layer;
109  histoTitle<<"RPC Residuals Layer "<<layer<<" Cluster Size 3";
110  hGlobalResClu3La[layer-1] = ibooker.book1D(histoName.str(), histoTitle.str(),101,-10.,10.);
111 
112  }
113 
114  LogDebug("rpcefficiency")<<"Booking Residuals for EndCap";
115  folder = folderPath+"MuonSegEff/Residuals/EndCap";
116  ibooker.setCurrentFolder(folder);
117 
118  //Endcap
119  hGlobalResClu1R3C = ibooker.book1D("GlobalResidualsClu1R3C","RPC Residuals Ring 3 Roll C Cluster Size 1",101,-10.,10.);
120  hGlobalResClu1R3B = ibooker.book1D("GlobalResidualsClu1R3B","RPC Residuals Ring 3 Roll B Cluster Size 1",101,-10.,10.);
121  hGlobalResClu1R3A = ibooker.book1D("GlobalResidualsClu1R3A","RPC Residuals Ring 3 Roll A Cluster Size 1",101,-10.,10.);
122  hGlobalResClu1R2C = ibooker.book1D("GlobalResidualsClu1R2C","RPC Residuals Ring 2 Roll C Cluster Size 1",101,-10.,10.);
123  hGlobalResClu1R2B = ibooker.book1D("GlobalResidualsClu1R2B","RPC Residuals Ring 2 Roll B Cluster Size 1",101,-10.,10.);
124  hGlobalResClu1R2A = ibooker.book1D("GlobalResidualsClu1R2A","RPC Residuals Ring 2 Roll A Cluster Size 1",101,-10.,10.);
125 
126  hGlobalResClu2R3C = ibooker.book1D("GlobalResidualsClu2R3C","RPC Residuals Ring 3 Roll C Cluster Size 2",101,-10.,10.);
127  hGlobalResClu2R3B = ibooker.book1D("GlobalResidualsClu2R3B","RPC Residuals Ring 3 Roll B Cluster Size 2",101,-10.,10.);
128  hGlobalResClu2R3A = ibooker.book1D("GlobalResidualsClu2R3A","RPC Residuals Ring 3 Roll A Cluster Size 2",101,-10.,10.);
129  hGlobalResClu2R2C = ibooker.book1D("GlobalResidualsClu2R2C","RPC Residuals Ring 2 Roll C Cluster Size 2",101,-10.,10.);
130  hGlobalResClu2R2B = ibooker.book1D("GlobalResidualsClu2R2B","RPC Residuals Ring 2 Roll B Cluster Size 2",101,-10.,10.);
131  hGlobalResClu2R2A = ibooker.book1D("GlobalResidualsClu2R2A","RPC Residuals Ring 2 Roll A Cluster Size 2",101,-10.,10.);
132 
133  hGlobalResClu3R3C = ibooker.book1D("GlobalResidualsClu3R3C","RPC Residuals Ring 3 Roll C Cluster Size 3",101,-10.,10.);
134  hGlobalResClu3R3B = ibooker.book1D("GlobalResidualsClu3R3B","RPC Residuals Ring 3 Roll B Cluster Size 3",101,-10.,10.);
135  hGlobalResClu3R3A = ibooker.book1D("GlobalResidualsClu3R3A","RPC Residuals Ring 3 Roll A Cluster Size 3",101,-10.,10.);
136  hGlobalResClu3R2C = ibooker.book1D("GlobalResidualsClu3R2C","RPC Residuals Ring 2 Roll C Cluster Size 3",101,-10.,10.);
137  hGlobalResClu3R2B = ibooker.book1D("GlobalResidualsClu3R2B","RPC Residuals Ring 2 Roll B Cluster Size 3",101,-10.,10.);
138  hGlobalResClu3R2A = ibooker.book1D("GlobalResidualsClu3R2A","RPC Residuals Ring 2 Roll A Cluster Size 3",101,-10.,10.);
139 
140 
142  iSetup.get<MuonGeometryRecord>().get(rpcGeo);
143 
144 
145  for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){
146  if(dynamic_cast< const RPCChamber* >( *it ) != 0 ){
147  const RPCChamber* ch = dynamic_cast< const RPCChamber* >( *it );
148  std::vector< const RPCRoll*> roles = (ch->rolls());
149 
150  for(std::vector<const RPCRoll*>::const_iterator r = roles.begin();r != roles.end(); ++r){
151 
152  RPCDetId rpcId = (*r)->id();
153  int region=rpcId.region();
154 
155  LogDebug("rpcefficiency")<<"Booking for "<<rpcId.rawId();
156 
157  bookDetUnitSeg(ibooker, rpcId,(*r)->nstrips(),folderPath+"MuonSegEff/", meCollection[rpcId.rawId()] );
158 
159  if(region==0&&(incldt||incldtMB4)){
160  //LogDebug("rpcefficiency")<<"--Filling the dtstore"<<rpcId;
161  int wheel=rpcId.ring();
162  int sector=rpcId.sector();
163  int station=rpcId.station();
164  DTStationIndex ind(region,wheel,sector,station);
165  std::set<RPCDetId> myrolls;
166  if (rollstoreDT.find(ind)!=rollstoreDT.end()) myrolls=rollstoreDT[ind];
167  myrolls.insert(rpcId);
168  rollstoreDT[ind]=myrolls;
169 
170  }else if(region!=0 && inclcsc){
171  int station=rpcId.station();
172  int ring=rpcId.ring();
173  int cscring=ring;
174  int cscstation=station;
175  RPCGeomServ rpcsrv(rpcId);
176  int rpcsegment = rpcsrv.segment();
177  int cscchamber = rpcsegment;
178 
179  if((station==2||station==3||station==4)&&ring==3){
180  cscring = 2;
181  }
182 
183  CSCStationIndex ind(region,cscstation,cscring,cscchamber);
184  std::set<RPCDetId> myrolls;
185  if (rollstoreCSC.find(ind)!=rollstoreCSC.end()){
186  myrolls=rollstoreCSC[ind];
187  }
188  myrolls.insert(rpcId);
189  rollstoreCSC[ind]=myrolls;
190  }
191  }
192  }
193  }
194 
195  for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){
196  if( dynamic_cast< const RPCChamber* >( *it ) != 0 ){
197 
198  const RPCChamber* ch = dynamic_cast< const RPCChamber* >( *it );
199  std::vector< const RPCRoll*> roles = (ch->rolls());
200  for(std::vector<const RPCRoll*>::const_iterator r = roles.begin();r != roles.end(); ++r){
201  RPCDetId rpcId = (*r)->id();
202 
203  int region=rpcId.region();
204 
205  if(region!=0 && inclcsc && (rpcId.ring()==2 || rpcId.ring()==3)){
206  int region=rpcId.region();
207  int station=rpcId.station();
208  int ring=rpcId.ring();
209  int cscring = ring;
210 
211  if((station==2||station==3||station==4)&&ring==3) cscring = 2; //CSC Ring 2 covers rpc ring 2 & 3
212 
213 
214  int cscstation=station;
215  RPCGeomServ rpcsrv(rpcId);
216  int rpcsegment = rpcsrv.segment();
217 
218  int cscchamber = rpcsegment+1;
219  if(cscchamber==37)cscchamber=1;
220  CSCStationIndex ind(region,cscstation,cscring,cscchamber);
221  std::set<RPCDetId> myrolls;
222  if (rollstoreCSC.find(ind)!=rollstoreCSC.end())myrolls=rollstoreCSC[ind];
223  myrolls.insert(rpcId);
224  rollstoreCSC[ind]=myrolls;
225 
226  cscchamber = rpcsegment-1;
227  if(cscchamber==0)cscchamber=36;
228  CSCStationIndex indDos(region,cscstation,cscring,cscchamber);
229  std::set<RPCDetId> myrollsDos;
230  if (rollstoreCSC.find(indDos)!=rollstoreCSC.end()) myrollsDos=rollstoreCSC[indDos];
231  myrollsDos.insert(rpcId);
232  rollstoreCSC[indDos]=myrollsDos;
233  }
234  }
235  }
236  }
237 }//beginRun
238 
239 
240 
241 
242 
243 
245 
247 
248 
252 
253  iSetup.get<MuonGeometryRecord>().get(rpcGeo);
254  iSetup.get<MuonGeometryRecord>().get(dtGeo);
255  iSetup.get<MuonGeometryRecord>().get(cscGeo);
256 
257  statistics->Fill(1);
258 
259  std::stringstream meIdRPC, meIdDT, meIdCSC;
260 
261  LogDebug("rpcefficiency") <<"\t Getting the RPC RecHits";
263  iEvent.getByToken(RPCRecHitLabel_,rpcHits);
264 
265  if(!rpcHits.isValid()) return;
266 
267  if(incldt){
268  LogDebug("rpcefficiency")<<"\t Getting the DT Segments";
270 
271  iEvent.getByToken(dt4DSegments, all4DSegments);
272 
273  if(all4DSegments.isValid()){
274 
275  if(all4DSegments->size()>0){
276 
277  if(all4DSegments->size()<=16) statistics->Fill(2);
278 
279  LogDebug("rpcefficiency")<<"\t Number of DT Segments in this event = "<<all4DSegments->size();
280 
281  std::map<DTChamberId,int> DTSegmentCounter;
283 
284  for (segment = all4DSegments->begin();segment!=all4DSegments->end(); ++segment){
285  DTSegmentCounter[segment->chamberId()]++;
286  }
287 
288  statistics->Fill(all4DSegments->size()+2);
289 
290  LogDebug("rpcefficiency")<<"\t Loop over all the 4D Segments";
291  for (segment = all4DSegments->begin(); segment != all4DSegments->end(); ++segment){
292 
293  DTChamberId DTId = segment->chamberId();
294 
295 
296  if(DTSegmentCounter[DTId]==1 && DTId.station()!=4){
297 
298  int dtWheel = DTId.wheel();
299  int dtStation = DTId.station();
300  int dtSector = DTId.sector();
301 
302  LocalPoint segmentPosition= segment->localPosition();
303  LocalVector segmentDirection=segment->localDirection();
304 
305  const GeomDet* gdet=dtGeo->idToDet(segment->geographicalId());
306  const BoundPlane & DTSurface = gdet->surface();
307 
308  //check if the dimension of the segment is 4
309 
310  if(segment->dimension()==4){
311 
312  float Xo=segmentPosition.x();
313  float Yo=segmentPosition.y();
314  float Zo=segmentPosition.z();
315  float dx=segmentDirection.x();
316  float dy=segmentDirection.y();
317  float dz=segmentDirection.z();
318 
319  std::set<RPCDetId> rollsForThisDT = rollstoreDT[DTStationIndex(0,dtWheel,dtSector,dtStation)];
320 
321  LogDebug("rpcefficiency")<<"DT \t \t Loop over all the rolls asociated to this DT";
322  for (std::set<RPCDetId>::iterator iteraRoll = rollsForThisDT.begin();iteraRoll != rollsForThisDT.end(); iteraRoll++){
323  const RPCRoll* rollasociated = rpcGeo->roll(*iteraRoll);
324  RPCDetId rpcId = rollasociated->id();
325  const BoundPlane & RPCSurface = rollasociated->surface();
326 
327 // RPCGeomServ rpcsrv(rpcId);
328 // std::string nameRoll = rpcsrv.name();
329 
330  GlobalPoint CenterPointRollGlobal = RPCSurface.toGlobal(LocalPoint(0,0,0));
331 
332  LocalPoint CenterRollinDTFrame = DTSurface.toLocal(CenterPointRollGlobal);
333 
334  float D=CenterRollinDTFrame.z();
335 
336  float X=Xo+dx*D/dz;
337  float Y=Yo+dy*D/dz;
338  float Z=D;
339 
340  const RectangularStripTopology* top_= dynamic_cast<const RectangularStripTopology*> (&(rollasociated->topology()));
341  LocalPoint xmin = top_->localPosition(0.);
342  LogDebug("rpcefficiency")<<"DT \t \t \t xmin of this Roll "<<xmin<<"cm";
343  LocalPoint xmax = top_->localPosition((float)rollasociated->nstrips());
344  LogDebug("rpcefficiency")<<"DT \t \t \t xmax of this Roll "<<xmax<<"cm";
345  float rsize = fabs( xmax.x()-xmin.x() );
346  LogDebug("rpcefficiency")<<"DT \t \t \t Roll Size "<<rsize<<"cm";
347  float stripl = top_->stripLength();
348  float stripw = top_->pitch();
349 
350  float extrapolatedDistance = sqrt((X-Xo)*(X-Xo)+(Y-Yo)*(Y-Yo)+(Z-Zo)*(Z-Zo));
351 
352  if(extrapolatedDistance<=MaxD){
353 
354  GlobalPoint GlobalPointExtrapolated = DTSurface.toGlobal(LocalPoint(X,Y,Z));
355  LocalPoint PointExtrapolatedRPCFrame = RPCSurface.toLocal(GlobalPointExtrapolated);
356 
357  if(fabs(PointExtrapolatedRPCFrame.z()) < 10. &&
358  fabs(PointExtrapolatedRPCFrame.x()) < rsize*0.5 &&
359  fabs(PointExtrapolatedRPCFrame.y()) < stripl*0.5){
360 
361  RPCDetId rollId = rollasociated->id();
362  RPCGeomServ rpcsrv(rollId);
363  std::string nameRoll = rpcsrv.name();
364  LogDebug("rpcefficiency")<<"DT \t \t \t \t The RPCName is "<<nameRoll;
365  const float stripPredicted =
366  rollasociated->strip(LocalPoint(PointExtrapolatedRPCFrame.x(),PointExtrapolatedRPCFrame.y(),0.));
367 
368  LogDebug("rpcefficiency")<<"DT \t \t \t \t Candidate (from DT Segment) STRIP---> "<<stripPredicted<< std::endl;
369  //---- HISTOGRAM STRIP PREDICTED FROM DT ----
370 
371  std::map<std::string, MonitorElement*> meMap=meCollection[rpcId.rawId()];
372  meIdDT.str("");
373  meIdDT<<"ExpectedOccupancyFromDT_"<<rollId.rawId();
374  meMap[meIdDT.str()]->Fill(stripPredicted);
375  //-----------------------------------------------------
376 
377 
378  //-------RecHitPart Just For Residual--------
379  int countRecHits = 0;
380  int cluSize = 0;
381  float minres = 3000.;
382 
383  typedef std::pair<RPCRecHitCollection::const_iterator, RPCRecHitCollection::const_iterator> rangeRecHits;
384  rangeRecHits recHitCollection = rpcHits->get(rollasociated->id());
386 
387  for (recHit = recHitCollection.first; recHit != recHitCollection.second ; recHit++) {
388  countRecHits++;
389 
390  // sprintf(meIdRPC,"BXDistribution_%d",rollasociated->id().rawId());
391 // meMap[meIdRPC]->Fill(recHit->BunchX());
392 
393  LocalPoint recHitPos=recHit->localPosition();
394  float res=PointExtrapolatedRPCFrame.x()- recHitPos.x();
395  LogDebug("rpcefficiency")<<"DT \t \t \t \t \t Found Rec Hit at "<<res<<"cm of the prediction.";
396  if(fabs(res)<fabs(minres)){
397  minres=res;
398  cluSize = recHit->clusterSize();
399  LogDebug("rpcefficiency")<<"DT \t \t \t \t \t \t New Min Res "<<res<<"cm.";
400  }
401  }
402 
403  if(countRecHits==0){
404  LogDebug("rpcefficiency") <<"DT \t \t \t \t \t THIS ROLL DOESN'T HAVE ANY RECHIT";
405  }else{
406  assert(minres!=3000);
407 
408  if(fabs(minres)<=(rangestrips+cluSize*0.5)*stripw){
409  LogDebug("rpcefficiency")<<"DT \t \t \t \t \t \t True!";
410 
411  // float cosal = dx/sqrt(dx*dx+dz*dz);
412 
413  if(rollId.station()==1&&rollId.layer()==1) {
414  if(cluSize==1*dupli) {hGlobalResClu1La[0]->Fill(minres);}
415  else if(cluSize==2*dupli){ hGlobalResClu2La[0]->Fill(minres);}
416  else if(cluSize==3*dupli){ hGlobalResClu3La[0]->Fill(minres);}}
417  else if(rollId.station()==1&&rollId.layer()==2){
418  if(cluSize==1*dupli) {hGlobalResClu1La[1]->Fill(minres);}
419  else if(cluSize==2*dupli){ hGlobalResClu2La[1]->Fill(minres);}
420  else if(cluSize==3*dupli){ hGlobalResClu3La[1]->Fill(minres);}}
421  else if(rollId.station()==2&&rollId.layer()==1){
422  if(cluSize==1*dupli) {hGlobalResClu1La[2]->Fill(minres);}
423  else if(cluSize==2*dupli){ hGlobalResClu2La[2]->Fill(minres);}
424  else if(cluSize==3*dupli){ hGlobalResClu3La[2]->Fill(minres);}
425  }
426  else if(rollId.station()==2&&rollId.layer()==2){
427  if(cluSize==1*dupli) {hGlobalResClu1La[3]->Fill(minres);}
428  if(cluSize==2*dupli){ hGlobalResClu2La[3]->Fill(minres);}
429  else if(cluSize==3*dupli){ hGlobalResClu3La[3]->Fill(minres);}
430  }
431  else if(rollId.station()==3){
432  if(cluSize==1*dupli) {hGlobalResClu1La[4]->Fill(minres);}
433  else if(cluSize==2*dupli){ hGlobalResClu2La[4]->Fill(minres);}
434  else if(cluSize==3*dupli){ hGlobalResClu3La[4]->Fill(minres);}
435  }
436  meIdRPC.str("");
437  meIdRPC<<"RPCDataOccupancyFromDT_"<<rollId.rawId();
438  meMap[meIdRPC.str()]->Fill(stripPredicted);
439  }
440  }
441  }else{
442  LogDebug("rpcefficiency")<<"DT \t \t \t \t No the prediction is outside of this roll";
443  }//Condition for the right match
444  }else{
445  LogDebug("rpcefficiency")<<"DT \t \t \t No, Exrtrapolation too long!, canceled";
446  }//D so big
447  }//loop over all the rolls asociated
448  }//Is the segment 4D?
449  }else {
450  LogDebug("rpcefficiency")<<"DT \t \t More than one segment in this chamber, or we are in Station 4";
451  }
452  }
453  } else {
454  LogDebug("rpcefficiency")<<"DT This Event doesn't have any DT4DDSegment"; //is ther more than 1 segment in this event?
455  }
456  }
457  }
458 
459  if(incldtMB4){
461  iEvent.getByToken(dt4DSegments, all4DSegments);
462 
463  if(all4DSegments.isValid() && all4DSegments->size()>0){
464 
465  std::map<DTChamberId,int> DTSegmentCounter;
467 
468  for (segment = all4DSegments->begin();segment!=all4DSegments->end(); ++segment){
469  DTSegmentCounter[segment->chamberId()]++;
470  }
471 
472  LogDebug("rpcefficiency")<<"MB4 \t \t Loop Over all4DSegments";
473  for (segment = all4DSegments->begin(); segment != all4DSegments->end(); ++segment){
474 
475  DTChamberId DTId = segment->chamberId();
476 
477  if(DTSegmentCounter[DTId] == 1 && DTId.station()==4){
478  int dtWheel = DTId.wheel();
479  int dtStation = DTId.station();
480  int dtSector = DTId.sector();
481 
482  LocalPoint segmentPosition= segment->localPosition();
483  LocalVector segmentDirection=segment->localDirection();
484 
485  //check if the dimension of the segment is 2 and the station is 4
486 
487  if(segment->dimension()==2){
488  LocalVector segmentDirectionMB4=segmentDirection;
489  LocalPoint segmentPositionMB4=segmentPosition;
490 
491 
492  const BoundPlane& DTSurface4 = dtGeo->idToDet(DTId)->surface();
493 
495 
496  for(segMB3=all4DSegments->begin();segMB3!=all4DSegments->end();++segMB3){
497 
498  DTChamberId dtid3 = segMB3->chamberId();
499 
500  if(distsector_tmp(dtid3.sector(),DTId.sector())<=1
501  && dtid3.station()==3
502  && dtid3.wheel()==DTId.wheel()
503  && DTSegmentCounter[dtid3] == 1
504  && segMB3->dimension()==4){
505 
506  const GeomDet* gdet3=dtGeo->idToDet(segMB3->geographicalId());
507  const BoundPlane & DTSurface3 = gdet3->surface();
508 
509  LocalVector segmentDirectionMB3 = segMB3->localDirection();
510  GlobalPoint segmentPositionMB3inGlobal = DTSurface3.toGlobal(segMB3->localPosition());
511 
512  GlobalVector segDirMB4inGlobalFrame=DTSurface4.toGlobal(segmentDirectionMB4);
513  GlobalVector segDirMB3inGlobalFrame=DTSurface3.toGlobal(segmentDirectionMB3);
514 
515  float dx=segDirMB4inGlobalFrame.x();
516  float dy=segDirMB4inGlobalFrame.y();
517  // float dz=segDirMB4inGlobalFrame.z();
518 
519  float dx3=segDirMB3inGlobalFrame.x();
520  float dy3=segDirMB3inGlobalFrame.y();
521  // float dz3=segDirMB3inGlobalFrame.z();
522 
523  double cosAng=fabs(dx*dx3+dy*dy3/sqrt((dx3*dx3+dy3*dy3)*(dx*dx+dy*dy)));
524 
525  if(cosAng>MinCosAng){
526  if(dtSector==13){
527  dtSector=4;
528  }
529  if(dtSector==14){
530  dtSector=10;
531  }
532 
533  std::set<RPCDetId> rollsForThisDT = rollstoreDT[DTStationIndex(0,dtWheel,dtSector,dtStation)]; //It should be always 4
534 
535  assert(rollsForThisDT.size()>=1);
536 
537  for (std::set<RPCDetId>::iterator iteraRoll=rollsForThisDT.begin();iteraRoll != rollsForThisDT.end(); iteraRoll++){
538  const RPCRoll* rollasociated = rpcGeo->roll(*iteraRoll); //roll asociado a MB4
539  const BoundPlane & RPCSurfaceRB4 = rollasociated->surface(); //surface MB4
540 
541  // RPCGeomServ rpcsrv(rpcId);
542  // std::string nameRoll = rpcsrv.name();
543 
544  GlobalPoint CenterPointRollGlobal=RPCSurfaceRB4.toGlobal(LocalPoint(0,0,0));
545  LocalPoint CenterRollinMB4Frame = DTSurface4.toLocal(CenterPointRollGlobal); //In MB4
546  LocalPoint segmentPositionMB3inMB4Frame = DTSurface4.toLocal(segmentPositionMB3inGlobal); //In MB4
547  LocalVector segmentDirectionMB3inMB4Frame = DTSurface4.toLocal(segDirMB3inGlobalFrame); //In MB4
548 
549  //The exptrapolation is done in MB4 frame. for local x and z is done from MB4,
550  float Dxz=CenterRollinMB4Frame.z();
551  float Xo4=segmentPositionMB4.x();
552  float dxl=segmentDirectionMB4.x(); //dx local for MB4 segment in MB4 Frame
553  float dzl=segmentDirectionMB4.z(); //dx local for MB4 segment in MB4 Frame
554 
555  float X=Xo4+dxl*Dxz/dzl; //In MB4 frame
556  float Z=Dxz;//In MB4 frame
557 
558  //for local y is done from MB3
559  float Yo34=segmentPositionMB3inMB4Frame.y();
560  float dy34 = segmentDirectionMB3inMB4Frame.y();
561  float dz34 = segmentDirectionMB3inMB4Frame.z();
562  float Dy=Dxz-(segmentPositionMB3inMB4Frame.z()); //Distance beetween the segment in MB3 and the RB4 surface
563 
564  float Y=Yo34+dy34*Dy/dz34;//In MB4 Frame
565 
566  const RectangularStripTopology* top_
567  =dynamic_cast<const RectangularStripTopology*>(&(rollasociated->topology())); //Topology roll asociated MB4
568  LocalPoint xmin = top_->localPosition(0.);
569  LocalPoint xmax = top_->localPosition((float)rollasociated->nstrips());
570  float rsize = fabs( xmax.x()-xmin.x() );
571  float stripl = top_->stripLength();
572  float stripw = top_->pitch();
573 
574  float extrapolatedDistance = sqrt((Y-Yo34)*(Y-Yo34)+Dy*Dy);
575 
576  if(extrapolatedDistance<=MaxDrb4){
577 
578  GlobalPoint GlobalPointExtrapolated = DTSurface4.toGlobal(LocalPoint(X,Y,Z));
579  LocalPoint PointExtrapolatedRPCFrame = RPCSurfaceRB4.toLocal(GlobalPointExtrapolated);
580 
581  if(fabs(PointExtrapolatedRPCFrame.z()) < 5. &&
582  fabs(PointExtrapolatedRPCFrame.x()) < rsize*0.5 &&
583  fabs(PointExtrapolatedRPCFrame.y()) < stripl*0.5){
584 
585  RPCDetId rollId = rollasociated->id();
586  const float stripPredicted=rollasociated->strip(LocalPoint(PointExtrapolatedRPCFrame.x(),PointExtrapolatedRPCFrame.y(),0.));
587 
588  LogDebug("rpcefficiency")<<"MB4 \t \t \t \t Candidate (from DT Segment) STRIP---> "<<stripPredicted<< std::endl;
589  //--------- HISTOGRAM STRIP PREDICTED FROM DT MB4 -------------------
590 
591  std::map<std::string, MonitorElement*> meMap=meCollection[rollId.rawId()];
592  meIdDT.str("");
593  meIdDT<<"ExpectedOccupancyFromDT_"<<rollId.rawId();
594  meMap[meIdDT.str()]->Fill(stripPredicted);
595 
596  //-------RecHitPart Just For Residual--------
597  int countRecHits = 0;
598  int cluSize = 0;
599  float minres = 3000.;
600 
601  LogDebug("rpcefficiency")<<"MB4 \t \t \t \t Getting RecHits in Roll Asociated";
602  typedef std::pair<RPCRecHitCollection::const_iterator, RPCRecHitCollection::const_iterator> rangeRecHits;
603  rangeRecHits recHitCollection = rpcHits->get(rollasociated->id());
605 
606  for (recHit = recHitCollection.first; recHit != recHitCollection.second ; recHit++) {
607  countRecHits++;
608  LocalPoint recHitPos=recHit->localPosition();
609  float res=PointExtrapolatedRPCFrame.x()- recHitPos.x();
610  LogDebug("rpcefficiency")<<"DT \t \t \t \t \t Found Rec Hit at "<<res<<"cm of the prediction.";
611  if(fabs(res)<fabs(minres)){
612  minres=res;
613  cluSize = recHit->clusterSize();
614  }
615  }
616 
617  if(countRecHits==0){
618  LogDebug("rpcefficiency") <<"MB4 \t \t \t \t \t \t THIS ROLL DOESN'T HAVE ANY RECHIT";
619  }else{
620  assert(minres!=3000);
621 
622  if(fabs(minres)<=(rangestrips+cluSize*0.5)*stripw){
623  assert(rollId.station()==4);
624  if(cluSize==1*dupli){ hGlobalResClu1La[5]->Fill(minres);}
625  else if(cluSize==2*dupli){ hGlobalResClu2La[5]->Fill(minres);}
626  else if(cluSize==3*dupli){ hGlobalResClu3La[5]->Fill(minres);}
627 
628  meIdRPC.str("");
629  meIdRPC<<"RPCDataOccupancyFromDT_"<<rollId.rawId();
630  meMap[meIdRPC.str()]->Fill(stripPredicted);
631  }
632  }
633  }else{
634  LogDebug("rpcefficiency")<<"MB4 \t \t \t \t No the prediction is outside of this roll";
635  }
636  }//Condition for the right match
637  else{
638  LogDebug("rpcefficiency")<<"MB4 \t \t \t No, Exrtrapolation too long!, canceled";
639  }
640  }//loop over all the rollsasociated
641  }else{
642  LogDebug("rpcefficiency")<<"MB4 \t \t \t \t I found segments in MB4 and MB3 adjacent or same wheel and sector but not compatibles Diferent Directions";
643  }
644  }else{//if dtid3.station()==3&&dtid3.sector()==DTId.sector()&&dtid3.wheel()==DTId.wheel()&&segMB3->dim()==4
645  LogDebug("rpcefficiency")<<"MB4 \t \t \t No the same station or same wheel or segment dim in mb3 not 4D";
646  }
647  }//loop over all the segments looking for one in MB3
648  }else{
649  LogDebug("rpcefficiency")<<"MB4 \t \t \t Is NOT a 2D Segment";
650  }
651  }else{
652  LogDebug("rpcefficiency")<<"MB4 \t \t \t \t There is not just one segment or is not in station 4";
653  }//De aca para abajo esta en dtpart.inl
654  }
655  }else{
656  LogDebug("rpcefficiency")<<"MB4 \t This event doesn't have 4D Segment";
657  }
658  }
659 
660 
661  if(inclcsc){
662  LogDebug("rpcefficiency") <<"\t Getting the CSC Segments";
663  edm::Handle<CSCSegmentCollection> allCSCSegments;
664 
665  iEvent.getByToken(cscSegments, allCSCSegments);
666 
667  if(allCSCSegments.isValid()){
668  if(allCSCSegments->size()>0){
669  statistics->Fill(18);
670 
671  LogDebug("rpcefficiency")<<"CSC \t Number of CSC Segments in this event = "<<allCSCSegments->size();
672 
673  std::map<CSCDetId,int> CSCSegmentsCounter;
675 
676  int segmentsInThisEventInTheEndcap=0;
677 
678  for (segment = allCSCSegments->begin();segment!=allCSCSegments->end(); ++segment){
679  CSCSegmentsCounter[segment->cscDetId()]++;
680  segmentsInThisEventInTheEndcap++;
681  }
682 
683  statistics->Fill(allCSCSegments->size()+18);
684 
685  LogDebug("rpcefficiency")<<"CSC \t loop over all the CSCSegments ";
686  for (segment = allCSCSegments->begin();segment!=allCSCSegments->end(); ++segment){
687  CSCDetId CSCId = segment->cscDetId();
688 
689  if(CSCSegmentsCounter[CSCId]==1 && CSCId.station()!=4 && CSCId.ring()!=1 && allCSCSegments->size()>=2){
690  LogDebug("rpcefficiency")<<"CSC \t \t yes";
691  int cscEndCap = CSCId.endcap();
692  int cscStation = CSCId.station();
693  int cscRing = CSCId.ring();
694  // int cscChamber = CSCId.chamber();
695  int rpcRegion = 1; if(cscEndCap==2) rpcRegion= -1;//Relation among the endcaps
696  int rpcRing = cscRing;
697  if(cscRing==4)rpcRing =1;
698  int rpcStation = cscStation;
699  int rpcSegment = CSCId.chamber();
700 
701  LocalPoint segmentPosition= segment->localPosition();
702  LocalVector segmentDirection=segment->localDirection();
703  float dz=segmentDirection.z();
704 
705  LogDebug("rpcefficiency")<<"CSC \t \t Is a good Segment? dim = 4, 4 <= nRecHits <= 10 Incident angle int range 45 < "<<acos(dz)*180/3.1415926<<" < 135? ";
706 
707  if(segment->dimension()==4 && (segment->nRecHits()<=10 && segment->nRecHits()>=4)&& acos(dz)*180/3.1415926 > 45. && acos(dz)*180/3.1415926 < 160. ){
708 
709  float Xo=segmentPosition.x();
710  float Yo=segmentPosition.y();
711  float Zo=segmentPosition.z();
712  float dx=segmentDirection.x();
713  float dy=segmentDirection.y();
714  float dz=segmentDirection.z();
715 
716 
717  LogDebug("rpcefficiency")<<"CSC \t \t Getting chamber from Geometry";
718  const CSCChamber* TheChamber=cscGeo->chamber(CSCId);
719  LogDebug("rpcefficiency")<<"CSC \t \t Getting ID from Chamber";
720  const CSCDetId TheId=TheChamber->id();
721  LogDebug("rpcefficiency")<<"CSC \t \t Printing The Id"<<TheId;
722  std::set<RPCDetId> rollsForThisCSC = rollstoreCSC[CSCStationIndex(rpcRegion,rpcStation,rpcRing,rpcSegment)];
723  LogDebug("rpcefficiency")<<"CSC \t \t Number of rolls for this CSC = "<<rollsForThisCSC.size();
724 
725  if(rpcRing!=1){
726 
727  //Loop over all the rolls
728  for (std::set<RPCDetId>::iterator iteraRoll = rollsForThisCSC.begin();iteraRoll != rollsForThisCSC.end(); iteraRoll++){
729 
730  const RPCRoll* rollasociated = rpcGeo->roll(*iteraRoll);
731  RPCDetId rpcId = rollasociated->id();
732 
733  const BoundPlane & RPCSurface = rollasociated->surface();
734 
735  GlobalPoint CenterPointRollGlobal = RPCSurface.toGlobal(LocalPoint(0,0,0));
736  LocalPoint CenterRollinCSCFrame = TheChamber->toLocal(CenterPointRollGlobal);
737 
738  float D=CenterRollinCSCFrame.z();
739 
740  float X=Xo+dx*D/dz;
741  float Y=Yo+dy*D/dz;
742  float Z=D;
743 
744  const TrapezoidalStripTopology* top_=dynamic_cast<const TrapezoidalStripTopology*>(&(rollasociated->topology()));
745  LocalPoint xmin = top_->localPosition(0.);
746  LogDebug("rpcefficiency")<<"CSC \t \t \t xmin of this Roll "<<xmin<<"cm";
747  LocalPoint xmax = top_->localPosition((float)rollasociated->nstrips());
748  LogDebug("rpcefficiency")<<"CSC \t \t \t xmax of this Roll "<<xmax<<"cm";
749  float rsize = fabs( xmax.x()-xmin.x() );
750  LogDebug("rpcefficiency")<<"CSC \t \t \t Roll Size "<<rsize<<"cm";
751  float stripl = top_->stripLength();
752  float stripw = top_->pitch();
753 
754 
755  float extrapolatedDistance = sqrt((X-Xo)*(X-Xo)+(Y-Yo)*(Y-Yo)+(Z-Zo)*(Z-Zo));
756 
757 
758  if(extrapolatedDistance<=MaxD){
759 
760  GlobalPoint GlobalPointExtrapolated=TheChamber->toGlobal(LocalPoint(X,Y,Z));
761  LocalPoint PointExtrapolatedRPCFrame = RPCSurface.toLocal(GlobalPointExtrapolated);
762 
763 
764  if(fabs(PointExtrapolatedRPCFrame.z()) < 10. &&
765  fabs(PointExtrapolatedRPCFrame.x()) < rsize*0.5 &&
766  fabs(PointExtrapolatedRPCFrame.y()) < stripl*0.5){
767 
768  RPCDetId rollId = rollasociated->id();
769  RPCGeomServ rpcsrv(rollId);
770  std::string nameRoll = rpcsrv.name();
771 
772  LogDebug("rpcefficiency")<<"CSC \t \t \t \t The RPCName is "<<nameRoll;
773 
774  const float stripPredicted =
775  rollasociated->strip(LocalPoint(PointExtrapolatedRPCFrame.x(),PointExtrapolatedRPCFrame.y(),0.));
776 
777  LogDebug("rpcefficiency")<<"CSC \t \t \t \t \t Candidate"<<rollId<<" "<<"(from CSC Segment) STRIP---> "<<stripPredicted<< std::endl;
778  //--------- HISTOGRAM STRIP PREDICTED FROM CSC -------------------
779 
780  std::map<std::string, MonitorElement*> meMap=meCollection[rpcId.rawId()];
781  meIdCSC.str("");
782  meIdCSC<<"ExpectedOccupancyFromCSC_"<<rollId.rawId();
783  meMap[meIdCSC.str()]->Fill(stripPredicted);
784  //--------------------------------------------------------------------
785 
786 
787  //-------RecHitPart Just For Residual--------
788  int cluSize = 0;
789  int countRecHits = 0;
790  float minres = 3000.;
791 
792  LogDebug("rpcefficiency")<<"CSC \t \t \t \t \t Getting RecHits in Roll Asociated";
793  typedef std::pair<RPCRecHitCollection::const_iterator, RPCRecHitCollection::const_iterator> rangeRecHits;
794  rangeRecHits recHitCollection = rpcHits->get(rollasociated->id());
796 
797  for (recHit = recHitCollection.first; recHit != recHitCollection.second ; recHit++) {
798 
799  countRecHits++;
800  LocalPoint recHitPos=recHit->localPosition();
801  float res=PointExtrapolatedRPCFrame.x()- recHitPos.x();
802  LogDebug("rpcefficiency")<<"CSC \t \t \t \t \t \t Found Rec Hit at "<<res<<"cm of the prediction.";
803  if(fabs(res)<fabs(minres)){
804  minres=res;
805  cluSize = recHit->clusterSize();
806  LogDebug("rpcefficiency")<<"CSC \t \t \t \t \t \t \t New Min Res "<<res<<"cm.";
807  }
808  }
809 
810  if(countRecHits==0){
811  LogDebug("rpcefficiency") <<"CSC \t \t \t \t \t THIS ROLL DOESN'T HAVE ANY RECHIT";
812  }else{
813  assert(minres!=3000);
814 
815  if(fabs(minres)<=(rangestrips+cluSize*0.5)*stripw){
816  LogDebug("rpcefficiency")<<"CSC \t \t \t \t \t \t True!";
817 
818  if(rollId.ring()==2&&rollId.roll()==1){
819  if(cluSize==1*dupli) hGlobalResClu1R2A->Fill(minres);
820  else if(cluSize==2*dupli) hGlobalResClu2R2A->Fill(minres);
821  else if(cluSize==3*dupli) hGlobalResClu3R2A->Fill(minres);
822  }
823  else if(rollId.ring()==2&&rollId.roll()==2){
824  if(cluSize==1*dupli) hGlobalResClu1R2B->Fill(minres);
825  else if(cluSize==2*dupli) hGlobalResClu2R2B->Fill(minres);
826  else if(cluSize==3*dupli) hGlobalResClu3R2B->Fill(minres);
827  }
828  else if(rollId.ring()==2&&rollId.roll()==3){
829  if(cluSize==1*dupli) hGlobalResClu1R2C->Fill(minres);
830  else if(cluSize==2*dupli) hGlobalResClu2R2C->Fill(minres);
831  else if(cluSize==3*dupli) hGlobalResClu3R2C->Fill(minres);
832  }
833  else if(rollId.ring()==3&&rollId.roll()==1){
834  if(cluSize==1*dupli) hGlobalResClu1R3A->Fill(minres);
835  else if(cluSize==2*dupli) hGlobalResClu2R3A->Fill(minres);
836  else if(cluSize==3*dupli) hGlobalResClu3R3A->Fill(minres);
837  }
838  else if(rollId.ring()==3&&rollId.roll()==2){
839  if(cluSize==1*dupli) hGlobalResClu1R3B->Fill(minres);
840  else if(cluSize==2*dupli) hGlobalResClu2R3B->Fill(minres);
841  else if(cluSize==3*dupli) hGlobalResClu3R3B->Fill(minres);
842  }
843  else if(rollId.ring()==3&&rollId.roll()==3){if(cluSize==1*dupli) hGlobalResClu1R3C->Fill(minres); if(cluSize==2*dupli) hGlobalResClu2R3C->Fill(minres); if(cluSize==3*dupli) hGlobalResClu3R3C->Fill(minres);
844  }
845  meIdRPC.str("");
846  meIdRPC<<"RPCDataOccupancyFromCSC_"<<rollId.rawId();
847  meMap[meIdRPC.str()]->Fill(stripPredicted);
848  }
849  }
850 
851  }else{
852  LogDebug("rpcefficiency")<<"CSC \t \t \t \t No the prediction is outside of this roll";
853  }//Condition for the right match
854  }else{//if extrapolation distance D is not too long
855  LogDebug("rpcefficiency")<<"CSC \t \t \t No, Exrtrapolation too long!, canceled";
856  }//D so big
857  }//loop over the rolls asociated
858  }//Condition over the LS1 geometry!!!!
859  }//Is the segment 4D?
860  }else{
861  LogDebug("rpcefficiency")<<"CSC \t \t More than one segment in this chamber, or we are in Station Ring 1 or in Station 4";
862  }
863  }
864  }else{
865  LogDebug("rpcefficiency")<<"CSC This Event doesn't have any CSCSegment";
866  }
867  }
868  }
869 
870 }
871 
872 
873 
#define LogDebug(id)
const double Z[kNumberCalorimeter]
int chamber() const
Definition: CSCDetId.h:81
T getParameter(std::string const &) const
float strip(const LocalPoint &lp) const
Definition: RPCRoll.cc:71
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
const Topology & topology() const
Definition: RPCRoll.cc:30
int distsector_tmp(int sector1, int sector2)
MonitorElement * hGlobalResClu1R2A
virtual float stripLength() const
RPCEfficiency(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
CSCDetId id() const
Get the (concrete) DetId.
Definition: CSCChamber.h:37
void cd(void)
Definition: DQMStore.cc:266
MonitorElement * hGlobalResClu1R3A
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:47
int nstrips() const
Definition: RPCRoll.cc:46
MonitorElement * hGlobalResClu3R2C
MonitorElement * hGlobalResClu2La[6]
T y() const
Definition: PV3DBase.h:63
#define X(str)
Definition: MuonsGrabber.cc:48
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 * hGlobalResClu3R3C
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:62
std::map< int, std::map< std::string, MonitorElement * > > meCollection
void bookDetUnitSeg(DQMStore::IBooker &, RPCDetId &detId, int nstrips, std::string folder, std::map< std::string, MonitorElement * > &)
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
void Fill(long long x)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
int endcap() const
Definition: CSCDetId.h:106
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::string EffRootFileName
RPCDetId id() const
Definition: RPCRoll.cc:24
int iEvent
Definition: GenABIO.cc:230
virtual std::string name()
Definition: RPCGeomServ.cc:20
int roll() const
Definition: RPCDetId.h:120
edm::EDGetTokenT< RPCRecHitCollection > RPCRecHitLabel_
MonitorElement * hGlobalResClu3La[6]
int ring() const
Definition: RPCDetId.h:72
T sqrt(T t)
Definition: SSEVec.h:48
std::string folderPath
T z() const
Definition: PV3DBase.h:64
MonitorElement * hGlobalResClu3R2A
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:113
const std::vector< const RPCRoll * > & rolls() const
Return the Rolls.
Definition: RPCChamber.cc:68
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double rangestripsRB4
MonitorElement * hGlobalResClu1R3B
MonitorElement * hGlobalResClu1R2C
MonitorElement * hGlobalResClu2R3C
MonitorElement * hGlobalResClu3R3A
bool isValid() const
Definition: HandleBase.h:76
std::map< CSCStationIndex, std::set< RPCDetId > > rollstoreCSC
MonitorElement * statistics
edm::EDGetTokenT< CSCSegmentCollection > cscSegments
std::map< DTStationIndex, std::set< RPCDetId > > rollstoreDT
edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegments
int ring() const
Definition: CSCDetId.h:88
int layer() const
Definition: RPCDetId.h:108
virtual int segment()
Definition: RPCGeomServ.cc:467
MonitorElement * hGlobalResClu2R2A
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:150
MonitorElement * hGlobalResClu2R3A
const T & get() const
Definition: EventSetup.h:55
MonitorElement * hGlobalResClu1La[6]
virtual LocalPoint localPosition(float strip) const
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:102
double rangestrips
virtual float pitch() const
int sector() const
Definition: DTChamberId.h:61
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
virtual void analyze(const edm::Event &, const edm::EventSetup &)
int station() const
Definition: CSCDetId.h:99
MonitorElement * hGlobalResClu1R3C
MonitorElement * hGlobalResClu2R2B
virtual LocalPoint localPosition(float strip) const
int station() const
Return the station number.
Definition: DTChamberId.h:51
MonitorElement * hGlobalResClu3R3B
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
T x() const
Definition: PV3DBase.h:62
virtual float stripLength() const
det heigth (strip length in the middle)
MonitorElement * hGlobalResClu3R2B
MonitorElement * hGlobalResClu2R3B
MonitorElement * hGlobalResClu1R2B
MonitorElement * hGlobalResClu2R2C
Definition: Run.h:41
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63
int station() const
Definition: RPCDetId.h:96