ATLAS Offline Software
Tracklet.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include "TMath.h" // for TMath::ATan2()
8 
9 Tracklet::Tracklet(const TrackletSegment& ML1seg, const TrackletSegment& ML2seg, const Amg::Vector3D& p,
10  const AmgSymMatrix(5) & ErrorMatrix, float charge)
11  : m_ml1seg (ML1seg),
12  m_ml2seg (ML2seg),
13  m_momentum (p),
14  m_pos (ML1seg.globalPosition()),
15  m_mdts (ML1seg.mdtHitsOnTrack()),
16  m_ErrorMatrix (ErrorMatrix),
17  m_charge (charge)
18 {
19  for (unsigned int i = 0; i < m_ml2seg.mdtHitsOnTrack().size(); ++i) m_mdts.push_back(m_ml2seg.mdtHitsOnTrack().at(i));
20 }
21 
22 Tracklet::Tracklet(const TrackletSegment& ML1seg, const Amg::Vector3D& p, const AmgSymMatrix(5) & ErrorMatrix, float charge)
23  : m_ml1seg (ML1seg),
24  m_ml2seg (ML1seg),
25  m_momentum (p),
26  m_pos (ML1seg.globalPosition()),
27  m_mdts (ML1seg.mdtHitsOnTrack()),
28  m_ErrorMatrix (ErrorMatrix),
29  m_charge (charge)
30 {
31 }
32 
33 Tracklet::~Tracklet() = default;
34 
36  m_momentum = p;
37 }
38 void Tracklet::charge(float charge) {
39  m_charge = charge;
40 }
41 
42 int Tracklet::mdtChamber() const { return m_ml1seg.mdtChamber(); }
43 int Tracklet::mdtChEta() const { return m_ml1seg.mdtChEta(); }
44 int Tracklet::mdtChPhi() const { return m_ml1seg.mdtChPhi(); }
45 const TrackletSegment& Tracklet::getML1seg() const { return m_ml1seg; }
46 const TrackletSegment& Tracklet::getML2seg() const { return m_ml2seg; }
47 const Amg::Vector3D& Tracklet::globalPosition() const { return m_pos; }
48 const Amg::Vector3D& Tracklet::momentum() const { return m_momentum; }
49 float Tracklet::alpha() const { return TMath::ATan2(m_momentum.perp(), m_momentum.z()); }
50 float Tracklet::charge() const { return m_charge; }
51 const AmgSymMatrix(5) & Tracklet::errorMatrix() const { return m_ErrorMatrix; }
52 float Tracklet::deltaAlpha() const { return (m_ml1seg.alpha() - m_ml2seg.alpha()); }
53 const std::vector<const Muon::MdtPrepData*>& Tracklet::mdtHitsOnTrack() const { return m_mdts; }
Tracklet::charge
float charge() const
Definition: Tracklet.cxx:50
Tracklet::m_charge
float m_charge
Definition: Tracklet.h:21
Tracklet::momentum
const Amg::Vector3D & momentum() const
Definition: Tracklet.cxx:48
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:50
Tracklet::m_pos
Amg::Vector3D m_pos
Definition: Tracklet.h:18
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
Tracklet::deltaAlpha
float deltaAlpha() const
TrackletSegment::mdtChamber
int mdtChamber() const
Definition: TrackletSegment.cxx:51
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Tracklet::alpha
float alpha() const
Definition: Tracklet.cxx:49
lumiFormat.i
int i
Definition: lumiFormat.py:85
TrackletSegment
New segment class for single ML segments.
Definition: TrackletSegment.h:17
Tracklet::mdtChEta
int mdtChEta() const
Definition: Tracklet.cxx:43
Tracklet::mdtChPhi
int mdtChPhi() const
Definition: Tracklet.cxx:44
Tracklet::Tracklet
Tracklet()
Definition: Tracklet.h:24
Tracklet::getML1seg
const TrackletSegment & getML1seg() const
Definition: Tracklet.cxx:45
Tracklet::mdtHitsOnTrack
const std::vector< const Muon::MdtPrepData * > & mdtHitsOnTrack() const
charge
double charge(const T &p)
Definition: AtlasPID.h:756
Tracklet::getML2seg
const TrackletSegment & getML2seg() const
Definition: Tracklet.cxx:46
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Tracklet::m_ml1seg
TrackletSegment m_ml1seg
Definition: Tracklet.h:16
Tracklet::~Tracklet
~Tracklet()
TrackletSegment::mdtHitsOnTrack
const std::vector< const Muon::MdtPrepData * > & mdtHitsOnTrack() const
Definition: TrackletSegment.cxx:61
Tracklet::m_momentum
Amg::Vector3D m_momentum
Definition: Tracklet.h:17
TrackletSegment::alpha
float alpha() const
Definition: TrackletSegment.cxx:54
Tracklet::m_ml2seg
TrackletSegment m_ml2seg
Definition: Tracklet.h:16
Tracklet::mdtChamber
int mdtChamber() const
Definition: Tracklet.cxx:42
Tracklet::globalPosition
const Amg::Vector3D & globalPosition() const
Definition: Tracklet.cxx:47
TrackletSegment::mdtChEta
int mdtChEta() const
Definition: TrackletSegment.cxx:52
TrackletSegment::mdtChPhi
int mdtChPhi() const
Definition: TrackletSegment.cxx:53
Tracklet::m_mdts
std::vector< const Muon::MdtPrepData * > m_mdts
Definition: Tracklet.h:19
Tracklet.h
LArGeo::ATan2
GeoGenfun::FunctionNoop ATan2(GeoGenfun::GENFUNCTION y, GeoGenfun::GENFUNCTION x)
Definition: BarrelAuxFunctions.cxx:50