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 */
8 //_________________________________________________________________________
9 // Top EMCAL folder - keep everyrhing for calibration task
11 //*-- Author: Aleksei Pavlinov (WSU, Detroit, USA)
13 // --- ROOT system ---
15 #include <TObjectSet.h>
18 class AliEMCALGeometry;
19 class AliEMCALSuperModule;
21 class AliESDCaloCluster;
22 class AliEMCALPi0SelectionParam;
23 class pi0SelectionParam;
24 class AliEMCALCalibData;
25 class AliEMCALCalibCoefs;
26 class AliEMCALRecPoint;
31 class AliEMCALFolder : public TObjectSet {
36 AliEMCALFolder(const char* name, const char* title="Top EMCAL folder", Bool_t putToBrowser=kFALSE);
37 AliEMCALFolder(const Int_t it, const char* title="Top EMCAL folder", Bool_t putToBrowser=kFALSE);
39 virtual ~AliEMCALFolder();
41 void Init(Bool_t putToBrowser=kFALSE);
43 Int_t GetIterationNumber() const {return fCounter;}
44 AliEMCALSuperModule* GetSuperModule(const Int_t nm);
45 TList* GetHists() {return fLhists;}
46 AliEMCALCell** GetListOfCells() {return fLofCells;}
47 AliEMCALCell* GetCell(const Int_t absId);
48 void SetCell(AliEMCALCell *cell, const Int_t absId);
49 AliEMCALPi0SelectionParam* GetPi0SelectionPar() {return fPi0SelPar;}
50 pi0SelectionParam* GetPi0SelectionParRow(Int_t nrow);
52 void FillPi0Candidate(const Double_t mgg, AliESDCaloCluster* cl1, AliESDCaloCluster* cl2);
53 void FillPi0Candidate(const Double_t mgg, Int_t absIdMax, Int_t nm);
55 void FitAllSMs(); // SM0 now
57 AliEMCALCalibCoefs* GetCCTable(const char* name);
58 AliEMCALCalibCoefs* GetCCFirst() {return GetCCTable(fgkCCFirstName.Data());}
59 AliEMCALCalibCoefs* GetCCIn() {return GetCCTable(fgkCCinName.Data());}
60 AliEMCALCalibCoefs* GetCCOut(){return GetCCTable(fgkCCoutName.Data());}
61 Int_t GetSMNumber(AliESDCaloCluster* cl);
62 // Recalibration staf - Jun 18,2007
63 static AliEMCALRecPoint *GetRecPoint(AliESDCaloCluster *cl,AliEMCALCalibCoefs *tOld,AliEMCALCalibCoefs *tNew, TList *l=0);
65 void Save(const char *fn = "EMCALFOLDER.root", const char *opt="RECREATE"); // *MENU*
66 static AliEMCALFolder* Read(const char *fn = "EMCALFOLDER.root", const char *opt="READ");
67 void InitAfterRead(); // *MENU*
68 void DrawQA(const int nsm=0); // *MENU*
69 void CreateCellNtuple(); // *MENU*
70 void CreateAndFillAdditionalHists(); // *MENU*
74 Int_t fCounter; // Coonter of iteration
76 AliEMCALGeometry *fGeometry; //
78 Int_t fNumOfCell; // number of cells as in geometry
80 TList* fLhists; //! for speed
81 AliEMCALCell** fLofCells; //! unifrom array of cells for fast access; invisible from browser
82 AliEMCALPi0SelectionParam* fPi0SelPar; // pi0 selection parameters
83 AliEMCALCalibData *fCalibData; //!
85 TNtuple *fCellNtuple; //! for quick cell anaylsis
88 static const TString fgkBaseFolderName; // base name of EMCAL Folder
89 static const TString fgkCCFirstName; // name of first calib.table
90 static const TString fgkCCinName; // name of initial calib.coefs. table
91 static const TString fgkCCoutName; // name of out calib.coefs. table
95 ClassDef(AliEMCALFolder,2) // EMCAL folder
99 #endif // ALIEMCALFOLDER_H