]>
Commit | Line | Data |
---|---|---|
cbd576a6 | 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 | ||
17 | //_________________________________________________________________________ | |
18 | // Class for the management by the Emc reconstruction. | |
386aef34 | 19 | //// |
cbd576a6 | 20 | //*-- Author : Boris Polichtchouk (IHEP, Protvino) 6 Mar 2001 |
21 | // | |
22 | // --- ROOT system --- | |
23 | ||
24 | // --- Standard library --- | |
25 | ||
cbd576a6 | 26 | // --- AliRoot header files --- |
27 | ||
28 | #include "AliPHOSRecEmcManager.h" | |
cbd576a6 | 29 | |
30 | ClassImp(AliPHOSRecEmcManager) | |
31 | ||
32 | //____________________________________________________________________________ | |
33 | ||
34 | AliPHOSRecEmcManager::AliPHOSRecEmcManager() | |
35 | { | |
386aef34 | 36 | // default ctor |
cbd576a6 | 37 | // fOneGamChisqCut = 3.; |
38 | fOneGamChisqCut = 1.3; // bvp 31.08.2001 | |
39 | ||
40 | fOneGamInitialStep = 0.00005; | |
41 | fOneGamChisqMin = 1.; | |
42 | fOneGamStepMin = 0.0005; | |
43 | fOneGamNumOfIterations = 50; | |
44 | ||
45 | fTwoGamInitialStep = 0.00005; | |
46 | fTwoGamChisqMin = 1.; | |
47 | fTwoGamEmin = 0.1; | |
48 | fTwoGamStepMin = 0.00005; | |
49 | fTwoGamNumOfIterations = 50; | |
50 | ||
51 | // fThr0 = 0.6; | |
52 | fThr0 = 0.; | |
53 | // fSqdCut = 3.; | |
54 | // fSqdCut = 0.5; // bvp 31.08.2001 | |
55 | fSqdCut = 0.; | |
56 | ||
57 | SetTitle("Emc Reconstruction Manager"); | |
58 | ||
59 | } | |
60 | ||
61 | AliPHOSRecEmcManager::~AliPHOSRecEmcManager(void) {} | |
62 | ||
90cceaf6 | 63 | Float_t AliPHOSRecEmcManager::Dispersion(Float_t ei) const |
cbd576a6 | 64 | { |
65 | //"Dispresion" of energy deposition in the cell. | |
386aef34 | 66 | // eTot is the total shower energy, ai is the |
cbd576a6 | 67 | // calculated cell response, |
386aef34 | 68 | // ei is the measured cell response. |
cbd576a6 | 69 | |
386aef34 | 70 | return ei; |
cbd576a6 | 71 | } |
72 | ||
e957fea8 | 73 | Float_t AliPHOSRecEmcManager::OneGamChi2(Float_t ai, Float_t ei, Float_t fi, Float_t& gi) const |
cbd576a6 | 74 | { |
75 | // Chi2 used in OneGam (one-gamma fitting). | |
386aef34 | 76 | // gi is d(Chi2)/d(ai). |
cbd576a6 | 77 | |
e957fea8 | 78 | fi = 0 ; |
386aef34 | 79 | Float_t da = ai - ei; |
80 | Float_t d = ei; // we assume that sigma(E) = sqrt(E) | |
81 | gi = 2.*(ai-ei)/d; | |
cbd576a6 | 82 | |
386aef34 | 83 | return da*da/d; |
cbd576a6 | 84 | |
85 | } | |
86 | ||
e957fea8 | 87 | Float_t AliPHOSRecEmcManager::TwoGamChi2(Float_t ai, Float_t ei, Float_t fi, Float_t& gi) const |
cbd576a6 | 88 | { |
386aef34 | 89 | // calculates chi^2 |
e957fea8 | 90 | fi = 0 ; |
386aef34 | 91 | Float_t da = ai - ei; |
92 | Float_t d = ei; // we assume that sigma(E) = sqrt(E) | |
93 | gi = 2.*(ai-ei)/d; | |
cbd576a6 | 94 | |
386aef34 | 95 | return da*da/d; |
cbd576a6 | 96 | |
97 | } | |
98 | ||
386aef34 | 99 | void AliPHOSRecEmcManager::AG(Float_t ei, Float_t xi, Float_t yi, Float_t& ai, Float_t& gxi, Float_t& gyi ) |
cbd576a6 | 100 | { |
386aef34 | 101 | //Calculates amplitude (ai) and gradients (gxi, gyi) of CPV pad response. |
cbd576a6 | 102 | //Integrated response (total "shower energy") is E, |
386aef34 | 103 | //xi and yi are the distances along x and y from reference point |
cbd576a6 | 104 | // to the pad center. |
105 | //Shape of the shower is from PHOS TDR. | |
106 | ||
107 | ||
386aef34 | 108 | Float_t r = TMath::Sqrt(xi*xi + yi*yi); |
cbd576a6 | 109 | Float_t r4 = r*r*r*r ; |
110 | Float_t r295 = TMath::Power(r, 2.95) ; | |
386aef34 | 111 | Float_t shape = ei*TMath::Exp( -r4 * (1. / (2.32 + 0.26 * r4) + 0.0316 / (1 + 0.0652 * r295) ) ) ; |
112 | ai = shape; | |
cbd576a6 | 113 | |
114 | ||
386aef34 | 115 | //d(shape)/d(xi) |
116 | gxi = (-(TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2)* | |
117 | ((-0.006077944*xi*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2), | |
cbd576a6 | 118 | 0.4750000000000001))/ |
386aef34 | 119 | TMath::Power(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475),2) - |
120 | (1.04*xi*(TMath::Power(xi,2) + TMath::Power(yi,2)))/ | |
121 | TMath::Power(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2),2))) - | |
122 | 4*xi*(TMath::Power(xi,2) + TMath::Power(yi,2))* | |
123 | (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475)) + | |
124 | 1./(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2))))/ | |
125 | TMath::Power(TMath::E(),TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2)* | |
126 | (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475)) + | |
127 | 1./(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2)))); | |
cbd576a6 | 128 | |
386aef34 | 129 | gxi = gxi*ei; |
cbd576a6 | 130 | |
386aef34 | 131 | //d(shape)/d(yi) |
132 | gyi = (-(TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2)* | |
133 | ((-0.006077944*yi*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2), | |
cbd576a6 | 134 | 0.4750000000000001))/ |
386aef34 | 135 | TMath::Power(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475),2) - |
136 | (1.04*yi*(TMath::Power(xi,2) + TMath::Power(yi,2)))/ | |
137 | TMath::Power(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2),2))) - | |
138 | 4*yi*(TMath::Power(xi,2) + TMath::Power(yi,2))* | |
139 | (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475)) + | |
140 | 1./(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2))))/ | |
141 | TMath::Power(TMath::E(),TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2)* | |
142 | (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),1.475)) + | |
143 | 1./(2.32 + 0.26*TMath::Power(TMath::Power(xi,2) + TMath::Power(yi,2),2)))); | |
144 | ||
145 | ||
146 | gyi = gyi*ei; | |
cbd576a6 | 147 | |
148 | } | |
149 | ||
150 | ||
151 | ||
152 | ||
153 | ||
154 | ||
155 |