1 #ifndef ALIEMCALRECPOINTSQAESDSELECTOR_H
2 #define ALIEMCALRECPOINTSQAESDSELECTOR_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //*-- Authors: Aleksei Pavlinov (WSU)
10 // Tuning parameters of coordinate calculations
12 #include "AliSelector.h"
14 #include <TObjArray.h>
16 class AliEMCALGeometry;
19 class AliEMCALRecPoint;
20 class AliEMCALCellInfo;
32 class AliEMCALRecPointsQaESDSelector : public AliSelector {
34 AliEMCALRecPointsQaESDSelector();
35 virtual ~AliEMCALRecPointsQaESDSelector();
37 virtual void Begin(TTree* tree);
38 virtual void SlaveBegin(TTree* tree);
39 virtual void Init(TTree *tree);
40 virtual Bool_t Notify();
41 virtual Bool_t Process(Long64_t entry);
42 virtual void SlaveTerminate();
43 virtual void Terminate();
45 void InitStructure(Int_t it);
46 static TList *DefineHistsOfRP(const char *name="RP", Double_t p=110.0, Int_t keyOpt=0);
47 static TList *DefineHistsOfKineVsRP(const char *name="KineVsRP", Double_t p=110.0, Int_t keyOpt=0);
48 static TList *DefineHistsForShowerProfile(const char *name="ProfY", Double_t p=1.);
49 static void FillHistsOfKineVsRP(TList *l, AliRunLoader* RL, TClonesArray &lvM);
50 static void FillHistsForShowerProfile(TList *l, AliEMCALRecPoint *rp, AliEMCALCellInfo* t);
51 static void EvalLocalPhiPosition(const Double_t wlog, const AliEMCALRecPoint *rp, const AliEMCALCellInfo* t, Double_t &xcog, Int_t &phiSize, cellInfo &rMax);
53 TList *GetListKineVsRP() {return fLKineVsRP;}
54 TList *GetListShowerProfile() {return fLShowerProfile;}
55 // static TList *DefineHistsOfTowers(const char *name="towers");
57 void FitEffMassHist(); // *MENU*
58 void PrintInfo(); // *MENU*
60 void SetChain(TChain *chain) {fChain = chain;}
61 TChain* GetChain() {return fChain;}
62 void SetMomentum(Double_t p);
63 Double_t GetMomentum() const {return fPmom;}
65 AliEMCALFolder* CreateEmcalFolder(const Int_t it);
66 void SetEmcalFolder(AliEMCALFolder* folder);
67 void SetEmcalOldFolder(AliEMCALFolder* folder);
68 AliEMCALFolder* GetEmcalOldFolder(const Int_t nsm);
69 AliEMCALCellInfo* GetCellsInfo() {return fCellsInfo;}
71 void SetStringOfRunOpts(const char *st) {fRunOpts = st;}
72 TObjArray GetOptsArray() const {return fArrOpts;}
73 Int_t GetKeyOptsValue(Int_t key); // *MENU*
76 virtual void Browse(TBrowser* b);
77 virtual Bool_t IsFolder() const;
79 void Save(Int_t ver=0, const char *optIO="NEW"); // *MENU*
80 static AliEMCALRecPointsQaESDSelector* ReadSelector(const char* nf = "/home/pavlinov/ALICE/SHISHKEBAB/RF/CALIB/PROF/PROFILE_0.root");
84 //// Pictures staf - Jun 26, 2007
86 void ReadAllEmcalFolders();
87 void PictVsIterNumber(const Int_t ind=0, const Int_t nsm=0);
89 TH1F* FitHistOfRecPointEnergy(const char *opt="CLONE");
90 static TCanvas *Linearity(TList *l, Int_t ifun=3);
91 static TCanvas *DrawKineVsRP(TList *l);
93 static TCanvas *DrawMeanVsLog(TH2F *h2);
95 TCanvas *DrawPhiEtaAnglesDistribution(const char *gn="SHISH_TRD1_CURRENT_2X2"); // *MENU*
97 TCanvas *DrawDeffVsEnergy(); // *MENU*
98 TCanvas *DrawDeffVsEnergy2(const char *opt="fit1"); // *MENU*
99 void ReadParsDeffAndW0(const char *dirName="/data/r22b/ALICE/CALIB/FIT/",
100 double *deff=0, double *edeff=0, double *w0=0, double *ew0=0, const Int_t pri=0);
101 TCanvas *DrawSpaceResolution();
103 static AliEMCALFolder* GetEmcalFolder() {return fgEMCAL;}
104 static AliEMCALFolder* GetEmcalOldFolder() {return fgEMCALOld;}
105 static void SetFitParameters(Double_t deff, Double_t w0, Double_t slope)
107 fgDistEff = deff; fgW0 = w0; fgSlopePhiShift = slope;
109 static void GetFitParameters(Double_t &deff, Double_t &w0, Double_t &slope)
111 deff = fgDistEff; w0 = fgW0; slope = fgSlopePhiShift;
113 void ResetAllListOfHists();
114 void ReloadChain(Long64_t entry=0);
115 void GetInitialParsForFit(const Int_t var, Double_t &deff, Double_t &w0, Double_t &phislope, const int phiCase=0);
118 static AliEMCALFolder* fgEMCAL; // current EMCAL object
119 static AliEMCALFolder* fgEMCALOld; // previous EMCAL object
121 static Double_t fgDistEff; // effective depth of electromagnetic shower
122 static Double_t fgW0; // parameter of log. methods
123 static Double_t fgSlopePhiShift; // phi shift of cluster = fSlopePhiShift * phi
125 Double_t fPmom; // positive if defined
127 TChain* fChain; //! chain if ESD files
128 TList* fLofHistsPC; // list of histograms of pseudo clusters
129 TList* fLofHistsRP; // list of histograms of rec.points
130 TList* fLKineVsRP; // list of histograms kinematics vs rec.points
131 TList* fLShowerProfile; // list of histograms for shower profile business
133 AliEMCALCellInfo *fCellsInfo; // pointer to current cell
134 TFolder* fEmcalPool; // folder of EMCAL objects
136 // Options - Jul 10, 2007
138 TString fRunOpts; // String of running options
139 TObjArray fArrOpts; // Array of options
141 TArrayI *fKeyOpts; // optins key; 0-disable, 1-enable
144 AliEMCALRecPointsQaESDSelector(const AliEMCALRecPointsQaESDSelector&);
145 AliEMCALRecPointsQaESDSelector& operator=(const AliEMCALRecPointsQaESDSelector&);
147 static AliEMCALGeometry* fgEmcalGeo; // pointer to EMCAL geometry
148 static Int_t fgNmaxCell; // max number of cells
149 static Char_t **fgAnaOpt; // aray of options
150 static Int_t fgNanaOpt; // number of options
152 ClassDef(AliEMCALRecPointsQaESDSelector, 2);