ROOT logo
AliRoot » PWGHF » BASE » AliPtMothFromPtDaugh

class AliPtMothFromPtDaugh: public TNamed

Class to perform pt-spectra (and ptMin-spectra) extraction of mothers
particles starting from measured pt-spectra of daughter particles
that come from inclusive decays.
E.g.: B->J/psi+X , B->e+X, B->D0+X, etc.

In order to use this class, one first has to run a simulation
(only kinematics) of the decay channel under study. The analysis
can be runned using the class AliAnalysisTaskPtMothFromPtDaugh
which loops on events to create a TNtupla that stores just
kinematics informations for mothers and daughters of the decay
under study (this is made in order to speed up).

Therefore the standard inputs of this class are:
(1) The TNtupla (created by the task using a TChain of galice.root)
(2) pT-spectrum of the daughter particles

Output would be the pT (and pTMin) spectrum of the mother, based
on the correction factors computed from the Kinematics.root files


Authors: Giuseppe E. Bruno           &  Fiorella Fionda
(Giuseppe.Bruno@ba.infn.it)    (Fiorella.Fionda@ba.infn.it)

Function Members (Methods)

public:
AliPtMothFromPtDaugh()
AliPtMothFromPtDaugh(const char* name, const char* title)
virtual~AliPtMothFromPtDaugh()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
Bool_tCreateWeights()
Bool_tCutDaugh(Double_t yD, Double_t ptD)
virtual voidTObject::Delete(Option_t* option = "")MENU
voidDeleteWeights()
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
Bool_tEvaluatePtMoth()
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Double_t*GetBinsSize(const TH1F* hist, Int_t& n) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Bool_tGetEtaDaughter(Double_t& etaMin, Double_t& etaMax) const
Bool_tGetEtaMothers(Double_t& etaMin, Double_t& etaMax) const
Double_tGetF(Int_t i) const
Double_tGetFmin(Int_t i) const
TH1F*GetHistoPtMinMother() const
TH1F*GetHistoPtMother() const
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Int_tGetPdgDaugh() const
Int_t*GetPdgMothers(Int_t& n_mothers) const
Double_tGetStatErrF(Int_t i) const
Double_tGetStatErrFmin(Int_t i) const
Double_tGetStatErrW(Int_t i, Int_t j) const
Double_tGetStatErrWmin(Int_t i, Int_t j) const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
Double_tGetW(Int_t i, Int_t j) const
Double_tGetWmin(Int_t i, Int_t j) const
Bool_tGetYDaughter(Double_t& yMin, Double_t& yMax) const
Bool_tGetYMothers(Double_t& yMin, Double_t& yMax) const
Int_tGiveBinIndex(Double_t Ptpart, const TH1F* ptHist) const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tIsMothers(Int_t pdgCode)
Bool_tTObject::IsOnHeap() const
Bool_tIsSelectedDaugh(const TParticle* part, Int_t& labelDaugh, AliStack *const stack)
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
Bool_tRapidity(const TParticle* particle, Double_t& y)
virtual Int_tTObject::Read(const char* name)
Bool_tReadHistoPtDaught(const TH1F* hist)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidSetBeautyMothers()
voidSetBinsPtMinMoth(Int_t nbins, Double_t* edgeBins)
voidSetBinsPtMinMoth(Double_t ptmin, Double_t ptmax, Int_t nbins, Double_t alpha = 1.0)
voidSetBinsPtMoth(Int_t nbins, Double_t* edgeBins)
voidSetBinsPtMoth(Double_t ptmin, Double_t ptmax, Int_t nbins, Double_t alpha = 1.0)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetDecayNtupla(TNtuple* DecKine)
voidSetDefaultAnalysis(AliPtMothFromPtDaugh::Analysis_mode mode)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetEtaDaughter(Double_t etaMin, Double_t etaMax)
voidSetEtaMothers(Double_t etaMin, Double_t etaMax)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetPdgDaugh(Int_t pdgD)
voidSetPdgMothers(Int_t n_mothers, Int_t* pdgM)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetYdaughter(Double_t yMin, Double_t yMax)
voidSetYmothers(Double_t yMin, Double_t yMax)
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
voidWritePtMothHistoToFile(TString fileOutName = "Mothers.root")
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

public:
enum Analysis_mode { kUserAnalysis
kBtoJPSI
kBtoEle
kBtoMuon
kBtoD0
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
private:
AliPtMothFromPtDaugh::Analysis_modefAnalysisModeanalysis mode
Int_tfDaughterpdg code of daughter
TNtuple*fDecayKineNtupla to store kinematic information of Decay
Double_t*fFi" " "
Double_t*fFiMin" " "
TH1F*fHistoPtDaughterpointers to pt-histogram of Daughther
TH1F*fHistoPtMinMotherspointers for pt_min-histogram of Mothers
TH1F*fHistoPtMotherspointers to ptMin-histogram of mothers
TArrayI*fMothersArray with pdg codes of mothers
Bool_tfUseEtakTRUE if pseudorapidity range is used
Double_t**fWijpointer to store correction factors
Double_t**fWijMin" " "
Double_tfyDaughMaxmax " " of daughters
Double_tfyDaughMinmin " " "
Double_tfyMothMaxmax rapidity (or pseudorapidity) of mothers
Double_tfyMothMinmin " " "

Class Charts

Inheritance Chart:
TNamed
AliPtMothFromPtDaugh

Function documentation

AliPtMothFromPtDaugh()
 Default constructor

AliPtMothFromPtDaugh(const char* name, const char* title)
 Named constructor

~AliPtMothFromPtDaugh()
 Default destructor

AliPtMothFromPtDaugh(const AliPtMothFromPtDaugh& c)
 Copy constructor
AliPtMothFromPtDaugh& operator=(const AliPtMothFromPtDaugh& c)
 operator assignment
Bool_t CreateWeights()
 Set mothers and daughters pdg codes if not
 Put a control if mothers histograms binning-size, rapidity (or pseudoapidity) range
 are setting. Read daughter histogram (histName) from the file (pathFileName)
 Initialize dimensions for correction factors
void DeleteWeights()
delete correction factors
delete histogram of daughters
Bool_t ReadHistoPtDaught(const TH1F* hist)
Initialize daughter histograms with hist
Double_t* SetBinsSize(Double_t ptmin, Double_t ptmax, Int_t nbins, Double_t alpha)
 return a pointer of double which contains the binning size for (mothers) histograms:
 alpha have to be > 0 and:
 alpha = 1 equal binning size
 alpha < 1 increasing  " 
 alpha > 1 decreasing  "
void SetBinsPtMoth(Double_t ptmin, Double_t ptmax, Int_t nbins, Double_t alpha = 1.0)
 Set bin size for pt-spectrum of mothers using SetBinsSize:
 alpha have to be > 0 and:
 alpha = 1 equal binning size
 alpha < 1 increasing  " 
 alpha > 1 decreasing  "
void SetBinsPtMoth(Int_t nbins, Double_t* edgeBins)
set bin size given by the pointer edgeBins for pt-spectrum of mothers:
the dimension of the pointer edgeBins is nbins+1 and the points
has to be written in increasing order
void SetBinsPtMinMoth(Int_t nbins, Double_t* edgeBins)
set bin size given by the pointer edgeBins for ptMin-spectrum of mothers:
the dimension of the pointer edgeBins is nbins+1 and the points
has to be written in increasing order
void SetBinsPtMinMoth(Double_t ptmin, Double_t ptmax, Int_t nbins, Double_t alpha = 1.0)
 Set bin size for ptMin-spectrum of mothers using SetBinsSize:
 alpha have to be > 0 and:
 alpha = 1 equal binning size
 alpha < 1 increasing  " 
 alpha > 1 decreasing  "
void SetPdgMothersPrivate(Int_t n_mothers, Int_t* pdgM)
 Set pdg codes of mothers given by the pointer pdgM for the analysis.
 This is a private method.
void SetPdgMothers(Int_t n_mothers, Int_t* pdgM)
 Set user pdg codes of mothers: first check
 that the kUserAnalysis is the selected Analysis_mode.
 If not print out a message of error.
void SetBeautyMothers()
 Set pdg codes of beauty particles:
 B-mesons (1-24) B-barions (25-59)
void InitDefaultAnalysis()
 Set mothers and daughter pdg codes depending from the selected analysis.
 case kUserAnalysis: mothers and daughter are set by user (nothing to be done)
 case kBtoJPSI: inclusive B-> J/Psi + X channels
 case kBtoEle: inclusive B-> e + X channels
 case kBtoMuon: inclusive B-> mu + X channels
 case kBtoD0: inclusive B-> D0 + X channels
Double_t* GetBinsSize(const TH1F* hist, Int_t& n) const
 return the binning size of the histogram hist
 n return the number of bins
Bool_t GetEtaMothers(Double_t& etaMin, Double_t& etaMax) const
 method to get the bounds of the pseudorapidity range
 for mothers. Return kTRUE if pseudorapidity is used and put
 pseudorapidity edges in etaMin and etaMax
Bool_t GetEtaDaughter(Double_t& etaMin, Double_t& etaMax) const
 method to get the bounds of the pseudorapidity range
 for daughters. Return kTRUE if pseudorapidity is used and put
 pseudorapidity edges in etaMin and etaMax
Bool_t GetYMothers(Double_t& yMin, Double_t& yMax) const
 method to get the bounds of the rapidity range
 for mothers. Return kTRUE if rapidity is used and put
 rapidity edges in yMin and yMax
Bool_t GetYDaughter(Double_t& yMin, Double_t& yMax) const
 method to get the bounds of the rapidity range
 for daughters. Return kTRUE if rapidity is used and put
 rapidity edges in yMin and yMax
void SetPdgDaugh(Int_t pdgD)
 Set pdg code for daughter particle. Check
 that the kUserAnalysis is the selected Analysis_mode.
 If not print out a message of error.
Int_t* GetPdgMothers(Int_t& n_mothers) const
 return the pointer to the array of pdg codes of mothers particles
 if it exist. Put its dimension in n_mothers
Double_t GetW(Int_t i, Int_t j) const
 Return value of correction factors Wij at the position i (pt-mothers bin index)-
 j (pt-daughter bin index). Bin 0 is the underflow, bin nbins+1 the overflow.
 If Wij don't exist or the indices i or j are out of the variability range return 0
Double_t GetStatErrW(Int_t i, Int_t j) const
 Return value of statistical error on correction factors Wij at the position
 i (pt-mothers bin index)- j (pt-daughter bin index). Bin 0 is the underflow,
 bin nbins+1 the overflow. If Wij don't exist or the indices i or j are out of the
 variability range return 0
Double_t GetF(Int_t i) const
 Return value of correction factors Fi at the position i (pt-mothers bin index).
 Bin 0 is the underflow, bin nbins+1 the overflow.
 If Fi don't exist or the index i is out of the variability range return 0
Double_t GetStatErrF(Int_t i) const
 Return statistical error on correction factors Fi at the position i (pt-mothers bin index).
 Bin 0 is the underflow, bin nbins+1 the overflow.
 If Fi don't exist or the index i is out of the variability range return 0
Double_t GetWmin(Int_t i, Int_t j) const
 Return value of correction factors Wij_min at the position i (ptMin-mothers bin index)-
 j (pt-daughter bin index). Bin 0 is the underflow, bin nbins+1 the overflow.
 If Wij_min don't exist or the indices i or j are out of the variability range return 0
Double_t GetStatErrWmin(Int_t i, Int_t j) const
 Return value of statistical error on correction factors Wij_min at the position
 i (ptMin-mothers bin index)- j (pt-daughter bin index). Bin 0 is the underflow,
 bin nbins+1 the overflow. If Wij_min don't exist or the indices i or j are out of the
 variability range return 0
Double_t GetFmin(Int_t i) const
 Return value of correction factors Fi_min at the position i (ptMin-mothers bin index).
 Bin 0 is the underflow, bin nbins+1 the overflow.
 If Fi_min don't exist or the index i is out of the variability range return 0
Double_t GetStatErrFmin(Int_t i) const
 Return statistical error on correction factors Fi_min at the position i (ptMin-mothers bin index).
 Bin 0 is the underflow, bin nbins+1 the overflow.
 If Fi_min don't exist or the index i is out of the variability range return 0
Bool_t IsMothers(Int_t pdgCode)
return kTRUE if pdgCode is in the list of pdg codes of mothers
Bool_t IsSelectedDaugh(const TParticle* part, Int_t& labelDaugh, AliStack *const stack)
 return kTRUE if particle part has the selected daughter
 if yes put the label of the track in labelDaugh
Bool_t Rapidity(const TParticle* particle, Double_t& y)
 Evaluated rapidity of particle  and put it in y. Return kFALSE if
 cannot compute rapidity
Int_t GiveBinIndex(Double_t Ptpart, const TH1F* ptHist) const
 Return the bin index of pt respect to the binning size of ptHist
 bin 0 is the underflow - nbins+1 is the overflow
Bool_t CutDaugh(Double_t yD, Double_t ptD)
 put a control for rapidity yD and transverse momentum ptD of daughter
 return kTRUE if  fyDaughMin < yD < fyDaughMax and ptMinDaugh < ptD < ptMaxDaugh
Bool_t EvaluateWij()
 Evaluate correction factors using to extract the ptRaw and
 ptMinRaw distributions. Statistical errors on those are computed too
Bool_t EvaluateFi()
 Evaluate acceptance correction factors that are applied on the
 raw distributions. Statistical errors on those are computed too
Bool_t EvaluatePtMothRaw(TH1F* histoPt, TH1F* histoPtMin)
Apply the fWij and fWijMin on the daughter distribution
in order to evaluate the pt and ptMin raw distributions for mothers
Bool_t EvaluateErrPt(Double_t* erStat)
 Evaluate the statistical error on the pt-mothers distribution.
 sigmaX: contribution that came from the measured distibution
 sigmaWij: contribution that came from the fWij factors
 sigmaFi: contribution that came from the fFi factors
Bool_t EvaluateErrPtMin(Double_t* erStat)
 Evaluate statistical error on ptMin mothers distribution
 sigmaMinX: contribution that came from the measured distibution
 sigmaMinWij: contribution that came from the fWijMin factors
 sigmaMinFi: contribution that came from the fFiMin factors
Bool_t EvaluatePtMoth()
 Evaluate pt and ptMin distribution for mothers
 First evaluate the sigma raw distribution by calling EvaluatePtMothRaw
 then evaluate the pt and ptMin mothers distribution.
 Statistical errors on those distributions are evaluated too.
void WritePtMothHistoToFile(TString fileOutName = "Mothers.root")
 Write pt and ptMin histograms of mothers in a file
 with name fileOutName. Default name is "Mothers.root".
void SetDefaultAnalysis(AliPtMothFromPtDaugh::Analysis_mode mode)
 setters

void SetYmothers(Double_t yMin, Double_t yMax)
void SetYdaughter(Double_t yMin, Double_t yMax)
void SetEtaMothers(Double_t etaMin, Double_t etaMax)
void SetEtaDaughter(Double_t etaMin, Double_t etaMax)
void SetDecayNtupla(TNtuple* DecKine)
getters
{fDecayKine = DecKine;}
Int_t GetPdgDaugh() const
{return fDaughter;}
TH1F* GetHistoPtMother() const
 return pointers to pt and ptMin mothers histograms
{return fHistoPtMothers;}
TH1F* GetHistoPtMinMother() const
void SetUseEta(Bool_t useEta)
{fUseEta=useEta;}