]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/GammaConv/AliAnaConvCorrBase.h
Corrected end-of-line behavior
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliAnaConvCorrBase.h
1 /* This file is property of and copyright                                 *
2  * ALICE Experiment at CERN, All rights reserved.                         *
3  * See cxx source for full Copyright notice                               */
4
5 /// @file   AliAnaConvCorrPhoton.h
6 /// @author Svein Lindal
7 /// @brief  Base class for analysis of correlations between conversion particles and charged tracks
8
9 #ifndef ALIANACONVCORRBASE_CXX
10 #define ALIANACONVCORRBASE_CXX
11
12 #include "Rtypes.h"
13 #include "TMath.h"
14 #include "TList.h"
15 #include "TH1.h"
16 #include <THnSparse.h>
17
18 class AliAODConversionParticle;
19 class TClonesArray;
20 class TString;
21
22 class AliAnaConvCorrBase : public TNamed {
23
24 public:
25
26   
27
28   //Constructor / desctructor
29   AliAnaConvCorrBase(TString name, TString title); 
30   virtual ~AliAnaConvCorrBase();
31   
32   //CreateHistograms
33   void CreateBaseHistograms();
34   //To be overrriden by children. Should always call CreateBaseHistograms()
35   virtual void CreateHistograms();
36   
37   //Get list of histograms
38   TList * GetHistograms() const { return fHistograms;}
39
40   //Add histogram to list
41   void AddHistogram(TH1 * histogram) { fHistograms->Add(dynamic_cast<TObject*>(histogram));}
42
43   void AddAxis(TAxis * axis) { fAxesList.Add(axis); }
44
45   ///Get the distance in phi between trigger particle and correlated particle
46   Float_t GetDPhi(Float_t dPhi) { 
47     if ( dPhi < 3*TMath::PiOver2() && dPhi > - TMath::PiOver2() ) return dPhi;
48     else return ( (dPhi>0)? dPhi - TMath::TwoPi() : dPhi + TMath::TwoPi() ); 
49   }
50
51   void CorrelateWithTracks(AliAODConversionParticle * particle, TObjArray * tracks, const Int_t tIDs[4], Float_t cent, Float_t vtxz);
52   void FillCounters(TObjArray * particles, TObjArray * tracks, Float_t cent, Float_t vtxz);
53
54   TAxis& GetAxistPt()       { return fAxistPt;   }
55   TAxis& GetAxiscPt()       { return fAxiscPt;   }
56   TAxis& GetAxisdEta()      { return fAxisdEta;  }
57   TAxis& GetAxisdPhi()      { return fAxisdPhi;  }
58   TAxis& GetAxisIso()       { return fAxisIso;   }
59   TAxis& GetAxisCent()      { return fAxisCent;  }
60   TAxis& GetAxisZ()         { return fAxisZ;     }
61   TAxis& GetAxisTrigEta()   { return fAxisTrigEta; }
62   TAxis& GetAxisAssEta()    { return fAxisAssEta; }
63   TAxis& GetAxisMEPhi()     { return fAxisMEPhi; }
64
65   TList& GetAxisList()      { return fAxesList;  }
66   TList& GetTrackAxisList() { return fTrackAxisList; }
67   TList& GetTrigAxisList()  { return fTrigAxisList; }
68
69
70 protected:
71
72   THnSparseF * CreateSparse(TString name, TString title, TList * axes);
73
74 private:
75
76   void SetUpDefaultBins();
77   
78   //TString fName; //name of analysis
79   TList * fHistograms; //List of histograms
80   TList fAxesList;  //List over axes to be used in sparse
81   TList fTrigAxisList; //list
82   TList fTrackAxisList; //list
83
84   TAxis fAxistPt; //Pt axis
85   TAxis fAxiscPt; //correlated particle pt axis
86   TAxis fAxisdEta; //delta eta axis
87   TAxis fAxisdPhi; //delta phi axis
88   TAxis fAxisIso; //Isolated particle axis
89   TAxis fAxisCent; //Centrality
90   TAxis fAxisZ; //vtx
91   
92   TAxis fAxisTrigEta ; //Eta axis for ME
93   TAxis fAxisAssEta ; //Eta axis for ME
94   TAxis fAxisMEPhi ; //Phi axis for ME
95
96   THnSparseF * fCorrSparse; // Sparse for corr
97   THnSparseF * fTrigSparse; // ME Sparse
98   THnSparseF * fTrackSparse; //Track Sparse
99
100   //Default constructor prohibited
101   AliAnaConvCorrBase(); //not implemented
102   AliAnaConvCorrBase(const AliAnaConvCorrBase&); // not implemented
103   AliAnaConvCorrBase& operator=(const AliAnaConvCorrBase&); // not implemented
104
105   ClassDef(AliAnaConvCorrBase, 7); // example of analysis
106
107 };
108
109 #endif