CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 11 of file FWBeamSpot.h.

Constructor & Destructor Documentation

FWBeamSpot::FWBeamSpot ( )
inline

Definition at line 13 of file FWBeamSpot.h.

13 : m_beamspot(nullptr) {}
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:28
FWBeamSpot::~FWBeamSpot ( )
inline

Definition at line 14 of file FWBeamSpot.h.

14 {}

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

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

Definition at line 25 of file FWBeamSpot.h.

References m_beamspot.

25 { return m_beamspot; }
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:28
double FWBeamSpot::x0 ( ) const

Definition at line 23 of file FWBeamSpot.cc.

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

Referenced by FWConvTrackHitsDetailView::build(), FWTauProxyBuilderBase::buildBaseTau(), CmsShowCommon::getEventCenter(), CmsShowCommon::resetEventCenter(), and FWRPZView::resetOrigin().

23 { return m_beamspot ? m_beamspot->x0() : 0.0; }
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:28
double x0() const
x coordinate
Definition: BeamSpot.h:61
double FWBeamSpot::x0Error ( ) const

Definition at line 29 of file FWBeamSpot.cc.

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

29 { return m_beamspot ? m_beamspot->x0Error() : 0.0; }
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:28
double x0Error() const
error on x
Definition: BeamSpot.h:86
double FWBeamSpot::y0 ( ) const

Definition at line 25 of file FWBeamSpot.cc.

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

Referenced by FWConvTrackHitsDetailView::build(), FWTauProxyBuilderBase::buildBaseTau(), CmsShowCommon::getEventCenter(), CmsShowCommon::resetEventCenter(), and FWRPZView::resetOrigin().

25 { return m_beamspot ? m_beamspot->y0() : 0.0; }
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:28
double y0() const
y coordinate
Definition: BeamSpot.h:63
double FWBeamSpot::y0Error ( ) const

Definition at line 31 of file FWBeamSpot.cc.

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

31 { return m_beamspot ? m_beamspot->y0Error() : 0.0; }
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:28
double y0Error() const
error on y
Definition: BeamSpot.h:88
double FWBeamSpot::z0 ( ) const

Definition at line 27 of file FWBeamSpot.cc.

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

Referenced by FWConvTrackHitsDetailView::build(), FWTauProxyBuilderBase::buildBaseTau(), CmsShowCommon::getEventCenter(), CmsShowCommon::resetEventCenter(), and FWRPZView::resetOrigin().

27 { return m_beamspot ? m_beamspot->z0() : 0.0; }
double z0() const
z coordinate
Definition: BeamSpot.h:65
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:28
double FWBeamSpot::z0Error ( ) const

Definition at line 33 of file FWBeamSpot.cc.

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

33 { return m_beamspot ? m_beamspot->z0Error() : 0.0; }
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:28
double z0Error() const
error on z
Definition: BeamSpot.h:90

Member Data Documentation

const reco::BeamSpot* FWBeamSpot::m_beamspot
private

Definition at line 28 of file FWBeamSpot.h.

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