]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/vertexingHF/AliAnalysisTaskSEDStarSpectra.h
e2c7055586c8f6f8cb7c60dbd53af8aa8838deb2
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliAnalysisTaskSEDStarSpectra.h
1 #ifndef ALIANALYSISTASKSEDSTARSPECTRA_H
2 #define ALIANALYSISTASKSEDSTARSPECTRA_H
3 /**************************************************************************
4  * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5  *                                                                        *
6  * Author: The ALICE Off-line Project.                                    *
7  * Contributors are mentioned in the code where appropriate.              *
8  *                                                                        *
9  * Permission to use, copy, modify and distribute this software and its   *
10  * documentation strictly for non-commercial purposes is hereby granted   *
11  * without fee, provided that the above copyright notice appears in all   *
12  * copies and that both the copyright notice and this permission notice   *
13  * appear in the supporting documentation. The authors make no claims     *
14  * about the suitability of this software for any purpose. It is          *
15  * provided "as is" without express or implied warranty.                  *
16  **************************************************************************/
17
18 #include <TH2F.h>
19 #include "TROOT.h"
20 #include "TSystem.h"
21
22 #include "AliAnalysisTaskSE.h"
23 #include "AliAODEvent.h"
24 #include "AliPID.h"
25 #include "AliRDHFCutsDStartoKpipi.h"
26
27
28 class AliAnalysisTaskSEDStarSpectra : public AliAnalysisTaskSE 
29 {
30   
31  public:
32   
33   AliAnalysisTaskSEDStarSpectra();
34   AliAnalysisTaskSEDStarSpectra(const Char_t* name,AliRDHFCutsDStartoKpipi* cuts);
35   virtual ~AliAnalysisTaskSEDStarSpectra();
36
37   // Implementation of interface methods  
38   virtual void UserCreateOutputObjects();
39   virtual void Init();
40   virtual void LocalInit() {Init();}
41   virtual void UserExec(Option_t *option);
42   virtual void Terminate(Option_t *option);
43  
44   //Background simulation
45   void     SideBandBackground(AliAODRecoCascadeHF *part, Bool_t PIDon, Int_t nSigma, AliRDHFCutsDStartoKpipi *cuts, TList *listout);
46   void     WrongSignForDStar(AliAODRecoCascadeHF *part, Bool_t PIDon, Int_t nSigma, AliRDHFCutsDStartoKpipi *cuts, TList *listout);
47   //cuts
48   Bool_t   SingleTrackSelections(const AliAODRecoDecayHF2Prong* theD0particle, const AliAODTrack *track2);
49   Bool_t   SelectPID(const AliAODTrack *track, AliPID::EParticleType pid, Double_t nsig);
50   Bool_t   SelectTOFPID(const AliAODRecoDecayHF2Prong* d, const AliAODTrack *tracksoft);
51   // histos
52   void   FillSpectrum(AliAODRecoCascadeHF *part, Int_t isDStar, Bool_t PIDon, Int_t nSigma, AliRDHFCutsDStartoKpipi *cuts, TList *listout);
53   void     DefineHistograms();
54   // set analysis type
55   void     SetAnalysisType(Int_t anaType) {fAnalysis = anaType;}
56   void     PrintAnalysisType() {printf("Analysis type: %d\n(0: Heidelberg\t1: Utrecht)",fAnalysis);}
57
58   // kaon PID
59   void     SetPID(Bool_t usePID) {fPID = usePID;}
60   Int_t    GetPID() const {return fPID;}
61   // Set N sigmas for PID
62   void     SetNSigmasPID(Int_t numberOfSigmasPID) {fNSigma = numberOfSigmasPID;}
63   Int_t    GetNSigmasPID() const {return fNSigma;}
64   // set MC usage
65   void     SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
66   Bool_t   GetMC() const {return fUseMCInfo;}
67   
68  private:
69   
70   AliAnalysisTaskSEDStarSpectra(const AliAnalysisTaskSEDStarSpectra &source);
71   AliAnalysisTaskSEDStarSpectra& operator=(const AliAnalysisTaskSEDStarSpectra& source); 
72   
73   Int_t  fEvents;                //  n. of events
74   Int_t  fAnalysis;              //  0: HD;     1: UU;
75   Double_t fD0Window;            //  select width on D0Mass
76   Double_t fPeakWindow;          //  select width on DstarMass
77   Bool_t fUseMCInfo;             //  Use MC info
78   TList *fOutput;                //!  User output
79   TList *fOutputSpectrum;        //!  User output1
80   TList *fOutputAll;             //!  User output2
81   TList *fOutputPID3;            //!  User output3
82   TList *fOutputPID2;            //!  User output4
83   TList *fOutputPID1;            //!  User output5
84   Int_t  fNSigma;                //  n sigma for kaon PID
85   Bool_t fPID;                   //  PID flag
86   AliRDHFCutsDStartoKpipi *fCuts; // Cuts - sent to output slot 7
87   // define the histograms
88   TH1F *fCEvents;             //!
89   TH2F *fTrueDiff2;           //!
90  
91   ClassDef(AliAnalysisTaskSEDStarSpectra,7); // class for D* spectra
92 };
93
94 #endif
95