]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Bug correction
authorskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Jul 2004 13:56:53 +0000 (13:56 +0000)
committerskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Jul 2004 13:56:53 +0000 (13:56 +0000)
ANALYSIS/AliAOD.cxx

index 25eb40bb3e5bed7cadc0fa038ba0e38584432f64..49e8d8d87350004610ab9723bd8fe3ff722df950 100644 (file)
@@ -108,7 +108,7 @@ void AliAOD::SetPrimaryVertex(Double_t x, Double_t y, Double_t z)
 Int_t AliAOD::GetNumberOfCharged(Double_t etamin, Double_t etamax) const
 {
   //reurns number of charged particles within given pseudorapidity range
-  Int_t n;
+  Int_t n = 0;
   Int_t npart = fParticles.GetEntries();
   for (Int_t i = 0; i < npart; i++)
    {
@@ -117,7 +117,7 @@ Int_t AliAOD::GetNumberOfCharged(Double_t etamin, Double_t etamax) const
      if ( (eta < etamin) || (eta > etamax) ) continue;
      if (p->Charge() != 0.0) n++;
    }
-  return 0;  
+  return n;
 }
 /**************************************************************************/