test
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 | Public Attributes
EgammaHLTCaloTowerProducer Class Reference

#include <EgammaHLTCaloTowerProducer.h>

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

Public Member Functions

 EgammaHLTCaloTowerProducer (const edm::ParameterSet &)
 
void produce (edm::StreamID, edm::Event &, edm::EventSetup const &) const overridefinal
 
 ~EgammaHLTCaloTowerProducer ()
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 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
std::vector< ConsumesInfoconsumesInfo () const
 
 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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) 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::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Public Attributes

const double cone_
 
const double EThreshold_
 
const double EtThreshold_
 
const edm::EDGetTokenT
< edm::View< reco::Candidate > > 
l1isoseeds_
 
const edm::EDGetTokenT
< edm::View< reco::Candidate > > 
l1nonisoseeds_
 
const edm::EDGetTokenT
< CaloTowerCollection
towers_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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")),
31  EtThreshold_ (p.getParameter<double> ("EtMin")),
32  EThreshold_ (p.getParameter<double> ("EMin")) {
33 
34  produces<CaloTowerCollection>();
35 }
T getParameter(std::string const &) const
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const edm::EDGetTokenT< CaloTowerCollection > towers_
const edm::EDGetTokenT< edm::View< reco::Candidate > > l1isoseeds_
const edm::EDGetTokenT< edm::View< reco::Candidate > > l1nonisoseeds_
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::StreamID  ,
edm::Event evt,
edm::EventSetup const &   
) const
finaloverridevirtual

Implements edm::global::EDProducerBase.

Definition at line 51 of file EgammaHLTCaloTowerProducer.cc.

References HLT_25ns10e33_v2_cff::caloTowers, cone_, delta, HLT_25ns10e33_v2_cff::DeltaR, 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_.

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 (edm::View<reco::Candidate>::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(edm::View<reco::Candidate>::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
string fill
Definition: lumiContext.py:319
virtual double energy() const final
energy
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
virtual double phi() const final
momentum azimuthal angle
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
PtEtaPhiELorentzVectorD PtEtaPhiELorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:27
const edm::EDGetTokenT< CaloTowerCollection > towers_
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
const edm::EDGetTokenT< edm::View< reco::Candidate > > l1isoseeds_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
const edm::EDGetTokenT< edm::View< reco::Candidate > > l1nonisoseeds_
double et(double vtxZ) const
Definition: CaloTower.h:129
virtual double eta() const final
momentum pseudorapidity

Member Data Documentation

const double EgammaHLTCaloTowerProducer::cone_

Definition at line 33 of file EgammaHLTCaloTowerProducer.h.

Referenced by produce().

const double EgammaHLTCaloTowerProducer::EThreshold_

Definition at line 37 of file EgammaHLTCaloTowerProducer.h.

Referenced by produce().

const double EgammaHLTCaloTowerProducer::EtThreshold_

Definition at line 36 of file EgammaHLTCaloTowerProducer.h.

Referenced by produce().

const edm::EDGetTokenT<edm::View<reco::Candidate> > EgammaHLTCaloTowerProducer::l1isoseeds_

Definition at line 34 of file EgammaHLTCaloTowerProducer.h.

Referenced by produce().

const edm::EDGetTokenT<edm::View<reco::Candidate> > EgammaHLTCaloTowerProducer::l1nonisoseeds_

Definition at line 35 of file EgammaHLTCaloTowerProducer.h.

Referenced by produce().

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

Definition at line 32 of file EgammaHLTCaloTowerProducer.h.

Referenced by produce().