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 "AliJetHadronCorrectionv1.h"
31 ClassImp(AliJetHadronCorrectionv1)
33 Double_t AliJetHadronCorrectionv1::fgParLookup[HCPARAMETERS][HCPARAMETERSETS] =
35 {-2.82271e-4 , -2.39954e-4},
36 {2.50796e-2 , 2.07172e-2},
37 {1.02861e-3 , 1.48576e-3},
38 {2.11539e-2 , -1.38473-2},
39 {2.27003e-2 , 2.78252e-2},
40 {1.65078e-6 , 1.51821e-6}
43 AliJetHadronCorrectionv1* AliJetHadronCorrectionv1::fgHadrCorr = 0;
45 void AliJetHadronCorrectionv1::SetGeometry(AliJetDummyGeo *geometry)
47 // Initialise EMCAL geometry
51 fSamplingFraction = geometry->GetSampling();
52 cout<<"Setting the sampling fraction to :"<<fSamplingFraction<<endl;
55 SetParameters(geometry->GetName());
56 fSamplingFraction = geometry->GetSampling();
57 cout<<"Setting the sampling fraction to :"<<fSamplingFraction<<endl;
63 ###########################################################################
64 ###########################################################################
66 This will have to be modified with the inclusion of the new EMCAL geometry
67 That means I guess a new study of the hadron correction...
71 ###########################################################################
72 ###########################################################################
78 void AliJetHadronCorrectionv1::SetGeometry(TString name,Double_t fs)
80 // Initialise EMCAL geometry
81 cout << "Setting sampling fraction to "<<fSamplingFraction<<endl;
82 fSamplingFraction = fs;
84 name == "EMCAL_5655_21" ||
85 name == "EMCALArch1a" ||
86 name == "EMCALArch1aN" ||
87 name == "G56_2_55_19" ||
88 name == "G56_2_55_19_104_14" )
89 { // set parameters to this hadron correction
90 cout<<"HC parameters!"<<endl;
91 for (Int_t i=0;i<6;i++)
93 fPar[i] = fgParLookup[i][0];
96 }else if( name == "EMCAL_6564_21" ||
97 name == "G65_2_64_19" )
99 cout<<"HC parameters!"<<endl;
100 for (Int_t i=0;i<6;i++)
102 fPar[i] = fgParLookup[i][1];
103 cout <<fPar[i]<<endl;
107 printf("Geometry not defined in hadron correction\n");
112 AliJetHadronCorrectionv1::AliJetHadronCorrectionv1()
113 :AliJetHadronCorrection(),
118 AliJetHadronCorrectionv1::AliJetHadronCorrectionv1(const char *name,const char *title)
119 :AliJetHadronCorrection(name, title),
126 AliJetHadronCorrectionv1::AliJetHadronCorrectionv1(const char *name,const char *title,AliJetGeometry *geometry)
130 SetGeometry(geometry);
135 AliJetHadronCorrectionv1*
136 AliJetHadronCorrectionv1::Instance()
138 // return pointer to global instance. Instantiate if needed
139 if (! fgHadrCorr) new AliJetHadronCorrectionv1();
144 AliJetHadronCorrectionv1::GetEnergy(Double_t pmom, Double_t eta, Int_t /*gid*/)
146 // Return parametrised energy response
147 Double_t etai = TMath::Abs(eta);
148 Double_t value = fPar[5]*pmom*pmom*pmom+ fPar[0]*pmom*pmom+fPar[1]*pmom +fPar[2]*pmom*etai +fPar[3]*etai + fPar[4];
149 return fSamplingFraction*value;