29 candTag_( iConfig.getParameter<
edm::InputTag>(
"CandTag") ),
31 previousCandTag_( iConfig.getParameter<
edm::InputTag>(
"PreviousCandTag") ),
32 previousCandToken_( consumes<
trigger::TriggerFilterObjectWithRefs>(previousCandTag_)),
33 maxEta_( iConfig.getParameter<double>(
"MaxEta") ),
34 minPt_( iConfig.getParameter<double>(
"MinPt") ),
35 minN_( iConfig.getParameter<
int>(
"MinN") ),
36 centralBxOnly_( iConfig.getParameter<
bool>(
"CentralBxOnly") )
41 vector<int> selectQualities = iConfig.
getParameter<vector<int> >(
"SelectQualities");
42 for(
int selectQualitie : selectQualities){
52 ss <<
"Constructed with parameters:" << endl;
55 ss <<
" MaxEta = " <<
maxEta_ << endl;
56 ss <<
" MinPt = " <<
minPt_ << endl;
57 ss <<
" SelectQualities =";
62 ss <<
" MinN = " <<
minN_ << endl;
64 LogDebug(
"HLTMuonL1TFilter") << ss.str();
81 desc.
add<
double>(
"MaxEta",2.5);
82 desc.
add<
double>(
"MinPt",0.0);
83 desc.
add<
int>(
"MinN",1);
84 desc.
add<
bool>(
"CentralBxOnly",
true);
86 std::vector<int> temp1;
88 desc.
add<std::vector<int> >(
"SelectQualities",temp1);
90 descriptions.
add(
"hltMuonL1TFilter",desc);
111 vector<MuonRef> prevMuons;
119 for (
auto it = allMuons->
begin(ibx); it != allMuons->
end(ibx); it++){
124 if(
find(prevMuons.begin(), prevMuons.end(),
muon) == prevMuons.end())
continue;
134 int quality = (it->hwQual() == 0 ? 0 : (1 << it->hwQual()));
154 LogTrace(
"HLTMuonL1TFilter")<<
"\nHLTMuonL1TFilter -----------------------------------------------" << endl;
155 LogTrace(
"HLTMuonL1TFilter")<<
"L1mu#" <<
'\t' 156 <<
"q" <<
'\t' <<
"pt" <<
'\t' <<
'\t' 157 <<
"eta" <<
'\t' <<
"phi" <<
'\t' 158 <<
"quality" <<
'\t' <<
"isPrev\t (|maxEta| = " <<
maxEta_ <<
")" << endl;
159 LogTrace(
"HLTMuonL1TFilter")<<
"--------------------------------------------------------------------------" << endl;
161 vector<MuonRef> firedMuons;
163 for(
size_t i=0;
i<firedMuons.size();
i++){
165 bool isPrev =
find(prevMuons.begin(), prevMuons.end(),
mu) != prevMuons.end();
166 LogTrace(
"HLTMuonL1TFilter")<<
i <<
'\t' << setprecision(2) << scientific
167 << mu->charge() <<
'\t' << mu->pt() <<
'\t' <<
fixed 168 << mu->eta() <<
'\t' << mu->phi() <<
'\t' 169 << mu->hwQual() <<
'\t' << isPrev << endl;
171 LogTrace(
"HLTMuonL1TFilter")<<
"--------------------------------------------------------------------------" << endl;
172 LogTrace(
"HLTMuonL1TFilter")<<
"Decision of this filter is " << accept <<
", number of muons passing = " << filterproduct.
l1tmuonSize();
const_iterator end(int bx) const
T getParameter(std::string const &) const
HLTMuonL1TFilter(const edm::ParameterSet &)
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
bool getByToken(EDGetToken token, Handle< PROD > &result) const
enum start value shifted to 81 so as to avoid clashes with PDG codes
double maxEta_
max Eta cut
edm::InputTag previousCandTag_
input tag identifying the product containing refs to muons passing the previous level ...
double minN_
min N objects
bool centralBxOnly_
use central bx only muons
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool hltFilter(edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) const override
~HLTMuonL1TFilter() override
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref<C>)
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< l1t::MuonBxCollection > candToken_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
BXVector< Muon > MuonBxCollection
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
double minPt_
pT threshold
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > previousCandToken_
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
void add(std::string const &label, ParameterSetDescription const &psetDescription)
size_type l1tmuonSize() const
const_iterator begin(int bx) const