]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSvPPRasymm.cxx
Merging the VirtualMC branch to the main development branch (HEAD)
[u/mrichter/AliRoot.git] / ITS / AliITSvPPRasymm.cxx
index 7159797c2745e127cfe65b72390f8ba8eda423e0..8274e3a9ae63dd0313d64a8d711979ce26a0c724 100644 (file)
 
 /*
 $Log$
+Revision 1.53.6.4  2002/10/14 13:14:08  hristov
+Updating VirtualMC to v3-09-02
+
+Revision 1.58  2002/10/02 17:56:34  barbera
+Bug in copy 37 of volume I570 corrected (thanks to J. Belikov)
+
+Revision 1.57  2002/06/12 18:57:25  nilsen
+Added TrackReference hits for ITS Mother volume at request of TRD and TOF.
+
+Revision 1.56  2002/05/10 22:30:27  nilsen
+fix to use default paramters for the SDD response.
+
+Revision 1.55  2002/04/13 22:21:12  nilsen
+New default value of noise for SDD simulations introduced.
+
+Revision 1.54  2002/03/28 16:17:03  nilsen
+Set new Geant Step size and related parameters for the ITS materials.
+
+Revision 1.53  2001/11/28 01:35:45  nilsen
+Using standard constructors instead of default constructors for Clusterfinder,
+Response, and FastSimulator.
+
+Revision 1.52  2001/10/22 11:00:54  hristov
+New naming schema of the rotation matrices in BuildGeometry() to avoid redefinition in other detectors (R.Barbera)
+
 Revision 1.51  2001/10/19 10:18:49  barbera
 A typo corrected.
 
@@ -197,8 +222,8 @@ New ITS detailed geometry to be used for the PPR
 #include "AliRun.h"
 #include "AliMagF.h"
 #include "AliConst.h"
-#include "AliGeant3.h"
 #include "AliITSGeant3Geometry.h"
+#include "AliTrackReference.h"
 #include "AliITShit.h"
 #include "AliITS.h"
 #include "AliITSvPPRasymm.h"
@@ -24509,6 +24534,38 @@ void AliITSvPPRasymm::CreateGeometry(){
 //    This routine defines and Creates the geometry for version 6 of the ITS.
 ////////////////////////////////////////////////////////////////////////
   
+
+//Begin_Html
+/*
+<img src="picts/ITS/ITS_full_vPPRasymm.jpg">
+</pre>
+<br clear=left>
+<font size=+2 color=red>
+<p>This shows the full ITS geometry.
+</font>
+
+<img src="picts/ITS/ITS_SPD_Barrel_vPPRasymm.jpg">
+</pre>
+<br clear=left>
+<font size=+2 color=red>
+<p>This shows the full SPD Barrel of the ITS geometry.
+</font>
+
+<img src="picts/ITS/ITS_SDD_Barrel_vPPRasymm.jpg">
+</pre>
+<br clear=left>
+<font size=+2 color=red>
+<p>This shows the full SDD Barrel of the ITS geometry.
+</font>
+
+<img src="picts/ITS/ITS_SSD_Barrel_vPPRasymm.jpg">
+</pre>
+<br clear=left>
+<font size=+2 color=red>
+<p>This shows the full SSD Barrel of the ITS geometry.
+</font>
+*/
+//End_Html
   //INNER RADII OF THE SILICON LAYERS 
   // Float_t rl[6]    = { 3.8095,7.,15.,24.,38.1,43.5765 };   
   //THICKNESSES OF LAYERS (in % radiation length)
@@ -25245,7 +25302,7 @@ void AliITSvPPRasymm::CreateGeometry(){
      dits[0] = 3.7;
      dits[1] = 7.75;
      dits[2] = 26.1;
-     gMC->Gsvolu("IT12", "TUBE", idtmed[254], dits, 3);   
+     gMC->Gsvolu("IT12", "TUBE", idtmed[254], dits, 3);
 
      dits[0] = 3.7;
      dits[1] = 7.7;
@@ -25279,7 +25336,7 @@ void AliITSvPPRasymm::CreateGeometry(){
      dits[0] = 0.1253;
      dits[1] = 0.01;
      dits[2] = 24;
-     gMC->Gsvolu("I122", "BOX ", idtmed[253], dits, 3);  
+     gMC->Gsvolu("I122", "BOX ", idtmed[253], dits, 3);
 
      dits[0] = 0.04;
      dits[1] = 0.06 ;
@@ -27798,7 +27855,7 @@ void AliITSvPPRasymm::CreateGeometry(){
   gMC->Gspos("I570",34,"IT56",21.7497,40.1899,-0.27,idrotm[549],"ONLY");
   gMC->Gspos("I570",35,"IT56",14.7884,43.0772,-0.27,idrotm[550],"ONLY");
   gMC->Gspos("I570",36,"IT56",7.5216,45.0744,-0.27,idrotm[551],"ONLY");
-  gMC->Gspos("I570",37,"IT56",-0.27,45.545,-0.27,0,"ONLY");
+  gMC->Gspos("I570",37,"IT56",0.,45.545,-0.27,0,"ONLY");
   gMC->Gspos("I570",38,"IT56",-7.5216,45.0744,-0.27,idrotm[552],"ONLY");
   gMC->Gspos("I570",1,"IT56",-14.7884,43.0772,-0.27,idrotm[553],"ONLY");
   gMC->Gspos("I570",2,"IT56",-21.7497,40.1899,-0.27,idrotm[620],"ONLY");
@@ -28775,185 +28832,215 @@ void AliITSvPPRasymm::CreateMaterials(){
   // one is used. See the definition found in AliITSv5 or the other routine
   // for a complete definition.
   //
-  
-  Int_t  isxfld  = gAlice->Field()->Integ();
-  Float_t sxmgmx = gAlice->Field()->Max();
+
+  Int_t   ifield = gAlice->Field()->Integ();
+  Float_t fieldm = gAlice->Field()->Max();
+
+  Float_t tmaxfd = 0.1; // 1.0; // Degree
+  Float_t stemax = 1.0; // cm
+  Float_t deemax = 0.1; // 30.0; // Fraction of particle's energy 0<deemax<=1
+  Float_t epsil  = 1.0E-4; // 1.0; // cm
+  Float_t stmin  = 0.0; // cm "Default value used"
+
+  Float_t tmaxfdSi = 0.1; // .10000E+01; // Degree
+  Float_t stemaxSi = 0.0075; //  .10000E+01; // cm
+  Float_t deemaxSi = 0.1; // 0.30000E-02; // Fraction of particle's energy 0<deemax<=1
+  Float_t epsilSi  = 1.0E-4;// .10000E+01;
+  Float_t stminSi  = 0.0; // cm "Default value used"
+
+  Float_t tmaxfdAir = 0.1; // .10000E+01; // Degree
+  Float_t stemaxAir = .10000E+01; // cm
+  Float_t deemaxAir = 0.1; // 0.30000E-02; // Fraction of particle's energy 0<deemax<=1
+  Float_t epsilAir  = 1.0E-4;// .10000E+01;
+  Float_t stminAir  = 0.0; // cm "Default value used"
+
+  Float_t tmaxfdServ = 1.0; // 10.0; // Degree
+  Float_t stemaxServ = 1.0; // 0.01; // cm
+  Float_t deemaxServ = 0.5; // 0.1; // Fraction of particle's energy 0<deemax<=1
+  Float_t epsilServ  = 1.0E-3; // 0.003; // cm
+  Float_t stminServ  = 0.0; //0.003; // cm "Default value used"
 
   // Freon
   Float_t afre[2]  = { 12.011,18.9984032 };
-  Float_t zfre[2]  = { 6.,9. };
+  Float_t zfre[2]  = { 6., 9. };
   Float_t wfre[2]  = { 5.,12. };
-  Float_t densfre  = 1.5;  
+  Float_t densfre  = 1.5;
 
   // --- Define the various materials and media for GEANT --- 
-  
+  // AliMaterial(Int_t imat, const char* name, Float_t a, Float_t z,
+  //              Float_t dens, Float_t radl, Float_t absl,
+  //              Float_t *buf=0, Int_t nwbuf=0)
+  //AliMedium(Int_t numed, const char *name, Int_t nmat,
+  //          Int_t isvol, Int_t ifield, Float_t fieldm,
+  //          Float_t tmaxfd, Float_t stemax, Float_t deemax,
+  //          Float_t epsil, Float_t stmin, Float_t *ubuf=0, Int_t nbuf=0)
   AliMaterial(1,"SI$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
-  AliMedium(1,"SI$",1,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(1,"SI$",1,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
 
   AliMaterial(2,"SPD SI CHIP$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
-  AliMedium(2,"SPD SI CHIP$",2,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,   0);
+  AliMedium(2,"SPD SI CHIP$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
 
   AliMaterial(3,"SPD SI BUS$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
-  AliMedium(3,"SPD SI BUS$",3,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(3,"SPD SI BUS$",3,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
 
   AliMaterial(4,"C (M55J)$",0.12011E+02,0.60000E+01,0.1930E+01,0.22100E+02,0.99900E+03);
-  AliMedium(4,"C (M55J)$",4,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(4,"C (M55J)$",4,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(5,"AIR$",0.14610E+02,0.73000E+01,0.12050E-02,0.30423E+05,0.99900E+03);
-  AliMedium(5,"AIR$",5,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E-02,.10000E+01,0);
+  AliMedium(5,"AIR$",5,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
 
   AliMaterial(6,"GEN AIR$",0.14610E+02,0.73000E+01,0.12050E-02,0.30423E+05,0.99900E+03);
-  AliMedium(6,"GEN AIR$",6,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E-02,.10000E+01,0);
+  AliMedium(6,"GEN AIR$",6,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
 
   AliMaterial(7,"SDD SI CHIP$",0.374952E+02,0.178184E+02,0.24485E+01,0.76931E+01,0.99900E+03);
-  AliMedium(7,"SDD SI CHIP$",7,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(7,"SDD SI CHIP$",7,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
 
   AliMaterial(9,"SDD C (M55J)$",0.123565E+02,0.64561E+01,0.18097E+01,0.229570E+02,0.99900E+03);
-  AliMedium(9,"SDD C (M55J)$",9,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(9,"SDD C (M55J)$",9,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(10,"SDD AIR$",0.14610E+02,0.73000E+01,0.12050E-02,0.30423E+05,0.99900E+03);
-  AliMedium(10,"SDD AIR$",10,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E-02,.10000E+01,0);
+  AliMedium(10,"SDD AIR$",10,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
 
   AliMaterial(11,"AL$",0.26982E+02,0.13000E+02,0.26989E+01,0.89000E+01,0.99900E+03);
-  AliMedium(11,"AL$",11,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(11,"AL$",11,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   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);
+  AliMedium(12,"WATER$",12,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMixture(13,"Freon$",afre,zfre,densfre,-2,wfre);
-  AliMedium(13,"Freon$",13,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(13,"Freon$",13,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   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);
+  AliMedium(14,"COPPER$",14,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(15,"CERAMICS$",0.22314E+02,0.10856E+02,0.36000E+01,0.76200E+01,0.31901E+02);
-  AliMedium(15,"CERAMICS$",15,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(15,"CERAMICS$",15,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(20,"SSD C (M55J)$",0.12011E+02,0.60000E+01,0.1930E+01,0.22100E+02,0.99900E+03);
-  AliMedium(20,"SSD C (M55J)$",20,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(20,"SSD C (M55J)$",20,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(21,"SSD AIR$",0.14610E+02,0.73000E+01,0.12050E-02,0.30423E+05,0.99900E+03);
-  AliMedium(21,"SSD AIR$",21,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E-02,.10000E+01,0);
+  AliMedium(21,"SSD AIR$",21,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
 
   AliMaterial(25,"G10FR4$",0.17749E+02,0.88750E+01,0.18000E+01,0.21822E+02,0.99900E+03);
-  AliMedium(25,"G10FR4$",25,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(25,"G10FR4$",25,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(26,"GEN C (M55J)$",0.12011E+02,0.60000E+01,0.1930E+01,0.22100E+02,0.99900E+03);
-  AliMedium(26,"GEN C (M55J)$",26,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(26,"GEN C (M55J)$",26,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(27,"GEN Air$",0.14610E+02,0.73000E+01,0.12050E-02,0.30423E+05,0.99900E+03);
-  AliMedium(27,"GEN Air$",27,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E-02,.10000E+01,0);
+  AliMedium(27,"GEN Air$",27,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
 
   AliMaterial(51,"SPD SI$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
-  AliMedium(51,"SPD SI$",51,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(51,"SPD SI$",51,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
 
   AliMaterial(52,"SPD SI CHIP$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
-  AliMedium(52,"SPD SI CHIP$",52,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(52,"SPD SI CHIP$",52,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
 
   AliMaterial(53,"SPD SI BUS$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
-  AliMedium(53,"SPD SI BUS$",53,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(53,"SPD SI BUS$",53,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
 
   AliMaterial(54,"SPD C (M55J)$",0.12011E+02,0.60000E+01,0.1930E+01,0.22100E+02,0.99900E+03);
-  AliMedium(54,"SPD C (M55J)$",54,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(54,"SPD C (M55J)$",54,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(55,"SPD AIR$",0.14610E+02,0.73000E+01,0.12050E-02,0.30423E+05,0.99900E+03);
-  AliMedium(55,"SPD AIR$",55,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E-02,.10000E+01,0);
+  AliMedium(55,"SPD AIR$",55,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
 
   AliMaterial(56,"SPD KAPTON(POLYCH2)$",0.14000E+02,0.71770E+01,0.13000E+01,0.31270E+02,0.99900E+03);
-  AliMedium(56,"SPD KAPTON(POLYCH2)$",56,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(56,"SPD KAPTON(POLYCH2)$",56,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(61,"EPOXY$",0.17749E+02,0.88750E+01,0.18000E+01,0.21822E+02,0.99900E+03);
-  AliMedium(61,"EPOXY$",61,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(61,"EPOXY$",61,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(62,"SILICON$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
-  AliMedium(62,"SILICON$",62,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(62,"SILICON$",62,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
 
   AliMaterial(63,"KAPTONH(POLYCH2)$",0.14000E+02,0.71770E+01,0.13000E+01,0.31270E+02,0.99900E+03);
-  AliMedium(63,"KAPTONH(POLYCH2)$",63,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(63,"KAPTONH(POLYCH2)$",63,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(64,"ALUMINUM$",0.26982E+02,0.13000E+02,0.26989E+01,0.89000E+01,0.99900E+03);
-  AliMedium(64,"ALUMINUM$",64,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(64,"ALUMINUM$",64,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   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);
+  AliMedium(65,"INOX$",65,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   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);
+  AliMedium(68,"ROHACELL$",68,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(69,"SDD C AL (M55J)$",0.138802E+02,0.71315E+01,0.19837E+01,0.176542E+02,0.99900E+03);
-  AliMedium(69,"SDD C AL (M55J)$",69,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(69,"SDD C AL (M55J)$",69,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(70,"SDDKAPTON (POLYCH2)$",0.14000E+02,0.71770E+01,0.13000E+01,0.31270E+02,0.99900E+03);
-  AliMedium(70,"SDDKAPTON (POLYCH2)$",70,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(70,"SDDKAPTON (POLYCH2)$",70,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(71,"ITS SANDW A$",0.12011E+02,0.60000E+01,0.2115E+00,0.17479E+03,0.99900E+03);
-  AliMedium(71,"ITS SANDW A$",71,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(71,"ITS SANDW A$",71,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(72,"ITS SANDW B$",0.12011E+02,0.60000E+01,0.27000E+00,0.18956E+03,0.99900E+03);
-  AliMedium(72,"ITS SANDW B$",72,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(72,"ITS SANDW B$",72,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(73,"ITS SANDW C$",0.12011E+02,0.60000E+01,0.41000E+00,0.90868E+02,0.99900E+03);
-  AliMedium(73,"ITS SANDW C$",73,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(73,"ITS SANDW C$",73,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(74,"HEAT COND GLUE$",0.12011E+02,0.60000E+01,0.1930E+01,0.22100E+02,0.99900E+03);
-  AliMedium(74,"HEAT COND GLUE$",74,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(74,"HEAT COND GLUE$",74,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(75,"ELASTO SIL$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
-  AliMedium(75,"ELASTO SIL$",75,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(75,"ELASTO SIL$",75,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(76,"SPDBUS(AL+KPT+EPOX)$",0.19509E+02,0.96502E+01,0.19060E+01,0.15413E+02,0.99900E+03);
-  AliMedium(76,"SPDBUS(AL+KPT+EPOX)$",76,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(76,"SPDBUS(AL+KPT+EPOX)$",76,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
                
   AliMaterial(77,"SDD X7R capacitors$",0.1157516E+03,0.477056E+02,0.67200E+01,0.14236E+01,0.99900E+03);
-  AliMedium(77,"SDD X7R capacitors$",77,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(77,"SDD X7R capacitors$",77,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(78,"SDD ruby sph. Al2O3$",0.218101E+02,0.106467E+02,0.39700E+01,0.48539E+01,0.99900E+03);
-  AliMedium(78,"SDD ruby sph. Al2O3$",78,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(78,"SDD ruby sph. Al2O3$",78,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(79,"SDD SI insensitive$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
-  AliMedium(79,"SDD SI insensitive$",79,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(79,"SDD SI insensitive$",79,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(80,"SDD HV microcable$",0.159379E+02,0.78598E+01,0.16087E+01,0.217906E+02,0.99900E+03);
-  AliMedium(80,"SDD HV microcable$",80,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(80,"SDD HV microcable$",80,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(81,"SDD LV+signal cable$",0.223689E+02,0.108531+02,0.21035E+01,0.13440E+02,0.99900E+03);
-  AliMedium(81,"SDD LV+signal cable$",81,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(81,"SDD LV+signal cable$",81,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(82,"SDD hybrid microcab$",0.218254E+02,0.106001E+02,0.20502E+01,0.137308E+02,0.99900E+03);
-  AliMedium(82,"SDD hybrid microcab$",82,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(82,"SDD hybrid microcab$",82,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   AliMaterial(83,"SDD anode microcab$",0.186438E+02,0.91193E+01,0.17854E+01,0.176451E+02,0.99900E+03);
-  AliMedium(83,"SDD anode microcab$",83,0,isxfld,sxmgmx,.10000E+01,.10000E+01,0.30000E02,.10000E+01,0);
+  AliMedium(83,"SDD anode microcab$",83,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   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);
+  AliMedium(84,"SDD/SSD rings$",84,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
   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);
+  AliMedium(85,"inox/alum$",85,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
 
   // 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);
+  AliMedium(90,"SPD shield$",90,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ);
 
   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);
+  AliMedium(91,"SPD End ladder$",91,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ);
 
   AliMaterial(92, "SPD cone$",28.0855, 14., 2.33, 9.36, 999);    
-  AliMedium(92, "SPD cone$",   92, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);   
+  AliMedium(92,"SPD cone$",92,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ);
 
   AliMaterial(93, "SDD End ladder$", 69.9298, 29.8246, 0.3824, 36.5103, 999); 
-  AliMedium(93, "SDD End ladder$",93, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
+  AliMedium(93,"SDD End ladder$",93,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ);
 
-  AliMaterial(94, "SDD cone$",63.546, 29., 1.15, 1.265, 999);     
-  AliMedium(94, "SDD cone$",   94, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
+  AliMaterial(94, "SDD cone$",63.546, 29., 1.15, 1.265, 999);
+  AliMedium(94,"SDD cone$",94,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ);
 
   AliMaterial(95, "SSD End ladder$", 32.0988, 15.4021, 0.68, 35.3238, 999); 
-  AliMedium(95, "SSD End ladder$",95, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
+  AliMedium(95,"SSD End ladder$",95,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ);
   
-  AliMaterial(96, "SSD cone$",63.546, 29., 1.15, 1.265, 999); 
-  AliMedium(96, "SSD cone$",   96, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
+  AliMaterial(96, "SSD cone$",63.546, 29., 1.15, 1.265, 999);
+  AliMedium(96,"SSD cone$",96,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ);
 
 }
 //______________________________________________________________________
@@ -28961,7 +29048,8 @@ 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(gMC->IsA()!=AliGeant3::Class()) {
+//    if(gMC->IsA()!=AliGeant3::Class()) {
+  if(strcmp(gMC->GetName(),"TGeant3")) {
        Error("InitAliITSgeom",
                "Wrong Monte Carlo. InitAliITSgeom uses TGeant3 calls");
        return;
@@ -29118,6 +29206,7 @@ void AliITSvPPRasymm::Init(){
 //
     for(i=0;i<72;i++) cout << "*";
     cout << endl;
+    fIDMother = gMC->VolId("ITSV"); // ITS Mother Volume ID.
 }
 //_____________________________________________________________________________
 void AliITSvPPRasymm::SetDefaults(){
@@ -29164,19 +29253,12 @@ void AliITSvPPRasymm::SetDefaults(){
     // SDD
     iDetType=DetType(kSDD);
     s1 = (AliITSgeomSDD*) fITSgeom->GetShape(kSDD);// Get shape info. Do it this way for now.
-    AliITSresponseSDD *resp1=new AliITSresponseSDD();
-    resp1->SetZeroSupp("1D");
-    resp1->SetDriftSpeed(7.3); // set drift speed to 7.3 microns/ns.
-    Float_t a,b;
-    resp1->GetNoiseParam(a,b);
-    Int_t cp[8] = {0,0,(Int_t)(a+2.*b),(Int_t)(a+2.*b),0,0,0,0};
-    resp1->SetCompressParam(cp);
+    AliITSresponseSDD *resp1=new AliITSresponseSDD("simulated");
     SetResponseModel(kSDD,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(kSDD,seg1);
     const char *kData1=(iDetType->GetResponseModel())->DataType();
@@ -29190,7 +29272,7 @@ void AliITSvPPRasymm::SetDefaults(){
     // SSD  Layer 5
     iDetType=DetType(kSSD);
     s2 = (AliITSgeomSSD*) fITSgeom->GetShape(kSSD);// Get shape info. Do it this way for now.
-    AliITSresponse *resp2=new AliITSresponseSSD();
+    AliITSresponse *resp2=new AliITSresponseSSD("simulated");
     SetResponseModel(kSSD,resp2);
     AliITSsegmentationSSD *seg2=new AliITSsegmentationSSD(fITSgeom);
     seg2->SetDetSize(s2->GetDx()*2.*kconv, // base this on AliITSgeomSSD
@@ -29275,96 +29357,127 @@ void AliITSvPPRasymm::StepManager(){
 // value except 1, the default behavior, then no such file is created nor
 // it the extra variables and the like used in the printing allocated.
 ////////////////////////////////////////////////////////////////////////
-  Int_t         copy, id;
-  Int_t          copy1,copy2;  
-  Float_t       hits[8];
-  Int_t         vol[4];
-  TLorentzVector position, momentum;
-  TClonesArray &lhits = *fHits;
-  //
-  // Track status
-  vol[3] = 0;
-  if(gMC->IsTrackInside())      vol[3] +=  1;
-  if(gMC->IsTrackEntering())    vol[3] +=  2;
-  if(gMC->IsTrackExiting())     vol[3] +=  4;
-  if(gMC->IsTrackOut())         vol[3] +=  8;
-  if(gMC->IsTrackDisappeared()) vol[3] += 16;
-  if(gMC->IsTrackStop())        vol[3] += 32;
-  if(gMC->IsTrackAlive())       vol[3] += 64;
-  //
-  // Fill hit structure.
-  if(!(gMC->TrackCharge())) return;
-  //
-  // Only entering charged tracks
-  if((id = gMC->CurrentVolID(copy)) == fIdSens[0]) {
-      vol[0] = 1;
-      id = gMC->CurrentVolOffID(2,copy);
-      //detector copy in the ladder = 1<->4  (ITS1 < I101 < I103 < I10A)
-      vol[1] = copy;
-      gMC->CurrentVolOffID(3,copy1);
-      //ladder copy in the module   = 1<->2  (I10A < I12A)
-      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(2,copy);
-      //detector copy in the ladder = 1<->4  (ITS2 < I1D1 < I1D3 < I20A)
-      vol[1] = copy;
-      gMC->CurrentVolOffID(3,copy1);
-      //ladder copy in the module   = 1<->4  (I20A < I12A)
-      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]){
-      vol[0] = 3;
-      id = gMC->CurrentVolOffID(1,copy);
-      //detector copy in the ladder = 1<->6  (ITS3 < I302 < I004)
-      vol[1] = copy;
-      id = gMC->CurrentVolOffID(2,copy);
-      //ladder copy in the layer    = 1<->14 (I004 < IT34)
-      vol[2] = copy;
-  } else if(id == fIdSens[3]){
-      vol[0] = 4;
-      id = gMC->CurrentVolOffID(1,copy);
-      //detector copy in the ladder = 1<->8  (ITS4 < I402 < I005)
-      vol[1] = copy;
-      id = gMC->CurrentVolOffID(2,copy);
-      //ladder copy in the layer    = 1<->22 (I005 < IT34))
-      vol[2] = copy;
-  }else if(id == fIdSens[4]){
-      vol[0] = 5;
-      id = gMC->CurrentVolOffID(1,copy);
-      //detector copy in the ladder = 1<->22  (ITS5 < I562 < I565)
-      vol[1] = copy;
-      id = gMC->CurrentVolOffID(2,copy);
-     //ladder copy in the layer    = 1<->34 (I565 < IT56)
-      vol[2] = copy;
-  }else if(id == fIdSens[5]){
-      vol[0] = 6;
-      id = gMC->CurrentVolOffID(1,copy);
-      //detector copy in the ladder = 1<->25  (ITS6 < I566 < I569)
-      vol[1] = copy;
-      id = gMC->CurrentVolOffID(2,copy);
-      //ladder copy in the layer = 1<->38 (I569 < IT56)
-      vol[2] = copy;
-  } else {
-      return; // not an ITS volume?
-  } // end if/else if (gMC->CurentVolID(copy) == fIdSens[i])
-//
-  gMC->TrackPosition(position);
-  gMC->TrackMomentum(momentum);
-  hits[0]=position[0];
-  hits[1]=position[1];
-  hits[2]=position[2];
-  hits[3]=momentum[0];
-  hits[4]=momentum[1];
-  hits[5]=momentum[2];
-  hits[6]=gMC->Edep();
-  hits[7]=gMC->TrackTime();
-  // Fill hit structure with this new hit.
-  new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->CurrentTrack(),vol,hits);
-
-  return;
+    Int_t         copy, id;
+    TLorentzVector position, momentum;
+    static TLorentzVector position0;
+    static Int_t stat0=0;
+    if((id=gMC->CurrentVolID(copy) == fIDMother)&&
+       (gMC->IsTrackEntering()||gMC->IsTrackExiting())){
+       gMC->TrackPosition(position); // Get Position
+       gMC->TrackMomentum(momentum); // Get Momentum
+       copy = fTrackReferences->GetEntriesFast();
+       TClonesArray &lTR = *fTrackReferences;
+       // Fill TrackReference structure with this new TrackReference.
+       AliTrackReference *tr = new(lTR[copy]) AliTrackReference();
+       tr->SetTrack(gAlice->CurrentTrack());
+       tr->SetPosition(position.X(),position.Y(),position.Z());
+       tr->SetMomentum(momentum.Px(),momentum.Py(),momentum.Pz());
+       tr->SetLength(gMC->TrackLength());
+    } // if Outer ITS mother Volume
+    if(!(this->IsActive())){
+       return;
+    } // end if !Active volume.
+    Int_t   copy1,copy2;  
+//    Float_t hits[8];
+    Int_t   vol[5];
+    TClonesArray &lhits = *fHits;
+    //
+    // Track status
+    vol[3] = 0;
+    vol[4] = 0;
+    if(gMC->IsTrackInside())      vol[3] +=  1;
+    if(gMC->IsTrackEntering())    vol[3] +=  2;
+    if(gMC->IsTrackExiting())     vol[3] +=  4;
+    if(gMC->IsTrackOut())         vol[3] +=  8;
+    if(gMC->IsTrackDisappeared()) vol[3] += 16;
+    if(gMC->IsTrackStop())        vol[3] += 32;
+    if(gMC->IsTrackAlive())       vol[3] += 64;
+    //
+    // Fill hit structure.
+    if(!(gMC->TrackCharge())) return;
+    //
+    // Only entering charged tracks
+    if((id = gMC->CurrentVolID(copy)) == fIdSens[0]) {
+       vol[0] = 1;
+       id = gMC->CurrentVolOffID(2,copy);
+       //detector copy in the ladder = 1<->4  (ITS1 < I101 < I103 < I10A)
+       vol[1] = copy;
+       gMC->CurrentVolOffID(3,copy1);
+       //ladder copy in the module   = 1<->2  (I10A < I12A)
+       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(2,copy);
+       //detector copy in the ladder = 1<->4  (ITS2 < I1D1 < I1D3 < I20A)
+       vol[1] = copy;
+       gMC->CurrentVolOffID(3,copy1);
+       //ladder copy in the module   = 1<->4  (I20A < I12A)
+       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]){
+       vol[0] = 3;
+       id = gMC->CurrentVolOffID(1,copy);
+       //detector copy in the ladder = 1<->6  (ITS3 < I302 < I004)
+       vol[1] = copy;
+       id = gMC->CurrentVolOffID(2,copy);
+       //ladder copy in the layer    = 1<->14 (I004 < IT34)
+       vol[2] = copy;
+    } else if(id == fIdSens[3]){
+       vol[0] = 4;
+       id = gMC->CurrentVolOffID(1,copy);
+       //detector copy in the ladder = 1<->8  (ITS4 < I402 < I005)
+       vol[1] = copy;
+       id = gMC->CurrentVolOffID(2,copy);
+       //ladder copy in the layer    = 1<->22 (I005 < IT34))
+       vol[2] = copy;
+    }else if(id == fIdSens[4]){
+       vol[0] = 5;
+       id = gMC->CurrentVolOffID(1,copy);
+       //detector copy in the ladder = 1<->22  (ITS5 < I562 < I565)
+       vol[1] = copy;
+       id = gMC->CurrentVolOffID(2,copy);
+       //ladder copy in the layer    = 1<->34 (I565 < IT56)
+       vol[2] = copy;
+    }else if(id == fIdSens[5]){
+       vol[0] = 6;
+       id = gMC->CurrentVolOffID(1,copy);
+       //detector copy in the ladder = 1<->25  (ITS6 < I566 < I569)
+       vol[1] = copy;
+       id = gMC->CurrentVolOffID(2,copy);
+       //ladder copy in the layer = 1<->38 (I569 < IT56)
+       vol[2] = copy;
+    } else {
+       return; // not an ITS volume?
+    } // end if/else if (gMC->CurentVolID(copy) == fIdSens[i])
+    //
+    gMC->TrackPosition(position);
+    gMC->TrackMomentum(momentum);
+/*
+    hits[0]=position[0];
+    hits[1]=position[1];
+    hits[2]=position[2];
+    hits[3]=momentum[0];
+    hits[4]=momentum[1];
+    hits[5]=momentum[2];
+    hits[6]=gMC->Edep();
+    hits[7]=gMC->TrackTime();
+*/
+    vol[4] = stat0;
+    if(gMC->IsTrackEntering()){
+       position0 = position;
+       stat0 = vol[3];
+    } // end if IsEntering
+    // Fill hit structure with this new hit.
+//    new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->CurrentTrack(),vol,hits);
+    new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->CurrentTrack(),vol,
+                                  gMC->Edep(),gMC->TrackTime(),position,
+                                  position0,momentum);
+    //
+    position0 = position;
+    stat0 = vol[3];
 
+    return;
 }