File indexing completed on 2024-04-06 11:56:13
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/Utilities/interface/EDGetToken.h"
0011
0012 #include <vector>
0013
0014 namespace reco {
0015 class Track;
0016 }
0017 namespace edm {
0018 class Event;
0019 class EventSetup;
0020 }
0021
0022 class AlignmentGlobalTrackSelector {
0023 public:
0024 typedef std::vector<const reco::Track*> Tracks;
0025
0026
0027 AlignmentGlobalTrackSelector(const edm::ParameterSet& cfg, edm::ConsumesCollector& iC);
0028
0029
0030 ~AlignmentGlobalTrackSelector();
0031
0032
0033 Tracks select(const Tracks& tracks, const edm::Event& iEvent, const edm::EventSetup& eSetup);
0034
0035 bool useThisFilter();
0036
0037 private:
0038
0039 Tracks checkJetCount(const Tracks& cands, const edm::Event& iEvent) const;
0040
0041 Tracks checkIsolation(const Tracks& cands, const edm::Event& iEvent) const;
0042
0043 Tracks findMuons(const Tracks& tracks, const edm::Event& iEvent) const;
0044
0045
0046 edm::ParameterSet theConf;
0047
0048
0049 bool theGMFilterSwitch;
0050 bool theIsoFilterSwitch;
0051 bool theJetCountFilterSwitch;
0052
0053
0054 edm::EDGetTokenT<reco::MuonCollection> theMuonToken;
0055 double theMaxTrackDeltaR;
0056 int theMinGlobalMuonCount;
0057
0058
0059 edm::EDGetTokenT<reco::CaloJetCollection> theJetIsoToken;
0060 double theMaxJetPt;
0061 double theMinJetDeltaR;
0062 int theMinIsolatedCount;
0063
0064
0065 edm::EDGetTokenT<reco::CaloJetCollection> theJetCountToken;
0066 double theMinJetPt;
0067 int theMaxJetCount;
0068
0069
0070
0071
0072 void printTracks(const Tracks& col) const;
0073
0074
0075 Tracks matchTracks(const Tracks& src, const Tracks& comp) const;
0076 };
0077
0078 #endif