library: libVMC #include "TVirtualMC.h" |
TVirtualMC
class description - header file - source file - inheritance tree (.pdf)
This is an abstract class, constructors will not be documented.
Look at the header to check for available constructors.
private:
TVirtualMC& operator=(const TVirtualMC&)
public:
virtual ~TVirtualMC()
virtual void BuildPhysics()
static TClass* Class()
virtual Int_t CurrentEvent() const
virtual Int_t CurrentMaterial(Float_t& a, Float_t& z, Float_t& dens, Float_t& radl, Float_t& absl) const
virtual Int_t CurrentMedium() const
virtual Int_t CurrentVolID(Int_t& copyNo) const
virtual const char* CurrentVolName() const
virtual Int_t CurrentVolOffID(Int_t off, Int_t& copyNo) const
virtual const char* CurrentVolOffName(Int_t off) const
virtual const char* CurrentVolPath()
virtual void DefaultRange()
virtual Bool_t DefineIon(const char* name, Int_t Z, Int_t A, Int_t Q, Double_t excEnergy, Double_t mass = 0.)
virtual void DefineOpSurface(const char* name, EMCOpSurfaceModel model, EMCOpSurfaceType surfaceType, EMCOpSurfaceFinish surfaceFinish, Double_t sigmaAlpha)
virtual Bool_t DefineParticle(Int_t pdg, const char* name, TMCParticleType pType, Double_t mass, Double_t charge, Double_t lifetime)
virtual void DrawOneSpec(const char* name)
virtual Double_t Edep() const
virtual Double_t Etot() const
virtual void ForceDecayTime(Float_t)
virtual void Gckmat(Int_t imed, char* name)
virtual void Gdhead(Int_t, const char*, Double_t = 0)
virtual void Gdman(Double_t, Double_t, const char*)
virtual void Gdopt(const char*, const char*)
virtual void Gdraw(const char*, Double_t theta = 30, Double_t phi = 30, Double_t psi = 0, Double_t u0 = 10, Double_t v0 = 10, Double_t ul = 0.01, Double_t vl = 0.01)
virtual void Gdtom(Float_t* xd, Float_t* xm, Int_t iflag)
virtual void Gdtom(Double_t* xd, Double_t* xm, Int_t iflag)
virtual TVirtualMCDecayer* GetDecayer() const
virtual Bool_t GetMaterial(const TString& volumeName, TString& name, Int_t& imat, Double_t& a, Double_t& z, Double_t& density, Double_t& radl, Double_t& inter, TArrayD& par)
virtual Int_t GetMaxNStep() const
static TVirtualMC* GetMC()
virtual Bool_t GetMedium(const TString& volumeName, TString& name, Int_t& imed, Int_t& nmat, Int_t& isvol, Int_t& ifield, Double_t& fieldm, Double_t& tmaxfd, Double_t& stemax, Double_t& deemax, Double_t& epsil, Double_t& stmin, TArrayD& par)
virtual Int_t GetMedium() const
virtual TRandom* GetRandom() const
virtual void GetSecondary(Int_t isec, Int_t& particleId, TLorentzVector& position, TLorentzVector& momentum)
virtual Bool_t GetShape(const TString& volumePath, TString& shapeType, TArrayD& par)
virtual TVirtualMCStack* GetStack() const
virtual Bool_t GetTransformation(const TString& volumePath, TGeoHMatrix& matrix)
virtual void Gfmate(Int_t imat, char* name, Float_t& a, Float_t& z, Float_t& dens, Float_t& radl, Float_t& absl, Float_t* ubuf, Int_t& nbuf)
virtual void Gfmate(Int_t imat, char* name, Double_t& a, Double_t& z, Double_t& dens, Double_t& radl, Double_t& absl, Double_t* ubuf, Int_t& nbuf)
virtual void Gmtod(Float_t* xm, Float_t* xd, Int_t iflag)
virtual void Gmtod(Double_t* xm, Double_t* xd, Int_t iflag)
virtual void Gsatt(const char* name, const char* att, Int_t val)
virtual void Gsbool(const char* onlyVolName, const char* manyVolName)
virtual void Gsdvn(const char* name, const char* mother, Int_t ndiv, Int_t iaxis)
virtual void Gsdvn2(const char* name, const char* mother, Int_t ndiv, Int_t iaxis, Double_t c0i, Int_t numed)
virtual void Gsdvt(const char* name, const char* mother, Double_t step, Int_t iaxis, Int_t numed, Int_t ndvmx)
virtual void Gsdvt2(const char* name, const char* mother, Double_t step, Int_t iaxis, Double_t c0, Int_t numed, Int_t ndvmx)
virtual void Gsord(const char* name, Int_t iax)
virtual void Gspos(const char* name, Int_t nr, const char* mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char* konly = "ONLY")
virtual void Gsposp(const char* name, Int_t nr, const char* mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char* konly, Float_t* upar, Int_t np)
virtual void Gsposp(const char* name, Int_t nr, const char* mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char* konly, Double_t* upar, Int_t np)
virtual void Gstpar(Int_t itmed, const char* param, Double_t parval)
virtual Int_t Gsvolu(const char* name, const char* shape, Int_t nmed, Float_t* upar, Int_t np)
virtual Int_t Gsvolu(const char* name, const char* shape, Int_t nmed, Double_t* upar, Int_t np)
virtual Int_t IdFromPDG(Int_t pdg) const
virtual void Init()
virtual void InitLego()
virtual TClass* IsA() const
virtual Bool_t IsNewTrack() const
virtual Bool_t IsRootGeometrySupported() const
virtual Bool_t IsTrackAlive() const
virtual Bool_t IsTrackDisappeared() const
virtual Bool_t IsTrackEntering() const
virtual Bool_t IsTrackExiting() const
virtual Bool_t IsTrackInside() const
virtual Bool_t IsTrackOut() const
virtual Bool_t IsTrackStop() const
virtual void Material(Int_t& kmat, const char* name, Double_t a, Double_t z, Double_t dens, Double_t radl, Double_t absl, Float_t* buf, Int_t nwbuf)
virtual void Material(Int_t& kmat, const char* name, Double_t a, Double_t z, Double_t dens, Double_t radl, Double_t absl, Double_t* buf, Int_t nwbuf)
virtual void Matrix(Int_t& krot, Double_t thetaX, Double_t phiX, Double_t thetaY, Double_t phiY, Double_t thetaZ, Double_t phiZ)
virtual Double_t MaxStep() const
virtual void Medium(Int_t& kmed, const char* name, Int_t nmat, Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin, Float_t* ubuf, Int_t nbuf)
virtual void Medium(Int_t& kmed, const char* name, Int_t nmat, Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin, Double_t* ubuf, Int_t nbuf)
virtual void Mixture(Int_t& kmat, const char* name, Float_t* a, Float_t* z, Double_t dens, Int_t nlmat, Float_t* wmat)
virtual void Mixture(Int_t& kmat, const char* name, Double_t* a, Double_t* z, Double_t dens, Int_t nlmat, Double_t* wmat)
virtual Int_t NofVolDaughters(const char* volName) const
virtual Int_t NofVolumes() const
virtual Int_t NSecondaries() const
virtual Double_t ParticleCharge(Int_t pdg) const
virtual Double_t ParticleLifeTime(Int_t pdg) const
virtual Double_t ParticleMass(Int_t pdg) const
virtual TMCParticleType ParticleMCType(Int_t pdg) const
virtual TString ParticleName(Int_t pdg) const
virtual Int_t PDGFromId(Int_t id) const
virtual void ProcessEvent()
virtual Bool_t ProcessRun(Int_t nevent)
virtual TMCProcess ProdProcess(Int_t isec) const
virtual Bool_t SecondariesAreOrdered() const
virtual void SetBorderSurface(const char* name, const char* vol1Name, int vol1CopyNo, const char* vol2Name, int vol2CopyNo, const char* opSurfaceName)
virtual void SetCerenkov(Int_t itmed, Int_t npckov, Float_t* ppckov, Float_t* absco, Float_t* effic, Float_t* rindex)
virtual void SetCerenkov(Int_t itmed, Int_t npckov, Double_t* ppckov, Double_t* absco, Double_t* effic, Double_t* rindex)
virtual void SetClipBox(const char*, Double_t = -9999, Double_t = 0, Double_t = -9999, Double_t = 0, Double_t = -9999, Double_t = 0)
virtual Bool_t SetCut(const char* cutName, Double_t cutValue)
virtual void SetExternalDecayer(TVirtualMCDecayer* decayer)
virtual void SetMaterialProperty(Int_t itmed, const char* propertyName, Int_t np, Double_t* pp, Double_t* values)
virtual void SetMaterialProperty(Int_t itmed, const char* propertyName, Double_t value)
virtual void SetMaterialProperty(const char* surfaceName, const char* propertyName, Int_t np, Double_t* pp, Double_t* values)
virtual void SetMaxNStep(Int_t)
virtual void SetMaxStep(Double_t)
virtual Bool_t SetProcess(const char* flagName, Int_t flagValue)
virtual void SetRandom(TRandom* random)
virtual void SetRootGeometry()
virtual void SetSkinSurface(const char* name, const char* volName, const char* opSurfaceName)
virtual void SetStack(TVirtualMCStack* stack)
virtual void SetUserDecay(Int_t pdg)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual Int_t StepProcesses(TArrayI& proc) const
virtual void StopEvent()
virtual void StopRun()
virtual void StopTrack()
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
virtual Double_t TrackCharge() const
virtual Double_t TrackLength() const
virtual Double_t TrackMass() const
virtual void TrackMomentum(TLorentzVector& momentum) const
virtual void TrackMomentum(Double_t& px, Double_t& py, Double_t& pz, Double_t& etot) const
virtual Int_t TrackPid() const
virtual void TrackPosition(TLorentzVector& position) const
virtual void TrackPosition(Double_t& x, Double_t& y, Double_t& z) const
virtual Double_t TrackStep() const
virtual Double_t TrackTime() const
virtual Int_t VolDaughterCopyNo(const char* volName, Int_t i) const
virtual const char* VolDaughterName(const char* volName, Int_t i) const
virtual Int_t VolId(const Text_t* volName) const
virtual Int_t VolId2Mate(Int_t id) const
virtual const char* VolName(Int_t id) const
virtual void WriteEuclid(const char* filnam, const char* topvol, Int_t number, Int_t nlevel)
virtual Double_t Xsec(char*, Double_t, Int_t, Int_t)
private:
static TVirtualMC* fgMC Monte Carlo singleton instance
TVirtualMCStack* fStack ! Particles stack
TVirtualMCDecayer* fDecayer ! External decayer
TRandom* fRandom ! Random number generator
protected:
TVirtualMCApplication* fApplication ! User MC application
______________________________________________________________________________
Virtual MC provides a virtual interface to Monte Carlo.
It enables the user to build a virtual Monte Carlo application
independent of any actual underlying Monte Carlo implementation itself.
A user will have to implement a class derived from the abstract
Monte Carlo application class, and provide functions like
ConstructGeometry(), BeginEvent(), FinishEvent(), ... .
The concrete Monte Carlo (Geant3, Geant4) is selected at run time -
when processing a ROOT macro where the concrete Monte Carlo is instantiated.
______________________________________________________________________________
void Gckmat(Int_t imed, char* name)
Check the parameters of a tracking medium
void Material(Int_t& kmat, const char* name, Double_t a, Double_t z, Double_t dens, Double_t radl, Double_t absl, Float_t* buf, Int_t nwbuf)
Define a material
kmat number assigned to the material
name material name
a atomic mass in au
z atomic number
dens density in g/cm3
absl absorption length in cm;
if >=0 it is ignored and the program
calculates it, if <0. -absl is taken
radl radiation length in cm
if >=0 it is ignored and the program
calculates it, if <0. -radl is taken
buf pointer to an array of user words
nwbuf number of user words
void Mixture(Int_t& kmat, const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nlmat, Float_t *wmat)
Define mixture or compound
with a number kmat composed by the basic nlmat materials defined
by arrays a, z and wmat
If nlmat > 0 then wmat contains the proportion by
weights of each basic material in the mixture.
If nlmat < 0 then wmat contains the number of atoms
of a given kind into the molecule of the compound.
In this case, wmat in output is changed to relative
weights.
void Medium(Int_t& kmed, const char *name, Int_t nmat, Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin, Float_t* ubuf, Int_t nbuf)
Define a medium.
kmed tracking medium number assigned
name tracking medium name
nmat material number
isvol sensitive volume flag
ifield magnetic field:
- ifield = 0 if no magnetic field;
- ifield = -1 if user decision in guswim;
- ifield = 1 if tracking performed with g3rkuta;
- ifield = 2 if tracking performed with g3helix;
- ifield = 3 if tracking performed with g3helx3.
fieldm max. field value (kilogauss)
tmaxfd max. angle due to field (deg/step)
stemax max. step allowed
deemax max. fraction of energy lost in a step
epsil tracking precision (cm)
stmin min. step due to continuous processes (cm)
ubuf pointer to an array of user words
nbuf number of user words
void Medium(Int_t& kmed, const char *name, Int_t nmat, Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin, Double_t* ubuf, Int_t nbuf)
The same as previous but in double precision
void Matrix(Int_t& krot, Double_t thetaX, Double_t phiX, Double_t thetaY, Double_t phiY, Double_t thetaZ, Double_t phiZ)
Define a rotation matrix
krot rotation matrix number assigned
thetaX polar angle for axis X
phiX azimuthal angle for axis X
thetaY polar angle for axis Y
phiY azimuthal angle for axis Y
thetaZ polar angle for axis Z
phiZ azimuthal angle for axis Z
void Gstpar(Int_t itmed, const char *param, Double_t parval)
Change the value of cut or mechanism param
to a new value parval for tracking medium itmed.
In Geant3, the data structure JTMED contains the standard tracking
parameters (CUTS and flags to control the physics processes) which
are used by default for all tracking media.
It is possible to redefine individually with this funstion any of these
parameters for a given tracking medium.
itmed tracking medium number
param is a character string (variable name)
parval must be given as a floating point.
Int_t Gsvolu(const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t np)
Create a new volume
name Volume name
shape Volume type
nmed Tracking medium number
np Number of shape parameters
upar Vector containing shape parameters
void Gsdvn(const char *name, const char *mother, Int_t ndiv, Int_t iaxis)
Create a new volume by dividing an existing one.
It divides a previously defined volume
name Volume name
mother Mother volume name
ndiv Number of divisions
iaxis Axis value:
X,Y,Z of CAXIS will be translated to 1,2,3 for IAXIS.
void Gsdvn2(const char *name, const char *mother, Int_t ndiv, Int_t iaxis, Double_t c0i, Int_t numed)
Create a new volume by dividing an existing one.
Divide mother into ndiv divisions called name
along axis iaxis starting at coordinate value c0i.
The new volume created will be medium number numed.
void Gsdvt(const char *name, const char *mother, Double_t step, Int_t iaxis, Int_t numed, Int_t ndvmx)
Create a new volume by dividing an existing one
Divide mother into divisions called name along
axis iaxis in steps of step. If not exactly divisible
will make as many as possible and will center them
with respect to the mother. Divisions will have medium
number numed. If numed is 0, numed of mother is taken.
ndvmx is the expected maximum number of divisions
(If 0, no protection tests are performed in Geant3)
void Gsdvt2(const char *name, const char *mother, Double_t step, Int_t iaxis, Double_t c0, Int_t numed, Int_t ndvmx)
Create a new volume by dividing an existing one
Divides mother into divisions called name along
axis iaxis starting at coordinate value c0 with step
size step.
The new volume created will have medium number numed.
If numed is 0, numed of mother is taken.
ndvmx is the expected maximum number of divisions
(If 0, no protection tests are performed in Geant3)
void Gsord(const char *name, Int_t iax)
Flag volume name whose contents will have to be ordered
along axis iax, by setting the search flag to -iax
(Geant3 only)
void Gspos(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char *konly="ONLY")
Position a volume into an existing one.
It positions a previously defined volume in the mother.
name Volume name
nr Copy number of the volume
mother Mother volume name
x X coord. of the volume in mother ref. sys.
y Y coord. of the volume in mother ref. sys.
z Z coord. of the volume in mother ref. sys.
irot Rotation matrix number w.r.t. mother ref. sys.
konly ONLY/MANY flag
void Gsposp(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char *konly, Float_t *upar, Int_t np)
Place a copy of generic volume name with user number
nr inside mother, with its parameters upar(1..np)
void Gsbool(const char* onlyVolName, const char* manyVolName)
Helper function for resolving MANY.
Specify the ONLY volume that overlaps with the
specified MANY and has to be substracted.
(Geant4 only)
void SetCerenkov(Int_t itmed, Int_t npckov, Float_t *ppckov, Float_t *absco, Float_t *effic, Float_t *rindex)
Define the tables for UV photon tracking in medium itmed.
Please note that it is the user's responsibility to
provide all the coefficients:
itmed Tracking medium number
npckov Number of bins of each table
ppckov Value of photon momentum (in GeV)
absco Absorption coefficients
dielectric: absorption length in cm
metals : absorption fraction (0<=x<=1)
effic Detection efficiency for UV photons
rindex Refraction index (if=0 metal)
void DefineOpSurface(const char* name, EMCOpSurfaceModel model, EMCOpSurfaceType surfaceType, EMCOpSurfaceFinish surfaceFinish, Double_t sigmaAlpha)
Define the optical surface
name surface name
model selection of model (see #EMCOpSurfaceModel values)
surfaceType surface type (see #EMCOpSurfaceType values)
surfaceFinish surface quality (see #EMCOpSurfaceType values)
sigmaAlpha an unified model surface parameter
(Geant4 only)
void SetBorderSurface(const char* name, const char* vol1Name, int vol1CopyNo, const char* vol2Name, int vol2CopyNo, const char* opSurfaceName)
Define the optical surface border
name border surface name
vol1Name first volume name
vol1CopyNo first volume copy number
vol2Name second volume name
vol2CopyNo second volume copy number
opSurfaceName name of optical surface which this border belongs to
(Geant4 only)
void SetSkinSurface(const char* name, const char* volName, const char* opSurfaceName)
Define the optical skin surface
name skin surface name
volName volume name
opSurfaceName name of optical surface which this border belongs to
(Geant4 only)
Bool_t GetShape(const TString& volumePath, TString& shapeType, TArrayD& par)
Return the name of the shape (shapeType) and its parameters par
for the volume specified by the path volumePath .
Bool_t GetMedium(const TString& volumeName, TString& name, Int_t& imed, Int_t& nmat, Int_t& isvol, Int_t& ifield, Double_t& fieldm, Double_t& tmaxfd, Double_t& stemax, Double_t& deemax, Double_t& epsil, Double_t& stmin, TArrayD& par)
Return the medium parameters for the volume specified by the
volumeName.
void Gsatt(const char* name, const char* att, Int_t val)
Deprecated - Geant3
void WriteEuclid(const char* filnam, const char* topvol, Int_t number, Int_t nlevel)
Write out the geometry of the detector in EUCLID file format
filnam file name - will be with the extension .euc *
topvol volume name of the starting node
number copy number of topvol (relevant for gsposp)
nlevel number of levels in the tree structure
to be written out, starting from topvol
(Geant3 only)
Int_t VolId(const Text_t* volName)
Return the unique numeric identifier for volume name volName
const char* VolName(Int_t id)
Return the volume name for a given volume identifier id
Int_t NofVolDaughters(const char* volName)
Return number of daughters of the volume specified by volName
const char* VolDaughterName(const char* volName, Int_t i)
Return the name of i-th daughter of the volume specified by volName
Bool_t DefineParticle(Int_t pdg, const char* name, TMCParticleType pType, Double_t mass, Double_t charge, Double_t lifetime)
Set a user defined particle
Function is ignored if particle with specified pdg
already exists and error report is printed.
void StopTrack()
Stop the transport of the current particle and skip to the next
void StopEvent()
Stop simulation of the current event and skip to the next
void StopRun()
Stop simulation of the current event and set the abort run flag to true
void SetMaxStep(Double_t)
Set the maximum step allowed till the particle is in the current medium
void SetMaxNStep(Int_t)
Set the maximum number of steps till the particle is in the current medium
void SetUserDecay(Int_t pdg)
Force the decays of particles to be done with Pythia
and not with the Geant routines.
const char* CurrentVolOffName(Int_t off)
Return the current volume off upward in the geometrical tree
name and copy number'
if name=0 no name is returned
const char* CurrentVolPath()
Return the path in geometry tree for the current volume
void Gmtod(Float_t* xm, Float_t* xd, Int_t iflag)
Computes coordinates xd in daughter reference system
from known coordinates xm in mother reference system.
xm coordinates in mother reference system (input)
xd coordinates in daughter reference system (output)
iflag
- IFLAG = 1 convert coordinates
- IFLAG = 2 convert direction cosines
void Gdtom(Float_t* xd, Float_t* xm, Int_t iflag)
Computes coordinates xm in mother reference system
from known coordinates xd in daughter reference system.
xd coordinates in daughter reference system (input)
xm coordinates in mother reference system (output)
iflag
- IFLAG = 1 convert coordinates
- IFLAG = 2 convert direction cosines
Int_t GetMaxNStep()
Return the maximum number of steps allowed in the current medium
Double_t TrackTime()
Return the current time of flight of the track being transported
Double_t Etot()
Return the total energy of the current track
Bool_t IsTrackDisappeared()
Return true if the current particle has disappeared
either because it decayed or because it underwent
an inelastic collision
Int_t NSecondaries()
Return the number of secondary particles generated in the current step
TMCProcess ProdProcess(Int_t isec)
Return the VMC code of the process that has produced the secondary
particles in the current step
void Gdopt(const char*,const char*)
Set/modify the drawing options.
Deprecated - G3 only
void Init()
Initialize MC
void InitLego()
Set switches for lego transport
Last update: root/mc:$Name: $:$Id: TVirtualMC.cxx,v 1.7 2006/05/14 07:38:51 brun Exp $
Copyright (c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.