KaliVeda  1.12/06
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 "KVEvent.h"
8 
9 namespace MicroStat {
10 
17  class StatWeight : public TObject {
18  private:
19  void init();
20 
21  Double_t fWeight; //calculated weight
22  Long64_t fIndex; //index of corresponding partition
23  Double_t fEDisp; //available kinetic energy - set by SetWeight(KVEvent*, Double_t)
24 
25  protected:
27  {
28  fWeight = w;
29  }
31  {
32  fEDisp = e;
33  }
34 
35  public:
36  StatWeight();
37  virtual ~StatWeight();
38 
39  virtual void SetWeight(KVEvent* e, Double_t E) = 0;
41  {
42  return fWeight;
43  }
45  {
46  return fEDisp;
47  }
48 
50  {
51  fIndex = i;
52  }
54  {
55  return fIndex;
56  }
57 
58  void ls(Option_t* = "") const;
60  {
61  return kTRUE;
62  }
63 
64  Int_t Compare(const TObject* obj) const;
65 
66  void GenerateEvent(KVEvent* partition, KVEvent* event);
67  virtual void initGenerateEvent(KVEvent* partition) = 0;
68  virtual void resetGenerateEvent() = 0;
70 
71  ClassDef(StatWeight, 1) //Abstract base class for calculating statistical weights for events
72  };
73 
74 }/* namespace MicroStat */
75 
76 #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)
Base class container for multi-particle events.
Definition: KVEvent.h:176
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:125
Abstract base class for calculating statistical weights for events .
Definition: StatWeight.h:17
void SetIndex(Long64_t i)
Definition: StatWeight.h:49
virtual void SetWeight(KVEvent *e, Double_t E)=0
StatWeight()
Default constructor.
Definition: StatWeight.cpp:26
void init()
Default initialisations.
Definition: StatWeight.cpp:14
void GenerateEvent(KVEvent *partition, KVEvent *event)
Definition: StatWeight.cpp:78
virtual ~StatWeight()
Destructor.
Definition: StatWeight.cpp:38
Bool_t IsSortable() const
Definition: StatWeight.h:59
void setAvailableEnergy(Double_t e)
Definition: StatWeight.h:30
virtual void initGenerateEvent(KVEvent *partition)=0
Double_t GetAvailableEnergy() const
Definition: StatWeight.h:44
void setWeight(Double_t w)
Definition: StatWeight.h:26
void ls(Option_t *="") const
Definition: StatWeight.cpp:47
Int_t Compare(const TObject *obj) const
sort according to weight
Definition: StatWeight.cpp:59
virtual void resetGenerateEvent()=0
Double_t GetWeight() const
Definition: StatWeight.h:40
virtual void nextparticleGenerateEvent(Int_t, KVNucleus *)=0
Long64_t GetIndex() const
Definition: StatWeight.h:53
long long Long64_t