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);
161 desc.
add<std::vector<edm::InputTag>>(
"originTag1",
originTag1);
162 desc.
add<std::vector<edm::InputTag>>(
"originTag2",
originTag2);
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);
182 desc.
add<std::vector<edm::InputTag>>(
"originTag1",
originTag1);
183 desc.
add<std::vector<edm::InputTag>>(
"originTag2",
originTag2);
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);
204 desc.
add<std::vector<edm::InputTag>>(
"originTag1",
originTag1);
205 desc.
add<std::vector<edm::InputTag>>(
"originTag2",
originTag2);
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);
226 desc.
add<std::vector<edm::InputTag>>(
"originTag1",
originTag1);
227 desc.
add<std::vector<edm::InputTag>>(
"originTag2",
originTag2);
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);
248 desc.
add<std::vector<edm::InputTag>>(
"originTag1",
originTag1);
249 desc.
add<std::vector<edm::InputTag>>(
"originTag2",
originTag2);
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) {
289 if (tagOld.
encode() != tagNew.encode()) {
294 for (
unsigned int i = 0;
i < originTag2_.size(); ++
i) {
304 if (tagOld.
encode() != tagNew.encode()) {
316 template <
typename T1,
typename T2>
322 if (
std::abs(candidate1.
vz() - candidate2.
vz()) > maxDZ_)
333 iEvent.getByToken(electronToken_, electronHandle_);
334 if (!electronHandle_.
isValid())
335 edm::LogError(
"HLTDoubletDZ") <<
"HLTDoubletDZ: Electron Handle not valid.";
340 for (
auto const& eleIt : *electronHandle_) {
341 if (eleIt.superCluster() ==
r1->superCluster())
347 if (minPixHitsForDZ_ > 0 && (
e1.gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
348 candidate2.
track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
350 if (!skipDZ &&
std::abs(
e1.vz() - candidate2.
vz()) > maxDZ_)
361 iEvent.getByToken(electronToken_, electronHandle_);
362 if (!electronHandle_.
isValid())
363 edm::LogError(
"HLTDoubletDZ") <<
"HLTDoubletDZ: Electron Handle not valid.";
368 for (
auto const& eleIt : *electronHandle_) {
369 if (eleIt.superCluster() ==
r2->superCluster())
375 if (minPixHitsForDZ_ > 0 && (candidate1.
track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
376 e2.
gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
378 if (!skipDZ &&
std::abs(e2.
vz() - candidate1.
vz()) > maxDZ_)
389 iEvent.getByToken(electronToken_, electronHandle_);
390 if (!electronHandle_.
isValid())
391 edm::LogError(
"HLTDoubletDZ") <<
"HLTDoubletDZ: Electron Handle not valid.";
396 for (
auto const& eleIt : *electronHandle_) {
397 if (eleIt.superCluster() ==
r2->superCluster())
399 if (eleIt.superCluster() ==
r1->superCluster())
404 if (minPixHitsForDZ_ > 0 && (
e1.gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
405 e2.
gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
422 if (minPixHitsForDZ_ > 0 && (candidate1.
track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
423 candidate2.
track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
425 if (!skipDZ &&
std::abs(candidate1.
vz() - candidate2.
vz()) > maxDZ_)
467 template <
typename T1,
typename T2>
476 std::vector<T1Ref> coll1;
477 std::vector<T2Ref> coll2;
479 if (getCollections(
iEvent, coll1, coll2, filterproduct)) {
484 for (
unsigned int i1 = 0;
i1 != coll1.size();
i1++) {
491 for (
unsigned int i2 =
I;
i2 != coll2.size();
i2++) {
494 if (
r1->superCluster().isNonnull() &&
r2->superCluster().isNonnull()) {
495 if (
r1->superCluster() ==
r2->superCluster())
527 std::vector<l1t::TkMuonRef> coll1;
528 std::vector<l1t::TkMuonRef> coll2;
530 if (getCollections(
iEvent, coll1, coll2, filterproduct)) {
535 for (
unsigned int i1 = 0;
i1 != coll1.size();
i1++) {
541 for (
unsigned int i2 =
I;
i2 != coll2.size();
i2++) {
571 std::vector<l1t::PFTauRef> coll1;
572 std::vector<l1t::PFTauRef> coll2;
574 if (getCollections(
iEvent, coll1, coll2, filterproduct)) {
579 for (
unsigned int i1 = 0;
i1 != coll1.size();
i1++) {
585 for (
unsigned int i2 =
I;
i2 != coll2.size();
i2++) {
615 std::vector<l1t::HPSPFTauRef> coll1;
616 std::vector<l1t::HPSPFTauRef> coll2;
618 if (getCollections(
iEvent, coll1, coll2, filterproduct)) {
623 for (
unsigned int i1 = 0;
i1 != coll1.size();
i1++) {
629 for (
unsigned int i2 =
I;
i2 != coll2.size();
i2++) {