]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSRecEmcManager.cxx
coding conventions corections
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRecEmcManager.cxx
CommitLineData
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.
19//
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"
29#include "AliPHOS.h"
30#include "AliRun.h"
31
32ClassImp(AliPHOSRecEmcManager)
33
34//____________________________________________________________________________
35
36 AliPHOSRecEmcManager::AliPHOSRecEmcManager()
37{
38
39// fOneGamChisqCut = 3.;
40 fOneGamChisqCut = 1.3; // bvp 31.08.2001
41
42 fOneGamInitialStep = 0.00005;
43 fOneGamChisqMin = 1.;
44 fOneGamStepMin = 0.0005;
45 fOneGamNumOfIterations = 50;
46
47 fTwoGamInitialStep = 0.00005;
48 fTwoGamChisqMin = 1.;
49 fTwoGamEmin = 0.1;
50 fTwoGamStepMin = 0.00005;
51 fTwoGamNumOfIterations = 50;
52
53// fThr0 = 0.6;
54 fThr0 = 0.;
55// fSqdCut = 3.;
56// fSqdCut = 0.5; // bvp 31.08.2001
57 fSqdCut = 0.;
58
59 SetTitle("Emc Reconstruction Manager");
60
61}
62
63AliPHOSRecEmcManager::~AliPHOSRecEmcManager(void) {}
64
133fff9a 65Float_t AliPHOSRecEmcManager::Dispersion(Float_t Etot, Float_t Ai, Float_t Ei) const
cbd576a6 66{
67 //"Dispresion" of energy deposition in the cell.
68 // Etot is the total shower energy, Ai is the
69 // calculated cell response,
70 // Ei is the measured cell response.
71
72 return Ei;
73}
74
75Float_t AliPHOSRecEmcManager::OneGamChi2(Float_t Ai, Float_t Ei, Float_t Etot, Float_t& Gi)
76{
77 // Chi2 used in OneGam (one-gamma fitting).
78 // Gi is d(Chi2)/d(Ai).
79
80 Float_t da = Ai - Ei;
81 Float_t D = Ei; // we assume that sigma(E) = sqrt(E)
82 Gi = 2.*(Ai-Ei)/D;
83
84 return da*da/D;
85
86}
87
133fff9a 88Float_t AliPHOSRecEmcManager::TwoGamChi2(Float_t Ai, Float_t Ei, Float_t Etot, Float_t& Gi) const
cbd576a6 89{
90
91 Float_t da = Ai - Ei;
92 Float_t D = Ei; // we assume that sigma(E) = sqrt(E)
93 Gi = 2.*(Ai-Ei)/D;
94
95 return da*da/D;
96
97}
98
99void AliPHOSRecEmcManager::AG(Float_t Ei, Float_t Xi, Float_t Yi, Float_t& Ai, Float_t& GXi, Float_t& GYi )
100{
101 //Calculates amplitude (Ai) and gradients (GXi, GYi) of CPV pad response.
102 //Integrated response (total "shower energy") is E,
103 //Xi and Yi are the distances along x and y from reference point
104 // to the pad center.
105 //Shape of the shower is from PHOS TDR.
106
107
108 Float_t r = TMath::Sqrt(Xi*Xi + Yi*Yi);
109 Float_t r4 = r*r*r*r ;
110 Float_t r295 = TMath::Power(r, 2.95) ;
111 Float_t shape = Ei*TMath::Exp( -r4 * (1. / (2.32 + 0.26 * r4) + 0.0316 / (1 + 0.0652 * r295) ) ) ;
112 Ai = shape;
113
114
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),
118 0.4750000000000001))/
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))));
128
129 GXi = GXi*Ei;
130
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),
134 0.4750000000000001))/
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;
147
148}
149
150
151
152
153
154
155