1 /**************************************************************************
2 * Copyright(c) 1998-2002, 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 // Author : Mark Horner (LBL/UCT)
19 #include "AliEMCALHadronCorrectionv1.h"
20 #include "AliEMCALGeometry.h"
21 static Double_t par_look_up[HCPARAMETERS][HCPARAMETERSETS] =
23 {-1.68945e-04 , -1.68945e-04},
24 { 2.09684e-02 , 2.09684e-02},
25 {-1.45683e-04 , -1.45683e-04},
26 { 6.64803e-03 , 6.64803e-03},
27 { 2.00834e-02 , 2.00834e-02},
28 { 9.22074e-07 , 9.22074e-07}
33 ClassImp(AliEMCALHadronCorrectionv1)
35 AliEMCALHadronCorrectionv1* AliEMCALHadronCorrectionv1::fHadrCorr = 0;
37 void AliEMCALHadronCorrectionv1::SetGeometry(AliEMCALGeometry *geometry)
44 SetParameters(geometry->GetName());
49 void AliEMCALHadronCorrectionv1::SetGeometry(TString name)
52 name == "EMCAL_5655_21" ||
53 name == "EMCALArch1a" ||
54 name == "EMCALArch1aN" ||
55 name == "G56_2_55_19" ||
56 name == "G56_2_55_19_104_14" )
57 { // set parameters to this hadron correction
58 for (Int_t i=0;i<6;i++)
60 fPar[i] = par_look_up[i][0];
62 }else if( name == "EMCAL_6564_21" ||
63 name == "G65_2_64_19" )
65 for (Int_t i=0;i<6;i++)
67 fPar[i] = par_look_up[i][1];
71 printf("Geometry not defined in hadron correction\n");
77 AliEMCALHadronCorrectionv1::AliEMCALHadronCorrectionv1(const char *name,const char *title)
78 :AliEMCALHadronCorrection(name, title)
84 AliEMCALHadronCorrectionv1::AliEMCALHadronCorrectionv1(const char *name,const char *title,AliEMCALGeometry *geometry)
88 SetGeometry(geometry);
93 AliEMCALHadronCorrectionv1*
94 AliEMCALHadronCorrectionv1::Instance()
96 if (! fHadrCorr) new AliEMCALHadronCorrectionv1();
101 AliEMCALHadronCorrectionv1::GetEnergy(const Double_t pmom,const Double_t eta,const Int_t gid)
104 Double_t value = fPar[5]*pmom*pmom*pmom+ fPar[0]*pmom*pmom+fPar[1]*pmom +fPar[2]*pmom*eta +fPar[3]*eta + fPar[4];