#ifndef ALIPTMOTHFROMPTDAUGH_H
#define ALIPTMOTHFROMPTDAUGH_H
class TH1F;
class TNtuple;
class AliStack;
class TParticle;
class TArrayI;
#include <TNamed.h>
#include <TString.h>
class AliPtMothFromPtDaugh : public TNamed {
public:
typedef enum {
kUserAnalysis,
kBtoJPSI,
kBtoEle,
kBtoMuon,
kBtoD0
} Analysis_mode;
AliPtMothFromPtDaugh();
AliPtMothFromPtDaugh(const char* name, const char* title);
virtual ~AliPtMothFromPtDaugh();
Bool_t CreateWeights();
void DeleteWeights();
Bool_t ReadHistoPtDaught(const TH1F *hist);
void SetDefaultAnalysis(Analysis_mode mode){fAnalysisMode = mode; InitDefaultAnalysis();}
void SetPdgDaugh(Int_t pdgD);
void SetBeautyMothers();
void SetPdgMothers(Int_t n_mothers,Int_t *pdgM);
void SetBinsPtMoth(Double_t ptmin, Double_t ptmax,Int_t nbins,Double_t alpha=1.0);
void SetBinsPtMoth(Int_t nbins, Double_t *edgeBins);
void SetBinsPtMinMoth(Double_t ptmin, Double_t ptmax,Int_t nbins,Double_t alpha=1.0);
void SetBinsPtMinMoth(Int_t nbins, Double_t *edgeBins);
void SetYmothers(Double_t yMin, Double_t yMax){fyMothMin = yMin;
fyMothMax = yMax; SetUseEta(kFALSE);}
void SetYdaughter(Double_t yMin, Double_t yMax){fyDaughMin = yMin;
fyDaughMax = yMax; SetUseEta(kFALSE);}
void SetEtaMothers(Double_t etaMin, Double_t etaMax){fyMothMin = etaMin;
fyMothMax = etaMax; SetUseEta(kTRUE);}
void SetEtaDaughter(Double_t etaMin, Double_t etaMax){fyDaughMin = etaMin;
fyDaughMax = etaMax; SetUseEta(kTRUE);}
void SetDecayNtupla(TNtuple *DecKine){fDecayKine = DecKine;}
Double_t* GetBinsSize(const TH1F *hist, Int_t &n) const;
Bool_t GetEtaMothers(Double_t &etaMin, Double_t &etaMax) const;
Bool_t GetEtaDaughter(Double_t &etaMin, Double_t &etaMax) const;
Bool_t GetYMothers(Double_t &yMin, Double_t &yMax) const;
Bool_t GetYDaughter(Double_t &yMin, Double_t &yMax) const;
Int_t GetPdgDaugh() const {return fDaughter;}
Int_t* GetPdgMothers(Int_t &n_mothers) const;
Bool_t EvaluatePtMoth();
void WritePtMothHistoToFile(TString fileOutName="Mothers.root");
Double_t GetW(Int_t i,Int_t j) const;
Double_t GetF(Int_t i) const;
Double_t GetWmin(Int_t i,Int_t j) const;
Double_t GetFmin(Int_t i) const;
Double_t GetStatErrW(Int_t i,Int_t j) const;
Double_t GetStatErrF(Int_t i) const;
Double_t GetStatErrWmin(Int_t i,Int_t j) const;
Double_t GetStatErrFmin(Int_t i) const;
TH1F* GetHistoPtMother() const {return fHistoPtMothers;}
TH1F* GetHistoPtMinMother() const {return fHistoPtMinMothers;}
Int_t GiveBinIndex(Double_t Ptpart,const TH1F *ptHist) const;
Bool_t Rapidity(const TParticle *particle, Double_t &y);
Bool_t IsMothers(Int_t pdgCode);
Bool_t IsSelectedDaugh(const TParticle *part, Int_t &labelDaugh, AliStack * const stack);
Bool_t CutDaugh(Double_t yD,Double_t ptD);
private:
void InitDefaultAnalysis();
Bool_t EvaluateWij();
Bool_t EvaluateFi();
void SetUseEta(Bool_t useEta){fUseEta=useEta;}
Double_t* SetBinsSize(Double_t ptmin, Double_t ptmax,Int_t nbins,Double_t alpha);
Bool_t EvaluatePtMothRaw(TH1F *histoPt, TH1F *histoPtMin);
Bool_t EvaluateErrPt(Double_t *erStat);
Bool_t EvaluateErrPtMin(Double_t *erStat);
void SetPdgMothersPrivate(Int_t n_mothers,Int_t *pdgM);
TNtuple* fDecayKine;
Double_t** fWij;
Double_t* fFi;
Double_t** fWijMin;
Double_t* fFiMin;
TH1F* fHistoPtDaughter;
TH1F* fHistoPtMothers;
TH1F* fHistoPtMinMothers;
TArrayI* fMothers;
Int_t fDaughter;
Double_t fyMothMax;
Double_t fyMothMin;
Double_t fyDaughMax;
Double_t fyDaughMin;
Bool_t fUseEta;
Analysis_mode fAnalysisMode;
AliPtMothFromPtDaugh(const AliPtMothFromPtDaugh &c);
AliPtMothFromPtDaugh &operator=(const AliPtMothFromPtDaugh &c);
ClassDef(AliPtMothFromPtDaugh,1);
};
#endif
AliPtMothFromPtDaugh.h:10 AliPtMothFromPtDaugh.h:11 AliPtMothFromPtDaugh.h:12 AliPtMothFromPtDaugh.h:13 AliPtMothFromPtDaugh.h:14 AliPtMothFromPtDaugh.h:15 AliPtMothFromPtDaugh.h:16 AliPtMothFromPtDaugh.h:17 AliPtMothFromPtDaugh.h:18 AliPtMothFromPtDaugh.h:19 AliPtMothFromPtDaugh.h:20 AliPtMothFromPtDaugh.h:21 AliPtMothFromPtDaugh.h:22 AliPtMothFromPtDaugh.h:23 AliPtMothFromPtDaugh.h:24 AliPtMothFromPtDaugh.h:25 AliPtMothFromPtDaugh.h:26 AliPtMothFromPtDaugh.h:27 AliPtMothFromPtDaugh.h:28 AliPtMothFromPtDaugh.h:29 AliPtMothFromPtDaugh.h:30 AliPtMothFromPtDaugh.h:31 AliPtMothFromPtDaugh.h:32 AliPtMothFromPtDaugh.h:33 AliPtMothFromPtDaugh.h:34 AliPtMothFromPtDaugh.h:35 AliPtMothFromPtDaugh.h:36 AliPtMothFromPtDaugh.h:37 AliPtMothFromPtDaugh.h:38 AliPtMothFromPtDaugh.h:39 AliPtMothFromPtDaugh.h:40 AliPtMothFromPtDaugh.h:41 AliPtMothFromPtDaugh.h:42 AliPtMothFromPtDaugh.h:43 AliPtMothFromPtDaugh.h:44 AliPtMothFromPtDaugh.h:45 AliPtMothFromPtDaugh.h:46 AliPtMothFromPtDaugh.h:47 AliPtMothFromPtDaugh.h:48 AliPtMothFromPtDaugh.h:49 AliPtMothFromPtDaugh.h:50 AliPtMothFromPtDaugh.h:51 AliPtMothFromPtDaugh.h:52 AliPtMothFromPtDaugh.h:53 AliPtMothFromPtDaugh.h:54 AliPtMothFromPtDaugh.h:55 AliPtMothFromPtDaugh.h:56 AliPtMothFromPtDaugh.h:57 AliPtMothFromPtDaugh.h:58 AliPtMothFromPtDaugh.h:59 AliPtMothFromPtDaugh.h:60 AliPtMothFromPtDaugh.h:61 AliPtMothFromPtDaugh.h:62 AliPtMothFromPtDaugh.h:63 AliPtMothFromPtDaugh.h:64 AliPtMothFromPtDaugh.h:65 AliPtMothFromPtDaugh.h:66 AliPtMothFromPtDaugh.h:67 AliPtMothFromPtDaugh.h:68 AliPtMothFromPtDaugh.h:69 AliPtMothFromPtDaugh.h:70 AliPtMothFromPtDaugh.h:71 AliPtMothFromPtDaugh.h:72 AliPtMothFromPtDaugh.h:73 AliPtMothFromPtDaugh.h:74 AliPtMothFromPtDaugh.h:75 AliPtMothFromPtDaugh.h:76 AliPtMothFromPtDaugh.h:77 AliPtMothFromPtDaugh.h:78 AliPtMothFromPtDaugh.h:79 AliPtMothFromPtDaugh.h:80 AliPtMothFromPtDaugh.h:81 AliPtMothFromPtDaugh.h:82 AliPtMothFromPtDaugh.h:83 AliPtMothFromPtDaugh.h:84 AliPtMothFromPtDaugh.h:85 AliPtMothFromPtDaugh.h:86 AliPtMothFromPtDaugh.h:87 AliPtMothFromPtDaugh.h:88 AliPtMothFromPtDaugh.h:89 AliPtMothFromPtDaugh.h:90 AliPtMothFromPtDaugh.h:91 AliPtMothFromPtDaugh.h:92 AliPtMothFromPtDaugh.h:93 AliPtMothFromPtDaugh.h:94 AliPtMothFromPtDaugh.h:95 AliPtMothFromPtDaugh.h:96 AliPtMothFromPtDaugh.h:97 AliPtMothFromPtDaugh.h:98 AliPtMothFromPtDaugh.h:99 AliPtMothFromPtDaugh.h:100 AliPtMothFromPtDaugh.h:101 AliPtMothFromPtDaugh.h:102 AliPtMothFromPtDaugh.h:103 AliPtMothFromPtDaugh.h:104 AliPtMothFromPtDaugh.h:105 AliPtMothFromPtDaugh.h:106 AliPtMothFromPtDaugh.h:107 AliPtMothFromPtDaugh.h:108 AliPtMothFromPtDaugh.h:109 AliPtMothFromPtDaugh.h:110 AliPtMothFromPtDaugh.h:111 AliPtMothFromPtDaugh.h:112 AliPtMothFromPtDaugh.h:113 AliPtMothFromPtDaugh.h:114 AliPtMothFromPtDaugh.h:115 AliPtMothFromPtDaugh.h:116 AliPtMothFromPtDaugh.h:117 AliPtMothFromPtDaugh.h:118 AliPtMothFromPtDaugh.h:119 AliPtMothFromPtDaugh.h:120 AliPtMothFromPtDaugh.h:121 AliPtMothFromPtDaugh.h:122 AliPtMothFromPtDaugh.h:123 AliPtMothFromPtDaugh.h:124 AliPtMothFromPtDaugh.h:125 AliPtMothFromPtDaugh.h:126 AliPtMothFromPtDaugh.h:127 AliPtMothFromPtDaugh.h:128 AliPtMothFromPtDaugh.h:129 AliPtMothFromPtDaugh.h:130 AliPtMothFromPtDaugh.h:131 AliPtMothFromPtDaugh.h:132 AliPtMothFromPtDaugh.h:133 AliPtMothFromPtDaugh.h:134 AliPtMothFromPtDaugh.h:135 AliPtMothFromPtDaugh.h:136 AliPtMothFromPtDaugh.h:137 AliPtMothFromPtDaugh.h:138 AliPtMothFromPtDaugh.h:139 AliPtMothFromPtDaugh.h:140 AliPtMothFromPtDaugh.h:141 AliPtMothFromPtDaugh.h:142 AliPtMothFromPtDaugh.h:143 AliPtMothFromPtDaugh.h:144 AliPtMothFromPtDaugh.h:145 AliPtMothFromPtDaugh.h:146 AliPtMothFromPtDaugh.h:147 AliPtMothFromPtDaugh.h:148 AliPtMothFromPtDaugh.h:149 AliPtMothFromPtDaugh.h:150