X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PWGHF%2FvertexingHF%2Fmacros%2FHFPtSpectrum.C;h=c8955bcdfa4bbf1cc86f07d64be1a5e51af7adb7;hb=c96dd5740381ff0e4a1b948641e40ecece70c7cb;hp=3cb566fb1a8140714f9fc34ca0509a9dae3020b4;hpb=934916bd57fbaac194eefb80420a2b99d36ec566;p=u%2Fmrichter%2FAliRoot.git diff --git a/PWGHF/vertexingHF/macros/HFPtSpectrum.C b/PWGHF/vertexingHF/macros/HFPtSpectrum.C index 3cb566fb1a8..c8955bcdfa4 100644 --- a/PWGHF/vertexingHF/macros/HFPtSpectrum.C +++ b/PWGHF/vertexingHF/macros/HFPtSpectrum.C @@ -38,7 +38,8 @@ // 9) Flag to decide if there is need to evaluate the dependence on the energy loss // -enum centrality{ kpp7, kpp276, k07half, kpPb0100, k010, k1020, k020, k2040, k2030, k3040, k4050, k3050, k5060, k4060, k6080, k4080, k80100 }; +enum centrality{ kpp7, kpp276, k07half, kpPb0100, k010, k1020, k020, k2040, k2030, k3040, k4050, k3050, k5060, k4060, k6080, k4080, k5080, k80100, kpPb020, kpPb2040, kpPb4060, kpPb60100 }; +enum centestimator{ kV0M, kV0A, kZNA }; enum BFDSubtrMethod { knone, kfc, kNb }; enum RaavsEP {kPhiIntegrated, kInPlane, kOutOfPlane}; enum rapidity{ kdefault, k08to04, k07to04, k04to01, k01to01, k01to04, k04to07, k04to08 }; @@ -48,7 +49,8 @@ void HFPtSpectrum ( const char *mcfilename="FeedDownCorrectionMC.root", const char *recofilename="Reconstructed.root", const char *recohistoname="hRawSpectrumD0", const char *outfilename="HFPtSpectrum.root", Int_t fdMethod=kNb, Double_t nevents=1.0, Double_t sigma=1.0, // sigma[pb] - Bool_t isParticlePlusAntiParticleYield=true, Int_t cc=kpp7, Bool_t PbPbEloss=false, + Bool_t isParticlePlusAntiParticleYield=true, Int_t cc=kpp7, Bool_t PbPbEloss=false, + Int_t ccestimator = kV0M, Int_t isRaavsEP=kPhiIntegrated,const char *epResolfile="", Int_t rapiditySlice=kdefault) { @@ -58,14 +60,24 @@ void HFPtSpectrum ( const char *mcfilename="FeedDownCorrectionMC.root", // Set if calculation considers asymmetric uncertainties or not Bool_t asym = true; - // Set the meson and decay - // (only D0 -> K pi, D+--> K pi pi & D* --> D0 pi & D+s -->KKpi implemented here) - Bool_t isD0Kpi = false; + // Set the meson/baryon and decay + // (only D0 -> K pi, D+--> K pi pi, D* --> D0 pi, D+s -->KKpi, Lc+ --> pKpi & Lc+ --> pK0S implemented here) + Bool_t isD0Kpi = true; Bool_t isDplusKpipi = false; Bool_t isDstarD0pi = false; - Bool_t isDsKKpi = true; + Bool_t isDsKKpi = false; Bool_t isLctopKpi = false; - if (isD0Kpi && isDplusKpipi && isDstarD0pi && isDsKKpi) { + Bool_t isLcK0Sp = false; + + Int_t shouldBeOne=0; + if(isD0Kpi) shouldBeOne++; + if(isDplusKpipi) shouldBeOne++; + if(isDstarD0pi) shouldBeOne++; + if(isDsKKpi) shouldBeOne++; + if(isLctopKpi) shouldBeOne++; + if(isLcK0Sp) shouldBeOne++; + + if (shouldBeOne!=1) { cout << "Sorry, can not deal with more than one correction at the same time"<Get("hLcpkpifromBpred_max_corr"); hFeedDownMCptMin = (TH1D*)mcfile->Get("hLcpkpifromBpred_min_corr"); } + else if (isLcK0Sp){ + decay = 6; + hDirectMCpt = (TH1D*)mcfile->Get("hLcK0sppred_central"); + hFeedDownMCpt = (TH1D*)mcfile->Get("hLcK0spfromBpred_central_corr"); + hDirectMCptMax = (TH1D*)mcfile->Get("hLcK0sppred_max"); + hDirectMCptMin = (TH1D*)mcfile->Get("hLcK0sppred_min"); + hFeedDownMCptMax = (TH1D*)mcfile->Get("hLcK0spfromBpred_max_corr"); + hFeedDownMCptMin = (TH1D*)mcfile->Get("hLcK0spfromBpred_min_corr"); + } // hDirectMCpt->SetNameTitle("hDirectMCpt","direct MC spectra"); hFeedDownMCpt->SetNameTitle("hFeedDownMCpt","feed-down MC spectra"); @@ -247,8 +296,8 @@ void HFPtSpectrum ( const char *mcfilename="FeedDownCorrectionMC.root", // // Read the file of the EP resolution correction - TFile *EPf; - TH1D *hEPresolCorr; + TFile *EPf=0; + TH1D *hEPresolCorr=0; if(isRaavsEP>0.){ EPf = new TFile(epResolfile,"read"); if(isRaavsEP==kInPlane) hEPresolCorr = (TH1D*)EPf->Get("hCorrEPresol_InPlane"); @@ -360,14 +409,30 @@ void HFPtSpectrum ( const char *mcfilename="FeedDownCorrectionMC.root", cout << " ended the calculation, getting the histograms back " << endl; // Set the systematics externally + Bool_t combineFeedDown = true; AliHFSystErr *systematics = new AliHFSystErr(); if( cc==kpp276 ) { systematics->SetIsLowEnergy(true); } - else if ( cc == kpPb0100 ){ - systematics->SetCollisionType(0); - cout <SetCollisionType(2); + if(ccestimator==kV0A) { + if(cc == kpPb020) systematics->SetCentrality("020V0A"); + else if(cc == kpPb2040) systematics->SetCentrality("2040V0A"); + else if(cc == kpPb4060) systematics->SetCentrality("4060V0A"); + else if(cc == kpPb60100) systematics->SetCentrality("60100V0A"); + } else if (ccestimator==kZNA) { + if(cc == kpPb020) systematics->SetCentrality("020ZNA"); + else if(cc == kpPb2040) systematics->SetCentrality("2040ZNA"); + else if(cc == kpPb4060) systematics->SetCentrality("4060ZNA"); + else if(cc == kpPb60100) systematics->SetCentrality("60100ZNA"); + } else { + if(!(cc == kpPb0100)) { + cout <<" Error on the pPb options"<