KaliVeda
Toolkit for HIC analysis
KVReactionPlaneEstimator.cpp
1 #include "KVReactionPlaneEstimator.h"
2 
3 
17 
19 {
20  // Default initialization.
21  //
22  // Default frame for all calculations is "CM".
23  //
24  // Define the following values which can be retrieved with GetValue():
25  //
26  // Name | Index | Meaning
27  // ------|---------|------------------------------------------
28  // Q | 0 | Magnitude of \f$\vec{Q}\f$
29  // Phi | 1 | Azimuthal angle of \f$\vec{Q}\f$
30  // X | 2 | \f$x\f$-component of \f$\vec{Q}\f$
31  // Y | 3 | \f$y\f$-component of \f$\vec{Q}\f$
32 
33  SetFrame("CM");
35  SetNameIndex("Q", 0);
36  SetNameIndex("Phi", 1);
37  SetNameIndex("X", 2);
38  SetNameIndex("Y", 3);
39 }
40 
41 
42 
52 
54 {
55  // \returns the following values according to the given index:
56  //
57  // Name | Index | Meaning
58  // ------|---------|------------------------------------------
59  // Q | 0 | Magnitude of \f$\vec{Q}\f$
60  // Phi | 1 | Azimuthal angle of \f$\vec{Q}\f$
61  // X | 2 | \f$x\f$-component of \f$\vec{Q}\f$
62  // Y | 3 | \f$y\f$-component of \f$\vec{Q}\f$
63 
64  switch (i) {
65  case 0:
66  return GetQ().Mag();
67  case 1: {
68  double phi = GetQ().Phi() * TMath::RadToDeg();
69  return (phi < 0) * 360 + phi;
70  }
71  case 2:
72  return GetQ().X();
73  case 3:
74  return GetQ().Y();
75  }
76  return -1;
77 }
78 
79 
80 
86 
88 {
89  // \return \f$\vec{Q}\f$ to use with particle
90  //
91  // To avoid autocorrelation, the particle is not used in the determination of \f$\vec{Q}\f$,
92  // i.e. this is the "one plane per particle" approach.
93 
94  const KVNucleus* N = dynamic_cast<const KVNucleus*>(n->GetFrame(GetFrame(), false));
95 
96  return GetSumObject() - weight_function(N) * N->GetTransverseMomentum();
97 }
98 
99 
100 
116 
117 Double_t delta_phiR_distri(Double_t* x, Double_t* par)
118 {
119  // Eqn.(12) of Ollitrault, "Reconstructing azimuthal distributions in nucleus-nucleus collisions",
120  // nucl-ex/9711003.
121  //
122  // Use to fit distribution of \f$\Delta\phi_R\f$, the difference in azimuthal angle between the reaction
123  // planes determined for two random subevents containing half of all particles in the event,
124  // in order to determine the \f$\chi\f$ parameter
125  // which can be used to correct azimuthal distributions for the uncertainty in the determination
126  // of the reaction plane.
127  //
128  // ~~~~{.cpp}
129  // x[0] = delta phi
130  // par[0] = chi
131  // par[1] = normalisation factor
132  // ~~~~{.cpp}
133 
134  if (par[0] < 0) return 0;
135  double dPhi = x[0];
136  double chiI = par[0] / TMath::Sqrt2();
137  double z = TMath::Power(chiI, 2) * TMath::Cos(TMath::DegToRad() * dPhi);
138  double distri = 2. / TMath::Pi() * (1 + TMath::Power(chiI, 2));
139  distri += z * (TMath::BesselI0(z) + TMath::StruveL0(z));
140  distri += TMath::Power(chiI, 2) * (TMath::BesselI1(z) + TMath::StruveL1(z));
141  distri *= par[1] * TMath::Exp(-TMath::Power(chiI, 2)) / 2.;
142  return distri;
143 }
144 
145 
146 
162 
164 {
165  // Creates and returns a TF1 corresponding to Eqn.(12) of Ollitrault, "Reconstructing azimuthal distributions in nucleus-nucleus collisions",
166  // nucl-ex/9711003.
167  //
168  // Use to fit distribution of \f$\Delta\phi_R\f$, the difference in azimuthal angle between the reaction
169  // planes determined for two random subevents containing half of all particles in the event,
170  // in order to determine the \f$\chi\f$ parameter
171  // which can be used to correct azimuthal distributions for the uncertainty in the determination
172  // of the reaction plane.
173  //
174  // Parameters:
175  // Index | Meaning
176  // ------|-----------------
177  // 0 | \f$\chi\f$
178  // 1 | Normalisation
179 
180  auto f = new TF1("DeltaPhiRFitFunction", delta_phiR_distri, 0, 180, 2);
181  f->SetParNames("#chi", "Norm.");
182  f->SetParLimits(0, 0, 5);
183  f->SetParLimits(1, 1, 10000);
184  f->SetParameters(1, 1);
185  return f;
186 }
187 
189 
190 
191 
int Int_t
#define f(i)
double Double_t
#define N
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:126
Estimate of reaction plane orientation using transverse momentum method of Danielewicz & Odyniec.
TVector3 GetQForParticle(const KVNucleus *n)
Double_t getvalue_int(Int_t) const
std::function< double(const KVNucleus *)> weight_function
const TVector3 & GetSumObject() const
Definition: KVVGObjectSum.h:57
void SetNameIndex(const Char_t *name, Int_t index)
Definition: KVVarGlob.cpp:223
const TString & GetFrame() const
Definition: KVVarGlob.h:516
void ClearNameIndex()
Definition: KVVarGlob.h:269
void SetFrame(const Char_t *ref)
Definition: KVVarGlob.h:505
Double_t Phi() const
Double_t Y() const
Double_t X() const
Double_t Mag() const
Double_t x[n]
const Int_t n
Double_t Exp(Double_t x)
Double_t BesselI1(Double_t x)
Double_t StruveL1(Double_t x)
constexpr Double_t Sqrt2()
Double_t Power(Double_t x, Double_t y)
constexpr Double_t DegToRad()
Double_t StruveL0(Double_t x)
Double_t Cos(Double_t)
constexpr Double_t Pi()
constexpr Double_t RadToDeg()
Double_t BesselI0(Double_t x)
ClassImp(TPyArg)