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 Member Functions | Private Attributes
reco::GlobalHaloDataProducer Class Reference

#include <GlobalHaloDataProducer.h>

Inheritance diagram for reco::GlobalHaloDataProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 GlobalHaloDataProducer (const edm::ParameterSet &)
 
 ~GlobalHaloDataProducer ()
 
- 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 Member Functions

virtual void beginJob ()
 
virtual void beginRun (edm::Run &, const edm::EventSetup &)
 
virtual void endJob ()
 
virtual void endRun (edm::Run &, const edm::EventSetup &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 

Private Attributes

float CaloTowerEtThreshold
 
float EcalMaxMatchingRadius
 
float EcalMinMatchingRadius
 
float HcalMaxMatchingRadius
 
float HcalMinMatchingRadius
 
edm::InputTag IT_CaloTower
 
edm::InputTag IT_CSCHaloData
 
edm::InputTag IT_CSCRecHit
 
edm::InputTag IT_CSCSegment
 
edm::InputTag IT_EcalHaloData
 
edm::InputTag IT_HcalHaloData
 
edm::InputTag IT_met
 

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

Definition at line 181 of file GlobalHaloDataProducer.h.

Constructor & Destructor Documentation

GlobalHaloDataProducer::GlobalHaloDataProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 14 of file GlobalHaloDataProducer.cc.

References edm::ParameterSet::getParameter().

15 {
16  //Higher Level Reco
17  IT_met = iConfig.getParameter<edm::InputTag>("metLabel");
18  IT_CaloTower = iConfig.getParameter<edm::InputTag>("calotowerLabel");
19  IT_CSCSegment = iConfig.getParameter<edm::InputTag>("CSCSegmentLabel");
20  IT_CSCRecHit = iConfig.getParameter<edm::InputTag>("CSCRecHitLabel");
21 
22  //Halo Data from Sub-detectors
23  IT_CSCHaloData = iConfig.getParameter<edm::InputTag>("CSCHaloDataLabel");
24  IT_EcalHaloData = iConfig.getParameter<edm::InputTag> ("EcalHaloDataLabel");
25  IT_HcalHaloData = iConfig.getParameter<edm::InputTag> ("HcalHaloDataLabel");
26 
27  EcalMinMatchingRadius = (float)iConfig.getParameter<double>("EcalMinMatchingRadiusParam");
28  EcalMaxMatchingRadius = (float)iConfig.getParameter<double>("EcalMaxMatchingRadiusParam");
29  HcalMinMatchingRadius = (float)iConfig.getParameter<double>("HcalMinMatchingRadiusParam");
30  HcalMaxMatchingRadius = (float)iConfig.getParameter<double>("HcalMaxMatchingRadiusParam");
31  CaloTowerEtThreshold = (float)iConfig.getParameter<double>("CaloTowerEtThresholdParam");
32 
33  produces<GlobalHaloData>();
34 }
T getParameter(std::string const &) const
GlobalHaloDataProducer::~GlobalHaloDataProducer ( )

Definition at line 103 of file GlobalHaloDataProducer.cc.

103 {}

Member Function Documentation

void GlobalHaloDataProducer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 99 of file GlobalHaloDataProducer.cc.

99 {return;}
void GlobalHaloDataProducer::beginRun ( edm::Run ,
const edm::EventSetup  
)
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 101 of file GlobalHaloDataProducer.cc.

101 {return;}
void GlobalHaloDataProducer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 100 of file GlobalHaloDataProducer.cc.

100 {return;}
void GlobalHaloDataProducer::endRun ( edm::Run ,
const edm::EventSetup  
)
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 102 of file GlobalHaloDataProducer.cc.

102 {return;}
void GlobalHaloDataProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDProducer.

Definition at line 36 of file GlobalHaloDataProducer.cc.

References GlobalHaloAlgo::Calculate(), edm::EventSetup::get(), edm::Event::getByLabel(), GlobalHaloData_cfi::GlobalHaloData, edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), edm::Handle< T >::product(), edm::Event::put(), GlobalHaloAlgo::SetCaloTowerEtThreshold(), GlobalHaloAlgo::SetEcalMatchingRadius(), and GlobalHaloAlgo::SetHcalMatchingRadius().

37 {
38  //Get CSC Geometry
39  edm::ESHandle<CSCGeometry> TheCSCGeometry;
40  iSetup.get<MuonGeometryRecord>().get(TheCSCGeometry);
41 
42  //Get Global Tracking Geometry
43  edm::ESHandle<GlobalTrackingGeometry> TheGlobalTrackingGeometry;
44  iSetup.get<GlobalTrackingGeometryRecord>().get(TheGlobalTrackingGeometry);
45 
46  //Get CaloGeometry
47  edm::ESHandle<CaloGeometry> TheCaloGeometry;
48  iSetup.get<CaloGeometryRecord>().get(TheCaloGeometry);
49 
50  //Get CaloTowers
51  edm::Handle<edm::View<Candidate> > TheCaloTowers;
52  iEvent.getByLabel(IT_CaloTower,TheCaloTowers);
53 
54  //Get MET
56  iEvent.getByLabel(IT_met, TheCaloMET);
57 
58  //Get CSCSegments
59  edm::Handle<CSCSegmentCollection> TheCSCSegments;
60  iEvent.getByLabel(IT_CSCSegment, TheCSCSegments);
61 
62  //Get CSCRecHits
64  iEvent.getByLabel(IT_CSCRecHit, TheCSCRecHits );
65 
66  //Get CSCHaloData
67  edm::Handle<reco::CSCHaloData> TheCSCHaloData;
68  iEvent.getByLabel(IT_CSCHaloData, TheCSCHaloData );
69 
70  // Get EcalHaloData
71  edm::Handle<reco::EcalHaloData> TheEcalHaloData;
72  iEvent.getByLabel(IT_EcalHaloData, TheEcalHaloData );
73 
74  // Get HcalHaloData
75  edm::Handle<reco::HcalHaloData> TheHcalHaloData;
76  iEvent.getByLabel(IT_HcalHaloData, TheHcalHaloData );
77 
78  // Run the GlobalHaloAlgo to reconstruct the GlobalHaloData object
79  GlobalHaloAlgo GlobalAlgo;
83  // GlobalHaloData GlobalData;
84 
85  if(TheCaloGeometry.isValid() && TheCaloMET.isValid() && TheCaloTowers.isValid() && TheCSCHaloData.isValid() && TheEcalHaloData.isValid() && TheHcalHaloData.isValid() )
86  {
87  std::auto_ptr<GlobalHaloData> GlobalData( new GlobalHaloData(GlobalAlgo.Calculate(*TheCaloGeometry, *TheCSCGeometry, *(&TheCaloMET.product()->front()), TheCaloTowers, TheCSCSegments, TheCSCRecHits, *TheCSCHaloData.product(), *TheEcalHaloData.product(), *TheHcalHaloData.product() )) );
88  iEvent.put(GlobalData);
89  }
90  else
91  {
92  std::auto_ptr<GlobalHaloData> GlobalData( new GlobalHaloData() ) ;
93  iEvent.put(GlobalData);
94  }
95 
96  return;
97 }
reco::GlobalHaloData Calculate(const CaloGeometry &TheCaloGeometry, const CSCGeometry &TheCSCGeometry, const reco::CaloMET &TheCaloMET, edm::Handle< edm::View< reco::Candidate > > &TheCaloTowers, edm::Handle< CSCSegmentCollection > &TheCSCSegments, edm::Handle< CSCRecHit2DCollection > &TheCSCRecHits, const reco::CSCHaloData &TheCSCHaloData, const reco::EcalHaloData &TheEcalHaloData, const reco::HcalHaloData &TheHcalHaloData)
void SetHcalMatchingRadius(float min, float max)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
void SetEcalMatchingRadius(float min, float max)
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: Handle.h:74
void SetCaloTowerEtThreshold(float EtMin)
bool isValid() const
Definition: ESHandle.h:37

Member Data Documentation

float reco::GlobalHaloDataProducer::CaloTowerEtThreshold
private

Definition at line 208 of file GlobalHaloDataProducer.h.

float reco::GlobalHaloDataProducer::EcalMaxMatchingRadius
private

Definition at line 205 of file GlobalHaloDataProducer.h.

float reco::GlobalHaloDataProducer::EcalMinMatchingRadius
private

Definition at line 204 of file GlobalHaloDataProducer.h.

float reco::GlobalHaloDataProducer::HcalMaxMatchingRadius
private

Definition at line 207 of file GlobalHaloDataProducer.h.

float reco::GlobalHaloDataProducer::HcalMinMatchingRadius
private

Definition at line 206 of file GlobalHaloDataProducer.h.

edm::InputTag reco::GlobalHaloDataProducer::IT_CaloTower
private

Definition at line 195 of file GlobalHaloDataProducer.h.

edm::InputTag reco::GlobalHaloDataProducer::IT_CSCHaloData
private

Definition at line 200 of file GlobalHaloDataProducer.h.

edm::InputTag reco::GlobalHaloDataProducer::IT_CSCRecHit
private

Definition at line 197 of file GlobalHaloDataProducer.h.

edm::InputTag reco::GlobalHaloDataProducer::IT_CSCSegment
private

Definition at line 198 of file GlobalHaloDataProducer.h.

edm::InputTag reco::GlobalHaloDataProducer::IT_EcalHaloData
private

Definition at line 201 of file GlobalHaloDataProducer.h.

edm::InputTag reco::GlobalHaloDataProducer::IT_HcalHaloData
private

Definition at line 202 of file GlobalHaloDataProducer.h.

edm::InputTag reco::GlobalHaloDataProducer::IT_met
private

Definition at line 196 of file GlobalHaloDataProducer.h.