]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
protection agains null clusters
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Dec 2010 11:04:28 +0000 (11:04 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Dec 2010 11:04:28 +0000 (11:04 +0000)
PWG4/PartCorrBase/AliCalorimeterUtils.cxx

index 94585c7b82a7045153c557e41b25d8dde2e9aafe..43085fa82e51b5772b9f1c40e11fba9236b02c03 100755 (executable)
@@ -314,6 +314,10 @@ Int_t AliCalorimeterUtils::GetModuleNumber(AliVCluster * cluster) const
        //Get the EMCAL/PHOS module number that corresponds to this cluster
        TLorentzVector lv;
        Double_t v[]={0.,0.,0.}; //not necessary to pass the real vertex.
+  if(!cluster){
+    if(fDebug > 1) printf("AliCalorimeterUtils::GetModuleNumber() - NUL Cluster, please check!!!");
+    return -1;
+  }
        cluster->GetMomentum(lv,v);
        Float_t phi = lv.Phi();
        if(phi < 0) phi+=TMath::TwoPi();