CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
CaloTowerFromL1TSeededCreatorForTauHLT Class Reference

#include <CaloTowerFromL1TSeededCreatorForTauHLT.h>

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

Public Member Functions

 CaloTowerFromL1TSeededCreatorForTauHLT (const edm::ParameterSet &)
 constructor from parameter set More...
 
 ~CaloTowerFromL1TSeededCreatorForTauHLT () override
 destructor More...
 
- 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 &desc)
 
- 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 Member Functions

void produce (edm::StreamID sid, edm::Event &evt, const edm::EventSetup &stp) const override
 process one event More...
 

Private Attributes

const double m_cone
 use only towers in cone mCone around L1 candidate for regional jet reco More...
 
const double m_EThreshold
 E threshold. More...
 
const double m_EtThreshold
 imitator of L1 seeds More...
 
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefsm_tauTrigger_token
 label of tau trigger type analysis More...
 
const edm::EDGetTokenT< CaloTowerCollectionm_towers_token
 label of source collection More...
 
const int m_verbose
 verbosity More...
 

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

Framework module that produces a collection of calo towers in the region of interest for Tau HLT reconstruction, defined around L1 seeds

Author
T. Strebler. IC. based on A. Nikitenko

Definition at line 26 of file CaloTowerFromL1TSeededCreatorForTauHLT.h.

Constructor & Destructor Documentation

◆ CaloTowerFromL1TSeededCreatorForTauHLT()

CaloTowerFromL1TSeededCreatorForTauHLT::CaloTowerFromL1TSeededCreatorForTauHLT ( const edm::ParameterSet p)

constructor from parameter set

Definition at line 21 of file CaloTowerFromL1TSeededCreatorForTauHLT.cc.

22  : m_verbose(p.getUntrackedParameter<int>("verbose", 0)),
23  m_towers_token(consumes<CaloTowerCollection>(p.getParameter<InputTag>("towers"))),
24  m_cone(p.getParameter<double>("UseTowersInCone")),
25  m_tauTrigger_token(consumes<trigger::TriggerFilterObjectWithRefs>(p.getParameter<InputTag>("TauTrigger"))),
26  m_EtThreshold(p.getParameter<double>("minimumEt")),
27  m_EThreshold(p.getParameter<double>("minimumE")) {
28  produces<CaloTowerCollection>();
29 }

◆ ~CaloTowerFromL1TSeededCreatorForTauHLT()

CaloTowerFromL1TSeededCreatorForTauHLT::~CaloTowerFromL1TSeededCreatorForTauHLT ( )
overridedefault

destructor

Member Function Documentation

◆ fillDescriptions()

void CaloTowerFromL1TSeededCreatorForTauHLT::fillDescriptions ( edm::ConfigurationDescriptions desc)
static

Definition at line 78 of file CaloTowerFromL1TSeededCreatorForTauHLT.cc.

78  {
80 
81  aDesc.add<edm::InputTag>("TauTrigger", edm::InputTag("hltL1sDoubleIsoTau40er"))
82  ->setComment("Name of trigger filter for L1 seeds");
83  aDesc.add<edm::InputTag>("towers", edm::InputTag("towerMaker"))->setComment("Input tower collection");
84  aDesc.add<double>("UseTowersInCone", 0.8)->setComment("Radius of cone around seed");
85  aDesc.add<double>("minimumE", 0.8)->setComment("Minimum tower energy");
86  aDesc.add<double>("minimumEt", 0.5)->setComment("Minimum tower ET");
87  aDesc.addUntracked<int>("verbose", 0)->setComment("Verbosity level; 0=silent");
88 
89  desc.add("CaloTowerFromL1TSeededCreatorForTauHLT", aDesc);
90  desc.setComment("Produce tower collection around L1 particle seed.");
91 }

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

◆ produce()

void CaloTowerFromL1TSeededCreatorForTauHLT::produce ( edm::StreamID  sid,
edm::Event evt,
const edm::EventSetup stp 
) const
overrideprivatevirtual

process one event

Implements edm::global::EDProducerBase.

Definition at line 33 of file CaloTowerFromL1TSeededCreatorForTauHLT.cc.

33  {
36 
37  double m_cone2 = m_cone * m_cone;
38 
39  // L1 seeds
41  evt.getByToken(m_tauTrigger_token, l1TriggeredTaus);
42 
43  auto cands = std::make_unique<CaloTowerCollection>();
44  cands->reserve(caloTowers->size());
45 
46  l1t::TauVectorRef tauCandRefVec;
47  l1TriggeredTaus->getObjects(trigger::TriggerL1Tau, tauCandRefVec);
48 
49  for (auto const& tauCandRef : tauCandRefVec) {
50  for (auto const& cal : *caloTowers) {
51  bool isAccepted = false;
52  if (m_verbose == 2) {
53  edm::LogInfo("JetDebugInfo") << "CaloTowerFromL1TSeededCreatorForTauHLT::produce-> tower et/eta/phi/e: "
54  << cal.et() << '/' << cal.eta() << '/' << cal.phi() << '/' << cal.energy()
55  << " is...";
56  }
57  if (cal.et() >= m_EtThreshold && cal.energy() >= m_EThreshold) {
58  math::PtEtaPhiELorentzVector p(cal.et(), cal.eta(), cal.phi(), cal.energy());
59  double delta2 = deltaR2((tauCandRef->p4()).Vect(), p);
60  if (delta2 < m_cone2) {
61  isAccepted = true;
62  cands->push_back(cal);
63  }
64  }
65 
66  if (m_verbose == 2) {
67  if (isAccepted)
68  edm::LogInfo("JetDebugInfo") << "accepted \n";
69  else
70  edm::LogInfo("JetDebugInfo") << "rejected \n";
71  }
72  }
73  }
74 
75  evt.put(std::move(cands));
76 }

References eleHcalExtractorBlocks_cff::caloTowers, HLT_2018_cff::cands, HLTMuonOfflineAnalyzer_cfi::deltaR2, edm::Event::getByToken(), trigger::TriggerRefsCollections::getObjects(), m_cone, m_EThreshold, m_EtThreshold, m_tauTrigger_token, m_towers_token, m_verbose, eostools::move(), AlCaHLTBitMon_ParallelJobs::p, edm::Event::put(), and trigger::TriggerL1Tau.

Member Data Documentation

◆ m_cone

const double CaloTowerFromL1TSeededCreatorForTauHLT::m_cone
private

use only towers in cone mCone around L1 candidate for regional jet reco

Definition at line 44 of file CaloTowerFromL1TSeededCreatorForTauHLT.h.

Referenced by produce().

◆ m_EThreshold

const double CaloTowerFromL1TSeededCreatorForTauHLT::m_EThreshold
private

E threshold.

Definition at line 52 of file CaloTowerFromL1TSeededCreatorForTauHLT.h.

Referenced by produce().

◆ m_EtThreshold

const double CaloTowerFromL1TSeededCreatorForTauHLT::m_EtThreshold
private

imitator of L1 seeds

ET threshold

Definition at line 50 of file CaloTowerFromL1TSeededCreatorForTauHLT.h.

Referenced by produce().

◆ m_tauTrigger_token

const edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> CaloTowerFromL1TSeededCreatorForTauHLT::m_tauTrigger_token
private

label of tau trigger type analysis

Definition at line 46 of file CaloTowerFromL1TSeededCreatorForTauHLT.h.

Referenced by produce().

◆ m_towers_token

const edm::EDGetTokenT<CaloTowerCollection> CaloTowerFromL1TSeededCreatorForTauHLT::m_towers_token
private

label of source collection

Definition at line 42 of file CaloTowerFromL1TSeededCreatorForTauHLT.h.

Referenced by produce().

◆ m_verbose

const int CaloTowerFromL1TSeededCreatorForTauHLT::m_verbose
private

verbosity

Definition at line 40 of file CaloTowerFromL1TSeededCreatorForTauHLT.h.

Referenced by produce().

edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::LogInfo
Definition: MessageLogger.h:254
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
CaloTowerFromL1TSeededCreatorForTauHLT::m_towers_token
const edm::EDGetTokenT< CaloTowerCollection > m_towers_token
label of source collection
Definition: CaloTowerFromL1TSeededCreatorForTauHLT.h:42
math::PtEtaPhiELorentzVector
PtEtaPhiELorentzVectorD PtEtaPhiELorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:27
edm::Handle
Definition: AssociativeIterator.h:50
trigger::TriggerRefsCollections::getObjects
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
Definition: TriggerRefsCollections.h:593
CaloTowerFromL1TSeededCreatorForTauHLT::m_verbose
const int m_verbose
verbosity
Definition: CaloTowerFromL1TSeededCreatorForTauHLT.h:40
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:528
CaloTowerFromL1TSeededCreatorForTauHLT::m_EtThreshold
const double m_EtThreshold
imitator of L1 seeds
Definition: CaloTowerFromL1TSeededCreatorForTauHLT.h:50
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
eleHcalExtractorBlocks_cff.caloTowers
caloTowers
Definition: eleHcalExtractorBlocks_cff.py:15
trigger::TriggerL1Tau
Definition: TriggerTypeDefs.h:49
edm::ConfigurationDescriptions::setComment
void setComment(std::string const &value)
Definition: ConfigurationDescriptions.cc:48
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:132
CaloTowerFromL1TSeededCreatorForTauHLT::m_tauTrigger_token
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > m_tauTrigger_token
label of tau trigger type analysis
Definition: CaloTowerFromL1TSeededCreatorForTauHLT.h:46
eostools.move
def move(src, dest)
Definition: eostools.py:511
CaloTowerFromL1TSeededCreatorForTauHLT::m_EThreshold
const double m_EThreshold
E threshold.
Definition: CaloTowerFromL1TSeededCreatorForTauHLT.h:52
HLTMuonOfflineAnalyzer_cfi.deltaR2
deltaR2
Definition: HLTMuonOfflineAnalyzer_cfi.py:105
HLT_2018_cff.cands
cands
Definition: HLT_2018_cff.py:13762
CaloTowerFromL1TSeededCreatorForTauHLT::m_cone
const double m_cone
use only towers in cone mCone around L1 candidate for regional jet reco
Definition: CaloTowerFromL1TSeededCreatorForTauHLT.h:44
l1t::TauVectorRef
std::vector< TauRef > TauVectorRef
Definition: Tau.h:14
edm::ParameterDescriptionNode::setComment
void setComment(std::string const &value)
Definition: ParameterDescriptionNode.cc:106
edm::InputTag
Definition: InputTag.h:15