]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
InstanceNoGeo() modified to run without Geometry (test beam...)
authordibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Oct 2007 12:32:22 +0000 (12:32 +0000)
committerdibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Oct 2007 12:32:22 +0000 (12:32 +0000)
HMPID/AliHMPIDParam.cxx

index 66237f7761ae1da4c3fb07b0123b23f04d1648c3..f8b8414475c50a1e1fdcb4d06d328af6f1c9ac09 100644 (file)
@@ -51,7 +51,7 @@ AliHMPIDParam::AliHMPIDParam(Bool_t noGeo=kFALSE):TNamed("HmpidParam","default v
 // In particular, matrices to be used for LORS<->MARS trasnformations are initialized from TGeo structure.    
 // Note that TGeoManager should be already initialized from geometry.root file  
 
-  if(noGeo==kTRUE){fgCellX=0.8;fgCellY=0.84;} 
+  Float_t dead=2.6;// cm of the dead zones between PCs-> See 2CRC2099P1
   
   if(noGeo==kFALSE && !gGeoManager)  
   {
@@ -59,16 +59,15 @@ AliHMPIDParam::AliHMPIDParam(Bool_t noGeo=kFALSE):TNamed("HmpidParam","default v
     if(!gGeoManager) AliFatal("!!!!!!No geometry loaded!!!!!!!");
   }
   
-  Float_t dead=2.6;// cm of the dead zones between PCs-> See 2CRC2099P1
-  TGeoVolume *pCellVol = gGeoManager->GetVolume("Hcel");
-  
-  if(!pCellVol) {
-    fgCellX=0.8;fgCellY=0.84;
-    } else { 
-    TGeoBBox *bcell = (TGeoBBox *)pCellVol->GetShape();
-    fgCellX=2.*bcell->GetDX(); fgCellY = 2.*bcell->GetDY();
-  }
+  fgCellX=0.8;fgCellY=0.84;
   
+  if(!noGeo==kTRUE){
+    TGeoVolume *pCellVol = gGeoManager->GetVolume("Hcel");
+    if(pCellVol) {
+      TGeoBBox *bcell = (TGeoBBox *)pCellVol->GetShape();
+      fgCellX=2.*bcell->GetDX(); fgCellY = 2.*bcell->GetDY();  // overwrite the values with the read ones
+    }
+  }    
   fgPcX=80.*fgCellX; fgPcY = 48.*fgCellY;
   fgAllX=2.*fgPcX+dead;
   fgAllY=3.*fgPcY+2.*dead;