]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/totEt/macros/hadEt/GetCorrections.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / totEt / macros / hadEt / GetCorrections.C
index 707bdc82bab2e56f3e9ba4b85dbe36f6e1fb269d..cbbc5b5667c6bad4d7da4e8838f3a2e76cdc104a 100644 (file)
@@ -58,14 +58,14 @@ const char *reweightedYes = "Reweighted";
 void GetCorrections(char *prodname = "Enter Production Name", char *shortprodname = "EnterProductionName", bool ispp = true, bool forSim = true, bool TPC = true, char *infilename="Et.ESD.new.sim.merged.root", int dataset = 2009){
     TStopwatch timer;
     timer.Start();
-    gSystem->Load("libTree.so");
-    gSystem->Load("libGeom.so");
-    gSystem->Load("libVMC.so");
-    gSystem->Load("libXMLIO.so");
+    gSystem->Load("libTree");
+    gSystem->Load("libGeom");
+    gSystem->Load("libVMC");
+    gSystem->Load("libXMLIO");
 
-    gSystem->Load("libSTEERBase.so");
-    gSystem->Load("libESD.so");
-    gSystem->Load("libAOD.so");
+    gSystem->Load("libSTEERBase");
+    gSystem->Load("libESD");
+    gSystem->Load("libAOD");
 
     gSystem->Load("libANALYSIS");
     gSystem->Load("libANALYSISalice");
@@ -106,8 +106,8 @@ void GetCorrections(char *prodname = "Enter Production Name", char *shortprodnam
    hadCorrectionEMCAL->SetNeutralCorrection(neutralCorr);
    //Using error from data, see analysis note for details
    if(ispp){
-     hadCorrectionEMCAL->SetNeutralCorrectionLowBound(neutralCorr*(1.0-0.013));
-     hadCorrectionEMCAL->SetNeutralCorrectionHighBound(neutralCorr*(1.0+0.013));
+     hadCorrectionEMCAL->SetNeutralCorrectionLowBound(neutralCorr*(1.0-0.014));
+     hadCorrectionEMCAL->SetNeutralCorrectionHighBound(neutralCorr*(1.0+0.014));
    }
    else{
      hadCorrectionEMCAL->SetNeutralCorrectionLowBound(neutralCorr*(1.0-0.049));
@@ -124,7 +124,6 @@ void GetCorrections(char *prodname = "Enter Production Name", char *shortprodnam
      hadCorrectionEMCAL->SetNotHadronicCorrectionLowBound(hadronicCorr*(1.0-0.023));
      hadCorrectionEMCAL->SetNotHadronicCorrectionHighBound(hadronicCorr*(1.0+0.023));
    }
-
    float ptcutITS = CorrPtCut(0.1,prodname,shortprodname,ispp,forSim);
    hadCorrectionEMCAL->SetpTCutCorrectionITS(ptcutITS);
    float ptcutTPC = CorrPtCut(0.15,prodname,shortprodname,ispp,forSim);
@@ -250,8 +249,8 @@ void GetCorrections(char *prodname = "Enter Production Name", char *shortprodnam
      TH1D *efficiencyHadronITSCB10 = GetHistoEfficiency(etacut,"hEfficiencyHadronITSCB10",0,1,20,false,true,10,15);
      for(int i=10;i<=20;i++) hadCorrectionEMCAL->SetEfficiencyHadronITS((TH1D*)efficiencyHadronITSCB10->Clone(Form("Test%i",i)),i);//Hadron
    }//EMCAL
-   hadCorrectionEMCAL->SetEfficiencyErrorLowBound(0.99);
-   hadCorrectionEMCAL->SetEfficiencyErrorHighBound(1.01);
+   hadCorrectionEMCAL->SetEfficiencyErrorLowBound(0.95);
+   hadCorrectionEMCAL->SetEfficiencyErrorHighBound(1.05);
 
    //CorrEfficiencyPlots(true,prodname,shortprodname);
    //CorrEfficiencyPlots(false,prodname,shortprodname,infilename);
@@ -260,7 +259,7 @@ void GetCorrections(char *prodname = "Enter Production Name", char *shortprodnam
    //hadCorrectionEMCAL->GetEfficiencyHadronTPC()->Draw();
    TH1D *backgroundTPC;
    TH1D *backgroundITS;
-   if((dataset==20111 || dataset==20100) && !forSim){//2.76 TeV p+p or Pb+Pb
+   if((dataset==20111 || dataset==20100|| dataset==2011) && !forSim){//2.76 TeV p+p or Pb+Pb
      if(dataset==20111){
        cout<<"Fixing 2.76 TeV p+p background to be average of 900 GeV and 7 TeV scaling"<<endl;
        backgroundTPC = pp276TPCBkgd();
@@ -294,6 +293,7 @@ void GetCorrections(char *prodname = "Enter Production Name", char *shortprodnam
      bkgdpcterror = 0.13;
      break;
    case 20100:
+   case 2011:
      bkgdpcterror = 0.76;
      break;
    }
@@ -332,8 +332,8 @@ void GetCorrections(char *prodname = "Enter Production Name", char *shortprodnam
    hadCorrectionPHOS->SetNeutralCorrection(neutralCorr);
    //Using error from data, see analysis note for details
    if(ispp){
-     hadCorrectionPHOS->SetNeutralCorrectionLowBound(neutralCorr*(1.0-.013));
-     hadCorrectionPHOS->SetNeutralCorrectionHighBound(neutralCorr*(1.0+.013));
+     hadCorrectionPHOS->SetNeutralCorrectionLowBound(neutralCorr*(1.0-.014));
+     hadCorrectionPHOS->SetNeutralCorrectionHighBound(neutralCorr*(1.0+.014));
    }
    else{
      hadCorrectionPHOS->SetNeutralCorrectionLowBound(neutralCorr*(1.0-0.049));
@@ -479,11 +479,13 @@ void GetCorrections(char *prodname = "Enter Production Name", char *shortprodnam
      TH1D *efficiencyHadronITSCB10 = GetHistoEfficiency(etacut,"hEfficiencyHadronITSCB10",0,1,20,false,true,10,15);
      for(int i=10;i<=20;i++) hadCorrectionPHOS->SetEfficiencyHadronITS((TH1D*)efficiencyHadronITSCB10->Clone(Form("Test%i",i)),i);//Hadron
    }//EMCAL
+   hadCorrectionPHOS->SetEfficiencyErrorLowBound(0.95);
+   hadCorrectionPHOS->SetEfficiencyErrorHighBound(1.05);
 
 
    TH1D *backgroundTPC;
    TH1D *backgroundITS;
-   if((dataset==20111 || dataset==20100) && !forSim){//2.76 TeV p+p or Pb+Pb
+   if((dataset==20111 || dataset==20100|| dataset==2011) && !forSim){//2.76 TeV p+p or Pb+Pb
      if(dataset==20111){
        cout<<"Fixing 2.76 TeV p+p background to be average of 900 GeV and 7 TeV scaling"<<endl;
        backgroundTPC = pp276TPCBkgd();
@@ -526,14 +528,14 @@ void GetCorrections(char *prodname = "Enter Production Name", char *shortprodnam
 Float_t CorrNeutral(float ptcut, char *prodname, char *shortprodname, bool ispp, bool forSim, bool TPC, bool hadronic, float etacut, int dataset){
   if(!forSim){//for data we have evaluated the neutral correction from ALICE data
     if(hadronic){//for tot et from had et
-      return 0.581;
+      return 1/0.5665;//0.5665 0.0145 <-- Correct - what should be applied
     }
     else{//for had et only
       if(dataset==2009){
        return 1.0/0.7571;
       }
       else{
-       return 1.0/0.755;
+       return 1.0/0.751;
       }
     }
   }
@@ -823,7 +825,6 @@ TH1D *GetHistoCorrPtCut(float ptcut, char *name, bool ispp, bool forSim, int myc
   int nbins = allhad->GetXaxis()->GetNbins();
   //cout<<"Projecting from "<<allhad->GetXaxis()->GetBinLowEdge(lowbin)<<" to "<<allhad->GetXaxis()->GetBinLowEdge(highbin+1)<<endl;
   //cout<<"Projecting from "<<allhad->GetXaxis()->GetBinLowEdge(lowbin)<<" to "<<allhad->GetXaxis()->GetBinLowEdge(nbins)<<endl;
-
   //allhad->Sumw2();
   TH1D *numerator;
   TH1D *denominator;
@@ -831,12 +832,12 @@ TH1D *GetHistoCorrPtCut(float ptcut, char *name, bool ispp, bool forSim, int myc
   case -1:
     numerator = ptlow->ProjectionY("nameLow",lowbin,highbin);
     denominator = allhad->ProjectionY("denominatorLow",highbin,nbins);
-    denominator->Add(ptlow);
+    denominator->Add(numerator);
     break;
   case 1:
     numerator = pthigh->ProjectionY("nameHigh",lowbin,highbin);
     denominator = allhad->ProjectionY("denominatorHigh",highbin,nbins);
-    denominator->Add(pthigh);
+    denominator->Add(numerator);
     break;
   default:
     numerator = allhad->ProjectionY("name",lowbin,highbin);