22 originTag1_(iConfig.getParameter<std::
vector<edm::
InputTag>>(
"originTag1")),
23 originTag2_(iConfig.getParameter<std::
vector<edm::
InputTag>>(
"originTag2")),
24 inputTag1_(iConfig.getParameter<edm::
InputTag>(
"inputTag1")),
25 inputTag2_(iConfig.getParameter<edm::
InputTag>(
"inputTag2")),
26 inputToken1_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
27 inputToken2_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
28 minDR_(iConfig.getParameter<double>(
"MinDR")),
29 min_N_(iConfig.getParameter<int>(
"MinN")),
39 desc.
add<std::vector<edm::InputTag>>(
"originTag1",
originTag1);
40 desc.
add<std::vector<edm::InputTag>>(
"originTag2",
originTag2);
43 desc.
add<
double>(
"MinDR", -1.0);
44 desc.
add<
int>(
"MinN", 1);
46 descriptions.
add(
"hlt2L1TkMuonL1TkMuonMuRefDR", desc);
50 std::vector<l1t::TkMuonRef>& coll1,
51 std::vector<l1t::TkMuonRef>& coll2,
73 if (tagOld.
encode() != tagNew.encode()) {
88 if (tagOld.
encode() != tagNew.encode()) {
105 if (tkmu->muRef().
isNull())
106 return std::make_pair(muRefEta, muRefPhi);
108 muRefEta = tkmu->muRef()->hwEta() *
etaScale_;
110 tkmu->muRef()->hwPhi(), tkmu->muRef()->trackFinderType(), tkmu->muRef()->processor()));
113 if (tkmu->emtfTrk().
isNull())
114 return std::make_pair(muRefEta, muRefPhi);
116 muRefEta = tkmu->emtfTrk()->Eta();
121 return std::make_pair(muRefEta, muRefPhi);
142 std::vector<l1t::TkMuonRef> coll1;
143 std::vector<l1t::TkMuonRef> coll2;
150 for (
unsigned int i1 = 0; i1 != coll1.size(); i1++) {
156 for (
unsigned int i2 = I; i2 != coll2.size(); i2++) {
168 accept = accept || (n >=
min_N_);
~HLT2L1TkMuonL1TkMuonMuRefDR() override
constexpr double convertDegToRad(NumType degrees)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
constexpr T reduceRange(T x)
static PFTauRenderPlugin instance
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken1_
This has all to be decided for Phase-2. Here is Thiago's proposal.
std::pair< float, float > convertEtaPhi(l1t::TkMuonRef &tkmu) const
bool computeDR(edm::Event &iEvent, l1t::TkMuonRef &c1, l1t::TkMuonRef &c2) const
const std::vector< edm::InputTag > originTag1_
std::string const & processName() const
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>)
const std::vector< edm::InputTag > originTag2_
bool hltFilter(edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) const override
HLT2L1TkMuonL1TkMuonMuRefDR(const edm::ParameterSet &)
const std::complex< double > I
static constexpr float phiScale_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool isNull() const
Checks for null.
static constexpr unsigned int emtfRegion_
static int calcGlobalPhi(int locPhi, tftype t, int proc)
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
static constexpr float etaScale_
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::string const & moduleLabel() const
bool getCollections(edm::Event &iEvent, std::vector< l1t::TkMuonRef > &coll1, std::vector< l1t::TkMuonRef > &coll2, trigger::TriggerFilterObjectWithRefs &filterproduct) const
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken2_
std::string const & productInstanceName() const
Provenance const & getProvenance(BranchID const &theID) const