CMS 3D CMS Logo

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

#include <HLTDoubletDZ.h>

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

Public Member Functions

bool computeDZ (edm::Event &iEvent, T1Ref &c1, T2Ref &c2) const
 
template<>
bool computeDZ (edm::Event &iEvent, T1Ref &r1, T2Ref &r2) const
 
template<>
bool computeDZ (edm::Event &iEvent, T1Ref &r1, T2Ref &r2) const
 
template<>
bool computeDZ (edm::Event &iEvent, T1Ref &r1, T2Ref &r2) const
 
template<>
bool computeDZ (edm::Event &iEvent, T1Ref &r1, T2Ref &r2) const
 
template<>
bool computeDZ (edm::Event &iEvent, l1t::TkMuonRef &r1, l1t::TkMuonRef &r2) const
 
template<>
bool computeDZ (edm::Event &iEvent, l1t::HPSPFTauRef &r1, l1t::HPSPFTauRef &r2) const
 
template<>
void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
template<>
void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
template<>
void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
template<>
void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
bool getCollections (edm::Event &iEvent, std::vector< T1Ref > &coll1, std::vector< T2Ref > &coll2, trigger::TriggerFilterObjectWithRefs &filterproduct) const
 
 HLTDoubletDZ (const edm::ParameterSet &)
 
template<>
 HLTDoubletDZ (const edm::ParameterSet &iConfig)
 
template<>
 HLTDoubletDZ (const edm::ParameterSet &iConfig)
 
template<>
 HLTDoubletDZ (const edm::ParameterSet &iConfig)
 
template<>
 HLTDoubletDZ (const edm::ParameterSet &iConfig)
 
template<>
 HLTDoubletDZ (const edm::ParameterSet &iConfig)
 
bool hltFilter (edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) const override
 
template<>
bool hltFilter (edm::Event &iEvent, const edm::EventSetup &iSetup, trigger::TriggerFilterObjectWithRefs &filterproduct) const
 
template<>
bool hltFilter (edm::Event &iEvent, const edm::EventSetup &iSetup, trigger::TriggerFilterObjectWithRefs &filterproduct) const
 
template<>
bool hltFilter (edm::Event &iEvent, const edm::EventSetup &iSetup, trigger::TriggerFilterObjectWithRefs &filterproduct) const
 
 ~HLTDoubletDZ () 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
 

Private Attributes

const bool checkSC_
 
edm::EDGetTokenT< reco::ElectronCollectionelectronToken_
 
const edm::InputTag inputTag1_
 
const edm::InputTag inputTag2_
 
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefsinputToken1_
 
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefsinputToken2_
 
const double maxDZ_
 
const int min_N_
 
const double minDR_
 
const int minPixHitsForDZ_
 
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
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>
class HLTDoubletDZ< T1, T2 >

Definition at line 27 of file HLTDoubletDZ.h.

Member Typedef Documentation

◆ T1Collection

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

Definition at line 28 of file HLTDoubletDZ.h.

◆ T1Ref

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

Definition at line 29 of file HLTDoubletDZ.h.

◆ T2Collection

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

Definition at line 30 of file HLTDoubletDZ.h.

◆ T2Ref

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

Definition at line 31 of file HLTDoubletDZ.h.

Constructor & Destructor Documentation

◆ HLTDoubletDZ() [1/6]

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

Definition at line 34 of file HLTDoubletDZ.cc.

35  : HLTFilter(iConfig),
36  originTag1_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag1")),
37  originTag2_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag2")),
38  inputTag1_(iConfig.template getParameter<edm::InputTag>("inputTag1")),
39  inputTag2_(iConfig.template getParameter<edm::InputTag>("inputTag2")),
40  inputToken1_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
41  inputToken2_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
42  //electronToken_ (consumes<reco::ElectronCollection>(iConfig.template getParameter<edm::InputTag>("electronTag"))),
43  triggerType1_(iConfig.template getParameter<int>("triggerType1")),
44  triggerType2_(iConfig.template getParameter<int>("triggerType2")),
45  minDR_(iConfig.template getParameter<double>("MinDR")),
46  maxDZ_(iConfig.template getParameter<double>("MaxDZ")),
47  minPixHitsForDZ_(iConfig.template getParameter<int>("MinPixHitsForDZ")),
48  min_N_(iConfig.template getParameter<int>("MinN")),
49  checkSC_(iConfig.template getParameter<bool>("checkSC")),
50  same_(inputTag1_.encode() == inputTag2_.encode()) // same collections to be compared?
51 {}
const int triggerType1_
Definition: HLTDoubletDZ.h:55
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken1_
Definition: HLTDoubletDZ.h:52
const int triggerType2_
Definition: HLTDoubletDZ.h:56
const std::vector< edm::InputTag > originTag1_
Definition: HLTDoubletDZ.h:48
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken2_
Definition: HLTDoubletDZ.h:53
const std::vector< edm::InputTag > originTag2_
Definition: HLTDoubletDZ.h:49
std::string encode() const
Definition: InputTag.cc:159
const bool same_
Definition: HLTDoubletDZ.h:62
const edm::InputTag inputTag1_
Definition: HLTDoubletDZ.h:50
const edm::InputTag inputTag2_
Definition: HLTDoubletDZ.h:51
const int min_N_
Definition: HLTDoubletDZ.h:60
const int minPixHitsForDZ_
Definition: HLTDoubletDZ.h:59
const double maxDZ_
Definition: HLTDoubletDZ.h:58
const double minDR_
Definition: HLTDoubletDZ.h:57
HLTFilter(const edm::ParameterSet &config)
Definition: HLTFilter.cc:20
const bool checkSC_
Definition: HLTDoubletDZ.h:61

◆ ~HLTDoubletDZ()

template<typename T1 , typename T2 >
HLTDoubletDZ< T1, T2 >::~HLTDoubletDZ ( )
override

Definition at line 153 of file HLTDoubletDZ.cc.

153 {}

◆ HLTDoubletDZ() [2/6]

Definition at line 54 of file HLTDoubletDZ.cc.

55  : HLTFilter(iConfig),
56  originTag1_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag1")),
57  originTag2_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag2")),
58  inputTag1_(iConfig.template getParameter<edm::InputTag>("inputTag1")),
59  inputTag2_(iConfig.template getParameter<edm::InputTag>("inputTag2")),
60  inputToken1_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
61  inputToken2_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
62  electronToken_(consumes<reco::ElectronCollection>(iConfig.template getParameter<edm::InputTag>("electronTag"))),
63  triggerType1_(iConfig.template getParameter<int>("triggerType1")),
64  triggerType2_(iConfig.template getParameter<int>("triggerType2")),
65  minDR_(iConfig.template getParameter<double>("MinDR")),
66  maxDZ_(iConfig.template getParameter<double>("MaxDZ")),
67  minPixHitsForDZ_(iConfig.template getParameter<int>("MinPixHitsForDZ")),
68  min_N_(iConfig.template getParameter<int>("MinN")),
69  checkSC_(iConfig.template getParameter<bool>("checkSC")),
70  same_(inputTag1_.encode() == inputTag2_.encode()) // same collections to be compared?
71 {}
const int triggerType1_
Definition: HLTDoubletDZ.h:55
edm::EDGetTokenT< reco::ElectronCollection > electronToken_
Definition: HLTDoubletDZ.h:54
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken1_
Definition: HLTDoubletDZ.h:52
const int triggerType2_
Definition: HLTDoubletDZ.h:56
const std::vector< edm::InputTag > originTag1_
Definition: HLTDoubletDZ.h:48
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken2_
Definition: HLTDoubletDZ.h:53
const std::vector< edm::InputTag > originTag2_
Definition: HLTDoubletDZ.h:49
std::string encode() const
Definition: InputTag.cc:159
const bool same_
Definition: HLTDoubletDZ.h:62
const edm::InputTag inputTag1_
Definition: HLTDoubletDZ.h:50
const edm::InputTag inputTag2_
Definition: HLTDoubletDZ.h:51
const int min_N_
Definition: HLTDoubletDZ.h:60
const int minPixHitsForDZ_
Definition: HLTDoubletDZ.h:59
const double maxDZ_
Definition: HLTDoubletDZ.h:58
const double minDR_
Definition: HLTDoubletDZ.h:57
HLTFilter(const edm::ParameterSet &config)
Definition: HLTFilter.cc:20
const bool checkSC_
Definition: HLTDoubletDZ.h:61

◆ HLTDoubletDZ() [3/6]

Definition at line 74 of file HLTDoubletDZ.cc.

75  : HLTFilter(iConfig),
76  originTag1_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag1")),
77  originTag2_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag2")),
78  inputTag1_(iConfig.template getParameter<edm::InputTag>("inputTag1")),
79  inputTag2_(iConfig.template getParameter<edm::InputTag>("inputTag2")),
80  inputToken1_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
81  inputToken2_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
82  electronToken_(consumes<reco::ElectronCollection>(iConfig.template getParameter<edm::InputTag>("electronTag"))),
83  triggerType1_(iConfig.template getParameter<int>("triggerType1")),
84  triggerType2_(iConfig.template getParameter<int>("triggerType2")),
85  minDR_(iConfig.template getParameter<double>("MinDR")),
86  maxDZ_(iConfig.template getParameter<double>("MaxDZ")),
87  minPixHitsForDZ_(iConfig.template getParameter<int>("MinPixHitsForDZ")),
88  min_N_(iConfig.template getParameter<int>("MinN")),
89  checkSC_(iConfig.template getParameter<bool>("checkSC")),
90  same_(inputTag1_.encode() == inputTag2_.encode()) // same collections to be compared?
91 {}
const int triggerType1_
Definition: HLTDoubletDZ.h:55
edm::EDGetTokenT< reco::ElectronCollection > electronToken_
Definition: HLTDoubletDZ.h:54
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken1_
Definition: HLTDoubletDZ.h:52
const int triggerType2_
Definition: HLTDoubletDZ.h:56
const std::vector< edm::InputTag > originTag1_
Definition: HLTDoubletDZ.h:48
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken2_
Definition: HLTDoubletDZ.h:53
const std::vector< edm::InputTag > originTag2_
Definition: HLTDoubletDZ.h:49
std::string encode() const
Definition: InputTag.cc:159
const bool same_
Definition: HLTDoubletDZ.h:62
const edm::InputTag inputTag1_
Definition: HLTDoubletDZ.h:50
const edm::InputTag inputTag2_
Definition: HLTDoubletDZ.h:51
const int min_N_
Definition: HLTDoubletDZ.h:60
const int minPixHitsForDZ_
Definition: HLTDoubletDZ.h:59
const double maxDZ_
Definition: HLTDoubletDZ.h:58
const double minDR_
Definition: HLTDoubletDZ.h:57
HLTFilter(const edm::ParameterSet &config)
Definition: HLTFilter.cc:20
const bool checkSC_
Definition: HLTDoubletDZ.h:61

◆ HLTDoubletDZ() [4/6]

Definition at line 94 of file HLTDoubletDZ.cc.

95  : HLTFilter(iConfig),
96  originTag1_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag1")),
97  originTag2_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag2")),
98  inputTag1_(iConfig.template getParameter<edm::InputTag>("inputTag1")),
99  inputTag2_(iConfig.template getParameter<edm::InputTag>("inputTag2")),
100  inputToken1_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
101  inputToken2_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
102  electronToken_(consumes<reco::ElectronCollection>(iConfig.template getParameter<edm::InputTag>("electronTag"))),
103  triggerType1_(iConfig.template getParameter<int>("triggerType1")),
104  triggerType2_(iConfig.template getParameter<int>("triggerType2")),
105  minDR_(iConfig.template getParameter<double>("MinDR")),
106  maxDZ_(iConfig.template getParameter<double>("MaxDZ")),
107  minPixHitsForDZ_(iConfig.template getParameter<int>("MinPixHitsForDZ")),
108  min_N_(iConfig.template getParameter<int>("MinN")),
109  checkSC_(iConfig.template getParameter<bool>("checkSC")),
110  same_(inputTag1_.encode() == inputTag2_.encode()) // same collections to be compared?
111 {}
const int triggerType1_
Definition: HLTDoubletDZ.h:55
edm::EDGetTokenT< reco::ElectronCollection > electronToken_
Definition: HLTDoubletDZ.h:54
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken1_
Definition: HLTDoubletDZ.h:52
const int triggerType2_
Definition: HLTDoubletDZ.h:56
const std::vector< edm::InputTag > originTag1_
Definition: HLTDoubletDZ.h:48
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken2_
Definition: HLTDoubletDZ.h:53
const std::vector< edm::InputTag > originTag2_
Definition: HLTDoubletDZ.h:49
std::string encode() const
Definition: InputTag.cc:159
const bool same_
Definition: HLTDoubletDZ.h:62
const edm::InputTag inputTag1_
Definition: HLTDoubletDZ.h:50
const edm::InputTag inputTag2_
Definition: HLTDoubletDZ.h:51
const int min_N_
Definition: HLTDoubletDZ.h:60
const int minPixHitsForDZ_
Definition: HLTDoubletDZ.h:59
const double maxDZ_
Definition: HLTDoubletDZ.h:58
const double minDR_
Definition: HLTDoubletDZ.h:57
HLTFilter(const edm::ParameterSet &config)
Definition: HLTFilter.cc:20
const bool checkSC_
Definition: HLTDoubletDZ.h:61

◆ HLTDoubletDZ() [5/6]

Definition at line 114 of file HLTDoubletDZ.cc.

115  : HLTFilter(iConfig),
116  originTag1_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag1")),
117  originTag2_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag2")),
118  inputTag1_(iConfig.template getParameter<edm::InputTag>("inputTag1")),
119  inputTag2_(iConfig.template getParameter<edm::InputTag>("inputTag2")),
120  inputToken1_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
121  inputToken2_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
122  //electronToken_ (consumes<reco::ElectronCollection>(iConfig.template getParameter<edm::InputTag>("electronTag"))),
123  triggerType1_(iConfig.template getParameter<int>("triggerType1")),
124  triggerType2_(iConfig.template getParameter<int>("triggerType2")),
125  minDR_(iConfig.template getParameter<double>("MinDR")),
126  maxDZ_(iConfig.template getParameter<double>("MaxDZ")),
127  minPixHitsForDZ_(iConfig.template getParameter<int>("MinPixHitsForDZ")),
128  min_N_(iConfig.template getParameter<int>("MinN")),
129  checkSC_(iConfig.template getParameter<bool>("checkSC")),
130  same_(inputTag1_.encode() == inputTag2_.encode()) // same collections to be compared?
131 {}
const int triggerType1_
Definition: HLTDoubletDZ.h:55
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken1_
Definition: HLTDoubletDZ.h:52
const int triggerType2_
Definition: HLTDoubletDZ.h:56
const std::vector< edm::InputTag > originTag1_
Definition: HLTDoubletDZ.h:48
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken2_
Definition: HLTDoubletDZ.h:53
const std::vector< edm::InputTag > originTag2_
Definition: HLTDoubletDZ.h:49
std::string encode() const
Definition: InputTag.cc:159
const bool same_
Definition: HLTDoubletDZ.h:62
const edm::InputTag inputTag1_
Definition: HLTDoubletDZ.h:50
const edm::InputTag inputTag2_
Definition: HLTDoubletDZ.h:51
const int min_N_
Definition: HLTDoubletDZ.h:60
const int minPixHitsForDZ_
Definition: HLTDoubletDZ.h:59
const double maxDZ_
Definition: HLTDoubletDZ.h:58
const double minDR_
Definition: HLTDoubletDZ.h:57
HLTFilter(const edm::ParameterSet &config)
Definition: HLTFilter.cc:20
const bool checkSC_
Definition: HLTDoubletDZ.h:61

◆ HLTDoubletDZ() [6/6]

template<>
HLTDoubletDZ< l1t::TkMuon, l1t::TkMuon >::HLTDoubletDZ ( const edm::ParameterSet iConfig)

Definition at line 134 of file HLTDoubletDZ.cc.

135  : HLTFilter(iConfig),
136  originTag1_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag1")),
137  originTag2_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag2")),
138  inputTag1_(iConfig.template getParameter<edm::InputTag>("inputTag1")),
139  inputTag2_(iConfig.template getParameter<edm::InputTag>("inputTag2")),
140  inputToken1_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
141  inputToken2_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
142  triggerType1_(iConfig.template getParameter<int>("triggerType1")),
143  triggerType2_(iConfig.template getParameter<int>("triggerType2")),
144  minDR_(iConfig.template getParameter<double>("MinDR")),
145  maxDZ_(iConfig.template getParameter<double>("MaxDZ")),
146  minPixHitsForDZ_(iConfig.template getParameter<int>("MinPixHitsForDZ")),
147  min_N_(iConfig.template getParameter<int>("MinN")),
148  checkSC_(iConfig.template getParameter<bool>("checkSC")),
149  same_(inputTag1_.encode() == inputTag2_.encode()) // same collections to be compared?
150 {}
const int triggerType1_
Definition: HLTDoubletDZ.h:55
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken1_
Definition: HLTDoubletDZ.h:52
const int triggerType2_
Definition: HLTDoubletDZ.h:56
const std::vector< edm::InputTag > originTag1_
Definition: HLTDoubletDZ.h:48
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken2_
Definition: HLTDoubletDZ.h:53
const std::vector< edm::InputTag > originTag2_
Definition: HLTDoubletDZ.h:49
std::string encode() const
Definition: InputTag.cc:159
const bool same_
Definition: HLTDoubletDZ.h:62
const edm::InputTag inputTag1_
Definition: HLTDoubletDZ.h:50
const edm::InputTag inputTag2_
Definition: HLTDoubletDZ.h:51
const int min_N_
Definition: HLTDoubletDZ.h:60
const int minPixHitsForDZ_
Definition: HLTDoubletDZ.h:59
const double maxDZ_
Definition: HLTDoubletDZ.h:58
const double minDR_
Definition: HLTDoubletDZ.h:57
HLTFilter(const edm::ParameterSet &config)
Definition: HLTFilter.cc:20
const bool checkSC_
Definition: HLTDoubletDZ.h:61

Member Function Documentation

◆ computeDZ() [1/7]

template<typename T1 , typename T2 >
bool HLTDoubletDZ< T1, T2 >::computeDZ ( edm::Event iEvent,
T1Ref c1,
T2Ref c2 
) const

Definition at line 319 of file HLTDoubletDZ.cc.

References funct::abs(), reco::deltaR(), diffTwoXMLs::r1, diffTwoXMLs::r2, and reco::Candidate::vz().

319  {
320  const reco::Candidate& candidate1(*r1);
321  const reco::Candidate& candidate2(*r2);
322  if (reco::deltaR(candidate1, candidate2) < minDR_)
323  return false;
324  if (std::abs(candidate1.vz() - candidate2.vz()) > maxDZ_)
325  return false;
326 
327  return true;
328 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const double maxDZ_
Definition: HLTDoubletDZ.h:58
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
const double minDR_
Definition: HLTDoubletDZ.h:57

◆ computeDZ() [2/7]

template<>
bool HLTDoubletDZ< reco::RecoEcalCandidate, reco::RecoChargedCandidate >::computeDZ ( edm::Event iEvent,
T1Ref r1,
T2Ref r2 
) const

Definition at line 331 of file HLTDoubletDZ.cc.

References funct::abs(), reco::deltaR(), StorageManager_cfg::e1, iEvent, edm::HandleBase::isValid(), diffTwoXMLs::r1, diffTwoXMLs::r2, reco::RecoChargedCandidate::track(), and reco::LeafCandidate::vz().

333  {
335  iEvent.getByToken(electronToken_, electronHandle_);
336  if (!electronHandle_.isValid())
337  edm::LogError("HLTDoubletDZ") << "HLTDoubletDZ: Electron Handle not valid.";
338 
339  if (reco::deltaR(*r1, *r2) < minDR_)
340  return false;
342  for (auto const& eleIt : *electronHandle_) {
343  if (eleIt.superCluster() == r1->superCluster())
344  e1 = eleIt;
345  }
346 
347  const reco::RecoChargedCandidate& candidate2(*r2);
348  bool skipDZ = false;
349  if (minPixHitsForDZ_ > 0 && (e1.gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
350  candidate2.track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
351  skipDZ = true;
352  if (!skipDZ && std::abs(e1.vz() - candidate2.vz()) > maxDZ_)
353  return false;
354 
355  return true;
356 }
edm::EDGetTokenT< reco::ElectronCollection > electronToken_
Definition: HLTDoubletDZ.h:54
int iEvent
Definition: GenABIO.cc:224
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const int minPixHitsForDZ_
Definition: HLTDoubletDZ.h:59
const double maxDZ_
Definition: HLTDoubletDZ.h:58
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
const double minDR_
Definition: HLTDoubletDZ.h:57
bool isValid() const
Definition: HandleBase.h:70

◆ computeDZ() [3/7]

template<>
bool HLTDoubletDZ< reco::RecoChargedCandidate, reco::RecoEcalCandidate >::computeDZ ( edm::Event iEvent,
T1Ref r1,
T2Ref r2 
) const

Definition at line 359 of file HLTDoubletDZ.cc.

References funct::abs(), reco::deltaR(), reco::Electron::gsfTrack(), iEvent, edm::HandleBase::isValid(), diffTwoXMLs::r1, diffTwoXMLs::r2, reco::RecoChargedCandidate::track(), and reco::LeafCandidate::vz().

361  {
363  iEvent.getByToken(electronToken_, electronHandle_);
364  if (!electronHandle_.isValid())
365  edm::LogError("HLTDoubletDZ") << "HLTDoubletDZ: Electron Handle not valid.";
366 
367  if (reco::deltaR(*r1, *r2) < minDR_)
368  return false;
369  reco::Electron e2;
370  for (auto const& eleIt : *electronHandle_) {
371  if (eleIt.superCluster() == r2->superCluster())
372  e2 = eleIt;
373  }
374 
375  const reco::RecoChargedCandidate& candidate1(*r1);
376  bool skipDZ = false;
377  if (minPixHitsForDZ_ > 0 && (candidate1.track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
378  e2.gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
379  skipDZ = true;
380  if (!skipDZ && std::abs(e2.vz() - candidate1.vz()) > maxDZ_)
381  return false;
382 
383  return true;
384 }
edm::EDGetTokenT< reco::ElectronCollection > electronToken_
Definition: HLTDoubletDZ.h:54
double vz() const override
z coordinate of vertex position
int iEvent
Definition: GenABIO.cc:224
reco::GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const int minPixHitsForDZ_
Definition: HLTDoubletDZ.h:59
const double maxDZ_
Definition: HLTDoubletDZ.h:58
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
const double minDR_
Definition: HLTDoubletDZ.h:57
bool isValid() const
Definition: HandleBase.h:70

◆ computeDZ() [4/7]

template<>
bool HLTDoubletDZ< reco::RecoEcalCandidate, reco::RecoEcalCandidate >::computeDZ ( edm::Event iEvent,
T1Ref r1,
T2Ref r2 
) const

Definition at line 387 of file HLTDoubletDZ.cc.

References funct::abs(), reco::deltaR(), StorageManager_cfg::e1, reco::Electron::gsfTrack(), iEvent, edm::HandleBase::isValid(), diffTwoXMLs::r1, diffTwoXMLs::r2, and reco::LeafCandidate::vz().

389  {
391  iEvent.getByToken(electronToken_, electronHandle_);
392  if (!electronHandle_.isValid())
393  edm::LogError("HLTDoubletDZ") << "HLTDoubletDZ: Electron Handle not valid.";
394 
395  if (reco::deltaR(*r1, *r2) < minDR_)
396  return false;
397  reco::Electron e1, e2;
398  for (auto const& eleIt : *electronHandle_) {
399  if (eleIt.superCluster() == r2->superCluster())
400  e2 = eleIt;
401  if (eleIt.superCluster() == r1->superCluster())
402  e1 = eleIt;
403  }
404 
405  bool skipDZ = false;
406  if (minPixHitsForDZ_ > 0 && (e1.gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
407  e2.gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
408  skipDZ = true;
409  if (!skipDZ && std::abs(e2.vz() - e1.vz()) > maxDZ_)
410  return false;
411 
412  return true;
413 }
edm::EDGetTokenT< reco::ElectronCollection > electronToken_
Definition: HLTDoubletDZ.h:54
double vz() const override
z coordinate of vertex position
int iEvent
Definition: GenABIO.cc:224
reco::GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const int minPixHitsForDZ_
Definition: HLTDoubletDZ.h:59
const double maxDZ_
Definition: HLTDoubletDZ.h:58
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
const double minDR_
Definition: HLTDoubletDZ.h:57
bool isValid() const
Definition: HandleBase.h:70

◆ computeDZ() [5/7]

template<>
bool HLTDoubletDZ< reco::RecoChargedCandidate, reco::RecoChargedCandidate >::computeDZ ( edm::Event iEvent,
T1Ref r1,
T2Ref r2 
) const

Definition at line 416 of file HLTDoubletDZ.cc.

References funct::abs(), reco::deltaR(), diffTwoXMLs::r1, diffTwoXMLs::r2, reco::RecoChargedCandidate::track(), and reco::LeafCandidate::vz().

418  {
419  const reco::RecoChargedCandidate& candidate1(*r1);
420  const reco::RecoChargedCandidate& candidate2(*r2);
421  if (reco::deltaR(candidate1, candidate2) < minDR_)
422  return false;
423  bool skipDZ = false;
424  if (minPixHitsForDZ_ > 0 && (candidate1.track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
425  candidate2.track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
426  skipDZ = true;
427  if (!skipDZ && std::abs(candidate1.vz() - candidate2.vz()) > maxDZ_)
428  return false;
429 
430  return true;
431 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const int minPixHitsForDZ_
Definition: HLTDoubletDZ.h:59
const double maxDZ_
Definition: HLTDoubletDZ.h:58
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
const double minDR_
Definition: HLTDoubletDZ.h:57

◆ computeDZ() [6/7]

template<>
bool HLTDoubletDZ< l1t::TkMuon, l1t::TkMuon >::computeDZ ( edm::Event iEvent,
l1t::TkMuonRef r1,
l1t::TkMuonRef r2 
) const

Definition at line 434 of file HLTDoubletDZ.cc.

References funct::abs(), reco::deltaR(), diffTwoXMLs::r1, diffTwoXMLs::r2, and l1t::TkMuon::trkzVtx().

436  {
437  const l1t::TkMuon& candidate1(*r1);
438  const l1t::TkMuon& candidate2(*r2);
439  if (reco::deltaR(candidate1, candidate2) < minDR_)
440  return false;
441 
442  // We don't care about minPixHitsForDZ_ with the L1TkMuons,
443  // especially because the pixel does not participate in the L1T
444  if (std::abs(candidate1.trkzVtx() - candidate2.trkzVtx()) > maxDZ_)
445  return false;
446 
447  return true;
448 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const double maxDZ_
Definition: HLTDoubletDZ.h:58
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
const double minDR_
Definition: HLTDoubletDZ.h:57

◆ computeDZ() [7/7]

template<>
bool HLTDoubletDZ< l1t::HPSPFTau, l1t::HPSPFTau >::computeDZ ( edm::Event iEvent,
l1t::HPSPFTauRef r1,
l1t::HPSPFTauRef r2 
) const

Definition at line 451 of file HLTDoubletDZ.cc.

References funct::abs(), reco::deltaR(), l1t::HPSPFTau::leadChargedPFCand(), diffTwoXMLs::r1, and diffTwoXMLs::r2.

453  {
454  const l1t::HPSPFTau& candidate1(*r1);
455  const l1t::HPSPFTau& candidate2(*r2);
456  if (reco::deltaR(candidate1, candidate2) < minDR_)
457  return false;
458 
459  // We don't care about minPixHitsForDZ_ with the L1HPSPFTaus,
460  // especially because the pixel does not participate in the L1T
461  if (std::abs(candidate1.leadChargedPFCand()->pfTrack()->vertex().z() -
462  candidate2.leadChargedPFCand()->pfTrack()->vertex().z()) > maxDZ_)
463  return false;
464 
465  return true;
466 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const double maxDZ_
Definition: HLTDoubletDZ.h:58
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
const double minDR_
Definition: HLTDoubletDZ.h:57

◆ fillDescriptions() [1/5]

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

Definition at line 156 of file HLTDoubletDZ.cc.

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

156  {
159  std::vector<edm::InputTag> originTag1(1, edm::InputTag("hltOriginal1"));
160  std::vector<edm::InputTag> originTag2(1, edm::InputTag("hltOriginal2"));
161  desc.add<std::vector<edm::InputTag>>("originTag1", originTag1);
162  desc.add<std::vector<edm::InputTag>>("originTag2", originTag2);
163  desc.add<edm::InputTag>("inputTag1", edm::InputTag("hltFiltered1"));
164  desc.add<edm::InputTag>("inputTag2", edm::InputTag("hltFiltered2"));
165  desc.add<int>("triggerType1", 0);
166  desc.add<int>("triggerType2", 0);
167  desc.add<double>("MinDR", -1.0);
168  desc.add<double>("MaxDZ", 0.2);
169  desc.add<int>("MinPixHitsForDZ", 0);
170  desc.add<bool>("checkSC", false);
171  desc.add<int>("MinN", 1);
173 }
std::string defaultModuleLabel()
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
Definition: HLTFilter.cc:25
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ fillDescriptions() [2/5]

template<>
void HLTDoubletDZ< reco::RecoEcalCandidate, reco::RecoEcalCandidate >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)

Definition at line 176 of file HLTDoubletDZ.cc.

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

177  {
180  std::vector<edm::InputTag> originTag1(1, edm::InputTag("hltOriginal1"));
181  std::vector<edm::InputTag> originTag2(1, edm::InputTag("hltOriginal2"));
182  desc.add<std::vector<edm::InputTag>>("originTag1", originTag1);
183  desc.add<std::vector<edm::InputTag>>("originTag2", originTag2);
184  desc.add<edm::InputTag>("inputTag1", edm::InputTag("hltFiltered1"));
185  desc.add<edm::InputTag>("inputTag2", edm::InputTag("hltFiltered2"));
186  desc.add<edm::InputTag>("electronTag", edm::InputTag("electronTag"));
187  desc.add<int>("triggerType1", 0);
188  desc.add<int>("triggerType2", 0);
189  desc.add<double>("MinDR", -1.0);
190  desc.add<double>("MaxDZ", 0.2);
191  desc.add<int>("MinPixHitsForDZ", 0);
192  desc.add<bool>("checkSC", false);
193  desc.add<int>("MinN", 1);
195 }
std::string defaultModuleLabel()
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
Definition: HLTFilter.cc:25
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ fillDescriptions() [3/5]

template<>
void HLTDoubletDZ< reco::RecoChargedCandidate, reco::RecoEcalCandidate >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)

Definition at line 198 of file HLTDoubletDZ.cc.

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

199  {
202  std::vector<edm::InputTag> originTag1(1, edm::InputTag("hltOriginal1"));
203  std::vector<edm::InputTag> originTag2(1, edm::InputTag("hltOriginal2"));
204  desc.add<std::vector<edm::InputTag>>("originTag1", originTag1);
205  desc.add<std::vector<edm::InputTag>>("originTag2", originTag2);
206  desc.add<edm::InputTag>("inputTag1", edm::InputTag("hltFiltered1"));
207  desc.add<edm::InputTag>("inputTag2", edm::InputTag("hltFiltered2"));
208  desc.add<edm::InputTag>("electronTag", edm::InputTag("electronTag"));
209  desc.add<int>("triggerType1", 0);
210  desc.add<int>("triggerType2", 0);
211  desc.add<double>("MinDR", -1.0);
212  desc.add<double>("MaxDZ", 0.2);
213  desc.add<int>("MinPixHitsForDZ", 0);
214  desc.add<bool>("checkSC", false);
215  desc.add<int>("MinN", 1);
217 }
std::string defaultModuleLabel()
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
Definition: HLTFilter.cc:25
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ fillDescriptions() [4/5]

template<>
void HLTDoubletDZ< reco::RecoEcalCandidate, reco::RecoChargedCandidate >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)

Definition at line 220 of file HLTDoubletDZ.cc.

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

221  {
224  std::vector<edm::InputTag> originTag1(1, edm::InputTag("hltOriginal1"));
225  std::vector<edm::InputTag> originTag2(1, edm::InputTag("hltOriginal2"));
226  desc.add<std::vector<edm::InputTag>>("originTag1", originTag1);
227  desc.add<std::vector<edm::InputTag>>("originTag2", originTag2);
228  desc.add<edm::InputTag>("inputTag1", edm::InputTag("hltFiltered1"));
229  desc.add<edm::InputTag>("inputTag2", edm::InputTag("hltFiltered2"));
230  desc.add<edm::InputTag>("electronTag", edm::InputTag("electronTag"));
231  desc.add<int>("triggerType1", 0);
232  desc.add<int>("triggerType2", 0);
233  desc.add<double>("MinDR", -1.0);
234  desc.add<double>("MaxDZ", 0.2);
235  desc.add<int>("MinPixHitsForDZ", 0);
236  desc.add<bool>("checkSC", false);
237  desc.add<int>("MinN", 1);
239 }
std::string defaultModuleLabel()
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
Definition: HLTFilter.cc:25
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ fillDescriptions() [5/5]

template<>
void HLTDoubletDZ< reco::RecoChargedCandidate, reco::RecoChargedCandidate >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)

Definition at line 242 of file HLTDoubletDZ.cc.

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

243  {
246  std::vector<edm::InputTag> originTag1(1, edm::InputTag("hltOriginal1"));
247  std::vector<edm::InputTag> originTag2(1, edm::InputTag("hltOriginal2"));
248  desc.add<std::vector<edm::InputTag>>("originTag1", originTag1);
249  desc.add<std::vector<edm::InputTag>>("originTag2", originTag2);
250  desc.add<edm::InputTag>("inputTag1", edm::InputTag("hltFiltered1"));
251  desc.add<edm::InputTag>("inputTag2", edm::InputTag("hltFiltered2"));
252  desc.add<int>("triggerType1", 0);
253  desc.add<int>("triggerType2", 0);
254  desc.add<double>("MinDR", -1.0);
255  desc.add<double>("MaxDZ", 0.2);
256  desc.add<int>("MinPixHitsForDZ", 0);
257  desc.add<bool>("checkSC", false);
258  desc.add<int>("MinN", 1);
260 }
std::string defaultModuleLabel()
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
Definition: HLTFilter.cc:25
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ getCollections()

template<typename T1 , typename T2 >
bool HLTDoubletDZ< T1, T2 >::getCollections ( edm::Event iEvent,
std::vector< T1Ref > &  coll1,
std::vector< T2Ref > &  coll2,
trigger::TriggerFilterObjectWithRefs filterproduct 
) const

Definition at line 265 of file HLTDoubletDZ.cc.

References trigger::TriggerFilterObjectWithRefs::addCollectionTag(), edm::InputTag::encode(), trigger::TriggerRefsCollections::getObjects(), mps_fire::i, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, iEvent, HLT_2022v12_cff::InputTag, instance, label, LaserDQM_cfg::process, BeamBkgSkim_cff::saveTags, and AlCaHLTBitMon_QueryRunRegistry::string.

268  {
270  if (iEvent.getByToken(inputToken1_, handle1) and iEvent.getByToken(inputToken2_, handle2)) {
271  // get hold of pre-filtered object collections
272  handle1->getObjects(triggerType1_, coll1);
273  handle2->getObjects(triggerType2_, coll2);
274  const trigger::size_type n1(coll1.size());
275  const trigger::size_type n2(coll2.size());
276 
277  if (saveTags()) {
278  edm::InputTag tagOld;
279  for (unsigned int i = 0; i < originTag1_.size(); ++i) {
280  filterproduct.addCollectionTag(originTag1_[i]);
281  }
282  tagOld = edm::InputTag();
283  for (trigger::size_type i1 = 0; i1 != n1; ++i1) {
284  const edm::ProductID pid(coll1[i1].id());
285  const auto& prov = iEvent.getStableProvenance(pid);
286  const std::string& label(prov.moduleLabel());
287  const std::string& instance(prov.productInstanceName());
288  const std::string& process(prov.processName());
290  if (tagOld.encode() != tagNew.encode()) {
291  filterproduct.addCollectionTag(tagNew);
292  tagOld = tagNew;
293  }
294  }
295  for (unsigned int i = 0; i < originTag2_.size(); ++i) {
296  filterproduct.addCollectionTag(originTag2_[i]);
297  }
298  tagOld = edm::InputTag();
299  for (trigger::size_type i2 = 0; i2 != n2; ++i2) {
300  const edm::ProductID pid(coll2[i2].id());
301  const auto& prov = iEvent.getStableProvenance(pid);
302  const std::string& label(prov.moduleLabel());
303  const std::string& instance(prov.productInstanceName());
304  const std::string& process(prov.processName());
306  if (tagOld.encode() != tagNew.encode()) {
307  filterproduct.addCollectionTag(tagNew);
308  tagOld = tagNew;
309  }
310  }
311  }
312 
313  return true;
314  } else
315  return false;
316 }
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
const int triggerType1_
Definition: HLTDoubletDZ.h:55
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken1_
Definition: HLTDoubletDZ.h:52
const int triggerType2_
Definition: HLTDoubletDZ.h:56
const std::vector< edm::InputTag > originTag1_
Definition: HLTDoubletDZ.h:48
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > inputToken2_
Definition: HLTDoubletDZ.h:53
const std::vector< edm::InputTag > originTag2_
Definition: HLTDoubletDZ.h:49
static PFTauRenderPlugin instance
std::string encode() const
Definition: InputTag.cc:159
uint16_t size_type
char const * label
int iEvent
Definition: GenABIO.cc:224
bool saveTags() const
Definition: HLTFilter.h:46
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags

◆ hltFilter() [1/4]

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

Implements HLTFilter.

Definition at line 470 of file HLTDoubletDZ.cc.

References accept(), trigger::TriggerRefsCollections::addObject(), Exhume::I, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, iEvent, dqmiodumpmetadata::n, diffTwoXMLs::r1, and diffTwoXMLs::r2.

472  {
473  // All HLT filters must create and fill an HLT filter object,
474  // recording any reconstructed physics objects satisfying (or not)
475  // this HLT filter, and place it in the Event.
476  bool accept(false);
477 
478  std::vector<T1Ref> coll1;
479  std::vector<T2Ref> coll2;
480 
481  if (getCollections(iEvent, coll1, coll2, filterproduct)) {
482  int n(0);
483  T1Ref r1;
484  T2Ref r2;
485 
486  for (unsigned int i1 = 0; i1 != coll1.size(); i1++) {
487  r1 = coll1[i1];
488  //const reco::Candidate& candidate1(*r1);
489  unsigned int I(0);
490  if (same_) {
491  I = i1 + 1;
492  }
493  for (unsigned int i2 = I; i2 != coll2.size(); i2++) {
494  r2 = coll2[i2];
495  if (checkSC_) {
496  if (r1->superCluster().isNonnull() && r2->superCluster().isNonnull()) {
497  if (r1->superCluster() == r2->superCluster())
498  continue;
499  }
500  }
501 
502  if (!computeDZ(iEvent, r1, r2))
503  continue;
504 
505  n++;
506  filterproduct.addObject(triggerType1_, r1);
507  filterproduct.addObject(triggerType2_, r2);
508  }
509  }
510 
511  accept = accept || (n >= min_N_);
512  }
513 
514  return accept;
515 }
const int triggerType1_
Definition: HLTDoubletDZ.h:55
const int triggerType2_
Definition: HLTDoubletDZ.h:56
bool computeDZ(edm::Event &iEvent, T1Ref &c1, T2Ref &c2) const
const bool same_
Definition: HLTDoubletDZ.h:62
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
bool getCollections(edm::Event &iEvent, std::vector< T1Ref > &coll1, std::vector< T2Ref > &coll2, trigger::TriggerFilterObjectWithRefs &filterproduct) const
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref<C>)
int iEvent
Definition: GenABIO.cc:224
const std::complex< double > I
Definition: I.h:8
const int min_N_
Definition: HLTDoubletDZ.h:60
edm::Ref< T2Collection > T2Ref
Definition: HLTDoubletDZ.h:31
edm::Ref< T1Collection > T1Ref
Definition: HLTDoubletDZ.h:29
const bool checkSC_
Definition: HLTDoubletDZ.h:61

◆ hltFilter() [2/4]

template<>
bool HLTDoubletDZ< l1t::TkMuon, l1t::TkMuon >::hltFilter ( edm::Event iEvent,
const edm::EventSetup iSetup,
trigger::TriggerFilterObjectWithRefs filterproduct 
) const
virtual

Special instantiation for L1TkMuon L1TkMuon are not RecoCandidates, therefore they don't implement superCluster() They are LeafCandidates instead

Implements HLTFilter.

Definition at line 521 of file HLTDoubletDZ.cc.

References accept(), trigger::TriggerRefsCollections::addObject(), Exhume::I, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, iEvent, dqmiodumpmetadata::n, diffTwoXMLs::r1, and diffTwoXMLs::r2.

523  {
524  // All HLT filters must create and fill an HLT filter object,
525  // recording any reconstructed physics objects satisfying (or not)
526  // this HLT filter, and place it in the Event.
527  bool accept(false);
528 
529  std::vector<l1t::TkMuonRef> coll1;
530  std::vector<l1t::TkMuonRef> coll2;
531 
532  if (getCollections(iEvent, coll1, coll2, filterproduct)) {
533  int n(0);
536 
537  for (unsigned int i1 = 0; i1 != coll1.size(); i1++) {
538  r1 = coll1[i1];
539  unsigned int I(0);
540  if (same_) {
541  I = i1 + 1;
542  }
543  for (unsigned int i2 = I; i2 != coll2.size(); i2++) {
544  r2 = coll2[i2];
545 
546  if (!computeDZ(iEvent, r1, r2))
547  continue;
548 
549  n++;
550  filterproduct.addObject(triggerType1_, r1);
551  filterproduct.addObject(triggerType2_, r2);
552  }
553  }
554 
555  accept = accept || (n >= min_N_);
556  }
557 
558  return accept;
559 }
const int triggerType1_
Definition: HLTDoubletDZ.h:55
const int triggerType2_
Definition: HLTDoubletDZ.h:56
bool computeDZ(edm::Event &iEvent, T1Ref &c1, T2Ref &c2) const
const bool same_
Definition: HLTDoubletDZ.h:62
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
bool getCollections(edm::Event &iEvent, std::vector< T1Ref > &coll1, std::vector< T2Ref > &coll2, trigger::TriggerFilterObjectWithRefs &filterproduct) const
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref<C>)
int iEvent
Definition: GenABIO.cc:224
const std::complex< double > I
Definition: I.h:8
const int min_N_
Definition: HLTDoubletDZ.h:60

◆ hltFilter() [3/4]

template<>
bool HLTDoubletDZ< l1t::PFTau, l1t::PFTau >::hltFilter ( edm::Event iEvent,
const edm::EventSetup iSetup,
trigger::TriggerFilterObjectWithRefs filterproduct 
) const
virtual

Special instantiation for L1PFTau L1PFTau are not RecoCandidates, therefore they don't implement superCluster() They are LeafCandidates instead

Implements HLTFilter.

Definition at line 565 of file HLTDoubletDZ.cc.

References accept(), trigger::TriggerRefsCollections::addObject(), Exhume::I, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, iEvent, dqmiodumpmetadata::n, diffTwoXMLs::r1, and diffTwoXMLs::r2.

567  {
568  // All HLT filters must create and fill an HLT filter object,
569  // recording any reconstructed physics objects satisfying (or not)
570  // this HLT filter, and place it in the Event.
571  bool accept(false);
572 
573  std::vector<l1t::PFTauRef> coll1;
574  std::vector<l1t::PFTauRef> coll2;
575 
576  if (getCollections(iEvent, coll1, coll2, filterproduct)) {
577  int n(0);
580 
581  for (unsigned int i1 = 0; i1 != coll1.size(); i1++) {
582  r1 = coll1[i1];
583  unsigned int I(0);
584  if (same_) {
585  I = i1 + 1;
586  }
587  for (unsigned int i2 = I; i2 != coll2.size(); i2++) {
588  r2 = coll2[i2];
589 
590  if (!computeDZ(iEvent, r1, r2))
591  continue;
592 
593  n++;
594  filterproduct.addObject(triggerType1_, r1);
595  filterproduct.addObject(triggerType2_, r2);
596  }
597  }
598 
599  accept = accept || (n >= min_N_);
600  }
601 
602  return accept;
603 }
const int triggerType1_
Definition: HLTDoubletDZ.h:55
const int triggerType2_
Definition: HLTDoubletDZ.h:56
bool computeDZ(edm::Event &iEvent, T1Ref &c1, T2Ref &c2) const
const bool same_
Definition: HLTDoubletDZ.h:62
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
bool getCollections(edm::Event &iEvent, std::vector< T1Ref > &coll1, std::vector< T2Ref > &coll2, trigger::TriggerFilterObjectWithRefs &filterproduct) const
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref<C>)
int iEvent
Definition: GenABIO.cc:224
const std::complex< double > I
Definition: I.h:8
const int min_N_
Definition: HLTDoubletDZ.h:60

◆ hltFilter() [4/4]

template<>
bool HLTDoubletDZ< l1t::HPSPFTau, l1t::HPSPFTau >::hltFilter ( edm::Event iEvent,
const edm::EventSetup iSetup,
trigger::TriggerFilterObjectWithRefs filterproduct 
) const
virtual

Special instantiation for L1HPSPFTau L1HPSPFTau are not RecoCandidates, therefore they don't implement superCluster() They are LeafCandidates instead

Implements HLTFilter.

Definition at line 609 of file HLTDoubletDZ.cc.

References accept(), trigger::TriggerRefsCollections::addObject(), Exhume::I, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, iEvent, dqmiodumpmetadata::n, diffTwoXMLs::r1, and diffTwoXMLs::r2.

611  {
612  // All HLT filters must create and fill an HLT filter object,
613  // recording any reconstructed physics objects satisfying (or not)
614  // this HLT filter, and place it in the Event.
615  bool accept(false);
616 
617  std::vector<l1t::HPSPFTauRef> coll1;
618  std::vector<l1t::HPSPFTauRef> coll2;
619 
620  if (getCollections(iEvent, coll1, coll2, filterproduct)) {
621  int n(0);
624 
625  for (unsigned int i1 = 0; i1 != coll1.size(); i1++) {
626  r1 = coll1[i1];
627  unsigned int I(0);
628  if (same_) {
629  I = i1 + 1;
630  }
631  for (unsigned int i2 = I; i2 != coll2.size(); i2++) {
632  r2 = coll2[i2];
633 
634  if (!computeDZ(iEvent, r1, r2))
635  continue;
636 
637  n++;
638  filterproduct.addObject(triggerType1_, r1);
639  filterproduct.addObject(triggerType2_, r2);
640  }
641  }
642 
643  accept = accept || (n >= min_N_);
644  }
645 
646  return accept;
647 }
const int triggerType1_
Definition: HLTDoubletDZ.h:55
const int triggerType2_
Definition: HLTDoubletDZ.h:56
bool computeDZ(edm::Event &iEvent, T1Ref &c1, T2Ref &c2) const
const bool same_
Definition: HLTDoubletDZ.h:62
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
bool getCollections(edm::Event &iEvent, std::vector< T1Ref > &coll1, std::vector< T2Ref > &coll2, trigger::TriggerFilterObjectWithRefs &filterproduct) const
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref<C>)
int iEvent
Definition: GenABIO.cc:224
const std::complex< double > I
Definition: I.h:8
const int min_N_
Definition: HLTDoubletDZ.h:60

Member Data Documentation

◆ checkSC_

template<typename T1 , typename T2 >
const bool HLTDoubletDZ< T1, T2 >::checkSC_
private

Definition at line 61 of file HLTDoubletDZ.h.

◆ electronToken_

template<typename T1 , typename T2 >
edm::EDGetTokenT<reco::ElectronCollection> HLTDoubletDZ< T1, T2 >::electronToken_
private

Definition at line 54 of file HLTDoubletDZ.h.

◆ inputTag1_

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

Definition at line 50 of file HLTDoubletDZ.h.

◆ inputTag2_

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

Definition at line 51 of file HLTDoubletDZ.h.

◆ inputToken1_

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

Definition at line 52 of file HLTDoubletDZ.h.

◆ inputToken2_

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

Definition at line 53 of file HLTDoubletDZ.h.

◆ maxDZ_

template<typename T1 , typename T2 >
const double HLTDoubletDZ< T1, T2 >::maxDZ_
private

Definition at line 58 of file HLTDoubletDZ.h.

◆ min_N_

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

Definition at line 60 of file HLTDoubletDZ.h.

◆ minDR_

template<typename T1 , typename T2 >
const double HLTDoubletDZ< T1, T2 >::minDR_
private

Definition at line 57 of file HLTDoubletDZ.h.

◆ minPixHitsForDZ_

template<typename T1 , typename T2 >
const int HLTDoubletDZ< T1, T2 >::minPixHitsForDZ_
private

Definition at line 59 of file HLTDoubletDZ.h.

◆ originTag1_

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

Definition at line 48 of file HLTDoubletDZ.h.

◆ originTag2_

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

Definition at line 49 of file HLTDoubletDZ.h.

◆ same_

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

Definition at line 62 of file HLTDoubletDZ.h.

◆ triggerType1_

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

Definition at line 55 of file HLTDoubletDZ.h.

◆ triggerType2_

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

Definition at line 56 of file HLTDoubletDZ.h.