Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73215
b: "refs/heads/CMSSW_7_1_X"
c: 5ad8bb8
h: "refs/heads/CMSSW_7_1_X"
i:
  73213: 12392ce
  73211: 0c1f900
  73207: 5f30b14
  73199: 9fa96a2
  73183: 473d645
  73151: d98c59e
  73087: 196a425
  72959: 5fb1bbf
  72703: 6a76832
v: v3
  • Loading branch information
Adam Everett committed Sep 9, 2009
1 parent f47f38f commit 3ac0fd2
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 70 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e
"refs/heads/CMSSW_7_1_X": 99217b76de0bda8b824e49113e981243d365b516
"refs/heads/CMSSW_7_1_X": 5ad8bb886f7309b49b59d49c732457fb327f5187
29 changes: 27 additions & 2 deletions trunk/DataFormats/MuonReco/interface/Muon.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* \author Luca Lista, Claudio Campagnari, Dmytro Kovalskyi, Jake Ribnik
*
* \version $Id: Muon.h,v 1.51 2009/03/27 15:45:23 dmytro Exp $
* \version $Id: Muon.h,v 1.52 2009/06/29 20:02:44 elmer Exp $
*
*/
#include "DataFormats/RecoCandidate/interface/RecoCandidate.h"
Expand Down Expand Up @@ -99,7 +99,24 @@ namespace reco {
const MuonIsolation& isolationR05() const { return isolationR05_; }
void setIsolation( const MuonIsolation& isoR03, const MuonIsolation& isoR05 );
bool isIsolationValid() const { return isolationValid_; }


///
/// ====================== Global Track Qualities ====================
///
/// chi2 of STA and TK stubs relative to GLB track
void setTrkKink(float kink) {trkKink_ = kink;}
void setGlbKink(float kink) {glbKink_ = kink;}
void setKinkR(float r) {kinkR_ = r;}
void setKinkZ(float z) {kinkZ_ = z;}
void setTrkRelChi2(float a) {trkRelChi2_ = a;}
void setStaRelChi2(float a) {staRelChi2_ = a;}
float trkKink() const { return trkKink_; }
float glbKink() const { return glbKink_; }
float kinkR() const { return kinkR_; }
float kinkZ() const { return kinkZ_; }
float trkRelChi2() const { return trkRelChi2_; }
float staRelChi2() const { return staRelChi2_; }

/// define arbitration schemes
enum ArbitrationType { NoArbitration, SegmentArbitration, SegmentAndTrackArbitration };

Expand Down Expand Up @@ -162,6 +179,14 @@ namespace reco {
MuonIsolation isolationR05_;
/// muon type mask
unsigned int type_;
/// muon track qualities
float trkKink_;
float glbKink_;
float kinkR_;
float kinkZ_;
float trkRelChi2_;
float staRelChi2_;


// FixMe: Still missing trigger information

Expand Down
7 changes: 5 additions & 2 deletions trunk/DataFormats/MuonReco/interface/MuonSelectors.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//
//
// Original Author: Jake Ribnik, Dmytro Kovalskyi
// $Id: MuonSelectors.h,v 1.5 2009/05/28 12:27:16 jribnik Exp $
// $Id: MuonSelectors.h,v 1.6 2009/06/19 15:46:15 jribnik Exp $

#include "DataFormats/MuonReco/interface/Muon.h"
#include "TMath.h"
Expand All @@ -28,7 +28,10 @@ namespace muon {
TMOneStationLoose, // require one well matched segment
TMOneStationTight, // require one well matched segment
TMLastStationOptimizedLowPtLoose, // combination of TMLastStation and TMOneStation
TMLastStationOptimizedLowPtTight // combination of TMLastStation and TMOneStation
TMLastStationOptimizedLowPtTight, // combination of TMLastStation and TMOneStation
GMTkChiCompatibility, // require tk stub have good chi2 relative to glb track
GMStaChiCompatibility, // require sta stub have good chi2 compatibility relative to glb track
GMTkKinkTight // require a small kink value in the tracker stub
};

/// a lightweight "map" for selection type string label and enum value
Expand Down
142 changes: 77 additions & 65 deletions trunk/DataFormats/MuonReco/src/MuonSelectors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ SelectionType selectionTypeFromString( const std::string &label )
{ "TMOneStationTight", TMOneStationTight },
{ "TMLastStationOptimizedLowPtLoose", TMLastStationOptimizedLowPtLoose },
{ "TMLastStationOptimizedLowPtTight", TMLastStationOptimizedLowPtTight },
{ "GMTkChiCompatibility", GMTkChiCompatibility },
{ "GMStaChiCompatibility", GMStaChiCompatibility},
{ "GMTkKinkTight", GMTkKinkTight},
{ 0, (SelectionType)-1 }
};

Expand Down Expand Up @@ -499,71 +502,80 @@ bool muon::isGoodMuon( const reco::Muon& muon,
bool muon::isGoodMuon( const reco::Muon& muon, SelectionType type )
{
switch (type)
{
case muon::All:
return true;
break;
case muon::AllGlobalMuons:
return muon.isGlobalMuon();
break;
case muon::AllTrackerMuons:
return muon.isTrackerMuon();
break;
case muon::AllStandAloneMuons:
return muon.isStandAloneMuon();
break;
case muon::TrackerMuonArbitrated:
return muon.isTrackerMuon() && muon.numberOfMatches(reco::Muon::SegmentAndTrackArbitration)>0;
break;
case muon::AllArbitrated:
return ! muon.isTrackerMuon() || muon.numberOfMatches(reco::Muon::SegmentAndTrackArbitration)>0;
break;
case muon::GlobalMuonPromptTight:
return muon.isGlobalMuon() && muon.globalTrack()->normalizedChi2()<10. && muon.outerTrack()->numberOfValidHits() >0;
break;
// For "Loose" algorithms we choose maximum y quantity cuts of 1E9 instead of
// 9999 as before. We do this because the muon methods return 999999 (note
// there are six 9's) when the requested information is not available. For
// example, if a muon fails to traverse the z measuring superlayer in a station
// in the DT, then all methods involving segmentY in this station return
// 999999 to demonstrate that the information is missing. In order to not
// penalize muons for missing y information in Loose algorithms where we do
// not care at all about y information, we raise these limits. In the
// TMLastStation and TMOneStation algorithms we actually use this huge number
// to determine whether to consider y information at all.
case muon::TMLastStationLoose:
return isGoodMuon(muon,TMLastStation,2,3,3,1E9,1E9,-3,-3,reco::Muon::SegmentAndTrackArbitration);
break;
case muon::TMLastStationTight:
return isGoodMuon(muon,TMLastStation,2,3,3,3,3,-3,-3,reco::Muon::SegmentAndTrackArbitration);
break;
case muon::TMOneStationLoose:
{
case muon::All:
return true;
break;
case muon::AllGlobalMuons:
return muon.isGlobalMuon();
break;
case muon::AllTrackerMuons:
return muon.isTrackerMuon();
break;
case muon::AllStandAloneMuons:
return muon.isStandAloneMuon();
break;
case muon::TrackerMuonArbitrated:
return muon.isTrackerMuon() && muon.numberOfMatches(reco::Muon::SegmentAndTrackArbitration)>0;
break;
case muon::AllArbitrated:
return ! muon.isTrackerMuon() || muon.numberOfMatches(reco::Muon::SegmentAndTrackArbitration)>0;
break;
case muon::GlobalMuonPromptTight:
return muon.isGlobalMuon() && muon.globalTrack()->normalizedChi2()<10. && muon.outerTrack()->numberOfValidHits() >0;
break;
// For "Loose" algorithms we choose maximum y quantity cuts of 1E9 instead of
// 9999 as before. We do this because the muon methods return 999999 (note
// there are six 9's) when the requested information is not available. For
// example, if a muon fails to traverse the z measuring superlayer in a station
// in the DT, then all methods involving segmentY in this station return
// 999999 to demonstrate that the information is missing. In order to not
// penalize muons for missing y information in Loose algorithms where we do
// not care at all about y information, we raise these limits. In the
// TMLastStation and TMOneStation algorithms we actually use this huge number
// to determine whether to consider y information at all.
case muon::TMLastStationLoose:
return isGoodMuon(muon,TMLastStation,2,3,3,1E9,1E9,-3,-3,reco::Muon::SegmentAndTrackArbitration);
break;
case muon::TMLastStationTight:
return isGoodMuon(muon,TMLastStation,2,3,3,3,3,-3,-3,reco::Muon::SegmentAndTrackArbitration);
break;
case muon::TMOneStationLoose:
return isGoodMuon(muon,TMOneStation,1,3,3,1E9,1E9,1E9,1E9,reco::Muon::SegmentAndTrackArbitration);
break;
case muon::TMOneStationTight:
return isGoodMuon(muon,TMOneStation,1,3,3,3,3,1E9,1E9,reco::Muon::SegmentAndTrackArbitration);
break;
case muon::TMLastStationOptimizedLowPtLoose:
if (muon.pt() < 8. && fabs(muon.eta()) < 1.2)
return isGoodMuon(muon,TMOneStation,1,3,3,1E9,1E9,1E9,1E9,reco::Muon::SegmentAndTrackArbitration);
break;
case muon::TMOneStationTight:
else
return isGoodMuon(muon,TMLastStation,2,3,3,1E9,1E9,-3,-3,reco::Muon::SegmentAndTrackArbitration);
break;
case muon::TMLastStationOptimizedLowPtTight:
if (muon.pt() < 8. && fabs(muon.eta()) < 1.2)
return isGoodMuon(muon,TMOneStation,1,3,3,3,3,1E9,1E9,reco::Muon::SegmentAndTrackArbitration);
break;
case muon::TMLastStationOptimizedLowPtLoose:
if (muon.pt() < 8. && fabs(muon.eta()) < 1.2)
return isGoodMuon(muon,TMOneStation,1,3,3,1E9,1E9,1E9,1E9,reco::Muon::SegmentAndTrackArbitration);
else
return isGoodMuon(muon,TMLastStation,2,3,3,1E9,1E9,-3,-3,reco::Muon::SegmentAndTrackArbitration);
break;
case muon::TMLastStationOptimizedLowPtTight:
if (muon.pt() < 8. && fabs(muon.eta()) < 1.2)
return isGoodMuon(muon,TMOneStation,1,3,3,3,3,1E9,1E9,reco::Muon::SegmentAndTrackArbitration);
else
return isGoodMuon(muon,TMLastStation,2,3,3,3,3,-3,-3,reco::Muon::SegmentAndTrackArbitration);
break;
//compatibility loose
case muon::TM2DCompatibilityLoose:
return isGoodMuon(muon,TM2DCompatibility,0.7);
break;
//compatibility tight
case muon::TM2DCompatibilityTight:
return isGoodMuon(muon,TM2DCompatibility,1.0);
break;
default:
return false;
}
else
return isGoodMuon(muon,TMLastStation,2,3,3,3,3,-3,-3,reco::Muon::SegmentAndTrackArbitration);
break;
//compatibility loose
case muon::TM2DCompatibilityLoose:
return isGoodMuon(muon,TM2DCompatibility,0.7);
break;
//compatibility tight
case muon::TM2DCompatibilityTight:
return isGoodMuon(muon,TM2DCompatibility,1.0);
break;
case muon::GMTkChiCompatibility:
return muon.isGlobalMuon() && fabs(muon.trkRelChi2() - muon.innerTrack()->normalizedChi2()) < 20.0;
break;
case muon::GMStaChiCompatibility:
return muon.isGlobalMuon() && fabs(muon.staRelChi2() - muon.outerTrack()->normalizedChi2()) < 20.0;
break;
case muon::GMTkKinkTight:
return muon.isGlobalMuon() && muon.trkKink() < 100.0;
break;
default:
return false;
}
}

0 comments on commit 3ac0fd2

Please sign in to comment.