CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
L1TJetsMatching< T > Class Template Reference

#include <L1TJetsMatching.h>

Inheritance diagram for L1TJetsMatching< T >:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1TJetsMatching (const edm::ParameterSet &)
 
void produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override
 
 ~L1TJetsMatching () override
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
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 edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

const edm::EDGetTokenT< std::vector< T > > jetSrc_
 
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefsjetTrigger_
 
const double matchingR2_
 
const double matchingR_
 
const double mjjMin_
 
const double pt1Min_
 
const double pt2Min_
 
const double pt3Min_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase 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<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
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)
 
template<Transition B>
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 (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

template<typename T>
class L1TJetsMatching< T >

RecoTauTag/HLTProducers/interface/L1TJetsMatching.h Description: Matching L1 to PF/Calo Jets. Used for HLT_VBF paths. Matches PF/Calo Jets to L1 jets from the dedicated seed Adds selection criteria to the leading/subleading jets as well as the maximum dijet mass Separates collections of PF/Calo jets into two categories

Definition at line 50 of file L1TJetsMatching.h.

Constructor & Destructor Documentation

◆ L1TJetsMatching()

template<typename T >
L1TJetsMatching< T >::L1TJetsMatching ( const edm::ParameterSet iConfig)
explicit

Definition at line 115 of file L1TJetsMatching.h.

116  : jetSrc_(consumes<std::vector<T>>(iConfig.getParameter<edm::InputTag>("JetSrc"))),
117  jetTrigger_(consumes<trigger::TriggerFilterObjectWithRefs>(iConfig.getParameter<edm::InputTag>("L1JetTrigger"))),
118  pt1Min_(iConfig.getParameter<double>("pt1Min")),
119  pt2Min_(iConfig.getParameter<double>("pt2Min")),
120  pt3Min_(iConfig.getParameter<double>("pt3Min")),
121  mjjMin_(iConfig.getParameter<double>("mjjMin")),
122  matchingR_(iConfig.getParameter<double>("matchingR")),
124  produces<std::vector<T>>("TwoJets");
125  produces<std::vector<T>>("ThreeJets");
126 }

◆ ~L1TJetsMatching()

template<typename T >
L1TJetsMatching< T >::~L1TJetsMatching ( )
override

Definition at line 128 of file L1TJetsMatching.h.

128 {}

Member Function Documentation

◆ fillDescriptions()

template<typename T >
void L1TJetsMatching< T >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 169 of file L1TJetsMatching.h.

169  {
171  desc.add<edm::InputTag>("L1JetTrigger", edm::InputTag("hltL1DiJetVBF"))->setComment("Name of trigger filter");
172  desc.add<edm::InputTag>("JetSrc", edm::InputTag("hltAK4PFJetsTightIDCorrected"))
173  ->setComment("Input collection of PFJets");
174  desc.add<double>("pt1Min", 110.0)->setComment("Minimal pT1 of PFJets to match");
175  desc.add<double>("pt2Min", 35.0)->setComment("Minimal pT2 of PFJets to match");
176  desc.add<double>("pt3Min", 110.0)->setComment("Minimum pT3 of PFJets to match");
177  desc.add<double>("mjjMin", 650.0)->setComment("Minimal mjj of matched PFjets");
178  desc.add<double>("matchingR", 0.5)->setComment("dR value used for matching");
179  descriptions.setComment(
180  "This module produces collection of PFJetss matched to L1 Taus / Jets passing a HLT filter (Only p4 and vertex "
181  "of returned PFJetss are set).");
182  descriptions.add(defaultModuleLabel<L1TJetsMatching<T>>(), desc);
183 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), defaultModuleLabel(), HLT_2018_cff::InputTag, edm::ConfigurationDescriptions::setComment(), and edm::ParameterDescriptionNode::setComment().

◆ produce()

template<typename T >
void L1TJetsMatching< T >::produce ( edm::StreamID  iSId,
edm::Event iEvent,
const edm::EventSetup iES 
) const
overridevirtual

Implements edm::global::EDProducerBase.

Definition at line 131 of file L1TJetsMatching.h.

131  {
132  unique_ptr<std::vector<T>> pfMatchedJets(new std::vector<T>);
133  std::pair<std::vector<T>, std::vector<T>> output;
134 
135  // Getting HLT jets to be matched
137  iEvent.getByToken(jetSrc_, pfJets);
138 
140  iEvent.getByToken(jetTrigger_, l1TriggeredJets);
141 
142  //l1t::TauVectorRef jetCandRefVec;
143  l1t::JetVectorRef jetCandRefVec;
144  l1TriggeredJets->getObjects(trigger::TriggerL1Jet, jetCandRefVec);
145 
146  math::XYZPoint a(0., 0., 0.);
147 
148  //std::cout<<"PFsize= "<<pfJets->size()<<endl<<" L1size= "<<jetCandRefVec.size()<<std::endl;
149  for (unsigned int iJet = 0; iJet < pfJets->size(); iJet++) {
150  const T& myJet = (*pfJets)[iJet];
151  for (unsigned int iL1Jet = 0; iL1Jet < jetCandRefVec.size(); iL1Jet++) {
152  // Find the relative L2pfJets, to see if it has been reconstructed
153  // if ((iJet<3) && (iL1Jet==0)) std::cout<<myJet.p4().Pt()<<" ";
154  if ((reco::deltaR2(myJet.p4(), jetCandRefVec[iL1Jet]->p4()) < matchingR2_) && (myJet.pt() > pt2Min_)) {
155  pfMatchedJets->push_back(myJet);
156  break;
157  }
158  }
159  }
160 
161  output = categorise(*pfMatchedJets, pt1Min_, pt2Min_, pt3Min_, mjjMin_);
162  unique_ptr<std::vector<T>> output1(new std::vector<T>(output.first));
163  unique_ptr<std::vector<T>> output2(new std::vector<T>(output.second));
164 
165  iEvent.put(std::move(output1), "TwoJets");
166  iEvent.put(std::move(output2), "ThreeJets");
167 }

References a, categorise(), reco::deltaR2(), trigger::TriggerRefsCollections::getObjects(), iEvent, eostools::move(), convertSQLitetoXML_cfg::output, skim900GeV_StreamA_MinBiasPD_cfg::output1, skim900GeV_StreamA_MinBiasPD_cfg::output2, pfJetBenchmark_cfi::pfJets, and trigger::TriggerL1Jet.

Member Data Documentation

◆ jetSrc_

template<typename T >
const edm::EDGetTokenT<std::vector<T> > L1TJetsMatching< T >::jetSrc_
private

Definition at line 58 of file L1TJetsMatching.h.

◆ jetTrigger_

template<typename T >
const edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> L1TJetsMatching< T >::jetTrigger_
private

Definition at line 59 of file L1TJetsMatching.h.

◆ matchingR2_

template<typename T >
const double L1TJetsMatching< T >::matchingR2_
private

Definition at line 65 of file L1TJetsMatching.h.

◆ matchingR_

template<typename T >
const double L1TJetsMatching< T >::matchingR_
private

Definition at line 64 of file L1TJetsMatching.h.

◆ mjjMin_

template<typename T >
const double L1TJetsMatching< T >::mjjMin_
private

Definition at line 63 of file L1TJetsMatching.h.

◆ pt1Min_

template<typename T >
const double L1TJetsMatching< T >::pt1Min_
private

Definition at line 60 of file L1TJetsMatching.h.

◆ pt2Min_

template<typename T >
const double L1TJetsMatching< T >::pt2Min_
private

Definition at line 61 of file L1TJetsMatching.h.

◆ pt3Min_

template<typename T >
const double L1TJetsMatching< T >::pt3Min_
private

Definition at line 62 of file L1TJetsMatching.h.

edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
skim900GeV_StreamA_MinBiasPD_cfg.output1
output1
Definition: skim900GeV_StreamA_MinBiasPD_cfg.py:212
L1TJetsMatching::pt3Min_
const double pt3Min_
Definition: L1TJetsMatching.h:62
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
l1t::JetVectorRef
std::vector< JetRef > JetVectorRef
Definition: Jet.h:14
L1TJetsMatching::jetSrc_
const edm::EDGetTokenT< std::vector< T > > jetSrc_
Definition: L1TJetsMatching.h:58
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::Handle
Definition: AssociativeIterator.h:50
trigger::TriggerRefsCollections::getObjects
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
Definition: TriggerRefsCollections.h:593
L1TJetsMatching::matchingR_
const double matchingR_
Definition: L1TJetsMatching.h:64
L1TJetsMatching::jetTrigger_
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > jetTrigger_
Definition: L1TJetsMatching.h:59
categorise
std::pair< std::vector< T >, std::vector< T > > categorise(const std::vector< T > &pfMatchedJets, double pt1, double pt2, double pt3, double Mjj)
Definition: L1TJetsMatching.h:71
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
L1TJetsMatching::pt1Min_
const double pt1Min_
Definition: L1TJetsMatching.h:60
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
a
double a
Definition: hdecay.h:119
defaultModuleLabel
std::string defaultModuleLabel()
Definition: defaultModuleLabel.h:16
reco::deltaR2
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
edm::ConfigurationDescriptions::setComment
void setComment(std::string const &value)
Definition: ConfigurationDescriptions.cc:48
iEvent
int iEvent
Definition: GenABIO.cc:224
trigger::TriggerL1Jet
Definition: TriggerTypeDefs.h:48
L1TJetsMatching::matchingR2_
const double matchingR2_
Definition: L1TJetsMatching.h:65
skim900GeV_StreamA_MinBiasPD_cfg.output2
output2
Definition: skim900GeV_StreamA_MinBiasPD_cfg.py:226
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
eostools.move
def move(src, dest)
Definition: eostools.py:511
L1TJetsMatching
Definition: L1TJetsMatching.h:50
T
long double T
Definition: Basic3DVectorLD.h:48
edm::ParameterDescriptionNode::setComment
void setComment(std::string const &value)
Definition: ParameterDescriptionNode.cc:106
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:126
L1TJetsMatching::mjjMin_
const double mjjMin_
Definition: L1TJetsMatching.h:63
L1TJetsMatching::pt2Min_
const double pt2Min_
Definition: L1TJetsMatching.h:61
edm::InputTag
Definition: InputTag.h:15
pfJetBenchmark_cfi.pfJets
pfJets
Definition: pfJetBenchmark_cfi.py:4