]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/vertexingHF/AliAnalysisTaskSEDStarSpectra.h
Updates to run with deltas (L. Cunqueiro)
[u/mrichter/AliRoot.git] / PWGHF / 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 <THnSparse.h>
22
23 #include "AliAnalysisTaskSE.h"
24
25 class AliRDHFCutsDStartoKpipi;
26 class AliNormalizationCounter;
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
45  //Background simulation
46   void     SideBandBackground(AliAODRecoCascadeHF *part, AliRDHFCutsDStartoKpipi *cuts, Int_t isSel, TList *listout);
47   void     WrongSignForDStar(AliAODRecoCascadeHF *part, AliRDHFCutsDStartoKpipi *cuts, TList *listout);
48     // histos
49   void   FillSpectrum(AliAODRecoCascadeHF *part, Int_t isDStar, AliRDHFCutsDStartoKpipi *cuts, Int_t isSel, TList *listout);
50   void     DefineHistograms();
51   Int_t CheckOrigin(TClonesArray* arrayMC, const AliAODMCParticle *mcPartCandidate) const;
52   void CreateImpactParameterHistos();
53
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  // set MC usage
58   void     SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
59   Bool_t   GetMC() const {return fUseMCInfo;}
60  // set rare mesons
61   void     SetRareSearch(Bool_t theRareOn) {fDoSearch = theRareOn;}
62   Bool_t   GetRareSearch() const {return fDoSearch;}
63   //impact par study
64   void SetDoImpactParameterHistos(Bool_t doImp=kTRUE){fDoImpParDstar=doImp;}
65   Bool_t GetDoImpactParameterHistos() const {return fDoImpParDstar;}
66
67   Float_t GetTrueImpactParameterD0(const AliAODMCHeader *mcHeader, TClonesArray* arrayMC, const AliAODMCParticle *partDp) const;
68
69  private:
70   
71   AliAnalysisTaskSEDStarSpectra(const AliAnalysisTaskSEDStarSpectra &source);
72   AliAnalysisTaskSEDStarSpectra& operator=(const AliAnalysisTaskSEDStarSpectra& source); 
73   
74   Int_t  fEvents;                //  n. of events
75   Int_t  fAnalysis;              //  0: HD;     1: UU;
76   Double_t fD0Window;            //  select width on D0Mass
77   Double_t fPeakWindow;          //  select width on DstarMass
78   Bool_t fUseMCInfo;             //  Use MC info
79   Bool_t fDoSearch;              //  Rare mesons
80   TList *fOutput;                //!  User output
81   TList *fOutputAll;             //!  User output2
82   TList *fOutputPID;             //!  User output3
83   Int_t  fNSigma;                //  n sigma for kaon PID
84   AliRDHFCutsDStartoKpipi *fCuts; // Cuts - sent to output slot 3
85   // define the histograms
86   TH1F *fCEvents;             //!
87   TH2F *fTrueDiff2;           //!
88   TH1F *fDeltaMassD1;         //! 
89   AliNormalizationCounter *fCounter;//!Counter for normalization slot 4
90   Bool_t fDoImpParDstar;  // imppar studies
91   Int_t  fNImpParBins;   // nunber of bins in impact parameter histos
92   Float_t fLowerImpPar;  // lower limit in impact parameter (um)
93   Float_t fHigherImpPar; // higher limit in impact parameter (um)
94
95   THnSparseF *fHistMassPtImpParTCDs[5];//! histograms for impact paramter studies
96
97   ClassDef(AliAnalysisTaskSEDStarSpectra,9); // class for D* spectra
98 };
99
100 #endif
101