Line data Source code
1 : /**************************************************************************
2 : * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 : * *
4 : * Author: The ALICE Off-line Project. *
5 : * Contributors are mentioned in the code where appropriate. *
6 : * *
7 : * Permission to use, copy, modify and distribute this software and its *
8 : * documentation strictly for non-commercial purposes is hereby granted *
9 : * without fee, provided that the above copyright notice appears in all *
10 : * copies and that both the copyright notice and this permission notice *
11 : * appear in the supporting documentation. The authors make no claims *
12 : * about the suitability of this software for any purpose. It is *
13 : * provided "as is" without express or implied warranty. *
14 : **************************************************************************/
15 :
16 : /* $Id$ */
17 :
18 : //_________________________________________________________________________
19 : // Class for the management by the Emc reconstruction.
20 : ////
21 : //*-- Author : Boris Polichtchouk (IHEP, Protvino) 6 Mar 2001
22 : //
23 : // --- ROOT system ---
24 :
25 : #include <TMath.h>
26 :
27 : // --- Standard library ---
28 :
29 : // --- AliRoot header files ---
30 :
31 : #include "AliPHOSRecEmcManager.h"
32 :
33 20 : ClassImp(AliPHOSRecEmcManager)
34 :
35 : //____________________________________________________________________________
36 :
37 0 : AliPHOSRecEmcManager::AliPHOSRecEmcManager():
38 0 : fOneGamChisqCut(1.3f),
39 0 : fOneGamInitialStep(0.00005f),
40 0 : fOneGamChisqMin(1.f),
41 0 : fOneGamStepMin(0.0005f),
42 0 : fOneGamNumOfIterations(50),
43 0 : fTwoGamInitialStep(0.00005f),
44 0 : fTwoGamChisqMin(1.f),
45 0 : fTwoGamEmin(0.1f),
46 0 : fTwoGamStepMin(0.00005),
47 0 : fTwoGamNumOfIterations(50),
48 0 : fThr0(0.f),
49 0 : fSqdCut(0.f)
50 0 : {
51 : // default ctor
52 0 : SetTitle("Emc Reconstruction Manager");
53 0 : }
54 :
55 0 : AliPHOSRecEmcManager::~AliPHOSRecEmcManager(void) {}
56 :
57 : Float_t AliPHOSRecEmcManager::Dispersion(Float_t ei) const
58 : {
59 : //"Dispresion" of energy deposition in the cell.
60 : // eTot is the total shower energy, ai is the
61 : // calculated cell response,
62 : // ei is the measured cell response.
63 :
64 0 : return ei;
65 : }
66 :
67 : Float_t AliPHOSRecEmcManager::OneGamChi2(Float_t ai, Float_t ei, Float_t, Float_t& gi) const
68 : {
69 : // Chi2 used in OneGam (one-gamma fitting).
70 : // gi is d(Chi2)/d(ai).
71 :
72 0 : Float_t da = ai - ei;
73 : Float_t d = ei; // we assume that sigma(E) = sqrt(E)
74 0 : gi = 2.*(ai-ei)/d;
75 :
76 0 : return da*da/d;
77 :
78 : }
79 :
80 : Float_t AliPHOSRecEmcManager::TwoGamChi2(Float_t ai, Float_t ei, Float_t, Float_t& gi) const
81 : {
82 : // calculates chi^2
83 0 : Float_t da = ai - ei;
84 : Float_t d = ei; // we assume that sigma(E) = sqrt(E)
85 0 : gi = 2.*(ai-ei)/d;
86 :
87 0 : return da*da/d;
88 :
89 : }
90 :
91 : void AliPHOSRecEmcManager::AG(Float_t ei, Float_t xi, Float_t yi, Float_t& ai, Float_t& gxi, Float_t& gyi )
92 : {
93 : //Calculates amplitude (ai) and gradients (gxi, gyi) of CPV pad response.
94 : //Integrated response (total "shower energy") is E,
95 : //xi and yi are the distances along x and y from reference point
96 : // to the pad center.
97 : //Shape of the shower is from PHOS TDR.
98 :
99 :
100 0 : Float_t r = TMath::Sqrt(xi*xi + yi*yi);
101 0 : Float_t r4 = r*r*r*r ;
102 0 : Float_t r295 = TMath::Power(r, 2.95) ;
103 0 : Float_t shape = ei*TMath::Exp( -r4 * (1. / (2.32 + 0.26 * r4) + 0.0316 / (1 + 0.0652 * r295) ) ) ;
104 0 : ai = shape;
105 :
106 :
107 : //d(shape)/d(xi)
108 0 : gxi = (-(TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2)*
109 0 : ((-0.006077944*xi*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),
110 0 : 0.4750000000000001))/
111 0 : TMath::Power(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475),2) -
112 0 : (1.04*xi*(TMath::Power(xi,2) + TMath::Power(yi,2)))/
113 0 : TMath::Power(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2),2))) -
114 0 : 4*xi*(TMath::Power(xi,2) + TMath::Power(yi,2))*
115 0 : (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475)) +
116 0 : 1./(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2))))/
117 0 : TMath::Power(TMath::E(),TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2)*
118 0 : (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475)) +
119 0 : 1./(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2))));
120 :
121 0 : gxi = gxi*ei;
122 :
123 : //d(shape)/d(yi)
124 0 : gyi = (-(TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2)*
125 0 : ((-0.006077944*yi*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),
126 0 : 0.4750000000000001))/
127 0 : TMath::Power(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475),2) -
128 0 : (1.04*yi*(TMath::Power(xi,2) + TMath::Power(yi,2)))/
129 0 : TMath::Power(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2),2))) -
130 0 : 4*yi*(TMath::Power(xi,2) + TMath::Power(yi,2))*
131 0 : (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475)) +
132 0 : 1./(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2))))/
133 0 : TMath::Power(TMath::E(),TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2)*
134 0 : (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475)) +
135 0 : 1./(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2))));
136 :
137 :
138 0 : gyi = gyi*ei;
139 :
140 0 : }
141 :
142 :
143 :
144 :
145 :
146 :
147 :
|