37 if(sector1==13) sector1=4;
38 if(sector1==14) sector1=10;
40 if(sector2==13) sector2=4;
41 if(sector2==14) sector2=10;
43 int distance =
abs(sector1 - sector2);
44 if(distance>6) distance = 12-distance;
76 std::string folder = folderPath+
"MuonSegEff";
77 dbe->setCurrentFolder(folder);
78 statistics = dbe->book1D(
"Statistics",
"All Statistics",33,0.5,33.5);
80 if(debug)
std::cout<<
"booking Global histograms with "<<folderPath<<std::endl;
82 folder = folderPath+
"MuonSegEff/"+
"Residuals/Barrel";
83 dbe->setCurrentFolder(folder);
86 hGlobalResClu1La1 = dbe->book1D(
"GlobalResidualsClu1La1",
"RPC Residuals Layer 1 Cluster Size 1",101,-10.,10.);
87 hGlobalResClu1La2 = dbe->book1D(
"GlobalResidualsClu1La2",
"RPC Residuals Layer 2 Cluster Size 1",101,-10.,10.);
88 hGlobalResClu1La3 = dbe->book1D(
"GlobalResidualsClu1La3",
"RPC Residuals Layer 3 Cluster Size 1",101,-10.,10.);
89 hGlobalResClu1La4 = dbe->book1D(
"GlobalResidualsClu1La4",
"RPC Residuals Layer 4 Cluster Size 1",101,-10.,10.);
90 hGlobalResClu1La5 = dbe->book1D(
"GlobalResidualsClu1La5",
"RPC Residuals Layer 5 Cluster Size 1",101,-10.,10.);
91 hGlobalResClu1La6 = dbe->book1D(
"GlobalResidualsClu1La6",
"RPC Residuals Layer 6 Cluster Size 1",101,-10.,10.);
93 hGlobalResClu2La1 = dbe->book1D(
"GlobalResidualsClu2La1",
"RPC Residuals Layer 1 Cluster Size 2",101,-10.,10.);
94 hGlobalResClu2La2 = dbe->book1D(
"GlobalResidualsClu2La2",
"RPC Residuals Layer 2 Cluster Size 2",101,-10.,10.);
95 hGlobalResClu2La3 = dbe->book1D(
"GlobalResidualsClu2La3",
"RPC Residuals Layer 3 Cluster Size 2",101,-10.,10.);
96 hGlobalResClu2La4 = dbe->book1D(
"GlobalResidualsClu2La4",
"RPC Residuals Layer 4 Cluster Size 2",101,-10.,10.);
97 hGlobalResClu2La5 = dbe->book1D(
"GlobalResidualsClu2La5",
"RPC Residuals Layer 5 Cluster Size 2",101,-10.,10.);
98 hGlobalResClu2La6 = dbe->book1D(
"GlobalResidualsClu2La6",
"RPC Residuals Layer 6 Cluster Size 2",101,-10.,10.);
100 hGlobalResClu3La1 = dbe->book1D(
"GlobalResidualsClu3La1",
"RPC Residuals Layer 1 Cluster Size 3",101,-10.,10.);
101 hGlobalResClu3La2 = dbe->book1D(
"GlobalResidualsClu3La2",
"RPC Residuals Layer 2 Cluster Size 3",101,-10.,10.);
102 hGlobalResClu3La3 = dbe->book1D(
"GlobalResidualsClu3La3",
"RPC Residuals Layer 3 Cluster Size 3",101,-10.,10.);
103 hGlobalResClu3La4 = dbe->book1D(
"GlobalResidualsClu3La4",
"RPC Residuals Layer 4 Cluster Size 3",101,-10.,10.);
104 hGlobalResClu3La5 = dbe->book1D(
"GlobalResidualsClu3La5",
"RPC Residuals Layer 5 Cluster Size 3",101,-10.,10.);
105 hGlobalResClu3La6 = dbe->book1D(
"GlobalResidualsClu3La6",
"RPC Residuals Layer 6 Cluster Size 3",101,-10.,10.);
107 if(debug)
std::cout<<
"Booking Residuals for EndCap"<<std::endl;
108 folder = folderPath+
"MuonSegEff/Residuals/EndCap";
109 dbe->setCurrentFolder(folder);
112 hGlobalResClu1R3C = dbe->book1D(
"GlobalResidualsClu1R3C",
"RPC Residuals Ring 3 Roll C Cluster Size 1",101,-10.,10.);
113 hGlobalResClu1R3B = dbe->book1D(
"GlobalResidualsClu1R3B",
"RPC Residuals Ring 3 Roll B Cluster Size 1",101,-10.,10.);
114 hGlobalResClu1R3A = dbe->book1D(
"GlobalResidualsClu1R3A",
"RPC Residuals Ring 3 Roll A Cluster Size 1",101,-10.,10.);
115 hGlobalResClu1R2C = dbe->book1D(
"GlobalResidualsClu1R2C",
"RPC Residuals Ring 2 Roll C Cluster Size 1",101,-10.,10.);
116 hGlobalResClu1R2B = dbe->book1D(
"GlobalResidualsClu1R2B",
"RPC Residuals Ring 2 Roll B Cluster Size 1",101,-10.,10.);
117 hGlobalResClu1R2A = dbe->book1D(
"GlobalResidualsClu1R2A",
"RPC Residuals Ring 2 Roll A Cluster Size 1",101,-10.,10.);
119 hGlobalResClu2R3C = dbe->book1D(
"GlobalResidualsClu2R3C",
"RPC Residuals Ring 3 Roll C Cluster Size 2",101,-10.,10.);
120 hGlobalResClu2R3B = dbe->book1D(
"GlobalResidualsClu2R3B",
"RPC Residuals Ring 3 Roll B Cluster Size 2",101,-10.,10.);
121 hGlobalResClu2R3A = dbe->book1D(
"GlobalResidualsClu2R3A",
"RPC Residuals Ring 3 Roll A Cluster Size 2",101,-10.,10.);
122 hGlobalResClu2R2C = dbe->book1D(
"GlobalResidualsClu2R2C",
"RPC Residuals Ring 2 Roll C Cluster Size 2",101,-10.,10.);
123 hGlobalResClu2R2B = dbe->book1D(
"GlobalResidualsClu2R2B",
"RPC Residuals Ring 2 Roll B Cluster Size 2",101,-10.,10.);
124 hGlobalResClu2R2A = dbe->book1D(
"GlobalResidualsClu2R2A",
"RPC Residuals Ring 2 Roll A Cluster Size 2",101,-10.,10.);
126 hGlobalResClu3R3C = dbe->book1D(
"GlobalResidualsClu3R3C",
"RPC Residuals Ring 3 Roll C Cluster Size 3",101,-10.,10.);
127 hGlobalResClu3R3B = dbe->book1D(
"GlobalResidualsClu3R3B",
"RPC Residuals Ring 3 Roll B Cluster Size 3",101,-10.,10.);
128 hGlobalResClu3R3A = dbe->book1D(
"GlobalResidualsClu3R3A",
"RPC Residuals Ring 3 Roll A Cluster Size 3",101,-10.,10.);
129 hGlobalResClu3R2C = dbe->book1D(
"GlobalResidualsClu3R2C",
"RPC Residuals Ring 2 Roll C Cluster Size 3",101,-10.,10.);
130 hGlobalResClu3R2B = dbe->book1D(
"GlobalResidualsClu3R2B",
"RPC Residuals Ring 2 Roll B Cluster Size 3",101,-10.,10.);
131 hGlobalResClu3R2A = dbe->book1D(
"GlobalResidualsClu3R2A",
"RPC Residuals Ring 2 Roll A Cluster Size 3",101,-10.,10.);
134 if(debug)
ofrej.open(
"rejected.txt");
136 if(debug)
std::cout<<
"Rejected done"<<std::endl;
146 for (TrackingGeometry::DetContainer::const_iterator it=
rpcGeo->dets().begin();it<
rpcGeo->dets().end();it++){
147 if(dynamic_cast< RPCChamber* >( *it ) != 0 ){
149 std::vector< const RPCRoll*> roles = (ch->
rolls());
150 for(std::vector<const RPCRoll*>::const_iterator
r = roles.begin();
r != roles.end(); ++
r){
152 int region=rpcId.
region();
155 std::string nameRoll = rpcsrv.
name();
161 int wheel=rpcId.
ring();
162 int sector=rpcId.
sector();
165 std::set<RPCDetId> myrolls;
167 myrolls.insert(rpcId);
172 int region=rpcId.
region();
178 int rpcsegment = rpcsrv.
segment();
179 int cscchamber = rpcsegment;
180 if((station==2||station==3)&&ring==3){
185 std::set<RPCDetId> myrolls;
189 myrolls.insert(rpcId);
195 for (TrackingGeometry::DetContainer::const_iterator it=
rpcGeo->dets().begin();it<
rpcGeo->dets().end();it++){
196 if( dynamic_cast< 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();
233 int region=rpcId.
region();
238 if((station==2||station==3)&&ring==3) cscring = 2;
243 int rpcsegment = rpcsrv.
segment();
246 int cscchamber = rpcsegment+1;
247 if(cscchamber==37)cscchamber=1;
249 std::set<RPCDetId> myrolls;
251 myrolls.insert(rpcId);
254 cscchamber = rpcsegment-1;
255 if(cscchamber==0)cscchamber=36;
257 std::set<RPCDetId> myrollsDos;
259 myrollsDos.insert(rpcId);
294 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(
debug)
std::cout<<
"DT \t \t This Segment is in Chamber id: "<<DTId<<std::endl;
315 if(
debug)
std::cout<<
"DT \t \t Number of segments in this DT = "<<DTSegmentCounter[DTId]<<std::endl;
316 if(
debug)
std::cout<<
"DT \t \t Is the only one in this DT? and is not in the 4th Station?"<<std::endl;
319 if(DTSegmentCounter[DTId]==1 && DTId.
station()!=4){
321 int dtWheel = DTId.
wheel();
322 int dtStation = DTId.
station();
323 int dtSector = DTId.
sector();
325 LocalPoint segmentPosition= segment->localPosition();
326 LocalVector segmentDirection=segment->localDirection();
328 const GeomDet* gdet=
dtGeo->idToDet(segment->geographicalId());
335 if(segment->dimension()==4){
338 if(
debug)
std::cout<<
"DT \t \t DT Segment Dimension "<<segment->dimension()<<std::endl;
340 float Xo=segmentPosition.
x();
341 float Yo=segmentPosition.
y();
342 float Zo=segmentPosition.
z();
343 float dx=segmentDirection.
x();
344 float dy=segmentDirection.
y();
345 float dz=segmentDirection.
z();
349 if(
debug)
std::cout<<
"DT \t \t Number of rolls for this DT = "<<rollsForThisDT.size()<<std::endl;
351 assert(rollsForThisDT.size()>=1);
353 if(
debug)
std::cout<<
"DT \t \t Loop over all the rolls asociated to this DT"<<std::endl;
354 for (std::set<RPCDetId>::iterator iteraRoll = rollsForThisDT.begin();iteraRoll != rollsForThisDT.end(); iteraRoll++){
360 std::string nameRoll = rpcsrv.
name();
362 if(
debug)
std::cout<<
"DT \t \t \t RollName: "<<nameRoll<<std::endl;
363 if(
debug)
std::cout<<
"DT \t \t \t Doing the extrapolation to this roll"<<std::endl;
364 if(
debug)
std::cout<<
"DT \t \t \t DT Segment Direction in DTLocal "<<segmentDirection<<std::endl;
365 if(
debug)
std::cout<<
"DT \t \t \t DT Segment Point in DTLocal "<<segmentPosition<<std::endl;
371 if(
debug)
std::cout<<
"DT \t \t \t Center (0,0,0) Roll In DTLocal"<<CenterRollinDTFrame<<std::endl;
372 if(
debug)
std::cout<<
"DT \t \t \t Center (0,0,0) of the Roll in Global"<<CenterPointRollGlobal<<std::endl;
374 float D=CenterRollinDTFrame.
z();
382 if(
debug)
std::cout<<
"DT \t \t \t xmin of this Roll "<<xmin<<
"cm"<<std::endl;
384 if(
debug)
std::cout<<
"DT \t \t \t xmax of this Roll "<<xmax<<
"cm"<<std::endl;
385 float rsize = fabs( xmax.
x()-xmin.
x() );
386 if(
debug)
std::cout<<
"DT \t \t \t Roll Size "<<rsize<<
"cm"<<std::endl;
388 float stripw = top_->
pitch();
390 if(
debug)
std::cout<<
"DT \t \t \t Strip Lenght "<<stripl<<
"cm"<<std::endl;
391 if(
debug)
std::cout<<
"DT \t \t \t Strip Width "<<stripw<<
"cm"<<std::endl;
392 if(
debug)
std::cout<<
"DT \t \t \t X Predicted in DTLocal= "<<X<<
"cm"<<std::endl;
393 if(
debug)
std::cout<<
"DT \t \t \t Y Predicted in DTLocal= "<<Y<<
"cm"<<std::endl;
394 if(
debug)
std::cout<<
"DT \t \t \t Z Predicted in DTLocal= "<<Z<<
"cm"<<std::endl;
396 float extrapolatedDistance =
sqrt((X-Xo)*(X-Xo)+(Y-Yo)*(Y-Yo)+(Z-Zo)*(Z-Zo));
398 if(
debug)
std::cout<<
"DT \t \t \t Is the distance of extrapolation less than MaxD? ="<<extrapolatedDistance<<
"cm"<<
"MaxD="<<
MaxD<<
"cm"<<std::endl;
400 if(extrapolatedDistance<=
MaxD){
403 if(
debug)
std::cout<<
"DT \t \t \t Point ExtraPolated in Global"<<GlobalPointExtrapolated<< std::endl;
404 LocalPoint PointExtrapolatedRPCFrame = RPCSurface.
toLocal(GlobalPointExtrapolated);
406 if(
debug)
std::cout<<
"DT \t \t \t Point Extrapolated in RPCLocal"<<PointExtrapolatedRPCFrame<< std::endl;
407 if(
debug)
std::cout<<
"DT \t \t \t Corner of the Roll = ("<<rsize*0.5<<
","<<stripl*0.5<<
")"<<std::endl;
408 if(
debug)
std::cout<<
"DT \t \t \t Info About the Point Extrapolated in X Abs ("<<fabs(PointExtrapolatedRPCFrame.
x())<<
","
409 <<fabs(PointExtrapolatedRPCFrame.
y())<<
","<<fabs(PointExtrapolatedRPCFrame.
z())<<
")"<<std::endl;
410 if(
debug)
std::cout<<
"DT \t \t \t Does the extrapolation go inside this roll?"<<std::endl;
412 if(fabs(PointExtrapolatedRPCFrame.
z()) < 10. &&
413 fabs(PointExtrapolatedRPCFrame.
x()) < rsize*0.5 &&
414 fabs(PointExtrapolatedRPCFrame.
y()) < stripl*0.5){
421 std::string nameRoll = rpcsrv.
name();
422 if(
debug)
std::cout<<
"DT \t \t \t \t The RPCName is "<<nameRoll<<std::endl;
423 const float stripPredicted =
424 rollasociated->
strip(
LocalPoint(PointExtrapolatedRPCFrame.
x(),PointExtrapolatedRPCFrame.
y(),0.));
426 if(
debug)
std::cout<<
"DT \t \t \t \t Candidate (from DT Segment) STRIP---> "<<stripPredicted<< std::endl;
431 sprintf(meIdDT,
"ExpectedOccupancyFromDT_%d",rollId.
rawId());
432 if(
debug)
std::cout<<
"DT \t \t \t \t Filling Expected for "<<meIdDT<<
" with "<<stripPredicted<<std::endl;
433 if(fabs(stripPredicted-rollasociated->
nstrips())<1.)
if(
debug)
std::cout<<
"DT \t \t \t \t Extrapolating near last strip, Event"<<iEvent.
id()<<
" stripPredicted="<<stripPredicted<<
" Number of strips="<<rollasociated->
nstrips()<<std::endl;
434 if(fabs(stripPredicted)<1.)
if(
debug)
std::cout<<
"DT \t \t \t \t Extrapolating near first strip, Event"<<iEvent.
id()<<
" stripPredicted="<<stripPredicted<<
" Number of strips="<<rollasociated->
nstrips()<<std::endl;
435 meMap[meIdDT]->Fill(stripPredicted);
440 int countRecHits = 0;
442 float minres = 3000.;
444 if(
debug)
std::cout<<
"DT \t \t \t \t Getting RecHits in Roll Asociated"<<std::endl;
445 typedef std::pair<RPCRecHitCollection::const_iterator, RPCRecHitCollection::const_iterator> rangeRecHits;
446 rangeRecHits recHitCollection = rpcHits->get(rollasociated->
id());
449 for (recHit = recHitCollection.first; recHit != recHitCollection.second ; recHit++) {
452 sprintf(meIdRPC,
"BXDistribution_%d",rollasociated->
id().
rawId());
453 meMap[meIdRPC]->Fill(recHit->BunchX());
456 float res=PointExtrapolatedRPCFrame.
x()- recHitPos.
x();
457 if(
debug)
std::cout<<
"DT \t \t \t \t \t Found Rec Hit at "<<res<<
"cm of the prediction."<<std::endl;
458 if(fabs(res)<fabs(minres)){
460 cluSize = recHit->clusterSize();
461 if(
debug)
std::cout<<
"DT \t \t \t \t \t \t New Min Res "<<res<<
"cm."<<std::endl;
465 bool anycoincidence=
false;
468 if(
debug)
std::cout <<
"DT \t \t \t \t \t THIS ROLL DOESN'T HAVE ANY RECHIT"<<std::endl;
470 assert(minres!=3000);
472 if(
debug)
std::cout<<
"DT \t \t \t \t \t PointExtrapolatedRPCFrame.x="<<PointExtrapolatedRPCFrame.
x()<<
" Minimal Residual="<<minres<<std::endl;
473 if(
debug)
std::cout<<
"DT \t \t \t \t \t Minimal Residual less than stripw*rangestrips? minres="<<minres<<
" range="<<
rangestrips<<
" stripw="<<stripw<<
" cluSize"<<cluSize<<
" <=compare minres with"<<(
rangestrips+cluSize*0.5)*stripw<<std::endl;
474 if(fabs(minres)<=(
rangestrips+cluSize*0.5)*stripw){
480 if(
debug)
std::cout<<
"DT \t \t \t \t \t At least one RecHit inside the range, Predicted="<<stripPredicted<<
" minres="<<minres<<
"cm range="<<
rangestrips<<
"strips stripw="<<stripw<<
"cm"<<std::endl;
481 if(
debug)
std::cout<<
"DT \t \t \t \t \t Norm of Cosine Directors="<<dx*dx+dy*dy+dz*dz<<
"~1?"<<std::endl;
483 float cosal = dx/
sqrt(dx*dx+dz*dz);
484 if(
debug)
std::cout<<
"DT \t \t \t \t \t Angle="<<acos(cosal)*180/3.1415926<<
" degree"<<std::endl;
485 if(
debug)
std::cout<<
"DT \t \t \t \t \t Filling the Residuals Histogram for globals with "<<minres<<
"And the angular incidence with Cos Alpha="<<cosal<<std::endl;
492 sprintf(meIdRPC,
"RPCDataOccupancyFromDT_%d",rollId.
rawId());
493 if(
debug)
std::cout<<
"DT \t \t \t \t \t COINCIDENCE!!! Event="<<iEvent.
id()<<
" Filling RPC Data Occupancy for "<<meIdRPC<<
" with "<<stripPredicted<<std::endl;
494 meMap[meIdRPC]->Fill(stripPredicted);
498 std::string nameRoll = rpcsrv.
name();
499 if(
debug)
std::cout<<
"DT \t \t \t \t \t A roll was ineficient in event "<<iEvent.
id().
event()<<std::endl;
501 <<
"\t St "<<dtStation
503 <<
"\t Roll "<<nameRoll
511 if(
debug)
std::cout<<
"DT \t \t \t \t No the prediction is outside of this roll"<<std::endl;
514 if(
debug)
std::cout<<
"DT \t \t \t No, Exrtrapolation too long!, canceled"<<std::endl;
519 if(
debug)
std::cout<<
"DT \t \t More than one segment in this chamber, or we are in Station 4"<<std::endl;
523 if(
debug)
std::cout<<
"DT This Event doesn't have any DT4DDSegment"<<std::endl;
529 if(
debug)
std::cout <<
"MB4 \t Getting ALL the DT Segments"<<std::endl;
536 if(all4DSegments->size()>0){
537 std::map<DTChamberId,int> DTSegmentCounter;
540 for (segment = all4DSegments->begin();segment!=all4DSegments->end(); ++segment){
541 DTSegmentCounter[segment->chamberId()]++;
544 if(
debug)
std::cout<<
"MB4 \t \t Loop Over all4DSegments"<<std::endl;
545 for (segment = all4DSegments->begin(); segment != all4DSegments->end(); ++segment){
549 if(
debug)
std::cout<<
"MB4 \t \t This Segment is in Chamber id: "<<DTId<<std::endl;
550 if(
debug)
std::cout<<
"MB4 \t \t Number of segments in this DT = "<<DTSegmentCounter[DTId]<<std::endl;
551 if(
debug)
std::cout<<
"MB4 \t \t \t Is the only one in this DT? and is in the Station 4?"<<std::endl;
553 if(DTSegmentCounter[DTId] == 1 && DTId.
station()==4){
556 int dtWheel = DTId.
wheel();
557 int dtStation = DTId.
station();
558 int dtSector = DTId.
sector();
560 LocalPoint segmentPosition= segment->localPosition();
561 LocalVector segmentDirection=segment->localDirection();
566 if(
debug)
std::cout<<
"MB4 \t \t \t \t The Segment in MB4 is 2D?"<<std::endl;
567 if(segment->dimension()==2){
570 LocalPoint segmentPositionMB4=segmentPosition;
572 bool compatiblesegments=
false;
578 if(
debug)
std::cout<<
"MB4 \t \t \t \t Loop on segments in =sector && MB3 && adjacent sectors && y dim=4"<<std::endl;
579 for(segMB3=all4DSegments->begin();segMB3!=all4DSegments->end();++segMB3){
586 && DTSegmentCounter[dtid3] == 1
587 && segMB3->dimension()==4){
591 const GeomDet* gdet3=
dtGeo->idToDet(segMB3->geographicalId());
592 const BoundPlane & DTSurface3 = gdet3->surface();
594 LocalVector segmentDirectionMB3 = segMB3->localDirection();
604 float dx=segDirMB4inGlobalFrame.
x();
605 float dy=segDirMB4inGlobalFrame.
y();
606 float dz=segDirMB4inGlobalFrame.
z();
608 float dx3=segDirMB3inGlobalFrame.
x();
609 float dy3=segDirMB3inGlobalFrame.
y();
610 float dz3=segDirMB3inGlobalFrame.
z();
612 double cosAng=fabs(dx*dx3+dy*dy3/
sqrt((dx3*dx3+dy3*dy3)*(dx*dx+dy*dy)));
614 if(
debug)
std::cout<<
"MB4 \t \t \t \t cosAng"<<cosAng<<
"Beetween "<<dtid3<<
" and "<<DTId<<std::endl;
623 compatiblesegments=
true;
633 if(
debug)
std::cout<<
"MB4 \t \t Number of rolls for this DT = "<<rollsForThisDT.size()<<std::endl;
635 assert(rollsForThisDT.size()>=1);
637 if(
debug)
std::cout<<
"MB4 \t \t Loop over all the rolls asociated to this DT"<<std::endl;
639 for (std::set<RPCDetId>::iterator iteraRoll=rollsForThisDT.begin();iteraRoll != rollsForThisDT.end(); iteraRoll++){
645 std::string nameRoll = rpcsrv.
name();
647 if(
debug)
std::cout<<
"MB4 \t \t \t RollName: "<<nameRoll<<std::endl;
648 if(
debug)
std::cout<<
"MB4 \t \t \t Doing the extrapolation to this roll"<<std::endl;
652 LocalPoint segmentPositionMB3inMB4Frame = DTSurface4.
toLocal(segmentPositionMB3inGlobal);
653 LocalPoint segmentPositionMB3inRB4Frame = RPCSurfaceRB4.
toLocal(segmentPositionMB3inGlobal);
654 LocalVector segmentDirectionMB3inMB4Frame = DTSurface4.
toLocal(segDirMB3inGlobalFrame);
657 float Dxz=CenterRollinMB4Frame.
z();
658 float Xo4=segmentPositionMB4.
x();
659 float dxl=segmentDirectionMB4.
x();
660 float dzl=segmentDirectionMB4.
z();
662 float X=Xo4+dxl*Dxz/dzl;
666 float Yo34=segmentPositionMB3inMB4Frame.
y();
667 float dy34 = segmentDirectionMB3inMB4Frame.
y();
668 float dz34 = segmentDirectionMB3inMB4Frame.
z();
669 float Dy=Dxz-(segmentPositionMB3inMB4Frame.
z());
671 if(
debug)
std::cout<<
"MB4 \t \t \t The distance to extrapolate in Y from MB3 is "<<Dy<<
"cm"<<std::endl;
673 float Y=Yo34+dy34*Dy/dz34;
679 float rsize = fabs( xmax.
x()-xmin.
x() );
681 float stripw = top_->
pitch();
684 if(
debug)
std::cout<<
"MB4 \t \t \t Strip Lenght "<<stripl<<
"cm"<<std::endl;
685 if(
debug)
std::cout<<
"MB4 \t \t \t Strip Width "<<stripw<<
"cm"<<std::endl;
687 if(
debug)
std::cout<<
"MB4 \t \t \t X Predicted in MB4DTLocal= "<<X<<
"cm"<<std::endl;
688 if(
debug)
std::cout<<
"MB4 \t \t \t Y Predicted in MB4DTLocal= "<<Y<<
"cm"<<std::endl;
689 if(
debug)
std::cout<<
"MB4 \t \t \t Z Predicted in MB4DTLocal= "<<Z<<
"cm"<<std::endl;
691 float extrapolatedDistance =
sqrt((Y-Yo34)*(Y-Yo34)+Dy*Dy);
693 if(
debug)
std::cout<<
"MB4 \t \t \t segmentPositionMB3inMB4Frame"<<segmentPositionMB3inMB4Frame<<std::endl;
694 if(
debug)
std::cout<<
"MB4 \t \t \t segmentPositionMB4inMB4Frame"<<segmentPosition<<std::endl;
696 if(
debug)
std::cout<<
"MB4 \t \t \t segmentDirMB3inMB4Frame"<<segDirMB3inMB4Frame<<std::endl;
697 if(
debug)
std::cout<<
"MB4 \t \t \t segmentDirMB4inMB4Frame"<<segmentDirectionMB4<<std::endl;
699 if(
debug)
std::cout<<
"MB4 \t \t \t CenterRB4PositioninMB4Frame"<<CenterRollinMB4Frame<<std::endl;
701 if(
debug)
std::cout<<
"MB4 \t \t \t Is the extrapolation distance ="<<extrapolatedDistance<<
"less than "<<
MaxDrb4<<std::endl;
704 if(extrapolatedDistance<=
MaxDrb4){
709 if(
debug)
std::cout<<
"MB4 \t \t \t Point ExtraPolated in Global"<<GlobalPointExtrapolated<< std::endl;
711 LocalPoint PointExtrapolatedRPCFrame = RPCSurfaceRB4.
toLocal(GlobalPointExtrapolated);
713 if(
debug)
std::cout<<
"MB4 \t \t \t Point Extrapolated in RPCLocal"<<PointExtrapolatedRPCFrame<< std::endl;
714 if(
debug)
std::cout<<
"MB4 \t \t \t Corner of the Roll = ("<<rsize*0.5<<
","<<stripl*0.5<<
")"<<std::endl;
715 if(
debug)
std::cout<<
"MB4 \t \t \t Info About the Point Extrapolated in X Abs ("<<fabs(PointExtrapolatedRPCFrame.
x())<<
","
716 <<fabs(PointExtrapolatedRPCFrame.
y())<<
","<<fabs(PointExtrapolatedRPCFrame.
z())<<
")"<<std::endl;
718 if(
debug)
std::cout<<
"MB4 \t \t \t Does the extrapolation go inside this roll?"<<std::endl;
720 if(fabs(PointExtrapolatedRPCFrame.
z()) < 5. &&
721 fabs(PointExtrapolatedRPCFrame.
x()) < rsize*0.5 &&
722 fabs(PointExtrapolatedRPCFrame.
y()) < stripl*0.5){
729 std::string nameRoll = rpcsrv.
name();
730 if(
debug)
std::cout<<
"MB4 \t \t \t \t \t The RPCName is "<<nameRoll<<std::endl;
731 const float stripPredicted=
732 rollasociated->
strip(
LocalPoint(PointExtrapolatedRPCFrame.
x(),PointExtrapolatedRPCFrame.
y(),0.));
734 if(
debug)
std::cout<<
"MB4 \t \t \t \t Candidate (from DT Segment) STRIP---> "<<stripPredicted<< std::endl;
739 if(
debug)
std::cout<<
"MB4 \t \t \t \t \t Filling Expected"<<std::endl;
740 sprintf(meIdDT,
"ExpectedOccupancyFromDT_%d",rollId.
rawId());
741 meMap[meIdDT]->Fill(stripPredicted);
746 int countRecHits = 0;
748 float minres = 3000.;
750 if(
debug)
std::cout<<
"MB4 \t \t \t \t Getting RecHits in Roll Asociated"<<std::endl;
751 typedef std::pair<RPCRecHitCollection::const_iterator, RPCRecHitCollection::const_iterator> rangeRecHits;
752 rangeRecHits recHitCollection = rpcHits->get(rollasociated->
id());
755 for (recHit = recHitCollection.first; recHit != recHitCollection.second ; recHit++) {
758 float res=PointExtrapolatedRPCFrame.
x()- recHitPos.
x();
759 if(
debug)
std::cout<<
"DT \t \t \t \t \t Found Rec Hit at "<<res<<
"cm of the prediction."<<std::endl;
760 if(fabs(res)<fabs(minres)){
762 cluSize = recHit->clusterSize();
766 bool anycoincidence=
false;
769 if(
debug)
std::cout <<
"MB4 \t \t \t \t \t \t THIS ROLL DOESN'T HAVE ANY RECHIT"<<std::endl;
771 assert(minres!=3000);
773 if(
debug)
std::cout<<
"MB4 \t \t \t \t \t \t PointExtrapolatedRPCFrame.x="<<PointExtrapolatedRPCFrame.
x()<<
" Minimal Residual ="<<minres<<std::endl;
774 if(
debug)
std::cout<<
"MB4 \t \t \t \t \t \t Minimal Residual less than stripw*rangestrips? minres="<<minres<<
" range="<<
rangestrips<<
" stripw="<<stripw<<
" cluSize"<<cluSize<<
" <=compare minres with"<<(
rangestrips+cluSize*0.5)*stripw<<std::endl;
775 if(fabs(minres)<=(
rangestrips+cluSize*0.5)*stripw){
781 if(
debug)
std::cout<<
"MB4 \t \t \t \t \t At least one RecHit inside the range, Predicted="<<stripPredicted<<
" minres="<<minres<<
"cm range="<<
rangestrips<<
"strips stripw="<<stripw<<
"cm"<<std::endl;
782 if(
debug)
std::cout<<
"MB4 \t \t \t \t \t Norm of Cosine Directors="<<dx3*dx3+dy3*dy3+dz3*dz3<<
"~1?"<<std::endl;
784 float cosal = dx/
sqrt(dx*dx+dz*dz);
785 if(
debug)
std::cout<<
"MB4 \t \t \t \t \t Angle="<<acos(cosal)*180/3.1415926<<
" degree"<<std::endl;
786 if(
debug)
std::cout<<
"MB4 \t \t \t \t \t Filling the Residuals Histogram for globals with "<<minres<<
"And the angular incidence with Cos Theta="<<-1*dz<<std::endl;
792 sprintf(meIdRPC,
"RPCDataOccupancyFromDT_%d",rollId.
rawId());
793 if(
debug)
std::cout<<
"MB4 \t \t \t \t \t \t COINCIDENCE!!! Event="<<iEvent.
id()<<
"Filling RPC Data Occupancy for "<<meIdRPC<<
" with "<<stripPredicted<<std::endl;
794 meMap[meIdRPC]->Fill(stripPredicted);
798 std::string nameRoll = rpcsrv.
name();
799 if(
debug)
std::cout<<
"MB4 \t \t \t \t \t \t A roll was ineficient in event"<<iEvent.
id().
event()<<std::endl;
801 <<
"\t St "<<dtStation
803 <<
"\t Roll "<<nameRoll
811 if(
debug)
std::cout<<
"MB4 \t \t \t \t No the prediction is outside of this roll"<<std::endl;
815 if(
debug)
std::cout<<
"MB4 \t \t \t No, Exrtrapolation too long!, canceled"<<std::endl;
819 compatiblesegments=
false;
820 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;
823 if(
debug)
std::cout<<
"MB4 \t \t \t No the same station or same wheel or segment dim in mb3 not 4D"<<std::endl;
827 if(
debug)
std::cout<<
"MB4 \t \t \t Is NOT a 2D Segment"<<std::endl;
830 if(
debug)
std::cout<<
"MB4 \t \t \t \t There is not just one segment or is not in station 4"<<std::endl;
834 if(
debug)
std::cout<<
"MB4 \t This event doesn't have 4D Segment"<<std::endl;
847 if(allCSCSegments->size()>0){
850 if(
debug)
std::cout<<
"CSC \t Number of CSC Segments in this event = "<<allCSCSegments->size()<<std::endl;
852 std::map<CSCDetId,int> CSCSegmentsCounter;
855 int segmentsInThisEventInTheEndcap=0;
857 for (segment = allCSCSegments->begin();segment!=allCSCSegments->end(); ++segment){
858 CSCSegmentsCounter[segment->cscDetId()]++;
859 segmentsInThisEventInTheEndcap++;
864 if(
debug)
std::cout<<
"CSC \t loop over all the CSCSegments "<<std::endl;
865 for (segment = allCSCSegments->begin();segment!=allCSCSegments->end(); ++segment){
866 CSCDetId CSCId = segment->cscDetId();
868 if(
debug)
std::cout<<
"CSC \t \t This Segment is in Chamber id: "<<CSCId<<std::endl;
869 if(
debug)
std::cout<<
"CSC \t \t Number of segments in this CSC = "<<CSCSegmentsCounter[CSCId]<<std::endl;
870 if(
debug)
std::cout<<
"CSC \t \t Is the only one in this CSC? is not ind the ring 1 or station 4? Are there more than 2 segments in the event?"<<std::endl;
872 if(CSCSegmentsCounter[CSCId]==1 && CSCId.
station()!=4 && CSCId.
ring()!=1 && allCSCSegments->size()>=2){
874 int cscEndCap = CSCId.
endcap();
875 int cscStation = CSCId.
station();
876 int cscRing = CSCId.
ring();
877 int cscChamber = CSCId.
chamber();
878 int rpcRegion = 1;
if(cscEndCap==2) rpcRegion= -1;
879 int rpcRing = cscRing;
880 if(cscRing==4)rpcRing =1;
881 int rpcStation = cscStation;
882 int rpcSegment = CSCId.
chamber();
884 LocalPoint segmentPosition= segment->localPosition();
885 LocalVector segmentDirection=segment->localDirection();
886 float dz=segmentDirection.
z();
888 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;
890 if(segment->dimension()==4 && (segment->nRecHits()<=10 && segment->nRecHits()>=4)&& acos(dz)*180/3.1415926 > 45. && acos(dz)*180/3.1415926 < 160. ){
895 if(
debug)
std::cout<<
"CSC \t \t CSC Segment Dimension "<<segment->dimension()<<std::endl;
897 float Xo=segmentPosition.
x();
898 float Yo=segmentPosition.
y();
899 float Zo=segmentPosition.
z();
900 float dx=segmentDirection.
x();
901 float dy=segmentDirection.
y();
902 float dz=segmentDirection.
z();
905 if(
debug)
std::cout<<
"CSC \t \t Getting chamber from Geometry"<<std::endl;
907 if(
debug)
std::cout<<
"CSC \t \t Getting ID from Chamber"<<std::endl;
909 if(
debug)
std::cout<<
"CSC \t \t Printing The Id"<<TheId<<std::endl;
911 if(
debug)
std::cout<<
"CSC \t \t Number of rolls for this CSC = "<<rollsForThisCSC.size()<<std::endl;
913 if(
debug)
std::cout<<
"CSC \t \t Loop over all the rolls asociated to this CSC"<<std::endl;
915 if(rpcRing!=1&&rpcStation!=4){
917 if(rollsForThisCSC.size()==0){
918 if(
debug)
std::cout<<
"CSC Fail for CSCId="<<TheId<<
" rpcRegion="<<rpcRegion<<
" rpcStation="<<rpcStation<<
" rpcRing="<<rpcRing<<
" rpcSegment="<<rpcSegment<<std::endl;
921 assert(rollsForThisCSC.size()>=1);
924 for (std::set<RPCDetId>::iterator iteraRoll = rollsForThisCSC.begin();iteraRoll != rollsForThisCSC.end(); iteraRoll++){
928 if(
debug)
std::cout<<
"CSC \t \t \t We are in the roll getting the surface"<<rpcId<<std::endl;
933 if(
debug)
std::cout<<
"CSC \t \t \t Doing the extrapolation to this roll"<<std::endl;
934 if(
debug)
std::cout<<
"CSC \t \t \t CSC Segment Direction in CSCLocal "<<segmentDirection<<std::endl;
935 if(
debug)
std::cout<<
"CSC \t \t \t CSC Segment Point in CSCLocal "<<segmentPosition<<std::endl;
938 if(
debug)
std::cout<<
"CSC \t \t \t Center (0,0,0) of the Roll in Global"<<CenterPointRollGlobal<<std::endl;
940 if(
debug)
std::cout<<
"CSC \t \t \t Center (0,0,0) of the CSC in Global"<<CenterPointCSCGlobal<<std::endl;
942 if(
debug)
std::cout<<
"CSC \t \t \t Segment Position in Global"<<segmentPositionInGlobal<<std::endl;
949 (CenterPointRollGlobal.
barePhi()<0)?
950 rpcphi = 2*3.141592+CenterPointRollGlobal.
barePhi():rpcphi=CenterPointRollGlobal.
barePhi();
952 (CenterPointCSCGlobal.
barePhi()<0)?
953 cscphi = 2*3.1415926536+CenterPointCSCGlobal.
barePhi():cscphi=CenterPointCSCGlobal.
barePhi();
955 float df=fabs(cscphi-rpcphi);
956 float dr=fabs(CenterPointRollGlobal.
perp()-CenterPointCSCGlobal.
perp());
957 float diffz=CenterPointRollGlobal.
z()-CenterPointCSCGlobal.
z();
958 float dfg=df*180./3.14159265;
960 if(
debug)
std::cout<<
"CSC \t \t \t z of RPC="<<CenterPointRollGlobal.
z()<<
"z of CSC"<<CenterPointCSCGlobal.
z()<<
" dfg="<<dfg<<std::endl;
966 if(dr>200.||fabs(dz)>55.||dfg>1.){
969 <<
"\t \t \t CSC Station= "<<CSCId.
station()
970 <<
" Ring= "<<CSCId.
ring()
971 <<
" Chamber= "<<CSCId.
chamber()
972 <<
" cscphi="<<cscphi*180/3.14159265
973 <<
"\t RPC Station= "<<rpcId.
station()
974 <<
" ring= "<<rpcId.
ring()
975 <<
" segment =-> "<<rpcsrv.
name()
976 <<
" rollphi="<<rpcphi*180/3.14159265
988 float D=CenterRollinCSCFrame.
z();
996 if(
debug)
std::cout<<
"CSC \t \t \t xmin of this Roll "<<xmin<<
"cm"<<std::endl;
998 if(
debug)
std::cout<<
"CSC \t \t \t xmax of this Roll "<<xmax<<
"cm"<<std::endl;
999 float rsize = fabs( xmax.
x()-xmin.
x() );
1000 if(
debug)
std::cout<<
"CSC \t \t \t Roll Size "<<rsize<<
"cm"<<std::endl;
1002 float stripw = top_->
pitch();
1004 if(
debug)
std::cout<<
"CSC \t \t \t Strip Lenght "<<stripl<<
"cm"<<std::endl;
1005 if(
debug)
std::cout<<
"CSC \t \t \t Strip Width "<<stripw<<
"cm"<<std::endl;
1007 if(
debug)
std::cout<<
"CSC \t \t \t X Predicted in CSCLocal= "<<X<<
"cm"<<std::endl;
1008 if(
debug)
std::cout<<
"CSC \t \t \t Y Predicted in CSCLocal= "<<Y<<
"cm"<<std::endl;
1009 if(
debug)
std::cout<<
"CSC \t \t \t Z Predicted in CSCLocal= "<<Z<<
"cm"<<std::endl;
1011 float extrapolatedDistance =
sqrt((X-Xo)*(X-Xo)+(Y-Yo)*(Y-Yo)+(Z-Zo)*(Z-Zo));
1013 if(
debug)
std::cout<<
"CSC \t \t \t Is the distance of extrapolation less than MaxD? ="<<extrapolatedDistance<<
"cm"<<
"MaxD="<<
MaxD<<
"cm"<<std::endl;
1015 if(extrapolatedDistance<=
MaxD){
1020 if(
debug)
std::cout<<
"CSC \t \t \t Point ExtraPolated in Global"<<GlobalPointExtrapolated<< std::endl;
1023 LocalPoint PointExtrapolatedRPCFrame = RPCSurface.
toLocal(GlobalPointExtrapolated);
1025 if(
debug)
std::cout<<
"CSC \t \t \t Point Extrapolated in RPCLocal"<<PointExtrapolatedRPCFrame<< std::endl;
1026 if(
debug)
std::cout<<
"CSC \t \t \t Corner of the Roll = ("<<rsize*0.5<<
","<<stripl*0.5<<
")"<<std::endl;
1027 if(
debug)
std::cout<<
"CSC \t \t \t Info About the Point Extrapolated in X Abs ("<<fabs(PointExtrapolatedRPCFrame.
x())<<
","
1028 <<fabs(PointExtrapolatedRPCFrame.
y())<<
","<<fabs(PointExtrapolatedRPCFrame.
z())<<
")"<<std::endl;
1030 <<fabs(PointExtrapolatedRPCFrame.
z())<<
" dx="
1031 <<fabs(PointExtrapolatedRPCFrame.
x())<<
" dy="
1032 <<fabs(PointExtrapolatedRPCFrame.
y())<<std::endl;
1034 if(
debug)
std::cout<<
"CSC \t \t \t Does the extrapolation go inside this roll????"<<std::endl;
1036 if(fabs(PointExtrapolatedRPCFrame.
z()) < 10. &&
1037 fabs(PointExtrapolatedRPCFrame.
x()) < rsize*0.5 &&
1038 fabs(PointExtrapolatedRPCFrame.
y()) < stripl*0.5){
1045 std::string nameRoll = rpcsrv.
name();
1046 if(
debug)
std::cout<<
"CSC \t \t \t \t The RPCName is "<<nameRoll<<std::endl;
1048 const float stripPredicted =
1049 rollasociated->
strip(
LocalPoint(PointExtrapolatedRPCFrame.
x(),PointExtrapolatedRPCFrame.
y(),0.));
1051 if(
debug)
std::cout<<
"CSC \t \t \t \t \t Candidate"<<rollId<<
" "<<
"(from CSC Segment) STRIP---> "<<stripPredicted<< std::endl;
1056 if(
debug)
std::cout<<
"CSC \t \t \t \t Filling Expected"<<std::endl;
1057 sprintf(meIdCSC,
"ExpectedOccupancyFromCSC_%d",rollId.
rawId());
1058 meMap[meIdCSC]->Fill(stripPredicted);
1064 int countRecHits = 0;
1065 float minres = 3000.;
1067 if(
debug)
std::cout<<
"CSC \t \t \t \t \t Getting RecHits in Roll Asociated"<<std::endl;
1068 typedef std::pair<RPCRecHitCollection::const_iterator, RPCRecHitCollection::const_iterator> rangeRecHits;
1069 rangeRecHits recHitCollection = rpcHits->get(rollasociated->
id());
1072 for (recHit = recHitCollection.first; recHit != recHitCollection.second ; recHit++) {
1074 sprintf(meIdRPC,
"BXDistribution_%d",rollasociated->
id().
rawId());
1075 meMap[meIdRPC]->Fill(recHit->BunchX());
1078 LocalPoint recHitPos=recHit->localPosition();
1079 float res=PointExtrapolatedRPCFrame.
x()- recHitPos.
x();
1080 if(
debug)
std::cout<<
"CSC \t \t \t \t \t \t Found Rec Hit at "<<res<<
"cm of the prediction."<<std::endl;
1081 if(fabs(res)<fabs(minres)){
1083 cluSize = recHit->clusterSize();
1084 if(
debug)
std::cout<<
"CSC \t \t \t \t \t \t \t New Min Res "<<res<<
"cm."<<std::endl;
1088 bool anycoincidence =
false;
1090 if(countRecHits==0){
1091 if(
debug)
std::cout <<
"CSC \t \t \t \t \t THIS ROLL DOESN'T HAVE ANY RECHIT"<<std::endl;
1093 assert(minres!=3000);
1095 if(
debug)
std::cout<<
"CSC \t \t \t \t \t PointExtrapolatedRPCFrame.x="<<PointExtrapolatedRPCFrame.
x()<<
" Minimal Residual"<<minres<<std::endl;
1096 if(
debug)
std::cout<<
"CSC \t \t \t \t \t Minimal Residual less than stripw*rangestrips? minres="<<minres<<
" range="<<
rangestrips<<
" stripw="<<stripw<<
" cluSize"<<cluSize<<
" <=compare minres with"<<(
rangestrips+cluSize*0.5)*stripw<<std::endl;
1097 if(fabs(minres)<=(
rangestrips+cluSize*0.5)*stripw){
1099 anycoincidence=
true;
1103 if(
debug)
std::cout<<
"CSC \t \t \t \t \t At least one RecHit inside the range, Predicted="<<stripPredicted<<
" minres="<<minres<<
"cm range="<<
rangestrips<<
"strips stripw="<<stripw<<
"cm"<<std::endl;
1104 if(
debug)
std::cout<<
"CSC \t \t \t \t \t Norm of Cosine Directors="<<dx*dx+dy*dy+dz*dz<<
"~1?"<<std::endl;
1106 float cosal = dx/
sqrt(dx*dx+dz*dz);
1107 if(
debug)
std::cout<<
"CSC \t \t \t \t \t Angle="<<acos(cosal)*180/3.1415926<<
" degree"<<std::endl;
1108 if(
debug)
std::cout<<
"CSC \t \t \t \t \t Filling the Residuals Histogram for globals with "<<minres<<
"And the angular incidence with Cos Theta="<<-1*dz<<std::endl;
1116 sprintf(meIdRPC,
"RPCDataOccupancyFromCSC_%d",rollId.
rawId());
1117 if(
debug)
std::cout <<
"CSC \t \t \t \t \t \t COINCEDENCE!!! Event="<<iEvent.
id()<<
"Filling RPC Data Occupancy for "<<meIdRPC<<
" with "<<stripPredicted<<std::endl;
1118 meMap[meIdRPC]->Fill(stripPredicted);
1122 std::string nameRoll = rpcsrv.
name();
1123 if(
debug)
std::cout<<
"CSC \t \t \t \t \t \t A roll was ineficient in event"<<iEvent.
id().
event()<<std::endl;
1125 <<
"\t cscStation "<<cscStation
1126 <<
"\t cscRing "<<cscRing
1127 <<
"\t cscChamber "<<cscChamber
1128 <<
"\t Roll "<<nameRoll
1129 <<
"\t Event "<<iEvent.
id().
event()
1130 <<
"\t CSCId "<<CSCId
1138 if(
debug)
std::cout<<
"CSC \t \t \t \t No the prediction is outside of this roll"<<std::endl;
1141 if(
debug)
std::cout<<
"CSC \t \t \t No, Exrtrapolation too long!, canceled"<<std::endl;
1147 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;
1151 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
EventNumber_t event() const
float strip(const LocalPoint &lp) const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * hGlobalResClu1La3
const Topology & topology() const
edm::ESHandle< RPCGeometry > rpcGeo
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")
std::map< std::string, MonitorElement * > bookDetUnitSeg(RPCDetId &detId, int nstrips, std::string folder)
MonitorElement * hGlobalResClu3R2C
MonitorElement * hGlobalResClu3La1
MonitorElement * hGlobalResClu3R3C
MonitorElement * hGlobalResClu2La2
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
int distsector(int sector1, int sector2)
virtual float pitch() const
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 * hGlobalResClu3La3
edm::ESHandle< DTGeometry > dtGeo
MonitorElement * hGlobalResClu1La6
virtual void endRun(const edm::Run &r, const edm::EventSetup &iSetup)
LocalPoint toLocal(const GlobalPoint &gp) const
MonitorElement * hGlobalResClu3R2A
MonitorElement * hGlobalResClu2La5
const std::vector< const RPCRoll * > & rolls() const
Return the Rolls.
MonitorElement * hGlobalResClu1La4
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
MonitorElement * hGlobalResClu2La4
std::map< DTStationIndex, std::set< RPCDetId > > rollstoreDT
MonitorElement * hGlobalResClu1La1
edm::ESHandle< CSCGeometry > cscGeo
MonitorElement * hGlobalResClu2La6
MonitorElement * hGlobalResClu2R2A
MonitorElement * hGlobalResClu2R3A
edm::InputTag RPCRecHitLabel_
virtual LocalPoint localPosition(float strip) const
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
MonitorElement * hGlobalResClu3La2
MonitorElement * hGlobalResClu3La5
MonitorElement * hGlobalResClu2La1
MonitorElement * hGlobalResClu2La3
MonitorElement * hGlobalResClu3La6
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)
MonitorElement * hGlobalResClu1La5
DecomposeProduct< arg, typename Div::arg > D
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
MonitorElement * hGlobalResClu3R2B
MonitorElement * hGlobalResClu2R3B
MonitorElement * hGlobalResClu3La4
MonitorElement * hGlobalResClu1R2B
MonitorElement * hGlobalResClu2R2C
MonitorElement * hGlobalResClu1La2
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.