]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/vertexingHF/AliAnalysisTaskSEDStarSpectra.h
Added event-level selection (Chiara)
[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 #include "AliAnalysisTaskSE.h"
22 #include "AliAnalysisVertexingHF.h"
23 #include "AliAODEvent.h"
24 #include "AliPID.h"
25
26
27 class TH2F;
28 class TH1I;
29 class TParticle;
30 class TFile;
31 class TClonesArray;
32 class AliCFManager;
33 class AliAODRecoDecay;
34 class AliAODRecoDecayHF2Prong;
35 class AliAODMCParticle;
36
37 class AliAnalysisTaskSEDStarSpectra : public AliAnalysisTaskSE {
38   
39  public:
40   
41   AliAnalysisTaskSEDStarSpectra();
42   AliAnalysisTaskSEDStarSpectra(const Char_t* name);
43   AliAnalysisTaskSEDStarSpectra& operator= (const AliAnalysisTaskSEDStarSpectra& c);
44   AliAnalysisTaskSEDStarSpectra(const AliAnalysisTaskSEDStarSpectra& c);
45   virtual ~AliAnalysisTaskSEDStarSpectra();
46   
47   virtual void UserCreateOutputObjects();
48   virtual void Init();
49   virtual void LocalInit() {Init();}
50   virtual void UserExec(Option_t *option);
51   virtual void Terminate(Option_t *option);
52  
53   //Background simulation
54   void     SideBandBackground(Int_t ptbin, AliAODRecoCascadeHF *part, Bool_t PIDon, Int_t nSigma, AliAnalysisVertexingHF *vhf, TList *listout);
55   void     WrongSignForDStar(Int_t ptbin, AliAODRecoCascadeHF *part, Bool_t PIDon, Int_t nSigma, AliAnalysisVertexingHF *vhf, TList *listout);
56   //cuts
57   Bool_t   SingleTrackSelections(AliAODRecoDecayHF2Prong* theD0particle, AliAODTrack *track0, AliAODTrack *track1, AliAODTrack *track2);
58   Bool_t   SetSelections(Double_t pt);  
59   Bool_t   SelectPID(AliAODTrack *track, AliPID::EParticleType pid, Double_t nsig);
60   // histos
61   void   FillSpectrum(Int_t ptbin, AliAODRecoCascadeHF *part, Int_t isDStar, Bool_t PIDon, Int_t nSigma, AliAnalysisVertexingHF *vhf, TList *listout);
62   void     DefineHistograms();
63   // set analysis type
64   void     SetAnalysisType(Int_t anaType) {fAnalysis = anaType;}
65   void     PrintAnalysisType() {printf("Analysis type: %d\n(0: Heidelberg\t1: Utrecht)",fAnalysis);}
66   // set minimum ITS clusters for the analysis
67   void     SetMinITSClusters(Int_t minITSClusters) {fMinITSClusters = minITSClusters;}
68   Int_t    GetMinITSClusters() const {return fMinITSClusters;}
69   // set minimum for soft pion pt
70   void     SetMinITSClustersSoft(Int_t minITSClustersSoft) {fMinITSClustersSoft = minITSClustersSoft;}
71   Int_t    GetMinITSClustersSoft() const {return fMinITSClustersSoft;}
72   // kaon PID
73   void     SetPID(Bool_t usePID) {fPID = usePID;}
74   Int_t    GetPID() const {return fPID;}
75   // Set N sigmas for PID
76   void     SetNSigmasPID(Int_t numberOfSigmasPID) {fNSigma = numberOfSigmasPID;}
77   Int_t    GetNSigmasPID() const {return fNSigma;}
78   // set MC usage
79   void     SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
80   Bool_t   GetMC() const {return fUseMCInfo;}
81   
82  protected:
83   
84   Int_t  fEvents;                //  n. of events
85   Int_t  fAnalysis;              //  0: HD;     1: UU;
86   AliAnalysisVertexingHF *fVHF;  //  Set the cuts
87   AliAnalysisVertexingHF *fVHFloose;  //  Set the cuts
88   Double_t fD0Window;            //  select width on D0Mass
89   Double_t fPeakWindow;          //  select width on DstarMass
90   Int_t  fMinITSClusters;        //  min n. of ITS clusters for RecoDecay
91   Int_t  fMinITSClustersSoft;    //  min n. of ITS clusters for RecoDecay soft pions
92   Bool_t fUseMCInfo;             //  Use MC info
93   TList *fOutput;                //!  User output
94   TList *fOutputSpectrum;
95   TList *fOutputAll;
96   TList *fOutputPID3;
97   TList *fOutputPID2;
98   TList *fOutputPID1;
99   Int_t  fNSigma;                //  n sigma for kaon PID
100   Bool_t fPID;                   //  PID flag
101   AliAODTrack* fAODTrack;        //!
102   
103   // define the histograms
104   TH1F *fCEvents;             //!
105   TH2F *fTrueDiff2;           //!
106  
107   ClassDef(AliAnalysisTaskSEDStarSpectra,6); // class for D* spectra
108 };
109
110 #endif
111