]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONSimpleClusterServer.cxx
Adding AliMUONVDigitStore::HasMCInformation in order to be able to skip MClabel compu...
[u/mrichter/AliRoot.git] / MUON / AliMUONSimpleClusterServer.cxx
index ea3aac336f7352b5186fb117a101f02b14b6dcb3..9a4cbf801be534eb8d21e0222f9f77904d50cb46 100644 (file)
@@ -204,9 +204,12 @@ AliMUONSimpleClusterServer::Clusterize(Int_t chamberId,
           rawCluster->SetXYZ(xg, yg, zg);
           rawCluster->SetErrXY(recoParam->GetDefaultNonBendingReso(chamberId),recoParam->GetDefaultBendingReso(chamberId));
           
-         // Set MC label
-         if (fDigitStore) rawCluster->SetMCLabel(FindMCLabel(*cluster, detElemId, seg));
-         
+          // Set MC label
+          if (fDigitStore && fDigitStore->HasMCInformation()) 
+          {
+            rawCluster->SetMCLabel(FindMCLabel(*cluster, detElemId, seg));
+          }
+          
           AliDebug(1,Form("Adding RawCluster detElemId %4d mult %2d charge %e (xl,yl,zl)=(%e,%e,%e) (xg,yg,zg)=(%e,%e,%e) label %d",
                           detElemId,rawCluster->GetNDigits(),rawCluster->GetCharge(),
                           cluster->Position().X(),cluster->Position().Y(),0.0,
@@ -218,7 +221,7 @@ AliMUONSimpleClusterServer::Clusterize(Int_t chamberId,
   }
   
   AliDebug(1,Form("chamberId = %2d NofClusters after = %d",chamberId,fNCluster));
-
+  
   return nofAddedClusters;
 }