20 template<
typename T1,
typename T2>
22 originTag1_(iConfig.
template getParameter<std::vector<edm::InputTag> >(
"originTag1")),
23 originTag2_(iConfig.
template getParameter<std::vector<edm::InputTag> >(
"originTag2")),
24 inputTag1_(iConfig.
template getParameter<edm::InputTag>(
"inputTag1")),
25 inputTag2_(iConfig.
template getParameter<edm::InputTag>(
"inputTag2")),
26 inputToken1_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
27 inputToken2_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
28 triggerType1_(iConfig.
template getParameter<int>(
"triggerType1")),
29 triggerType2_(iConfig.
template getParameter<int>(
"triggerType2")),
30 minDR_ (iConfig.
template getParameter<double>(
"MinDR")),
31 maxDZ_ (iConfig.
template getParameter<double>(
"MaxDZ")),
32 min_N_ (iConfig.
template getParameter<int>(
"MinN")),
33 checkSC_ (iConfig.
template getParameter<bool>(
"checkSC")),
38 template<
typename T1,
typename T2>
43 template<
typename T1,
typename T2>
47 makeHLTFilterDescription(desc);
48 std::vector<edm::InputTag> originTag1(1,
edm::InputTag(
"hltOriginal1"));
49 std::vector<edm::InputTag> originTag2(1,
edm::InputTag(
"hltOriginal2"));
50 desc.
add<std::vector<edm::InputTag> >(
"originTag1",originTag1);
51 desc.
add<std::vector<edm::InputTag> >(
"originTag2",originTag2);
54 desc.
add<
int>(
"triggerType1",0);
55 desc.
add<
int>(
"triggerType2",0);
56 desc.
add<
double>(
"MinDR",-1.0);
57 desc.
add<
double>(
"MaxDZ",0.2);
58 desc.
add<
bool>(
"checkSC",
false);
59 desc.
add<
int>(
"MinN",1);
64 template<
typename T1,
typename T2>
71 using namespace trigger;
79 LogVerbatim(
"HLTDoubletDZ") <<
" XXX " << moduleLabel() <<
" 0 " << std::endl;
81 std::vector<T1Ref> coll1;
82 std::vector<T2Ref> coll2;
87 handle1->getObjects(triggerType1_, coll1);
88 handle2->getObjects(triggerType2_, coll2);
94 for (
unsigned int i=0;
i<originTag1_.size(); ++
i) {
96 LogVerbatim(
"HLTDoubletDZ") <<
" XXX " << moduleLabel() <<
" 1a/" << i <<
" " << originTag1_[
i].encode() << std::endl;
105 if (tagOld.encode()!=tagNew.encode()) {
108 LogVerbatim(
"HLTDoubletDZ") <<
" XXX " << moduleLabel() <<
" 1b " << tagNew.encode() << std::endl;
111 for (
unsigned int i=0;
i<originTag2_.size(); ++
i) {
113 LogVerbatim(
"HLTDoubletDZ") <<
" XXX " << moduleLabel() <<
" 2a/" << originTag2_[
i].encode() << std::endl;
122 if (tagOld.encode()!=tagNew.encode()) {
125 LogVerbatim(
"HLTDoubletDZ") <<
" XXX " << moduleLabel() <<
" 2b " << tagNew.encode() << std::endl;
134 for (
unsigned int i1=0; i1!=n1; i1++) {
139 for (
unsigned int i2=I; i2!=n2; i2++) {
143 if (r1->superCluster() == r2->superCluster())
continue;
147 if (
reco::deltaR(candidate1, candidate2) < minDR_ )
continue;
148 if (
std::abs(candidate1.
vz()-candidate2.
vz()) > maxDZ_ )
continue;
150 filterproduct.
addObject(triggerType1_,r1);
151 filterproduct.
addObject(triggerType2_,r2);
155 accept = accept || (n>=min_N_);
HLTDoubletDZ(const edm::ParameterSet &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static PFTauRenderPlugin instance
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double deltaR(const T1 &t1, const T2 &t2)
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>)
bool isNonnull() const
Checks for non-null.
Abs< T >::type abs(const T &t)
const std::complex< double > I
ParameterDescriptionBase * add(U const &iLabel, T const &value)
virtual bool hltFilter(edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) const override
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::string const & moduleLabel() const
virtual double vz() const =0
z coordinate of vertex position
std::string const & productInstanceName() const
Provenance getProvenance(BranchID const &theID) const
math::PtEtaPhiELorentzVectorF LorentzVector