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
 
 EDProducer (const EDProducer &)=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
 
EDProduceroperator= (const EDProducer &)=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::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 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 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
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename 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 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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const double mjjMin_
const edm::EDGetTokenT< std::vector< T > > jetSrc_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const double pt3Min_
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > jetTrigger_
const double matchingR2_
const double pt1Min_
const double matchingR_
const double pt2Min_

◆ ~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.

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

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 }
std::string defaultModuleLabel()
void setComment(std::string const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ 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.

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.

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 }
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
const double mjjMin_
const edm::EDGetTokenT< std::vector< T > > jetSrc_
std::pair< std::vector< T >, std::vector< T > > categorise(const std::vector< T > &pfMatchedJets, double pt1, double pt2, double pt3, double Mjj)
const double pt3Min_
int iEvent
Definition: GenABIO.cc:224
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > jetTrigger_
const double matchingR2_
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
const double pt1Min_
double a
Definition: hdecay.h:119
std::vector< JetRef > JetVectorRef
Definition: Jet.h:14
long double T
const double pt2Min_
def move(src, dest)
Definition: eostools.py:511

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.