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::EDConsumerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

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

Private Member Functions

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

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 99 of file GlobalHaloDataProducer.cc.

{}

Member Function Documentation

void GlobalHaloDataProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [override, 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 204 of file GlobalHaloDataProducer.h.

Definition at line 201 of file GlobalHaloDataProducer.h.

Definition at line 200 of file GlobalHaloDataProducer.h.

Definition at line 203 of file GlobalHaloDataProducer.h.

Definition at line 202 of file GlobalHaloDataProducer.h.

Definition at line 191 of file GlobalHaloDataProducer.h.

Definition at line 196 of file GlobalHaloDataProducer.h.

Definition at line 193 of file GlobalHaloDataProducer.h.

Definition at line 194 of file GlobalHaloDataProducer.h.

Definition at line 197 of file GlobalHaloDataProducer.h.

Definition at line 198 of file GlobalHaloDataProducer.h.

Definition at line 192 of file GlobalHaloDataProducer.h.