]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/vertexingHF/AliAnalysisTaskSEDStarSpectra.h
New features for Ds analysis: cut on angles between duaghter particles, possibility...
[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 /* $Id$ */ 
19
20 #include <TH2F.h>
21 #include "TROOT.h"
22 #include "TSystem.h"
23
24 #include "AliAnalysisTaskSE.h"
25 #include "AliAODEvent.h"
26 #include "AliPID.h"
27 #include "AliRDHFCutsDStartoKpipi.h"
28
29
30 class AliAnalysisTaskSEDStarSpectra : public AliAnalysisTaskSE 
31 {
32   
33  public:
34   
35   AliAnalysisTaskSEDStarSpectra();
36   AliAnalysisTaskSEDStarSpectra(const Char_t* name,AliRDHFCutsDStartoKpipi* cuts);
37   virtual ~AliAnalysisTaskSEDStarSpectra();
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   //Background simulation
47   void     SideBandBackground(AliAODRecoCascadeHF *part, Bool_t PIDon, Int_t nSigma, AliRDHFCutsDStartoKpipi *cuts, TList *listout);
48   void     WrongSignForDStar(AliAODRecoCascadeHF *part, Bool_t PIDon, Int_t nSigma, AliRDHFCutsDStartoKpipi *cuts, TList *listout);
49   //cuts
50   Bool_t   SingleTrackSelections(const AliAODRecoDecayHF2Prong* theD0particle, const AliAODTrack *track2);
51   Bool_t   SelectPID(const AliAODTrack *track, AliPID::EParticleType pid, Double_t nsig);
52   Bool_t   SelectTOFPID(const AliAODRecoDecayHF2Prong* d, const AliAODTrack *tracksoft);
53   // histos
54   void   FillSpectrum(AliAODRecoCascadeHF *part, Int_t isDStar, Bool_t PIDon, Int_t nSigma, AliRDHFCutsDStartoKpipi *cuts, TList *listout);
55   void     DefineHistograms();
56   // set analysis type
57   void     SetAnalysisType(Int_t anaType) {fAnalysis = anaType;}
58   void     PrintAnalysisType() {printf("Analysis type: %d\n(0: Heidelberg\t1: Utrecht)",fAnalysis);}
59
60   // kaon PID
61   void     SetPID(Bool_t usePID) {fPID = usePID;}
62   Int_t    GetPID() const {return fPID;}
63   // Set N sigmas for PID
64   void     SetNSigmasPID(Int_t numberOfSigmasPID) {fNSigma = numberOfSigmasPID;}
65   Int_t    GetNSigmasPID() const {return fNSigma;}
66   // set MC usage
67   void     SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
68   Bool_t   GetMC() const {return fUseMCInfo;}
69   
70  private:
71   
72   AliAnalysisTaskSEDStarSpectra(const AliAnalysisTaskSEDStarSpectra &source);
73   AliAnalysisTaskSEDStarSpectra& operator=(const AliAnalysisTaskSEDStarSpectra& source); 
74   
75   Int_t  fEvents;                //  n. of events
76   Int_t  fAnalysis;              //  0: HD;     1: UU;
77   Double_t fD0Window;            //  select width on D0Mass
78   Double_t fPeakWindow;          //  select width on DstarMass
79   Bool_t fUseMCInfo;             //  Use MC info
80   TList *fOutput;                //!  User output
81   TList *fOutputSpectrum;        //!  User output1
82   TList *fOutputAll;             //!  User output2
83   TList *fOutputPID3;            //!  User output3
84   TList *fOutputPID2;            //!  User output4
85   TList *fOutputPID1;            //!  User output5
86   Int_t  fNSigma;                //  n sigma for kaon PID
87   Bool_t fPID;                   //  PID flag
88   AliRDHFCutsDStartoKpipi *fCuts; // Cuts - sent to output slot 7
89   // define the histograms
90   TH1F *fCEvents;             //!
91   TH2F *fTrueDiff2;           //!
92  
93   ClassDef(AliAnalysisTaskSEDStarSpectra,7); // class for D* spectra
94 };
95
96 #endif
97