CbmRoot
Loading...
Searching...
No Matches
HalCbmTrack.cxx
Go to the documentation of this file.
1
/* Copyright (C) 2023-2023 Warsaw University of Technology, Warsaw
2
SPDX-License-Identifier: GPL-3.0-only
3
Authors: Daniel Wielanek [committer] */
4
#include "
HalCbmTrack.h
"
5
6
#include "
CbmHelix.h
"
7
#include "
HalCbmDetectorID.h
"
8
#include "
HalCbmEventInterface.h
"
9
10
#include <Hal/DataFormat.h>
11
#include <Hal/Event.h>
12
#include <Hal/ExpEvent.h>
13
#include <Hal/Track.h>
14
15
HalCbmTrack::HalCbmTrack
()
16
: fTofTrack(new
Hal
::ToFTrack())
17
, fHelix()
18
, fChi2Vertex(0)
19
, fMvdHits(0)
20
, fStsHits(0)
21
, fTrdHits(0)
22
{
23
}
24
25
Hal::DetectorTrack*
HalCbmTrack::GetDetTrack
(
const
UInt_t detID)
const
26
{
27
if
(detID ==
HalCbm::DetectorID::kTOF
) {
28
return
fTofTrack
;
29
}
30
return
nullptr
;
31
}
32
33
HalCbmTrack::HalCbmTrack
(
const
HalCbmTrack
& other) :
Hal
::ExpTrack(other)
34
{
35
fTofTrack
=
new
Hal::ToFTrack(*other.
fTofTrack
);
36
fHelix
= other.
fHelix
;
37
fChi2Vertex
= other.
fChi2Vertex
;
38
fMvdHits
= other.
fMvdHits
;
39
fStsHits
= other.
fStsHits
;
40
fTrdHits
= other.
fTrdHits
;
41
}
42
43
HalCbmTrack
&
HalCbmTrack::operator=
(
const
HalCbmTrack
& other)
44
{
45
if
(
this
== &other)
return
*
this
;
46
Hal::ExpTrack::operator=(other);
47
*
fTofTrack
= *other.
fTofTrack
;
48
fHelix
= other.
fHelix
;
49
fChi2Vertex
= other.
fChi2Vertex
;
50
fMvdHits
= other.
fMvdHits
;
51
fStsHits
= other.
fStsHits
;
52
fTrdHits
= other.
fTrdHits
;
53
return
*
this
;
54
}
55
56
void
HalCbmTrack::BuildHelix
()
57
{
58
TVector3 mom(GetPx(), GetPy(), GetPz());
59
TVector3
pos
(GetDCA().X() + GetEvent()->GetVertex()->X(), GetDCA().Y() + GetEvent()->GetVertex()->Y(),
60
GetDCA().Z() + GetEvent()->GetVertex()->Z());
61
fHelix
.
Build
(
pos
, mom, GetCharge());
62
}
63
64
HalCbmTrack::~HalCbmTrack
() {
delete
fTofTrack
; }
65
66
void
HalCbmTrack::CopyData
(Hal::Track* other)
67
{
68
Hal::ExpTrack::CopyData(other);
69
fTofTrack
= (
static_cast<
HalCbmTrack
*
>
(other))->
fTofTrack
;
70
fHelix
= (
static_cast<
HalCbmTrack
*
>
(other))->
fHelix
;
71
fChi2Vertex
= (
static_cast<
HalCbmTrack
*
>
(other))->
fChi2Vertex
;
72
fMvdHits
= (
static_cast<
HalCbmTrack
*
>
(other))->
fMvdHits
;
73
fStsHits
= (
static_cast<
HalCbmTrack
*
>
(other))->
fStsHits
;
74
fTrdHits
= (
static_cast<
HalCbmTrack
*
>
(other))->
fTrdHits
;
75
}
CbmHelix.h
pos
TVector3 pos
Definition
CbmMvdSensorDigiToHitTask.cxx:56
HalCbmDetectorID.h
HalCbmEventInterface.h
HalCbmTrack.h
CbmHelix::Build
void Build(const FairTrackParam *params)
Definition
CbmHelix.h:44
HalCbmTrack
Definition
HalCbmTrack.h:25
HalCbmTrack::~HalCbmTrack
virtual ~HalCbmTrack()
Definition
HalCbmTrack.cxx:64
HalCbmTrack::fHelix
CbmHelix fHelix
Definition
HalCbmTrack.h:27
HalCbmTrack::fChi2Vertex
Float_t fChi2Vertex
Definition
HalCbmTrack.h:28
HalCbmTrack::operator=
HalCbmTrack & operator=(const HalCbmTrack &other)
Definition
HalCbmTrack.cxx:43
HalCbmTrack::HalCbmTrack
HalCbmTrack()
Definition
HalCbmTrack.cxx:15
HalCbmTrack::fTrdHits
Int_t fTrdHits
Definition
HalCbmTrack.h:31
HalCbmTrack::GetDetTrack
virtual Hal::DetectorTrack * GetDetTrack(const UInt_t detID) const
Definition
HalCbmTrack.cxx:25
HalCbmTrack::fMvdHits
Int_t fMvdHits
Definition
HalCbmTrack.h:29
HalCbmTrack::CopyData
virtual void CopyData(Hal::Track *other)
Definition
HalCbmTrack.cxx:66
HalCbmTrack::BuildHelix
void BuildHelix()
Definition
HalCbmTrack.cxx:56
HalCbmTrack::fStsHits
Int_t fStsHits
Definition
HalCbmTrack.h:30
HalCbmTrack::fTofTrack
Hal::ToFTrack * fTofTrack
Definition
HalCbmTrack.h:26
HalCbm::DetectorID::kTOF
const UInt_t kTOF
Definition
HalCbmDetectorID.h:12
Hal
Definition
HalCbmPairSeparationCut2D.h:11
analysis
PWGC2F
femtoscopy
hal
format
anatree
reco
HalCbmTrack.cxx
Generated on Sun Dec 22 2024 23:04:05 for CbmRoot by
1.12.0