]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/AliAnaPi0.h
Corrected two bugs found by Sergey regarding the error calculation.
[u/mrichter/AliRoot.git] / PWG4 / AliAnaPi0.h
1 #ifndef ALIANAPI0_H
2 #define ALIANAPI0_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5 /* $Id: $ */
6
7 //_________________________________________________________________________
8 // Class to fill two-photon invariant mass hisograms 
9 // to be used to extract pi0 raw yield.
10 //
11 //-- Author: Dmitri Peressounko (RRC "KI")
12
13 class TH3D ;
14 class AliAODEvent ;
15 class AliESDEvent ;
16
17 #include "AliAnalysisTaskSE.h"
18  
19 class AliAnaPi0 : public AliAnalysisTaskSE {
20        
21   public: 
22        
23     AliAnaPi0() ; // default ctor
24     AliAnaPi0(const char *name) ; // default ctor
25     AliAnaPi0(const AliAnaPi0 & g) ; // cpy ctor
26     AliAnaPi0 & operator = (const AliAnaPi0 & api0) ;//cpy assignment
27     virtual ~AliAnaPi0() ;//virtual dtor
28               
29     //obligatory methods
30     virtual void UserCreateOutputObjects();
31     virtual void Init() ;
32     virtual void LocalInit() { Init() ; }
33     virtual void UserExec(Option_t * opt = "") ;
34     virtual void Terminate(Option_t * opt = "") ;
35  
36     void InitParameters();
37     void Print(const Option_t * opt) const;
38
39     void SetBadRunsList(){} ;     //Set list of runs which can be used for this analysis
40     void SetEtalonHisto(TH3D * h);//Provide etalon of binning for histograms
41
42     //Setters for parameters of event buffers
43     void SetNCentrBin(Int_t n=5){fNCentrBin=n ;} //number of bins in centrality 
44     void SetNZvertBin(Int_t n=5){fNZvertBin=n ;} //number of bins for vertex position
45     void SetNRPBin(Int_t n=6)   {fNrpBin=n ;}    //number of bins in reaction plain
46     void SetNMaxEvMix(Int_t n=20){fNmaxMixEv=n ;}//Maximal number of events for mixing
47  
48     //Setters for event selection
49     void SetZvertexCut(Float_t zcut=40.){fZvtxCut=zcut ;} //cut on vertex position
50     void SetPtMin(Float_t pt = 0.2) {fPtMin=pt ;} //Cut on minimal pt of photon
51
52  private:
53     void FillHistograms() ; //fill invariant mass distributions
54     Bool_t FillFromAOD(AliAODEvent * aod) ;
55     Bool_t FillFromESD(AliESDEvent * esd) ;
56
57     Bool_t IsBadRun(Int_t /*iRun*/) {return kFALSE;} //Tests if this run bad according to private list
58
59  private:
60  
61        Int_t fNCentrBin ;   //number of bins in event container for centrality
62        Int_t fNZvertBin ;   //number of bins in event container for vertex position
63        Int_t fNrpBin ;      //number of bins in event container for reaction plain
64        Int_t fNPID ;        //Number of possible PID combinations
65        Int_t fNmaxMixEv ;   //Maximal number of events stored in buffer for mixing
66
67        Int_t fCurCentrBin ; //! bin for current event (centrality)
68        Int_t fCurZvertBin ; //! bin for current event (z position)
69        Int_t fCurRPBin ;    //! bin for current event (reaction plain)
70
71        Float_t fPtMin ;     //Cut on minimum photon Pt
72        Float_t fZvtxCut ;   //Cut on vertex position
73        Double_t fVert[3] ;   //Currecnt vertex position
74        TList ** fEventsList ;        //! containers for photons in stored events
75        TClonesArray * fCurrentEvent ; //!Container  with latest event
76
77        TList * fOutputList ; //list of output objects
78
79        //Histograms
80        TH3D * fhEtalon ; //!Etalon histo, all distributions will have same binning as this one
81
82        TH3D ** fhRe1 ;  //!REAL two-photon invariant mass distribution for different centralities and PID 
83        TH3D ** fhMi1 ;  //!MIXED two-photon invariant mass distribution for different centralities and PID
84        TH3D ** fhRe2 ;  //!REAL two-photon invariant mass distribution for different centralities and PID 
85        TH3D ** fhMi2 ;  //!MIXED two-photon invariant mass distribution for different centralities and PID
86        TH3D ** fhRe3 ;  //!REAL two-photon invariant mass distribution for different centralities and PID 
87        TH3D ** fhMi3 ;  //!MIXED two-photon invariant mass distribution for different centralities and PID
88        TH3D * fhEvents;  //!Number of events per centrality, RP, zbin
89
90        //Calo Cells
91        ClassDef(AliAnaPi0,1)
92  } ;
93
94
95 #endif //ALIANAPI0_H
96
97
98