CMS 3D CMS Logo

CMGMuonCleanerBySegmentsAlgo.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_Heppy_CMGMuonCleanerBySegmentsAlgo_h
2 #define PhysicsTools_Heppy_CMGMuonCleanerBySegmentsAlgo_h
3 
6 #include <vector>
7 
8 namespace heppy {
9 
11  public:
12  CMGMuonCleanerBySegmentsAlgo(double sharedFraction = 0.499,
13  const std::string &preselection = "track.isNonnull",
14  const std::string &passthrough = "isGlobalMuon && numberOfMatches >= 2")
15  : sharedFraction_(sharedFraction), preselection_(preselection, true), passthrough_(passthrough, true) {}
17 
19  std::vector<bool> clean(const std::vector<pat::Muon> &muons) const;
20 
21  private:
24 
29 
31  bool isSameMuon(const pat::Muon &mu1, const pat::Muon &mu2) const;
32  bool isBetterMuon(const pat::Muon &mu1, bool mu1PF, const pat::Muon &mu2, bool mu2PF) const;
33  };
34 
35 } // namespace heppy
36 
37 #endif
PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
Muon.h
heppy::CMGMuonCleanerBySegmentsAlgo::clean
std::vector< bool > clean(const std::vector< pat::Muon > &muons) const
Return a vector of boolean marking the muons to be considered clean.
Definition: CMGMuonCleanerBySegmentsAlgo.cc:7
heppy::CMGMuonCleanerBySegmentsAlgo::~CMGMuonCleanerBySegmentsAlgo
~CMGMuonCleanerBySegmentsAlgo()
Definition: CMGMuonCleanerBySegmentsAlgo.cc:5
pat::Muon
Analysis-level muon class.
Definition: Muon.h:51
heppy::CMGMuonCleanerBySegmentsAlgo::isSameMuon
bool isSameMuon(const pat::Muon &mu1, const pat::Muon &mu2) const
Methods.
Definition: CMGMuonCleanerBySegmentsAlgo.cc:46
heppy::CMGMuonCleanerBySegmentsAlgo::passthrough_
StringCutObjectSelector< pat::Muon > passthrough_
Always-accept cut.
Definition: CMGMuonCleanerBySegmentsAlgo.h:28
singleTopDQM_cfi.preselection
preselection
Definition: singleTopDQM_cfi.py:78
heppy::CMGMuonCleanerBySegmentsAlgo
Definition: CMGMuonCleanerBySegmentsAlgo.h:10
heppy
TAKEN FROM http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/ElectroWeakAnalysis/Utilities/src/PdfWeig...
Definition: AlphaT.h:16
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
heppy::CMGMuonCleanerBySegmentsAlgo::preselection_
StringCutObjectSelector< pat::Muon > preselection_
Preselection cut.
Definition: CMGMuonCleanerBySegmentsAlgo.h:26
funct::true
true
Definition: Factorize.h:173
heppy::CMGMuonCleanerBySegmentsAlgo::isBetterMuon
bool isBetterMuon(const pat::Muon &mu1, bool mu1PF, const pat::Muon &mu2, bool mu2PF) const
Definition: CMGMuonCleanerBySegmentsAlgo.cc:52
heppy::CMGMuonCleanerBySegmentsAlgo::sharedFraction_
double sharedFraction_
Fraction of shared segments.
Definition: CMGMuonCleanerBySegmentsAlgo.h:23
heppy::CMGMuonCleanerBySegmentsAlgo::CMGMuonCleanerBySegmentsAlgo
CMGMuonCleanerBySegmentsAlgo(double sharedFraction=0.499, const std::string &preselection="track.isNonnull", const std::string &passthrough="isGlobalMuon && numberOfMatches >= 2")
Definition: CMGMuonCleanerBySegmentsAlgo.h:12
StringCutObjectSelector.h
StringCutObjectSelector< pat::Muon >