AliPhysics  vAN-20151014 (f894c76)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
CalculateAveragePt.C File Reference
#include <TH2F.h>
#include <TH1F.h>
#include <TH2D.h>
#include <TH1D.h>
#include <TCanvas.h>
#include <TF1.h>
#include <TFile.h>
#include <TDirectory.h>
#include <TMath.h>
#include <TString.h>
#include <TGraphAsymmErrors.h>
#include <TAxis.h>
#include <TLegend.h>
Include dependency graph for CalculateAveragePt.C:

Go to the source code of this file.

Functions

void SetSubtractSB (Bool_t subtract)
 
void SetCorrForEff (Bool_t correff)
 
void SetUseFitForSubtraction (Bool_t useFit)
 
void SetNsigmaForSignal (Double_t nsigm)
 
void SetNsigmaStartSB (Double_t nsigm)
 
void CalculateAveragePt (Int_t rebin=1, Int_t firstbin=0, Int_t lastbin=0)
 
TF1 * ParametricGenAccOverLimAccCorr ()
 
void SetHistosEfficiency (TH1D *hNum, TH1D *hDenum)
 
void SetPtBinLimits (const Int_t npt, Double_t *ptbinlim)
 
void SetPtBinLimits (TH1 *histo)
 
void SetHistRawSignal (TH1D *hS)
 
void SetHistMean (TH1D *hM)
 
void SetHistRawBack (TH1D *hB)
 
void SetHistSigma (TH1D *hSig)
 
void SetHistoMassPt (TH2F *h2)
 
TH1D * CheckBinningAndMerge (TH1D *hA, TH1D *hB, Double_t precision=0.001, Double_t minX=-9999., Double_t maxX=-9999.)
 
Bool_t CorrectForEfficiency (TH1D *hPtHisto)
 
TH1D * HistoPtShapeFromData (Int_t ptbin, Int_t rebin=1.)
 
void CalculateAveragePt (TH2 *hMassPt, TH1D *hB, TH1D *hSigm, TH1D *hEffNum=0x0, TH1D *hEffDenum=0x0, TH1D *hS=0x0, TH1D *hMean=0x0, Int_t rebin=1, Int_t firstbin=3, Int_t lastbin=8)
 
void DoStandardForD0 (Int_t rebin, Bool_t usefit, Bool_t corrforeff=kTRUE, Bool_t useParGenAccLimacc=kTRUE, Int_t firstbin=0, Int_t lastbin=3)
 
void DoStandardForDs (Int_t rebin, Bool_t usefit, Bool_t corrforeff=kTRUE, Int_t firstbin=0, Int_t lastbin=3)
 
void DoStandardForDplus (Int_t rebin, Bool_t usefit, Bool_t corrforeff=kTRUE, Int_t firstbin=0, Int_t lastbin=2)
 
TH1D * SmearEffHisto (TH1D *hInput, TString name="hEffNum", Double_t maxPt=40., Double_t step=0.1)
 
void AverageD0DplusResults (TString fileD0="/Users/administrator/ALICE/CHARM/ppData_2010/2011_Jul_05/data/LHC10bcdeAOD057/AvPt/MassRegSel3PkMore5SBEffCorrMeanFit/ptCorrectionFitSB.root", TString fileDplus="/Users/administrator/ALICE/CHARM/ppData_2010/2011_Jul_05/Dplus/AvPt/2011Jul26Renu/average_ptNew.root")
 

Variables

TH2F * hPtInvMass =0x0
 
Int_t nptbins =0
 
Double_t * ptbinlimits =0x0
 
Double_t * rawsignal =0x0
 
Double_t * rawback =0x0
 
Double_t * sigma =0x0
 
Double_t * meansignal =0x0
 
Double_t nsigmaSignal =3.
 
Double_t nsigmaSBstart =5.
 
Double_t mesonMass =1.8645
 
Int_t nbinsx
 
Int_t nbinsy
 
Double_t binwidthpt
 
Double_t binwidthInvMss
 
Double_t ptmin
 
Double_t ptmax
 
Bool_t useFitForSubtraction =kFALSE
 
Bool_t useParGenAccOverLimAcc =kFALSE
 
Bool_t subtractSB =kTRUE
 
Bool_t corrForEff =kFALSE
 
Int_t standrebin [8] ={2,2,2,2,2,2,4,5}
 
TCanvas ** cPtDistrNoSubtr
 
TF1 ** fitfunc
 
TH1D * hAvRawYieldSpectrum
 
TH1D * hSignal
 
TH1D * hMeanSignal
 
TH1D * hEfficNum
 
TH1D * hEfficDenum
 
TH1D * hBack
 
TH1D * hSigma
 
TGraphAsymmErrors * grAvRawYieldSpectrum
 
TGraphAsymmErrors * grAvPtVSPtmean
 
TGraphAsymmErrors * grBackAvPtVSPtmean
 

Function Documentation

void AverageD0DplusResults ( TString  fileD0 = "/Users/administrator/ALICE/CHARM/ppData_2010/2011_Jul_05/data/LHC10bcdeAOD057/AvPt/MassRegSel3PkMore5SBEffCorrMeanFit/ptCorrectionFitSB.root",
TString  fileDplus = "/Users/administrator/ALICE/CHARM/ppData_2010/2011_Jul_05/Dplus/AvPt/2011Jul26Renu/average_ptNew.root" 
)

Definition at line 754 of file CalculateAveragePt.C.

void CalculateAveragePt ( Int_t  rebin = 1,
Int_t  firstbin = 0,
Int_t  lastbin = 0 
)
void CalculateAveragePt ( TH2 *  hMassPt,
TH1D *  hB,
TH1D *  hSigm,
TH1D *  hEffNum = 0x0,
TH1D *  hEffDenum = 0x0,
TH1D *  hS = 0x0,
TH1D *  hMean = 0x0,
Int_t  rebin = 1,
Int_t  firstbin = 3,
Int_t  lastbin = 8 
)

Definition at line 404 of file CalculateAveragePt.C.

TH1D* CheckBinningAndMerge ( TH1D *  hA,
TH1D *  hB,
Double_t  precision = 0.001,
Double_t  minX = -9999.,
Double_t  maxX = -9999. 
)

Definition at line 160 of file CalculateAveragePt.C.

Referenced by CorrectForEfficiency().

Bool_t CorrectForEfficiency ( TH1D *  hPtHisto)

Definition at line 237 of file CalculateAveragePt.C.

Referenced by HistoPtShapeFromData().

void DoStandardForD0 ( Int_t  rebin,
Bool_t  usefit,
Bool_t  corrforeff = kTRUE,
Bool_t  useParGenAccLimacc = kTRUE,
Int_t  firstbin = 0,
Int_t  lastbin = 3 
)

Definition at line 592 of file CalculateAveragePt.C.

void DoStandardForDplus ( Int_t  rebin,
Bool_t  usefit,
Bool_t  corrforeff = kTRUE,
Int_t  firstbin = 0,
Int_t  lastbin = 2 
)

Definition at line 678 of file CalculateAveragePt.C.

void DoStandardForDs ( Int_t  rebin,
Bool_t  usefit,
Bool_t  corrforeff = kTRUE,
Int_t  firstbin = 0,
Int_t  lastbin = 3 
)

Definition at line 649 of file CalculateAveragePt.C.

TH1D* HistoPtShapeFromData ( Int_t  ptbin,
Int_t  rebin = 1. 
)

Definition at line 271 of file CalculateAveragePt.C.

Referenced by CalculateAveragePt().

TF1* ParametricGenAccOverLimAccCorr ( )

Definition at line 78 of file CalculateAveragePt.C.

Referenced by CorrectForEfficiency().

void SetCorrForEff ( Bool_t  correff)

Definition at line 72 of file CalculateAveragePt.C.

void SetHistMean ( TH1D *  hM)

Definition at line 130 of file CalculateAveragePt.C.

Referenced by CalculateAveragePt().

void SetHistoMassPt ( TH2F *  h2)

Definition at line 149 of file CalculateAveragePt.C.

Referenced by CalculateAveragePt().

void SetHistosEfficiency ( TH1D *  hNum,
TH1D *  hDenum 
)

Definition at line 88 of file CalculateAveragePt.C.

Referenced by CalculateAveragePt().

void SetHistRawBack ( TH1D *  hB)

Definition at line 135 of file CalculateAveragePt.C.

Referenced by CalculateAveragePt().

void SetHistRawSignal ( TH1D *  hS)

Definition at line 126 of file CalculateAveragePt.C.

Referenced by CalculateAveragePt().

void SetHistSigma ( TH1D *  hSig)

Definition at line 144 of file CalculateAveragePt.C.

Referenced by CalculateAveragePt().

void SetNsigmaForSignal ( Double_t  nsigm)

Definition at line 74 of file CalculateAveragePt.C.

Referenced by DoStandardForD0().

void SetNsigmaStartSB ( Double_t  nsigm)

Definition at line 75 of file CalculateAveragePt.C.

Referenced by DoStandardForD0().

void SetPtBinLimits ( const Int_t  npt,
Double_t *  ptbinlim 
)

Definition at line 98 of file CalculateAveragePt.C.

Referenced by CalculateAveragePt().

void SetPtBinLimits ( TH1 *  histo)

Definition at line 111 of file CalculateAveragePt.C.

void SetSubtractSB ( Bool_t  subtract)

Definition at line 71 of file CalculateAveragePt.C.

void SetUseFitForSubtraction ( Bool_t  useFit)

Definition at line 73 of file CalculateAveragePt.C.

Referenced by DoStandardForD0(), DoStandardForDplus(), and DoStandardForDs().

TH1D* SmearEffHisto ( TH1D *  hInput,
TString  name = "hEffNum",
Double_t  maxPt = 40.,
Double_t  step = 0.1 
)

Definition at line 730 of file CalculateAveragePt.C.

Variable Documentation

Double_t binwidthInvMss

Definition at line 64 of file CalculateAveragePt.C.

Referenced by SetHistoMassPt().

Double_t binwidthpt

Definition at line 63 of file CalculateAveragePt.C.

Referenced by HistoPtShapeFromData(), and SetHistoMassPt().

Bool_t corrForEff =kFALSE
TCanvas** cPtDistrNoSubtr

Definition at line 85 of file CalculateAveragePt.C.

Referenced by CalculateAveragePt(), HistoPtShapeFromData(), and SetPtBinLimits().

TF1** fitfunc

Definition at line 86 of file CalculateAveragePt.C.

Referenced by DrawProjections(), HistoPtShapeFromData(), and SetPtBinLimits().

TGraphAsymmErrors* grAvPtVSPtmean

Definition at line 94 of file CalculateAveragePt.C.

Referenced by CalculateAveragePt().

TGraphAsymmErrors* grAvRawYieldSpectrum

Definition at line 93 of file CalculateAveragePt.C.

Referenced by CalculateAveragePt().

TGraphAsymmErrors* grBackAvPtVSPtmean

Definition at line 96 of file CalculateAveragePt.C.

Referenced by CalculateAveragePt(), and HistoPtShapeFromData().

TH1D* hAvRawYieldSpectrum

Definition at line 87 of file CalculateAveragePt.C.

Referenced by CalculateAveragePt(), and SetHistRawBack().

TH1D * hBack

Definition at line 87 of file CalculateAveragePt.C.

Referenced by SetHistRawBack().

TH1D * hEfficDenum

Definition at line 87 of file CalculateAveragePt.C.

Referenced by CorrectForEfficiency(), and SetHistosEfficiency().

TH1D * hEfficNum

Definition at line 87 of file CalculateAveragePt.C.

Referenced by CorrectForEfficiency(), and SetHistosEfficiency().

TH1D * hMeanSignal

Definition at line 87 of file CalculateAveragePt.C.

Referenced by SetHistMean().

TH2F* hPtInvMass =0x0

Definition at line 55 of file CalculateAveragePt.C.

Referenced by HistoPtShapeFromData(), and SetHistoMassPt().

TH1D * hSigma
Double_t * meansignal =0x0

Definition at line 58 of file CalculateAveragePt.C.

Referenced by HistoPtShapeFromData(), and SetHistMean().

Double_t mesonMass =1.8645
Int_t nptbins =0

Definition at line 56 of file CalculateAveragePt.C.

Referenced by AddTaskSignificance(), AliAnalysisTaskSEDs::AliAnalysisTaskSEDs(), charmCutsOptimization(), ConfigVertexingHF(), CorrectForEfficiency(), AliAnaChargedParticles::GetCreateOutputObjects(), AliAnaParticleHadronCorrelation::GetCreateOutputObjects(), AliAnaOmegaToPi0Gamma::GetCreateOutputObjects(), AliAnaRandomTrigger::GetCreateOutputObjects(), AliAnaPi0EbE::GetCreateOutputObjects(), AliAnaEMCALTriggerClusters::GetCreateOutputObjects(), AliAnaParticleJetFinderCorrelation::GetCreateOutputObjects(), AliAnaClusterPileUp::GetCreateOutputObjects(), AliAnaPhotonConvInCalo::GetCreateOutputObjects(), AliAnaParticleJetLeadingConeCorrelation::GetCreateOutputObjects(), AliAnaInsideClusterInvariantMass::GetCreateOutputObjects(), AliAnaPhoton::GetCreateOutputObjects(), AliAnaElectron::GetCreateOutputObjects(), AliAnaPi0::GetCreateOutputObjects(), AliAnaCalorimeterQA::GetCreateOutputObjects(), AliAnaGeneratorKine::GetCreateOutputObjects(), AliAnaParticleIsolation::GetCreateOutputObjects(), MakeCuts4Charm4Prong(), MakeCuts4Charm4ProngForMaxim(), makeInputAliAnalysisTaskSED0Mass(), makeInputAliAnalysisTaskSEDplusPbPb(), makeInputAliAnalysisTaskSEDplusPP(), makeInputAliAnalysisTaskSEDsPbPb(), makeInputAliAnalysisTaskSEDsPP(), makeInputAliAnalysisTaskSEDstarSignificanceMaximization(), makeInputAliAnalysisTaskSEDStarSpectra(), makeInputAliAnalysisTaskSELc2eleLambda(), makeInputAliAnalysisTaskSELc2pK0s(), makeInputAliAnalysisTaskSELctopKpi(), makeInputAliAnalysisTaskSELctoV0bachelor(), makeInputAliAnalysisTaskSEOmegac2eleOmega(), makeInputAliAnalysisTaskSESignificanceMaximization(), makeInputAliAnalysisTaskSEXic2eleXi(), makeInputAliAnalysisTaskSEXicPlus2XiPiPi(), Merge2Bins(), SetPtBinLimits(), AliRDHFCutsDplustoKpipi::SetStandardCutsPbPb2010(), AliRDHFCutsDStartoKpipi::SetStandardCutsPbPb2010(), AliRDHFCutsD0toKpi::SetStandardCutsPbPb2010(), AliRDHFCutsLctopKpi::SetStandardCutsPbPb2010(), AliRDHFCutsD0toKpi::SetStandardCutsPbPb2010Peripherals(), AliRDHFCutsDStartoKpipi::SetStandardCutsPbPb2011DStar(), AliRDHFCutsDstoKKpi::SetStandardCutsPP2010(), AliRDHFCutsDplustoKpipi::SetStandardCutsPP2010(), AliRDHFCutsDStartoKpipi::SetStandardCutsPP2010(), AliRDHFCutsD0toKpi::SetStandardCutsPP2010(), AliRDHFCutsLctopKpi::SetStandardCutsPP2010(), AliRDHFCutsLctoV0::SetStandardCutsPP2010(), AliRDHFCutsDStartoKpipi::SetStandardCutsPP2010DStarMult(), AliRDHFCutsD0toKpi::SetStandardCutsPP2010vsMult(), AliRDHFCutsD0toKpi::SetStandardCutsPP2011_276TeV(), AliRDHFCutsLctopKpi::SetStandardCutsPPb2013(), showMultiDimVector(), AliAnalysisTaskSED0MassCutVarFDSub::Terminate(), and AliAnalysisTaskSED0Mass::Terminate().

Double_t nsigmaSBstart =5.

Definition at line 59 of file CalculateAveragePt.C.

Referenced by HistoPtShapeFromData(), and SetNsigmaStartSB().

Double_t nsigmaSignal =3.

Definition at line 59 of file CalculateAveragePt.C.

Referenced by HistoPtShapeFromData(), and SetNsigmaForSignal().

Double_t* ptbinlimits =0x0
Double_t ptmax

Definition at line 66 of file CalculateAveragePt.C.

Referenced by CalculateAveragePt(), HistoPtShapeFromData(), and SetHistoMassPt().

Double_t ptmin

Definition at line 65 of file CalculateAveragePt.C.

Referenced by CalculateAveragePt(), HistoPtShapeFromData(), and SetHistoMassPt().

Double_t * rawback =0x0

Definition at line 58 of file CalculateAveragePt.C.

Referenced by HistoPtShapeFromData(), and SetHistRawBack().

Double_t* rawsignal =0x0

Definition at line 58 of file CalculateAveragePt.C.

Referenced by SetHistRawSignal().

Int_t standrebin[8] ={2,2,2,2,2,2,4,5}

Definition at line 84 of file CalculateAveragePt.C.

Bool_t subtractSB =kTRUE

Definition at line 69 of file CalculateAveragePt.C.

Referenced by CalculateAveragePt(), HistoPtShapeFromData(), and SetSubtractSB().

Bool_t useFitForSubtraction =kFALSE
Bool_t useParGenAccOverLimAcc =kFALSE

Definition at line 68 of file CalculateAveragePt.C.

Referenced by CorrectForEfficiency(), and DoStandardForD0().