ATLAS Offline Software
MVFVxTrackAtVertex.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  MVFVxTrackAtVertex.cxx - Description
7  -------------------
8  begin : July 2006
9  authors : Giacinto Piacquadio (Freiburg University)
10  email : giacinto.piacquadio@physik.uni-freiburg.de
11  comments:
12  changes :
13 
14  ***************************************************************************/
15 
19 #include "TrkTrack/LinkToTrack.h"
21 
22 
23 
24 namespace Trk {
25 
27  VxTrackAtVertex(),
28  m_linkToVertices(nullptr) {}
29 
30 
31  MVFVxTrackAtVertex::MVFVxTrackAtVertex(double chi2PerTrk, TrackParameters * perigeeAtVertex) :
32  VxTrackAtVertex(chi2PerTrk,perigeeAtVertex),
33  m_linkToVertices(nullptr) {}
34 
35 
36  MVFVxTrackAtVertex::MVFVxTrackAtVertex(double chi2PerTrk, TrackParameters * perigeeAtVertex,
37  double ndfPerTrk, Trk::LinearizedTrack * linState):
38  VxTrackAtVertex(chi2PerTrk,perigeeAtVertex,
39  ndfPerTrk,linState),
40  m_linkToVertices(nullptr) {}
41 
42  //new constructors, including initial perigee state (refitting support)
43  //Kirill Prokofiev 27-03-06
44  MVFVxTrackAtVertex::MVFVxTrackAtVertex(double chi2PerTrk,
45  TrackParameters* perigeeAtVertex,
46  TrackParameters* initialPerigee):
47  VxTrackAtVertex(chi2PerTrk,perigeeAtVertex,initialPerigee),
48  m_linkToVertices(nullptr) {}
49 
50 
51  MVFVxTrackAtVertex::MVFVxTrackAtVertex(double chi2PerTrk,
52  TrackParameters* perigeeAtVertex,
53  TrackParameters* initialPerigee,
54  double ndfPerTrk,
55  Trk::LinearizedTrack * linState):
56  VxTrackAtVertex(chi2PerTrk,perigeeAtVertex,
57  initialPerigee,ndfPerTrk,linState),
58  m_linkToVertices(nullptr) {}
59 
60 
62  VxTrackAtVertex(trackOrParticleLink),
63  m_linkToVertices(nullptr) {}
64 
66  TrackToVtxLink* actuallink):
67  VxTrackAtVertex(trackOrParticleLink),
68  m_linkToVertices(actuallink) {}
69 
71  const Track* track,
72  const TrackCollection* trackTES):
73  VxTrackAtVertex(),
74  m_linkToVertices(actuallink) {
75 
77  link.setElement(track);
78  LinkToTrack * linkTT = new LinkToTrack(link);
79  linkTT->setStorableObject(*trackTES);
80  this->setOrigTrack(linkTT);
81 
82  }
83 
85  const Trk::TrackParticleBase* trackparticle,
86  const Trk::TrackParticleBaseCollection* trkpartTES):
88  m_linkToVertices(actuallink) {
89 
91  link.setElement(trackparticle);
93  linkTT->setStorableObject(*trkpartTES);
94  this->setOrigTrack(linkTT);
95 
96  }
97 
98 
99 
100 //destructor changed
102  {
103  if (m_linkToVertices!=nullptr) { m_linkToVertices=nullptr; }//YOU DON'T OWN THE OBJECT: PLEASE PAY ATTENTION
104  }
105 
106 //copy constructor changed
107  MVFVxTrackAtVertex::MVFVxTrackAtVertex(const MVFVxTrackAtVertex& rhs)
108 
109  = default;
110 
111 
112 //assignement operator changed
114  {
115  if (this!=&rhs)
116  {
117  this->operator=(rhs);
118  m_linkToVertices = rhs.m_linkToVertices;//YOU DON'T OWN THE OBJECT!please pay attention here!!!
119  }
120  return *this;
121 
122  }
123 
125  m_linkToVertices=link;
126  }
127 
128  MsgStream& MVFVxTrackAtVertex::dump(MsgStream& sl) const {
129  sl << "Printing Trk::MVFVxTrackAtVertex:" << endmsg;
130  // for now just print base class
132  return sl;
133  }
134 
135  std::ostream& MVFVxTrackAtVertex::dump(std::ostream& sl) const {
136  sl << "Printing Trk::MVFVxTrackAtVertex:" << std::endl;
137  // for now just print base class
139  return sl;
140  }
141 
142 
143 } // end of namespace
LinkToTrack.h
Trk::MVFVxTrackAtVertex
Definition: MVFVxTrackAtVertex.h:31
Trk::VxTrackAtVertex
The VxTrackAtVertex is a common class for all present TrkVertexFitters The VxTrackAtVertex is designe...
Definition: VxTrackAtVertex.h:77
Trk::VxTrackAtVertex::dump
virtual MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.
Definition: VxTrackAtVertex.cxx:453
Trk::MVFVxTrackAtVertex::~MVFVxTrackAtVertex
virtual ~MVFVxTrackAtVertex()
Destructor.
Definition: MVFVxTrackAtVertex.cxx:110
Trk::MVFVxTrackAtVertex::setLinkToVertices
void setLinkToVertices(TrackToVtxLink *trk)
Set method for linkToVertices object.
Definition: MVFVxTrackAtVertex.cxx:133
xAOD::TrackParameters
TrackParameters_v1 TrackParameters
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParameters.h:11
Trk::TrackParticleBase
Definition: TrackParticleBase.h:41
Trk::MVFVxTrackAtVertex::m_linkToVertices
TrackToVtxLink * m_linkToVertices
Pointer to the TrackToVtxLink object, which contains the association of this track with all the other...
Definition: MVFVxTrackAtVertex.h:146
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Trk::LinkToTrack
AUTO - An Undocumented Tracking Object.
Definition: LinkToTrack.h:20
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::MVFVxTrackAtVertex::operator=
MVFVxTrackAtVertex & operator=(const MVFVxTrackAtVertex &)
Assignement operator.
Definition: MVFVxTrackAtVertex.cxx:122
DataVector< Trk::Track >
Trk::MVFVxTrackAtVertex::dump
virtual MsgStream & dump(MsgStream &sl) const override
Output Method for MsgStream, to be overloaded by child classes.
Definition: MVFVxTrackAtVertex.cxx:137
LinkToTrackParticleBase.h
Trk::LinkToTrackParticleBase
Definition: LinkToTrackParticleBase.h:17
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::VxTrackAtVertex::setOrigTrack
void setOrigTrack(ITrackLink *trk)
Setting up the initial track.
Definition: VxTrackAtVertex.cxx:420
Trk::MVFVxTrackAtVertex::MVFVxTrackAtVertex
MVFVxTrackAtVertex()
Default constructor.
Definition: MVFVxTrackAtVertex.cxx:35
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
LinearizedTrack.h
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
MVFVxTrackAtVertex.h
Trk::LinearizedTrack
Definition: LinearizedTrack.h:43