21 if(sector1==13) sector1=4;
22 if(sector1==14) sector1=10;
24 if(sector2==13) sector2=4;
25 if(sector2==14) sector2=10;
27 int distance =
abs(sector1 - sector2);
28 if(distance>6) distance = 12-distance;
70 std::stringstream sstr;
71 for(
int i = 1;
i<=15;
i++ ){
78 for(
int i = 1;
i<=15;
i++ ){
87 folder =
folderPath+
"MuonSegEff/"+
"Residuals/Barrel";
91 std::stringstream histoName, histoTitle;
93 for (
int layer = 1 ; layer<= 6 ;layer++){
96 histoName<<
"GlobalResidualsClu1La"<<layer;
97 histoTitle<<
"RPC Residuals Layer "<<layer<<
" Cluster Size 1";
102 histoName<<
"GlobalResidualsClu2La"<<layer;
103 histoTitle<<
"RPC Residuals Layer "<<layer<<
" Cluster Size 2";
108 histoName<<
"GlobalResidualsClu3La"<<layer;
109 histoTitle<<
"RPC Residuals Layer "<<layer<<
" Cluster Size 3";
114 LogDebug(
"rpcefficiency")<<
"Booking Residuals for EndCap";
115 folder =
folderPath+
"MuonSegEff/Residuals/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.);
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.);
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.);
145 for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){
146 if(dynamic_cast< const RPCChamber* >( *it ) != 0 ){
148 std::vector< const RPCRoll*> roles = (ch->
rolls());
150 for(std::vector<const RPCRoll*>::const_iterator
r = roles.begin();
r != roles.end(); ++
r){
153 int region=rpcId.
region();
161 int wheel=rpcId.
ring();
162 int sector=rpcId.
sector();
165 std::set<RPCDetId> myrolls;
167 myrolls.insert(rpcId);
170 }
else if(region!=0 &&
inclcsc){
176 int rpcsegment = rpcsrv.
segment();
177 int cscchamber = rpcsegment;
179 if((station==2||station==3||station==4)&&ring==3){
184 std::set<RPCDetId> myrolls;
188 myrolls.insert(rpcId);
195 for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){
196 if( dynamic_cast< const RPCChamber* >( *it ) != 0 ){
199 std::vector< const RPCRoll*> roles = (ch->
rolls());
200 for(std::vector<const RPCRoll*>::const_iterator
r = roles.begin();
r != roles.end(); ++
r){
203 int region=rpcId.
region();
206 int region=rpcId.
region();
211 if((station==2||station==3||station==4)&&ring==3) cscring = 2;
216 int rpcsegment = rpcsrv.
segment();
218 int cscchamber = rpcsegment+1;
219 if(cscchamber==37)cscchamber=1;
221 std::set<RPCDetId> myrolls;
223 myrolls.insert(rpcId);
226 cscchamber = rpcsegment-1;
227 if(cscchamber==0)cscchamber=36;
229 std::set<RPCDetId> myrollsDos;
231 myrollsDos.insert(rpcId);
259 std::stringstream meIdRPC, meIdDT, meIdCSC;
261 LogDebug(
"rpcefficiency") <<
"\t Getting the RPC RecHits";
268 LogDebug(
"rpcefficiency")<<
"\t Getting the DT Segments";
275 if(all4DSegments->size()>0){
279 LogDebug(
"rpcefficiency")<<
"\t Number of DT Segments in this event = "<<all4DSegments->size();
281 std::map<DTChamberId,int> DTSegmentCounter;
284 for (segment = all4DSegments->begin();segment!=all4DSegments->end(); ++segment){
285 DTSegmentCounter[segment->chamberId()]++;
290 LogDebug(
"rpcefficiency")<<
"\t Loop over all the 4D Segments";
291 for (segment = all4DSegments->begin(); segment != all4DSegments->end(); ++segment){
296 if(DTSegmentCounter[DTId]==1 && DTId.
station()!=4){
298 int dtWheel = DTId.
wheel();
299 int dtStation = DTId.
station();
300 int dtSector = DTId.
sector();
302 LocalPoint segmentPosition= segment->localPosition();
303 LocalVector segmentDirection=segment->localDirection();
305 const GeomDet* gdet=dtGeo->idToDet(segment->geographicalId());
310 if(segment->dimension()==4){
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();
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);
332 LocalPoint CenterRollinDTFrame = DTSurface.toLocal(CenterPointRollGlobal);
334 float D=CenterRollinDTFrame.
z();
342 LogDebug(
"rpcefficiency")<<
"DT \t \t \t xmin of this Roll "<<xmin<<
"cm";
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";
348 float stripw = top_->
pitch();
350 float extrapolatedDistance =
sqrt((X-Xo)*(X-Xo)+(Y-Yo)*(Y-Yo)+(Z-Zo)*(Z-Zo));
352 if(extrapolatedDistance<=
MaxD){
355 LocalPoint PointExtrapolatedRPCFrame = RPCSurface.toLocal(GlobalPointExtrapolated);
357 if(fabs(PointExtrapolatedRPCFrame.
z()) < 10. &&
358 fabs(PointExtrapolatedRPCFrame.
x()) < rsize*0.5 &&
359 fabs(PointExtrapolatedRPCFrame.
y()) < stripl*0.5){
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.));
368 LogDebug(
"rpcefficiency")<<
"DT \t \t \t \t Candidate (from DT Segment) STRIP---> "<<stripPredicted<< std::endl;
373 meIdDT<<
"ExpectedOccupancyFromDT_"<<rollId.
rawId();
374 meMap[meIdDT.str()]->Fill(stripPredicted);
379 int countRecHits = 0;
381 float minres = 3000.;
383 typedef std::pair<RPCRecHitCollection::const_iterator, RPCRecHitCollection::const_iterator> rangeRecHits;
384 rangeRecHits recHitCollection = rpcHits->get(rollasociated->
id());
387 for (recHit = recHitCollection.first; recHit != recHitCollection.second ; recHit++) {
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)){
398 cluSize = recHit->clusterSize();
399 LogDebug(
"rpcefficiency")<<
"DT \t \t \t \t \t \t New Min Res "<<res<<
"cm.";
404 LogDebug(
"rpcefficiency") <<
"DT \t \t \t \t \t THIS ROLL DOESN'T HAVE ANY RECHIT";
406 assert(minres!=3000);
408 if(fabs(minres)<=(
rangestrips+cluSize*0.5)*stripw){
409 LogDebug(
"rpcefficiency")<<
"DT \t \t \t \t \t \t True!";
437 meIdRPC<<
"RPCDataOccupancyFromDT_"<<rollId.
rawId();
438 meMap[meIdRPC.str()]->Fill(stripPredicted);
442 LogDebug(
"rpcefficiency")<<
"DT \t \t \t \t No the prediction is outside of this roll";
445 LogDebug(
"rpcefficiency")<<
"DT \t \t \t No, Exrtrapolation too long!, canceled";
450 LogDebug(
"rpcefficiency")<<
"DT \t \t More than one segment in this chamber, or we are in Station 4";
454 LogDebug(
"rpcefficiency")<<
"DT This Event doesn't have any DT4DDSegment";
463 if(all4DSegments.
isValid() && all4DSegments->size()>0){
465 std::map<DTChamberId,int> DTSegmentCounter;
468 for (segment = all4DSegments->begin();segment!=all4DSegments->end(); ++segment){
469 DTSegmentCounter[segment->chamberId()]++;
472 LogDebug(
"rpcefficiency")<<
"MB4 \t \t Loop Over all4DSegments";
473 for (segment = all4DSegments->begin(); segment != all4DSegments->end(); ++segment){
477 if(DTSegmentCounter[DTId] == 1 && DTId.
station()==4){
478 int dtWheel = DTId.
wheel();
479 int dtStation = DTId.
station();
480 int dtSector = DTId.
sector();
482 LocalPoint segmentPosition= segment->localPosition();
483 LocalVector segmentDirection=segment->localDirection();
487 if(segment->dimension()==2){
489 LocalPoint segmentPositionMB4=segmentPosition;
492 const BoundPlane& DTSurface4 = dtGeo->idToDet(DTId)->surface();
496 for(segMB3=all4DSegments->begin();segMB3!=all4DSegments->end();++segMB3){
503 && DTSegmentCounter[dtid3] == 1
504 && segMB3->dimension()==4){
506 const GeomDet* gdet3=dtGeo->idToDet(segMB3->geographicalId());
509 LocalVector segmentDirectionMB3 = segMB3->localDirection();
510 GlobalPoint segmentPositionMB3inGlobal = DTSurface3.toGlobal(segMB3->localPosition());
512 GlobalVector segDirMB4inGlobalFrame=DTSurface4.toGlobal(segmentDirectionMB4);
513 GlobalVector segDirMB3inGlobalFrame=DTSurface3.toGlobal(segmentDirectionMB3);
515 float dx=segDirMB4inGlobalFrame.
x();
516 float dy=segDirMB4inGlobalFrame.
y();
519 float dx3=segDirMB3inGlobalFrame.
x();
520 float dy3=segDirMB3inGlobalFrame.
y();
523 double cosAng=fabs(dx*dx3+dy*dy3/
sqrt((dx3*dx3+dy3*dy3)*(dx*dx+dy*dy)));
535 assert(rollsForThisDT.size()>=1);
537 for (std::set<RPCDetId>::iterator iteraRoll=rollsForThisDT.begin();iteraRoll != rollsForThisDT.end(); iteraRoll++){
538 const RPCRoll* rollasociated = rpcGeo->roll(*iteraRoll);
545 LocalPoint CenterRollinMB4Frame = DTSurface4.toLocal(CenterPointRollGlobal);
546 LocalPoint segmentPositionMB3inMB4Frame = DTSurface4.toLocal(segmentPositionMB3inGlobal);
547 LocalVector segmentDirectionMB3inMB4Frame = DTSurface4.toLocal(segDirMB3inGlobalFrame);
550 float Dxz=CenterRollinMB4Frame.
z();
551 float Xo4=segmentPositionMB4.
x();
552 float dxl=segmentDirectionMB4.
x();
553 float dzl=segmentDirectionMB4.
z();
555 float X=Xo4+dxl*Dxz/dzl;
559 float Yo34=segmentPositionMB3inMB4Frame.
y();
560 float dy34 = segmentDirectionMB3inMB4Frame.
y();
561 float dz34 = segmentDirectionMB3inMB4Frame.
z();
562 float Dy=Dxz-(segmentPositionMB3inMB4Frame.
z());
564 float Y=Yo34+dy34*Dy/dz34;
570 float rsize = fabs( xmax.
x()-xmin.
x() );
572 float stripw = top_->
pitch();
574 float extrapolatedDistance =
sqrt((Y-Yo34)*(Y-Yo34)+Dy*Dy);
576 if(extrapolatedDistance<=
MaxDrb4){
579 LocalPoint PointExtrapolatedRPCFrame = RPCSurfaceRB4.toLocal(GlobalPointExtrapolated);
581 if(fabs(PointExtrapolatedRPCFrame.
z()) < 5. &&
582 fabs(PointExtrapolatedRPCFrame.
x()) < rsize*0.5 &&
583 fabs(PointExtrapolatedRPCFrame.
y()) < stripl*0.5){
586 const float stripPredicted=rollasociated->
strip(
LocalPoint(PointExtrapolatedRPCFrame.
x(),PointExtrapolatedRPCFrame.
y(),0.));
588 LogDebug(
"rpcefficiency")<<
"MB4 \t \t \t \t Candidate (from DT Segment) STRIP---> "<<stripPredicted<< std::endl;
593 meIdDT<<
"ExpectedOccupancyFromDT_"<<rollId.
rawId();
594 meMap[meIdDT.str()]->Fill(stripPredicted);
597 int countRecHits = 0;
599 float minres = 3000.;
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());
606 for (recHit = recHitCollection.first; recHit != recHitCollection.second ; recHit++) {
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)){
613 cluSize = recHit->clusterSize();
618 LogDebug(
"rpcefficiency") <<
"MB4 \t \t \t \t \t \t THIS ROLL DOESN'T HAVE ANY RECHIT";
620 assert(minres!=3000);
622 if(fabs(minres)<=(
rangestrips+cluSize*0.5)*stripw){
629 meIdRPC<<
"RPCDataOccupancyFromDT_"<<rollId.
rawId();
630 meMap[meIdRPC.str()]->Fill(stripPredicted);
634 LogDebug(
"rpcefficiency")<<
"MB4 \t \t \t \t No the prediction is outside of this roll";
638 LogDebug(
"rpcefficiency")<<
"MB4 \t \t \t No, Exrtrapolation too long!, canceled";
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";
645 LogDebug(
"rpcefficiency")<<
"MB4 \t \t \t No the same station or same wheel or segment dim in mb3 not 4D";
649 LogDebug(
"rpcefficiency")<<
"MB4 \t \t \t Is NOT a 2D Segment";
652 LogDebug(
"rpcefficiency")<<
"MB4 \t \t \t \t There is not just one segment or is not in station 4";
656 LogDebug(
"rpcefficiency")<<
"MB4 \t This event doesn't have 4D Segment";
662 LogDebug(
"rpcefficiency") <<
"\t Getting the CSC Segments";
668 if(allCSCSegments->size()>0){
671 LogDebug(
"rpcefficiency")<<
"CSC \t Number of CSC Segments in this event = "<<allCSCSegments->size();
673 std::map<CSCDetId,int> CSCSegmentsCounter;
676 int segmentsInThisEventInTheEndcap=0;
678 for (segment = allCSCSegments->begin();segment!=allCSCSegments->end(); ++segment){
679 CSCSegmentsCounter[segment->cscDetId()]++;
680 segmentsInThisEventInTheEndcap++;
685 LogDebug(
"rpcefficiency")<<
"CSC \t loop over all the CSCSegments ";
686 for (segment = allCSCSegments->begin();segment!=allCSCSegments->end(); ++segment){
687 CSCDetId CSCId = segment->cscDetId();
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();
695 int rpcRegion = 1;
if(cscEndCap==2) rpcRegion= -1;
696 int rpcRing = cscRing;
697 if(cscRing==4)rpcRing =1;
698 int rpcStation = cscStation;
699 int rpcSegment = CSCId.
chamber();
701 LocalPoint segmentPosition= segment->localPosition();
702 LocalVector segmentDirection=segment->localDirection();
703 float dz=segmentDirection.
z();
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? ";
707 if(segment->dimension()==4 && (segment->nRecHits()<=10 && segment->nRecHits()>=4)&& acos(dz)*180/3.1415926 > 45. && acos(dz)*180/3.1415926 < 160. ){
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();
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";
721 LogDebug(
"rpcefficiency")<<
"CSC \t \t Printing The Id"<<TheId;
723 LogDebug(
"rpcefficiency")<<
"CSC \t \t Number of rolls for this CSC = "<<rollsForThisCSC.size();
728 for (std::set<RPCDetId>::iterator iteraRoll = rollsForThisCSC.begin();iteraRoll != rollsForThisCSC.end(); iteraRoll++){
730 const RPCRoll* rollasociated = rpcGeo->roll(*iteraRoll);
738 float D=CenterRollinCSCFrame.
z();
746 LogDebug(
"rpcefficiency")<<
"CSC \t \t \t xmin of this Roll "<<xmin<<
"cm";
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";
752 float stripw = top_->
pitch();
755 float extrapolatedDistance =
sqrt((X-Xo)*(X-Xo)+(Y-Yo)*(Y-Yo)+(Z-Zo)*(Z-Zo));
758 if(extrapolatedDistance<=
MaxD){
761 LocalPoint PointExtrapolatedRPCFrame = RPCSurface.toLocal(GlobalPointExtrapolated);
764 if(fabs(PointExtrapolatedRPCFrame.
z()) < 10. &&
765 fabs(PointExtrapolatedRPCFrame.
x()) < rsize*0.5 &&
766 fabs(PointExtrapolatedRPCFrame.
y()) < stripl*0.5){
772 LogDebug(
"rpcefficiency")<<
"CSC \t \t \t \t The RPCName is "<<nameRoll;
774 const float stripPredicted =
775 rollasociated->
strip(
LocalPoint(PointExtrapolatedRPCFrame.
x(),PointExtrapolatedRPCFrame.
y(),0.));
777 LogDebug(
"rpcefficiency")<<
"CSC \t \t \t \t \t Candidate"<<rollId<<
" "<<
"(from CSC Segment) STRIP---> "<<stripPredicted<< std::endl;
782 meIdCSC<<
"ExpectedOccupancyFromCSC_"<<rollId.
rawId();
783 meMap[meIdCSC.str()]->Fill(stripPredicted);
789 int countRecHits = 0;
790 float minres = 3000.;
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());
797 for (recHit = recHitCollection.first; recHit != recHitCollection.second ; recHit++) {
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)){
805 cluSize = recHit->clusterSize();
806 LogDebug(
"rpcefficiency")<<
"CSC \t \t \t \t \t \t \t New Min Res "<<res<<
"cm.";
811 LogDebug(
"rpcefficiency") <<
"CSC \t \t \t \t \t THIS ROLL DOESN'T HAVE ANY RECHIT";
813 assert(minres!=3000);
815 if(fabs(minres)<=(
rangestrips+cluSize*0.5)*stripw){
816 LogDebug(
"rpcefficiency")<<
"CSC \t \t \t \t \t \t True!";
818 if(rollId.
ring()==2&&rollId.
roll()==1){
823 else if(rollId.
ring()==2&&rollId.
roll()==2){
828 else if(rollId.
ring()==2&&rollId.
roll()==3){
833 else if(rollId.
ring()==3&&rollId.
roll()==1){
838 else if(rollId.
ring()==3&&rollId.
roll()==2){
846 meIdRPC<<
"RPCDataOccupancyFromCSC_"<<rollId.
rawId();
847 meMap[meIdRPC.str()]->Fill(stripPredicted);
852 LogDebug(
"rpcefficiency")<<
"CSC \t \t \t \t No the prediction is outside of this roll";
855 LogDebug(
"rpcefficiency")<<
"CSC \t \t \t No, Exrtrapolation too long!, canceled";
861 LogDebug(
"rpcefficiency")<<
"CSC \t \t More than one segment in this chamber, or we are in Station Ring 1 or in Station 4";
865 LogDebug(
"rpcefficiency")<<
"CSC This Event doesn't have any CSCSegment";
const double Z[kNumberCalorimeter]
T getParameter(std::string const &) const
float strip(const LocalPoint &lp) const
T getUntrackedParameter(std::string const &, T const &) const
const Topology & topology() const
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
CSCDetId id() const
Get the (concrete) DetId.
MonitorElement * hGlobalResClu1R3A
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
MonitorElement * hGlobalResClu3R2C
MonitorElement * hGlobalResClu2La[6]
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.
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.
virtual float pitch() const
uint32_t rawId() const
get the raw id
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::string EffRootFileName
virtual std::string name()
edm::EDGetTokenT< RPCRecHitCollection > RPCRecHitLabel_
MonitorElement * hGlobalResClu3La[6]
MonitorElement * hGlobalResClu3R2A
MonitorElement * book1D(Args &&...args)
const std::vector< const RPCRoll * > & rolls() const
Return the Rolls.
Abs< T >::type abs(const T &t)
MonitorElement * hGlobalResClu1R3B
MonitorElement * hGlobalResClu1R2C
MonitorElement * hGlobalResClu2R3C
MonitorElement * hGlobalResClu3R3A
std::map< CSCStationIndex, std::set< RPCDetId > > rollstoreCSC
MonitorElement * statistics
edm::EDGetTokenT< CSCSegmentCollection > cscSegments
std::map< DTStationIndex, std::set< RPCDetId > > rollstoreDT
edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegments
MonitorElement * hGlobalResClu2R2A
void setCurrentFolder(const std::string &fullpath)
DecomposeProduct< arg, typename Div::arg > D
MonitorElement * hGlobalResClu2R3A
MonitorElement * hGlobalResClu1La[6]
virtual LocalPoint localPosition(float strip) const
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
virtual float pitch() const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * hGlobalResClu1R3C
MonitorElement * hGlobalResClu2R2B
virtual LocalPoint localPosition(float strip) const
int station() const
Return the station number.
MonitorElement * hGlobalResClu3R3B
int wheel() const
Return the wheel number.
virtual float stripLength() const
det heigth (strip length in the middle)
MonitorElement * hGlobalResClu3R2B
MonitorElement * hGlobalResClu2R3B
MonitorElement * hGlobalResClu1R2B
MonitorElement * hGlobalResClu2R2C
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.