]>
Commit | Line | Data |
---|---|---|
e5532e90 | 1 | #ifndef ALIANALYSISTASKSECHARMFRACTION_H\r |
2 | #define ALIANALYSISTASKSECHARMFRACTION_H\r | |
3 | \r | |
4 | /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *\r | |
5 | * See cxx source for full Copyright notice */\r | |
6 | \r | |
7 | //*************************************************************************\r | |
8 | // Class AliAnalysisTaskSECharmFraction\r | |
9 | // AliAnalysisTask for the extraction of the fraction of prompt charm\r | |
10 | // using the charm hadron impact parameter to the primary vertex\r | |
11 | //\r | |
12 | //\r | |
13 | // Author: Andrea Rossi andrea.rossi@pd.infn.it\r | |
14 | //*************************************************************************\r | |
15 | \r | |
16 | class TH1F;\r | |
17 | class TH2F;\r | |
18 | class AliAODDEvent;\r | |
19 | class AliAODMCHeader;\r | |
20 | class AliAODRecoDecayHF2Prong;\r | |
21 | class AliAODRecoDecayHF;\r | |
22 | class AliAODMCParticle;\r | |
23 | class AliAnalysisVertexingHF;\r | |
24 | class AliRDHFCutsD0toKpi;\r | |
25 | class AliNormalizationCounter;\r | |
26 | \r | |
27 | #include "AliAnalysisTaskSE.h"\r | |
28 | \r | |
29 | class AliAnalysisTaskSECharmFraction : public AliAnalysisTaskSE {\r | |
30 | public:\r | |
31 | AliAnalysisTaskSECharmFraction();\r | |
32 | AliAnalysisTaskSECharmFraction(const char *name);\r | |
33 | AliAnalysisTaskSECharmFraction(const char *name,AliRDHFCutsD0toKpi *cutsA,AliRDHFCutsD0toKpi *cutsB);\r | |
34 | \r | |
35 | virtual ~AliAnalysisTaskSECharmFraction(); \r | |
36 | \r | |
37 | // Implementation of interface methods\r | |
38 | virtual void UserCreateOutputObjects();\r | |
39 | virtual void Init();\r | |
40 | virtual void LocalInit() {Init();}\r | |
41 | virtual void UserExec(Option_t *option);\r | |
42 | virtual void Terminate(Option_t *option); \r | |
43 | void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}\r | |
44 | void SetSplitMassD0D0bar(Bool_t splitD0D0bar=kTRUE){fsplitMassD0D0bar=splitD0D0bar;}\r | |
45 | Bool_t GetIsSplitMassD0D0bar(){return fsplitMassD0D0bar;}\r | |
46 | void SetUsePID(Bool_t pid){fusePID=pid;}\r | |
47 | void SetAnalyzeLikeSign(Bool_t likesign=kFALSE){fLikeSign=likesign;}\r | |
48 | void SetNMaxTrForVtx(const Int_t ntrMaxforVtx){fNtrMaxforVtx=ntrMaxforVtx;}\r | |
49 | Int_t GetNMaxTrForVtx(){return fNtrMaxforVtx;}\r | |
50 | void SetPtBins(Int_t nbins,const Float_t *ptbins);\r | |
51 | void SetSignalInvMassCut(const Double_t signalInvMassCut=0.027){fsignalInvMassCut=signalInvMassCut;}\r | |
52 | void SetLargeInvMassCut(const Double_t largeInvMassCut=2.){flargeInvMassCut=largeInvMassCut;}\r | |
53 | 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 \r | |
54 | fsidebandInvMassCut=sidebandInvMassCut; \r | |
55 | }\r | |
56 | void SetSideBandInvMassWindow(const Double_t sidebandInvMassWindow=0.108){//~ 6 times inv. mass resol.\r | |
57 | fsidebandInvMassWindow=sidebandInvMassWindow;\r | |
58 | } \r | |
59 | void SetAcceptanceCut(const Double_t eta=0.8,const Double_t nITSpoints=5.,const Double_t nSPDpoints=2.){fAcceptanceCuts[0]=eta;fAcceptanceCuts[1]=nITSpoints;fAcceptanceCuts[2]=nSPDpoints;}\r | |
60 | void SetStandardMassSelection();\r | |
61 | Int_t SetStandardCuts(Double_t pt,Double_t invMassCut);\r | |
62 | Int_t SetStandardCuts(Float_t *&ptbinlimits);\r | |
63 | void CheckInvMassD0(AliAODRecoDecayHF2Prong *d,Double_t &invMassD0,Double_t &invMassD0bar,Bool_t &isPeakD0,Bool_t &isPeakD0bar,Bool_t &isSideBandD0,Bool_t &isSideBandD0bar);\r | |
64 | void SetAnalysisLevel(Int_t level){fFastAnalysis=level;}\r | |
65 | Int_t GetAnalysisLevel(){return fFastAnalysis;}\r | |
66 | Int_t CheckOrigin(const TClonesArray* arrayMC, const AliAODMCParticle *mcPartCandidate)const;\r | |
67 | AliAODRecoDecayHF *GetD0toKPiSignalType(const AliAODRecoDecayHF2Prong *d,TClonesArray *arrayMC,Int_t &signaltype,Double_t &massMumTrue,Double_t *primaryVtx);\r | |
68 | AliAODRecoDecayHF *GetD0toKPiSignalTypeObsolete(const AliAODRecoDecayHF2Prong *d,TClonesArray *arrayMC,Int_t &signaltype,Double_t &massMumTrue,Double_t *primaryVtx);\r | |
69 | AliAODRecoDecayHF* ConstructFakeTrueSecVtx(const AliAODMCParticle *b1,const AliAODMCParticle *b2,const AliAODMCParticle *mum,Double_t *primaryVtxTrue);\r | |
70 | void SetUseMC(Bool_t useMC){fUseMC=useMC;}\r | |
71 | Bool_t SpecialSelD0(AliAODRecoDecayHF2Prong *d,Int_t &nusedforVtx);\r | |
72 | Bool_t FillAziList(AliAODEvent *aod,Double_t azilist[30000],Int_t trkIDlist[30000],Int_t &nprim)const;\r | |
73 | void FillAziHistos(AliAODRecoDecayHF2Prong *d,TList *&list,Int_t ptbin,Double_t azilist[30000],Int_t trkIDlist[30000],Int_t nprim,Int_t okD0,Int_t okD0bar,Bool_t isPeakD0,Bool_t isPeakD0bar,Bool_t isSideBandD0,Bool_t isSideBandD0bar)const;\r | |
74 | \r | |
75 | AliAODVertex* GetPrimaryVtxSkipped(AliAODEvent *aodev,AliAODRecoDecayHF2Prong *d);\r | |
76 | \r | |
77 | /* ######### THE FOLLOWING IS FOR FURTHER IMPLEMENATION ############\r | |
78 | Int_t GetPtBin(Double_t pt)const;\r | |
79 | void SetD0Cuts(Int_t ptbin,Double_t &*d0cutsLoose,Double_t &*d0cutsTight);\r | |
80 | \r | |
81 | // void InvMassSelection();\r | |
82 | \r | |
83 | void SetCheckMC(Bool_t checkMC){fcheckMC=checkMC;}\r | |
84 | void SetCheckMC_D0(Bool_t check_D0){fcheckMCD0=check_D0;}\r | |
85 | void SetCheckMC_2prongs(Bool_t check2prongs){fcheckMC2prongs=check2prongs;}\r | |
86 | void SetCheckMC_prompt(Bool_t checkprompt){fcheckMCprompt=checkprompt;}\r | |
87 | void SetCheckMC_fromB(Bool_t checkfromB){fcheckMCfromB=checkfromB;}\r | |
88 | void SetCheckMC_fromDstar(Bool_t skipD0star){fSkipD0star=skipD0star;}\r | |
89 | void SetUseCuts(Bool_t usecuts){fD0usecuts=usecuts;}\r | |
90 | void SetSideBands(Double_t sideband){fSideBands=sideband;}\r | |
91 | void SetStudyPureBackground(Bool_t back){fStudyPureBackground=back;}\r | |
92 | */\r | |
93 | AliRDHFCutsD0toKpi* GetLooseCut(){\r | |
94 | return fCutsLoose;\r | |
95 | }\r | |
96 | AliRDHFCutsD0toKpi* GetTightCut(){\r | |
97 | return fCutsTight;\r | |
98 | }\r | |
99 | /* void SetCutFunction(Int_t (*setcuts)(AliAnalysisTaskSECharmFraction*,Double_t,Double_t)){\r | |
100 | fSetCuts=setcuts;\r | |
101 | fStandCuts=kFALSE;\r | |
102 | }\r | |
103 | */\r | |
104 | // Int_t SetCuts(AliAnalysisTaskSECharmFraction *alchfr,Double_t pt,Double_t invMassCut);\r | |
105 | \r | |
106 | private:\r | |
107 | 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 isSideBandD0,Bool_t isSideBandD0bar,Double_t massmumtrue,AliAODRecoDecayHF *aodDMC,Double_t *vtxTrue);\r | |
108 | void FillHistoMCproperties(TClonesArray *arrayMC);\r | |
109 | \r | |
110 | AliRDHFCutsD0toKpi *fCutsLoose; // Loose cuts object\r | |
111 | AliRDHFCutsD0toKpi *fCutsTight; // Vertexer heavy flavour\r | |
112 | Int_t fFastAnalysis; // Level of analysis speed: default is 1, switch it to 2 to fill the THnSparse\r | |
113 | Bool_t fReadMC; // Flag To switch on/off access to MC \r | |
114 | Bool_t fsplitMassD0D0bar; // Flag to use two shistos for D0 and D0bar invariant masses\r | |
115 | Bool_t fLikeSign; // Flag to analyse Like Sign array\r | |
116 | Bool_t fusePID; // Flag to use PID\r | |
117 | Double_t fmD0PDG; // MC D0 mass\r | |
118 | Int_t fnbins; // Number of pt bins\r | |
119 | Float_t *fptbins; //[fnbins] ptbins \r | |
120 | Int_t fNtrMaxforVtx; // N Max acceptable tracks used for vertex (0,1,2)\r | |
121 | Double_t fptAll; //!Sum of pt of the reco tracks\r | |
122 | Double_t fptAllSq; //!Sum of the square of the pt of the reco tracks\r | |
123 | Double_t fptMax[3]; //!Three largest track pt in the event\r | |
124 | Double_t fAcceptanceCuts[3]; // array with acceptance cuts\r | |
125 | Double_t fsignalInvMassCut; // invariant mass cut to define signal region\r | |
126 | Double_t flargeInvMassCut; // invariant mass cut to accept all inv mass window\r | |
127 | Double_t fsidebandInvMassCut; // invariant mass cut to define side band region lower limit\r | |
128 | Double_t fsidebandInvMassWindow; // invariant mass cut to define side band region width\r | |
129 | Bool_t fUseMC; // flag to use or not MC info\r | |
130 | Bool_t fCleanCandOwnVtx; // flag to switch on/off cleaning of the candidate own vtx\r | |
131 | TH1F *fNentries; //!histo for #AOD analysed, container 1\r | |
132 | TH1F *fSignalType; //!histo for the type of MC signal , container 2\r | |
133 | TH1F *fSignalTypeLsCuts; //!histo for the type of MC signal with loose cuts , container 3\r | |
134 | TH1F *fSignalTypeTghCuts; //!histo for the type of MC signal with tight cuts, container 4\r | |
135 | AliNormalizationCounter *fCounter; //!counter for the normalization \r | |
136 | TList *flistMCproperties; //!TLists for MC properties of D0 w.r.t. B mesons and c quarks cntainer 5\r | |
137 | TList *flistNoCutsSignal; //!TList for signal (D prompt) with nocuts, container 6\r | |
138 | TList *flistNoCutsBack; //!TList for background with nocuts, container 7\r | |
139 | TList *flistNoCutsFromB; //!TList for D from B or D from Dstar from Bwith nocuts, container 8\r | |
140 | TList *flistNoCutsFromDstar; //!TList for D from Dstar with nocuts, container 9\r | |
141 | TList *flistNoCutsOther; //!TList for others with nocuts, container 10\r | |
142 | TList *flistLsCutsSignal; //!TList for signal (D prompt) with loose cuts, container 11\r | |
143 | TList *flistLsCutsBack; //!TList for background with loose cuts, container 12\r | |
144 | TList *flistLsCutsFromB; //!TList for D from B or D from Dstar from B with loose cuts, container 13\r | |
145 | TList *flistLsCutsFromDstar; //!TList for D from Dstar with loose cuts, container 14\r | |
146 | TList *flistLsCutsOther; //!TList for others with loose cuts, container 15\r | |
147 | TList *flistTghCutsSignal; //!TList for signal (D prompt) with tight cuts, container 16\r | |
148 | TList *flistTghCutsBack; //!TList for backgrnd with tight cuts, container 17\r | |
149 | TList *flistTghCutsFromB; //!TList for D from B or D from Dstar from Bwith tight cuts, container 18\r | |
150 | TList *flistTghCutsFromDstar; //!TList for D from Dstar Dstar with tight cuts, container 19\r | |
151 | TList *flistTghCutsOther; //!TList for others with tight cuts, container 20\r | |
152 | /* Bool_t fD0usecuts; // Switch on the use of the cuts TO BE IMPLEMENTED \r | |
153 | Bool_t fcheckMC; // Switch on MC check: minimum check is same mother TO BE IMPLEMENTED\r | |
154 | Bool_t fcheckMCD0; // check the mother is a D0 TO BE IMPLEMENTED\r | |
155 | Bool_t fcheckMC2prongs; // check the decay is in two prongs TO BE IMPLEMENTED \r | |
156 | Bool_t fcheckMCprompt; // check the D0 comes from a c quark TO BE IMPLEMENTED\r | |
157 | Bool_t fcheckMCfromB; // check the D0 comes from a b quark TO BE IMPLEMENTED\r | |
158 | Bool_t fSkipD0star; // skip if D0 comes from a D* TO BE IMPLEMENTED\r | |
159 | Bool_t fStudyd0fromBTrue; // Flag for analyze true impact par of D0 from B TO BE IMPLEMENTED \r | |
160 | Bool_t fStudyPureBackground; // Flag to study the background (reverse the selection on the signal) TO BE IMPLEMENTED \r | |
161 | Double_t fSideBands; //Side bands selection (see cxx) TO BE IMPLEMENTED\r | |
162 | */\r | |
163 | AliAnalysisTaskSECharmFraction(const AliAnalysisTaskSECharmFraction&); // not implemented\r | |
164 | AliAnalysisTaskSECharmFraction& operator=(const AliAnalysisTaskSECharmFraction&); // not implemented\r | |
165 | \r | |
166 | ClassDef(AliAnalysisTaskSECharmFraction,3); // analysis task for prompt charm fraction\r | |
167 | };\r | |
168 | \r | |
169 | #endif\r |