]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCv2.cxx
Setting the branch address to permit correct reading
[u/mrichter/AliRoot.git] / TPC / AliTPCv2.cxx
index 0f8deafee0cc55ec123df2e4b2d6ca088a66942f..e0e5493b201ad45d2a8c5170457b98ed939ec765 100644 (file)
 
 /*
 $Log$
+Revision 1.47  2003/03/04 15:16:54  kowal2
+Geometry corrected for an overlap
+
+Revision 1.46  2003/02/11 16:54:07  hristov
+Updated AliTrackReference class (S.Radomski)
+
+Revision 1.45  2003/01/14 10:50:20  alibrary
+Cleanup of STEER coding conventions
+
+Revision 1.44  2002/11/21 22:43:32  alibrary
+Removing AliMC and AliMCProcess
+
+Revision 1.43  2002/10/14 14:57:43  hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
+Revision 1.40.6.2  2002/07/24 10:09:01  alibrary
+Updating VirtualMC
+
+Revision 1.42  2002/06/12 14:56:56  kowal2
+Added track length to the reference hits
+
+Revision 1.41  2002/05/27 14:33:15  hristov
+The new class AliTrackReference used (M.Ivanov)
+
+Revision 1.40  2002/01/21 17:12:00  kowal2
+New track hits structure using root containers
+
+Revision 1.39  2001/05/16 14:57:25  alibrary
+New files for folders and Stack
+
 Revision 1.38  2001/05/08 16:03:06  kowal2
 Geometry update according to the latest technical spec.
 
@@ -130,22 +160,21 @@ Introduction of the Copyright and cvs Log
 //                                                                           //
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
+
 #include <stdlib.h>
 
 #include <TMath.h>
+#include <TPDGCode.h>
 
-#include "AliTPCv2.h"
-#include "AliTPCDigitsArray.h"
-#include "AliRun.h"
-#include "AliMC.h"
 #include "AliConst.h"
-#include "AliPDG.h"
+#include "AliRun.h"
+#include "AliTPCDigitsArray.h"
 #include "AliTPCParam.h"
 #include "AliTPCParamSR.h"
-#include "AliTPCTrackHits.h"
+#include "AliTPCTrackHitsV2.h"
+#include "AliTPCv2.h"
 #include "TLorentzVector.h"
 
-
 ClassImp(AliTPCv2)
  
 //_____________________________________________________________________________
@@ -491,13 +520,13 @@ void AliTPCv2::CreateGeometry()
 
   dm[15]=250.6;
   dm[16]=258.;
-  dm[17]=275.5;
+  dm[17]=269.6;
 
   //
 
   dm[18]=253.6;
   dm[19]=258.;
-  dm[20]=275.5;
+  dm[20]=269.6;
 
   gMC->Gsvolu("TOFC","PCON",idtmed[4],dm,21);
 
@@ -532,7 +561,8 @@ void AliTPCv2::CreateGeometry()
   gMC->Gspos("TSA7",1,"TSA6",0.,0.,0.,0,"ONLY"); 
   gMC->Gspos("TSA6",1,"TOFC",0.,0.,0.,0,"ONLY");
 
-  // TOFC->TOIN
+  // TOFC->TOIN 
+  // TOFC overlaps with 
 
   gMC->Gspos("TOFC",1,"TOIN",0.,0.,0.,0,"ONLY");
 
@@ -1956,6 +1986,12 @@ void AliTPCv2::StepManager()
 
   id = gMC->CurrentVolID(copy); // current volume Id
 
+  if ( (gMC->IsTrackEntering() || gMC->IsTrackExiting()) &&
+       ((id == fIdLSec) || (id == fIdUSec)) ) {
+
+    AddTrackReference(gAlice->CurrentTrack());
+  }
+
   if(id == fIdLSec){
     vol[0] = copy-1; // lower sector number
   }
@@ -2065,10 +2101,7 @@ void AliTPCv2::StepManager()
       if(TMath::Abs(charge) > 1.) pp *= (charge*charge);
     }
   
-  Float_t random[1];
-  gMC->Rndm(random,1); // good, old GRNDM from Geant3
-  
-  Double_t rnd = (Double_t)random[0];
+  Double_t rnd = gMC->GetRandom()->Rndm();
   
   gMC->SetMaxStep(-TMath::Log(rnd)/pp);