AliPhysics  d565ceb (d565ceb)
AliHFsubtractBFDcuts.h
Go to the documentation of this file.
1 #ifndef ALIHFSUBTRACTBFDCUTS_H
2 #define ALIHFSUBTRACTBFDCUTS_H
3 /**************************************************************************
4  * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5  * *
6  * Author: The ALICE Off-line Project. *
7  * Contributors are mentioned in the code where appropriate. *
8  * *
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  **************************************************************************/
17 
27 #include <vector>
28 
29 #include "TNamed.h"
30 #include "THnSparse.h"
31 
33 #include "AliAODMCParticle.h"
34 
35 class TList;
36 class TClonesArray;
37 class AliAODMCHeader;
38 class AliAODEvent;
39 class AliAODVertex;
40 class AliNeutralTrackParam;
41 
43 
44 public:
46  AliHFsubtractBFDcuts(const char* name,const char* title);
48 
49  void InitHistos();
50 
51  void FillGenStep(AliAODMCParticle* dzeroMC,Double_t pt=-1,Double_t weight=1.,TClonesArray* mcArray=0x0, AliAODMCHeader* mcHeader=0x0);
52  THnSparseF* GetSparseData() const {return fTHnData;}
53  THnSparseF* GetSparseMC() const {return fTHnMC;}
54  THnSparseF* GetSparseMCgen() const {return fTHnGenStep;}
55 
56  void SetHistoPtMCgen(THnSparseF* h){if(fTHnGenStep)delete fTHnGenStep;fTHnGenStep=(THnSparseF*)h->Clone();return;}
57  void SetSparseData(THnSparseF* h){if(fTHnData)delete fTHnData;fTHnData=(THnSparseF*)h->Clone();return;}
58  void SetSparseMC(THnSparseF* h){if(fTHnMC)delete fTHnMC;fTHnMC=(THnSparseF*)h->Clone();return;}
59 
60  void SetFillMC (Bool_t fillMC = kTRUE) {fIsMC = fillMC;}
61 
62  void FillSparses(AliAODRecoDecayHF2Prong* dzeroPart,Int_t isSelected,Double_t pt=-1,Double_t massD0=-1,Double_t massD0bar=-1,Double_t weight=1.,TClonesArray* mcArray=0x0, AliAODEvent* aodEvent=0x0, AliAODMCHeader* mcHeader=0x0);
64  TList* GetQAhists() { return fQAhists; }
65 
66 private:
69 
71  Bool_t AnalyseDecay(Bool_t generateString, Bool_t mcOnly);
72  void CountProngs(Int_t labCurrMother, Int_t labCurrExcl, Bool_t generateString, Bool_t mConly);
74  Bool_t IsStable(Int_t labProng);
75  Bool_t IsInAcceptance(Int_t labProng) const;
76  AliAODVertex* RecBvtx(TObjArray* tracks) const;
77  Bool_t CheckBhypothesis(Int_t iAODtrack, Bool_t Bprong);
78 
82  THnSparseF* fTHnGenStep;
83  THnSparseF* fTHnData;
84  THnSparseF* fTHnMC;
86 
88  TClonesArray* fMCarray;
89  TClonesArray* fAODtracks;
90  AliAODVertex* fPriVtx;
93  AliNeutralTrackParam* fD0CandParam;
104  std::vector<Int_t> fDecayProngs;
106 
108  ClassDef(AliHFsubtractBFDcuts,10);
110 };
111 
112 #endif
Bool_t AnalyseDecay(Bool_t generateString, Bool_t mcOnly)
double Double_t
Definition: External.C:58
Bool_t fIsMC
Method to check Whether the current D0 candidate and the track originate from a B decay...
const char * title
Definition: MakeQAPdf.C:27
THnSparseF * fTHnMC
! THnSparse for cut variables (MC at PID level, w/o mass axis)y
AliAODVertex * RecBvtx(TObjArray *tracks) const
Is that prong within the fiducial acceptance.
void SetSparseData(THnSparseF *h)
THnSparseF * fTHnGenStep
flag resolve resonances in during the prong determination
THnSparseF * GetSparseMC() const
Double_t fPtCand
Label of the candidate D0 (charmed hadron in case of a chained decay)
Class for storing and handling D0 meson candidates properties // for estimating the feed-down fractio...
std::vector< Int_t > fDecayProngs
Generate the list containig strings with all PDG codes of the decay prongs.
TCanvas * c
Definition: TestFitELoss.C:172
AliAODRecoDecayHF2Prong * fD0Cand
Magnetic field (z-direction) in units of kG.
AliNeutralTrackParam * fD0CandParam
Pointer to the D0 candidate from reconstruction.
Int_t fLabMother
pT of the candidate (from MC track, not following decay chain)
Bool_t fCheckAcceptance
flag for MC/Data
THnSparseF * GetSparseData() const
void SetFillMC(Bool_t fillMC=kTRUE)
TClonesArray * fAODtracks
! TClonesArray holding the AliAODTracks of the event to be processed
AliAODVertex * fPriVtx
! Primary AOD vertex
void SetHistoPtMCgen(THnSparseF *h)
int Int_t
Definition: External.C:63
TList * fQAhists
! List with QA histograms
unsigned int UInt_t
Definition: External.C:33
THnSparseF * GetSparseMCgen() const
TList * fDecayStrList
PDG codes of the daughters separated.
Bool_t fFoundElectron
Number of prongs, counting only the particles within acceptance.
TClonesArray * fMCarray
Event specific variables.
UInt_t fNprongsInAcc
Number of prongs, counting the first charmed hadron as one particle (simulation cuts can lead to loss...
UInt_t fNprongs
Label of the mother of the candidate D0 (or charmed hadron)
void CountProngs(Int_t labCurrMother, Int_t labCurrExcl, Bool_t generateString, Bool_t mConly)
check in which decay process a particle was created
Double_t fMotherPt
Chained decay of charmed hadrons.
void SetSparseMC(THnSparseF *h)
Bool_t fResolveResonances
flag for checking whether the decay prongs are within acceptance
Bool_t IsStable(Int_t labProng)
counting the prongs of labCurrMother, labCurrExcl is assumed to be a stable particle ...
Bool_t fDecayChain
Does the B meson decay contain an electron?
Bool_t IsInAcceptance(Int_t labProng) const
Is that prong a stable particle?
void FillSparses(AliAODRecoDecayHF2Prong *dzeroPart, Int_t isSelected, Double_t pt=-1, Double_t massD0=-1, Double_t massD0bar=-1, Double_t weight=1., TClonesArray *mcArray=0x0, AliAODEvent *aodEvent=0x0, AliAODMCHeader *mcHeader=0x0)
AliHFsubtractBFDcuts operator=(const AliHFsubtractBFDcuts &c)
void FillGenStep(AliAODMCParticle *dzeroMC, Double_t pt=-1, Double_t weight=1., TClonesArray *mcArray=0x0, AliAODMCHeader *mcHeader=0x0)
bool Bool_t
Definition: External.C:53
Int_t fLabCand
Pointer to an AliNeutralTrackParam of the D0 candidata for DCA calculation.
THnSparseF * fTHnData
! THnSparse for cut variables (data, with inv mass axis), first axis is always mass ...
Bool_t CheckBhypothesis(Int_t iAODtrack, Bool_t Bprong)
Reconstruct a secondary vertex with the supplied tracks.