KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVSource.cpp
1#include "KVSource.h"
2
4
5
6
12
13void KVSource::init()
14{
15 // Initialisation called by ctor.
16 // Set up correspondance between variable names and index.
17 //
18 // Also calls SetDefineGroup(): by default, each particle attributed to the source
19 // is added to a group with the same name as this variable.
20
21 SetDefineGroup();
22 SetNameIndex("Ex", 0);
23 SetNameIndex("Z", 1);
24 SetNameIndex("A", 2);
25 SetNameIndex("Vz", 3);
26 SetNameIndex("Vx", 4);
27 SetNameIndex("Vy", 5);
28 SetNameIndex("Theta", 6);
29 SetNameIndex("Mult", 7);
30 fMult = 0;
31}
32
33
34
50
52{
53// returns the i-th value
54//
55// Index Meaning
56//--------------------------------------
57// 0 E*
58// 1 Zsource
59// 2 Asource
60// 3 Vz
61// 4 Vx
62// 5 Vy
63// 6 Theta
64// 7 Mult
65//
66//
67 Double_t rval = 0;
68 switch (i) {
69 case 0:
71 break;
72
73 case 1:
74 rval = GetSumObject().GetZ();
75 break;
76
77 case 2:
78 rval = GetSumObject().GetA();
79 break;
80
81 case 3:
82 rval = GetSumObject().GetV().Z();
83 break;
84
85 case 4:
86 rval = GetSumObject().GetV().X();
87 break;
88
89 case 5:
90 rval = GetSumObject().GetV().Y();
91 break;
92
93 case 6:
94 rval = GetSumObject().GetTheta();
95 break;
96
97 case 7:
98 rval = fMult;
99 break;
100
101 default :
102 rval = 0.;
103 break;
104 }
105 return rval;
106}
107
108
109
113
115{
116 // Returns 'D' for all floating-point values,
117 // returns 'I' for source Z and A and Mult
118 static Char_t val_type = 'I';
119 if ((i > 0 && i < 3) || (i == 7)) return val_type;
120 return KVVarGlob::GetValueType(i);
121}
122
123
int Int_t
char Char_t
double Double_t
Double_t GetExcitEnergy() const
Definition KVNucleus.h:283
Int_t GetA() const
Int_t GetZ() const
Return the number of proton / atomic number.
Double_t GetTheta() const
Definition KVParticle.h:680
TVector3 GetV() const
Definition KVParticle.h:671
Simple source reconstruction global variable.
Definition KVSource.h:49
Double_t getvalue_int(Int_t i) const
Definition KVSource.cpp:51
Char_t GetValueType(Int_t) const
Definition KVSource.cpp:114
Int_t fMult
source multiplicity
Definition KVSource.h:50
const KVNucleus & GetSumObject() const
virtual Char_t GetValueType(Int_t) const
Definition KVVarGlob.h:668
Double_t Z() const
Double_t Y() const
Double_t X() const
ClassImp(TPyArg)