updates for running beamtest analysis within AliRoot - minor bug fixes still need...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALFolder.h
CommitLineData
16d3c94d 1#ifndef ALIEMCALFOLDER_H
2#define ALIEMCALFOLDER_H
3/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
dfa8c64c 6/* History of cvs commits:
7 *
8* $Log$
9* Revision 1.3 2007/10/16 14:36:39 pavlinov
10* fixed code violation (almost)
11*
12* Revision 1.2 2007/09/11 19:38:15 pavlinov
13* added pi0 calibration, linearity, shower profile
14*
15*/
16d3c94d 16
17//_________________________________________________________________________
0fc11500 18// Top EMCAL folder - keep everyrhing for calibration task
19// Initial version was created with TDataSet staf
20// TObjectSet -> TFolder; Sep 5, 2007
16d3c94d 21//
22//*-- Author: Aleksei Pavlinov (WSU, Detroit, USA)
23
24// --- ROOT system ---
25
0fc11500 26#include <TFolder.h>
16d3c94d 27#include <TString.h>
28
29class AliEMCALGeometry;
30class AliEMCALSuperModule;
31class AliEMCALCell;
32class AliESDCaloCluster;
33class AliEMCALPi0SelectionParam;
b217491f 34class AliEMCALPi0SelectionParRec;
16d3c94d 35class AliEMCALCalibData;
36class AliEMCALCalibCoefs;
37class AliEMCALRecPoint;
38
39class TList;
40class TNtuple;
41
0fc11500 42class AliEMCALFolder : public TFolder {
16d3c94d 43
44 public:
45
46 AliEMCALFolder();
47 AliEMCALFolder(const char* name, const char* title="Top EMCAL folder", Bool_t putToBrowser=kFALSE);
48 AliEMCALFolder(const Int_t it, const char* title="Top EMCAL folder", Bool_t putToBrowser=kFALSE);
49
50 virtual ~AliEMCALFolder();
51
52 void Init(Bool_t putToBrowser=kFALSE);
53 // Get methods
54 Int_t GetIterationNumber() const {return fCounter;}
55 AliEMCALSuperModule* GetSuperModule(const Int_t nm);
56 TList* GetHists() {return fLhists;}
57 AliEMCALCell** GetListOfCells() {return fLofCells;}
58 AliEMCALCell* GetCell(const Int_t absId);
59 void SetCell(AliEMCALCell *cell, const Int_t absId);
b217491f 60 AliEMCALPi0SelectionParam* GetPi0SelectionPar() {return fPi0SelPar;}
61 AliEMCALPi0SelectionParRec* GetPi0SelectionParRow(Int_t nrow);
16d3c94d 62
63 void FillPi0Candidate(const Double_t mgg, AliESDCaloCluster* cl1, AliESDCaloCluster* cl2);
64 void FillPi0Candidate(const Double_t mgg, Int_t absIdMax, Int_t nm);
65 // Define CC
66 void FitAllSMs(); // SM0 now
0fc11500 67 // Service routine
b217491f 68 AliEMCALCalibCoefs* GetCCTable(const char* name) const;
16d3c94d 69 AliEMCALCalibCoefs* GetCCFirst() {return GetCCTable(fgkCCFirstName.Data());}
70 AliEMCALCalibCoefs* GetCCIn() {return GetCCTable(fgkCCinName.Data());}
71 AliEMCALCalibCoefs* GetCCOut(){return GetCCTable(fgkCCoutName.Data());}
72 Int_t GetSMNumber(AliESDCaloCluster* cl);
73 // Recalibration staf - Jun 18,2007
0fc11500 74 static AliEMCALRecPoint *GetRecPoint(AliESDCaloCluster *cl,AliEMCALCalibCoefs *tOld,AliEMCALCalibCoefs *tNew,
75 TList *l=0, Double_t deff=-1., Double_t w0=-1., Double_t phiSlope=0.0);
16d3c94d 76 // MENU
77 void Save(const char *fn = "EMCALFOLDER.root", const char *opt="RECREATE"); // *MENU*
b217491f 78 static AliEMCALFolder* ReadFolder(const char *fn = "EMCALFOLDER.root", const char *opt="READ");
16d3c94d 79 void InitAfterRead(); // *MENU*
80 void DrawQA(const int nsm=0); // *MENU*
81 void CreateCellNtuple(); // *MENU*
82 void CreateAndFillAdditionalHists(); // *MENU*
83
b217491f 84 static const TString GetBaseFolderName() {return fgkBaseFolderName;}
85 static const TString GetCCinName() {return fgkCCinName;}
16d3c94d 86 protected:
87 TList* BookHists();
0fc11500 88 Int_t fCounter; // Counter of iteration
16d3c94d 89 //
b217491f 90 AliEMCALGeometry *fGeometry; // pointer to EMCAL geometry
16d3c94d 91 //
92 Int_t fNumOfCell; // number of cells as in geometry
93
94 TList* fLhists; //! for speed
95 AliEMCALCell** fLofCells; //! unifrom array of cells for fast access; invisible from browser
96 AliEMCALPi0SelectionParam* fPi0SelPar; // pi0 selection parameters
97 AliEMCALCalibData *fCalibData; //!
98 //
99 TNtuple *fCellNtuple; //! for quick cell anaylsis
100
16d3c94d 101 static const TString fgkBaseFolderName; // base name of EMCAL Folder
102 static const TString fgkCCFirstName; // name of first calib.table
103 static const TString fgkCCinName; // name of initial calib.coefs. table
104 static const TString fgkCCoutName; // name of out calib.coefs. table
0fc11500 105 static const TString fgkDirOfRootFiles; // name of directory for saving EMCAL folder
16d3c94d 106
b217491f 107 TList *fLobj; // list of all objects
108
0fc11500 109 void TestSMStruct(); // *MENU*
16d3c94d 110
b217491f 111 ClassDef(AliEMCALFolder,3) // EMCAL folder
16d3c94d 112
113};
114
115#endif // ALIEMCALFOLDER_H