CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
EgammaHLTCaloTowerProducer Class Reference

#include <EgammaHLTCaloTowerProducer.h>

Inheritance diagram for EgammaHLTCaloTowerProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 EgammaHLTCaloTowerProducer (const edm::ParameterSet &)
 
 ~EgammaHLTCaloTowerProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void produce (edm::Event &e, const edm::EventSetup &) override
 

Private Attributes

double cone_
 
double EThreshold_
 
double EtThreshold_
 
edm::EDGetTokenT
< l1extra::L1EmParticleCollection
l1isoseeds_
 
edm::EDGetTokenT
< l1extra::L1EmParticleCollection
l1nonisoseeds_
 
edm::EDGetTokenT
< CaloTowerCollection
towers_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 

Detailed Description

Framework module that produces a collection of calo towers in the region of interest for Egamma HLT reconnstruction,

Author
M. Sani (UCSD)

Definition at line 24 of file EgammaHLTCaloTowerProducer.h.

Constructor & Destructor Documentation

EgammaHLTCaloTowerProducer::EgammaHLTCaloTowerProducer ( const edm::ParameterSet p)

Definition at line 27 of file EgammaHLTCaloTowerProducer.cc.

27  : towers_ (consumes<CaloTowerCollection>(p.getParameter<InputTag> ("towerCollection"))),
28  cone_ (p.getParameter<double> ("useTowersInCone")),
29  l1isoseeds_ (consumes<l1extra::L1EmParticleCollection>(p.getParameter< edm::InputTag > ("L1IsoCand"))),
30  l1nonisoseeds_ (consumes<l1extra::L1EmParticleCollection>(p.getParameter< edm::InputTag > ("L1NonIsoCand"))),
31  EtThreshold_ (p.getParameter<double> ("EtMin")),
32  EThreshold_ (p.getParameter<double> ("EMin")) {
33 
34  produces<CaloTowerCollection>();
35 }
T getParameter(std::string const &) const
edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1nonisoseeds_
edm::EDGetTokenT< CaloTowerCollection > towers_
edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1isoseeds_
EgammaHLTCaloTowerProducer::~EgammaHLTCaloTowerProducer ( )
inline

Definition at line 28 of file EgammaHLTCaloTowerProducer.h.

28 {};

Member Function Documentation

void EgammaHLTCaloTowerProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 37 of file EgammaHLTCaloTowerProducer.cc.

References edm::ConfigurationDescriptions::add(), and edm::ParameterSetDescription::add().

37  {
38 
40 
41  desc.add<edm::InputTag>(("towerCollection"), edm::InputTag("hltRecoEcalCandidate"));
42  desc.add<edm::InputTag>(("L1IsoCand"), edm::InputTag("hltTowerMakerForAll"));
43  desc.add<edm::InputTag>(("L1NonIsoCand"), edm::InputTag("fixedGridRhoFastjetAllCalo"));
44  desc.add<double>(("useTowersInCone"), 0.8);
45  desc.add<double>(("EtMin"), 1.0);
46  desc.add<double>(("EMin"), 1.0);
47  descriptions.add(("hltCaloTowerForEgamma"), desc);
48 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void EgammaHLTCaloTowerProducer::produce ( edm::Event e,
const edm::EventSetup  
)
overrideprivatevirtual

Implements edm::EDProducer.

Definition at line 51 of file EgammaHLTCaloTowerProducer.cc.

References HiRecoJets_cff::caloTowers, cone_, delta, reco::LeafCandidate::energy(), CaloTower::et(), reco::LeafCandidate::eta(), EThreshold_, EtThreshold_, lumiContext::fill, edm::Event::getByToken(), customizeTrackingMonitorSeedNumber::idx, l1isoseeds_, l1nonisoseeds_, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::phi(), edm::Event::put(), and towers_.

51  {
52 
54  evt.getByToken(towers_, caloTowers);
55 
57  evt.getByToken(l1isoseeds_, emIsolColl);
59  evt.getByToken(l1nonisoseeds_, emNonIsolColl);
60  std::auto_ptr<CaloTowerCollection> cands(new CaloTowerCollection);
61  cands->reserve(caloTowers->size());
62 
63  for (unsigned idx = 0; idx < caloTowers->size(); idx++) {
64  const CaloTower* cal = &((*caloTowers) [idx]);
65  if (cal->et() >= EtThreshold_ && cal->energy() >= EThreshold_) {
66  bool fill = false;
67  math::PtEtaPhiELorentzVector p(cal->et(), cal->eta(), cal->phi(), cal->energy());
68  for (l1extra::L1EmParticleCollection::const_iterator emItr = emIsolColl->begin(); emItr != emIsolColl->end() ;++emItr) {
69  double delta = ROOT::Math::VectorUtil::DeltaR((*emItr).p4().Vect(), p);
70  if(delta < cone_) {
71  cands->push_back(*cal);
72  fill = true;
73  break;
74  }
75  }
76 
77  if (!fill) {
78  for(l1extra::L1EmParticleCollection::const_iterator emItr = emNonIsolColl->begin(); emItr != emNonIsolColl->end() ;++emItr) {
79  double delta = ROOT::Math::VectorUtil::DeltaR((*emItr).p4().Vect(), p);
80  if(delta < cone_) {
81  cands->push_back(*cal);
82  break;
83  }
84  }
85  }
86  }
87  }
88 
89  evt.put( cands );
90 }
dbl * delta
Definition: mlp_gen.cc:36
virtual double energy() const GCC11_FINAL
energy
edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1nonisoseeds_
edm::EDGetTokenT< CaloTowerCollection > towers_
string fill
Definition: lumiContext.py:319
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1isoseeds_
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
PtEtaPhiELorentzVectorD PtEtaPhiELorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:27
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
double et(double vtxZ) const
Definition: CaloTower.h:116

Member Data Documentation

double EgammaHLTCaloTowerProducer::cone_
private

Definition at line 35 of file EgammaHLTCaloTowerProducer.h.

Referenced by produce().

double EgammaHLTCaloTowerProducer::EThreshold_
private

Definition at line 39 of file EgammaHLTCaloTowerProducer.h.

Referenced by produce().

double EgammaHLTCaloTowerProducer::EtThreshold_
private

Definition at line 38 of file EgammaHLTCaloTowerProducer.h.

Referenced by produce().

edm::EDGetTokenT<l1extra::L1EmParticleCollection> EgammaHLTCaloTowerProducer::l1isoseeds_
private

Definition at line 36 of file EgammaHLTCaloTowerProducer.h.

Referenced by produce().

edm::EDGetTokenT<l1extra::L1EmParticleCollection> EgammaHLTCaloTowerProducer::l1nonisoseeds_
private

Definition at line 37 of file EgammaHLTCaloTowerProducer.h.

Referenced by produce().

edm::EDGetTokenT<CaloTowerCollection> EgammaHLTCaloTowerProducer::towers_
private

Definition at line 34 of file EgammaHLTCaloTowerProducer.h.

Referenced by produce().