ARTEMIS-CRIB
 
Loading...
Searching...
No Matches
TParticleInfo.cc
Go to the documentation of this file.
1/**
2 * @file TParticleInfo.cc
3 * @brief particle information class
4 * @author Kodai Okawa <okawa@cns.s.u-tokyo.ac.jp>
5 * @date 2024-05-08 18:07:50
6 * @note last modified: 2024-08-23 21:17:03
7 * @details
8 */
9
10#include "TParticleInfo.h"
11
12#include <constant.h>
13
15
17
19 : fMassNumber(kInvalidI), fAtomicNumber(kInvalidI), fCharge(kInvalidI),
20 fEnergy(kInvalidD), fCurrentZ(kInvalidD), fTime(kInvalidD),
21 fTheta_cm(kInvalidD), fPhi_cm(kInvalidD) {
22 TDataObject::SetID(kInvalidI);
23 SetTrack(0., 0., 0., 0., 0.);
24 fVec.SetXYZT(0., 0., 0., 0.);
25}
26
28
30 : TDataObject(rhs),
31 fMassNumber(rhs.fMassNumber),
32 fAtomicNumber(rhs.fAtomicNumber),
33 fCharge(rhs.fCharge),
34 fEnergy(rhs.fEnergy),
35 fCurrentZ(rhs.fCurrentZ),
36 fTime(rhs.fTime),
37 fTrack(rhs.fTrack),
38 fVec(rhs.fVec),
39 fTheta_cm(rhs.fTheta_cm),
40 fPhi_cm(rhs.fPhi_cm) {
41}
42
44 if (this != &rhs) {
45 ((TParticleInfo &)rhs).Copy(*this);
46 }
47 return *this;
48}
49
50void TParticleInfo::Copy(TObject &dest) const {
51 TDataObject::Copy(dest);
52 TParticleInfo &cobj = *(TParticleInfo *)&dest;
53
54 cobj.fMassNumber = this->GetMassNumber();
55 cobj.fAtomicNumber = this->GetAtomicNumber();
56 cobj.fCharge = this->GetCharge();
57 cobj.fEnergy = this->GetEnergy();
58 cobj.fCurrentZ = this->GetCurrentZ();
59 cobj.fTime = this->GetDurationTime();
60 cobj.fTrack = this->GetTrack();
61 cobj.fVec = this->GetLorentzVector();
62 cobj.fTheta_cm = this->GetThetaCM();
63 cobj.fPhi_cm = this->GetPhiCM();
64}
65
66void TParticleInfo::Clear(Option_t *opt) {
67 TDataObject::Clear(opt);
68 TDataObject::SetID(kInvalidI);
69
70 fMassNumber = kInvalidI;
71 fAtomicNumber = kInvalidI;
72 fCharge = kInvalidI;
73 fEnergy = kInvalidD;
74 fCurrentZ = kInvalidD;
75 fTime = kInvalidD;
76 fTheta_cm = kInvalidD;
77 fPhi_cm = kInvalidD;
78
79 SetTrack(0., 0., 0., 0., 0.);
80 fVec.SetXYZT(0., 0., 0., 0.);
81}
ClassImp(TParticleInfo)
particle information class
void SetTrack(Double_t x, Double_t y, Double_t z, Double_t a, Double_t b)
Double_t GetCurrentZ() const
TLorentzVector GetLorentzVector() const
void Copy(TObject &dest) const override
Double_t GetThetaCM() const
Int_t GetAtomicNumber() const
Double_t GetPhiCM() const
void Clear(Option_t *opt="") override
TParticleInfo & operator=(const TParticleInfo &rhs)
Double_t GetEnergy() const
Int_t GetMassNumber() const
Double_t GetDurationTime() const
return to the guide