24 #include <Riostream.h> 42 static Double_t
funGauss(Double_t *x, Double_t * par)
46 return TMath::Exp(-(x[0]*x[0])/(2*par[0]*par[0]));
49 static Double_t
funCosh(Double_t *x, Double_t * par)
53 return 1/TMath::CosH(3.14159*x[0]/(2*par[0]));
56 static Double_t
funGati(Double_t *x, Double_t * par)
61 Float_t k3R=TMath::Sqrt(k3);
62 Float_t k2=(TMath::Pi()/2)*(1-k3R/2.);
63 Float_t k1=k2*k3R/(4*TMath::ATan(k3R));
64 Float_t l=x[0]/par[0];
65 Float_t tan2=TMath::TanH(k2*l);
67 Float_t
res = k1*(1-tan2)/(1+k3*tan2);
98 fcharge =
new Float_t[fNRF];
99 if (step>0) fDSTEPM1=1./step;
100 else fDSTEPM1 = 1./fgRFDSTEP;
101 for(Int_t i=0;i<5;i++) {
111 fDSTEPM1(prf.fDSTEPM1),
113 forigsigma(prf.forigsigma),
114 fpadWidth(prf.fpadWidth),
117 fGRF(new TF1(*(prf.fGRF))),
119 fOffset(prf.fOffset),
120 fDirect(prf.fDirect),
121 fPadDistance(prf.fPadDistance)
125 for(Int_t i=0;i<5;i++) {
133 TString s(
fGRF->GetName());
135 fGRF->SetName(s.Data());
141 TObject::operator=(prf);
154 TString s(
fGRF->GetName());
156 fGRF->SetName(s.Data());
183 if (i1+1<
fNRF &&i1>0)
184 res =
fcharge[i1]*(Float_t(i1+1)-x)+
fcharge[i1+1]*(x-Float_t(i1));
200 Float_t kNorm, Float_t sigma)
207 if (sigma==0) sigma=
fpadWidth/TMath::Sqrt(12.);
211 snprintf(
fType,5,
"User");
232 snprintf(
fType,5,
"Gauss");
251 snprintf(
fType,5,
"Cosh");
271 snprintf(
fType,5,
"Gati");
282 TCanvas * c1 =
new TCanvas(
"canRF",
"Pad response function",700,900);
284 TPad * pad1 =
new TPad(
"pad1RF",
"",0.05,0.55,0.95,0.95,21);
286 TPad * pad2 =
new TPad(
"pad2RF",
"",0.05,0.05,0.95,0.45,21);
291 snprintf(s,60,
"RF response function for %1.2f cm pad width",
fpadWidth);
293 TH1F * hRFo =
new TH1F(
"hRFo",
"Original charge distribution",N+1,x1,x2);
297 TH1F * hRFc =
new TH1F(
"hRFc",s,N+1,x1,x2);
302 for (Float_t i = 0;i<N+1;i++)
304 x+=(x2-x1)/Float_t(N);
324 if (
fGRF == 0 )
return;
326 #if ROOT_VERSION_CODE < ROOT_VERSION(5,99,0) 329 TArrayD savParam(
fGRF->GetNpar(),
fGRF->GetParameters());
336 for (Int_t i =0; i<
fNRF;i++)
338 Float_t x = (Float_t)(i-fNRF/2)/
fDSTEPM1;
341 #if ROOT_VERSION_CODE < ROOT_VERSION(5,99,0) 349 for (Int_t i =0; i<
fNRF;i++)
351 Float_t x = (Float_t)(i-fNRF/2)/
fDSTEPM1;
370 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,99,0) 371 fGRF->SetParameters(savParam.GetArray());
375 void AliTPCRF1D::Streamer(TBuffer &R__b)
378 if (R__b.IsReading()) {
379 AliTPCRF1D::Class()->ReadBuffer(R__b,
this);
388 AliTPCRF1D::Class()->WriteBuffer(R__b,
this);
398 Double_t g1 = TMath::Exp(-4.*x/p1);
399 Double_t g2 = TMath::Power(x/p1,4);
Double_t funParam[5]
parameters of used charge function
Float_t * fcharge
field with RF
static Double_t funGati(Double_t *x, Double_t *par)
char fType[5]
type of the parametrisation
Float_t fSigma
sigma of PAD response function
Float_t fOffset
offset of response function (for time reponse we
Float_t GetGRF(Float_t xin)
Int_t fNRF
number of interpolations point
static Double_t funGauss(Double_t *x, Double_t *par)
void DrawRF(Float_t x1=-3, Float_t x2=3., Int_t N=200)
void SetCosh(Float_t sigma, Float_t padWidth, Float_t kNorm)
static Float_t fgRFDSTEP
default step in cm
static Double_t funCosh(Double_t *x, Double_t *par)
static Double_t Gamma4(Double_t x, Double_t p0, Double_t p1)
Float_t fPadDistance
pad to wire distance
Declaration of class AliTPCRF1D.
static Int_t fgNRF
default number of interpolation points
Float_t fkNorm
normalisation factor of the charge integral
AliTPCRF1D & operator=(const AliTPCRF1D &prf)
Float_t fInteg
integral of GRF on +- infinity
Float_t fpadWidth
width of pad
AliTPCRF1D(Bool_t direct=kFALSE, Int_t np=0, Float_t step=0)
void SetGauss(Float_t sigma, Float_t padWidth, Float_t kNorm)
Float_t GetRF(Float_t xin)
void Update()
it's on user !!!!
Bool_t fDirect
tell us if we use directly generalfunction
Float_t forigsigma
sigma of original distribution;
void SetGati(Float_t K3, Float_t padDistance, Float_t padWidth, Float_t kNorm)
TF1 * fGRF
charge distribution function
void SetParam(TF1 *GRF, Float_t padwidth, Float_t kNorm, Float_t sigma=0)