AliPhysics  32b88a8 (32b88a8)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Go to the documentation of this file.
4 /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice */
14 //*************************************************************************
16 class TH1F;
17 class TH2F;
18 class TF1;
19 class AliAODDEvent;
20 class AliAODMCHeader;
22 class AliAODRecoDecayHF;
23 class AliAODMCParticle;
25 class AliRDHFCutsD0toKpi;
29 #include "AliAnalysisTaskSE.h"
32  public:
34  AliAnalysisTaskSECharmFraction(const char *name);
40  virtual void UserCreateOutputObjects();
41  virtual void Init();
42  virtual void LocalInit() {Init();}
43  virtual void UserExec(Option_t *option);
44  virtual void Terminate(Option_t *option);
45  void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
46  void SetSplitMassD0D0bar(Bool_t splitD0D0bar=kTRUE){fsplitMassD0D0bar=splitD0D0bar;}
48  void SetUsePID(Bool_t pid){fusePID=pid;}
49  void SetAnalyzeLikeSign(Bool_t likesign=kFALSE){fLikeSign=likesign;}
50  void SetNMaxTrForVtx(const Int_t ntrMaxforVtx){fNtrMaxforVtx=ntrMaxforVtx;}
52  void SetPtBins(Int_t nbins,const Float_t *ptbins);
53  void SetSignalInvMassCut(const Double_t signalInvMassCut=0.027){fsignalInvMassCut=signalInvMassCut;}
54  void SetLargeInvMassCut(const Double_t largeInvMassCut=2.){flargeInvMassCut=largeInvMassCut;}
55  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
56  fsidebandInvMassCut=sidebandInvMassCut;
57  }
58  void SetSideBandInvMassWindow(const Double_t sidebandInvMassWindow=0.108){//~ 6 times inv. mass resol.
59  fsidebandInvMassWindow=sidebandInvMassWindow;
60  }
61  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;}
64  void CheckInvMassD0(AliAODRecoDecayHF2Prong *d,Double_t &invMassD0,Double_t &invMassD0bar,Bool_t &isPeakD0,Bool_t &isPeakD0bar,Bool_t &isSideBandD0,Bool_t &isSideBandD0bar);
65  void SetAnalysisLevel(Int_t level){fFastAnalysis=level;}
66  void SetCheckBitD0flag(Bool_t checkfl){fcheckD0Bit=checkfl;}
69  Int_t CheckOrigin(const TClonesArray* arrayMC, const AliAODMCParticle *mcPartCandidate)const;
70  AliAODRecoDecayHF *GetD0toKPiSignalType(const AliAODRecoDecayHF2Prong *d,TClonesArray *arrayMC,Int_t &signaltype,Double_t &massMumTrue,Double_t *primaryVtx,Int_t &isD0D0bar);
71  AliAODRecoDecayHF *GetD0toKPiSignalTypeObsolete(const AliAODRecoDecayHF2Prong *d,TClonesArray *arrayMC,Int_t &signaltype,Double_t &massMumTrue,Double_t *primaryVtx);
72  AliAODRecoDecayHF* ConstructFakeTrueSecVtx(const AliAODMCParticle *b1,const AliAODMCParticle *b2,const AliAODMCParticle *mum,Double_t *primaryVtxTrue);
73  void SetUseMC(Bool_t useMC){fUseMC=useMC;}
75  Bool_t FillAziList(AliAODEvent *aod,Double_t azilist[30000],Int_t trkIDlist[30000],Int_t &nprim)const;
76  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;
83  void SetFillImpParTree(Bool_t fillimppar){fFillTree=fillimppar;}
86  Int_t GetPtBin(Double_t pt)const;
87  void SetD0Cuts(Int_t ptbin,Double_t &*d0cutsLoose,Double_t &*d0cutsTight);
89  // void InvMassSelection();
91  void SetCheckMC(Bool_t checkMC){fcheckMC=checkMC;}
92  void SetCheckMC_D0(Bool_t check_D0){fcheckMCD0=check_D0;}
93  void SetCheckMC_2prongs(Bool_t check2prongs){fcheckMC2prongs=check2prongs;}
94  void SetCheckMC_prompt(Bool_t checkprompt){fcheckMCprompt=checkprompt;}
95  void SetCheckMC_fromB(Bool_t checkfromB){fcheckMCfromB=checkfromB;}
96  void SetCheckMC_fromDstar(Bool_t skipD0star){fSkipD0star=skipD0star;}
97  void SetUseCuts(Bool_t usecuts){fD0usecuts=usecuts;}
98  void SetSideBands(Double_t sideband){fSideBands=sideband;}
99  void SetStudyPureBackground(Bool_t back){fStudyPureBackground=back;}
100  */
102  return fCutsLoose;
103  }
105  return fCutsTight;
106  }
107  /* void SetCutFunction(Int_t (*setcuts)(AliAnalysisTaskSECharmFraction*,Double_t,Double_t)){
108  fSetCuts=setcuts;
109  fStandCuts=kFALSE;
110  }
111  */
112  // Int_t SetCuts(AliAnalysisTaskSECharmFraction *alchfr,Double_t pt,Double_t invMassCut);
114  private:
115  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,Int_t isD0D0barMC,Double_t bField);
116  void FillHistoMCproperties(TClonesArray *arrayMC);
128  Float_t *fptbins; //[fnbins] ptbins
140  TH1F *fNentries;
141  TH1F *fSignalType;
165  TF1 *fWeightPt;
166  /* Bool_t fD0usecuts; /// Switch on the use of the cuts TO BE IMPLEMENTED
167  Bool_t fcheckMC; /// Switch on MC check: minimum check is same mother TO BE IMPLEMENTED
168  Bool_t fcheckMCD0; /// check the mother is a D0 TO BE IMPLEMENTED
169  Bool_t fcheckMC2prongs; /// check the decay is in two prongs TO BE IMPLEMENTED
170  Bool_t fcheckMCprompt; /// check the D0 comes from a c quark TO BE IMPLEMENTED
171  Bool_t fcheckMCfromB; /// check the D0 comes from a b quark TO BE IMPLEMENTED
172  Bool_t fSkipD0star; /// skip if D0 comes from a D* TO BE IMPLEMENTED
173  Bool_t fStudyd0fromBTrue; /// Flag for analyze true impact par of D0 from B TO BE IMPLEMENTED
174  Bool_t fStudyPureBackground; /// Flag to study the background (reverse the selection on the signal) TO BE IMPLEMENTED
175  Double_t fSideBands; ///Side bands selection (see cxx) TO BE IMPLEMENTED
176  */
218  ClassDef(AliAnalysisTaskSECharmFraction,6);
219 };
222 #endif
TList * flistLsCutsFromB
! TList for D from B or D from Dstar from B with loose cuts, container 13
Bool_t fLikeSign
Flag to use two shistos for D0 and D0bar invariant masses.
AliAODRecoDecayHF * ConstructFakeTrueSecVtx(const AliAODMCParticle *b1, const AliAODMCParticle *b2, const AliAODMCParticle *mum, Double_t *primaryVtxTrue)
void SetSplitMassD0D0bar(Bool_t splitD0D0bar=kTRUE)
double Double_t
Definition: External.C:58
TList * flistNoCutsSignal
! TList for signal (D prompt) with nocuts, container 6
Int_t CheckOrigin(const TClonesArray *arrayMC, const AliAODMCParticle *mcPartCandidate) const
TList * flistTghCutsSignal
! TList for signal (D prompt) with tight cuts, container 16
Bool_t fFillTree
function with pt weights used only for MC histos for reflections and signal mass shape ...
Definition: External.C:236
TList * flistTghCutsFromDstar
! TList for D from Dstar Dstar with tight cuts, container 19
Bool_t fUseMC
invariant mass cut to define side band region width
void SetNMaxTrForVtx(const Int_t ntrMaxforVtx)
Bool_t fusePID
Flag to analyse Like Sign array.
Bool_t fskipEventSelection
switch to reject candidates from HIJING and not Pythia for upgrade studies
TList * flistLsCutsSignal
! TList for signal (D prompt) with loose cuts, container 11
TList * flistTghCutsBack
! TList for backgrnd with tight cuts, container 17
AliRDHFCutsD0toKpi * fCutsTight
Loose cuts object.
TList * list
AliAODVertex * GetPrimaryVtxSkipped(AliAODEvent *aodev, AliAODRecoDecayHF2Prong *d)
AliNormalizationCounter * fCounter
! counter for the normalization
TList * flistNoCutsFromDstar
! TList for D from Dstar with nocuts, container 9
Double_t fsignalInvMassCut
array with acceptance cuts
TList * flistTghCutsFromB
! TList for D from B or D from Dstar from Bwith tight cuts, container 18
void SetSideBandInvMassCut(const Double_t sidebandInvMassCut=0.054)
Bool_t fcheckD0Bit
Flag To switch on/off access to MC.
void SetAnalyzeLikeSign(Bool_t likesign=kFALSE)
Int_t fFastAnalysis
Vertexer heavy flavour.
Bool_t FillAziList(AliAODEvent *aod, Double_t azilist[30000], Int_t trkIDlist[30000], Int_t &nprim) const
Double_t flargeInvMassCut
invariant mass cut to define signal region
TF1 * fWeightPt
cut value on max zvtx used ONLY if fskipEventSelection is kTRUE
Double_t fsidebandInvMassCut
invariant mass cut to accept all inv mass window
TList * flistTghCutsOther
! TList for others with tight cuts, container 20
Bool_t fsplitMassD0D0bar
Flag to check the D0 bit flag.
int Int_t
Definition: External.C:63
Bool_t fCleanCandOwnVtx
flag to use or not MC info
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
float Float_t
Definition: External.C:68
Bool_t SpecialSelD0(AliAODRecoDecayHF2Prong *d, Int_t &nusedforVtx)
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, Int_t isD0D0barMC, Double_t bField)
Double_t fZvtxUpgr
switch to skip event selection (for upgrade studies)
TList * flistNoCutsOther
! TList for others with nocuts, container 10
TH1F * fSignalTypeTghCuts
! histo for the type of MC signal with tight cuts, container 4
void SetAcceptanceCut(const Double_t eta=0.8, const Double_t nITSpoints=5., const Double_t nSPDpoints=2.)
AliAODRecoDecayHF * GetD0toKPiSignalTypeObsolete(const AliAODRecoDecayHF2Prong *d, TClonesArray *arrayMC, Int_t &signaltype, Double_t &massMumTrue, Double_t *primaryVtx)
TH1F * fSignalType
! histo for the type of MC signal , container 2
TH1F * fNentries
flag to switch on/off cleaning of the candidate own vtx
Double_t fptMax[3]
! Three largest track pt in the event
Double_t fptAllSq
! Sum of the square of the pt of the reco tracks
TH1F * fSignalTypeLsCuts
! histo for the type of MC signal with loose cuts , container 3
AliAODRecoDecayHF * GetD0toKPiSignalType(const AliAODRecoDecayHF2Prong *d, TClonesArray *arrayMC, Int_t &signaltype, Double_t &massMumTrue, Double_t *primaryVtx, Int_t &isD0D0bar)
Double_t fptAll
N Max acceptable tracks used for vertex (0,1,2)
void CheckInvMassD0(AliAODRecoDecayHF2Prong *d, Double_t &invMassD0, Double_t &invMassD0bar, Bool_t &isPeakD0, Bool_t &isPeakD0bar, Bool_t &isSideBandD0, Bool_t &isSideBandD0bar)
void SetSignalInvMassCut(const Double_t signalInvMassCut=0.027)
Bool_t fReadMC
Level of analysis speed: default is 1, switch it to 2 to fill the THnSparse.
TList * flistLsCutsFromDstar
! TList for D from Dstar with loose cuts, container 14
TList * flistNoCutsFromB
! TList for D from B or D from Dstar from Bwith nocuts, container 8
Double_t fsidebandInvMassWindow
invariant mass cut to define side band region lower limit
void SetPtBins(Int_t nbins, const Float_t *ptbins)
virtual void UserCreateOutputObjects()
Implementation of interface methods.
void SetSideBandInvMassWindow(const Double_t sidebandInvMassWindow=0.108)
const char Option_t
Definition: External.C:48
TList * flistMCproperties
! TLists for MC properties of D0 w.r.t. B mesons and c quarks cntainer 5
void SetLargeInvMassCut(const Double_t largeInvMassCut=2.)
const Double_t zmax
const Int_t nbins
bool Bool_t
Definition: External.C:53
TList * flistLsCutsBack
! TList for background with loose cuts, container 12
TTree * fTreeNCsign
Switch to fill the trees of variabls for the impact parameter unbinned fit.
TList * flistLsCutsOther
! TList for others with loose cuts, container 15
AliAnalysisTaskSECharmFraction & operator=(const AliAnalysisTaskSECharmFraction &)
Class with functions useful for different D2H analyses //.
TList * flistNoCutsBack
! TList for background with nocuts, container 7