]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/totEt/AliAnalysisEt.h
o First Version of TRDnSigma implementation (Xianguo) o still requires some catching...
[u/mrichter/AliRoot.git] / PWGLF / totEt / AliAnalysisEt.h
index 5ca27b1fbbd7baff6de464e7c6b29b0cc989338a..0f8e338ec206b0493fdd6bd3939969334f7e8c02 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef ALIANALYSISET_H
+#define ALIANALYSISET_H
 //_________________________________________________________________________
 //  Utility Class for transverse energy studies
 //  Base class for ESD & MC analysis
@@ -6,16 +8,19 @@
 //*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
 //_________________________________________________________________________
 
-#ifndef ALIANALYSISET_H
-#define ALIANALYSISET_H
-
 #include "AliAnalysisEtCommon.h"
 #include "THnSparse.h"
 #include "AliESDCaloCluster.h"
 #include "AliAnalysisEtCuts.h"
+#include "AliAnalysisEtTrackMatchCorrections.h"
 #include <vector>
 #include "Rtypes.h"
+#include "AliAnalysisEtSelector.h"
+#include "AliAnalysisEtSelectorEmcal.h"
+#include "AliAnalysisEtSelectorPhos.h"
 
+class AliAnalysisEtRecEffCorrection;
+class AliAnalysisEtTrackMatchCorrections;
 class AliAnalysisEtSelector;
 class AliCentrality;
 class TString;
@@ -30,6 +35,7 @@ class AliESDtrackCuts;
 class AliAnalysisEtCuts;
 class AliESDCaloCluster;
 //class THnSparseD;
+class AliPIDResponse;
 
 class AliAnalysisEt : public AliAnalysisEtCommon
 {
@@ -76,31 +82,16 @@ public:
         return fTotEt;
     }
 
-    /** Total Et in the event within the acceptance cuts */
-    Double_t GetTotEtAcc() const {
-        return fTotEtAcc;
-    }
-
     /** Total neutral Et in the event (without acceptance cuts) */
     Double_t GetTotNeutralEt() const {
         return fTotNeutralEt;
     }
 
-    /** Total neutral Et in the event within the acceptance cuts */
-    Double_t GetTotNeutralEtAcc() const {
-        return fTotNeutralEtAcc;
-    }
-
     /** Total charged Et in the event (without acceptance cuts) */
     Double_t GetTotChargedEt() const {
         return fTotChargedEt;
     }
 
-    /** Total charged Et in the event within the acceptance cuts */
-    Double_t GetTotChargedEtAcc() const {
-        return fTotChargedEtAcc;
-    }
-
     void SetTPCOnlyTrackCuts(const AliESDtrackCuts *cuts) {
         fEsdtrackCutsTPC = (AliESDtrackCuts *) cuts;
     }
@@ -111,18 +102,23 @@ public:
     }
 
     /** Get contribution from non-removed charged particles */
-    virtual Double_t GetChargedContribution(Int_t /*clusterMultiplicity*/) {
-        return 0;
+    Double_t GetChargedContribution(Int_t clusterMultiplicity) {
+        return fTmCorrections->ChargedContr(clusterMultiplicity);
     }
 
     /** Get contribution from non-removed neutral particles */
-    virtual Double_t GetNeutralContribution(Int_t /*clusterMultiplicity*/) {
-        return 0;
+    Double_t GetNeutralContribution(Int_t clusterMultiplicity) {
+        return fTmCorrections->NeutralContr(clusterMultiplicity);
     }
 
     /** Get contribution from removed gammas */
-    virtual Double_t GetGammaContribution(Int_t /*clusterMultiplicity*/) {
-        return 0;
+    Double_t GetGammaContribution(Int_t clusterMultiplicity) {
+        return fTmCorrections->GammaContr(clusterMultiplicity);
+    }
+
+    /** Get contribution from secondaries */
+    Double_t GetSecondaryContribution(Int_t clusterMultiplicity) {
+        return fTmCorrections->SecondaryContr(clusterMultiplicity);
     }
 
     void MakeSparseHistograms() {
@@ -130,49 +126,145 @@ public:
     }
     
     AliAnalysisEtCuts * GetCuts() const { return fCuts; }
+    AliAnalysisEtSelector *GetSelector() const {return fSelector;}
+    
+
+    // Read in corrections
+    Int_t ReadCorrections(TString filename);  // Read in corrections
+    
+    void SetFsub(Float_t val){fsub=val;};//function for setting fsub for EMCal/PHOS hadronic corrections
+    void SetFsubForMeanHadE(Float_t val){fsubmeanhade=val;};//function for setting fsub for EMCal/PHOS hadronic corrections
 
 protected:
 
     //AliAnalysisEtCuts *fCuts; // keeper of basic cuts
-    Double_t CalculateTransverseEnergy(AliESDCaloCluster *cluster);
+    
+    // Return corrected cluster E_T
+    Double_t CorrectForReconstructionEfficiency(const AliESDCaloCluster &cluster,Int_t cent = 0);
+    Double_t CorrectForReconstructionEfficiency(const AliESDCaloCluster &cluster, Float_t eReco,Int_t cent = 0);
+    
+    // Track matching (hadrdonic contamination) corrections
+    AliAnalysisEtTrackMatchCorrections *fTmCorrections;
+    
+    // Reconstruction efficiency corrections
+    AliAnalysisEtRecEffCorrection *fReCorrections;
+    
+    TTree *fEventSummaryTree; //! Contains event level information
 
-    Double_t TestCPV(Double_t dx, Double_t dz, Double_t pt, Int_t charge, AliVEvent *e) const;
+    TTree *fAcceptedTree; //! Tree for information about accepted particles
     
-    virtual Bool_t TooCloseToBadChannel(const AliESDCaloCluster &/*cluster*/) const { return kFALSE; }
+    TTree *fDepositTree; //! optional TTree for energy deposit measurements
     
     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 fTotEtAcc;/** Total Et in the event (without 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 fTotNeutralEtAcc;/** Total neutral Et in the event */
+
     Double_t fTotChargedEt;/** Total charged Et in the event */
-    Double_t fTotChargedEtAcc;/** Total charged Et in the event within the acceptance cuts */
+
+    Double_t fTotChargedEtAcc;/** Total charged Et in the event */
 
     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 fBaryonEt;     /** Et of identified baryons; calo based (Rec only for now) */
-    Double_t fAntiBaryonEt; /** Et of identified anti-baryons; calo based (Rec only for now) */
-    Double_t fMesonEt;     /** Et of identified mesons; calo based (Rec only for now) */
-
     Double_t fProtonEt; /** Et of identified protons */
-    Double_t fPionEt; /** Et of identified pions */
-    Double_t fChargedKaonEt; /** Et of identified charged kaons */
-    Double_t fMuonEt; /** Et of identified muons */
-    Double_t fElectronEt; /** Et of identified electrons */
+    Double_t fAntiProtonEt; /** Et of identified protons */
+
     Double_t fNeutronEt; /** Et of neutrons (MC only for now) */
     Double_t fAntiNeutronEt; /** Et of anti-neutrons (MC only for now) */
+    
+    Double_t fPi0Et; // Et of identified pi0
+    Double_t fPiPlusEt; // Et of identified pi+
+    Double_t fPiMinusEt; // Et of identified pi-
+    
+    Double_t fKPlusEt; // Et of identified K+ 
+    Double_t fKMinusEt; // Et of identified K- 
+    Double_t fK0sEt; // Et of identified K0 short
+    Double_t fK0lEt; // Et of identified K0 long
+    
+    Double_t fMuMinusEt; // Et of identified mu- 
+    Double_t fMuPlusEt; // Et of identified mu+ 
+
+    Double_t fEMinusEt; // Et of identified e-
+    Double_t fEPlusEt; // Et of identified e+
+    
     Double_t fGammaEt; /** Et of identified electrons (MC only for now) */
 
-    Double_t fProtonEtAcc; /** Et of identified protons in calorimeter acceptance */
-    Double_t fPionEtAcc; /** Et of identified pions in calorimeter acceptance */
-    Double_t fChargedKaonEtAcc; /** Et of identified charged kaons in calorimeter acceptance */
-    Double_t fMuonEtAcc; /** Et of identified muons in calorimeter acceptance */
-    Double_t fElectronEtAcc; /** Et of identified electrons in calorimeter acceptance */
+    Double_t fProtonRemovedEt; /** Et of identified protons */
+    Double_t fAntiProtonRemovedEt; /** Et of identified protons */
+
+    Double_t fNeutronRemovedEt; /** Et of neutrons (MC only for now) */
+    Double_t fAntiNeutronRemovedEt; /** Et of anti-neutrons (MC only for now) */
+    
+    Double_t fPi0RemovedEt; // Removed Et of identified pi0
+    Double_t fPiPlusRemovedEt; // Removed Et of identified pi+
+    Double_t fPiMinusRemovedEt; // Removed Et of identified pi-
+
+    Double_t fKPlusRemovedEt; // Removed Et of identified K+ 
+    Double_t fKMinusRemovedEt; // Removed Et of identified K- 
+    Double_t fK0sRemovedEt; // Removed Et of identified K0 short
+    Double_t fK0lRemovedEt; // Removed Et of identified K0 long
+    
+    Double_t fMuMinusRemovedEt; // Removed Et of identified mu- 
+    Double_t fMuPlusRemovedEt; // Removed Et of identified mu+ 
+    
+    Double_t fEMinusRemovedEt; // Removed Et of identified e-
+    Double_t fEPlusRemovedEt; // Removed Et of identified e+
+    
+    Double_t fGammaRemovedEt; /** Removed Et of identified electrons (MC only for now) */
+
+    Double_t fProtonMult; /** Mult of identified protons */
+    Double_t fAntiProtonMult; /** Mult of identified protons */
+
+    Double_t fNeutronMult; /** Mult of neutrons (MC only for now) */
+    Double_t fAntiNeutronMult; /** Mult of anti-neutrons (MC only for now) */
+    
+    Double_t fPi0Mult; // Mult of identified pi0
+    Double_t fPiPlusMult; // Mult of identified pi+
+    Double_t fPiMinusMult; // Mult of identified pi-
+    
+    Double_t fKPlusMult; // Mult of identified K+ 
+    Double_t fKMinusMult; // Mult of identified K- 
+    Double_t fK0sMult; // Mult of identified K0 short
+    Double_t fK0lMult; // Mult of identified K0 long
+    
+    Double_t fMuMinusMult; // Mult of identified mu- 
+    Double_t fMuPlusMult; // Mult of identified mu+ 
+
+    Double_t fEMinusMult; // Mult of identified e-
+    Double_t fEPlusMult; // Mult of identified e+
+    
+    Double_t fGammaMult; /** Mult of identified electrons (MC only for now) */
+
+    Double_t fProtonRemovedMult; /** Mult of identified protons */
+    Double_t fAntiProtonRemovedMult; /** Mult of identified protons */
+
+    Double_t fNeutronRemovedMult; /** Mult of neutrons (MC only for now) */
+    Double_t fAntiNeutronRemovedMult; /** Mult of anti-neutrons (MC only for now) */
+    
+    Double_t fPi0RemovedMult; // Removed Mult of identified pi0
+    Double_t fPiPlusRemovedMult; // Removed Mult of identified pi+
+    Double_t fPiMinusRemovedMult; // Removed Mult of identified pi-
+
+    Double_t fKPlusRemovedMult; // Removed Mult of identified K+ 
+    Double_t fKMinusRemovedMult; // Removed Mult of identified K- 
+    Double_t fK0sRemovedMult; // Removed Mult of identified K0 short
+    Double_t fK0lRemovedMult; // Removed Mult of identified K0 long
+    
+    Double_t fMuMinusRemovedMult; // Removed Mult of identified mu- 
+    Double_t fMuPlusRemovedMult; // Removed Mult of identified mu+ 
+    
+    Double_t fEMinusRemovedMult; // Removed Mult of identified e-
+    Double_t fEPlusRemovedMult; // Removed Mult of identified e+
+    
+    Double_t fGammaRemovedMult; /** Removed Mult of identified electrons (MC only for now) */
 
     Float_t fEnergyDeposited; /** Energy deposited in calorimeter */
-    Float_t fEnergyTPC; /** Energy measured in TPC */
+    Float_t fMomentumTPC; /** Momentum measured in TPC */
     Short_t fCharge; /** Charge of the particle */
     Short_t fParticlePid; /** Particle PID */
     Float_t fPidProb; /** Probability of PID */
@@ -180,93 +272,27 @@ protected:
 
     Int_t fCentClass; // centrality class
 
-    Double_t fEtaCut;/** Cut in eta (standard |eta| < 0.5 )*/
-
-    /** Eta cut for our acceptance */
-    Double_t fEtaCutAcc; // Eta cut for our acceptance
-
-    /** Min phi cut for our acceptance in radians */
-    Double_t fPhiCutAccMin; // Min phi cut for our acceptance in radians
-
-    /** Max phi cut for our acceptance in radians */
-    Double_t fPhiCutAccMax; // Max phi cut for our acceptance in radians
-
     /** Detector radius */
     Double_t fDetectorRadius; // Detector radius
 
-    /** Cut on the cluster energy */
-    Double_t fClusterEnergyCut; // Cut on the cluster energy
-
     /** Minimum energy to cut on single cell cluster */
     Double_t fSingleCellEnergyCut;  // Minimum energy to cut on single cell cluster
 
-    Double_t fTrackDistanceCut; // cut on track distance
-
-    Double_t fTrackDxCut; // cut on track distance in x
-
-    Double_t fTrackDzCut; // cut on track distance in z
-    
-    Double_t fChargedEnergyRemoved;
-    Double_t fNeutralEnergyRemoved;
-    Double_t fGammaEnergyAdded;
-    
+    Double_t fChargedEnergyRemoved; // Charged energy removed
+    Double_t fNeutralEnergyRemoved; // Neutral energy removed
+    Double_t fGammaEnergyAdded; // gamma energy added
 
     // Declare the histograms
 
-    /** The full Et spectrum measured */
-    TH1F *fHistEt; //Et spectrum
-
-    /** The full charged Et spectrum measured */
-    TH1F *fHistChargedEt; //Charged Et spectrum
-
-    /** The full neutral Et spectrum measured */
-    TH1F *fHistNeutralEt; //Neutral Et spectrum
-
-    /** The Et spectrum within the calorimeter acceptance */
-    TH1F *fHistEtAcc; //Et in acceptance
+    /** The EM Et spectrum measured */
+    TH1F *fHistEt; //!Et spectrum
 
-    /** The charged Et spectrum within the calorimeter acceptance */
-    TH1F *fHistChargedEtAcc; //Charged Et in acceptance
+    /** Multiplicity of neutral particles in the events */
+    TH1F *fHistNeutralMult; //!Multiplicity
 
-    /** The neutral Et spectrum within the calorimeter acceptance */
-    TH1F *fHistNeutralEtAcc; //Et in acceptance
-
-    /** Multiplicity of particles in the events */
-    TH1F *fHistMult; //Multiplicity
-
-    /** Charged multiplicity of particles in the events */
-    TH1F *fHistChargedMult; //Charged multiplicity
-
-    /** Neutral multiplicity of particles in the events */
-    TH1F *fHistNeutralMult; //Neutral multiplicity
-
-    /* Acceptance plots */
-    TH2F *fHistPhivsPtPos; //phi vs pT plot for positive tracks
-    TH2F *fHistPhivsPtNeg; //phi vs pT plot for negative tracks
-
-    /* PID plots */
-    TH1F *fHistBaryonEt; /** Et of identified baryons */
-    TH1F *fHistAntiBaryonEt; /** Et of identified anti-baryons */
-    TH1F *fHistMesonEt; /** Et of identified mesons */
-
-    TH1F *fHistProtonEt; /** Et of identified protons */
-    TH1F *fHistPionEt; /** Et of identified protons */
-    TH1F *fHistChargedKaonEt; /** Et of identified charged kaons */
-    TH1F *fHistMuonEt; /** Et of identified muons */
-    TH1F *fHistElectronEt; /** Et of identified electrons */
-    TH1F *fHistNeutronEt; /** Et of neutrons (MC only for now) */
-    TH1F *fHistAntiNeutronEt; /** Et of anti-neutrons (MC only for now) */
-    TH1F *fHistGammaEt; /** Et of gammas (MC only for now) */
-
-    TH1F *fHistProtonEtAcc; /** Et of identified protons in calorimeter acceptance */
-    TH1F *fHistPionEtAcc; /** Et of identified protons in calorimeter acceptance */
-    TH1F *fHistChargedKaonEtAcc; /** Et of identified charged kaons in calorimeter acceptance */
-    TH1F *fHistMuonEtAcc; /** Et of identified muons in calorimeter acceptance */
-    TH1F *fHistElectronEtAcc; /** Et of identified electrons in calorimeter acceptance */
-
-    /* Correction plots */
-    TH1F *fHistTMDeltaR; /* Track matching plots; Rec only for now */
-    TH2F *fHistTMDxDz; /* Track matching plots; Rec only for now */
+    // Acceptance plots 
+    TH2F *fHistPhivsPtPos; //!phi vs pT plot for positive tracks
+    TH2F *fHistPhivsPtNeg; //!phi vs pT plot for negative tracks
 
     /* Auxiliary Histogram variables */
     static Float_t fgEtaAxis[17];//bins for eta axis of histograms
@@ -278,47 +304,31 @@ protected:
     static Float_t fgRAxis[48];//bins for R axis
     static Int_t fgNumOfRBins;//number of R bins
 
-
-    TTree *fTree; // optional TTree
-    TTree *fTreeDeposit; // optional TTree for energy deposit measurements
-
     /** Centrality object */
-    AliCentrality *fCentrality; //Centrality object
-
-    Short_t fDetector;     /** Which detector? (-1 -> PHOS, 1 -> EMCAL)*/
+    AliCentrality *fCentrality; //!Centrality object
 
     Bool_t fMakeSparse;//Boolean for whether or not to make sparse histograms
 
-    THnSparseF *fSparseHistTracks;     /** THnSparse histograms */
-
-    THnSparseF *fSparseHistClusters;     /** THnSparse histograms */
-
-    /** ET sparse valuses */
-    THnSparseF *fSparseHistEt; //!
-
-    /** Values for sparse hists */
-    Double_t *fSparseTracks; //!
-
-    /** Values for sparse hists */
-    Double_t *fSparseClusters; //!
+    TH1I *fCutFlow; //! Cut flow
+    
+    AliAnalysisEtSelector *fSelector; // Selector class
 
-    /** ET sparse valuses */
-    Double_t *fSparseEt; //!
+    AliPIDResponse *fPIDResponse;//
 
-    Char_t fClusterType; // selection on cluster type
-    
-    Bool_t fMatrixInitialized;
-    
-    TH1I *fCutFlow; // Cut flow
+    Float_t fsub;
+    Float_t fsubmeanhade;
     
-    AliAnalysisEtSelector *fSelector;
+
 
 private:
+   
+  
+    
     //Declare private to avoid compilation warning
     AliAnalysisEt & operator = (const AliAnalysisEt & g) ;//cpy assignment
     AliAnalysisEt(const AliAnalysisEt & g) ; // cpy ctor
 
-    ClassDef(AliAnalysisEt, 1);
+    ClassDef(AliAnalysisEt, 3);
 };
 
 #endif // ALIANALYSISET_H