]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/AliAnaPi0.h
bugfix: correctly handle steering events in order to avoid warning 'Data source compo...
[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        Float_t fMinDist ;   //Minimal distance to bad channel to accept cluster
74        Float_t fMinDist2;   //Cuts on Minimal distance to study acceptance evaluation
75        Float_t fMinDist3;   //One more cut on distance used for acceptance-efficiency study
76        Float_t fDispCut;    //Cut on dispersion, used in PID evaluation
77        Float_t fTOFCut;     //Cut on TOF, used in PID evaluation
78        Float_t fPhotPID;    //Baesian PID for photon
79
80        Double_t fVert[3] ;   //Currecnt vertex position
81        TList ** fEventsList ;        //! containers for photons in stored events
82        TClonesArray * fCurrentEvent ; //!Container  with latest event
83
84        TList * fOutputList ; //list of output objects
85
86        //Histograms
87        TH3D * fhEtalon ; //Etalon histo, all distributions will have same binning as this one
88
89        TH3D ** fhRe1 ;  //!REAL two-photon invariant mass distribution for different centralities and PID 
90        TH3D ** fhMi1 ;  //!MIXED two-photon invariant mass distribution for different centralities and PID
91        TH3D ** fhRe2 ;  //!REAL two-photon invariant mass distribution for different centralities and PID 
92        TH3D ** fhMi2 ;  //!MIXED two-photon invariant mass distribution for different centralities and PID
93        TH3D ** fhRe3 ;  //!REAL two-photon invariant mass distribution for different centralities and PID 
94        TH3D ** fhMi3 ;  //!MIXED two-photon invariant mass distribution for different centralities and PID
95        TH3D * fhEvents;  //!Number of events per centrality, RP, zbin
96
97        //Calo Cells
98        ClassDef(AliAnaPi0,2)
99  } ;
100
101
102 #endif //ALIANAPI0_H
103
104
105