]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/UPGRADE/AliITSU.cxx
1) fix in the AliITSUTrackerGlo for track hypothesis w/o winner
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSU.cxx
index c315c232176a232aede19c8346c8502f3b3cf8bc..28b8333bbc5e78b6b1b23ec8ab284c14dc19aa91 100644 (file)
@@ -844,14 +844,17 @@ void AliITSU::InitSimulation()
   //
   // add known simulation types used in the setup
   for (int i=fNLayers;i--;) {
+    fSimModelLr[i] = 0;
+    fSegModelLr[i] = 0;
+    fResponseLr[i] = 0;
     int dType = fGeomTGeo->GetLayerDetTypeID(i);           // fine detector type: class + segmentation
     int sType = dType/AliITSUGeomTGeo::kMaxSegmPerDetType; // detector simulation class
     //
     // check if the simulation of this sType was already created for preceeding layers
     AliITSUSimulation* simUpg = 0;
-    for (int j=fNLayers;j>i;j--) {
+    for (int j=fNLayers-1;j>i;j--) {
       simUpg = GetSimulationModel(j);
-      if (int(simUpg->GetUniqueID())==sType) break;
+      if (simUpg && int(simUpg->GetUniqueID())==sType) break;
       else simUpg = 0;
     }
     //