]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/vertexingHF/AliAnalysisTaskSECharmFraction.h
Use genuine GetB() from AliTracker rather than copy-past (thnks Y.Belikov)
[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
11// Author: Andrea Rossi andrea.rossi@ts.infn.it
12//*************************************************************************
13
14class TH1F;
15class TH2F;
16class AliAODDEvent;
17class AliAODMCHeader;
18class AliAODRecoDecayHF2Prong;
19class AliAODRecoDecayHF;
20class AliAODMCParticle;
21#include "AliAnalysisTaskSE.h"
22
23class AliAnalysisTaskSECharmFraction : public AliAnalysisTaskSE {
24 public:
25 AliAnalysisTaskSECharmFraction();
26 AliAnalysisTaskSECharmFraction(const char *name);
27 AliAnalysisTaskSECharmFraction(const char *name,Int_t nptbins,Double_t *ptbins);
28
29 virtual ~AliAnalysisTaskSECharmFraction();
30 // Implementation of interface methods
31 virtual void UserCreateOutputObjects();
32 virtual void Init();
33 virtual void LocalInit() {Init();}
34 virtual void UserExec(Option_t *option);
35 virtual void Terminate(Option_t *option);
36
37 void SetNPtBins(Int_t nbins,Double_t *ptbins){if(fptbins!=0x0)delete fptbins;fnbins=nbins;fptbins=ptbins;}
38 void SetSignalInvMassCut(Double_t signalInvMassCut=0.027){fsignalInvMassCut=signalInvMassCut;}
39 void SetLargeInvMassCut(Double_t largeInvMassCut=2.){flargeInvMassCut=largeInvMassCut;}
40 void SetSideBandInvMassCut(Double_t sidebandInvMassCut=0.054){
41 // default value ~ 3x2 times inv mass resol.
42 //a factor 2 is applied w.r.t. 3sigma,
43 //should be safe enough to exclude most of the reflections
44 fsidebandInvMassCut=sidebandInvMassCut;
45 }
46 void SetSideBandInvMassWindow(Double_t sidebandInvMassWindow=0.066){//~ 6 times inv. mass resol.
47 fsidebandInvMassWindow=sidebandInvMassWindow;
48 }
49
50 void SetStandardMassSelection(){
51 SetSignalInvMassCut();
52 SetLargeInvMassCut();
53 SetSideBandInvMassCut();
54 SetSideBandInvMassWindow();
55 return;
56 }
57 Int_t SetStandardCuts(Double_t pt,Double_t invMassCut);
58 void CheckInvMassD0(AliAODRecoDecayHF2Prong *d,Double_t &invMassD0,Double_t &invMassD0bar,Bool_t &isPeakD0,Bool_t &isPeakD0bar,Bool_t &isSideBandD0,Bool_t &isSideBandD0bar);
59 AliAODRecoDecayHF *GetD0toKPiSignalType(AliAODRecoDecayHF2Prong *d,TClonesArray *arrayMC,Int_t &signaltype,Double_t &massMumTrue,Double_t *primaryVtx);
60 AliAODRecoDecayHF* ConstructFakeTrueSecVtx(AliAODMCParticle *b1, AliAODMCParticle *b2, AliAODMCParticle *mum,Double_t *primaryVtxTrue);
61 void SetUseMC(Bool_t useMC){ fUseMC=useMC;}
62 //#################
63 /* ######### THE FOLLOWING IS FOR FURTHER IMPLEMENATION ############
64 Int_t GetPtBin(Double_t pt)const;
65 void SetD0Cuts(Int_t ptbin,Double_t &*d0cutsLoose,Double_t &*d0cutsTight);
66
67 // void InvMassSelection();
68
69 void SetCheckMC(Bool_t checkMC){fcheckMC=checkMC;}
70 void SetCheckMC_D0(Bool_t check_D0){fcheckMCD0=check_D0;}
71 void SetCheckMC_2prongs(Bool_t check2prongs){fcheckMC2prongs=check2prongs;}
72 void SetCheckMC_prompt(Bool_t checkprompt){fcheckMCprompt=checkprompt;}
73 void SetCheckMC_fromB(Bool_t checkfromB){fcheckMCfromB=checkfromB;}
74 void SetCheckMC_fromDstar(Bool_t skipD0star){fSkipD0star=skipD0star;}
75 void SetUseCuts(Bool_t usecuts){fD0usecuts=usecuts;}
76 void SetSideBands(Double_t sideband){fSideBands=sideband;}
77 void SetStudyPureBackground(Bool_t back){fStudyPureBackground=back;}
78 */
79
80 private:
81 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);
82
83 AliAnalysisVertexingHF *fVHFloose; // Vertexer heavy flavour
84 AliAnalysisVertexingHF *fVHFtight; // Vertexer heavy flavour
85 Double_t fmD0PDG; // MC D0 mass
86 Int_t fnbins; // Number of pt bins
87 Double_t *fptbins; //[fnbins] ptbins
88 Double_t fsignalInvMassCut; // invariant mass cut to define signal region
89 Double_t flargeInvMassCut; // invariant mass cut to accept all inv mass window
90 Double_t fsidebandInvMassCut; // invariant mass cut to define side band region lower limit
91 Double_t fsidebandInvMassWindow; // invariant mass cut to define side band region width
92 Bool_t fUseMC; // flag to use or not MC info
93 TH1F *fNentries; //! histo for #AOD analysed, container 1
94 TH1F *fSignalType; //! histo for the type of MC signal , container 2
95 TH1F *fSignalTypeLsCuts; //! histo for the type of MC signal with loose cuts , container 3
96 TH1F *fSignalTypeTghCuts; //! histo for the type of MC signal with tight cuts, container 4
97 TList *flist_NoCuts_Signal; //! TList for signal (D prompt) with nocuts, container 5
98 TList *flist_NoCuts_Back; //! TList for backgrnd with nocuts, container 6
99 TList *flist_NoCuts_FromB; //! TList for D from B with nocuts, container 7
100 TList *flist_NoCuts_FromDstar; //! TList for Dstar with nocuts, container 8
101 TList *flist_NoCuts_Other; //! TList for others with nocuts, container 9
102 TList *flist_LsCuts_Signal; //! TList for signal (D prompt) with loose cuts, container 10
103 TList *flist_LsCuts_Back; //! TList for backgrnd with loose cuts, container 11
104 TList *flist_LsCuts_FromB; //! TList for D from B with loose cuts, container 12
105 TList *flist_LsCuts_FromDstar; //! TList for Dstar with loose cuts, container 13
106 TList *flist_LsCuts_Other; //! TList for others with loose cuts, container 14
107 TList *flist_TghCuts_Signal; //! TList for signal (D prompt) with tight cuts, container 15
108 TList *flist_TghCuts_Back; //! TList for backgrnd with tight cuts, container 16
109 TList *flist_TghCuts_FromB; //! TList for D from B with tight cuts, container 17
110 TList *flist_TghCuts_FromDstar; //! TList for Dstar with tight cuts, container 18
111 TList *flist_TghCuts_Other; //! TList for others with tight cuts, container 19
112 /* Bool_t fD0usecuts; // Switch on the use of the cuts TO BE IMPLEMENTED
113 Bool_t fcheckMC; // Switch on MC check: minimum check is same mother TO BE IMPLEMENTED
114 Bool_t fcheckMCD0; // check the mother is a D0 TO BE IMPLEMENTED
115 Bool_t fcheckMC2prongs; // check the decay is in two prongs TO BE IMPLEMENTED
116 Bool_t fcheckMCprompt; // check the D0 comes from a c quark TO BE IMPLEMENTED
117 Bool_t fcheckMCfromB; // check the D0 comes from a b quark TO BE IMPLEMENTED
118 Bool_t fSkipD0star; // skip if D0 comes from a D* TO BE IMPLEMENTED
119 Bool_t fStudyd0fromBTrue; // Flag for analyze true impact par of D0 from B TO BE IMPLEMENTED
120 Bool_t fStudyPureBackground; // Flag to study the background (reverse the selection on the signal) TO BE IMPLEMENTED
121 Double_t fSideBands; //Side bands selection (see cxx) TO BE IMPLEMENTED
122 */
123 AliAnalysisTaskSECharmFraction(const AliAnalysisTaskSECharmFraction&); // not implemented
124 AliAnalysisTaskSECharmFraction& operator=(const AliAnalysisTaskSECharmFraction&); // not implemented
125
126 ClassDef(AliAnalysisTaskSECharmFraction,1); // analysis task for prompt charm fraction
127};
128
129#endif