CMS 3D CMS Logo

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

#include <HLTDoubletSinglet.h>

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

Public Member Functions

 HLTDoubletSinglet (const edm::ParameterSet &)
 
bool hltFilter (edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) const override
 
 ~HLTDoubletSinglet () override
 
- 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 final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const 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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > 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
 
bool registeredToConsumeMany (TypeID const &, 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::ESRecordsToProxyIndices 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
 
typedef std::vector< T3 > T3Collection
 
typedef edm::Ref< T3CollectionT3Ref
 

Private Attributes

const bool cutdelr_
 
const bool cutdeta_
 
const bool cutdphi_
 
const bool cutminv_
 
const bool cutpt_
 
const edm::InputTag inputTag1_
 
const edm::InputTag inputTag2_
 
const edm::InputTag inputTag3_
 
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefsinputToken1_
 
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefsinputToken2_
 
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefsinputToken3_
 
const double max_DelR2_
 
const double max_DelR_
 
const double max_Deta_
 
const double max_Dphi_
 
const double max_Minv_
 
const double max_Pt_
 
const double min_DelR2_
 
const double min_DelR_
 
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 std::vector< edm::InputTagoriginTag3_
 
const bool same12_
 
const bool same13_
 
const bool same23_
 
const int triggerType1_
 
const int triggerType2_
 
const int triggerType3_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDFilterBase
typedef EDFilterBase ModuleType
 
- Public Types inherited from edm::ProducerBase
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 ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
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, typename T3>
class HLTDoubletSinglet< T1, T2, T3 >

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

Author
Jaime Leon Holgado

Definition at line 46 of file HLTDoubletSinglet.h.

Member Typedef Documentation

◆ T1Collection

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

Definition at line 82 of file HLTDoubletSinglet.h.

◆ T1Ref

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

Definition at line 83 of file HLTDoubletSinglet.h.

◆ T2Collection

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

Definition at line 84 of file HLTDoubletSinglet.h.

◆ T2Ref

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

Definition at line 85 of file HLTDoubletSinglet.h.

◆ T3Collection

template<typename T1 , typename T2 , typename T3 >
typedef std::vector<T3> HLTDoubletSinglet< T1, T2, T3 >::T3Collection
private

Definition at line 86 of file HLTDoubletSinglet.h.

◆ T3Ref

template<typename T1 , typename T2 , typename T3 >
typedef edm::Ref<T3Collection> HLTDoubletSinglet< T1, T2, T3 >::T3Ref
private

Definition at line 87 of file HLTDoubletSinglet.h.

Constructor & Destructor Documentation

◆ HLTDoubletSinglet()

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

Definition at line 98 of file HLTDoubletSinglet.h.

References HLTDoubletSinglet< T1, T2, T3 >::cutdelr_, HLTDoubletSinglet< T1, T2, T3 >::cutdeta_, HLTDoubletSinglet< T1, T2, T3 >::cutdphi_, HLTDoubletSinglet< T1, T2, T3 >::cutminv_, HLTDoubletSinglet< T1, T2, T3 >::cutpt_, edm::InputTag::encode(), HLTDoubletSinglet< T1, T2, T3 >::inputTag1_, HLTDoubletSinglet< T1, T2, T3 >::inputTag2_, HLTDoubletSinglet< T1, T2, T3 >::inputTag3_, LogDebug, HLTDoubletSinglet< T1, T2, T3 >::max_DelR_, HLTDoubletSinglet< T1, T2, T3 >::max_Deta_, HLTDoubletSinglet< T1, T2, T3 >::max_Dphi_, HLTDoubletSinglet< T1, T2, T3 >::max_Minv_, HLTDoubletSinglet< T1, T2, T3 >::max_Pt_, HLTDoubletSinglet< T1, T2, T3 >::min_DelR_, HLTDoubletSinglet< T1, T2, T3 >::min_Deta_, HLTDoubletSinglet< T1, T2, T3 >::min_Dphi_, HLTDoubletSinglet< T1, T2, T3 >::min_Minv_, HLTDoubletSinglet< T1, T2, T3 >::min_N_, HLTDoubletSinglet< T1, T2, T3 >::min_Pt_, HLTFilter::moduleLabel(), HLTDoubletSinglet< T1, T2, T3 >::same12_, HLTDoubletSinglet< T1, T2, T3 >::same13_, HLTDoubletSinglet< T1, T2, T3 >::same23_, HLTDoubletSinglet< T1, T2, T3 >::triggerType1_, HLTDoubletSinglet< T1, T2, T3 >::triggerType2_, and HLTDoubletSinglet< T1, T2, T3 >::triggerType3_.

99  : HLTFilter(iConfig),
100  originTag1_(iConfig.getParameter<std::vector<edm::InputTag>>("originTag1")),
101  originTag2_(iConfig.getParameter<std::vector<edm::InputTag>>("originTag2")),
102  originTag3_(iConfig.getParameter<std::vector<edm::InputTag>>("originTag3")),
103  inputTag1_(iConfig.getParameter<edm::InputTag>("inputTag1")),
104  inputTag2_(iConfig.getParameter<edm::InputTag>("inputTag2")),
105  inputTag3_(iConfig.getParameter<edm::InputTag>("inputTag3")),
109  triggerType1_(iConfig.getParameter<int>("triggerType1")),
110  triggerType2_(iConfig.getParameter<int>("triggerType2")),
111  triggerType3_(iConfig.getParameter<int>("triggerType3")),
112  min_Dphi_(iConfig.getParameter<double>("MinDphi")),
113  max_Dphi_(iConfig.getParameter<double>("MaxDphi")),
114  min_Deta_(iConfig.getParameter<double>("MinDeta")),
115  max_Deta_(iConfig.getParameter<double>("MaxDeta")),
116  min_Minv_(iConfig.getParameter<double>("MinMinv")),
117  max_Minv_(iConfig.getParameter<double>("MaxMinv")),
118  min_DelR_(iConfig.getParameter<double>("MinDelR")),
119  max_DelR_(iConfig.getParameter<double>("MaxDelR")),
120  min_Pt_(iConfig.getParameter<double>("MinPt")),
121  max_Pt_(iConfig.getParameter<double>("MaxPt")),
122  min_N_(iConfig.getParameter<int>("MinN")),
123  same12_(inputTag1_.encode() == inputTag2_.encode()), // same collections to be compared?
124  same13_(inputTag1_.encode() == inputTag3_.encode()), // same collections to be compared?
125  same23_(inputTag2_.encode() == inputTag3_.encode()), // same collections to be compared?
126  min_DelR2_(min_DelR_ < 0 ? 0 : min_DelR_ * min_DelR_), // avoid computing sqrt(R2)
127  max_DelR2_(max_DelR_ < 0 ? 0 : max_DelR_ * max_DelR_), // avoid computing sqrt(R2)
128  cutdphi_(min_Dphi_ <= max_Dphi_), // cut active?
129  cutdeta_(min_Deta_ <= max_Deta_), // cut active?
130  cutminv_(min_Minv_ <= max_Minv_), // cut active?
131  cutdelr_(min_DelR_ <= max_DelR_), // cut active?
132  cutpt_(min_Pt_ <= max_Pt_) // cut active?
133 {
134  LogDebug("") << "InputTags and cuts : " << inputTag1_.encode() << " " << inputTag2_.encode() << " "
135  << inputTag3_.encode() << triggerType1_ << " " << triggerType2_ << " " << triggerType3_ << " Dphi ["
136  << min_Dphi_ << " " << max_Dphi_ << "]"
137  << " Deta [" << min_Deta_ << " " << max_Deta_ << "]"
138  << " Minv [" << min_Minv_ << " " << max_Minv_ << "]"
139  << " DelR [" << min_DelR_ << " " << max_DelR_ << "]"
140  << " Pt [" << min_Pt_ << " " << max_Pt_ << "]"
141  << " MinN =" << min_N_ << " same12/same13/same23/dphi/deta/minv/delr/pt " << same12_ << same13_
142  << same23_ << cutdphi_ << cutdeta_ << cutminv_ << cutdelr_ << cutpt_;
143  if (cutdelr_ && max_DelR_ <= 0)
144  edm::LogWarning("HLTDoubletSinglet")
145  << " moduleLabel: " << moduleLabel()
146  << "Warning: The deltaR requirement is active, but its range is invalid: DelR [" << min_DelR_ << " "
147  << max_DelR_ << "]";
148 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::string encode() const
Definition: InputTag.cc:159
const double min_DelR_
const double min_Pt_
const double min_Deta_
const double max_DelR_
const double max_DelR2_
const double min_Dphi_
const std::vector< edm::InputTag > originTag1_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const double max_Pt_
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken3_
const edm::InputTag inputTag1_
const std::string * moduleLabel() const
Definition: HLTFilter.cc:61
const double max_Dphi_
const edm::InputTag inputTag3_
const double min_DelR2_
const std::vector< edm::InputTag > originTag3_
HLTFilter(const edm::ParameterSet &config)
Definition: HLTFilter.cc:20
const edm::InputTag inputTag2_
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken1_
const std::vector< edm::InputTag > originTag2_
const double max_Deta_
const double max_Minv_
Log< level::Warning, false > LogWarning
const double min_Minv_
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken2_
#define LogDebug(id)

◆ ~HLTDoubletSinglet()

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

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 154 of file HLTDoubletSinglet.h.

References edm::ConfigurationDescriptions::add(), defaultModuleLabel(), submitPVResolutionJobs::desc, and HLT_2022v12_cff::InputTag.

154  {
157  desc.add<std::vector<edm::InputTag>>("originTag1", {edm::InputTag("hltOriginal1")});
158  desc.add<std::vector<edm::InputTag>>("originTag2", {edm::InputTag("hltOriginal2")});
159  desc.add<std::vector<edm::InputTag>>("originTag3", {edm::InputTag("hltOriginal3")});
160  desc.add<edm::InputTag>("inputTag1", edm::InputTag("hltFiltered1"));
161  desc.add<edm::InputTag>("inputTag2", edm::InputTag("hltFiltered2"));
162  desc.add<edm::InputTag>("inputTag3", edm::InputTag("hltFiltered3"));
163  desc.add<int>("triggerType1", 0);
164  desc.add<int>("triggerType2", 0);
165  desc.add<int>("triggerType3", 0);
166  desc.add<double>("MinDphi", +1.0);
167  desc.add<double>("MaxDphi", -1.0);
168  desc.add<double>("MinDeta", +1.0);
169  desc.add<double>("MaxDeta", -1.0);
170  desc.add<double>("MinMinv", +1.0);
171  desc.add<double>("MaxMinv", -1.0);
172  desc.add<double>("MinDelR", +1.0);
173  desc.add<double>("MaxDelR", -1.0);
174  desc.add<double>("MinPt", +1.0);
175  desc.add<double>("MaxPt", -1.0);
176  desc.add<int>("MinN", 1);
178 }
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 , typename T3 >
bool HLTDoubletSinglet< T1, T2, T3 >::hltFilter ( edm::Event iEvent,
const edm::EventSetup iSetup,
trigger::TriggerFilterObjectWithRefs filterproduct 
) const
overridevirtual

Implements HLTFilter.

Definition at line 186 of file HLTDoubletSinglet.h.

References funct::abs(), trigger::TriggerFilterObjectWithRefs::addCollectionTag(), trigger::TriggerRefsCollections::addObject(), SiPixelRawToDigiRegional_cfi::deltaPhi, mps_fire::i, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, testProducerWithPsetDescEmpty_cfi::i3, iEvent, HLT_2022v12_cff::InputTag, instance, label, HerwigMaxPtPartonFilter_cfi::moduleLabel, dqmiodumpmetadata::n, LaserDQM_cfg::p1, SiStripOfflineCRack_cfg::p2, chargedHadronTrackResolutionFilter_cfi::p3, LaserDQM_cfg::process, diffTwoXMLs::r1, diffTwoXMLs::r2, and PDWG_EXODelayedJetMET_cff::saveTags.

188  {
189  using namespace std;
190  using namespace edm;
191  using namespace reco;
192  using namespace trigger;
193 
194  // All HLT filters must create and fill an HLT filter object,
195  // recording any reconstructed physics objects satisfying (or not)
196  // this HLT filter, and place it in the Event.
197 
198  int n(0);
199 
200  LogVerbatim("HLTDoubletSinglet") << " moduleLabel: " << moduleLabel() << " 0 ";
201 
202  // get hold of pre-filtered object collections
203  std::vector<T1Ref> coll1;
204  auto const& objsWithRefs1 = iEvent.get(inputToken1_);
205  objsWithRefs1.getObjects(triggerType1_, coll1);
206  std::vector<T2Ref> coll2;
207  auto const& objsWithRefs2 = iEvent.get(inputToken2_);
208  objsWithRefs2.getObjects(triggerType2_, coll2);
209  std::vector<T3Ref> coll3;
210  auto const& objsWithRefs3 = iEvent.get(inputToken3_);
211  objsWithRefs3.getObjects(triggerType3_, coll3);
212 
213  const size_type n1(coll1.size());
214  const size_type n2(coll2.size());
215  const size_type n3(coll3.size());
216 
217  if (saveTags()) {
218  InputTag tagOld;
219  for (size_t i = 0; i < originTag1_.size(); ++i) {
220  filterproduct.addCollectionTag(originTag1_[i]);
221  LogVerbatim("HLTDoubletSinglet") << " moduleLabel: " << moduleLabel() << " 1a/" << i << " "
222  << originTag1_[i].encode();
223  }
224  tagOld = InputTag();
225  for (size_type i1 = 0; i1 != n1; ++i1) {
226  const ProductID pid(coll1[i1].id());
227  const auto& prov = iEvent.getStableProvenance(pid);
228  const string& label(prov.moduleLabel());
229  const string& instance(prov.productInstanceName());
230  const string& process(prov.processName());
232  if (tagOld.encode() != tagNew.encode()) {
233  filterproduct.addCollectionTag(tagNew);
234  tagOld = tagNew;
235  LogVerbatim("HLTDoubletSinglet") << " moduleLabel: " << moduleLabel() << " 1b " << tagNew.encode();
236  }
237  }
238  for (size_t i = 0; i < originTag2_.size(); ++i) {
239  filterproduct.addCollectionTag(originTag2_[i]);
240  LogVerbatim("HLTDoubletSinglet") << " moduleLabel: " << moduleLabel() << " 2a/" << i << " "
241  << originTag2_[i].encode();
242  }
243  tagOld = InputTag();
244  for (size_type i2 = 0; i2 != n2; ++i2) {
245  const ProductID pid(coll2[i2].id());
246  const auto& prov = iEvent.getStableProvenance(pid);
247  const string& label(prov.moduleLabel());
248  const string& instance(prov.productInstanceName());
249  const string& process(prov.processName());
251  if (tagOld.encode() != tagNew.encode()) {
252  filterproduct.addCollectionTag(tagNew);
253  tagOld = tagNew;
254  LogVerbatim("HLTDoubletSinglet") << " moduleLabel: " << moduleLabel() << " 2b " << tagNew.encode();
255  }
256  }
257  for (size_t i = 0; i < originTag3_.size(); ++i) {
258  filterproduct.addCollectionTag(originTag3_[i]);
259  LogVerbatim("HLTDoubletSinglet") << " moduleLabel: " << moduleLabel() << " 3a/" << i << " "
260  << originTag3_[i].encode();
261  }
262  tagOld = InputTag();
263  for (size_type i3 = 0; i3 != n3; ++i3) {
264  const ProductID pid(coll3[i3].id());
265  const auto& prov = iEvent.getStableProvenance(pid);
266  const string& label(prov.moduleLabel());
267  const string& instance(prov.productInstanceName());
268  const string& process(prov.processName());
270  if (tagOld.encode() != tagNew.encode()) {
271  filterproduct.addCollectionTag(tagNew);
272  tagOld = tagNew;
273  LogVerbatim("HLTDoubletSinglet") << " moduleLabel: " << moduleLabel() << " 3b " << tagNew.encode();
274  }
275  }
276 
277  T1Ref r1;
278  T2Ref r2;
279  T3Ref r3;
280  Candidate::LorentzVector p1, p2, p3, p13, p23;
281  for (size_t i1 = 0; i1 != n1; i1++) {
282  r1 = coll1[i1];
283  p1 = r1->p4();
284  auto const i2_min = (same12_ ? i1 + 1 : 0);
285  for (size_t i2 = i2_min; i2 != n2; i2++) {
286  r2 = coll2[i2];
287  p2 = r2->p4();
288 
289  auto const i3_min = (same23_ ? i2_min + 1 : (same13_ ? i1 + 1 : 0));
290  for (size_t i3 = i3_min; i3 != n3; i3++) {
291  r3 = coll3[i3];
292  p3 = r3->p4();
293 
294  //deltaPhi
295  auto const dPhi13(std::abs(deltaPhi(p1.phi(), p3.phi())));
296  if (cutdphi_ && (min_Dphi_ > dPhi13 || dPhi13 > max_Dphi_))
297  continue;
298  auto const dPhi23(std::abs(deltaPhi(p2.phi(), p3.phi())));
299  if (cutdphi_ && (min_Dphi_ > dPhi23 || dPhi23 > max_Dphi_))
300  continue;
301 
302  //deltaEta
303  auto const dEta13(std::abs(p1.eta() - p3.eta()));
304  if (cutdeta_ && (min_Deta_ > dEta13 || dEta13 > max_Deta_))
305  continue;
306  auto const dEta23(std::abs(p2.eta() - p3.eta()));
307  if (cutdeta_ && (min_Deta_ > dEta23 || dEta23 > max_Deta_))
308  continue;
309 
310  //deltaR
311  auto const delR2_13(dPhi13 * dPhi13 + dEta13 * dEta13);
312  if (cutdelr_ && (min_DelR2_ > delR2_13 || delR2_13 > max_DelR2_))
313  continue;
314  auto const delR2_23(dPhi23 * dPhi23 + dEta23 * dEta23);
315  if (cutdelr_ && (min_DelR2_ > delR2_23 || delR2_23 > max_DelR2_))
316  continue;
317 
318  //Pt and Minv
319  p13 = p1 + p3;
320  auto const mInv13(std::abs(p13.mass()));
321  if (cutminv_ && (min_Minv_ > mInv13 || mInv13 > max_Minv_))
322  continue;
323  auto const pt13(p13.pt());
324  if (cutpt_ && (min_Pt_ > pt13 || pt13 > max_Pt_))
325  continue;
326 
327  p23 = p2 + p3;
328  auto const mInv23(std::abs(p23.mass()));
329  if (cutminv_ && (min_Minv_ > mInv23 || mInv23 > max_Minv_))
330  continue;
331  auto const pt23(p23.pt());
332  if (cutpt_ && (min_Pt_ > pt23 || pt23 > max_Pt_))
333  continue;
334 
335  n++;
336  filterproduct.addObject(triggerType1_, r1);
337  filterproduct.addObject(triggerType2_, r2);
338  filterproduct.addObject(triggerType3_, r3);
339  }
340  }
341  }
342  }
343 
344  // filter decision
345  return (n >= min_N_);
346 }
Log< level::Info, true > LogVerbatim
static PFTauRenderPlugin instance
std::string encode() const
Definition: InputTag.cc:159
const double min_Pt_
const double min_Deta_
uint16_t size_type
const double max_DelR2_
const double min_Dphi_
const std::vector< edm::InputTag > originTag1_
edm::Ref< T2Collection > T2Ref
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref<C>)
char const * label
const double max_Pt_
int iEvent
Definition: GenABIO.cc:224
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken3_
const std::string * moduleLabel() const
Definition: HLTFilter.cc:61
edm::Ref< T1Collection > T1Ref
const double max_Dphi_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::Ref< T3Collection > T3Ref
const double min_DelR2_
bool saveTags() const
Definition: HLTFilter.h:46
const std::vector< edm::InputTag > originTag3_
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken1_
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
const std::vector< edm::InputTag > originTag2_
fixed size matrix
HLT enums.
const double max_Deta_
const double max_Minv_
const double min_Minv_
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken2_

Member Data Documentation

◆ cutdelr_

template<typename T1 , typename T2 , typename T3 >
const bool HLTDoubletSinglet< T1, T2, T3 >::cutdelr_
private

◆ cutdeta_

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

◆ cutdphi_

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

◆ cutminv_

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

◆ cutpt_

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

◆ inputTag1_

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

◆ inputTag2_

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

◆ inputTag3_

template<typename T1 , typename T2 , typename T3 >
const edm::InputTag HLTDoubletSinglet< T1, T2, T3 >::inputTag3_
private

◆ inputToken1_

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

Definition at line 63 of file HLTDoubletSinglet.h.

◆ inputToken2_

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

Definition at line 64 of file HLTDoubletSinglet.h.

◆ inputToken3_

template<typename T1 , typename T2 , typename T3 >
const edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> HLTDoubletSinglet< T1, T2, T3 >::inputToken3_
private

Definition at line 65 of file HLTDoubletSinglet.h.

◆ max_DelR2_

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

Definition at line 78 of file HLTDoubletSinglet.h.

◆ max_DelR_

template<typename T1 , typename T2 , typename T3 >
const double HLTDoubletSinglet< T1, T2, T3 >::max_DelR_
private

◆ max_Deta_

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

◆ max_Dphi_

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

◆ max_Minv_

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

◆ max_Pt_

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

◆ min_DelR2_

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

Definition at line 78 of file HLTDoubletSinglet.h.

◆ min_DelR_

template<typename T1 , typename T2 , typename T3 >
const double HLTDoubletSinglet< T1, T2, T3 >::min_DelR_
private

◆ min_Deta_

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

◆ min_Dphi_

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

◆ min_Minv_

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

◆ min_N_

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

◆ min_Pt_

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

◆ originTag1_

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

Definition at line 57 of file HLTDoubletSinglet.h.

◆ originTag2_

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

Definition at line 58 of file HLTDoubletSinglet.h.

◆ originTag3_

template<typename T1 , typename T2 , typename T3 >
const std::vector<edm::InputTag> HLTDoubletSinglet< T1, T2, T3 >::originTag3_
private

Definition at line 59 of file HLTDoubletSinglet.h.

◆ same12_

template<typename T1 , typename T2 , typename T3 >
const bool HLTDoubletSinglet< T1, T2, T3 >::same12_
private

◆ same13_

template<typename T1 , typename T2 , typename T3 >
const bool HLTDoubletSinglet< T1, T2, T3 >::same13_
private

◆ same23_

template<typename T1 , typename T2 , typename T3 >
const bool HLTDoubletSinglet< T1, T2, T3 >::same23_
private

◆ triggerType1_

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

◆ triggerType2_

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

◆ triggerType3_

template<typename T1 , typename T2 , typename T3 >
const int HLTDoubletSinglet< T1, T2, T3 >::triggerType3_
private