CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
FWBeamSpot Class Reference

#include <FWBeamSpot.h>

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.

17 : m_beamspot (0) {}
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:32
FWBeamSpot::~FWBeamSpot ( )
inline

Definition at line 18 of file FWBeamSpot.h.

18 {}

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

7 {
8  try
9  {
10  edm::InputTag tag("offlineBeamSpot");
12 
13  event->getByLabel(tag, spot);
14  if (spot.isValid())
15  {
16  m_beamspot = spot.product();
17  }
18  else
19  {
20  m_beamspot = 0;
21  }
22  }
23  catch (cms::Exception& iException)
24  {
25  fwLog(fwlog::kWarning) <<"Can't get beam spot info. Setting coordintes to (0, 0, 0).\n";
26  m_beamspot = 0;
27  }
28 }
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:32
bool isValid() const
Definition: HandleBase.h:75
T const * product() const
Definition: Handle.h:81
#define fwLog(_level_)
Definition: fwLog.h:50
const reco::BeamSpot* FWBeamSpot::getBeamSpot ( ) const
inline

Definition at line 29 of file FWBeamSpot.h.

29 { return m_beamspot; }
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:32
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().

31 {
32  return m_beamspot ? m_beamspot->x0() : 0.0;
33 }
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:32
double x0() const
x coordinate
Definition: BeamSpot.h:64
double FWBeamSpot::x0Error ( ) const

Definition at line 45 of file FWBeamSpot.cc.

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

46 {
47  return m_beamspot ? m_beamspot->x0Error() : 0.0;
48 }
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:32
double x0Error() const
error on x
Definition: BeamSpot.h:90
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().

36 {
37  return m_beamspot ? m_beamspot->y0() : 0.0;
38 }
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:32
double y0() const
y coordinate
Definition: BeamSpot.h:66
double FWBeamSpot::y0Error ( ) const

Definition at line 50 of file FWBeamSpot.cc.

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

51 {
52  return m_beamspot ? m_beamspot->y0Error() : 0.0;
53 }
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:32
double y0Error() const
error on y
Definition: BeamSpot.h:92
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().

41 {
42  return m_beamspot ? m_beamspot->z0() : 0.0;
43 }
double z0() const
z coordinate
Definition: BeamSpot.h:68
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:32
double FWBeamSpot::z0Error ( ) const

Definition at line 55 of file FWBeamSpot.cc.

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

56 {
57  return m_beamspot ? m_beamspot->z0Error() : 0.0;
58 }
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:32
double z0Error() const
error on z
Definition: BeamSpot.h:94

Member Data Documentation

const reco::BeamSpot* FWBeamSpot::m_beamspot
private

Definition at line 32 of file FWBeamSpot.h.

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