From: mchojnac Date: Thu, 6 Feb 2014 15:37:42 +0000 (+0100) Subject: correcte the way of applinyg eta cut in normalization X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=ab0298c1dd9adbe4bd02b08828a64fb402c7ce54 correcte the way of applinyg eta cut in normalization --- diff --git a/PWGLF/SPECTRA/PiKaPr/TestAOD/AnalysisBoth.C b/PWGLF/SPECTRA/PiKaPr/TestAOD/AnalysisBoth.C index c114cd05b05..21f3e08d878 100644 --- a/PWGLF/SPECTRA/PiKaPr/TestAOD/AnalysisBoth.C +++ b/PWGLF/SPECTRA/PiKaPr/TestAOD/AnalysisBoth.C @@ -368,7 +368,16 @@ void AnalysisBoth (UInt_t options=0xF,TString outdate, TString outnamedata, TStr GFCorrection(spectra,tcutsdata->GetPtTOFMatching(),options); GFCorrection(spectraLeonardo,tcutsdata->GetPtTOFMatching(),options); - TH1F* allch=GetSumAllCh(spectra,mass); + + Double_t ycut=tcutsdata->GetY(); + Double_t etacut=tcutsdata->GetEtaMax()-tcutsdata->GetEtaMin(); + if(etacut<0.00001) + { + cout<<"using eta window 1.6"<Add(allch); if(options&kuseTOFmatchingcorrection) { @@ -389,7 +398,6 @@ void AnalysisBoth (UInt_t options=0xF,TString outdate, TString outnamedata, TStr if (options&kveretxcorrectionandbadchunkscorr) vertexcorrection=corrbadchunksvtx; cout<<" VTX corr="<GetY(); if(TMath::Abs(ycut)>0.0) vertexcorrection=vertexcorrection/(2.0*ycut); for (int i=0;i<6;i++) @@ -404,7 +412,7 @@ void AnalysisBoth (UInt_t options=0xF,TString outdate, TString outnamedata, TStr } } allch->Scale(vertexcorrection); - spectraall->Scale(vertexcorrection/1.6); + spectraall->Scale(vertexcorrection/etacut); //spectraall->Scale(1.0/1.6); lout->Write("output",TObject::kSingleKey); @@ -965,7 +973,7 @@ void GFCorrection(TH1F **Spectra,Float_t tofpt,UInt_t options) TFile *fGeanFlukaK= new TFile(fnameGeanFlukaK.Data()); if (!fGeanFlukaK) { - fnameGeanFlukaK="$ALICE_ROOT/PWGLF/SPECTRA/PiKaPr/TestAOD/GFCorrection/correctionForCrossSection.321.root"; + fnameGeanFlukaK="$ALICE_ROOT/PWGLF/SPECTRA/PiKaPr/TestAOD/correctionForCrossSection.321.root"; fGeanFlukaK= new TFile(fnameGeanFlukaK.Data()); if (!fGeanFlukaK) return; @@ -1027,7 +1035,7 @@ void GFCorrection(TH1F **Spectra,Float_t tofpt,UInt_t options) TFile* fGFProtons = new TFile (fnameGFProtons.Data()); if (!fGFProtons) { - fnameGFProtons=="$ALICE_ROOT/PWGLF/SPECTRA/PiKaPr/TestAOD/GFCorrection/correctionForCrossSection.root"; + fnameGFProtons=="$ALICE_ROOT/PWGLF/SPECTRA/PiKaPr/TestAOD/correctionForCrossSection.root"; TFile* fGFProtons = new TFile (fnameGFProtons.Data()); if (!fGFProtons) return; @@ -1246,7 +1254,7 @@ Double_t eta2y(Double_t pt, Double_t mass, Double_t eta) return TMath::ASinH(pt / mt * TMath::SinH(eta)); } -TH1* GetSumAllCh(TH1F** spectra, Double_t* mass ) +TH1* GetSumAllCh(TH1F** spectra, Double_t* mass,Double_t etacut) { TH1F* allch=(((TH1F*))spectra[0]->Clone("allCh")); allch->Reset(); @@ -1262,9 +1270,9 @@ TH1* GetSumAllCh(TH1F** spectra, Double_t* mass ) Float_t pt=spectra[i]->GetXaxis()->GetBinCenter(j); Float_t mt2=masstmp*masstmp+pt*pt; Float_t mt=TMath::Sqrt(mt2); - Float_t maxy=eta2y(pt,masstmp,0.8); + Float_t maxy=eta2y(pt,masstmp,etacut/2.0); Float_t conver=maxy*(TMath::Sqrt(1-masstmp*masstmp/(mt2*TMath::CosH(maxy)*TMath::CosH(maxy)))+TMath::Sqrt(1-masstmp*masstmp/(mt2*TMath::CosH(0.0)*TMath::CosH(0.0)))); - conver=conver/1.6; + conver=conver/etacut; //cout<GetName()<GetBinContent(j); Float_t binerror=allch->GetBinError(j);