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::TrackerMuonRef &r1, l1t::TrackerMuonRef &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 33 of file HLTDoubletDZ.cc.

34  : HLTFilter(iConfig),
35  originTag1_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag1")),
36  originTag2_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag2")),
37  inputTag1_(iConfig.template getParameter<edm::InputTag>("inputTag1")),
38  inputTag2_(iConfig.template getParameter<edm::InputTag>("inputTag2")),
39  inputToken1_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
40  inputToken2_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
41  //electronToken_ (consumes<reco::ElectronCollection>(iConfig.template getParameter<edm::InputTag>("electronTag"))),
42  triggerType1_(iConfig.template getParameter<int>("triggerType1")),
43  triggerType2_(iConfig.template getParameter<int>("triggerType2")),
44  minDR_(iConfig.template getParameter<double>("MinDR")),
45  maxDZ_(iConfig.template getParameter<double>("MaxDZ")),
46  minPixHitsForDZ_(iConfig.template getParameter<int>("MinPixHitsForDZ")),
47  min_N_(iConfig.template getParameter<int>("MinN")),
48  checkSC_(iConfig.template getParameter<bool>("checkSC")),
49  same_(inputTag1_.encode() == inputTag2_.encode()) // same collections to be compared?
50 {}
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 152 of file HLTDoubletDZ.cc.

152 {}

◆ HLTDoubletDZ() [2/6]

Definition at line 53 of file HLTDoubletDZ.cc.

54  : HLTFilter(iConfig),
55  originTag1_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag1")),
56  originTag2_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag2")),
57  inputTag1_(iConfig.template getParameter<edm::InputTag>("inputTag1")),
58  inputTag2_(iConfig.template getParameter<edm::InputTag>("inputTag2")),
59  inputToken1_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
60  inputToken2_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
61  electronToken_(consumes<reco::ElectronCollection>(iConfig.template getParameter<edm::InputTag>("electronTag"))),
62  triggerType1_(iConfig.template getParameter<int>("triggerType1")),
63  triggerType2_(iConfig.template getParameter<int>("triggerType2")),
64  minDR_(iConfig.template getParameter<double>("MinDR")),
65  maxDZ_(iConfig.template getParameter<double>("MaxDZ")),
66  minPixHitsForDZ_(iConfig.template getParameter<int>("MinPixHitsForDZ")),
67  min_N_(iConfig.template getParameter<int>("MinN")),
68  checkSC_(iConfig.template getParameter<bool>("checkSC")),
69  same_(inputTag1_.encode() == inputTag2_.encode()) // same collections to be compared?
70 {}
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 73 of file HLTDoubletDZ.cc.

74  : HLTFilter(iConfig),
75  originTag1_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag1")),
76  originTag2_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag2")),
77  inputTag1_(iConfig.template getParameter<edm::InputTag>("inputTag1")),
78  inputTag2_(iConfig.template getParameter<edm::InputTag>("inputTag2")),
79  inputToken1_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
80  inputToken2_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
81  electronToken_(consumes<reco::ElectronCollection>(iConfig.template getParameter<edm::InputTag>("electronTag"))),
82  triggerType1_(iConfig.template getParameter<int>("triggerType1")),
83  triggerType2_(iConfig.template getParameter<int>("triggerType2")),
84  minDR_(iConfig.template getParameter<double>("MinDR")),
85  maxDZ_(iConfig.template getParameter<double>("MaxDZ")),
86  minPixHitsForDZ_(iConfig.template getParameter<int>("MinPixHitsForDZ")),
87  min_N_(iConfig.template getParameter<int>("MinN")),
88  checkSC_(iConfig.template getParameter<bool>("checkSC")),
89  same_(inputTag1_.encode() == inputTag2_.encode()) // same collections to be compared?
90 {}
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 93 of file HLTDoubletDZ.cc.

94  : HLTFilter(iConfig),
95  originTag1_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag1")),
96  originTag2_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag2")),
97  inputTag1_(iConfig.template getParameter<edm::InputTag>("inputTag1")),
98  inputTag2_(iConfig.template getParameter<edm::InputTag>("inputTag2")),
99  inputToken1_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
100  inputToken2_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
101  electronToken_(consumes<reco::ElectronCollection>(iConfig.template getParameter<edm::InputTag>("electronTag"))),
102  triggerType1_(iConfig.template getParameter<int>("triggerType1")),
103  triggerType2_(iConfig.template getParameter<int>("triggerType2")),
104  minDR_(iConfig.template getParameter<double>("MinDR")),
105  maxDZ_(iConfig.template getParameter<double>("MaxDZ")),
106  minPixHitsForDZ_(iConfig.template getParameter<int>("MinPixHitsForDZ")),
107  min_N_(iConfig.template getParameter<int>("MinN")),
108  checkSC_(iConfig.template getParameter<bool>("checkSC")),
109  same_(inputTag1_.encode() == inputTag2_.encode()) // same collections to be compared?
110 {}
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 113 of file HLTDoubletDZ.cc.

114  : HLTFilter(iConfig),
115  originTag1_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag1")),
116  originTag2_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag2")),
117  inputTag1_(iConfig.template getParameter<edm::InputTag>("inputTag1")),
118  inputTag2_(iConfig.template getParameter<edm::InputTag>("inputTag2")),
119  inputToken1_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
120  inputToken2_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
121  //electronToken_ (consumes<reco::ElectronCollection>(iConfig.template getParameter<edm::InputTag>("electronTag"))),
122  triggerType1_(iConfig.template getParameter<int>("triggerType1")),
123  triggerType2_(iConfig.template getParameter<int>("triggerType2")),
124  minDR_(iConfig.template getParameter<double>("MinDR")),
125  maxDZ_(iConfig.template getParameter<double>("MaxDZ")),
126  minPixHitsForDZ_(iConfig.template getParameter<int>("MinPixHitsForDZ")),
127  min_N_(iConfig.template getParameter<int>("MinN")),
128  checkSC_(iConfig.template getParameter<bool>("checkSC")),
129  same_(inputTag1_.encode() == inputTag2_.encode()) // same collections to be compared?
130 {}
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]

Definition at line 133 of file HLTDoubletDZ.cc.

134  : HLTFilter(iConfig),
135  originTag1_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag1")),
136  originTag2_(iConfig.template getParameter<std::vector<edm::InputTag>>("originTag2")),
137  inputTag1_(iConfig.template getParameter<edm::InputTag>("inputTag1")),
138  inputTag2_(iConfig.template getParameter<edm::InputTag>("inputTag2")),
139  inputToken1_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag1_)),
140  inputToken2_(consumes<trigger::TriggerFilterObjectWithRefs>(inputTag2_)),
141  triggerType1_(iConfig.template getParameter<int>("triggerType1")),
142  triggerType2_(iConfig.template getParameter<int>("triggerType2")),
143  minDR_(iConfig.template getParameter<double>("MinDR")),
144  maxDZ_(iConfig.template getParameter<double>("MaxDZ")),
145  minPixHitsForDZ_(iConfig.template getParameter<int>("MinPixHitsForDZ")),
146  min_N_(iConfig.template getParameter<int>("MinN")),
147  checkSC_(iConfig.template getParameter<bool>("checkSC")),
148  same_(inputTag1_.encode() == inputTag2_.encode()) // same collections to be compared?
149 {}
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 318 of file HLTDoubletDZ.cc.

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

318  {
319  const reco::Candidate& candidate1(*r1);
320  const reco::Candidate& candidate2(*r2);
321  if (reco::deltaR(candidate1, candidate2) < minDR_)
322  return false;
323  if (std::abs(candidate1.vz() - candidate2.vz()) > maxDZ_)
324  return false;
325 
326  return true;
327 }
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 330 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().

332  {
334  iEvent.getByToken(electronToken_, electronHandle_);
335  if (!electronHandle_.isValid())
336  edm::LogError("HLTDoubletDZ") << "HLTDoubletDZ: Electron Handle not valid.";
337 
338  if (reco::deltaR(*r1, *r2) < minDR_)
339  return false;
341  for (auto const& eleIt : *electronHandle_) {
342  if (eleIt.superCluster() == r1->superCluster())
343  e1 = eleIt;
344  }
345 
346  const reco::RecoChargedCandidate& candidate2(*r2);
347  bool skipDZ = false;
348  if (minPixHitsForDZ_ > 0 && (e1.gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
349  candidate2.track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
350  skipDZ = true;
351  if (!skipDZ && std::abs(e1.vz() - candidate2.vz()) > maxDZ_)
352  return false;
353 
354  return true;
355 }
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 358 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().

360  {
362  iEvent.getByToken(electronToken_, electronHandle_);
363  if (!electronHandle_.isValid())
364  edm::LogError("HLTDoubletDZ") << "HLTDoubletDZ: Electron Handle not valid.";
365 
366  if (reco::deltaR(*r1, *r2) < minDR_)
367  return false;
368  reco::Electron e2;
369  for (auto const& eleIt : *electronHandle_) {
370  if (eleIt.superCluster() == r2->superCluster())
371  e2 = eleIt;
372  }
373 
374  const reco::RecoChargedCandidate& candidate1(*r1);
375  bool skipDZ = false;
376  if (minPixHitsForDZ_ > 0 && (candidate1.track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
377  e2.gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
378  skipDZ = true;
379  if (!skipDZ && std::abs(e2.vz() - candidate1.vz()) > maxDZ_)
380  return false;
381 
382  return true;
383 }
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 386 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().

388  {
390  iEvent.getByToken(electronToken_, electronHandle_);
391  if (!electronHandle_.isValid())
392  edm::LogError("HLTDoubletDZ") << "HLTDoubletDZ: Electron Handle not valid.";
393 
394  if (reco::deltaR(*r1, *r2) < minDR_)
395  return false;
396  reco::Electron e1, e2;
397  for (auto const& eleIt : *electronHandle_) {
398  if (eleIt.superCluster() == r2->superCluster())
399  e2 = eleIt;
400  if (eleIt.superCluster() == r1->superCluster())
401  e1 = eleIt;
402  }
403 
404  bool skipDZ = false;
405  if (minPixHitsForDZ_ > 0 && (e1.gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
406  e2.gsfTrack()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
407  skipDZ = true;
408  if (!skipDZ && std::abs(e2.vz() - e1.vz()) > maxDZ_)
409  return false;
410 
411  return true;
412 }
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 415 of file HLTDoubletDZ.cc.

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

417  {
418  const reco::RecoChargedCandidate& candidate1(*r1);
419  const reco::RecoChargedCandidate& candidate2(*r2);
420  if (reco::deltaR(candidate1, candidate2) < minDR_)
421  return false;
422  bool skipDZ = false;
423  if (minPixHitsForDZ_ > 0 && (candidate1.track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_ ||
424  candidate2.track()->hitPattern().numberOfValidPixelHits() < minPixHitsForDZ_))
425  skipDZ = true;
426  if (!skipDZ && std::abs(candidate1.vz() - candidate2.vz()) > maxDZ_)
427  return false;
428 
429  return true;
430 }
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::TrackerMuon, l1t::TrackerMuon >::computeDZ ( edm::Event iEvent,
l1t::TrackerMuonRef r1,
l1t::TrackerMuonRef r2 
) const

Definition at line 433 of file HLTDoubletDZ.cc.

References funct::abs(), reco::deltaR2(), diffTwoXMLs::r1, and diffTwoXMLs::r2.

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

◆ computeDZ() [7/7]

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

Definition at line 448 of file HLTDoubletDZ.cc.

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

450  {
451  const l1t::HPSPFTau& candidate1(*r1);
452  const l1t::HPSPFTau& candidate2(*r2);
453  if (reco::deltaR(candidate1, candidate2) < minDR_)
454  return false;
455 
456  // We don't care about minPixHitsForDZ_ with the L1HPSPFTaus,
457  // especially because the pixel does not participate in the L1T
458  if (std::abs(candidate1.leadChargedPFCand()->pfTrack()->vertex().z() -
459  candidate2.leadChargedPFCand()->pfTrack()->vertex().z()) > maxDZ_)
460  return false;
461 
462  return true;
463 }
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 155 of file HLTDoubletDZ.cc.

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

155  {
158  std::vector<edm::InputTag> originTag1(1, edm::InputTag("hltOriginal1"));
159  std::vector<edm::InputTag> originTag2(1, edm::InputTag("hltOriginal2"));
160  desc.add<std::vector<edm::InputTag>>("originTag1", originTag1);
161  desc.add<std::vector<edm::InputTag>>("originTag2", originTag2);
162  desc.add<edm::InputTag>("inputTag1", edm::InputTag("hltFiltered1"));
163  desc.add<edm::InputTag>("inputTag2", edm::InputTag("hltFiltered2"));
164  desc.add<int>("triggerType1", 0);
165  desc.add<int>("triggerType2", 0);
166  desc.add<double>("MinDR", -1.0);
167  desc.add<double>("MaxDZ", 0.2);
168  desc.add<int>("MinPixHitsForDZ", 0);
169  desc.add<bool>("checkSC", false);
170  desc.add<int>("MinN", 1);
172 }
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 175 of file HLTDoubletDZ.cc.

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

176  {
179  std::vector<edm::InputTag> originTag1(1, edm::InputTag("hltOriginal1"));
180  std::vector<edm::InputTag> originTag2(1, edm::InputTag("hltOriginal2"));
181  desc.add<std::vector<edm::InputTag>>("originTag1", originTag1);
182  desc.add<std::vector<edm::InputTag>>("originTag2", originTag2);
183  desc.add<edm::InputTag>("inputTag1", edm::InputTag("hltFiltered1"));
184  desc.add<edm::InputTag>("inputTag2", edm::InputTag("hltFiltered2"));
185  desc.add<edm::InputTag>("electronTag", edm::InputTag("electronTag"));
186  desc.add<int>("triggerType1", 0);
187  desc.add<int>("triggerType2", 0);
188  desc.add<double>("MinDR", -1.0);
189  desc.add<double>("MaxDZ", 0.2);
190  desc.add<int>("MinPixHitsForDZ", 0);
191  desc.add<bool>("checkSC", false);
192  desc.add<int>("MinN", 1);
194 }
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 197 of file HLTDoubletDZ.cc.

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

198  {
201  std::vector<edm::InputTag> originTag1(1, edm::InputTag("hltOriginal1"));
202  std::vector<edm::InputTag> originTag2(1, edm::InputTag("hltOriginal2"));
203  desc.add<std::vector<edm::InputTag>>("originTag1", originTag1);
204  desc.add<std::vector<edm::InputTag>>("originTag2", originTag2);
205  desc.add<edm::InputTag>("inputTag1", edm::InputTag("hltFiltered1"));
206  desc.add<edm::InputTag>("inputTag2", edm::InputTag("hltFiltered2"));
207  desc.add<edm::InputTag>("electronTag", edm::InputTag("electronTag"));
208  desc.add<int>("triggerType1", 0);
209  desc.add<int>("triggerType2", 0);
210  desc.add<double>("MinDR", -1.0);
211  desc.add<double>("MaxDZ", 0.2);
212  desc.add<int>("MinPixHitsForDZ", 0);
213  desc.add<bool>("checkSC", false);
214  desc.add<int>("MinN", 1);
216 }
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 219 of file HLTDoubletDZ.cc.

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

220  {
223  std::vector<edm::InputTag> originTag1(1, edm::InputTag("hltOriginal1"));
224  std::vector<edm::InputTag> originTag2(1, edm::InputTag("hltOriginal2"));
225  desc.add<std::vector<edm::InputTag>>("originTag1", originTag1);
226  desc.add<std::vector<edm::InputTag>>("originTag2", originTag2);
227  desc.add<edm::InputTag>("inputTag1", edm::InputTag("hltFiltered1"));
228  desc.add<edm::InputTag>("inputTag2", edm::InputTag("hltFiltered2"));
229  desc.add<edm::InputTag>("electronTag", edm::InputTag("electronTag"));
230  desc.add<int>("triggerType1", 0);
231  desc.add<int>("triggerType2", 0);
232  desc.add<double>("MinDR", -1.0);
233  desc.add<double>("MaxDZ", 0.2);
234  desc.add<int>("MinPixHitsForDZ", 0);
235  desc.add<bool>("checkSC", false);
236  desc.add<int>("MinN", 1);
238 }
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 241 of file HLTDoubletDZ.cc.

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

242  {
245  std::vector<edm::InputTag> originTag1(1, edm::InputTag("hltOriginal1"));
246  std::vector<edm::InputTag> originTag2(1, edm::InputTag("hltOriginal2"));
247  desc.add<std::vector<edm::InputTag>>("originTag1", originTag1);
248  desc.add<std::vector<edm::InputTag>>("originTag2", originTag2);
249  desc.add<edm::InputTag>("inputTag1", edm::InputTag("hltFiltered1"));
250  desc.add<edm::InputTag>("inputTag2", edm::InputTag("hltFiltered2"));
251  desc.add<int>("triggerType1", 0);
252  desc.add<int>("triggerType2", 0);
253  desc.add<double>("MinDR", -1.0);
254  desc.add<double>("MaxDZ", 0.2);
255  desc.add<int>("MinPixHitsForDZ", 0);
256  desc.add<bool>("checkSC", false);
257  desc.add<int>("MinN", 1);
259 }
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 264 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_2022v14_cff::InputTag, instance, label, LaserDQM_cfg::process, PDWG_EXODelayedJetMET_cff::saveTags, and AlCaHLTBitMon_QueryRunRegistry::string.

267  {
269  if (iEvent.getByToken(inputToken1_, handle1) and iEvent.getByToken(inputToken2_, handle2)) {
270  // get hold of pre-filtered object collections
271  handle1->getObjects(triggerType1_, coll1);
272  handle2->getObjects(triggerType2_, coll2);
273  const trigger::size_type n1(coll1.size());
274  const trigger::size_type n2(coll2.size());
275 
276  if (saveTags()) {
277  edm::InputTag tagOld;
278  for (unsigned int i = 0; i < originTag1_.size(); ++i) {
279  filterproduct.addCollectionTag(originTag1_[i]);
280  }
281  tagOld = edm::InputTag();
282  for (trigger::size_type i1 = 0; i1 != n1; ++i1) {
283  const edm::ProductID pid(coll1[i1].id());
284  const auto& prov = iEvent.getStableProvenance(pid);
285  const std::string& label(prov.moduleLabel());
286  const std::string& instance(prov.productInstanceName());
287  const std::string& process(prov.processName());
289  if (tagOld.encode() != tagNew.encode()) {
290  filterproduct.addCollectionTag(tagNew);
291  tagOld = tagNew;
292  }
293  }
294  for (unsigned int i = 0; i < originTag2_.size(); ++i) {
295  filterproduct.addCollectionTag(originTag2_[i]);
296  }
297  tagOld = edm::InputTag();
298  for (trigger::size_type i2 = 0; i2 != n2; ++i2) {
299  const edm::ProductID pid(coll2[i2].id());
300  const auto& prov = iEvent.getStableProvenance(pid);
301  const std::string& label(prov.moduleLabel());
302  const std::string& instance(prov.productInstanceName());
303  const std::string& process(prov.processName());
305  if (tagOld.encode() != tagNew.encode()) {
306  filterproduct.addCollectionTag(tagNew);
307  tagOld = tagNew;
308  }
309  }
310  }
311 
312  return true;
313  } else
314  return false;
315 }
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 467 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.

469  {
470  // All HLT filters must create and fill an HLT filter object,
471  // recording any reconstructed physics objects satisfying (or not)
472  // this HLT filter, and place it in the Event.
473  bool accept(false);
474 
475  std::vector<T1Ref> coll1;
476  std::vector<T2Ref> coll2;
477 
478  if (getCollections(iEvent, coll1, coll2, filterproduct)) {
479  int n(0);
480  T1Ref r1;
481  T2Ref r2;
482 
483  for (unsigned int i1 = 0; i1 != coll1.size(); i1++) {
484  r1 = coll1[i1];
485  //const reco::Candidate& candidate1(*r1);
486  unsigned int I(0);
487  if (same_) {
488  I = i1 + 1;
489  }
490  for (unsigned int i2 = I; i2 != coll2.size(); i2++) {
491  r2 = coll2[i2];
492  if (checkSC_) {
493  if (r1->superCluster().isNonnull() && r2->superCluster().isNonnull()) {
494  if (r1->superCluster() == r2->superCluster())
495  continue;
496  }
497  }
498 
499  if (!computeDZ(iEvent, r1, r2))
500  continue;
501 
502  n++;
503  filterproduct.addObject(triggerType1_, r1);
504  filterproduct.addObject(triggerType2_, r2);
505  }
506  }
507 
508  accept = accept || (n >= min_N_);
509  }
510 
511  return accept;
512 }
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::TrackerMuon, l1t::TrackerMuon >::hltFilter ( edm::Event iEvent,
const edm::EventSetup iSetup,
trigger::TriggerFilterObjectWithRefs filterproduct 
) const
virtual

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

Implements HLTFilter.

Definition at line 518 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.

519  {
520  // All HLT filters must create and fill an HLT filter object,
521  // recording any reconstructed physics objects satisfying (or not)
522  // this HLT filter, and place it in the Event.
523  bool accept(false);
524 
525  std::vector<l1t::TrackerMuonRef> coll1;
526  std::vector<l1t::TrackerMuonRef> coll2;
527 
528  if (getCollections(iEvent, coll1, coll2, filterproduct)) {
529  int n(0);
532 
533  for (unsigned int i1 = 0; i1 != coll1.size(); i1++) {
534  r1 = coll1[i1];
535  unsigned int I(0);
536  if (same_) {
537  I = i1 + 1;
538  }
539  for (unsigned int i2 = I; i2 != coll2.size(); i2++) {
540  r2 = coll2[i2];
541 
542  if (!computeDZ(iEvent, r1, r2))
543  continue;
544 
545  n++;
546  filterproduct.addObject(triggerType1_, r1);
547  filterproduct.addObject(triggerType2_, r2);
548  }
549  }
550 
551  accept = accept || (n >= min_N_);
552  }
553 
554  return accept;
555 }
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 561 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.

563  {
564  // All HLT filters must create and fill an HLT filter object,
565  // recording any reconstructed physics objects satisfying (or not)
566  // this HLT filter, and place it in the Event.
567  bool accept(false);
568 
569  std::vector<l1t::PFTauRef> coll1;
570  std::vector<l1t::PFTauRef> coll2;
571 
572  if (getCollections(iEvent, coll1, coll2, filterproduct)) {
573  int n(0);
576 
577  for (unsigned int i1 = 0; i1 != coll1.size(); i1++) {
578  r1 = coll1[i1];
579  unsigned int I(0);
580  if (same_) {
581  I = i1 + 1;
582  }
583  for (unsigned int i2 = I; i2 != coll2.size(); i2++) {
584  r2 = coll2[i2];
585 
586  if (!computeDZ(iEvent, r1, r2))
587  continue;
588 
589  n++;
590  filterproduct.addObject(triggerType1_, r1);
591  filterproduct.addObject(triggerType2_, r2);
592  }
593  }
594 
595  accept = accept || (n >= min_N_);
596  }
597 
598  return accept;
599 }
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 605 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.

607  {
608  // All HLT filters must create and fill an HLT filter object,
609  // recording any reconstructed physics objects satisfying (or not)
610  // this HLT filter, and place it in the Event.
611  bool accept(false);
612 
613  std::vector<l1t::HPSPFTauRef> coll1;
614  std::vector<l1t::HPSPFTauRef> coll2;
615 
616  if (getCollections(iEvent, coll1, coll2, filterproduct)) {
617  int n(0);
620 
621  for (unsigned int i1 = 0; i1 != coll1.size(); i1++) {
622  r1 = coll1[i1];
623  unsigned int I(0);
624  if (same_) {
625  I = i1 + 1;
626  }
627  for (unsigned int i2 = I; i2 != coll2.size(); i2++) {
628  r2 = coll2[i2];
629 
630  if (!computeDZ(iEvent, r1, r2))
631  continue;
632 
633  n++;
634  filterproduct.addObject(triggerType1_, r1);
635  filterproduct.addObject(triggerType2_, r2);
636  }
637  }
638 
639  accept = accept || (n >= min_N_);
640  }
641 
642  return accept;
643 }
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.