File indexing completed on 2023-03-17 11:16:33
0001 #ifndef PhysicsTools_PatUtils_MuonSelector_h
0002 #define PhysicsTools_PatUtils_MuonSelector_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include <string>
0021
0022 #include "DataFormats/MuonReco/interface/Muon.h"
0023
0024 #include "PhysicsTools/PatUtils/interface/ParticleCode.h"
0025 #include "DataFormats/MuonReco/interface/MuonSelectors.h"
0026
0027 namespace pat {
0028
0029
0030 struct MuonSelection {
0031 std::string selectionType;
0032
0033
0034
0035 double dPbyPmax;
0036 double chi2max;
0037 int nHitsMin;
0038
0039
0040
0041
0042 muon::SelectionType flag;
0043 double minCaloCompatibility;
0044 double minSegmentCompatibility;
0045
0046 };
0047
0048 class MuonSelector {
0049 public:
0050 MuonSelector(const MuonSelection& cfg) : config_(cfg) {}
0051 ~MuonSelector() {}
0052
0053
0054
0055 const pat::ParticleStatus filter(const unsigned int& index, const edm::View<reco::Muon>& muons) const;
0056
0057 private:
0058 MuonSelection config_;
0059
0060
0061 const pat::ParticleStatus customSelection_(const unsigned int& index, const edm::View<reco::Muon>& muons) const;
0062 const pat::ParticleStatus muIdSelection_(const unsigned int& index, const edm::View<reco::Muon>& muons) const;
0063
0064 };
0065 }
0066
0067 #endif