CMS 3D CMS Logo

Public Member Functions | Private Attributes

FWBeamSpot Class Reference

#include <FWBeamSpot.h>

List of all members.

Public Member Functions

void checkBeamSpot (const edm::EventBase *event)
 FWBeamSpot ()
const reco::BeamSpotgetBeamSpot () const
double x0 () const
double x0Error () const
double y0 () const
double y0Error () const
double z0 () const
double z0Error () const
 ~FWBeamSpot ()

Private Attributes

const reco::BeamSpotm_beamspot

Detailed Description

Definition at line 14 of file FWBeamSpot.h.


Constructor & Destructor Documentation

FWBeamSpot::FWBeamSpot ( ) [inline]

Definition at line 17 of file FWBeamSpot.h.

: m_beamspot (0) {}
FWBeamSpot::~FWBeamSpot ( ) [inline]

Definition at line 18 of file FWBeamSpot.h.

{}

Member Function Documentation

void FWBeamSpot::checkBeamSpot ( const edm::EventBase event)

Definition at line 6 of file FWBeamSpot.cc.

References fwLog, edm::HandleBase::isValid(), fwlog::kWarning, m_beamspot, edm::Handle< T >::product(), and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by CmsShowMainBase::draw().

{ 
   try
   {
      edm::InputTag tag("offlineBeamSpot");
      edm::Handle<reco::BeamSpot> spot;

      event->getByLabel(tag, spot);
      if (spot.isValid())
      {
         m_beamspot = spot.product();
      }
      else
      {
         m_beamspot = 0;
      }
   }
   catch (cms::Exception& iException)
   {
      fwLog(fwlog::kWarning) <<"Can't get beam spot info. Setting coordintes to (0, 0, 0).\n";
      m_beamspot = 0;
   }
}
const reco::BeamSpot* FWBeamSpot::getBeamSpot ( ) const [inline]

Definition at line 29 of file FWBeamSpot.h.

References m_beamspot.

{ return m_beamspot; }
double FWBeamSpot::x0 ( ) const

Definition at line 30 of file FWBeamSpot.cc.

References m_beamspot, and reco::BeamSpot::x0().

Referenced by FWConvTrackHitsDetailView::build(), FWRPZView::eventBegin(), and FWRPZView::resetOrigin().

{
   return m_beamspot ? m_beamspot->x0() : 0.0;
}
double FWBeamSpot::x0Error ( ) const

Definition at line 45 of file FWBeamSpot.cc.

References m_beamspot, and reco::BeamSpot::x0Error().

{
   return m_beamspot ? m_beamspot->x0Error() : 0.0;
}
double FWBeamSpot::y0 ( ) const

Definition at line 35 of file FWBeamSpot.cc.

References m_beamspot, and reco::BeamSpot::y0().

Referenced by FWConvTrackHitsDetailView::build(), FWRPZView::eventBegin(), and FWRPZView::resetOrigin().

{
   return m_beamspot ? m_beamspot->y0() : 0.0;
}
double FWBeamSpot::y0Error ( ) const

Definition at line 50 of file FWBeamSpot.cc.

References m_beamspot, and reco::BeamSpot::y0Error().

{
   return m_beamspot ? m_beamspot->y0Error() : 0.0;
}
double FWBeamSpot::z0 ( ) const

Definition at line 40 of file FWBeamSpot.cc.

References m_beamspot, and reco::BeamSpot::z0().

Referenced by FWConvTrackHitsDetailView::build(), FWRPZView::eventBegin(), and FWRPZView::resetOrigin().

{
   return m_beamspot ? m_beamspot->z0() : 0.0;
}
double FWBeamSpot::z0Error ( ) const

Definition at line 55 of file FWBeamSpot.cc.

References m_beamspot, and reco::BeamSpot::z0Error().

{
   return m_beamspot ? m_beamspot->z0Error() : 0.0;
}

Member Data Documentation

Definition at line 32 of file FWBeamSpot.h.

Referenced by checkBeamSpot(), getBeamSpot(), x0(), x0Error(), y0(), y0Error(), z0(), and z0Error().