30 theGMFilterSwitch(cfg.getParameter<bool>(
"applyGlobalMuonFilter")),
31 theIsoFilterSwitch(cfg.getParameter<bool>(
"applyIsolationtest")),
32 theJetCountFilterSwitch(cfg.getParameter<bool>(
"applyJetCountFilter"))
35 LogDebug(
"Alignment") <<
"> applying global Trackfilter ...";
42 LogDebug(
"Alignment") <<
"> GlobalMuonFilter : source, maxTrackDeltaR, min. Count : "
43 << theMuonSource <<
" , "
44 << theMaxTrackDeltaR <<
" , "
54 LogDebug(
"Alignment") <<
"> Isolationtest : source, maxJetPt, minJetDeltaR, min. Count: "
55 << theJetIsoSource <<
" , "
56 << theMaxJetPt <<
" ,"
57 << theMinJetDeltaR <<
" ,"
66 LogDebug(
"Alignment") <<
"> JetCountFilter : source, minJetPt, maxJetCount : "
67 << theJetCountSource <<
" , "
68 << theMinJetPt <<
" ,"
92 LogDebug(
"Alignment") <<
"> Global: tracks all, kept: " << tracks.size() <<
", " << result.size();
111 for (reco::MuonCollection::const_iterator itMuon = muons->begin();
112 itMuon != muons->end();
116 LogDebug(
"Alignment") <<
"@SUB=AlignmentGlobalTrackSelector::findMuons"
117 <<
"Found muon without track: Standalone Muon!";
119 globalMuons.push_back(muonTrack);
123 LogError(
"Alignment") <<
"@SUB=AlignmentGlobalTrackSelector::findMuons"
124 <<
"> could not optain mounCollection!";
144 for (Tracks::const_iterator it = cands.begin();
147 bool isolated =
true;
148 for (reco::CaloJetCollection::const_iterator itJet = jets->begin();
154 result.push_back(*it);
159 LogError(
"Alignment")<<
"@SUB=AlignmentGlobalTrackSelector::checkIsolation"
160 <<
"> could not optain jetCollection!";
178 for (reco::CaloJetCollection::const_iterator itJet = jets->begin();
188 LogDebug(
"Alignment") <<
"> found " << jetCount <<
" Jets";
190 LogError(
"Alignment") <<
"@SUB=AlignmentGlobalTrackSelector::checkJetCount"
191 <<
"> could not optain jetCollection!";
203 for (Tracks::const_iterator itComp = comp.begin();
208 for (
unsigned int i=0;
i<src.size();
i++) {
210 if(min >
deltaR(*(src.at(
i)),*(*itComp))){
211 min =
deltaR(*(src.at(
i)),*(*itComp));
212 match =
static_cast<int>(
i);
216 result.push_back(src.at(match));
225 LogDebug(
"Alignment") <<
">......................................";
226 for (Tracks::const_iterator it = col.begin();
230 <<
"> Track No. " << count <<
": p = ("
231 << (*it)->px() <<
","
232 << (*it)->py() <<
","
233 << (*it)->pz() <<
")\n"
235 << (*it)->pt() <<
" eta = "
236 << (*it)->eta() <<
" charge = "
239 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
double deltaR(double eta1, double eta2, double phi1, double phi2)
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