32 template <
typename T1,
typename T2>
39 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
40 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
42 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
43 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
44 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
45 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
46 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
48 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
59 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
60 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
62 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
63 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
64 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
65 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
66 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
68 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
79 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
80 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
82 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
83 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
84 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
85 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
86 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
88 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
99 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
100 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
102 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
103 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
104 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
105 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
106 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
107 min_N_(iConfig.
template getParameter<
int>(
"MinN")),
108 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
119 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
120 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
122 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
123 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
124 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
125 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
126 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
127 min_N_(iConfig.
template getParameter<
int>(
"MinN")),
128 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
139 inputToken1_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
140 inputToken2_(consumes<
trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
141 triggerType1_(iConfig.
template getParameter<
int>(
"triggerType1")),
142 triggerType2_(iConfig.
template getParameter<
int>(
"triggerType2")),
143 minDR_(iConfig.
template getParameter<double>(
"MinDR")),
144 maxDZ_(iConfig.
template getParameter<double>(
"MaxDZ")),
145 minPixHitsForDZ_(iConfig.
template getParameter<
int>(
"MinPixHitsForDZ")),
146 min_N_(iConfig.
template getParameter<
int>(
"MinN")),
147 checkSC_(iConfig.
template getParameter<
bool>(
"checkSC")),
151 template <
typename T1,
typename T2>
154 template <
typename T1,
typename T2>
157 makeHLTFilterDescription(
desc);
164 desc.add<
int>(
"triggerType1", 0);
165 desc.add<
int>(
"triggerType2", 0);
166 desc.add<
double>(
"MinDR", -1.0);
167 desc.add<
double>(
"MaxDZ", 0.2);
168 desc.add<
int>(
"MinPixHitsForDZ", 0);
169 desc.add<
bool>(
"checkSC",
false);
170 desc.add<
int>(
"MinN", 1);
178 makeHLTFilterDescription(
desc);
186 desc.add<
int>(
"triggerType1", 0);
187 desc.add<
int>(
"triggerType2", 0);
188 desc.add<
double>(
"MinDR", -1.0);
189 desc.add<
double>(
"MaxDZ", 0.2);
190 desc.add<
int>(
"MinPixHitsForDZ", 0);
191 desc.add<
bool>(
"checkSC",
false);
192 desc.add<
int>(
"MinN", 1);
200 makeHLTFilterDescription(
desc);
208 desc.add<
int>(
"triggerType1", 0);
209 desc.add<
int>(
"triggerType2", 0);
210 desc.add<
double>(
"MinDR", -1.0);
211 desc.add<
double>(
"MaxDZ", 0.2);
212 desc.add<
int>(
"MinPixHitsForDZ", 0);
213 desc.add<
bool>(
"checkSC",
false);
214 desc.add<
int>(
"MinN", 1);
222 makeHLTFilterDescription(
desc);
230 desc.add<
int>(
"triggerType1", 0);
231 desc.add<
int>(
"triggerType2", 0);
232 desc.add<
double>(
"MinDR", -1.0);
233 desc.add<
double>(
"MaxDZ", 0.2);
234 desc.add<
int>(
"MinPixHitsForDZ", 0);
235 desc.add<
bool>(
"checkSC",
false);
236 desc.add<
int>(
"MinN", 1);
244 makeHLTFilterDescription(
desc);
251 desc.add<
int>(
"triggerType1", 0);
252 desc.add<
int>(
"triggerType2", 0);
253 desc.add<
double>(
"MinDR", -1.0);
254 desc.add<
double>(
"MaxDZ", 0.2);
255 desc.add<
int>(
"MinPixHitsForDZ", 0);
256 desc.add<
bool>(
"checkSC",
false);
257 desc.add<
int>(
"MinN", 1);
261 template <
typename T1,
typename T2>
265 std::vector<T1Ref>& coll1,
266 std::vector<T2Ref>& coll2,
269 if (
iEvent.getByToken(inputToken1_, handle1) and
iEvent.getByToken(inputToken2_, handle2)) {
278 for (
unsigned int i = 0;
i < originTag1_.size(); ++
i) {
284 const auto& prov =
iEvent.getStableProvenance(pid);
289 if (tagOld.
encode() != tagNew.encode()) {
294 for (
unsigned int i = 0;
i < originTag2_.size(); ++
i) {
300 const auto& prov =
iEvent.getStableProvenance(pid);
305 if (tagOld.
encode() != tagNew.encode()) {
317 template <
typename T1,
typename T2>
323 if (
std::abs(candidate1.
vz() - candidate2.
vz()) > maxDZ_)
334 iEvent.getByToken(electronToken_, electronHandle_);
335 if (!electronHandle_.
isValid())
336 edm::LogError(
"HLTDoubletDZ") <<
"HLTDoubletDZ: Electron Handle not valid.";
341 for (
auto const& eleIt : *electronHandle_) {
342 if (eleIt.superCluster() ==
r1->superCluster())
348 if (minPixHitsForDZ_ > 0 && (
e1.gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
349 candidate2.
track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
351 if (!skipDZ &&
std::abs(
e1.vz() - candidate2.
vz()) > maxDZ_)
362 iEvent.getByToken(electronToken_, electronHandle_);
363 if (!electronHandle_.
isValid())
364 edm::LogError(
"HLTDoubletDZ") <<
"HLTDoubletDZ: Electron Handle not valid.";
369 for (
auto const& eleIt : *electronHandle_) {
370 if (eleIt.superCluster() ==
r2->superCluster())
376 if (minPixHitsForDZ_ > 0 && (candidate1.
track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
377 e2.
gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
379 if (!skipDZ &&
std::abs(e2.
vz() - candidate1.
vz()) > maxDZ_)
390 iEvent.getByToken(electronToken_, electronHandle_);
391 if (!electronHandle_.
isValid())
392 edm::LogError(
"HLTDoubletDZ") <<
"HLTDoubletDZ: Electron Handle not valid.";
397 for (
auto const& eleIt : *electronHandle_) {
398 if (eleIt.superCluster() ==
r2->superCluster())
400 if (eleIt.superCluster() ==
r1->superCluster())
405 if (minPixHitsForDZ_ > 0 && (
e1.gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
406 e2.
gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
423 if (minPixHitsForDZ_ > 0 && (candidate1.
track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
424 candidate2.
track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
426 if (!skipDZ &&
std::abs(candidate1.
vz() - candidate2.
vz()) > maxDZ_)
466 template <
typename T1,
typename T2>
475 std::vector<T1Ref> coll1;
476 std::vector<T2Ref> coll2;
478 if (getCollections(
iEvent, coll1, coll2, filterproduct)) {
483 for (
unsigned int i1 = 0;
i1 != coll1.size();
i1++) {
490 for (
unsigned int i2 =
I;
i2 != coll2.size();
i2++) {
493 if (
r1->superCluster().isNonnull() &&
r2->superCluster().isNonnull()) {
494 if (
r1->superCluster() ==
r2->superCluster())
525 std::vector<l1t::TrackerMuonRef> coll1;
526 std::vector<l1t::TrackerMuonRef> coll2;
528 if (getCollections(
iEvent, coll1, coll2, filterproduct)) {
533 for (
unsigned int i1 = 0;
i1 != coll1.size();
i1++) {
539 for (
unsigned int i2 =
I;
i2 != coll2.size();
i2++) {
569 std::vector<l1t::PFTauRef> coll1;
570 std::vector<l1t::PFTauRef> coll2;
572 if (getCollections(
iEvent, coll1, coll2, filterproduct)) {
577 for (
unsigned int i1 = 0;
i1 != coll1.size();
i1++) {
583 for (
unsigned int i2 =
I;
i2 != coll2.size();
i2++) {
613 std::vector<l1t::HPSPFTauRef> coll1;
614 std::vector<l1t::HPSPFTauRef> coll2;
616 if (getCollections(
iEvent, coll1, coll2, filterproduct)) {
621 for (
unsigned int i1 = 0;
i1 != coll1.size();
i1++) {
627 for (
unsigned int i2 =
I;
i2 != coll2.size();
i2++) {
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
HLTDoubletDZ(const edm::ParameterSet &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool computeDZ(edm::Event &iEvent, T1Ref &c1, T2Ref &c2) const
double vz() const override
z coordinate of vertex position
static PFTauRenderPlugin instance
std::string defaultModuleLabel()
HLTDoubletDZ< l1t::PFTau, l1t::PFTau > HLT2L1PFTauL1PFTauDZ
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
bool getCollections(edm::Event &iEvent, std::vector< T1Ref > &coll1, std::vector< T2Ref > &coll2, trigger::TriggerFilterObjectWithRefs &filterproduct) const
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref<C>)
reco::TrackRef track() const override
reference to a track
reco::GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Abs< T >::type abs(const T &t)
const std::complex< double > I
def template(fileName, svg, replaceme="REPLACEME")
#define DEFINE_FWK_MODULE(type)
std::vector< Electron > ElectronCollection
collectin of Electron objects
bool hltFilter(edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) const override
HLTDoubletDZ< reco::RecoChargedCandidate, reco::RecoChargedCandidate > HLT2MuonMuonDZ
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
HLTDoubletDZ< reco::Electron, reco::RecoChargedCandidate > HLT2ElectronMuonDZ
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
void add(std::string const &label, ParameterSetDescription const &psetDescription)
HLTDoubletDZ< reco::RecoChargedCandidate, reco::RecoEcalCandidate > HLT2MuonPhotonDZ
HLTDoubletDZ< reco::Electron, reco::Electron > HLT2ElectronElectronDZ
HLTDoubletDZ< l1t::HPSPFTau, l1t::HPSPFTau > HLT2L1HPSPFTauL1HPSPFTauDZ
virtual double vz() const =0
z coordinate of vertex position
const l1t::PFCandidateRef & leadChargedPFCand() const
HLTDoubletDZ< reco::RecoEcalCandidate, reco::RecoEcalCandidate > HLT2PhotonPhotonDZ
HLTDoubletDZ< reco::RecoEcalCandidate, reco::RecoChargedCandidate > HLT2PhotonMuonDZ
HLTDoubletDZ< l1t::TrackerMuon, l1t::TrackerMuon > HLT2L1TkMuonL1TkMuonDZ