reducing coding violations to ALARA levels
authordsilverm <dsilverm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 16 Sep 2010 14:13:54 +0000 (14:13 +0000)
committerdsilverm <dsilverm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 16 Sep 2010 14:13:54 +0000 (14:13 +0000)
26 files changed:
PWG4/totEt/AliAnalysisEt.cxx
PWG4/totEt/AliAnalysisEt.h
PWG4/totEt/AliAnalysisEtMonteCarlo.cxx
PWG4/totEt/AliAnalysisEtMonteCarlo.h
PWG4/totEt/AliAnalysisEtMonteCarloEmcal.cxx
PWG4/totEt/AliAnalysisEtMonteCarloEmcal.h
PWG4/totEt/AliAnalysisEtMonteCarloPhos.cxx
PWG4/totEt/AliAnalysisEtMonteCarloPhos.h
PWG4/totEt/AliAnalysisEtReconstructed.cxx
PWG4/totEt/AliAnalysisEtReconstructed.h
PWG4/totEt/AliAnalysisEtReconstructedEmcal.cxx
PWG4/totEt/AliAnalysisEtReconstructedEmcal.h
PWG4/totEt/AliAnalysisEtReconstructedPhos.cxx
PWG4/totEt/AliAnalysisEtReconstructedPhos.h
PWG4/totEt/AliAnalysisHadEt.cxx
PWG4/totEt/AliAnalysisHadEt.h
PWG4/totEt/AliAnalysisHadEtCorrections.cxx
PWG4/totEt/AliAnalysisHadEtCorrections.h
PWG4/totEt/AliAnalysisHadEtMonteCarlo.cxx
PWG4/totEt/AliAnalysisHadEtMonteCarlo.h
PWG4/totEt/AliAnalysisHadEtReconstructed.cxx
PWG4/totEt/AliAnalysisHadEtReconstructed.h
PWG4/totEt/AliAnalysisTaskHadEt.cxx
PWG4/totEt/AliAnalysisTaskHadEt.h
PWG4/totEt/AliAnalysisTaskTotEt.cxx
PWG4/totEt/AliAnalysisTaskTotEt.h

index 4c59271..9f2b67b 100644 (file)
@@ -1,3 +1,12 @@
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies
+//  Base class for ESD & MC analysis
+//  - reconstruction and MonteCarlo output
+// implementation file
+//
+//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
+//_________________________________________________________________________
+
 #include "AliAnalysisEt.h"
 #include "TMath.h"
 #include "TList.h"
@@ -6,6 +15,8 @@
 #include <iostream>
 #include "AliAnalysisEtCuts.h"
 #include "AliVEvent.h"
+#include "TDatabasePDG.h"
+#include "Rtypes.h"
 
 using namespace std;
 ClassImp(AliAnalysisEt);
@@ -78,7 +89,6 @@ AliAnalysisEt::AliAnalysisEt() :
         ,fHistBaryonEtAcc(0)
         ,fHistAntiBaryonEtAcc(0)
         ,fHistMesonEtAcc(0)
-        ,fHistEtRecvsEtMC(0)
         ,fHistTMDeltaR(0)
 {
 
@@ -90,7 +100,7 @@ AliAnalysisEt::~AliAnalysisEt()
 }
 
 void AliAnalysisEt::FillOutputList(TList *list)
-{
+{ // histograms to be added to output
     list->Add(fHistEt);
     list->Add(fHistChargedEt);
     list->Add(fHistNeutralEt);
@@ -114,20 +124,23 @@ void AliAnalysisEt::FillOutputList(TList *list)
     list->Add(fHistAntiBaryonEtAcc);
     list->Add(fHistMesonEtAcc);
 
-    list->Add(fHistEtRecvsEtMC);
-
     list->Add(fHistTMDeltaR);
 }
 
 void AliAnalysisEt::Init()
-{
+{// set up cuts and PDG info
+  fVertexXCut = EtReconstructedCuts::kVertexXCut;
+  fVertexYCut = EtReconstructedCuts::kVertexYCut;
+  fVertexZCut = EtReconstructedCuts::kVertexZCut;
+  fIPxyCut = EtReconstructedCuts::kIPxyCut;
+  fIPzCut = EtReconstructedCuts::kIPzCut;
 
   if(!fPdgDB) fPdgDB = new TDatabasePDG();
   SetParticleCodes();
 }
 
 void AliAnalysisEt::CreateHistograms()
-{
+{ // create histograms..
   // histogram binning for E_T, p_T and Multiplicity: defaults for p+p
   Int_t nbinsEt = 1000;
   Double_t minEt = 0.0001;
@@ -208,16 +221,14 @@ void AliAnalysisEt::CreateHistograms()
     histname = "fHistMesonEtAcc" + fHistogramNameSuffix;
     fHistMesonEtAcc = new TH1F(histname.Data(), "E_{T} for mesons in calorimeter acceptance",  nbinsEt, minEt, maxEt);
 
-    histname = "fHistEtRecvsEtMC" + fHistogramNameSuffix;
-    fHistEtRecvsEtMC = new TH2F(histname.Data(), "Reconstructed E_{t} vs MC E_{t}", nbinsEt, minEt, maxEt, nbinsEt, minEt, maxEt);
-
+    //
     histname = "fHistTMDeltaR" + fHistogramNameSuffix;
     fHistTMDeltaR = new TH1F(histname.Data(), "#Delta R for calorimeter clusters", 200, 0, 50);
 
 }
 
 void AliAnalysisEt::FillHistograms()
-{
+{ // fill histograms..
     fHistEt->Fill(fTotEt);
     fHistChargedEt->Fill(fTotChargedEt);
     fHistNeutralEt->Fill(fTotNeutralEt);
@@ -253,7 +264,7 @@ Int_t AliAnalysisEt::AnalyseEvent(AliVEvent *event)
 }
 
 void AliAnalysisEt::ResetEventValues()
-{
+{ // clear
     fTotEt = 0;
     fTotEtAcc = 0;
     fTotNeutralEt = 0;
@@ -272,7 +283,7 @@ void AliAnalysisEt::ResetEventValues()
 }
 
 void AliAnalysisEt::SetParticleCodes()
-{     
+{ // set PDG info    
   fPionMass = fPdgDB->GetParticle("pi+")->Mass();
   fPiPlusCode = fPdgDB->GetParticle("pi+")->PdgCode();
   fPiMinusCode = fPdgDB->GetParticle("pi-")->PdgCode();
index 11fd60d..e135e57 100644 (file)
@@ -1,14 +1,21 @@
 #ifndef ALIANALYSISET_H
 #define ALIANALYSISET_H
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies
+//  Base class for ESD & MC analysis
+//  - reconstruction and MonteCarlo output
+//
+//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
+//_________________________________________________________________________
 
 #include "TString.h"
-#include "TDatabasePDG.h"
-#include "Rtypes.h"
 
 class TH2F;
 class TH1F;
 class AliVEvent;
 class TList;
+class Rtypes;
+class TDatabasePDG;
 
 class AliAnalysisEt
 {
@@ -18,7 +25,7 @@ public:
     virtual ~AliAnalysisEt();
 
 private:
-  //Declare it private to avoid compilation warning
+  //Declare private to avoid compilation warning
   AliAnalysisEt & operator = (const AliAnalysisEt & g) ;//cpy assignment
   AliAnalysisEt(const AliAnalysisEt & g) ; // cpy ctor
   
@@ -49,127 +56,94 @@ public:
     virtual void SetParticleCodes();
     
     /** 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; }
 
 
 protected:
-   
-    /** The suffix for the histogram names */
-    TString fHistogramNameSuffix;
+       
+    TString fHistogramNameSuffix; /** The suffix for the histogram names */
 
     /** PDG Database */
-    TDatabasePDG *fPdgDB;
-
-    Int_t fPiPlusCode;
-    Int_t fPiMinusCode;
-    Int_t fKPlusCode;
-    Int_t fKMinusCode;
-    Int_t fProtonCode;
-    Int_t fAntiProtonCode;
-    Int_t fLambdaCode;
-    Int_t fAntiLambdaCode;
-    Int_t fK0SCode;
-    Int_t fOmegaCode;
-    Int_t fAntiOmegaCode;
-    Int_t fXi0Code;
-    Int_t fAntiXi0Code;
-    Int_t fXiCode;
-    Int_t fAntiXiCode;
-    Int_t fSigmaCode;
-    Int_t fAntiSigmaCode;
-    Int_t fK0LCode;
-    Int_t fNeutronCode;
-    Int_t fAntiNeutronCode;
-    Int_t fEPlusCode;
-    Int_t fEMinusCode;
-    Float_t fPionMass;
-
-    /** 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;
-
-    /** Total neutral Et in the event within the acceptance cuts */
-    Double_t fTotNeutralEtAcc;
-
-    /** Total charged Et in the event */
-    Double_t fTotChargedEt;
-
-    /** Total charged Et in the event within the acceptance cuts */
-    Double_t fTotChargedEtAcc;
-
-    /** Multiplicity of particles in the event */
-    Int_t fMultiplicity;
+    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
+
+    Double_t fSumEt;/** Sum of the total Et for all events */
+    Double_t fSumEtAcc;/** Sum of the total Et within our acceptance for all events */    
+    Double_t fTotEt;/** Total Et in the event (without acceptance cuts) */    
+    Double_t fTotEtAcc;/** Total Et in the event within the acceptance cuts */
     
-    /** Multiplicity of charged particles in the event */
-    Int_t fChargedMultiplicity;
+    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 */    
+    Int_t fChargedMultiplicity;/** Multiplicity of charged particles in the event */    
+    Int_t fNeutralMultiplicity; /** Multiplicity of neutral particles in the event */
+        
+    Double_t fEtaCut;/** Cut in eta ( normally |eta| < 0.5 */
+    Double_t fEtaCutAcc;/** Eta cut for our acceptance */
     
-    /** Multiplicity of neutral particles in the event */
-    Int_t fNeutralMultiplicity; 
+    Double_t fPhiCutAccMin; /** Min phi cut for our acceptance in radians */    
+    Double_t fPhiCutAccMax; /** Max phi cut for our acceptance in radians */
     
-    /** Cut in eta ( normally |eta| < 0.5 */
-    Double_t fEtaCut;
-
-    /** Eta cut for our acceptance */
-    Double_t fEtaCutAcc;
-
-    /** Min phi cut for our acceptance in radians */
-    Double_t fPhiCutAccMin;
+    Double_t fDetectorRadius; /** Detector radius */
 
-    /** Max phi cut for our acceptance in radians */
-    Double_t fPhiCutAccMax;
+    Double_t fVertexXCut;/** Vertex cuts x direction */
+    Double_t fVertexYCut;/** Vertex cuts y direction*/
+    Double_t fVertexZCut;/** Vertex cuts z direction*/
 
-    /** Detector radius */
-    Double_t fDetectorRadius;
+    Double_t fIPxyCut;    /** Impact parameter cuts x-y plane*/
+    Double_t fIPzCut;    /** Impact parameter cuts z*/
 
-    /** Vertex cuts */
-    Double_t fVertexXCut;
-    Double_t fVertexYCut;
-    Double_t fVertexZCut;
-
-    /** Impact parameter cuts */
-    Double_t fIPxyCut;
-    Double_t fIPzCut;
-
-    /** Cut on the cluster energy */
-    Double_t fClusterEnergyCut;
-
-    /** Cut on track pt */
-    Double_t fTrackPtCut;
-
-    /** Minimum energy to cut on single cell cluster */
-    Double_t fSingleCellEnergyCut;
+    
+    Double_t fClusterEnergyCut; /** Cut on the cluster energy */    
+    Double_t fTrackPtCut; /** Cut on track pt */
+    Double_t fSingleCellEnergyCut;  /** Minimum energy to cut on single cell cluster */
     
     // Declare the histograms
 
@@ -204,20 +178,16 @@ protected:
     TH2F *fHistPhivsPtPos; //phi vs pT plot for positive tracks
     TH2F *fHistPhivsPtNeg; //phi vs pT plot for negative tracks
 
-    /* PID plots */
-    TH1F *fHistBaryonEt;
-    TH1F *fHistAntiBaryonEt;
-    TH1F *fHistMesonEt;
-
-    TH1F *fHistBaryonEtAcc;
-    TH1F *fHistAntiBaryonEtAcc;
-    TH1F *fHistMesonEtAcc;
+    /* PID plots, Et */
+    TH1F *fHistBaryonEt; // baryon
+    TH1F *fHistAntiBaryonEt; // anti-baryon
+    TH1F *fHistMesonEt; // meson
 
-    /* Correction plots */
-    TH2F *fHistEtRecvsEtMC; //Reconstructed Et versus MC Et
+    TH1F *fHistBaryonEtAcc; // baryon, acc
+    TH1F *fHistAntiBaryonEtAcc; // anti-baryon, acc
+    TH1F *fHistMesonEtAcc; // meson, acc
 
-    /* Track matching plots */
-    TH1F *fHistTMDeltaR;
+    TH1F *fHistTMDeltaR;  /* Track matching plots */
 
     ClassDef(AliAnalysisEt, 0);
 };
index c03ebef..b34af70 100644 (file)
@@ -1,12 +1,22 @@
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies
+//  Base class for MC analysis
+//  - MC output
+//  implementation file
+//
+//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
+//_________________________________________________________________________
+
 #include "AliAnalysisEtMonteCarlo.h"
 #include "AliAnalysisEtCuts.h"
 #include "AliESDtrack.h"
 #include "AliStack.h"
 #include "AliMCEvent.h"
 #include "TH2F.h"
+#include "TParticle.h"
 
 Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
-{
+{ // analyse MC event
      ResetEventValues();
      
     // Get us an mc event
@@ -35,6 +45,8 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
         // Check if it is a primary particle
         if (!stack->IsPhysicalPrimary(iPart)) continue;
 
+       // printf("MC: iPart %03d eta %4.3f phi %4.3f code %d charge %g \n", iPart, part->Eta(), part->Phi(), pc->PdgCode(), pc->Charge()); // tmp/debug printout
+
         // Check for reasonable (for now neutral and singly charged) charge on the particle
         //TODO:Maybe not only singly charged?
         if (TMath::Abs(pc->Charge()) != EtMonteCarloCuts::kSingleChargedParticle && pc->Charge() != EtMonteCarloCuts::kNeutralParticle) continue;
@@ -99,15 +111,7 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
 
 void AliAnalysisEtMonteCarlo::Init()
 {
-
     AliAnalysisEt::Init();
-
-    fVertexXCut = EtReconstructedCuts::kVertexXCut;
-    fVertexYCut = EtReconstructedCuts::kVertexYCut;
-    fVertexZCut = EtReconstructedCuts::kVertexZCut;
-    fIPxyCut = EtReconstructedCuts::kIPxyCut;
-    fIPzCut = EtReconstructedCuts::kIPzCut;
-
 }
 
 bool AliAnalysisEtMonteCarlo::TrackHitsCalorimeter(TParticle* part, Double_t magField)
index 8e4d3da..dd49a84 100644 (file)
@@ -1,8 +1,15 @@
 #ifndef ALIANALYSISETMONTECARLO_H
 #define ALIANALYSISETMONTECARLO_H
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies
+//  Base class for MC analysis
+//  - MC output
+//
+//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
+//_________________________________________________________________________
 
 #include "AliAnalysisEt.h"
-#include "TParticle.h"
+class TParticle;
 
 class AliAnalysisEtMonteCarlo : public AliAnalysisEt
 {
@@ -10,7 +17,8 @@ class AliAnalysisEtMonteCarlo : public AliAnalysisEt
 public:
    
     AliAnalysisEtMonteCarlo() {}
-   
+    virtual ~AliAnalysisEtMonteCarlo() {}
+
     virtual Int_t AnalyseEvent(AliVEvent* event);
 
     virtual void Init();
index 1064bc3..ad5ceb8 100644 (file)
@@ -1,3 +1,11 @@
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies
+//  Base class for MC analysis, for EMCAL
+//  - MC output
+//  implementation file 
+//
+//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
+//_________________________________________________________________________
 #include "AliAnalysisEtMonteCarloEmcal.h"
 #include "AliAnalysisEtCuts.h"
 #include "AliESDtrack.h"
@@ -7,9 +15,13 @@ AliAnalysisEtMonteCarloEmcal::AliAnalysisEtMonteCarloEmcal()
    fHistogramNameSuffix = TString("EmcalMC");
 }
 
+AliAnalysisEtMonteCarloEmcal::~AliAnalysisEtMonteCarloEmcal()
+{
+}
+
 
 void AliAnalysisEtMonteCarloEmcal::Init()
-{
+{ // Init
     AliAnalysisEtMonteCarlo::Init();
     
     fDetectorRadius = EtGeometryCutsEmcal::kDetectorRadius;
index df6df3e..93423d1 100644 (file)
@@ -1,6 +1,12 @@
 #ifndef ALIANALYSISETMONTECARLOEMCAL_H
 #define ALIANALYSISETMONTECARLOEMCAL_H
-
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies
+//  Base class for MC analysis, for EMCAL
+//  - MC output
+//
+//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
+//_________________________________________________________________________
 #include "AliAnalysisEtMonteCarlo.h"
 
 
@@ -10,6 +16,7 @@ class AliAnalysisEtMonteCarloEmcal : public AliAnalysisEtMonteCarlo
 public:
    
     AliAnalysisEtMonteCarloEmcal();
+    virtual ~AliAnalysisEtMonteCarloEmcal();
 
     virtual void Init();
     
index c70c8fb..cfe85bd 100644 (file)
@@ -1,3 +1,11 @@
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies
+//  Base class for MC analysis, for PHOS
+//  - MC output
+//  implementation file 
+//
+//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
+//_________________________________________________________________________
 #include "AliAnalysisEtMonteCarloPhos.h"
 #include "AliAnalysisEtCuts.h"
 #include "AliESDtrack.h"
@@ -7,9 +15,13 @@ AliAnalysisEtMonteCarloPhos::AliAnalysisEtMonteCarloPhos()
    fHistogramNameSuffix = TString("PhosMC");
 }
 
+AliAnalysisEtMonteCarloPhos::~AliAnalysisEtMonteCarloPhos()
+{
+}
+
 
 void AliAnalysisEtMonteCarloPhos::Init()
-{
+{ // Init
     AliAnalysisEtMonteCarlo::Init();
     
     fDetectorRadius = EtGeometryCutsPhos::kDetectorRadius;
index f0f4961..cf6d6a1 100644 (file)
@@ -1,5 +1,12 @@
 #ifndef ALIANALYSISETMONTECARLOPHOS_H
 #define ALIANALYSISETMONTECARLOPHOS_H
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies
+//  Base class for MC analysis, for PHOS
+//  - MC output
+//
+//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
+//_________________________________________________________________________
 
 #include "AliAnalysisEtMonteCarlo.h"
 
@@ -10,6 +17,7 @@ class AliAnalysisEtMonteCarloPhos : public AliAnalysisEtMonteCarlo
 public:
    
     AliAnalysisEtMonteCarloPhos();
+    virtual ~AliAnalysisEtMonteCarloPhos();
 
     virtual void Init();
     
index 08cb28e..6d16ab3 100644 (file)
@@ -1,3 +1,11 @@
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies
+//  Base class for ESD analysis
+//  - reconstruction output
+//  implementation file
+//
+//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
+//_________________________________________________________________________
 
 #include "AliAnalysisEtReconstructed.h"
 #include "AliAnalysisEtCuts.h"
@@ -20,8 +28,12 @@ AliAnalysisEtReconstructed::AliAnalysisEtReconstructed() :
 
 }
 
-Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
+AliAnalysisEtReconstructed::~AliAnalysisEtReconstructed() 
 {
+}
+
+Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
+{ // analyse ESD event
     ResetEventValues();
     AliESDEvent *event = dynamic_cast<AliESDEvent*>(ev);
 
@@ -62,6 +74,7 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
         }
 
         Double_t et = track->E() * TMath::Sin(track->Theta()) + massPart;
+       // printf("Rec track: iTrack %03d eta %4.3f phi %4.3f nITSCl %d nTPCCl %d\n", iTrack, track->Eta(), track->Phi(), nItsClusters, nTPCClusters); // tmp/debug printout
 
         if (TMath::Abs(track->Eta()) < fEtaCut && CheckGoodVertex(track) && nItsClusters > fNItsClustersCut && nTPCClusters > fNTpcClustersCut)
         {
@@ -78,6 +91,7 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
         {
          Double_t phi = track->Phi();
          Double_t pt = track->Pt();
+         // printf("Rec track hit: iTrack %03d phi %4.3f pt %4.3f\n", iTrack, phi, pt); // tmp/debug printout
          if (track->Charge() > 0) fHistPhivsPtPos->Fill(phi, pt);
          else fHistPhivsPtNeg->Fill(phi, pt);
         }
@@ -92,6 +106,7 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
             continue;
         }
 
+       // printf("Rec Cluster: iCluster %03d E %4.3f type %d NCells %d\n", iCluster, cluster->E(), (int)(cluster->GetType()), cluster->GetNCells()); // tmp/debug printout
         if (cluster->GetType() != fClusterType) continue;
 
         if (cluster->E() < fClusterEnergyCut) continue;
@@ -141,38 +156,32 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
 }
 
 bool AliAnalysisEtReconstructed::CheckGoodVertex(AliVParticle* track)
-{
+{ // check vertex
 
     Float_t bxy = 999.;
     Float_t bz = 999.;
     dynamic_cast<AliESDtrack*>(track)->GetImpactParametersTPC(bxy,bz);
 
-    return TMath::Abs(track->Xv()) < fVertexXCut && TMath::Abs(track->Yv()) < fVertexYCut && TMath::Abs(track->Zv()) < fVertexZCut && TMath::Abs(bxy) < fIPxyCut && TMath::Abs(bz) < fIPzCut;;
+    // printf("Rec CheckGoodVertex: TMath::Abs(track->Xv()) %f fVertexXCut %f TMath::Abs(track->Yv()) %f fVertexYCut %f TMath::Abs(track->Zv()) %f fVertexZCut %f TMath::Abs(bxy) %f fIPxyCut %f TMath::Abs(bz) %f fIPzCut %f\n", TMath::Abs(track->Xv()), fVertexXCut, TMath::Abs(track->Yv()), fVertexYCut, TMath::Abs(track->Zv()), fVertexZCut, TMath::Abs(bxy), fIPxyCut, TMath::Abs(bz), fIPzCut); // tmp/debug printout
+
+    return TMath::Abs(track->Xv()) < fVertexXCut && TMath::Abs(track->Yv()) < fVertexYCut && TMath::Abs(track->Zv()) < fVertexZCut && TMath::Abs(bxy) < fIPxyCut && TMath::Abs(bz) < fIPzCut;
 
 }
 
 void AliAnalysisEtReconstructed::Init()
-{
-
+{ // Init
     AliAnalysisEt::Init();
-
-    fVertexXCut = EtReconstructedCuts::kVertexXCut;
-    fVertexYCut = EtReconstructedCuts::kVertexYCut;
-    fVertexZCut = EtReconstructedCuts::kVertexZCut;
-    fIPxyCut = EtReconstructedCuts::kIPxyCut;
-    fIPzCut = EtReconstructedCuts::kIPzCut;
-
 }
 
 bool AliAnalysisEtReconstructed::TrackHitsCalorimeter(AliVParticle* track, Double_t magField)
-{
+{ // propagate track to detector radius
 
    AliESDtrack *esdTrack = dynamic_cast<AliESDtrack*>(track);
-    // Printf("Propagating track: eta: %f, phi: %f, pt: %f", esdTrack->Eta(), esdTrack->Phi(), esdTrack->Pt());
+   // Printf("Propagating track: eta: %f, phi: %f, pt: %f", esdTrack->Eta(), esdTrack->Phi(), esdTrack->Pt());
 
     Bool_t prop = esdTrack->PropagateTo(fDetectorRadius, magField);
 
-    //if(prop)Printf("Track propagated, eta: %f, phi: %f, pt: %f", esdTrack->Eta(), esdTrack->Phi(), esdTrack->Pt());
+    // if (prop) Printf("Track propagated, eta: %f, phi: %f, pt: %f", esdTrack->Eta(), esdTrack->Phi(), esdTrack->Pt());
     return prop && 
                   TMath::Abs(esdTrack->Eta()) < fEtaCutAcc && 
                   esdTrack->Phi() > fPhiCutAccMin*TMath::Pi()/180. && 
index 91b1539..0e12922 100644 (file)
@@ -1,5 +1,12 @@
 #ifndef ALIANALYSISETRECONSTRUCTED_H
 #define ALIANALYSISETRECONSTRUCTED_H
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies
+//  Base class for ESD analysis
+//  - reconstruction output
+//
+//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
+//_________________________________________________________________________
 
 #include "AliAnalysisEt.h"
 
@@ -11,7 +18,8 @@ class AliAnalysisEtReconstructed : public AliAnalysisEt
 public:
    
     AliAnalysisEtReconstructed();
-   
+    virtual ~AliAnalysisEtReconstructed();
+
     virtual Int_t AnalyseEvent(AliVEvent* event);
 
     virtual void Init();
@@ -21,12 +29,10 @@ protected:
     bool CheckGoodVertex(AliVParticle *track);
     virtual bool TrackHitsCalorimeter(AliVParticle *track, Double_t magField);
 
-    Int_t fNTpcClustersCut;
-    Int_t fNItsClustersCut;
-   
-    Double_t fTrackDistanceCut;
-    
-    Char_t fClusterType;
+    Int_t fNTpcClustersCut; // cut on # of TPC clusters
+    Int_t fNItsClustersCut; // cut on # of ITS clusters
+    Double_t fTrackDistanceCut; // cut on track distance    
+    Char_t fClusterType; // selection on cluster type
     
 };
 
index 5670969..11b320e 100644 (file)
@@ -1,3 +1,11 @@
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies
+//  Base class for ESD analysis, for EMCAL
+//  - reconstruction output
+//  implementation file 
+//
+//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
+//_________________________________________________________________________
 #include "AliAnalysisEtReconstructedEmcal.h"
 #include "AliAnalysisEtCuts.h"
 #include "AliESDtrack.h"
@@ -8,9 +16,13 @@ AliAnalysisEtReconstructed()
    fHistogramNameSuffix = TString("EmcalRec");    
 }
 
+AliAnalysisEtReconstructedEmcal::~AliAnalysisEtReconstructedEmcal() 
+{
+}
+
 
 void AliAnalysisEtReconstructedEmcal::Init()
-{
+{ // Init
     AliAnalysisEtReconstructed::Init();
     
     fClusterType = EtReconstructedCutsEmcal::kClusterType;
index c2dc147..c2b6711 100644 (file)
@@ -1,6 +1,12 @@
 #ifndef ALIANALYSISETRECONSTRUCTEDEMCAL_H
 #define ALIANALYSISETRECONSTRUCTEDEMCAL_H
-
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies
+//  Base class for ESD analysis, for EMCAL
+//  - reconstruction output
+//
+//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
+//_________________________________________________________________________
 #include "AliAnalysisEtReconstructed.h"
 
 
@@ -10,6 +16,7 @@ class AliAnalysisEtReconstructedEmcal : public AliAnalysisEtReconstructed
 public:
    
     AliAnalysisEtReconstructedEmcal();
+    virtual ~AliAnalysisEtReconstructedEmcal();
 
     virtual void Init();
     
index 8eab2a5..7adbcba 100644 (file)
@@ -1,3 +1,11 @@
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies
+//  Base class for ESD analysis, for PHOS
+//  - reconstruction output
+// implementation file
+//
+//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
+//_________________________________________________________________________
 #include "AliAnalysisEtReconstructedPhos.h"
 #include "AliAnalysisEtCuts.h"
 #include "AliESDtrack.h"
@@ -8,9 +16,12 @@ AliAnalysisEtReconstructed()
    fHistogramNameSuffix = TString("PhosRec");    
 }
 
+AliAnalysisEtReconstructedPhos::~AliAnalysisEtReconstructedPhos() 
+{
+}
 
 void AliAnalysisEtReconstructedPhos::Init()
-{
+{ // Init
     AliAnalysisEtReconstructed::Init();
     
     fClusterType = EtReconstructedCutsPhos::kClusterType;
index 37f88ec..95e002c 100644 (file)
@@ -1,5 +1,13 @@
 #ifndef ALIANALYSISETRECONSTRUCTEDPHOS_H
 #define ALIANALYSISETRECONSTRUCTEDPHOS_H
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies
+//  Base class for ESD analysis, for PHOS
+//  - reconstruction output
+//  implementation file
+//
+//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
+//_________________________________________________________________________
 
 #include "AliAnalysisEtReconstructed.h"
 
@@ -10,6 +18,7 @@ class AliAnalysisEtReconstructedPhos : public AliAnalysisEtReconstructed
 public:
    
     AliAnalysisEtReconstructedPhos();
+    virtual ~AliAnalysisEtReconstructedPhos();
 
     virtual void Init();
     
index 961a762..4986f1f 100644 (file)
@@ -1,8 +1,13 @@
-//Create by Christine Nattrass, Rebecca Scott, Irakli Martashvili
+//Created 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
+//
+// 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"
@@ -85,9 +90,9 @@ AliAnalysisHadEt::AliAnalysisHadEt() :
                                  //,fSingleCellEnergyCut(0)
                                  //,fClusterEnergyCut(EtCommonCuts::kClusterEnergyCut)
                                  //,fTrackPtCut(EtCommonCuts::kTrackPtCut)
-        ,ffesdtrackCutsITSTPC(0)
-        ,fesdtrackCutsTPC(0)
-       ,fesdtrackCutsITS(0)
+        ,fEsdtrackCutsITSTPC(0)
+        ,fEsdtrackCutsTPC(0)
+       ,fEsdtrackCutsITS(0)
         ,fhistoList(0)
 {//default constructor
 
@@ -129,6 +134,12 @@ void AliAnalysisHadEt::FillOutputList()
 
 void AliAnalysisHadEt::Init()
 {//Initiate member vaiables to reasonable values
+  fVertexXCut = EtReconstructedCuts::kVertexXCut;
+  fVertexYCut = EtReconstructedCuts::kVertexYCut;
+  fVertexZCut = EtReconstructedCuts::kVertexZCut;
+  fIPxyCut = EtReconstructedCuts::kIPxyCut;
+  fIPzCut = EtReconstructedCuts::kIPzCut;
+
   if(!fPdgDB) fPdgDB = new TDatabasePDG();
   //the codes are defined in $ROOTSYS/etc/pdg_table.txt
   fPionMass = fPdgDB->GetParticle("pi+")->Mass();
index 4ab9bdb..51570db 100644 (file)
@@ -1,6 +1,10 @@
-//Create by Christine Nattrass, Rebecca Scott, Irakli Martashvili
+//_________________________________________________________________________
+//Created 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 class is designed for the analysis of the hadronic component of 
+// transverse energy.  It is used by AliAnalysisTaskHadEt.
+//_________________________________________________________________________
 #ifndef ALIANALYSISHADET_H
 #define ALIANALYSISHADET_H
 
@@ -68,14 +72,13 @@ public:
     Double_t GetTotChargedEtAcc() const { return fTotChargedEtAcc; }
 
 
-    void SetHistoList(TList *mylist){fhistoList = mylist;}
+    void SetHistoList(const TList *mylist){fhistoList = (TList *) mylist;}
 
-    void SetTPCITSTrackCuts(AliESDtrackCuts *cuts){ ffesdtrackCutsITSTPC = cuts;}
-    void SetTPCOnlyTrackCuts(AliESDtrackCuts *cuts){ fesdtrackCutsTPC = cuts;}
-    void SetITSTrackCuts(AliESDtrackCuts *cuts){ fesdtrackCutsITS = cuts;}
+    void SetTPCITSTrackCuts(const AliESDtrackCuts *cuts){ fEsdtrackCutsITSTPC = (AliESDtrackCuts *) cuts;}
+    void SetTPCOnlyTrackCuts(const AliESDtrackCuts *cuts){ fEsdtrackCutsTPC = (AliESDtrackCuts *) cuts;}
+    void SetITSTrackCuts(const AliESDtrackCuts *cuts){ fEsdtrackCutsITS = (AliESDtrackCuts *) cuts;}
 
-protected:
-   
+protected:   
     
     TString fHistogramNameSuffix; /** The suffix for the histogram names */
 
@@ -108,30 +111,20 @@ protected:
 
     
     Double_t fSumEt;/** Sum of the total Et for all events */
-
     Double_t fSumEtAcc;/** Sum of the total Et within our acceptance for all events */
-
-    
     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 */
-    
     Int_t fChargedMultiplicity;/** Multiplicity of charged particles in the event */
-    
     Int_t fNeutralMultiplicity; /** Multiplicity of neutral particles in the event */
         
     Double_t fEtaCut;/** Cut in eta ( normally |eta| < 0.5 */
-
     Double_t fEtaCutAcc;/** Eta cut for our acceptance */
 
     Double_t fVertexXCut;/** Vertex cuts x direction */
@@ -152,9 +145,9 @@ protected:
     void FillHisto2D(TString histname, Float_t x, Float_t y, Float_t weight);
 
     Float_t Et(TParticle *part, float mass = -1000);
-    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
+    AliESDtrackCuts* fEsdtrackCutsITSTPC;//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
index f1b6c2c..ea4ded5 100644 (file)
@@ -1,13 +1,17 @@
-//Create by Christine Nattrass, Rebecca Scott, Irakli Martashvili
+//Created 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)
+// 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"
+#include "TNamed.h"
 
 using namespace std;
 
index 91fe8f3..94fb2af 100644 (file)
@@ -1,16 +1,19 @@
-//Create by Christine Nattrass, Rebecca Scott, Irakli Martashvili
+//Created 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)
+// 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 Rtypes;
+class TNamed;
 
 class AliAnalysisHadEtCorrections : public TNamed
 {
@@ -50,52 +53,52 @@ public:
     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)));}
+    Float_t GetNotIDCorrectionTPC(const float pT){return 1.0/(fnotIDTPC->GetBinContent(fnotIDTPC->FindBin(pT)));}
+    Float_t GetNotIDCorrectionITS(const float pT){return 1.0/(fnotIDITS->GetBinContent(fnotIDITS->FindBin(pT)));}
+    Float_t GetNotIDCorrectionNoPID(const 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)));}
+    Float_t GetTPCEfficiencyCorrectionPion(const float pT){return 1.0/(fEfficiencyPionTPC->GetBinContent(fEfficiencyPionTPC->FindBin(pT)));}
+    Float_t GetTPCEfficiencyCorrectionKaon(const float pT){return 1.0/(fEfficiencyKaonTPC->GetBinContent(fEfficiencyKaonTPC->FindBin(pT)));}
+    Float_t GetTPCEfficiencyCorrectionProton(const float pT){return 1.0/(fEfficiencyProtonTPC->GetBinContent(fEfficiencyProtonTPC->FindBin(pT)));}
+    Float_t GetTPCEfficiencyCorrectionHadron(const float pT){return 1.0/(fEfficiencyHadronTPC->GetBinContent(fEfficiencyHadronTPC->FindBin(pT)));}
+    Float_t GetITSEfficiencyCorrectionPion(const float pT){return 1.0/(fEfficiencyPionITS->GetBinContent(fEfficiencyPionITS->FindBin(pT)));}
+    Float_t GetITSEfficiencyCorrectionKaon(const float pT){return 1.0/(fEfficiencyKaonITS->GetBinContent(fEfficiencyKaonITS->FindBin(pT)));}
+    Float_t GetITSEfficiencyCorrectionProton(const float pT){return 1.0/(fEfficiencyProtonITS->GetBinContent(fEfficiencyProtonITS->FindBin(pT)));}
+    Float_t GetITSEfficiencyCorrectionHadron(const 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;}
+    Float_t GetBackgroundCorrectionTPC(const float pT){return 1.0/(fBackgroundTPC->GetBinContent(fBackgroundTPC->FindBin(pT)));}
+    Float_t GetBackgroundCorrectionITS(const float pT){return 1.0/(fBackgroundITS->GetBinContent(fBackgroundITS->FindBin(pT)));}
+
+
+    void SetEtaCut(const Float_t val){fEtaCut=val;}
+    void SetAcceptanceCorrectionFull(const Float_t val){fAcceptanceCorrectionFull=val;}
+    void SetAcceptanceCorrectionEMCAL(const Float_t val){fAcceptanceCorrectionEMCAL=val;}
+    void SetAcceptanceCorrectionPHOS(const Float_t val){fAcceptanceCorrectionPHOS=val;}
+    void SetNeutralCorrection(const Float_t val){fNeutralCorrection=val;}
+    void SetNotHadronicCorrection(const Float_t val){fNotHadronicCorrection=val;}
+    void SetpTCutCorrectionTPC(const Float_t val){fpTcutCorrectionTPC=val;}
+    void SetpTCutCorrectionITS(const Float_t val){fpTcutCorrectionITS=val;}
+    void SetNeutralCorrectionLowBound(const Float_t val){fNeutralCorrectionLow=val;}
+    void SetNotHadronicCorrectionLowBound(const Float_t val){fNotHadronicCorrectionLow=val;}
+    void SetpTCutCorrectionTPCLowBound(const Float_t val){ffpTcutCorrectionTPCLow=val;}
+    void SetpTCutCorrectionITSLowBound(const Float_t val){ffpTcutCorrectionITSLow=val;}
+    void SetNeutralCorrectionHighBound(const Float_t val){fNeutralCorrectionHigh=val;}
+    void SetNotHadronicCorrectionHighBound(const Float_t val){fNotHadronicCorrectionHigh=val;}
+    void SetpTCutCorrectionTPCHighBound(const Float_t val){ffpTcutCorrectionTPCHigh=val;}
+    void SetpTCutCorrectionITSHighBound(const Float_t val){ffpTcutCorrectionITSHigh=val;}
+    void SetNotIDCorrectionTPC(const TH1D *histo){fnotIDTPC=(TH1D*) histo;}
+    void SetNotIDCorrectionITS(const TH1D *histo){fnotIDITS=(TH1D*) histo;}
+    void SetNotIDCorrectionNoPID(const TH1D *histo){fnotIDNoID=(TH1D*) histo;}
+    void SetEfficiencyPionTPC(const TH1D *histo){fEfficiencyPionTPC=(TH1D*) histo;}
+    void SetEfficiencyKaonTPC(const TH1D *histo){fEfficiencyKaonTPC=(TH1D*) histo;}
+    void SetEfficiencyProtonTPC(const TH1D *histo){fEfficiencyProtonTPC=(TH1D*) histo;}
+    void SetEfficiencyHadronTPC(const TH1D *histo){fEfficiencyHadronTPC=(TH1D*) histo;}
+    void SetEfficiencyPionITS(const TH1D *histo){fEfficiencyPionITS=(TH1D*) histo;}
+    void SetEfficiencyKaonITS(const TH1D *histo){fEfficiencyKaonITS=(TH1D*) histo;}
+    void SetEfficiencyProtonITS(const TH1D *histo){fEfficiencyProtonITS=(TH1D*) histo;}
+    void SetEfficiencyHadronITS(const TH1D *histo){fEfficiencyHadronITS=(TH1D*) histo;}
+    void SetBackgroundCorrectionTPC(const TH1D *histo){fBackgroundTPC=(TH1D*) histo;}
+    void SetBackgroundCorrectionITS(const TH1D *histo){fBackgroundITS=(TH1D*) histo;}
 
 
     AliAnalysisHadEtCorrections(const AliAnalysisHadEtCorrections *g) ; // cpy ctor
index 8c0a08a..c9d0b43 100644 (file)
@@ -1,5 +1,12 @@
-//Create by Christine Nattrass, Rebecca Scott, Irakli Martashvili
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies, charged hadrons
+//  Base class for MC analysis
+//  - MC output
+// implementation file
+//
+//Created by Christine Nattrass, Rebecca Scott, Irakli Martashvili
 //University of Tennessee at Knoxville
+//_________________________________________________________________________
 #include "AliAnalysisHadEtMonteCarlo.h"
 #include "AliAnalysisEtCuts.h"
 
 #include "AliESDEvent.h"
 #include "AliESDtrackCuts.h"
 #include "AliESDpid.h"
-
 #include <iostream>
 using namespace std;
 
 
-Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
+Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
+{ // analyse MC and real event info
   FillHisto1D("NEvents",0.5,1);
 
   AnalyseEvent(ev);
@@ -22,8 +29,8 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
   AliStack *stack = mcEvent->Stack();
 
   //for PID
-  AliESDpid *PID = new AliESDpid();
-  PID->MakePID(realEvent);
+  AliESDpid *pID = new AliESDpid();
+  pID->MakePID(realEvent);
 
   //This code taken from https://twiki.cern.ch/twiki/bin/view/ALICE/SelectionOfPrimaryTracksForPp2009DataAnalysis
   //Gets good tracks
@@ -41,30 +48,30 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
 
   
 
-  //ffesdtrackCutsITSTPC->SetEtaRange(-0.8,0.8); // normally, |eta|<0.8
+  //fEsdtrackCutsITSTPC->SetEtaRange(-0.8,0.8); // normally, |eta|<0.8
   //=============================================
 
   //Roughly following $ALICE_ROOT/PWG0/dNdEta/AlidNdEtaCorrectionTask
 
   //=============================================TPC&&ITS=============================================
-  TString *TPC = new TString("TPC");
-  TString *ITS = new TString("ITS");
-  TString *TPCITS = new TString("TPCITS");
+  TString *strTPC = new TString("TPC");
+  TString *strITS = new TString("ITS");
+  TString *strTPCITS = new TString("TPCITS");
   for(Int_t cutset=0;cutset<3;cutset++){
-    TString *CutName;
+    TString *cutName;
     TObjArray* list;
     switch(cutset){
     case 0:
-      CutName = TPC;
-      list = fesdtrackCutsTPC->GetAcceptedTracks(realEvent);
+      cutName = strTPC;
+      list = fEsdtrackCutsTPC->GetAcceptedTracks(realEvent);
       break;
     case 1:
-      CutName = ITS;
-      list = fesdtrackCutsITS->GetAcceptedTracks(realEvent);
+      cutName = strITS;
+      list = fEsdtrackCutsITS->GetAcceptedTracks(realEvent);
       break;
     case 2:
-      CutName = TPCITS;
-      list = ffesdtrackCutsITSTPC->GetAcceptedTracks(realEvent);
+      cutName = strTPCITS;
+      list = fEsdtrackCutsITSTPC->GetAcceptedTracks(realEvent);
       break;
     default:
       cerr<<"Error:  cannot fill histograms!"<<endl;
@@ -80,38 +87,38 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
            continue;
          }
        else{
-         bool IsGood = true;
+         bool isGood = true;
          if(cutset==1){//if these are ITS stand alone tracks, apply some specific cuts
            ULong_t trStatus=track->GetStatus();
-           if(trStatus&AliESDtrack::kTPCin) IsGood=false; // reject tracks found in TPC
-           if(trStatus&AliESDtrack::kITSpureSA) IsGood=false; // reject "pure standalone" ITS tracks
-           if(!(trStatus&AliESDtrack::kITSrefit)) IsGood = false; // require proper refit in ITS 
+           if(trStatus&AliESDtrack::kTPCin) isGood=false; // reject tracks found in TPC
+           if(trStatus&AliESDtrack::kITSpureSA) isGood=false; // reject "pure standalone" ITS tracks
+           if(!(trStatus&AliESDtrack::kITSrefit)) isGood = false; // require proper refit in ITS 
          }
-         if(!IsGood) continue;
+         if(!isGood) continue;
          Float_t nSigmaPion,nSigmaProton,nSigmaKaon,nSigmaElectron;
          if(cutset!=1){
-           nSigmaPion = TMath::Abs(PID->NumberOfSigmasTPC(track,AliPID::kPion));
-           nSigmaProton = TMath::Abs(PID->NumberOfSigmasTPC(track,AliPID::kProton));
-           nSigmaKaon = TMath::Abs(PID->NumberOfSigmasTPC(track,AliPID::kKaon));
-           nSigmaElectron = TMath::Abs(PID->NumberOfSigmasTPC(track,AliPID::kElectron));
+           nSigmaPion = TMath::Abs(pID->NumberOfSigmasTPC(track,AliPID::kPion));
+           nSigmaProton = TMath::Abs(pID->NumberOfSigmasTPC(track,AliPID::kProton));
+           nSigmaKaon = TMath::Abs(pID->NumberOfSigmasTPC(track,AliPID::kKaon));
+           nSigmaElectron = TMath::Abs(pID->NumberOfSigmasTPC(track,AliPID::kElectron));
          }
          else{
-           nSigmaPion = TMath::Abs(PID->NumberOfSigmasITS(track,AliPID::kPion));
-           nSigmaProton = TMath::Abs(PID->NumberOfSigmasITS(track,AliPID::kProton));
-           nSigmaKaon = TMath::Abs(PID->NumberOfSigmasITS(track,AliPID::kKaon));
-           nSigmaElectron = TMath::Abs(PID->NumberOfSigmasITS(track,AliPID::kElectron));
+           nSigmaPion = TMath::Abs(pID->NumberOfSigmasITS(track,AliPID::kPion));
+           nSigmaProton = TMath::Abs(pID->NumberOfSigmasITS(track,AliPID::kProton));
+           nSigmaKaon = TMath::Abs(pID->NumberOfSigmasITS(track,AliPID::kKaon));
+           nSigmaElectron = TMath::Abs(pID->NumberOfSigmasITS(track,AliPID::kElectron));
          }
-         bool IsPion = (nSigmaPion<3.0 && nSigmaProton>2.0 && nSigmaKaon>2.0);
-         bool IsElectron = (nSigmaElectron<2.0 && nSigmaPion>4.0 && nSigmaProton>3.0 && nSigmaKaon>3.0);
-         bool IsKaon = (nSigmaPion>3.0 && nSigmaProton>2.0 && nSigmaKaon<2.0);
-         bool IsProton = (nSigmaPion>3.0 && nSigmaProton<2.0 && nSigmaKaon>2.0);
+         bool isPion = (nSigmaPion<3.0 && nSigmaProton>2.0 && nSigmaKaon>2.0);
+         bool isElectron = (nSigmaElectron<2.0 && nSigmaPion>4.0 && nSigmaProton>3.0 && nSigmaKaon>3.0);
+         bool isKaon = (nSigmaPion>3.0 && nSigmaProton>2.0 && nSigmaKaon<2.0);
+         bool isProton = (nSigmaPion>3.0 && nSigmaProton<2.0 && nSigmaKaon>2.0);
 
          //bool IsElectron = false;
-         bool Unidentified = (!IsProton && !IsKaon && !IsElectron);
+         bool unidentified = (!isProton && !isKaon && !isElectron);
          Float_t dEdx = track->GetTPCsignal();
          if(cutset==1) dEdx = track->GetITSsignal();
 
-         FillHisto2D(Form("dEdxAll%s",CutName->Data()),track->P(),dEdx,1.0);
+         FillHisto2D(Form("dEdxAll%s",cutName->Data()),track->P(),dEdx,1.0);
          //if(cutset==1) cout<<"filling "<<track->P()<<" "<<dEdx<<endl;
 
          UInt_t label = (UInt_t)TMath::Abs(track->GetLabel());
@@ -139,140 +146,140 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
                bool filled = false;      
                //============Charged hadrons===================================
                //identified...
-               if(IsPion){
+               if(isPion){
                  if(pdgCode!=fPiPlusCode && pdgCode!=fPiMinusCode){
-                   FillHisto2D(Form("MisidentifiedPIDs%s",CutName->Data()),1,mypid,1);
+                   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;
                  }
                  float myEt = Et(simPart);
-                 if(track->Charge()>0){ FillHisto2D(Form("EtReconstructed%sIdentifiedPiPlus",CutName->Data()),track->Pt(),track->Eta(),myEt);}
-                 else{ FillHisto2D(Form("EtReconstructed%sIdentifiedPiMinus",CutName->Data()),track->Pt(),track->Eta(),myEt);}
-                 FillHisto2D(Form("dEdxPion%s",CutName->Data()),track->P(),dEdx,1.0);
+                 if(track->Charge()>0){ FillHisto2D(Form("EtReconstructed%sIdentifiedPiPlus",cutName->Data()),track->Pt(),track->Eta(),myEt);}
+                 else{ FillHisto2D(Form("EtReconstructed%sIdentifiedPiMinus",cutName->Data()),track->Pt(),track->Eta(),myEt);}
+                 FillHisto2D(Form("dEdxPion%s",cutName->Data()),track->P(),dEdx,1.0);
                }
-               if(IsProton){
+               if(isProton){
                  if(pdgCode!=fProtonCode && pdgCode!=fAntiProtonCode){
-                   FillHisto2D(Form("MisidentifiedPIDs%s",CutName->Data()),2,mypid,1);
+                   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;
                  }
                  float myEt = Et(simPart);
-                 if(track->Charge()>0){ FillHisto2D(Form("EtReconstructed%sIdentifiedProton",CutName->Data()),track->Pt(),track->Eta(),myEt);}
-                 else{ FillHisto2D(Form("EtReconstructed%sIdentifiedAntiProton",CutName->Data()),track->Pt(),track->Eta(),myEt);}
-                 FillHisto2D(Form("dEdxProton%s",CutName->Data()),track->P(),dEdx,1.0);
+                 if(track->Charge()>0){ FillHisto2D(Form("EtReconstructed%sIdentifiedProton",cutName->Data()),track->Pt(),track->Eta(),myEt);}
+                 else{ FillHisto2D(Form("EtReconstructed%sIdentifiedAntiProton",cutName->Data()),track->Pt(),track->Eta(),myEt);}
+                 FillHisto2D(Form("dEdxProton%s",cutName->Data()),track->P(),dEdx,1.0);
                }
-               if(IsKaon){
+               if(isKaon){
                  if(pdgCode!=fKMinusCode && pdgCode!=fKPlusCode){
-                   FillHisto2D(Form("MisidentifiedPIDs%s",CutName->Data()),3,mypid,1);
+                   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;
                  }
                  float myEt = Et(simPart);
-                 if(track->Charge()>0){ FillHisto2D(Form("EtReconstructed%sIdentifiedKPlus",CutName->Data()),track->Pt(),track->Eta(),myEt);}
-                 else{ FillHisto2D(Form("EtReconstructed%sIdentifiedKMinus",CutName->Data()),track->Pt(),track->Eta(),myEt);}
-                 FillHisto2D(Form("dEdxKaon%s",CutName->Data()),track->P(),dEdx,1.0);
+                 if(track->Charge()>0){ FillHisto2D(Form("EtReconstructed%sIdentifiedKPlus",cutName->Data()),track->Pt(),track->Eta(),myEt);}
+                 else{ FillHisto2D(Form("EtReconstructed%sIdentifiedKMinus",cutName->Data()),track->Pt(),track->Eta(),myEt);}
+                 FillHisto2D(Form("dEdxKaon%s",cutName->Data()),track->P(),dEdx,1.0);
                }
-               if(IsElectron){
+               if(isElectron){
                  if(pdgCode!=fEMinusCode && pdgCode!=fEPlusCode){
-                   FillHisto2D(Form("MisidentifiedPIDs%s",CutName->Data()),4,mypid,1);
+                   FillHisto2D(Form("MisidentifiedPIDs%s",cutName->Data()),4,mypid,1);
                    //cerr<<"I was misidentified!  I'm not an electron! I am a "<<simPart->GetName()<<endl;
                  }
                  float myEt = Et(simPart);
-                 if(track->Charge()>0){ FillHisto2D(Form("EtReconstructed%sIdentifiedEPlus",CutName->Data()),track->Pt(),track->Eta(),myEt);}
-                 else{ FillHisto2D(Form("EtReconstructed%sIdentifiedEMinus",CutName->Data()),track->Pt(),track->Eta(),myEt);}
-                 FillHisto2D(Form("dEdxElectron%s",CutName->Data()),track->P(),dEdx,1.0);
+                 if(track->Charge()>0){ FillHisto2D(Form("EtReconstructed%sIdentifiedEPlus",cutName->Data()),track->Pt(),track->Eta(),myEt);}
+                 else{ FillHisto2D(Form("EtReconstructed%sIdentifiedEMinus",cutName->Data()),track->Pt(),track->Eta(),myEt);}
+                 FillHisto2D(Form("dEdxElectron%s",cutName->Data()),track->P(),dEdx,1.0);
                }
-               if(Unidentified){
+               if(unidentified){
                  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);
-                   FillHisto2D(Form("EtNReconstructed%sUnidentified",CutName->Data()),track->Pt(),track->Eta(),1.0);
+                   FillHisto2D(Form("EtReconstructed%sUnidentifiedAssumingPion",cutName->Data()),track->Pt(),track->Eta(),myEtPi);
+                   FillHisto2D(Form("EtReconstructed%sUnidentified",cutName->Data()),track->Pt(),track->Eta(),myEt);
+                   FillHisto2D(Form("EtNReconstructed%sUnidentified",cutName->Data()),track->Pt(),track->Eta(),1.0);
                  }
-                 FillHisto2D(Form("dEdxUnidentified%s",CutName->Data()),track->P(),dEdx,1.0);
+                 FillHisto2D(Form("dEdxUnidentified%s",cutName->Data()),track->P(),dEdx,1.0);
                  //cout<<"I was not identified.  I am a "<<simPart->GetName()<<" PID "<<pdgCode<<endl;
                  //track what was not identified successfully
-                 FillHisto1D(Form("UnidentifiedPIDs%s",CutName->Data()),mypid,1);
+                 FillHisto1D(Form("UnidentifiedPIDs%s",cutName->Data()),mypid,1);
                }
                //...simulated
                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);
-                 FillHisto2D(Form("EtReconstructed%sPiPlus",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
-                 FillHisto2D(Form("EtReconstructed%sChargedHadron",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
-                 FillHisto2D(Form("EtNReconstructed%sPiPlus",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
-                 FillHisto2D(Form("EtNReconstructed%sChargedHadron",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
-                 FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
+                 FillHisto2D(Form("EtReconstructed%sPiPlus",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
+                 FillHisto2D(Form("EtReconstructed%sChargedHadron",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
+                 FillHisto2D(Form("EtNReconstructed%sPiPlus",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
+                 FillHisto2D(Form("EtNReconstructed%sChargedHadron",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
+                 FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
                  filled = true;
                }
                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);
-                 FillHisto2D(Form("EtNReconstructed%sPiMinus",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
-                 FillHisto2D(Form("EtNReconstructed%sChargedHadron",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
-                 FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
+                 FillHisto2D(Form("EtReconstructed%sPiMinus",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
+                 FillHisto2D(Form("EtReconstructed%sChargedHadron",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
+                 FillHisto2D(Form("EtNReconstructed%sPiMinus",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
+                 FillHisto2D(Form("EtNReconstructed%sChargedHadron",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
+                 FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
                  filled = true;
                }
                if(pdgCode == fKPlusCode){
                  float myEt = Et(simPart);
                  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);
-                 FillHisto2D(Form("EtNReconstructed%sChargedHadron",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
-                 FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",CutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
-                 FillHisto2D(Form("EtReconstructed%sKPlusAssumingPion",CutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
+                 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);
+                 FillHisto2D(Form("EtNReconstructed%sChargedHadron",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
+                 FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",cutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
+                 FillHisto2D(Form("EtReconstructed%sKPlusAssumingPion",cutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
                  filled = true;
                }
                if(pdgCode == fKMinusCode){
                  float myEt = Et(simPart);
                  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);
-                 FillHisto2D(Form("EtNReconstructed%sChargedHadron",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
-                 FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",CutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
-                 FillHisto2D(Form("EtReconstructed%sKMinusAssumingPion",CutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
+                 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);
+                 FillHisto2D(Form("EtNReconstructed%sChargedHadron",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
+                 FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",cutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
+                 FillHisto2D(Form("EtReconstructed%sKMinusAssumingPion",cutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
                  filled = true;
                }
                if(pdgCode == fProtonCode){
                  float myEt = Et(simPart);
                  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);
-                 FillHisto2D(Form("EtNReconstructed%sChargedHadron",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
-                 FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",CutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
-                 FillHisto2D(Form("EtReconstructed%sProtonAssumingPion",CutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
+                 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);
+                 FillHisto2D(Form("EtNReconstructed%sChargedHadron",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
+                 FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",cutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
+                 FillHisto2D(Form("EtReconstructed%sProtonAssumingPion",cutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
                  filled = true;
                }
                if(pdgCode == fAntiProtonCode){
                  float myEt = Et(simPart);
                  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);
-                 FillHisto2D(Form("EtNReconstructed%sChargedHadron",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
-                 FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",CutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
-                 FillHisto2D(Form("EtReconstructed%sAntiProtonAssumingPion",CutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
+                 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);
+                 FillHisto2D(Form("EtNReconstructed%sChargedHadron",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
+                 FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",cutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
+                 FillHisto2D(Form("EtReconstructed%sAntiProtonAssumingPion",cutName->Data()),simPart->Pt(),simPart->Eta(),myEtPi);
                  filled = true;
                }
                if(pdgCode == fEPlusCode){
                  float myEt = Et(simPart);
-                 FillHisto2D(Form("EtReconstructed%sEPlus",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
-                 if(!IsElectron || Unidentified){
+                 FillHisto2D(Form("EtReconstructed%sEPlus",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
+                 if(!isElectron || unidentified){
                    float myEtPi = Et(simPart,fPionMass);
-                   FillHisto2D(Form("EtReconstructed%sMisidentifiedElectrons",CutName->Data()),track->Pt(),track->Eta(),myEtPi);
+                   FillHisto2D(Form("EtReconstructed%sMisidentifiedElectrons",cutName->Data()),track->Pt(),track->Eta(),myEtPi);
                  }
                  filled = true;
                }
                if(pdgCode == fEMinusCode){
-                 if(!IsElectron || Unidentified){
+                 if(!isElectron || unidentified){
                    float myEtPi = Et(simPart,fPionMass);
-                   FillHisto2D(Form("EtReconstructed%sMisidentifiedElectrons",CutName->Data()),track->Pt(),track->Eta(),myEtPi);
+                   FillHisto2D(Form("EtReconstructed%sMisidentifiedElectrons",cutName->Data()),track->Pt(),track->Eta(),myEtPi);
                  }
                  float myEt = Et(simPart);
-                   FillHisto2D(Form("EtReconstructed%sEMinus",CutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
+                   FillHisto2D(Form("EtReconstructed%sEMinus",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt);
                    filled = true;
                }
                //if(!filled){
@@ -293,31 +300,31 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
                  Int_t pdgCode =  mom->GetPDG(0)->PdgCode();
                  if(pdgCode == fLambdaCode){
                    float myEt = Et(simPart);
-                   FillHisto2D(Form("EtReconstructed%sLambdaDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
+                   FillHisto2D(Form("EtReconstructed%sLambdaDaughters",cutName->Data()),track->Pt(),track->Eta(),myEt);
                  }
                  if(pdgCode == fAntiLambdaCode){
                    float myEt = Et(simPart);
-                   FillHisto2D(Form("EtReconstructed%sAntiLambdaDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
+                   FillHisto2D(Form("EtReconstructed%sAntiLambdaDaughters",cutName->Data()),track->Pt(),track->Eta(),myEt);
                  }
                  if(pdgCode == fK0SCode){
                    float myEt = Et(simPart);
-                   FillHisto2D(Form("EtReconstructed%sK0SDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
+                   FillHisto2D(Form("EtReconstructed%sK0SDaughters",cutName->Data()),track->Pt(),track->Eta(),myEt);
                  }
                  if(pdgCode == fXiCode){
                    float myEt = Et(simPart);
-                   FillHisto2D(Form("EtReconstructed%sXiDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
+                   FillHisto2D(Form("EtReconstructed%sXiDaughters",cutName->Data()),track->Pt(),track->Eta(),myEt);
                  }
                  if(pdgCode == fAntiXiCode){
                    float myEt = Et(simPart);
-                   FillHisto2D(Form("EtReconstructed%sAntiXiDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
+                   FillHisto2D(Form("EtReconstructed%sAntiXiDaughters",cutName->Data()),track->Pt(),track->Eta(),myEt);
                  }
                  if(pdgCode == fOmegaCode){
                    float myEt = Et(simPart);
-                   FillHisto2D(Form("EtReconstructed%sOmegaDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
+                   FillHisto2D(Form("EtReconstructed%sOmegaDaughters",cutName->Data()),track->Pt(),track->Eta(),myEt);
                  }
                  if(pdgCode == fXiCode){
                    float myEt = Et(simPart);
-                   FillHisto2D(Form("EtReconstructed%sAntiOmegaDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
+                   FillHisto2D(Form("EtReconstructed%sAntiOmegaDaughters",cutName->Data()),track->Pt(),track->Eta(),myEt);
                  }
 
                  if(mom->GetFirstMother()>0){
@@ -330,19 +337,19 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
                      
                        if(pdgCodeGrandma == fXiCode){
                          float myEt = Et(simPart);
-                         FillHisto2D(Form("EtReconstructed%sXiDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
+                         FillHisto2D(Form("EtReconstructed%sXiDaughters",cutName->Data()),track->Pt(),track->Eta(),myEt);
                        }
                        if(pdgCodeGrandma == fAntiXiCode){
                          float myEt = Et(simPart);
-                         FillHisto2D(Form("EtReconstructed%sAntiXiDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
+                         FillHisto2D(Form("EtReconstructed%sAntiXiDaughters",cutName->Data()),track->Pt(),track->Eta(),myEt);
                        }
                        if(pdgCodeGrandma == fOmegaCode){
                          float myEt = Et(simPart);
-                         FillHisto2D(Form("EtReconstructed%sOmegaDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
+                         FillHisto2D(Form("EtReconstructed%sOmegaDaughters",cutName->Data()),track->Pt(),track->Eta(),myEt);
                        }
                        if(pdgCodeGrandma == fXiCode){
                          float myEt = Et(simPart);
-                         FillHisto2D(Form("EtReconstructed%sAntiOmegaDaughters",CutName->Data()),track->Pt(),track->Eta(),myEt);
+                         FillHisto2D(Form("EtReconstructed%sAntiOmegaDaughters",cutName->Data()),track->Pt(),track->Eta(),myEt);
                        }
 
                      }
@@ -361,7 +368,7 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2){
   return 1;
 }
 Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
-{
+{ // analyse MC event
      ResetEventValues();
      
     // Get us an mc event
@@ -732,21 +739,10 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
 }
 
 void AliAnalysisHadEtMonteCarlo::Init()
-{
-
+{ // Init
     AliAnalysisHadEt::Init();
-
-    fVertexXCut = EtReconstructedCuts::kVertexXCut;
-    fVertexYCut = EtReconstructedCuts::kVertexYCut;
-    fVertexZCut = EtReconstructedCuts::kVertexZCut;
-    fIPxyCut = EtReconstructedCuts::kIPxyCut;
-    fIPzCut = EtReconstructedCuts::kIPzCut;
-    // Track cuts
-    //Bool_t selectPrimaries=kTRUE;
-    //ffesdtrackCutsITSTPC = AliESDtrackCuts::GetStandardITSTPCTrackCuts2009(selectPrimaries);
-    //ffesdtrackCutsITSTPC = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
-
 }
+
 void AliAnalysisHadEtMonteCarlo::CreateHistograms(){
   //for simulated Et only (no reconstruction)
   CreateEtaPtHisto2D(TString("EtSimulatedPiPlus"),TString("Simulated E_{T} from #pi^{+}"));
@@ -797,87 +793,87 @@ void AliAnalysisHadEtMonteCarlo::CreateHistograms(){
   CreateEtaPtHisto2D("EtSimulatedXiDaughters","Simulated E_{T} from #Xi^{-} Daughters");
   CreateEtaPtHisto2D("EtSimulatedAntiXiDaughters","Simulated E_{T} from #Xi^{+} Daughters");
 
-  TString *TPC = new TString("TPC");
-  TString *ITS = new TString("ITS");
-  TString *TPCITS = new TString("TPCITS");
+  TString *strTPC = new TString("TPC");
+  TString *strITS = new TString("ITS");
+  TString *strTPCITS = new TString("TPCITS");
   for(Int_t i=0;i<3;i++){
-    TString *CutName;
+    TString *cutName;
     Float_t maxPtdEdx = 10;
     Float_t mindEdx = 35;
     Float_t maxdEdx = 150.0;
     switch(i){
     case 0:
-      CutName = TPC;
+      cutName = strTPC;
       break;
     case 1:
-      CutName = ITS;
+      cutName = strITS;
       maxPtdEdx = 5;
       maxdEdx = 500.0;
       break;
     case 2:
-      CutName = TPCITS;
+      cutName = strTPCITS;
       break;
     default:
       cerr<<"Error:  cannot make histograms!"<<endl;
       return;
     }
 
-    CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedPiPlus",CutName->Data()),"Reconstructed E_{T} from identified #pi^{+}");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedPiMinus",CutName->Data()),"Reconstructed E_{T} from identified #pi^{-}");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedKPlus",CutName->Data()),"Reconstructed E_{T} from identified K^{+}");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedEMinus",CutName->Data()),"Reconstructed E_{T} from identified e^{-}");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedEPlus",CutName->Data()),"Reconstructed E_{T} from identified e^{+}");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedKMinus",CutName->Data()),"Reconstructed E_{T} from identified K^{-}");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedProton",CutName->Data()),"Reconstructed E_{T} from identified p");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedAntiProton",CutName->Data()),"Reconstructed E_{T} from identified #bar{p}");
-    CreateEtaPtHisto2D(Form("EtNReconstructed%sUnidentified",CutName->Data()),"Number of Reconstructed unidentified particles");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedAssumingPion",CutName->Data()),"Reconstructed E_{T} from unidentified particles assuming pion mass");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentified",CutName->Data()),"Reconstructed E_{T} from unidentified particles using real mass");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sMisidentifiedElectrons",CutName->Data()),"Reconstructed E_{T} from misidentified electrons");
-
-
-    CreateEtaPtHisto2D(Form("EtReconstructed%sPiPlus",CutName->Data()),"Reconstructed E_{T} from #pi^{+}");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sPiMinus",CutName->Data()),"Reconstructed E_{T} from #pi^{-}");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sKPlus",CutName->Data()),"Reconstructed E_{T} from K^{+}");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sKMinus",CutName->Data()),"Reconstructed E_{T} from K^{-}");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sProton",CutName->Data()),"Reconstructed E_{T} from p");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sAntiProton",CutName->Data()),"Reconstructed E_{T} from #bar{p}");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sChargedHadron",CutName->Data()),"Reconstructed E_{T} from charged hadrons");
-    CreateEtaPtHisto2D(Form("EtNReconstructed%sPiPlus",CutName->Data()),"Reconstructed E_{T} from #pi^{+}");
-    CreateEtaPtHisto2D(Form("EtNReconstructed%sPiMinus",CutName->Data()),"Reconstructed E_{T} from #pi^{-}");
-    CreateEtaPtHisto2D(Form("EtNReconstructed%sKPlus",CutName->Data()),"Reconstructed E_{T} from K^{+}");
-    CreateEtaPtHisto2D(Form("EtNReconstructed%sKMinus",CutName->Data()),"Reconstructed E_{T} from K^{-}");
-    CreateEtaPtHisto2D(Form("EtNReconstructed%sProton",CutName->Data()),"Reconstructed E_{T} from p");
-    CreateEtaPtHisto2D(Form("EtNReconstructed%sAntiProton",CutName->Data()),"Reconstructed E_{T} from #bar{p}");
-    CreateEtaPtHisto2D(Form("EtNReconstructed%sChargedHadron",CutName->Data()),"Reconstructed E_{T} from charged hadrons");
-
-    CreateEtaPtHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",CutName->Data()),"Reconstructed E_{T} from charged hadrons assuming they are all pions");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sKPlusAssumingPion",CutName->Data()),"Reconstructed E_{T} from K^{+} assuming #pi mass");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sKMinusAssumingPion",CutName->Data()),"Reconstructed E_{T} from K^{-} assuming #pi mass");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sProtonAssumingPion",CutName->Data()),"Reconstructed E_{T} from p assuming #pi mass");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sAntiProtonAssumingPion",CutName->Data()),"Reconstructed E_{T} from #bar{p} assuming #pi mass");
-
-    CreateEtaPtHisto2D(Form("EtReconstructed%sEPlus",CutName->Data()),"Reconstructed E_{T} from e^{+}");
-    CreateEtaPtHisto2D(Form("EtReconstructed%sEMinus",CutName->Data()),"Reconstructed E_{T} from e^{-}");
-
-
-
-    CreateEtaPtHisto2D(Form("EtReconstructed%sLambdaDaughters",CutName->Data()),"Reconstructed E_{T} from #Lambda Daughters");
-  CreateEtaPtHisto2D(Form("EtReconstructed%sAntiLambdaDaughters",CutName->Data()),"Reconstructed E_{T} from #bar{#Lambda} Daughters");
-  CreateEtaPtHisto2D(Form("EtReconstructed%sK0SDaughters",CutName->Data()),"Reconstructed E_{T} from K^{0}_{S} Daughters");
-  CreateEtaPtHisto2D(Form("EtReconstructed%sOmegaDaughters",CutName->Data()),"Reconstructed E_{T} from #Omega^{-} Daughters");
-  CreateEtaPtHisto2D(Form("EtReconstructed%sAntiOmegaDaughters",CutName->Data()),"Reconstructed E_{T} from #Omega^{+} Daughters");
-  CreateEtaPtHisto2D(Form("EtReconstructed%sXiDaughters",CutName->Data()),"Reconstructed E_{T} from #Xi^{-} Daughters");
-  CreateEtaPtHisto2D(Form("EtReconstructed%sAntiXiDaughters",CutName->Data()),"Reconstructed E_{T} from #Xi^{+} Daughters");
-
-    CreateIntHisto1D(Form("UnidentifiedPIDs%s",CutName->Data()),"PIDs of unidentified particles", "PID", "Number of particles",9, -4,4);
-    CreateHisto2D(Form("MisidentifiedPIDs%s",CutName->Data()),"PIDs of misidentified particles", "PID real","PID identified",5, -.5,4.5,5, -.5,4.5);
-    CreateHisto2D(Form("dEdxAll%s",CutName->Data()),"dE/dx for all particles","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx);
-    CreateHisto2D(Form("dEdxPion%s",CutName->Data()),"dE/dx for #pi^{#pm}","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx);
-    CreateHisto2D(Form("dEdxKaon%s",CutName->Data()),"dE/dx for K^{#pm}","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx);
-    CreateHisto2D(Form("dEdxProton%s",CutName->Data()),"dE/dx for p(#bar{p})","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx);
-    CreateHisto2D(Form("dEdxElectron%s",CutName->Data()),"dE/dx for e^{#pm}","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx);
-    CreateHisto2D(Form("dEdxUnidentified%s",CutName->Data()),"dE/dx for unidentified particles","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx);
+    CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedPiPlus",cutName->Data()),"Reconstructed E_{T} from identified #pi^{+}");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedPiMinus",cutName->Data()),"Reconstructed E_{T} from identified #pi^{-}");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedKPlus",cutName->Data()),"Reconstructed E_{T} from identified K^{+}");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedEMinus",cutName->Data()),"Reconstructed E_{T} from identified e^{-}");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedEPlus",cutName->Data()),"Reconstructed E_{T} from identified e^{+}");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedKMinus",cutName->Data()),"Reconstructed E_{T} from identified K^{-}");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedProton",cutName->Data()),"Reconstructed E_{T} from identified p");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedAntiProton",cutName->Data()),"Reconstructed E_{T} from identified #bar{p}");
+    CreateEtaPtHisto2D(Form("EtNReconstructed%sUnidentified",cutName->Data()),"Number of Reconstructed unidentified particles");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedAssumingPion",cutName->Data()),"Reconstructed E_{T} from unidentified particles assuming pion mass");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentified",cutName->Data()),"Reconstructed E_{T} from unidentified particles using real mass");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sMisidentifiedElectrons",cutName->Data()),"Reconstructed E_{T} from misidentified electrons");
+
+
+    CreateEtaPtHisto2D(Form("EtReconstructed%sPiPlus",cutName->Data()),"Reconstructed E_{T} from #pi^{+}");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sPiMinus",cutName->Data()),"Reconstructed E_{T} from #pi^{-}");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sKPlus",cutName->Data()),"Reconstructed E_{T} from K^{+}");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sKMinus",cutName->Data()),"Reconstructed E_{T} from K^{-}");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sProton",cutName->Data()),"Reconstructed E_{T} from p");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sAntiProton",cutName->Data()),"Reconstructed E_{T} from #bar{p}");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sChargedHadron",cutName->Data()),"Reconstructed E_{T} from charged hadrons");
+    CreateEtaPtHisto2D(Form("EtNReconstructed%sPiPlus",cutName->Data()),"Reconstructed E_{T} from #pi^{+}");
+    CreateEtaPtHisto2D(Form("EtNReconstructed%sPiMinus",cutName->Data()),"Reconstructed E_{T} from #pi^{-}");
+    CreateEtaPtHisto2D(Form("EtNReconstructed%sKPlus",cutName->Data()),"Reconstructed E_{T} from K^{+}");
+    CreateEtaPtHisto2D(Form("EtNReconstructed%sKMinus",cutName->Data()),"Reconstructed E_{T} from K^{-}");
+    CreateEtaPtHisto2D(Form("EtNReconstructed%sProton",cutName->Data()),"Reconstructed E_{T} from p");
+    CreateEtaPtHisto2D(Form("EtNReconstructed%sAntiProton",cutName->Data()),"Reconstructed E_{T} from #bar{p}");
+    CreateEtaPtHisto2D(Form("EtNReconstructed%sChargedHadron",cutName->Data()),"Reconstructed E_{T} from charged hadrons");
+
+    CreateEtaPtHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",cutName->Data()),"Reconstructed E_{T} from charged hadrons assuming they are all pions");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sKPlusAssumingPion",cutName->Data()),"Reconstructed E_{T} from K^{+} assuming #pi mass");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sKMinusAssumingPion",cutName->Data()),"Reconstructed E_{T} from K^{-} assuming #pi mass");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sProtonAssumingPion",cutName->Data()),"Reconstructed E_{T} from p assuming #pi mass");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sAntiProtonAssumingPion",cutName->Data()),"Reconstructed E_{T} from #bar{p} assuming #pi mass");
+
+    CreateEtaPtHisto2D(Form("EtReconstructed%sEPlus",cutName->Data()),"Reconstructed E_{T} from e^{+}");
+    CreateEtaPtHisto2D(Form("EtReconstructed%sEMinus",cutName->Data()),"Reconstructed E_{T} from e^{-}");
+
+
+
+    CreateEtaPtHisto2D(Form("EtReconstructed%sLambdaDaughters",cutName->Data()),"Reconstructed E_{T} from #Lambda Daughters");
+  CreateEtaPtHisto2D(Form("EtReconstructed%sAntiLambdaDaughters",cutName->Data()),"Reconstructed E_{T} from #bar{#Lambda} Daughters");
+  CreateEtaPtHisto2D(Form("EtReconstructed%sK0SDaughters",cutName->Data()),"Reconstructed E_{T} from K^{0}_{S} Daughters");
+  CreateEtaPtHisto2D(Form("EtReconstructed%sOmegaDaughters",cutName->Data()),"Reconstructed E_{T} from #Omega^{-} Daughters");
+  CreateEtaPtHisto2D(Form("EtReconstructed%sAntiOmegaDaughters",cutName->Data()),"Reconstructed E_{T} from #Omega^{+} Daughters");
+  CreateEtaPtHisto2D(Form("EtReconstructed%sXiDaughters",cutName->Data()),"Reconstructed E_{T} from #Xi^{-} Daughters");
+  CreateEtaPtHisto2D(Form("EtReconstructed%sAntiXiDaughters",cutName->Data()),"Reconstructed E_{T} from #Xi^{+} Daughters");
+
+    CreateIntHisto1D(Form("UnidentifiedPIDs%s",cutName->Data()),"PIDs of unidentified particles", "PID", "Number of particles",9, -4,4);
+    CreateHisto2D(Form("MisidentifiedPIDs%s",cutName->Data()),"PIDs of misidentified particles", "PID real","PID identified",5, -.5,4.5,5, -.5,4.5);
+    CreateHisto2D(Form("dEdxAll%s",cutName->Data()),"dE/dx for all particles","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx);
+    CreateHisto2D(Form("dEdxPion%s",cutName->Data()),"dE/dx for #pi^{#pm}","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx);
+    CreateHisto2D(Form("dEdxKaon%s",cutName->Data()),"dE/dx for K^{#pm}","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx);
+    CreateHisto2D(Form("dEdxProton%s",cutName->Data()),"dE/dx for p(#bar{p})","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx);
+    CreateHisto2D(Form("dEdxElectron%s",cutName->Data()),"dE/dx for e^{#pm}","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx);
+    CreateHisto2D(Form("dEdxUnidentified%s",cutName->Data()),"dE/dx for unidentified particles","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx);
   }
 
   CreateIntHisto1D("NEvents","Number of events","number of events","Number of events",1,0,1);
index 450e946..2fa7cf5 100644 (file)
@@ -1,11 +1,16 @@
-//Create by Christine Nattrass, Rebecca Scott, Irakli Martashvili
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies, charged hadrons
+//  Base class for MC analysis
+//  - MC output
+// 
+//Created by Christine Nattrass, Rebecca Scott, Irakli Martashvili
 //University of Tennessee at Knoxville
+//_________________________________________________________________________
 #ifndef ALIANALYSISHADETMONTECARLO_H
 #define ALIANALYSISHADETMONTECARLO_H
 
 #include "AliAnalysisHadEt.h"
-#include "AliESDtrackCuts.h"
-#include <iostream>
+class AliVEvent;
 
 class AliAnalysisHadEtMonteCarlo : public AliAnalysisHadEt
 {
@@ -13,6 +18,7 @@ class AliAnalysisHadEtMonteCarlo : public AliAnalysisHadEt
 public:
    
     AliAnalysisHadEtMonteCarlo() {}
+    virtual ~AliAnalysisHadEtMonteCarlo() {}
    
     virtual Int_t AnalyseEvent(AliVEvent* event);
     virtual Int_t AnalyseEvent(AliVEvent* event,AliVEvent* event2);
@@ -22,7 +28,7 @@ public:
     virtual void Init();
     
  private:
-    //AliESDtrackCuts* ffesdtrackCutsITSTPC;
+
 };
 
 #endif // ALIANALYSISHADETMONTECARLO_H
index feaa7d4..c79313f 100644 (file)
@@ -1,28 +1,33 @@
-
-//Create by Christine Nattrass, Rebecca Scott, Irakli Martashvili
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies, charged hadrons
+//  Base class for ESD analysis
+//  - reconstruction output
+// implementation file
+//
+//Created by Christine Nattrass, Rebecca Scott, Irakli Martashvili
 //University of Tennessee at Knoxville
+//_________________________________________________________________________
 #include "AliAnalysisHadEtReconstructed.h"
 #include "AliAnalysisEtCuts.h"
 #include "AliESDtrack.h"
 #include "AliESDCaloCluster.h"
-#include "TVector3.h"
 #include "AliVEvent.h"
 #include "AliESDEvent.h"
 #include "AliVParticle.h"
 #include <iostream>
-#include "TH2F.h"
 
 AliAnalysisHadEtReconstructed::AliAnalysisHadEtReconstructed() :
         AliAnalysisHadEt()
-        ,fNTpcClustersCut(EtReconstructedCuts::kNTpcClustersCut)
-        ,fNItsClustersCut(EtReconstructedCuts::knItsClustersCut)
-        ,fTrackDistanceCut(0)
 {
 
 }
 
-Int_t AliAnalysisHadEtReconstructed::AnalyseEvent(AliVEvent* ev)
+AliAnalysisHadEtReconstructed::~AliAnalysisHadEtReconstructed() 
 {
+}
+
+Int_t AliAnalysisHadEtReconstructed::AnalyseEvent(AliVEvent* ev)
+{ // analyse ESD event
     ResetEventValues();
     AliESDEvent *event = dynamic_cast<AliESDEvent*>(ev);
 
@@ -71,7 +76,7 @@ Int_t AliAnalysisHadEtReconstructed::AnalyseEvent(AliVEvent* ev)
 }
 
 bool AliAnalysisHadEtReconstructed::CheckGoodVertex(AliVParticle* track)
-{
+{ // check vertex
 
     Float_t bxy = 999.;
     Float_t bz = 999.;
@@ -82,16 +87,8 @@ bool AliAnalysisHadEtReconstructed::CheckGoodVertex(AliVParticle* track)
 }
 
 void AliAnalysisHadEtReconstructed::Init()
-{
-
+{ // Init
     AliAnalysisHadEt::Init();
-
-    fVertexXCut = EtReconstructedCuts::kVertexXCut;
-    fVertexYCut = EtReconstructedCuts::kVertexYCut;
-    fVertexZCut = EtReconstructedCuts::kVertexZCut;
-    fIPxyCut = EtReconstructedCuts::kIPxyCut;
-    fIPzCut = EtReconstructedCuts::kIPzCut;
-
 }
 
 
index d71bf1f..8c51693 100644 (file)
@@ -1,5 +1,11 @@
-//Create by Christine Nattrass, Rebecca Scott, Irakli Martashvili
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies, charged hadrons
+//  Base class for ESD analysis
+//  - reconstruction output
+//
+//Created by Christine Nattrass, Rebecca Scott, Irakli Martashvili
 //University of Tennessee at Knoxville
+//_________________________________________________________________________
 #ifndef ALIANALYSISHADETRECONSTRUCTED_H
 #define ALIANALYSISHADETRECONSTRUCTED_H
 
@@ -13,6 +19,7 @@ class AliAnalysisHadEtReconstructed : public AliAnalysisHadEt
 public:
    
     AliAnalysisHadEtReconstructed();
+    virtual ~AliAnalysisHadEtReconstructed();
    
     virtual Int_t AnalyseEvent(AliVEvent* event);
 
@@ -22,12 +29,6 @@ protected:
 
     bool CheckGoodVertex(AliVParticle *track);
     //virtual bool TrackHitsCalorimeter(AliVParticle *track, Double_t magField) = 0;
-
-    Int_t fNTpcClustersCut;
-    Int_t fNItsClustersCut;
-   
-    Double_t fTrackDistanceCut;
-    
 };
 
 #endif // ALIANALYSISHADETRECONSTRUCTED_H
index 487cbd5..d781665 100644 (file)
@@ -1,31 +1,26 @@
-//Create by Christine Nattrass, Rebecca Scott, Irakli Martashvili
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies; charged hadrons
+//  Task for analysis
+//  - reconstruction and MC output
+// implementation file
+//
+//Created by Christine Nattrass, Rebecca Scott, Irakli Martashvili
 //University of Tennessee at Knoxville
+//_________________________________________________________________________
+
 #include "TChain.h"
-#include "TTree.h"
-#include "TH1F.h"
+#include "TList.h"
 #include "TH2F.h"
-#include "TNtuple.h"
-#include "TCanvas.h"
-#include "TMath.h"
-#include "TObjArray.h"
-
-#include "AliAnalysisTask.h"
-#include "AliAnalysisManager.h"
 
 #include "AliESDEvent.h"
-#include "AliAODEvent.h"
-#include "AliVEvent.h"
-#include "AliVTrack.h"
-#include "AliVParticle.h"
-#include "AliESDtrack.h"
-#include "AliESDInputHandler.h"
 #include "AliMCEvent.h"
-#include "AliMCParticle.h"
-#include "TDatabasePDG.h"
+#include "AliESDtrackCuts.h"
+
 #include "AliAnalysisTaskHadEt.h"
+#include "AliAnalysisHadEtReconstructed.h"
+#include "AliAnalysisHadEtMonteCarlo.h"
 
 #include <iostream>
-#include "AliStack.h"
 
 using namespace std;
 
@@ -36,21 +31,13 @@ ClassImp(AliAnalysisTaskHadEt)
 //________________________________________________________________________
 AliAnalysisTaskHadEt::AliAnalysisTaskHadEt(const char *name) :
         AliAnalysisTaskSE(name)
-        ,fESD(0)
         ,fOutputList(0)
         ,fRecAnalysis(0)
         ,fMCAnalysis(0)
         ,fHistEtRecvsEtMC(0)
-        ,fTriggerSelection(false)
-        ,fCount(0)
-        ,fkPhotonPdg(22)
-        ,fkProtonMass(.938)
-        ,fPdgDB(0)
-        ,fRecEventVars(0)
-        ,fSimEventVars(0)
-        ,ffesdtrackCutsITSTPC(0)
-        ,fesdtrackCutsTPC(0)
-        ,fesdtrackCutsITS(0)
+        ,fEsdtrackCutsITSTPC(0)
+        ,fEsdtrackCutsTPC(0)
+        ,fEsdtrackCutsITS(0)
 {
     // Constructor
 
@@ -58,10 +45,6 @@ AliAnalysisTaskHadEt::AliAnalysisTaskHadEt(const char *name) :
     fRecAnalysis->Init();
     fMCAnalysis = new AliAnalysisHadEtMonteCarlo();
     fMCAnalysis->Init();
-    if(!fPdgDB) fPdgDB = new TDatabasePDG();
-
-    fTriggerSelection = false;
-    fCount = 0;
 
     // Define input and output slots here
     // Input slot #0 works with a TChain
@@ -88,26 +71,26 @@ void AliAnalysisTaskHadEt::UserCreateOutputObjects()
 
 
     Bool_t selectPrimaries=kTRUE;
-    ffesdtrackCutsITSTPC = AliESDtrackCuts::GetStandardITSTPCTrackCuts2009(selectPrimaries);
-    ffesdtrackCutsITSTPC->SetName("fEsdTrackCuts");
-    fesdtrackCutsTPC = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
-    fesdtrackCutsTPC->SetName("fEsdTrackCutsTPCOnly");
+    fEsdtrackCutsITSTPC = AliESDtrackCuts::GetStandardITSTPCTrackCuts2009(selectPrimaries);
+    fEsdtrackCutsITSTPC->SetName("fEsdTrackCuts");
+    fEsdtrackCutsTPC = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
+    fEsdtrackCutsTPC->SetName("fEsdTrackCutsTPCOnly");
     //ITS stand alone cuts - similar to 2009 cuts but with only ITS hits required
-    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){
+    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(fEsdtrackCutsITSTPC);
+    fOutputList->Add(fEsdtrackCutsTPC);
+    fOutputList->Add(fEsdtrackCutsITS);
+    if(fEsdtrackCutsITSTPC && fEsdtrackCutsTPC){
       fRecAnalysis->SetITSTrackCuts( GetITSTrackCuts());
       fMCAnalysis->SetITSTrackCuts( GetITSTrackCuts());
       fRecAnalysis->SetTPCITSTrackCuts( GetTPCITSTrackCuts());
@@ -124,7 +107,7 @@ void AliAnalysisTaskHadEt::UserCreateOutputObjects()
 
 //________________________________________________________________________
 void AliAnalysisTaskHadEt::UserExec(Option_t *)
-{
+{ // execute method
   AliESDEvent *event = dynamic_cast<AliESDEvent*>(InputEvent());
 if (!event) {
   Printf("ERROR: Could not retrieve event");
index e43fefa..ccf731c 100644 (file)
@@ -1,40 +1,22 @@
-//Create by Christine Nattrass, Rebecca Scott, Irakli Martashvili\r
+//_________________________________________________________________________\r
+//  Utility Class for transverse energy studies; charged hadrons\r
+//  Task for analysis\r
+//  - reconstruction and MC output\r
+//\r
+//Created by Christine Nattrass, Rebecca Scott, Irakli Martashvili\r
 //University of Tennessee at Knoxville\r
-#ifndef AliAnalysisTaskHadEt_cxx\r
-#define AliAnalysisTaskHadEt_cxx\r
+//_________________________________________________________________________\r
+#ifndef ALIANALYSISTASKHADET_H \r
+#define ALIANALYSISTASKHADET_H \r
 \r
-class AliAnalysisHadEt;\r
-class TTree;\r
-class AliVParticle;\r
-class TH1F;\r
+class AliAnalysisHadEtReconstructed;\r
+class AliAnalysisHadEtMonteCarlo;\r
+class AliESDtrackCuts;\r
 class TH2F;\r
-class TNtuple;\r
-class TObjArray;\r
-class AliESDEvent;\r
-class AliMCParticle;\r
-class TDatabasePDG;\r
+class TList;\r
 \r
 #include "AliAnalysisTaskSE.h"\r
-#include "TObject.h"\r
-#include "AliAnalysisHadEtReconstructed.h"\r
-#include "AliAnalysisHadEtMonteCarlo.h"\r
 \r
-/* class ParticleVars : public TObject        // Inherit from TObject to put in TClonesArray */\r
-/*     { */\r
-/*        public: */\r
-         \r
-/*       ParticleVars() : TObject(){} */\r
-/*        Int_t fPdgCode; // from MC */\r
-/*        Int_t fPid; //from ESDs */\r
-/*        Int_t fMass; */\r
-/*        Int_t fCharge; */\r
-/*        Double_t fEt; */\r
-/*        Double_t fPhi; */\r
-/*        Double_t fEta; */\r
-\r
-/*        ClassDef(ParticleVars, 1); */\r
-       \r
-/*     }; */\r
 \r
 class AliAnalysisTaskHadEt : public AliAnalysisTaskSE {\r
 public:\r
@@ -46,10 +28,6 @@ public:
     virtual void   UserExec(Option_t *option);\r
     virtual void   Terminate(Option_t *);\r
 \r
-    virtual void SetTriggerSelection(Bool_t v) {\r
-        fTriggerSelection = v;\r
-    }\r
-\r
     AliESDtrackCuts* GetTPCITSTrackCuts(){return (AliESDtrackCuts*) fOutputList->FindObject("fEsdTrackCuts");}\r
     AliESDtrackCuts* GetTPCOnlyTrackCuts(){return (AliESDtrackCuts*) fOutputList->FindObject("fEsdTrackCutsTPCOnly");}\r
     AliESDtrackCuts* GetITSTrackCuts(){return (AliESDtrackCuts*) fOutputList->FindObject("fEsdTrackCutsITS");}\r
@@ -60,52 +38,16 @@ private:
     AliAnalysisTaskHadEt & operator = (const AliAnalysisTaskHadEt & g) ;//cpy assignment\r
     AliAnalysisTaskHadEt(const AliAnalysisTaskHadEt & g) ; // cpy ctor\r
 \r
-    bool CheckGoodVertex(AliVParticle *track);\r
-    bool TrackHits(AliVParticle *track, Double_t magField);\r
-\r
-\r
-    AliESDEvent *fESD;    //ESD object\r
-\r
-    TList *fOutputList;\r
-\r
-    AliAnalysisHadEtReconstructed *fRecAnalysis;\r
-    AliAnalysisHadEtMonteCarlo *fMCAnalysis;\r
-\r
-    TH2F *fHistEtRecvsEtMC;\r
-    \r
-    Bool_t fTriggerSelection;\r
-\r
-    Int_t fCount;\r
-\r
-    const int fkPhotonPdg;\r
-\r
-    const Float_t fkProtonMass;\r
-\r
-    TDatabasePDG *fPdgDB;\r
-\r
-    class EventVars\r
-    {\r
-       public:\r
-        Double_t fTotEt;\r
-       Double_t fTotEtAcc;\r
-        Double_t fTotEnergy;\r
-\r
-        Double_t fTotNeutralEt;\r
-       Double_t fTotNeutralEtAcc;\r
-\r
-        Double_t fTotChargedEt;\r
-        Double_t fTotChargedEtAcc;\r
+    TList *fOutputList; //output list\r
 \r
-        Int_t fChargedMultiplicity;\r
-        Int_t fNeutralMultiplicity;\r
+    AliAnalysisHadEtReconstructed *fRecAnalysis; // Rec\r
+    AliAnalysisHadEtMonteCarlo *fMCAnalysis; // MC\r
 \r
-    };\r
+    TH2F *fHistEtRecvsEtMC; // Rec vs MC histo \r
     \r
-    EventVars *fRecEventVars;\r
-    EventVars *fSimEventVars;\r
-    AliESDtrackCuts* ffesdtrackCutsITSTPC;\r
-    AliESDtrackCuts* fesdtrackCutsTPC;\r
-    AliESDtrackCuts* fesdtrackCutsITS;\r
+    AliESDtrackCuts* fEsdtrackCutsITSTPC; // track cuts ITS&TPC\r
+    AliESDtrackCuts* fEsdtrackCutsTPC; // track cuts TPC\r
+    AliESDtrackCuts* fEsdtrackCutsITS; // track cuts ITS\r
     \r
     ClassDef(AliAnalysisTaskHadEt, 1); // example of analysis\r
 };\r
index ec27528..66700e3 100644 (file)
@@ -1,27 +1,19 @@
+//_________________________________________________________________________
+//  Utility Class for transverse energy studies
+//  Task for analysis
+//  - reconstruction and MC output
+// implementation file
+//
+//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
+//_________________________________________________________________________
+
 #include "TChain.h"
-#include "TTree.h"
-#include "TH1F.h"
+#include "TList.h"
 #include "TH2F.h"
-#include "TNtuple.h"
-#include "TCanvas.h"
-#include "TMath.h"
-#include "TObjArray.h"
-
-#include "AliAnalysisTask.h"
-#include "AliAnalysisManager.h"
 
 #include "AliESDEvent.h"
-#include "AliAODEvent.h"
-#include "AliVEvent.h"
-#include "AliVTrack.h"
-#include "AliVParticle.h"
-#include "AliESDCaloCluster.h"
-#include "AliESDCaloCells.h"
-#include "AliESDtrack.h"
-#include "AliESDInputHandler.h"
 #include "AliMCEvent.h"
-#include "AliMCParticle.h"
-#include "TDatabasePDG.h"
+
 #include "AliAnalysisTaskTotEt.h"
 #include "AliAnalysisEtReconstructedPhos.h"
 #include "AliAnalysisEtReconstructedEmcal.h"
@@ -29,7 +21,6 @@
 #include "AliAnalysisEtMonteCarloEmcal.h"
 
 #include <iostream>
-#include "AliStack.h"
 
 using namespace std;
 
@@ -38,20 +29,10 @@ ClassImp(AliAnalysisTaskTotEt)
 //________________________________________________________________________
 AliAnalysisTaskTotEt::AliAnalysisTaskTotEt(const char *name) :
         AliAnalysisTaskSE(name)
-        ,fESD(0)
         ,fOutputList(0)
         ,fRecAnalysis(0)
         ,fMCAnalysis(0)
         ,fHistEtRecvsEtMC(0)
-        ,fTriggerSelection(false)
-        ,fCount(0)
-        ,fkPhotonPdg(22)
-        ,fkProtonMass(.938)
-        ,fPdgDB(0)
-        ,fRecEventVars(0)
-        ,fSimEventVars(0)
-        ,fRecParticleArray(0)
-        ,fSimParticleArray(0)
 {
     // Constructor
 
@@ -71,9 +52,6 @@ AliAnalysisTaskTotEt::AliAnalysisTaskTotEt(const char *name) :
     fRecAnalysis->Init();
     fMCAnalysis->Init();
 
-    fPdgDB = new TDatabasePDG();
-
-
     // Define input and output slots here
     // Input slot #0 works with a TChain
     DefineInput(0, TChain::Class());
@@ -100,8 +78,8 @@ void AliAnalysisTaskTotEt::UserCreateOutputObjects()
 
 //________________________________________________________________________
 void AliAnalysisTaskTotEt::UserExec(Option_t *)
-{
-    AliESDEvent *event = dynamic_cast<AliESDEvent*>(InputEvent());
+{ // execute method
+  AliESDEvent *event = dynamic_cast<AliESDEvent*>(InputEvent());
     if (!event) {
         Printf("ERROR: Could not retrieve event");
         return;
index b3224fd..2062c0a 100644 (file)
@@ -1,38 +1,20 @@
-#ifndef AliAnalysisTaskTotEt_cxx\r
-#define AliAnalysisTaskTotEt_cxx\r
+#ifndef ALIANALYSISTASKTOTET_H \r
+#define ALIANALYSISTASKTOTET_H \r
+//_________________________________________________________________________\r
+//  Utility Class for transverse energy studies\r
+//  Task for analysis\r
+//  - reconstruction and MC output\r
+//\r
+//*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)\r
+//_________________________________________________________________________\r
 \r
 class AliAnalysisEtReconstructed;\r
 class AliAnalysisEtMonteCarlo;\r
-class TTree;\r
-class AliVParticle;\r
-class TH1F;\r
 class TH2F;\r
-class TNtuple;\r
-class TObjArray;\r
-class AliESDEvent;\r
-class AliMCParticle;\r
-class TDatabasePDG;\r
+class TList;\r
 \r
 #include "AliAnalysisTaskSE.h"\r
-#include "TObject.h"\r
 \r
-//class ParticleVars : public TObject        // Inherit from TObject to put in TClonesArray\r
-//{\r
-//public:\r
-//  \r
-//  ParticleVars() : TObject(){}\r
-//  Int_t fPdgCode; // from MC\r
-//  Int_t fPid; //from ESDs\r
-//  Int_t fMass;\r
-//  Int_t fCharge;\r
-//  Double_t fEt;\r
-//  Double_t fPhi;\r
-//  Double_t fEta;\r
-//  \r
-//  ClassDef(ParticleVars, 1);\r
-//  \r
-//};\r
-//\r
 class AliAnalysisTaskTotEt : public AliAnalysisTaskSE {\r
   \r
 public:\r
@@ -50,64 +32,15 @@ public:
   virtual void   UserExec(Option_t *option);\r
   virtual void   Terminate(Option_t *);\r
   \r
-  virtual void SetTriggerSelection(Bool_t v) {\r
-    fTriggerSelection = v;\r
-  }\r
-  \r
-  /* // Not yet implemented methods commented out for now..\r
-   private:\r
-   \r
-   Float_t CorrectForCaloAcceptance(Float_t energy);\r
-   bool CheckGoodVertex(AliVParticle *track);\r
-   bool TrackHitsCalorimeter(AliVParticle *track, Double_t magField);\r
-   bool ParticleInCalorimeter(AliMCParticle *part);\r
-   */\r
   \r
 private:\r
   \r
-  AliESDEvent *fESD;    //ESD object\r
-  \r
-  TList *fOutputList;\r
-  \r
-  AliAnalysisEtReconstructed *fRecAnalysis;\r
-  AliAnalysisEtMonteCarlo *fMCAnalysis;\r
-  \r
-  TH2F *fHistEtRecvsEtMC;\r
-  \r
-  Bool_t fTriggerSelection;\r
-  \r
-  Int_t fCount;\r
-  \r
-  const int fkPhotonPdg;\r
-  \r
-  const Float_t fkProtonMass;\r
-  \r
-  TDatabasePDG *fPdgDB;\r
-  \r
-  class EventVars\r
-  {\r
-  public:\r
-    Double_t fTotEt;\r
-    Double_t fTotEtAcc;\r
-    Double_t fTotEnergy;\r
-    \r
-    Double_t fTotNeutralEt;\r
-    Double_t fTotNeutralEtAcc;\r
-    \r
-    Double_t fTotChargedEt;\r
-    Double_t fTotChargedEtAcc;\r
-    \r
-    Int_t fChargedMultiplicity;\r
-    Int_t fNeutralMultiplicity;\r
-    \r
-  };\r
-  \r
-  EventVars *fRecEventVars;\r
-  EventVars *fSimEventVars;\r
+  TList *fOutputList; //output list\r
   \r
+  AliAnalysisEtReconstructed *fRecAnalysis; // Rec \r
+  AliAnalysisEtMonteCarlo *fMCAnalysis; // MC\r
   \r
-  TClonesArray *fRecParticleArray;\r
-  TClonesArray *fSimParticleArray;\r
+  TH2F *fHistEtRecvsEtMC; // Rec vs MC histo\r
   \r
   ClassDef(AliAnalysisTaskTotEt, 1); // example of analysis\r
 };\r