CMS 3D CMS Logo

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

#include <CaloTowerCreatorForTauHLT.h>

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

Public Member Functions

 CaloTowerCreatorForTauHLT (const edm::ParameterSet &)
 constructor from parameter set More...
 
 ~CaloTowerCreatorForTauHLT () override
 destructor More...
 
- 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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
 
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 mCone
 use only towers in cone mCone around L1 candidate for regional jet reco More...
 
const double mEThreshold
 E threshold. More...
 
const double mEtThreshold
 imitator of L1 seeds More...
 
const int mTauId
 
const edm::EDGetTokenT< l1extra::L1JetParticleCollectionmTauTrigger_token
 label of tau trigger type analysis More...
 
const edm::EDGetTokenT< CaloTowerCollectionmtowers_token
 label of source collection More...
 
const int mVerbose
 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 = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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 reconnstruction, depending on tau type trigger:
Tau1 - take location of 1st L1 Tau Tau2 - take location of 2nd L1 Tau; if does not exists, take location of 1st Calo Tower ETau - take L1 Tau candidate which is not collinear to HLT (or L1) electron candidate.

Author
A. Nikitenko. IC. based on L. Lista and J. Mans

Definition at line 32 of file CaloTowerCreatorForTauHLT.h.

Constructor & Destructor Documentation

◆ CaloTowerCreatorForTauHLT()

CaloTowerCreatorForTauHLT::CaloTowerCreatorForTauHLT ( const edm::ParameterSet p)

constructor from parameter set

Definition at line 21 of file CaloTowerCreatorForTauHLT.cc.

22  : mVerbose(p.getUntrackedParameter<int>("verbose", 0)),
23  mtowers_token(consumes<CaloTowerCollection>(p.getParameter<InputTag>("towers"))),
24  mCone(p.getParameter<double>("UseTowersInCone")),
25  mTauTrigger_token(consumes<L1JetParticleCollection>(p.getParameter<InputTag>("TauTrigger"))),
26  mEtThreshold(p.getParameter<double>("minimumEt")),
27  mEThreshold(p.getParameter<double>("minimumE")),
28  mTauId(p.getParameter<int>("TauId")) {
29  produces<CaloTowerCollection>();
30 }

◆ ~CaloTowerCreatorForTauHLT()

CaloTowerCreatorForTauHLT::~CaloTowerCreatorForTauHLT ( )
override

destructor

Definition at line 32 of file CaloTowerCreatorForTauHLT.cc.

32 {}

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 84 of file CaloTowerCreatorForTauHLT.cc.

84  {
86  aDesc.add<edm::InputTag>("TauTrigger", edm::InputTag("l1extraParticles", "Tau"))
87  ->setComment("L1ExtraJet collection for seeding");
88  aDesc.add<int>("TauId", 0)->setComment("Item from L1ExtraJet collection used for seeding");
89  aDesc.add<edm::InputTag>("towers", edm::InputTag("towerMaker"))->setComment("Input tower collection");
90  aDesc.add<double>("UseTowersInCone", 0.8)->setComment("Radius of cone around seed");
91  aDesc.add<double>("minimumE", 0.8)->setComment("Minimum tower energy");
92  aDesc.add<double>("minimumEt", 0.5)->setComment("Minimum tower ET");
93  aDesc.addUntracked<int>("verbose", 0)->setComment("Verbosity level; 0=silent");
94  desc.setComment("Produce tower collection around L1ExtraJetParticle seed.");
95  desc.add("caloTowerMakerHLT", aDesc);
96 }

References edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, and edm::ParameterDescriptionNode::setComment().

◆ produce()

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

process one event

Implements edm::global::EDProducerBase.

Definition at line 34 of file CaloTowerCreatorForTauHLT.cc.

34  {
37 
38  // imitate L1 seeds
40  evt.getByToken(mTauTrigger_token, jetsgen);
41 
42  std::unique_ptr<CaloTowerCollection> cands(new CaloTowerCollection);
43  cands->reserve(caloTowers->size());
44 
45  int idTau = 0;
46  L1JetParticleCollection::const_iterator myL1Jet = jetsgen->begin();
47  for (; myL1Jet != jetsgen->end(); myL1Jet++) {
48  if (idTau == mTauId) {
49  double Sum08 = 0.;
50 
51  unsigned idx = 0;
52  for (; idx < caloTowers->size(); idx++) {
53  const CaloTower* cal = &((*caloTowers)[idx]);
54  bool isAccepted = false;
55  if (mVerbose == 2) {
56  edm::LogInfo("JetDebugInfo") << "CaloTowerCreatorForTauHLT::produce-> " << idx
57  << " tower et/eta/phi/e: " << cal->et() << '/' << cal->eta() << '/' << cal->phi()
58  << '/' << cal->energy() << " is...";
59  }
60  if (cal->et() >= mEtThreshold && cal->energy() >= mEThreshold) {
61  math::PtEtaPhiELorentzVector p(cal->et(), cal->eta(), cal->phi(), cal->energy());
62  double delta = ROOT::Math::VectorUtil::DeltaR((*myL1Jet).p4().Vect(), p);
63 
64  if (delta < mCone) {
65  isAccepted = true;
66  Sum08 += cal->et();
67  cands->push_back(*cal);
68  }
69  }
70  if (mVerbose == 2) {
71  if (isAccepted)
72  edm::LogInfo("JetDebugInfo") << "accepted \n";
73  else
74  edm::LogInfo("JetDebugInfo") << "rejected \n";
75  }
76  }
77  }
78  idTau++;
79  }
80 
81  evt.put(std::move(cands));
82 }

References eleHcalExtractorBlocks_cff::caloTowers, HLT_FULL_cff::cands, dumpMFGeometry_cfg::delta, electronAnalyzer_cfi::DeltaR, reco::LeafCandidate::energy(), CaloTower::et(), reco::LeafCandidate::eta(), edm::Event::getByToken(), heavyIonCSV_trainingSettings::idx, mCone, mEThreshold, mEtThreshold, eostools::move(), mTauId, mTauTrigger_token, mtowers_token, mVerbose, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::phi(), and edm::Event::put().

Member Data Documentation

◆ mCone

const double CaloTowerCreatorForTauHLT::mCone
private

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

Definition at line 50 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

◆ mEThreshold

const double CaloTowerCreatorForTauHLT::mEThreshold
private

E threshold.

Definition at line 58 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

◆ mEtThreshold

const double CaloTowerCreatorForTauHLT::mEtThreshold
private

imitator of L1 seeds

ET threshold

Definition at line 56 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

◆ mTauId

const int CaloTowerCreatorForTauHLT::mTauId
private

Definition at line 60 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

◆ mTauTrigger_token

const edm::EDGetTokenT<l1extra::L1JetParticleCollection> CaloTowerCreatorForTauHLT::mTauTrigger_token
private

label of tau trigger type analysis

Definition at line 52 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

◆ mtowers_token

const edm::EDGetTokenT<CaloTowerCollection> CaloTowerCreatorForTauHLT::mtowers_token
private

label of source collection

Definition at line 48 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

◆ mVerbose

const int CaloTowerCreatorForTauHLT::mVerbose
private

verbosity

Definition at line 46 of file CaloTowerCreatorForTauHLT.h.

Referenced by produce().

CaloTowerCreatorForTauHLT::mVerbose
const int mVerbose
verbosity
Definition: CaloTowerCreatorForTauHLT.h:46
CaloTowerCreatorForTauHLT::mCone
const double mCone
use only towers in cone mCone around L1 candidate for regional jet reco
Definition: CaloTowerCreatorForTauHLT.h:50
CaloTowerCreatorForTauHLT::mEtThreshold
const double mEtThreshold
imitator of L1 seeds
Definition: CaloTowerCreatorForTauHLT.h:56
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
CaloTowerCreatorForTauHLT::mTauTrigger_token
const edm::EDGetTokenT< l1extra::L1JetParticleCollection > mTauTrigger_token
label of tau trigger type analysis
Definition: CaloTowerCreatorForTauHLT.h:52
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
math::PtEtaPhiELorentzVector
PtEtaPhiELorentzVectorD PtEtaPhiELorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:27
edm::SortedCollection< CaloTower >
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle
Definition: AssociativeIterator.h:50
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
CaloTowerCreatorForTauHLT::mEThreshold
const double mEThreshold
E threshold.
Definition: CaloTowerCreatorForTauHLT.h:58
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:535
CaloTowerCreatorForTauHLT::mTauId
const int mTauId
Definition: CaloTowerCreatorForTauHLT.h:60
HLT_FULL_cff.cands
cands
Definition: HLT_FULL_cff.py:15146
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
eleHcalExtractorBlocks_cff.caloTowers
caloTowers
Definition: eleHcalExtractorBlocks_cff.py:15
dumpMFGeometry_cfg.delta
delta
Definition: dumpMFGeometry_cfg.py:25
CaloTower
Definition: CaloTower.h:26
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
CaloTower::et
double et(double vtxZ) const
Definition: CaloTower.h:150
electronAnalyzer_cfi.DeltaR
DeltaR
Definition: electronAnalyzer_cfi.py:33
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
reco::LeafCandidate::energy
double energy() const final
energy
Definition: LeafCandidate.h:125
edm::ParameterDescriptionNode::setComment
void setComment(std::string const &value)
Definition: ParameterDescriptionNode.cc:106
CaloTowerCreatorForTauHLT::mtowers_token
const edm::EDGetTokenT< CaloTowerCollection > mtowers_token
label of source collection
Definition: CaloTowerCreatorForTauHLT.h:48
edm::InputTag
Definition: InputTag.h:15