]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
coverty (salvatore)
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Jun 2013 05:16:02 +0000 (05:16 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Jun 2013 05:16:02 +0000 (05:16 +0000)
PWGJE/EMCALJetTasks/AliHadCorrTask.cxx
PWGJE/EMCALJetTasks/AliHadCorrTask.h

index 677cb3c23925b6d38d969c460e83a70e46c62ed6..598de8d69d16637b8eebb5672119fc8f3641c4fa 100644 (file)
@@ -133,11 +133,11 @@ AliHadCorrTask::~AliHadCorrTask()
 }
 
 //________________________________________________________________________
-Int_t AliHadCorrTask::GetMomBin(Double_t p) const
+UInt_t AliHadCorrTask::GetMomBin(Double_t p) const
 {
   // Get momenum bin.
 
-  Int_t pbin=-1;
+  UInt_t pbin=0;
   if (p<0.5) 
     pbin=0;
   else if (p>=0.5 && p<1.0) 
@@ -597,7 +597,7 @@ void AliHadCorrTask::DoMatchedTracksLoop(AliEmcalParticle *emccluster, Double_t
     AliPicoTrack::GetEtaPhiDiff(track, cluster, phidiff, etadiff);
 
     Double_t mom       = track->P();
-    Int_t    mombin    = GetMomBin(mom); 
+    UInt_t   mombin    = GetMomBin(mom); 
     Int_t    centbinch = fCentBin;
     if (track->Charge()<0) 
       centbinch += fNcentBins;
@@ -635,7 +635,7 @@ void AliHadCorrTask::DoMatchedTracksLoop(AliEmcalParticle *emccluster, Double_t
       totalTrkP += track->P();
 
       if (fCreateHisto) {
-        if (fHadCorr > 1 && mombin > -1) {
+        if (fHadCorr > 1) {
           fHistMatchdRvsEP[fCentBin]->Fill(dR, energyclus / mom);
         }
       }
@@ -747,7 +747,7 @@ Double_t AliHadCorrTask::ApplyHadCorrOneTrack(AliEmcalParticle *emccluster, Doub
   Double_t dPhiMin    = 1e9;
   AliPicoTrack::GetEtaPhiDiff(track, cluster, dPhiMin, dEtaMin);
 
-  Int_t mombin = GetMomBin(mom);
+  UInt_t mombin = GetMomBin(mom);
   Int_t centbinch = fCentBin;
   if (track->Charge()<0) 
     centbinch += fNcentBins;
index b2b1d5c52061f273b5acba2081d45450de0a6795..021a5121318726e7f38be7ca56787b1869bc92e3 100644 (file)
@@ -35,7 +35,7 @@ class AliHadCorrTask : public AliAnalysisTaskEmcal {
   void                   DoMatchedTracksLoop(AliEmcalParticle *emccluster, Double_t &totalTrkP, Int_t &Nmatches, Double_t &trkPMCfrac, Int_t &NMCmatches);
   void                   DoTrackLoop();
   Double_t               GetEtaSigma(Int_t pbin)                   const;
-  Int_t                  GetMomBin(Double_t pt)                    const;
+  UInt_t                 GetMomBin(Double_t pt)                    const;
   Double_t               GetPhiMean(Int_t pbin, Int_t centbin)     const;
   Double_t               GetPhiSigma(Int_t pbin, Int_t centbin)    const;
   Bool_t                 Run()                                          ;