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