/*
$Log$
+Revision 1.13 2000/11/30 07:12:54 alibrary
+Introducing new Rndm and QA classes
+
+Revision 1.12 2000/11/06 11:35:46 morsch
+Call BuildGeometry() after Init() to be able to share common detector parameters.
+
+Revision 1.11 2000/10/04 16:30:22 fca
+Add include for exit()
+
Revision 1.10 2000/10/02 21:28:16 fca
Removal of useless dependecies via forward declarations
#include "AliCallf77.h"
#include "AliModule.h"
#include "AliMagF.h"
+#include "AliGenerator.h"
#ifndef WIN32
# define rxgtrak rxgtrak_
-# define rxstrak rxstrak_
-# define rxkeep rxkeep_
# define rxouth rxouth_
#else
# define rxgtrak RXGTRAK
-# define rxstrak RXSTRAK
-# define rxkeep RXKEEP
# define rxouth RXOUTH
#endif
// Initialise detector materials and geometry
detector->CreateMaterials();
detector->CreateGeometry();
- detector->BuildGeometry();
detector->Init();
+ detector->BuildGeometry();
}
//Terminate building of geometry
mtrack++;
}
-//_____________________________________________________________________________
-extern "C" void type_of_call
-#ifndef WIN32
-rxstrak (Int_t &keep, Int_t &parent, Int_t &ipart, Float_t *pmom,
- Float_t *vpos, Float_t &tof, const char* cmech, Int_t &ntr, const int cmlen)
-#else
-rxstrak (Int_t &keep, Int_t &parent, Int_t &ipart, Float_t *pmom,
- Float_t *vpos, Float_t &tof, const char* cmech, const int cmlen,
- Int_t &ntr)
-#endif
-{
- //
- // Fetches next track from the ROOT stack for transport. Called by GUKINE
- // and GUSTEP.
- //
- // Status of the track. If keep=0 the track is put
- // keep on the ROOT stack but it is not fetched for
- // transport.
- // parent Parent track. If parent=0 the track is a primary.
- // In GUSTEP the routine is normally called to store
- // secondaries generated by the current track whose
- // ROOT stack number is MTRACK (common SCKINE.
- // ipart Particle code in the GEANT conventions.
- // pmom[3] Particle momentum in GeV/c
- // vpos[3] Particle position
- // tof Particle time of flight in seconds
- //
- // cmech (CHARACTER*10) Particle origin. This field is user
- // defined and it is not used inside the GALICE code.
- // ntr Number assigned to the particle in the ROOT stack.
- //
- char mecha[11];
- Float_t polar[3]={0.,0.,0.};
- for(int i=0; i<10 && i<cmlen; i++) mecha[i]=cmech[i];
- mecha[10]=0;
- Int_t pdg=gMC->PDGFromId(ipart);
- gAlice->SetTrack(keep, parent-1, pdg, pmom, vpos, polar, tof, mecha, ntr);
- ntr++;
-}
-
-//_____________________________________________________________________________
-extern "C" void type_of_call rxkeep(const Int_t &n)
-{
- if( NULL==gAlice ) exit(1);
-
- if( n<=0 || n>gAlice->Particles()->GetEntries() )
- {
- printf(" Bad index n=%d must be 0<n<=%d\n",
- n,gAlice->Particles()->GetEntries());
- exit(1);
- }
-
- ((TParticle*)(gAlice->Particles()->UncheckedAt(n-1)))->SetBit(kKeepBit);
-}
-
//_____________________________________________________________________________
extern "C" void type_of_call rxouth ()
{
gAlice->FinishPrimary();
}
-
#ifndef WIN32
# define gudigi gudigi_
# define guhadr guhadr_
//
// ------------------------------------------------------------------
//
- Int_t ndet = gAlice->Modules()->GetLast();
- TObjArray &dets = *gAlice->Modules();
- AliModule *module;
- Int_t i;
-
- for(i=0; i<=ndet; i++)
- if((module = (AliModule*)dets[i]))
- module->PreTrack();
+ gAlice->PreTrack();
gtrack();
- for(i=0; i<=ndet; i++)
- if((module = (AliModule*)dets[i]))
- module->PostTrack();
+ gAlice->PostTrack();
}
//______________________________________________________________________
Int_t ipp, jk, id, nt;
Float_t polar[3]={0,0,0};
Float_t mom[3];
- const char *kChproc;
+ AliMCProcess pProc;
TGeant3* geant3 = (TGeant3*) gMC;
// --- Add new created particles
if (gMC->NSecondaries() > 0) {
- kChproc=gMC->ProdProcess();
+ pProc=gMC->ProdProcess(0);
for (jk = 0; jk < geant3->Gcking()->ngkine; ++jk) {
ipp = Int_t (geant3->Gcking()->gkin[jk][4]+0.5);
// --- Skip neutrinos!
if (ipp != 4) {
gAlice->SetTrack(1,gAlice->CurrentTrack(),gMC->PDGFromId(ipp), geant3->Gcking()->gkin[jk],
- geant3->Gckin3()->gpos[jk], polar,geant3->Gctrak()->tofg, kChproc, nt);
+ geant3->Gckin3()->gpos[jk], polar,geant3->Gctrak()->tofg, pProc, nt);
}
}
}
geant3->Gckin2()->xphot[jk], //position
&geant3->Gckin2()->xphot[jk][7], //polarisation
geant3->Gckin2()->xphot[jk][10], //time of flight
- "Cherenkov", nt);
+ kPCerenkov, nt);
}
}
// --- Particle leaving the setup ?