1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 //_________________________________________________________________________
18 // Class for the management by the Emc reconstruction.
20 //*-- Author : Boris Polichtchouk (IHEP, Protvino) 6 Mar 2001
22 // --- ROOT system ---
24 // --- Standard library ---
28 // --- AliRoot header files ---
30 #include "AliPHOSRecEmcManager.h"
34 ClassImp(AliPHOSRecEmcManager)
36 //____________________________________________________________________________
38 AliPHOSRecEmcManager::AliPHOSRecEmcManager()
41 // fOneGamChisqCut = 3.;
42 fOneGamChisqCut = 1.3; // bvp 31.08.2001
44 fOneGamInitialStep = 0.00005;
46 fOneGamStepMin = 0.0005;
47 fOneGamNumOfIterations = 50;
49 fTwoGamInitialStep = 0.00005;
52 fTwoGamStepMin = 0.00005;
53 fTwoGamNumOfIterations = 50;
58 // fSqdCut = 0.5; // bvp 31.08.2001
61 SetTitle("Emc Reconstruction Manager");
65 AliPHOSRecEmcManager::~AliPHOSRecEmcManager(void) {}
67 Float_t AliPHOSRecEmcManager::Dispersion(Float_t Etot, Float_t Ai, Float_t Ei)
69 //"Dispresion" of energy deposition in the cell.
70 // Etot is the total shower energy, Ai is the
71 // calculated cell response,
72 // Ei is the measured cell response.
77 Float_t AliPHOSRecEmcManager::OneGamChi2(Float_t Ai, Float_t Ei, Float_t Etot, Float_t& Gi)
79 // Chi2 used in OneGam (one-gamma fitting).
80 // Gi is d(Chi2)/d(Ai).
83 Float_t D = Ei; // we assume that sigma(E) = sqrt(E)
90 Float_t AliPHOSRecEmcManager::TwoGamChi2(Float_t Ai, Float_t Ei, Float_t Etot, Float_t& Gi)
94 Float_t D = Ei; // we assume that sigma(E) = sqrt(E)
101 void AliPHOSRecEmcManager::AG(Float_t Ei, Float_t Xi, Float_t Yi, Float_t& Ai, Float_t& GXi, Float_t& GYi )
103 //Calculates amplitude (Ai) and gradients (GXi, GYi) of CPV pad response.
104 //Integrated response (total "shower energy") is E,
105 //Xi and Yi are the distances along x and y from reference point
106 // to the pad center.
107 //Shape of the shower is from PHOS TDR.
110 Float_t r = TMath::Sqrt(Xi*Xi + Yi*Yi);
111 Float_t r4 = r*r*r*r ;
112 Float_t r295 = TMath::Power(r, 2.95) ;
113 Float_t shape = Ei*TMath::Exp( -r4 * (1. / (2.32 + 0.26 * r4) + 0.0316 / (1 + 0.0652 * r295) ) ) ;
118 GXi = (-(TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2)*
119 ((-0.006077944*Xi*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),
120 0.4750000000000001))/
121 TMath::Power(1 + 0.0652*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),1.475),2) -
122 (1.04*Xi*(TMath::Power(Xi,2) + TMath::Power(Yi,2)))/
123 TMath::Power(2.32 + 0.26*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2),2))) -
124 4*Xi*(TMath::Power(Xi,2) + TMath::Power(Yi,2))*
125 (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),1.475)) +
126 1./(2.32 + 0.26*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2))))/
127 TMath::Power(TMath::E(),TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2)*
128 (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),1.475)) +
129 1./(2.32 + 0.26*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2))));
134 GYi = (-(TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2)*
135 ((-0.006077944*Yi*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),
136 0.4750000000000001))/
137 TMath::Power(1 + 0.0652*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),1.475),2) -
138 (1.04*Yi*(TMath::Power(Xi,2) + TMath::Power(Yi,2)))/
139 TMath::Power(2.32 + 0.26*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2),2))) -
140 4*Yi*(TMath::Power(Xi,2) + TMath::Power(Yi,2))*
141 (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),1.475)) +
142 1./(2.32 + 0.26*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2))))/
143 TMath::Power(TMath::E(),TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2)*
144 (0.0316/(1 + 0.0652*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),1.475)) +
145 1./(2.32 + 0.26*TMath::Power(TMath::Power(Xi,2) + TMath::Power(Yi,2),2))));