33 template <
typename T1,
typename T2>
40 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
41 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
43 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
44 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
45 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
46 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
47 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
49 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
60 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
61 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
63 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
64 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
65 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
66 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
67 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
69 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
80 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
81 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
83 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
84 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
85 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
86 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
87 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
89 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
100 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
101 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
103 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
104 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
105 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
106 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
107 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
108 min_N_(iConfig.
template getParameter<
int>(
"MinN")),
109 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
120 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
121 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
123 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
124 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
125 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
126 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
127 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
128 min_N_(iConfig.
template getParameter<
int>(
"MinN")),
129 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
140 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
141 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
142 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
143 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
144 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
145 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
146 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
147 min_N_(iConfig.
template getParameter<
int>(
"MinN")),
148 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
152 template <
typename T1,
typename T2>
155 template <
typename T1,
typename T2>
158 makeHLTFilterDescription(
desc);
165 desc.add<
int>(
"triggerType1", 0);
166 desc.add<
int>(
"triggerType2", 0);
167 desc.add<
double>(
"MinDR", -1.0);
168 desc.add<
double>(
"MaxDZ", 0.2);
169 desc.add<
int>(
"MinPixHitsForDZ", 0);
170 desc.add<
bool>(
"checkSC",
false);
171 desc.add<
int>(
"MinN", 1);
179 makeHLTFilterDescription(
desc);
187 desc.add<
int>(
"triggerType1", 0);
188 desc.add<
int>(
"triggerType2", 0);
189 desc.add<
double>(
"MinDR", -1.0);
190 desc.add<
double>(
"MaxDZ", 0.2);
191 desc.add<
int>(
"MinPixHitsForDZ", 0);
192 desc.add<
bool>(
"checkSC",
false);
193 desc.add<
int>(
"MinN", 1);
201 makeHLTFilterDescription(
desc);
209 desc.add<
int>(
"triggerType1", 0);
210 desc.add<
int>(
"triggerType2", 0);
211 desc.add<
double>(
"MinDR", -1.0);
212 desc.add<
double>(
"MaxDZ", 0.2);
213 desc.add<
int>(
"MinPixHitsForDZ", 0);
214 desc.add<
bool>(
"checkSC",
false);
215 desc.add<
int>(
"MinN", 1);
223 makeHLTFilterDescription(
desc);
231 desc.add<
int>(
"triggerType1", 0);
232 desc.add<
int>(
"triggerType2", 0);
233 desc.add<
double>(
"MinDR", -1.0);
234 desc.add<
double>(
"MaxDZ", 0.2);
235 desc.add<
int>(
"MinPixHitsForDZ", 0);
236 desc.add<
bool>(
"checkSC",
false);
237 desc.add<
int>(
"MinN", 1);
245 makeHLTFilterDescription(
desc);
252 desc.add<
int>(
"triggerType1", 0);
253 desc.add<
int>(
"triggerType2", 0);
254 desc.add<
double>(
"MinDR", -1.0);
255 desc.add<
double>(
"MaxDZ", 0.2);
256 desc.add<
int>(
"MinPixHitsForDZ", 0);
257 desc.add<
bool>(
"checkSC",
false);
258 desc.add<
int>(
"MinN", 1);
262 template <
typename T1,
typename T2>
266 std::vector<T1Ref>& coll1,
267 std::vector<T2Ref>& coll2,
270 if (
iEvent.getByToken(inputToken1_, handle1) and
iEvent.getByToken(inputToken2_, handle2)) {
279 for (
unsigned int i = 0;
i < originTag1_.size(); ++
i) {
285 const auto& prov =
iEvent.getStableProvenance(pid);
290 if (tagOld.
encode() != tagNew.encode()) {
295 for (
unsigned int i = 0;
i < originTag2_.size(); ++
i) {
301 const auto& prov =
iEvent.getStableProvenance(pid);
306 if (tagOld.
encode() != tagNew.encode()) {
318 template <
typename T1,
typename T2>
324 if (
std::abs(candidate1.
vz() - candidate2.
vz()) > maxDZ_)
335 iEvent.getByToken(electronToken_, electronHandle_);
336 if (!electronHandle_.
isValid())
337 edm::LogError(
"HLTDoubletDZ") <<
"HLTDoubletDZ: Electron Handle not valid.";
342 for (
auto const& eleIt : *electronHandle_) {
343 if (eleIt.superCluster() ==
r1->superCluster())
349 if (minPixHitsForDZ_ > 0 && (
e1.gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
350 candidate2.
track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
352 if (!skipDZ &&
std::abs(
e1.vz() - candidate2.
vz()) > maxDZ_)
363 iEvent.getByToken(electronToken_, electronHandle_);
364 if (!electronHandle_.
isValid())
365 edm::LogError(
"HLTDoubletDZ") <<
"HLTDoubletDZ: Electron Handle not valid.";
370 for (
auto const& eleIt : *electronHandle_) {
371 if (eleIt.superCluster() ==
r2->superCluster())
377 if (minPixHitsForDZ_ > 0 && (candidate1.
track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
378 e2.
gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
380 if (!skipDZ &&
std::abs(e2.
vz() - candidate1.
vz()) > maxDZ_)
391 iEvent.getByToken(electronToken_, electronHandle_);
392 if (!electronHandle_.
isValid())
393 edm::LogError(
"HLTDoubletDZ") <<
"HLTDoubletDZ: Electron Handle not valid.";
398 for (
auto const& eleIt : *electronHandle_) {
399 if (eleIt.superCluster() ==
r2->superCluster())
401 if (eleIt.superCluster() ==
r1->superCluster())
406 if (minPixHitsForDZ_ > 0 && (
e1.gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
407 e2.
gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
424 if (minPixHitsForDZ_ > 0 && (candidate1.
track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
425 candidate2.
track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
427 if (!skipDZ &&
std::abs(candidate1.
vz() - candidate2.
vz()) > maxDZ_)
469 template <
typename T1,
typename T2>
478 std::vector<T1Ref> coll1;
479 std::vector<T2Ref> coll2;
481 if (getCollections(
iEvent, coll1, coll2, filterproduct)) {
486 for (
unsigned int i1 = 0;
i1 != coll1.size();
i1++) {
493 for (
unsigned int i2 =
I;
i2 != coll2.size();
i2++) {
496 if (
r1->superCluster().isNonnull() &&
r2->superCluster().isNonnull()) {
497 if (
r1->superCluster() ==
r2->superCluster())
529 std::vector<l1t::TkMuonRef> coll1;
530 std::vector<l1t::TkMuonRef> coll2;
532 if (getCollections(
iEvent, coll1, coll2, filterproduct)) {
537 for (
unsigned int i1 = 0;
i1 != coll1.size();
i1++) {
543 for (
unsigned int i2 =
I;
i2 != coll2.size();
i2++) {
573 std::vector<l1t::PFTauRef> coll1;
574 std::vector<l1t::PFTauRef> coll2;
576 if (getCollections(
iEvent, coll1, coll2, filterproduct)) {
581 for (
unsigned int i1 = 0;
i1 != coll1.size();
i1++) {
587 for (
unsigned int i2 =
I;
i2 != coll2.size();
i2++) {
617 std::vector<l1t::HPSPFTauRef> coll1;
618 std::vector<l1t::HPSPFTauRef> coll2;
620 if (getCollections(
iEvent, coll1, coll2, filterproduct)) {
625 for (
unsigned int i1 = 0;
i1 != coll1.size();
i1++) {
631 for (
unsigned int i2 =
I;
i2 != coll2.size();
i2++) {