28 template <
typename T1,
typename T2>
35 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
36 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
38 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
39 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
40 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
41 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
42 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
44 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
55 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
56 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
58 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
59 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
60 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
61 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
62 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
64 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
75 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
76 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
78 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
79 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
80 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
81 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
82 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
84 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
95 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
96 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
98 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
99 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
100 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
101 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
102 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
103 min_N_(iConfig.
template getParameter<
int>(
"MinN")),
104 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
115 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
116 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
118 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
119 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
120 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
121 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
122 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
123 min_N_(iConfig.
template getParameter<
int>(
"MinN")),
124 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
128 template <
typename T1,
typename T2>
131 template <
typename T1,
typename T2>
134 makeHLTFilterDescription(
desc);
141 desc.add<
int>(
"triggerType1", 0);
142 desc.add<
int>(
"triggerType2", 0);
143 desc.add<
double>(
"MinDR", -1.0);
144 desc.add<
double>(
"MaxDZ", 0.2);
145 desc.add<
int>(
"MinPixHitsForDZ", 0);
146 desc.add<
bool>(
"checkSC",
false);
147 desc.add<
int>(
"MinN", 1);
155 makeHLTFilterDescription(
desc);
163 desc.add<
int>(
"triggerType1", 0);
164 desc.add<
int>(
"triggerType2", 0);
165 desc.add<
double>(
"MinDR", -1.0);
166 desc.add<
double>(
"MaxDZ", 0.2);
167 desc.add<
int>(
"MinPixHitsForDZ", 0);
168 desc.add<
bool>(
"checkSC",
false);
169 desc.add<
int>(
"MinN", 1);
177 makeHLTFilterDescription(
desc);
185 desc.add<
int>(
"triggerType1", 0);
186 desc.add<
int>(
"triggerType2", 0);
187 desc.add<
double>(
"MinDR", -1.0);
188 desc.add<
double>(
"MaxDZ", 0.2);
189 desc.add<
int>(
"MinPixHitsForDZ", 0);
190 desc.add<
bool>(
"checkSC",
false);
191 desc.add<
int>(
"MinN", 1);
199 makeHLTFilterDescription(
desc);
207 desc.add<
int>(
"triggerType1", 0);
208 desc.add<
int>(
"triggerType2", 0);
209 desc.add<
double>(
"MinDR", -1.0);
210 desc.add<
double>(
"MaxDZ", 0.2);
211 desc.add<
int>(
"MinPixHitsForDZ", 0);
212 desc.add<
bool>(
"checkSC",
false);
213 desc.add<
int>(
"MinN", 1);
221 makeHLTFilterDescription(
desc);
228 desc.add<
int>(
"triggerType1", 0);
229 desc.add<
int>(
"triggerType2", 0);
230 desc.add<
double>(
"MinDR", -1.0);
231 desc.add<
double>(
"MaxDZ", 0.2);
232 desc.add<
int>(
"MinPixHitsForDZ", 0);
233 desc.add<
bool>(
"checkSC",
false);
234 desc.add<
int>(
"MinN", 1);
238 template <
typename T1,
typename T2>
242 std::vector<T1Ref>& coll1,
243 std::vector<T2Ref>& coll2,
246 if (
iEvent.getByToken(inputToken1_, handle1) and
iEvent.getByToken(inputToken2_, handle2)) {
255 for (
unsigned int i = 0;
i < originTag1_.size(); ++
i) {
265 if (tagOld.
encode() != tagNew.encode()) {
270 for (
unsigned int i = 0;
i < originTag2_.size(); ++
i) {
280 if (tagOld.
encode() != tagNew.encode()) {
292 template <
typename T1,
typename T2>
298 if (
std::abs(candidate1.
vz() - candidate2.
vz()) > maxDZ_)
309 iEvent.getByToken(electronToken_, electronHandle_);
310 if (!electronHandle_.
isValid())
311 edm::LogError(
"HLTDoubletDZ") <<
"HLTDoubletDZ: Electron Handle not valid.";
316 for (
auto const& eleIt : *electronHandle_) {
317 if (eleIt.superCluster() ==
r1->superCluster())
323 if (minPixHitsForDZ_ > 0 && (
e1.gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
324 candidate2.
track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
326 if (!skipDZ &&
std::abs(
e1.vz() - candidate2.
vz()) > maxDZ_)
337 iEvent.getByToken(electronToken_, electronHandle_);
338 if (!electronHandle_.
isValid())
339 edm::LogError(
"HLTDoubletDZ") <<
"HLTDoubletDZ: Electron Handle not valid.";
344 for (
auto const& eleIt : *electronHandle_) {
345 if (eleIt.superCluster() ==
r2->superCluster())
351 if (minPixHitsForDZ_ > 0 && (candidate1.
track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
352 e2.
gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
354 if (!skipDZ &&
std::abs(e2.
vz() - candidate1.
vz()) > maxDZ_)
365 iEvent.getByToken(electronToken_, electronHandle_);
366 if (!electronHandle_.
isValid())
367 edm::LogError(
"HLTDoubletDZ") <<
"HLTDoubletDZ: Electron Handle not valid.";
372 for (
auto const& eleIt : *electronHandle_) {
373 if (eleIt.superCluster() ==
r2->superCluster())
375 if (eleIt.superCluster() ==
r1->superCluster())
380 if (minPixHitsForDZ_ > 0 && (
e1.gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
381 e2.
gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
398 if (minPixHitsForDZ_ > 0 && (candidate1.
track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
399 candidate2.
track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
401 if (!skipDZ &&
std::abs(candidate1.
vz() - candidate2.
vz()) > maxDZ_)
408 template <
typename T1,
typename T2>
417 std::vector<T1Ref> coll1;
418 std::vector<T2Ref> coll2;
420 if (getCollections(
iEvent, coll1, coll2, filterproduct)) {
425 for (
unsigned int i1 = 0;
i1 != coll1.size();
i1++) {
432 for (
unsigned int i2 =
I;
i2 != coll2.size();
i2++) {
435 if (
r1->superCluster().isNonnull() &&
r2->superCluster().isNonnull()) {
436 if (
r1->superCluster() ==
r2->superCluster())