KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
StatWeight.h
Go to the documentation of this file.
1 
4 #ifndef __STATWEIGHT_H
5 #define __STATWEIGHT_H
6 
7 #include "TObject.h"
8 
9 class KVEvent;
10 class KVNucleus;
11 
12 namespace MicroStat {
13 
20  class StatWeight : public TObject {
21  private:
22  void init();
23 
24  Double_t fWeight; //calculated weight
25  Long64_t fIndex; //index of corresponding partition
26  Double_t fEDisp; //available kinetic energy - set by SetWeight(KVEvent*, Double_t)
27 
28  protected:
30  {
31  fWeight = w;
32  }
34  {
35  fEDisp = e;
36  }
37 
38  public:
39  StatWeight();
40  virtual ~StatWeight();
41 
42  virtual void SetWeight(KVEvent* e, Double_t E) = 0;
44  {
45  return fWeight;
46  }
48  {
49  return fEDisp;
50  }
51 
53  {
54  fIndex = i;
55  }
57  {
58  return fIndex;
59  }
60 
61  void ls(Option_t* = "") const;
63  {
64  return kTRUE;
65  }
66 
67  Int_t Compare(const TObject* obj) const;
68 
69  void GenerateEvent(KVEvent* partition, KVEvent* event);
70  virtual void initGenerateEvent(KVEvent* partition) = 0;
71  virtual void resetGenerateEvent() = 0;
73 
74  ClassDef(StatWeight, 1) //Abstract base class for calculating statistical weights for events
75  };
76 
77 }/* namespace MicroStat */
78 
79 #endif
int Int_t
#define e(i)
bool Bool_t
double Double_t
const Bool_t kTRUE
const char Option_t
#define ClassDef(name, id)
Abstract base class container for multi-particle events.
Definition: KVEvent.h:66
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:125
Abstract base class for calculating statistical weights for events .
Definition: StatWeight.h:20
void SetIndex(Long64_t i)
Definition: StatWeight.h:52
virtual void SetWeight(KVEvent *e, Double_t E)=0
StatWeight()
Default constructor.
Definition: StatWeight.cpp:27
void init()
Default initialisations.
Definition: StatWeight.cpp:15
void GenerateEvent(KVEvent *partition, KVEvent *event)
Definition: StatWeight.cpp:79
virtual ~StatWeight()
Destructor.
Definition: StatWeight.cpp:39
Bool_t IsSortable() const
Definition: StatWeight.h:62
void setAvailableEnergy(Double_t e)
Definition: StatWeight.h:33
virtual void initGenerateEvent(KVEvent *partition)=0
Double_t GetAvailableEnergy() const
Definition: StatWeight.h:47
void setWeight(Double_t w)
Definition: StatWeight.h:29
void ls(Option_t *="") const
Definition: StatWeight.cpp:48
Int_t Compare(const TObject *obj) const
sort according to weight
Definition: StatWeight.cpp:60
virtual void resetGenerateEvent()=0
Double_t GetWeight() const
Definition: StatWeight.h:43
virtual void nextparticleGenerateEvent(Int_t, KVNucleus *)=0
Long64_t GetIndex() const
Definition: StatWeight.h:56
long long Long64_t