Logo ROOT  
Reference Guide
TVirtualMC Class Referenceabstract

Abstract Monte Carlo interface.

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.

Definition at line 42 of file TVirtualMC.h.

Public Member Functions

 TVirtualMC ()
 Default constructor. More...
 
 TVirtualMC (const char *name, const char *title, Bool_t isRootGeometrySupported=kFALSE)
 Standard constructor. More...
 
virtual ~TVirtualMC ()
 Destructor. More...
 
virtual void BuildPhysics ()=0
 Initialize MC physics. More...
 
virtual Bool_t CurrentBoundaryNormal (Double_t &x, Double_t &y, Double_t &z) const =0
 If track is on a geometry boundary, fill the normal vector of the crossing volume surface and return true, return false otherwise. More...
 
virtual Int_t CurrentEvent () const =0
 Return the number of the current event. More...
 
virtual Int_t CurrentMaterial (Float_t &a, Float_t &z, Float_t &dens, Float_t &radl, Float_t &absl) const =0
 Return the parameters of the current material during transport. More...
 
virtual Int_t CurrentMedium () const =0
 
virtual Int_t CurrentVolID (Int_t &copyNo) const =0
 Return the current volume ID and copy number. More...
 
virtual const char * CurrentVolName () const =0
 Return the current volume name. More...
 
virtual Int_t CurrentVolOffID (Int_t off, Int_t &copyNo) const =0
 Return the current volume off upward in the geometrical tree ID and copy number. More...
 
virtual const char * CurrentVolOffName (Int_t off) const =0
 Return the current volume off upward in the geometrical tree name and copy number' if name=0 no name is returned. More...
 
virtual const char * CurrentVolPath ()=0
 Return the path in geometry tree for the current volume. More...
 
virtual Bool_t DefineIon (const char *name, Int_t Z, Int_t A, Int_t Q, Double_t excEnergy, Double_t mass=0.)=0
 Set a user defined ion. More...
 
virtual void DefineOpSurface (const char *name, EMCOpSurfaceModel model, EMCOpSurfaceType surfaceType, EMCOpSurfaceFinish surfaceFinish, Double_t sigmaAlpha)=0
 Define the optical surface. More...
 
virtual Bool_t DefineParticle (Int_t pdg, const char *name, TMCParticleType mcType, Double_t mass, Double_t charge, Double_t lifetime)=0
 Set a user defined particle Function is ignored if particle with specified pdg already exists and error report is printed. More...
 
virtual Bool_t DefineParticle (Int_t pdg, const char *name, TMCParticleType mcType, Double_t mass, Double_t charge, Double_t lifetime, const TString &pType, Double_t width, Int_t iSpin, Int_t iParity, Int_t iConjugation, Int_t iIsospin, Int_t iIsospinZ, Int_t gParity, Int_t lepton, Int_t baryon, Bool_t stable, Bool_t shortlived=kFALSE, const TString &subType="", Int_t antiEncoding=0, Double_t magMoment=0.0, Double_t excitation=0.0)=0
 Set a user defined particle Function is ignored if particle with specified pdg already exists and error report is printed. More...
 
virtual Double_t Edep () const =0
 Return the energy lost in the current step. More...
 
virtual Double_t Etot () const =0
 Return the total energy of the current track. More...
 
virtual void ForceDecayTime (Float_t)=0
 Force the decay time of the current particle. More...
 
virtual void Gdtom (Double_t *xd, Double_t *xm, Int_t iflag)=0
 The same as previous but in double precision. More...
 
virtual void Gdtom (Float_t *xd, Float_t *xm, Int_t iflag)=0
 Computes coordinates xm in mother reference system from known coordinates xd in daughter reference system. More...
 
TVirtualMCDecayerGetDecayer () const
 Return the external decayer. More...
 
Int_t GetId () const
 Return the VMC's ID. More...
 
TVirtualMagFieldGetMagField () const
 Return the magnetic field. More...
 
TMCManagerStackGetManagerStack () const
 Return the particle stack managed by the TMCManager (if any) More...
 
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)=0
 Return the material parameters for the volume specified by the volumeName. More...
 
virtual Bool_t GetMaterial (Int_t imat, TString &name, Double_t &a, Double_t &z, Double_t &density, Double_t &radl, Double_t &inter, TArrayD &par)=0
 Return the material parameters for the material specified by the material Id. More...
 
virtual Int_t GetMaxNStep () const =0
 Return the maximum number of steps allowed in the current medium. More...
 
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)=0
 Return the medium parameters for the volume specified by the volumeName. More...
 
TRandomGetRandom () const
 Return the random number generator. More...
 
virtual void GetSecondary (Int_t isec, Int_t &particleId, TLorentzVector &position, TLorentzVector &momentum)=0
 Return the parameters of the secondary track number isec produced in the current step. More...
 
virtual TVirtualMCSensitiveDetectorGetSensitiveDetector (const TString &volName) const
 Get a sensitive detector of a volume. More...
 
virtual Bool_t GetShape (const TString &volumePath, TString &shapeType, TArrayD &par)=0
 Return the name of the shape (shapeType) and its parameters par for the volume specified by the path volumePath . More...
 
TVirtualMCStackGetStack () const
 Return the particle stack. More...
 
virtual Bool_t GetTransformation (const TString &volumePath, TGeoHMatrix &matrix)=0
 Return the transformation matrix between the volume specified by the path volumePath and the top or master volume. More...
 
virtual void Gmtod (Double_t *xm, Double_t *xd, Int_t iflag)=0
 The same as previous but in double precision. More...
 
virtual void Gmtod (Float_t *xm, Float_t *xd, Int_t iflag)=0
 Computes coordinates xd in daughter reference system from known coordinates xm in mother reference system. More...
 
virtual void Gsbool (const char *onlyVolName, const char *manyVolName)=0
 Helper function for resolving MANY. More...
 
virtual void Gsdvn (const char *name, const char *mother, Int_t ndiv, Int_t iaxis)=0
 Create a new volume by dividing an existing one. More...
 
virtual void Gsdvn2 (const char *name, const char *mother, Int_t ndiv, Int_t iaxis, Double_t c0i, Int_t numed)=0
 Create a new volume by dividing an existing one. More...
 
virtual void Gsdvt (const char *name, const char *mother, Double_t step, Int_t iaxis, Int_t numed, Int_t ndvmx)=0
 Create a new volume by dividing an existing one Divide mother into divisions called name along axis iaxis in steps of step. More...
 
virtual void Gsdvt2 (const char *name, const char *mother, Double_t step, Int_t iaxis, Double_t c0, Int_t numed, Int_t ndvmx)=0
 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. More...
 
virtual void Gsord (const char *name, Int_t iax)=0
 Flag volume name whose contents will have to be ordered along axis iax, by setting the search flag to -iax (Geant3 only) More...
 
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")=0
 Position a volume into an existing one. More...
 
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)=0
 The same as previous but in double precision. More...
 
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)=0
 Place a copy of generic volume name with user number nr inside mother, with its parameters upar(1..np) More...
 
virtual void Gstpar (Int_t itmed, const char *param, Double_t parval)=0
 Change the value of cut or mechanism param to a new value parval for tracking medium itmed. More...
 
virtual Int_t Gsvolu (const char *name, const char *shape, Int_t nmed, Double_t *upar, Int_t np)=0
 The same as previous but in double precision. More...
 
virtual Int_t Gsvolu (const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t np)=0
 Create a new volume. More...
 
virtual Int_t IdFromPDG (Int_t pdg) const =0
 Return MC specific code from a PDG and pseudo ENDF code (pdg) More...
 
virtual void Init ()=0
 Initialize MC. More...
 
virtual void InitLego ()=0
 Set switches for lego transport. More...
 
virtual Bool_t IsCollectTracks () const =0
 Return the info if collecting tracks is activated. More...
 
virtual Bool_t IsMT () const
 Return the info if multi-threading is supported/activated. More...
 
virtual Bool_t IsNewTrack () const =0
 Return true when the track performs the first step. More...
 
virtual Bool_t IsRootGeometrySupported () const =0
 Info about supporting geometry defined via Root. More...
 
virtual Bool_t IsTrackAlive () const =0
 Return true if the current particle is alive and will continue to be transported. More...
 
virtual Bool_t IsTrackDisappeared () const =0
 Return true if the current particle has disappeared either because it decayed or because it underwent an inelastic collision. More...
 
virtual Bool_t IsTrackEntering () const =0
 Return true if this is the first step of the track in the current volume. More...
 
virtual Bool_t IsTrackExiting () const =0
 Return true if this is the last step of the track in the current volume. More...
 
virtual Bool_t IsTrackInside () const =0
 Return true if the track is not at the boundary of the current volume. More...
 
virtual Bool_t IsTrackOut () const =0
 Return true if the track is out of the setup. More...
 
virtual Bool_t IsTrackStop () const =0
 Return true if the track energy has fallen below the threshold. More...
 
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)=0
 The same as previous but in double precision. More...
 
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)=0
 Define a material. More...
 
virtual void Matrix (Int_t &krot, Double_t thetaX, Double_t phiX, Double_t thetaY, Double_t phiY, Double_t thetaZ, Double_t phiZ)=0
 Define a rotation matrix. More...
 
virtual Double_t MaxStep () const =0
 Return the maximum step length in the current medium. More...
 
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)=0
 The same as previous but in double precision. More...
 
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)=0
 Define a medium. More...
 
virtual Int_t MediumId (const char *mediumName) const =0
 Return the unique numeric identifier for medium name mediumName. More...
 
virtual void Mixture (Int_t &kmat, const char *name, Double_t *a, Double_t *z, Double_t dens, Int_t nlmat, Double_t *wmat)=0
 The same as previous but in double precision. More...
 
virtual void Mixture (Int_t &kmat, const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nlmat, Float_t *wmat)=0
 Define a mixture or a compound with a number kmat composed by the basic nlmat materials defined by arrays a, z and wmat. More...
 
virtual Double_t NIELEdep () const
 Return the non-ionising energy lost (NIEL) in the current step. More...
 
virtual Int_t NofVolDaughters (const char *volName) const =0
 Return number of daughters of the volume specified by volName. More...
 
virtual Int_t NofVolumes () const =0
 Return total number of volumes in the geometry. More...
 
virtual Int_t NSecondaries () const =0
 Return the number of secondary particles generated in the current step. More...
 
virtual Double_t ParticleCharge (Int_t pdg) const =0
 Return charge (in e units) of the particle specified by pdg. More...
 
virtual Double_t ParticleLifeTime (Int_t pdg) const =0
 Return life time of the particle specified by pdg. More...
 
virtual Double_t ParticleMass (Int_t pdg) const =0
 Return mass of the particle specified by pdg. More...
 
virtual TMCParticleType ParticleMCType (Int_t pdg) const =0
 Return VMC type of the particle specified by pdg. More...
 
virtual TString ParticleName (Int_t pdg) const =0
 Return name of the particle specified by pdg. More...
 
virtual Int_t PDGFromId (Int_t id) const =0
 Return PDG code and pseudo ENDF code from MC specific code (id) More...
 
virtual void ProcessEvent ()
 Process one event (backward-compatibility) More...
 
virtual void ProcessEvent (Int_t eventId)
 Process one event. More...
 
virtual Bool_t ProcessRun (Int_t nevent)=0
 Process one run and return true if run has finished successfully, return false in other cases (run aborted by user) More...
 
virtual TMCProcess ProdProcess (Int_t isec) const =0
 Return the VMC code of the process that has produced the secondary particles in the current step. More...
 
virtual Bool_t SecondariesAreOrdered () const =0
 Return the information about the transport order needed by the stack. More...
 
virtual void SetBorderSurface (const char *name, const char *vol1Name, int vol1CopyNo, const char *vol2Name, int vol2CopyNo, const char *opSurfaceName)=0
 Define the optical surface border. More...
 
virtual void SetCerenkov (Int_t itmed, Int_t npckov, Double_t *ppckov, Double_t *absco, Double_t *effic, Double_t *rindex)=0
 The same as previous but in double precision. More...
 
virtual void SetCerenkov (Int_t itmed, Int_t npckov, Float_t *ppckov, Float_t *absco, Float_t *effic, Float_t *rindex)=0
 Define the tables for UV photon tracking in medium itmed. More...
 
virtual void SetCollectTracks (Bool_t collectTracks)=0
 (In)Activate collecting TGeo tracks More...
 
virtual Bool_t SetCut (const char *cutName, Double_t cutValue)=0
 Set transport cuts for particles. More...
 
virtual Bool_t SetDecayMode (Int_t pdg, Float_t bratio[6], Int_t mode[6][3])=0
 Set a user phase space decay for a particle. More...
 
virtual void SetExclusiveSDScoring (Bool_t exclusiveSDScoring)
 The scoring option: if true, scoring is performed only via user defined sensitive detectors and MCApplication::Stepping is not called. More...
 
virtual void SetExternalDecayer (TVirtualMCDecayer *decayer)
 Set the external decayer. More...
 
virtual void SetMagField (TVirtualMagField *field)
 Set the magnetic field. More...
 
virtual void SetMaterialProperty (const char *surfaceName, const char *propertyName, Int_t np, Double_t *pp, Double_t *values)=0
 Define optical surface property via a table of values. More...
 
virtual void SetMaterialProperty (Int_t itmed, const char *propertyName, Double_t value)=0
 Define material property via a value. More...
 
virtual void SetMaterialProperty (Int_t itmed, const char *propertyName, Int_t np, Double_t *pp, Double_t *values)=0
 Define material property via a table of values. More...
 
virtual void SetMaxNStep (Int_t)=0
 Set the maximum number of steps till the particle is in the current medium. More...
 
virtual void SetMaxStep (Double_t)=0
 Set the maximum step allowed till the particle is in the current medium. More...
 
virtual Bool_t SetProcess (const char *flagName, Int_t flagValue)=0
 Set process control. More...
 
virtual void SetRandom (TRandom *random)
 Set the random number generator. More...
 
virtual void SetRootGeometry ()=0
 Set geometry from Root (built via TGeo) More...
 
virtual void SetSensitiveDetector (const TString &volName, TVirtualMCSensitiveDetector *sd)
 Set a sensitive detector to a volume. More...
 
virtual void SetSkinSurface (const char *name, const char *volName, const char *opSurfaceName)=0
 Define the optical skin surface. More...
 
virtual void SetStack (TVirtualMCStack *stack)
 Set the particle stack. More...
 
virtual void SetUserDecay (Int_t pdg)=0
 Force the decays of particles to be done with Pythia and not with the Geant routines. More...
 
virtual void SetUserParameters (Bool_t isUserParameters)=0
 Activate the parameters defined in tracking media (DEEMAX, STMIN, STEMAX), which are, be default, ignored. More...
 
virtual Int_t StepNumber () const
 Return the current step number. More...
 
virtual Int_t StepProcesses (TArrayI &proc) const =0
 Return the array of the VMC code of the processes active in the current step. More...
 
virtual void StopEvent ()=0
 Stop simulation of the current event and skip to the next. More...
 
virtual void StopRun ()=0
 Stop simulation of the current event and set the abort run flag to true. More...
 
virtual void StopTrack ()=0
 Stop the transport of the current particle and skip to the next. More...
 
virtual void TerminateRun ()
 Additional cleanup after a run can be done here (optional) More...
 
virtual Double_t TrackCharge () const =0
 Return the charge of the track currently transported. More...
 
virtual Double_t TrackLength () const =0
 Return the length of the current track from its origin (in cm) More...
 
virtual Double_t TrackMass () const =0
 Return the mass of the track currently transported. More...
 
virtual void TrackMomentum (Double_t &px, Double_t &py, Double_t &pz, Double_t &etot) const =0
 Return the direction and the momentum (GeV/c) of the track currently being transported (as double) More...
 
virtual void TrackMomentum (Float_t &px, Float_t &py, Float_t &pz, Float_t &etot) const =0
 Return the direction and the momentum (GeV/c) of the track currently being transported (as float) More...
 
virtual void TrackMomentum (TLorentzVector &momentum) const =0
 Return the direction and the momentum (GeV/c) of the track currently being transported. More...
 
virtual Int_t TrackPid () const =0
 Return the PDG of the particle transported. More...
 
virtual void TrackPolarization (Double_t &polX, Double_t &polY, Double_t &polZ) const
 Get the current polarization. More...
 
virtual void TrackPolarization (TVector3 &pol) const
 Get the current polarization. More...
 
virtual void TrackPosition (Double_t &x, Double_t &y, Double_t &z) const =0
 Only return spatial coordinates (as double) More...
 
virtual void TrackPosition (Float_t &x, Float_t &y, Float_t &z) const =0
 Only return spatial coordinates (as float) More...
 
virtual void TrackPosition (TLorentzVector &position) const =0
 Return the current position in the master reference frame of the track being transported. More...
 
virtual Double_t TrackStep () const =0
 Return the length in centimeters of the current step (in cm) More...
 
virtual Double_t TrackTime () const =0
 Return the current time of flight of the track being transported. More...
 
virtual Double_t TrackWeight () const
 Get the current weight. More...
 
virtual Int_t VolDaughterCopyNo (const char *volName, Int_t i) const =0
 Return the copyNo of i-th daughter of the volume specified by volName. More...
 
virtual const char * VolDaughterName (const char *volName, Int_t i) const =0
 Return the name of i-th daughter of the volume specified by volName. More...
 
virtual Int_t VolId (const char *volName) const =0
 Return the unique numeric identifier for volume name volName. More...
 
virtual Int_t VolId2Mate (Int_t id) const =0
 Return material number for a given volume id. More...
 
virtual const char * VolName (Int_t id) const =0
 Return the volume name for a given volume identifier id. More...
 
virtual void WriteEuclid (const char *filnam, const char *topvol, Int_t number, Int_t nlevel)=0
 Write out the geometry of the detector in EUCLID file format. More...
 
virtual Double_t Xsec (char *, Double_t, Int_t, Int_t)=0
 Calculate X-sections (Geant3 only) Deprecated. More...
 
- Public Member Functions inherited from TNamed
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TNamed &named)
 TNamed copy ctor. More...
 
 TNamed (const TString &name, const TString &title)
 
virtual ~TNamed ()
 TNamed destructor. More...
 
virtual void Clear (Option_t *option="")
 Set name and title to empty strings (""). More...
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare two TNamed objects. More...
 
virtual void Copy (TObject &named) const
 Copy this to obj. More...
 
virtual void FillBuffer (char *&buffer)
 Encode TNamed into output buffer. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
virtual Bool_t IsSortable () const
 
virtual void ls (Option_t *option="") const
 List TNamed name and title. More...
 
TNamedoperator= (const TNamed &rhs)
 TNamed assignment operator. More...
 
virtual void Print (Option_t *option="") const
 Print TNamed name and title. More...
 
virtual void SetName (const char *name)
 Set the name of the TNamed. More...
 
virtual void SetNameTitle (const char *name, const char *title)
 Set all the TNamed parameters (name and title). More...
 
virtual void SetTitle (const char *title="")
 Set the title of the TNamed. More...
 
virtual Int_t Sizeof () const
 Return size of the TNamed part of the TObject. More...
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor. More...
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action. More...
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method. More...
 
virtual void Copy (TObject &object) const
 Copy this to obj. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object. More...
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad). More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py). More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e. More...
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout. More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list. More...
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out". More...
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 

Static Public Member Functions

static TVirtualMCGetMC ()
 Static access method. More...
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 

Protected Attributes

TVirtualMCApplicationfApplication
 User MC application. More...
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 

Private Member Functions

 TVirtualMC (const TVirtualMC &mc)
 
virtual void InterruptTrack ()
 That triggers stopping the transport of the current track without dispatching to common routines like TVirtualMCApplication::PostTrack() etc. More...
 
TVirtualMCoperator= (const TVirtualMC &)
 
virtual void ProcessEvent (Int_t eventId, Bool_t isInterruptible)
 An interruptible event can be paused and resumed at any time. More...
 
void SetId (UInt_t id)
 Set the VMC id. More...
 
void SetManagerStack (TMCManagerStack *stack)
 Set container holding additional information for transported TParticles. More...
 

Private Attributes

TVirtualMCDecayerfDecayer
 External decayer. More...
 
Int_t fId
 Unique identification of this VMC. More...
 
TVirtualMagFieldfMagField
 Magnetic field. More...
 
TMCManagerStackfManagerStack
 Stack handled by the TMCManager. More...
 
TRandomfRandom
 Random number generator. More...
 
TVirtualMCStackfStack
 Particles stack. More...
 

Static Private Attributes

static TMCThreadLocal TVirtualMCfgMC = nullptr
 Static TVirtualMC pointer. More...
 

Friends

class TMCManager
 

Additional Inherited Members

- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = BIT(0) , kOverwrite = BIT(1) , kWriteDelete = BIT(2) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = BIT(3) }
 
enum  EStatusBits {
  kCanDelete = BIT(0) , kMustCleanup = BIT(3) , kIsReferenced = BIT(4) , kHasUUID = BIT(5) ,
  kCannotPick = BIT(6) , kNoContextMenu = BIT(8) , kInvalidObject = BIT(13)
}
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 
void MakeZombie ()
 

#include <TVirtualMC.h>

Inheritance diagram for TVirtualMC:
[legend]

Constructor & Destructor Documentation

◆ TVirtualMC() [1/3]

TVirtualMC::TVirtualMC ( const char *  name,
const char *  title,
Bool_t  isRootGeometrySupported = kFALSE 
)

Standard constructor.

isRootGeometrySupported = True if implementation of TVirtualMC supports geometry defined with TGeo

Definition at line 38 of file TVirtualMC.cxx.

◆ TVirtualMC() [2/3]

TVirtualMC::TVirtualMC ( )

Default constructor.

Definition at line 58 of file TVirtualMC.cxx.

◆ ~TVirtualMC()

TVirtualMC::~TVirtualMC ( )
virtual

Destructor.

Definition at line 69 of file TVirtualMC.cxx.

◆ TVirtualMC() [3/3]

TVirtualMC::TVirtualMC ( const TVirtualMC mc)
private

Member Function Documentation

◆ BuildPhysics()

virtual void TVirtualMC::BuildPhysics ( )
pure virtual

Initialize MC physics.

◆ CurrentBoundaryNormal()

virtual Bool_t TVirtualMC::CurrentBoundaryNormal ( Double_t x,
Double_t y,
Double_t z 
) const
pure virtual

If track is on a geometry boundary, fill the normal vector of the crossing volume surface and return true, return false otherwise.

◆ CurrentEvent()

virtual Int_t TVirtualMC::CurrentEvent ( ) const
pure virtual

Return the number of the current event.

◆ CurrentMaterial()

virtual Int_t TVirtualMC::CurrentMaterial ( Float_t a,
Float_t z,
Float_t dens,
Float_t radl,
Float_t absl 
) const
pure virtual

Return the parameters of the current material during transport.

◆ CurrentMedium()

virtual Int_t TVirtualMC::CurrentMedium ( ) const
pure virtual

◆ CurrentVolID()

virtual Int_t TVirtualMC::CurrentVolID ( Int_t copyNo) const
pure virtual

Return the current volume ID and copy number.

◆ CurrentVolName()

virtual const char * TVirtualMC::CurrentVolName ( ) const
pure virtual

Return the current volume name.

◆ CurrentVolOffID()

virtual Int_t TVirtualMC::CurrentVolOffID ( Int_t  off,
Int_t copyNo 
) const
pure virtual

Return the current volume off upward in the geometrical tree ID and copy number.

◆ CurrentVolOffName()

virtual const char * TVirtualMC::CurrentVolOffName ( Int_t  off) const
pure virtual

Return the current volume off upward in the geometrical tree name and copy number' if name=0 no name is returned.

◆ CurrentVolPath()

virtual const char * TVirtualMC::CurrentVolPath ( )
pure virtual

Return the path in geometry tree for the current volume.

◆ DefineIon()

virtual Bool_t TVirtualMC::DefineIon ( const char *  name,
Int_t  Z,
Int_t  A,
Int_t  Q,
Double_t  excEnergy,
Double_t  mass = 0. 
)
pure virtual

Set a user defined ion.

  • name ion name
  • Z atomic number
  • A atomic mass
  • Q charge [eplus}
  • excitation excitation energy [GeV]
  • mass mass [GeV] (if not specified by user, approximative mass is calculated)

◆ DefineOpSurface()

virtual void TVirtualMC::DefineOpSurface ( const char *  name,
EMCOpSurfaceModel  model,
EMCOpSurfaceType  surfaceType,
EMCOpSurfaceFinish  surfaceFinish,
Double_t  sigmaAlpha 
)
pure virtual

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)

◆ DefineParticle() [1/2]

virtual Bool_t TVirtualMC::DefineParticle ( Int_t  pdg,
const char *  name,
TMCParticleType  mcType,
Double_t  mass,
Double_t  charge,
Double_t  lifetime 
)
pure virtual

Set a user defined particle Function is ignored if particle with specified pdg already exists and error report is printed.

  • pdg PDG encoding
  • name particle name
  • mcType VMC Particle type
  • mass mass [GeV]
  • charge charge [eplus]
  • lifetime time of life [s]
  • pType particle type as in Geant4
  • width width [GeV]
  • iSpin spin
  • iParity parity
  • iConjugation conjugation
  • iIsospin isospin
  • iIsospinZ isospin - #rd component
  • gParity gParity
  • lepton lepton number
  • baryon baryon number
  • stable stability
  • shortlived is shorlived?
  • subType particle subType as in Geant4
  • antiEncoding anti encoding
  • magMoment magnetic moment
  • excitation excitation energy [GeV]

◆ DefineParticle() [2/2]

virtual Bool_t TVirtualMC::DefineParticle ( Int_t  pdg,
const char *  name,
TMCParticleType  mcType,
Double_t  mass,
Double_t  charge,
Double_t  lifetime,
const TString pType,
Double_t  width,
Int_t  iSpin,
Int_t  iParity,
Int_t  iConjugation,
Int_t  iIsospin,
Int_t  iIsospinZ,
Int_t  gParity,
Int_t  lepton,
Int_t  baryon,
Bool_t  stable,
Bool_t  shortlived = kFALSE,
const TString subType = "",
Int_t  antiEncoding = 0,
Double_t  magMoment = 0.0,
Double_t  excitation = 0.0 
)
pure virtual

Set a user defined particle Function is ignored if particle with specified pdg already exists and error report is printed.

  • pdg PDG encoding
  • name particle name
  • mcType VMC Particle type
  • mass mass [GeV]
  • charge charge [eplus]
  • lifetime time of life [s]
  • pType particle type as in Geant4
  • width width [GeV]
  • iSpin spin
  • iParity parity
  • iConjugation conjugation
  • iIsospin isospin
  • iIsospinZ isospin - #rd component
  • gParity gParity
  • lepton lepton number
  • baryon baryon number
  • stable stability
  • shortlived is shorlived?
  • subType particle subType as in Geant4
  • antiEncoding anti encoding
  • magMoment magnetic moment
  • excitation excitation energy [GeV]

◆ Edep()

virtual Double_t TVirtualMC::Edep ( ) const
pure virtual

Return the energy lost in the current step.

◆ Etot()

virtual Double_t TVirtualMC::Etot ( ) const
pure virtual

Return the total energy of the current track.

◆ ForceDecayTime()

virtual void TVirtualMC::ForceDecayTime ( Float_t  )
pure virtual

Force the decay time of the current particle.

◆ Gdtom() [1/2]

virtual void TVirtualMC::Gdtom ( Double_t xd,
Double_t xm,
Int_t  iflag 
)
pure virtual

The same as previous but in double precision.

◆ Gdtom() [2/2]

virtual void TVirtualMC::Gdtom ( Float_t xd,
Float_t xm,
Int_t  iflag 
)
pure virtual

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

◆ GetDecayer()

TVirtualMCDecayer * TVirtualMC::GetDecayer ( ) const
inline

Return the external decayer.

Definition at line 859 of file TVirtualMC.h.

◆ GetId()

Int_t TVirtualMC::GetId ( ) const
inline

Return the VMC's ID.

Definition at line 868 of file TVirtualMC.h.

◆ GetMagField()

TVirtualMagField * TVirtualMC::GetMagField ( ) const
inline

Return the magnetic field.

Definition at line 865 of file TVirtualMC.h.

◆ GetManagerStack()

TMCManagerStack * TVirtualMC::GetManagerStack ( ) const
inline

Return the particle stack managed by the TMCManager (if any)

Definition at line 856 of file TVirtualMC.h.

◆ GetMaterial() [1/2]

virtual Bool_t TVirtualMC::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 
)
pure virtual

Return the material parameters for the volume specified by the volumeName.

◆ GetMaterial() [2/2]

virtual Bool_t TVirtualMC::GetMaterial ( Int_t  imat,
TString name,
Double_t a,
Double_t z,
Double_t density,
Double_t radl,
Double_t inter,
TArrayD par 
)
pure virtual

Return the material parameters for the material specified by the material Id.

◆ GetMaxNStep()

virtual Int_t TVirtualMC::GetMaxNStep ( ) const
pure virtual

Return the maximum number of steps allowed in the current medium.

◆ GetMC()

TVirtualMC * TVirtualMC::GetMC ( )
static

Static access method.

Definition at line 83 of file TVirtualMC.cxx.

◆ GetMedium()

virtual Bool_t TVirtualMC::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 
)
pure virtual

Return the medium parameters for the volume specified by the volumeName.

◆ GetRandom()

TRandom * TVirtualMC::GetRandom ( ) const
inline

Return the random number generator.

Definition at line 862 of file TVirtualMC.h.

◆ GetSecondary()

virtual void TVirtualMC::GetSecondary ( Int_t  isec,
Int_t particleId,
TLorentzVector position,
TLorentzVector momentum 
)
pure virtual

Return the parameters of the secondary track number isec produced in the current step.

◆ GetSensitiveDetector()

TVirtualMCSensitiveDetector * TVirtualMC::GetSensitiveDetector ( const TString volName) const
inlinevirtual

Get a sensitive detector of a volume.

  • volName - the volume name

Definition at line 929 of file TVirtualMC.h.

◆ GetShape()

virtual Bool_t TVirtualMC::GetShape ( const TString volumePath,
TString shapeType,
TArrayD par 
)
pure virtual

Return the name of the shape (shapeType) and its parameters par for the volume specified by the path volumePath .

◆ GetStack()

TVirtualMCStack * TVirtualMC::GetStack ( ) const
inline

Return the particle stack.

Definition at line 853 of file TVirtualMC.h.

◆ GetTransformation()

virtual Bool_t TVirtualMC::GetTransformation ( const TString volumePath,
TGeoHMatrix matrix 
)
pure virtual

Return the transformation matrix between the volume specified by the path volumePath and the top or master volume.

◆ Gmtod() [1/2]

virtual void TVirtualMC::Gmtod ( Double_t xm,
Double_t xd,
Int_t  iflag 
)
pure virtual

The same as previous but in double precision.

◆ Gmtod() [2/2]

virtual void TVirtualMC::Gmtod ( Float_t xm,
Float_t xd,
Int_t  iflag 
)
pure virtual

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

◆ Gsbool()

virtual void TVirtualMC::Gsbool ( const char *  onlyVolName,
const char *  manyVolName 
)
pure virtual

Helper function for resolving MANY.

Specify the ONLY volume that overlaps with the specified MANY and has to be substracted. (Geant4 only)

◆ Gsdvn()

virtual void TVirtualMC::Gsdvn ( const char *  name,
const char *  mother,
Int_t  ndiv,
Int_t  iaxis 
)
pure virtual

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.

◆ Gsdvn2()

virtual void TVirtualMC::Gsdvn2 ( const char *  name,
const char *  mother,
Int_t  ndiv,
Int_t  iaxis,
Double_t  c0i,
Int_t  numed 
)
pure virtual

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.

◆ Gsdvt()

virtual void TVirtualMC::Gsdvt ( const char *  name,
const char *  mother,
Double_t  step,
Int_t  iaxis,
Int_t  numed,
Int_t  ndvmx 
)
pure virtual

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)

◆ Gsdvt2()

virtual void TVirtualMC::Gsdvt2 ( const char *  name,
const char *  mother,
Double_t  step,
Int_t  iaxis,
Double_t  c0,
Int_t  numed,
Int_t  ndvmx 
)
pure virtual

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)

◆ Gsord()

virtual void TVirtualMC::Gsord ( const char *  name,
Int_t  iax 
)
pure virtual

Flag volume name whose contents will have to be ordered along axis iax, by setting the search flag to -iax (Geant3 only)

◆ Gspos()

virtual void TVirtualMC::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" 
)
pure virtual

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

◆ Gsposp() [1/2]

virtual void TVirtualMC::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 
)
pure virtual

The same as previous but in double precision.

◆ Gsposp() [2/2]

virtual void TVirtualMC::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 
)
pure virtual

Place a copy of generic volume name with user number nr inside mother, with its parameters upar(1..np)

◆ Gstpar()

virtual void TVirtualMC::Gstpar ( Int_t  itmed,
const char *  param,
Double_t  parval 
)
pure virtual

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 function 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.

◆ Gsvolu() [1/2]

virtual Int_t TVirtualMC::Gsvolu ( const char *  name,
const char *  shape,
Int_t  nmed,
Double_t upar,
Int_t  np 
)
pure virtual

The same as previous but in double precision.

◆ Gsvolu() [2/2]

virtual Int_t TVirtualMC::Gsvolu ( const char *  name,
const char *  shape,
Int_t  nmed,
Float_t upar,
Int_t  np 
)
pure virtual

Create a new volume.

  • name Volume name
  • shape Volume type
  • nmed Tracking medium number
  • np Number of shape parameters
  • upar Vector containing shape parameters

◆ IdFromPDG()

virtual Int_t TVirtualMC::IdFromPDG ( Int_t  pdg) const
pure virtual

Return MC specific code from a PDG and pseudo ENDF code (pdg)

◆ Init()

virtual void TVirtualMC::Init ( )
pure virtual

Initialize MC.

◆ InitLego()

virtual void TVirtualMC::InitLego ( )
pure virtual

Set switches for lego transport.

◆ InterruptTrack()

void TVirtualMC::InterruptTrack ( )
privatevirtual

That triggers stopping the transport of the current track without dispatching to common routines like TVirtualMCApplication::PostTrack() etc.

Definition at line 237 of file TVirtualMC.cxx.

◆ IsCollectTracks()

virtual Bool_t TVirtualMC::IsCollectTracks ( ) const
pure virtual

Return the info if collecting tracks is activated.

◆ IsMT()

virtual Bool_t TVirtualMC::IsMT ( ) const
inlinevirtual

Return the info if multi-threading is supported/activated.

Definition at line 826 of file TVirtualMC.h.

◆ IsNewTrack()

virtual Bool_t TVirtualMC::IsNewTrack ( ) const
pure virtual

Return true when the track performs the first step.

◆ IsRootGeometrySupported()

virtual Bool_t TVirtualMC::IsRootGeometrySupported ( ) const
pure virtual

Info about supporting geometry defined via Root.

◆ IsTrackAlive()

virtual Bool_t TVirtualMC::IsTrackAlive ( ) const
pure virtual

Return true if the current particle is alive and will continue to be transported.

◆ IsTrackDisappeared()

virtual Bool_t TVirtualMC::IsTrackDisappeared ( ) const
pure virtual

Return true if the current particle has disappeared either because it decayed or because it underwent an inelastic collision.

◆ IsTrackEntering()

virtual Bool_t TVirtualMC::IsTrackEntering ( ) const
pure virtual

Return true if this is the first step of the track in the current volume.

◆ IsTrackExiting()

virtual Bool_t TVirtualMC::IsTrackExiting ( ) const
pure virtual

Return true if this is the last step of the track in the current volume.

◆ IsTrackInside()

virtual Bool_t TVirtualMC::IsTrackInside ( ) const
pure virtual

Return true if the track is not at the boundary of the current volume.

◆ IsTrackOut()

virtual Bool_t TVirtualMC::IsTrackOut ( ) const
pure virtual

Return true if the track is out of the setup.

◆ IsTrackStop()

virtual Bool_t TVirtualMC::IsTrackStop ( ) const
pure virtual

Return true if the track energy has fallen below the threshold.

◆ Material() [1/2]

virtual void TVirtualMC::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 
)
pure virtual

The same as previous but in double precision.

◆ Material() [2/2]

virtual void TVirtualMC::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 
)
pure virtual

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

◆ Matrix()

virtual void TVirtualMC::Matrix ( Int_t krot,
Double_t  thetaX,
Double_t  phiX,
Double_t  thetaY,
Double_t  phiY,
Double_t  thetaZ,
Double_t  phiZ 
)
pure virtual

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

◆ MaxStep()

virtual Double_t TVirtualMC::MaxStep ( ) const
pure virtual

Return the maximum step length in the current medium.

◆ Medium() [1/2]

virtual void TVirtualMC::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 
)
pure virtual

The same as previous but in double precision.

◆ Medium() [2/2]

virtual void TVirtualMC::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 
)
pure virtual

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

◆ MediumId()

virtual Int_t TVirtualMC::MediumId ( const char *  mediumName) const
pure virtual

Return the unique numeric identifier for medium name mediumName.

◆ Mixture() [1/2]

virtual void TVirtualMC::Mixture ( Int_t kmat,
const char *  name,
Double_t a,
Double_t z,
Double_t  dens,
Int_t  nlmat,
Double_t wmat 
)
pure virtual

The same as previous but in double precision.

◆ Mixture() [2/2]

virtual void TVirtualMC::Mixture ( Int_t kmat,
const char *  name,
Float_t a,
Float_t z,
Double_t  dens,
Int_t  nlmat,
Float_t wmat 
)
pure virtual

Define a mixture or a 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.

◆ NIELEdep()

Double_t TVirtualMC::NIELEdep ( ) const
inlinevirtual

Return the non-ionising energy lost (NIEL) in the current step.

Definition at line 948 of file TVirtualMC.h.

◆ NofVolDaughters()

virtual Int_t TVirtualMC::NofVolDaughters ( const char *  volName) const
pure virtual

Return number of daughters of the volume specified by volName.

◆ NofVolumes()

virtual Int_t TVirtualMC::NofVolumes ( ) const
pure virtual

Return total number of volumes in the geometry.

◆ NSecondaries()

virtual Int_t TVirtualMC::NSecondaries ( ) const
pure virtual

Return the number of secondary particles generated in the current step.

◆ operator=()

TVirtualMC & TVirtualMC::operator= ( const TVirtualMC )
private

◆ ParticleCharge()

virtual Double_t TVirtualMC::ParticleCharge ( Int_t  pdg) const
pure virtual

Return charge (in e units) of the particle specified by pdg.

◆ ParticleLifeTime()

virtual Double_t TVirtualMC::ParticleLifeTime ( Int_t  pdg) const
pure virtual

Return life time of the particle specified by pdg.

◆ ParticleMass()

virtual Double_t TVirtualMC::ParticleMass ( Int_t  pdg) const
pure virtual

Return mass of the particle specified by pdg.

◆ ParticleMCType()

virtual TMCParticleType TVirtualMC::ParticleMCType ( Int_t  pdg) const
pure virtual

Return VMC type of the particle specified by pdg.

◆ ParticleName()

virtual TString TVirtualMC::ParticleName ( Int_t  pdg) const
pure virtual

Return name of the particle specified by pdg.

◆ PDGFromId()

virtual Int_t TVirtualMC::PDGFromId ( Int_t  id) const
pure virtual

Return PDG code and pseudo ENDF code from MC specific code (id)

◆ ProcessEvent() [1/3]

void TVirtualMC::ProcessEvent ( )
virtual

Process one event (backward-compatibility)

Process one event (backwards compatibility)

Definition at line 134 of file TVirtualMC.cxx.

◆ ProcessEvent() [2/3]

void TVirtualMC::ProcessEvent ( Int_t  eventId)
virtual

Process one event.

Process one event (backwards compatibility)

Definition at line 144 of file TVirtualMC.cxx.

◆ ProcessEvent() [3/3]

void TVirtualMC::ProcessEvent ( Int_t  eventId,
Bool_t  isInterruptible 
)
privatevirtual

An interruptible event can be paused and resumed at any time.

It must not call TVirtualMCApplication::BeginEvent() and ::FinishEvent() Further, when tracks are popped from the TVirtualMCStack it must be checked whether these are new tracks or whether they have been transported up to their current point.

Definition at line 225 of file TVirtualMC.cxx.

◆ ProcessRun()

virtual Bool_t TVirtualMC::ProcessRun ( Int_t  nevent)
pure virtual

Process one run and return true if run has finished successfully, return false in other cases (run aborted by user)

◆ ProdProcess()

virtual TMCProcess TVirtualMC::ProdProcess ( Int_t  isec) const
pure virtual

Return the VMC code of the process that has produced the secondary particles in the current step.

◆ SecondariesAreOrdered()

virtual Bool_t TVirtualMC::SecondariesAreOrdered ( ) const
pure virtual

Return the information about the transport order needed by the stack.

◆ SetBorderSurface()

virtual void TVirtualMC::SetBorderSurface ( const char *  name,
const char *  vol1Name,
int  vol1CopyNo,
const char *  vol2Name,
int  vol2CopyNo,
const char *  opSurfaceName 
)
pure virtual

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)

◆ SetCerenkov() [1/2]

virtual void TVirtualMC::SetCerenkov ( Int_t  itmed,
Int_t  npckov,
Double_t ppckov,
Double_t absco,
Double_t effic,
Double_t rindex 
)
pure virtual

The same as previous but in double precision.

◆ SetCerenkov() [2/2]

virtual void TVirtualMC::SetCerenkov ( Int_t  itmed,
Int_t  npckov,
Float_t ppckov,
Float_t absco,
Float_t effic,
Float_t rindex 
)
pure virtual

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)

◆ SetCollectTracks()

virtual void TVirtualMC::SetCollectTracks ( Bool_t  collectTracks)
pure virtual

(In)Activate collecting TGeo tracks

◆ SetCut()

virtual Bool_t TVirtualMC::SetCut ( const char *  cutName,
Double_t  cutValue 
)
pure virtual

Set transport cuts for particles.

◆ SetDecayMode()

virtual Bool_t TVirtualMC::SetDecayMode ( Int_t  pdg,
Float_t  bratio[6],
Int_t  mode[6][3] 
)
pure virtual

Set a user phase space decay for a particle.

  • pdg particle PDG encoding
  • bratios the array with branching ratios (in %)
  • mode[6][3] the array with daughters particles PDG codes for each decay channel

◆ SetExclusiveSDScoring()

void TVirtualMC::SetExclusiveSDScoring ( Bool_t  exclusiveSDScoring)
inlinevirtual

The scoring option: if true, scoring is performed only via user defined sensitive detectors and MCApplication::Stepping is not called.

Definition at line 939 of file TVirtualMC.h.

◆ SetExternalDecayer()

void TVirtualMC::SetExternalDecayer ( TVirtualMCDecayer decayer)
virtual

Set the external decayer.

Set external decayer.

Definition at line 103 of file TVirtualMC.cxx.

◆ SetId()

void TVirtualMC::SetId ( UInt_t  id)
private

Set the VMC id.

Definition at line 202 of file TVirtualMC.cxx.

◆ SetMagField()

void TVirtualMC::SetMagField ( TVirtualMagField field)
virtual

Set the magnetic field.

Set magnetic field.

Definition at line 124 of file TVirtualMC.cxx.

◆ SetManagerStack()

void TVirtualMC::SetManagerStack ( TMCManagerStack stack)
private

Set container holding additional information for transported TParticles.

Definition at line 211 of file TVirtualMC.cxx.

◆ SetMaterialProperty() [1/3]

virtual void TVirtualMC::SetMaterialProperty ( const char *  surfaceName,
const char *  propertyName,
Int_t  np,
Double_t pp,
Double_t values 
)
pure virtual

Define optical surface property via a table of values.

  • surfaceName optical surface name
  • propertyName property name
  • np number of bins of the table
  • pp value of photon momentum (in GeV)
  • values property values (Geant4 only)

◆ SetMaterialProperty() [2/3]

virtual void TVirtualMC::SetMaterialProperty ( Int_t  itmed,
const char *  propertyName,
Double_t  value 
)
pure virtual

Define material property via a value.

  • itmed tracking medium id
  • propertyName property name
  • value property value (Geant4 only)

◆ SetMaterialProperty() [3/3]

virtual void TVirtualMC::SetMaterialProperty ( Int_t  itmed,
const char *  propertyName,
Int_t  np,
Double_t pp,
Double_t values 
)
pure virtual

Define material property via a table of values.

  • itmed tracking medium id
  • propertyName property name
  • np number of bins of the table
  • pp value of photon momentum (in GeV)
  • values property values (Geant4 only)

◆ SetMaxNStep()

virtual void TVirtualMC::SetMaxNStep ( Int_t  )
pure virtual

Set the maximum number of steps till the particle is in the current medium.

◆ SetMaxStep()

virtual void TVirtualMC::SetMaxStep ( Double_t  )
pure virtual

Set the maximum step allowed till the particle is in the current medium.

◆ SetProcess()

virtual Bool_t TVirtualMC::SetProcess ( const char *  flagName,
Int_t  flagValue 
)
pure virtual

Set process control.

◆ SetRandom()

void TVirtualMC::SetRandom ( TRandom random)
virtual

Set the random number generator.

Set random number generator.

Definition at line 113 of file TVirtualMC.cxx.

◆ SetRootGeometry()

virtual void TVirtualMC::SetRootGeometry ( )
pure virtual

Set geometry from Root (built via TGeo)

◆ SetSensitiveDetector()

void TVirtualMC::SetSensitiveDetector ( const TString volName,
TVirtualMCSensitiveDetector sd 
)
inlinevirtual

Set a sensitive detector to a volume.

  • volName - the volume name
  • sd - the user sensitive detector

Definition at line 920 of file TVirtualMC.h.

◆ SetSkinSurface()

virtual void TVirtualMC::SetSkinSurface ( const char *  name,
const char *  volName,
const char *  opSurfaceName 
)
pure virtual

Define the optical skin surface.

  • name skin surface name
  • volName volume name
  • opSurfaceName name of optical surface which this border belongs to (Geant4 only)

◆ SetStack()

void TVirtualMC::SetStack ( TVirtualMCStack stack)
virtual

Set the particle stack.

Set particles stack.

Definition at line 93 of file TVirtualMC.cxx.

◆ SetUserDecay()

virtual void TVirtualMC::SetUserDecay ( Int_t  pdg)
pure virtual

Force the decays of particles to be done with Pythia and not with the Geant routines.

◆ SetUserParameters()

virtual void TVirtualMC::SetUserParameters ( Bool_t  isUserParameters)
pure virtual

Activate the parameters defined in tracking media (DEEMAX, STMIN, STEMAX), which are, be default, ignored.

In Geant4 case, only STEMAX is taken into account. In FLUKA, all tracking media parameters are ignored.

◆ StepNumber()

Int_t TVirtualMC::StepNumber ( ) const
virtual

Return the current step number.

Definition at line 154 of file TVirtualMC.cxx.

◆ StepProcesses()

virtual Int_t TVirtualMC::StepProcesses ( TArrayI proc) const
pure virtual

Return the array of the VMC code of the processes active in the current step.

◆ StopEvent()

virtual void TVirtualMC::StopEvent ( )
pure virtual

Stop simulation of the current event and skip to the next.

◆ StopRun()

virtual void TVirtualMC::StopRun ( )
pure virtual

Stop simulation of the current event and set the abort run flag to true.

◆ StopTrack()

virtual void TVirtualMC::StopTrack ( )
pure virtual

Stop the transport of the current particle and skip to the next.

◆ TerminateRun()

virtual void TVirtualMC::TerminateRun ( )
inlinevirtual

Additional cleanup after a run can be done here (optional)

Definition at line 814 of file TVirtualMC.h.

◆ TrackCharge()

virtual Double_t TVirtualMC::TrackCharge ( ) const
pure virtual

Return the charge of the track currently transported.

◆ TrackLength()

virtual Double_t TVirtualMC::TrackLength ( ) const
pure virtual

Return the length of the current track from its origin (in cm)

◆ TrackMass()

virtual Double_t TVirtualMC::TrackMass ( ) const
pure virtual

Return the mass of the track currently transported.

◆ TrackMomentum() [1/3]

virtual void TVirtualMC::TrackMomentum ( Double_t px,
Double_t py,
Double_t pz,
Double_t etot 
) const
pure virtual

Return the direction and the momentum (GeV/c) of the track currently being transported (as double)

◆ TrackMomentum() [2/3]

virtual void TVirtualMC::TrackMomentum ( Float_t px,
Float_t py,
Float_t pz,
Float_t etot 
) const
pure virtual

Return the direction and the momentum (GeV/c) of the track currently being transported (as float)

◆ TrackMomentum() [3/3]

virtual void TVirtualMC::TrackMomentum ( TLorentzVector momentum) const
pure virtual

Return the direction and the momentum (GeV/c) of the track currently being transported.

◆ TrackPid()

virtual Int_t TVirtualMC::TrackPid ( ) const
pure virtual

Return the PDG of the particle transported.

◆ TrackPolarization() [1/2]

void TVirtualMC::TrackPolarization ( Double_t polX,
Double_t polY,
Double_t polZ 
) const
virtual

Get the current polarization.

Definition at line 176 of file TVirtualMC.cxx.

◆ TrackPolarization() [2/2]

void TVirtualMC::TrackPolarization ( TVector3 pol) const
virtual

Get the current polarization.

Definition at line 189 of file TVirtualMC.cxx.

◆ TrackPosition() [1/3]

virtual void TVirtualMC::TrackPosition ( Double_t x,
Double_t y,
Double_t z 
) const
pure virtual

Only return spatial coordinates (as double)

◆ TrackPosition() [2/3]

virtual void TVirtualMC::TrackPosition ( Float_t x,
Float_t y,
Float_t z 
) const
pure virtual

Only return spatial coordinates (as float)

◆ TrackPosition() [3/3]

virtual void TVirtualMC::TrackPosition ( TLorentzVector position) const
pure virtual

Return the current position in the master reference frame of the track being transported.

◆ TrackStep()

virtual Double_t TVirtualMC::TrackStep ( ) const
pure virtual

Return the length in centimeters of the current step (in cm)

◆ TrackTime()

virtual Double_t TVirtualMC::TrackTime ( ) const
pure virtual

Return the current time of flight of the track being transported.

◆ TrackWeight()

Double_t TVirtualMC::TrackWeight ( ) const
virtual

Get the current weight.

Definition at line 165 of file TVirtualMC.cxx.

◆ VolDaughterCopyNo()

virtual Int_t TVirtualMC::VolDaughterCopyNo ( const char *  volName,
Int_t  i 
) const
pure virtual

Return the copyNo of i-th daughter of the volume specified by volName.

◆ VolDaughterName()

virtual const char * TVirtualMC::VolDaughterName ( const char *  volName,
Int_t  i 
) const
pure virtual

Return the name of i-th daughter of the volume specified by volName.

◆ VolId()

virtual Int_t TVirtualMC::VolId ( const char *  volName) const
pure virtual

Return the unique numeric identifier for volume name volName.

◆ VolId2Mate()

virtual Int_t TVirtualMC::VolId2Mate ( Int_t  id) const
pure virtual

Return material number for a given volume id.

◆ VolName()

virtual const char * TVirtualMC::VolName ( Int_t  id) const
pure virtual

Return the volume name for a given volume identifier id.

◆ WriteEuclid()

virtual void TVirtualMC::WriteEuclid ( const char *  filnam,
const char *  topvol,
Int_t  number,
Int_t  nlevel 
)
pure virtual

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) Deprecated

◆ Xsec()

virtual Double_t TVirtualMC::Xsec ( char *  ,
Double_t  ,
Int_t  ,
Int_t   
)
pure virtual

Calculate X-sections (Geant3 only) Deprecated.

Friends And Related Function Documentation

◆ TMCManager

friend class TMCManager
friend

Definition at line 45 of file TVirtualMC.h.

Member Data Documentation

◆ fApplication

TVirtualMCApplication* TVirtualMC::fApplication
protected

User MC application.

Definition at line 893 of file TVirtualMC.h.

◆ fDecayer

TVirtualMCDecayer* TVirtualMC::fDecayer
private

External decayer.

Definition at line 911 of file TVirtualMC.h.

◆ fgMC

TMCThreadLocal TVirtualMC * TVirtualMC::fgMC = nullptr
staticprivate

Static TVirtualMC pointer.

Definition at line 897 of file TVirtualMC.h.

◆ fId

Int_t TVirtualMC::fId
private

Unique identification of this VMC.

Definition at line 903 of file TVirtualMC.h.

◆ fMagField

TVirtualMagField* TVirtualMC::fMagField
private

Magnetic field.

Definition at line 913 of file TVirtualMC.h.

◆ fManagerStack

TMCManagerStack* TVirtualMC::fManagerStack
private

Stack handled by the TMCManager.

Definition at line 910 of file TVirtualMC.h.

◆ fRandom

TRandom* TVirtualMC::fRandom
private

Random number generator.

Definition at line 912 of file TVirtualMC.h.

◆ fStack

TVirtualMCStack* TVirtualMC::fStack
private

Particles stack.

Definition at line 909 of file TVirtualMC.h.

Libraries for TVirtualMC:
[legend]

The documentation for this class was generated from the following files: