25 if(sector1==13) sector1=4;
26 if(sector1==14) sector1=10;
28 if(sector2==13) sector2=4;
29 if(sector2==14) sector2=10;
31 int distance =
abs(sector1 - sector2);
32 if(distance>6) distance = 12-distance;
67 dbe->setCurrentFolder(folderPath);
68 statistics = dbe->book1D(
"Statistics",
"All Statistics",33,0.5,33.5);
104 if(debug)
std::cout<<
"booking Global histograms with "<<folderPath<<std::endl;
106 folder = folderPath+
"MuonSegEff/"+
"Residuals/Barrel";
107 dbe->setCurrentFolder(folder);
110 std::stringstream histoName, histoTitle;
112 for (
int layer = 1 ; layer<= 6 ;layer++){
115 histoName<<
"GlobalResidualsClu1La"<<layer;
116 histoTitle<<
"RPC Residuals Layer "<<layer<<
" Cluster Size 1";
117 hGlobalResClu1La[layer-1] = dbe->book1D(histoName.str(), histoTitle.str(),101,-10.,10.);
121 histoName<<
"GlobalResidualsClu2La"<<layer;
122 histoTitle<<
"RPC Residuals Layer "<<layer<<
" Cluster Size 2";
123 hGlobalResClu2La[layer-1] = dbe->book1D(histoName.str(), histoTitle.str(),101,-10.,10.);
127 histoName<<
"GlobalResidualsClu3La"<<layer;
128 histoTitle<<
"RPC Residuals Layer "<<layer<<
" Cluster Size 3";
129 hGlobalResClu3La[layer-1] = dbe->book1D(histoName.str(), histoTitle.str(),101,-10.,10.);
133 if(debug)
std::cout<<
"Booking Residuals for EndCap"<<std::endl;
134 folder = folderPath+
"MuonSegEff/Residuals/EndCap";
135 dbe->setCurrentFolder(folder);
139 hGlobalResClu1R3C = dbe->book1D(
"GlobalResidualsClu1R3C",
"RPC Residuals Ring 3 Roll C Cluster Size 1",101,-10.,10.);
140 hGlobalResClu1R3B = dbe->book1D(
"GlobalResidualsClu1R3B",
"RPC Residuals Ring 3 Roll B Cluster Size 1",101,-10.,10.);
141 hGlobalResClu1R3A = dbe->book1D(
"GlobalResidualsClu1R3A",
"RPC Residuals Ring 3 Roll A Cluster Size 1",101,-10.,10.);
142 hGlobalResClu1R2C = dbe->book1D(
"GlobalResidualsClu1R2C",
"RPC Residuals Ring 2 Roll C Cluster Size 1",101,-10.,10.);
143 hGlobalResClu1R2B = dbe->book1D(
"GlobalResidualsClu1R2B",
"RPC Residuals Ring 2 Roll B Cluster Size 1",101,-10.,10.);
144 hGlobalResClu1R2A = dbe->book1D(
"GlobalResidualsClu1R2A",
"RPC Residuals Ring 2 Roll A Cluster Size 1",101,-10.,10.);
146 hGlobalResClu2R3C = dbe->book1D(
"GlobalResidualsClu2R3C",
"RPC Residuals Ring 3 Roll C Cluster Size 2",101,-10.,10.);
147 hGlobalResClu2R3B = dbe->book1D(
"GlobalResidualsClu2R3B",
"RPC Residuals Ring 3 Roll B Cluster Size 2",101,-10.,10.);
148 hGlobalResClu2R3A = dbe->book1D(
"GlobalResidualsClu2R3A",
"RPC Residuals Ring 3 Roll A Cluster Size 2",101,-10.,10.);
149 hGlobalResClu2R2C = dbe->book1D(
"GlobalResidualsClu2R2C",
"RPC Residuals Ring 2 Roll C Cluster Size 2",101,-10.,10.);
150 hGlobalResClu2R2B = dbe->book1D(
"GlobalResidualsClu2R2B",
"RPC Residuals Ring 2 Roll B Cluster Size 2",101,-10.,10.);
151 hGlobalResClu2R2A = dbe->book1D(
"GlobalResidualsClu2R2A",
"RPC Residuals Ring 2 Roll A Cluster Size 2",101,-10.,10.);
153 hGlobalResClu3R3C = dbe->book1D(
"GlobalResidualsClu3R3C",
"RPC Residuals Ring 3 Roll C Cluster Size 3",101,-10.,10.);
154 hGlobalResClu3R3B = dbe->book1D(
"GlobalResidualsClu3R3B",
"RPC Residuals Ring 3 Roll B Cluster Size 3",101,-10.,10.);
155 hGlobalResClu3R3A = dbe->book1D(
"GlobalResidualsClu3R3A",
"RPC Residuals Ring 3 Roll A Cluster Size 3",101,-10.,10.);
156 hGlobalResClu3R2C = dbe->book1D(
"GlobalResidualsClu3R2C",
"RPC Residuals Ring 2 Roll C Cluster Size 3",101,-10.,10.);
157 hGlobalResClu3R2B = dbe->book1D(
"GlobalResidualsClu3R2B",
"RPC Residuals Ring 2 Roll B Cluster Size 3",101,-10.,10.);
158 hGlobalResClu3R2A = dbe->book1D(
"GlobalResidualsClu3R2A",
"RPC Residuals Ring 2 Roll A Cluster Size 3",101,-10.,10.);
168 for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){
169 if(dynamic_cast< RPCChamber* >( *it ) != 0 ){
171 std::vector< const RPCRoll*> roles = (ch->
rolls());
172 for(std::vector<const RPCRoll*>::const_iterator
r = roles.begin();
r != roles.end(); ++
r){
175 int region=rpcId.
region();
186 int wheel=rpcId.
ring();
187 int sector=rpcId.
sector();
190 std::set<RPCDetId> myrolls;
192 myrolls.insert(rpcId);
195 }
else if(region!=0 &&
inclcsc){
201 int rpcsegment = rpcsrv.
segment();
202 int cscchamber = rpcsegment;
203 if((station==2||station==3)&&ring==3){
208 std::set<RPCDetId> myrolls;
212 myrolls.insert(rpcId);
218 for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){
219 if( dynamic_cast< RPCChamber* >( *it ) != 0 ){
222 std::vector< const RPCRoll*> roles = (ch->
rolls());
223 for(std::vector<const RPCRoll*>::const_iterator
r = roles.begin();
r != roles.end(); ++
r){
226 int region=rpcId.
region();
229 int region=rpcId.
region();
234 if((station==2||station==3)&&ring==3) cscring = 2;
239 int rpcsegment = rpcsrv.
segment();
241 int cscchamber = rpcsegment+1;
242 if(cscchamber==37)cscchamber=1;
244 std::set<RPCDetId> myrolls;
246 myrolls.insert(rpcId);
249 cscchamber = rpcsegment-1;
250 if(cscchamber==0)cscchamber=36;
252 std::set<RPCDetId> myrollsDos;
254 myrollsDos.insert(rpcId);
277 std::stringstream meIdRPC, meIdDT, meIdCSC;
293 if(all4DSegments->size()>0){
297 if(
debug)
std::cout<<
"\t Number of DT Segments in this event = "<<all4DSegments->size()<<std::endl;
299 std::map<DTChamberId,int> DTSegmentCounter;
302 for (segment = all4DSegments->begin();segment!=all4DSegments->end(); ++segment){
303 DTSegmentCounter[segment->chamberId()]++;
308 if(
debug)
std::cout<<
"\t Loop over all the 4D Segments"<<std::endl;
309 for (segment = all4DSegments->begin(); segment != all4DSegments->end(); ++segment){
314 if(DTSegmentCounter[DTId]==1 && DTId.
station()!=4){
316 int dtWheel = DTId.
wheel();
317 int dtStation = DTId.
station();
318 int dtSector = DTId.
sector();
320 LocalPoint segmentPosition= segment->localPosition();
321 LocalVector segmentDirection=segment->localDirection();
323 const GeomDet* gdet=dtGeo->idToDet(segment->geographicalId());
328 if(segment->dimension()==4){
330 float Xo=segmentPosition.
x();
331 float Yo=segmentPosition.
y();
332 float Zo=segmentPosition.
z();
333 float dx=segmentDirection.
x();
334 float dy=segmentDirection.
y();
335 float dz=segmentDirection.
z();
339 if(
debug)
std::cout<<
"DT \t \t Loop over all the rolls asociated to this DT"<<std::endl;
340 for (std::set<RPCDetId>::iterator iteraRoll = rollsForThisDT.begin();iteraRoll != rollsForThisDT.end(); iteraRoll++){
341 const RPCRoll* rollasociated = rpcGeo->roll(*iteraRoll);
352 float D=CenterRollinDTFrame.
z();
360 if(
debug)
std::cout<<
"DT \t \t \t xmin of this Roll "<<xmin<<
"cm"<<std::endl;
362 if(
debug)
std::cout<<
"DT \t \t \t xmax of this Roll "<<xmax<<
"cm"<<std::endl;
363 float rsize = fabs( xmax.
x()-xmin.
x() );
364 if(
debug)
std::cout<<
"DT \t \t \t Roll Size "<<rsize<<
"cm"<<std::endl;
366 float stripw = top_->
pitch();
368 float extrapolatedDistance =
sqrt((X-Xo)*(X-Xo)+(Y-Yo)*(Y-Yo)+(Z-Zo)*(Z-Zo));
370 if(extrapolatedDistance<=
MaxD){
373 LocalPoint PointExtrapolatedRPCFrame = RPCSurface.
toLocal(GlobalPointExtrapolated);
375 if(fabs(PointExtrapolatedRPCFrame.
z()) < 10. &&
376 fabs(PointExtrapolatedRPCFrame.
x()) < rsize*0.5 &&
377 fabs(PointExtrapolatedRPCFrame.
y()) < stripl*0.5){
381 std::string nameRoll = rpcsrv.
name();
382 if(
debug)
std::cout<<
"DT \t \t \t \t The RPCName is "<<nameRoll<<std::endl;
383 const float stripPredicted =
384 rollasociated->
strip(
LocalPoint(PointExtrapolatedRPCFrame.
x(),PointExtrapolatedRPCFrame.
y(),0.));
386 if(
debug)
std::cout<<
"DT \t \t \t \t Candidate (from DT Segment) STRIP---> "<<stripPredicted<< std::endl;
391 meIdDT<<
"ExpectedOccupancyFromDT_"<<rollId.
rawId();
392 meMap[meIdDT.str()]->Fill(stripPredicted);
397 int countRecHits = 0;
399 float minres = 3000.;
401 typedef std::pair<RPCRecHitCollection::const_iterator, RPCRecHitCollection::const_iterator> rangeRecHits;
402 rangeRecHits recHitCollection = rpcHits->get(rollasociated->
id());
405 for (recHit = recHitCollection.first; recHit != recHitCollection.second ; recHit++) {
412 float res=PointExtrapolatedRPCFrame.
x()- recHitPos.
x();
413 if(
debug)
std::cout<<
"DT \t \t \t \t \t Found Rec Hit at "<<res<<
"cm of the prediction."<<std::endl;
414 if(fabs(res)<fabs(minres)){
416 cluSize = recHit->clusterSize();
417 if(
debug)
std::cout<<
"DT \t \t \t \t \t \t New Min Res "<<res<<
"cm."<<std::endl;
422 if(
debug)
std::cout <<
"DT \t \t \t \t \t THIS ROLL DOESN'T HAVE ANY RECHIT"<<std::endl;
424 assert(minres!=3000);
426 if(fabs(minres)<=(
rangestrips+cluSize*0.5)*stripw){
455 meIdRPC<<
"RPCDataOccupancyFromDT_"<<rollId.
rawId();
456 meMap[meIdRPC.str()]->Fill(stripPredicted);
460 if(
debug)
std::cout<<
"DT \t \t \t \t No the prediction is outside of this roll"<<std::endl;
463 if(
debug)
std::cout<<
"DT \t \t \t No, Exrtrapolation too long!, canceled"<<std::endl;
468 if(
debug)
std::cout<<
"DT \t \t More than one segment in this chamber, or we are in Station 4"<<std::endl;
472 if(
debug)
std::cout<<
"DT This Event doesn't have any DT4DDSegment"<<std::endl;
481 if(all4DSegments.
isValid() && all4DSegments->size()>0){
483 std::map<DTChamberId,int> DTSegmentCounter;
486 for (segment = all4DSegments->begin();segment!=all4DSegments->end(); ++segment){
487 DTSegmentCounter[segment->chamberId()]++;
490 if(
debug)
std::cout<<
"MB4 \t \t Loop Over all4DSegments"<<std::endl;
491 for (segment = all4DSegments->begin(); segment != all4DSegments->end(); ++segment){
495 if(DTSegmentCounter[DTId] == 1 && DTId.
station()==4){
496 int dtWheel = DTId.
wheel();
497 int dtStation = DTId.
station();
498 int dtSector = DTId.
sector();
500 LocalPoint segmentPosition= segment->localPosition();
501 LocalVector segmentDirection=segment->localDirection();
505 if(segment->dimension()==2){
507 LocalPoint segmentPositionMB4=segmentPosition;
509 bool compatiblesegments=
false;
511 const BoundPlane& DTSurface4 = dtGeo->idToDet(DTId)->surface();
515 for(segMB3=all4DSegments->begin();segMB3!=all4DSegments->end();++segMB3){
522 && DTSegmentCounter[dtid3] == 1
523 && segMB3->dimension()==4){
525 const GeomDet* gdet3=dtGeo->idToDet(segMB3->geographicalId());
528 LocalVector segmentDirectionMB3 = segMB3->localDirection();
537 float dx=segDirMB4inGlobalFrame.
x();
538 float dy=segDirMB4inGlobalFrame.
y();
541 float dx3=segDirMB3inGlobalFrame.
x();
542 float dy3=segDirMB3inGlobalFrame.
y();
545 double cosAng=fabs(dx*dx3+dy*dy3/
sqrt((dx3*dx3+dy3*dy3)*(dx*dx+dy*dy)));
548 compatiblesegments=
true;
558 assert(rollsForThisDT.size()>=1);
560 for (std::set<RPCDetId>::iterator iteraRoll=rollsForThisDT.begin();iteraRoll != rollsForThisDT.end(); iteraRoll++){
561 const RPCRoll* rollasociated = rpcGeo->roll(*iteraRoll);
570 LocalPoint segmentPositionMB3inMB4Frame = DTSurface4.
toLocal(segmentPositionMB3inGlobal);
571 LocalPoint segmentPositionMB3inRB4Frame = RPCSurfaceRB4.
toLocal(segmentPositionMB3inGlobal);
572 LocalVector segmentDirectionMB3inMB4Frame = DTSurface4.
toLocal(segDirMB3inGlobalFrame);
575 float Dxz=CenterRollinMB4Frame.
z();
576 float Xo4=segmentPositionMB4.
x();
577 float dxl=segmentDirectionMB4.
x();
578 float dzl=segmentDirectionMB4.
z();
580 float X=Xo4+dxl*Dxz/dzl;
584 float Yo34=segmentPositionMB3inMB4Frame.
y();
585 float dy34 = segmentDirectionMB3inMB4Frame.
y();
586 float dz34 = segmentDirectionMB3inMB4Frame.
z();
587 float Dy=Dxz-(segmentPositionMB3inMB4Frame.
z());
589 float Y=Yo34+dy34*Dy/dz34;
595 float rsize = fabs( xmax.
x()-xmin.
x() );
597 float stripw = top_->
pitch();
599 float extrapolatedDistance =
sqrt((Y-Yo34)*(Y-Yo34)+Dy*Dy);
601 if(extrapolatedDistance<=
MaxDrb4){
604 LocalPoint PointExtrapolatedRPCFrame = RPCSurfaceRB4.
toLocal(GlobalPointExtrapolated);
606 if(fabs(PointExtrapolatedRPCFrame.
z()) < 5. &&
607 fabs(PointExtrapolatedRPCFrame.
x()) < rsize*0.5 &&
608 fabs(PointExtrapolatedRPCFrame.
y()) < stripl*0.5){
615 const float stripPredicted=
616 rollasociated->
strip(
LocalPoint(PointExtrapolatedRPCFrame.
x(),PointExtrapolatedRPCFrame.
y(),0.));
618 if(
debug)
std::cout<<
"MB4 \t \t \t \t Candidate (from DT Segment) STRIP---> "<<stripPredicted<< std::endl;
624 meIdDT<<
"ExpectedOccupancyFromDT_"<<rollId.
rawId();
625 meMap[meIdDT.str()]->Fill(stripPredicted);
630 int countRecHits = 0;
632 float minres = 3000.;
634 if(
debug)
std::cout<<
"MB4 \t \t \t \t Getting RecHits in Roll Asociated"<<std::endl;
635 typedef std::pair<RPCRecHitCollection::const_iterator, RPCRecHitCollection::const_iterator> rangeRecHits;
636 rangeRecHits recHitCollection = rpcHits->get(rollasociated->
id());
639 for (recHit = recHitCollection.first; recHit != recHitCollection.second ; recHit++) {
642 float res=PointExtrapolatedRPCFrame.
x()- recHitPos.
x();
643 if(
debug)
std::cout<<
"DT \t \t \t \t \t Found Rec Hit at "<<res<<
"cm of the prediction."<<std::endl;
644 if(fabs(res)<fabs(minres)){
646 cluSize = recHit->clusterSize();
651 if(
debug)
std::cout <<
"MB4 \t \t \t \t \t \t THIS ROLL DOESN'T HAVE ANY RECHIT"<<std::endl;
653 assert(minres!=3000);
655 if(fabs(minres)<=(
rangestrips+cluSize*0.5)*stripw){
662 meIdRPC<<
"RPCDataOccupancyFromDT_"<<rollId.
rawId();
663 meMap[meIdRPC.str()]->Fill(stripPredicted);
667 if(
debug)
std::cout<<
"MB4 \t \t \t \t No the prediction is outside of this roll"<<std::endl;
671 if(
debug)
std::cout<<
"MB4 \t \t \t No, Exrtrapolation too long!, canceled"<<std::endl;
675 compatiblesegments=
false;
676 if(
debug)
std::cout<<
"MB4 \t \t \t \t I found segments in MB4 and MB3 adjacent or same wheel and sector but not compatibles Diferent Directions"<<std::endl;
679 if(
debug)
std::cout<<
"MB4 \t \t \t No the same station or same wheel or segment dim in mb3 not 4D"<<std::endl;
683 if(
debug)
std::cout<<
"MB4 \t \t \t Is NOT a 2D Segment"<<std::endl;
686 if(
debug)
std::cout<<
"MB4 \t \t \t \t There is not just one segment or is not in station 4"<<std::endl;
690 if(
debug)
std::cout<<
"MB4 \t This event doesn't have 4D Segment"<<std::endl;
703 if(allCSCSegments->size()>0){
706 if(
debug)
std::cout<<
"CSC \t Number of CSC Segments in this event = "<<allCSCSegments->size()<<std::endl;
708 std::map<CSCDetId,int> CSCSegmentsCounter;
711 int segmentsInThisEventInTheEndcap=0;
713 for (segment = allCSCSegments->begin();segment!=allCSCSegments->end(); ++segment){
714 CSCSegmentsCounter[segment->cscDetId()]++;
715 segmentsInThisEventInTheEndcap++;
720 if(
debug)
std::cout<<
"CSC \t loop over all the CSCSegments "<<std::endl;
721 for (segment = allCSCSegments->begin();segment!=allCSCSegments->end(); ++segment){
722 CSCDetId CSCId = segment->cscDetId();
724 if(CSCSegmentsCounter[CSCId]==1 && CSCId.
station()!=4 && CSCId.
ring()!=1 && allCSCSegments->size()>=2){
726 int cscEndCap = CSCId.
endcap();
727 int cscStation = CSCId.
station();
728 int cscRing = CSCId.
ring();
730 int rpcRegion = 1;
if(cscEndCap==2) rpcRegion= -1;
731 int rpcRing = cscRing;
732 if(cscRing==4)rpcRing =1;
733 int rpcStation = cscStation;
734 int rpcSegment = CSCId.
chamber();
736 LocalPoint segmentPosition= segment->localPosition();
737 LocalVector segmentDirection=segment->localDirection();
738 float dz=segmentDirection.
z();
740 if(
debug)
std::cout<<
"CSC \t \t Is a good Segment? dim = 4, 4 <= nRecHits <= 10 Incident angle int range 45 < "<<acos(dz)*180/3.1415926<<
" < 135? "<<std::endl;
742 if(segment->dimension()==4 && (segment->nRecHits()<=10 && segment->nRecHits()>=4)&& acos(dz)*180/3.1415926 > 45. && acos(dz)*180/3.1415926 < 160. ){
744 float Xo=segmentPosition.
x();
745 float Yo=segmentPosition.
y();
746 float Zo=segmentPosition.
z();
747 float dx=segmentDirection.
x();
748 float dy=segmentDirection.
y();
749 float dz=segmentDirection.
z();
752 if(
debug)
std::cout<<
"CSC \t \t Getting chamber from Geometry"<<std::endl;
753 const CSCChamber* TheChamber=cscGeo->chamber(CSCId);
754 if(
debug)
std::cout<<
"CSC \t \t Getting ID from Chamber"<<std::endl;
756 if(
debug)
std::cout<<
"CSC \t \t Printing The Id"<<TheId<<std::endl;
758 if(
debug)
std::cout<<
"CSC \t \t Number of rolls for this CSC = "<<rollsForThisCSC.size()<<std::endl;
760 if(rpcRing!=1&&rpcStation!=4){
763 for (std::set<RPCDetId>::iterator iteraRoll = rollsForThisCSC.begin();iteraRoll != rollsForThisCSC.end(); iteraRoll++){
765 const RPCRoll* rollasociated = rpcGeo->roll(*iteraRoll);
775 float D=CenterRollinCSCFrame.
z();
783 if(
debug)
std::cout<<
"CSC \t \t \t xmin of this Roll "<<xmin<<
"cm"<<std::endl;
785 if(
debug)
std::cout<<
"CSC \t \t \t xmax of this Roll "<<xmax<<
"cm"<<std::endl;
786 float rsize = fabs( xmax.
x()-xmin.
x() );
787 if(
debug)
std::cout<<
"CSC \t \t \t Roll Size "<<rsize<<
"cm"<<std::endl;
789 float stripw = top_->
pitch();
792 float extrapolatedDistance =
sqrt((X-Xo)*(X-Xo)+(Y-Yo)*(Y-Yo)+(Z-Zo)*(Z-Zo));
795 if(extrapolatedDistance<=
MaxD){
798 LocalPoint PointExtrapolatedRPCFrame = RPCSurface.
toLocal(GlobalPointExtrapolated);
801 if(fabs(PointExtrapolatedRPCFrame.
z()) < 10. &&
802 fabs(PointExtrapolatedRPCFrame.
x()) < rsize*0.5 &&
803 fabs(PointExtrapolatedRPCFrame.
y()) < stripl*0.5){
807 std::string nameRoll = rpcsrv.
name();
809 if(
debug)
std::cout<<
"CSC \t \t \t \t The RPCName is "<<nameRoll<<std::endl;
811 const float stripPredicted =
812 rollasociated->
strip(
LocalPoint(PointExtrapolatedRPCFrame.
x(),PointExtrapolatedRPCFrame.
y(),0.));
814 if(
debug)
std::cout<<
"CSC \t \t \t \t \t Candidate"<<rollId<<
" "<<
"(from CSC Segment) STRIP---> "<<stripPredicted<< std::endl;
819 meIdCSC<<
"ExpectedOccupancyFromCSC_"<<rollId.
rawId();
820 meMap[meIdCSC.str()]->Fill(stripPredicted);
826 int countRecHits = 0;
827 float minres = 3000.;
829 if(
debug)
std::cout<<
"CSC \t \t \t \t \t Getting RecHits in Roll Asociated"<<std::endl;
830 typedef std::pair<RPCRecHitCollection::const_iterator, RPCRecHitCollection::const_iterator> rangeRecHits;
831 rangeRecHits recHitCollection = rpcHits->get(rollasociated->
id());
834 for (recHit = recHitCollection.first; recHit != recHitCollection.second ; recHit++) {
838 float res=PointExtrapolatedRPCFrame.
x()- recHitPos.
x();
839 if(
debug)
std::cout<<
"CSC \t \t \t \t \t \t Found Rec Hit at "<<res<<
"cm of the prediction."<<std::endl;
840 if(fabs(res)<fabs(minres)){
842 cluSize = recHit->clusterSize();
843 if(
debug)
std::cout<<
"CSC \t \t \t \t \t \t \t New Min Res "<<res<<
"cm."<<std::endl;
848 if(
debug)
std::cout <<
"CSC \t \t \t \t \t THIS ROLL DOESN'T HAVE ANY RECHIT"<<std::endl;
850 assert(minres!=3000);
852 if(fabs(minres)<=(
rangestrips+cluSize*0.5)*stripw){
855 if(rollId.
ring()==2&&rollId.
roll()==1){
860 else if(rollId.
ring()==2&&rollId.
roll()==2){
865 else if(rollId.
ring()==2&&rollId.
roll()==3){
870 else if(rollId.
ring()==3&&rollId.
roll()==1){
875 else if(rollId.
ring()==3&&rollId.
roll()==2){
883 meIdRPC<<
"RPCDataOccupancyFromCSC_"<<rollId.
rawId();
884 meMap[meIdRPC.str()]->Fill(stripPredicted);
889 if(
debug)
std::cout<<
"CSC \t \t \t \t No the prediction is outside of this roll"<<std::endl;
892 if(
debug)
std::cout<<
"CSC \t \t \t No, Exrtrapolation too long!, canceled"<<std::endl;
898 if(
debug)
std::cout<<
"CSC \t \t More than one segment in this chamber, or we are in Station Ring 1 or in Station 4"<<std::endl;
902 if(
debug)
std::cout<<
"CSC This Event doesn't have any CSCSegment"<<std::endl;
const double Z[kNumberCalorimeter]
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
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 &)
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.
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
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.
virtual float pitch() const
std::map< int, std::map< std::string, MonitorElement * > > meCollection
virtual float pitch() const
edm::InputTag dt4DSegments
uint32_t rawId() const
get the raw id
C::const_iterator const_iterator
constant access iterator type
std::string EffRootFileName
virtual std::string name()
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)
LocalPoint toLocal(const GlobalPoint &gp) const
MonitorElement * hGlobalResClu3R2A
const std::vector< const RPCRoll * > & rolls() const
Return the Rolls.
MonitorElement * hGlobalResClu1R3B
MonitorElement * hGlobalResClu1R2C
MonitorElement * hGlobalResClu2R3C
MonitorElement * hGlobalResClu3R3A
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::map< CSCStationIndex, std::set< RPCDetId > > rollstoreCSC
MonitorElement * statistics
std::map< DTStationIndex, std::set< RPCDetId > > rollstoreDT
MonitorElement * hGlobalResClu2R2A
edm::InputTag cscSegments
MonitorElement * hGlobalResClu2R3A
edm::InputTag RPCRecHitLabel_
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 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 void beginRun(const edm::Run &, const edm::EventSetup &)
virtual float stripLength() const
det heigth (strip length in the middle)
DecomposeProduct< arg, typename Div::arg > D
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
MonitorElement * hGlobalResClu3R2B
MonitorElement * hGlobalResClu2R3B
MonitorElement * hGlobalResClu1R2B
MonitorElement * hGlobalResClu2R2C
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.