fix deltaPtemb vs. EP histogram
authorsaiola <salvatore.aiola@cern.ch>
Wed, 11 Jun 2014 17:16:27 +0000 (13:16 -0400)
committersaiola <salvatore.aiola@cern.ch>
Wed, 11 Jun 2014 17:16:45 +0000 (13:16 -0400)
PWGJE/EMCALJetTasks/AliAnalysisTaskDeltaPt.cxx

index cfc669e..b704164 100644 (file)
@@ -412,8 +412,7 @@ void AliAnalysisTaskDeltaPt::UserCreateOutputObjects()
 
       histname = "fHistDeltaPtEmbvsEP_";
       histname += i;
-      fHistDeltaPtEmbvsEP[i] = new TH2F(histname.Data(), histname.Data(), 
-                                       402, -TMath::Pi()*1.01, TMath::Pi()*3.01, fNbins * 2, -fMaxBinPt, fMaxBinPt);
+      fHistDeltaPtEmbvsEP[i] = new TH2F(histname.Data(), histname.Data(), 101, 0, TMath::Pi()*1.01, fNbins * 2, -fMaxBinPt, fMaxBinPt);
       fHistDeltaPtEmbvsEP[i]->GetXaxis()->SetTitle("#phi_{jet} - #Psi_{EP}");
       fHistDeltaPtEmbvsEP[i]->GetYaxis()->SetTitle("#delta#it{p}_{T}^{emb} (GeV/#it{c})");
       fHistDeltaPtEmbvsEP[i]->GetZaxis()->SetTitle("counts");
@@ -545,7 +544,12 @@ Bool_t AliAnalysisTaskDeltaPt::FillHistograms()
       fHistEmbBkgArea[fCentBin]->Fill(embJet->Area(), embJet->Pt() - embJet->MCPt());
       fHistRhoVSEmbBkg[fCentBin]->Fill(fRhoVal * embJet->Area(), embJet->Pt() - embJet->MCPt());
       fHistDeltaPtEmbArea[fCentBin]->Fill(embJet->Area(), embJet->Pt() - embJet->Area() * fRhoVal - embJet->MCPt());
-      fHistDeltaPtEmbvsEP[fCentBin]->Fill(embJet->Phi() - fEPV0, embJet->Pt() - embJet->Area() * fRhoVal - embJet->MCPt());
+
+      Double_t ep = embJet->Phi() - fEPV0;
+      while (ep < 0) ep += TMath::Pi();
+      while (ep >= TMath::Pi()) ep -= TMath::Pi();
+
+      fHistDeltaPtEmbvsEP[fCentBin]->Fill(ep, embJet->Pt() - embJet->Area() * fRhoVal - embJet->MCPt());
 
       embJet = NextEmbeddedJet();
     }