1 #include "eeTowerFunction.h"
4 Double_t eeTowerFunction( Double_t *x, Double_t *p ) {
8 Double_t p0[]={ 0.235772, 0.239713, 0.239243, 0.238843, 0.24141, 0.241641, 0.2433, 0.243124, 0.242957, 0.243987, 0.244477, 0.245425, 0.245425};
9 Double_t p2[]={ 0.266629, 0.283157, 0.270271, 0.257208, 0.246998, 0.236122, 0.226747, 0.218976, 0.21176, 0.205661, 0.198209, 0.197987, 0.197987};
10 Double_t p3[]={ 0.497183, 0.490622, 0.491357, 0.491976, 0.492601, 0.493278, 0.493775, 0.494394, 0.495469, 0.494036, 0.493174, 0.504341, 0.504341};
12 Double_t xx[]={ 0.,1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.,12.};
19 TSpline3 mEtaPar0(
"EtaPar0",xx,p0,13);
20 TSpline5 mEtaPar2(
"EtaPar2",xx,p2,13);
21 TSpline5 mEtaPar3(
"EtaPar3",xx,p3,13);
23 Double_t pp0[]={ 0.23439, 0.242071, 0.243334, 0.243623, 0.245357, 0.245606, 0.245668, 0.247, 0.247328, 0.247872, 0.248534, 0.247648, 0.247648 };
24 Double_t pp2[]={ 0.296042, 0.273496, 0.248509, 0.227491, 0.208265, 0.195849, 0.189432, 0.176265, 0.166762, 0.151045, 0.14633, 0.136524, 0.136524 };
25 Double_t pp3[]={ 0.490751, 0.490351, 0.492535, 0.495746, 0.496635, 0.498088, 0.497785, 0.498563, 0.499, 0.499639, 0.499539, 0.499887, 0.499887 };
26 TSpline3 mPhiPar0(
"PhiPar0",xx,pp0,13);
27 TSpline3 mPhiPar2(
"PhiPar2",xx,pp2,13);
28 TSpline3 mPhiPar3(
"PhiPar3",xx,pp3,13);
33 Double_t xphi0 = p[0];
34 Double_t xeta0 = p[1];
35 Double_t energy = p[2];
38 Double_t norm = energy * ( mPhiPar0 .Eval(xeta) * mEtaPar0 .Eval(xeta) );
40 Double_t phi_par2 = mPhiPar2 .Eval( xeta );
41 Double_t eta_par2 = mEtaPar2 .Eval( xeta );
43 Double_t phi_par3 = mPhiPar3 .Eval( xeta );
44 Double_t eta_par3 = 0.50;
53 Double_t phi1 = TMath::Erfc( -(xphi-xphi0+phi_par3) / phi_par2 );
54 Double_t phi2 = TMath::Erfc( +(xphi-xphi0-phi_par3) / phi_par2 );
57 Double_t eta1 = TMath::Erfc( -(xeta-xeta0+eta_par3) / eta_par2 );
58 Double_t eta2 = TMath::Erfc( +(xeta-xeta0-eta_par3) / eta_par2 );
61 Double_t result = norm * phi1*phi2 * eta1*eta2;
70 Double_t eeTower2Function( Double_t *x, Double_t *p ) {
81 Double_t phibin2=phibin+TMath::Cos(theta) * dgg;
82 Double_t etabin2=etabin+TMath::Sin(theta) * dgg;
83 Double_t energy2=energy * (1.0-zgg)/(1.0+zgg);
85 Double_t p1[]={phibin,etabin,energy};
86 Double_t p2[]={phibin2,etabin2,energy2};
88 return eeTowerFunction(x,p1) + eeTowerFunction(x,p2);