TF1 *fLambdaData;//function with Levy fit parameters for Lambda in data
TF1 *fAntiLambdaData;//function with Levy fit parameters for AntiLambda in data
- TF1 *fLambdaEnhancement;
- TF1 *fProtonEnhancement;
+ TF1 *fLambdaEnhancement;//function to describe lambda enhancement
+ TF1 *fProtonEnhancement;//function to describe anti-lambda enhancement
Float_t LambdaBaryonEnhancement(Float_t pt);//Function which gives the factor to reweigh a lambda or antilambda so it roughly matches baryon enhancement seen at RHIC
Float_t ProtonBaryonEnhancement(Float_t pt);//Function which gives the factor to reweigh a lambda or antilambda so it roughly matches baryon enhancement seen at RHIC
bkgd->Add((TH2F*) out2->FindObject(Form("EtReconstructed%sOmegaDaughters",myname)),baryonEnhancement);
bkgd->Add((TH2F*) out2->FindObject(Form("EtReconstructed%sAntiOmegaDaughters",myname)),baryonEnhancement);
break;
+ case 8:
+ bkgd = (TH2F*)((TH2F*) out2->FindObject(Form("EtReconstructed%sLambdaDaughters%s",myname,reweightname)))->Clone("bkgd");
+ bkgd->Scale(baryonEnhancement*lambdaFactor);
+ break;
+ case 9:
+ bkgd = (TH2F*)((TH2F*) out2->FindObject(Form("EtReconstructed%sAntiLambdaDaughters%s",myname,reweightname)))->Clone("bkgd");
+ bkgd->Scale(baryonEnhancement*lambdaFactor);
+ break;
}
TH1D *denominator;
TH1D *numerator;
TH1D *All = GetHisto(0.1,true,"All",TPC,ITS,0,1,20,filename,reweight,kaonFactor,lambdaFactor,baryonEnhancement);
TH1D *Electrons = GetHisto(0.1,true,"Electrons",TPC,ITS,1,2,21,filename,reweight,kaonFactor,lambdaFactor,baryonEnhancement);
TH1D *V0s = GetHisto(0.1,true,"V0s",TPC,ITS,4,4,22,filename,reweight,kaonFactor,lambdaFactor,baryonEnhancement);
+ //case, color, marker
+ TH1D *K0S = GetHisto(0.1,true,"K0S",TPC,ITS,3,TColor::kOrange+8,33,filename,reweight,kaonFactor,lambdaFactor,baryonEnhancement);
+ TH1D *Lambda = GetHisto(0.1,true,"K0S",TPC,ITS,8,TColor::kMagenta+3,29,filename,reweight,kaonFactor,lambdaFactor,baryonEnhancement);
+ TH1D *AntiLambda = GetHisto(0.1,true,"K0S",TPC,ITS,9,TColor::kMagenta+3,30,filename,reweight,kaonFactor,lambdaFactor,baryonEnhancement);
TH1D *Multistrange = GetHisto(0.1,true,"Multistrange",TPC,ITS,7,TColor::kGreen+2,23,filename,reweight,kaonFactor,lambdaFactor,baryonEnhancement);
TH1D *Allpt = GetHisto(0.7,false,"Allpt",TPC,ITS,0,1,20,filename,reweight,kaonFactor,lambdaFactor,baryonEnhancement);
TH1D *Electronspt = GetHisto(0.7,false,"Electronspt",TPC,ITS,1,2,21,filename,reweight,kaonFactor,lambdaFactor,baryonEnhancement);
TH1D *V0spt = GetHisto(0.7,false,"V0spt",TPC,ITS,4,4,22,filename,reweight,kaonFactor,lambdaFactor,baryonEnhancement);
+ TH1D *K0Spt = GetHisto(0.1,false,"K0S",TPC,ITS,3,TColor::kOrange+8,33,filename,reweight,kaonFactor,lambdaFactor,baryonEnhancement);
+ TH1D *Lambdapt = GetHisto(0.1,false,"K0S",TPC,ITS,8,TColor::kMagenta+3,29,filename,reweight,kaonFactor,lambdaFactor,baryonEnhancement);
+ TH1D *AntiLambdapt = GetHisto(0.1,false,"K0S",TPC,ITS,9,TColor::kMagenta+3,30,filename,reweight,kaonFactor,lambdaFactor,baryonEnhancement);
TH1D *Multistrangept = GetHisto(0.7,false,"Multistrangept",TPC,ITS,7,TColor::kGreen+2,23,filename,reweight,kaonFactor,lambdaFactor,baryonEnhancement);
if(ITS){
- All->SetMaximum(0.04);
+ All->SetMaximum(0.025);
}
else{
All->SetMaximum(0.2);
All->SetMarkerStyle(20);
All->GetYaxis()->SetTitleOffset(1.8);
TF1 *func = new TF1("func","[0]",-.7,.7);
- func->SetParameter(0,0.2);
+ func->SetParameter(0,0.02);
+ TF1 *funcLam = new TF1("funcLam","[0]",-.7,.7);
+ funcLam->SetParameter(0,0.001);
+ funcLam->SetLineColor(Lambda->GetMarkerColor());
+ TF1 *funcAlam = new TF1("funcAlam","[0]",-.7,.7);
+ funcAlam->SetParameter(0,0.003);
+ funcAlam->SetLineColor(AntiLambda->GetMarkerColor());
+ TF1 *funcK0 = new TF1("funcK0","[0]",-.7,.7);
+ funcK0->SetParameter(0,0.013);
+ funcK0->SetLineColor(K0S->GetMarkerColor());
All->Fit(func);
+ Lambda->Fit(funcLam);
+ AntiLambda->Fit(funcAlam);
+ K0S->Fit(funcK0);
All->Draw();
Electrons->Draw("same");
V0s->Draw("same");
Multistrange->Draw("same");
+ K0S->Draw("same");
+ Lambda->Draw("same");
+ AntiLambda->Draw("same");
TLatex *tex = new TLatex(0.161478,1.0835,"LHC10d15: p+p, Pythia6 Perugia-0");
tex->SetTextSize(0.0537634);
tex->Draw();
- TLegend *leg = new TLegend(0.635081,0.650538,0.893145,0.903226);
+ TLegend *leg = new TLegend(0.636364,0.612903,0.893939,0.962366);
leg->AddEntry(All,"All");
leg->AddEntry(Electrons,"Electrons");
leg->AddEntry(V0s,"V0s");
+ leg->AddEntry(K0S,"K_{S}^{0}");
+ leg->AddEntry(Lambda,"#Lambda");
+ leg->AddEntry(AntiLambda,"#bar{#Lambda}");
leg->AddEntry(Multistrange,"Multistrange");
leg->SetFillStyle(0);
leg->SetFillColor(0);
leg->SetBorderSize(0);
leg->Draw();
- TLatex *tex = new TLatex(-.65,.02,Form("%2.5f#pm%2.5f",func->GetParameter(0),func->GetParError(0)));
+ TLatex *tex = new TLatex(-0.711139,0.0157696,Form("%2.5f#pm%2.5f",func->GetParameter(0),func->GetParError(0)));
tex->Draw();
+ TLatex *texLam = new TLatex(-0.711139,0.00201613,Form("%2.5f#pm%2.5f",funcLam->GetParameter(0),funcLam->GetParError(0)));
+ texLam->SetTextColor(Lambda->GetMarkerColor());
+ texLam->Draw();
+ TLatex *texAlam = new TLatex(-0.711139,0.00365716,Form("%2.5f#pm%2.5f",funcAlam->GetParameter(0),funcAlam->GetParError(0)));
+ texAlam->SetTextColor(AntiLambda->GetMarkerColor());
+ texAlam->Draw();
+ TLatex *texK0 = new TLatex(-0.711139,0.008,Form("%2.5f#pm%2.5f",funcK0->GetParameter(0),funcK0->GetParError(0)));
+ texK0->SetTextColor(K0S->GetMarkerColor());
+ texK0->Draw();
TCanvas *c1 = new TCanvas("c1","c1",600,400);
c1->SetTopMargin(0.04);
c1->SetRightMargin(0.04);
Allpt->Draw();
Electronspt->Draw("same");
V0spt->Draw("same");
+ K0Spt->Draw("same");
+ Lambdapt->Draw("same");
+ AntiLambdapt->Draw("same");
Multistrangept->Draw("same");
TLatex *texpt = new TLatex(0.161478,1.0835,"LHC10d15: p+p, Pythia6 Perugia-0");
texpt->SetTextSize(0.0537634);
texpt->Draw();
- TLegend *legpt = new TLegend(0.635081,0.650538,0.893145,0.903226);
+ TLegend *legpt = new TLegend(0.634228,0.430108,0.892617,0.905914);
legpt->AddEntry(Allpt,"All");
legpt->AddEntry(Electronspt,"Electrons");
legpt->AddEntry(V0spt,"V0s");
+ legpt->AddEntry(K0Spt,"K_{S}^{0}");
+ legpt->AddEntry(Lambdapt,"#Lambda");
+ legpt->AddEntry(AntiLambdapt,"#bar{#Lambda}");
legpt->AddEntry(Multistrangept,"Multistrange");
legpt->SetFillStyle(0);
legpt->SetFillColor(0);
+//Christine Nattrass, University of Tennessee at Knoxville
+//This macro is for calculating the single track efficiency for the hadronic transverse energy measurement
+//Uses the output of AliAnalysisTaskHadEt
+//This is not actually what gets used in the correction class AliAnalysisHadEtCorrections - that is done in the macro GetCorrections.C - but this is useful for making plots and playing around with different options
+
+//this function calculates the efficiency propagating errors properly
TH1D* bayneseffdiv(TH1D* numerator, TH1D* denominator,Char_t* name)
{
if(!numerator){
}
-
+//This is a somewhat messy function that gets the efficiency for different particles
TH1D *GetHisto(float cut = 0.12, char *name, int mycase, bool eta, int color, int marker,bool TPC, bool ITS){
//TFile *file = new TFile("Et.ESD.new.sim.merged.root");
TFile *file = new TFile("Et.ESD.new.sim.LHC10d4.pp.merged.root");
else{
int lowbin = denominatorParent->GetXaxis()->FindBin(cut);//make sure we don't accidentally get the wrong bin
int highbin = denominatorParent->GetXaxis()->GetNbins();
- cout<<"Projecting from "<<denominatorParent->GetXaxis()->GetBinLowEdge(lowbin)<<" to "<<denominatorParent->GetXaxis()->GetBinLowEdge(highbin+1)<<endl;
+ cout<<"Here Projecting from "<<denominatorParent->GetXaxis()->GetBinLowEdge(lowbin)<<" to "<<denominatorParent->GetXaxis()->GetBinLowEdge(highbin+1)<<endl;
numerator = numeratorParent->ProjectionY(name,lowbin,highbin);
denominator = denominatorParent->ProjectionY(Form("denominator%s",name),lowbin,highbin);
}
}
-void CorrEfficiency(char *prodname= "LHC10d4", char *shortprodname = "LHC10d4 PYTHIA D6T 7 TeV p+p", bool TPC = true,bool ITS = true){
+
+//this is a method that makes pretty plots
+void CorrEfficiency(char *prodname= "LHC10d4", char *shortprodname = "LHC10d4 PYTHIA D6T 7 TeV p+p", bool TPC = true,bool ITS = true, bool eta = false){
gStyle->SetOptTitle(0);
gStyle->SetOptStat(0);
int emcalmarker = 24;
float ptcut1 = 0.05;
float ptcut2 = 0.1;
- TH1D *PHOStotal = GetHisto(0.12,"PHOStotal",0,true,colortotal,phosmarker,TPC,ITS);
- TH1D *PHOSpi = GetHisto(0.12,"PHOSpi",1,true,colorpi,phosmarker,TPC,ITS);
- TH1D *PHOSp = GetHisto(0.12,"PHOSp",2,true,colork,phosmarker,TPC,ITS);
- TH1D *PHOSk = GetHisto(0.12,"PHOSk",3,true,colorp,phosmarker,TPC,ITS);
- if(ITS&&!TPC){PHOStotal->GetXaxis()->SetRange(PHOStotal->GetXaxis()->FindBin(0.05),PHOStotal->GetXaxis()->FindBin(1.0));}
- else{PHOStotal->GetXaxis()->SetRange(PHOStotal->GetXaxis()->FindBin(0.0),PHOStotal->GetXaxis()->FindBin(3.0));}
+ float phoscut = 0.12;
+ float emcalcut = 0.7;
+ if(!eta){
+ phoscut = 0.1;
+ emcalcut = 0.15;
+ }
+ TH1D *PHOStotal = GetHisto(phoscut,"PHOStotal",0,eta,colortotal,phosmarker,TPC,ITS);
+ TH1D *PHOSpi = GetHisto(phoscut,"PHOSpi",1,eta,colorpi,phosmarker,TPC,ITS);
+ TH1D *PHOSp = GetHisto(phoscut,"PHOSp",2,eta,colork,phosmarker,TPC,ITS);
+ TH1D *PHOSk = GetHisto(phoscut,"PHOSk",3,eta,colorp,phosmarker,TPC,ITS);
+ if(eta) PHOStotal->GetXaxis()->SetRange(PHOStotal->GetXaxis()->FindBin(0.05),PHOStotal->GetXaxis()->FindBin(1.0));
+//if(ITS&&!TPC){PHOStotal->GetXaxis()->SetRange(PHOStotal->GetXaxis()->FindBin(0.05),PHOStotal->GetXaxis()->FindBin(1.0));}
+//else{PHOStotal->GetXaxis()->SetRange(PHOStotal->GetXaxis()->FindBin(0.0),PHOStotal->GetXaxis()->FindBin(3.0));}
PHOStotal->SetMinimum(0.0);
PHOStotal->SetMaximum(1.0);
//parameters[centbin][0]*exp(-pow(parameters[centbin][1]/pt,parameters[centbin][2]))
PHOSpi->Draw("same");
PHOSp->Draw("same");
PHOSk->Draw("same");
- TH1D *EMCALtotal = GetHisto(0.7,"EMCALtotal",0,true,colortotal,emcalmarker,TPC,ITS);
- TH1D *EMCALpi = GetHisto(0.7,"EMCALpi",1,true,colorpi,emcalmarker,TPC,ITS);
- TH1D *EMCALp = GetHisto(0.7,"EMCALp",2,true,colork,emcalmarker,TPC,ITS);
- TH1D *EMCALk = GetHisto(0.7,"EMCALk",3,true,colorp,emcalmarker,TPC,ITS);
+ TH1D *EMCALtotal = GetHisto(emcalcut,"EMCALtotal",0,eta,colortotal,emcalmarker,TPC,ITS);
+ TH1D *EMCALpi = GetHisto(emcalcut,"EMCALpi",1,eta,colorpi,emcalmarker,TPC,ITS);
+ TH1D *EMCALp = GetHisto(emcalcut,"EMCALp",2,eta,colork,emcalmarker,TPC,ITS);
+ TH1D *EMCALk = GetHisto(emcalcut,"EMCALk",3,eta,colorp,emcalmarker,TPC,ITS);
EMCALtotal->Draw("same");
EMCALpi->Draw("same");
EMCALp->Draw("same");
leg->SetTextSize(0.06);
leg->Draw();
- TLine *line = new TLine(0.2,0.0,0.2,1.0);
- line->Draw();
+ TLine *line = new TLine(0.150,0.0,0.150,1.0);
+ if(eta)line->Draw();
line->SetLineWidth(3.0);
//line->SetLineColor(TColor::kYellow);
line->SetLineStyle(2);
TLatex *tex4 = new TLatex(1.16186,0.213221,"Open symbols |#eta|<0.70 (EMCal)");
tex4->SetTextSize(0.0537634);
tex4->Draw();
- TLatex *tex2 = new TLatex(0.241937,0.448436,"TPC cut-off 150 MeV/c");
+ TLatex *tex2 = new TLatex(0.164016,0.860826,"TPC cut-off 150 MeV/c");
tex2->SetTextSize(0.0537634);
- tex2->Draw();
- if(TPC){
+ if(eta) tex2->Draw();
+
+
+ TLine *line2 = new TLine(0.10,0.0,0.10,1.0);
+ line2->SetLineWidth(3.0);
+ TLatex *tex5 = new TLatex(0.10817,0.924976,"ITS cut-off 100 MeV/c");
+ tex5->SetTextSize(0.0537634);
+ line2->SetLineStyle(2);
+ tex5->SetTextColor(4);
+ line2->SetLineColor(4);
+ if(!TPC && eta){
+ line2->Draw();
+ tex5->Draw();
+ }
+ if(!TPC){
c->SaveAs("pics/CorrEfficiency.eps");
c->SaveAs("pics/CorrEfficiency.png");
}
}
-void CorrNeutral(char *prodname = "LHC10d4 PYTHIA D6T 7 TeV p+p", char *shortprodname = "LHC10d4", bool hadronic = true, bool reweighted = false, float kaonFactor=1.0, float lambdaFactor = 1.0, float baryonEnhancement = 1.0){
+void CorrNeutral(char *prodname = "LHC10d4 PYTHIA D6T 7 TeV p+p", char *shortprodname = "LHC10d4", bool hadronic = false, bool reweighted = false, float kaonFactor=1.0, float lambdaFactor = 1.0, float baryonEnhancement = 1.0){
gStyle->SetOptTitle(0);
gStyle->SetOptStat(0);
gStyle->SetOptFit(0);
PHOStotal->GetYaxis()->SetLabelSize(0.045);
PHOStotal->GetXaxis()->SetTitleSize(0.05);
PHOStotal->GetYaxis()->SetTitleSize(0.06);
+
+ PHOStotal->GetXaxis()->SetTitle("p_{T} (GeV/c)");
PHOStotal->Draw();
EMCALtotal->Draw("same");
PHOSallneutral->Draw("same");
weight = weight/totalwidth;
weightPhos = weightPhos/totalwidthPhos;
cout<<"weight = "<<weight<<" weight phos "<<weightPhos<<endl;
+ pt1total->GetXaxis()->SetTitle("p_{T} (GeV/c)");
pt1total->Draw();
pt2total->Draw("same");
pt1allneutral->Draw("same");
char ptnameeps[200];
char ptnamepng[200];
char ptnamepdf[200];
+ char ptnameC[200];
char etanameeps[200];
char etanamepng[200];
char etanamepdf[200];
+ char etanameC[200];
TString *Total = new TString("total");
TString *Neutral = new TString("neutral");
TString *Cut = Neutral;
sprintf(ptnameeps,"pics/f%spt%s.eps",Cut->Data(),Factors->Data());
sprintf(ptnamepng,"pics/f%spt%s.png",Cut->Data(),Factors->Data());
sprintf(ptnamepdf,"pics/f%spt%s.pdf",Cut->Data(),Factors->Data());
+ sprintf(ptnameC,"pics/f%spt%s.C",Cut->Data(),Factors->Data());
sprintf(etanameeps,"pics/f%seta%s.eps",Cut->Data(),Factors->Data());
sprintf(etanamepng,"pics/f%seta%s.png",Cut->Data(),Factors->Data());
sprintf(etanamepdf,"pics/f%seta%s.pdf",Cut->Data(),Factors->Data());
+ sprintf(etanameC,"pics/f%seta%s.C",Cut->Data(),Factors->Data());
ptpad->SaveAs(ptnameeps);
ptpad->SaveAs(ptnamepng);
ptpad->SaveAs(ptnamepdf);
+ ptpad->SaveAs(ptnameC);
etapad->SaveAs(etanameeps);
etapad->SaveAs(etanamepng);
etapad->SaveAs(etanamepdf);
+ etapad->SaveAs(etanameC);
TCanvas *c2 = new TCanvas("c2","c2",500,400);
c2->SetTopMargin(0.03);
leg5->SetTextSize(0.0548607);
leg5->Draw();
if(!hadronic){return;}
+
+
TCanvas *empad = new TCanvas("empad","empad",400,400);
empad->SetTopMargin(0.04);
empad->SetRightMargin(0.04);