CMS 3D CMS Logo

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

#include <RecoEgamma/EgammaHLTProducers/interface/EgammaHLTEcalIsolationProducersRegional.h>

Inheritance diagram for EgammaHLTEcalIsolationProducersRegional:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 EgammaHLTEcalIsolationProducersRegional (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~EgammaHLTEcalIsolationProducersRegional ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

int algoType_
 
edm::InputTag bcBarrelProducer_
 
edm::InputTag bcEndcapProducer_
 
edm::ParameterSet conf_
 
double egEcalIsoConeSize_
 
double egEcalIsoEtMin_
 
edm::InputTag recoEcalCandidateProducer_
 
edm::InputTag scIslandBarrelProducer_
 
edm::InputTag scIslandEndcapProducer_
 
EgammaHLTEcalIsolationtest_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Author
Monica Vazquez Acosta (CERN)

$Id:

Definition at line 39 of file EgammaHLTEcalIsolationProducersRegional.h.

Constructor & Destructor Documentation

EgammaHLTEcalIsolationProducersRegional::EgammaHLTEcalIsolationProducersRegional ( const edm::ParameterSet config)
explicit

Definition at line 41 of file EgammaHLTEcalIsolationProducersRegional.cc.

References algoType_, bcBarrelProducer_, bcEndcapProducer_, conf_, egEcalIsoConeSize_, egEcalIsoEtMin_, edm::ParameterSet::getParameter(), recoEcalCandidateProducer_, scIslandBarrelProducer_, scIslandEndcapProducer_, and test_.

41  : conf_(config)
42 {
43 
44  // use configuration file to setup input/output collection names
45 
46  bcBarrelProducer_ = conf_.getParameter<edm::InputTag>("bcBarrelProducer");
47  bcEndcapProducer_ = conf_.getParameter<edm::InputTag>("bcEndcapProducer");
48 
49  scIslandBarrelProducer_ = conf_.getParameter<edm::InputTag>("scIslandBarrelProducer");
50  scIslandEndcapProducer_ = conf_.getParameter<edm::InputTag>("scIslandEndcapProducer");
51 
52  recoEcalCandidateProducer_ = conf_.getParameter<edm::InputTag>("recoEcalCandidateProducer");
53 
54  egEcalIsoEtMin_ = conf_.getParameter<double>("egEcalIsoEtMin");
55  egEcalIsoConeSize_ = conf_.getParameter<double>("egEcalIsoConeSize");
56  algoType_ = conf_.getParameter<int>("SCAlgoType");
57  test_ = new EgammaHLTEcalIsolation(egEcalIsoEtMin_,egEcalIsoConeSize_,algoType_);
58 
59 
60  //register your products
61  produces < reco::RecoEcalCandidateIsolationMap >();
62 }
T getParameter(std::string const &) const
EgammaHLTEcalIsolationProducersRegional::~EgammaHLTEcalIsolationProducersRegional ( )

Definition at line 64 of file EgammaHLTEcalIsolationProducersRegional.cc.

References test_.

Member Function Documentation

void EgammaHLTEcalIsolationProducersRegional::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDProducer.

Definition at line 68 of file EgammaHLTEcalIsolationProducersRegional.cc.

References bcBarrelProducer_, bcEndcapProducer_, begin, edm::Event::getByLabel(), edm::AssociationMap< Tag >::insert(), EgammaHLTEcalIsolation::isolPtSum(), edm::Handle< T >::product(), edm::Event::put(), recoEcalCandidateProducer_, scIslandBarrelProducer_, scIslandEndcapProducer_, and test_.

68  {
69 
70  // Get the basic cluster collection in the Barrel
72  iEvent.getByLabel(bcBarrelProducer_, bcBarrelHandle);
73  const reco::BasicClusterCollection* clusterBarrelCollection = bcBarrelHandle.product();
74  // Get the basic cluster collection in the endcap
76  iEvent.getByLabel(bcEndcapProducer_, bcEndcapHandle);
77  const reco::BasicClusterCollection* clusterEndcapCollection = (bcEndcapHandle.product());
78  // Get the Barrel Super Cluster collection
80  iEvent.getByLabel(scIslandBarrelProducer_,scBarrelHandle);
81  const reco::SuperClusterCollection* scBarrelCollection = (scBarrelHandle.product());
82  // Get the Endcap Super Cluster collection
84  iEvent.getByLabel(scIslandEndcapProducer_,scEndcapHandle);
85  const reco::SuperClusterCollection* scEndcapCollection = (scEndcapHandle.product());
86  // Get the RecoEcalCandidate Collection
88  iEvent.getByLabel(recoEcalCandidateProducer_,recoecalcandHandle);
89 
90  std::vector<const reco::BasicCluster*> clusterCollection;
91  for (reco::BasicClusterCollection::const_iterator ibc = clusterBarrelCollection->begin();
92  ibc < clusterBarrelCollection->end(); ibc++ ){clusterCollection.push_back(&(*ibc));}
93  for (reco::BasicClusterCollection::const_iterator iec = clusterEndcapCollection->begin();
94  iec < clusterEndcapCollection->end(); iec++ ){clusterCollection.push_back(&(*iec));}
95  std::vector<const reco::SuperCluster*> scCollection;
96  for (reco::SuperClusterCollection::const_iterator ibsc = scBarrelCollection->begin();
97  ibsc < scBarrelCollection->end(); ibsc++ ){scCollection.push_back(&(*ibsc));}
98  for (reco::SuperClusterCollection::const_iterator iesc = scEndcapCollection->begin();
99  iesc < scEndcapCollection->end(); iesc++ ){scCollection.push_back(&(*iesc));}
100 
102 
103 
104 
105  for (reco::RecoEcalCandidateCollection::const_iterator iRecoEcalCand= recoecalcandHandle->begin(); iRecoEcalCand!=recoecalcandHandle->end(); iRecoEcalCand++) {
106 
107 
108  reco::RecoEcalCandidateRef recoecalcandref(reco::RecoEcalCandidateRef(recoecalcandHandle,iRecoEcalCand -recoecalcandHandle ->begin()));
109 
110 
111  const reco::RecoCandidate *tempiRecoEcalCand = &(*recoecalcandref);
112  float isol = test_->isolPtSum(tempiRecoEcalCand,scCollection, clusterCollection);
113 
114  isoMap.insert(recoecalcandref, isol);
115 
116  }
117 
118  std::auto_ptr<reco::RecoEcalCandidateIsolationMap> isolMap(new reco::RecoEcalCandidateIsolationMap(isoMap));
119  iEvent.put(isolMap);
120 
121 }
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
void insert(const key_type &k, const data_type &v)
insert an association
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
T const * product() const
Definition: Handle.h:74
#define begin
Definition: vmac.h:31
float isolPtSum(const reco::RecoCandidate *recocandidate, const std::vector< const reco::SuperCluster * > sclusters, const std::vector< const reco::BasicCluster * > bclusters)

Member Data Documentation

int EgammaHLTEcalIsolationProducersRegional::algoType_
private
edm::InputTag EgammaHLTEcalIsolationProducersRegional::bcBarrelProducer_
private
edm::InputTag EgammaHLTEcalIsolationProducersRegional::bcEndcapProducer_
private
edm::ParameterSet EgammaHLTEcalIsolationProducersRegional::conf_
private
double EgammaHLTEcalIsolationProducersRegional::egEcalIsoConeSize_
private
double EgammaHLTEcalIsolationProducersRegional::egEcalIsoEtMin_
private
edm::InputTag EgammaHLTEcalIsolationProducersRegional::recoEcalCandidateProducer_
private
edm::InputTag EgammaHLTEcalIsolationProducersRegional::scIslandBarrelProducer_
private
edm::InputTag EgammaHLTEcalIsolationProducersRegional::scIslandEndcapProducer_
private
EgammaHLTEcalIsolation* EgammaHLTEcalIsolationProducersRegional::test_
private