Correcting coding violations in HadEt classes, adding container class for hadronic...
authorcnattras <cnattras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 15 Sep 2010 16:17:27 +0000 (16:17 +0000)
committercnattras <cnattras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 15 Sep 2010 16:17:27 +0000 (16:17 +0000)
PWG4/PWG4totEtLinkDef.h
PWG4/libPWG4totEt.pkg
PWG4/totEt/AliAnalysisHadEt.cxx
PWG4/totEt/AliAnalysisHadEt.h
PWG4/totEt/AliAnalysisHadEtCorrections.cxx [new file with mode: 0644]
PWG4/totEt/AliAnalysisHadEtCorrections.h [new file with mode: 0644]
PWG4/totEt/AliAnalysisHadEtMonteCarlo.cxx
PWG4/totEt/AliAnalysisHadEtMonteCarlo.h
PWG4/totEt/AliAnalysisTaskHadEt.cxx
PWG4/totEt/AliAnalysisTaskHadEt.h

index 9b7bd56..ba8ef61 100644 (file)
@@ -17,6 +17,7 @@
 #pragma link C++ class AliAnalysisHadEtMonteCarlo+;
 #pragma link C++ class AliAnalysisHadEtReconstructed+;
 #pragma link C++ class AliAnalysisTaskHadEt+;
+#pragma link C++ class AliAnalysisHadEtCorrections+;
 
       
 #endif
index e4ff165..51b1b24 100644 (file)
@@ -12,6 +12,7 @@ totEt/AliAnalysisHadEt.cxx \
 totEt/AliAnalysisHadEtMonteCarlo.cxx \
 totEt/AliAnalysisHadEtReconstructed.cxx \
 totEt/AliAnalysisTaskHadEt.cxx \
+totEt/AliAnalysisHadEtCorrections.cxx \
 
 HDRS:= $(SRCS:.cxx=.h) 
 
index 22212c3..961a762 100644 (file)
@@ -1,5 +1,8 @@
 //Create by Christine Nattrass, Rebecca Scott, Irakli Martashvili
 //University of Tennessee at Knoxville
+//This class is designed for the analysis of the hadronic component of transverse energy.  It is used by AliAnalysisTaskHadEt.
+//This gets information about the hadronic component of the transverse energy from tracks reconstructed in an event
+//it has daughters, AliAnalysisHadEtMonteCarlo and AliAnalysisHadEtReconstructed, which loop over either Monte Carlo data or real data to get Et
 #include "AliAnalysisHadEt.h"
 #include "TMath.h"
 #include "TList.h"
 #include "TH2F.h"
 #include <iostream>
 #include "AliAnalysisEtCuts.h"
+#include "AliMCEvent.h"
 #include "AliVEvent.h"
+#include "AliStack.h"
+#include "AliESDtrackCuts.h"
+#include "TDatabasePDG.h"
+#include "TParticle.h"
+#include "Rtypes.h"
 
 using namespace std;
 
 ClassImp(AliAnalysisHadEt);
 
 
-Int_t AliAnalysisHadEt::numOfEtaBins = 46;
-Float_t AliAnalysisHadEt::etaAxis[47]={-0.78, -0.74, -0.7, -0.66, -0.62, -0.58, -0.54, -0.5, -0.46, -0.42, -0.38, -0.34, -0.3, -0.26, -0.22, -0.18, -0.14, -0.12, -0.1, -0.08, -0.06, -0.04, -0.02, -0.0, 0.02, 0.04, 0.06, 0.08, 0.1, 0.12, 0.14, 0.18, 0.22, 0.26, 0.3, 0.34, 0.38, 0.42, 0.46, 0.5, 0.54, 0.58, 0.62, 0.66, 0.7, 0.74, 0.78};
-Int_t AliAnalysisHadEt::numOfPtBins = 111;
-Float_t AliAnalysisHadEt::ptAxis[117]=
+Int_t AliAnalysisHadEt::fgnumOfEtaBins = 46;
+Float_t AliAnalysisHadEt::fgEtaAxis[47]={-0.78, -0.74, -0.7, -0.66, -0.62, -0.58, -0.54, -0.5, -0.46, -0.42, -0.38, -0.34, -0.3, -0.26, -0.22, -0.18, -0.14, -0.12, -0.1, -0.08, -0.06, -0.04, -0.02, -0.0, 0.02, 0.04, 0.06, 0.08, 0.1, 0.12, 0.14, 0.18, 0.22, 0.26, 0.3, 0.34, 0.38, 0.42, 0.46, 0.5, 0.54, 0.58, 0.62, 0.66, 0.7, 0.74, 0.78};
+Int_t AliAnalysisHadEt::fgNumOfPtBins = 111;
+Float_t AliAnalysisHadEt::fgPtAxis[117]=
   {0.0,0.01,0.02,0.03,0.04, 0.05, 0.06,0.07,0.08,0.09, 0.10,0.11, .12,0.13, .14,0.15, .16,0.17, .18,0.19,
    0.2, .22, .24, .26, .28, 0.30, 0.32, .34, .36, .38, 0.40, .42, .44, .46, .48,
    0.5, .52, .54, .56, .58, 0.60, 0.62, .64, .66, .68, 0.70, .72, .74, .76, .78,
@@ -30,29 +39,29 @@ Float_t AliAnalysisHadEt::ptAxis[117]=
 AliAnalysisHadEt::AliAnalysisHadEt() :
         fHistogramNameSuffix("")
         ,fPdgDB(0)
-        ,PiPlusCode(0)
-        ,PiMinusCode(0)
-        ,KPlusCode(0)
-        ,KMinusCode(0)
-        ,ProtonCode(0)
-        ,AntiProtonCode(0)
-        ,LambdaCode(0)
-        ,AntiLambdaCode(0)
-        ,K0SCode(0)
-        ,OmegaCode(0)
-        ,AntiOmegaCode(0)
-        ,Xi0Code(0)
-        ,AntiXi0Code(0)
-        ,XiCode(0)
-        ,AntiXiCode(0)
-        ,SigmaCode(0)
-        ,AntiSigmaCode(0)
-        ,K0LCode(0)
-        ,NeutronCode(0)
-        ,AntiNeutronCode(0)
-        ,EPlusCode(0)
-        ,EMinusCode(0)
-        ,PionMass(0)
+        ,fPiPlusCode(0)
+        ,fPiMinusCode(0)
+        ,fKPlusCode(0)
+        ,fKMinusCode(0)
+        ,fProtonCode(0)
+        ,fAntiProtonCode(0)
+        ,fLambdaCode(0)
+        ,fAntiLambdaCode(0)
+        ,fK0SCode(0)
+        ,fOmegaCode(0)
+        ,fAntiOmegaCode(0)
+        ,fXi0Code(0)
+        ,fAntiXi0Code(0)
+        ,fXiCode(0)
+        ,fAntiXiCode(0)
+        ,fSigmaCode(0)
+        ,fAntiSigmaCode(0)
+        ,fK0LCode(0)
+        ,fNeutronCode(0)
+        ,fAntiNeutronCode(0)
+        ,fEPlusCode(0)
+        ,fEMinusCode(0)
+        ,fPionMass(0)
        ,fSumEt(0)
        ,fSumEtAcc(0)
        ,fTotEt(0)
@@ -76,69 +85,87 @@ AliAnalysisHadEt::AliAnalysisHadEt() :
                                  //,fSingleCellEnergyCut(0)
                                  //,fClusterEnergyCut(EtCommonCuts::kClusterEnergyCut)
                                  //,fTrackPtCut(EtCommonCuts::kTrackPtCut)
-        ,esdtrackCutsITSTPC(0)
-        ,esdtrackCutsTPC(0)
-       ,esdtrackCutsITS(0)
-        ,histoList(0)
-{
+        ,ffesdtrackCutsITSTPC(0)
+        ,fesdtrackCutsTPC(0)
+       ,fesdtrackCutsITS(0)
+        ,fhistoList(0)
+{//default constructor
 
 }
 
 AliAnalysisHadEt::~AliAnalysisHadEt()
-{
+{//destructor
 
 }
 
 Int_t AliAnalysisHadEt::AnalyseEvent(AliVEvent *event)
-{
-  //this line is basically here to eliminate a compiler warning that event is not used.  Making it a virtual function did not work with the plugin.
+{ //this line is basically here to eliminate a compiler warning that event is not used.  Making it a virtual function did not work with the plugin.
   cout<<"This event has "<<event->GetNumberOfTracks()<<" tracks"<<endl;
+     ResetEventValues();
+     AliMCEvent *mcEvent = dynamic_cast<AliMCEvent*>(event);
+
+    // Let's play with the stack!
+    AliStack *stack = mcEvent->Stack();
+
+    Int_t nPrim = stack->GetNtrack();
+
+    for (Int_t iPart = 0; iPart < nPrim; iPart++)
+    {
+
+        TParticle *part = stack->Particle(iPart);
+
+        if (!part)
+         {
+            Printf("ERROR: Could not get particle %d", iPart);
+            continue;
+         }
+    }
   return 0;
 }
 
 void AliAnalysisHadEt::FillOutputList()
-{
+{//fill the output histogram list with histograms in all AliAnalysisHadEt's
 }
 
 void AliAnalysisHadEt::Init()
-{
+{//Initiate member vaiables to reasonable values
   if(!fPdgDB) fPdgDB = new TDatabasePDG();
   //the codes are defined in $ROOTSYS/etc/pdg_table.txt
-  PionMass = fPdgDB->GetParticle("pi+")->Mass();
-  PiPlusCode = fPdgDB->GetParticle("pi+")->PdgCode();
-    PiMinusCode = fPdgDB->GetParticle("pi-")->PdgCode();
-    KPlusCode = fPdgDB->GetParticle("K+")->PdgCode();
-    KMinusCode = fPdgDB->GetParticle("K-")->PdgCode();
-    ProtonCode = fPdgDB->GetParticle("proton")->PdgCode();
-    AntiProtonCode = fPdgDB->GetParticle("antiproton")->PdgCode();
-    LambdaCode = fPdgDB->GetParticle("Lambda0")->PdgCode();
-    AntiLambdaCode = fPdgDB->GetParticle("Lambda0_bar")->PdgCode();
-    K0SCode = fPdgDB->GetParticle("K_S0")->PdgCode();
-    OmegaCode = fPdgDB->GetParticle("Omega-")->PdgCode();
-    AntiOmegaCode = fPdgDB->GetParticle("Omega+")->PdgCode();
-    Xi0Code = fPdgDB->GetParticle("Xi0")->PdgCode();
-    AntiXi0Code = fPdgDB->GetParticle("Xi0_bar")->PdgCode();
-    XiCode = fPdgDB->GetParticle("Xi-")->PdgCode();
-    AntiXiCode = fPdgDB->GetParticle("Xi-_bar")->PdgCode();
-    SigmaCode = fPdgDB->GetParticle("Sigma-")->PdgCode();
-    AntiSigmaCode = fPdgDB->GetParticle("Sigma+")->PdgCode();
-    K0LCode = fPdgDB->GetParticle("K_L0")->PdgCode();
-    NeutronCode = fPdgDB->GetParticle("neutron")->PdgCode();
-    AntiNeutronCode = fPdgDB->GetParticle("antineutron")->PdgCode();
-    EPlusCode = fPdgDB->GetParticle("e+")->PdgCode();
-    EMinusCode = fPdgDB->GetParticle("e-")->PdgCode();
+  fPionMass = fPdgDB->GetParticle("pi+")->Mass();
+  fPiPlusCode = fPdgDB->GetParticle("pi+")->PdgCode();
+    fPiMinusCode = fPdgDB->GetParticle("pi-")->PdgCode();
+    fKPlusCode = fPdgDB->GetParticle("K+")->PdgCode();
+    fKMinusCode = fPdgDB->GetParticle("K-")->PdgCode();
+    fProtonCode = fPdgDB->GetParticle("proton")->PdgCode();
+    fAntiProtonCode = fPdgDB->GetParticle("antiproton")->PdgCode();
+    fLambdaCode = fPdgDB->GetParticle("Lambda0")->PdgCode();
+    fAntiLambdaCode = fPdgDB->GetParticle("Lambda0_bar")->PdgCode();
+    fK0SCode = fPdgDB->GetParticle("K_S0")->PdgCode();
+    fOmegaCode = fPdgDB->GetParticle("Omega-")->PdgCode();
+    fAntiOmegaCode = fPdgDB->GetParticle("Omega+")->PdgCode();
+    fXi0Code = fPdgDB->GetParticle("Xi0")->PdgCode();
+    fAntiXi0Code = fPdgDB->GetParticle("Xi0_bar")->PdgCode();
+    fXiCode = fPdgDB->GetParticle("Xi-")->PdgCode();
+    fAntiXiCode = fPdgDB->GetParticle("Xi-_bar")->PdgCode();
+    fSigmaCode = fPdgDB->GetParticle("Sigma-")->PdgCode();
+    fAntiSigmaCode = fPdgDB->GetParticle("Sigma+")->PdgCode();
+    fK0LCode = fPdgDB->GetParticle("K_L0")->PdgCode();
+    fNeutronCode = fPdgDB->GetParticle("neutron")->PdgCode();
+    fAntiNeutronCode = fPdgDB->GetParticle("antineutron")->PdgCode();
+    fEPlusCode = fPdgDB->GetParticle("e+")->PdgCode();
+    fEMinusCode = fPdgDB->GetParticle("e-")->PdgCode();
 }
 
 void AliAnalysisHadEt::CreateHistograms()
-{
+{//creates histograms included in all AliAnalysisHadEt's
 }
 
 void AliAnalysisHadEt::FillHistograms()
-{
+{//Fills histograms filled for all AliAnalysisHadEt's
 }
 
 void AliAnalysisHadEt::ResetEventValues()
-{
+{//Resets event values of et to zero
     fTotEt = 0;
     fTotEtAcc = 0;
     fTotNeutralEt = 0;
@@ -150,27 +177,27 @@ void AliAnalysisHadEt::ResetEventValues()
     fNeutralMultiplicity = 0;
 }
 void AliAnalysisHadEt::CreateEtaPtHisto2D(TString name, TString title)
-{     
+{     //creates a 2-d histogram in eta and phi and adds it to the list of histograms to be saved
   TString *histoname   = new TString();
   TString *histotitle   = new TString();
 
   histoname->Append(name);
   histotitle->Append(title);
-  //TH2F *h1 = new TH2F("h1", "Histogram with Gaussian random distribution", numOfPtBins, ptBinsArray, numOfEtaBins, etaBinsArray);
+  //TH2F *h1 = new TH2F("h1", "Histogram with Gaussian random distribution", fgNumOfPtBins, ptBinsArray, fgnumOfEtaBins, etaBinsArray);
 
-  TH2F *histo = new TH2F(histoname->Data(),histotitle->Data(),numOfPtBins, ptAxis, numOfEtaBins, etaAxis);
+  TH2F *histo = new TH2F(histoname->Data(),histotitle->Data(),fgNumOfPtBins, fgPtAxis, fgnumOfEtaBins, fgEtaAxis);
   histo->SetYTitle("#eta");
   histo->SetXTitle("p_{T}");
   histo->SetZTitle("E_{T}");
   histo->Sumw2();
-  histoList->Add(histo);
+  fhistoList->Add(histo);
   delete histoname;
   delete histotitle;
     
 }
 
 void AliAnalysisHadEt::CreateHisto1D(TString name, TString title, TString xtitle, TString ytitle,Int_t xbins, Float_t xlow,Float_t xhigh)
-{     
+{     //creates a 1d histogram of the given dimensions and adds it to the list of histograms to be saved
   TString *histoname   = new TString();
   TString *histotitle   = new TString();
   
@@ -183,13 +210,13 @@ void AliAnalysisHadEt::CreateHisto1D(TString name, TString title, TString xtitle
   histo->SetYTitle(ytitle);
   histo->SetXTitle(xtitle);
   histo->Sumw2();
-  histoList->Add(histo);
+  fhistoList->Add(histo);
   delete histoname;
   delete histotitle;
     
 }
 void AliAnalysisHadEt::CreateIntHisto1D(TString name, TString title, TString xtitle, TString ytitle,Int_t xbins, Int_t xlow,Int_t xhigh)
-{     
+{     //creates a 1d integer histogram and adds it to the list of histograms to be saved
   TString *histoname   = new TString();
   TString *histotitle   = new TString();
   
@@ -202,13 +229,13 @@ void AliAnalysisHadEt::CreateIntHisto1D(TString name, TString title, TString xti
   histo->SetYTitle(ytitle);
   histo->SetXTitle(xtitle);
   histo->Sumw2();
-  histoList->Add(histo);
+  fhistoList->Add(histo);
   delete histoname;
   delete histotitle;
     
 }
 void AliAnalysisHadEt::CreateHisto2D(TString name, TString title, TString xtitle, TString ytitle,Int_t xbins, Float_t xlow,Float_t xhigh,Int_t ybins,Float_t ylow,Float_t yhigh)
-{     
+{     //creates a 2d histogram and adds it to the list of histograms to be saved
   TString *histoname   = new TString();
   TString *histotitle   = new TString();
   
@@ -221,13 +248,13 @@ void AliAnalysisHadEt::CreateHisto2D(TString name, TString title, TString xtitle
   histo->SetYTitle(ytitle);
   histo->SetXTitle(xtitle);
   histo->Sumw2();
-  histoList->Add(histo);
+  fhistoList->Add(histo);
   delete histoname;
   delete histotitle;
     
 }
 void AliAnalysisHadEt::CreateIntHisto2D(TString name, TString title, TString xtitle, TString ytitle,Int_t xbins, Int_t xlow,Int_t xhigh,Int_t ybins,Int_t ylow,Int_t yhigh)
-{     
+{     //creates a 2-d integer histogram and adds it to the list of histograms to be saved
   TString *histoname   = new TString();
   TString *histotitle   = new TString();
   
@@ -240,36 +267,36 @@ void AliAnalysisHadEt::CreateIntHisto2D(TString name, TString title, TString xti
   histo->SetYTitle(ytitle);
   histo->SetXTitle(xtitle);
   histo->Sumw2();
-  histoList->Add(histo);
+  fhistoList->Add(histo);
   delete histoname;
   delete histotitle;
     
 }
 
 void AliAnalysisHadEt::CreateEtaHisto1D(TString name, TString title)
-{     
+{     //creates 1d histogram in eta and adds it to the list of histograms to be saved
   TString *histoname   = new TString();
   TString *histotitle   = new TString();
   
 
   histoname->Append(name);
   histotitle->Append(title);
-  TH1F *histo = new TH1F(histoname->Data(),histotitle->Data(),numOfEtaBins, etaAxis);
+  TH1F *histo = new TH1F(histoname->Data(),histotitle->Data(),fgnumOfEtaBins, fgEtaAxis);
   histo->SetYTitle("E_{T}");
   histo->SetXTitle("#eta");
   histo->Sumw2();
-  histoList->Add(histo);
+  fhistoList->Add(histo);
   delete histoname;
   delete histotitle;
     
 }
 void AliAnalysisHadEt::FillHisto1D(TString histname, Float_t x, Float_t weight)
-{
+{//fills a 1d histogram with the name histoname with the value x and the weight "weight"
   TH1F     *histo; 
   TString  *name   = new TString();
 
   name->Append(histname);       
-  histo = (TH1F *)histoList->FindObject(name->Data()); 
+  histo = (TH1F *)fhistoList->FindObject(name->Data()); 
   if(histo){
     histo->Fill((Double_t)x, weight);
   }
@@ -277,12 +304,12 @@ void AliAnalysisHadEt::FillHisto1D(TString histname, Float_t x, Float_t weight)
   delete name;
 }
 void AliAnalysisHadEt::FillHisto2D(TString histname, Float_t x, Float_t y, Float_t weight)
-{
+{//fills a 2d histogram with the name histoname with the value x and the weight "weight"
   TH2F     *histo; 
   TString  *name   = new TString();
   
   name->Append(histname);       
-  histo = (TH2F *)histoList->FindObject(name->Data()); 
+  histo = (TH2F *)fhistoList->FindObject(name->Data()); 
   if(histo){
     histo->Fill((Double_t)x,(Double_t)y, weight);
   }
@@ -291,8 +318,8 @@ void AliAnalysisHadEt::FillHisto2D(TString histname, Float_t x, Float_t y, Float
 }
 
 
-Float_t AliAnalysisHadEt::Et(TParticle *part, float mass){
-  if(mass == -1000){//if no mass given return default 
+Float_t AliAnalysisHadEt::Et(TParticle *part, float mass){//function to calculate et in the same way as it would be calculated in a calorimeter
+  if(mass+1000<0.01){//if no mass given return default.  The default argument is -1000
     if(TMath::Abs(part->GetPDG(0)->PdgCode())==2212 || TMath::Abs(part->GetPDG(0)->PdgCode())==2112){
       if(part->GetPDG(0)->PdgCode()==-2212 || part->GetPDG(0)->PdgCode()==-2112){//antiproton or antineutron
        //for antinucleons we specifically want to return the kinetic energy plus twice the rest mass
index 3199462..4ab9bdb 100644 (file)
@@ -1,19 +1,19 @@
 //Create by Christine Nattrass, Rebecca Scott, Irakli Martashvili
 //University of Tennessee at Knoxville
+//This class is designed for the analysis of the hadronic component of transverse energy.  It is used by AliAnalysisTaskHadEt.
 #ifndef ALIANALYSISHADET_H
 #define ALIANALYSISHADET_H
 
 #include "TString.h"
-#include "TDatabasePDG.h"
-#include "TParticle.h"
-#include "Rtypes.h"
-#include "TString.h"
-#include "AliESDtrackCuts.h"
 
 class TH2F;
 class TH1F;
 class AliVEvent;
 class TList;
+class AliESDtrackCuts;
+class Rtypes;
+class TParticle;
+class TDatabasePDG;
 
 class AliAnalysisHadEt
 {
@@ -44,114 +44,102 @@ public:
     virtual void ResetEventValues();
     
     /** Sum of the total Et for all events */
-    Double_t GetSumEt() { return fSumEt; }
+    Double_t GetSumEt() const { return fSumEt; }
 
     /** Sum of the total Et within our acceptance for all events */
-    Double_t GetSumEtAcc() { return fSumEtAcc; }
+    Double_t GetSumEtAcc() const { return fSumEtAcc; }
 
     /** Total Et in the event (without acceptance cuts) */
-    Double_t GetTotEt() { return fTotEt; }
+    Double_t GetTotEt() const { return fTotEt; }
 
     /** Total Et in the event within the acceptance cuts */
-    Double_t GetTotEtAcc() { return fTotEtAcc; }
+    Double_t GetTotEtAcc() const { return fTotEtAcc; }
 
    /** Total neutral Et in the event (without acceptance cuts) */
-    Double_t GetTotNeutralEt() { return fTotNeutralEt; }
+    Double_t GetTotNeutralEt() const { return fTotNeutralEt; }
 
     /** Total neutral Et in the event within the acceptance cuts */
-    Double_t GetTotNeutralEtAcc() { return fTotNeutralEtAcc; }
+    Double_t GetTotNeutralEtAcc() const { return fTotNeutralEtAcc; }
     
     /** Total charged Et in the event (without acceptance cuts) */
-    Double_t GetTotChargedEt() { return fTotChargedEt; }
+    Double_t GetTotChargedEt() const { return fTotChargedEt; }
 
     /** Total charged Et in the event within the acceptance cuts */
-    Double_t GetTotChargedEtAcc() { return fTotChargedEtAcc; }
+    Double_t GetTotChargedEtAcc() const { return fTotChargedEtAcc; }
 
 
-    void SetHistoList(TList *mylist){histoList = mylist;}
+    void SetHistoList(TList *mylist){fhistoList = mylist;}
 
-    void SetTPCITSTrackCuts(AliESDtrackCuts *cuts){ esdtrackCutsITSTPC = cuts;}
-    void SetTPCOnlyTrackCuts(AliESDtrackCuts *cuts){ esdtrackCutsTPC = cuts;}
-    void SetITSTrackCuts(AliESDtrackCuts *cuts){ esdtrackCutsITS = cuts;}
+    void SetTPCITSTrackCuts(AliESDtrackCuts *cuts){ ffesdtrackCutsITSTPC = cuts;}
+    void SetTPCOnlyTrackCuts(AliESDtrackCuts *cuts){ fesdtrackCutsTPC = cuts;}
+    void SetITSTrackCuts(AliESDtrackCuts *cuts){ fesdtrackCutsITS = cuts;}
 
 protected:
    
-    /** The suffix for the histogram names */
-    TString fHistogramNameSuffix;
+    
+    TString fHistogramNameSuffix; /** The suffix for the histogram names */
 
     /** PDG Database */
-    TDatabasePDG *fPdgDB;
-    Int_t PiPlusCode;
-    Int_t PiMinusCode;
-    Int_t KPlusCode;
-    Int_t KMinusCode;
-    Int_t ProtonCode;
-    Int_t AntiProtonCode;
-    Int_t LambdaCode;
-    Int_t AntiLambdaCode;
-    Int_t K0SCode;
-    Int_t OmegaCode;
-    Int_t AntiOmegaCode;
-    Int_t Xi0Code;
-    Int_t AntiXi0Code;
-    Int_t XiCode;
-    Int_t AntiXiCode;
-    Int_t SigmaCode;
-    Int_t AntiSigmaCode;
-    Int_t K0LCode;
-    Int_t NeutronCode;
-    Int_t AntiNeutronCode;
-    Int_t EPlusCode;
-    Int_t EMinusCode;
-    Float_t PionMass;
-
-    /** Sum of the total Et for all events */
-    Double_t fSumEt;
-
-    /** Sum of the total Et within our acceptance for all events */
-    Double_t fSumEtAcc;
-
-    /** Total Et in the event (without acceptance cuts) */
-    Double_t fTotEt;
-
-    /** Total Et in the event within the acceptance cuts */
-    Double_t fTotEtAcc;
-
-    /** Total neutral Et in the event */
-    Double_t fTotNeutralEt;
+    TDatabasePDG *fPdgDB;//data base used for looking up pdg codes
+    //these codes are stored as variables because otherwise there were issues using this with the plugin
+    Int_t fPiPlusCode;//pdg pi plus code
+    Int_t fPiMinusCode;//pdg pi minus code
+    Int_t fKPlusCode;// pdg k plus code
+    Int_t fKMinusCode;//pdg k minus code
+    Int_t fProtonCode;//pdg proton code
+    Int_t fAntiProtonCode;//pdg antiproton code
+    Int_t fLambdaCode;// pdg lambda code
+    Int_t fAntiLambdaCode;//pdg antilambda code
+    Int_t fK0SCode;//pdg k0 short code
+    Int_t fOmegaCode;//pdg omega code
+    Int_t fAntiOmegaCode;//pdg anti-omega code
+    Int_t fXi0Code;//pdg xi-0 code
+    Int_t fAntiXi0Code;//pdg anti-xi0 code
+    Int_t fXiCode;//pdg xi code
+    Int_t fAntiXiCode;//pdg anti-xi code
+    Int_t fSigmaCode;//pdg sigma code
+    Int_t fAntiSigmaCode;//pdg anti-sigma code
+    Int_t fK0LCode;//pdg k0 long code
+    Int_t fNeutronCode;//pdg neutron code
+    Int_t fAntiNeutronCode;//pdg anti-neutron code
+    Int_t fEPlusCode;//pdg positron code
+    Int_t fEMinusCode;//pdg electron code
+    Float_t fPionMass;//pdg pion mass
 
-    /** Total neutral Et in the event within the acceptance cuts */
-    Double_t fTotNeutralEtAcc;
+    
+    Double_t fSumEt;/** Sum of the total Et for all events */
 
-    /** Total charged Et in the event */
-    Double_t fTotChargedEt;
+    Double_t fSumEtAcc;/** Sum of the total Et within our acceptance for all events */
 
-    /** Total charged Et in the event within the acceptance cuts */
-    Double_t fTotChargedEtAcc;
-
-    /** Multiplicity of particles in the event */
-    Int_t fMultiplicity;
     
-    /** Multiplicity of charged particles in the event */
-    Int_t fChargedMultiplicity;
+    Double_t fTotEt;/** Total Et in the event (without acceptance cuts) */
+    
+    Double_t fTotEtAcc;/** Total Et in the event within the acceptance cuts */
+    
+    Double_t fTotNeutralEt;/** Total neutral Et in the event */
+    
+    Double_t fTotNeutralEtAcc;/** Total neutral Et in the event within the acceptance cuts */
+    
+    Double_t fTotChargedEt;/** Total charged Et in the event */
+    
+    Double_t fTotChargedEtAcc;/** Total charged Et in the event within the acceptance cuts */
+
+    Int_t fMultiplicity;/** Multiplicity of particles in the event */
     
-    /** Multiplicity of neutral particles in the event */
-    Int_t fNeutralMultiplicity; 
+    Int_t fChargedMultiplicity;/** Multiplicity of charged particles in the event */
     
-    /** Cut in eta ( normally |eta| < 0.5 */
-    Double_t fEtaCut;
+    Int_t fNeutralMultiplicity; /** Multiplicity of neutral particles in the event */
+        
+    Double_t fEtaCut;/** Cut in eta ( normally |eta| < 0.5 */
 
-    /** Eta cut for our acceptance */
-    Double_t fEtaCutAcc;
+    Double_t fEtaCutAcc;/** Eta cut for our acceptance */
 
-    /** Vertex cuts */
-    Double_t fVertexXCut;
-    Double_t fVertexYCut;
-    Double_t fVertexZCut;
+    Double_t fVertexXCut;/** Vertex cuts x direction */
+    Double_t fVertexYCut;/** Vertex cuts y direction*/
+    Double_t fVertexZCut;/** Vertex cuts z direction*/
 
-    /** Impact parameter cuts */
-    Double_t fIPxyCut;
-    Double_t fIPzCut;
+    Double_t fIPxyCut;    /** Impact parameter cuts x-y plane*/
+    Double_t fIPzCut;    /** Impact parameter cuts z*/
 
 
     void CreateEtaPtHisto2D(TString name, TString title);
@@ -164,15 +152,15 @@ protected:
     void FillHisto2D(TString histname, Float_t x, Float_t y, Float_t weight);
 
     Float_t Et(TParticle *part, float mass = -1000);
-    AliESDtrackCuts* esdtrackCutsITSTPC;
-    AliESDtrackCuts* esdtrackCutsTPC;
-    AliESDtrackCuts* esdtrackCutsITS;
-
-    TList *histoList;
-    static Float_t etaAxis[47];
-    static Int_t numOfEtaBins;
-    static Float_t ptAxis[117];
-    static Int_t numOfPtBins;
+    AliESDtrackCuts* ffesdtrackCutsITSTPC;//esd track cuts for ITS+TPC tracks
+    AliESDtrackCuts* fesdtrackCutsTPC;//esd track cuts for TPC tracks (which may also contain ITS hits)
+    AliESDtrackCuts* fesdtrackCutsITS;//esd track cuts for ITS stand alone tracks
+
+    TList *fhistoList;//list of histograms saved out to file
+    static Float_t fgEtaAxis[47];//bins for eta axis of histograms
+    static Int_t fgnumOfEtaBins;//number of eta bins
+    static Float_t fgPtAxis[117];//bins for pt axis of histograms
+    static Int_t fgNumOfPtBins;//number of pt bins
     
 
  private:
diff --git a/PWG4/totEt/AliAnalysisHadEtCorrections.cxx b/PWG4/totEt/AliAnalysisHadEtCorrections.cxx
new file mode 100644 (file)
index 0000000..f1b6c2c
--- /dev/null
@@ -0,0 +1,161 @@
+//Create by Christine Nattrass, Rebecca Scott, Irakli Martashvili
+//University of Tennessee at Knoxville
+//This is a container class for the correction factors for the hadronic component of transverse energy
+//It is filled by the output of AliAnalysisTaskHadEt from spinning over Monte Carlo data (using AliAnalysisHadEtMonteCarlo)
+//It is used by AliAnalysisTaskHadEt while spinning over reconstructed data (using AliAnalysisHadEtReconstructed)
+//Please see https://twiki.cern.ch/twiki/bin/view/ALICE/ETCaloAnalysis
+#include "AliAnalysisHadEtCorrections.h"
+#include "TMath.h"
+#include <iostream>
+#include "Rtypes.h"
+
+using namespace std;
+
+ClassImp(AliAnalysisHadEtCorrections);
+
+
+AliAnalysisHadEtCorrections::AliAnalysisHadEtCorrections() : TNamed(),
+  fEtaCut(0)
+  ,fAcceptanceCorrectionFull(0)
+  ,fAcceptanceCorrectionEMCAL(0)
+  ,fAcceptanceCorrectionPHOS(0)
+  ,fNeutralCorrection(0)
+  ,fNotHadronicCorrection(0)
+  ,fpTcutCorrectionTPC(0)
+  ,fpTcutCorrectionITS(0)
+  ,fNeutralCorrectionLow(0)
+  ,fNotHadronicCorrectionLow(0)
+  ,ffpTcutCorrectionTPCLow(0)
+  ,ffpTcutCorrectionITSLow(0)
+  ,fNeutralCorrectionHigh(0)
+  ,fNotHadronicCorrectionHigh(0)
+  ,ffpTcutCorrectionTPCHigh(0)
+  ,ffpTcutCorrectionITSHigh(0)
+  ,fnotIDTPC(0)
+  ,fnotIDITS(0)
+  ,fnotIDNoID(0)
+  ,fEfficiencyPionTPC(0)
+  ,fEfficiencyKaonTPC(0)
+  ,fEfficiencyProtonTPC(0)
+  ,fEfficiencyHadronTPC(0)
+  ,fEfficiencyPionITS(0)
+  ,fEfficiencyKaonITS(0)
+  ,fEfficiencyProtonITS(0)
+  ,fEfficiencyHadronITS(0)
+  ,fBackgroundTPC(0)
+  ,fBackgroundITS(0)
+{//default constructor
+  //This seems to solve a compiler error
+  cout<<"Creating new AliAnalysisHadEtCorrections"<<endl;
+
+}
+AliAnalysisHadEtCorrections::~AliAnalysisHadEtCorrections()
+{//destructor
+  //Clear();
+    delete fnotIDTPC;
+    delete fnotIDITS;
+    delete fnotIDNoID;
+    delete fEfficiencyPionTPC;
+    delete fEfficiencyKaonTPC;
+    delete fEfficiencyProtonTPC;
+    delete fEfficiencyHadronTPC;
+    delete fEfficiencyPionITS;
+    delete fEfficiencyKaonITS;
+    delete fEfficiencyProtonITS;
+    delete fEfficiencyHadronITS;
+    delete fBackgroundTPC;
+    delete fBackgroundITS;
+//     fnotIDTPC->Clear();
+//     fnotIDITS->Clear();
+//     fnotIDNoID->Clear();
+//     fEfficiencyPionTPC->Clear();
+//     fEfficiencyKaonTPC->Clear();
+//     fEfficiencyProtonTPC->Clear();
+//     fEfficiencyHadronTPC->Clear();
+//     fEfficiencyPionITS->Clear();
+//     fEfficiencyKaonITS->Clear();
+//     fEfficiencyProtonITS->Clear();
+//     fEfficiencyHadronITS->Clear();
+//     fBackgroundTPC->Clear();
+//     fBackgroundITS->Clear();
+}
+AliAnalysisHadEtCorrections::AliAnalysisHadEtCorrections(const AliAnalysisHadEtCorrections *g): TNamed(),
+  fEtaCut(g->fEtaCut)
+  ,fAcceptanceCorrectionFull(g->fAcceptanceCorrectionFull)
+  ,fAcceptanceCorrectionEMCAL(g->fAcceptanceCorrectionEMCAL)
+  ,fAcceptanceCorrectionPHOS(g->fAcceptanceCorrectionPHOS)
+  ,fNeutralCorrection(g->fNeutralCorrection)
+  ,fNotHadronicCorrection(g->fNotHadronicCorrection)
+  ,fpTcutCorrectionTPC(g->fpTcutCorrectionTPC)
+  ,fpTcutCorrectionITS(g->fpTcutCorrectionITS)
+  ,fNeutralCorrectionLow(g->fNeutralCorrectionLow)
+  ,fNotHadronicCorrectionLow(g->fNotHadronicCorrectionLow)
+  ,ffpTcutCorrectionTPCLow(g->ffpTcutCorrectionTPCLow)
+  ,ffpTcutCorrectionITSLow(g->ffpTcutCorrectionITSLow)
+  ,fNeutralCorrectionHigh(g->fNeutralCorrectionHigh)
+  ,fNotHadronicCorrectionHigh(g->fNotHadronicCorrectionHigh)
+  ,ffpTcutCorrectionTPCHigh(g->ffpTcutCorrectionTPCHigh)
+  ,ffpTcutCorrectionITSHigh(g->ffpTcutCorrectionITSHigh)
+  ,fnotIDTPC(0)
+  ,fnotIDITS(0)
+  ,fnotIDNoID(0)
+  ,fEfficiencyPionTPC(0)
+  ,fEfficiencyKaonTPC(0)
+  ,fEfficiencyProtonTPC(0)
+  ,fEfficiencyHadronTPC(0)
+  ,fEfficiencyPionITS(0)
+  ,fEfficiencyKaonITS(0)
+  ,fEfficiencyProtonITS(0)
+  ,fEfficiencyHadronITS(0)
+  ,fBackgroundTPC(0)
+  ,fBackgroundITS(0)
+{//copy constructor
+  //SetName(g->GetName());
+  fnotIDTPC = new TH1D(*(g->fnotIDTPC));
+  fnotIDITS = new TH1D(*(g->fnotIDITS));
+  fnotIDNoID = new TH1D(*(g->fnotIDNoID));
+  fEfficiencyPionTPC = new TH1D(*(g->fEfficiencyPionTPC));
+  fEfficiencyKaonTPC = new TH1D(*(g->fEfficiencyKaonTPC));
+  fEfficiencyProtonTPC = new TH1D(*(g->fEfficiencyProtonTPC));
+  fEfficiencyHadronTPC = new TH1D(*(g->fEfficiencyHadronTPC));
+  fEfficiencyPionITS = new TH1D(*(g->fEfficiencyPionITS));
+  fEfficiencyKaonITS = new TH1D(*(g->fEfficiencyKaonITS));
+  fEfficiencyProtonITS = new TH1D(*(g->fEfficiencyProtonITS));
+  fEfficiencyHadronITS = new TH1D(*(g->fEfficiencyHadronITS));
+  fBackgroundTPC = new TH1D(*(g->fBackgroundTPC));
+  fBackgroundITS = new TH1D(*(g->fBackgroundITS));
+}
+
+// AliAnalysisHadEtCorrections & operator = (const AliAnalysisHadEtCorrections & g) {
+
+//   fEtaCut=g->fEtaCut;
+//   fAcceptanceCorrectionFull=g->fAcceptanceCorrectionFull;
+//   fAcceptanceCorrectionEMCAL=g->fAcceptanceCorrectionEMCAL;
+//   fAcceptanceCorrectionPHOS=g->fAcceptanceCorrectionPHOS;
+//   fNeutralCorrection=g->fNeutralCorrection;
+//   fNotHadronicCorrection=g->fNotHadronicCorrection;
+//   fpTcutCorrectionTPC=g->fpTcutCorrectionTPC;
+//   fpTcutCorrectionITS=g->fpTcutCorrectionITS;
+//   fNeutralCorrectionLow=g->fNeutralCorrectionLow;
+//   fNotHadronicCorrectionLow=g->fNotHadronicCorrectionLow;
+//   ffpTcutCorrectionTPCLow=g->ffpTcutCorrectionTPCLow;
+//   ffpTcutCorrectionITSLow=g->ffpTcutCorrectionITSLow;
+//   fNeutralCorrectionHigh=g->fNeutralCorrectionHigh;
+//   fNotHadronicCorrectionHigh=g->fNotHadronicCorrectionHigh;
+//   ffpTcutCorrectionTPCHigh=g->ffpTcutCorrectionTPCHigh;
+//   ffpTcutCorrectionITSHigh=g->ffpTcutCorrectionITSHigh;
+
+//   fnotIDTPC = g->fnotIDTPC;
+//   fnotIDITS = g->fnotIDITS;
+//   fnotIDNoID = g->fnotIDNoID;
+//   fEfficiencyPionTPC = g->fEfficiencyPionTPC;
+//   fEfficiencyKaonTPC = g->fEfficiencyKaonTPC;
+//   fEfficiencyProtonTPC = g->fEfficiencyProtonTPC;
+//   fEfficiencyHadronTPC = g->fEfficiencyHadronTPC;
+//   fEfficiencyPionITS = g->fEfficiencyPionITS;
+//   fEfficiencyKaonITS = g->fEfficiencyKaonITS;
+//   fEfficiencyProtonITS = g->fEfficiencyProtonITS;
+//   fEfficiencyHadronITS = g->fEfficiencyHadronITS;
+//   fBackgroundTPC = g->fBackgroundTPC;
+//   fBackgroundITS = g->fBackgroundITS;
+// }
diff --git a/PWG4/totEt/AliAnalysisHadEtCorrections.h b/PWG4/totEt/AliAnalysisHadEtCorrections.h
new file mode 100644 (file)
index 0000000..91fe8f3
--- /dev/null
@@ -0,0 +1,149 @@
+//Create by Christine Nattrass, Rebecca Scott, Irakli Martashvili
+//University of Tennessee at Knoxville
+//This is a container class for the correction factors for the hadronic component of transverse energy
+//It is filled by the output of AliAnalysisTaskHadEt from spinning over Monte Carlo data (using AliAnalysisHadEtMonteCarlo)
+//It is used by AliAnalysisTaskHadEt while spinning over reconstructed data (using AliAnalysisHadEtReconstructed)
+//Please see https://twiki.cern.ch/twiki/bin/view/ALICE/ETCaloAnalysis
+#ifndef ALIANALYSISHADETCORRECTIONS_H
+#define ALIANALYSISHADETCORRECTIONS_H
+
+#include "Rtypes.h"
+#include "TString.h"
+#include "TNamed.h"
+#include "TH1D.h"
+
+class AliAnalysisHadEtCorrections : public TNamed
+{
+public:
+   
+  AliAnalysisHadEtCorrections();
+    virtual ~AliAnalysisHadEtCorrections();
+
+    Float_t GetEtaCut() const {return fEtaCut;}
+    Float_t GetAcceptanceCorrectionFull() const {return fAcceptanceCorrectionFull;}
+    Float_t GetAcceptanceCorrectionEMCAL() const {return fAcceptanceCorrectionEMCAL;}
+    Float_t GetAcceptanceCorrectionPHOS() const {return fAcceptanceCorrectionPHOS;}
+    Float_t GetNeutralCorrection() const {return fNeutralCorrection;}
+    Float_t GetNotHadronicCorrection() const {return fNotHadronicCorrection;}
+    Float_t GetpTCutCorrectionTPC() const {return fpTcutCorrectionTPC;}
+    Float_t GetpTCutCorrectionITS() const {return fpTcutCorrectionITS;}
+    Float_t GetNeutralCorrectionLowBound() const {return fNeutralCorrectionLow;}
+    Float_t GetNotHadronicCorrectionLowBound() const {return fNotHadronicCorrectionLow;}
+    Float_t GetpTCutCorrectionTPCLowBound() const {return ffpTcutCorrectionTPCLow;}
+    Float_t GetpTCutCorrectionITSLowBound() const {return ffpTcutCorrectionITSLow;}
+    Float_t GetNeutralCorrectionHighBound() const {return fNeutralCorrectionHigh;}
+    Float_t GetNotHadronicCorrectionHighBound() const {return fNotHadronicCorrectionHigh;}
+    Float_t GetpTCutCorrectionTPCHighBound() const {return ffpTcutCorrectionTPCHigh;}
+    Float_t GetpTCutCorrectionITSHighBound() const {return ffpTcutCorrectionITSHigh;}
+    TH1D *GetNotIDCorrectionTPC() const {return fnotIDTPC;}
+    TH1D *GetNotIDCorrectionITS() const {return fnotIDITS;}
+    TH1D *GetNotIDCorrectionNoPID() const {return fnotIDNoID;}
+    TH1D *GetEfficiencyPionTPC() const {return fEfficiencyPionTPC;}
+    TH1D *GetEfficiencyKaonTPC() const {return fEfficiencyKaonTPC;}
+    TH1D *GetEfficiencyProtonTPC() const {return fEfficiencyProtonTPC;}
+    TH1D *GetEfficiencyHadronTPC() const {return fEfficiencyHadronTPC;}
+    TH1D *GetEfficiencyPionITS() const {return fEfficiencyPionITS;}
+    TH1D *GetEfficiencyKaonITS() const {return fEfficiencyKaonITS;}
+    TH1D *GetEfficiencyProtonITS() const {return fEfficiencyProtonITS;}
+    TH1D *GetEfficiencyHadronITS() const {return fEfficiencyHadronITS;}
+    TH1D *GetBackgroundCorrectionTPC() const {return fBackgroundTPC;}
+    TH1D *GetBackgroundCorrectionITS() const {return fBackgroundITS;}
+
+    //This is stored as the inverse of the correction
+    Float_t GetNotIDCorrectionTPC(float pT){return 1.0/(fnotIDTPC->GetBinContent(fnotIDTPC->FindBin(pT)));}
+    Float_t GetNotIDCorrectionITS(float pT){return 1.0/(fnotIDITS->GetBinContent(fnotIDITS->FindBin(pT)));}
+    Float_t GetNotIDCorrectionNoPID(float pT){return 1.0/(fnotIDNoID->GetBinContent(fnotIDNoID->FindBin(pT)));}
+    //As is this...
+    Float_t GetTPCEfficiencyCorrectionPion(float pT){return 1.0/(fEfficiencyPionTPC->GetBinContent(fEfficiencyPionTPC->FindBin(pT)));}
+    Float_t GetTPCEfficiencyCorrectionKaon(float pT){return 1.0/(fEfficiencyKaonTPC->GetBinContent(fEfficiencyKaonTPC->FindBin(pT)));}
+    Float_t GetTPCEfficiencyCorrectionProton(float pT){return 1.0/(fEfficiencyProtonTPC->GetBinContent(fEfficiencyProtonTPC->FindBin(pT)));}
+    Float_t GetTPCEfficiencyCorrectionHadron(float pT){return 1.0/(fEfficiencyHadronTPC->GetBinContent(fEfficiencyHadronTPC->FindBin(pT)));}
+    Float_t GetITSEfficiencyCorrectionPion(float pT){return 1.0/(fEfficiencyPionITS->GetBinContent(fEfficiencyPionITS->FindBin(pT)));}
+    Float_t GetITSEfficiencyCorrectionKaon(float pT){return 1.0/(fEfficiencyKaonITS->GetBinContent(fEfficiencyKaonITS->FindBin(pT)));}
+    Float_t GetITSEfficiencyCorrectionProton(float pT){return 1.0/(fEfficiencyProtonITS->GetBinContent(fEfficiencyProtonITS->FindBin(pT)));}
+    Float_t GetITSEfficiencyCorrectionHadron(float pT){return 1.0/(fEfficiencyHadronITS->GetBinContent(fEfficiencyHadronITS->FindBin(pT)));}
+    //...and these guys are too
+    Float_t GetBackgroundCorrectionTPC(float pT){return 1.0/(fBackgroundTPC->GetBinContent(fBackgroundTPC->FindBin(pT)));}
+    Float_t GetBackgroundCorrectionITS(float pT){return 1.0/(fBackgroundITS->GetBinContent(fBackgroundITS->FindBin(pT)));}
+
+
+    void SetEtaCut(Float_t val){fEtaCut=val;}
+    void SetAcceptanceCorrectionFull(Float_t val){fAcceptanceCorrectionFull=val;}
+    void SetAcceptanceCorrectionEMCAL(Float_t val){fAcceptanceCorrectionEMCAL=val;}
+    void SetAcceptanceCorrectionPHOS(Float_t val){fAcceptanceCorrectionPHOS=val;}
+    void SetNeutralCorrection(Float_t val){fNeutralCorrection=val;}
+    void SetNotHadronicCorrection(Float_t val){fNotHadronicCorrection=val;}
+    void SetpTCutCorrectionTPC(Float_t val){fpTcutCorrectionTPC=val;}
+    void SetpTCutCorrectionITS(Float_t val){fpTcutCorrectionITS=val;}
+    void SetNeutralCorrectionLowBound(Float_t val){fNeutralCorrectionLow=val;}
+    void SetNotHadronicCorrectionLowBound(Float_t val){fNotHadronicCorrectionLow=val;}
+    void SetpTCutCorrectionTPCLowBound(Float_t val){ffpTcutCorrectionTPCLow=val;}
+    void SetpTCutCorrectionITSLowBound(Float_t val){ffpTcutCorrectionITSLow=val;}
+    void SetNeutralCorrectionHighBound(Float_t val){fNeutralCorrectionHigh=val;}
+    void SetNotHadronicCorrectionHighBound(Float_t val){fNotHadronicCorrectionHigh=val;}
+    void SetpTCutCorrectionTPCHighBound(Float_t val){ffpTcutCorrectionTPCHigh=val;}
+    void SetpTCutCorrectionITSHighBound(Float_t val){ffpTcutCorrectionITSHigh=val;}
+    void SetNotIDCorrectionTPC(TH1D *histo){fnotIDTPC=histo;}
+    void SetNotIDCorrectionITS(TH1D *histo){fnotIDITS=histo;}
+    void SetNotIDCorrectionNoPID(TH1D *histo){fnotIDNoID=histo;}
+    void SetEfficiencyPionTPC(TH1D *histo){fEfficiencyPionTPC=histo;}
+    void SetEfficiencyKaonTPC(TH1D *histo){fEfficiencyKaonTPC=histo;}
+    void SetEfficiencyProtonTPC(TH1D *histo){fEfficiencyProtonTPC=histo;}
+    void SetEfficiencyHadronTPC(TH1D *histo){fEfficiencyHadronTPC=histo;}
+    void SetEfficiencyPionITS(TH1D *histo){fEfficiencyPionITS=histo;}
+    void SetEfficiencyKaonITS(TH1D *histo){fEfficiencyKaonITS=histo;}
+    void SetEfficiencyProtonITS(TH1D *histo){fEfficiencyProtonITS=histo;}
+    void SetEfficiencyHadronITS(TH1D *histo){fEfficiencyHadronITS=histo;}
+    void SetBackgroundCorrectionTPC(TH1D *histo){fBackgroundTPC=histo;}
+    void SetBackgroundCorrectionITS(TH1D *histo){fBackgroundITS=histo;}
+
+
+    AliAnalysisHadEtCorrections(const AliAnalysisHadEtCorrections *g) ; // cpy ctor
+    //AliAnalysisHadEtCorrections & operator = (const AliAnalysisHadEtCorrections & g) ;//cpy assignment
+
+protected:
+
+    Float_t fEtaCut;//the eta cut used for this analysis
+    Float_t fAcceptanceCorrectionFull;//the acceptance correction for full azimuthal acceptance
+    Float_t fAcceptanceCorrectionEMCAL;//the acceptance correction for the EMCal azimuthal acceptance
+    Float_t fAcceptanceCorrectionPHOS;//the acceptance correction for the PHOS azimuthal acceptance
+    //Systematic errors - low value, mean value, high value
+    Float_t fNeutralCorrection;//the correction for the fraction of energy from neutral particles (for using both the calorimeters and the tracking detectors)
+    Float_t fNotHadronicCorrection;//the correction for the fraction of energy which is not measured by the tracking detectors 
+    Float_t fpTcutCorrectionTPC;//the correction for the momentum cut for the tpc (150 MeV/c)
+    Float_t fpTcutCorrectionITS;//the correction for the momentum cut for the ITS (100 MeV/c)
+    Float_t fNeutralCorrectionLow;//the low bound on the neutral energy fraction correction
+    Float_t fNotHadronicCorrectionLow;//the low bound on the hadronic energy fraction correction
+    Float_t ffpTcutCorrectionTPCLow;//the low bound on the TPC momentum cut correction
+    Float_t ffpTcutCorrectionITSLow;//the low bound on the ITS momentum cut correction
+    Float_t fNeutralCorrectionHigh;//the high bound on the neutral energy correcton
+    Float_t fNotHadronicCorrectionHigh;//the high bound on the hadronic energy correction
+    Float_t ffpTcutCorrectionTPCHigh;//the high bound on the TPC momentum cut correction
+    Float_t ffpTcutCorrectionITSHigh;//the high bound on the ITS momentum cut correction
+
+    //Histograms with the pT dependent corrections
+    TH1D *fnotIDTPC;//correction for unidentified tracks in the TPC
+    TH1D *fnotIDITS;//correction for unidentified tracks in the ITS
+    TH1D *fnotIDNoID;//correction for unidentified tracks assuming no ID
+    TH1D *fEfficiencyPionTPC;//efficiency correction for pions in the TPC
+    TH1D *fEfficiencyKaonTPC;//efficiency correction for kaons in the TPC
+    TH1D *fEfficiencyProtonTPC;//efficiency correction for protons in the TPC
+    TH1D *fEfficiencyHadronTPC;//efficiency correction for unidentified hadrons in the TPC
+    TH1D *fEfficiencyPionITS;//efficiency correction for pions in the ITS
+    TH1D *fEfficiencyKaonITS;//efficiency correction for kaons in the ITS
+    TH1D *fEfficiencyProtonITS;//efficiency correction for protons in the ITS
+    TH1D *fEfficiencyHadronITS;//efficiency correction for unidentified hadrons in the ITS
+    TH1D *fBackgroundTPC;//background correction for the TPC
+    TH1D *fBackgroundITS;//background correction for the ITS
+
+
+
+private:
+  //Declare it private to avoid compilation warning
+    AliAnalysisHadEtCorrections & operator = (const AliAnalysisHadEtCorrections & g) ;//cpy assignment
+    AliAnalysisHadEtCorrections(const AliAnalysisHadEtCorrections & g) ; // cpy ctor
+
+    ClassDef(AliAnalysisHadEtCorrections, 1);
+};
+
+#endif // ALIANALYSISHADETCORRECTIONS_H
index cbe871c..8c0a08a 100644 (file)
@@ -41,7 +41,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
 
   
 
-  //esdtrackCutsITSTPC->SetEtaRange(-0.8,0.8); // normally, |eta|<0.8
+  //ffesdtrackCutsITSTPC->SetEtaRange(-0.8,0.8); // normally, |eta|<0.8
   //=============================================
 
   //Roughly following $ALICE_ROOT/PWG0/dNdEta/AlidNdEtaCorrectionTask
@@ -56,15 +56,15 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
     switch(cutset){
     case 0:
       CutName = TPC;
-      list = esdtrackCutsTPC->GetAcceptedTracks(realEvent);
+      list = fesdtrackCutsTPC->GetAcceptedTracks(realEvent);
       break;
     case 1:
       CutName = ITS;
-      list = esdtrackCutsITS->GetAcceptedTracks(realEvent);
+      list = fesdtrackCutsITS->GetAcceptedTracks(realEvent);
       break;
     case 2:
       CutName = TPCITS;
-      list = esdtrackCutsITSTPC->GetAcceptedTracks(realEvent);
+      list = ffesdtrackCutsITSTPC->GetAcceptedTracks(realEvent);
       break;
     default:
       cerr<<"Error:  cannot fill histograms!"<<endl;
@@ -126,21 +126,21 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
 
                Int_t pdgCode =  simPart->GetPDG(0)->PdgCode();
                Int_t mypid = 0;
-               if(pdgCode==PiPlusCode) mypid = 1;
-               if(pdgCode==ProtonCode) mypid = 2;
-               if(pdgCode==KPlusCode) mypid = 3;
-               if(pdgCode==EPlusCode) mypid = 4;
-               if(pdgCode==PiMinusCode) mypid = 1;
-               if(pdgCode==AntiProtonCode) mypid = 2;
-               if(pdgCode==KMinusCode) mypid = 3;
-               if(pdgCode==EMinusCode) mypid = 4;
+               if(pdgCode==fPiPlusCode) mypid = 1;
+               if(pdgCode==fProtonCode) mypid = 2;
+               if(pdgCode==fKPlusCode) mypid = 3;
+               if(pdgCode==fEPlusCode) mypid = 4;
+               if(pdgCode==fPiMinusCode) mypid = 1;
+               if(pdgCode==fAntiProtonCode) mypid = 2;
+               if(pdgCode==fKMinusCode) mypid = 3;
+               if(pdgCode==fEMinusCode) mypid = 4;
                //cout<<pdgCode->PdgCode()<<" ";
                //fPdgDB->GetSimParticle("pi+")->PdgCode();
                bool filled = false;      
                //============Charged hadrons===================================
                //identified...
                if(IsPion){
-                 if(pdgCode!=PiPlusCode && pdgCode!=PiMinusCode){
+                 if(pdgCode!=fPiPlusCode && pdgCode!=fPiMinusCode){
                    FillHisto2D(Form("MisidentifiedPIDs%s",CutName->Data()),1,mypid,1);
                    //if(mypid==0)cerr<<"I was misidentified! I'm not a pion! I am a "<<simPart->GetName()<<endl;
                  }
@@ -150,7 +150,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
                  FillHisto2D(Form("dEdxPion%s",CutName->Data()),track->P(),dEdx,1.0);
                }
                if(IsProton){
-                 if(pdgCode!=ProtonCode && pdgCode!=AntiProtonCode){
+                 if(pdgCode!=fProtonCode && pdgCode!=fAntiProtonCode){
                    FillHisto2D(Form("MisidentifiedPIDs%s",CutName->Data()),2,mypid,1);
                    // if(mypid==0)cerr<<"I was misidentified!  I'm not a proton! I am a "<<simPart->GetName()<<endl;
                  }
@@ -160,7 +160,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
                  FillHisto2D(Form("dEdxProton%s",CutName->Data()),track->P(),dEdx,1.0);
                }
                if(IsKaon){
-                 if(pdgCode!=KMinusCode && pdgCode!=KPlusCode){
+                 if(pdgCode!=fKMinusCode && pdgCode!=fKPlusCode){
                    FillHisto2D(Form("MisidentifiedPIDs%s",CutName->Data()),3,mypid,1);
                    //if(mypid==0)cerr<<"I was misidentified!  I'm not a kaon! I am a "<<simPart->GetName()<<" p "<<track->P()<<" nSigmaProton "<<nSigmaProton<<" nSigmaPion "<<nSigmaPion<<" nSigmaKaon "<<nSigmaKaon<<endl;
                  }
@@ -170,7 +170,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
                  FillHisto2D(Form("dEdxKaon%s",CutName->Data()),track->P(),dEdx,1.0);
                }
                if(IsElectron){
-                 if(pdgCode!=EMinusCode && pdgCode!=EPlusCode){
+                 if(pdgCode!=fEMinusCode && pdgCode!=fEPlusCode){
                    FillHisto2D(Form("MisidentifiedPIDs%s",CutName->Data()),4,mypid,1);
                    //cerr<<"I was misidentified!  I'm not an electron! I am a "<<simPart->GetName()<<endl;
                  }
@@ -180,8 +180,8 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
                  FillHisto2D(Form("dEdxElectron%s",CutName->Data()),track->P(),dEdx,1.0);
                }
                if(Unidentified){
-                 if(pdgCode!=EMinusCode && pdgCode!=EPlusCode){
-                   float myEtPi = Et(simPart,PionMass);
+                 if(pdgCode!=fEMinusCode && pdgCode!=fEPlusCode){
+                   float myEtPi = Et(simPart,fPionMass);
                    float myEt = Et(simPart);
                    FillHisto2D(Form("EtReconstructed%sUnidentifiedAssumingPion",CutName->Data()),track->Pt(),track->Eta(),myEtPi);
                    FillHisto2D(Form("EtReconstructed%sUnidentified",CutName->Data()),track->Pt(),track->Eta(),myEt);
@@ -193,7 +193,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
                  FillHisto1D(Form("UnidentifiedPIDs%s",CutName->Data()),mypid,1);
                }
                //...simulated
-               if(pdgCode == PiPlusCode){
+               if(pdgCode == fPiPlusCode){
                  //cout<<"I'm a real primary "<<simPart->GetName()<<"! "<<"my label is "<<simPart->GetFirstMother()<<" track no "<<iTrack<<"/"<<realEvent->GetNumberOfTracks()<<endl;//<<" "<<label<<" "<<pdgCode<<endl;
                
                  float myEt = Et(simPart);
@@ -204,7 +204,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
                  FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
                  filled = true;
                }
-               if(pdgCode == PiMinusCode){
+               if(pdgCode == fPiMinusCode){
                  float myEt = Et(simPart);
                  FillHisto2D(Form("EtReconstructed%sPiMinus",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
                  FillHisto2D(Form("EtReconstructed%sChargedHadron",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
@@ -213,9 +213,9 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
                  FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
                  filled = true;
                }
-               if(pdgCode == KPlusCode){
+               if(pdgCode == fKPlusCode){
                  float myEt = Et(simPart);
-                 float myEtPi = Et(simPart,PionMass);
+                 float myEtPi = Et(simPart,fPionMass);
                  FillHisto2D(Form("EtReconstructed%sKPlus",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
                  FillHisto2D(Form("EtReconstructed%sChargedHadron",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
                  FillHisto2D(Form("EtNReconstructed%sKPlus",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
@@ -224,9 +224,9 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
                  FillHisto2D(Form("EtReconstructed%sKPlusAssumingPion",CutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
                  filled = true;
                }
-               if(pdgCode == KMinusCode){
+               if(pdgCode == fKMinusCode){
                  float myEt = Et(simPart);
-                 float myEtPi = Et(simPart,PionMass);
+                 float myEtPi = Et(simPart,fPionMass);
                  FillHisto2D(Form("EtReconstructed%sKMinus",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
                  FillHisto2D(Form("EtReconstructed%sChargedHadron",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
                  FillHisto2D(Form("EtNReconstructed%sKMinus",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
@@ -235,9 +235,9 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
                  FillHisto2D(Form("EtReconstructed%sKMinusAssumingPion",CutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
                  filled = true;
                }
-               if(pdgCode == ProtonCode){
+               if(pdgCode == fProtonCode){
                  float myEt = Et(simPart);
-                 float myEtPi = Et(simPart,PionMass);
+                 float myEtPi = Et(simPart,fPionMass);
                  FillHisto2D(Form("EtReconstructed%sProton",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
                  FillHisto2D(Form("EtReconstructed%sChargedHadron",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
                  FillHisto2D(Form("EtNReconstructed%sProton",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
@@ -246,9 +246,9 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
                  FillHisto2D(Form("EtReconstructed%sProtonAssumingPion",CutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
                  filled = true;
                }
-               if(pdgCode == AntiProtonCode){
+               if(pdgCode == fAntiProtonCode){
                  float myEt = Et(simPart);
-                 float myEtPi = Et(simPart,PionMass);
+                 float myEtPi = Et(simPart,fPionMass);
                  FillHisto2D(Form("EtReconstructed%sAntiProton",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
                  FillHisto2D(Form("EtReconstructed%sChargedHadron",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
                  FillHisto2D(Form("EtNReconstructed%sAntiProton",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
@@ -257,18 +257,18 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
                  FillHisto2D(Form("EtReconstructed%sAntiProtonAssumingPion",CutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
                  filled = true;
                }
-               if(pdgCode == EPlusCode){
+               if(pdgCode == fEPlusCode){
                  float myEt = Et(simPart);
                  FillHisto2D(Form("EtReconstructed%sEPlus",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
                  if(!IsElectron || Unidentified){
-                   float myEtPi = Et(simPart,PionMass);
+                   float myEtPi = Et(simPart,fPionMass);
                    FillHisto2D(Form("EtReconstructed%sMisidentifiedElectrons",CutName->Data()),track->Pt(),track->Eta(),myEtPi);
                  }
                  filled = true;
                }
-               if(pdgCode == EMinusCode){
+               if(pdgCode == fEMinusCode){
                  if(!IsElectron || Unidentified){
-                   float myEtPi = Et(simPart,PionMass);
+                   float myEtPi = Et(simPart,fPionMass);
                    FillHisto2D(Form("EtReconstructed%sMisidentifiedElectrons",CutName->Data()),track->Pt(),track->Eta(),myEtPi);
                  }
                  float myEt = Et(simPart);
@@ -291,31 +291,31 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
                TParticlePDG *pc = mom->GetPDG(0);
                if(pc){
                  Int_t pdgCode =  mom->GetPDG(0)->PdgCode();
-                 if(pdgCode == LambdaCode){
+                 if(pdgCode == fLambdaCode){
                    float myEt = Et(simPart);
                    FillHisto2D(Form("EtReconstructed%sLambdaDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
                  }
-                 if(pdgCode == AntiLambdaCode){
+                 if(pdgCode == fAntiLambdaCode){
                    float myEt = Et(simPart);
                    FillHisto2D(Form("EtReconstructed%sAntiLambdaDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
                  }
-                 if(pdgCode == K0SCode){
+                 if(pdgCode == fK0SCode){
                    float myEt = Et(simPart);
                    FillHisto2D(Form("EtReconstructed%sK0SDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
                  }
-                 if(pdgCode == XiCode){
+                 if(pdgCode == fXiCode){
                    float myEt = Et(simPart);
                    FillHisto2D(Form("EtReconstructed%sXiDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
                  }
-                 if(pdgCode == AntiXiCode){
+                 if(pdgCode == fAntiXiCode){
                    float myEt = Et(simPart);
                    FillHisto2D(Form("EtReconstructed%sAntiXiDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
                  }
-                 if(pdgCode == OmegaCode){
+                 if(pdgCode == fOmegaCode){
                    float myEt = Et(simPart);
                    FillHisto2D(Form("EtReconstructed%sOmegaDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
                  }
-                 if(pdgCode == XiCode){
+                 if(pdgCode == fXiCode){
                    float myEt = Et(simPart);
                    FillHisto2D(Form("EtReconstructed%sAntiOmegaDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
                  }
@@ -324,23 +324,23 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
                    TParticle *grandma = stack->Particle(mom->GetFirstMother());
                    if(grandma){
                      Int_t pdgCodeMom =  mom->GetPDG(0)->PdgCode();
-                     if(pdgCodeMom==PiPlusCode || pdgCodeMom==PiMinusCode || pdgCodeMom==ProtonCode ||pdgCodeMom==AntiProtonCode || pdgCodeMom==KPlusCode || pdgCode==KMinusCode){
+                     if(pdgCodeMom==fPiPlusCode || pdgCodeMom==fPiMinusCode || pdgCodeMom==fProtonCode ||pdgCodeMom==fAntiProtonCode || pdgCodeMom==fKPlusCode || pdgCode==fKMinusCode){
                        //cout<<" my grandmother is "<<grandma->GetName()<<" "<<endl;
                        Int_t pdgCodeGrandma =  grandma->GetPDG(0)->PdgCode();
                      
-                       if(pdgCodeGrandma == XiCode){
+                       if(pdgCodeGrandma == fXiCode){
                          float myEt = Et(simPart);
                          FillHisto2D(Form("EtReconstructed%sXiDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
                        }
-                       if(pdgCodeGrandma == AntiXiCode){
+                       if(pdgCodeGrandma == fAntiXiCode){
                          float myEt = Et(simPart);
                          FillHisto2D(Form("EtReconstructed%sAntiXiDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
                        }
-                       if(pdgCodeGrandma == OmegaCode){
+                       if(pdgCodeGrandma == fOmegaCode){
                          float myEt = Et(simPart);
                          FillHisto2D(Form("EtReconstructed%sOmegaDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
                        }
-                       if(pdgCodeGrandma == XiCode){
+                       if(pdgCodeGrandma == fXiCode){
                          float myEt = Et(simPart);
                          FillHisto2D(Form("EtReconstructed%sAntiOmegaDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
                        }
@@ -403,7 +403,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
            //fPdgDB->GetParticle("pi+")->PdgCode();
            bool filled = false;
            //============Charged hadrons===================================
-           if(pdgCode == PiPlusCode){
+           if(pdgCode == fPiPlusCode){
              //cout<<"I'm a simulated primary "<<part->GetName()<<"! "<<"my label is "<<part->GetFirstMother()<<" pt "<<part->Pt()<<endl;
              float myEt = Et(part);
              FillHisto2D("EtSimulatedPiPlus",part->Pt(),part->Eta(),myEt);
@@ -414,7 +414,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
              filled = true;
            }
-           if(pdgCode == PiMinusCode){
+           if(pdgCode == fPiMinusCode){
              float myEt = Et(part);
              FillHisto2D("EtSimulatedPiMinus",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtNSimulatedPiMinus",part->Pt(),part->Eta(),1.0);
@@ -424,9 +424,9 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
              filled = true;
            }
-           if(pdgCode == KPlusCode){
+           if(pdgCode == fKPlusCode){
              float myEt = Et(part);
-             float myEtPi = Et(part,PionMass);
+             float myEtPi = Et(part,fPionMass);
              FillHisto2D("EtSimulatedKPlus",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtNSimulatedKPlus",part->Pt(),part->Eta(),1.0);
              FillHisto2D("EtSimulatedChargedHadron",part->Pt(),part->Eta(),myEt);
@@ -436,9 +436,9 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
              filled = true;
            }
-           if(pdgCode == KMinusCode){
+           if(pdgCode == fKMinusCode){
              float myEt = Et(part);
-             float myEtPi = Et(part,PionMass);
+             float myEtPi = Et(part,fPionMass);
              FillHisto2D("EtSimulatedKMinus",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtNSimulatedKMinus",part->Pt(),part->Eta(),1.0);
              FillHisto2D("EtSimulatedChargedHadron",part->Pt(),part->Eta(),myEt);
@@ -448,9 +448,9 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
              filled = true;
            }
-           if(pdgCode == ProtonCode){
+           if(pdgCode == fProtonCode){
              float myEt = Et(part);
-             float myEtPi = Et(part,PionMass);
+             float myEtPi = Et(part,fPionMass);
              FillHisto2D("EtSimulatedProton",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtNSimulatedProton",part->Pt(),part->Eta(),1.0);
              FillHisto2D("EtSimulatedChargedHadron",part->Pt(),part->Eta(),myEt);
@@ -460,9 +460,9 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
              filled = true;
            }
-           if(pdgCode == AntiProtonCode){
+           if(pdgCode == fAntiProtonCode){
              float myEt = Et(part);
-             float myEtPi = Et(part,PionMass);
+             float myEtPi = Et(part,fPionMass);
              FillHisto2D("EtSimulatedAntiProton",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtNSimulatedAntiProton",part->Pt(),part->Eta(),1.0);
              FillHisto2D("EtSimulatedChargedHadron",part->Pt(),part->Eta(),myEt);
@@ -474,19 +474,19 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
            }
            //============Other hadrons===================================
 
-           if(pdgCode == NeutronCode){
+           if(pdgCode == fNeutronCode){
              float myEt = Et(part);
              FillHisto2D("EtSimulatedNeutron",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
              filled = true;
            }
-           if(pdgCode == AntiNeutronCode){
+           if(pdgCode == fAntiNeutronCode){
              float myEt = Et(part);
              FillHisto2D("EtSimulatedAntiNeutron",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
              filled = true;
            }
-           if(pdgCode == LambdaCode){
+           if(pdgCode == fLambdaCode){
              float myEt = Et(part);
              //cout<<"I am a simulated lambda! pt "<<part->Pt()<<" eta "<<part->Eta()<<endl;
              FillHisto2D("EtSimulatedLambda",part->Pt(),part->Eta(),myEt);
@@ -499,7 +499,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
                if(daughter){
                  if(daughter->GetPDG(0)){
                    Int_t daughtercode = daughter->GetPDG(0)->PdgCode();
-                   if(daughtercode==PiMinusCode || daughtercode==ProtonCode){
+                   if(daughtercode==fPiMinusCode || daughtercode==fProtonCode){
                      myEt = Et(daughter);
                      FillHisto2D("EtSimulatedLambdaDaughters",daughter->Pt(),daughter->Eta(),myEt);
                      //cout<<"Lambda daughter is a "<<daughter->GetName()<<endl;
@@ -512,7 +512,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
              }
              filled = true;
            }
-           if(pdgCode == AntiLambdaCode){
+           if(pdgCode == fAntiLambdaCode){
              float myEt = Et(part);
              FillHisto2D("EtSimulatedAntiLambda",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
@@ -524,7 +524,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
                if(daughter){
                  if(daughter->GetPDG(0)){
                    Int_t daughtercode = daughter->GetPDG(0)->PdgCode();
-                   if(daughtercode==PiPlusCode || daughtercode==AntiProtonCode){
+                   if(daughtercode==fPiPlusCode || daughtercode==fAntiProtonCode){
                      myEt = Et(daughter);
                      FillHisto2D("EtSimulatedAntiLambdaDaughters",daughter->Pt(),daughter->Eta(),myEt);
                      //cout<<"AntiLambda daughter is a "<<daughter->GetName()<<endl;
@@ -537,7 +537,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
              }
              filled = true;
            }
-           if(pdgCode == K0SCode){
+           if(pdgCode == fK0SCode){
              float myEt = Et(part);
              FillHisto2D("EtSimulatedK0S",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
@@ -550,7 +550,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
                  if(daughter->GetPDG(0)){
 
                    Int_t daughtercode = daughter->GetPDG(0)->PdgCode();
-                   if(daughtercode==PiMinusCode || daughtercode==PiPlusCode){
+                   if(daughtercode==fPiMinusCode || daughtercode==fPiPlusCode){
                      myEt = Et(daughter);
                      FillHisto2D("EtSimulatedK0SDaughters",daughter->Pt(),daughter->Eta(),myEt);
                      //cout<<"K0S daughter is a "<<daughter->GetName()<<endl;
@@ -563,13 +563,13 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
              }
              filled = true;
            }
-           if(pdgCode == K0LCode){
+           if(pdgCode == fK0LCode){
              float myEt = Et(part);
              FillHisto2D("EtSimulatedK0L",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
              filled = true;
            }
-           if(pdgCode == OmegaCode){
+           if(pdgCode == fOmegaCode){
              float myEt = Et(part);
              FillHisto2D("EtSimulatedOmega",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
@@ -582,7 +582,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
                  if(daughter->GetPDG(0)){
 
                    Int_t daughtercode = daughter->GetPDG(0)->PdgCode();
-                   if(daughtercode==PiPlusCode || daughtercode==ProtonCode || daughtercode==KMinusCode){
+                   if(daughtercode==fPiPlusCode || daughtercode==fProtonCode || daughtercode==fKMinusCode){
                      myEt = Et(daughter);
                      FillHisto2D("EtSimulatedOmegaDaughters",daughter->Pt(),daughter->Eta(),myEt);
                    //cout<<"Omega daughter is a "<<daughter->GetName()<<endl;
@@ -595,7 +595,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
              }
              filled = true;
            }
-           if(pdgCode == AntiOmegaCode){
+           if(pdgCode == fAntiOmegaCode){
              float myEt = Et(part);
              FillHisto2D("EtSimulatedOmega",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
@@ -607,7 +607,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
                if(daughter){
                  if(daughter->GetPDG(0)){
                    Int_t daughtercode = daughter->GetPDG(0)->PdgCode();
-                   if(daughtercode==PiMinusCode || daughtercode==AntiProtonCode || daughtercode==KPlusCode){
+                   if(daughtercode==fPiMinusCode || daughtercode==fAntiProtonCode || daughtercode==fKPlusCode){
                      myEt = Et(daughter);
                      FillHisto2D("EtSimulatedAntiOmegaDaughters",daughter->Pt(),daughter->Eta(),myEt);
                      //cout<<"AntiOmega daughter is a "<<daughter->GetName()<<endl;
@@ -621,19 +621,19 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
              filled = true;
            }
            //There are two codes for Sigmas
-           if(pdgCode == SigmaCode || pdgCode == -3222){
+           if(pdgCode == fSigmaCode || pdgCode == -3222){
              float myEt = Et(part);
              FillHisto2D("EtSimulatedSigma",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
              filled = true;
            }
-           if(pdgCode == AntiSigmaCode || pdgCode == 3222){
+           if(pdgCode == fAntiSigmaCode || pdgCode == 3222){
              float myEt = Et(part);
              FillHisto2D("EtSimulatedAntiSigma",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
              filled = true;
            }
-           if(pdgCode == XiCode){
+           if(pdgCode == fXiCode){
              float myEt = Et(part);
              FillHisto2D("EtSimulatedXi",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
@@ -647,7 +647,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
                  if(daughter->GetPDG(0)){
 
                    Int_t daughtercode = daughter->GetPDG(0)->PdgCode();
-                   if(daughtercode==PiPlusCode || daughtercode==ProtonCode || daughtercode==PiMinusCode){
+                   if(daughtercode==fPiPlusCode || daughtercode==fProtonCode || daughtercode==fPiMinusCode){
                      myEt = Et(daughter);
                      FillHisto2D("EtSimulatedXiDaughters",daughter->Pt(),daughter->Eta(),myEt);
                    //cout<<"Xi daughter is a "<<daughter->GetName()<<endl;
@@ -660,7 +660,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
              }
              filled = true;
            }
-           if(pdgCode == AntiXiCode){
+           if(pdgCode == fAntiXiCode){
              float myEt = Et(part);
              FillHisto2D("EtSimulatedAntiXi",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
@@ -672,7 +672,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
                if(daughter){
                  if(daughter->GetPDG(0)){
                    Int_t daughtercode = daughter->GetPDG(0)->PdgCode();
-                   if(daughtercode==PiPlusCode || daughtercode==AntiProtonCode || daughtercode==PiMinusCode){
+                   if(daughtercode==fPiPlusCode || daughtercode==fAntiProtonCode || daughtercode==fPiMinusCode){
                      myEt = Et(daughter);
                      FillHisto2D("EtSimulatedAntiXiDaughters",daughter->Pt(),daughter->Eta(),myEt);
                      //cout<<"AntiXi daughter is a "<<daughter->GetName()<<endl;
@@ -685,13 +685,13 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
              }
              filled = true;
            }
-           if(pdgCode == Xi0Code){
+           if(pdgCode == fXi0Code){
              float myEt = Et(part);
              FillHisto2D("EtSimulatedXi0",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
              filled = true;
            }
-           if(pdgCode == AntiXi0Code){
+           if(pdgCode == fAntiXi0Code){
              float myEt = Et(part);
              FillHisto2D("EtSimulatedAntiXi0",part->Pt(),part->Eta(),myEt);
              FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt);
@@ -699,12 +699,12 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
            }
            //============electrons===================================
 
-           if(pdgCode == EPlusCode){
+           if(pdgCode == fEPlusCode){
              float myEt = Et(part);
              FillHisto2D("EtSimulatedEPlus",part->Pt(),part->Eta(),myEt);
              filled = true;
            }
-           if(pdgCode == EMinusCode){
+           if(pdgCode == fEMinusCode){
              float myEt = Et(part);
              FillHisto2D("EtSimulatedEMinus",part->Pt(),part->Eta(),myEt);
              filled = true;
@@ -743,8 +743,8 @@ void AliAnalysisHadEtMonteCarlo::Init()
     fIPzCut = EtReconstructedCuts::kIPzCut;
     // Track cuts
     //Bool_t selectPrimaries=kTRUE;
-    //esdtrackCutsITSTPC = AliESDtrackCuts::GetStandardITSTPCTrackCuts2009(selectPrimaries);
-    //esdtrackCutsITSTPC = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
+    //ffesdtrackCutsITSTPC = AliESDtrackCuts::GetStandardITSTPCTrackCuts2009(selectPrimaries);
+    //ffesdtrackCutsITSTPC = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
 
 }
 void AliAnalysisHadEtMonteCarlo::CreateHistograms(){
index 4043568..450e946 100644 (file)
@@ -22,7 +22,7 @@ public:
     virtual void Init();
     
  private:
-    //AliESDtrackCuts* esdtrackCutsITSTPC;
+    //AliESDtrackCuts* ffesdtrackCutsITSTPC;
 };
 
 #endif // ALIANALYSISHADETMONTECARLO_H
index 937a074..487cbd5 100644 (file)
@@ -48,9 +48,9 @@ AliAnalysisTaskHadEt::AliAnalysisTaskHadEt(const char *name) :
         ,fPdgDB(0)
         ,fRecEventVars(0)
         ,fSimEventVars(0)
-        ,esdtrackCutsITSTPC(0)
-        ,esdtrackCutsTPC(0)
-        ,esdtrackCutsITS(0)
+        ,ffesdtrackCutsITSTPC(0)
+        ,fesdtrackCutsTPC(0)
+        ,fesdtrackCutsITS(0)
 {
     // Constructor
 
@@ -88,26 +88,26 @@ void AliAnalysisTaskHadEt::UserCreateOutputObjects()
 
 
     Bool_t selectPrimaries=kTRUE;
-    esdtrackCutsITSTPC = AliESDtrackCuts::GetStandardITSTPCTrackCuts2009(selectPrimaries);
-    esdtrackCutsITSTPC->SetName("fEsdTrackCuts");
-    esdtrackCutsTPC = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
-    esdtrackCutsTPC->SetName("fEsdTrackCutsTPCOnly");
+    ffesdtrackCutsITSTPC = AliESDtrackCuts::GetStandardITSTPCTrackCuts2009(selectPrimaries);
+    ffesdtrackCutsITSTPC->SetName("fEsdTrackCuts");
+    fesdtrackCutsTPC = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
+    fesdtrackCutsTPC->SetName("fEsdTrackCutsTPCOnly");
     //ITS stand alone cuts - similar to 2009 cuts but with only ITS hits required
-    esdtrackCutsITS =  new AliESDtrackCuts;
-    esdtrackCutsITS->SetName("fEsdTrackCutsITS");
-    esdtrackCutsITS->SetRequireITSRefit(kTRUE);
-    esdtrackCutsITS->SetRequireITSStandAlone(kTRUE);
-    esdtrackCutsITS->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
-    esdtrackCutsITS->SetMaxDCAToVertexXYPtDep("0.0350+0.0420/pt^0.9");
-    esdtrackCutsITS->SetMaxDCAToVertexZ(1.e6);
-    esdtrackCutsITS->SetDCAToVertex2D(kFALSE);
-    esdtrackCutsITS->SetRequireSigmaToVertex(kFALSE);
-    esdtrackCutsITS->SetAcceptKinkDaughters(kFALSE);
-
-    fOutputList->Add(esdtrackCutsITSTPC);
-    fOutputList->Add(esdtrackCutsTPC);
-    fOutputList->Add(esdtrackCutsITS);
-    if(esdtrackCutsITSTPC && esdtrackCutsTPC){
+    fesdtrackCutsITS =  new AliESDtrackCuts;
+    fesdtrackCutsITS->SetName("fEsdTrackCutsITS");
+    fesdtrackCutsITS->SetRequireITSRefit(kTRUE);
+    fesdtrackCutsITS->SetRequireITSStandAlone(kTRUE);
+    fesdtrackCutsITS->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
+    fesdtrackCutsITS->SetMaxDCAToVertexXYPtDep("0.0350+0.0420/pt^0.9");
+    fesdtrackCutsITS->SetMaxDCAToVertexZ(1.e6);
+    fesdtrackCutsITS->SetDCAToVertex2D(kFALSE);
+    fesdtrackCutsITS->SetRequireSigmaToVertex(kFALSE);
+    fesdtrackCutsITS->SetAcceptKinkDaughters(kFALSE);
+
+    fOutputList->Add(ffesdtrackCutsITSTPC);
+    fOutputList->Add(fesdtrackCutsTPC);
+    fOutputList->Add(fesdtrackCutsITS);
+    if(ffesdtrackCutsITSTPC && fesdtrackCutsTPC){
       fRecAnalysis->SetITSTrackCuts( GetITSTrackCuts());
       fMCAnalysis->SetITSTrackCuts( GetITSTrackCuts());
       fRecAnalysis->SetTPCITSTrackCuts( GetTPCITSTrackCuts());
index 73dcc07..e43fefa 100644 (file)
@@ -103,9 +103,9 @@ private:
     \r
     EventVars *fRecEventVars;\r
     EventVars *fSimEventVars;\r
-    AliESDtrackCuts* esdtrackCutsITSTPC;\r
-    AliESDtrackCuts* esdtrackCutsTPC;\r
-    AliESDtrackCuts* esdtrackCutsITS;\r
+    AliESDtrackCuts* ffesdtrackCutsITSTPC;\r
+    AliESDtrackCuts* fesdtrackCutsTPC;\r
+    AliESDtrackCuts* fesdtrackCutsITS;\r
     \r
     ClassDef(AliAnalysisTaskHadEt, 1); // example of analysis\r
 };\r