CMS 3D CMS Logo

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

List of all members.

Public Member Functions

 GlobalHaloDataProducer (const edm::ParameterSet &)
 ~GlobalHaloDataProducer ()

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

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().

{
  //Higher Level Reco 
  IT_met = iConfig.getParameter<edm::InputTag>("metLabel");
  IT_CaloTower = iConfig.getParameter<edm::InputTag>("calotowerLabel");
  IT_CSCSegment = iConfig.getParameter<edm::InputTag>("CSCSegmentLabel");
  IT_CSCRecHit = iConfig.getParameter<edm::InputTag>("CSCRecHitLabel");

  //Halo Data from Sub-detectors
  IT_CSCHaloData = iConfig.getParameter<edm::InputTag>("CSCHaloDataLabel");
  IT_EcalHaloData = iConfig.getParameter<edm::InputTag> ("EcalHaloDataLabel");
  IT_HcalHaloData = iConfig.getParameter<edm::InputTag> ("HcalHaloDataLabel");

  EcalMinMatchingRadius = (float)iConfig.getParameter<double>("EcalMinMatchingRadiusParam");
  EcalMaxMatchingRadius = (float)iConfig.getParameter<double>("EcalMaxMatchingRadiusParam");
  HcalMinMatchingRadius = (float)iConfig.getParameter<double>("HcalMinMatchingRadiusParam");
  HcalMaxMatchingRadius = (float)iConfig.getParameter<double>("HcalMaxMatchingRadiusParam");
  CaloTowerEtThreshold  = (float)iConfig.getParameter<double>("CaloTowerEtThresholdParam");
  
  produces<GlobalHaloData>();
}
GlobalHaloDataProducer::~GlobalHaloDataProducer ( )

Definition at line 103 of file GlobalHaloDataProducer.cc.

{}

Member Function Documentation

void GlobalHaloDataProducer::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 99 of file GlobalHaloDataProducer.cc.

{return;}
void GlobalHaloDataProducer::beginRun ( edm::Run ,
const edm::EventSetup  
) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 101 of file GlobalHaloDataProducer.cc.

{return;}
void GlobalHaloDataProducer::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 100 of file GlobalHaloDataProducer.cc.

{return;}
void GlobalHaloDataProducer::endRun ( edm::Run ,
const edm::EventSetup  
) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 102 of file GlobalHaloDataProducer.cc.

{return;}
void GlobalHaloDataProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

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().

{
  //Get CSC Geometry
  edm::ESHandle<CSCGeometry> TheCSCGeometry;
  iSetup.get<MuonGeometryRecord>().get(TheCSCGeometry);

  //Get Global Tracking Geometry
  edm::ESHandle<GlobalTrackingGeometry> TheGlobalTrackingGeometry;
  iSetup.get<GlobalTrackingGeometryRecord>().get(TheGlobalTrackingGeometry);

  //Get CaloGeometry
  edm::ESHandle<CaloGeometry> TheCaloGeometry;
  iSetup.get<CaloGeometryRecord>().get(TheCaloGeometry);

  //Get CaloTowers
  edm::Handle<edm::View<Candidate> > TheCaloTowers;
  iEvent.getByLabel(IT_CaloTower,TheCaloTowers);

  //Get MET
  edm::Handle< reco::CaloMETCollection > TheCaloMET;
  iEvent.getByLabel(IT_met, TheCaloMET);

  //Get CSCSegments
  edm::Handle<CSCSegmentCollection> TheCSCSegments;
  iEvent.getByLabel(IT_CSCSegment, TheCSCSegments);

  //Get CSCRecHits
  edm::Handle<CSCRecHit2DCollection> TheCSCRecHits;
  iEvent.getByLabel(IT_CSCRecHit, TheCSCRecHits );

  //Get CSCHaloData
  edm::Handle<reco::CSCHaloData> TheCSCHaloData;
  iEvent.getByLabel(IT_CSCHaloData, TheCSCHaloData );

  // Get EcalHaloData
  edm::Handle<reco::EcalHaloData> TheEcalHaloData;
  iEvent.getByLabel(IT_EcalHaloData, TheEcalHaloData );
  
  // Get HcalHaloData
  edm::Handle<reco::HcalHaloData> TheHcalHaloData;
  iEvent.getByLabel(IT_HcalHaloData, TheHcalHaloData );

  // Run the GlobalHaloAlgo to reconstruct the GlobalHaloData object 
  GlobalHaloAlgo GlobalAlgo;
  GlobalAlgo.SetEcalMatchingRadius(EcalMinMatchingRadius,EcalMaxMatchingRadius);
  GlobalAlgo.SetHcalMatchingRadius(HcalMinMatchingRadius,HcalMaxMatchingRadius);
  GlobalAlgo.SetCaloTowerEtThreshold(CaloTowerEtThreshold);
  //  GlobalHaloData GlobalData;

  if(TheCaloGeometry.isValid() && TheCaloMET.isValid() && TheCaloTowers.isValid() && TheCSCHaloData.isValid() && TheEcalHaloData.isValid() && TheHcalHaloData.isValid() )
    {
      std::auto_ptr<GlobalHaloData> GlobalData( new GlobalHaloData(GlobalAlgo.Calculate(*TheCaloGeometry, *TheCSCGeometry,  *(&TheCaloMET.product()->front()), TheCaloTowers, TheCSCSegments, TheCSCRecHits, *TheCSCHaloData.product(), *TheEcalHaloData.product(), *TheHcalHaloData.product() )) );
      iEvent.put(GlobalData);
    }
  else 
    {
      std::auto_ptr<GlobalHaloData> GlobalData( new GlobalHaloData() ) ;
      iEvent.put(GlobalData);
    }

  return;
}

Member Data Documentation

Definition at line 208 of file GlobalHaloDataProducer.h.

Definition at line 205 of file GlobalHaloDataProducer.h.

Definition at line 204 of file GlobalHaloDataProducer.h.

Definition at line 207 of file GlobalHaloDataProducer.h.

Definition at line 206 of file GlobalHaloDataProducer.h.

Definition at line 195 of file GlobalHaloDataProducer.h.

Definition at line 200 of file GlobalHaloDataProducer.h.

Definition at line 197 of file GlobalHaloDataProducer.h.

Definition at line 198 of file GlobalHaloDataProducer.h.

Definition at line 201 of file GlobalHaloDataProducer.h.

Definition at line 202 of file GlobalHaloDataProducer.h.

Definition at line 196 of file GlobalHaloDataProducer.h.