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