KaliVeda
Toolkit for HIC analysis
KVDirectivity.cpp
1 #include "KVDirectivity.h"
2 
4 
5 
10 
11 
13 void KVDirectivity::Copy(TObject& a) const
14 {
15 
16  KVVarGlob1::Copy(a);// copy attributes of KVVarGlob1 base object
17 
18  KVDirectivity& aglob = (KVDirectivity&)a;
19  aglob.total_mod_trans = total_mod_trans;
20  aglob.total_trans = total_trans;
21 }
22 
23 
26 
27 
29 
31 {
32  double mod_tot_trans = total_trans.Mag();
33  SetValue(mod_tot_trans / total_mod_trans);
34 }
35 
36 
40 
41 
43 
44 void KVDirectivity::init()
45 {
46  fType = KVVarGlob::kOneBody; // this is a 1-body variable
47 #ifdef USING_ROOT6
48  SetSelection({"V>Vcm", [](const KVNucleus * n)
49  {
50  return n->GetVpar() > 0;
51  }
52  });
53 #else
54  SetSelection("_NUC_->GetVpar()>0");
55 #endif
56 }
57 
58 
66 
67 
69 
70 void KVDirectivity::fill(const KVNucleus* n)
71 {
72  TVector3 trans_mom = n->GetTransverseMomentum();
73  total_trans += trans_mom;
74  total_mod_trans += trans_mom.Mag();
75 }
76 
77 
78 
Transverse momentum directivity (FOPI)
Definition: KVDirectivity.h:23
void Calculate() override
Calculation of global variable value(s) after filling is finished.
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:123
void Copy(TObject &obj) const override
Definition: KVVarGlob1.h:51
void SetSelection(const KVParticleCondition &sel)
Definition: KVVarGlob.h:600
Double_t Mag() const
const Int_t n
TArc a
ClassImp(TPyArg)