1 #ifndef ALIANALYSISTASKSEDSTARSPECTRA_H
2 #define ALIANALYSISTASKSEDSTARSPECTRA_H
3 /**************************************************************************
4 * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
6 * Author: The ALICE Off-line Project. *
7 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
24 #include "AliAnalysisTaskSE.h"
25 #include "AliAODEvent.h"
27 #include "AliRDHFCutsDStartoKpipi.h"
30 class AliAnalysisTaskSEDStarSpectra : public AliAnalysisTaskSE
35 AliAnalysisTaskSEDStarSpectra();
36 AliAnalysisTaskSEDStarSpectra(const Char_t* name,AliRDHFCutsDStartoKpipi* cuts);
37 virtual ~AliAnalysisTaskSEDStarSpectra();
39 // Implementation of interface methods
40 virtual void UserCreateOutputObjects();
42 virtual void LocalInit() {Init();}
43 virtual void UserExec(Option_t *option);
44 virtual void Terminate(Option_t *option);
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);
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);
54 void FillSpectrum(AliAODRecoCascadeHF *part, Int_t isDStar, Bool_t PIDon, Int_t nSigma, AliRDHFCutsDStartoKpipi *cuts, TList *listout);
55 void DefineHistograms();
57 void SetAnalysisType(Int_t anaType) {fAnalysis = anaType;}
58 void PrintAnalysisType() {printf("Analysis type: %d\n(0: Heidelberg\t1: Utrecht)",fAnalysis);}
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;}
67 void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
68 Bool_t GetMC() const {return fUseMCInfo;}
72 AliAnalysisTaskSEDStarSpectra(const AliAnalysisTaskSEDStarSpectra &source);
73 AliAnalysisTaskSEDStarSpectra& operator=(const AliAnalysisTaskSEDStarSpectra& source);
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
93 ClassDef(AliAnalysisTaskSEDStarSpectra,7); // class for D* spectra