CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Attributes
HLTDoublet< T1, T2 > Class Template Reference

#include <HLTDoublet.h>

Inheritance diagram for HLTDoublet< T1, T2 >:
HLTFilter edm::global::EDFilter<> edm::global::EDFilterBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 HLTDoublet (const edm::ParameterSet &)
 
bool hltFilter (edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) const override
 
 ~HLTDoublet () override=default
 
- Public Member Functions inherited from HLTFilter
 HLTFilter (const edm::ParameterSet &config)
 
int module (edm::Event const &) const
 
const std::string * moduleLabel () const
 
int path (edm::Event const &) const
 
const std::string * pathName (edm::Event const &) const
 
std::pair< int, int > pmid (edm::Event const &) const
 
bool saveTags () const
 
 ~HLTFilter () override
 
- Public Member Functions inherited from edm::global::EDFilter<>
 EDFilter ()=default
 
 EDFilter (const EDFilter &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDFilteroperator= (const EDFilter &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
bool wantsStreamLuminosityBlocks () const noexcept final
 
bool wantsStreamRuns () const noexcept final
 
- Public Member Functions inherited from edm::global::EDFilterBase
 EDFilterBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDFilterBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from HLTFilter
static void makeHLTFilterDescription (edm::ParameterSetDescription &desc)
 
- Static Public Member Functions inherited from edm::global::EDFilterBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Types

typedef std::vector< T1 > T1Collection
 
typedef edm::Ref< T1CollectionT1Ref
 
typedef std::vector< T2 > T2Collection
 
typedef edm::Ref< T2CollectionT2Ref
 

Private Attributes

const bool cutdelr2_
 
const bool cutdeta_
 
const bool cutdphi_
 
const bool cutminv_
 
const bool cutpt_
 
const edm::InputTag inputTag1_
 
const edm::InputTag inputTag2_
 
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefsinputToken1_
 
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefsinputToken2_
 
const double max_DelR2_
 
const double max_Deta_
 
const double max_Dphi_
 
const double max_Minv_
 
const double max_Pt_
 
const double min_DelR2_
 
const double min_Deta_
 
const double min_Dphi_
 
const double min_Minv_
 
const int min_N_
 
const double min_Pt_
 
const std::vector< edm::InputTagoriginTag1_
 
const std::vector< edm::InputTagoriginTag2_
 
const bool same_
 
const int triggerType1_
 
const int triggerType2_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDFilterBase
typedef EDFilterBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

template<typename T1, typename T2>
class HLTDoublet< T1, T2 >

See header file for documentation

Author
Martin Grunewald

This class is an HLTFilter (-> EDFilter) implementing a basic HLT trigger for pairs of object, evaluating all pairs with the first object from collection 1, and the second object from collection 2, cutting on variables relating to their 4-momentum representations. The object collections are assumed to be outputs of HLTSinglet single-object-type filters so that the access is thorugh RefToBases and polymorphic.

Author
Martin Grunewald

Definition at line 34 of file HLTDoublet.h.

Member Typedef Documentation

◆ T1Collection

template<typename T1 , typename T2 >
typedef std::vector<T1> HLTDoublet< T1, T2 >::T1Collection
private

Definition at line 46 of file HLTDoublet.h.

◆ T1Ref

template<typename T1 , typename T2 >
typedef edm::Ref<T1Collection> HLTDoublet< T1, T2 >::T1Ref
private

Definition at line 47 of file HLTDoublet.h.

◆ T2Collection

template<typename T1 , typename T2 >
typedef std::vector<T2> HLTDoublet< T1, T2 >::T2Collection
private

Definition at line 48 of file HLTDoublet.h.

◆ T2Ref

template<typename T1 , typename T2 >
typedef edm::Ref<T2Collection> HLTDoublet< T1, T2 >::T2Ref
private

Definition at line 49 of file HLTDoublet.h.

Constructor & Destructor Documentation

◆ HLTDoublet()

template<typename T1 , typename T2 >
HLTDoublet< T1, T2 >::HLTDoublet ( const edm::ParameterSet iConfig)
explicit

Definition at line 24 of file HLTDoublet.cc.

References HLTDoublet< T1, T2 >::cutdelr2_, HLTDoublet< T1, T2 >::cutdeta_, HLTDoublet< T1, T2 >::cutdphi_, HLTDoublet< T1, T2 >::cutminv_, HLTDoublet< T1, T2 >::cutpt_, edm::InputTag::encode(), HLTDoublet< T1, T2 >::inputTag1_, HLTDoublet< T1, T2 >::inputTag2_, LogDebug, HLTDoublet< T1, T2 >::max_DelR2_, HLTDoublet< T1, T2 >::max_Deta_, HLTDoublet< T1, T2 >::max_Dphi_, HLTDoublet< T1, T2 >::max_Minv_, HLTDoublet< T1, T2 >::max_Pt_, HLTDoublet< T1, T2 >::min_DelR2_, HLTDoublet< T1, T2 >::min_Deta_, HLTDoublet< T1, T2 >::min_Dphi_, HLTDoublet< T1, T2 >::min_Minv_, HLTDoublet< T1, T2 >::min_N_, HLTDoublet< T1, T2 >::min_Pt_, HLTDoublet< T1, T2 >::same_, HLTDoublet< T1, T2 >::triggerType1_, and HLTDoublet< T1, T2 >::triggerType2_.

25  : HLTFilter(iConfig),
26  originTag1_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag1")),
27  originTag2_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag2")),
28  inputTag1_(iConfig.template getParameter<edm::InputTag>("inputTag1")),
29  inputTag2_(iConfig.template getParameter<edm::InputTag>("inputTag2")),
30  inputToken1_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
31  inputToken2_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
32  triggerType1_(iConfig.template getParameter<int>("triggerType1")),
33  triggerType2_(iConfig.template getParameter<int>("triggerType2")),
34  min_Deta_(iConfig.template getParameter<double>("MinDeta")),
35  max_Deta_(iConfig.template getParameter<double>("MaxDeta")),
36  min_Dphi_(iConfig.template getParameter<double>("MinDphi")),
37  max_Dphi_(iConfig.template getParameter<double>("MaxDphi")),
38  // min Delta-R^2 threshold with sign
39  min_DelR2_(iConfig.template getParameter<double>("MinDelR") *
40  std::abs(iConfig.template getParameter<double>("MinDelR"))),
41  // max Delta-R^2 threshold with sign
42  max_DelR2_(iConfig.template getParameter<double>("MaxDelR") *
43  std::abs(iConfig.template getParameter<double>("MaxDelR"))),
44  min_Pt_(iConfig.template getParameter<double>("MinPt")),
45  max_Pt_(iConfig.template getParameter<double>("MaxPt")),
46  min_Minv_(iConfig.template getParameter<double>("MinMinv")),
47  max_Minv_(iConfig.template getParameter<double>("MaxMinv")),
48  min_N_(iConfig.template getParameter<int>("MinN")),
49  same_(inputTag1_.encode() == inputTag2_.encode()), // same collections to be compared?
50  cutdeta_(min_Deta_ <= max_Deta_), // cut active?
51  cutdphi_(min_Dphi_ <= max_Dphi_), // cut active?
52  cutdelr2_(min_DelR2_ <= max_DelR2_), // cut active?
53  cutpt_(min_Pt_ <= max_Pt_), // cut active?
54  cutminv_(min_Minv_ <= max_Minv_) // cut active?
55 {
56  LogDebug("HLTDoublet") << "InputTags and cuts:\n inputTag1=" << inputTag1_.encode()
57  << " inputTag2=" << inputTag2_.encode() << " triggerType1=" << triggerType1_
58  << " triggerType2=" << triggerType2_ << "\n Deta [" << min_Deta_ << ", " << max_Deta_ << "]"
59  << " Dphi [" << min_Dphi_ << ", " << max_Dphi_ << "]"
60  << " DelR2 [" << min_DelR2_ << ", " << max_DelR2_ << "]"
61  << " Pt [" << min_Pt_ << ", " << max_Pt_ << "]"
62  << " Minv [" << min_Minv_ << ", " << max_Minv_ << "]"
63  << " MinN=" << min_N_ << "\n same=" << same_ << " cut_deta=" << cutdeta_
64  << " cutdphi=" << cutdphi_ << " cut_delr2=" << cutdelr2_ << " cut_pt=" << cutpt_
65  << " cut_minv=" << cutminv_;
66 }
const edm::InputTag inputTag2_
Definition: HLTDoublet.h:55
const double min_Pt_
Definition: HLTDoublet.h:63
const double min_Deta_
Definition: HLTDoublet.h:60
const bool same_
Definition: HLTDoublet.h:69
const bool cutpt_
Definition: HLTDoublet.h:71
std::string encode() const
Definition: InputTag.cc:159
const double min_Dphi_
Definition: HLTDoublet.h:61
const edm::InputTag inputTag1_
Definition: HLTDoublet.h:54
const double min_DelR2_
Definition: HLTDoublet.h:62
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken1_
Definition: HLTDoublet.h:56
const double min_Minv_
Definition: HLTDoublet.h:64
const double max_DelR2_
Definition: HLTDoublet.h:62
const double max_Deta_
Definition: HLTDoublet.h:60
const int triggerType2_
Definition: HLTDoublet.h:59
const bool cutdphi_
Definition: HLTDoublet.h:71
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const int min_N_
Definition: HLTDoublet.h:65
const double max_Minv_
Definition: HLTDoublet.h:64
HLTFilter(const edm::ParameterSet &config)
Definition: HLTFilter.cc:20
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken2_
Definition: HLTDoublet.h:57
const double max_Pt_
Definition: HLTDoublet.h:63
const bool cutdelr2_
Definition: HLTDoublet.h:71
const std::vector< edm::InputTag > originTag2_
Definition: HLTDoublet.h:53
const std::vector< edm::InputTag > originTag1_
Definition: HLTDoublet.h:52
const int triggerType1_
Definition: HLTDoublet.h:58
const bool cutminv_
Definition: HLTDoublet.h:71
const double max_Dphi_
Definition: HLTDoublet.h:61
const bool cutdeta_
Definition: HLTDoublet.h:71
#define LogDebug(id)

◆ ~HLTDoublet()

template<typename T1 , typename T2 >
HLTDoublet< T1, T2 >::~HLTDoublet ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

template<typename T1 , typename T2 >
void HLTDoublet< T1, T2 >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 69 of file HLTDoublet.cc.

References edm::ConfigurationDescriptions::add(), defaultModuleLabel(), submitPVResolutionJobs::desc, ProducerED_cfi::InputTag, HLT_2024v14_cff::originTag1, and HLT_2024v14_cff::originTag2.

69  {
72  std::vector<edm::InputTag> originTag1(1, edm::InputTag("hltOriginal1"));
73  std::vector<edm::InputTag> originTag2(1, edm::InputTag("hltOriginal2"));
74  desc.add<std::vector<edm::InputTag>>("originTag1", originTag1);
75  desc.add<std::vector<edm::InputTag>>("originTag2", originTag2);
76  desc.add<edm::InputTag>("inputTag1", edm::InputTag("hltFiltered1"));
77  desc.add<edm::InputTag>("inputTag2", edm::InputTag("hltFiltered22"));
78  desc.add<int>("triggerType1", 0);
79  desc.add<int>("triggerType2", 0);
80  desc.add<double>("MinDeta", +1.0);
81  desc.add<double>("MaxDeta", -1.0);
82  desc.add<double>("MinDphi", +1.0);
83  desc.add<double>("MaxDphi", -1.0);
84  desc.add<double>("MinDelR", +1.0);
85  desc.add<double>("MaxDelR", -1.0);
86  desc.add<double>("MinPt", +1.0);
87  desc.add<double>("MaxPt", -1.0);
88  desc.add<double>("MinMinv", +1.0);
89  desc.add<double>("MaxMinv", -1.0);
90  desc.add<int>("MinN", 1);
92 }
std::string defaultModuleLabel()
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
Definition: HLTFilter.cc:25
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ hltFilter()

template<typename T1 , typename T2 >
bool HLTDoublet< T1, T2 >::hltFilter ( edm::Event iEvent,
const edm::EventSetup iSetup,
trigger::TriggerFilterObjectWithRefs filterproduct 
) const
overridevirtual

Implements HLTFilter.

Definition at line 100 of file HLTDoublet.cc.

References funct::abs(), accept(), trigger::TriggerFilterObjectWithRefs::addCollectionTag(), trigger::TriggerRefsCollections::addObject(), reco::deltaPhi(), trigger::TriggerRefsCollections::getObjects(), Exhume::I, mps_fire::i, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, iEvent, ProducerED_cfi::InputTag, instance, label, HerwigMaxPtPartonFilter_cfi::moduleLabel, dqmiodumpmetadata::n, or, AlCaHLTBitMon_ParallelJobs::p, LaserDQM_cfg::p1, SiStripOfflineCRack_cfg::p2, LaserDQM_cfg::process, diffTwoXMLs::r2, and PDWG_EXODelayedJetMET_cff::saveTags.

102  {
103  using namespace std;
104  using namespace edm;
105  using namespace reco;
106  using namespace trigger;
107 
108  // All HLT filters must create and fill an HLT filter object,
109  // recording any reconstructed physics objects satisfying (or not)
110  // this HLT filter, and place it in the Event.
111 
112  bool accept(false);
113 
114  LogVerbatim("HLTDoublet") << " XXX " << moduleLabel() << " 0 ";
115 
116  std::vector<T1Ref> coll1;
117  std::vector<T2Ref> coll2;
118 
119  // get hold of pre-filtered object collections
120  Handle<TriggerFilterObjectWithRefs> handle1, handle2;
121  if (iEvent.getByToken(inputToken1_, handle1) && iEvent.getByToken(inputToken2_, handle2)) {
122  handle1->getObjects(triggerType1_, coll1);
123  handle2->getObjects(triggerType2_, coll2);
124  const size_type n1(coll1.size());
125  const size_type n2(coll2.size());
126 
127  if (saveTags()) {
128  InputTag tagOld;
129  for (unsigned int i = 0; i < originTag1_.size(); ++i) {
130  filterproduct.addCollectionTag(originTag1_[i]);
131  LogVerbatim("HLTDoublet") << " XXX " << moduleLabel() << " 1a/" << i << " " << originTag1_[i].encode();
132  }
133  tagOld = InputTag();
134  for (size_type i1 = 0; i1 != n1; ++i1) {
135  const ProductID pid(coll1[i1].id());
136  const auto& prov = iEvent.getStableProvenance(pid);
137  const string& label(prov.moduleLabel());
138  const string& instance(prov.productInstanceName());
139  const string& process(prov.processName());
141  if (tagOld.encode() != tagNew.encode()) {
142  filterproduct.addCollectionTag(tagNew);
143  tagOld = tagNew;
144  LogVerbatim("HLTDoublet") << " XXX " << moduleLabel() << " 1b " << tagNew.encode();
145  }
146  }
147  for (unsigned int i = 0; i < originTag2_.size(); ++i) {
148  filterproduct.addCollectionTag(originTag2_[i]);
149  LogVerbatim("HLTDoublet") << " XXX " << moduleLabel() << " 2a/" << i << " " << originTag2_[i].encode();
150  }
151  tagOld = InputTag();
152  for (size_type i2 = 0; i2 != n2; ++i2) {
153  const ProductID pid(coll2[i2].id());
154  const auto& prov = iEvent.getStableProvenance(pid);
155  const string& label(prov.moduleLabel());
156  const string& instance(prov.productInstanceName());
157  const string& process(prov.processName());
159  if (tagOld.encode() != tagNew.encode()) {
160  filterproduct.addCollectionTag(tagNew);
161  tagOld = tagNew;
162  LogVerbatim("HLTDoublet") << " XXX " << moduleLabel() << " 2b " << tagNew.encode();
163  }
164  }
165  }
166 
167  int n(0);
168  T1Ref r1;
169  T2Ref r2;
171  for (unsigned int i1 = 0; i1 != n1; i1++) {
172  r1 = coll1[i1];
173  p1 = r1->p4();
174  unsigned int I(0);
175  if (same_) {
176  I = i1 + 1;
177  }
178  for (unsigned int i2 = I; i2 != n2; i2++) {
179  r2 = coll2[i2];
180  p2 = r2->p4();
181 
183  double const Deta = std::abs(p1.eta() - p2.eta());
184  if (cutdeta_ and (min_Deta_ > Deta or Deta > max_Deta_))
185  continue;
186 
187  double const Dphi = std::abs(reco::deltaPhi(p1.phi(), p2.phi()));
188  if (cutdphi_ and (min_Dphi_ > Dphi or Dphi > max_Dphi_))
189  continue;
190 
191  double const DelR2 = Deta * Deta + Dphi * Dphi;
192  if (cutdelr2_ and (min_DelR2_ > DelR2 or DelR2 > max_DelR2_))
193  continue;
194  }
195 
196  p = p1 + p2;
197 
198  double const Pt = p.pt();
199  if (cutpt_ and (min_Pt_ > Pt or Pt > max_Pt_))
200  continue;
201 
202  double const Minv = std::abs(p.mass());
203  if (cutminv_ and (min_Minv_ > Minv or Minv > max_Minv_))
204  continue;
205 
206  n++;
207  filterproduct.addObject(triggerType1_, r1);
208  filterproduct.addObject(triggerType2_, r2);
209  }
210  }
211 
212  // filter decision
213  accept = (n >= min_N_);
214  }
215 
216  return accept;
217 }
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
Log< level::Info, true > LogVerbatim
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
const double min_Pt_
Definition: HLTDoublet.h:63
const double min_Deta_
Definition: HLTDoublet.h:60
const bool same_
Definition: HLTDoublet.h:69
const bool cutpt_
Definition: HLTDoublet.h:71
static PFTauRenderPlugin instance
std::string encode() const
Definition: InputTag.cc:159
edm::Ref< T2Collection > T2Ref
Definition: HLTDoublet.h:49
const double min_Dphi_
Definition: HLTDoublet.h:61
const double min_DelR2_
Definition: HLTDoublet.h:62
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken1_
Definition: HLTDoublet.h:56
const double min_Minv_
Definition: HLTDoublet.h:64
const double max_DelR2_
Definition: HLTDoublet.h:62
const double max_Deta_
Definition: HLTDoublet.h:60
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
uint16_t size_type
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref<C>)
char const * label
int iEvent
Definition: GenABIO.cc:224
const int triggerType2_
Definition: HLTDoublet.h:59
const std::string * moduleLabel() const
Definition: HLTFilter.cc:61
edm::Ref< T1Collection > T1Ref
Definition: HLTDoublet.h:47
const bool cutdphi_
Definition: HLTDoublet.h:71
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const std::complex< double > I
Definition: I.h:8
const int min_N_
Definition: HLTDoublet.h:65
const double max_Minv_
Definition: HLTDoublet.h:64
bool saveTags() const
Definition: HLTFilter.h:46
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken2_
Definition: HLTDoublet.h:57
const double max_Pt_
Definition: HLTDoublet.h:63
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
const bool cutdelr2_
Definition: HLTDoublet.h:71
fixed size matrix
HLT enums.
const std::vector< edm::InputTag > originTag2_
Definition: HLTDoublet.h:53
const std::vector< edm::InputTag > originTag1_
Definition: HLTDoublet.h:52
const int triggerType1_
Definition: HLTDoublet.h:58
const bool cutminv_
Definition: HLTDoublet.h:71
const double max_Dphi_
Definition: HLTDoublet.h:61
const bool cutdeta_
Definition: HLTDoublet.h:71
math::PtEtaPhiELorentzVectorF LorentzVector

Member Data Documentation

◆ cutdelr2_

template<typename T1 , typename T2 >
const bool HLTDoublet< T1, T2 >::cutdelr2_
private

Definition at line 71 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ cutdeta_

template<typename T1 , typename T2 >
const bool HLTDoublet< T1, T2 >::cutdeta_
private

Definition at line 71 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ cutdphi_

template<typename T1 , typename T2 >
const bool HLTDoublet< T1, T2 >::cutdphi_
private

Definition at line 71 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ cutminv_

template<typename T1 , typename T2 >
const bool HLTDoublet< T1, T2 >::cutminv_
private

Definition at line 71 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ cutpt_

template<typename T1 , typename T2 >
const bool HLTDoublet< T1, T2 >::cutpt_
private

Definition at line 71 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ inputTag1_

template<typename T1 , typename T2 >
const edm::InputTag HLTDoublet< T1, T2 >::inputTag1_
private

Definition at line 54 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ inputTag2_

template<typename T1 , typename T2 >
const edm::InputTag HLTDoublet< T1, T2 >::inputTag2_
private

Definition at line 55 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ inputToken1_

template<typename T1 , typename T2 >
const edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> HLTDoublet< T1, T2 >::inputToken1_
private

Definition at line 56 of file HLTDoublet.h.

◆ inputToken2_

template<typename T1 , typename T2 >
const edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> HLTDoublet< T1, T2 >::inputToken2_
private

Definition at line 57 of file HLTDoublet.h.

◆ max_DelR2_

template<typename T1 , typename T2 >
const double HLTDoublet< T1, T2 >::max_DelR2_
private

Definition at line 62 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ max_Deta_

template<typename T1 , typename T2 >
const double HLTDoublet< T1, T2 >::max_Deta_
private

Definition at line 60 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ max_Dphi_

template<typename T1 , typename T2 >
const double HLTDoublet< T1, T2 >::max_Dphi_
private

Definition at line 61 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ max_Minv_

template<typename T1 , typename T2 >
const double HLTDoublet< T1, T2 >::max_Minv_
private

Definition at line 64 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ max_Pt_

template<typename T1 , typename T2 >
const double HLTDoublet< T1, T2 >::max_Pt_
private

Definition at line 63 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ min_DelR2_

template<typename T1 , typename T2 >
const double HLTDoublet< T1, T2 >::min_DelR2_
private

Definition at line 62 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ min_Deta_

template<typename T1 , typename T2 >
const double HLTDoublet< T1, T2 >::min_Deta_
private

Definition at line 60 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ min_Dphi_

template<typename T1 , typename T2 >
const double HLTDoublet< T1, T2 >::min_Dphi_
private

Definition at line 61 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ min_Minv_

template<typename T1 , typename T2 >
const double HLTDoublet< T1, T2 >::min_Minv_
private

Definition at line 64 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ min_N_

template<typename T1 , typename T2 >
const int HLTDoublet< T1, T2 >::min_N_
private

Definition at line 65 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ min_Pt_

template<typename T1 , typename T2 >
const double HLTDoublet< T1, T2 >::min_Pt_
private

Definition at line 63 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ originTag1_

template<typename T1 , typename T2 >
const std::vector<edm::InputTag> HLTDoublet< T1, T2 >::originTag1_
private

Definition at line 52 of file HLTDoublet.h.

◆ originTag2_

template<typename T1 , typename T2 >
const std::vector<edm::InputTag> HLTDoublet< T1, T2 >::originTag2_
private

Definition at line 53 of file HLTDoublet.h.

◆ same_

template<typename T1 , typename T2 >
const bool HLTDoublet< T1, T2 >::same_
private

Definition at line 69 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ triggerType1_

template<typename T1 , typename T2 >
const int HLTDoublet< T1, T2 >::triggerType1_
private

Definition at line 58 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().

◆ triggerType2_

template<typename T1 , typename T2 >
const int HLTDoublet< T1, T2 >::triggerType2_
private

Definition at line 59 of file HLTDoublet.h.

Referenced by HLTDoublet< T1, T2 >::HLTDoublet().