]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/vertexingHF/AliAnalysisTaskSESelectHF4Prong.h
Flow afterburner for D mesons (Giacomo)
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliAnalysisTaskSESelectHF4Prong.h
1 #ifndef ALIANALYSISTASKSESELECTHF4PRONG_H
2 #define ALIANALYSISTASKSESELECTHF4PRONG_H
3
4 /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 //*************************************************************************
8 // Class AliAnalysisTaskSESelectHF4Prong
9 // AliAnalysisTaskSE for the selection of heavy-flavour decay candidates
10 // and creation of a stand-alone AOD for 4prong D0 decay
11 // Author: A.Dainese, andrea.dainese@lnl.infn.it
12 //         F.Colamaria, fabio.colamaria@ba.infn.it
13 //*************************************************************************
14
15 #include <TROOT.h>
16 #include <TSystem.h>
17 #include <TH1F.h>\r
18 #include <TH2F.h>
19 #include <TList.h>
20 #include <TClonesArray.h>
21 #include <TChain.h>
22
23 #include "AliAnalysisTaskSE.h"
24 #include "AliRDHFCutsD0toKpipipi.h"
25 #include "AliAODMCParticle.h"
26 class AliAODEvent;\r
27 class AliAnalysisManager;
28 class AliAnalysisVertexingHF;
29 class AliRDHFCuts;
30
31 class AliAnalysisTaskSESelectHF4Prong : public AliAnalysisTaskSE
32 {
33  public:
34
35   AliAnalysisTaskSESelectHF4Prong();
36   AliAnalysisTaskSESelectHF4Prong(const char *name,AliRDHFCutsD0toKpipipi* cuts);
37   virtual ~AliAnalysisTaskSESelectHF4Prong();
38
39   // Implementation of interface methods
40   virtual void UserCreateOutputObjects();
41   virtual void Init();
42   virtual void LocalInit() {Init();}
43   virtual void UserExec(Option_t *option);
44   virtual void Terminate(Option_t *option);
45
46   void SetPtBinH(Double_t* ptlimits);
47   void PrintPtBinHandMCFlag();
48   void SetMCTruth(int flag) {fMCTruth = flag;};
49   Int_t GetMCTruth() const {return fMCTruth;}
50   
51   void AnalysisReflection(AliAODEvent* aodIn, AliAODRecoDecayHF4Prong* d, Int_t hyp01, Int_t hyp02, Int_t hyp03, Int_t hyp04);
52   Int_t StudyMCTruth(TClonesArray* mcArray, AliAODRecoDecayHF4Prong* d);
53   void FillReflHistos(AliAODRecoDecayHF4Prong* d, Int_t hyp01, Int_t hyp02, Int_t hyp03, Int_t hyp04, Int_t flagLayer1, Int_t flagLayer2, Int_t flagLayer3, Int_t flagLayer4);
54   void FillReflD0Histos(AliAODRecoDecayHF4Prong* d, Int_t hyp01, Int_t hyp02, Int_t hyp03, Int_t hyp04, Int_t flagLayforD0_1, Int_t flagLayforD0_2, Int_t flagLayforD0_3, Int_t flagLayforD0_4);
55   void FillReflD0barHistos(AliAODRecoDecayHF4Prong* d, Int_t hyp01, Int_t hyp02, Int_t hyp03, Int_t hyp04, Int_t flagLayforD0bar_1, Int_t flagLayforD0bar_2, Int_t flagLayforD0bar_3, Int_t flagLayforD0bar_4);
56  
57  private:
58
59   AliAnalysisTaskSESelectHF4Prong(const AliAnalysisTaskSESelectHF4Prong &source);
60   AliAnalysisTaskSESelectHF4Prong& operator=(const AliAnalysisTaskSESelectHF4Prong& source); 
61   TClonesArray *fVerticesHFTClArr;     //! Array of heavy-flavour vertices
62   TClonesArray *fCharm4ProngTClArr;        //! Array of D0->K3pi
63
64   Double_t fPtBinH[6];                        //bin i has pt between values i and i+1
65   Double_t fmassD0[2];                        //!To store invariant mass for D0 hypotheses
66   Double_t fmassD0bar[2];                     //!To store invariant mass for D0bar hypotheses
67   Int_t fSelected;                            //!Flag for selection of candidate
68   Int_t fMCTruth;                             //flag for MC truth analysis
69
70   TList *fOutput;                             //! list send on output slot 1
71   TList *fOutput2;                            //! list send on output slot 2
72   TList *fOutput3;                            //! list send on output slot 3
73   TList *fOutput4;                            //! list send on output slot 4
74   TList *fOutput5;                            //! list send on output slot 5
75   TList *fOutputC;                            //! list send on output slot 6
76
77   //output histograms\r
78   TH1F *fhInvMassD0Sum10MevBin1;                        //! Invariant mass D01+D02 (good hyp) 10Mev BIN1
79   TH1F *fhInvMassD0barSum10MevBin1;                     //! Invariant mass D0bar1+D0bar2 (good hyp) 10Mev
80   TH1F *fhInvMassSumAll10MevBin1;                       //! Invariant mass superimpose (good hyp only) 10Mev
81   TH1F *fhInvMassD0Sum5MevBin1;                         //! Invariant mass D01+D02 (good hyp) 5Mev
82   TH1F *fhInvMassD0barSum5MevBin1;                      //! Invariant mass D0bar1+D0bar2 (good hyp) 5Mev
83   TH1F *fhInvMassSumAll5MevBin1;                        //! Invariant mass superimpose (good hyp only) 5Mev
84
85   TH1F *fhInvMassD0Sum10MevBin2;                        //! Invariant mass D01+D02 (good hyp) 10Mev BIN2
86   TH1F *fhInvMassD0barSum10MevBin2;                     //! Invariant mass D0bar1+D0bar2 (good hyp) 10Mev
87   TH1F *fhInvMassSumAll10MevBin2;                       //! Invariant mass superimpose (good hyp only) 10Mev
88   TH1F *fhInvMassD0Sum5MevBin2;                         //! Invariant mass D01+D02 (good hyp) 5Mev
89   TH1F *fhInvMassD0barSum5MevBin2;                      //! Invariant mass D0bar1+D0bar2 (good hyp) 5Mev
90   TH1F *fhInvMassSumAll5MevBin2;                        //! Invariant mass superimpose (good hyp only) 5Mev
91
92   TH1F *fhInvMassD0Sum10MevBin3;                        //! Invariant mass D01+D02 (good hyp) 10Mev BIN3
93   TH1F *fhInvMassD0barSum10MevBin3;                     //! Invariant mass D0bar1+D0bar2 (good hyp) 10Mev
94   TH1F *fhInvMassSumAll10MevBin3;                       //! Invariant mass superimpose (good hyp only) 10Mev
95   TH1F *fhInvMassD0Sum5MevBin3;                         //! Invariant mass D01+D02 (good hyp) 5Mev
96   TH1F *fhInvMassD0barSum5MevBin3;                      //! Invariant mass D0bar1+D0bar2 (good hyp) 5Mev
97   TH1F *fhInvMassSumAll5MevBin3;                        //! Invariant mass superimpose (good hyp only) 5Mev
98
99   TH1F *fhInvMassD0Sum10MevBin4;                        //! Invariant mass D01+D02 (good hyp) 10Mev BIN4
100   TH1F *fhInvMassD0barSum10MevBin4;                     //! Invariant mass D0bar1+D0bar2 (good hyp) 10Mev
101   TH1F *fhInvMassSumAll10MevBin4;                       //! Invariant mass superimpose (good hyp only) 10Mev
102   TH1F *fhInvMassD0Sum5MevBin4;                         //! Invariant mass D01+D02 (good hyp) 5Mev
103   TH1F *fhInvMassD0barSum5MevBin4;                      //! Invariant mass D0bar1+D0bar2 (good hyp) 5Mev
104   TH1F *fhInvMassSumAll5MevBin4;                        //! Invariant mass superimpose (good hyp only) 5Mev
105
106   TH1F *fhInvMassD0Sum10MevBin5;                        //! Invariant mass D01+D02 (good hyp) 10Mev BIN5
107   TH1F *fhInvMassD0barSum10MevBin5;                     //! Invariant mass D0bar1+D0bar2 (good hyp) 10Mev
108   TH1F *fhInvMassSumAll10MevBin5;                       //! Invariant mass superimpose (good hyp only) 10Mev
109   TH1F *fhInvMassD0Sum5MevBin5;                         //! Invariant mass D01+D02 (good hyp) 5Mev
110   TH1F *fhInvMassD0barSum5MevBin5;                      //! Invariant mass D0bar1+D0bar2 (good hyp) 5Mev
111   TH1F *fhInvMassSumAll5MevBin5;                        //! Invariant mass superimpose (good hyp only) 5Mev
112
113   TH2F *fhReflBin1;                                     //! Analysis for reflection - Bin1
114   TH2F *fhReflBin2;                                     //! Analysis for reflection - Bin2
115   TH2F *fhReflBin3;                                     //! Analysis for reflection - Bin3
116   TH2F *fhReflBin4;                                     //! Analysis for reflection - Bin4
117   TH2F *fhReflBin5;                                     //! Analysis for reflection - Bin5
118   TH2F *fhReflD0Bin1;                                   //! Analysis for reflection - D0 study - Bin1
119   TH2F *fhReflD0Bin2;                                   //! Analysis for reflection - D0 study - Bin2
120   TH2F *fhReflD0Bin3;                                   //! Analysis for reflection - D0 study - Bin3
121   TH2F *fhReflD0Bin4;                                   //! Analysis for reflection - D0 study - Bin4
122   TH2F *fhReflD0Bin5;                                   //! Analysis for reflection - D0 study - Bin5
123   TH2F *fhReflD0barBin1;                                //! Analysis for reflection - D0bar study - Bin1
124   TH2F *fhReflD0barBin2;                                //! Analysis for reflection - D0bar study - Bin2
125   TH2F *fhReflD0barBin3;                                //! Analysis for reflection - D0bar study - Bin3
126   TH2F *fhReflD0barBin4;                                //! Analysis for reflection - D0bar study - Bin4
127   TH2F *fhReflD0barBin5;                                //! Analysis for reflection - D0bar study - Bin5
128
129   TH2F *fScatterP4PID;                                    //! K momentum vs like sign Pi momentum after PID
130   TH2F *fPtVsY;                                           //! Pt vs Y of selected candidates (by PPR cuts)
131   TH2F *fPtVsYAll;                                        //! Pt vs Y of all candidates
132
133   TH1F *fEventCounter;                                 //! Event Counter
134   TH1F *fCutDCA;                                       //! DCA histogram doubl.
135   TH1F *fCutDCA3;                                      //! DCA histogram trips
136   TH1F *fCutDCA2;                                      //! DCA histogram quads1
137   TH1F *fCutDCA5;                                      //! DCA histogram quads2
138   TH1F *fCutVertexDist2;                               //! Vertex doubl. to primary distance
139   TH1F *fCutVertexDist3;                               //! Vertex trips to primary distance
140   TH1F *fCutVertexDist4;                               //! Vertex quads to primary distance
141   TH1F *fCutCosinePoint;                               //! Cosine of pointing angle
142   TH1F *fCutPt;                                        //! Candidate D0 Pt
143   TH1F *fCutY;                                         //! Candidate D0 Y
144   TH1F *fPIDSel;                                       //! PID Selected
145   TH1F *fPIDSelBin1;                                   //! PID Selected Bin1
146   TH1F *fPIDSelBin2;                                   //! PID Selected Bin2
147   TH1F *fPIDSelBin3;                                   //! PID Selected Bin3
148   TH1F *fPIDSelBin4;                                   //! PID Selected Bin4
149   TH1F *fPIDSelBin5;                                   //! PID Selected Bin5
150   TH2F *fMultipleHyps;                                 //! Multiple hypotesis accepted counter
151   TH2F *fMultipleHypsType;                             //! Multiple hypotesis accepted counter
152
153   TH1F *fPtSel;                                        //! Pt of selected candidates
154  
155   AliRDHFCutsD0toKpipipi *fCuts;                        // Cuts container
156
157   ClassDef(AliAnalysisTaskSESelectHF4Prong,2); // AliAnalysisTaskSE for the reconstruction of heavy-flavour decay candidates
158 };
159
160 #endif
161