reading RAW without data
[u/mrichter/AliRoot.git] / HBTAN / AliHBTCorrectQInvCorrelFctn.h
CommitLineData
e09fa876 1#ifndef ALIHBTCORRECTQINVCORRELFCTN_H
2#define ALIHBTCORRECTQINVCORRELFCTN_H
83b33650 3//____________________
4///////////////////////////////////////////////////////
5// //
6// AliHBTCorrectQInvCorrelFctn //
7// //
8// Class for calculating Q Invariant correlation //
9// taking to the account resolution of the //
10// detector and coulomb effects. //
11// //
12///////////////////////////////////////////////////////
13
14#include "AliHBTFunction.h"
15
62e1b4fe 16class AliHBTCorrectedCorrelFctn: public AliHBTCorrelFunction
17{
18 public:
19 AliHBTCorrectedCorrelFctn();
20 virtual ~AliHBTCorrectedCorrelFctn(){}
21
22
23 void Smear(AliHBTPair* pair,AliHBTPair& smeared);
24 void Smear(AliVAODParticle* part, AliVAODParticle* smeared);
25
26 Double_t GetCoulombCorrection(AliHBTPair* /*pair*/){return 1.0;}
27
28
29 protected:
30
31 //Parameters of Pt RMS
32 //linear dependence dPt/Pt from Pt itself
33 Float_t fDPtOverPtA; //A of dPt/Pt
34 Float_t fDPtOverPtB; //A of dPt/Pt
35 Float_t fDPtOverPtAlpha; //A of dPt/Pt
36 Float_t fDPtOverPtC; //A of dPt/Pt
37
38 //We assume that RMS of Theta and Phisangle depends on Pt Like A+B*(Pt)^Alpha
39 //Idea copied from Star HBT Maker (Fabrice Retiere)
40 //Parameters comes from Monte Carlo Resolution Analysis
41
42 Float_t fThetaA; //"A" parameter of theta RMS dependence
43 Float_t fThetaB; //"B" parameter of theta RMS dependence
44 Float_t fThetaAlpha; //"Alpha" parameter (power) of theta RMS dependence
45 Float_t fThetaC; //"C" parameter of theta RMS dependence
46
47 Float_t fPhiA;//"A" parameter of phi RMS dependence
48 Float_t fPhiB;//"B" parameter of phi RMS dependence
49 Float_t fPhiAlpha;//"Alpha" parameter (power) of phi RMS dependence
50 Float_t fPhiC;//"C" parameter of phi RMS dependence
51
52 ClassDef(AliHBTCorrectedCorrelFctn,1)
53};
54
55
56class AliHBTCorrectQInvCorrelFctn: public AliHBTOnePairFctn1D, public AliHBTCorrectedCorrelFctn
83b33650 57{
58 public:
59 AliHBTCorrectQInvCorrelFctn(const char* name = "qinvcorrectedCF",
60 const char* title= "Corrected Q_{inv} Correlation Fonction");
61
62 AliHBTCorrectQInvCorrelFctn(const char* name, const char* title,
63 Int_t nbins, Float_t maxXval, Float_t minXval);
64
65 AliHBTCorrectQInvCorrelFctn(TH1D* measqinv,
66 const char* name = "qinvcorrectedCF",
67 const char* title= "Corrected Q_{inv} Correlation Fonction");
e09fa876 68 AliHBTCorrectQInvCorrelFctn(const AliHBTCorrectQInvCorrelFctn& in);
69
83b33650 70 virtual ~AliHBTCorrectQInvCorrelFctn();
e09fa876 71
72 void SetInitialValues(Double_t lambda, Double_t r);
73 void Init();
74 void ProcessSameEventParticles(AliHBTPair* pair);//process particles from same event (real pair)
75 void ProcessDiffEventParticles(AliHBTPair* pair);//process particles coming from different events (mixed pairs)
76 void SetMeasuredHistogram(TH1D* meas){fMeasCorrelFctn = meas;}
77 TH1* GetResult();//returns the result histogram
83b33650 78 Double_t GetRadius()const{ return TMath::Sqrt(fR2);}//returns assumed radius
79 Double_t GetLambda()const{ return fLambda;}//retutrns assumed intercept parameter
80 void SetRadiusConvergenceTreshold(Double_t ct){fRConvergenceTreshold=ct;}//if fitted and assumed R us different less then that number con
81 void SetLambdaConvergenceTreshold(Double_t ct){fLambdaConvergenceTreshold=ct;}
82 Bool_t IsConverged();
83 void Fit();
84 Double_t GetFittedRadius();
85 Double_t GetFittedLambda();
86 void WriteAll();
87 void SetMeasNum(TH1D* measnum){fMeasNumer = measnum;}
88 void SetMeasDen(TH1D* h){fMeasDenom = h;}
89 void MakeMeasCF();
e09fa876 90
83b33650 91 protected:
92 virtual void BuildHistos(Int_t nbins, Float_t max, Float_t min);
3c1edb34 93 virtual void BuildHistos() {AliHBTFunction1D::BuildHistos();}
a22a56ec 94 Double_t GetValue(AliHBTPair * pair) const {return pair->GetQInv();}
83b33650 95 Double_t GetModelValue(Double_t qinv);
96
97 //Our ideal numerator
e09fa876 98 TH1D* fMeasCorrelFctn; //Measured correlation function
99 TH1D* fMeasNumer;//Measured numerator correlation function
100 TH1D* fMeasDenom; //Measured denominator correlation function
83b33650 101
102 TH1D* fSmearedNumer; //! Numerator of smeard q
103 TH1D* fSmearedDenom; //! Denominator of smeard q
104
83b33650 105 Double_t fR2;//square of radius
106 Double_t fLambda;//Interception parameter
107
108 Double_t fFittedR;//fitted radius
109 Double_t fFittedLambda;//fitted Interception parameter
110
e09fa876 111 Float_t fRConvergenceTreshold;//fRConvergenceTreshold
112 Float_t fLambdaConvergenceTreshold;//fLambdaConvergenceTreshold
113
83b33650 114 private:
83b33650 115 ClassDef(AliHBTCorrectQInvCorrelFctn,1)
116};
117
e09fa876 118inline Double_t AliHBTCorrectQInvCorrelFctn::GetModelValue(Double_t qinv)
83b33650 119{
120 //factor 0.038936366329 conected with units change GeV<->SI
121 return 1.0 + fLambda*TMath::Exp(-fR2*qinv*qinv/0.038936366329);
122}
123
83b33650 124#endif