1 #ifndef ALIEMCALPI0CALIBRATION_H
2 #define ALIEMCALPI0CALIBRATION_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 /* $Id: AliEMCALPi0Calibration.h 21465 2007-10-16 14:38:13Z pavlinov $ */
8 //*-- Authors: Aleksei Pavlinov (WSU)
10 // Tuning parameters of coordinate calculations
11 // May 2008 - move to AliAnalysisTaskSE
13 #include "AliAnalysisTaskSE.h"
15 #include <TObjArray.h>
17 class AliEMCALGeometry;
20 class AliEMCALRecPoint;
21 class AliEMCALCellInfo;
22 class AliEMCALCellIndexes;
33 class AliEMCALPi0Calibration : public AliAnalysisTaskSE {
35 AliEMCALPi0Calibration();
36 AliEMCALPi0Calibration(const char* name);
37 //AliEMCALPi0Calibration(const AliAnalysisTaskSE& obj);
38 //AliEMCALPi0Calibration& operator=(const AliAnalysisTaskSE& other);
40 virtual ~AliEMCALPi0Calibration();
42 virtual void UserExec(const Option_t* opt);
44 void InitStructure(Int_t it);
45 static TList *DefineHistsOfRP(const char *name="RP", Double_t p=110.0, Int_t keyOpt=0);
46 static TList *DefineHistsOfKineVsRP(const char *name="KineVsRP", Double_t p=110.0, Int_t keyOpt=0);
47 static TList *DefineHistsForShowerProfile(const char *name="ProfY", Double_t p=1.);
48 static void FillHistsOfKineVsRP(TList *l, AliRunLoader* RL, TClonesArray &lvM);
49 static void FillHistsForShowerProfile(TList *l, AliEMCALRecPoint *rp, AliEMCALCellInfo* t);
50 static void EvalLocalPhiPosition(const Double_t wlog, const AliEMCALRecPoint *rp, const AliEMCALCellInfo* t, Double_t &xcog, Int_t &phiSize, AliEMCALCellIndexes &rMax);
52 TList *GetListKineVsRP() {return fLKineVsRP;}
53 TList *GetListShowerProfile() {return fLShowerProfile;}
54 // static TList *DefineHistsOfTowers(const char *name="towers");
56 void FitEffMassHist(); // *MENU*
57 void PrintInfo(); // *MENU*
59 void SetChain(TChain *chain) {fChain = chain;}
60 TChain* GetChain() {return fChain;}
61 void SetMomentum(Double_t p);
62 Double_t GetMomentum() const {return fPmom;}
64 AliEMCALFolder* CreateEmcalFolder(const Int_t it);
65 void SetEmcalFolder(AliEMCALFolder* folder);
66 void SetEmcalOldFolder(AliEMCALFolder* folder);
67 AliEMCALFolder* GetEmcalOldFolder(const Int_t nsm);
68 AliEMCALCellInfo* GetCellsInfo() {return fCellsInfo;}
70 void SetStringOfRunOpts(const char *st) {fRunOpts = st;}
71 TObjArray GetOptsArray() const {return fArrOpts;}
72 Int_t GetKeyOptsValue(Int_t key); // *MENU*
75 virtual void Browse(TBrowser* b);
76 virtual Bool_t IsFolder() const;
78 void Save(Int_t ver=0, const char *optIO="NEW"); // *MENU*
79 static AliEMCALPi0Calibration* ReadSelector(const char* nf = "/home/pavlinov/ALICE/SHISHKEBAB/RF/CALIB/PROF/PROFILE_0.root");
83 //// Pictures staf - Jun 26, 2007
85 void ReadAllEmcalFolders();
86 void PictVsIterNumber(const Int_t ind=0, const Int_t nsm=0);
88 TH1F* FitHistOfRecPointEnergy(const char *opt="CLONE");
89 static TCanvas *Linearity(TList *l, Int_t ifun=3);
90 static TCanvas *DrawKineVsRP(TList *l);
92 static TCanvas *DrawMeanVsLog(TH2F *h2);
94 TCanvas *DrawPhiEtaAnglesDistribution(const char *gn="SHISH_TRD1_CURRENT_2X2"); // *MENU*
96 TCanvas *DrawDeffVsEnergy(); // *MENU*
97 TCanvas *DrawDeffVsEnergy2(const char *opt="fit1"); // *MENU*
98 void ReadParsDeffAndW0(const char *dirName="/data/r22b/ALICE/CALIB/FIT/",
99 double *deff=0, double *edeff=0, double *w0=0, double *ew0=0, const Int_t pri=0);
100 TCanvas *DrawSpaceResolution();
102 static AliEMCALFolder* GetEmcalFolder() {return fgEMCAL;}
103 static AliEMCALFolder* GetEmcalOldFolder() {return fgEMCALOld;}
104 static void SetFitParameters(Double_t deff, Double_t w0, Double_t slope)
106 fgDistEff = deff; fgW0 = w0; fgSlopePhiShift = slope;
108 static void GetFitParameters(Double_t &deff, Double_t &w0, Double_t &slope)
110 deff = fgDistEff; w0 = fgW0; slope = fgSlopePhiShift;
112 void ResetAllListOfHists();
113 void ReloadChain(Long64_t entry=0);
114 void GetInitialParsForFit(const Int_t var, Double_t &deff, Double_t &w0, Double_t &phislope, const int phiCase=0);
117 static AliEMCALFolder* fgEMCAL; // current EMCAL object
118 static AliEMCALFolder* fgEMCALOld; // previous EMCAL object
120 static Double_t fgDistEff; // effective depth of electromagnetic shower
121 static Double_t fgW0; // parameter of log. methods
122 static Double_t fgSlopePhiShift; // phi shift of cluster = fSlopePhiShift * phi
124 Double_t fPmom; // positive if defined
126 TChain* fChain; //! chain if ESD files
127 TList* fLofHistsPC; // list of histograms of pseudo clusters
128 TList* fLofHistsRP; // list of histograms of rec.points
129 TList* fLKineVsRP; // list of histograms kinematics vs rec.points
130 TList* fLShowerProfile; // list of histograms for shower profile business
132 AliEMCALCellInfo *fCellsInfo; // pointer to current cell
133 TFolder* fEmcalPool; // folder of EMCAL objects
135 // Options - Jul 10, 2007
137 TString fRunOpts; // String of running options
138 TObjArray fArrOpts; // Array of options
140 TArrayI *fKeyOpts; // optins key; 0-disable, 1-enable
143 AliEMCALPi0Calibration(const AliEMCALPi0Calibration&);
144 AliEMCALPi0Calibration& operator=(const AliEMCALPi0Calibration&);
146 static AliEMCALGeometry* fgEmcalGeo; //! pointer to EMCAL geometry
147 static Int_t fgNmaxCell; //! max number of cells
148 static const Char_t **fgAnaOpt; //! aray of options
149 static Int_t fgNanaOpt; //! number of options
151 ClassDef(AliEMCALPi0Calibration, 1);