18 min_inner_radius = 0.;
19 max_inner_radius = 9999.;
20 min_outer_radius = 0.;
21 max_outer_radius = 9999.;
22 dphi_threshold = 999.;
23 norm_chi2_threshold = 999.;
27 max_dt_muon_segment=-10.0;
28 max_free_inverse_beta=0.0;
33 matching_dphi_threshold = 0.18;
34 matching_deta_threshold = 0.4;
35 matching_dwire_threshold = 5.;
42 dphi_thresh_segvsrh_hbhe=0.05;
43 dphi_thresh_segvsrh_eb=0.05;
44 dphi_thresh_segvsrh_ee=0.05;
46 dr_lowthresh_segvsrh_hbhe=-20;
47 dr_lowthresh_segvsrh_eb=-20;
48 dr_lowthresh_segvsrh_ee=-20;
50 dr_highthresh_segvsrh_hbhe=20;
51 dr_highthresh_segvsrh_eb=20;
52 dr_highthresh_segvsrh_ee=20;
54 dt_lowthresh_segvsrh_hbhe=5;
55 dt_lowthresh_segvsrh_eb=5;
56 dt_lowthresh_segvsrh_ee=5;
58 dt_highthresh_segvsrh_hbhe=30;
59 dt_highthresh_segvsrh_eb=30;
60 dt_highthresh_segvsrh_ee=30;
88 bool calomatched =
false;
89 bool ECALBmatched =
false;
90 bool ECALEmatched =
false;
91 bool HCALmatched =
false;
99 bool trkmuunvetoisdefault =
false;
105 short int n_tracks_small_beta=0;
106 short int n_tracks_small_dT=0;
107 short int n_tracks_small_dT_and_beta=0;
108 for( reco::MuonCollection::const_iterator iMuon = TheCosmicMuons->begin() ; iMuon != TheCosmicMuons->end() ; iMuon++, imucount++ )
113 bool StoreTrack =
false;
115 float innermost_global_z = 1500.;
116 float outermost_global_z = 0.;
120 for(
unsigned int j = 0 ;
j < Track->extra()->recHitsSize();
j++ )
122 auto hit = Track->extra()->recHitRef(
j);
123 if( !
hit->isValid() )
continue;
124 DetId TheDetUnitId(
hit->geographicalId());
131 const GlobalPoint TheGlobalPosition = TheSurface.toGlobal(TheLocalPosition);
133 float z = TheGlobalPosition.
z();
134 if(
abs(z) < innermost_global_z )
136 innermost_global_z =
abs(z);
137 InnerMostGlobalPosition =
GlobalPoint( TheGlobalPosition);
139 if(
abs(z) > outermost_global_z )
141 outermost_global_z =
abs(z);
142 OuterMostGlobalPosition =
GlobalPoint( TheGlobalPosition );
147 std::vector<const CSCSegment*> MatchedSegments = TheMatcher->
matchCSC(*Track,TheEvent);
150 float InnerSegmentTime[2] = {0,0};
151 float OuterSegmentTime[2] = {0,0};
152 float innermost_seg_z[2] = {1500,1500};
153 float outermost_seg_z[2] = {0,0};
154 for (std::vector<const CSCSegment*>::const_iterator segment =MatchedSegments.begin();
155 segment != MatchedSegments.end(); ++segment)
157 CSCDetId TheCSCDetId((*segment)->cscDetId());
159 LocalPoint TheLocalPosition = (*segment)->localPosition();
160 const GlobalPoint TheGlobalPosition = TheCSCChamber->toGlobal(TheLocalPosition);
161 float z = TheGlobalPosition.
z();
162 int TheEndcap = TheCSCDetId.endcap();
163 if(
abs(z) < innermost_seg_z[TheEndcap-1] )
165 innermost_seg_z[TheEndcap-1] =
abs(z);
166 InnerSegmentTime[TheEndcap-1] = (*segment)->time();
168 if(
abs(z) > outermost_seg_z[TheEndcap-1] )
170 outermost_seg_z[TheEndcap-1] =
abs(z);
171 OuterSegmentTime[TheEndcap-1] = (*segment)->time();
175 if( nCSCHits < 3 )
continue;
177 float dT_Segment = 0;
179 if( innermost_seg_z[0] < outermost_seg_z[0])
180 dT_Segment = OuterSegmentTime[0]-InnerSegmentTime[0];
181 if( innermost_seg_z[1] < outermost_seg_z[1])
185 if (dT_Segment == 0.0 || OuterSegmentTime[1]-InnerSegmentTime[1] < dT_Segment)
186 dT_Segment = OuterSegmentTime[1]-InnerSegmentTime[1] ;
189 if( OuterMostGlobalPosition.
x() == 0. || OuterMostGlobalPosition.
y() == 0. || OuterMostGlobalPosition.
z() == 0. )
191 if( InnerMostGlobalPosition.
x() == 0. || InnerMostGlobalPosition.
y() == 0. || InnerMostGlobalPosition.
z() == 0. )
197 float deta =
abs( OuterMostGlobalPosition.
eta() - InnerMostGlobalPosition.
eta() );
198 float dphi =
abs(
deltaPhi( OuterMostGlobalPosition.
phi() , InnerMostGlobalPosition.
phi() )) ;
199 float theta = Track->outerMomentum().theta();
200 float innermost_x = InnerMostGlobalPosition.
x() ;
201 float innermost_y = InnerMostGlobalPosition.
y();
202 float outermost_x = OuterMostGlobalPosition.
x();
203 float outermost_y = OuterMostGlobalPosition.
y();
204 float innermost_r = TMath::Sqrt(innermost_x *innermost_x + innermost_y * innermost_y );
205 float outermost_r = TMath::Sqrt(outermost_x *outermost_x + outermost_y * outermost_y );
207 if( deta < deta_threshold )
209 if( theta > min_outer_theta && theta < max_outer_theta )
211 if( dphi > dphi_threshold )
213 if( innermost_r < min_inner_radius )
215 if( innermost_r > max_inner_radius )
217 if( outermost_r < min_outer_radius )
219 if( outermost_r > max_outer_radius )
221 if( Track->normalizedChi2() > norm_chi2_threshold )
238 if (dT_Segment < max_dt_muon_segment )
240 if (freeInverseBeta < max_free_inverse_beta)
241 n_tracks_small_beta++;
242 if ((dT_Segment < max_dt_muon_segment) && (freeInverseBeta < max_free_inverse_beta))
243 n_tracks_small_dT_and_beta++;
247 static std::atomic<bool> MuonTimeFail{
false};
248 bool expected =
false;
249 if( MuonTimeFail.compare_exchange_strong(expected,
true,std::memory_order_acq_rel) )
251 edm::LogWarning (
"InvalidInputTag") <<
"The MuonTimeExtraMap does not appear to be in the event. Some beam halo "
252 <<
" identification variables will be empty" ;
256 TheCSCHaloData.
SetNIncomingTracks(n_tracks_small_dT,n_tracks_small_beta,n_tracks_small_dT_and_beta);
260 static std::atomic<bool> CosmicFail{
false};
261 bool expected =
false;
262 if( CosmicFail.compare_exchange_strong(expected,
true,std::memory_order_acq_rel) )
264 edm::LogWarning (
"InvalidInputTag") <<
" The Cosmic Muon collection does not appear to be in the event. These beam halo "
265 <<
" identification variables will be empty" ;
271 bool EventPasses =
false;
278 if( bit < TheHLTResults->
size() )
281 if( TheHLTResults->accept( bit ) && !TheHLTResults->error( bit ) )
295 static std::atomic<bool> HLTFail{
false};
296 bool expected =
false;
297 if( HLTFail.compare_exchange_strong(expected,
true,std::memory_order_acq_rel) )
299 edm::LogWarning (
"InvalidInputTag") <<
"The HLT results do not appear to be in the event. The beam halo HLT trigger "
300 <<
"decision will not be used in the halo identification";
304 if( TheL1GMTReadout.
isValid() )
307 std::vector < L1MuGMTReadoutRecord > gmt_records = gmtrc->
getRecords ();
308 std::vector < L1MuGMTReadoutRecord >::const_iterator igmtrr;
317 for (igmtrr = gmt_records.begin (); igmtrr != gmt_records.end (); igmtrr++)
319 std::vector < L1MuRegionalCand >::const_iterator iter1;
320 std::vector < L1MuRegionalCand > rmc;
321 rmc = igmtrr->getCSCCands ();
322 for (iter1 = rmc.begin (); iter1 != rmc.end (); iter1++)
324 if (!(*iter1).empty ())
326 if ((*iter1).isFineHalo ())
328 float halophi = iter1->phiValue();
330 float haloeta = iter1->etaValue();
331 bool HaloIsGood =
true;
332 bool HaloIsGood_alt =
true;
338 for( reco::MuonCollection::const_iterator
mu = TheMuons->begin();
mu != TheMuons->end() && (HaloIsGood ||!trkmuunvetoisdefault) ;
mu++ )
341 bool lowpttrackmu =
false;
342 if(
mu->isStandAloneMuon() && !
mu->isTrackerMuon() && !
mu->isGlobalMuon() )
continue;
343 if( !
mu->isGlobalMuon() &&
mu->isTrackerMuon() &&
mu->pt()<3 && trkmuunvetoisdefault)
continue;
344 if( !
mu->isGlobalMuon() &&
mu->isTrackerMuon() &&
mu->pt()<3 ) lowpttrackmu =
true;
362 const std::vector<MuonChamberMatch>
chambers =
mu->matches();
363 for(std::vector<MuonChamberMatch>::const_iterator iChamber = chambers.begin();
364 iChamber != chambers.end() ; iChamber ++ )
367 for( std::vector<reco::MuonSegmentMatch>::const_iterator iSegment = iChamber->segmentMatches.begin() ;
368 iSegment != iChamber->segmentMatches.end(); ++iSegment )
371 std::vector<CSCRecHit2D> hits = cscSegment -> specificRecHits();
372 for( std::vector<CSCRecHit2D>::iterator iHit = hits.begin();
373 iHit != hits.end() ; iHit++ )
375 DetId TheDetUnitId(iHit->cscDetId());
377 LocalPoint TheLocalPosition = iHit->localPosition();
378 const BoundPlane& TheSurface = TheUnit->surface();
379 GlobalPoint TheGlobalPosition = TheSurface.toGlobal(TheLocalPosition);
381 float phi_ = TheGlobalPosition.
phi();
382 float eta_ = TheGlobalPosition.
eta();
384 deta = deta <
abs( eta_ - haloeta ) ? deta :
abs( eta_ - haloeta );
389 if ( dphi < matching_dphi_threshold && deta < matching_deta_threshold){
391 if(!lowpttrackmu)HaloIsGood_alt =
false;
396 if( (*iter1).etaValue() > 0 )
401 if( HaloIsGood_alt ){
402 if( (*iter1).etaValue() > 0 )
419 static std::atomic<bool> L1Fail{
false};
420 bool expected =
false;
421 if( L1Fail.compare_exchange_strong(expected,
true,std::memory_order_acq_rel) )
423 edm::LogWarning (
"InvalidInputTag") <<
"The L1MuGMTReadoutCollection does not appear to be in the event. The L1 beam halo trigger "
424 <<
"decision will not be used in the halo identification";
431 short int n_alctsP=0;
432 short int n_alctsM=0;
441 if( (*digiIt).isValid() && ( (*digiIt).getBX() < expected_BX ) )
443 int digi_endcap = detId.
endcap();
444 int digi_station = detId.station();
445 int digi_ring = detId.ring();
446 int digi_chamber = detId.chamber();
447 int digi_wire = digiIt->getKeyWG();
448 if( digi_station == 1 && digi_ring == 4 )
451 bool DigiIsGood =
true;
456 for(reco::MuonCollection::const_iterator
mu = TheMuons->begin();
mu!= TheMuons->end() && DigiIsGood ;
mu++ )
459 if( !
mu->isTrackerMuon() && !
mu->isGlobalMuon() &&
mu->isStandAloneMuon() )
continue;
460 if( !
mu->isGlobalMuon() &&
mu->isTrackerMuon() &&
mu->pt()<3 &&trkmuunvetoisdefault)
continue;
461 const std::vector<MuonChamberMatch>
chambers =
mu->matches();
462 for(std::vector<MuonChamberMatch>::const_iterator iChamber = chambers.begin();
463 iChamber != chambers.end(); iChamber ++ )
466 for( std::vector<reco::MuonSegmentMatch>::const_iterator iSegment = iChamber->segmentMatches.begin();
467 iSegment != iChamber->segmentMatches.end(); iSegment++ )
470 std::vector<CSCRecHit2D> hits = cscSegRef->specificRecHits();
471 for( std::vector<CSCRecHit2D>::iterator iHit = hits.begin();
472 iHit != hits.end(); iHit++ )
474 if( iHit->cscDetId().endcap() != digi_endcap )
continue;
475 if( iHit->cscDetId().station() != digi_station )
continue;
476 if( iHit->cscDetId().ring() != digi_ring )
continue;
477 if( iHit->cscDetId().chamber() != digi_chamber )
continue;
478 int hit_wire = iHit->hitWire();
479 dwire = dwire <
abs(hit_wire - digi_wire)? dwire :
abs(hit_wire - digi_wire );
483 if( dwire <= matching_dwire_threshold )
490 if( detId.endcap() == 1 )
492 else if ( detId.endcap() == 2)
501 static std::atomic<bool> DigiFail{
false};
502 bool expected =
false;
503 if (DigiFail.compare_exchange_strong(expected,
true,std::memory_order_acq_rel)){
504 edm::LogWarning (
"InvalidInputTag") <<
"The CSCALCTDigiCollection does not appear to be in the event. The ALCT Digis will "
505 <<
" not be used in the halo identification";
513 short int n_recHitsP = 0;
514 short int n_recHitsM = 0;
518 for (dRHIter = TheCSCRecHits->begin(); dRHIter != TheCSCRecHits->end(); dRHIter++)
520 if ( !((*dRHIter).isValid()) )
continue;
522 float RHTime = (*dRHIter).tpeak();
523 LocalPoint rhitlocal = (*dRHIter).localPosition();
526 float globZ = globalPosition.
z();
527 if ( RHTime < (recHit_t0 - recHit_twindow) )
553 static std::atomic<bool> RecHitFail{
false};
554 bool expected =
false;
555 if( RecHitFail.compare_exchange_strong(expected,
true,std::memory_order_acq_rel) )
557 edm::LogWarning (
"InvalidInputTag") <<
"The requested CSCRecHit2DCollection does not appear to be in the event. The CSC RecHit "
558 <<
" variables used for halo identification will not be calculated or stored";
565 short int maxNSegments = 0;
566 bool plus_endcap =
false;
567 bool minus_endcap =
false;
568 bool both_endcaps =
false;
569 bool both_endcaps_loose =
false;
572 short int maxNSegments_alt = 0;
573 bool both_endcaps_alt =
false;
574 bool both_endcaps_loose_alt =
false;
575 bool both_endcaps_loose_dtcut_alt =
false;
578 if (TheCSCSegments.
isValid()) {
580 iSegment != TheCSCSegments->end();
583 CSCDetId iCscDetID = iSegment->cscDetId();
584 bool Segment1IsGood=
true;
585 bool Segment1IsGood_alt=
true;
590 for(reco::MuonCollection::const_iterator
mu = TheMuons->begin();
mu!= TheMuons->end() && (Segment1IsGood||!trkmuunvetoisdefault) ;
mu++ )
592 bool lowpttrackmu=
false;
593 if( !
mu->isTrackerMuon() && !
mu->isGlobalMuon() &&
mu->isStandAloneMuon() )
continue;
594 if( !
mu->isTrackerMuon() && !
mu->isGlobalMuon() &&
mu->isStandAloneMuon()&&trkmuunvetoisdefault)
continue;
595 if( !
mu->isGlobalMuon() &&
mu->isTrackerMuon() &&
mu->pt()<3) lowpttrackmu=
true;
596 const std::vector<MuonChamberMatch>
chambers =
mu->matches();
597 for(std::vector<MuonChamberMatch>::const_iterator kChamber = chambers.begin();
598 kChamber != chambers.end(); kChamber ++ )
601 for( std::vector<reco::MuonSegmentMatch>::const_iterator kSegment = kChamber->segmentMatches.begin();
602 kSegment != kChamber->segmentMatches.end(); kSegment++ )
605 CSCDetId kCscDetID = cscSegRef->cscDetId();
607 if( kCscDetID == iCscDetID )
609 Segment1IsGood =
false;
610 if(!lowpttrackmu) Segment1IsGood_alt=
false;
616 if(!Segment1IsGood&&!Segment1IsGood_alt)
continue;
620 LocalPoint iLocalPosition = iSegment->localPosition();
621 LocalVector iLocalDirection = iSegment->localDirection();
626 float iTheta = iGlobalDirection.
theta();
627 if (iTheta > max_segment_theta && iTheta <
TMath::Pi() - max_segment_theta)
continue;
629 float iPhi = iGlobalPosition.
phi();
630 float iR = TMath::Sqrt(iGlobalPosition.
x()*iGlobalPosition.
x() + iGlobalPosition.
y()*iGlobalPosition.
y());
631 float iZ = iGlobalPosition.
z();
632 float iT = iSegment->time();
638 bool hbhematched = HCALSegmentMatching(hbhehits,et_thresh_rh_hbhe,dphi_thresh_segvsrh_hbhe,dr_lowthresh_segvsrh_hbhe,dr_highthresh_segvsrh_hbhe,dt_lowthresh_segvsrh_hbhe,dt_highthresh_segvsrh_hbhe,iZ,iR,iT,iPhi);
639 bool ebmatched = ECALSegmentMatching(ecalebhits,et_thresh_rh_eb,dphi_thresh_segvsrh_eb,dr_lowthresh_segvsrh_eb,dr_highthresh_segvsrh_eb,dt_lowthresh_segvsrh_eb,dt_highthresh_segvsrh_eb,iZ,iR,iT,iPhi);
640 bool eematched = ECALSegmentMatching(ecaleehits,et_thresh_rh_ee,dphi_thresh_segvsrh_ee,dr_lowthresh_segvsrh_ee,dr_highthresh_segvsrh_ee,dt_lowthresh_segvsrh_ee,dt_highthresh_segvsrh_ee,iZ,iR,iT,iPhi);
641 calomatched = calomatched?
true : (hbhematched|| ebmatched|| eematched);
642 HCALmatched = HCALmatched?
true :hbhematched;
643 ECALBmatched = ECALBmatched?
true :ebmatched;
644 ECALEmatched = ECALEmatched?
true :eematched;
647 short int nSegs_alt = 0;
650 jSegment != TheCSCSegments->end();
652 if (jSegment == iSegment)
continue;
653 bool Segment2IsGood =
true;
654 bool Segment2IsGood_alt =
true;
655 LocalPoint jLocalPosition = jSegment->localPosition();
656 LocalVector jLocalDirection = jSegment->localDirection();
657 CSCDetId jCscDetID = jSegment->cscDetId();
660 float jTheta = jGlobalDirection.
theta();
661 float jPhi = jGlobalPosition.
phi();
662 float jR = TMath::Sqrt(jGlobalPosition.
x()*jGlobalPosition.
x() + jGlobalPosition.
y()*jGlobalPosition.
y());
663 float jZ = jGlobalPosition.
z() ;
664 float jT = jSegment->time();
670 && (
abs(jR - iR)<0.03*
abs(jZ - iZ))
671 && (
abs(jR - iR) <= max_segment_r_diff || jZ*iZ < 0)
672 && (jTheta < max_segment_theta || jTheta >
TMath::Pi() - max_segment_theta)) {
675 for(reco::MuonCollection::const_iterator
mu = TheMuons->begin();
mu!= TheMuons->end() && (Segment2IsGood||!trkmuunvetoisdefault) ;
mu++ ) {
676 bool lowpttrackmu=
false;
677 if( !
mu->isTrackerMuon() && !
mu->isGlobalMuon() &&
mu->isStandAloneMuon() )
continue;
678 if( !
mu->isGlobalMuon() &&
mu->isTrackerMuon() &&
mu->pt()<3) lowpttrackmu=
true;
679 const std::vector<MuonChamberMatch>
chambers =
mu->matches();
680 for(std::vector<MuonChamberMatch>::const_iterator kChamber = chambers.begin();
681 kChamber != chambers.end(); kChamber ++ ) {
683 for( std::vector<reco::MuonSegmentMatch>::const_iterator kSegment = kChamber->segmentMatches.begin();
684 kSegment != kChamber->segmentMatches.end(); kSegment++ ) {
686 CSCDetId kCscDetID = cscSegRef->cscDetId();
688 if( kCscDetID == jCscDetID ) {
689 Segment2IsGood =
false;
690 if(!lowpttrackmu) Segment2IsGood_alt=
false;
696 if(Segment1IsGood && Segment2IsGood) {
698 minus_endcap = iGlobalPosition.
z() < 0 || jGlobalPosition.
z() < 0;
699 plus_endcap = iGlobalPosition.
z() > 0 || jGlobalPosition.
z() > 0;
702 if(Segment1IsGood_alt && Segment2IsGood_alt) {
704 minus_endcap = iGlobalPosition.
z() < 0 || jGlobalPosition.
z() < 0;
705 plus_endcap = iGlobalPosition.
z() > 0 || jGlobalPosition.
z() > 0;
707 abs(jT-iT)<0.05*
sqrt( (jR-iR)*(jR-iR)+(jZ-iZ)*(jZ-iZ) ) &&
708 abs(jT-iT)> 0.02*
sqrt( (jR-iR)*(jR-iR)+(jZ-iZ)*(jZ-iZ) ) &&
710 minus_endcap&&plus_endcap ) both_endcaps_loose_dtcut_alt =
true;
716 if (nSegs > 0) nSegs++;
719 if (nSegs > 0) both_endcaps_loose = both_endcaps_loose ? both_endcaps_loose : minus_endcap && plus_endcap;
720 if (nSegs_alt > 0) nSegs_alt++;
721 if (nSegs_alt > 0) both_endcaps_loose_alt = both_endcaps_loose_alt ? both_endcaps_loose_alt : minus_endcap && plus_endcap;
724 if (nSegs > maxNSegments) {
728 maxNSegments = nSegs;
729 both_endcaps = both_endcaps ? both_endcaps : minus_endcap && plus_endcap;
732 if (nSegs_alt > maxNSegments_alt) {
733 maxNSegments_alt = nSegs_alt;
734 both_endcaps_alt = both_endcaps_alt ? both_endcaps_alt : minus_endcap && plus_endcap;
749 return TheCSCHaloData;
760 bool CSCHaloAlgo::HCALSegmentMatching(
edm::Handle<HBHERecHitCollection>& rechitcoll,
float et_thresh_rh,
float dphi_thresh_segvsrh,
float dr_lowthresh_segvsrh,
float dr_highthresh_segvsrh,
float dt_lowthresh_segvsrh,
float dt_highthresh_segvsrh,
float iZ,
float iR,
float iT,
float iPhi){
762 for(
size_t ihit = 0; ihit< rechitcoll->size(); ++ ihit){
763 const HBHERecHit & rechit = (*rechitcoll)[ ihit ];
765 double rhet = rechit.
energy()/cosh(rhpos.eta());
766 double dphi_rhseg =
abs(
deltaPhi(rhpos.phi(),iPhi));
767 double dr_rhseg =
sqrt(rhpos.x()*rhpos.x()+rhpos.y()*rhpos.y()) - iR;
768 double dtcorr_rhseg = rechit.
time()-
abs(rhpos.z()-iZ)/30- iT;
771 (rhpos.z()*iZ<0||
abs(rhpos.z())<200)&&
773 dphi_rhseg < dphi_thresh_segvsrh &&
774 dr_rhseg < dr_highthresh_segvsrh && dr_rhseg> dr_lowthresh_segvsrh &&
775 dtcorr_rhseg> dt_lowthresh_segvsrh && dtcorr_rhseg< dt_highthresh_segvsrh
781 bool CSCHaloAlgo::ECALSegmentMatching(
edm::Handle<EcalRecHitCollection>& rechitcoll,
float et_thresh_rh,
float dphi_thresh_segvsrh,
float dr_lowthresh_segvsrh,
float dr_highthresh_segvsrh,
float dt_lowthresh_segvsrh,
float dt_highthresh_segvsrh,
float iZ,
float iR,
float iT,
float iPhi ){
783 for(
size_t ihit = 0; ihit<rechitcoll->size(); ++ ihit){
784 const EcalRecHit & rechit = (*rechitcoll)[ ihit ];
786 double rhet = rechit.
energy()/cosh(rhpos.eta());
787 double dphi_rhseg =
abs(
deltaPhi(rhpos.phi(),iPhi));
788 double dr_rhseg =
sqrt(rhpos.x()*rhpos.x()+rhpos.y()*rhpos.y()) - iR;
789 double dtcorr_rhseg = rechit.
time()-
abs(rhpos.z()-iZ)/30- iT;
791 ( rechit.
time()<-1)&&
792 (rhpos.z()*iZ<0||
abs(rhpos.z())<200)&&
794 dphi_rhseg < dphi_thresh_segvsrh &&
795 dr_rhseg < dr_highthresh_segvsrh && dr_rhseg> dr_lowthresh_segvsrh &&
796 dtcorr_rhseg> dt_lowthresh_segvsrh && dtcorr_rhseg< dr_highthresh_segvsrh
void SetNFlatHaloSegments_TrkMuUnVeto(short int nSegments)
reco::CSCHaloData Calculate(const CSCGeometry &TheCSCGeometry, edm::Handle< reco::MuonCollection > &TheCosmicMuons, const edm::Handle< reco::MuonTimeExtraMap > TheCSCTimeMap, edm::Handle< reco::MuonCollection > &TheMuons, edm::Handle< CSCSegmentCollection > &TheCSCSegments, edm::Handle< CSCRecHit2DCollection > &TheCSCRecHits, edm::Handle< L1MuGMTReadoutCollection > &TheL1GMTReadout, edm::Handle< HBHERecHitCollection > &hbhehits, edm::Handle< EcalRecHitCollection > &ecalebhits, edm::Handle< EcalRecHitCollection > &ecaleehits, edm::Handle< edm::TriggerResults > &TheHLTResults, const edm::TriggerNames *triggerNames, const edm::Handle< CSCALCTDigiCollection > &TheALCTs, MuonSegmentMatcher *TheMatcher, const edm::Event &TheEvent, const edm::EventSetup &TheEventSetup)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
void SetSegmentIsEECaloMatched(bool b)
HcalDetId id() const
get the id
void SetSegmentsBothEndcaps_Loose_TrkMuUnVeto(bool b)
Geom::Phi< T > phi() const
Global3DPoint GlobalPoint
Geom::Theta< T > theta() const
std::vector< const CSCSegment * > matchCSC(const reco::Track &muon, const edm::Event &event)
const Plane & surface() const
The nominal surface of the GeomDet.
Geom::Theta< T > theta() const
unsigned int triggerIndex(std::string const &name) const
void SetSegmentIsCaloMatched(bool b)
const std::vector< GlobalPoint > & GetCSCTrackImpactPositions() const
Abs< T >::type abs(const T &t)
void SetSegmentsBothEndcaps(bool b)
math::XYZPoint Point
point in the space
void SetHLTBit(bool status)
double deltaPhi(double phi1, double phi2)
void SetNFlatHaloSegments(short int nSegments)
DetId id() const
get the id
T const * product() const
XYZPointD XYZPoint
point in space with cartesian internal representation
void SetNIncomingTracks(short int n_small_dT, short int n_small_beta, short int n_small_both)
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
T const * product() const
void SetNumberOfHaloTriggers(int PlusZ, int MinusZ)
std::vector< CSCALCTDigi >::const_iterator const_iterator
void SetSegmentIsHCaloMatched(bool b)
math::XYZPoint getPosition(const DetId &id, reco::Vertex::Point vtx)
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
void SetSegmentsBothEndcaps_Loose_dTcut_TrkMuUnVeto(bool b)
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
bool ECALSegmentMatching(edm::Handle< EcalRecHitCollection > &rechitcoll, float et_thresh_rh, float dphi_thresh_segvsrh, float dr_lowthresh_segvsrh, float dr_highthresh_segvsrh, float dt_lowthresh_segvsrh, float dt_highthresh_segvsrh, float iZ, float iR, float iT, float iPhi)
void SetNOutOfTimeHits(short int num)
std::pair< const_iterator, const_iterator > Range
virtual const GeomDetUnit * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
void SetNumberOfHaloTriggers_TrkMuUnVeto(int PlusZ, int MinusZ)
void SetNOutOfTimeTriggers(short int PlusZ, short int MinusZ)
static char chambers[264][20]
bool HCALSegmentMatching(edm::Handle< HBHERecHitCollection > &rechitcoll, float et_thresh_rh, float dphi_thresh_segvsrh, float dr_lowthresh_segvsrh, float dr_highthresh_segvsrh, float dt_lowthresh_segvsrh, float dt_highthresh_segvsrh, float iZ, float iR, float iT, float iPhi)
void SetSegmentIsEBCaloMatched(bool b)
tuple size
Write out results.
edm::RefVector< reco::TrackCollection > & GetTracks()