diff --git a/[refs] b/[refs] index 824cb62c5df28..697d632c4175f 100644 --- a/[refs] +++ b/[refs] @@ -1,3 +1,3 @@ --- refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e -"refs/heads/CMSSW_7_1_X": 99217b76de0bda8b824e49113e981243d365b516 +"refs/heads/CMSSW_7_1_X": 5ad8bb886f7309b49b59d49c732457fb327f5187 diff --git a/trunk/DataFormats/MuonReco/interface/Muon.h b/trunk/DataFormats/MuonReco/interface/Muon.h index de6644cab6355..b19f9b35208fc 100755 --- a/trunk/DataFormats/MuonReco/interface/Muon.h +++ b/trunk/DataFormats/MuonReco/interface/Muon.h @@ -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" @@ -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 }; @@ -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 diff --git a/trunk/DataFormats/MuonReco/interface/MuonSelectors.h b/trunk/DataFormats/MuonReco/interface/MuonSelectors.h index c7f92543f8966..57d0472d2594e 100644 --- a/trunk/DataFormats/MuonReco/interface/MuonSelectors.h +++ b/trunk/DataFormats/MuonReco/interface/MuonSelectors.h @@ -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" @@ -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 diff --git a/trunk/DataFormats/MuonReco/src/MuonSelectors.cc b/trunk/DataFormats/MuonReco/src/MuonSelectors.cc index f4929c381846c..dc3c37d33cbc9 100644 --- a/trunk/DataFormats/MuonReco/src/MuonSelectors.cc +++ b/trunk/DataFormats/MuonReco/src/MuonSelectors.cc @@ -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 } }; @@ -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; + } }