Changing to centrality dependent corrections
[u/mrichter/AliRoot.git] / ANALYSIS / TenderSupplies / AliPHOSTenderSupply.h
CommitLineData
fff7967a 1#ifndef ALIPHOSTENDERSUPPLY_H\r
2#define ALIPHOSTENDERSUPPLY_H\r
3\r
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
5 * See cxx source for full Copyright notice */\r
6\r
7////////////////////////////////////////////////////////////////////////\r
8// //\r
9// PHOS tender, apply corrections to PHOS clusters //\r
10// and do track matching //\r
11// Author : Dmitri Peressounko (RRC KI) //\r
12// //\r
13////////////////////////////////////////////////////////////////////////\r
14\r
15#include <AliTenderSupply.h>\r
16\r
17class TVector3;\r
18class AliPHOSGeometry;\r
19class AliPHOSCalibData ;\r
20class TH2I ;\r
21class AliVCluster ;\r
22class AliVCaloCells ;\r
23class AliAnalysisTaskSE ;\r
24\r
25class AliPHOSTenderSupply: public AliTenderSupply {\r
26 \r
27public:\r
28 AliPHOSTenderSupply();\r
29 AliPHOSTenderSupply(const char *name, const AliTender *tender=NULL);\r
30 virtual ~AliPHOSTenderSupply();\r
31\r
32 virtual void Init(){}\r
33 virtual void ProcessEvent();\r
34 \r
35 void SetTask(AliAnalysisTaskSE * task){fTask=task;} //if work with AOD and special task\r
36 \r
37 void SetNonlinearityVersion(const char * ver="Gustavo2005"){fNonlinearityVersion=ver;}\r
38 void SetNonlinearityParams(Int_t n, const Double_t * par){\r
39 if(n>10){printf("Only 10 parameters allowed \n"); return ;}\r
40 for(Int_t i=0;i<n;i++)fNonlinearityParams[i]=par[i]; }\r
41 void SetReconstructionPass(Int_t ipass=2){fRecoPass=ipass;}\r
42 \r
43 //If you want to override automatic choise of bad maps and calibration\r
44 void ForceUsingBadMap(const char * filename="alien:///alice/cern.ch/user/p/prsnko/BadMaps/BadMap_LHC10b.root") ;\r
45 void ForceUsingCalibration(const char * filename="alien:///alice/cern.ch/user/p/prsnko/Recalibrations/LHC10b_pass1.root") ;\r
46 void InitTender();\r
47\r
48protected:\r
49 AliPHOSTenderSupply(const AliPHOSTenderSupply&c);\r
50 AliPHOSTenderSupply& operator= (const AliPHOSTenderSupply&c);\r
51 void FindTrackMatching(Int_t mod,TVector3 *locpos,Double_t &dx, Double_t &dz, Double_t &pttrack, Int_t &charge); \r
52 Float_t CorrectNonlinearity(Float_t en) ;\r
53 Double_t TestCPV(Double_t dx, Double_t dz, Double_t pt, Int_t charge) ;\r
54 Double_t TestLambda(Double_t pt,Double_t l1,Double_t l2) ;\r
55 Bool_t IsGoodChannel(Int_t mod, Int_t ix, Int_t iz) ;\r
56 void CorrectPHOSMisalignment(TVector3 & globalPos, Int_t module);\r
57 void EvalLambdas(AliVCluster * clu, Double_t &m02, Double_t &m20) ;\r
58 Double_t EvalTOF(AliVCluster * clu,AliVCaloCells * cells); \r
59 Double_t CalibrateTOF(Double_t tof, Int_t absId, Bool_t isHG); \r
60 \r
61private:\r
62\r
63 TString fOCDBpass ; // Pass to OCDB recalibration object, local or alien\r
64 TString fNonlinearityVersion; // Version of non-linearity correction to aaply\r
65 AliPHOSGeometry *fPHOSGeo; // PHOS geometry\r
66 Double_t fNonlinearityParams[10] ; // Parameters for non-linearity calculation\r
67 TH2I * fPHOSBadMap[5] ; // Bad channels map\r
68 Int_t fRecoPass ; // Reconstruction pass\r
69 Bool_t fUsePrivateBadMap ;\r
70 Bool_t fUsePrivateCalib ;\r
71 \r
72 AliPHOSCalibData *fPHOSCalibData; // PHOS calibration object\r
73 AliAnalysisTaskSE *fTask; // analysis task\r
74\r
75 \r
76 ClassDef(AliPHOSTenderSupply, 2); // PHOS tender task\r
77};\r
78\r
79\r
80#endif\r
81\r
82\r