]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSvPPRasymm.cxx
The operator[] is replaced by At() or AddAt() in case of TObjArray.
[u/mrichter/AliRoot.git] / ITS / AliITSvPPRasymm.cxx
index 1e11ded1b8dc402f70af8a9f9c213cfd6e7def22..b84d17e0f3ac61bbb951aa9fa02a88a777dac7f1 100644 (file)
 
 /*
 $Log$
+Revision 1.44  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.43  2001/05/30 16:15:47  fca
+Correct comparison wiht AliGeant3::Class() introduced. Thanks to I.Hrivnacova
+
+Revision 1.42  2001/05/30 15:55:35  hristov
+Strings compared instead of pointers
+
+Revision 1.41  2001/05/30 14:04:31  hristov
+Dynamic cast replaced (F.Carminati)
+
+Revision 1.40  2001/05/25 15:59:59  morsch
+Overlaps corrected. (R. Barbera)
+
+Revision 1.38  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.37  2001/05/10 00:12:59  nilsen
+Finished fixing up the default segmentation for the PPR geometry.
+
+Revision 1.36  2001/05/09 01:02:21  nilsen
+Finished fixing SetDefaults for the segmentation of SPD, SDD, and SSD.
+
+Revision 1.35  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.33  2001/05/01 22:40:42  nilsen
+Partical update of SetDefault.
+
+Revision 1.32  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.31  2001/04/04 07:02:16  barbera
+Position of the cylinders holding rails corrected
+
+Revision 1.30  2001/03/29 22:02:30  barbera
+Some changes to the services due to the new drawings from the engineers.
+
+Revision 1.29  2001/03/29 05:28:56  barbera
+Rails material changed from aluminum to carbon fiber according with the decision of the last Technical Board
+
+Revision 1.28  2001/03/28 06:40:20  barbera
+Central and services mother volumes made consistenf for detailed and coarse geometry. Switch for rails added to the coarse geometries
+
 Revision 1.26  2001/03/23 00:12:23  nilsen
 Set Reading of AliITSgeom data from Geant3 common blocks as the default and
 not a .det file. Removed redundent calls to BuildGeometry.
@@ -129,7 +174,7 @@ New ITS detailed geometry to be used for the PPR
 #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"
@@ -138,6 +183,16 @@ New ITS detailed geometry to be used for the PPR
 #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(AliITSvPPRasymm)
@@ -303,7 +358,7 @@ void AliITSvPPRasymm::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();
@@ -311,25 +366,25 @@ void AliITSvPPRasymm::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.;
   }      
@@ -343,29 +398,29 @@ void AliITSvPPRasymm::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
@@ -475,19 +530,19 @@ void AliITSvPPRasymm::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,0.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);
@@ -523,7 +578,7 @@ void AliITSvPPRasymm::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);
@@ -560,12 +615,12 @@ void AliITSvPPRasymm::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);
@@ -889,7 +944,7 @@ void AliITSvPPRasymm::CreateGeometry(){
     
   //     FIELD CAGE HALF LENGTH 
   
-  rlim  = 56.;
+  rlim  = 50.;
   zmax  = 74.;
   ztpc = 284.;
   
@@ -907,37 +962,37 @@ void AliITSvPPRasymm::CreateGeometry(){
   dgh[8] = 85.;
   dgh[9] = -ztpc;
   dgh[10] = 46;  
-  dgh[11] = rlim+0.1;
+  dgh[11] = rlim+6;
   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[21] = -28;   
+  dgh[20] = rlim+6;
+  dgh[21] = -28.6;   
   dgh[22] = 6;
-  dgh[23] = rlim+0.1;    
-  dgh[24] = -26.2;  
+  dgh[23] = rlim+6;    
+  dgh[24] = -27.6;  
   dgh[25] = 3.295;
-  dgh[26] = rlim+0.1
-  dgh[27] = 26.2;   
+  dgh[26] = rlim+6
+  dgh[27] = 27.6;   
   dgh[28] = 3.295;
-  dgh[29] = rlim+0.1;
-  dgh[30] = 28;   
+  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.;  
@@ -1175,9 +1230,9 @@ void AliITSvPPRasymm::CreateGeometry(){
      gMC->Gsvolu("I103", "BOX ", idtmed[254], di103, 3); // contains det and chip  
                                                          // layer 1
      dits[0] = 0.793;
-     dits[1] = 0.015;
+     dits[1] = 0.475;  //0.685; 0.015
      dits[2] = 2.5;
-     gMC->Gsvolu("I105", "BOX ", idtmed[201], dits, 3);  
+     gMC->Gsvolu("I105", "BOX ", idtmed[290], dits, 3);  // end-ladder electr.
 
      di104[0] = 0.843;
      di104[1] = dbus;
@@ -1589,9 +1644,9 @@ void AliITSvPPRasymm::CreateGeometry(){
      gMC->Gsvolu("I124", "TUBS", idtmed[253], dits, 5);  
 
      dits[0] = 0.793;
-     dits[1] = 0.015 ;
+     dits[1] = 0.475 ;  //0.685; 0.015
      dits[2] = 2.5;
-     gMC->Gsvolu("I105", "BOX ", idtmed[201], dits, 3);  
+     gMC->Gsvolu("I105", "BOX ", idtmed[290], dits, 3);  
 
      di107[0] = 0.793;
      di107[1] = ddet1+dchip1;
@@ -1846,22 +1901,22 @@ void AliITSvPPRasymm::CreateGeometry(){
   dits[0] = 0;
   dits[1] = 360;
   dits[2] = 6;
-  dits[3] = -34.6;
+  dits[3] = -34.6; 
   dits[4] = 23.49;
   dits[5] = 28;
-  dits[6] = -27.35; 
+  dits[6] = -23.65; 
   dits[7] = 23.49;
   dits[8] = 28;
-  dits[9] = -27.35;  
+  dits[9] = -23.65;  
   dits[10] = 14.59; 
   dits[11] = 28;
-  dits[12] = 27.35;   
+  dits[12] = 23.65;   
   dits[13] = 14.59;
   dits[14] = 28;
-  dits[15] = 27.35;    
+  dits[15] = 23.65;    
   dits[16] = 23.49;
   dits[17] = 28;
-  dits[18] = 34.6;
+  dits[18] = 34.6;  
   dits[19] = 23.49;
   dits[20] = 28;
   gMC->Gsvolu("IT34", "PCON", idtmed[209], dits, 21);  
@@ -2540,7 +2595,7 @@ void AliITSvPPRasymm::CreateGeometry(){
   gMC->Gsvolu("IC01", "TUBE", idtmed[289], dits, 3);   
 
   dits[0] = 8.3;
-  dits[1] = 10;
+  dits[1] = 9.995;
   dits[2] = 17.5/2.;
   gMC->Gsvolu("IC02", "TUBE", idtmed[289], dits, 3);    
   
@@ -2594,7 +2649,7 @@ void AliITSvPPRasymm::CreateGeometry(){
   dits[30] = 34.65;
   dits[31] = 10;
   dits[32] = 28.6;
-  dits[33] = 42.6263;
+  dits[33] = 42.7;
   dits[34] = 10;
   dits[35] = 28.6;
   dits[36] = 59.7;
@@ -2610,9 +2665,9 @@ void AliITSvPPRasymm::CreateGeometry(){
   dits[5] = 12.25;      
   dits[6] = 40.15;
   dits[7] = 10.75;
-  dits[8] = 13.96;   //13.25
+  dits[8] = 13.96;   
   dits[9] = 40.15;
-  dits[10] = 12.46;  //12.46
+  dits[10] = 12.46;  
   dits[11] = 13.96;
   dits[12] = 55.75;
   dits[13] = 27;
@@ -2628,7 +2683,7 @@ void AliITSvPPRasymm::CreateGeometry(){
   dits[0] = 0;
   dits[1] = 50;
   dits[2] = 3;
-  dits[3] = 35;  
+  dits[3] = 39;  
   dits[4] = 14;
   dits[5] = 18.75;
   dits[6] = 46.7-3;
@@ -2642,7 +2697,7 @@ void AliITSvPPRasymm::CreateGeometry(){
   dits[0] = 0;
   dits[1] = 25;
   dits[2] = 3;
-  dits[3] = 40;
+  dits[3] = 49;
   dits[4] = 23.4;
   dits[5] = 26.4;
   dits[6] = 56.1-3;
@@ -2915,15 +2970,15 @@ void AliITSvPPRasymm::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");
@@ -3087,8 +3142,8 @@ void AliITSvPPRasymm::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");
@@ -3096,8 +3151,8 @@ void AliITSvPPRasymm::CreateGeometry(){
      gMC->Gspos("I105",2,"I20B",-0.05,-0.01,16.844,0,"ONLY");
      gMC->Gspos("I1D7",2,"I20B",-0.0455,-di20b[1]+di1d7[1],3.536,0,"ONLY");
      gMC->Gspos("I1D7",1,"I20B",-0.0455,-di20b[1]+di1d7[1],10.708,0,"ONLY");
-     gMC->Gspos("I1D7",4,"I20B",-0.0455,-di20b[1]+di1d7[1],-10.708,idrotm[201],"ONLY");
-     gMC->Gspos("I1D7",3,"I20B",-0.0455,-di20b[1]+di1d7[1],-3.536,idrotm[201],"ONLY");
+     gMC->Gspos("I1D7",4,"I20B",-0.0455,-di20b[1]+di1d7[1],-10.708,0,"ONLY");
+     gMC->Gspos("I1D7",3,"I20B",-0.0455,-di20b[1]+di1d7[1],-3.536,0,"ONLY");
      gMC->Gspos("I109",3,"I20B",-0.138,0.015,-16.844,idrotm[201],"ONLY");
      gMC->Gspos("I109",4,"I20B",-0.138,0.015,16.844,0,"ONLY");
      gMC->Gspos("I108",2,"I20B",-0.138,-di20b[1]+2.*di1d7[1]+di108[1],0.0,0,"ONLY");
@@ -3979,8 +4034,8 @@ void AliITSvPPRasymm::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 ---------------------------------- 
@@ -4155,35 +4210,86 @@ void AliITSvPPRasymm::CreateGeometry(){
   
 
   // --- DEFINE CABLES AT THE END OF THE ITS CONES - COPPER PART
-  
+  //     UPPER PART
+
   dgh[0] = 46.;    
   dgh[1] = 46.+1.0;  
   dgh[2] = 9.5;
+  dgh[3] = 12.;
+  dgh[4] = 168.;
+  
+  gMC->Gsvolu("I1CU", "TUBS", idtmed[213], dgh, 5);  
+  gMC->Gspos("I1CU", 1, "ITSV", 0., 0., 83.5, 0, "ONLY");
+  gMC->Gspos("I1CU", 2, "ITSV", 0., 0., -83.5, idrotm[200], "ONLY");
   
-  gMC->Gsvolu("ICCU", "TUBE", idtmed[213], dgh, 3);  
-  gMC->Gspos("ICCU", 1, "ITSV", 0., 0., 83.5, 0, "ONLY");
-  gMC->Gspos("ICCU", 2, "ITSV", 0., 0., -83.5, idrotm[200], "ONLY");
+  // --- DEFINE CABLES AT THE END OF THE ITS CONES - COPPER PART
+  //     LOWER PART
+
+  dgh[0] = 46.;    
+  dgh[1] = 46.+1.0;  
+  dgh[2] = 9.5;
+  dgh[3] = 192.;
+  dgh[4] = 348.;
   
+  gMC->Gsvolu("I2CU", "TUBS", idtmed[213], dgh, 5);  
+  gMC->Gspos("I2CU", 1, "ITSV", 0., 0., 83.5, 0, "ONLY");
+  gMC->Gspos("I2CU", 2, "ITSV", 0., 0., -83.5, idrotm[200], "ONLY");
+
+
   // --- DEFINE CABLES AT THE END OF THE ITS CONES - CARBON PART
+  //     UPPER PART
   
   dgh[0] = 46.+1.0;  
   dgh[1] = 46.+1.0+1.5;   
   dgh[2] = 9.5;
+  dgh[3] = 12.;
+  dgh[4] = 168.;
+  
+  gMC->Gsvolu("I1CC", "TUBS", idtmed[225], dgh, 5);  
+  gMC->Gspos("I1CC", 1, "ITSV", 0., 0., 83.5, 0, "ONLY");
+  gMC->Gspos("I1CC", 2, "ITSV", 0., 0., -83.5, idrotm[200], "ONLY");  
   
-  gMC->Gsvolu("ICCC", "TUBE", idtmed[225], dgh, 3);  
-  gMC->Gspos("ICCC", 1, "ITSV", 0., 0., 83.5, 0, "ONLY");
-  gMC->Gspos("ICCC", 2, "ITSV", 0., 0., -83.5, idrotm[200], "ONLY");  
+  // --- DEFINE CABLES AT THE END OF THE ITS CONES - CARBON PART
+  //     LOWER PART
   
+  dgh[0] = 46.+1.0;  
+  dgh[1] = 46.+1.0+1.5;   
+  dgh[2] = 9.5;
+  dgh[3] = 192.;
+  dgh[4] = 348.;
+  
+  gMC->Gsvolu("I2CC", "TUBS", idtmed[225], dgh, 5);  
+  gMC->Gspos("I2CC", 1, "ITSV", 0., 0., 83.5, 0, "ONLY");
+  gMC->Gspos("I2CC", 2, "ITSV", 0., 0., -83.5, idrotm[200], "ONLY");  
+
+
   // --- DEFINE PATCH PANELS AT THE END OF THE ITS CONES
+  //     UPPER PART
   
   dgh[0] = 46.;  
   dgh[1] = 56.;
   dgh[2] = 2.25;
+  dgh[3] = 12.;
+  dgh[4] = 168.;
+  
+  gMC->Gsvolu("IPA1", "TUBS", idtmed[210], dgh, 5);  
+  gMC->Gspos("IPA1", 1, "ITSV", 0., 0., 95.25, 0, "ONLY");  
+  gMC->Gspos("IPA1", 2, "ITSV", 0., 0., -95.25, idrotm[200], "ONLY"); 
   
-  gMC->Gsvolu("IPAN", "TUBE", idtmed[210], dgh, 3);  
-  gMC->Gspos("IPAN", 1, "ITSV", 0., 0., 95.25, 0, "ONLY");  
-  gMC->Gspos("IPAN", 2, "ITSV", 0., 0., -95.25, idrotm[200], "ONLY"); 
+  // --- DEFINE PATCH PANELS AT THE END OF THE ITS CONES
+  //     LOWER PART
+  
+  dgh[0] = 46.;  
+  dgh[1] = 56.;
+  dgh[2] = 2.25;
+  dgh[3] = 192.;
+  dgh[4] = 348.;
   
+  gMC->Gsvolu("IPA2", "TUBS", idtmed[210], dgh, 5);  
+  gMC->Gspos("IPA2", 1, "ITSV", 0., 0., 95.25, 0, "ONLY");  
+  gMC->Gspos("IPA2", 2, "ITSV", 0., 0., -95.25, idrotm[200], "ONLY"); 
+
+
   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE ABSORBER SIDE - COPPER PART
   //     UPPER PART
   
@@ -4195,7 +4301,7 @@ void AliITSvPPRasymm::CreateGeometry(){
   dgh[5] = 12.;    
   dgh[6] = 168.;
   gMC->Gsvolu("ICU1", "CONS", idtmed[213], dgh, 7);    
-  gMC->Gspos("ICU1", 1, "ITSV", 0., 0., 97.7+dgh[0], 0, "ONLY");   
+  gMC->Gspos("ICU1", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");   
   
   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE ABSORBER SIDE - COPPER PART
   //     LOWER PART
@@ -4396,13 +4502,13 @@ void AliITSvPPRasymm::CreateGeometry(){
      dgh[0] = 2.;          
      dgh[1] = 8.;           
      dgh[2] = 190.;         
-     gMC->Gsvolu("IRA1", "BOX ", idtmed[210], dgh, 3);
+     gMC->Gsvolu("IRA1", "BOX ", idtmed[268], dgh, 3);
      gMC->Gspos("IRA1", 1, "ITSV", 53.5, 0., -69.5, 0, "ONLY");   
-     gMC->Gsvolu("IRA2", "BOX ", idtmed[210], dgh, 3);    
+     gMC->Gsvolu("IRA2", "BOX ", idtmed[268], dgh, 3);    
      gMC->Gspos("IRA2", 1, "ITSV", -53.5, 0., -69.5, 0, "ONLY");    
 
-     dgh[0] = 2.-0.5531;    // 0.5531 was determined in such a way that the aluminum area is 20.9 cm^2      
-     dgh[1] = 8.-0.5531;    // 0.5531 was determined in such a way that the aluminum area is 20.9 cm^2       
+     dgh[0] = 2.-0.5;    // 0.5 was determined in such a way that the aluminum area is 20.9 cm^2      
+     dgh[1] = 8.-0.5;    // 0.5 was determined in such a way that the aluminum area is 20.9 cm^2       
      dgh[2] = 190.;         
      gMC->Gsvolu("IRA3", "BOX ", idtmed[205], dgh, 3);   
      gMC->Gspos("IRA3", 1, "IRA1", 0., 0., 0., 0, "ONLY");   
@@ -4417,23 +4523,23 @@ void AliITSvPPRasymm::CreateGeometry(){
   dgh[1] = 59.;
   dgh[2] = 0.6;    
   gMC->Gsvolu("ICYL", "TUBE", idtmed[210], dgh, 3);   
-  gMC->Gspos("ICYL", 1, "ALIC", 0., 0., 73.4, 0, "ONLY");       
-  gMC->Gspos("ICYL", 2, "ALIC", 0., 0., -73.4, idrotm[200], "ONLY");  
+  gMC->Gspos("ICYL", 1, "ALIC", 0., 0., 74.1, 0, "ONLY");   
+  gMC->Gspos("ICYL", 2, "ALIC", 0., 0., -74.1, idrotm[200], "ONLY");  
 
   // --- DEFINE SUPPORTS FOR RAILS ATTACHED TO THE CYLINDERS
 
   dgh[0] = 0.;        
   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[210], 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->Gsvolu("ISR1", "TUBE", idtmed[284], dgh, 3);   
+  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
 
@@ -4487,7 +4593,13 @@ void AliITSvPPRasymm::CreateMaterials(){
   
   Int_t  isxfld  = gAlice->Field()->Integ();
   Float_t sxmgmx = gAlice->Field()->Max();
-  
+
+  // Freon
+  Float_t afre[2]  = { 12.011,18.9984032 };
+  Float_t zfre[2]  = { 6.,9. };
+  Float_t wfre[2]  = { 5.,12. };
+  Float_t densfre  = 1.5;  
+
   // --- Define the various materials and media for GEANT --- 
   
   AliMaterial(1,"SI$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
@@ -4523,6 +4635,9 @@ void AliITSvPPRasymm::CreateMaterials(){
   AliMaterial(12,"WATER$",0.14322E+02,0.72167E+01,0.10000E+01,0.35759E+02,0.94951E+02);
   AliMedium(12,"WATER$",12,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
 
+  AliMixture(13,"Freon$",afre,zfre,densfre,-2,wfre);
+  AliMedium(13,"Freon$",13,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+
   AliMaterial(14,"COPPER$",0.63546E+02,0.29000E+02,0.89600E+01,0.14300E+01,0.99900E+03);
   AliMedium(14,"COPPER$",14,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
 
@@ -4577,7 +4692,7 @@ void AliITSvPPRasymm::CreateMaterials(){
   AliMaterial(65,"INOX$",0.55098E+02,0.2572E+02,0.7900E+01,0.17800E+01,0.99900E+03);
   AliMedium(65,"INOX$",65,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
 
-  AliMaterial(68,"ROHACELL$",0.12011E+02,0.60000E+01,0.500E-01,0.666500E+03,0.99900E+03);
+  AliMaterial(68,"ROHACELL$",0.123974E+02,0.62363E+01,0.500E-01,0.80986E+03,0.99900E+03);
   AliMedium(68,"ROHACELL$",68,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
 
   AliMaterial(69,"SDD C AL (M55J)$",0.138802E+02,0.71315E+01,0.19837E+01,0.176542E+02,0.99900E+03);
@@ -4628,12 +4743,16 @@ void AliITSvPPRasymm::CreateMaterials(){
   AliMaterial(84,"SDD/SSD rings$",0.123565E+02,0.64561E+01,0.18097E+01,0.229570E+02,0.99900E+03);
   AliMedium(84,"SDD/SSD rings$",84,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
 
+  AliMaterial(85,"inox/alum$",0.321502E+02,0.153383E+02,0.30705E+01,0.69197E+01,0.99900E+03);
+  AliMedium(85,"inox/alum$",85,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+
+
   // Special media
 
   AliMaterial(90,"SPD shield$", 12.011, 6., 1.93/10. , 22.1*10., 999);
   AliMedium(90,"SPD shield$",90, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
 
-  AliMaterial(91, "SPD End ladder$", 55.845, 26., 7.87/10., 1.76*10., 999); 
+  AliMaterial(91, "SPD End ladder$", 47.0447, 21.7963, 3.6374, 4.4711, 999); 
   AliMedium(91, "SPD End ladder$",91, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
 
   AliMaterial(92, "SPD cone$",28.0855, 14., 2.33, 9.36, 999);    
@@ -4657,7 +4776,7 @@ void AliITSvPPRasymm::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;
@@ -4750,7 +4869,7 @@ void AliITSvPPRasymm::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
@@ -4768,19 +4887,20 @@ void AliITSvPPRasymm::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
@@ -4814,6 +4934,97 @@ void AliITSvPPRasymm::Init(){
     for(i=0;i<72;i++) cout << "*";
     cout << endl;
 }
+//_____________________________________________________________________________
+void AliITSvPPRasymm::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] = (s1->GetDx()*kconv/(seg1->Dpx(0))*resp1->DriftSpeed())+1.;// clock in Mhz
+    seg1->SetNPads(256,256);// 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 AliITSvPPRasymm::DrawModule(){
 ////////////////////////////////////////////////////////////////////////
@@ -4897,22 +5108,22 @@ void AliITSvPPRasymm::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]){