47 for(
int i = 0; selectionTypeStringToEnumMap[
i].
label && (!
found); ++
i)
48 if (! strcmp(label.c_str(), selectionTypeStringToEnumMap[
i].
label)) {
50 value = selectionTypeStringToEnumMap[
i].
value;
54 if (! found)
throw cms::Exception(
"MuonSelectorError") << label <<
" is not a recognized SelectionType";
60 double maxChamberDist,
61 double maxChamberDistPull,
64 unsigned int theMask = 0;
66 for(
int stationIdx = 1; stationIdx < 5; ++stationIdx)
67 for(
int detectorIdx = 1; detectorIdx < 3; ++detectorIdx)
68 if(muon.
trackDist(stationIdx,detectorIdx,arbitrationType) < maxChamberDist &&
69 muon.
trackDist(stationIdx,detectorIdx,arbitrationType)/muon.
trackDistErr(stationIdx,detectorIdx,arbitrationType) < maxChamberDistPull)
70 theMask += 1<<((stationIdx-1)+4*(detectorIdx-1));
82 bool use_weight_regain_at_chamber_boundary =
true;
83 bool use_match_dist_penalty =
true;
85 int nr_of_stations_crossed = 0;
86 int nr_of_stations_with_segment = 0;
87 std::vector<int> stations_w_track(8);
88 std::vector<int> station_has_segmentmatch(8);
89 std::vector<int> station_was_crossed(8);
90 std::vector<float> stations_w_track_at_boundary(8);
91 std::vector<float> station_weight(8);
92 int position_in_stations = 0;
93 float full_weight = 0.;
95 for(
int i = 1;
i<=8; ++
i) {
100 if( muon.
trackDist(
i,1,arbitrationType) < 999999 ) {
101 ++nr_of_stations_crossed;
102 station_was_crossed[
i-1] = 1;
103 if(muon.
trackDist(
i,1,arbitrationType) > -10. ) stations_w_track_at_boundary[
i-1] = muon.
trackDist(
i,1,arbitrationType);
104 else stations_w_track_at_boundary[
i-1] = 0.;
106 if( muon.
segmentX(
i,1,arbitrationType) < 999999 ) {
107 ++nr_of_stations_with_segment;
108 station_has_segmentmatch[
i-1] = 1;
112 if( muon.
trackDist(
i-4,2,arbitrationType) < 999999 ) {
113 ++nr_of_stations_crossed;
114 station_was_crossed[
i-1] = 1;
115 if(muon.
trackDist(
i-4,2,arbitrationType) > -10. ) stations_w_track_at_boundary[
i-1] = muon.
trackDist(
i-4,2,arbitrationType);
116 else stations_w_track_at_boundary[
i-1] = 0.;
118 if( muon.
segmentX(
i-4,2,arbitrationType) < 999999 ) {
119 ++nr_of_stations_with_segment;
120 station_has_segmentmatch[
i-1] = 1;
139 const float attenuate_weight_regain = 0.5;
141 for(
int i = 1;
i<=8; ++
i) {
147 if( station_was_crossed[
i-1] > 0 ) {
153 ++position_in_stations;
155 switch ( nr_of_stations_crossed ) {
157 station_weight[
i-1] = 1.;
160 if ( position_in_stations == 1 ) station_weight[
i-1] = 0.33;
161 else station_weight[
i-1] = 0.67;
164 if ( position_in_stations == 1 ) station_weight[
i-1] = 0.23;
165 else if( position_in_stations == 2 ) station_weight[
i-1] = 0.33;
166 else station_weight[
i-1] = 0.44;
169 if ( position_in_stations == 1 ) station_weight[
i-1] = 0.10;
170 else if( position_in_stations == 2 ) station_weight[
i-1] = 0.20;
171 else if( position_in_stations == 3 ) station_weight[
i-1] = 0.30;
172 else station_weight[
i-1] = 0.40;
179 station_weight[
i-1] = 1./nr_of_stations_crossed;
182 if( use_weight_regain_at_chamber_boundary ) {
183 if(station_has_segmentmatch[
i-1] <= 0 && stations_w_track_at_boundary[
i-1] != 0. ) {
187 station_weight[
i-1] = station_weight[
i-1]*attenuate_weight_regain*0.5*(TMath::Erf(stations_w_track_at_boundary[
i-1]/6.)+1.);
189 else if(station_has_segmentmatch[
i-1] <= 0 && stations_w_track_at_boundary[
i-1] == 0.) {
191 station_weight[
i-1] = 0.;
195 if(station_has_segmentmatch[
i-1] <= 0) station_weight[
i-1] = 0.;
198 if( station_has_segmentmatch[
i-1] > 0 && 42 == 42 ) {
200 if( muon.
dY(
i,1,arbitrationType) < 999999 && muon.
dX(
i,1,arbitrationType) < 999999) {
202 TMath::Sqrt(TMath::Power(muon.
pullX(
i,1,arbitrationType),2.)+TMath::Power(muon.
pullY(
i,1,arbitrationType),2.))> 1. ) {
204 if(use_match_dist_penalty) {
206 if(TMath::Sqrt(TMath::Power(muon.
dX(
i,1,arbitrationType),2.)+TMath::Power(muon.
dY(
i,1,arbitrationType),2.)) < 3. && TMath::Sqrt(TMath::Power(muon.
pullX(
i,1,arbitrationType),2.)+TMath::Power(muon.
pullY(
i,1,arbitrationType),2.)) > 3. ) {
207 station_weight[
i-1] *= 1./TMath::Power(
208 TMath::Max((
double)TMath::Sqrt(TMath::Power(muon.
dX(
i,1,arbitrationType),2.)+TMath::Power(muon.
dY(
i,1,arbitrationType),2.)),(
double)1.),.25);
211 station_weight[
i-1] *= 1./TMath::Power(
212 TMath::Sqrt(TMath::Power(muon.
pullX(
i,1,arbitrationType),2.)+TMath::Power(muon.
pullY(
i,1,arbitrationType),2.)),.25);
217 else if (muon.
dY(
i,1,arbitrationType) >= 999999) {
218 if( muon.
pullX(
i,1,arbitrationType) > 1. ) {
220 if(use_match_dist_penalty) {
222 if( muon.
dX(
i,1,arbitrationType) < 3. && muon.
pullX(
i,1,arbitrationType) > 3. ) {
223 station_weight[
i-1] *= 1./TMath::Power(
TMath::Max((
double)muon.
dX(
i,1,arbitrationType),(double)1.),.25);
226 station_weight[
i-1] *= 1./TMath::Power(muon.
pullX(
i,1,arbitrationType),.25);
232 if( muon.
pullY(
i,1,arbitrationType) > 1. ) {
234 if(use_match_dist_penalty) {
236 if( muon.
dY(
i,1,arbitrationType) < 3. && muon.
pullY(
i,1,arbitrationType) > 3. ) {
237 station_weight[
i-1] *= 1./TMath::Power(
TMath::Max((
double)muon.
dY(
i,1,arbitrationType),(double)1.),.25);
240 station_weight[
i-1] *= 1./TMath::Power(muon.
pullY(
i,1,arbitrationType),.25);
248 TMath::Sqrt(TMath::Power(muon.
pullX(
i-4,2,arbitrationType),2.)+TMath::Power(muon.
pullY(
i-4,2,arbitrationType),2.)) > 1. ) {
250 if(use_match_dist_penalty) {
252 if(TMath::Sqrt(TMath::Power(muon.
dX(
i-4,2,arbitrationType),2.)+TMath::Power(muon.
dY(
i-4,2,arbitrationType),2.)) < 3. && TMath::Sqrt(TMath::Power(muon.
pullX(
i-4,2,arbitrationType),2.)+TMath::Power(muon.
pullY(
i-4,2,arbitrationType),2.)) > 3. ) {
253 station_weight[
i-1] *= 1./TMath::Power(
254 TMath::Max((
double)TMath::Sqrt(TMath::Power(muon.
dX(
i-4,2,arbitrationType),2.)+TMath::Power(muon.
dY(
i-4,2,arbitrationType),2.)),(
double)1.),.25);
257 station_weight[
i-1] *= 1./TMath::Power(
258 TMath::Sqrt(TMath::Power(muon.
pullX(
i-4,2,arbitrationType),2.)+TMath::Power(muon.
pullY(
i-4,2,arbitrationType),2.)),.25);
271 station_weight[
i-1] = 0.;
275 full_weight += station_weight[
i-1];
281 if( nr_of_stations_crossed == 0 ) {
296 double minCompatibility,
299 bool goodMuon =
false;
305 else goodMuon =
false;
323 double maxChamberDist,
324 double maxChamberDistPull,
326 bool syncMinNMatchesNRequiredStationsInBarrelOnly,
327 bool applyAlsoAngularCuts)
330 bool goodMuon =
false;
335 if(minNumberOfMatches == 0)
return true;
337 unsigned int theStationMask = muon.
stationMask(arbitrationType);
338 unsigned int theRequiredStationMask =
RequiredStationMask(muon, maxChamberDist, maxChamberDistPull, arbitrationType);
342 int numRequiredStations = 0;
343 for(
int it = 0; it < 8; ++it) {
344 if(theStationMask & 1<<it) ++numSegs;
345 if(theRequiredStationMask & 1<<it) ++numRequiredStations;
350 if (syncMinNMatchesNRequiredStationsInBarrelOnly) {
352 if (fabs(muon.
eta()) < 1.2) {
353 if(minNumberOfMatches > numRequiredStations)
354 minNumberOfMatches = numRequiredStations;
355 if(minNumberOfMatches < 1)
356 minNumberOfMatches = 1;
359 if(minNumberOfMatches > numRequiredStations)
360 minNumberOfMatches = numRequiredStations;
361 if(minNumberOfMatches < 1)
362 minNumberOfMatches = 1;
365 if(numSegs >= minNumberOfMatches) goodMuon =
true;
372 if(theRequiredStationMask) {
373 for(
int stationIdx = 7; stationIdx >= 0; --stationIdx)
374 if(theRequiredStationMask & 1<<stationIdx){
375 if(theStationMask & 1<<stationIdx) {
376 lastSegBit = stationIdx;
385 for(
int stationIdx = 7; stationIdx >= 0; --stationIdx)
386 if(theStationMask & 1<<stationIdx) {
387 lastSegBit = stationIdx;
392 if(!goodMuon)
return false;
396 station = lastSegBit < 4 ? lastSegBit+1 : lastSegBit-3;
400 if(fabs(muon.
pullX(station,
detector,arbitrationType,
true)) > maxAbsPullX &&
401 fabs(muon.
dX(station,
detector,arbitrationType)) > maxAbsDx)
404 if(applyAlsoAngularCuts && fabs(muon.
pullDxDz(station,
detector,arbitrationType,
true)) > maxAbsPullX)
408 if (maxAbsDy < 999999) {
412 if(fabs(muon.
pullY(station,2,arbitrationType,
true)) > maxAbsPullY &&
413 fabs(muon.
dY(station,2,arbitrationType)) > maxAbsDy)
416 if(applyAlsoAngularCuts && fabs(muon.
pullDyDz(station,2,arbitrationType,
true)) > maxAbsPullY)
434 for (
int stationIdx = station; stationIdx > 0; --stationIdx) {
435 if(! (theStationMask & 1<<(stationIdx-1)))
438 if(muon.
dY(stationIdx,1,arbitrationType) > 999998)
441 if(fabs(muon.
pullY(stationIdx,1,arbitrationType,
true)) > maxAbsPullY &&
442 fabs(muon.
dY(stationIdx,1,arbitrationType)) > maxAbsDy) {
446 if(applyAlsoAngularCuts && fabs(muon.
pullDyDz(stationIdx,1,arbitrationType,
true)) > maxAbsPullY)
469 unsigned int theStationMask = muon.
stationMask(arbitrationType);
472 if (! theStationMask)
return false;
479 bool existsGoodDTSegX =
false;
480 bool existsDTSegY =
false;
484 for(
int stationIdx = 0; stationIdx <= 7; ++stationIdx)
485 if(theStationMask & 1<<stationIdx) {
486 station = stationIdx < 4 ? stationIdx+1 : stationIdx-3;
489 if((fabs(muon.
pullX(station,
detector,arbitrationType,
true)) > maxAbsPullX &&
490 fabs(muon.
dX(station,
detector,arbitrationType)) > maxAbsDx) ||
491 (applyAlsoAngularCuts && fabs(muon.
pullDxDz(station,
detector,arbitrationType,
true)) > maxAbsPullX))
494 existsGoodDTSegX =
true;
497 if (maxAbsDy < 999999) {
499 if((fabs(muon.
pullY(station,2,arbitrationType,
true)) > maxAbsPullY &&
500 fabs(muon.
dY(station,2,arbitrationType)) > maxAbsDy) ||
501 (applyAlsoAngularCuts && fabs(muon.
pullDyDz(station,2,arbitrationType,
true)) > maxAbsPullY))
505 if(muon.
dY(station,1,arbitrationType) > 999998)
510 if((fabs(muon.
pullY(station,1,arbitrationType,
true)) > maxAbsPullY &&
511 fabs(muon.
dY(station,1,arbitrationType)) > maxAbsDy) ||
512 (applyAlsoAngularCuts && fabs(muon.
pullDyDz(station,1,arbitrationType,
true)) > maxAbsPullY)) {
529 if (maxAbsDy < 999999) {
532 else if (existsGoodDTSegX)
540 if ( minNumberOfMatches == 0 )
return true;
543 for ( std::vector<reco::MuonChamberMatch>::const_iterator chamberMatch = muon.
matches().begin();
544 chamberMatch != muon.
matches().end(); ++chamberMatch )
546 if ( chamberMatch->detector() != 3 )
continue;
548 const double trkX = chamberMatch->x;
549 const double errX = chamberMatch->xErr;
551 for ( std::vector<reco::MuonRPCHitMatch>::const_iterator rpcMatch = chamberMatch->rpcMatches.begin();
552 rpcMatch != chamberMatch->rpcMatches.end(); ++rpcMatch )
554 const double rpcX = rpcMatch->x;
556 const double dX = fabs(rpcX-trkX);
557 if ( dX < maxAbsDx
or dX/errX < maxAbsPullX )
565 if ( nMatch >= minNumberOfMatches )
return true;
571 if ( minNumberOfMatches == 0 )
return true;
574 for (
const auto& chamberMatch : muon.
matches() )
578 const double trkX = chamberMatch.x;
579 const double errX = chamberMatch.xErr;
580 const double trkY = chamberMatch.y;
581 const double errY = chamberMatch.yErr;
583 for (
const auto& segment : chamberMatch.me0Matches )
586 const double me0X = segment.x;
587 const double me0ErrX = segment.xErr;
588 const double me0Y = segment.y;
589 const double me0ErrY = segment.yErr;
591 const double dX = fabs(me0X - trkX);
592 const double dY = fabs(me0Y - trkY);
593 const double pullX = dX/
std::sqrt(errX + me0ErrX);
594 const double pullY = dY/
std::sqrt(errY + me0ErrY);
596 if ( (dX < maxAbsDx
or pullX < maxAbsPullX) and (dY < maxAbsDy
or pullY < maxAbsPullY) )
604 return ( nMatch >= minNumberOfMatches );
609 if ( minNumberOfMatches == 0 )
return true;
612 for (
const auto& chamberMatch : muon.
matches() )
616 const double trkX = chamberMatch.x;
617 const double errX = chamberMatch.xErr;
618 const double trkY = chamberMatch.y;
619 const double errY = chamberMatch.yErr;
621 for (
const auto& segment : chamberMatch.gemMatches )
624 const double gemX = segment.x;
625 const double gemErrX = segment.xErr;
626 const double gemY = segment.y;
627 const double gemErrY = segment.yErr;
629 const double dX = fabs(gemX - trkX);
630 const double dY = fabs(gemY - trkY);
631 const double pullX = dX/
std::sqrt(errX + gemErrX);
632 const double pullY = dY/
std::sqrt(errY + gemErrY);
634 if ( (dX < maxAbsDx
or pullX < maxAbsPullX) and (dY < maxAbsDy
or pullY < maxAbsPullY) )
642 return ( nMatch >= minNumberOfMatches );
685 return muon.
isTrackerMuon() &&
isGoodMuon(muon,
TMLastStation,2,3,3,1E9,1E9,-3,-3,arbitrationType,
true,
false);
688 return muon.
isTrackerMuon() &&
isGoodMuon(muon,
TMLastStation,2,3,3,3,3,-3,-3,arbitrationType,
true,
false);
691 return muon.
isTrackerMuon() &&
isGoodMuon(muon,
TMOneStation,1,3,3,1E9,1E9,1E9,1E9,arbitrationType,
false,
false);
694 return muon.
isTrackerMuon() &&
isGoodMuon(muon,
TMOneStation,1,3,3,3,3,1E9,1E9,arbitrationType,
false,
false);
697 if (muon.
pt() < 8. && fabs(muon.
eta()) < 1.2)
698 return muon.
isTrackerMuon() &&
isGoodMuon(muon,
TMOneStation,1,3,3,1E9,1E9,1E9,1E9,arbitrationType,
false,
false);
700 return muon.
isTrackerMuon() &&
isGoodMuon(muon,
TMLastStation,2,3,3,1E9,1E9,-3,-3,arbitrationType,
false,
false);
703 if (muon.
pt() < 8. && fabs(muon.
eta()) < 1.2)
704 return muon.
isTrackerMuon() &&
isGoodMuon(muon,
TMOneStation,1,3,3,3,3,1E9,1E9,arbitrationType,
false,
false);
706 return muon.
isTrackerMuon() &&
isGoodMuon(muon,
TMLastStation,2,3,3,3,3,-3,-3,arbitrationType,
false,
false);
726 return muon.
isTrackerMuon() &&
isGoodMuon(muon,
TMLastStation,2,3,3,1E9,1E9,-3,-3,arbitrationType,
false,
true);
729 return muon.
isTrackerMuon() &&
isGoodMuon(muon,
TMLastStation,2,3,3,3,3,-3,-3,arbitrationType,
false,
true);
732 return muon.
isTrackerMuon() &&
isGoodMuon(muon,
TMOneStation,1,3,3,1E9,1E9,1E9,1E9,arbitrationType,
false,
true);
735 return muon.
isTrackerMuon() &&
isGoodMuon(muon,
TMOneStation,1,3,3,3,3,1E9,1E9,arbitrationType,
false,
true);
738 if (muon.
pt() < 8. && fabs(muon.
eta()) < 1.2)
739 return muon.
isTrackerMuon() &&
isGoodMuon(muon,
TMOneStation,1,3,3,1E9,1E9,1E9,1E9,arbitrationType,
false,
false);
741 return muon.
isTrackerMuon() &&
isGoodMuon(muon,
TMLastStation,2,3,3,1E9,1E9,-3,-3,arbitrationType,
true,
false);
744 if (muon.
pt() < 8. && fabs(muon.
eta()) < 1.2)
745 return muon.
isTrackerMuon() &&
isGoodMuon(muon,
TMOneStation,1,3,3,3,3,1E9,1E9,arbitrationType,
false,
false);
747 return muon.
isTrackerMuon() &&
isGoodMuon(muon,
TMLastStation,2,3,3,3,3,-3,-3,arbitrationType,
true,
false);
750 return muon.
isRPCMuon() &&
isGoodMuon(muon,
RPCMu, 2, 20, 4, 1e9, 1e9, 1e9, 1e9, arbitrationType,
false,
false);
756 return muon.
isME0Muon() &&
isGoodMuon(muon,
ME0Mu, 1, 1e9, 1e9, 1e9, 1e9, 1e9, 1e9, arbitrationType,
false,
false);
762 return muon.
isGEMMuon() &&
isGoodMuon(muon,
GEMMu, 1, 1e9, 1e9, 1e9, 1e9, 1e9, 1e9, arbitrationType,
false,
false);
773 double pullX,
double pullY,
bool checkAdjacentChambers)
777 unsigned int betterMuon = ( muon1.
pt() > muon2.
pt() ? 1 : 2 );
778 for ( std::vector<reco::MuonChamberMatch>::const_iterator chamber1 = muon1.
matches().begin();
779 chamber1 != muon1.
matches().end(); ++chamber1 )
780 for ( std::vector<reco::MuonChamberMatch>::const_iterator chamber2 = muon2.
matches().begin();
781 chamber2 != muon2.
matches().end(); ++chamber2 )
788 if ( chamber1->id == chamber2->id ){
790 if ( fabs(chamber1->x-chamber2->x) <
791 pullX *
sqrt(chamber1->xErr*chamber1->xErr+chamber2->xErr*chamber2->xErr) )
793 if ( betterMuon == 1 )
797 if ( nMatches1==0 || nMatches2==0 )
return true;
800 if ( fabs(chamber1->y-chamber2->y) <
801 pullY *
sqrt(chamber1->yErr*chamber1->yErr+chamber2->yErr*chamber2->yErr) )
803 if ( betterMuon == 1 )
807 if ( nMatches1==0 || nMatches2==0 )
return true;
810 if ( ! checkAdjacentChambers )
continue;
818 if ( id1.
ring() != id2.
ring() )
continue;
826 if ( fabs(chamber1->edgeX) > chamber1->xErr*pullX )
continue;
827 if ( fabs(chamber2->edgeX) > chamber2->xErr*pullX )
continue;
828 if ( chamber1->x * chamber2->x < 0 ) {
829 if ( betterMuon == 1 )
833 if ( nMatches1==0 || nMatches2==0 )
return true;
846 if ( not tk_id )
return false;
847 bool layer_requirements = muon.
innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 &&
848 muon.
innerTrack()->hitPattern().pixelLayersWithMeasurement() > 0;
850 return layer_requirements and match_requirements;
860 bool hits = muon.
innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 &&
861 muon.
innerTrack()->hitPattern().numberOfValidPixelHits() > 0;
866 return muID && hits && ip;
877 if (run2016_hip_mitigation){
878 if (muon.
innerTrack()->validFraction() < 0.49 )
return false;
880 if (muon.
innerTrack()->validFraction() < 0.8 )
return false;
892 bool run2016_hip_mitigation){
896 if(!muID)
return false;
898 bool layers = muon.
innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 &&
899 muon.
innerTrack()->hitPattern().pixelLayersWithMeasurement() > 0;
905 return layers && ip && (ishighq|run2016_hip_mitigation);
913 bool muValHits = ( muon.
globalTrack()->hitPattern().numberOfValidMuonHits()>0 ||
927 bool muID = muValHits && muMatchedSt;
929 bool hits = muon.
innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 &&
930 muon.
innerTrack()->hitPattern().numberOfValidPixelHits() > 0;
936 return muID && hits && momQuality && ip;
942 if(!muID)
return false;
944 bool hits = muon.
innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 &&
945 muon.
innerTrack()->hitPattern().numberOfValidPixelHits() > 0;
951 return muID && hits && momQuality && ip;
959 for(std::vector<reco::MuonChamberMatch>::const_iterator chamberMatch = mu.
matches().begin();
960 chamberMatch != mu.
matches().end(); ++chamberMatch) {
961 if (chamberMatch->segmentMatches.empty())
continue;
962 for(std::vector<reco::MuonChamberMatch>::const_iterator chamberMatch2 = mu2.
matches().begin();
963 chamberMatch2 != mu2.
matches().end(); ++chamberMatch2) {
964 if (chamberMatch2->segmentMatches.empty())
continue;
965 if (chamberMatch2->id() != chamberMatch->id())
continue;
966 for(std::vector<reco::MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
967 segmentMatch != chamberMatch->segmentMatches.end(); ++segmentMatch) {
968 if (!segmentMatch->isMask(segmentArbitrationMask))
continue;
969 for(std::vector<reco::MuonSegmentMatch>::const_iterator segmentMatch2 = chamberMatch2->segmentMatches.begin();
970 segmentMatch2 != chamberMatch2->segmentMatches.end(); ++segmentMatch2) {
971 if (!segmentMatch2->isMask(segmentArbitrationMask))
continue;
972 if ((segmentMatch->cscSegmentRef.isNonnull() && segmentMatch->cscSegmentRef == segmentMatch2->cscSegmentRef) ||
973 (segmentMatch-> dtSegmentRef.isNonnull() && segmentMatch-> dtSegmentRef == segmentMatch2-> dtSegmentRef) ) {
985 const auto& combinedTime = muon.
time();
986 const auto& rpcTime = muon.
rpcTime();
987 bool combinedTimeIsOk = (combinedTime.nDof>7);
988 bool rpcTimeIsOk = (rpcTime.nDof>1 && fabs(rpcTime.timeAtIpInOutErr)<0.001);
989 bool outOfTime =
false;
991 if ( (fabs(rpcTime.timeAtIpInOut)>10 ) &&
992 !(combinedTimeIsOk && fabs(combinedTime.timeAtIpInOut)<10) )
995 if (combinedTimeIsOk && (combinedTime.timeAtIpInOut>20 || combinedTime.timeAtIpInOut<-45))
1004 bool run2016_hip_mitigation )
1013 double dbCorrectedIsolation = chIso +
std::max( nIso + phoIso - .5*puIso, 0. ) ;
1014 double dbCorrectedRelIso = dbCorrectedIsolation/muon.
pt();
float chi2LocalPosition
chi2 value for the STA-TK matching of local position
float segmentX(int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
int numberOfMatchedRPCLayers(ArbitrationType type=RPCHitAndTrackArbitration) const
TrackRef track() const override
reference to a Track
bool isNonnull() const
Checks for non-null.
double eta() const final
momentum pseudorapidity
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
bool isStandAloneMuon() const override
float sumPt
sum-pt of tracks
bool isMediumMuon(const reco::Muon &, bool run2016_hip_mitigation=false)
virtual TrackRef innerTrack() const
double pt() const final
transverse momentum
float trkKink
value of the kink algorithm applied to the inner track stub
bool isMatchesValid() const
float sumPhotonEt
sum pt of PF photons
float trkRelChi2
chi2 value for the inner track stub with respect to the global track
const Point & position() const
position
MuonTime time() const
get DT/CSC combined timing information
float caloCompatibility(const reco::Muon &muon)
bool isLooseMuon(const reco::Muon &)
float sumNeutralHadronEt
sum pt of neutral hadrons
SelectionType
Selector type.
bool isTrackerMuon() const override
bool overlap(const reco::Muon &muon1, const reco::Muon &muon2, double pullX=1.0, double pullY=1.0, bool checkAdjacentChambers=false)
unsigned int expectedNnumberOfMatchedStations(float minDistanceFromEdge=10.0) const
float trackDistErr(int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float sumPUPt
sum pt of charged Particles not from PV (for Pu corrections)
float dY(int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
virtual TrackRef muonBestTrack() const
bool isGlobalMuon() const override
ArbitrationType
define arbitration schemes
float pullDxDz(int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration, bool includeSegmentError=true) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
MuonQuality combinedQuality() const
get energy deposition information
Abs< T >::type abs(const T &t)
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
bool isQualityValid() const
bool isSoftMuon(const reco::Muon &, const reco::Vertex &, bool run2016_hip_mitigation=false)
float dX(int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float pullY(int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration, bool includeSegmentError=true) const
virtual TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
unsigned int stationMask(ArbitrationType type=SegmentAndTrackArbitration) const
int numberOfMatchedStations(ArbitrationType type=SegmentAndTrackArbitration) const
reco::Muon::Selector makeSelectorBitset(reco::Muon const &muon, reco::Vertex const *vertex=0, bool run2016_hip_mitigation=false)
float staRelChi2
chi2 value for the outer track stub with respect to the global track
int sharedSegments(const reco::Muon &muon1, const reco::Muon &muon2, unsigned int segmentArbitrationMask=reco::MuonSegmentMatch::BestInChamberByDR)
bool isHighPtMuon(const reco::Muon &, const reco::Vertex &)
SelectionType selectionTypeFromString(const std::string &label)
const MuonPFIsolation & pfIsolationR04() const
a lightweight "map" for selection type string label and enum value
uint64_t selectors() const
unsigned int RequiredStationMask(const reco::Muon &muon, double maxChamberDist, double maxChamberDistPull, reco::Muon::ArbitrationType arbitrationType)
std::vector< MuonChamberMatch > & matches()
get muon matching information
int numberOfMatches(ArbitrationType type=SegmentAndTrackArbitration) const
get number of chambers with matched segments
MuonTime rpcTime() const
get RPC timing information
float pullDyDz(int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration, bool includeSegmentError=true) const
float trackDist(int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
bool outOfTimeMuon(const reco::Muon &muon)
virtual TrackRef tunePMuonBestTrack() const
bool isTrackerHighPtMuon(const reco::Muon &, const reco::Vertex &)
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
bool isLooseTriggerMuon(const reco::Muon &)
float caloCompatibility() const
const MuonIsolation & isolationR03() const
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
float pullX(int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration, bool includeSegmentError=true) const
float sumChargedHadronPt
sum-pt of charged Hadron