]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixing some minor coding violations
authorcnattras <cnattras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Oct 2010 15:55:35 +0000 (15:55 +0000)
committercnattras <cnattras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Oct 2010 15:55:35 +0000 (15:55 +0000)
12 files changed:
PWG4/totEt/AliAnalysisEt.cxx
PWG4/totEt/AliAnalysisEtMonteCarlo.cxx
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/AliAnalysisTaskTotEt.cxx

index 3d548ba78fbe6b2c61f5c75a2cb915212df881ad..e9b387bcb2588ea4c96825b98569c8e94e62e5b6 100644 (file)
@@ -127,7 +127,7 @@ AliAnalysisEt::AliAnalysisEt() :
 }
 
 AliAnalysisEt::~AliAnalysisEt()
-{
+{//Destructor
   delete fCuts;
   delete fPdgDB;
   if(fTreeDeposit){
index 1a543dcdde16d6ce76bee2713ab24285982e866e..4e148fc295832efa101bb6e352510989b889d336 100644 (file)
@@ -97,7 +97,7 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
 
         // Check for reasonable (for now neutral and singly charged) charge on the particle
         //TODO:Maybe not only singly charged?
-        if (TMath::Abs(pdg->Charge()) != fCuts->GetMonteCarloSingleChargedParticle() && pdg->Charge() != fCuts->GetMonteCarloNeutralParticle()) continue;
+        if (TMath::Abs(TMath::Abs(pdg->Charge()) - fCuts->GetMonteCarloSingleChargedParticle())<1e-3 && TMath::Abs(TMath::Abs(pdg->Charge()) - fCuts->GetMonteCarloNeutralParticle())<1e-3) continue;
 
         fMultiplicity++;
 
@@ -153,7 +153,7 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
              fGammaEt += et;
            }
 
-            if (pdg->Charge() == fCuts->GetMonteCarloNeutralParticle() )
+            if (TMath::Abs(pdg->Charge() - fCuts->GetMonteCarloNeutralParticle()) <1e-3 )
             {
               fNeutralMultiplicity++;
               fTotNeutralEt += et;
@@ -164,7 +164,7 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
                  fTotEtAcc += et;
                 }
             }
-            else if (pdg->Charge() != fCuts->GetMonteCarloNeutralParticle() )
+            else if (TMath::Abs( pdg->Charge() - fCuts->GetMonteCarloNeutralParticle())<1e-3 )
             {
               fChargedMultiplicity++;
               fTotChargedEt += et;
index 28222bfa02426633fde4451b935762899b440eae..36ca3e9b7085629f5e617b93348489f02d330fd9 100644 (file)
@@ -108,6 +108,7 @@ AliAnalysisHadEt::~AliAnalysisHadEt()
   //histoList doesn't really belong to this class - it's passed in
   //fhistoList->Clear();
   //delete fhistoList;
+  //constants don't get deleted
   //delete [] fgEtaAxis;
   //delete [] fgPtAxis;
 }
@@ -372,7 +373,7 @@ Float_t AliAnalysisHadEt::Et(TParticle *part, float mass){//function to calculat
   }
   return 0.0;
 }
-Float_t AliAnalysisHadEt::Et(Float_t p, Float_t theta, Int_t pid, Short_t charge){//function to calculate et in the same way as it would be calculated in a calorimeter
+Float_t AliAnalysisHadEt::Et(Float_t p, Float_t theta, Int_t pid, Short_t charge) const {//function to calculate et in the same way as it would be calculated in a calorimeter
   if(pid==fPiPlusCode || pid==fPiMinusCode){//Nothing special for pions
     return TMath::Sqrt(p*p + fPionMass*fPionMass) * TMath::Sin(theta);
   }
index 210a6fd0e32e99a13ae5e933f9cc30bab3ba7c77..2c88138f2b536cde476bf2bb2623483bf095f982 100644 (file)
@@ -152,7 +152,7 @@ protected:
     void FillHisto2D(TString histname, Float_t x, Float_t y, Float_t weight);
 
     Float_t Et(TParticle *part, float mass = -1000);
-    Float_t Et(Float_t p, Float_t theta, Int_t pid, Short_t charge);
+    Float_t Et(Float_t p, Float_t theta, Int_t pid, Short_t charge) const;
     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
index 706a9f3d849fb15b9815dd5acef376b980486fbf..23a9abf49aa6d7c0cb4c276101d4e07a4490a4c5 100644 (file)
@@ -131,7 +131,7 @@ AliAnalysisHadEtCorrections::AliAnalysisHadEtCorrections(const AliAnalysisHadEtC
 }
 
 
-Float_t AliAnalysisHadEtCorrections::GetConstantCorrections(Bool_t totEt, Float_t ptcut, TString type){
+Float_t AliAnalysisHadEtCorrections::GetConstantCorrections(Bool_t totEt, Float_t ptcut, TString type) const {//Get the correction values that are not pt dependent
   Float_t acceptance = 0.0;
   Float_t neutral = 0.0;
   Float_t ptcorr = 0.0;
@@ -207,49 +207,49 @@ Float_t AliAnalysisHadEtCorrections::GetConstantCorrections(Bool_t totEt, Float_
 //   fBackgroundTPC = g->fBackgroundTPC;
 //   fBackgroundITS = g->fBackgroundITS;
 // }
-Float_t AliAnalysisHadEtCorrections::GetTPCEfficiencyCorrectionPion(const float pT){
+Float_t AliAnalysisHadEtCorrections::GetTPCEfficiencyCorrectionPion(const float pT){//Get the efficiency for reconstructing a pion in the TPC
   if(!fEfficiencyPionTPC){cerr<<"No histogram fEfficiencyPionTPC!"<<endl; return -1.0;}
   float eff = fEfficiencyPionTPC->GetBinContent(fEfficiencyPionTPC->FindBin(pT));
   if(eff<=0.0){cerr<<"Efficiency is zero!"<<endl;  return 0.0;}
   return 1.0/eff;
 }
-Float_t AliAnalysisHadEtCorrections::GetTPCEfficiencyCorrectionKaon(const float pT){
+Float_t AliAnalysisHadEtCorrections::GetTPCEfficiencyCorrectionKaon(const float pT){//Get the efficiency for reconstructing a kaon in the TPC
   if(!fEfficiencyKaonTPC){cerr<<"No histogram fEfficiencyKaonTPC!"<<endl; return -1.0;}
   float eff = fEfficiencyKaonTPC->GetBinContent(fEfficiencyKaonTPC->FindBin(pT));
   if(eff<=0.0){cerr<<"Efficiency is zero!"<<endl;  return 0.0;}
   return 1.0/eff;
 }
-Float_t AliAnalysisHadEtCorrections::GetTPCEfficiencyCorrectionProton(const float pT){
+Float_t AliAnalysisHadEtCorrections::GetTPCEfficiencyCorrectionProton(const float pT){//Get the efficiency for reconstructing a proton in the TPC
   if(!fEfficiencyProtonTPC){cerr<<"No histogram fEfficiencyProtonTPC!"<<endl; return -1.0;}
   float eff = fEfficiencyProtonTPC->GetBinContent(fEfficiencyProtonTPC->FindBin(pT));
   if(eff<=0.0){cerr<<"Efficiency is zero!"<<endl;  return 0.0;}
   return 1.0/eff;
 }
-Float_t AliAnalysisHadEtCorrections::GetTPCEfficiencyCorrectionHadron(const float pT){
+Float_t AliAnalysisHadEtCorrections::GetTPCEfficiencyCorrectionHadron(const float pT){//Get the efficiency for reconstructing a hadron in the TPC
   if(!fEfficiencyHadronTPC){cerr<<"No histogram fEfficiencyHadronTPC!"<<endl; return -1.0;}
   float eff = fEfficiencyHadronTPC->GetBinContent(fEfficiencyHadronTPC->FindBin(pT));
   if(eff<=0.0){cerr<<"Efficiency is zero!"<<endl;  return 0.0;}
   return 1.0/eff;
 }
-Float_t AliAnalysisHadEtCorrections::GetITSEfficiencyCorrectionPion(const float pT){
+Float_t AliAnalysisHadEtCorrections::GetITSEfficiencyCorrectionPion(const float pT){//Get the efficiency for reconstructing a pion in the ITS
   if(!fEfficiencyPionITS){cerr<<"No histogram fEfficiencyPionITS!"<<endl; return -1.0;}
   float eff = fEfficiencyPionITS->GetBinContent(fEfficiencyPionITS->FindBin(pT));
   if(eff<=0.0){cerr<<"Efficiency is zero!"<<endl;  return 0.0;}
   return 1.0/eff;
 }
-Float_t AliAnalysisHadEtCorrections::GetITSEfficiencyCorrectionKaon(const float pT){
+Float_t AliAnalysisHadEtCorrections::GetITSEfficiencyCorrectionKaon(const float pT){//Get the efficiency for reconstructing a kaon in the ITS
   if(!fEfficiencyKaonITS){cerr<<"No histogram fEfficiencyKaonITS!"<<endl; return -1.0;}
   float eff = fEfficiencyKaonITS->GetBinContent(fEfficiencyKaonITS->FindBin(pT));
   if(eff<=0.0){cerr<<"Efficiency is zero!"<<endl;  return 0.0;}
   return 1.0/eff;
 }
-Float_t AliAnalysisHadEtCorrections::GetITSEfficiencyCorrectionProton(const float pT){
+Float_t AliAnalysisHadEtCorrections::GetITSEfficiencyCorrectionProton(const float pT){//Get the efficiency for reconstructing a proton in the ITS
   if(!fEfficiencyProtonITS){cerr<<"No histogram fEfficiencyProtonITS!"<<endl; return -1.0;}
   float eff = fEfficiencyProtonITS->GetBinContent(fEfficiencyProtonITS->FindBin(pT));
   if(eff<=0.0){cerr<<"Efficiency is zero!"<<endl;  return 0.0;}
   return 1.0/eff;
 }
-Float_t AliAnalysisHadEtCorrections::GetITSEfficiencyCorrectionHadron(const float pT){
+Float_t AliAnalysisHadEtCorrections::GetITSEfficiencyCorrectionHadron(const float pT){//Get the efficiency for reconstructing a hadron in the ITS
   if(!fEfficiencyHadronITS){cerr<<"No histogram fEfficiencyHadronITS!"<<endl; return -1.0;}
   float eff = fEfficiencyHadronITS->GetBinContent(fEfficiencyHadronITS->FindBin(pT));
   if(eff<=0.0){cerr<<"Efficiency is zero!"<<endl;  return 0.0;}
index 6850ed1104b1497f612391a56d5feebe8ce51c46..1c383f4c71296e4e04cd7f1268336a35eea6b5e3 100644 (file)
@@ -101,7 +101,7 @@ public:
     void SetBackgroundCorrectionITS(const TH1D *histo){fBackgroundITS=(TH1D*) histo;}
 
     //Returns the factor one needs to multiply by to get the corrected et for all constant (not pt dependent) factors
-    Float_t GetConstantCorrections(Bool_t totEt, Float_t ptcut, TString type);
+    Float_t GetConstantCorrections(Bool_t totEt, Float_t ptcut, TString type) const;
 
 
     AliAnalysisHadEtCorrections(const AliAnalysisHadEtCorrections *g) ; // cpy ctor
@@ -127,7 +127,7 @@ protected:
     Float_t ffpTcutCorrectionTPCHigh;//the high bound on the TPC momentum cut correction
     Float_t ffpTcutCorrectionITSHigh;//the high bound on the ITS momentum cut correction
 
-    //Histograms with the pT dependent corrections
+    //Histograms with the pT dependent fCorrections
     TH1D *fnotIDTPC;//correction for unidentified tracks in the TPC
     TH1D *fnotIDITS;//correction for unidentified tracks in the ITS
     TH1D *fnotIDNoID;//correction for unidentified tracks assuming no ID
index 355ca2619a650c603c4f79aa2be37cf82daf9886..e7efb1ba5255d06ce31868617d0951ef10aa23d1 100644 (file)
@@ -368,6 +368,10 @@ Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
       }
     delete list;
   }
+  delete pID;
+  delete strTPC;
+  delete strITS;
+  delete strTPCITS;
   //delete AliESDpid;
   return 1;
 }
@@ -965,6 +969,9 @@ void AliAnalysisHadEtMonteCarlo::CreateHistograms(){
     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);
   }
+  delete strTPC;
+  delete strITS;
+  delete strTPCITS;
 
   Float_t minEt = 0.0;
   Float_t maxEt = 100.0;
@@ -973,20 +980,20 @@ void AliAnalysisHadEtMonteCarlo::CreateHistograms(){
   char histotitle[200];
   char xtitle[50];
   char ytitle[50];
-  TString *TPC = new TString("TPC");
-  TString *ITS = new TString("ITS");
-  TString *TPCpt = new TString("0.15");
-  TString *ITSpt = new TString("0.10");
-  TString *PID = new TString("");
-  TString *NoPID = new TString("NoPID");
-  TString *NoPIDString = new TString(", No PID");
-  TString *HadEt = new TString("HadEt");
-  TString *TotEt = new TString("TotEt");
-  TString *TotEtString = new TString("total E_{T}");
-  TString *HadEtString = new TString("hadronic E_{T}");
-  TString *Full = new TString("Full");
-  TString *EMCAL = new TString("EMCAL");
-  TString *PHOS = new TString("PHOS");
+  TString *sTPC = new TString("TPC");
+  TString *sITS = new TString("ITS");
+  TString *sTPCpt = new TString("0.15");
+  TString *sITSpt = new TString("0.10");
+  TString *sPID = new TString("");
+  TString *sNoPID = new TString("NoPID");
+  TString *sNoPIDString = new TString(", No PID");
+  TString *sHadEt = new TString("HadEt");
+  TString *sTotEt = new TString("TotEt");
+  TString *sTotEtString = new TString("total E_{T}");
+  TString *sHadEtString = new TString("hadronic E_{T}");
+  TString *sFull = new TString("Full");
+  TString *sEMCAL = new TString("EMCAL");
+  TString *sPHOS = new TString("PHOS");
   
   for(int tpc = 0;tpc<2;tpc++){
     for(int hadet = 0;hadet<2;hadet++){
@@ -999,24 +1006,24 @@ void AliAnalysisHadEtMonteCarlo::CreateHistograms(){
          TString *ptstring;
          TString *partidstring;
          TString *etstring;
-         if(tpc==1) {detector = TPC; ptstring = TPCpt;}
-         else{detector = ITS; ptstring = ITSpt;}
-         if(pid==1){partid = PID; partidstring = PID;}
-         else{partid = NoPID; partidstring = NoPIDString;}
-         if(hadet==1) {et = HadEt; etstring = HadEtString;}
-         else{et = TotEt; etstring = TotEtString;}
+         if(tpc==1) {detector = sTPC; ptstring = sTPCpt;}
+         else{detector = sITS; ptstring = sITSpt;}
+         if(pid==1){partid = sPID; partidstring = sPID;}
+         else{partid = sNoPID; partidstring = sNoPIDString;}
+         if(hadet==1) {et = sHadEt; etstring = sHadEtString;}
+         else{et = sTotEt; etstring = sTotEtString;}
          switch(type){
          case 0:
-           acceptance = Full;
+           acceptance = sFull;
            break;
          case 1:
-           acceptance = EMCAL;
+           acceptance = sEMCAL;
            break;
          case 2:
-           acceptance = PHOS;
+           acceptance = sPHOS;
            break;
          default:
-           acceptance = Full;
+           acceptance = sFull;
          }
          sprintf(histoname,"Sim%sVsReco%s%sAcceptance%s%s",et->Data(),et->Data(),acceptance->Data(),detector->Data(),partid->Data());
          sprintf(histotitle,"Simulated %s vs reconstructed %s with %s acceptance for p_{T}>%s GeV/c%s",etstring->Data(),etstring->Data(),acceptance->Data(),ptstring->Data(),partidstring->Data());
@@ -1036,20 +1043,20 @@ void AliAnalysisHadEtMonteCarlo::CreateHistograms(){
   }
   CreateHisto1D("SimTotEt","Simulated Total E_{T}","Simulated Total E_{T}","Number of events",nbinsEt,minEt,maxEt);
   CreateHisto1D("SimHadEt","Simulated Hadronic E_{T}","Simulated Hadronic E_{T}","Number of events",nbinsEt,minEt,maxEt);
-  delete TPC;
-  delete ITS;
-  delete TPCpt;
-  delete ITSpt;
-  delete PID;
-  delete NoPID;
-  delete NoPIDString;
-  delete HadEt;
-  delete TotEt;
-  delete TotEtString;
-  delete HadEtString;
-  delete Full;
-  delete EMCAL;
-  delete PHOS;
+  delete sTPC;
+  delete sITS;
+  delete sTPCpt;
+  delete sITSpt;
+  delete sPID;
+  delete sNoPID;
+  delete sNoPIDString;
+  delete sHadEt;
+  delete sTotEt;
+  delete sTotEtString;
+  delete sHadEtString;
+  delete sFull;
+  delete sEMCAL;
+  delete sPHOS;
   CreateIntHisto1D("NEvents","Number of events","number of events","Number of events",1,0,1);
 
 }
index 2f51c6781a8ad4f19b0d1ade55c819af71757b66..fe6a05acc6b736793ee02ef1fde00e5e39baab2b 100644 (file)
@@ -27,8 +27,8 @@ public:
     void CreateHistograms();
     virtual void Init();
 
-    Float_t GetSimulatedHadronicEt(){return fSimHadEt;}
-    Float_t GetSimulatedTotalEt(){return fSimTotEt;}
+    Float_t GetSimulatedHadronicEt() const {return fSimHadEt;}
+    Float_t GetSimulatedTotalEt() const {return fSimTotEt;}
 
     void FillSimTotEtVsRecoTotEtFullAcceptanceTPC(Float_t et){FillHisto2D("SimTotEtVsRecoTotEtFullAcceptanceTPC",fSimTotEt,et,1.0);}
     void FillSimTotEtVsRecoTotEtFullAcceptanceITS(Float_t et){FillHisto2D("SimTotEtVsRecoTotEtFullAcceptanceITS",fSimTotEt,et,1.0);}
@@ -84,8 +84,8 @@ public:
     AliAnalysisHadEtMonteCarlo & operator = (const AliAnalysisHadEtMonteCarlo & g) ;//cpy assignment
     AliAnalysisHadEtMonteCarlo(const AliAnalysisHadEtMonteCarlo & g) ; // cpy ctor
 
-    Float_t fSimHadEt;
-    Float_t fSimTotEt;
+    Float_t fSimHadEt;//simulated Et event by event
+    Float_t fSimTotEt;//total et event by event
 
     void ResetEventValues();
     ClassDef(AliAnalysisHadEtMonteCarlo, 1);
index e21c34ef9df04b8e493f92b047c15e18fc014d61..1ef2f3957bff48958ba8898cd159836dcf3fdfe8 100644 (file)
@@ -32,7 +32,7 @@ ClassImp(AliAnalysisHadEtReconstructed);
 
 AliAnalysisHadEtReconstructed::AliAnalysisHadEtReconstructed() :
         AliAnalysisHadEt()
-       ,corrections(0)
+       ,fCorrections(0)
        ,fConfigFile("ConfigHadEtAnalysis.C")
     ,fCorrTotEtFullAcceptanceTPC(0)
     ,fCorrTotEtFullAcceptanceITS(0)
@@ -76,6 +76,7 @@ AliAnalysisHadEtReconstructed::AliAnalysisHadEtReconstructed() :
 
 AliAnalysisHadEtReconstructed::~AliAnalysisHadEtReconstructed() 
 {
+  delete fCorrections;
 }
 
 Int_t AliAnalysisHadEtReconstructed::AnalyseEvent(AliVEvent* ev)
@@ -125,7 +126,7 @@ Int_t AliAnalysisHadEtReconstructed::AnalyseEvent(AliVEvent* ev)
              continue;
            }
          else{
-           if(TMath::Abs(track->Eta())>corrections->GetEtaCut()) continue;
+           if(TMath::Abs(track->Eta())>fCorrections->GetEtaCut()) continue;
            Float_t nSigmaPion,nSigmaProton,nSigmaKaon,nSigmaElectron;
            
            if(cutset!=1){
@@ -153,22 +154,22 @@ Int_t AliAnalysisHadEtReconstructed::AnalyseEvent(AliVEvent* ev)
 
            bool inPHOS = IsInPHOS(track);
            bool inEMCAL = IsInEMCAL(track);
-           //if(!(corrections->GetEfficiencyPionTPC())) cerr<<"Uh-oh!  No histogram!"<<endl;
+           //if(!(fCorrections->GetEfficiencyPionTPC())) cerr<<"Uh-oh!  No histogram!"<<endl;
 
            Float_t corrBkgd=0.0;
            Float_t corrNotID=0.0;
-           Float_t corrNoID = corrections->GetNotIDCorrectionNoPID(track->Pt());
+           Float_t corrNoID = fCorrections->GetNotIDCorrectionNoPID(track->Pt());
            Float_t corrEff = 0.0;
            Float_t corrEffNoID = 0.0;
            if(cutset==0){//TPC
-             corrBkgd = corrections->GetBackgroundCorrectionTPC(track->Pt());
-             corrEffNoID = corrections->GetTPCEfficiencyCorrectionHadron(track->Pt());
-             corrNotID = corrections->GetNotIDCorrectionTPC(track->Pt());
+             corrBkgd = fCorrections->GetBackgroundCorrectionTPC(track->Pt());
+             corrEffNoID = fCorrections->GetTPCEfficiencyCorrectionHadron(track->Pt());
+             corrNotID = fCorrections->GetNotIDCorrectionTPC(track->Pt());
            }
            if(cutset==1){//ITS
-             corrBkgd = corrections->GetBackgroundCorrectionITS(track->Pt());
-             //corrEffNoID = corrections->GetITSEfficiencyCorrectionHadron(track->Pt());
-             corrNotID = corrections->GetNotIDCorrectionITS(track->Pt());
+             corrBkgd = fCorrections->GetBackgroundCorrectionITS(track->Pt());
+             //corrEffNoID = fCorrections->GetITSEfficiencyCorrectionHadron(track->Pt());
+             corrNotID = fCorrections->GetNotIDCorrectionITS(track->Pt());
            }
            Float_t et = 0.0;
            Float_t etNoID = Et(track->P(),track->Theta(),fPiPlusCode,track->Charge());
@@ -179,8 +180,8 @@ Int_t AliAnalysisHadEtReconstructed::AnalyseEvent(AliVEvent* ev)
            if(isPion){
              FillHisto2D(Form("dEdxDataPion%s",cutName->Data()),track->P(),dEdx,1.0);
              et = Et(track->P(),track->Theta(),fPiPlusCode,track->Charge());
-             if(cutset==0){corrEff = corrections->GetTPCEfficiencyCorrectionPion(track->Pt());}
-             //else{corrEff = corrections->GetITSEfficiencyCorrectionPion(track->Pt());}
+             if(cutset==0){corrEff = fCorrections->GetTPCEfficiencyCorrectionPion(track->Pt());}
+             //else{corrEff = fCorrections->GetITSEfficiencyCorrectionPion(track->Pt());}
              etpartialcorrected = et*corrBkgd*corrEff;
              
              if(track->Charge()>0.0){
@@ -195,8 +196,8 @@ Int_t AliAnalysisHadEtReconstructed::AnalyseEvent(AliVEvent* ev)
            if(isKaon){
              FillHisto2D(Form("dEdxDataKaon%s",cutName->Data()),track->P(),dEdx,1.0);
              et = Et(track->P(),track->Theta(),fKPlusCode,track->Charge());
-             if(cutset==0){corrEff = corrections->GetTPCEfficiencyCorrectionKaon(track->Pt());}
-             //else{corrEff = corrections->GetITSEfficiencyCorrectionKaon(track->Pt());}
+             if(cutset==0){corrEff = fCorrections->GetTPCEfficiencyCorrectionKaon(track->Pt());}
+             //else{corrEff = fCorrections->GetITSEfficiencyCorrectionKaon(track->Pt());}
              etpartialcorrected = et*corrBkgd*corrEff;
              
              if(track->Charge()>0.0){
@@ -211,8 +212,8 @@ Int_t AliAnalysisHadEtReconstructed::AnalyseEvent(AliVEvent* ev)
            if(isProton){
              FillHisto2D(Form("dEdxDataProton%s",cutName->Data()),track->P(),dEdx,1.0);
              et = Et(track->P(),track->Theta(),fProtonCode,track->Charge());
-             if(cutset==0){corrEff = corrections->GetTPCEfficiencyCorrectionProton(track->Pt());}
-             //else{corrEff = corrections->GetITSEfficiencyCorrectionProton(track->Pt());}
+             if(cutset==0){corrEff = fCorrections->GetTPCEfficiencyCorrectionProton(track->Pt());}
+             //else{corrEff = fCorrections->GetITSEfficiencyCorrectionProton(track->Pt());}
              etpartialcorrected = et*corrBkgd*corrEff;
              
              if(track->Charge()>0.0){
@@ -309,9 +310,13 @@ Int_t AliAnalysisHadEtReconstructed::AnalyseEvent(AliVEvent* ev)
     FillHisto1D("RecoRawEtFullAcceptanceITSNoPID",GetRawEtFullAcceptanceITSNoPID(),1.0);
     FillHisto1D("RecoRawEtEMCALAcceptanceITSNoPID",GetRawEtEMCALAcceptanceITSNoPID(),1.0);
     FillHisto1D("RecoRawEtPHOSAcceptanceITSNoPID",GetRawEtPHOSAcceptanceITSNoPID(),1.0);
+    delete pID;
+    delete strTPC;
+    delete strITS;
+    delete strTPCITS;
     return 1;
 }
-void AliAnalysisHadEtReconstructed::AddEt(Float_t rawEt, Float_t rawEtNoPID, Float_t corrEt, Float_t corrEtNoPID, Float_t pt, Bool_t IsTPC, Bool_t InPHOS, Bool_t InEMCAL) {
+void AliAnalysisHadEtReconstructed::AddEt(Float_t rawEt, Float_t rawEtNoPID, Float_t corrEt, Float_t corrEtNoPID, Float_t pt, Bool_t IsTPC, Bool_t InPHOS, Bool_t InEMCAL) {//Adding Et to each of the variables that tracks et event by event
   if(pt>=AliAnalysisHadEt::fgPtTPCCutOff && IsTPC){//TPC tracks
     //adding to the raw Et
     //if(InEMCAL) cout<<"Adding "<<rawEt<<" to the raw Et"<<endl;
@@ -381,24 +386,24 @@ void AliAnalysisHadEtReconstructed::Init()
 
   if (fConfigFile.Length()) {
     gROOT->LoadMacro(fConfigFile);
-    corrections = (AliAnalysisHadEtCorrections *) gInterpreter->ProcessLine("ConfigHadEtAnalysis()");
-    fCorrTotEtFullAcceptanceTPC = corrections->GetConstantCorrections(kTRUE,fgPtTPCCutOff,"Full");
-    fCorrTotEtFullAcceptanceITS = corrections->GetConstantCorrections(kTRUE,fgPtITSCutOff,"Full");
-    fCorrHadEtFullAcceptanceTPC = corrections->GetConstantCorrections(kFALSE,fgPtTPCCutOff,"Full");
-    fCorrHadEtFullAcceptanceITS = corrections->GetConstantCorrections(kFALSE,fgPtITSCutOff,"Full");
-    fCorrTotEtEMCALAcceptanceTPC = corrections->GetConstantCorrections(kTRUE,fgPtTPCCutOff,"EMCAL");
-    fCorrTotEtEMCALAcceptanceITS = corrections->GetConstantCorrections(kTRUE,fgPtITSCutOff,"EMCAL");
-    fCorrHadEtEMCALAcceptanceTPC = corrections->GetConstantCorrections(kFALSE,fgPtTPCCutOff,"EMCAL");
-    fCorrHadEtEMCALAcceptanceITS = corrections->GetConstantCorrections(kFALSE,fgPtITSCutOff,"EMCAL");
-    fCorrTotEtPHOSAcceptanceTPC = corrections->GetConstantCorrections(kTRUE,fgPtTPCCutOff,"PHOS");
-    fCorrTotEtPHOSAcceptanceITS = corrections->GetConstantCorrections(kTRUE,fgPtITSCutOff,"PHOS");
-    fCorrHadEtPHOSAcceptanceTPC = corrections->GetConstantCorrections(kFALSE,fgPtTPCCutOff,"PHOS");
-    fCorrHadEtPHOSAcceptanceITS = corrections->GetConstantCorrections(kFALSE,fgPtITSCutOff,"PHOS");
+    fCorrections = (AliAnalysisHadEtCorrections *) gInterpreter->ProcessLine("ConfigHadEtAnalysis()");
+    fCorrTotEtFullAcceptanceTPC = fCorrections->GetConstantCorrections(kTRUE,fgPtTPCCutOff,"Full");
+    fCorrTotEtFullAcceptanceITS = fCorrections->GetConstantCorrections(kTRUE,fgPtITSCutOff,"Full");
+    fCorrHadEtFullAcceptanceTPC = fCorrections->GetConstantCorrections(kFALSE,fgPtTPCCutOff,"Full");
+    fCorrHadEtFullAcceptanceITS = fCorrections->GetConstantCorrections(kFALSE,fgPtITSCutOff,"Full");
+    fCorrTotEtEMCALAcceptanceTPC = fCorrections->GetConstantCorrections(kTRUE,fgPtTPCCutOff,"EMCAL");
+    fCorrTotEtEMCALAcceptanceITS = fCorrections->GetConstantCorrections(kTRUE,fgPtITSCutOff,"EMCAL");
+    fCorrHadEtEMCALAcceptanceTPC = fCorrections->GetConstantCorrections(kFALSE,fgPtTPCCutOff,"EMCAL");
+    fCorrHadEtEMCALAcceptanceITS = fCorrections->GetConstantCorrections(kFALSE,fgPtITSCutOff,"EMCAL");
+    fCorrTotEtPHOSAcceptanceTPC = fCorrections->GetConstantCorrections(kTRUE,fgPtTPCCutOff,"PHOS");
+    fCorrTotEtPHOSAcceptanceITS = fCorrections->GetConstantCorrections(kTRUE,fgPtITSCutOff,"PHOS");
+    fCorrHadEtPHOSAcceptanceTPC = fCorrections->GetConstantCorrections(kFALSE,fgPtTPCCutOff,"PHOS");
+    fCorrHadEtPHOSAcceptanceITS = fCorrections->GetConstantCorrections(kFALSE,fgPtITSCutOff,"PHOS");
 
   }
 }
 
-void AliAnalysisHadEtReconstructed::ResetEventValues(){
+void AliAnalysisHadEtReconstructed::ResetEventValues(){//resetting event by event et's
   AliAnalysisHadEt::ResetEventValues();
      fCorrectedHadEtFullAcceptanceTPCNoPID=0.0;
      fCorrectedHadEtFullAcceptanceITSNoPID=0.0;
@@ -427,27 +432,27 @@ void AliAnalysisHadEtReconstructed::ResetEventValues(){
 
      if(TMath::Abs(fCorrTotEtFullAcceptanceTPC)<1e-3){
        if (fConfigFile.Length()) {
-        cout<<"Rereading corrections file..."<<endl;
+        cout<<"Rereading fCorrections file..."<<endl;
         gROOT->LoadMacro(fConfigFile);
-        corrections = (AliAnalysisHadEtCorrections *) gInterpreter->ProcessLine("ConfigHadEtAnalysis()");
-        fCorrTotEtFullAcceptanceTPC = corrections->GetConstantCorrections(kTRUE,fgPtTPCCutOff,"Full");
-        fCorrTotEtFullAcceptanceITS = corrections->GetConstantCorrections(kTRUE,fgPtITSCutOff,"Full");
-        fCorrHadEtFullAcceptanceTPC = corrections->GetConstantCorrections(kFALSE,fgPtTPCCutOff,"Full");
-        fCorrHadEtFullAcceptanceITS = corrections->GetConstantCorrections(kFALSE,fgPtITSCutOff,"Full");
-        fCorrTotEtEMCALAcceptanceTPC = corrections->GetConstantCorrections(kTRUE,fgPtTPCCutOff,"EMCAL");
-        fCorrTotEtEMCALAcceptanceITS = corrections->GetConstantCorrections(kTRUE,fgPtITSCutOff,"EMCAL");
-        fCorrHadEtEMCALAcceptanceTPC = corrections->GetConstantCorrections(kFALSE,fgPtTPCCutOff,"EMCAL");
-        fCorrHadEtEMCALAcceptanceITS = corrections->GetConstantCorrections(kFALSE,fgPtITSCutOff,"EMCAL");
-        fCorrTotEtPHOSAcceptanceTPC = corrections->GetConstantCorrections(kTRUE,fgPtTPCCutOff,"PHOS");
-        fCorrTotEtPHOSAcceptanceITS = corrections->GetConstantCorrections(kTRUE,fgPtITSCutOff,"PHOS");
-        fCorrHadEtPHOSAcceptanceTPC = corrections->GetConstantCorrections(kFALSE,fgPtTPCCutOff,"PHOS");
-        fCorrHadEtPHOSAcceptanceITS = corrections->GetConstantCorrections(kFALSE,fgPtITSCutOff,"PHOS");
+        fCorrections = (AliAnalysisHadEtCorrections *) gInterpreter->ProcessLine("ConfigHadEtAnalysis()");
+        fCorrTotEtFullAcceptanceTPC = fCorrections->GetConstantCorrections(kTRUE,fgPtTPCCutOff,"Full");
+        fCorrTotEtFullAcceptanceITS = fCorrections->GetConstantCorrections(kTRUE,fgPtITSCutOff,"Full");
+        fCorrHadEtFullAcceptanceTPC = fCorrections->GetConstantCorrections(kFALSE,fgPtTPCCutOff,"Full");
+        fCorrHadEtFullAcceptanceITS = fCorrections->GetConstantCorrections(kFALSE,fgPtITSCutOff,"Full");
+        fCorrTotEtEMCALAcceptanceTPC = fCorrections->GetConstantCorrections(kTRUE,fgPtTPCCutOff,"EMCAL");
+        fCorrTotEtEMCALAcceptanceITS = fCorrections->GetConstantCorrections(kTRUE,fgPtITSCutOff,"EMCAL");
+        fCorrHadEtEMCALAcceptanceTPC = fCorrections->GetConstantCorrections(kFALSE,fgPtTPCCutOff,"EMCAL");
+        fCorrHadEtEMCALAcceptanceITS = fCorrections->GetConstantCorrections(kFALSE,fgPtITSCutOff,"EMCAL");
+        fCorrTotEtPHOSAcceptanceTPC = fCorrections->GetConstantCorrections(kTRUE,fgPtTPCCutOff,"PHOS");
+        fCorrTotEtPHOSAcceptanceITS = fCorrections->GetConstantCorrections(kTRUE,fgPtITSCutOff,"PHOS");
+        fCorrHadEtPHOSAcceptanceTPC = fCorrections->GetConstantCorrections(kFALSE,fgPtTPCCutOff,"PHOS");
+        fCorrHadEtPHOSAcceptanceITS = fCorrections->GetConstantCorrections(kFALSE,fgPtITSCutOff,"PHOS");
        }
        else{cerr<<"Uh-oh!  Unable to open configuration file!"<<endl;}
      }
 
 }
-void AliAnalysisHadEtReconstructed::CreateHistograms(){
+void AliAnalysisHadEtReconstructed::CreateHistograms(){//Creating histograms and adding them to the output TList
 
   TString *strTPC = new TString("TPC");
   TString *strITS = new TString("ITS");
@@ -520,22 +525,22 @@ void AliAnalysisHadEtReconstructed::CreateHistograms(){
   char histotitle[200];
   char xtitle[50];
   TString *ytitle = new TString("Number of events");
-  TString *TPC = new TString("TPC");
-  TString *ITS = new TString("ITS");
-  TString *TPCpt = new TString("0.15");
-  TString *ITSpt = new TString("0.10");
-  TString *PID = new TString("");
-  TString *NoPID = new TString("NoPID");
-  TString *NoPIDString = new TString(", No PID");
-  TString *HadEt = new TString("HadEt");
-  TString *RawEt = new TString("RawEt");
-  TString *TotEt = new TString("TotEt");
-  TString *TotEtString = new TString("total E_{T}");
-  TString *HadEtString = new TString("hadronic E_{T}");
-  TString *RawEtString = new TString("raw E_{T}");
-  TString *Full = new TString("Full");
-  TString *EMCAL = new TString("EMCAL");
-  TString *PHOS = new TString("PHOS");
+  TString *sTPC = new TString("TPC");
+  TString *sITS = new TString("ITS");
+  TString *sTPCpt = new TString("0.15");
+  TString *sITSpt = new TString("0.10");
+  TString *sPID = new TString("");
+  TString *sNoPID = new TString("NoPID");
+  TString *sNoPIDString = new TString(", No PID");
+  TString *sHadEt = new TString("HadEt");
+  TString *sRawEt = new TString("RawEt");
+  TString *sTotEt = new TString("TotEt");
+  TString *sTotEtString = new TString("total E_{T}");
+  TString *sHadEtString = new TString("hadronic E_{T}");
+  TString *sRawEtString = new TString("raw E_{T}");
+  TString *sFull = new TString("Full");
+  TString *sEMCAL = new TString("EMCAL");
+  TString *sPHOS = new TString("PHOS");
   
   for(int tpc = 0;tpc<2;tpc++){
     for(int hadet = 0;hadet<3;hadet++){
@@ -543,58 +548,53 @@ void AliAnalysisHadEtReconstructed::CreateHistograms(){
        for(int pid = 0;pid<2;pid++){
          TString *detector;
          TString *partid;
-         TString *et = HadEt;
+         TString *et = sHadEt;
          TString *acceptance;
          TString *ptstring;
          TString *partidstring;
-         TString *etstring = HadEtString;
-         if(tpc==1) {detector = TPC; ptstring = TPCpt;}
-         else{detector = ITS; ptstring = ITSpt;}
-         if(pid==1){partid = PID; partidstring = PID;}
-         else{partid = NoPID; partidstring = NoPIDString;}
-         if(hadet==1) {et = HadEt; etstring = HadEtString;}
-         if(hadet==0){et = TotEt; etstring = TotEtString;}
-         if(hadet==2){et = RawEt; etstring = RawEtString;}
+         TString *etstring = sHadEtString;
+         if(tpc==1) {detector = sTPC; ptstring = sTPCpt;}
+         else{detector = sITS; ptstring = sITSpt;}
+         if(pid==1){partid = sPID; partidstring = sPID;}
+         else{partid = sNoPID; partidstring = sNoPIDString;}
+         if(hadet==1) {et = sHadEt; etstring = sHadEtString;}
+         if(hadet==0){et = sTotEt; etstring = sTotEtString;}
+         if(hadet==2){et = sRawEt; etstring = sRawEtString;}
          switch(type){
          case 0:
-           acceptance = Full;
+           acceptance = sFull;
            break;
          case 1:
-           acceptance = EMCAL;
+           acceptance = sEMCAL;
            break;
          case 2:
-           acceptance = PHOS;
+           acceptance = sPHOS;
            break;
          default:
-           acceptance = Full;
+           acceptance = sFull;
          }
          sprintf(histoname,"Reco%s%sAcceptance%s%s",et->Data(),acceptance->Data(),detector->Data(),partid->Data());
          sprintf(histotitle,"Reconstructed %s with %s acceptance for p_{T}>%s GeV/c%s",etstring->Data(),acceptance->Data(),ptstring->Data(),partidstring->Data());
          sprintf(xtitle,"Reconstructed %s",etstring->Data());
          CreateHisto1D(histoname,histotitle,xtitle,ytitle->Data(),nbinsEt,minEt,maxEt);
-//       sprintf(histoname,"RecoRaw%s%sAcceptance%s%s",et->Data(),acceptance->Data(),detector->Data(),partid->Data());
-//       sprintf(histotitle,"Raw Reconstructed %s with %s acceptance for p_{T}>%s GeV/c%s",etstring->Data(),acceptance->Data(),ptstring->Data(),partidstring->Data());
-//       sprintf(xtitle,"Reconstructed Raw %s",etstring->Data());
-//       CreateHisto1D(histoname,histotitle,xtitle,ytitle->Data(),nbinsEt,minEt,maxEt);
-         //cout<<"I want to make "<<histoname<<" with the title "<<histotitle<<endl;
        }
       }
     }
   }
 
-  delete TPC;
-  delete ITS;
-  delete TPCpt;
-  delete ITSpt;
-  delete PID;
-  delete NoPID;
-  delete NoPIDString;
-  delete HadEt;
-  delete TotEt;
-  delete TotEtString;
-  delete HadEtString;
-  delete Full;
-  delete EMCAL;
-  delete PHOS;
+  delete sTPC;
+  delete sITS;
+  delete sTPCpt;
+  delete sITSpt;
+  delete sPID;
+  delete sNoPID;
+  delete sNoPIDString;
+  delete sHadEt;
+  delete sTotEt;
+  delete sTotEtString;
+  delete sHadEtString;
+  delete sFull;
+  delete sEMCAL;
+  delete sPHOS;
 
 }
index b553b56294b8e664f2f7fe45c970a7b5b2e10a5d..03400a3396ecadf88b39630172fdde9b68d76959 100644 (file)
@@ -27,43 +27,43 @@ public:
     virtual void SetConfigFile(const char *c) {fConfigFile = c;}
     virtual Int_t AnalyseEvent(AliVEvent* event);
 
-    //the "Corrected" variables are only corrected for the track-by-track corrections
-    Float_t GetCorrectedHadEtFullAcceptanceTPC(){return fCorrHadEtFullAcceptanceTPC*fCorrectedHadEtFullAcceptanceTPC;}
-    Float_t GetCorrectedHadEtFullAcceptanceITS(){return fCorrHadEtFullAcceptanceITS*(fCorrectedHadEtFullAcceptanceTPC+fCorrectedHadEtFullAcceptanceITS);}
-    Float_t GetCorrectedHadEtEMCALAcceptanceTPC(){return fCorrHadEtEMCALAcceptanceTPC*fCorrectedHadEtEMCALAcceptanceTPC;}
-    Float_t GetCorrectedHadEtEMCALAcceptanceITS(){return fCorrHadEtEMCALAcceptanceITS*(fCorrectedHadEtEMCALAcceptanceTPC+fCorrectedHadEtEMCALAcceptanceITS);}
-    Float_t GetCorrectedHadEtPHOSAcceptanceTPC(){return fCorrHadEtPHOSAcceptanceTPC*fCorrectedHadEtPHOSAcceptanceTPC;}
-    Float_t GetCorrectedHadEtPHOSAcceptanceITS(){return fCorrHadEtPHOSAcceptanceITS*(fCorrectedHadEtPHOSAcceptanceTPC+fCorrectedHadEtPHOSAcceptanceITS);}
-    Float_t GetCorrectedTotEtFullAcceptanceTPC(){return fCorrTotEtFullAcceptanceTPC*fCorrectedHadEtFullAcceptanceTPC;}
-    Float_t GetCorrectedTotEtFullAcceptanceITS(){return fCorrTotEtFullAcceptanceITS*(fCorrectedHadEtFullAcceptanceTPC+fCorrectedHadEtFullAcceptanceITS);}
-    Float_t GetCorrectedTotEtEMCALAcceptanceTPC(){return fCorrTotEtEMCALAcceptanceTPC*fCorrectedHadEtEMCALAcceptanceTPC;}
-    Float_t GetCorrectedTotEtEMCALAcceptanceITS(){return fCorrTotEtEMCALAcceptanceITS*(fCorrectedHadEtEMCALAcceptanceTPC+fCorrectedHadEtEMCALAcceptanceITS);}
-    Float_t GetCorrectedTotEtPHOSAcceptanceTPC(){return fCorrTotEtPHOSAcceptanceTPC*fCorrectedHadEtPHOSAcceptanceTPC;}
-    Float_t GetCorrectedTotEtPHOSAcceptanceITS(){return fCorrTotEtPHOSAcceptanceTPC*(fCorrectedHadEtPHOSAcceptanceTPC+fCorrectedHadEtPHOSAcceptanceITS);}
-    Float_t GetRawEtFullAcceptanceTPC(){return fRawEtFullAcceptanceTPC;}
-    Float_t GetRawEtFullAcceptanceITS(){return fRawEtFullAcceptanceITS+fRawEtFullAcceptanceTPC;}
-    Float_t GetRawEtEMCALAcceptanceTPC(){return fRawEtEMCALAcceptanceTPC;}
-    Float_t GetRawEtEMCALAcceptanceITS(){return fRawEtEMCALAcceptanceITS+fRawEtEMCALAcceptanceTPC;}
-    Float_t GetRawEtPHOSAcceptanceTPC(){return fRawEtPHOSAcceptanceTPC;}
-    Float_t GetRawEtPHOSAcceptanceITS(){return fRawEtPHOSAcceptanceITS+fRawEtPHOSAcceptanceTPC;}
-    Float_t GetCorrectedHadEtFullAcceptanceTPCNoPID(){return fCorrHadEtFullAcceptanceTPC*fCorrectedHadEtFullAcceptanceTPCNoPID;}
-    Float_t GetCorrectedHadEtFullAcceptanceITSNoPID(){return fCorrHadEtFullAcceptanceITS*(fCorrectedHadEtFullAcceptanceTPCNoPID+fCorrectedHadEtFullAcceptanceITSNoPID);}
-    Float_t GetCorrectedHadEtEMCALAcceptanceTPCNoPID(){return fCorrHadEtEMCALAcceptanceTPC*fCorrectedHadEtEMCALAcceptanceTPCNoPID;}
-    Float_t GetCorrectedHadEtEMCALAcceptanceITSNoPID(){return fCorrHadEtEMCALAcceptanceITS*(fCorrectedHadEtEMCALAcceptanceTPCNoPID+fCorrectedHadEtEMCALAcceptanceITSNoPID);}
-    Float_t GetCorrectedHadEtPHOSAcceptanceTPCNoPID(){return fCorrHadEtPHOSAcceptanceTPC*fCorrectedHadEtPHOSAcceptanceTPCNoPID;}
-    Float_t GetCorrectedHadEtPHOSAcceptanceITSNoPID(){return fCorrHadEtPHOSAcceptanceITS*(fCorrectedHadEtPHOSAcceptanceTPCNoPID+fCorrectedHadEtPHOSAcceptanceITSNoPID);}
-    Float_t GetCorrectedTotEtFullAcceptanceTPCNoPID(){return fCorrTotEtFullAcceptanceTPC*fCorrectedHadEtFullAcceptanceTPCNoPID;}
-    Float_t GetCorrectedTotEtFullAcceptanceITSNoPID(){return fCorrTotEtFullAcceptanceITS*(fCorrectedHadEtFullAcceptanceTPCNoPID+fCorrectedHadEtFullAcceptanceITSNoPID);}
-    Float_t GetCorrectedTotEtEMCALAcceptanceTPCNoPID(){return fCorrTotEtEMCALAcceptanceTPC*fCorrectedHadEtEMCALAcceptanceTPCNoPID;}
-    Float_t GetCorrectedTotEtEMCALAcceptanceITSNoPID(){return fCorrTotEtEMCALAcceptanceITS*(fCorrectedHadEtEMCALAcceptanceTPCNoPID+fCorrectedHadEtEMCALAcceptanceITSNoPID);}
-    Float_t GetCorrectedTotEtPHOSAcceptanceTPCNoPID(){return fCorrTotEtPHOSAcceptanceTPC*fCorrectedHadEtPHOSAcceptanceTPCNoPID;}
-    Float_t GetCorrectedTotEtPHOSAcceptanceITSNoPID(){return fCorrTotEtPHOSAcceptanceITS*(fCorrectedHadEtPHOSAcceptanceTPCNoPID+fCorrectedHadEtPHOSAcceptanceITSNoPID);}
-    Float_t GetRawEtFullAcceptanceTPCNoPID(){return fRawEtFullAcceptanceTPCNoPID;}
-    Float_t GetRawEtFullAcceptanceITSNoPID(){return fRawEtFullAcceptanceITSNoPID+fRawEtFullAcceptanceTPCNoPID;}
-    Float_t GetRawEtEMCALAcceptanceTPCNoPID(){return fRawEtEMCALAcceptanceTPCNoPID;}
-    Float_t GetRawEtEMCALAcceptanceITSNoPID(){return fRawEtEMCALAcceptanceITSNoPID+fRawEtEMCALAcceptanceTPCNoPID;}
-    Float_t GetRawEtPHOSAcceptanceTPCNoPID(){return fRawEtPHOSAcceptanceTPCNoPID;}
-    Float_t GetRawEtPHOSAcceptanceITSNoPID(){return fRawEtPHOSAcceptanceITSNoPID+fRawEtPHOSAcceptanceTPCNoPID;}
+    //the "Corrected" variables are only corrected for the track-by-track fCorrections
+    Float_t GetCorrectedHadEtFullAcceptanceTPC() const {return fCorrHadEtFullAcceptanceTPC*fCorrectedHadEtFullAcceptanceTPC;}
+    Float_t GetCorrectedHadEtFullAcceptanceITS() const {return fCorrHadEtFullAcceptanceITS*(fCorrectedHadEtFullAcceptanceTPC+fCorrectedHadEtFullAcceptanceITS);}
+    Float_t GetCorrectedHadEtEMCALAcceptanceTPC() const{return fCorrHadEtEMCALAcceptanceTPC*fCorrectedHadEtEMCALAcceptanceTPC;}
+    Float_t GetCorrectedHadEtEMCALAcceptanceITS() const {return fCorrHadEtEMCALAcceptanceITS*(fCorrectedHadEtEMCALAcceptanceTPC+fCorrectedHadEtEMCALAcceptanceITS);}
+    Float_t GetCorrectedHadEtPHOSAcceptanceTPC() const {return fCorrHadEtPHOSAcceptanceTPC*fCorrectedHadEtPHOSAcceptanceTPC;}
+    Float_t GetCorrectedHadEtPHOSAcceptanceITS() const {return fCorrHadEtPHOSAcceptanceITS*(fCorrectedHadEtPHOSAcceptanceTPC+fCorrectedHadEtPHOSAcceptanceITS);}
+    Float_t GetCorrectedTotEtFullAcceptanceTPC() const {return fCorrTotEtFullAcceptanceTPC*fCorrectedHadEtFullAcceptanceTPC;}
+    Float_t GetCorrectedTotEtFullAcceptanceITS() const {return fCorrTotEtFullAcceptanceITS*(fCorrectedHadEtFullAcceptanceTPC+fCorrectedHadEtFullAcceptanceITS);}
+    Float_t GetCorrectedTotEtEMCALAcceptanceTPC() const {return fCorrTotEtEMCALAcceptanceTPC*fCorrectedHadEtEMCALAcceptanceTPC;}
+    Float_t GetCorrectedTotEtEMCALAcceptanceITS() const {return fCorrTotEtEMCALAcceptanceITS*(fCorrectedHadEtEMCALAcceptanceTPC+fCorrectedHadEtEMCALAcceptanceITS);}
+    Float_t GetCorrectedTotEtPHOSAcceptanceTPC() const {return fCorrTotEtPHOSAcceptanceTPC*fCorrectedHadEtPHOSAcceptanceTPC;}
+    Float_t GetCorrectedTotEtPHOSAcceptanceITS() const {return fCorrTotEtPHOSAcceptanceTPC*(fCorrectedHadEtPHOSAcceptanceTPC+fCorrectedHadEtPHOSAcceptanceITS);}
+    Float_t GetRawEtFullAcceptanceTPC() const {return fRawEtFullAcceptanceTPC;}
+    Float_t GetRawEtFullAcceptanceITS() const {return fRawEtFullAcceptanceITS+fRawEtFullAcceptanceTPC;}
+    Float_t GetRawEtEMCALAcceptanceTPC() const {return fRawEtEMCALAcceptanceTPC;}
+    Float_t GetRawEtEMCALAcceptanceITS() const {return fRawEtEMCALAcceptanceITS+fRawEtEMCALAcceptanceTPC;}
+    Float_t GetRawEtPHOSAcceptanceTPC() const {return fRawEtPHOSAcceptanceTPC;}
+    Float_t GetRawEtPHOSAcceptanceITS()const {return fRawEtPHOSAcceptanceITS+fRawEtPHOSAcceptanceTPC;}
+    Float_t GetCorrectedHadEtFullAcceptanceTPCNoPID() const {return fCorrHadEtFullAcceptanceTPC*fCorrectedHadEtFullAcceptanceTPCNoPID;}
+    Float_t GetCorrectedHadEtFullAcceptanceITSNoPID() const {return fCorrHadEtFullAcceptanceITS*(fCorrectedHadEtFullAcceptanceTPCNoPID+fCorrectedHadEtFullAcceptanceITSNoPID);}
+    Float_t GetCorrectedHadEtEMCALAcceptanceTPCNoPID() const {return fCorrHadEtEMCALAcceptanceTPC*fCorrectedHadEtEMCALAcceptanceTPCNoPID;}
+    Float_t GetCorrectedHadEtEMCALAcceptanceITSNoPID() const {return fCorrHadEtEMCALAcceptanceITS*(fCorrectedHadEtEMCALAcceptanceTPCNoPID+fCorrectedHadEtEMCALAcceptanceITSNoPID);}
+    Float_t GetCorrectedHadEtPHOSAcceptanceTPCNoPID() const {return fCorrHadEtPHOSAcceptanceTPC*fCorrectedHadEtPHOSAcceptanceTPCNoPID;}
+    Float_t GetCorrectedHadEtPHOSAcceptanceITSNoPID() const {return fCorrHadEtPHOSAcceptanceITS*(fCorrectedHadEtPHOSAcceptanceTPCNoPID+fCorrectedHadEtPHOSAcceptanceITSNoPID);}
+    Float_t GetCorrectedTotEtFullAcceptanceTPCNoPID() const {return fCorrTotEtFullAcceptanceTPC*fCorrectedHadEtFullAcceptanceTPCNoPID;}
+    Float_t GetCorrectedTotEtFullAcceptanceITSNoPID() const {return fCorrTotEtFullAcceptanceITS*(fCorrectedHadEtFullAcceptanceTPCNoPID+fCorrectedHadEtFullAcceptanceITSNoPID);}
+    Float_t GetCorrectedTotEtEMCALAcceptanceTPCNoPID() const {return fCorrTotEtEMCALAcceptanceTPC*fCorrectedHadEtEMCALAcceptanceTPCNoPID;}
+    Float_t GetCorrectedTotEtEMCALAcceptanceITSNoPID() const {return fCorrTotEtEMCALAcceptanceITS*(fCorrectedHadEtEMCALAcceptanceTPCNoPID+fCorrectedHadEtEMCALAcceptanceITSNoPID);}
+    Float_t GetCorrectedTotEtPHOSAcceptanceTPCNoPID() const {return fCorrTotEtPHOSAcceptanceTPC*fCorrectedHadEtPHOSAcceptanceTPCNoPID;}
+    Float_t GetCorrectedTotEtPHOSAcceptanceITSNoPID() const {return fCorrTotEtPHOSAcceptanceITS*(fCorrectedHadEtPHOSAcceptanceTPCNoPID+fCorrectedHadEtPHOSAcceptanceITSNoPID);}
+    Float_t GetRawEtFullAcceptanceTPCNoPID() const {return fRawEtFullAcceptanceTPCNoPID;}
+    Float_t GetRawEtFullAcceptanceITSNoPID() const {return fRawEtFullAcceptanceITSNoPID+fRawEtFullAcceptanceTPCNoPID;}
+    Float_t GetRawEtEMCALAcceptanceTPCNoPID() const {return fRawEtEMCALAcceptanceTPCNoPID;}
+    Float_t GetRawEtEMCALAcceptanceITSNoPID() const {return fRawEtEMCALAcceptanceITSNoPID+fRawEtEMCALAcceptanceTPCNoPID;}
+    Float_t GetRawEtPHOSAcceptanceTPCNoPID() const {return fRawEtPHOSAcceptanceTPCNoPID;}
+    Float_t GetRawEtPHOSAcceptanceITSNoPID() const {return fRawEtPHOSAcceptanceITSNoPID+fRawEtPHOSAcceptanceTPCNoPID;}
 
     void CreateHistograms();
     virtual void Init();
@@ -71,7 +71,7 @@ public:
 protected:
 
     Bool_t CheckGoodVertex(AliVParticle *track);
-    AliAnalysisHadEtCorrections *corrections;
+    AliAnalysisHadEtCorrections *fCorrections;//corrections needed for hadronic et
 
     TString       fConfigFile;        // the name of the ConfigFile
     //virtual bool TrackHitsCalorimeter(AliVParticle *track, Double_t magField) = 0;
index e1ed9f5bc2381b8799b8384746868ec5d57fdb05..348499dcae7a53767a1628b1abdb80ee796ea6cf 100644 (file)
@@ -54,7 +54,7 @@ AliAnalysisTaskHadEt::AliAnalysisTaskHadEt(const char *name) :
     DefineOutput(1, TList::Class());
 
 }
-AliAnalysisTaskHadEt::~AliAnalysisTaskHadEt(){
+AliAnalysisTaskHadEt::~AliAnalysisTaskHadEt(){//Destructor
   fOutputList->Clear();
   delete fOutputList;
   delete fRecAnalysis;
index 03758c1f9e98288ad5370e04d06261ef27e83494..53a6dadd3f2746b404d6f85e69b48c5ec1ef7b47 100644 (file)
@@ -62,7 +62,7 @@ AliAnalysisTaskTotEt::AliAnalysisTaskTotEt(const char *name) :
     DefineOutput(1, TList::Class());
 
 }
-AliAnalysisTaskTotEt::~AliAnalysisTaskTotEt(){
+AliAnalysisTaskTotEt::~AliAnalysisTaskTotEt(){//Destructor
   fOutputList->Clear();
   delete fOutputList;
   delete fRecAnalysis;