]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSvPPRsymm.cxx
The split level of branches is set to 99
[u/mrichter/AliRoot.git] / ITS / AliITSvPPRsymm.cxx
index 64fd0d9b7ac316f26d08c2e552d4d59fc903da96..1b4dbc57a83cb73c85e0cca37e4e534d6972e012 100644 (file)
@@ -1,4 +1,4 @@
-/**************************************************************************
+ /**************************************************************************
  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
  * Author: The ALICE Off-line Project.                                    *
 
 /*
 $Log$
+Revision 1.28  2001/05/31 19:24:47  barbera
+Default values of SPD detector and chip thickness set to 200 microns as defined by the Technical Board
+
+Revision 1.27  2001/05/30 16:15:47  fca
+Correct comparison wiht AliGeant3::Class() introduced. Thanks to I.Hrivnacova
+
+Revision 1.26  2001/05/30 15:55:35  hristov
+Strings compared instead of pointers
+
+Revision 1.25  2001/05/30 14:04:31  hristov
+Dynamic cast replaced (F.Carminati)
+
+Revision 1.24  2001/05/25 15:59:59  morsch
+Overlaps corrected. (R. Barbera)
+
+Revision 1.22  2001/05/16 08:17:49  hristov
+Bug fixed in the StepManager to account for the difference in the geometry tree for the ITS pixels. This fixes both the funny distribution of pixel coordinates and the missing hits/digits/points in many sectors of the ITS pixel barrel. Also included is a patch to properly get and use the detector dimensions through out the ITS code. (B.Nilsen)
+
+Revision 1.21  2001/05/10 00:12:59  nilsen
+Finished fixing up the default segmentation for the PPR geometry.
+
+Revision 1.20  2001/05/09 01:02:22  nilsen
+Finished fixing SetDefaults for the segmentation of SPD, SDD, and SSD.
+
+Revision 1.19  2001/05/03 08:40:15  barbera
+Volume ITSD slightly modified to be consistent with v5. Some improvement in the printouts. The last commit did not complete successfully.
+
+Revision 1.17  2001/05/01 22:40:42  nilsen
+Partical update of SetDefault.
+
+Revision 1.16  2001/04/22 13:48:09  barbera
+New values of media parameters and thickness of SPD end-ladder electronics as given by Fabio Formenti
+
 Revision 1.15  2001/04/04 07:02:16  barbera
 Position of the cylinders holding rails corrected
 
@@ -175,7 +208,7 @@ Introduction of the Copyright and cvs Log
 #include "AliRun.h"
 #include "AliMagF.h"
 #include "AliConst.h"
-#include "../TGeant3/TGeant3.h"
+#include "AliGeant3.h"
 #include "AliITSGeant3Geometry.h"
 #include "AliITShit.h"
 #include "AliITS.h"
@@ -184,6 +217,16 @@ Introduction of the Copyright and cvs Log
 #include "AliITSgeomSPD.h"
 #include "AliITSgeomSDD.h"
 #include "AliITSgeomSSD.h"
+#include "AliITSDetType.h"
+#include "AliITSresponseSPD.h"
+#include "AliITSresponseSDD.h"
+#include "AliITSresponseSSD.h"
+#include "AliITSsegmentationSPD.h"
+#include "AliITSsegmentationSDD.h"
+#include "AliITSsegmentationSSD.h"
+#include "AliITSClusterFinderSPD.h"
+#include "AliITSClusterFinderSDD.h"
+#include "AliITSClusterFinderSSD.h"
 
 
 ClassImp(AliITSvPPRsymm)
@@ -350,7 +393,7 @@ void AliITSvPPRsymm::CreateGeometry(){
   Float_t ddet2=300.;     // total detector thickness on layer 2 (micron)                         
   Float_t dchip2=300.;    // total chip thickness on layer 2 (micron)
   
-  Float_t dbus=200.;      // total bus thickness on both layers (micron)
+  Float_t dbus=300.;      // total bus thickness on both layers (micron)
 
   ddet1 = GetThicknessDet1();
   ddet2 = GetThicknessDet2();
@@ -358,25 +401,25 @@ void AliITSvPPRsymm::CreateGeometry(){
   dchip2 = GetThicknessChip2();    
 
   if(ddet1 < 100. || ddet1 > 300.) {
-     cout << "WARNING: the detector thickness for layer 1 is outside the range of [100,300] microns."
+     cout << "ITS - WARNING: the detector thickness for layer 1 is outside the range of [100,300] microns."
          " The default value of 300 microns will be used." << endl;
          ddet1=300.;
   }
   
   if(ddet2 < 100. || ddet2 > 300.) {
-     cout << "WARNING: the detector thickness for layer 2 is outside the range of [100,300] microns."
+     cout << "ITS - WARNING: the detector thickness for layer 2 is outside the range of [100,300] microns."
          " The default value of 300 microns will be used." << endl;
          ddet2=300.;
   }
   
-  if(dchip1 < 150. || dchip1 > 300.) {
-     cout << "WARNING: the chip thickness for layer 1 is outside the range of [150,300] microns."
+  if(dchip1 < 100. || dchip1 > 300.) {
+     cout << "ITS - WARNING: the chip thickness for layer 1 is outside the range of [100,300] microns."
          " The default value of 300 microns will be used." << endl;
          dchip1=300.;
   }
   
-  if(dchip2 < 150. || dchip2 > 300.) {
-     cout << "WARNING: the chip thickness for layer 2 is outside the range of [150,300] microns."
+  if(dchip2 < 100. || dchip2 > 300.) {
+     cout << "ITS - WARNING: the chip thickness for layer 2 is outside the range of [100,300] microns."
          " The default value of 300 microns will be used." << endl;
          dchip2=300.;
   }      
@@ -390,29 +433,29 @@ void AliITSvPPRsymm::CreateGeometry(){
   fluid = GetCoolingFluid();
 
   if(rails != 0 && rails != 1) {
-     cout << "WARNING: the switch for rails is not set neither to 0 (rails out) nor to 1 (rails in)." 
+     cout << "ITS - WARNING: the switch for rails is not set neither to 0 (rails out) nor to 1 (rails in)." 
      " The default value of 1 (rails in) will be used." << endl;
        
   }  
   
   if(fluid != 0 && fluid != 1) {
-     cout << "WARNING: the switch for cooling fluid is not set neither to 0 (freon) nor to 1 (water)." 
+     cout << "ITS - WARNING: the switch for cooling fluid is not set neither to 0 (freon) nor to 1 (water)." 
      " The default value of 1 (water) will be used." << endl;  
   }       
    
-  cout << "Detector thickness on layer 1 is set to " << ddet1 << " microns." << endl;
-  cout << "Chip thickness on layer 1 is set to " << dchip1 << " microns." << endl;
-  cout << "Detector thickness on layer 2 is set to " << ddet2 << " microns." << endl;
-  cout << "Chip thickness on layer 2 is set to " << dchip2 << " microns." << endl;
+  cout << "ITS: Detector thickness on layer 1 is set to " << ddet1 << " microns." << endl;
+  cout << "ITS: Chip thickness on layer 1 is set to " << dchip1 << " microns." << endl;
+  cout << "ITS: Detector thickness on layer 2 is set to " << ddet2 << " microns." << endl;
+  cout << "ITS: Chip thickness on layer 2 is set to " << dchip2 << " microns." << endl;
   if(rails == 0 ) {
-     cout << "Rails are out." << endl; 
+     cout << "ITS: Rails are out." << endl; 
   } else {
-     cout << "Rails are in." << endl;
+     cout << "ITS: Rails are in." << endl;
   }   
   if(fluid == 0 ) {
-     cout << "The cooling fluid is freon." << endl; 
+     cout << "ITS: The cooling fluid is freon." << endl; 
   } else {
-     cout << "The cooling fluid is water." << endl;
+     cout << "ITS: The cooling fluid is water." << endl;
   }   
 
   ddet1  = ddet1*0.0001/2.; // conversion from tot length in um to half in cm
@@ -522,19 +565,19 @@ void AliITSvPPRsymm::CreateGeometry(){
      AliMatrix(idrotm[234],90.0,71.9991,90.0,161.9991,0.0,0.0);
      AliMatrix(idrotm[235],90.0,270.0,90.0,0.0,0.0,0.0);
      AliMatrix(idrotm[236],90.0,180.013702,90.0,270.013702,0.0,0.0);
-     AliMatrix(idrotm[237],90.0,0.0,90.0,90.0,180.0,0.0);
+     AliMatrix(idrotm[237],90.0,180.0,90.0,90.0,0.0,0.0);
      AliMatrix(idrotm[238],90.0,144.0,90.0,234.0,0.0,0.0);
      AliMatrix(idrotm[239],90.0,216.0,90.0,306.0,0.0,0.0);
      AliMatrix(idrotm[240],90.0,288.0,90.0,18.0,0.0,0.0);
      AliMatrix(idrotm[241],90.0,324.0,90.0,54.0,0.0,0.0);
      AliMatrix(idrotm[242],90.0,36.0,90.0,126.0,0.0,0.0);
      AliMatrix(idrotm[243],90.0,108.0,90.0,198.0,0.0,0.0);
-     AliMatrix(idrotm[244],90.0,0.0,90.0,270.0,180.0,0.0);
-     AliMatrix(idrotm[245],90.0,342.0,90.0,252.0,180.0,0.0);
-     AliMatrix(idrotm[246],90.0,130.0,90.0,40.0,180.0,0.0);
-     AliMatrix(idrotm[247],90.0,139.0,90.0,49.0,180.0,0.0);
-     AliMatrix(idrotm[248],90.0,148.0,90.0,58.0,180.0,0.0);
-     AliMatrix(idrotm[249],90.0,157.0,90.0,67.0,180.0,0.0);
+     AliMatrix(idrotm[244],90.0,180.0,90.0,270.0,0.0,0.0);
+     AliMatrix(idrotm[245],90.0,162.0,90.0,252.0,0.0,0.0);
+     AliMatrix(idrotm[246],90.0,310.0,90.0,40.0,0.0,0.0);
+     AliMatrix(idrotm[247],90.0,319.0,90.0,49.0,0.0,0.0);
+     AliMatrix(idrotm[248],90.0,328.0,90.0,58.0,0.0,0.0);
+     AliMatrix(idrotm[249],90.0,337.0,90.0,67.0,0.0,0.0);
      AliMatrix(idrotm[1003],90.0,73.5,90.0,163.5,0.0,0.0);
      AliMatrix(idrotm[1011],90.0,342.0,90.0,72.0,0.0,0.0);
      AliMatrix(idrotm[1039],90.0,72.0,90.0,162.0,0.0,0.0);
@@ -570,7 +613,7 @@ void AliITSvPPRsymm::CreateGeometry(){
     
   if (option == 2) {
 
-     AliMatrix(idrotm[201],90.0,0.0,90.0,90.0,180.0,0.0);
+     AliMatrix(idrotm[201],90.0,0.0,90.0,90.0,0.0,0.0);
      AliMatrix(idrotm[202],90.0,90.0,90.0,0.0,0.0,0.0);
      AliMatrix(idrotm[203],90.0,350.0,90.0,260.0,0.0,0.0);
      AliMatrix(idrotm[204],90.0,170.0,90.0,80.0,0.0,0.0);
@@ -607,12 +650,12 @@ void AliITSvPPRsymm::CreateGeometry(){
      AliMatrix(idrotm[235],90.0,270.0,90.0,0.0,0.0,0.0);
      AliMatrix(idrotm[236],90.0,180.013702,90.0,270.013702,0.0,0.0);
      AliMatrix(idrotm[237],90.0,90.0,90.0,180.0,0.0,0.0);
-     AliMatrix(idrotm[238],90.0,0.0,90.0,270.0,180.0,0.0);
-     AliMatrix(idrotm[239],90.0,342.0,90.0,252.0,180.0,0.0);
-     AliMatrix(idrotm[240],90.0,130.0,90.0,40.0,180.0,0.0);
-     AliMatrix(idrotm[241],90.0,139.0,90.0,49.0,180.0,0.0);
-     AliMatrix(idrotm[242],90.0,148.0,90.0,58.0,180.0,0.0);
-     AliMatrix(idrotm[243],90.0,157.0,90.0,67.0,180.0,0.0);
+     AliMatrix(idrotm[238],90.0,180.0,90.0,270.0,0.0,0.0);
+     AliMatrix(idrotm[239],90.0,162.0,90.0,252.0,0.0,0.0);
+     AliMatrix(idrotm[240],90.0,310.0,90.0,40.0,0.0,0.0);
+     AliMatrix(idrotm[241],90.0,319.0,90.0,49.0,0.0,0.0);
+     AliMatrix(idrotm[242],90.0,328.0,90.0,58.0,0.0,0.0);
+     AliMatrix(idrotm[243],90.0,337.0,90.0,67.0,0.0,0.0);
      AliMatrix(idrotm[244],90.0,216.0,90.0,306.0,0.0,0.0);
      AliMatrix(idrotm[245],90.0,36.0,90.0,126.0,0.0,0.0);
      AliMatrix(idrotm[246],90.0,108.0,90.0,198.0,0.0,0.0);
@@ -936,7 +979,7 @@ void AliITSvPPRsymm::CreateGeometry(){
     
   //     FIELD CAGE HALF LENGTH 
   
-  rlim  = 56.;
+  rlim  = 50.;
   zmax  = 74.;
   ztpc = 284.;
   
@@ -957,34 +1000,34 @@ void AliITSvPPRsymm::CreateGeometry(){
   dgh[11] = 62+4.;
   dgh[12] = -97.5;
   dgh[13] = 46;
-  dgh[14] = rlim+0.1;
+  dgh[14] = rlim+6;
   dgh[15] = -zmax;
   dgh[16] = 46;
-  dgh[17] = rlim+0.1;
+  dgh[17] = rlim+6;
   dgh[18] = -48;
   dgh[19] = 6;
-  dgh[20] = rlim+0.1
+  dgh[20] = rlim+6
   dgh[21] = -28.6;
   dgh[22] = 6;
-  dgh[23] = rlim+0.1;
+  dgh[23] = rlim+6;
   dgh[24] = -27.6;
   dgh[25] = 3.295;
-  dgh[26] = rlim+0.1;
+  dgh[26] = rlim+6;
   dgh[27] = 27.6;
   dgh[28] = 3.295;
-  dgh[29] = rlim+0.1;
+  dgh[29] = rlim+6;
   dgh[30] = 28.6;
   dgh[31] = 6;
-  dgh[32] = rlim+0.1;
+  dgh[32] = rlim+6;
   dgh[33] = 48;
   dgh[34] = 6;
-  dgh[35] = rlim+0.1;
+  dgh[35] = rlim+6;
   dgh[36] = zmax;
   dgh[37] = 46;
-  dgh[38] = rlim+0.1;
+  dgh[38] = rlim+6;
   dgh[39] = 97.5;
   dgh[40] = 46;
-  dgh[41] = rlim+0.1;
+  dgh[41] = rlim+6;
   dgh[42] = ztpc;
   dgh[43] = 62;
   dgh[44] = 62+4.;
@@ -2962,15 +3005,15 @@ void AliITSvPPRsymm::CreateGeometry(){
      gMC->Gspos("I126",2,"I12A",-0.7799,7.2874,0.0,idrotm[217],"ONLY");
      gMC->Gspos("I125",2,"I12A",-0.6315,7.0883,0.0,idrotm[216],"ONLY");
      gMC->Gspos("I124",2,"I12A",-0.4965,6.8742,0.0,idrotm[215],"ONLY");
-     gMC->Gspos("I103",3,"I10A",-0.05,-di10a[1]+2.*di104[1]+di103[1],-3.536,idrotm[237],"ONLY");
-     gMC->Gspos("I103",4,"I10A",-0.05,-di10a[1]+2.*di104[1]+di103[1],-10.708,idrotm[237],"ONLY");
+     gMC->Gspos("I103",3,"I10A",-0.05,-di10a[1]+2.*di104[1]+di103[1],-3.536,0,"ONLY");
+     gMC->Gspos("I103",4,"I10A",-0.05,-di10a[1]+2.*di104[1]+di103[1],-10.708,0,"ONLY");
      gMC->Gspos("I103",1,"I10A",-0.05,-di10a[1]+2.*di104[1]+di103[1],10.708,0,"ONLY");
      gMC->Gspos("I103",2,"I10A",-0.05,-di10a[1]+2.*di104[1]+di103[1],3.536,0,"ONLY");
      gMC->Gspos("I105",1,"I10A",-0.05,0.01,-16.844,idrotm[237],"ONLY");
      gMC->Gspos("I105",2,"I10A",-0.05,0.01,16.844,0,"ONLY");
      gMC->Gspos("I104",1,"I10A",0.0,-di10a[1]+di104[1],0.0,0,"ONLY");
-     gMC->Gspos("I1D3",3,"I20A",-0.05,-di20a[1]+2.*di104[1]+di1d3[1],-3.536,idrotm[237],"ONLY");
-     gMC->Gspos("I1D3",4,"I20A",-0.05,-di20a[1]+2.*di104[1]+di1d3[1],-10.708,idrotm[237],"ONLY");
+     gMC->Gspos("I1D3",3,"I20A",-0.05,-di20a[1]+2.*di104[1]+di1d3[1],-3.536,0,"ONLY");
+     gMC->Gspos("I1D3",4,"I20A",-0.05,-di20a[1]+2.*di104[1]+di1d3[1],-10.708,0,"ONLY");
      gMC->Gspos("I1D3",1,"I20A",-0.05,-di20a[1]+2.*di104[1]+di1d3[1],10.708,0,"ONLY");
      gMC->Gspos("I1D3",2,"I20A",-0.05,-di20a[1]+2.*di104[1]+di1d3[1],3.536,0,"ONLY");
      gMC->Gspos("I105",3,"I20A",-0.05,0.01,-16.844,idrotm[237],"ONLY");
@@ -3134,8 +3177,8 @@ void AliITSvPPRsymm::CreateGeometry(){
      gMC->Gspos("I105",4,"I10B",-0.05,-0.01,16.844,0,"ONLY");
      gMC->Gspos("I107",2,"I10B",-0.0455,-di10b[1]+di107[1],3.536,0,"ONLY");
      gMC->Gspos("I107",1,"I10B",-0.0455,-di10b[1]+di107[1],10.708,0,"ONLY");
-     gMC->Gspos("I107",4,"I10B",-0.0455,-di10b[1]+di107[1],-10.708,idrotm[201],"ONLY");
-     gMC->Gspos("I107",3,"I10B",-0.0455,-di10b[1]+di107[1],-3.536,idrotm[201],"ONLY");
+     gMC->Gspos("I107",4,"I10B",-0.0455,-di10b[1]+di107[1],-10.708,0,"ONLY");
+     gMC->Gspos("I107",3,"I10B",-0.0455,-di10b[1]+di107[1],-3.536,0,"ONLY");
      gMC->Gspos("I109",1,"I10B",-0.138,0.015,-16.844,idrotm[201],"ONLY");
      gMC->Gspos("I109",2,"I10B",-0.138,0.015,16.844,0,"ONLY");
      gMC->Gspos("I108",1,"I10B",-0.138,-di10b[1]+2.*di107[1]+di108[1],0.0,0,"ONLY");
@@ -4026,8 +4069,8 @@ void AliITSvPPRsymm::CreateGeometry(){
   
   // --- Place volumes of cylinders between SPD and SDD and SDD and SSD 
   
-  gMC->Gspos("ICY1",1,"ITSD",0.0,0.0,0.,0,"ONLY");    
-  gMC->Gspos("ICY2",1,"ITSD",0.0,0.0,0.,0,"ONLY");    
+  gMC->Gspos("ICY1",1,"IS02",0.0,0.0,0.,0,"ONLY");    
+  gMC->Gspos("ICY2",1,"IS01",0.0,0.0,0.,0,"ONLY");    
   
 
   // --- Place volumes of SDD cone ---------------------------------- 
@@ -4434,14 +4477,14 @@ void AliITSvPPRsymm::CreateGeometry(){
   dgh[1] = 3.;         
   dgh[2] = 5.;  // 5. comes from the fact that the volume has to be 567.6/2 cm^3       
   gMC->Gsvolu("ISR1", "TUBE", idtmed[284], dgh, 3);   
-  gMC->Gspos("ISR1", 1, "ALIC", 54.9, 11., 79.5, 0, "ONLY");   
-  gMC->Gspos("ISR1", 2, "ALIC", 54.9, -11., 79.5, 0, "ONLY");   
-  gMC->Gspos("ISR1", 3, "ALIC", -54.9, 11., 79.5, 0, "ONLY"); 
-  gMC->Gspos("ISR1", 4, "ALIC", -54.9, -11., 79.5, 0, "ONLY");  
-  gMC->Gspos("ISR1", 5, "ALIC", 54.9, 11., -79.5, 0, "ONLY");   
-  gMC->Gspos("ISR1", 6, "ALIC", 54.9, -11., -79.5, 0, "ONLY");   
-  gMC->Gspos("ISR1", 7, "ALIC", -54.9, 11., -79.5, 0, "ONLY"); 
-  gMC->Gspos("ISR1", 8, "ALIC", -54.9, -11., -79.5, 0, "ONLY");         
+  gMC->Gspos("ISR1", 1, "ITSV", 53.4292, 10.7053, 79.75, 0, "ONLY");    
+  gMC->Gspos("ISR1", 2, "ITSV", 53.4292, -10.7053, 79.75, 0, "ONLY");   
+  gMC->Gspos("ISR1", 3, "ITSV", -53.4292, 10.7053, 79.75, 0, "ONLY"); 
+  gMC->Gspos("ISR1", 4, "ITSV", -53.4292, -10.7053, 79.75, 0, "ONLY");  
+  gMC->Gspos("ISR1", 5, "ITSV", 53.4292, 10.7053, -79.75, 0, "ONLY");   
+  gMC->Gspos("ISR1", 6, "ITSV", 53.4292, -10.7053, -79.75, 0, "ONLY");   
+  gMC->Gspos("ISR1", 7, "ITSV", -53.4292, 10.7053, -79.75, 0, "ONLY"); 
+  gMC->Gspos("ISR1", 8, "ITSV", -53.4292, -10.7053, -79.75, 0, "ONLY");        
   
   // --- DEFINE SUPPORTS FOR RAILS ATTACHED TO THE ABSORBER
 
@@ -4678,7 +4721,7 @@ void AliITSvPPRsymm::InitAliITSgeom(){
 //     Based on the geometry tree defined in Geant 3.21, this
 // routine initilizes the Class AliITSgeom from the Geant 3.21 ITS geometry
 // sturture.
-    if(!(dynamic_cast<TGeant3*>(gMC))) {
+    if(gMC->IsA()!=AliGeant3::Class()) {
        Error("InitAliITSgeom",
                "Wrong Monte Carlo. InitAliITSgeom uses TGeant3 calls");
        return;
@@ -4771,7 +4814,7 @@ void AliITSvPPRsymm::InitAliITSgeom(){
                        fITSgeom->CreatMatrix(mod,lay,lad,det,kSPD,t,r);
                        if(!(fITSgeom->IsShapeDefined((Int_t)kSPD)))
                              fITSgeom->ReSetShape(kSPD,
-                                                 new AliITSgeomSPD425Short());
+                                        new AliITSgeomSPD425Short(npar,par));
                    } // end for det
                } // end for k
             } // end for j
@@ -4789,19 +4832,20 @@ void AliITSvPPRsymm::InitAliITSgeom(){
                    case 3: case 4:
                        fITSgeom->CreatMatrix(mod,lay,lad,det,kSDD,t,r);
                        if(!(fITSgeom->IsShapeDefined(kSDD))) 
-                           fITSgeom->ReSetShape(kSDD,new AliITSgeomSDD256());
+                           fITSgeom->ReSetShape(kSDD,
+                                             new AliITSgeomSDD256(npar,par));
                            break;
                        case 5:
                            fITSgeom->CreatMatrix(mod,lay,lad,det,kSSD,t,r);
                            if(!(fITSgeom->IsShapeDefined(kSSD))) 
                                fITSgeom->ReSetShape(kSSD,
-                                                  new AliITSgeomSSD275and75());
+                                         new AliITSgeomSSD275and75(npar,par));
                            break;
                        case 6:
                            fITSgeom->CreatMatrix(mod,lay,lad,det,kSSDp,t,r);
                            if(!(fITSgeom->IsShapeDefined(kSSDp))) 
                                fITSgeom->ReSetShape(kSSDp,
-                                                  new AliITSgeomSSD75and275());
+                                          new AliITSgeomSSD75and275(npar,par));
                            break;
                        } // end switch
                } // end for det
@@ -4836,6 +4880,97 @@ void AliITSvPPRsymm::Init(){
     cout << endl;
 }
 //_____________________________________________________________________________
+void AliITSvPPRsymm::SetDefaults(){
+    // sets the default segmentation, response, digit and raw cluster classes
+    const Float_t kconv = 1.0e+04; // convert cm to microns
+
+    cout << "AliITSvPPRasymm::SetDefaults" << endl;
+
+    AliITSDetType *iDetType;
+    AliITSgeomSPD  *s0;
+    AliITSgeomSDD  *s1;
+    AliITSgeomSSD  *s2;
+    Int_t i;
+    Float_t bx[256],bz[280];
+
+    //SPD
+    iDetType=DetType(0);
+    s0 = (AliITSgeomSPD*) fITSgeom->GetShape(kSPD);// Get shape info. Do it this way for now.
+    AliITSresponse *resp0=new AliITSresponseSPD();
+    SetResponseModel(0,resp0);
+    AliITSsegmentationSPD *seg0=new AliITSsegmentationSPD(fITSgeom);
+    seg0->SetDetSize(s0->GetDx()*2.*kconv, // base this on AliITSgeomSPD
+                    s0->GetDz()*2.*kconv, // for now.
+                    s0->GetDy()*2.*kconv); // x,z,y full width in microns.
+    seg0->SetNPads(256,160);// Number of Bins in x and z
+    for(i=000;i<256;i++) bx[i] =  50.0; // in x all are 50 microns.
+    for(i=000;i<160;i++) bz[i] = 425.0; // most are 425 microns except below
+    for(i=160;i<280;i++) bz[i] =   0.0; // Outside of detector.
+    bz[ 31] = bz[ 32] = 625.0; // first chip boundry
+    bz[ 63] = bz[ 64] = 625.0; // first chip boundry
+    bz[ 95] = bz[ 96] = 625.0; // first chip boundry
+    bz[127] = bz[128] = 625.0; // first chip boundry
+    bz[160] = 425.0; // Set so that there is no zero pixel size for fNz.
+    seg0->SetBinSize(bx,bz); // Based on AliITSgeomSPD for now.
+    SetSegmentationModel(0,seg0);
+    // set digit and raw cluster classes to be used
+    const char *kData0=(iDetType->GetResponseModel())->DataType();
+    if (strstr(kData0,"real")) iDetType->ClassNames("AliITSdigit",
+                                                   "AliITSRawClusterSPD");
+    else iDetType->ClassNames("AliITSdigitSPD","AliITSRawClusterSPD");
+    //iDetType->SimulationModel(new AliITSsimulationSPD(seg0,resp0));
+    //iDetType->ReconstructionModel(new AliITSClusterFinderSPD());
+
+    // SDD
+    iDetType=DetType(1);
+    s1 = (AliITSgeomSDD*) fITSgeom->GetShape(kSDD);// Get shape info. Do it this way for now.
+    AliITSresponseSDD *resp1=new AliITSresponseSDD();
+    resp1->SetDriftSpeed(7.3); // set drift speed to 7.3 microns/ns.
+    SetResponseModel(1,resp1);
+    AliITSsegmentationSDD *seg1=new AliITSsegmentationSDD(fITSgeom,resp1);
+    seg1->SetDetSize(s1->GetDx()*kconv, // base this on AliITSgeomSDD
+                    s1->GetDz()*2.*kconv, // for now.
+                    s1->GetDy()*2.*kconv); // x,z,y full width in microns.
+    bx[0] = 1000./((s1->GetDx()*kconv/seg1->Dpx(0))/resp1->DriftSpeed()); // clock in Mhz
+    seg1->SetNPads(256,bx[0]);// Use AliITSgeomSDD for now
+    SetSegmentationModel(1,seg1);
+    const char *kData1=(iDetType->GetResponseModel())->DataType();
+    const char *kopt=iDetType->GetResponseModel()->ZeroSuppOption();
+    if((!strstr(kopt,"2D")) && (!strstr(kopt,"1D")) || strstr(kData1,"real") ){
+       iDetType->ClassNames("AliITSdigit","AliITSRawClusterSDD");
+    } else iDetType->ClassNames("AliITSdigitSDD","AliITSRawClusterSDD");
+    //iDetType->SimulationModel(new AliITSsimulationSDD(seg1,resp1));
+    //iDetType->ReconstructionModel(new AliITSClusterFinderSDD());
+
+    // SSD  Layer 5
+    iDetType=DetType(2);
+    s2 = (AliITSgeomSSD*) fITSgeom->GetShape(kSSD);// Get shape info. Do it this way for now.
+    AliITSresponse *resp2=new AliITSresponseSSD();
+    SetResponseModel(2,resp2);
+    AliITSsegmentationSSD *seg2=new AliITSsegmentationSSD(fITSgeom);
+    seg2->SetDetSize(s2->GetDx()*2.*kconv, // base this on AliITSgeomSSD
+                    s2->GetDz()*2.*kconv, // for now.
+                    s2->GetDy()*2.*kconv); // x,z,y full width in microns.
+    seg2->SetPadSize(95.,0.); // strip x pitch in microns
+    seg2->SetNPads(768,0); // number of strips on each side.
+    seg2->SetAngles(0.0075,0.0275); // strip angels rad P and N side.
+    seg2->SetAnglesLay5(0.0075,0.0275); // strip angels rad P and N side.
+    seg2->SetAnglesLay6(0.0275,0.0075); // strip angels rad P and N side.
+    SetSegmentationModel(2,seg2); 
+    const char *kData2=(iDetType->GetResponseModel())->DataType();
+    if(strstr(kData2,"real") ) iDetType->ClassNames("AliITSdigit",
+                                                   "AliITSRawClusterSSD");
+    else iDetType->ClassNames("AliITSdigitSSD","AliITSRawClusterSSD");
+    //iDetType->SimulationModel(new AliITSsimulationSSD(seg2,resp2));
+    //iDetType->ReconstructionModel(new AliITSClusterFinderSSD());
+
+    if(kNTYPES>3){
+       Warning("SetDefaults",
+               "Only the four basic detector types are initialised!");
+    }// end if
+    return;
+}
+//_____________________________________________________________________________
 void AliITSvPPRsymm::DrawModule(){
 ////////////////////////////////////////////////////////////////////////
 //     Draw a shaded view of the FMD version 9.
@@ -4918,22 +5053,22 @@ void AliITSvPPRsymm::StepManager(){
   // Only entering charged tracks
   if((id = gMC->CurrentVolID(copy)) == fIdSens[0]) {
       vol[0] = 1;
-      id = gMC->CurrentVolOffID(0,copy);
+      id = gMC->CurrentVolOffID(2,copy);
       //detector copy in the ladder = 1<->4  (ITS1 < I101 < I103 < I10A)
       vol[1] = copy;
-      gMC->CurrentVolOffID(1,copy1);
+      gMC->CurrentVolOffID(3,copy1);
       //ladder copy in the module   = 1<->2  (I10A < I12A)
-      gMC->CurrentVolOffID(2,copy2);
+      gMC->CurrentVolOffID(4,copy2);
       //module copy in the layer    = 1<->10 (I12A < IT12)
       vol[2] = copy1+(copy2-1)*2;//# of ladders in one module  = 2
   } else if(id == fIdSens[1]){
       vol[0] = 2;
-      id = gMC->CurrentVolOffID(0,copy);
+      id = gMC->CurrentVolOffID(2,copy);
       //detector copy in the ladder = 1<->4  (ITS2 < I1D1 < I1D3 < I20A)
       vol[1] = copy;
-      gMC->CurrentVolOffID(1,copy1);
+      gMC->CurrentVolOffID(3,copy1);
       //ladder copy in the module   = 1<->4  (I20A < I12A)
-      gMC->CurrentVolOffID(2,copy2);
+      gMC->CurrentVolOffID(4,copy2);
       //module copy in the layer    = 1<->10 (I12A < IT12)
       vol[2] = copy1+(copy2-1)*4;//# of ladders in one module  = 4
   } else if(id == fIdSens[2]){