29 : theGMFilterSwitch(cfg.getParameter<
bool>(
"applyGlobalMuonFilter")),
30 theIsoFilterSwitch(cfg.getParameter<
bool>(
"applyIsolationtest")),
31 theJetCountFilterSwitch(cfg.getParameter<
bool>(
"applyJetCountFilter")) {
33 LogDebug(
"Alignment") <<
"> applying global Trackfilter ...";
40 LogDebug(
"Alignment") <<
"> GlobalMuonFilter : source, maxTrackDeltaR, min. Count : " << theMuonSource
50 LogDebug(
"Alignment") <<
"> Isolationtest : source, maxJetPt, minJetDeltaR, min. Count: " << theJetIsoSource
59 LogDebug(
"Alignment") <<
"> JetCountFilter : source, minJetPt, maxJetCount : " << theJetCountSource
84 LogDebug(
"Alignment") <<
"> Global: tracks all, kept: " << tracks.size() <<
", " << result.size();
102 for (reco::MuonCollection::const_iterator itMuon = muons->begin(); itMuon != muons->end(); ++itMuon) {
105 LogDebug(
"Alignment") <<
"@SUB=AlignmentGlobalTrackSelector::findMuons" 106 <<
"Found muon without track: Standalone Muon!";
108 globalMuons.push_back(muonTrack);
112 LogError(
"Alignment") <<
"@SUB=AlignmentGlobalTrackSelector::findMuons" 113 <<
"> could not optain mounCollection!";
134 for (Tracks::const_iterator it = cands.begin(); it != cands.end(); ++it) {
136 for (reco::CaloJetCollection::const_iterator itJet = jets->begin(); itJet != jets->end(); ++itJet)
140 result.push_back(*it);
145 LogError(
"Alignment") <<
"@SUB=AlignmentGlobalTrackSelector::checkIsolation" 146 <<
"> could not optain jetCollection!";
165 for (reco::CaloJetCollection::const_iterator itJet = jets->begin(); itJet != jets->end(); ++itJet) {
173 LogDebug(
"Alignment") <<
"> found " << jetCount <<
" Jets";
175 LogError(
"Alignment") <<
"@SUB=AlignmentGlobalTrackSelector::checkJetCount" 176 <<
"> could not optain jetCollection!";
187 for (Tracks::const_iterator itComp = comp.begin(); itComp != comp.end(); ++itComp) {
190 for (
unsigned int i = 0;
i < src.size();
i++) {
192 if (min >
deltaR(*(src.at(
i)), *(*itComp))) {
193 min =
deltaR(*(src.at(
i)), *(*itComp));
194 match =
static_cast<int>(
i);
198 result.push_back(src.at(match));
206 LogDebug(
"Alignment") <<
">......................................";
207 for (Tracks::const_iterator it = col.begin(); it < col.end(); ++it, ++
count) {
208 LogDebug(
"Alignment") <<
"> Track No. " << count <<
": p = (" << (*it)->px() <<
"," << (*it)->py() <<
"," 209 << (*it)->pz() <<
")\n" 210 <<
"> pT = " << (*it)->pt() <<
" eta = " << (*it)->eta()
211 <<
" charge = " << (*it)->charge();
213 LogDebug(
"Alignment") <<
">......................................";
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
AlignmentGlobalTrackSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
constructor
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Tracks findMuons(const Tracks &tracks, const edm::Event &iEvent) const
filter for Tracks that match the Track of a global Muon
std::vector< const reco::Track * > Tracks
edm::EDGetTokenT< reco::CaloJetCollection > theJetCountToken
std::vector< Muon > MuonCollection
collection of Muon objects
Tracks select(const Tracks &tracks, const edm::Event &iEvent, const edm::EventSetup &eSetup)
select tracks
Tracks checkJetCount(const Tracks &cands, const edm::Event &iEvent) const
returns [tracks] if there are less than theMaxCount Jets with theMinJetPt and an empty set if not ...
bool theJetCountFilterSwitch
~AlignmentGlobalTrackSelector()
destructor
void printTracks(const Tracks &col) const
print Information on Track-Collection
edm::EDGetTokenT< reco::MuonCollection > theMuonToken
Tracks checkIsolation(const Tracks &cands, const edm::Event &iEvent) const
returns only isolated tracks in [cands]
int theMinGlobalMuonCount
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
bool useThisFilter()
returns if any of the Filters is used.
edm::EDGetTokenT< reco::CaloJetCollection > theJetIsoToken
Tracks matchTracks(const Tracks &src, const Tracks &comp) const
matches [src] with [comp] returns collection with matching Tracks coming from [src] ...
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects