CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWBeamSpot.cc
Go to the documentation of this file.
5 
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 }
29 
30 double FWBeamSpot::x0() const
31 {
32  return m_beamspot ? m_beamspot->x0() : 0.0;
33 }
34 
35 double FWBeamSpot::y0() const
36 {
37  return m_beamspot ? m_beamspot->y0() : 0.0;
38 }
39 
40 double FWBeamSpot::z0() const
41 {
42  return m_beamspot ? m_beamspot->z0() : 0.0;
43 }
44 
45 double FWBeamSpot::x0Error() const
46 {
47  return m_beamspot ? m_beamspot->x0Error() : 0.0;
48 }
49 
50 double FWBeamSpot::y0Error() const
51 {
52  return m_beamspot ? m_beamspot->y0Error() : 0.0;
53 }
54 
55 double FWBeamSpot::z0Error() const
56 {
57  return m_beamspot ? m_beamspot->z0Error() : 0.0;
58 }
double z0() const
z coordinate
Definition: BeamSpot.h:69
double z0Error() const
Definition: FWBeamSpot.cc:55
double x0() const
Definition: FWBeamSpot.cc:30
double z0() const
Definition: FWBeamSpot.cc:40
double y0() const
Definition: FWBeamSpot.cc:35
double y0Error() const
Definition: FWBeamSpot.cc:50
double x0Error() const
Definition: FWBeamSpot.cc:45
void checkBeamSpot(const edm::EventBase *event)
Definition: FWBeamSpot.cc:6
const reco::BeamSpot * m_beamspot
Definition: FWBeamSpot.h:32
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
bool isValid() const
Definition: HandleBase.h:76
double z0Error() const
error on z
Definition: BeamSpot.h:95
double x0Error() const
error on x
Definition: BeamSpot.h:91
double y0Error() const
error on y
Definition: BeamSpot.h:93
#define fwLog(_level_)
Definition: fwLog.h:51
T const * product() const
Definition: Handle.h:74
double y0() const
y coordinate
Definition: BeamSpot.h:67
double x0() const
x coordinate
Definition: BeamSpot.h:65