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 **************************************************************************/
16 //===============================================================
17 // To be modified for hadron correction using particle ID and track merging
18 // Author : magali.estienne@ires.in2p3.fr
19 //===============================================================
20 // Author : Mark Horner (LBL/UCT)
22 // --- Standard library ---
23 #include "Riostream.h"
26 // --- AliRoot header files ---
27 //#include "../EMCAL/AliJetGeometry.h"
28 #include "AliJetDummyGeo.h"
29 //#include "AliEMCALGeometry.h"
30 #include "AliJetHadronCorrectionv1.h"
32 ClassImp(AliJetHadronCorrectionv1)
34 Double_t AliJetHadronCorrectionv1::fgParLookup[HCPARAMETERS][HCPARAMETERSETS] =
36 {-2.82271e-4 , -2.39954e-4},
37 {2.50796e-2 , 2.07172e-2},
38 {1.02861e-3 , 1.48576e-3},
39 {2.11539e-2 , -1.38473-2},
40 {2.27003e-2 , 2.78252e-2},
41 {1.65078e-6 , 1.51821e-6}
44 AliJetHadronCorrectionv1* AliJetHadronCorrectionv1::fgHadrCorr = 0;
46 void AliJetHadronCorrectionv1::SetGeometry(AliJetDummyGeo *geometry)
48 // Initialise EMCAL geometry
52 fSamplingFraction = geometry->GetSampling();
53 cout<<"Setting the sampling fraction to :"<<fSamplingFraction<<endl;
56 SetParameters(geometry->GetName());
57 fSamplingFraction = geometry->GetSampling();
58 cout<<"Setting the sampling fraction to :"<<fSamplingFraction<<endl;
64 ###########################################################################
65 ###########################################################################
67 This will have to be modified with the inclusion of the new EMCAL geometry
68 That means I guess a new study of the hadron correction...
72 ###########################################################################
73 ###########################################################################
79 void AliJetHadronCorrectionv1::SetGeometry(TString name,Double_t fs)
81 // Initialise EMCAL geometry
82 cout << "Setting sampling fraction to "<<fSamplingFraction<<endl;
83 fSamplingFraction = fs;
85 name == "EMCAL_5655_21" ||
86 name == "EMCALArch1a" ||
87 name == "EMCALArch1aN" ||
88 name == "G56_2_55_19" ||
89 name == "G56_2_55_19_104_14" )
90 { // set parameters to this hadron correction
91 cout<<"HC parameters!"<<endl;
92 for (Int_t i=0;i<6;i++)
94 fPar[i] = fgParLookup[i][0];
97 }else if( name == "EMCAL_6564_21" ||
98 name == "G65_2_64_19" )
100 cout<<"HC parameters!"<<endl;
101 for (Int_t i=0;i<6;i++)
103 fPar[i] = fgParLookup[i][1];
104 cout <<fPar[i]<<endl;
108 printf("Geometry not defined in hadron correction\n");
114 AliJetHadronCorrectionv1::AliJetHadronCorrectionv1(const char *name,const char *title)
115 :AliJetHadronCorrection(name, title)
121 AliJetHadronCorrectionv1::AliJetHadronCorrectionv1(const char *name,const char *title,AliJetGeometry *geometry)
125 SetGeometry(geometry);
130 AliJetHadronCorrectionv1*
131 AliJetHadronCorrectionv1::Instance()
133 // return pointer to global instance. Instantiate if needed
134 if (! fgHadrCorr) new AliJetHadronCorrectionv1();
139 AliJetHadronCorrectionv1::GetEnergy(Double_t pmom, Double_t eta, Int_t /*gid*/)
141 // Return parametrised energy response
142 Double_t etai = TMath::Abs(eta);
143 Double_t value = fPar[5]*pmom*pmom*pmom+ fPar[0]*pmom*pmom+fPar[1]*pmom +fPar[2]*pmom*etai +fPar[3]*etai + fPar[4];
144 return fSamplingFraction*value;