KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVRelativeVelocity.h
Go to the documentation of this file.
1 #ifndef __KVRELATIVEVELOCITY_H
2 #define __KVRELATIVEVELOCITY_H
3 
4 #include "KVVarGlobMean.h"
5 
17 
18  void init()
19  {
20  fType = kTwoBody;
21  }
22 
23 public:
25  : KVVarGlobMean()
26  {
27  init();
28  }
30  : KVVarGlobMean(nom)
31  {
32  init();
33  }
34  ROOT_COPY_CTOR(KVRelativeVelocity, KVVarGlobMean)
35  ROOT_COPY_ASSIGN_OP(KVRelativeVelocity)
36  virtual ~KVRelativeVelocity(void) {}
37 
38 protected:
39  void fill2(const KVNucleus* n1, const KVNucleus* n2)
40  {
41  if (n1 != n2) FillVar((n1->GetVelocity() - n2->GetVelocity()).Mag());
42  }
43 
44  ClassDef(KVRelativeVelocity, 1) //Calculate mean relative velocity of particls
45 };
46 
47 #endif
char Char_t
#define ClassDef(name, id)
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:125
TVector3 GetVelocity() const
returns velocity vector in cm/ns units
Calculate mean relative velocity of particls.
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:34
void FillVar(Double_t v, Double_t w=1.)
Int_t fType
type of variable global; = kOneBody, kTwoBody or kNBody
Definition: KVVarGlob.h:241