KaliVeda
Toolkit for HIC analysis
KVRelativeVelocity.h
1 #ifndef __KVRELATIVEVELOCITY_H
2 #define __KVRELATIVEVELOCITY_H
3 
4 #include "KVVarGlobMean.h"
5 
16 
17  void init()
18  {
19  fType = kTwoBody;
20  }
21 
22 public:
24  : KVVarGlobMean()
25  {
26  init();
27  }
29  : KVVarGlobMean(nom)
30  {
31  init();
32  }
33  ROOT_COPY_CTOR(KVRelativeVelocity, KVVarGlobMean)
34  ROOT_COPY_ASSIGN_OP(KVRelativeVelocity)
35  virtual ~KVRelativeVelocity(void) {}
36 
37 protected:
38  void fill2(const KVNucleus* n1, const KVNucleus* n2)
39  {
40  if (n1 != n2) FillVar((n1->GetVelocity() - n2->GetVelocity()).Mag());
41  }
42 
43  ClassDef(KVRelativeVelocity, 1) //Calculate mean relative velocity of particls
44 };
45 
46 #endif
char Char_t
#define ClassDef(name, id)
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:126
TVector3 GetVelocity() const
returns velocity vector in cm/ns units
Calculate mean relative velocity of particles.
void fill2(const KVNucleus *n1, const KVNucleus *n2)
KVRelativeVelocity(const Char_t *nom)
Abstract base class for global variables which calculate a mean value.
Definition: KVVarGlobMean.h:35
void FillVar(Double_t v, Double_t w=1.)
Int_t fType
type of variable global; = kOneBody, kTwoBody or kNBody
Definition: KVVarGlob.h:243