KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVZmax.h
Go to the documentation of this file.
1 #ifndef KVZmax_h
2 #define KVZmax_h
3 #include "KVVarGlob.h"
4 
33 class KVZmax: public KVVarGlob {
34 
36 
37  void init();
38 protected:
39  void fill(const KVNucleus* c)
40  {
42  heaviest.Add(const_cast<KVNucleus*>(c));
43  }
44 
46  {
51 
52  if (!GetZmax(i))
53  return -1.0;
54  return (Double_t) GetZmax(i)->GetZ();
55  }
56 
57 public:
58  ROOT_FULL_SET_WITH_INIT(KVZmax, KVVarGlob)
59 
60  virtual void Copy(TObject& obj) const;
61  void Init()
62  {
64  }
65  void Calculate()
66  {
68  heaviest.Sort();
69  }
70  void Reset()
71  {
73  heaviest.Clear();
74  }
76  {
78 
79  return (KVNucleus*) heaviest.At(i);
80  }
81 
82  std::vector<Double_t> GetValueVector(void) const;
83 
84  ClassDef(KVZmax, 1)//Rank fragments by charge and return Z or pointer of i_th heaviest fragment
85 };
86 #endif
int Int_t
#define c(i)
double Double_t
#define ClassDef(name, id)
Extended TList class which owns its objects by default.
Definition: KVList.h:27
void Sort(Bool_t order=kSortAscending)
Definition: KVList.h:34
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:125
Int_t GetZ() const
Return the number of proton / atomic number.
Definition: KVNucleus.cpp:770
virtual void Clear(Option_t *option="")
virtual TObject * At(Int_t idx) const
virtual void Add(TObject *obj)
Base class for all global variable implementations.
Definition: KVVarGlob.h:217
Global variable used to sort particles in order of decreasing atomic number
Definition: KVZmax.h:33
void Reset()
Definition: KVZmax.h:70
KVNucleus * GetZmax(Int_t i) const
Definition: KVZmax.h:75
std::vector< Double_t > GetValueVector(void) const
Definition: KVZmax.cpp:36
virtual void Copy(TObject &obj) const
Make a copy of this object.
Definition: KVZmax.cpp:22
KVList heaviest
sorted list of pointers to nuclei, sorted by decreasing Z
Definition: KVZmax.h:35
Double_t getvalue_int(Int_t i) const
Definition: KVZmax.h:45
void Calculate()
Definition: KVZmax.h:65
void init()
Definition: KVZmax.cpp:8
void Init()
Definition: KVZmax.h:61
void fill(const KVNucleus *c)
Definition: KVZmax.h:39