]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/vertexingHF/AliAnalysisTaskSEDStarSpectra.h
Moving the signal function (synchronizing GSI svn and Aliroot ))
[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 <TH3F.h>
22 #include <THnSparse.h>
23
24 #include "AliAnalysisTaskSE.h"
25
26 class AliRDHFCutsDStartoKpipi;
27 class AliNormalizationCounter;
28
29 class AliAnalysisTaskSEDStarSpectra : public AliAnalysisTaskSE 
30 {
31   
32  public:
33   
34   AliAnalysisTaskSEDStarSpectra();
35   AliAnalysisTaskSEDStarSpectra(const Char_t* name,AliRDHFCutsDStartoKpipi* cuts);
36   virtual ~AliAnalysisTaskSEDStarSpectra();
37
38   // Implementation of interface methods  
39   virtual void UserCreateOutputObjects();
40   virtual void Init();
41   virtual void LocalInit() {Init();}
42   virtual void UserExec(Option_t *option);
43   virtual void Terminate(Option_t *option);
44  
45
46  //Background simulation
47   void     SideBandBackground(AliAODRecoCascadeHF *part, AliRDHFCutsDStartoKpipi *cuts, Int_t isSel, TList *listout);
48   void     WrongSignForDStar(AliAODRecoCascadeHF *part, AliRDHFCutsDStartoKpipi *cuts, TList *listout);
49     // histos
50   void   FillSpectrum(AliAODRecoCascadeHF *part, Int_t isDStar, AliRDHFCutsDStartoKpipi *cuts, Int_t isSel, TList *listout);
51   void     DefineHistograms();
52   Int_t CheckOrigin(TClonesArray* arrayMC, const AliAODMCParticle *mcPartCandidate) const;
53   void CreateImpactParameterHistos();
54
55   // set analysis type
56   void     SetAnalysisType(Int_t anaType) {fAnalysis = anaType;}
57   void     PrintAnalysisType() {printf("Analysis type: %d\n(0: Heidelberg\t1: Utrecht)",fAnalysis);}
58  // set MC usage
59   void     SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
60   Bool_t   GetMC() const {return fUseMCInfo;}
61  // set rare mesons
62   void     SetRareSearch(Bool_t theRareOn) {fDoSearch = theRareOn;}
63   Bool_t   GetRareSearch() const {return fDoSearch;}
64   //impact par study
65   void SetDoImpactParameterHistos(Bool_t doImp=kTRUE){fDoImpParDstar=doImp;}
66   Bool_t GetDoImpactParameterHistos() const {return fDoImpParDstar;}
67
68   Float_t GetTrueImpactParameterD0(const AliAODMCHeader *mcHeader, TClonesArray* arrayMC, const AliAODMCParticle *partDp) const;
69
70   void SetDoDStarVsY(Bool_t theDStarVsY) {fDoDStarVsY = theDStarVsY;}
71
72  private:
73   
74   AliAnalysisTaskSEDStarSpectra(const AliAnalysisTaskSEDStarSpectra &source);
75   AliAnalysisTaskSEDStarSpectra& operator=(const AliAnalysisTaskSEDStarSpectra& source); 
76   
77   Int_t  fEvents;                //  n. of events
78   Int_t  fAnalysis;              //  0: HD;     1: UU;
79   Double_t fD0Window;            //  select width on D0Mass
80   Double_t fPeakWindow;          //  select width on DstarMass
81   Bool_t fUseMCInfo;             //  Use MC info
82   Bool_t fDoSearch;              //  Rare mesons
83   TList *fOutput;                //!  User output
84   TList *fOutputAll;             //!  User output2
85   TList *fOutputPID;             //!  User output3
86   Int_t  fNSigma;                //  n sigma for kaon PID
87   AliRDHFCutsDStartoKpipi *fCuts; // Cuts - sent to output slot 3
88   // define the histograms
89   TH1F *fCEvents;             //!
90   TH2F *fTrueDiff2;           //!
91   TH1F *fDeltaMassD1;         //! 
92   AliNormalizationCounter *fCounter;//!Counter for normalization slot 4
93   Bool_t fDoImpParDstar;  // imppar studies
94   Int_t  fNImpParBins;   // nunber of bins in impact parameter histos
95   Float_t fLowerImpPar;  // lower limit in impact parameter (um)
96   Float_t fHigherImpPar; // higher limit in impact parameter (um)
97   Bool_t  fDoDStarVsY;   // flag to enable D* vs y 
98
99   THnSparseF *fHistMassPtImpParTCDs[5];//! histograms for impact paramter studies
100
101   ClassDef(AliAnalysisTaskSEDStarSpectra,9); // class for D* spectra
102 };
103
104 #endif
105