Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
Fireworks
Core
src
FWBeamSpot.cc
Go to the documentation of this file.
1
#include "
Fireworks/Core/interface/FWBeamSpot.h
"
2
#include "
DataFormats/BeamSpot/interface/BeamSpot.h
"
3
#include "
FWCore/Common/interface/EventBase.h
"
4
#include "
Fireworks/Core/interface/fwLog.h
"
5
6
void
FWBeamSpot::checkBeamSpot
(
const
edm::EventBase
*
event
) {
7
try
{
8
edm::InputTag
tag
(
"offlineBeamSpot"
);
9
edm::Handle<reco::BeamSpot>
spot;
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
}
22
23
double
FWBeamSpot::x0
()
const
{
return
m_beamspot
?
m_beamspot
->
x0
() : 0.0; }
24
25
double
FWBeamSpot::y0
()
const
{
return
m_beamspot
?
m_beamspot
->
y0
() : 0.0; }
26
27
double
FWBeamSpot::z0
()
const
{
return
m_beamspot
?
m_beamspot
->
z0
() : 0.0; }
28
29
double
FWBeamSpot::x0Error
()
const
{
return
m_beamspot
?
m_beamspot
->
x0Error
() : 0.0; }
30
31
double
FWBeamSpot::y0Error
()
const
{
return
m_beamspot
?
m_beamspot
->
y0Error
() : 0.0; }
32
33
double
FWBeamSpot::z0Error
()
const
{
return
m_beamspot
?
m_beamspot
->
z0Error
() : 0.0; }
reco::BeamSpot::z0
double z0() const
z coordinate
Definition:
BeamSpot.h:65
FWBeamSpot::z0Error
double z0Error() const
Definition:
FWBeamSpot.cc:33
edmPickEvents.event
tuple event
Definition:
edmPickEvents.py:273
FWBeamSpot::x0
double x0() const
Definition:
FWBeamSpot.cc:23
FWBeamSpot::z0
double z0() const
Definition:
FWBeamSpot.cc:27
FWBeamSpot::y0
double y0() const
Definition:
FWBeamSpot.cc:25
edm::Handle< reco::BeamSpot >
EventBase.h
FWBeamSpot::y0Error
double y0Error() const
Definition:
FWBeamSpot.cc:31
FWBeamSpot.h
FWBeamSpot::x0Error
double x0Error() const
Definition:
FWBeamSpot.cc:29
FWBeamSpot::checkBeamSpot
void checkBeamSpot(const edm::EventBase *event)
Definition:
FWBeamSpot.cc:6
GlobalPosition_Frontier_DevDB_cff.tag
tuple tag
Definition:
GlobalPosition_Frontier_DevDB_cff.py:11
FWBeamSpot::m_beamspot
const reco::BeamSpot * m_beamspot
Definition:
FWBeamSpot.h:28
edm::HandleBase::isValid
bool isValid() const
Definition:
HandleBase.h:70
reco::BeamSpot::z0Error
double z0Error() const
error on z
Definition:
BeamSpot.h:90
edm::EventBase
Definition:
EventBase.h:46
reco::BeamSpot::x0Error
double x0Error() const
error on x
Definition:
BeamSpot.h:86
reco::BeamSpot::y0Error
double y0Error() const
error on y
Definition:
BeamSpot.h:88
edm::Handle::product
T const * product() const
Definition:
Handle.h:70
fwLog
#define fwLog(_level_)
Definition:
fwLog.h:45
cms::Exception
Definition:
Exception.h:70
edm::InputTag
Definition:
InputTag.h:15
fwLog.h
BeamSpot.h
reco::BeamSpot::y0
double y0() const
y coordinate
Definition:
BeamSpot.h:63
fwlog::kWarning
Definition:
fwLog.h:35
reco::BeamSpot::x0
double x0() const
x coordinate
Definition:
BeamSpot.h:61
Generated for CMSSW Reference Manual by
1.8.5