AliPhysics  aaf9c62 (aaf9c62)
AliAnaConvCorrBase.h
Go to the documentation of this file.
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 
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 
19 class TClonesArray;
20 class TString;
21 
22 class AliAnaConvCorrBase : public TNamed {
23 
24 public:
25 
26 
27 
28  //Constructor / desctructor
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 
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; }
63  TAxis& GetAxisMEPhi() { return fAxisMEPhi; }
64 
65  TList& GetAxisList() { return fAxesList; }
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
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
THnSparseF * CreateSparse(TString name, TString title, TList *axes)
const char * title
Definition: MakeQAPdf.C:27
Float_t GetDPhi(Float_t dPhi)
Get the distance in phi between trigger particle and correlated particle.
TList * GetHistograms() const
void AddHistogram(TH1 *histogram)
virtual void CreateHistograms()
THnSparseF * fTrigSparse
int Int_t
Definition: External.C:63
void FillCounters(TObjArray *particles, TObjArray *tracks, Float_t cent, Float_t vtxz)
float Float_t
Definition: External.C:68
THnSparseF * fCorrSparse
void AddAxis(TAxis *axis)
AliAnaConvCorrBase & operator=(const AliAnaConvCorrBase &)
THnSparseF * fTrackSparse
Definition: External.C:196
void CorrelateWithTracks(AliAODConversionParticle *particle, TObjArray *tracks, const Int_t tIDs[4], Float_t cent, Float_t vtxz)