]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/vertexingHF/AliAnalysisTaskSECharmFraction.h
Small changes and fixes (Carmelo)
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliAnalysisTaskSECharmFraction.h
CommitLineData
624c07ab 1#ifndef ALIANALYSISTASKSECHARMFRACTION_H
2#define ALIANALYSISTASKSECHARMFRACTION_H
3
4/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7//*************************************************************************
8// Class AliAnalysisTaskSECharmFraction
9// AliAnalysisTask for the extraction of the fraction of prompt charm
10// using the charm hadron impact parameter to the primary vertex
ac4c229c 11//
12//
624c07ab 13// Author: Andrea Rossi andrea.rossi@ts.infn.it
14//*************************************************************************
15
16class TH1F;
17class TH2F;
18class AliAODDEvent;
19class AliAODMCHeader;
20class AliAODRecoDecayHF2Prong;
21class AliAODRecoDecayHF;
22class AliAODMCParticle;
ac4c229c 23class AliAnalysisVertexingHF;
624c07ab 24#include "AliAnalysisTaskSE.h"
25
26class AliAnalysisTaskSECharmFraction : public AliAnalysisTaskSE {
27 public:
28 AliAnalysisTaskSECharmFraction();
29 AliAnalysisTaskSECharmFraction(const char *name);
30 AliAnalysisTaskSECharmFraction(const char *name,Int_t nptbins,Double_t *ptbins);
31
32 virtual ~AliAnalysisTaskSECharmFraction();
33 // Implementation of interface methods
34 virtual void UserCreateOutputObjects();
35 virtual void Init();
36 virtual void LocalInit() {Init();}
37 virtual void UserExec(Option_t *option);
38 virtual void Terminate(Option_t *option);
bf74e6db 39 void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
ac4c229c 40 void SetNPtBins(Int_t nbins,const Double_t *ptbins);
c387e585 41 void SetSignalInvMassCut(const Double_t signalInvMassCut=0.027){fsignalInvMassCut=signalInvMassCut;}
42 void SetLargeInvMassCut(const Double_t largeInvMassCut=2.){flargeInvMassCut=largeInvMassCut;}
43 void SetSideBandInvMassCut(const Double_t sidebandInvMassCut=0.054){// default value ~ 2x3 times inv mass resol.: a factor 2 is applied w.r.t. 3sigma, should be safe enough to exclude most of the reflections
624c07ab 44 fsidebandInvMassCut=sidebandInvMassCut;
45 }
c387e585 46 void SetSideBandInvMassWindow(const Double_t sidebandInvMassWindow=0.108){//~ 6 times inv. mass resol.
624c07ab 47 fsidebandInvMassWindow=sidebandInvMassWindow;
ac4c229c 48 }
c387e585 49 void SetAcceptanceCut(const Double_t eta=0.9,const Double_t nITSpoints=5.,const Double_t nSPDpoints=2.){fAcceptanceCuts[0]=eta;fAcceptanceCuts[1]=nITSpoints;fAcceptanceCuts[2]=nSPDpoints;}
ac4c229c 50 void SetStandardMassSelection();
624c07ab 51 Int_t SetStandardCuts(Double_t pt,Double_t invMassCut);
52 void CheckInvMassD0(AliAODRecoDecayHF2Prong *d,Double_t &invMassD0,Double_t &invMassD0bar,Bool_t &isPeakD0,Bool_t &isPeakD0bar,Bool_t &isSideBandD0,Bool_t &isSideBandD0bar);
ac4c229c 53 AliAODRecoDecayHF *GetD0toKPiSignalType(const AliAODRecoDecayHF2Prong *d,TClonesArray *arrayMC,Int_t &signaltype,Double_t &massMumTrue,Double_t *primaryVtx);
54 AliAODRecoDecayHF* ConstructFakeTrueSecVtx(const AliAODMCParticle *b1,const AliAODMCParticle *b2,const AliAODMCParticle *mum,Double_t *primaryVtxTrue);
55 void SetUseMC(Bool_t useMC){fUseMC=useMC;}
624c07ab 56 //#################
57 /* ######### THE FOLLOWING IS FOR FURTHER IMPLEMENATION ############
58 Int_t GetPtBin(Double_t pt)const;
59 void SetD0Cuts(Int_t ptbin,Double_t &*d0cutsLoose,Double_t &*d0cutsTight);
60
61 // void InvMassSelection();
62
63 void SetCheckMC(Bool_t checkMC){fcheckMC=checkMC;}
64 void SetCheckMC_D0(Bool_t check_D0){fcheckMCD0=check_D0;}
65 void SetCheckMC_2prongs(Bool_t check2prongs){fcheckMC2prongs=check2prongs;}
66 void SetCheckMC_prompt(Bool_t checkprompt){fcheckMCprompt=checkprompt;}
67 void SetCheckMC_fromB(Bool_t checkfromB){fcheckMCfromB=checkfromB;}
68 void SetCheckMC_fromDstar(Bool_t skipD0star){fSkipD0star=skipD0star;}
69 void SetUseCuts(Bool_t usecuts){fD0usecuts=usecuts;}
70 void SetSideBands(Double_t sideband){fSideBands=sideband;}
71 void SetStudyPureBackground(Bool_t back){fStudyPureBackground=back;}
72 */
73
74 private:
75 Bool_t FillHistos(AliAODRecoDecayHF2Prong *d,TList *&list,Int_t ptbin,Int_t okD0,Int_t okD0bar,Double_t invMassD0,Double_t invMassD0bar,Bool_t isPeakD0,Bool_t isPeakD0bar,Bool_t isSideBand,Double_t massmumtrue,AliAODRecoDecayHF *aodDMC,Double_t *vtxTrue);
76
77 AliAnalysisVertexingHF *fVHFloose; // Vertexer heavy flavour
78 AliAnalysisVertexingHF *fVHFtight; // Vertexer heavy flavour
bf74e6db 79 Bool_t fReadMC; // Flag To switch on/off access to MC
624c07ab 80 Double_t fmD0PDG; // MC D0 mass
81 Int_t fnbins; // Number of pt bins
82 Double_t *fptbins; //[fnbins] ptbins
c387e585 83 Double_t fAcceptanceCuts[3]; // array with acceptance cuts
624c07ab 84 Double_t fsignalInvMassCut; // invariant mass cut to define signal region
85 Double_t flargeInvMassCut; // invariant mass cut to accept all inv mass window
86 Double_t fsidebandInvMassCut; // invariant mass cut to define side band region lower limit
87 Double_t fsidebandInvMassWindow; // invariant mass cut to define side band region width
88 Bool_t fUseMC; // flag to use or not MC info
ac4c229c 89 TH1F *fNentries; //!histo for #AOD analysed, container 1
90 TH1F *fSignalType; //!histo for the type of MC signal , container 2
91 TH1F *fSignalTypeLsCuts; //!histo for the type of MC signal with loose cuts , container 3
92 TH1F *fSignalTypeTghCuts; //!histo for the type of MC signal with tight cuts, container 4
93 TList *flistNoCutsSignal; //!TList for signal (D prompt) with nocuts, container 5
94 TList *flistNoCutsBack; //!TList for background with nocuts, container 6
95 TList *flistNoCutsFromB; //!TList for D from B or D from Dstar from Bwith nocuts, container 7
96 TList *flistNoCutsFromDstar; //!TList for D from Dstar with nocuts, container 8
97 TList *flistNoCutsOther; //!TList for others with nocuts, container 9
98 TList *flistLsCutsSignal; //!TList for signal (D prompt) with loose cuts, container 10
99 TList *flistLsCutsBack; //!TList for background with loose cuts, container 11
100 TList *flistLsCutsFromB; //!TList for D from B or D from Dstar from B with loose cuts, container 12
101 TList *flistLsCutsFromDstar; //!TList for D from Dstar with loose cuts, container 13
102 TList *flistLsCutsOther; //!TList for others with loose cuts, container 14
103 TList *flistTghCutsSignal; //!TList for signal (D prompt) with tight cuts, container 15
104 TList *flistTghCutsBack; //!TList for backgrnd with tight cuts, container 16
105 TList *flistTghCutsFromB; //!TList for D from B or D from Dstar from Bwith tight cuts, container 17
106 TList *flistTghCutsFromDstar; //!TList for D from Dstar Dstar with tight cuts, container 18
107 TList *flistTghCutsOther; //!TList for others with tight cuts, container 19
624c07ab 108 /* Bool_t fD0usecuts; // Switch on the use of the cuts TO BE IMPLEMENTED
109 Bool_t fcheckMC; // Switch on MC check: minimum check is same mother TO BE IMPLEMENTED
110 Bool_t fcheckMCD0; // check the mother is a D0 TO BE IMPLEMENTED
111 Bool_t fcheckMC2prongs; // check the decay is in two prongs TO BE IMPLEMENTED
112 Bool_t fcheckMCprompt; // check the D0 comes from a c quark TO BE IMPLEMENTED
113 Bool_t fcheckMCfromB; // check the D0 comes from a b quark TO BE IMPLEMENTED
114 Bool_t fSkipD0star; // skip if D0 comes from a D* TO BE IMPLEMENTED
115 Bool_t fStudyd0fromBTrue; // Flag for analyze true impact par of D0 from B TO BE IMPLEMENTED
116 Bool_t fStudyPureBackground; // Flag to study the background (reverse the selection on the signal) TO BE IMPLEMENTED
117 Double_t fSideBands; //Side bands selection (see cxx) TO BE IMPLEMENTED
118 */
119 AliAnalysisTaskSECharmFraction(const AliAnalysisTaskSECharmFraction&); // not implemented
120 AliAnalysisTaskSECharmFraction& operator=(const AliAnalysisTaskSECharmFraction&); // not implemented
121
122 ClassDef(AliAnalysisTaskSECharmFraction,1); // analysis task for prompt charm fraction
123};
124
125#endif