/*
$Log$
+Revision 1.3 1999/09/29 09:24:07 fca
+Introduction of the Copyright and cvs Log
+
*/
//////////////////////////////////////////////////////////////////////////
// run and event number, the number of vertices, tracks and primary tracks
// in the event.
//
- new AliRun("gAlice"," The Alice Geant3-based MonteCarlo");
+ new AliRun("gAlice","The ALICE Off-line Simulation Framework");
// Start interactive geant
TRint *theApp = new TRint("aliroot", &argc, argv, 0, 0);
- // --- Initialisation of the GALICE package ---
+ // --- Start the event loop ---
theApp->Run();
- // --- Simulation of all events ---
return(0);
}
class TLorentzVector;
class AliMC;
class AliDecayer;
+class TArrayI;
R__EXTERN AliMC *gMC;
const char *konly="ONLY") = 0;
virtual void Gsposp(const char *name, Int_t nr, const char *mother,
Float_t x, Float_t y, Float_t z, Int_t irot,
- const char *konly, Float_t *upar, Int_t np) = 0;
+ const char *konly, Float_t *upar, Int_t np) = 0;
+
+ virtual void SetCerenkov(Int_t itmed, Int_t npckov, Float_t *ppckov,
+ Float_t *absco, Float_t *effic, Float_t *rindex) = 0;
+
// functions for drawing
virtual void DrawOneSpec(const char* name) = 0;
virtual Int_t NSecondaries() const=0;
virtual void GetSecondary(Int_t isec, Int_t& particleId,
TLorentzVector& position, TLorentzVector& momentum) =0;
- virtual AliMCProcess ProdProcess() const =0;
+ virtual AliMCProcess ProdProcess(Int_t isec) const =0;
+ virtual Int_t StepProcesses(TArrayI &proc) const = 0;
//
// other (then geometry/step/run management) methods
/*
$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.
// --- Add new created particles
if (gMC->NSecondaries() > 0) {
- pProc=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!
/*
$Log$
+Revision 1.42 2000/12/19 08:37:48 alibrary
+Using dlsym to retrieve address of commons
+
Revision 1.41 2000/12/18 11:33:50 alibrary
New call frequence histograms per module and volume
#include "TROOT.h"
#include "TDatabasePDG.h"
#include "TLorentzVector.h"
+#include "TArrayI.h"
#include "THIGZ.h"
#include "TGeant3.h"
}
//_____________________________________________________________________________
-AliMCProcess TGeant3::ProdProcess() const
+AliMCProcess TGeant3::ProdProcess(Int_t ) const
{
//
// Name of the process that has produced the secondary particles
// in the current step
//
- const Int_t kIpMec[13] = { 5,6,7,8,9,10,11,12,21,23,25,105,108 };
- const Int_t kIpProc[13] = { kPDecay, kPPair, kPCompton,
+ const AliMCProcess kIpProc[13] = { kPDecay, kPPair, kPCompton,
kPPhotoelectric, kPBrem, kPDeltaRay,
kPAnnihilation, kPHadronic,
kPMuonNuclear, kPPhotoFission,
if(fGcking->ngkine>0)
for (km = 0; km < fGctrak->nmec; ++km)
for (im = 0; im < 13; ++im)
- if (fGctrak->lmec[km] == kIpMec[im])
- return (AliMCProcess) kIpProc[im];
+ if (G3toVMC(fGctrak->lmec[km]) == kIpProc[im])
+ return kIpProc[im];
//
- return (AliMCProcess) kPNoProcess;
+ return kPNoProcess;
+}
+
+//_____________________________________________________________________________
+Int_t TGeant3::StepProcesses(TArrayI &proc) const
+{
+ //
+ // Return processes active in the current step
+ //
+ Int_t i;
+ Int_t nproc=Gctrak()->nmec;
+ //
+ proc.Set(nproc);
+ Int_t nvproc=0;
+ //
+ for (i=0; i<nproc; ++i)
+ if((proc[nvproc]=G3toVMC(Gctrak()->lmec[i]))!=kPNoProcess) nvproc++;
+ //
+ proc.Set(nvproc);
+ //
+ return nvproc;
+}
+
+//_____________________________________________________________________________
+AliMCProcess TGeant3::G3toVMC(Int_t iproc) const
+{
+ //
+ // Conversion between GEANT and AliMC processes
+ //
+
+ const AliMCProcess kPG2MC1[30] = {kPNoProcess, kPMultipleScattering, kPEnergyLoss, kPMagneticFieldL, kPDecay,
+ kPPair, kPCompton, kPPhotoelectric, kPBrem, kPDeltaRay,
+ kPAnnihilation, kPHadronic, kPNoProcess, kPEvaporation, kPNuclearFission,
+ kPNuclearAbsorption, kPPbarAnnihilation, kPNCapture, kPHElastic, kPHInhelastic,
+ kPMuonNuclear, kPTOFlimit, kPPhotoFission, kPNoProcess, kPRayleigh,
+ kPNoProcess, kPNoProcess, kPNoProcess, kPNull, kPStop};
+
+ const AliMCProcess kPG2MC2[9] = {kPLightAbsorption, kPLightScattering, kStepMax, kPNoProcess, kPCerenkov,
+ kPLightReflection, kPLightRefraction, kPSynchrotron, kPNoProcess};
+
+ AliMCProcess proc=kPNoProcess;
+ if(1<iproc && iproc<=30) proc= kPG2MC1[iproc-1];
+ else if(101<=iproc && iproc<=109) proc= kPG2MC2[iproc-100-1];
+ return proc;
}
+
//_____________________________________________________________________________
void TGeant3::GetSecondary(Int_t isec, Int_t& ipart,
TLorentzVector &x, TLorentzVector &p)
//_____________________________________________________________________________
void TGeant3::Gsckov(Int_t itmed, Int_t npckov, Float_t *ppckov,
- Float_t *absco, Float_t *effic, Float_t *rindex)
+ Float_t *absco, Float_t *effic, Float_t *rindex)
+{
+ //
+ // Stores the tables for UV photon tracking in medium ITMED
+ // Please note that it is the user's responsability to
+ // provide all the coefficients:
+ //
+ //
+ // ITMED Tracking medium number
+ // NPCKOV Number of bins of each table
+ // PPCKOV Value of photon momentum (in GeV)
+ // ABSCO Absorbtion coefficients
+ // dielectric: absorbtion length in cm
+ // metals : absorbtion fraction (0<=x<=1)
+ // EFFIC Detection efficiency for UV photons
+ // RINDEX Refraction index (if=0 metal)
+ //
+ gsckov(itmed,npckov,ppckov,absco,effic,rindex);
+}
+
+//_____________________________________________________________________________
+void TGeant3::SetCerenkov(Int_t itmed, Int_t npckov, Float_t *ppckov,
+ Float_t *absco, Float_t *effic, Float_t *rindex)
{
//
// Stores the tables for UV photon tracking in medium ITMED
Bool_t IsTrackAlive() const;
Int_t NSecondaries() const;
Int_t CurrentEvent() const;
- AliMCProcess ProdProcess() const;
+ AliMCProcess ProdProcess(Int_t isec) const;
+ Int_t StepProcesses(TArrayI &proc) const;
void GetSecondary(Int_t isec, Int_t& ipart, TLorentzVector &x,
TLorentzVector &p);
void StopTrack();
virtual void Gmate();
virtual void Gpart();
virtual void Gsckov(Int_t itmed, Int_t npckov, Float_t *ppckov,
- Float_t *absco, Float_t *effic, Float_t *rindex);
+ Float_t *absco, Float_t *effic, Float_t *rindex);
virtual void Gsdk(Int_t ipart, Float_t *bratio, Int_t *mode);
virtual void Gsmate(Int_t imat, const char *name, Float_t a, Float_t z,
Float_t dens, Float_t radl, Float_t absl);
Float_t stmin);
virtual void Gstpar(Int_t itmed, const char *param, Float_t parval);
- // functions from GKINE
+ virtual void SetCerenkov(Int_t itmed, Int_t npckov, Float_t *ppckov,
+ Float_t *absco, Float_t *effic, Float_t *rindex);
+ // functions from GKINE
virtual void Gfkine(Int_t itra, Float_t *vert, Float_t *pvert,
Int_t &ipart, Int_t &nvert);
virtual void Gfvert(Int_t nvtx, Float_t *v, Int_t &ntbeam, Int_t &nttarg, Float_t &tofg);
virtual void FinishGeometry();
virtual void BuildPhysics();
- protected:
+protected:
Int_t fNextVol; // Iterator for GeomIter
//--------------Declarations for ZEBRA---------------------
Int_t fPDGCode[kMaxParticles]; // Translation table of PDG codes
+ AliDecayer* fDecayer; // Pointer to decayer
+ AliMCProcess G3toVMC(Int_t iproc) const;
-protected:
- AliDecayer* fDecayer; // Pointer to decayer
private:
TGeant3(const TGeant3 &) {}
TGeant3 & operator=(const TGeant3&) {return *this;}
/*
$Log$
+Revision 1.26 2000/12/18 11:33:50 alibrary
+New call frequence histograms per module and volume
+
Revision 1.25 2000/11/30 07:12:54 alibrary
Introducing new Rndm and QA classes
Bool_t TGeant3::IsTrackDisappeared() const {return 0;}
Bool_t TGeant3::IsTrackStop() const {return 0;}
Int_t TGeant3::NSecondaries() const {return 0;}
-AliMCProcess TGeant3::ProdProcess() const {return kPNoProcess;}
+AliMCProcess TGeant3::ProdProcess(Int_t) const {return kPNoProcess;}
+AliMCProcess TGeant3::G3toVMC(Int_t) const {return kPNoProcess;}
+Int_t TGeant3::StepProcesses(TArrayI &) const {return 0;}
void TGeant3::GetSecondary(Int_t, Int_t&,
TLorentzVector&, TLorentzVector&){}
Float_t TGeant3::MaxStep() const {return 0;}
void TGeant3::Gspart(Int_t, const char*, Int_t, Float_t, Float_t, Float_t) {}
void TGeant3::Gstmed(Int_t, const char*, Int_t, Int_t,
Int_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t) {}
-void TGeant3::Gstpar(Int_t, const char*, Float_t) {}
void TGeant3::Gsckov(Int_t, Int_t, Float_t *, Float_t *, Float_t *, Float_t *) {}
+void TGeant3::Gstpar(Int_t, const char*, Float_t) {}
//=======================functions from GKINE
//=======================functions from GPHYS
//___________________________________________
void TGeant3::Gphysi() {}
+void TGeant3::SetCerenkov(Int_t, Int_t, Float_t *, Float_t *,
+ Float_t *, Float_t *) {}
//=======================functions from GTRAK