+/**************************************************************************
+ * 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$
+Revision 1.9 1999/09/29 09:24:31 fca
+Introduction of the Copyright and cvs Log
+
+*/
+
#include "AliCallf77.h"
#include "TGeant3.h"
#include "AliRun.h"
//
- Float_t x[3];
+ TLorentzVector x;
Float_t r;
Int_t ipp, jk, id, nt;
Float_t polar[3]={0,0,0};
- char chproc[11];
+ Float_t mom[3];
+ const char *chproc;
// --- Standard GEANT debug routine
TGeant3* geant3 = (TGeant3*) gMC;
}
// --- Add new created particles
if (gMC->NSecondaries() > 0) {
- gMC->ProdProcess(chproc);
+ chproc=gMC->ProdProcess();
for (jk = 0; jk < geant3->Gcking()->ngkine; ++jk) {
ipp = Int_t (geant3->Gcking()->gkin[jk][4]+0.5);
// --- Skip neutrinos!
}
}
}
-
+ // 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->TrackOut())
+ if (!gMC->IsTrackOut())
if ((id=gAlice->DetFromMate(geant3->Gctmed()->numed)) >= 0) gAlice->StepManager(id);
}