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