1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
#ifndef Alignment_CommonAlignmentAlgorithm_AlignmentGlobalTrackSelector_h
#define Alignment_CommonAlignmentAlgorithm_AlignmentGlobalTrackSelector_h
#include "DataFormats/JetReco/interface/CaloJetCollection.h"
#include "DataFormats/MuonReco/interface/MuonFwd.h"
//Framework
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "FWCore/Utilities/interface/EDGetToken.h"
//STL
#include <vector>
namespace reco {
class Track;
}
namespace edm {
class Event;
class EventSetup;
} // namespace edm
class AlignmentGlobalTrackSelector {
public:
typedef std::vector<const reco::Track*> Tracks;
/// constructor
AlignmentGlobalTrackSelector(const edm::ParameterSet& cfg, edm::ConsumesCollector& iC);
/// destructor
~AlignmentGlobalTrackSelector();
/// select tracks
Tracks select(const Tracks& tracks, const edm::Event& iEvent, const edm::EventSetup& eSetup);
///returns if any of the Filters is used.
bool useThisFilter();
static void fillPSetDescription(edm::ParameterSetDescription& desc);
private:
///returns [tracks] if there are less than theMaxCount Jets with theMinJetPt and an empty set if not
Tracks checkJetCount(const Tracks& cands, const edm::Event& iEvent) const;
///returns only isolated tracks in [cands]
Tracks checkIsolation(const Tracks& cands, const edm::Event& iEvent) const;
///filter for Tracks that match the Track of a global Muon
Tracks findMuons(const Tracks& tracks, const edm::Event& iEvent) const;
/// private data members
edm::ParameterSet theConf;
//settings from conigfile
bool theGMFilterSwitch;
bool theIsoFilterSwitch;
bool theJetCountFilterSwitch;
//global Muon Filter
edm::EDGetTokenT<reco::MuonCollection> theMuonToken;
double theMaxTrackDeltaR;
int theMinGlobalMuonCount;
//isolation Cut
edm::EDGetTokenT<reco::CaloJetCollection> theJetIsoToken;
double theMaxJetPt;
double theMinJetDeltaR;
int theMinIsolatedCount;
//jet count Filter
edm::EDGetTokenT<reco::CaloJetCollection> theJetCountToken;
double theMinJetPt;
int theMaxJetCount;
//helpers
///print Information on Track-Collection
void printTracks(const Tracks& col) const;
///matches [src] with [comp] returns collection with matching Tracks coming from [src]
Tracks matchTracks(const Tracks& src, const Tracks& comp) const;
};
#endif
|