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 **************************************************************************/
22 #include "AliAnalysisTaskSE.h"
23 #include "AliAODEvent.h"
25 #include "AliRDHFCutsDStartoKpipi.h"
28 class AliAnalysisTaskSEDStarSpectra : public AliAnalysisTaskSE
33 AliAnalysisTaskSEDStarSpectra();
34 AliAnalysisTaskSEDStarSpectra(const Char_t* name,AliRDHFCutsDStartoKpipi* cuts);
35 virtual ~AliAnalysisTaskSEDStarSpectra();
37 // Implementation of interface methods
38 virtual void UserCreateOutputObjects();
40 virtual void LocalInit() {Init();}
41 virtual void UserExec(Option_t *option);
42 virtual void Terminate(Option_t *option);
44 //Background simulation
45 void SideBandBackground(AliAODRecoCascadeHF *part, Bool_t PIDon, Int_t nSigma, AliRDHFCutsDStartoKpipi *cuts, TList *listout);
46 void WrongSignForDStar(AliAODRecoCascadeHF *part, Bool_t PIDon, Int_t nSigma, AliRDHFCutsDStartoKpipi *cuts, TList *listout);
48 Bool_t SingleTrackSelections(const AliAODRecoDecayHF2Prong* theD0particle, const AliAODTrack *track2);
49 Bool_t SelectPID(const AliAODTrack *track, AliPID::EParticleType pid, Double_t nsig);
50 Bool_t SelectTOFPID(const AliAODRecoDecayHF2Prong* d, const AliAODTrack *tracksoft);
52 void FillSpectrum(AliAODRecoCascadeHF *part, Int_t isDStar, Bool_t PIDon, Int_t nSigma, AliRDHFCutsDStartoKpipi *cuts, TList *listout);
53 void DefineHistograms();
55 void SetAnalysisType(Int_t anaType) {fAnalysis = anaType;}
56 void PrintAnalysisType() {printf("Analysis type: %d\n(0: Heidelberg\t1: Utrecht)",fAnalysis);}
59 void SetPID(Bool_t usePID) {fPID = usePID;}
60 Int_t GetPID() const {return fPID;}
61 // Set N sigmas for PID
62 void SetNSigmasPID(Int_t numberOfSigmasPID) {fNSigma = numberOfSigmasPID;}
63 Int_t GetNSigmasPID() const {return fNSigma;}
65 void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
66 Bool_t GetMC() const {return fUseMCInfo;}
70 AliAnalysisTaskSEDStarSpectra(const AliAnalysisTaskSEDStarSpectra &source);
71 AliAnalysisTaskSEDStarSpectra& operator=(const AliAnalysisTaskSEDStarSpectra& source);
73 Int_t fEvents; // n. of events
74 Int_t fAnalysis; // 0: HD; 1: UU;
75 Double_t fD0Window; // select width on D0Mass
76 Double_t fPeakWindow; // select width on DstarMass
77 Bool_t fUseMCInfo; // Use MC info
78 TList *fOutput; //! User output
79 TList *fOutputSpectrum; //! User output1
80 TList *fOutputAll; //! User output2
81 TList *fOutputPID3; //! User output3
82 TList *fOutputPID2; //! User output4
83 TList *fOutputPID1; //! User output5
84 Int_t fNSigma; // n sigma for kaon PID
85 Bool_t fPID; // PID flag
86 AliRDHFCutsDStartoKpipi *fCuts; // Cuts - sent to output slot 7
87 // define the histograms
91 ClassDef(AliAnalysisTaskSEDStarSpectra,7); // class for D* spectra