KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVSource.cpp
Go to the documentation of this file.
1 #include "KVSource.h"
2 
4 
5 
6 
10 void KVSource::init()
11 {
12  // Initialisation called by ctor.
13  // Set up correspondance between variable names and index.
14 
15  SetNameIndex("Ex", 0);
16  SetNameIndex("Z", 1);
17  SetNameIndex("A", 2);
18  SetNameIndex("Vz", 3);
19  SetNameIndex("Vx", 4);
20  SetNameIndex("Vy", 5);
21  SetNameIndex("Theta", 6);
22  SetNameIndex("Mult", 7);
23  fMult = 0;
24 }
25 
26 
27 
43 
45 {
46 // returns the i-th value
47 //
48 // Index Meaning
49 //--------------------------------------
50 // 0 E*
51 // 1 Zsource
52 // 2 Asource
53 // 3 Vz
54 // 4 Vx
55 // 5 Vy
56 // 6 Theta
57 // 7 Mult
58 //
59 //
60  Double_t rval = 0;
61  switch (i) {
62  case 0:
63  rval = GetSumObject().GetExcitEnergy();
64  break;
65 
66  case 1:
67  rval = GetSumObject().GetZ();
68  break;
69 
70  case 2:
71  rval = GetSumObject().GetA();
72  break;
73 
74  case 3:
75  rval = GetSumObject().GetV().Z();
76  break;
77 
78  case 4:
79  rval = GetSumObject().GetV().X();
80  break;
81 
82  case 5:
83  rval = GetSumObject().GetV().Y();
84  break;
85 
86  case 6:
87  rval = GetSumObject().GetTheta();
88  break;
89 
90  case 7:
91  rval = fMult;
92  break;
93 
94  default :
95  rval = 0.;
96  break;
97  }
98  return rval;
99 }
100 
101 
102 
106 
108 {
109  // Returns 'D' for all floating-point values,
110  // returns 'I' for source Z and A and Mult
111  static Char_t val_type = 'I';
112  if ((i > 0 && i < 3) || (i == 7)) return val_type;
113  return KVVarGlob::GetValueType(i);
114 }
115 
116 
int Int_t
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
char Char_t
double Double_t
Double_t GetExcitEnergy() const
Definition: KVNucleus.h:285
Int_t GetA() const
Definition: KVNucleus.cpp:799
Int_t GetZ() const
Return the number of proton / atomic number.
Definition: KVNucleus.cpp:770
Double_t GetTheta() const
Definition: KVParticle.h:641
TVector3 GetV() const
Definition: KVParticle.h:632
Simple source reconstruction global variable.
Definition: KVSource.h:46
Double_t getvalue_int(Int_t i) const
Definition: KVSource.cpp:44
Char_t GetValueType(Int_t) const
Definition: KVSource.cpp:107
Int_t fMult
source multiplicity
Definition: KVSource.h:47
const KVNucleus & GetSumObject() const
Definition: KVVGObjectSum.h:53
virtual Char_t GetValueType(Int_t) const
Definition: KVVarGlob.h:628
Double_t Z() const
Double_t Y() const
Double_t X() const