32 using namespace trigger;
35 beamspotTag_ (iConfig.getParameter< edm::
InputTag > (
"BeamSpotTag")),
36 candTag_ (iConfig.getParameter<
InputTag > (
"CandTag")),
37 previousCandTag_ (iConfig.getParameter<
InputTag > (
"PreviousCandTag")),
38 min_N_ (iConfig.getParameter<int> (
"MinN")),
39 max_Eta_ (iConfig.getParameter<double> (
"MaxEta")),
40 min_Nhits_ (iConfig.getParameter<int> (
"MinNhits")),
41 max_Dr_ (iConfig.getParameter<double> (
"MaxDr")),
42 max_Dz_ (iConfig.getParameter<double> (
"MaxDz")),
43 min_Pt_ (iConfig.getParameter<double> (
"MinPt")),
44 nsigma_Pt_ (iConfig.getParameter<double> (
"NSigmaPt"))
48 <<
" CandTag/MinN/MaxEta/MinNhits/MaxDr/MaxDz/MinPt/NSigmaPt : "
59 produces<TriggerFilterObjectWithRefs>();
84 std::map<l1extra::L1MuonParticleRef, std::vector<RecoChargedCandidateRef> > L1toL3s;
86 unsigned int maxN = mucands->size();
100 beamSpot = *recoBeamSpotHandle;
104 vector<l1extra::L1MuonParticleRef> vl1cands;
105 previousLevelCands->getObjects(
TriggerL1Mu,vl1cands);
107 std::map<l1extra::L1MuonParticleRef, std::vector<RecoChargedCandidateRef> > ::iterator L1toL3s_it = L1toL3s.begin();
108 std::map<l1extra::L1MuonParticleRef, std::vector<RecoChargedCandidateRef> > ::iterator L1toL3s_end = L1toL3s.end();
109 for (; L1toL3s_it!=L1toL3s_end; ++L1toL3s_it){
115 unsigned int maxItk=L1toL3s_it->second.size();
116 for (; iTk!=maxItk; iTk++){
121 if (fabs(tk->eta())>
max_Eta_)
continue;
124 if (tk->numberOfValidHits()<
min_Nhits_)
continue;
131 if (fabs(tk->dz())>
max_Dz_)
continue;
134 double pt = tk->pt();
135 double err0 = tk->error(0);
136 double abspar0 = fabs(tk->parameter(0));
139 if (abspar0>0) ptLx +=
nsigma_Pt_*err0/abspar0*pt;
140 LogTrace(
"HLTMuonL1toL3TkPreFilter") <<
" ...Muon in loop, pt= "
141 << pt <<
", ptLx= " << ptLx;
152 vector<RecoChargedCandidateRef> vref;
154 for (
unsigned int i=0;
i<vref.size();
i++ ) {
156 LogDebug(
"HLTMuonL1toL3TkPreFilter")
157 <<
" Track passing filter: pt= " << tk->pt() <<
", eta: "
164 LogDebug(
"HLTMuonL1toL3TkPreFilter") <<
" >>>>> Result of HLTMuonL1toL3TkPreFilter is " << accept <<
", number of muons passing thresholds= " <<
n;
174 for (
unsigned int i=0;
i<vcands.size();
i++) {
176 if (vcands[
i] == l1mu){
178 LogDebug(
"HLTMuonL1toL3TkPreFilter") <<
"The L1 mu triggered";
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
enum start value shifted to 81 so as to avoid clashes with PDG codes
HLTMuonL1toL3TkPreFilter(const edm::ParameterSet &)
edm::Ref< RecoChargedCandidateCollection > RecoChargedCandidateRef
reference to an object in a collection of RecoChargedCandidate objects
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref<C>)
~HLTMuonL1toL3TkPreFilter()
bool triggeredAtL1(const l1extra::L1MuonParticleRef &l1mu, std::vector< l1extra::L1MuonParticleRef > &vcands)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
edm::InputTag beamspotTag_
edm::InputTag previousCandTag_
const Point & position() const
position
virtual bool hltFilter(edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct)