]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TGeant3/gucode.cxx
Introduction of the Copyright and cvs Log
[u/mrichter/AliRoot.git] / TGeant3 / gucode.cxx
index 2bdaf905b36d04c7cefe162e6d4943ffadc8bf8b..0e924e2162cbab6e5f58e7079f3af5c5277f5370 100644 (file)
@@ -1,3 +1,22 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/*
+$Log$
+*/
+
 #include "AliCallf77.h"
 #include "TGeant3.h"
 #include "AliRun.h"
@@ -467,6 +486,7 @@ void gustep()
   Float_t r;
   Int_t ipp, jk, id, nt;
   Float_t polar[3]={0,0,0};
+  Float_t mom[3];
   char chproc[11];
   
   // --- Standard GEANT debug routine 
@@ -491,7 +511,20 @@ void gustep()
       }
     }
   }
-
+  // Cherenkov photons here
+  if ( geant3->Gckin2()->ngphot ) {
+    for (jk = 0; jk < geant3->Gckin2()->ngphot; ++jk) {
+      mom[0]=geant3->Gckin2()->xphot[jk][3]*geant3->Gckin2()->xphot[jk][6];
+      mom[1]=geant3->Gckin2()->xphot[jk][4]*geant3->Gckin2()->xphot[jk][6];
+      mom[2]=geant3->Gckin2()->xphot[jk][5]*geant3->Gckin2()->xphot[jk][6];
+      gAlice->SetTrack(1, gAlice->CurrentTrack(), gMC->PDGFromId(50),
+                      mom,                             //momentum
+                      geant3->Gckin2()->xphot[jk],     //position
+                      &geant3->Gckin2()->xphot[jk][7], //polarisation
+                      geant3->Gckin2()->xphot[jk][10], //time of flight
+                      "Cherenkov", nt);
+      }
+  }
   // --- Particle leaving the setup ?
   if (!gMC->IsTrackOut()) 
     if ((id=gAlice->DetFromMate(geant3->Gctmed()->numed)) >= 0) gAlice->StepManager(id);