]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliLego.cxx
create galice.root, headers and loaders if they don't exist (in case of raw data...
[u/mrichter/AliRoot.git] / STEER / AliLego.cxx
index 34ad63402ee7364cdf9d0ae23e97273b7c7b3f15..81e9ccd70c858c39aec154dcf94d68d6ebd76d4a 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.30  2002/10/29 14:26:49  hristov
-Code clean-up (F.Carminati)
-
-Revision 1.29  2002/10/14 14:57:32  hristov
-Merging the VirtualMC branch to the main development branch (HEAD)
-
-Revision 1.28.6.2  2002/07/24 10:08:13  alibrary
-Updating VirtualMC
-
-Revision 1.28.6.1  2002/06/10 14:43:06  hristov
-Merged with v3-08-02
-
-Revision 1.28  2001/10/21 18:38:44  hristov
-Several pointers were set to zero in the default constructors to avoid memory management problems
-
-Revision 1.27  2001/07/20 09:32:18  morsch
-Protection against uncomplete backward stepping in dumping added.
-
-Revision 1.26  2001/05/30 12:18:13  morsch
-Fastidious printf commented.
-
-Revision 1.25  2001/05/23 11:59:46  morsch
-Use RemoveAt method instead of delete to remove objects from TClonesArray.
-
-Revision 1.24  2001/05/21 08:39:13  morsch
-Use fStepBack = 1 only in debug mode.
-
-Revision 1.23  2001/05/20 10:10:39  morsch
-- Debug output at the beginning of new event and end of run.
-- Filter out boundary loops.
-
-Revision 1.22  2001/05/11 13:22:40  morsch
-If run with debug option (from gAlice) geantinos are sent back and volume sequence forward/backward is compared.
-Can be very verbous in some cases.
-
-Revision 1.21  2000/12/15 10:33:59  morsch
-Invert coordinates to make meaningful zylindrical plots.
-
-Revision 1.20  2000/11/30 07:12:48  alibrary
-Introducing new Rndm and QA classes
-
-Revision 1.19  2000/10/26 14:13:05  morsch
-- Change from coordinates theta, phi to general coordinates Coor1 and Coor2.
-- Lego generator instance can be passed in constructor.
-
-Revision 1.18  2000/10/02 21:28:14  fca
-Removal of useless dependecies via forward declarations
-
-Revision 1.17  2000/07/12 08:56:25  fca
-Coding convention correction and warning removal
-
-Revision 1.16  2000/05/26 08:35:03  fca
-Move the check on z after z has been retrieved
-
-Revision 1.15  2000/05/16 13:10:40  fca
-New method IsNewTrack and fix for a problem in Father-Daughter relations
-
-Revision 1.14  2000/04/27 10:38:21  fca
-Correct termination of Lego Run and introduce Lego getter in AliRun
-
-Revision 1.13  2000/04/26 10:17:31  fca
-Changes in Lego for G4 compatibility
-
-Revision 1.12  2000/04/07 11:12:33  fca
-G4 compatibility changes
-
-Revision 1.11  2000/03/22 13:42:26  fca
-SetGenerator does not replace an existing generator, ResetGenerator does
-
-Revision 1.10  2000/02/23 16:25:22  fca
-AliVMC and AliGeant3 classes introduced
-ReadEuclid moved from AliRun to AliModule
-
-Revision 1.9  1999/12/03 10:54:01  fca
-Fix lego summary
-
-Revision 1.8  1999/10/01 09:54:33  fca
-Correct logics for Lego StepManager
-
-Revision 1.7  1999/09/29 09:24:29  fca
-Introduction of the Copyright and cvs Log
-
-*/
+/* $Id$ */
 
 //////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////
@@ -133,11 +49,12 @@ Introduction of the Copyright and cvs Log
 #include "TH2.h"
 #include "TMath.h"
 #include "TString.h"
+#include "TVirtualMC.h"
 
-#include "AliConst.h"
 #include "AliDebugVolume.h"
 #include "AliLego.h"
 #include "AliLegoGenerator.h"
+#include "AliMC.h"
 #include "AliRun.h"
 
 ClassImp(AliLego)
@@ -304,7 +221,7 @@ void AliLego::BeginEvent()
     fStepsForward    = 0;
     fStepsBackward   = 0;                
     fErrorCondition  = 0;
-    if (gAlice->CurrentTrack() == 0) fStepBack = 0;
+    if (gAlice->GetMCApp()->GetCurrentTrackNumber() == 0) fStepBack = 0;
   }
 }
 
@@ -341,7 +258,7 @@ void AliLego::FinishRun()
 }
 
 //_______________________________________________________________________
-void AliLego::Copy(AliLego&) const
+void AliLego::Copy(TObject&) const
 {
   //
   // Copy *this onto lego -- not implemented
@@ -433,7 +350,7 @@ void AliLego::StepManager()
           orig[1] =  vect[1];     
           orig[2] =  vect[2];
           
-          gAlice->SetTrack(1, gAlice->CurrentTrack(), 
+          gAlice->GetMCApp()->PushTrack(1, gAlice->GetMCApp()->GetCurrentTrackNumber(), 
                            0, pmom, orig, polar, 0., kPNoProcess, ntr);
         } // debug