AliPhysics  9c7580a (9c7580a)
AliVertexingHFUtils.h
Go to the documentation of this file.
1 #ifndef ALIVERTEXINGHFUTILS_H
2 #define ALIVERTEXINGHFUTILS_H
3 
4 
5 /* $Id$ */
6 
17 
18 #include "TObject.h"
19 #include "AliAODTrack.h"
20 #include "AliAODRecoDecay.h"
21 #include "AliAODRecoDecayHF.h"
22 #include "AliAODRecoCascadeHF.h"
23 
24 class AliMCEvent;
25 class AliAODMCParticle;
26 class AliAODMCHeader;
27 class AliGenEventHeader;
28 class AliAODEvent;
29 class TProfile;
30 class TParticle;
31 class TClonesArray;
32 class TH1F;
33 class TH2F;
34 class TF1;
35 
37  public:
40  virtual ~AliVertexingHFUtils() {};
41 
43  static void ComputeSignificance(Double_t signal, Double_t errsignal, Double_t background, Double_t errbackground, Double_t &significance,Double_t &errsignificance);
44 
46  void SetK(Int_t k){fK=k;}
47  void SetSubEvResol(Double_t res){fSubRes=res;}
48  void SetSubEventHisto(const TH1F* hSub){
49  fSubRes=GetSubEvResol(hSub);
50  }
51  Int_t GetK() const {return fK;}
52  Double_t GetSubEvResol() const {return fSubRes;}
53  Double_t Pol(Double_t x) const {return Pol(x,fK);}
54  Double_t FindChi() const {return FindChi(fSubRes,fK);}
56  static Double_t FindChi(Double_t res, Int_t k=1);
57  static Double_t Pol(Double_t x, Int_t k);
58  static Double_t ResolK1(Double_t x);
59  static Double_t GetSubEvResol(const TH1F* hSubEvCorr){
60  if(hSubEvCorr) return TMath::Sqrt(hSubEvCorr->GetMean());
61  else return 1.;
62  }
63  static Double_t GetSubEvResolLowLim(const TH1F* hSubEvCorr){
64  if(hSubEvCorr) return TMath::Sqrt(hSubEvCorr->GetMean()-hSubEvCorr->GetMeanError());
65  else return 1.;
66  }
67  static Double_t GetSubEvResolHighLim(const TH1F* hSubEvCorr){
68  if(hSubEvCorr) return TMath::Sqrt(hSubEvCorr->GetMean()+hSubEvCorr->GetMeanError());
69  else return 1.;
70  }
71  static Double_t GetFullEvResol(Double_t resSub, Int_t k=1);
72  static Double_t GetFullEvResol(const TH1F* hSubEvCorr, Int_t k=1);
73  static Double_t GetFullEvResolLowLim(const TH1F* hSubEvCorr, Int_t k=1);
74  static Double_t GetFullEvResolHighLim(const TH1F* hSubEvCorr, Int_t k=1);
75  static TString GetGenerator(Int_t label, AliAODMCHeader* header);
76  Bool_t IsTrackInjected(AliAODTrack *track,AliAODMCHeader *header,TClonesArray *arrayMC);
77  void GetTrackPrimaryGenerator(AliAODTrack *track,AliAODMCHeader *header,TClonesArray *arrayMC,TString &nameGen);
78  Bool_t IsCandidateInjected(AliAODRecoDecayHF *cand, AliAODMCHeader *header,TClonesArray *arrayMC);
79  Bool_t HasCascadeCandidateAnyDaughInjected(AliAODRecoCascadeHF *cand, AliAODMCHeader *header,TClonesArray *arrayMC);
82  fMinEtaForTracklets=mineta;
83  fMaxEtaForTracklets=maxeta;
84  }
88  }
89  static Int_t GetGeneratedMultiplicityInEtaRange(TClonesArray* arrayMC, Double_t mineta, Double_t maxeta);
90  static Int_t GetGeneratedPrimariesInEtaRange(TClonesArray* arrayMC, Double_t mineta, Double_t maxeta);
91  static Int_t GetGeneratedPhysicalPrimariesInEtaRange(TClonesArray* arrayMC, Double_t mineta, Double_t maxeta);
92 
94  static void GetSpherocity(AliAODEvent* aod,
95  Double_t &spherocity, Double_t &phiRef,
96  Double_t etaMin=-0.8, Double_t etaMax=0.8,
97  Double_t ptMin=0.15, Double_t ptMax=10.,
98  Int_t filtbit1=256, Int_t filtbit2=512,
99  Int_t minMult=3, Double_t phiStepSizeDeg=0.1,
100  Int_t nTrksToSkip=0, Int_t* idToSkip=0x0);
101 
102  static void GetGeneratedSpherocity(TClonesArray *arrayMC,
103  Double_t &spherocity, Double_t &phiRef,
104  Double_t etaMin=-0.8, Double_t etaMax=0.8,
105  Double_t ptMin=0.15, Double_t ptMax=10.,
106  Int_t minMult=3, Double_t phiStepSizeDeg=0.1);
107 
108  static Double_t GetSphericity(AliAODEvent* aod,
109  Double_t etaMin=-0.8, Double_t etaMax=0.8,
110  Double_t ptMin=0.15, Double_t ptMax=10.,
111  Int_t filtbit1=256, Int_t filtbit2=512,
112  Int_t minMult=3);
113 
117 
119  static void AveragePt(Float_t& averagePt, Float_t& errorPt, Float_t ptmin, Float_t ptmax, TH2F* hMassD, Float_t massFromFit, Float_t sigmaFromFit, TF1* funcB2, Float_t sigmaRangeForSig=2.5, Float_t sigmaRangeForBkg=4.5, Float_t minMass=0., Float_t maxMass=3., Int_t rebin=1);
120 
122  static Bool_t CheckT0TriggerFired(AliAODEvent* aodEv);
123 
125  static TH1D* RebinHisto(TH1* hOrig, Int_t reb, Int_t firstUse=-1);
126  static TH1* AdaptTemplateRangeAndBinning(const TH1 *hRef,TH1 *hData, Double_t minFit, Double_t maxFit);
127 
129  static Double_t GetTrueImpactParameterDzero(AliAODMCHeader *mcHeader, TClonesArray* arrayMC, AliAODMCParticle *partDp);
130  static Double_t GetTrueImpactParameterDplus(AliAODMCHeader *mcHeader, TClonesArray* arrayMC, AliAODMCParticle *partDp);
131 
132  static Double_t GetCorrectedNtracklets(TProfile* estimatorAvg, Double_t uncorrectedNacc, Double_t vtxZ, Double_t refMult);
133 
135  static Int_t CheckOrigin(TClonesArray* arrayMC, AliAODMCParticle *mcPart, Bool_t searchUpToQuark=kTRUE);
136  static Int_t CheckOrigin(AliMCEvent* mcEvent, TParticle *mcPart, Bool_t searchUpToQuark=kTRUE);
137  static Double_t GetBeautyMotherPt(TClonesArray* arrayMC, AliAODMCParticle *mcPart);
138  static Int_t CheckD0Decay(AliMCEvent* mcEvent, Int_t label, Int_t* arrayDauLab);
139  static Int_t CheckD0Decay(TClonesArray* arrayMC, AliAODMCParticle *mcPart, Int_t* arrayDauLab);
140  static Int_t CheckDplusDecay(AliMCEvent* mcEvent, Int_t label, Int_t* arrayDauLab);
141  static Int_t CheckDplusDecay(TClonesArray* arrayMC, AliAODMCParticle *mcPart, Int_t* arrayDauLab);
142  static Int_t CheckDplusKKpiDecay(AliMCEvent* mcEvent, Int_t label, Int_t* arrayDauLab);
143  static Int_t CheckDplusKKpiDecay(TClonesArray* arrayMC, AliAODMCParticle *mcPart, Int_t* arrayDauLab);
144  static Int_t CheckDplusK0spiDecay(AliMCEvent* mcEvent, Int_t label, Int_t* arrayDauLab);
145  static Int_t CheckDsDecay(AliMCEvent* mcEvent, Int_t label, Int_t* arrayDauLab);
146  static Int_t CheckDsDecay(TClonesArray* arrayMC, AliAODMCParticle *mcPart, Int_t* arrayDauLab);
147  static Int_t CheckDsK0sKDecay(AliMCEvent* mcEvent, Int_t label, Int_t* arrayDauLab);
148  static Int_t CheckDstarDecay(AliMCEvent* mcEvent, Int_t label, Int_t* arrayDauLab);
149  static Int_t CheckDstarDecay(TClonesArray* arrayMC, AliAODMCParticle *mcPart, Int_t* arrayDauLab);
150  static Int_t CheckLcpKpiDecay(AliMCEvent* mcEvent, Int_t label, Int_t* arrayDauLab);
151  static Int_t CheckLcpKpiDecay(TClonesArray* arrayMC, AliAODMCParticle *mcPart, Int_t* arrayDauLab);
152  static Int_t CheckLcV0bachelorDecay(AliMCEvent* mcEvent, Int_t label, Int_t* arrayDauLab);
153  static Int_t CheckXicXipipiDecay(AliMCEvent* mcEvent, Int_t label, Int_t* arrayDauLab);
154 
155  private:
156 
161 
163  ClassDef(AliVertexingHFUtils,0);
165 };
166 #endif
static void GetSpherocity(AliAODEvent *aod, Double_t &spherocity, Double_t &phiRef, Double_t etaMin=-0.8, Double_t etaMax=0.8, Double_t ptMin=0.15, Double_t ptMax=10., Int_t filtbit1=256, Int_t filtbit2=512, Int_t minMult=3, Double_t phiStepSizeDeg=0.1, Int_t nTrksToSkip=0, Int_t *idToSkip=0x0)
Functions for event shape variables.
static Int_t CheckD0Decay(AliMCEvent *mcEvent, Int_t label, Int_t *arrayDauLab)
static void AveragePt(Float_t &averagePt, Float_t &errorPt, Float_t ptmin, Float_t ptmax, TH2F *hMassD, Float_t massFromFit, Float_t sigmaFromFit, TF1 *funcB2, Float_t sigmaRangeForSig=2.5, Float_t sigmaRangeForBkg=4.5, Float_t minMass=0., Float_t maxMass=3., Int_t rebin=1)
Functions for computing average pt.
static TH1D * RebinHisto(TH1 *hOrig, Int_t reb, Int_t firstUse=-1)
Rebinning of invariant mass histograms.
double Double_t
Definition: External.C:58
Definition: External.C:236
static Int_t CheckDplusDecay(AliMCEvent *mcEvent, Int_t label, Int_t *arrayDauLab)
void SetSubEventHisto(const TH1F *hSub)
static Int_t CheckDsDecay(AliMCEvent *mcEvent, Int_t label, Int_t *arrayDauLab)
static Int_t CheckLcpKpiDecay(AliMCEvent *mcEvent, Int_t label, Int_t *arrayDauLab)
static TString GetGenerator(Int_t label, AliAODMCHeader *header)
Int_t GetNumberOfTrackletsInEtaRange(AliAODEvent *ev) const
Double_t Pol(Double_t x) const
static Double_t GetFullEvResolLowLim(const TH1F *hSubEvCorr, Int_t k=1)
void SetK(Int_t k)
Functions for Event plane resolution.
Double_t ptMin
static TH1 * AdaptTemplateRangeAndBinning(const TH1 *hRef, TH1 *hData, Double_t minFit, Double_t maxFit)
static Int_t CheckOrigin(TClonesArray *arrayMC, AliAODMCParticle *mcPart, Bool_t searchUpToQuark=kTRUE)
Functions to check the decay tree.
void GetTrackPrimaryGenerator(AliAODTrack *track, AliAODMCHeader *header, TClonesArray *arrayMC, TString &nameGen)
Double_t fMinEtaForTracklets
sub-event resolution = sqrt(<cos[n(phiA-phiB)] >)
Double_t fSubRes
ratio of measured harmonic to event plane harmonic
static Int_t CheckDplusK0spiDecay(AliMCEvent *mcEvent, Int_t label, Int_t *arrayDauLab)
static Int_t CheckXicXipipiDecay(AliMCEvent *mcEvent, Int_t label, Int_t *arrayDauLab)
static Int_t CheckLcV0bachelorDecay(AliMCEvent *mcEvent, Int_t label, Int_t *arrayDauLab)
Double_t fMaxEtaForTracklets
min eta for counting tracklets
static Double_t GetVZEROCEqualizedMultiplicity(AliAODEvent *ev)
static Double_t GetFullEvResolHighLim(const TH1F *hSubEvCorr, Int_t k=1)
static void GetGeneratedSpherocity(TClonesArray *arrayMC, Double_t &spherocity, Double_t &phiRef, Double_t etaMin=-0.8, Double_t etaMax=0.8, Double_t ptMin=0.15, Double_t ptMax=10., Int_t minMult=3, Double_t phiStepSizeDeg=0.1)
static Double_t ResolK1(Double_t x)
static Int_t GetNumberOfTrackletsInEtaRange(AliAODEvent *ev, Double_t mineta, Double_t maxeta)
int Int_t
Definition: External.C:63
Double_t GetFullEvResol() const
float Float_t
Definition: External.C:68
const Double_t ptmax
static Int_t CheckDplusKKpiDecay(AliMCEvent *mcEvent, Int_t label, Int_t *arrayDauLab)
static Bool_t CheckT0TriggerFired(AliAODEvent *aodEv)
Functions for processing trigger information.
Definition: External.C:212
static Double_t GetSubEvResolLowLim(const TH1F *hSubEvCorr)
const Double_t ptmin
Bool_t HasCascadeCandidateAnyDaughInjected(AliAODRecoCascadeHF *cand, AliAODMCHeader *header, TClonesArray *arrayMC)
Bool_t IsCandidateInjected(AliAODRecoDecayHF *cand, AliAODMCHeader *header, TClonesArray *arrayMC)
static Double_t GetSubEvResol(const TH1F *hSubEvCorr)
static Int_t CheckDstarDecay(AliMCEvent *mcEvent, Int_t label, Int_t *arrayDauLab)
static Double_t GetBeautyMotherPt(TClonesArray *arrayMC, AliAODMCParticle *mcPart)
static void ComputeSignificance(Double_t signal, Double_t errsignal, Double_t background, Double_t errbackground, Double_t &significance, Double_t &errsignificance)
Significance calculator.
static Double_t GetCorrectedNtracklets(TProfile *estimatorAvg, Double_t uncorrectedNacc, Double_t vtxZ, Double_t refMult)
void SetSubEvResol(Double_t res)
Double_t GetSubEvResol() const
Bool_t IsTrackInjected(AliAODTrack *track, AliAODMCHeader *header, TClonesArray *arrayMC)
Double_t minMass
Double_t FindChi() const
Int_t rebin
static Int_t GetGeneratedPhysicalPrimariesInEtaRange(TClonesArray *arrayMC, Double_t mineta, Double_t maxeta)
static Double_t GetVZEROAEqualizedMultiplicity(AliAODEvent *ev)
Utilities for V0 multiplicity checks.
static Double_t GetTrueImpactParameterDzero(AliAODMCHeader *mcHeader, TClonesArray *arrayMC, AliAODMCParticle *partDp)
Functions for computing true impact parameter of D meson.
Double_t maxMass
bool Bool_t
Definition: External.C:53
void SetEtaRangeForTracklets(Double_t mineta, Double_t maxeta)
Functions for tracklet multiplcity calculation.
static Int_t CheckDsK0sKDecay(AliMCEvent *mcEvent, Int_t label, Int_t *arrayDauLab)
Double_t ptMax
static Double_t GetSubEvResolHighLim(const TH1F *hSubEvCorr)
static Double_t GetTrueImpactParameterDplus(AliAODMCHeader *mcHeader, TClonesArray *arrayMC, AliAODMCParticle *partDp)
static Double_t GetSphericity(AliAODEvent *aod, Double_t etaMin=-0.8, Double_t etaMax=0.8, Double_t ptMin=0.15, Double_t ptMax=10., Int_t filtbit1=256, Int_t filtbit2=512, Int_t minMult=3)
Definition: External.C:196
static Int_t GetGeneratedMultiplicityInEtaRange(TClonesArray *arrayMC, Double_t mineta, Double_t maxeta)
static Int_t GetGeneratedPrimariesInEtaRange(TClonesArray *arrayMC, Double_t mineta, Double_t maxeta)
Class with functions useful for different D2H analyses //.