29 template<
typename T1,
typename T2>
31 originTag1_(iConfig.
template getParameter<edm::InputTag>(
"originTag1")),
32 originTag2_(iConfig.
template getParameter<edm::InputTag>(
"originTag2")),
33 inputTag1_(iConfig.
template getParameter<edm::InputTag>(
"inputTag1")),
34 inputTag2_(iConfig.
template getParameter<edm::InputTag>(
"inputTag2")),
35 triggerType1_(iConfig.
template getParameter<int>(
"triggerType1")),
36 triggerType2_(iConfig.
template getParameter<int>(
"triggerType2")),
37 min_Dphi_ (iConfig.
template getParameter<double>(
"MinDphi")),
38 max_Dphi_ (iConfig.
template getParameter<double>(
"MaxDphi")),
39 min_Deta_ (iConfig.
template getParameter<double>(
"MinDeta")),
40 max_Deta_ (iConfig.
template getParameter<double>(
"MaxDeta")),
41 min_Minv_ (iConfig.
template getParameter<double>(
"MinMinv")),
42 max_Minv_ (iConfig.
template getParameter<double>(
"MaxMinv")),
43 min_DelR_ (iConfig.
template getParameter<double>(
"MinDelR")),
44 max_DelR_ (iConfig.
template getParameter<double>(
"MaxDelR")),
45 min_Pt_ (iConfig.
template getParameter<double>(
"MinPt")),
46 max_Pt_ (iConfig.
template getParameter<double>(
"MaxPt")),
47 min_N_ (iConfig.
template getParameter<int>(
"MinN")),
48 label_ (iConfig.getParameter<std::
string>(
"@module_label")),
62 LogDebug(
"") <<
"InputTags and cuts : "
71 <<
" same/dphi/deta/minv/delr/pt "
76 template<
typename T1,
typename T2>
80 template<
typename T1,
typename T2>
84 makeHLTFilterDescription(desc);
89 desc.
add<
int>(
"triggerType1",0);
90 desc.
add<
int>(
"triggerType2",0);
91 desc.
add<
double>(
"MinDphi",+1.0);
92 desc.
add<
double>(
"MaxDphi",-1.0);
93 desc.
add<
double>(
"MinDeta",+1.0);
94 desc.
add<
double>(
"MaxDeta",-1.0);
95 desc.
add<
double>(
"MinMinv",+1.0);
96 desc.
add<
double>(
"MaxMinv",-1.0);
97 desc.
add<
double>(
"MinDelR",+1.0);
98 desc.
add<
double>(
"MaxDelR",-1.0);
99 desc.
add<
double>(
"MinPt" ,+1.0);
100 desc.
add<
double>(
"MaxPt" ,-1.0);
101 desc.
add<
int>(
"MinN",1);
110 template<
typename T1,
typename T2>
116 using namespace reco;
117 using namespace trigger;
125 LogVerbatim(
"HLTDoublet") <<
" XXX " << label_ <<
" 0 " << std::endl;
131 coll1->getObjects(triggerType1_,coll1_);
134 coll2->getObjects(triggerType2_,coll2_);
140 LogVerbatim(
"HLTDoublet") <<
" XXX " << label_ <<
" 1a " << originTag1_.encode() << std::endl;
148 if (tagOld.
encode()!=tagNew.encode()) {
151 LogVerbatim(
"HLTDoublet") <<
" XXX " << label_ <<
" 1b " << tagNew.encode() << std::endl;
155 LogVerbatim(
"HLTDoublet") <<
" XXX " << label_ <<
" 2a " << originTag2_.encode() << std::endl;
163 if (tagOld.
encode()!=tagNew.encode()) {
166 LogVerbatim(
"HLTDoublet") <<
" XXX " << label_ <<
" 2b " << tagNew.encode() << std::endl;
175 for (
unsigned int i1=0; i1!=n1; i1++) {
180 for (
unsigned int i2=I; i2!=n2; i2++) {
184 double Dphi(
std::abs(p1.phi()-p2.phi()));
187 double Deta(
std::abs(p1.eta()-p2.eta()));
193 double DelR(
sqrt(Dphi*Dphi+Deta*Deta));
195 if ( ( (!cutdphi_) || ((min_Dphi_<=Dphi) && (Dphi<=max_Dphi_)) ) &&
196 ( (!cutdeta_) || ((min_Deta_<=Deta) && (Deta<=max_Deta_)) ) &&
197 ( (!cutminv_) || ((min_Minv_<=Minv) && (Minv<=max_Minv_)) ) &&
198 ( (!cutdelr_) || ((min_DelR_<=DelR) && (DelR<=max_DelR_)) ) &&
199 ( (!cutpt_ ) || ((min_Pt_ <=
Pt ) && (
Pt <=max_Pt_ )) ) ) {
201 filterproduct.
addObject(triggerType1_,r1);
202 filterproduct.
addObject(triggerType2_,r2);
208 accept = (n>=min_N_);
HLTDoublet(const edm::ParameterSet &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static PFTauRenderPlugin instance
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>)
const std::complex< double > I
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual bool hltFilter(edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct)
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::string const & moduleLabel() const
std::string const & productInstanceName() const
Provenance getProvenance(BranchID const &theID) const
math::XYZTLorentzVector LorentzVector
Lorentz vector.