Changed to new naming scheme for histograms, added functionality to the analysis...
[u/mrichter/AliRoot.git] / PWG4 / GammaConv / AliAnalysisTaskGammaConversion.h
1 #ifndef ALIANALYSISTASKGAMMACONVERSION_H\r
2 #define ALIANALYSISTASKGAMMACONVERSION_H\r
3  \r
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
5  * See cxx source for full Copyright notice                               */\r
6 \r
7 ////////////////////////////////////////////////\r
8 //--------------------------------------------- \r
9 // Class used to do analysis on conversion pairs\r
10 //---------------------------------------------\r
11 ////////////////////////////////////////////////\r
12  \r
13 #include "AliAnalysisTaskSE.h"\r
14 #include <vector>\r
15 #include "AliV0Reader.h"\r
16 #include "TNtuple.h"\r
17 \r
18 class AliGammaConversionHistograms;\r
19 class AliESDv0;\r
20 class AliKFParticle;\r
21 class AliESDInputHandler;\r
22 class AliESDEvent;\r
23 class AliAODEvent;\r
24 class TList;\r
25 class AliStack;\r
26 \r
27 class AliAnalysisTaskGammaConversion : public AliAnalysisTaskSE\r
28 {\r
29  public:\r
30   AliAnalysisTaskGammaConversion();\r
31   AliAnalysisTaskGammaConversion(const char* name);\r
32   virtual ~AliAnalysisTaskGammaConversion() ;// virtual destructor\r
33  \r
34   // Implementation of interface methods\r
35   virtual void UserCreateOutputObjects();\r
36   virtual void Init();\r
37   virtual void LocalInit() {Init();}\r
38   virtual void Exec(Option_t *option);\r
39   virtual void Terminate(Option_t *option);\r
40   virtual void ConnectInputData(Option_t *);\r
41         \r
42   void ProcessMCData();\r
43   void ProcessV0sNoCut();\r
44   void ProcessV0s();\r
45   void ProcessGammasForNeutralMesonAnalysis();\r
46   void SetHistograms(AliGammaConversionHistograms *histograms){fHistograms=histograms;}\r
47   void SetDoMCTruth(Bool_t flag){fDoMCTruth=flag;}\r
48   void SetElectronMass(Double_t electronMass){fElectronMass = electronMass;}\r
49   void SetGammaMass(Double_t gammaMass){fGammaMass = gammaMass;}\r
50   void SetGammaWidth(Double_t gammaWidth){fGammaWidth = gammaWidth;}\r
51   void SetPi0Mass(Double_t pi0Mass){fPi0Mass = pi0Mass;}\r
52   void SetPi0Width(Double_t pi0Width){fPi0Width = pi0Width;}\r
53   void SetEtaMass(Double_t etaMass){fEtaMass = etaMass;}\r
54   void SetEtaWidth(Double_t etaWidth){fEtaWidth = etaWidth;}\r
55   void SetMinOpeningAngleGhostCut(Double_t ghostCut){fMinOpeningAngleGhostCut = ghostCut;}\r
56   void SetV0Reader(AliV0Reader* reader){fV0Reader=reader;}\r
57   void SetCalculateBackground(Bool_t bg){fCalculateBackground=bg;}\r
58   void CalculateBackground();\r
59   void SetWriteNtuple(Bool_t writeNtuple){fWriteNtuple = writeNtuple;}\r
60   void FillNtuple();\r
61   Double_t GetMCOpeningAngle(TParticle* daughter0, TParticle* daughter1) const;\r
62 \r
63  private:\r
64   AliAnalysisTaskGammaConversion(const AliAnalysisTaskGammaConversion&); // Not implemented\r
65   AliAnalysisTaskGammaConversion& operator=(const AliAnalysisTaskGammaConversion&); // Not implemented\r
66 \r
67   AliV0Reader* fV0Reader;\r
68 \r
69   AliStack * fStack;\r
70 \r
71   TList * fOutputContainer ; // Histogram container\r
72 \r
73   AliGammaConversionHistograms *fHistograms;\r
74 \r
75   Bool_t fDoMCTruth;\r
76     \r
77   vector<TParticle*> fMCAllGammas;\r
78   vector<TParticle*> fMCPi0s;\r
79   vector<TParticle*> fMCEtas;\r
80   vector<TParticle*> fMCGammaChic;\r
81 \r
82   vector<AliKFParticle> fKFReconstructedGammas;\r
83   vector<Bool_t> fIsTrueReconstructedGammas;\r
84   vector<Int_t> electronv1;\r
85   vector<Int_t> electronv2;\r
86 \r
87   //mass defines\r
88   Double_t fElectronMass;\r
89   Double_t fGammaMass;\r
90   Double_t fPi0Mass;\r
91   Double_t fEtaMass;\r
92 \r
93   // width defines\r
94   Double_t fGammaWidth;\r
95   Double_t fPi0Width;\r
96   Double_t fEtaWidth;\r
97 \r
98   Double_t fMinOpeningAngleGhostCut;\r
99 \r
100   Bool_t fCalculateBackground;\r
101   Bool_t fWriteNtuple;\r
102   TNtuple *fGammaNtuple;\r
103   TNtuple *fNeutralMesonNtuple;\r
104 \r
105   Int_t fTotalNumberOfAddedNtupleEntries;\r
106 \r
107   ClassDef(AliAnalysisTaskGammaConversion, 2); // Analysis task for gamma conversions\r
108 };\r
109  \r
110 #endif //ALIANALYSISTASKGAMMA_H\r