KaliVeda
Toolkit for HIC analysis
impact_parameter_distribution.h
1 
4 #ifndef __KVSMOOTHIPDIST_H
5 #define __KVSMOOTHIPDIST_H
6 
7 #include "KVBase.h"
8 #include "TF1.h"
9 #include "TH1.h"
10 
11 namespace KVImpactParameters {
45 
46  private:
51 
52  public:
56 
57  void FitIPDist(TH1*);
58 
59  Double_t GetCrossSection() const;
60  Double_t GetB0() const
61  {
63  return fIPdist.GetParameter(1);
64  }
66  {
68  return fIPdist.GetParameter(2);
69  }
71  void SetB0(Double_t x)
72  {
76  }
78  {
83  }
84  void SetDeltaB_WithConstantCrossSection(Double_t deltab, Double_t sigmaR = 0);
86  {
93  return fIPdist;
94  }
95  void Draw(Option_t* opt = "")
96  {
99  fIPdist.Draw(opt);
100  }
101  const TF1& GetSigmaR()
102  {
105  return fSigmaR;
106  }
108  {
111  return fCentrality;
112  }
113  Double_t Calculate_b(Double_t centrality) const;
114 
116  {
118 
120  }
121 
123  {
125  if (b > 0) return fIPdist.Eval(b) / (b * fIPdist.GetParameter(0));
126  return 0;
127  }
128 
130  {
132 
133  if (b > 0) {
134  return fIPdist.Eval(b) / fIPdist.GetParameter(0) * 10 * TMath::TwoPi();
135  }
136  return 0;
137  }
139  {
146  fIPdist.SetParameter(0, 10 * TMath::TwoPi());
147  }
148 
150 
153 
154  if(bb > 0 && fHisto && fHisto->Integral()>0){
155  if(bb < fHisto->GetXaxis()->GetBinUpEdge(fHisto->GetNbinsX())) return fHisto->GetBinContent(fHisto->FindBin(bb));
156  }
157 
158  return 0;
159  }
160 
161  ClassDef(impact_parameter_distribution, 1) //Realistic impact parameter distribution with smooth fall-off at large b
162  };
163 }
164 #endif
double Double_t
const char Option_t
#define ClassDef(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t b
Base class for KaliVeda framework.
Definition: KVBase.h:142
Class implementing parametrizable impact parameter distributions.
TF1 fCentrality
centrality as function of impact parameter
void SetDeltaB_WithConstantCrossSection(Double_t deltab, Double_t sigmaR=0)
virtual Double_t GetParameter(const TString &name) const
void Draw(Option_t *option="") override
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
virtual void SetParameter(const TString &name, Double_t value)
virtual Int_t GetNbinsX() const
virtual Double_t Integral(Int_t binx1, Int_t binx2, Option_t *option="") const
virtual Double_t GetBinContent(Int_t bin) const
virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0)
Double_t x[n]
constexpr Double_t TwoPi()