20 template<
typename T1,
typename T2>
22 originTag1_(iConfig.
template getParameter<edm::InputTag>(
"originTag1")),
23 originTag2_(iConfig.
template getParameter<edm::InputTag>(
"originTag2")),
24 inputTag1_(iConfig.
template getParameter<edm::InputTag>(
"inputTag1")),
25 inputTag2_(iConfig.
template getParameter<edm::InputTag>(
"inputTag2")),
26 triggerType1_(iConfig.
template getParameter<int>(
"triggerType1")),
27 triggerType2_(iConfig.
template getParameter<int>(
"triggerType2")),
28 minDR_ (iConfig.
template getParameter<double>(
"MinDR")),
29 maxDZ_ (iConfig.
template getParameter<double>(
"MaxDZ")),
30 min_N_ (iConfig.
template getParameter<int>(
"MinN")),
31 checkSC_ (iConfig.
template getParameter<bool>(
"checkSC")),
32 label_ (iConfig.getParameter<std::
string>(
"@module_label")),
40 template<
typename T1,
typename T2>
45 template<
typename T1,
typename T2>
49 makeHLTFilterDescription(desc);
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 " << label_ <<
" 0 " << std::endl;
85 coll1->getObjects(triggerType1_,coll1_);
88 coll2->getObjects(triggerType2_,coll2_);
94 LogVerbatim(
"HLTDoubletDZ") <<
" XXX " << label_ <<
" 1a " << originTag1_.encode() << std::endl;
102 if (tagOld.encode()!=tagNew.encode()) {
105 LogVerbatim(
"HLTDoubletDZ") <<
" XXX " << label_ <<
" 1b " << tagNew.encode() << std::endl;
109 LogVerbatim(
"HLTDoubletDZ") <<
" XXX " << label_ <<
" 2a " << originTag2_.encode() << std::endl;
117 if (tagOld.encode()!=tagNew.encode()) {
120 LogVerbatim(
"HLTDoubletDZ") <<
" XXX " << label_ <<
" 2b " << tagNew.encode() << std::endl;
129 for (
unsigned int i1=0; i1!=n1; i1++) {
134 for (
unsigned int i2=I; i2!=n2; i2++) {
138 if (r1->superCluster() == r2->superCluster())
continue;
142 if (
reco::deltaR(candidate1, candidate2) < minDR_ )
continue;
143 if (
std::abs(candidate1.
vz()-candidate2.
vz()) > maxDZ_ )
continue;
145 filterproduct.
addObject(triggerType1_,r1);
146 filterproduct.
addObject(triggerType2_,r2);
150 accept = accept || (n>=min_N_);
HLTDoubletDZ(const edm::ParameterSet &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static PFTauRenderPlugin instance
virtual bool hltFilter(edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct)
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.
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
const std::complex< double > I
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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::XYZTLorentzVector LorentzVector
Lorentz vector.