From: hristov Date: Sun, 14 Mar 2004 19:26:58 +0000 (+0000) Subject: Coding conventions X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=741f4d30f172e8dc083c3023686ac463d0f0c727 Coding conventions --- diff --git a/ANALYSIS/AliD0toKpi.cxx b/ANALYSIS/AliD0toKpi.cxx index 1db74200e38..b91c43dc420 100644 --- a/ANALYSIS/AliD0toKpi.cxx +++ b/ANALYSIS/AliD0toKpi.cxx @@ -15,13 +15,12 @@ //---------------------------------------------------------------------------- // Implementation of the D0toKpi class -// +// for pp and PbPb interactions // Note: the two decay tracks are labelled: 0 (positive track) // 1 (negative track) -// // Origin: A. Dainese andrea.dainese@pd.infn.it //---------------------------------------------------------------------------- -#include + #include #include #include @@ -129,9 +128,9 @@ AliD0toKpi::AliD0toKpi( const AliD0toKpi& d0toKpi):TObject(d0toKpi) { } //---------------------------------------------------------------------------- void AliD0toKpi::ApplyPID(TString pidScheme) { - - const char *tofparampbpb = strstr(pidScheme.Data(),"TOFparam_PbPb"); - const char *tofparampp = strstr(pidScheme.Data(),"TOFparam_pp"); + // Applies particle identification + const char *tofparampbpb = strstr(pidScheme.Data(),"TOFparamPbPb"); + const char *tofparampp = strstr(pidScheme.Data(),"TOFparamPP"); if((tofparampbpb || tofparampp) && fPdg[0]==0) { printf("AliD0toKpi::ApplyPID :\n Warning: TOF parameterized PID can be used only for simulation!\n"); @@ -142,21 +141,21 @@ void AliD0toKpi::ApplyPID(TString pidScheme) { // tagging of the positive track if(TMath::Abs(fPdg[0])==211 || TMath::Abs(fPdg[0])==13 || TMath::Abs(fPdg[0])==11) { // pion,muon,electron - fTagPi[0] = LinearInterpolation(PChild(0),kPiBins_PbPb,kPiBinWidth_PbPb,kPiTagPi_PbPb); + fTagPi[0] = LinearInterpolation(PChild(0),kPiBinsPbPb,kPiBinWidthPbPb,kPiTagPiPbPb); fTagNid[0] = 1.-fTagPi[0]; fTagKa[0] = 0.; fTagPr[0] = 0.; } if(TMath::Abs(fPdg[0])==321) { // kaon - fTagKa[0] = LinearInterpolation(PChild(0),kKBins_PbPb,kKBinWidth_PbPb,kKTagK_PbPb); - fTagNid[0] = LinearInterpolation(PChild(0),kKBins_PbPb,kKBinWidth_PbPb,kKTagNid_PbPb); + fTagKa[0] = LinearInterpolation(PChild(0),kKBinsPbPb,kKBinWidthPbPb,kKTagKPbPb); + fTagNid[0] = LinearInterpolation(PChild(0),kKBinsPbPb,kKBinWidthPbPb,kKTagNidPbPb); if((fTagNid[0]+fTagKa[0])>1.) fTagNid[0] = 1.-fTagKa[0]; fTagPi[0] = 1.-fTagNid[0]-fTagKa[0]; fTagPr[0] = 0.; } if(TMath::Abs(fPdg[0])==2212) { // proton - fTagPr[0] = LinearInterpolation(PChild(0),kPBins_PbPb,kPBinWidth_PbPb,kPTagP_PbPb); - fTagNid[0] = LinearInterpolation(PChild(0),kPBins_PbPb,kPBinWidth_PbPb,kPTagNid_PbPb); + fTagPr[0] = LinearInterpolation(PChild(0),kPBinsPbPb,kPBinWidthPbPb,kPTagPPbPb); + fTagNid[0] = LinearInterpolation(PChild(0),kPBinsPbPb,kPBinWidthPbPb,kPTagNidPbPb); if((fTagNid[0]+fTagPr[0])>1.) fTagNid[0] = 1.-fTagPr[0]; fTagPi[0] = 1.-fTagNid[0]-fTagPr[0]; fTagKa[0] = 0.; @@ -164,21 +163,21 @@ void AliD0toKpi::ApplyPID(TString pidScheme) { // tagging of the negative track if(TMath::Abs(fPdg[1])==211 || TMath::Abs(fPdg[1])==13 || TMath::Abs(fPdg[1])==11) { // pion,muon,electron - fTagPi[1] = LinearInterpolation(PChild(1),kPiBins_PbPb,kPiBinWidth_PbPb,kPiTagPi_PbPb); + fTagPi[1] = LinearInterpolation(PChild(1),kPiBinsPbPb,kPiBinWidthPbPb,kPiTagPiPbPb); fTagNid[1] = 1.-fTagPi[1]; fTagKa[1] = 0.; fTagPr[1] = 0.; } if(TMath::Abs(fPdg[1])==321) { // kaon - fTagKa[1] = LinearInterpolation(PChild(1),kKBins_PbPb,kKBinWidth_PbPb,kKTagK_PbPb); - fTagNid[1] = LinearInterpolation(PChild(1),kKBins_PbPb,kKBinWidth_PbPb,kKTagNid_PbPb); + fTagKa[1] = LinearInterpolation(PChild(1),kKBinsPbPb,kKBinWidthPbPb,kKTagKPbPb); + fTagNid[1] = LinearInterpolation(PChild(1),kKBinsPbPb,kKBinWidthPbPb,kKTagNidPbPb); if((fTagNid[1]+fTagKa[1])>1.) fTagNid[1] = 1.-fTagKa[1]; fTagPi[1] = 1.-fTagNid[1]-fTagKa[1]; fTagPr[1] = 0.; } if(TMath::Abs(fPdg[1])==2212) { // proton - fTagPr[1] = LinearInterpolation(PChild(1),kPBins_PbPb,kPBinWidth_PbPb,kPTagP_PbPb); - fTagNid[1] = LinearInterpolation(PChild(1),kPBins_PbPb,kPBinWidth_PbPb,kPTagNid_PbPb); + fTagPr[1] = LinearInterpolation(PChild(1),kPBinsPbPb,kPBinWidthPbPb,kPTagPPbPb); + fTagNid[1] = LinearInterpolation(PChild(1),kPBinsPbPb,kPBinWidthPbPb,kPTagNidPbPb); if((fTagNid[1]+fTagPr[1])>1.) fTagNid[1] = 1.-fTagPr[1]; fTagPi[1] = 1.-fTagNid[1]-fTagPr[1]; fTagKa[1] = 0.; @@ -190,21 +189,21 @@ void AliD0toKpi::ApplyPID(TString pidScheme) { // tagging of the positive track if(TMath::Abs(fPdg[0])==211 || TMath::Abs(fPdg[0])==13 || TMath::Abs(fPdg[0])==11) { // pion,muon,electron - fTagPi[0] = LinearInterpolation(PChild(0),kPiBins_pp,kPiBinWidth_pp,kPiTagPi_pp); + fTagPi[0] = LinearInterpolation(PChild(0),kPiBinsPP,kPiBinWidthPP,kPiTagPiPP); fTagNid[0] = 1.-fTagPi[0]; fTagKa[0] = 0.; fTagPr[0] = 0.; } if(TMath::Abs(fPdg[0])==321) { // kaon - fTagKa[0] = LinearInterpolation(PChild(0),kKBins_pp,kKBinWidth_pp,kKTagK_pp); - fTagNid[0] = LinearInterpolation(PChild(0),kKBins_pp,kKBinWidth_pp,kKTagNid_pp); + fTagKa[0] = LinearInterpolation(PChild(0),kKBinsPP,kKBinWidthPP,kKTagKPP); + fTagNid[0] = LinearInterpolation(PChild(0),kKBinsPP,kKBinWidthPP,kKTagNidPP); if((fTagNid[0]+fTagKa[0])>1.) fTagNid[0] = 1.-fTagKa[0]; fTagPi[0] = 1.-fTagNid[0]-fTagKa[0]; fTagPr[0] = 0.; } if(TMath::Abs(fPdg[0])==2212) { // proton - fTagPr[0] = LinearInterpolation(PChild(0),kPBins_pp,kPBinWidth_pp,kPTagP_pp); - fTagNid[0] = LinearInterpolation(PChild(0),kPBins_pp,kPBinWidth_pp,kPTagNid_pp); + fTagPr[0] = LinearInterpolation(PChild(0),kPBinsPP,kPBinWidthPP,kPTagPPP); + fTagNid[0] = LinearInterpolation(PChild(0),kPBinsPP,kPBinWidthPP,kPTagNidPP); if((fTagNid[0]+fTagPr[0])>1.) fTagNid[0] = 1.-fTagPr[0]; fTagPi[0] = 1.-fTagNid[0]-fTagPr[0]; fTagKa[0] = 0.; @@ -212,21 +211,21 @@ void AliD0toKpi::ApplyPID(TString pidScheme) { // tagging of the negative track if(TMath::Abs(fPdg[1])==211 || TMath::Abs(fPdg[1])==13 || TMath::Abs(fPdg[1])==11) { // pion,muon,electron - fTagPi[1] = LinearInterpolation(PChild(1),kPiBins_pp,kPiBinWidth_pp,kPiTagPi_pp); + fTagPi[1] = LinearInterpolation(PChild(1),kPiBinsPP,kPiBinWidthPP,kPiTagPiPP); fTagNid[1] = 1.-fTagPi[1]; fTagKa[1] = 0.; fTagPr[1] = 0.; } if(TMath::Abs(fPdg[1])==321) { // kaon - fTagKa[1] = LinearInterpolation(PChild(1),kKBins_pp,kKBinWidth_pp,kKTagK_pp); - fTagNid[1] = LinearInterpolation(PChild(1),kKBins_pp,kKBinWidth_pp,kKTagNid_pp); + fTagKa[1] = LinearInterpolation(PChild(1),kKBinsPP,kKBinWidthPP,kKTagKPP); + fTagNid[1] = LinearInterpolation(PChild(1),kKBinsPP,kKBinWidthPP,kKTagNidPP); if((fTagNid[1]+fTagKa[1])>1.) fTagNid[1] = 1.-fTagKa[1]; fTagPi[1] = 1.-fTagNid[1]-fTagKa[1]; fTagPr[1] = 0.; } if(TMath::Abs(fPdg[1])==2212) { // proton - fTagPr[1] = LinearInterpolation(PChild(1),kPBins_pp,kPBinWidth_pp,kPTagP_pp); - fTagNid[1] = LinearInterpolation(PChild(1),kPBins_pp,kPBinWidth_pp,kPTagNid_pp); + fTagPr[1] = LinearInterpolation(PChild(1),kPBinsPP,kPBinWidthPP,kPTagPPP); + fTagNid[1] = LinearInterpolation(PChild(1),kPBinsPP,kPBinWidthPP,kPTagNidPP); if((fTagNid[1]+fTagPr[1])>1.) fTagNid[1] = 1.-fTagPr[1]; fTagPi[1] = 1.-fTagNid[1]-fTagPr[1]; fTagKa[1] = 0.; @@ -500,8 +499,8 @@ void AliD0toKpi::SetPIDresponse(Double_t resp0[5],Double_t resp1[5]) { void AliD0toKpi::DrawPIDinTOF(TString pidScheme) const { // Draw parameterized PID probabilities in TOF - const char *tofparampbpb = strstr(pidScheme.Data(),"TOFparam_PbPb"); - const char *tofparampp = strstr(pidScheme.Data(),"TOFparam_pp"); + const char *tofparampbpb = strstr(pidScheme.Data(),"TOFparamPbPb"); + const char *tofparampp = strstr(pidScheme.Data(),"TOFparamPP"); TH2F* framePi = new TH2F("framePi","Tag probabilities for PIONS",2,0,2.5,2,0,1); framePi->SetXTitle("p [GeV/c]"); @@ -513,48 +512,48 @@ void AliD0toKpi::DrawPIDinTOF(TString pidScheme) const { frameP->SetXTitle("p [GeV/c]"); frameP->SetStats(0); - TH1F* hPiPi = new TH1F("hPiPi","Tag probabilities for PIONS",kPiBins_PbPb,0,2.5); - TH1F* hPiNid = new TH1F("hPiNid","Tag probabilities for PIONS",kPiBins_PbPb,0,2.5); + TH1F* hPiPi = new TH1F("hPiPi","Tag probabilities for PIONS",kPiBinsPbPb,0,2.5); + TH1F* hPiNid = new TH1F("hPiNid","Tag probabilities for PIONS",kPiBinsPbPb,0,2.5); - TH1F* hKK = new TH1F("hKK","Tag probabilities for KAONS",kKBins_PbPb,0,2.5); - TH1F* hKNid = new TH1F("hKNid","Tag probabilities for KAONS",kKBins_PbPb,0,2.5); - TH1F* hKPi = new TH1F("hKPi","Tag probabilities for KAONS",kKBins_PbPb,0,2.5); + TH1F* hKK = new TH1F("hKK","Tag probabilities for KAONS",kKBinsPbPb,0,2.5); + TH1F* hKNid = new TH1F("hKNid","Tag probabilities for KAONS",kKBinsPbPb,0,2.5); + TH1F* hKPi = new TH1F("hKPi","Tag probabilities for KAONS",kKBinsPbPb,0,2.5); - TH1F* hPP = new TH1F("hPP","Tag probabilities for PROTONS",kPBins_PbPb,0,4.5); - TH1F* hPNid = new TH1F("hPNid","Tag probabilities for PROTONS",kPBins_PbPb,0,4.5); - TH1F* hPPi = new TH1F("hPPi","Tag probabilities for PROTONS",kPBins_PbPb,0,4.5); + TH1F* hPP = new TH1F("hPP","Tag probabilities for PROTONS",kPBinsPbPb,0,4.5); + TH1F* hPNid = new TH1F("hPNid","Tag probabilities for PROTONS",kPBinsPbPb,0,4.5); + TH1F* hPPi = new TH1F("hPPi","Tag probabilities for PROTONS",kPBinsPbPb,0,4.5); if(tofparampbpb) { - for(Int_t i=1; i<=kPiBins_PbPb; i++) { - hPiPi->SetBinContent(i,kPiTagPi_PbPb[i-1]); - hPiNid->SetBinContent(i,kPiTagPi_PbPb[i-1]+kPiTagNid_PbPb[i-1]); + for(Int_t i=1; i<=kPiBinsPbPb; i++) { + hPiPi->SetBinContent(i,kPiTagPiPbPb[i-1]); + hPiNid->SetBinContent(i,kPiTagPiPbPb[i-1]+kPiTagNidPbPb[i-1]); - hKK->SetBinContent(i,kKTagK_PbPb[i-1]); - hKPi->SetBinContent(i,kKTagK_PbPb[i-1]+kKTagPi_PbPb[i-1]); - hKNid->SetBinContent(i,kKTagK_PbPb[i-1]+kKTagPi_PbPb[i-1]+kKTagNid_PbPb[i-1]); + hKK->SetBinContent(i,kKTagKPbPb[i-1]); + hKPi->SetBinContent(i,kKTagKPbPb[i-1]+kKTagPiPbPb[i-1]); + hKNid->SetBinContent(i,kKTagKPbPb[i-1]+kKTagPiPbPb[i-1]+kKTagNidPbPb[i-1]); } - for(Int_t i=1; i<=kPBins_PbPb; i++) { - hPP->SetBinContent(i,kPTagP_PbPb[i-1]); - hPPi->SetBinContent(i,kPTagP_PbPb[i-1]+kPTagPi_PbPb[i-1]); - hPNid->SetBinContent(i,kPTagP_PbPb[i-1]+kPTagPi_PbPb[i-1]+kPTagNid_PbPb[i-1]); + for(Int_t i=1; i<=kPBinsPbPb; i++) { + hPP->SetBinContent(i,kPTagPPbPb[i-1]); + hPPi->SetBinContent(i,kPTagPPbPb[i-1]+kPTagPiPbPb[i-1]); + hPNid->SetBinContent(i,kPTagPPbPb[i-1]+kPTagPiPbPb[i-1]+kPTagNidPbPb[i-1]); } } else if(tofparampp) { - for(Int_t i=1; i<=kPiBins_pp; i++) { - hPiPi->SetBinContent(i,kPiTagPi_pp[i-1]); - hPiNid->SetBinContent(i,kPiTagPi_pp[i-1]+kPiTagNid_pp[i-1]); + for(Int_t i=1; i<=kPiBinsPP; i++) { + hPiPi->SetBinContent(i,kPiTagPiPP[i-1]); + hPiNid->SetBinContent(i,kPiTagPiPP[i-1]+kPiTagNidPP[i-1]); - hKK->SetBinContent(i,kKTagK_pp[i-1]); - hKPi->SetBinContent(i,kKTagK_pp[i-1]+kKTagPi_pp[i-1]); - hKNid->SetBinContent(i,kKTagK_pp[i-1]+kKTagPi_pp[i-1]+kKTagNid_pp[i-1]); + hKK->SetBinContent(i,kKTagKPP[i-1]); + hKPi->SetBinContent(i,kKTagKPP[i-1]+kKTagPiPP[i-1]); + hKNid->SetBinContent(i,kKTagKPP[i-1]+kKTagPiPP[i-1]+kKTagNidPP[i-1]); } - for(Int_t i=1; i<=kPBins_pp; i++) { - hPP->SetBinContent(i,kPTagP_pp[i-1]); - hPPi->SetBinContent(i,kPTagP_pp[i-1]+kPTagPi_pp[i-1]); - hPNid->SetBinContent(i,kPTagP_pp[i-1]+kPTagPi_pp[i-1]+kPTagNid_pp[i-1]); + for(Int_t i=1; i<=kPBinsPP; i++) { + hPP->SetBinContent(i,kPTagPPP[i-1]); + hPPi->SetBinContent(i,kPTagPPP[i-1]+kPTagPiPP[i-1]); + hPNid->SetBinContent(i,kPTagPPP[i-1]+kPTagPiPP[i-1]+kPTagNidPP[i-1]); } } diff --git a/ANALYSIS/AliD0toKpi.h b/ANALYSIS/AliD0toKpi.h index fb6800f938b..4f5981ea3c4 100644 --- a/ANALYSIS/AliD0toKpi.h +++ b/ANALYSIS/AliD0toKpi.h @@ -29,44 +29,44 @@ const Double_t kMPi = 0.13957; // Pi+ mass // *** Pb-Pb dNch/dy=6000 *** // // PIONS -const Int_t kPiBins_PbPb = 10; -const Double_t kPiBinWidth_PbPb = 0.250; -const Double_t kPiTagPi_PbPb[kPiBins_PbPb] = {0.211421,0.652184,0.624421,0.614727,0.610777,0.628015,0.631520,0.630324,0.637551,0.575235}; -const Double_t kPiTagNid_PbPb[kPiBins_PbPb] = {0.788579,0.347816,0.375579,0.385273,0.389223,0.371985,0.368480,0.369676,0.362449,0.424765}; +const Int_t kPiBinsPbPb = 10; +const Double_t kPiBinWidthPbPb = 0.250; +const Double_t kPiTagPiPbPb[kPiBinsPbPb] = {0.211421,0.652184,0.624421,0.614727,0.610777,0.628015,0.631520,0.630324,0.637551,0.575235}; +const Double_t kPiTagNidPbPb[kPiBinsPbPb] = {0.788579,0.347816,0.375579,0.385273,0.389223,0.371985,0.368480,0.369676,0.362449,0.424765}; // KAONS -const Int_t kKBins_PbPb = 10; -const Double_t kKBinWidth_PbPb = 0.250; -const Double_t kKTagK_PbPb[kKBins_PbPb] = {0.000000,0.101255,0.397662,0.467586,0.517008,0.555023,0.584185,0.519029,0.464117,0.247308}; -const Double_t kKTagPi_PbPb[kKBins_PbPb] = {0.102049,0.289930,0.101930,0.057771,0.040286,0.028567,0.053108,0.094369,0.066302,0.247308}; -const Double_t kKTagNid_PbPb[kKBins_PbPb] = {0.897951,0.608815,0.500408,0.474643,0.442705,0.416410,0.362707,0.386603,0.469580,0.505383}; +const Int_t kKBinsPbPb = 10; +const Double_t kKBinWidthPbPb = 0.250; +const Double_t kKTagKPbPb[kKBinsPbPb] = {0.000000,0.101255,0.397662,0.467586,0.517008,0.555023,0.584185,0.519029,0.464117,0.247308}; +const Double_t kKTagPiPbPb[kKBinsPbPb] = {0.102049,0.289930,0.101930,0.057771,0.040286,0.028567,0.053108,0.094369,0.066302,0.247308}; +const Double_t kKTagNidPbPb[kKBinsPbPb] = {0.897951,0.608815,0.500408,0.474643,0.442705,0.416410,0.362707,0.386603,0.469580,0.505383}; // PROTONS -const Int_t kPBins_PbPb = 9; -const Double_t kPBinWidth_PbPb = 0.500; -const Double_t kPTagP_PbPb[kPBins_PbPb] = {0.017940,0.350681,0.535286,0.583264,0.562935,0.560524,0.545992,0.598060,0.351245}; -const Double_t kPTagPi_PbPb[kPBins_PbPb] = {0.195955,0.094949,0.039962,0.026039,0.007556,0.016986,0.030333,0.000000,0.000000}; -const Double_t kPTagNid_PbPb[kPBins_PbPb] = {0.786105,0.554370,0.424751,0.390697,0.429508,0.422491,0.423675,0.401940,0.648755}; +const Int_t kPBinsPbPb = 9; +const Double_t kPBinWidthPbPb = 0.500; +const Double_t kPTagPPbPb[kPBinsPbPb] = {0.017940,0.350681,0.535286,0.583264,0.562935,0.560524,0.545992,0.598060,0.351245}; +const Double_t kPTagPiPbPb[kPBinsPbPb] = {0.195955,0.094949,0.039962,0.026039,0.007556,0.016986,0.030333,0.000000,0.000000}; +const Double_t kPTagNidPbPb[kPBinsPbPb] = {0.786105,0.554370,0.424751,0.390697,0.429508,0.422491,0.423675,0.401940,0.648755}; // // pp PYTHIA // // *** cuts for pp *** // // PIONS -const Int_t kPiBins_pp = 10; -const Double_t kPiBinWidth_pp = 0.250; -const Double_t kPiTagPi_pp[kPiBins_pp] = {0.194528,0.447097,0.603364,0.646413,0.647125,0.669157,0.688139,0.682564,0.689910,0.665710}; -const Double_t kPiTagNid_pp[kPiBins_pp] = {0.805472,0.552903,0.396636,0.353587,0.352875,0.330843,0.311861,0.317436,0.310090,0.334290}; +const Int_t kPiBinsPP = 10; +const Double_t kPiBinWidthPP = 0.250; +const Double_t kPiTagPiPP[kPiBinsPP] = {0.194528,0.447097,0.603364,0.646413,0.647125,0.669157,0.688139,0.682564,0.689910,0.665710}; +const Double_t kPiTagNidPP[kPiBinsPP] = {0.805472,0.552903,0.396636,0.353587,0.352875,0.330843,0.311861,0.317436,0.310090,0.334290}; // KAONS -const Int_t kKBins_pp = 10; -const Double_t kKBinWidth_pp = 0.250; -const Double_t kKTagK_pp[kKBins_pp] = {0.000000,0.173393,0.439690,0.519423,0.587025,0.605372,0.586021,0.650139,0.444444,0.299363}; -const Double_t kKTagPi_pp[kKBins_pp] = {0.000000,0.001495,0.000000,-0.000000,-0.000000,0.000000,0.032258,0.060572,0.101449,0.242038}; -const Double_t kKTagNid_pp[kKBins_pp] = {1.000000,0.825112,0.560310,0.480577,0.412975,0.394628,0.381720,0.289289,0.454106,0.458599}; +const Int_t kKBinsPP = 10; +const Double_t kKBinWidthPP = 0.250; +const Double_t kKTagKPP[kKBinsPP] = {0.000000,0.173393,0.439690,0.519423,0.587025,0.605372,0.586021,0.650139,0.444444,0.299363}; +const Double_t kKTagPiPP[kKBinsPP] = {0.000000,0.001495,0.000000,-0.000000,-0.000000,0.000000,0.032258,0.060572,0.101449,0.242038}; +const Double_t kKTagNidPP[kKBinsPP] = {1.000000,0.825112,0.560310,0.480577,0.412975,0.394628,0.381720,0.289289,0.454106,0.458599}; // PROTONS -const Int_t kPBins_pp = 9; -const Double_t kPBinWidth_pp = 0.500; -const Double_t kPTagP_pp[kPBins_pp] = {0.029404,0.438640,0.613710,0.665152,0.634961,0.657711,0.703704,0.685714,0.235294}; -const Double_t kPTagPi_pp[kPBins_pp] = {0.000000,0.000000,0.000000,-0.000000,0.000000,0.000000,-0.000000,0.014286,-0.000000}; -const Double_t kPTagNid_pp[kPBins_pp] = {0.970596,0.561360,0.386290,0.334848,0.365039,0.342289,0.296296,0.300000,0.764706}; +const Int_t kPBinsPP = 9; +const Double_t kPBinWidthPP = 0.500; +const Double_t kPTagPPP[kPBinsPP] = {0.029404,0.438640,0.613710,0.665152,0.634961,0.657711,0.703704,0.685714,0.235294}; +const Double_t kPTagPiPP[kPBinsPP] = {0.000000,0.000000,0.000000,-0.000000,0.000000,0.000000,-0.000000,0.014286,-0.000000}; +const Double_t kPTagNidPP[kPBinsPP] = {0.970596,0.561360,0.386290,0.334848,0.365039,0.342289,0.296296,0.300000,0.764706}; @@ -83,13 +83,13 @@ class AliD0toKpi : public TObject { AliD0toKpi(const AliD0toKpi& d0toKpi); Double_t Alpha() const { return (Ql(0)-Ql(1))/(Ql(0)+Ql(1)); } - void ApplyPID(TString pidScheme="TOFparam_PbPb"); + void ApplyPID(TString pidScheme="TOFparamPbPb"); Double_t ChildrenRelAngle() const; void ComputeWgts(); void CorrectWgt4BR(Double_t factor); Double_t CosPointing() const; Double_t CosPointingXY() const; - void CosThetaStar(Double_t&,Double_t&) const; + void CosThetaStar(Double_t &ctsD0,Double_t &ctsD0bar) const; Double_t Ct() const {return Length()*kMD0/P();} Double_t Energy() const { return TMath::Sqrt(P()*P()+kMD0*kMD0); } Double_t Eta() const; @@ -100,13 +100,13 @@ class AliD0toKpi : public TObject { Double_t Getd0Child(Int_t child) const { return fd0[child]; } Int_t GetPdgChild(Int_t child) const { return fPdg[child]; } Int_t GetPdgMum(Int_t child) const {return fMum[child]; } - void GetWgts(Double_t&,Double_t&,TString sample) const; + void GetWgts(Double_t &WgtD0,Double_t &WgtD0bar,TString sample) const; void GetPrimaryVtx(Double_t vtx[3]) const { vtx[0]=fV1x; vtx[1]=fV1y; vtx[2]=fV1z; return; } void GetSecondaryVtx(Double_t vtx[3]) const { vtx[0]=fV2x; vtx[1]=fV2y; vtx[2]=fV2z; return; } - void InvMass(Double_t&,Double_t&) const; + void InvMass(Double_t &mD0,Double_t &mD0bar) const; Bool_t IsSignal() const { if(fSignal) return kTRUE; return kFALSE; } Double_t Length() const { return TMath::Sqrt((fV1x-fV2x)*(fV1x-fV2x) @@ -122,7 +122,7 @@ class AliD0toKpi : public TObject { Double_t Ql(Int_t child) const; Double_t Qt() const; Double_t Rapidity() const { return 0.5*TMath::Log((Energy()+Pz())/(Energy()-Pz()+1.e-13)); } - Bool_t Select(const Double_t* cuts,Int_t&,Int_t&) const; + Bool_t Select(const Double_t* cuts,Int_t& okD0,Int_t& okD0bar) const; void SetPrimaryVtx(Double_t vtx[3]) { fV1x=vtx[0]; fV1y=vtx[1]; fV1z=vtx[2]; return; } void SetSignal() { fSignal = kTRUE; return; } @@ -132,7 +132,7 @@ class AliD0toKpi : public TObject { void SetPdgCodes(Int_t pdg[2]) {fPdg[0]=pdg[0];fPdg[1]=pdg[1];return;} void SetMumPdgCodes(Int_t mum[2]) {fMum[0]=mum[0];fMum[1]=mum[1];return;} - void DrawPIDinTOF(TString pidScheme="TOFparam_PbPb") const; + void DrawPIDinTOF(TString pidScheme="TOFparamPbPb") const; Double_t LinearInterpolation(Double_t p,Int_t nBins,Double_t Bin, const Double_t *values) const; // void SetPtWgts4pp(); @@ -145,15 +145,15 @@ class AliD0toKpi : public TObject { Int_t fTrkNum[2]; // numbers of the two decay tracks - Double_t fV1x; // - Double_t fV1y; // position of the primary vertex of the event - Double_t fV1z; // - Double_t fV2x; // - Double_t fV2y; // position of the reconstructed secondary vertex - Double_t fV2z; // + Double_t fV1x; // X-position of the primary vertex of the event + Double_t fV1y; // Y-position of the primary vertex of the event + Double_t fV1z; // Z-position of the primary vertex of the event + Double_t fV2x; // X-position of the reconstructed secondary vertex + Double_t fV2y; // Y-position of the reconstructed secondary vertex + Double_t fV2z; // Z-position of the reconstructed secondary vertex Double_t fDCA; // DCA of the two tracks - Double_t fPx[2]; // + Double_t fPx[2]; // X,Y,Z- Double_t fPy[2]; // momenta of the two tracks Double_t fPz[2]; // at the reconstructed vertex @@ -174,7 +174,7 @@ class AliD0toKpi : public TObject { Double_t fPIDrespPr[2]; // det. response to be proton Double_t fTOFmass[2]; // mass estimated by the TOF (-1000. if track not reached TOF) - Double_t fWgtAD0,fWgtAD0bar; // + Double_t fWgtAD0,fWgtAD0bar; // weights for the 3 samples Double_t fWgtBD0,fWgtBD0bar; // weights for the 3 samples Double_t fWgtCD0,fWgtCD0bar; // A: (K,Pi)+(K,?) B: (?,Pi) C: (?,?) Double_t fWgtDD0,fWgtDD0bar; // D: all other pairs