File indexing completed on 2025-02-05 23:50:57
0001 #ifndef Alignment_CommonAlignmentAlgorithm_AlignmentGlobalTrackSelector_h
0002 #define Alignment_CommonAlignmentAlgorithm_AlignmentGlobalTrackSelector_h
0003
0004 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
0005 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0006
0007
0008 #include "FWCore/Framework/interface/ConsumesCollector.h"
0009 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0010 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0011 #include "FWCore/Utilities/interface/EDGetToken.h"
0012
0013 #include <vector>
0014
0015 namespace reco {
0016 class Track;
0017 }
0018 namespace edm {
0019 class Event;
0020 class EventSetup;
0021 }
0022
0023 class AlignmentGlobalTrackSelector {
0024 public:
0025 typedef std::vector<const reco::Track*> Tracks;
0026
0027
0028 AlignmentGlobalTrackSelector(const edm::ParameterSet& cfg, edm::ConsumesCollector& iC);
0029
0030
0031 ~AlignmentGlobalTrackSelector();
0032
0033
0034 Tracks select(const Tracks& tracks, const edm::Event& iEvent, const edm::EventSetup& eSetup);
0035
0036 bool useThisFilter();
0037
0038 static void fillPSetDescription(edm::ParameterSetDescription& desc);
0039
0040 private:
0041
0042 Tracks checkJetCount(const Tracks& cands, const edm::Event& iEvent) const;
0043
0044 Tracks checkIsolation(const Tracks& cands, const edm::Event& iEvent) const;
0045
0046 Tracks findMuons(const Tracks& tracks, const edm::Event& iEvent) const;
0047
0048
0049 edm::ParameterSet theConf;
0050
0051
0052 bool theGMFilterSwitch;
0053 bool theIsoFilterSwitch;
0054 bool theJetCountFilterSwitch;
0055
0056
0057 edm::EDGetTokenT<reco::MuonCollection> theMuonToken;
0058 double theMaxTrackDeltaR;
0059 int theMinGlobalMuonCount;
0060
0061
0062 edm::EDGetTokenT<reco::CaloJetCollection> theJetIsoToken;
0063 double theMaxJetPt;
0064 double theMinJetDeltaR;
0065 int theMinIsolatedCount;
0066
0067
0068 edm::EDGetTokenT<reco::CaloJetCollection> theJetCountToken;
0069 double theMinJetPt;
0070 int theMaxJetCount;
0071
0072
0073
0074
0075 void printTracks(const Tracks& col) const;
0076
0077
0078 Tracks matchTracks(const Tracks& src, const Tracks& comp) const;
0079 };
0080
0081 #endif