Fix
[u/mrichter/AliRoot.git] / PHOS / AliPHOSDApi0mip.h
1 #ifndef AliPHOSDApi0mip_H
2 #define AliPHOSDApi0mip_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 // --
9 // --
10 // Implementation for TTree output in PHOS DA
11 // for calibrating energy by pi0 and MIP.
12 // --
13 // -- Author: Hisayuki Torii (Hiroshima Univ.)
14 // --
15
16
17 #include <time.h>
18
19 #include "TNamed.h"
20 #include "TH1I.h"
21 #include "TH1F.h"
22 #include "TH2F.h"
23 #include "TH3F.h"
24 #include "TFile.h"
25 #include "TTree.h"
26 #include "AliPHOSDATreeEvent.h"
27
28 class AliPHOSDApi0mip : public TNamed {
29  public:
30   AliPHOSDApi0mip(int module,int iterid=0,const char* fopt="RECREATE");
31   AliPHOSDApi0mip(const AliPHOSDApi0mip& da);
32   AliPHOSDApi0mip& operator= (const AliPHOSDApi0mip&);
33   ~AliPHOSDApi0mip();
34   
35   void NewEvent();
36   void FillDigit(float adc,int row,int col);
37   void SetTime(time_t& intime){fTime=intime;};
38   time_t GetTime(){return fTime;};
39   void FillTree(AliPHOSDATreeEvent* event=0);
40   void FillHist(AliPHOSDATreeEvent* event=0);
41   void Print(Option_t *option="") const;
42
43  private:
44   Bool_t CreateTree();
45   Bool_t CreateHist();
46   Bool_t fCreateTree;           //! Flag of tree initialization
47   Bool_t fCreateHist;           //! Flag of hist initialization
48   Int_t  fMod;                  // Module ID [0-4] ([2-4] for 2009)
49   Int_t  fIterId;               // Iteration step [0-*]
50   TFile* fTFile;                //! output file
51   TTree* fTTree;                //! output TTree
52   AliPHOSDATreeEvent* fEvent;   //! Contents of TTree
53   Bool_t fEventClustered;       //! Flag for
54   time_t fTime;                 // time
55   TH1I*  fH1Time;               // x:bin1=StartTime bin2=EndTime
56   TH1F*  fH1DigitNum;           // x:Number of digits
57   TH1F*  fH1ClusterNum;         // x:Number of clusters
58   TH2F*  fH2EneDigitId;         // x:DigitId[0-3583] y:Digit Energy
59   TH2F*  fH2MipDigitId;         // x:DigitId[0-3583] y:Cluster Energy
60   TH2F*  fH2Pi0DigitId;         // x:DigitId[0-3583] y:Cluster Pair Mass
61   TH3F*  fH3Pi0AsymPt;          // x:asym y:pT(GeV/c) z:Cluster Pair Mass
62
63   ClassDef(AliPHOSDApi0mip,1)
64 };
65 #endif