]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
2d plots
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 9 Jun 2012 03:35:55 +0000 (03:35 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 9 Jun 2012 03:35:55 +0000 (03:35 +0000)
PWGGA/EMCALJetTasks/AliHadCorrTask.cxx
PWGGA/EMCALJetTasks/AliHadCorrTask.h

index 8b3556cc00c5a7e81157db5a6e078e9ad3075a40..2866b4fb023064e7220ebadeed042e49bbfffa4c 100644 (file)
@@ -460,8 +460,8 @@ void AliHadCorrTask::UserCreateOutputObjects()
   fHistCentrality       = new TH1F("fHistCentrality",  "Centrality",       100, 0, 100);
   fHistNclusvsCent      = new TH1F("Nclusvscent",      "NclusVsCent",      100, 0, 100);
   fHistNclusMatchvsCent = new TH1F("NclusMatchvscent", "NclusMatchVsCent", 100, 0, 100);
-  fHistEbefore          = new TH1F("Ebefore",          "Ebefore",          100, 0, 100);
-  fHistEafter           = new TH1F("Eafter",           "Eafter",           100, 0, 100);
+  fHistEbefore          = new TH2F("Ebefore",          "Ebefore",          100, 0, 100, 101, -0.5, 100.5);
+  fHistEafter           = new TH2F("Eafter",           "Eafter",           100, 0, 100, 101, -0.5, 100.5);
   fHistEoPCent          = new TH2F("EoPCent",          "EoPCent",          100, 0, 100, 1000, 0,   10);
   fHistNMatchCent       = new TH2F("NMatchesCent",     "NMatchesCent",     100, 0, 100, 11, -0.5, 10.5);
   fHistNMatchCent_trk   = new TH2F("NMatchesCent_trk", "NMatchesCent_trk", 100, 0, 100, 11, -0.5, 10.5);
@@ -792,11 +792,12 @@ Double_t AliHadCorrTask::ApplyHadCorrAllTracks(AliEmcalParticle *emccluster, Dou
   // Do the loop over the matched tracks and get the number of matches and the total momentum
   DoMatchedTracksLoop(emccluster, totalTrkP, Nmatches);
 
+  if (totalTrkP <= 0)
+    return energyclus;
+
   Double_t Esub = hadCorr * totalTrkP;
 
-  Double_t EoP = -1;
-  if (totalTrkP > 0)
-    EoP = energyclus / totalTrkP;
+  Double_t EoP = energyclus / totalTrkP;
 
   // Plot some histograms if switched on
   if(fCreateHisto) {
@@ -829,15 +830,10 @@ Double_t AliHadCorrTask::ApplyHadCorrAllTracks(AliEmcalParticle *emccluster, Dou
       if (track->Charge()<0) 
        centbinchm += 4;
       
-      if (totalTrkP > 0)
-       fHistEsubPchRat[centbinchm]->Fill(totalTrkP, Esub / totalTrkP);
-
+      fHistEsubPchRat[centbinchm]->Fill(totalTrkP, Esub / totalTrkP);
       fHistEsubPch[centbinchm]->Fill(totalTrkP, Esub);
     } 
   }
-
-  if (totalTrkP <= 0)
-    return energyclus;
  
   Double_t clusEexcl = fEexclCell * cNcells;
 
index 6e6eef261927716f068596d1b5b95887f03e76e0..44426ed8f77b2080cc42ff7e28ff81101ca952c0 100644 (file)
@@ -55,8 +55,8 @@ class AliHadCorrTask : public AliAnalysisTaskEmcal {
   TH2F                  *fHistMatchdRvsEP[4];        //!output histograms
   TH1F                  *fHistNclusvsCent;           //!output histograms
   TH1F                  *fHistNclusMatchvsCent;      //!output histograms
-  TH1F                  *fHistEbefore;               //!output histograms
-  TH1F                  *fHistEafter;                //!output histograms
+  TH2F                  *fHistEbefore;               //!output histograms
+  TH2F                  *fHistEafter;                //!output histograms
   TH2F                  *fHistEoPCent;               //!output histograms
   TH2F                  *fHistNMatchCent;            //!output histograms
   TH2F                  *fHistNMatchCent_trk;        //!output histograms