Fixing coding conv. viols
authorpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Apr 2009 13:14:51 +0000 (13:14 +0000)
committerpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Apr 2009 13:14:51 +0000 (13:14 +0000)
PWG2/SPECTRA/AliAnalysisTaskProtons.cxx
PWG2/SPECTRA/AliAnalysisTaskProtons.h
PWG2/SPECTRA/AliAnalysisTaskProtonsQA.cxx
PWG2/SPECTRA/AliAnalysisTaskProtonsQA.h
PWG2/SPECTRA/AliProtonAnalysis.cxx
PWG2/SPECTRA/AliProtonAnalysis.h
PWG2/SPECTRA/AliProtonAnalysisBase.cxx
PWG2/SPECTRA/AliProtonAnalysisBase.h
PWG2/SPECTRA/AliProtonQAAnalysis.cxx
PWG2/SPECTRA/AliProtonQAAnalysis.h

index 53a163c..8e62f18 100644 (file)
@@ -5,10 +5,7 @@
 #include "TList.h"
 #include "TFile.h"
 #include "TH2F.h"
-#include "TH1I.h"
-#include "TF1.h"
 #include "TCanvas.h"
-#include "TLorentzVector.h"
 
 #include "AliAnalysisTask.h"
 #include "AliAnalysisManager.h"
 #include "AliMCEventHandler.h"
 #include "AliMCEvent.h"
 #include "AliStack.h"
-#include "AliVertexerTracks.h"
 #include "AliESDVertex.h"
 
 #include "AliProtonAnalysis.h"
 #include "AliProtonAnalysisBase.h"
 #include "AliAnalysisTaskProtons.h"
 
-// Analysis task to run the \bar{p}/p analysis
-// Author: Panos Cristakoglou
+//-----------------------------------------------------------------
+//                 AliAnalysisTakProtons class
+//   This is the task to run the \bar{p}/p analysis
+//   Origin: Panos Christakoglou | Panos.Christakoglou@cern.ch
+//-----------------------------------------------------------------
 
 ClassImp(AliAnalysisTaskProtons)
   
index 473e371..da21736 100644 (file)
@@ -1,9 +1,13 @@
-#ifndef AliAnalysisTaskProtons_cxx
-#define AliAnalysisTaskProtons_cxx
+#ifndef ALIANALYSISTASKPROTONS_H
+#define ALIANALYSISTASKPROTONS_H
+
+//-------------------------------------------------------------------------
+//                 Class AliAnalysisTaskProton
+//   This is the task for the baryon (proton) analysis
+//
+//    Origin: Panos Christakoglou | Panos.Christakoglou@cern.ch
+//-------------------------------------------------------------------------
 
-// Analysis task to run the \bar{p}/p analysis
-// Author: Panos Cristakoglou
-//class TString;
 class TList;
 class AliESDEvent;
 class AliAODEvent;
@@ -23,7 +27,7 @@ class AliAnalysisTaskProtons : public AliAnalysisTask {
   virtual void   Exec(Option_t *option);
   virtual void   Terminate(Option_t *);
 
-  void SetAnalysisObject(AliProtonAnalysis *analysis) {
+  void SetAnalysisObject(AliProtonAnalysis *const analysis) {
     fProtonAnalysis = analysis;}
   
  private:
index febe65b..def16d0 100644 (file)
@@ -1,12 +1,6 @@
 #include "TChain.h"
 #include "TTree.h"
-#include "TString.h"
 #include "TList.h"
-#include "TH2F.h"
-#include "TH1I.h"
-#include "TF1.h"
-#include "TCanvas.h"
-#include "TLorentzVector.h"
 
 #include "AliAnalysisTask.h"
 #include "AliAnalysisManager.h"
 #include "AliMCEventHandler.h"
 #include "AliMCEvent.h"
 #include "AliStack.h"
-#include "AliVertexerTracks.h"
 #include "AliESDVertex.h"
 
 #include "AliProtonQAAnalysis.h"
 #include "AliProtonAnalysisBase.h"
 #include "AliAnalysisTaskProtonsQA.h"
 
-// Analysis task used for the QA of the (anti)proton analysis
-// Author: Panos Cristakoglou
+//-----------------------------------------------------------------
+//                 AliAnalysisTakProtonsQA class
+//   This is the task to run the \bar{p}/p QA analysis
+//   Origin: Panos Christakoglou | Panos.Christakoglou@cern.ch
+//-----------------------------------------------------------------
 
 ClassImp(AliAnalysisTaskProtonsQA)
   
index 5d70e75..889840c 100644 (file)
@@ -1,8 +1,13 @@
-#ifndef AliAnalysisTaskProtonsQA_cxx
-#define AliAnalysisTaskProtonsQA_cxx
+#ifndef ALIANALYSISTASKPROTONSQA_H
+#define ALIANALYSISTASKPROTONSQA_H
+
+//-------------------------------------------------------------------------
+//                 Class AliAnalysisTaskProtonQA
+//   This is the task for the baryon (proton) QA analysis
+//
+//    Origin: Panos Christakoglou | Panos.Christakoglou@cern.ch
+//-------------------------------------------------------------------------
 
-// Analysis task creating a the 2d y-p_t spectrum of p and antip
-// Author: Panos Cristakoglou
 class TList;
 class AliESDEvent;
 class AliMCEvent;
@@ -21,7 +26,7 @@ class AliAnalysisTaskProtonsQA : public AliAnalysisTask {
   virtual void   Exec(Option_t *option);
   virtual void   Terminate(Option_t *);
 
-  void SetAnalysisObject(AliProtonQAAnalysis *analysis) {
+  void SetAnalysisObject(AliProtonQAAnalysis *const analysis) {
     fProtonQAAnalysis = analysis;}
 
  
index f897823..8776c6e 100644 (file)
 #include <TH1I.h>
 #include <TParticle.h>
 
-#include "AliProtonAnalysis.h"
-#include "AliProtonAnalysisBase.h"
-
 #include <AliExternalTrackParam.h>
 #include <AliAODEvent.h>
 #include <AliESDEvent.h>
-#include <AliLog.h>
+//#include <AliLog.h>
 #include <AliPID.h>
 #include <AliStack.h>
 #include <AliCFContainer.h>
 #include <AliCFEffGrid.h>
 #include <AliCFDataGrid.h>
-#include <AliESDVertex.h>
+//#include <AliESDVertex.h>
+class AliLog;
+class AliESDVertex;
+
+#include "AliProtonAnalysis.h"
+#include "AliProtonAnalysisBase.h"
 
 ClassImp(AliProtonAnalysis)
 
index 274cec8..f2a6b29 100644 (file)
@@ -21,7 +21,8 @@ class TH2D;
 class TH1F;
 class TList;
 
-#include "AliPID.h"
+//#include "AliPID.h"
+class AliPID;
 #include "AliCFContainer.h"
 class AliCFDataGrid;
 class AliAODEvent;
@@ -40,9 +41,9 @@ class AliProtonAnalysis : public TObject {
                    Int_t nbinsPt, Float_t fLowPt, Float_t fHighPt);
   virtual ~AliProtonAnalysis();
 
-  void SetBaseAnalysis(AliProtonAnalysisBase *baseAnalysis) {
+  void SetBaseAnalysis(AliProtonAnalysisBase * const baseAnalysis) {
     fProtonAnalysisBase = baseAnalysis;}
-  AliProtonAnalysisBase *GetProtonAnalysisBaseObject() {
+  AliProtonAnalysisBase *GetProtonAnalysisBaseObject() const {
     return fProtonAnalysisBase;}
 
   void InitAnalysisHistograms(Int_t nbinsY, Float_t fLowY, Float_t fHighY,
index 7ff7d3f..1b533a8 100644 (file)
 //   Origin: Panos Christakoglou | Panos.Christakoglou@cern.ch
 //-----------------------------------------------------------------
 #include <Riostream.h>
-#include <TFile.h>
-#include <TSystem.h>
-#include <TF1.h>
-#include <TH2D.h>
-#include <TH1D.h>
-#include <TH1I.h>
-#include <TParticle.h>
 #include <TCanvas.h>
 #include <TLatex.h>
-
-#include "AliProtonAnalysisBase.h"
+#include <TF1.h>
 
 #include <AliExternalTrackParam.h>
 #include <AliESDEvent.h>
-#include <AliLog.h>
 #include <AliPID.h>
-#include <AliESDVertex.h>
 #include <AliVertexerTracks.h>
 
+class AliLog;
+class AliESDVertex;
+
+#include "AliProtonAnalysisBase.h"
+
 ClassImp(AliProtonAnalysisBase)
 
 //____________________________________________________________________//
@@ -870,7 +865,7 @@ void AliProtonAnalysisBase::SetdEdxBandInfo(const char *filename) {
 }
 
 //________________________________________________________________________
-Double_t AliProtonAnalysisBase::Bethe(Double_t bg) {
+Double_t AliProtonAnalysisBase::Bethe(Double_t bg) const {
   // This is the Bethe-Bloch function normalised to 1 at the minimum
   // We renormalize it based on the MC information
   // WARNING: To be revised soon!!!
index 50ff059..c19cfde 100644 (file)
@@ -39,10 +39,10 @@ class AliProtonAnalysisBase : public TObject {
   void SetPIDMode(PIDMode pidmode) {fProtonPIDMode = pidmode;}
 
   const char *GetAnalysisLevel() {return fProtonAnalysisLevel.Data();}
-  AnalysisMode GetAnalysisMode() {return fProtonAnalysisMode;}
-  Bool_t GetEtaMode() {return fAnalysisEtaMode;}
-  TriggerMode GetTriggerMode() {return fTriggerMode;}
-  PIDMode GetPIDMode() {return fProtonPIDMode;}
+  AnalysisMode GetAnalysisMode() const {return fProtonAnalysisMode;}
+  Bool_t GetEtaMode() const {return fAnalysisEtaMode;}
+  TriggerMode GetTriggerMode() const {return fTriggerMode;}
+  PIDMode GetPIDMode() const {return fProtonPIDMode;}
 
   const  AliESDVertex *GetVertex(AliESDEvent *esd,
                                 AnalysisMode mode,
@@ -51,21 +51,21 @@ class AliProtonAnalysisBase : public TObject {
                                 Double_t gVz = 100.);
   void SetAcceptedVertexDiamond(Double_t gVx, Double_t gVy, Double_t gVz) {
     fVxMax = gVx; fVyMax = gVy; fVzMax = gVz;}
-  Double_t GetVxMax() {return fVxMax;}
-  Double_t GetVyMax() {return fVyMax;}
-  Double_t GetVzMax() {return fVzMax;}
+  Double_t GetVxMax() const {return fVxMax;}
+  Double_t GetVyMax() const {return fVyMax;}
+  Double_t GetVzMax() const {return fVzMax;}
 
   void SetPhaseSpace(Int_t nBinsX, Double_t gXmin, Double_t gXmax,
                     Int_t nBinsY, Double_t gYmin, Double_t gYmax) {
     fNBinsX = nBinsX; fMinX = gXmin; fMaxX = gXmax;
     fNBinsY = nBinsY; fMinY = gYmin; fMaxY = gYmax;
   }
-  Int_t GetNBinsX() {return fNBinsX;}
-  Int_t GetNBinsY() {return fNBinsY;}
-  Double_t GetMinX() {return fMinX;}
-  Double_t GetMinY() {return fMinY;}
-  Double_t GetMaxX() {return fMaxX;}
-  Double_t GetMaxY() {return fMaxY;}
+  Int_t GetNBinsX() const {return fNBinsX;}
+  Int_t GetNBinsY() const {return fNBinsY;}
+  Double_t GetMinX() const {return fMinX;}
+  Double_t GetMinY() const {return fMinY;}
+  Double_t GetMaxX() const {return fMaxX;}
+  Double_t GetMaxY() const {return fMaxY;}
 
   static Bool_t IsEventTriggered(const AliESDEvent *esd,
                                  TriggerMode trigger = kMB2);
@@ -84,39 +84,39 @@ class AliProtonAnalysisBase : public TObject {
   void    SetPointOnITSLayer4() {fPointOnITSLayer4Flag = kTRUE;}
   void    SetPointOnITSLayer5() {fPointOnITSLayer5Flag = kTRUE;}
   void    SetPointOnITSLayer6() {fPointOnITSLayer6Flag = kTRUE;}
-  Bool_t  IsUsedPointOnITSLayer1() {return fPointOnITSLayer1Flag;}
-  Bool_t  IsUsedPointOnITSLayer2() {return fPointOnITSLayer2Flag;}
-  Bool_t  IsUsedPointOnITSLayer3() {return fPointOnITSLayer3Flag;}
-  Bool_t  IsUsedPointOnITSLayer4() {return fPointOnITSLayer4Flag;}
-  Bool_t  IsUsedPointOnITSLayer5() {return fPointOnITSLayer5Flag;}
-  Bool_t  IsUsedPointOnITSLayer6() {return fPointOnITSLayer6Flag;}
+  Bool_t  IsUsedPointOnITSLayer1() const {return fPointOnITSLayer1Flag;}
+  Bool_t  IsUsedPointOnITSLayer2() const {return fPointOnITSLayer2Flag;}
+  Bool_t  IsUsedPointOnITSLayer3() const {return fPointOnITSLayer3Flag;}
+  Bool_t  IsUsedPointOnITSLayer4() const {return fPointOnITSLayer4Flag;}
+  Bool_t  IsUsedPointOnITSLayer5() const {return fPointOnITSLayer5Flag;}
+  Bool_t  IsUsedPointOnITSLayer6() const {return fPointOnITSLayer6Flag;}
   void    SetMinITSClusters(Int_t minITSClusters) {
     fMinITSClusters = minITSClusters;
     fMinITSClustersFlag = kTRUE;
   }
-  Int_t   GetMinITSClusters() {return fMinITSClusters;}
-  Bool_t  IsUsedMinITSClusters() {return fMinITSClustersFlag;}
+  Int_t   GetMinITSClusters() const {return fMinITSClusters;}
+  Bool_t  IsUsedMinITSClusters() const {return fMinITSClustersFlag;}
 
   void    SetMaxChi2PerITSCluster(Double_t maxChi2PerITSCluster) {
     fMaxChi2PerITSCluster = maxChi2PerITSCluster;
     fMaxChi2PerITSClusterFlag = kTRUE;
   }
-  Bool_t  IsUsedMaxChi2PerITSCluster() {return fMaxChi2PerITSClusterFlag;}
-  Double_t   GetMaxChi2PerITSCluster() {return fMaxChi2PerITSCluster;}
+  Bool_t  IsUsedMaxChi2PerITSCluster() const {return fMaxChi2PerITSClusterFlag;}
+  Double_t   GetMaxChi2PerITSCluster() const {return fMaxChi2PerITSCluster;}
 
   void    SetMinTPCClusters(Int_t minTPCClusters) {
     fMinTPCClusters = minTPCClusters;
     fMinTPCClustersFlag = kTRUE;
   }
-  Bool_t  IsUsedMinTPCClusters() {return fMinTPCClustersFlag;}
-  Int_t   GetMinTPCClusters() {return fMinTPCClusters;}
+  Bool_t  IsUsedMinTPCClusters() const {return fMinTPCClustersFlag;}
+  Int_t   GetMinTPCClusters() const {return fMinTPCClusters;}
 
   void    SetMaxChi2PerTPCCluster(Double_t maxChi2PerTPCCluster) {
     fMaxChi2PerTPCCluster = maxChi2PerTPCCluster;
     fMaxChi2PerTPCClusterFlag = kTRUE;
   }
-  Bool_t  IsUsedMaxChi2PerTPCCluster() {return fMaxChi2PerTPCClusterFlag;}
-  Double_t   GetMaxChi2PerTPCCluster() {return fMaxChi2PerTPCCluster;}
+  Bool_t  IsUsedMaxChi2PerTPCCluster() const {return fMaxChi2PerTPCClusterFlag;}
+  Double_t   GetMaxChi2PerTPCCluster() const {return fMaxChi2PerTPCCluster;}
 
   void    SetMaxCov11(Double_t maxCov11) {
     fMaxCov11 = maxCov11; fMaxCov11Flag = kTRUE;}
@@ -128,102 +128,102 @@ class AliProtonAnalysisBase : public TObject {
     fMaxCov44 = maxCov44; fMaxCov44Flag = kTRUE;}
   void    SetMaxCov55(Double_t maxCov55) {
     fMaxCov55 = maxCov55; fMaxCov55Flag = kTRUE;}
-  Bool_t  IsUsedMaxCov11() {return fMaxCov11Flag;}
-  Bool_t  IsUsedMaxCov22() {return fMaxCov22Flag;}
-  Bool_t  IsUsedMaxCov33() {return fMaxCov33Flag;}
-  Bool_t  IsUsedMaxCov44() {return fMaxCov44Flag;}
-  Bool_t  IsUsedMaxCov55() {return fMaxCov55Flag;}
-  Double_t   GetMaxCov11() {return fMaxCov11;}
-  Double_t   GetMaxCov22() {return fMaxCov22;}
-  Double_t   GetMaxCov33() {return fMaxCov33;}
-  Double_t   GetMaxCov44() {return fMaxCov44;}
-  Double_t   GetMaxCov55() {return fMaxCov55;}
+  Bool_t  IsUsedMaxCov11() const {return fMaxCov11Flag;}
+  Bool_t  IsUsedMaxCov22() const {return fMaxCov22Flag;}
+  Bool_t  IsUsedMaxCov33() const {return fMaxCov33Flag;}
+  Bool_t  IsUsedMaxCov44() const {return fMaxCov44Flag;}
+  Bool_t  IsUsedMaxCov55() const {return fMaxCov55Flag;}
+  Double_t   GetMaxCov11() const {return fMaxCov11;}
+  Double_t   GetMaxCov22() const {return fMaxCov22;}
+  Double_t   GetMaxCov33() const {return fMaxCov33;}
+  Double_t   GetMaxCov44() const {return fMaxCov44;}
+  Double_t   GetMaxCov55() const {return fMaxCov55;}
 
   void    SetMaxSigmaToVertex(Double_t maxSigmaToVertex) {
     fMaxSigmaToVertex = maxSigmaToVertex;
     fMaxSigmaToVertexFlag = kTRUE;
   }
-  Bool_t  IsUsedMaxSigmaToVertex() {return fMaxSigmaToVertexFlag;}
-  Double_t   GetMaxSigmaToVertex() {return fMaxSigmaToVertex;}
+  Bool_t  IsUsedMaxSigmaToVertex() const {return fMaxSigmaToVertexFlag;}
+  Double_t   GetMaxSigmaToVertex() const {return fMaxSigmaToVertex;}
 
   void    SetMaxSigmaToVertexTPC(Double_t maxSigmaToVertex) {
     fMaxSigmaToVertexTPC = maxSigmaToVertex;
     fMaxSigmaToVertexTPCFlag = kTRUE;
   }
-  Bool_t  IsUsedMaxSigmaToVertexTPC() {return fMaxSigmaToVertexTPCFlag;}
-  Double_t   GetMaxSigmaToVertexTPC() {return fMaxSigmaToVertexTPC;}
+  Bool_t  IsUsedMaxSigmaToVertexTPC() const {return fMaxSigmaToVertexTPCFlag;}
+  Double_t   GetMaxSigmaToVertexTPC() const {return fMaxSigmaToVertexTPC;}
 
   void    SetMaxDCAXY(Double_t maxDCAXY) {
     fMaxDCAXY = maxDCAXY;
     fMaxDCAXYFlag = kTRUE;
   }
-  Bool_t  IsUsedMaxDCAXY() {return fMaxDCAXYFlag;}
-  Double_t   GetMaxDCAXY() {return fMaxDCAXY;}
+  Bool_t  IsUsedMaxDCAXY() const {return fMaxDCAXYFlag;}
+  Double_t   GetMaxDCAXY() const {return fMaxDCAXY;}
 
   void    SetMaxDCAXYTPC(Double_t maxDCAXY) {
     fMaxDCAXYTPC = maxDCAXY;
     fMaxDCAXYTPCFlag = kTRUE;
   }
-  Bool_t  IsUsedMaxDCAXYTPC() {return fMaxDCAXYTPCFlag;}
-  Double_t   GetMaxDCAXYTPC() {return fMaxDCAXYTPC;}
+  Bool_t  IsUsedMaxDCAXYTPC() const {return fMaxDCAXYTPCFlag;}
+  Double_t   GetMaxDCAXYTPC() const {return fMaxDCAXYTPC;}
 
   void    SetMaxDCAZ(Double_t maxDCAZ) {
     fMaxDCAZ = maxDCAZ;
     fMaxDCAZFlag = kTRUE;
   }
-  Bool_t  IsUsedMaxDCAZ() {return fMaxDCAZFlag;}
-  Double_t   GetMaxDCAZ() {return fMaxDCAZ;}
+  Bool_t  IsUsedMaxDCAZ() const {return fMaxDCAZFlag;}
+  Double_t   GetMaxDCAZ() const {return fMaxDCAZ;}
 
   void    SetMaxDCAZTPC(Double_t maxDCAZ) {
     fMaxDCAZTPC = maxDCAZ;
     fMaxDCAZTPCFlag = kTRUE;
   }
-  Bool_t  IsUsedMaxDCAZTPC() {return fMaxDCAZTPCFlag;}
-  Double_t   GetMaxDCAZTPC() {return fMaxDCAZTPC;}
+  Bool_t  IsUsedMaxDCAZTPC() const {return fMaxDCAZTPCFlag;}
+  Double_t   GetMaxDCAZTPC() const {return fMaxDCAZTPC;}
 
   void    SetMaxDCA3D(Double_t maxDCA3D) {
     fMaxDCA3D = maxDCA3D;
     fMaxDCA3DFlag = kTRUE;
   }
-  Bool_t  IsUsedMaxDCA3D() {return fMaxDCA3DFlag;}
-  Double_t   GetMaxDCA3D() {return fMaxDCA3D;}
+  Bool_t  IsUsedMaxDCA3D() const {return fMaxDCA3DFlag;}
+  Double_t   GetMaxDCA3D() const {return fMaxDCA3D;}
 
   void    SetMaxDCA3DTPC(Double_t maxDCA3D) {
     fMaxDCA3DTPC = maxDCA3D;
     fMaxDCA3DTPCFlag = kTRUE;
   }
-  Bool_t  IsUsedMaxDCA3DTPC() {return fMaxDCA3DTPCFlag;}
-  Double_t   GetMaxDCA3DTPC() {return fMaxDCA3DTPC;}
+  Bool_t  IsUsedMaxDCA3DTPC() const {return fMaxDCA3DTPCFlag;}
+  Double_t   GetMaxDCA3DTPC() const {return fMaxDCA3DTPC;}
 
   void    SetMaxConstrainChi2(Double_t maxConstrainChi2) {
     fMaxConstrainChi2 = maxConstrainChi2;
     fMaxConstrainChi2Flag = kTRUE;
   }
-  Bool_t  IsUsedMaxConstrainChi2() {return fMaxConstrainChi2Flag;}
-  Double_t   GetMaxConstrainChi2() {return fMaxConstrainChi2;}
+  Bool_t  IsUsedMaxConstrainChi2() const {return fMaxConstrainChi2Flag;}
+  Double_t   GetMaxConstrainChi2() const {return fMaxConstrainChi2;}
 
   void    SetMinTPCdEdxPoints(Int_t mindEdxpoints) {
     fMinTPCdEdxPoints = mindEdxpoints;
     fMinTPCdEdxPointsFlag = kTRUE;
   }
-  Bool_t  IsUsedMinTPCdEdxPoints() {return fMinTPCdEdxPointsFlag;}
-  Int_t   GetMinTPCdEdxPoints() {return fMinTPCdEdxPoints;}
+  Bool_t  IsUsedMinTPCdEdxPoints() const {return fMinTPCdEdxPointsFlag;}
+  Int_t   GetMinTPCdEdxPoints() const {return fMinTPCdEdxPoints;}
   
   void    SetITSRefit() {fITSRefitFlag = kTRUE;}
-  Bool_t  IsUsedITSRefit() {return fITSRefitFlag;}
+  Bool_t  IsUsedITSRefit() const {return fITSRefitFlag;}
   void    SetTPCRefit() {fTPCRefitFlag = kTRUE;}
-  Bool_t  IsUsedTPCRefit() {return fTPCRefitFlag;}
+  Bool_t  IsUsedTPCRefit() const {return fTPCRefitFlag;}
   void    SetESDpid() {fESDpidFlag = kTRUE;}
-  Bool_t  IsUsedESDpid() {return fESDpidFlag;}
+  Bool_t  IsUsedESDpid() const {return fESDpidFlag;}
   void    SetTPCpid() {fTPCpidFlag = kTRUE;}
-  Bool_t  IsUsedTPCpid() {return fTPCpidFlag;}
+  Bool_t  IsUsedTPCpid() const {return fTPCpidFlag;}
 
   TCanvas *GetListOfCuts();
 
   //PID related functions
   Bool_t IsProton(AliESDtrack *track);
   void SetNSigma(Int_t nsigma) {fNSigma = nsigma;}  
-  Int_t GetNSigma() {return fNSigma;}
+  Int_t GetNSigma() const {return fNSigma;}
   void SetdEdxBandInfo(const char* filename);
   void SetPriorProbabilities(Double_t * const partFrac) {
     for(Int_t i = 0; i < AliPID::kSPECIESN; i++) fPartFrac[i] = partFrac[i];} 
@@ -233,18 +233,15 @@ class AliProtonAnalysisBase : public TObject {
                                    TF1 *const fkaon, 
                                    TF1 *const fproton) {
     fFunctionProbabilityFlag = kTRUE;
-    fElectronFunction = felectron; 
-    fMuonFunction = fmuon; 
-    fPionFunction = fpion;
-    fKaonFunction = fkaon;
-    fProtonFunction = fproton;
+    fElectronFunction = felectron; fMuonFunction = fmuon; 
+    fPionFunction = fpion; fKaonFunction = fkaon; fProtonFunction = fproton;
   }
-  Bool_t IsPriorProbabilityFunctionUsed() {return fFunctionProbabilityFlag;}
+  Bool_t IsPriorProbabilityFunctionUsed() const {return fFunctionProbabilityFlag;}
   Double_t GetParticleFraction(Int_t i, Double_t p);
-  Double_t Bethe(Double_t bg);
+  Double_t Bethe(Double_t bg) const;
 
   void SetDebugMode() {fDebugMode = kTRUE;}
-  Bool_t GetDebugMode() {return fDebugMode;}
+  Bool_t GetDebugMode() const {return fDebugMode;}
 
  private:
   AliProtonAnalysisBase(const AliProtonAnalysisBase&); // Not implemented
index c2ce2fd..0017578 100644 (file)
@@ -19,7 +19,6 @@
 //   Origin: Panos Christakoglou | Panos.Christakoglou@cern.ch
 //-----------------------------------------------------------------
 #include <Riostream.h>
-#include <TFile.h>
 #include <TSystem.h>
 #include <TF1.h>
 #include <TH2D.h>
@@ -27,7 +26,6 @@
 #include <TH1D.h>
 #include <TArrayI.h>
 #include <TParticle.h>
-#include <TClonesArray.h>
 
 #include "AliProtonQAAnalysis.h"
 #include "AliProtonAnalysisBase.h"
@@ -101,7 +99,7 @@ AliProtonQAAnalysis::~AliProtonQAAnalysis() {
 }
 
 //____________________________________________________________________//
-void AliProtonQAAnalysis::FillQA(AliStack *stack,
+void AliProtonQAAnalysis::FillQA(AliStack *const stack,
                                 AliESDEvent *esd,
                                 const AliESDVertex *vertex, 
                                 AliESDtrack* track) {
@@ -109,31 +107,31 @@ void AliProtonQAAnalysis::FillQA(AliStack *stack,
   Int_t nPrimaries = stack->GetNprimary();
   Int_t label = TMath::Abs(track->GetLabel());
 
-  Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
+  Double_t gPt = 0.0, gPx = 0.0, gPy = 0.0, gPz = 0.0;
   Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0};  //The impact parameters and their covariance.
 
   if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
     AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
     if(!tpcTrack) {
-      Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
+      gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0;
       dca[0] = -100.; dca[1] = -100.;
       cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
     }
     else {
-      Pt = tpcTrack->Pt();
-      Px = tpcTrack->Px();
-      Py = tpcTrack->Py();
-      Pz = tpcTrack->Pz();
+      gPt = tpcTrack->Pt();
+      gPx = tpcTrack->Px();
+      gPy = tpcTrack->Py();
+      gPz = tpcTrack->Pz();
       tpcTrack->PropagateToDCA(vertex,
                               esd->GetMagneticField(),
                               100.,dca,cov);
     }
   }
   else{
-    Pt = track->Pt();
-    Px = track->Px();
-    Py = track->Py();
-    Pz = track->Pz();
+    gPt = track->Pt();
+    gPx = track->Px();
+    gPy = track->Py();
+    gPz = track->Pz();
     track->PropagateToDCA(vertex,
                          esd->GetMagneticField(),
                          100.,dca,cov);
@@ -2662,7 +2660,7 @@ void AliProtonQAAnalysis::InitQA() {
 }
 
 //____________________________________________________________________//
-void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliMCEvent *mcEvent, 
+void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliMCEvent *const mcEvent, 
                                                AliESDEvent *esd,
                                                const AliESDVertex *vertex) {
   //Run the reconstruction efficiency code (primaries & secondaries)
@@ -2687,21 +2685,21 @@ void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliMCEvent *mcEvent,
       if((fProtonAnalysisBase->Rapidity(mcTrack->Px(),mcTrack->Py(),mcTrack->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(mcTrack->Px(),mcTrack->Py(),mcTrack->Pz()) < fMinY)) continue;
     
     // Loop over Track References
-    Bool_t LabelTPC = kFALSE;
+    Bool_t labelTPC = kFALSE;
     AliTrackReference* trackRef = 0;
     for (Int_t iTrackRef = 0; iTrackRef  < mcTrack->GetNumberOfTrackReferences(); iTrackRef++) {
       trackRef = mcTrack->GetTrackReference(iTrackRef);
       if(trackRef) {
        Int_t detectorId = trackRef->DetectorId(); 
        if (detectorId == AliTrackReference::kTPC) {        
-         LabelTPC = kTRUE;
+         labelTPC = kTRUE;
          break;
        }
       }      
     }
 
     //findable tracks
-    if (LabelTPC) {
+    if (labelTPC) {
       TParticle* particle = mcTrack->Particle();
       Int_t pdgcode = particle->GetPdgCode();
       if(TMath::Abs(pdgcode) != 2212) continue;
@@ -3123,7 +3121,7 @@ void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliMCEvent *mcEvent,
 }
 
 //____________________________________________________________________//
-void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliStack *stack, 
+void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliStack *const stack, 
                                                AliESDEvent *esd,
                                                const AliESDVertex *vertex) {
   //Runs the efficiency code
@@ -3241,15 +3239,14 @@ void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliStack *stack,
     Int_t pdgcode = particle->GetPdgCode();
     if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
     
-    Double_t Pt = 0.0, P = 0.0;
-    //Double_t probability[5];
+    Double_t gPt = 0.0, gP = 0.0;
     
     //TPC only
     if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
       AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
       if(!tpcTrack) continue;
-      Pt = tpcTrack->Pt();
-      P = tpcTrack->P();
+      gPt = tpcTrack->Pt();
+      gP = tpcTrack->P();
       
       if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
       if(fProtonAnalysisBase->GetEtaMode()) {
@@ -3554,8 +3551,8 @@ Bool_t AliProtonQAAnalysis::IsLabelUsed(TArrayI labelArray,
 
 //____________________________________________________________________//
 void AliProtonQAAnalysis::RunVertexQA(AliGenEventHeader *header,
-                                     AliStack *stack, 
-                                     AliESDEvent *esd) {
+                                     AliStack *const stack, 
+                                     AliESDEvent *const esd) {
   //Runs the vertex QA
   //MC vertex
   TArrayF primaryVertex(3);
@@ -3705,7 +3702,7 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
       track = &trackTPC ;
     }
     
-    Double_t Pt = 0.0, P = 0.0;
+    Double_t gPt = 0.0, gP = 0.0;
     //Double_t probability[5];
     Float_t dcaXY = 0.0, dcaZ = 0.0;
     Double_t nSigmaToVertex = fProtonAnalysisBase->GetSigmaToVertex(track);
@@ -3727,8 +3724,8 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
     if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
       AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
       if(!tpcTrack) continue;
-      Pt = tpcTrack->Pt();
-      P = tpcTrack->P();
+      gPt = tpcTrack->Pt();
+      gP = tpcTrack->P();
       if(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)
        track->GetImpactParameters(dcaXY,dcaZ);
       else track->GetImpactParametersTPC(dcaXY,dcaZ);
@@ -3763,12 +3760,12 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
              ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH2D *)(fQA2DList->At(0)))->Fill(tpcTrack->Eta(),Pt);
+               ((TH2D *)(fQA2DList->At(0)))->Fill(tpcTrack->Eta(),gPt);
              else
                ((TH2D *)(fQA2DList->At(0)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
                                                            tpcTrack->Py(),
                                                            tpcTrack->Pz()),
-                                                  Pt);
+                                                  gPt);
            }//accepted primary protons
            else if(track->Charge() < 0) {
              for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
@@ -3793,12 +3790,12 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
              ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH2D *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(),Pt);
+               ((TH2D *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(),gPt);
              else
                ((TH2D *)(fQA2DList->At(4)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
                                                            tpcTrack->Py(),
                                                            tpcTrack->Pz()),
-                                                  Pt);
+                                                  gPt);
            }//accepted primary antiprotons
          }//accepted primary particles
          else if(label > stack->GetNprimary()) {
@@ -3838,20 +3835,20 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
              ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH2D *)(fQA2DList->At(2)))->Fill(tpcTrack->Eta(),Pt);
+               ((TH2D *)(fQA2DList->At(2)))->Fill(tpcTrack->Eta(),gPt);
              else
                ((TH2D *)(fQA2DList->At(2)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
                                                            tpcTrack->Py(),
                                                            tpcTrack->Pz()),
-                                                  Pt);
+                                                  gPt);
              if(fProtonAnalysisBase->GetEtaMode())
-             ((TH3F *)(fQA2DList->At(10)))->Fill(tpcTrack->Eta(),Pt,
+             ((TH3F *)(fQA2DList->At(10)))->Fill(tpcTrack->Eta(),gPt,
                                                  ConvertPDGToInt(motherPDGCode));
              else
                ((TH3F *)(fQA2DList->At(10)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
                                                             tpcTrack->Py(),
                                                             tpcTrack->Pz()),
-                                                   Pt,
+                                                   gPt,
                                                    ConvertPDGToInt(motherPDGCode));
            }//accepted secondary protons
            else if(track->Charge() < 0) {
@@ -3877,20 +3874,20 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
              ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH2D *)(fQA2DList->At(6)))->Fill(tpcTrack->Eta(),Pt);
+               ((TH2D *)(fQA2DList->At(6)))->Fill(tpcTrack->Eta(),gPt);
              else
                ((TH2D *)(fQA2DList->At(6)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
                                                            tpcTrack->Py(),
                                                            tpcTrack->Pz()),
-                                                  Pt);
+                                                  gPt);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH3F *)(fQA2DList->At(11)))->Fill(tpcTrack->Eta(),Pt,
+               ((TH3F *)(fQA2DList->At(11)))->Fill(tpcTrack->Eta(),gPt,
                                                    ConvertPDGToInt(motherPDGCode));
              else
                ((TH3F *)(fQA2DList->At(11)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
                                                             tpcTrack->Py(),
                                                             tpcTrack->Pz()),
-                                                   Pt,
+                                                   gPt,
                                                    ConvertPDGToInt(motherPDGCode));
            }//accepted secondary antiprotons
          }//accepted secondary particles
@@ -3902,24 +3899,24 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
                                                        tpcTrack->Phi()*180./TMath::Pi(),
                                                        nClustersTPC);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH2D *)(fQA2DList->At(1)))->Fill(tpcTrack->Eta(),Pt);
+               ((TH2D *)(fQA2DList->At(1)))->Fill(tpcTrack->Eta(),gPt);
              else
                ((TH2D *)(fQA2DList->At(1)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
                                                            tpcTrack->Py(),
                                                            tpcTrack->Pz()),
-                                                  Pt);
+                                                  gPt);
            }
            else if(track->Charge() < 0) {
              ((TH3D *)(fRejectedCutList->At(1)))->Fill(tpcTrack->Eta(),
                                                        tpcTrack->Phi()*180./TMath::Pi(),
                                                        nClustersTPC);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH2D *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(),Pt);
+               ((TH2D *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(),gPt);
              else
                ((TH2D *)(fQA2DList->At(5)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
                                                            tpcTrack->Py(),
                                                            tpcTrack->Pz()),
-                                                  Pt);
+                                                  gPt);
            }
          }//rejected primary particles
          else if(label > stack->GetNprimary()) {
@@ -3928,24 +3925,24 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
                                                        tpcTrack->Phi()*180./TMath::Pi(),
                                                        nClustersTPC);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH2D *)(fQA2DList->At(3)))->Fill(tpcTrack->Eta(),Pt);
+               ((TH2D *)(fQA2DList->At(3)))->Fill(tpcTrack->Eta(),gPt);
              else
                ((TH2D *)(fQA2DList->At(3)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
                                                            tpcTrack->Py(),
                                                            tpcTrack->Pz()),
-                                                  Pt);
+                                                  gPt);
            }
            else if(track->Charge() < 0) {
              ((TH3D *)(fRejectedCutList->At(3)))->Fill(tpcTrack->Eta(),
                                                        tpcTrack->Phi()*180./TMath::Pi(),
                                                        nClustersTPC);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH2D *)(fQA2DList->At(7)))->Fill(tpcTrack->Eta(),Pt);
+               ((TH2D *)(fQA2DList->At(7)))->Fill(tpcTrack->Eta(),gPt);
              else
                ((TH2D *)(fQA2DList->At(7)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
                                                            tpcTrack->Py(),
                                                            tpcTrack->Pz()),
-                                                  Pt);
+                                                  gPt);
            }
          }//rejected secondary particles
        }//rejected - track cuts
@@ -3953,8 +3950,8 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
     }//TPC only tracks
     //combined tracking
     else {
-      Pt = track->Pt();
-      P = track->P();
+      gPt = track->Pt();
+      gP = track->P();
       track->GetImpactParameters(dcaXY,dcaZ);
       
       //pid
@@ -3987,12 +3984,12 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
              ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH2D *)(fQA2DList->At(0)))->Fill(track->Eta(),Pt);
+               ((TH2D *)(fQA2DList->At(0)))->Fill(track->Eta(),gPt);
              else
                ((TH2D *)(fQA2DList->At(0)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
                                                            track->Py(),
                                                            track->Pz()),
-                                                  Pt);
+                                                  gPt);
            }
            else if(track->Charge() < 0) {
              for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
@@ -4017,12 +4014,12 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
              ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH2D *)(fQA2DList->At(4)))->Fill(track->Eta(),Pt);
+               ((TH2D *)(fQA2DList->At(4)))->Fill(track->Eta(),gPt);
              else
                ((TH2D *)(fQA2DList->At(4)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
                                                            track->Py(),
                                                            track->Pz()),
-                                                  Pt);
+                                                  gPt);
            }
          }//primary particles
          else if(label > stack->GetNprimary()) {
@@ -4062,20 +4059,20 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
              ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH2D *)(fQA2DList->At(2)))->Fill(track->Eta(),Pt);
+               ((TH2D *)(fQA2DList->At(2)))->Fill(track->Eta(),gPt);
              else
                ((TH2D *)(fQA2DList->At(2)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
                                                            track->Py(),
                                                            track->Pz()),
-                                                  Pt);
+                                                  gPt);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH3F *)(fQA2DList->At(10)))->Fill(track->Eta(),Pt,
+               ((TH3F *)(fQA2DList->At(10)))->Fill(track->Eta(),gPt,
                                                    ConvertPDGToInt(motherPDGCode));
              else
                ((TH3F *)(fQA2DList->At(10)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
                                                             track->Py(),
                                                             track->Pz()),
-                                                   Pt,
+                                                   gPt,
                                                    ConvertPDGToInt(motherPDGCode));
            }
            else if(track->Charge() < 0) {
@@ -4101,20 +4098,20 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
              ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH2D *)(fQA2DList->At(6)))->Fill(track->Eta(),Pt);
+               ((TH2D *)(fQA2DList->At(6)))->Fill(track->Eta(),gPt);
              else
                ((TH2D *)(fQA2DList->At(6)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
                                                            track->Py(),
                                                            track->Pz()),
-                                                  Pt);
+                                                  gPt);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH3F *)(fQA2DList->At(11)))->Fill(track->Eta(),Pt,
+               ((TH3F *)(fQA2DList->At(11)))->Fill(track->Eta(),gPt,
                                                    ConvertPDGToInt(motherPDGCode));
              else
                ((TH3F *)(fQA2DList->At(11)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
                                                             track->Py(),
                                                             track->Pz()),
-                                                   Pt,
+                                                   gPt,
                                                    ConvertPDGToInt(motherPDGCode));
            }
          }//secondary particles
@@ -4126,24 +4123,24 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
                                                        track->Phi()*180./TMath::Pi(),
                                                        nClustersTPC);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH2D *)(fQA2DList->At(1)))->Fill(track->Eta(),Pt);
+               ((TH2D *)(fQA2DList->At(1)))->Fill(track->Eta(),gPt);
              else
                ((TH2D *)(fQA2DList->At(1)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
                                                            track->Py(),
                                                            track->Pz()),
-                                                  Pt);
+                                                  gPt);
            }
            else if(track->Charge() < 0) {
              ((TH3D *)(fRejectedCutList->At(1)))->Fill(track->Eta(),
                                                        track->Phi()*180./TMath::Pi(),
                                                        nClustersTPC);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH2D *)(fQA2DList->At(5)))->Fill(track->Eta(),Pt);
+               ((TH2D *)(fQA2DList->At(5)))->Fill(track->Eta(),gPt);
              else
                ((TH2D *)(fQA2DList->At(5)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
                                                            track->Py(),
                                                            track->Pz()),
-                                                  Pt);
+                                                  gPt);
            }
          }//primary particles
          else if(label > stack->GetNprimary()) {
@@ -4152,24 +4149,24 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
                                                        track->Phi()*180./TMath::Pi(),
                                                        nClustersTPC);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH2D *)(fQA2DList->At(3)))->Fill(track->Eta(),Pt);
+               ((TH2D *)(fQA2DList->At(3)))->Fill(track->Eta(),gPt);
              else
                ((TH2D *)(fQA2DList->At(3)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
                                                            track->Py(),
                                                            track->Pz()),
-                                                  Pt);
+                                                  gPt);
            }
            else if(track->Charge() < 0) {
              ((TH3D *)(fRejectedCutList->At(3)))->Fill(track->Eta(),
                                                        track->Phi()*180./TMath::Pi(),
                                                        nClustersTPC);
              if(fProtonAnalysisBase->GetEtaMode())
-               ((TH2D *)(fQA2DList->At(7)))->Fill(track->Eta(),Pt);
+               ((TH2D *)(fQA2DList->At(7)))->Fill(track->Eta(),gPt);
              else
                ((TH2D *)(fQA2DList->At(7)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
                                                            track->Py(),
                                                            track->Pz()),
-                                                  Pt);
+                                                  gPt);
            }
          }//secondary particles
        }//rejected - track cuts
@@ -4250,7 +4247,7 @@ void AliProtonQAAnalysis::InitMCAnalysis() {
 }
 
 //____________________________________________________________________//
-void AliProtonQAAnalysis::RunMCAnalysis(AliStack* stack) {
+void AliProtonQAAnalysis::RunMCAnalysis(AliStack* const stack) {
   //Main analysis part - MC 
   for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
     TParticle *particle = stack->Particle(iParticle);
@@ -4379,7 +4376,7 @@ void AliProtonQAAnalysis::RunMCAnalysis(AliStack* stack) {
 }
 
 //____________________________________________________________________//
-Int_t AliProtonQAAnalysis::ConvertPDGToInt(Int_t pdgCode) {
+Int_t AliProtonQAAnalysis::ConvertPDGToInt(Int_t pdgCode) const {
   //Converts the pdg code to an int based on the following scheme:
   //1: PDG code: 130 - Name: K_L0
   //2: PDG code: 211 - Name: pi+
index 49b94e0..594b0b2 100644 (file)
 //-------------------------------------------------------------------------
 
 #include "TObject.h"
-#include "TH1I.h"
 #include "TList.h"
 #include "TArrayI.h"
 
-#include "AliPID.h"
-
 class TF1;
 class TH1F;
 class TH3F;
 
+class AliPID;
 class AliESDEvent;
 class AliESDtrack;
 class AliStack;
@@ -37,16 +35,16 @@ class AliProtonQAAnalysis : public TObject {
   AliProtonQAAnalysis();
   virtual ~AliProtonQAAnalysis();
 
-  void SetBaseAnalysis(AliProtonAnalysisBase *baseAnalysis) {
+  void SetBaseAnalysis(AliProtonAnalysisBase *const baseAnalysis) {
     fProtonAnalysisBase = baseAnalysis;}
-  AliProtonAnalysisBase *GetProtonAnalysisBaseObject() {
+  AliProtonAnalysisBase *GetProtonAnalysisBaseObject() const {
     return fProtonAnalysisBase;}
 
   //Vertex QA
   void RunVertexQA(AliGenEventHeader *header,
                   AliStack *stack,
                   AliESDEvent *esd);
-  TList *GetVertexQAList() {return fQAVertexList;}
+  TList *GetVertexQAList() const {return fQAVertexList;}
 
   //QA histograms
   void SetQAYPtBins(Int_t nbinsY, Double_t minY, Double_t maxY,
@@ -55,7 +53,7 @@ class AliProtonQAAnalysis : public TObject {
                     AliESDEvent *esd,
                     const AliESDVertex *vertex);
   void SetRunQAAnalysis();
-  TList *GetGlobalQAList() {return fGlobalQAList;}
+  TList *GetGlobalQAList() const {return fGlobalQAList;}
 
   //Efficiency plots (reconstruction & PID)
   void RunEfficiencyAnalysis(AliMCEvent *mcEvent, 
@@ -68,7 +66,7 @@ class AliProtonQAAnalysis : public TObject {
     fRunEfficiencyAnalysis = kTRUE;
     fUseCutsInEfficiency = gUseCuts;
   }
-  TList *GetEfficiencyQAList() {return fEfficiencyList;}
+  TList *GetEfficiencyQAList() const {return fEfficiencyList;}
 
   //MC analysis
   void RunMCAnalysis(AliStack* stack);
@@ -81,13 +79,13 @@ class AliProtonQAAnalysis : public TObject {
     fMotherParticlePDGCodeFlag = kTRUE;
     fMotherParticlePDGCode = pdgCode;
   }
-  TList *GetPDGList() {return fPDGList;}
-  TList *GetMCProcessesList() {return fMCProcessesList;}
+  TList *GetPDGList() const {return fPDGList;}
+  TList *GetMCProcessesList() const {return fMCProcessesList;}
 
-  TList *GetAcceptedCutList() {return fAcceptedCutList;}
-  TList *GetRejectedCutList() {return fRejectedCutList;}
-  TList *GetAcceptedDCAList() {return fAcceptedDCAList;}
-  TList *GetRejectedDCAList() {return fRejectedDCAList;}
+  TList *GetAcceptedCutList() const {return fAcceptedCutList;}
+  TList *GetRejectedCutList() const {return fRejectedCutList;}
+  TList *GetAcceptedDCAList() const {return fAcceptedDCAList;}
+  TList *GetRejectedDCAList() const {return fRejectedDCAList;}
 
  private:
   AliProtonQAAnalysis(const AliProtonQAAnalysis&); // Not implemented
@@ -104,7 +102,7 @@ class AliProtonQAAnalysis : public TObject {
                  AliESDtrack* track);
  
   Bool_t   IsLabelUsed(TArrayI array, Int_t label);
-  Int_t    ConvertPDGToInt(Int_t pdgCode);
+  Int_t    ConvertPDGToInt(Int_t pdgCode) const;
   
   AliProtonAnalysisBase *fProtonAnalysisBase;//base analysis object