ATLAS Offline Software
BeamSpotData.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 #include <cmath>
5 
6 
7 
9 
10 namespace InDet
11 {
12 
13  BeamSpotData::BeamSpotData( int status, float posX, float posY, float posZ,
14  float sigmaX, float sigmaY, float sigmaZ,
15  float tiltX, float tiltY, float sigmaXY ) :
16  m_status { status },
17  m_errPar { sigmaX, sigmaY, sigmaZ, tiltX, tiltY, sigmaXY },
18  m_beamPos { posX, posY, posZ }
19  {
20 #ifndef SIMULATIONBASE
21  float sigmaX_tilt = std::tan(tiltX) * sigmaZ;
22  float sigmaY_tilt = std::tan(tiltY) * sigmaZ;
23  float sigmaX_all = std::sqrt(sigmaX*sigmaX + sigmaX_tilt*sigmaX_tilt);
24  float sigmaY_all = std::sqrt(sigmaY*sigmaY + sigmaY_tilt*sigmaY_tilt);
25  Amg::MatrixX beamErr(3, 3);
26  beamErr.setZero();
27  beamErr.fillSymmetric(0, 0, sigmaX_all*sigmaX_all);
28  beamErr.fillSymmetric(0, 1, sigmaXY);
29  beamErr.fillSymmetric(1, 1, sigmaY_all*sigmaY_all);
30  beamErr.fillSymmetric(0, 2, std::tan(tiltX)*sigmaZ*sigmaZ);
31  beamErr.fillSymmetric(1, 2, std::tan(tiltY)*sigmaZ*sigmaZ);
32  beamErr.fillSymmetric(2, 2, sigmaZ*sigmaZ);
33  m_vertex = Trk::RecVertex(m_beamPos, beamErr);
34 #endif
35  }
36 
37 }
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
beamspotman.sigmaZ
sigmaZ
Definition: beamspotman.py:1625
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
beamspotman.tiltY
tiltY
Definition: beamspotman.py:1627
beamspotman.tiltX
tiltX
Definition: beamspotman.py:1626
beamspotman.sigmaXY
sigmaXY
Definition: beamspotman.py:1628
beamspotman.posX
posX
Definition: beamspotman.py:1624
beamspotman.sigmaX
sigmaX
Definition: beamspotman.py:1625
beamspotman.sigmaY
sigmaY
Definition: beamspotman.py:1625
Trk::RecVertex
Trk::RecVertex inherits from Trk::Vertex.
Definition: RecVertex.h:44
beamspotman.posZ
posZ
Definition: beamspotman.py:1624
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
beamspotman.posY
posY
Definition: beamspotman.py:1624
InDet::BeamSpotData::BeamSpotData
BeamSpotData()=delete
merge.status
status
Definition: merge.py:17
BeamSpotData.h