]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDv0.cxx
Harder cuts inside dense material.
[u/mrichter/AliRoot.git] / TRD / AliTRDv0.cxx
index 1dacc261a341c91e6b7b6994d3a7c88c621c0d5e..06ffa3dfc9e34b81a6c728fe52851e4f473460ad 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.18  2000/11/30 17:38:08  cblume
-Changes to get in line with new STEER and EVGEN
-
-Revision 1.17  2000/11/01 14:53:21  cblume
-Merge with TRD-develop
-
-Revision 1.14.2.3  2000/10/06 16:49:46  cblume
-Made Getters const
-
-Revision 1.14.2.2  2000/10/04 16:34:58  cblume
-Replace include files by forward declarations
-
-Revision 1.14.2.1  2000/09/18 13:48:18  cblume
-Adapt to new AliTRDhit
-
-Revision 1.16  2000/06/08 18:32:58  cblume
-Make code compliant to coding conventions
-
-Revision 1.15  2000/06/07 16:25:37  cblume
-Try to remove compiler warnings on Sun and HP
-
-Revision 1.14  2000/02/28 19:10:26  cblume
-Include the new TRD classes
-
-Revision 1.13.4.1  2000/02/28 18:01:53  cblume
-Change to new hit version and introduce geometry class
-
-Revision 1.13  1999/11/05 22:50:28  fca
-Do not use Atan, removed from ROOT too
-
-Revision 1.12  1999/11/02 16:35:56  fca
-New version of TRD introduced
-
-Revision 1.11  1999/11/01 20:41:51  fca
-Added protections against using the wrong version of FRAME
-
-Revision 1.10  1999/09/29 09:24:35  fca
-Introduction of the Copyright and cvs Log
-
-*/
+/* $Id$ */
 
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
@@ -71,18 +30,18 @@ Introduction of the Copyright and cvs Log
 
 #include <stdlib.h> 
 
+#include <TLorentzVector.h>
 #include <TMath.h>
 #include <TRandom.h>
 #include <TVector.h> 
-#include <TLorentzVector.h>
+#include <TVirtualMC.h>
 
-#include "AliRun.h"
-#include "AliMC.h"
 #include "AliConst.h"
-  
-#include "AliTRDv0.h"
-#include "AliTRDhit.h"
+#include "AliRun.h"
 #include "AliTRDgeometry.h"
+#include "AliTRDhit.h"
+#include "AliTRDv0.h"
+#include "AliMC.h"
 
 ClassImp(AliTRDv0)
   
@@ -182,7 +141,8 @@ void AliTRDv0::StepManager()
   // Use pad plane as sensitive volume
   TString  cIdSens = "L";
   TString  cIdCurrent;
-  Char_t   cIdChamber[2];
+  Char_t   cIdChamber[3];
+           cIdChamber[2] = 0;
 
   const Int_t kNplan = AliTRDgeometry::Nplan();
 
@@ -195,7 +155,7 @@ void AliTRDv0::StepManager()
     
     // Check on sensitive volume
     cIdCurrent = gMC->CurrentVolName();
-    if (cIdCurrent[1] == cIdSens) {
+    if (cIdSens == cIdCurrent[1]) {
 
       gMC->TrackPosition(p);
       for (Int_t i = 0; i < 3; i++) hits[i] = p[i];
@@ -217,7 +177,7 @@ void AliTRDv0::StepManager()
       pla = ((Int_t) idChamber % kNplan);
       det = fGeometry->GetDetector(pla,cha,sec);
 
-      AddHit(gAlice->CurrentTrack(),det,hits,0,kTRUE);       
+      AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(),det,hits,0,kTRUE);       
 
     }