TGeant3 Class Reference

#include <TGeant3.h>

Inheritance diagram for TGeant3:
TGeant3f77 TGeant3TGeo

List of all members.

Public Member Functions

 TGeant3 ()
 TGeant3 (const char *title, Int_t nwgeant=0)
virtual ~TGeant3 ()
virtual void LoadAddress ()
virtual Bool_t IsRootGeometrySupported () const
void GeomIter ()
Int_t CurrentMaterial (Float_t &a, Float_t &z, Float_t &dens, Float_t &radl, Float_t &absl) const
Int_t NextVolUp (Text_t *name, Int_t &copy)
Int_t CurrentVolID (Int_t &copy) const
Int_t CurrentVolOffID (Int_t off, Int_t &copy) const
const char * CurrentVolName () const
const char * CurrentVolOffName (Int_t off) const
const char * CurrentVolPath ()
Bool_t CurrentBoundaryNormal (Double_t &x, Double_t &y, Double_t &z) const
Int_t VolId (const Text_t *name) const
Int_t MediumId (const Text_t *name) const
Int_t IdFromPDG (Int_t pdg) const
Int_t PDGFromId (Int_t pdg) const
const char * VolName (Int_t id) const
Double_t Xsec (char *reac, Double_t energy, Int_t part, Int_t mate)
void TrackPosition (TLorentzVector &xyz) const
void TrackPosition (Double_t &x, Double_t &y, Double_t &z) const
void TrackMomentum (TLorentzVector &xyz) const
void TrackMomentum (Double_t &px, Double_t &py, Double_t &pz, Double_t &etot) const
Int_t NofVolumes () const
Int_t NofVolDaughters (const char *volName) const
const char * VolDaughterName (const char *volName, Int_t i) const
Int_t VolDaughterCopyNo (const char *volName, Int_t i) const
Int_t VolId2Mate (Int_t id) const
Double_t TrackTime () const
Double_t TrackCharge () const
Double_t TrackMass () const
Double_t TrackStep () const
Double_t TrackLength () const
Int_t TrackPid () const
Bool_t IsNewTrack () const
Bool_t IsTrackInside () const
Bool_t IsTrackEntering () const
Bool_t IsTrackExiting () const
Bool_t IsTrackOut () const
Bool_t IsTrackDisappeared () const
Bool_t IsTrackStop () const
Bool_t IsTrackAlive () const
Int_t NSecondaries () const
Int_t CurrentEvent () const
TMCProcess ProdProcess (Int_t isec) const
Int_t StepProcesses (TArrayI &proc) const
void GetSecondary (Int_t isec, Int_t &ipart, TLorentzVector &x, TLorentzVector &p)
Bool_t SecondariesAreOrdered () const
void StopTrack ()
void StopEvent ()
void StopRun ()
Double_t MaxStep () const
void SetMaxStep (Double_t maxstep)
void SetMaxNStep (Int_t maxnstp)
Int_t GetMaxNStep () const
void ForceDecayTime (Float_t time)
void SetSkipNeutrinos (Bool_t flag)
Bool_t SkipNeutrinos ()
Bool_t SetCut (const char *cutName, Double_t cutValue)
Bool_t SetProcess (const char *flagName, Int_t flagValue)
const char * GetPath ()
const char * GetNodeName ()
Bool_t DefineParticle (Int_t pdg, const char *name, TMCParticleType mcType, Double_t mass, Double_t charge, Double_t lifetime)
Bool_t DefineParticle (Int_t pdg, const char *name, TMCParticleType mcType, Double_t mass, Double_t charge, Double_t lifetime, const TString &, Double_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Bool_t, Bool_t=kFALSE, const TString &="", Int_t=0, Double_t=0.0, Double_t=0.0)
Bool_t DefineIon (const char *name, Int_t Z, Int_t A, Int_t Q, Double_t excEnergy, Double_t mass)
virtual TString ParticleName (Int_t pdg) const
virtual Double_t ParticleMass (Int_t pdg) const
virtual Double_t ParticleCharge (Int_t pdg) const
virtual Double_t ParticleLifeTime (Int_t pdg) const
virtual TMCParticleType ParticleMCType (Int_t pdg) const
virtual Int_t CurrentMedium () const
virtual Int_t GetMedium () const
virtual Double_t Edep () const
virtual Double_t Etot () 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=0, Int_t nwbuf=0)
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 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 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=0, Int_t nbuf=0)
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 Matrix (Int_t &krot, Double_t thex, Double_t phix, Double_t they, Double_t phiy, Double_t thez, Double_t phiz)
virtual void SetRootGeometry ()
virtual void SetUserParameters (Bool_t isUserParameters)
Bool_t GetTransformation (const TString &volumePath, TGeoHMatrix &mat)
Bool_t GetShape (const TString &volumePath, TString &shapeType, TArrayD &par)
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)
Bool_t GetMaterial (const TString &volumeName, TString &name, Int_t &imat, Double_t &a, Double_t &z, Double_t &den, Double_t &radl, Double_t &inter, TArrayD &par)
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 Quest_tQuest () const
virtual Gcbank_tGcbank () const
virtual Gclink_tGclink () const
virtual Gccuts_tGccuts () const
virtual Gcmore_tGcmore () const
virtual Gcmulo_tGcmulo () const
virtual Gcmate_tGcmate () const
virtual Gctpol_tGctpol () const
virtual Gcnum_tGcnum () const
virtual Gcsets_tGcsets () const
virtual Gcopti_tGcopti () const
virtual Gctlit_tGctlit () const
virtual Gcvdma_tGcvdma () const
virtual Gcvolu_tGcvolu () const
virtual Gckine_tGckine () const
virtual Gcflag_tGcflag () const
virtual Gctmed_tGctmed () const
virtual Gcphys_tGcphys () const
virtual Gcphlt_tGcphlt () const
virtual Gcking_tGcking () const
virtual Gckin2_tGckin2 () const
virtual Gckin3_tGckin3 () const
virtual Gctrak_tGctrak () const
virtual Int_t * Iq () const
virtual Int_t * Lq () const
virtual Float_t * Q () const
virtual Ertrio_tErtrio () const
virtual Eropts_tEropts () const
virtual Eroptc_tEroptc () const
virtual Erwork_tErwork () const
virtual Trcom3_tTrcom3 () const
virtual Gconst_tGconst () const
virtual Gconsx_tGconsx () const
virtual Gcjump_tGcjump () const
virtual Ptopts_tPtopts () const
virtual void Gpcxyz ()
virtual void Ggclos ()
virtual void Gfile (const char *filename, const char *option="I")
virtual void Glast ()
virtual void Gprint (const char *name)
virtual void Grun ()
virtual void Gtrig ()
virtual void Gtrigc ()
virtual void Gtrigi ()
virtual void Gwork (Int_t nwork)
virtual void Gzinit ()
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 Gfmate2 (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 Gfpart (Int_t ipart, char *name, Int_t &itrtyp, Float_t &amass, Float_t &charge, Float_t &tlife) const
virtual void Gppart (Int_t ipart=0)
virtual void Gftmed (Int_t numed, char *name, Int_t &nmat, Int_t &isvol, Int_t &ifield, Float_t &fieldm, Float_t &tmaxfd, Float_t &stemax, Float_t &deemax, Float_t &epsil, Float_t &stmin, Float_t *buf=0, Int_t *nbuf=0)
virtual void Gptmed (Int_t numed)
virtual void Gftmat (Int_t imate, Int_t ipart, char *chmeca, Int_t kdim, Float_t *tkin, Float_t *value, Float_t *pcut, Int_t &ixst)
virtual Float_t Gbrelm (Float_t z, Float_t t, Float_t cut)
virtual Float_t Gprelm (Float_t z, Float_t t, Float_t cut)
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)
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)
virtual void Gfang (Float_t *p, Float_t &costh, Float_t &sinth, Float_t &cosph, Float_t &sinph, Int_t &rotate)
virtual void Gsmixt (Int_t imat, const char *name, Float_t *a, Float_t *z, Float_t dens, Int_t nlmat, Float_t *wmat)
virtual void Gspart (Int_t ipart, const char *name, Int_t itrtyp, Double_t amass, Double_t charge, Double_t tlife)
virtual void Gstmed (Int_t numed, const char *name, Int_t nmat, Int_t isvol, Int_t ifield, Float_t fieldm, Float_t tmaxfd, Float_t stemax, Float_t deemax, Float_t epsil, Float_t stmin)
virtual void Gstpar (Int_t itmed, const char *param, Double_t parval)
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 DefineOpSurface (const char *name, EMCOpSurfaceModel model, EMCOpSurfaceType surfaceType, EMCOpSurfaceFinish surfaceFinish, Double_t sigmaAlpha)
virtual void SetBorderSurface (const char *name, const char *vol1Name, int vol1CopyNo, const char *vol2Name, int vol2CopyNo, const char *opSurfaceName)
virtual void SetSkinSurface (const char *name, const char *volName, const char *opSurfaceName)
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 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 Int_t Gskine (Float_t *plab, Int_t ipart, Int_t nv, Float_t *ubuf=0, Int_t nwbuf=0)
virtual Int_t Gsvert (Float_t *v, Int_t ntbeam, Int_t nttarg, Float_t *ubuf=0, Int_t nwbuf=0)
virtual void Gphysi ()
virtual void Gdebug ()
virtual void Gekbin ()
virtual void Gfinds ()
virtual void Gsking (Int_t igk)
virtual void Gskpho (Int_t igk)
virtual void Gsstak (Int_t iflag)
virtual void Gsxyz ()
virtual void Gtrack ()
virtual void Gtreve ()
virtual void GtreveRoot ()
virtual void Grndm (Float_t *rvec, Int_t len) const
virtual void Grndmq (Int_t &is1, Int_t &is2, Int_t iseq, const Text_t *chopt)
virtual void Gdxyz (Int_t it)
virtual void Gdcxyz ()
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 void Glmoth (const char *iudet, Int_t iunum, Int_t &nlev, Int_t *lvols, Int_t *lindx)
virtual void Gmedia (Float_t *x, Int_t &numed)
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 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 Gsdvs (const char *name, const char *mother, Float_t step, Int_t iaxis, Int_t numed)
virtual void Gsdvs2 (const char *name, const char *mother, Float_t step, Int_t iaxis, Float_t c0, 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 Gsrotm (Int_t nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, Float_t theta3, Float_t phi3)
virtual void Gprotm (Int_t nmat=0)
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 void Gsatt (const char *name, const char *att, Int_t val)
virtual void Gfpara (const char *name, Int_t number, Int_t intext, Int_t &npar, Int_t &natt, Float_t *par, Float_t *att)
virtual void Gckpar (Int_t ish, Int_t npar, Float_t *par)
virtual void Gckmat (Int_t itmed, char *natmed)
virtual Int_t Glvolu (Int_t nlev, Int_t *lnam, Int_t *lnum)
virtual void Gsbool (const char *, const char *)
virtual void DefaultRange ()
virtual void InitHIGZ ()
virtual void Gdopen (Int_t view)
virtual void Gdclose ()
virtual void Gdelete (Int_t view)
virtual void Gdshow (Int_t view)
virtual void Gdopt (const char *name, const char *value)
virtual void Gdraw (const char *name, 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 Gdrawc (const char *name, Int_t axis=1, Float_t cut=0, Float_t u0=10, Float_t v0=10, Float_t ul=0.01, Float_t vl=0.01)
virtual void Gdrawx (const char *name, Float_t cutthe, Float_t cutphi, Float_t cutval, Float_t theta=30, Float_t phi=30, Float_t u0=10, Float_t v0=10, Float_t ul=0.01, Float_t vl=0.01)
virtual void Gdhead (Int_t isel, const char *name, Double_t chrsiz=0.6)
virtual void Gdman (Double_t u0, Double_t v0, const char *type="MAN")
virtual void Gdspec (const char *name)
virtual void DrawOneSpec (const char *name)
virtual void Gdtree (const char *name, Int_t levmax=15, Int_t ispec=0)
virtual void GdtreeParent (const char *name, Int_t levmax=15, Int_t ispec=0)
virtual void WriteEuclid (const char *filnam, const char *topvol, Int_t number, Int_t nlevel)
virtual void SetABAN (Int_t par=1)
virtual void SetANNI (Int_t par=1)
virtual void SetAUTO (Int_t par=1)
virtual void SetBOMB (Float_t bomb=1)
virtual void SetBREM (Int_t par=1)
virtual void SetCKOV (Int_t par=1)
virtual void SetClipBox (const char *name, Double_t xmin=-9999, Double_t xmax=0, Double_t ymin=-9999, Double_t ymax=0, Double_t zmin=-9999, Double_t zmax=0)
virtual void SetCOMP (Int_t par=1)
virtual void SetCUTS (Float_t cutgam, Float_t cutele, Float_t cutneu, Float_t cuthad, Float_t cutmuo, Float_t bcute, Float_t bcutm, Float_t dcute, Float_t dcutm, Float_t ppcutm, Float_t tofmax, Float_t *gcuts=0)
virtual void InitGEANE ()
virtual void SetClose (Int_t iclose, Float_t *pf, Float_t dstrt, Float_t *w1, Float_t *w2, Float_t *p1, Float_t *p2, Float_t *p3, Float_t *cl)
virtual void GetClose (Float_t *p1, Float_t *p2, Float_t *p3, Float_t *len)
virtual void SetECut (Float_t gcalpha)
virtual void SetDCAY (Int_t par=1)
virtual void SetDEBU (Int_t emin=1, Int_t emax=999, Int_t emod=1)
virtual void SetDRAY (Int_t par=1)
virtual void SetERAN (Float_t ekmin=1.e-5, Float_t ekmax=1.e4, Int_t nekbin=90)
virtual void SetHADR (Int_t par=1)
virtual void SetKINE (Int_t kine, Float_t xk1=0, Float_t xk2=0, Float_t xk3=0, Float_t xk4=0, Float_t xk5=0, Float_t xk6=0, Float_t xk7=0, Float_t xk8=0, Float_t xk9=0, Float_t xk10=0)
virtual void SetLOSS (Int_t par=2)
virtual void SetMULS (Int_t par=1)
virtual void SetMUNU (Int_t par=1)
virtual void SetOPTI (Int_t par=2)
virtual void SetPAIR (Int_t par=1)
virtual void SetPFIS (Int_t par=1)
virtual void SetPHOT (Int_t par=1)
virtual void SetRAYL (Int_t par=1)
virtual void SetSTRA (Int_t par=0)
virtual void SetSWIT (Int_t sw, Int_t val=1)
virtual void SetTRIG (Int_t nevents=1)
virtual void SetUserDecay (Int_t ipart)
virtual Bool_t SetDecayMode (Int_t pdg, Float_t bratio[6], Int_t mode[6][3])
virtual void Vname (const char *name, char *vname)
virtual void InitLego ()
virtual void Ertrgo ()
virtual void Ertrak (const Float_t *x1, const Float_t *p1, const Float_t *x2, const Float_t *p2, Int_t ipa, Option_t *chopt)
virtual void Erxyzc ()
virtual void Eufill (Int_t n, Float_t *ein, Float_t *xlf)
virtual void Eufilp (const Int_t n, Float_t *ein, Float_t *pli, Float_t *plf)
virtual void Eufilv (Int_t n, Float_t *ein, Char_t *namv, Int_t *numv, Int_t *iovl)
virtual void Trscsd (Float_t *pc, Float_t *rc, Float_t *pd, Float_t *rd, Float_t *h, Float_t ch, Int_t ierr, Float_t spu, Float_t *dj, Float_t *dk)
virtual void Trsdsc (Float_t *pd, Float_t *rd, Float_t *pc, Float_t *rc, Float_t *h, Float_t *ch, Int_t *ierr, Float_t *spu, Float_t *dj, Float_t *dk)
virtual void Trscsp (Float_t *ps, Float_t *rs, Float_t *pc, Float_t *rc, Float_t *h, Float_t *ch, Int_t *ierr, Float_t *spx)
virtual void Trspsc (Float_t *ps, Float_t *rs, Float_t *pc, Float_t *rc, Float_t *h, Float_t *ch, Int_t *ierr, Float_t *spx)
virtual void SetALTDEDX (Int_t par=1)
virtual void SetUserDecayProductStableMinLifetime (Double_t lifetime=1.E-15)
Double_t GetUserDecayProductStableMinLifetime () const
virtual void FinishGeometry ()
virtual void BuildPhysics ()
virtual void Init ()
virtual void ProcessEvent ()
virtual Bool_t ProcessRun (Int_t nevent)
virtual void AddParticlesToPdgDataBase () const
virtual void SetColors ()
void SetTrack (Int_t done, Int_t parent, Int_t pdg, Float_t *pmom, Float_t *vpos, Float_t *polar, Float_t tof, TMCProcess mech, Int_t &ntr, Float_t weight, Int_t is)

Public Attributes

Ertrio_tfErtrio
Ertrio1_tfErtrio1
 ERTRIO common structure.
Eropts_tfEropts
 ERTRIO1 common structure.
Eroptc_tfEroptc
 EROPTS common structure.
Erwork_tfErwork
 EROPTC common structure.
Trcom3_tfTrcom3
 ERWORK common structure.

Protected Types

enum  {
  kTRIG = BIT(14), kSWIT = BIT(15), kDEBU = BIT(16), kAUTO = BIT(17),
  kABAN = BIT(18), kOPTI = BIT(19), kERAN = BIT(20)
}

Protected Member Functions

TMCProcess G3toVMC (Int_t iproc) const
void DefineParticles ()
Int_t TransportMethod (TMCParticleType particleType) const
TString ParticleClass (TMCParticleType particleType) const
TMCParticleType ParticleType (Int_t itrtyp) const
virtual void SetCollectTracks (Bool_t)
Bool_t IsCollectTracks () const
 TGeant3 (const TGeant3 &)
TGeant3operator= (const TGeant3 &)
Float_t * CreateFloatArray (Float_t *array, Int_t size) const
Float_t * CreateFloatArray (Double_t *array, Int_t size) const
Int_t NextKmat () const
void G3Material (Int_t &kmat, const char *name, Double_t a, Double_t z, Double_t dens, Double_t radl, Double_t absl, Float_t *buf=0, Int_t nwbuf=0)
void G3Mixture (Int_t &kmat, const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nlmat, Float_t *wmat)
void G3Medium (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=0, Int_t nbuf=0)
Int_t G3Gsvolu (const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t np)
void G3Gsposp (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)
Int_t GetIonPdg (Int_t z, Int_t a, Int_t i=0) const
Int_t GetSpecialPdg (Int_t number) const

Protected Attributes

Int_t fNextVol
char fPath [512]
Int_t * fZiq
Int_t * fZlq
 Good Old IQ of Zebra.
Float_t * fZq
 Good Old LQ of Zebra.
Quest_tfQuest
 Good Old Q of Zebra.
Gcbank_tfGcbank
 QUEST common structure.
Gclink_tfGclink
 GCBANK common structure.
Gccuts_tfGccuts
 GCLINK common structure.
Gcmore_tfGcmore
 GCCUTS common structure.
Gcmulo_tfGcmulo
 GCMORE common structure.
Gcmate_tfGcmate
 GCMULO common structure.
Gctpol_tfGctpol
 GCMATE common structure.
Gcnum_tfGcnum
 GCTPOL common structure.
Gcsets_tfGcsets
 GCNUM common structure.
Gcopti_tfGcopti
 GCSETS common structure.
Gctlit_tfGctlit
 GCOPTI common structure.
Gcvdma_tfGcvdma
 GCTLIT common structure.
Gcvolu_tfGcvolu
 GCVDMA common structure.
Gckine_tfGckine
 GCVOLU common structure.
Gcflag_tfGcflag
 GCKINE common structure.
Gctmed_tfGctmed
 GCFLAG common structure.
Gcphys_tfGcphys
 GCTMED common structure.
Gcphlt_tfGcphlt
 GCPHYS common structure.
Gcking_tfGcking
 GCPHLT common structure.
Gckin2_tfGckin2
 GCKING common structure.
Gckin3_tfGckin3
 GCKIN2 common structure.
Gctrak_tfGctrak
 GCKIN3 common structure.
Gcchan_tfGcchan
 GCTRAK common structure.
Gconst_tfGconst
 GCCHAN common structure.
Gconsx_tfGconsx
 GCONST common structure.
Gcjump_tfGcjump
 GCONSX common structure.
Ptopts_tfPtopts
 GCJUMP common structure.
char(* fVolNames )[5]
 PTOPTS common structure.
TObjArray fMedNames
 Names of geant volumes as C++ chars.
Int_t fNG3Particles
 Names of geant medias as TObjString.
Int_t fNPDGCodes
TArrayI fPDGCode
TGeoMCGeometry * fMCGeo
Bool_t fImportRootGeometry
Bool_t fStopRun
Bool_t fSkipNeutrinos
Double_t fUserDecayProductStableMinLifetime

Private Member Functions

Int_t ConvertVolumePathString (const TString &volumeName, Int_t **lnam, Int_t **lnum)
 TRCOM3 common structure.

Detailed Description

Definition at line 662 of file TGeant3.h.


Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
kTRIG 
kSWIT 
kDEBU 
kAUTO 
kABAN 
kOPTI 
kERAN 

Definition at line 1272 of file TGeant3.h.

01272        {kTRIG = BIT(14),
01273         kSWIT = BIT(15),
01274         kDEBU = BIT(16),
01275         kAUTO = BIT(17),
01276         kABAN = BIT(18),
01277         kOPTI = BIT(19),
01278         kERAN = BIT(20)
01279   };


Constructor & Destructor Documentation

TGeant3::TGeant3 (  ) 

Definition at line 1133 of file TGeant3.cxx.

01134   : TVirtualMC(),
01135     fNG3Particles(0),
01136     fNPDGCodes(0),
01137     fPDGCode(),
01138     fMCGeo(0),
01139     fImportRootGeometry(kFALSE),
01140     fStopRun(kFALSE),
01141     fSkipNeutrinos(kTRUE),
01142 //sk:begin Modified S. Kasahara 2007/09/06 Add member to configure user decay
01143     fUserDecayProductStableMinLifetime(1.E-15)
01144 //sk:end
01145 {
01146   //
01147   // Default constructor
01148   //
01149    geant3 = this;
01150 }

TGeant3::TGeant3 ( const char *  title,
Int_t  nwgeant = 0 
)

Definition at line 1153 of file TGeant3.cxx.

References fggperp, fginvol, fglvolu, fgmedia, fgtmany, fgtmedi, fgtnext, fgtonly, fNG3Particles, fNPDGCodes, fPDGCode, g3cinit, g3gperp, g3init, g3invol, g3lvolu, g3media, g3tmany, g3tmedi, g3tnext, g3zebra, g3zinit, gtonlyg3(), InitGEANE(), and LoadAddress().

01154   : TVirtualMC("TGeant3",title, kFALSE),
01155     fNG3Particles(0),
01156     fNPDGCodes(0),
01157     fPDGCode(),
01158     fMCGeo(0),
01159     fImportRootGeometry(kFALSE),
01160     fStopRun(kFALSE),
01161     fSkipNeutrinos(kTRUE),
01162 //sk:begin Modified S. Kasahara 2007/09/06 Add member to configure user decay
01163     fUserDecayProductStableMinLifetime(1.E-15)
01164 //sk:end
01165 {
01166   //
01167   // Standard constructor for TGeant3 with ZEBRA initialization
01168   //
01169 
01170 #ifdef STATISTICS
01171    statfile = new TFile("stat.root","recreate");
01172    stattree = new TTree("stat","stat tree");
01173    stattree->Branch("statcode",&statcode,"statcode/I");
01174    stattree->Branch("statsame",&statsame,"statsame/I");
01175    stattree->Branch("statpath",statpath,"statpath/C");
01176    stattree->Branch("oldvect",oldvect,"oldvect[6]/D");
01177    stattree->Branch("oldsafety",&oldsafety,"oldsafety/D");
01178    stattree->Branch("oldstep",&oldstep,"oldstep/D");
01179    stattree->Branch("snext",&statsnext,"statsnext/D");
01180    stattree->Branch("safety",&statsafety,"statsafety/D");
01181 #endif
01182 
01183   geant3 = this;
01184 
01185   if(nwgeant) {
01186     g3zebra(nwgeant);
01187     g3init();
01188     g3zinit();
01189   } else {
01190     g3cinit();
01191   }
01192   //
01193   // Load Address of Geant3 commons
01194   LoadAddress();
01195   //
01196   // Zero number of particles
01197   fNG3Particles = 0;
01198   fNPDGCodes=0;
01199   
01200   // Set initial size to fPDGCode table
01201   fPDGCode.Set(100);
01202 
01203   //set pointers to tracker functions
01204   fginvol = g3invol;
01205   fgtmedi = g3tmedi;
01206   fgtmany = g3tmany;
01207   fgtonly = gtonlyg3;
01208   fgmedia = g3media;
01209   fglvolu = g3lvolu;
01210   fgtnext = g3tnext;
01211   fggperp = g3gperp;
01212 
01213   InitGEANE();
01214 }

TGeant3::~TGeant3 (  )  [virtual]

Definition at line 1217 of file TGeant3.cxx.

References fVolNames.

01218 {
01219   if(fVolNames) {
01220     delete [] fVolNames;
01221     fVolNames=0;
01222   }
01223 }

TGeant3::TGeant3 ( const TGeant3  )  [inline, protected]

Definition at line 1280 of file TGeant3.h.

01280 : TVirtualMC() {}


Member Function Documentation

void TGeant3::AddParticlesToPdgDataBase (  )  const [virtual]

Definition at line 1372 of file TGeant3.cxx.

References GetIonPdg(), and GetSpecialPdg().

Referenced by DefineParticles().

01373 {
01374 
01375 //
01376 // Add particles to the PDG data base
01377 
01378     TDatabasePDG *pdgDB = TDatabasePDG::Instance();
01379 
01380     const Double_t kAu2Gev=0.9314943228;
01381     const Double_t khSlash = 1.0545726663e-27;
01382     const Double_t kErg2Gev = 1/1.6021773349e-3;
01383     const Double_t khShGev = khSlash*kErg2Gev;
01384     const Double_t kYear2Sec = 3600*24*365.25;
01385 //
01386 // Bottom mesons
01387 // mass and life-time from PDG
01388 //
01389 // Done by default now from Pythia6 table!
01390 //
01391 //
01392 // Ions
01393 //
01394 
01395   if ( !pdgDB->GetParticle(GetIonPdg(1,2)) )
01396     pdgDB->AddParticle("Deuteron","Deuteron",2*kAu2Gev+8.071e-3,kTRUE,
01397                        0,3,"Ion",GetIonPdg(1,2));
01398 
01399   if ( !pdgDB->GetParticle(GetIonPdg(1,3)) )
01400     pdgDB->AddParticle("Triton","Triton",3*kAu2Gev+14.931e-3,kFALSE,
01401                        khShGev/(12.33*kYear2Sec),3,"Ion",GetIonPdg(1,3));
01402 
01403   if ( !pdgDB->GetParticle(GetIonPdg(2,4)) )
01404     pdgDB->AddParticle("Alpha","Alpha",4*kAu2Gev+2.424e-3,kTRUE,
01405                        khShGev/(12.33*kYear2Sec),6,"Ion",GetIonPdg(2,4));
01406 
01407   if ( !pdgDB->GetParticle(GetIonPdg(2,3)) )
01408     pdgDB->AddParticle("HE3","HE3",3*kAu2Gev+14.931e-3,kFALSE,
01409                        0,6,"Ion",GetIonPdg(2,3));
01410 
01411 // Special particles
01412 //
01413   if ( !pdgDB->GetParticle(GetSpecialPdg(50)) )
01414     pdgDB->AddParticle("Cherenkov","Cherenkov",0,kFALSE,
01415                        0,0,"Special",GetSpecialPdg(50));
01416 
01417   if ( !pdgDB->GetParticle(GetSpecialPdg(51)) )
01418     pdgDB->AddParticle("FeedbackPhoton","FeedbackPhoton",0,kFALSE,
01419                        0,0,"Special",GetSpecialPdg(51));
01420 
01421 }

void TGeant3::BuildPhysics (  )  [virtual]

Definition at line 1366 of file TGeant3.cxx.

References Gphysi().

01367 {
01368   Gphysi();
01369 }

Int_t TGeant3::ConvertVolumePathString ( const TString &  volumeName,
Int_t **  lnam,
Int_t **  lnum 
) [private]

TRCOM3 common structure.

Definition at line 7113 of file TGeant3.cxx.

References Error.

Referenced by GetShape(), and GetTransformation().

07114                                                                  {
07115     // Parses the TString volumePath into an array of volume names 
07116     // (4 character long limit) and copy numbers in a form used
07117     // by Geant3.
07118     // Inputs:
07119     //   TString& volumePath  The volume path to the specific volume
07120     //                        for which you want the matrix. Volume name
07121     //                        hierarchy is separated by "/" while the
07122     //                        copy number is appended using a "_".
07123     // Outputs:
07124     //   Int_t lnam           An integer array, created by this routine,
07125     //                        containing the 4 character long volume names.
07126     //   Int_t lnum           An integer array, created by this routine,
07127     //                        containing the copy numbers.
07128     // Return:
07129     //   The size of the arrays lnam an lnum, the number of volumes down
07130     //   the geometry tree. Note, These arrays are allocated within this
07131     //   routine, but must be deleted outside of this routine.
07132     Int_t i,j=0,k=0,ireturn,ichar,*inam;
07133     Char_t *buf,**levels,**copies,nam[4];
07134 
07135     inam = (Int_t*)nam; // Setup to convert character string to integer.
07136     buf = new Char_t[volumePath.Length()+1];
07137     for(i=0;i<volumePath.Length();i++) {
07138         if(volumePath[i]!=' ')buf[j++] = volumePath[i]; // remove blanks
07139         if(volumePath[i]=='/') k++;
07140     } // end for i
07141     buf[j] = '\0';
07142     if(buf[j-1]=='/') {k--; buf[j-1]='\0';}// if path ends with '/' ignore 
07143                                             // it, remove it.
07144     levels = new Char_t*[k];
07145     copies = new Char_t*[k];
07146     (*lnam) = new Int_t[k]; // Allocate Geant3 volume name array
07147     (*lnum) = new Int_t[k]; // Allocate Geant3 copy number array
07148     ireturn = k;
07149     ichar = j;
07150     k = 0;
07151     j = 0;
07152     for(i=0;i<ichar;i++) {
07153         if(buf[i]=='/'){ 
07154             levels[k++] = &(buf[i+1]);
07155             buf[i] = '\0'; // Terminate this sub string.
07156         } // end if == '/'
07157         if(buf[i]=='_'){
07158             copies[j++] = &(buf[i+1]);
07159             buf[i] = '\0'; // Terminate this sub string.
07160         } // end if =='_'
07161     } // end for i
07162     if(k!=j){ // Error, different number of copy numbers and volume names.
07163         // clean up everything.
07164         delete[] buf;
07165         delete[] levels;
07166         delete[] copies;
07167         delete[] (*lnam);
07168         delete[] (*lnum);
07169         (*lnam) = 0;
07170         (*lnum) = 0;
07171         Error("ConvertVolumePathString","Different number of volume names %d"
07172               " and copy numbers %d in volumePath:%s",k,j,volumePath.Data());
07173         return 0;
07174     } // end if k!=j
07175     for(i=0;i<k;i++){
07176         *inam = 0;
07177         (*lnum)[i] = atoi(copies[i]);
07178         for(j=0;j<4;j++) {
07179             if(levels[i][j] == 0) break; // If at end of string exit loop
07180             nam[j] = levels[i][j];
07181         } // end for j
07182         (*lnam)[i] = *inam;
07183     } // end for i
07184     // clean up all but lnam and lnum
07185     delete[] buf;
07186     delete[] levels;
07187     delete[] copies;
07188     return ireturn; // return the size of lnam and lnum. 
07189 }

Float_t * TGeant3::CreateFloatArray ( Double_t *  array,
Int_t  size 
) const [protected]

Definition at line 6578 of file TGeant3.cxx.

06579 {
06580 // Converts Double_t* array to Float_t*,
06581 // !! The new array has to be deleted by user.
06582 // ---
06583 
06584   Float_t* floatArray;
06585   if (size>0) {
06586     floatArray = new Float_t[size];
06587     for (Int_t i=0; i<size; i++)
06588       if (array[i] >= FLT_MAX ) 
06589         floatArray[i] = FLT_MAX/100.;
06590       else      
06591         floatArray[i] = array[i];
06592   }
06593   else {
06594     //floatArray = 0;
06595     floatArray = new Float_t[1];
06596   }
06597   return floatArray;
06598 }

Float_t * TGeant3::CreateFloatArray ( Float_t *  array,
Int_t  size 
) const [protected]

Definition at line 6554 of file TGeant3.cxx.

Referenced by Gdtom(), Gmtod(), Gsposp(), Gsvolu(), TGeant3TGeo::ImportMaterial(), TGeant3TGeo::Material(), Material(), Medium(), TGeant3TGeo::Medium(), TGeant3TGeo::Mixture(), Mixture(), and SetCerenkov().

06555 {
06556 // Converts Double_t* array to Float_t*,
06557 // !! The new array has to be deleted by user.
06558 // ---
06559 
06560   Float_t* floatArray;
06561   if (size>0) {
06562     floatArray = new Float_t[size];
06563     for (Int_t i=0; i<size; i++)
06564       if (array[i] >= FLT_MAX ) 
06565         floatArray[i] = FLT_MAX/100.;
06566       else      
06567         floatArray[i] = array[i];
06568   }
06569   else {
06570     //floatArray = 0;
06571     floatArray = new Float_t[1];
06572   }
06573   return floatArray;
06574 }

Bool_t TGeant3::CurrentBoundaryNormal ( Double_t &  x,
Double_t &  y,
Double_t &  z 
) const

Reimplemented in TGeant3TGeo.

Definition at line 1513 of file TGeant3.cxx.

01514 {                                                                                          
01515 // Return the normal vector of the surface of the last volume exited  
01516 
01517   Warning("CurrentBoundaryNormal", 
01518           "This function is available only in TGeant3TGeo");
01519   return kFALSE;
01520 }                                  

Int_t TGeant3::CurrentEvent (  )  const

Definition at line 2431 of file TGeant3.cxx.

References fGcflag, and Gcflag_t::idevt.

02432 {
02433   //
02434   // Number of the current event
02435   //
02436   return fGcflag->idevt;
02437 }

Int_t TGeant3::CurrentMaterial ( Float_t &  a,
Float_t &  z,
Float_t &  dens,
Float_t &  radl,
Float_t &  absl 
) const

Definition at line 1226 of file TGeant3.cxx.

References Gcmate_t::a, Gcmate_t::absl, Gcmate_t::dens, fGcmate, Gcmate_t::radl, and Gcmate_t::z.

01228 {
01229   //
01230   // Return the parameters of the current material during transport
01231   //
01232   z     = fGcmate->z;
01233   a     = fGcmate->a;
01234   dens  = fGcmate->dens;
01235   radl  = fGcmate->radl;
01236   absl  = fGcmate->absl;
01237   return 1;  //this could be the number of elements in mixture
01238 }

Int_t TGeant3::CurrentMedium (  )  const [virtual]

Definition at line 3036 of file TGeant3.cxx.

References fGctmed, and Gctmed_t::numed.

Referenced by GetMedium().

03037 {
03038   //
03039   // Return the number of the current medium
03040   //
03041 //#ifdef WITHROOT
03042 //  Int_t imed = 0;
03043 //  TGeoNode *node = gGeoManager->GetCurrentNode();
03044 //  if (!node) imed = gGeoManager->GetTopNode()->GetVolume()->
03045 //                                                 GetMedium()->GetId();
03046 //  else       imed = node->GetVolume()->GetMedium()->GetId();
03047   //printf("==GetMedium: ROOT id=%i  numed=%i\n", imed,fGctmed->numed);
03048 //#endif
03049   return fGctmed->numed;
03050 }

Int_t TGeant3::CurrentVolID ( Int_t &  copy  )  const

Reimplemented in TGeant3TGeo.

Definition at line 1425 of file TGeant3.cxx.

References fGclink, fGcvolu, fZiq, Gclink_t::jvolum, Gcvolu_t::lvolum, Gcvolu_t::names, Gcvolu_t::nlevel, and Gcvolu_t::number.

01426 {
01427   //
01428   // Returns the current volume ID and copy number
01429   //
01430   Int_t i, gname;
01431   if( (i=fGcvolu->nlevel-1) < 0 ) {
01432     Warning("CurrentVolID","Stack depth only %d\n",fGcvolu->nlevel);
01433   } else {
01434     gname=fGcvolu->names[i];
01435     copy=fGcvolu->number[i];
01436     i=fGcvolu->lvolum[i];
01437     if(gname == fZiq[fGclink->jvolum+i]) return i;
01438     else Warning("CurrentVolID","Volume %4s not found\n",(char*)&gname);
01439   }
01440   return 0;
01441 }

const char * TGeant3::CurrentVolName (  )  const

Reimplemented in TGeant3TGeo.

Definition at line 1465 of file TGeant3.cxx.

References fGclink, fGcvolu, fVolNames, fZiq, Gclink_t::jvolum, Gcvolu_t::lvolum, Gcvolu_t::names, and Gcvolu_t::nlevel.

01466 {
01467   //
01468   // Returns the current volume name
01469   //
01470   Int_t i;
01471   if( (i=fGcvolu->nlevel-1) < 0 ) {
01472     Warning("CurrentVolName","Stack depth %d\n",fGcvolu->nlevel);
01473     return 0;
01474   }
01475   Int_t gname=fGcvolu->names[i];
01476   i=fGcvolu->lvolum[i];
01477   if(gname == fZiq[fGclink->jvolum+i]) return fVolNames[i-1];
01478   else Warning("CurrentVolName","Volume %4s not found\n",(char*) &gname);
01479   return 0;
01480 }

Int_t TGeant3::CurrentVolOffID ( Int_t  off,
Int_t &  copy 
) const

Reimplemented in TGeant3TGeo.

Definition at line 1444 of file TGeant3.cxx.

References fGclink, fGcvolu, fZiq, Gclink_t::jvolum, Gcvolu_t::lvolum, Gcvolu_t::names, Gcvolu_t::nlevel, and Gcvolu_t::number.

01445 {
01446   //
01447   // Return the current volume "off" upward in the geometrical tree
01448   // ID and copy number
01449   //
01450   Int_t i, gname;
01451   if( (i=fGcvolu->nlevel-off-1) < 0 ) {
01452     Warning("CurrentVolOffID","Offset requested %d but stack depth %d\n",
01453             off,fGcvolu->nlevel);
01454   } else {
01455     gname=fGcvolu->names[i];
01456     copy=fGcvolu->number[i];
01457     i=fGcvolu->lvolum[i];
01458     if(gname == fZiq[fGclink->jvolum+i]) return i;
01459     else Warning("CurrentVolOffID","Volume %4s not found\n",(char*)&gname);
01460   }
01461   return 0;
01462 }

const char * TGeant3::CurrentVolOffName ( Int_t  off  )  const

Reimplemented in TGeant3TGeo.

Definition at line 1483 of file TGeant3.cxx.

References fGclink, fGcvolu, fVolNames, fZiq, Gclink_t::jvolum, Gcvolu_t::lvolum, Gcvolu_t::names, and Gcvolu_t::nlevel.

01484 {
01485   //
01486   // Return the current volume "off" upward in the geometrical tree
01487   // ID, name and copy number
01488   // if name=0 no name is returned
01489   //
01490   Int_t i;
01491   if( (i=fGcvolu->nlevel-off-1) < 0 ) {
01492     Warning("CurrentVolOffName",
01493             "Offset requested %d but stack depth %d\n",off,fGcvolu->nlevel);
01494     return 0;
01495   }
01496   Int_t gname=fGcvolu->names[i];
01497   i=fGcvolu->lvolum[i];
01498   if(gname == fZiq[fGclink->jvolum+i]) return fVolNames[i-1];
01499   else Warning("CurrentVolOffName","Volume %4s not found\n",(char*)&gname);
01500   return 0;
01501 }

const char * TGeant3::CurrentVolPath (  ) 

Reimplemented in TGeant3TGeo.

Definition at line 1504 of file TGeant3.cxx.

References GetPath().

01505 {
01506 // Return the path in geometry tree for the current volume
01507 // ---
01508 
01509   return GetPath();
01510 }

void TGeant3::DefaultRange (  )  [virtual]

Definition at line 1241 of file TGeant3.cxx.

01242 {
01243   //
01244   // Set range of current drawing pad to 20x20 cm
01245   //
01246 }

Bool_t TGeant3::DefineIon ( const char *  name,
Int_t  Z,
Int_t  A,
Int_t  Q,
Double_t  excEnergy,
Double_t  mass 
)

Definition at line 2136 of file TGeant3.cxx.

References DefineParticle(), MuELoss::e, and GetIonPdg().

02138 {
02139 //
02140 // Set a user defined ion.
02141 // ---
02142 
02143   // Define pdgEncoding
02144   //
02145   Int_t pdg = GetIonPdg(Z, A);
02146   Int_t pdgMax = pdg + 9;
02147 
02148   // Find isomer number which is not yet used
02149   while (TDatabasePDG::Instance()->GetParticle(pdg) &&
02150          pdg < pdgMax)
02151       pdg++;
02152   if (TDatabasePDG::Instance()->GetParticle(pdg)) {
02153       Fatal("SetIon", "All isomer numbers are already used");
02154       return kFALSE;
02155   }
02156 
02157   // Particle properties
02158         // excitation energy not used by G3
02159   if (mass < 1e-09) mass = 0.9382723 * A;
02160      // approximative mass if not specified by user
02161   Double_t charge = Q;
02162   TMCParticleType partType = kPTIon;
02163   Double_t lifetime = 1.e20;
02164 
02165   // Call DefineParticle now
02166   return DefineParticle(
02167            pdg, name, partType, mass, charge, lifetime,
02168            "nucleus", 0.0, 1, 1, 0, 1, 1, 0, 0, 1, kTRUE);
02169 }

void TGeant3::DefineOpSurface ( const char *  name,
EMCOpSurfaceModel  model,
EMCOpSurfaceType  surfaceType,
EMCOpSurfaceFinish  surfaceFinish,
Double_t  sigmaAlpha 
) [virtual]

Definition at line 3675 of file TGeant3.cxx.

References Form().

03678 {
03679    
03680    Warning("DefineOpSurface", "%s",
03681            Form("Called for surface %s. Not applicable in Geant3 - setting is ignored.", name));
03682 }   

Bool_t TGeant3::DefineParticle ( Int_t  pdg,
const char *  name,
TMCParticleType  mcType,
Double_t  mass,
Double_t  charge,
Double_t  lifetime,
const TString &  ,
Double_t  ,
Int_t  ,
Int_t  ,
Int_t  ,
Int_t  ,
Int_t  ,
Int_t  ,
Int_t  ,
Int_t  ,
Bool_t  ,
Bool_t  = kFALSE,
const TString &  = "",
Int_t  = 0,
Double_t  = 0.0,
Double_t  = 0.0 
)

Definition at line 2085 of file TGeant3.cxx.

References Error, fNG3Particles, fNPDGCodes, fPDGCode, Gspart(), IdFromPDG(), ParticleClass(), and TransportMethod().

02095 {
02096 //
02097 // Set a user defined particle
02098 // Function is ignored if particle with specified pdg
02099 // already exists and error report is printed.
02100 // ---
02101 
02102   // Check if particle with specified pdg already exists
02103   // in TGeant3
02104   if (IdFromPDG(pdg) > 0) {
02105     Error("SetParticle", "Particle already exists.");
02106     return kFALSE;
02107   }
02108 
02109   // Check if particle type is known to Geant3
02110   Int_t itrtyp = TransportMethod(mcType);
02111   if (itrtyp < 0) {
02112     Error("SetParticle", "Unknown particle transport.");
02113     return kFALSE;
02114   }
02115 
02116   // Add particle to Geant3
02117   Gspart(fNG3Particles++, name, itrtyp, mass, charge, lifetime);
02118 
02119   // Add particle to TDatabasePDG
02120   // (if it does not yet exist here)
02121   if (!TDatabasePDG::Instance()->GetParticle(pdg))
02122     TDatabasePDG::Instance()
02123       ->AddParticle(name, name, mass, kTRUE, 0, charge*3,
02124                     ParticleClass(mcType).Data(), pdg);
02125                     
02126   // Resize fPDGCode table if needed
02127   if ( fNPDGCodes >= fPDGCode.GetSize() ) 
02128     fPDGCode.Set( fPDGCode.GetSize() + 100);                 
02129 
02130   fPDGCode[fNPDGCodes++] = pdg;
02131 
02132   return kTRUE;
02133 }

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

Definition at line 2073 of file TGeant3.cxx.

Referenced by DefineIon().

02075 {
02076 // Old function definition, now replaced with more arguments
02077 
02078   TVirtualMC::DefineParticle(pdg, name, type, mass, charge, lifetime);
02079   
02080   return false;
02081 }                        

void TGeant3::DefineParticles (  )  [protected]

Definition at line 1544 of file TGeant3.cxx.

References AddParticlesToPdgDataBase(), MuELoss::e, fNG3Particles, fNPDGCodes, fPDGCode, GetIonPdg(), GetSpecialPdg(), Gpart(), Gsdk(), Gspart(), and mode.

Referenced by Init().

01545 {
01546   //
01547   // Define standard Geant 3 particles
01548   Gpart();
01549   //
01550   // Load standard numbers for GEANT particles and PDG conversion
01551   fPDGCode[fNPDGCodes++]=-99;   //  0 = unused location
01552   fPDGCode[fNPDGCodes++]=22;    //  1 = photon
01553   fPDGCode[fNPDGCodes++]=-11;   //  2 = positron
01554   fPDGCode[fNPDGCodes++]=11;    //  3 = electron
01555   fPDGCode[fNPDGCodes++]=12;    //  4 = neutrino e
01556   fPDGCode[fNPDGCodes++]=-13;   //  5 = muon +
01557   fPDGCode[fNPDGCodes++]=13;    //  6 = muon -
01558   fPDGCode[fNPDGCodes++]=111;   //  7 = pi0
01559   fPDGCode[fNPDGCodes++]=211;   //  8 = pi+
01560   fPDGCode[fNPDGCodes++]=-211;  //  9 = pi-
01561   fPDGCode[fNPDGCodes++]=130;   // 10 = Kaon Long
01562   fPDGCode[fNPDGCodes++]=321;   // 11 = Kaon +
01563   fPDGCode[fNPDGCodes++]=-321;  // 12 = Kaon -
01564   fPDGCode[fNPDGCodes++]=2112;  // 13 = Neutron
01565   fPDGCode[fNPDGCodes++]=2212;  // 14 = Proton
01566   fPDGCode[fNPDGCodes++]=-2212; // 15 = Anti Proton
01567   fPDGCode[fNPDGCodes++]=310;   // 16 = Kaon Short
01568   fPDGCode[fNPDGCodes++]=221;   // 17 = Eta
01569   fPDGCode[fNPDGCodes++]=3122;  // 18 = Lambda
01570   fPDGCode[fNPDGCodes++]=3222;  // 19 = Sigma +
01571   fPDGCode[fNPDGCodes++]=3212;  // 20 = Sigma 0
01572   fPDGCode[fNPDGCodes++]=3112;  // 21 = Sigma -
01573   fPDGCode[fNPDGCodes++]=3322;  // 22 = Xi0
01574   fPDGCode[fNPDGCodes++]=3312;  // 23 = Xi-
01575   fPDGCode[fNPDGCodes++]=3334;  // 24 = Omega-
01576   fPDGCode[fNPDGCodes++]=-2112; // 25 = Anti Neutron
01577   fPDGCode[fNPDGCodes++]=-3122; // 26 = Anti Lambda
01578   fPDGCode[fNPDGCodes++]=-3222; // 27 = Anti Sigma -
01579   fPDGCode[fNPDGCodes++]=-3212; // 28 = Anti Sigma 0
01580   fPDGCode[fNPDGCodes++]=-3112; // 29 = Anti Sigma +
01581   fPDGCode[fNPDGCodes++]=-3322; // 30 = Anti Xi 0      
01582   fPDGCode[fNPDGCodes++]=-3312; // 31 = Anti Xi +
01583   fPDGCode[fNPDGCodes++]=-3334; // 32 = Anti Omega +
01584 
01585 
01586   Int_t mode[6];
01587   Int_t kz, ipa;
01588   Float_t bratio[6];
01589 
01590   fNG3Particles = 33;
01591 
01592   /* --- Define additional particles */
01593   Gspart(fNG3Particles++,"OMEGA(782)",3,0.782,0.,7.836e-23);// 33 = OMEGA(782)
01594   fPDGCode[fNPDGCodes++]=223;   // 33 = Omega(782)
01595 
01596   Gspart(fNG3Particles++,"PHI(1020)",3,1.019,0.,1.486e-22);// 34 = PHI(1020)
01597   fPDGCode[fNPDGCodes++]=333;   // 34 = PHI (1020)
01598 
01599   Gspart(fNG3Particles++, "D +", 4, 1.8693, 1., 1.040e-12);      // 35 = D+        // G4DMesonPlus
01600   fPDGCode[fNPDGCodes++]=411;   // 35 = D+
01601 
01602   Gspart(fNG3Particles++, "D -", 4, 1.8693, -1., 1.040e-12);     // 36 = D-        // G4DMesonMinus
01603   fPDGCode[fNPDGCodes++]=-411;  // 36 = D-
01604 
01605   Gspart(fNG3Particles++, "D 0", 3, 1.8645, 0., 0.415e-12);      // 37 = D0        // G4DMesonZero
01606   fPDGCode[fNPDGCodes++]=421;   // 37 = D0
01607 
01608   Gspart(fNG3Particles++,"ANTI D 0",3,1.8645,0.,0.415e-12);      // 38 = Anti D0   // G4AntiDMesonZero
01609   fPDGCode[fNPDGCodes++]=-421;  // 38 = D0 bar
01610 
01611 
01612   fNG3Particles++;
01613   fPDGCode[fNPDGCodes++]=-99;  // 39 = unassigned
01614 
01615   fNG3Particles++;
01616   fPDGCode[fNPDGCodes++]=-99;  // 40 = unassigned
01617 
01618   fNG3Particles++;
01619   fPDGCode[fNPDGCodes++]=-99;  // 41 = unassigned
01620 
01621   Gspart(fNG3Particles++, "RHO +", 4, 0.768, 1., 4.353e-24);  // 42 = Rho+
01622   fPDGCode[fNPDGCodes++]=213;   // 42 = RHO+
01623 
01624   Gspart(fNG3Particles++, "RHO -", 4, 0.768, -1., 4.353e-24); // 43 = Rho-
01625   fPDGCode[fNPDGCodes++]=-213;   // 43 = RHO-
01626 
01627   Gspart(fNG3Particles++, "RHO 0", 3, 0.768, 0., 4.353e-24);  // 44 = Rho0
01628   fPDGCode[fNPDGCodes++]=113;   //  44 = RHO0
01629 
01630 //
01631 // Ions
01632 
01633   fNG3Particles++;
01634   fPDGCode[fNPDGCodes++]=GetIonPdg(1, 2); // 45 = Deuteron
01635 
01636   fNG3Particles++;
01637   fPDGCode[fNPDGCodes++]=GetIonPdg(1, 3); // 46 = Triton
01638 
01639   fNG3Particles++;
01640   fPDGCode[fNPDGCodes++]=GetIonPdg(2, 4); // 47 = Alpha
01641 
01642   fNG3Particles++;
01643   fPDGCode[fNPDGCodes++]=0;               // 48 = geantino mapped to rootino
01644 
01645   fNG3Particles++;
01646   fPDGCode[fNPDGCodes++]=GetIonPdg(2, 3); // 49 = HE3
01647 
01648   fNG3Particles++;
01649   fPDGCode[fNPDGCodes++]=GetSpecialPdg(50); // 50 = Cherenkov
01650 // special
01651   Gspart(fNG3Particles++, "FeedbackPhoton", 7, 0., 0.,1.e20 );
01652   fPDGCode[fNPDGCodes++]=GetSpecialPdg(51); // 51 = FeedbackPhoton
01653 //
01654 
01655   Gspart(fNG3Particles++, "Lambda_c-", 4, 2.28646, +1., 2.06e-13);
01656   // Gspart(fNG3Particles++, "Lambda_c+", 4, 2.28646, +1., 0.200e-12); // G4LambdacPlus
01657   fPDGCode[fNPDGCodes++]=4122;         //52 = Lambda_c+
01658 
01659   Gspart(fNG3Particles++, "Lambda_c-", 4, 2.28646, -1., 2.06e-13);
01660   // Gspart(fNG3Particles++, "Lambda_c-", 4, 2.2849, -1., 0.200e-12);  // G4AntiLamdacPlus
01661   fPDGCode[fNPDGCodes++]=-4122;        //53 = Lambda_c-
01662 
01663   Gspart(fNG3Particles++, "D_s+", 4, 1.9682, +1., 0.490e-12);       // G4DsMesonPlus * booklet (July 2006): lifetime=0.500e-12  
01664   fPDGCode[fNPDGCodes++]=431;          //54 = D_s+
01665 
01666   Gspart(fNG3Particles++, "D_s-", 4, 1.9682, -1., 0.490e-12);       // G4DsMesonMinus * booklet: lifetime=0.500e-12
01667   fPDGCode[fNPDGCodes++]=-431;         //55 = D_s-
01668 
01669   Gspart(fNG3Particles++, "Tau+", 5, 1.77699, +1., 290.6e-15);      // G4TauPlus *
01670   fPDGCode[fNPDGCodes++]=-15;          //56 = Tau+
01671 
01672   Gspart(fNG3Particles++, "Tau-", 5, 1.77699, -1., 290.6e-15);      // G4TauMinus *
01673   fPDGCode[fNPDGCodes++]= 15;          //57 = Tau-
01674 
01675   Gspart(fNG3Particles++, "B0",     3, 5.2794, +0., 1.532e-12);     // G4BMesonZero
01676   fPDGCode[fNPDGCodes++]=511;          //58 = B0
01677 
01678   Gspart(fNG3Particles++, "B0 bar", 3, 5.2794, -0., 1.532e-12);     // G4AntiBMesonZero
01679   fPDGCode[fNPDGCodes++]=-511;         //58 = B0bar
01680 
01681   Gspart(fNG3Particles++, "B+",     4, 5.2790, +1., 1.638e-12);     // G4BMesonPlus *
01682   fPDGCode[fNPDGCodes++]=521;          //60 = B+
01683 
01684   Gspart(fNG3Particles++, "B-",     4, 5.2790, -1., 1.638e-12);     // G4BMesonMinus *
01685   fPDGCode[fNPDGCodes++]=-521;         //61 = B-
01686 
01687   Gspart(fNG3Particles++, "Bs",     3, 5.3675, +0., 1.466e-12);     // G4BsMesonZero
01688   fPDGCode[fNPDGCodes++]=531;          //62 = B_s
01689 
01690   Gspart(fNG3Particles++, "Bs bar", 3, 5.3675, -0., 1.466e-12);     // G4AntiBsMesonZero
01691   fPDGCode[fNPDGCodes++]=-531;         //63 = B_s bar
01692 
01693   Gspart(fNG3Particles++, "Lambda_b",     3, 5.624, +0., 1.24e-12);
01694   fPDGCode[fNPDGCodes++]=5122;         //64 = Lambda_b
01695 
01696   Gspart(fNG3Particles++, "Lambda_b bar", 3, 5.624, -0., 1.24e-12);
01697   fPDGCode[fNPDGCodes++]=-5122;        //65 = Lambda_b bar
01698 
01699   Gspart(fNG3Particles++, "J/Psi",       3, 3.096916, 0., 7.6e-21);   // G4JPsi
01700   fPDGCode[fNPDGCodes++]=443;          // 66 = J/Psi
01701 
01702   Gspart(fNG3Particles++, "Psi Prime",   3, 3.686,   0., 0.);
01703   fPDGCode[fNPDGCodes++]=20443;        // 67 = Psi prime
01704 
01705   Gspart(fNG3Particles++, "Upsilon(1S)", 3, 9.46037, 0., 0.);
01706   fPDGCode[fNPDGCodes++]=553;          // 68 = Upsilon(1S)
01707 
01708   Gspart(fNG3Particles++, "Upsilon(2S)", 3, 10.0233, 0., 0.);
01709   fPDGCode[fNPDGCodes++]=20553;        // 69 = Upsilon(2S)
01710 
01711   Gspart(fNG3Particles++, "Upsilon(3S)", 3, 10.3553, 0., 0.);
01712   fPDGCode[fNPDGCodes++]=30553;        // 70 = Upsilon(3S)
01713 
01714   Gspart(fNG3Particles++, "Anti Neutrino (e)",       3, 0., 0., 1.e20);
01715   fPDGCode[fNPDGCodes++]=-12;          // 71 = anti electron neutrino
01716 
01717   Gspart(fNG3Particles++, "Neutrino (mu)",           3, 0., 0., 1.e20);
01718   fPDGCode[fNPDGCodes++]=14;           // 72 = muon neutrino
01719 
01720   Gspart(fNG3Particles++, "Anti Neutrino (mu)", 3, 0., 0., 1.e20);
01721   fPDGCode[fNPDGCodes++]=-14;          // 73 = anti muon neutrino
01722 
01723   Gspart(fNG3Particles++, "Neutrino (tau)",     3, 0., 0., 1.e20);
01724   fPDGCode[fNPDGCodes++]=16;           // 74 = tau neutrino
01725 
01726   Gspart(fNG3Particles++, "Anti Neutrino (tau)",3, 0., 0., 1.e20);
01727   fPDGCode[fNPDGCodes++]=-16;          // 75 = anti tau neutrino
01728 
01729 /* --- Define additional decay modes --- */
01730 /* --- omega(783) --- */
01731     for (kz = 0; kz < 6; ++kz) {
01732         bratio[kz] = 0.;
01733         mode[kz] = 0;
01734     }
01735     ipa = 33;
01736     bratio[0] = 89.;
01737     bratio[1] = 8.5;
01738     bratio[2] = 2.5;
01739     mode[0] = 70809;
01740     mode[1] = 107;
01741     mode[2] = 908;
01742     Gsdk(ipa, bratio, mode);
01743 /* --- phi(1020) --- */
01744     for (kz = 0; kz < 6; ++kz) {
01745         bratio[kz] = 0.;
01746         mode[kz] = 0;
01747     }
01748     ipa = 34;
01749     bratio[0] = 49.;
01750     bratio[1] = 34.4;
01751     bratio[2] = 12.9;
01752     bratio[3] = 2.4;
01753     bratio[4] = 1.3;
01754     mode[0] = 1112;
01755     mode[1] = 1610;
01756     mode[2] = 4407;
01757     mode[3] = 90807;
01758     mode[4] = 1701;
01759     Gsdk(ipa, bratio, mode);
01760 /* --- D+ --- */
01761     /*
01762     for (kz = 0; kz < 6; ++kz) {
01763         bratio[kz] = 0.;
01764         mode[kz] = 0;
01765     }
01766     ipa = 35;
01767     bratio[0] = 25.;
01768     bratio[1] = 25.;
01769     bratio[2] = 25.;
01770     bratio[3] = 25.;
01771     mode[0] = 80809;
01772     mode[1] = 120808;
01773     mode[2] = 111208;
01774     mode[3] = 110809;
01775     Gsdk(ipa, bratio, mode);
01776     */
01777 /* --- D- --- */
01778     /*
01779     for (kz = 0; kz < 6; ++kz) {
01780         bratio[kz] = 0.;
01781         mode[kz] = 0;
01782     }
01783     ipa = 36;
01784     bratio[0] = 25.;
01785     bratio[1] = 25.;
01786     bratio[2] = 25.;
01787     bratio[3] = 25.;
01788     mode[0] = 90908;
01789     mode[1] = 110909;
01790     mode[2] = 121109;
01791     mode[3] = 120908;
01792     Gsdk(ipa, bratio, mode);
01793     */
01794 /* --- D0 --- */
01795     /*
01796     for (kz = 0; kz < 6; ++kz) {
01797         bratio[kz] = 0.;
01798         mode[kz] = 0;
01799     }
01800     ipa = 37;
01801     bratio[0] = 33.;
01802     bratio[1] = 33.;
01803     bratio[2] = 33.;
01804     mode[0] = 809;
01805     mode[1] = 1208;
01806     mode[2] = 1112;
01807     Gsdk(ipa, bratio, mode);
01808     */
01809 /* --- Anti D0 --- */
01810     /*
01811     for (kz = 0; kz < 6; ++kz) {
01812         bratio[kz] = 0.;
01813         mode[kz] = 0;
01814     }
01815     ipa = 38;
01816     bratio[0] = 33.;
01817     bratio[1] = 33.;
01818     bratio[2] = 33.;
01819     mode[0] = 809;
01820     mode[1] = 1109;
01821     mode[2] = 1112;
01822     Gsdk(ipa, bratio, mode);
01823     */
01824 /* --- rho+ --- */
01825     for (kz = 0; kz < 6; ++kz) {
01826         bratio[kz] = 0.;
01827         mode[kz] = 0;
01828     }
01829     ipa = 42;
01830     bratio[0] = 100.;
01831     mode[0] = 807;
01832     Gsdk(ipa, bratio, mode);
01833 /* --- rho- --- */
01834     for (kz = 0; kz < 6; ++kz) {
01835         bratio[kz] = 0.;
01836         mode[kz] = 0;
01837     }
01838     ipa = 43;
01839     bratio[0] = 100.;
01840     mode[0] = 907;
01841     Gsdk(ipa, bratio, mode);
01842 /* --- rho0 --- */
01843     for (kz = 0; kz < 6; ++kz) {
01844         bratio[kz] = 0.;
01845         mode[kz] = 0;
01846     }
01847     ipa = 44;
01848     bratio[0] = 100.;
01849     mode[0] = 809;
01850     Gsdk(ipa, bratio, mode);
01851     /*
01852 // --- jpsi ---
01853     for (kz = 0; kz < 6; ++kz) {
01854         bratio[kz] = 0.;
01855         mode[kz] = 0;
01856     }
01857     ipa = 113;
01858     bratio[0] = 50.;
01859     bratio[1] = 50.;
01860     mode[0] = 506;
01861     mode[1] = 605;
01862     Gsdk(ipa, bratio, mode);
01863 // --- upsilon ---
01864     ipa = 114;
01865     Gsdk(ipa, bratio, mode);
01866 // --- phi ---
01867     ipa = 115;
01868     Gsdk(ipa, bratio, mode);
01869     */
01870 //
01871     AddParticlesToPdgDataBase();
01872 }

void TGeant3::DrawOneSpec ( const char *  name  )  [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4914 of file TGeant3.cxx.

04915 {
04916   //
04917   //  Function called when one double-clicks on a volume name
04918   //  in a TPavelabel drawn by Gdtree.
04919   //
04920 }

Double_t TGeant3::Edep (  )  const [virtual]

Definition at line 3131 of file TGeant3.cxx.

References Gctrak_t::destep, and fGctrak.

03132 {
03133   //
03134   // Return the energy lost in the current step
03135   //
03136   return fGctrak->destep;
03137 }

virtual Eroptc_t* TGeant3::Eroptc (  )  const [inline, virtual]

Definition at line 865 of file TGeant3.h.

References fEroptc.

00865 {return fEroptc;}

virtual Eropts_t* TGeant3::Eropts (  )  const [inline, virtual]

Definition at line 864 of file TGeant3.h.

References fEropts.

00864 {return fEropts;}

void TGeant3::Ertrak ( const Float_t *  x1,
const Float_t *  p1,
const Float_t *  x2,
const Float_t *  p2,
Int_t  ipa,
Option_t *  chopt 
) [virtual]

Definition at line 5526 of file TGeant3.cxx.

References ertrak, PASSCHARD, and PASSCHARL.

05529 {
05530   //************************************************************************
05531   //*                                                                      *
05532   //*          Perform the tracking of the track from point X1 to          *
05533   //*                    point X2                                          *
05534   //*          (Before calling this routine the user should also provide   *
05535   //*                    the input informations in /EROPTS/ and /ERTRIO/   *
05536   //*                    using subroutine EUFIL(L/P/V)                     *
05537   //*                 X1       - Starting coordinates (Cartesian)          *
05538   //*                 P1       - Starting 3-momentum  (Cartesian)          *
05539   //*                 X2       - Final coordinates    (Cartesian)          *
05540   //*                 P2       - Final 3-momentum     (Cartesian)          *
05541   //*                 IPA      - Particle code (a la GEANT) of the track   *
05542   //*                                                                      *
05543   //*                 CHOPT                                                *
05544   //*                     'B'   'Backward tracking' - i.e. energy loss     *
05545   //*                                        added to the current energy   *
05546   //*                     'E'   'Exact' calculation of errors assuming     *
05547   //*                                        helix (i.e. path-length not   *
05548   //*                                        assumed as infinitesimal)     *
05549   //*                     'L'   Tracking up to prescribed Lengths reached  *
05550   //*                     'M'   'Mixed' prediction (not yet coded)         *
05551   //*                     'O'   Tracking 'Only' without calculating errors *
05552   //*                     'P'   Tracking up to prescribed Planes reached   *
05553   //*                     'V'   Tracking up to prescribed Volumes reached  *
05554   //*                     'X'   Tracking up to prescribed Point approached *
05555   //*                                                                      *
05556   //*                Interface with GEANT :                                *
05557   //*             Track parameters are in /CGKINE/ and /GCTRAK/            *
05558   //*                                                                      *
05559   //*          ==>Called by : USER                                         *
05560   //*             Authors   M.Maire, E.Nagy  ********//*                   *
05561   //*                                                                      *
05562   //************************************************************************
05563   ertrak(x1,p1,x2,p2,ipa,PASSCHARD(chopt) PASSCHARL(chopt));
05564 }

void TGeant3::Ertrgo (  )  [virtual]

Definition at line 5517 of file TGeant3.cxx.

References ertrgo.

05518 {
05519   //
05520   // Perform the tracking of the track Track parameters are in VECT
05521   //
05522   ertrgo();
05523 }

virtual Ertrio_t* TGeant3::Ertrio (  )  const [inline, virtual]

Definition at line 863 of file TGeant3.h.

References fErtrio.

00863 {return fErtrio;}

virtual Erwork_t* TGeant3::Erwork (  )  const [inline, virtual]

Definition at line 866 of file TGeant3.h.

References fErwork.

00866 {return fErwork;}

void TGeant3::Erxyzc (  )  [virtual]

Definition at line 5566 of file TGeant3.cxx.

References erxyzc.

Referenced by eustep().

05566                     {
05567 //
05568 //    ******************************************************************
05569 //    *                                                                *
05570 //    *        Print track and volume parameters at current point      *
05571 //    *                                                                *
05572 //    *    ==>Called by : <USER,EUSTEP>                                *
05573 //    *       Author    R.Brun  *********                              *
05574 //    *                                                                *
05575 //    ******************************************************************
05576 //
05577 
05578 
05579   erxyzc();
05580 }

Double_t TGeant3::Etot (  )  const [virtual]

Definition at line 3140 of file TGeant3.cxx.

References fGctrak, and Gctrak_t::getot.

03141 {
03142   //
03143   // Return the total energy of the current track
03144   //
03145   return fGctrak->getot;
03146 }

void TGeant3::Eufill ( Int_t  n,
Float_t *  ein,
Float_t *  xlf 
) [virtual]

Definition at line 5584 of file TGeant3.cxx.

References Eropts_t::erleng, Ertrio_t::errin, fEropts, fErtrio, and Ertrio_t::nepred.

05584                                                      {
05585 
05586 // C.    ******************************************************************
05587 // C.    *                                                                *
05588 // C.    *    User routine to fill the input values of the commons :      *
05589 // C.    *               /EROPTS/, /EROPTC/ and /ERTRIO/ for CHOPT = 'L'  *
05590 // C.    *         N     Number of predictions where to store results     *
05591 // C.    *         EIN   Input error matrix                               *
05592 // C.    *         XLF   Defines the tracklengths which if passed the     *
05593 // C.    *                      result should be stored                   *
05594 // C.    *                                                                *
05595 // C.    *                                                                *
05596 // C.    *    ==>Called by : USER (before calling ERTRAK)                 *
05597 // C.    *       Author    M.Maire, E.Nagy  *********                     *
05598 // C.    *                                                                *
05599 // C.    ******************************************************************
05600    for(Int_t i=0;i<15;i++) fErtrio->errin[i]=ein[i]; 
05601    const Int_t mxpred=10;
05602    if (n<mxpred) {
05603       fErtrio->nepred=n;
05604     } else {
05605      fErtrio->nepred=mxpred;
05606    } 
05607    for(Int_t i=0;i<15;i++) fErtrio->errin[i]=ein[i]; 
05608    for(Int_t i=0;i<fErtrio->nepred;i++) fEropts->erleng[i]=xlf[i]; 
05609 //  eufill(n,ein,xlf);
05610 }

void TGeant3::Eufilp ( const Int_t  n,
Float_t *  ein,
Float_t *  pli,
Float_t *  plf 
) [virtual]

Definition at line 5612 of file TGeant3.cxx.

References Eropts_t::erpli, Eropts_t::erplo, Ertrio_t::errin, fEropts, fErtrio, for(), and Ertrio_t::nepred.

05614 {
05615   //    ******************************************************************
05616   //    *                                                                *
05617   //    *    User routine to fill the input values of the commons :      *
05618   //    *               /EROPTS/, /EROPTC/ and /ERTRIO/ for CHOPT = 'P'  *
05619   //    *         N     Number of predictions where to store results     *
05620   //    *         EIN   Input error matrix (in the 'Plane' system )      *
05621   //    *         PLI   Defines the start plane                          *
05622   //    *                      PLI(3,1) - and                            *
05623   //    *                      PLI(3,2) - 2 unit vectors in the plane    *
05624   //    *         PLF   Defines the end plane                            *
05625   //    *                      PLF(3,1,I) - and                          *
05626   //    *                      PLF(3,2,I) - 2 unit vectors in the plane  *
05627   //    *                      PLF(3,3,I) - point on the plane           *
05628   //    *                                   at intermediate point I      *
05629   //    *                                                                *
05630   //    *    ==>Called by : USER (before calling ERTRAK)                 *
05631   //    *       Author    M.Maire, E.Nagy  *********                     *
05632   //    *                                                                *
05633   //    ******************************************************************
05634    for(Int_t i=0;i<15;i++) fErtrio->errin[i]=ein[i]; 
05635    const Int_t mxpred=10;
05636    if (n<mxpred) {
05637       fErtrio->nepred=n;
05638     } else {
05639      fErtrio->nepred=mxpred;
05640    } 
05641    for(Int_t i=0;i<6;i++) fEropts->erpli[i]=pli[i]; 
05642 
05643    for (Int_t j=0;j<n;j++) {
05644      for(Int_t i=0;i<9;i++) {
05645        fEropts->erplo[i+12*j]=plf[i+12*j]; 
05646      }
05647      TVector3 v1(fEropts->erplo[0+12*j],fEropts->erplo[1+12*j],fEropts->erplo[2+12*j]);
05648      TVector3 v2(fEropts->erplo[3+12*j],fEropts->erplo[4+12*j],fEropts->erplo[5+12*j]);
05649      TVector3 v3=v1.Cross(v2);
05650      fEropts->erplo[9]=v3(0);
05651      fEropts->erplo[10]=v3(1);
05652      fEropts->erplo[11]=v3(2);
05653    }
05654 
05655 
05656 }

void TGeant3::Eufilv ( Int_t  n,
Float_t *  ein,
Char_t *  namv,
Int_t *  numv,
Int_t *  iovl 
) [virtual]

Definition at line 5657 of file TGeant3.cxx.

References Ertrio_t::errin, fEropts, fErtrio, Eropts_t::iovler, Eropts_t::nameer, Ertrio_t::nepred, and Eropts_t::numver.

05659 {
05660 
05661   //    ******************************************************************
05662   //    *                                                                *
05663   //    *    User routine to fill the input values of the commons :      *
05664   //    *               /EROPTS/, /EROPTC/ and /ERTRIO/ for CHOPT = 'V'  *
05665   //    *         N     Number of predictions where to store results     *
05666   //    *         EIN   Input error matrix                               *
05667   //    *        CNAMV  Volume name of the prediction                    *
05668   //    *        NUMV   Volume number (if 0 = all volumes)               *
05669   //    *        IOVL   = 1  prediction when entering in the volume      *
05670   //    *               = 2  prediction when leaving the volume          *
05671   //    *                                                                *
05672   //    *    ==>Called by : USER (before calling ERTRAK)                 *
05673   //    *       Author    M.Maire, E.Nagy  *********                     *
05674   //    *                                                                *
05675   //    ******************************************************************
05676 
05677   for(Int_t i=0;i<15;i++) fErtrio->errin[i]=ein[i]; 
05678    const Int_t mxpred=15;
05679    if (n<mxpred) {
05680       fErtrio->nepred=n;
05681     } else {
05682      fErtrio->nepred=mxpred;
05683    } 
05684    
05685    for(Int_t i=0;i<fErtrio->nepred;i++) {
05686      fEropts->nameer[i]=*((int*)namv);
05687      fEropts->iovler[i]=iovl[i];
05688      fEropts->numver[i]=numv[i];
05689    }
05690 }

void TGeant3::FinishGeometry (  )  [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 6376 of file TGeant3.cxx.

References Ggclos(), and SetColors().

Referenced by ggclos(), and Init().

06377 {
06378   //
06379   // Finalize geometry construction
06380   //
06381 
06382   //Close the geometry structure
06383   if (gDebug > 0) printf("FinishGeometry, calling ggclos\n");
06384   Ggclos();
06385 
06386 
06387   //  gROOT->GetListOfBrowsables()->Add(gGeoManager);
06388   if (gDebug > 0) printf("FinishGeometry, calling SetColors\n");
06389 
06390   //Create the color table
06391   SetColors();
06392   if (gDebug > 0) printf("FinishGeometry, returning\n");
06393 }

void TGeant3::ForceDecayTime ( Float_t  time  ) 

Definition at line 2679 of file TGeant3.cxx.

References Gcphys(), Gcphys_t::sumlif, and TrackMomentum().

02680 {
02681     //
02682     // Force the decay time of the current particle
02683     //
02684     TLorentzVector p;
02685     TrackMomentum(p);
02686     Gcphys()->sumlif = time / p.Beta() / p.Gamma()  * 2.99792458e10;
02687 }

void TGeant3::G3Gsposp ( 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 
) [protected]

Definition at line 4333 of file TGeant3.cxx.

References g3sposp, PASSCHARD, PASSCHARL, and Vname().

Referenced by Gsposp().

04336 {
04337   //
04338   //      Place a copy of generic volume NAME with user number
04339   //      NR inside MOTHER, with its parameters UPAR(1..NP)
04340   //
04341   TString only = konly;
04342   only.ToLower();
04343   Bool_t isOnly = kFALSE;
04344   if (only.Contains("only")) isOnly = kTRUE;
04345   char vname[5];
04346   Vname(name,vname);
04347   char vmother[5];
04348   Vname(mother,vmother);
04349 
04350   Float_t fx = x;
04351   Float_t fy = y;
04352   Float_t fz = z;
04353   g3sposp(PASSCHARD(vname), nr, PASSCHARD(vmother), fx, fy, fz, irot,
04354          PASSCHARD(konly), upar, np PASSCHARL(vname) PASSCHARL(vmother)
04355          PASSCHARL(konly));
04356 }

Int_t TGeant3::G3Gsvolu ( const char *  name,
const char *  shape,
Int_t  nmed,
Float_t *  upar,
Int_t  np 
) [protected]

Definition at line 4416 of file TGeant3.cxx.

References g3svolu, PASSCHARD, PASSCHARL, and Vname().

Referenced by Gsvolu().

04418 {
04419   //
04420   //  NAME   Volume name
04421   //  SHAPE  Volume type
04422   //  NUMED  Tracking medium number
04423   //  NPAR   Number of shape parameters
04424   //  UPAR   Vector containing shape parameters
04425   //
04426   //  It creates a new volume in the JVOLUM data structure.
04427   //
04428   Int_t ivolu = 0;
04429   char vname[5];
04430   Vname(name,vname);
04431   char vshape[5];
04432   Vname(shape,vshape);
04433 
04434   g3svolu(PASSCHARD(vname), PASSCHARD(vshape), nmed, upar, npar, ivolu
04435          PASSCHARL(vname) PASSCHARL(vshape));
04436 
04437   return ivolu;
04438 }

void TGeant3::G3Material ( Int_t &  kmat,
const char *  name,
Double_t  a,
Double_t  z,
Double_t  dens,
Double_t  radl,
Double_t  absl,
Float_t *  buf = 0,
Int_t  nwbuf = 0 
) [protected]

Definition at line 2699 of file TGeant3.cxx.

References fGclink, fZiq, fZlq, g3smate, Gclink_t::jmate, Munits::ns, PASSCHARD, and PASSCHARL.

Referenced by TGeant3TGeo::ImportMaterial(), TGeant3TGeo::Material(), and Material().

02702 {
02703   //
02704   // Defines a Material
02705   //
02706   //  kmat               number assigned to the material
02707   //  name               material name
02708   //  a                  atomic mass in au
02709   //  z                  atomic number
02710   //  dens               density in g/cm3
02711   //  absl               absorption length in cm
02712   //                     if >=0 it is ignored and the program
02713   //                     calculates it, if <0. -absl is taken
02714   //  radl               radiation length in cm
02715   //                     if >=0 it is ignored and the program
02716   //                     calculates it, if <0. -radl is taken
02717   //  buf                pointer to an array of user words
02718   //  nbuf               number of user words
02719   //
02720   Int_t jmate=fGclink->jmate;
02721   kmat=1;
02722   Int_t ns, i;
02723   if(jmate>0) {
02724     ns=fZiq[jmate-2];
02725     kmat=ns+1;
02726     for(i=1; i<=ns; i++) {
02727       if(fZlq[jmate-i]==0) {
02728         kmat=i;
02729         break;
02730       }
02731     }
02732   }
02733   Float_t fa = a;
02734   Float_t fz = z;
02735   Float_t fdens = dens;
02736   Float_t fradl = radl;
02737   Float_t fabsl = absl;
02738 
02739   g3smate(kmat,PASSCHARD(name), fa,  fz, fdens, fradl, fabsl, buf,
02740          nwbuf PASSCHARL(name));
02741 }

void TGeant3::G3Medium ( 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 = 0,
Int_t  nbuf = 0 
) [protected]

Definition at line 2896 of file TGeant3.cxx.

References fGclink, fMedNames, fZiq, fZlq, g3stmed, Gclink_t::jtmed, Munits::ns, PASSCHARD, and PASSCHARL.

Referenced by TGeant3TGeo::FinishGeometry(), Medium(), and TGeant3TGeo::Medium().

02900 {
02901   //
02902   //  kmed      tracking medium number assigned
02903   //  name      tracking medium name
02904   //  nmat      material number
02905   //  isvol     sensitive volume flag
02906   //  ifield    magnetic field
02907   //  fieldm    max. field value (kilogauss)
02908   //  tmaxfd    max. angle due to field (deg/step)
02909   //  stemax    max. step allowed
02910   //  deemax    max. fraction of energy lost in a step
02911   //  epsil     tracking precision (cm)
02912   //  stmin     min. step due to continuous processes (cm)
02913   //
02914   //  ifield = 0 if no magnetic field; ifield = -1 if user decision in guswim;
02915   //  ifield = 1 if tracking performed with g3rkuta; ifield = 2 if tracking
02916   //  performed with g3helix; ifield = 3 if tracking performed with g3helx3.
02917   //
02918   Int_t jtmed=fGclink->jtmed;
02919   kmed=1;
02920   Int_t ns, i;
02921   if(jtmed>0) {
02922     ns=fZiq[jtmed-2];
02923     kmed=ns+1;
02924     for(i=1; i<=ns; i++) {
02925       if(fZlq[jtmed-i]==0) {
02926         kmed=i;
02927         break;
02928       }
02929     }
02930   }
02931   Float_t ffieldm = fieldm;
02932   Float_t ftmaxfd = tmaxfd;
02933   Float_t fstemax = stemax;
02934   Float_t fdeemax = deemax;
02935   Float_t fepsil  = epsil;
02936   Float_t fstmin =  stmin;
02937   g3stmed(kmed, PASSCHARD(name),nmat,isvol,ifield,ffieldm,ftmaxfd,fstemax,
02938           fdeemax, fepsil, fstmin, ubuf, nbuf PASSCHARL(name));
02939 
02940   fMedNames.AddAtAndExpand(new TObjString(name), kmed);           
02941 }

void TGeant3::G3Mixture ( Int_t &  kmat,
const char *  name,
Float_t *  a,
Float_t *  z,
Double_t  dens,
Int_t  nlmat,
Float_t *  wmat 
) [protected]

Definition at line 2799 of file TGeant3.cxx.

References fGclink, fZiq, fZlq, g3smixt, Gclink_t::jmate, Munits::ns, PASSCHARD, and PASSCHARL.

Referenced by TGeant3TGeo::ImportMaterial(), TGeant3TGeo::Mixture(), and Mixture().

02801 {
02802   //
02803   // Defines mixture OR COMPOUND IMAT as composed by
02804   // THE BASIC NLMAT materials defined by arrays A,Z and WMAT
02805   //
02806   // If NLMAT > 0 then wmat contains the proportion by
02807   // weights of each basic material in the mixture.
02808   //
02809   // If nlmat < 0 then WMAT contains the number of atoms
02810   // of a given kind into the molecule of the COMPOUND
02811   // In this case, WMAT in output is changed to relative
02812   // weights.
02813   //
02814 
02815   Int_t jmate=fGclink->jmate;
02816   kmat=1;
02817   Int_t ns, i;
02818   if(jmate>0) {
02819     ns=fZiq[jmate-2];
02820     kmat=ns+1;
02821     for(i=1; i<=ns; i++) {
02822       if(fZlq[jmate-i]==0) {
02823         kmat=i;
02824         break;
02825       }
02826     }
02827   }
02828   g3smixt(kmat,PASSCHARD(name),a,z,Float_t(dens),nlmat,wmat PASSCHARL(name));
02829 }

TMCProcess TGeant3::G3toVMC ( Int_t  iproc  )  const [protected]

Definition at line 2532 of file TGeant3.cxx.

Referenced by ProdProcess(), and StepProcesses().

02533 {
02534   //
02535   // Conversion between GEANT and TMC processes
02536   //
02537 
02538   const TMCProcess kPG2MC1[30] = {
02539     kPTransportation, kPMultipleScattering, kPEnergyLoss, kPMagneticFieldL, kPDecay,
02540     kPPair, kPCompton, kPPhotoelectric, kPBrem, kPDeltaRay,
02541     kPAnnihilation, kPHadronic, kPHCElastic, kPEvaporation, kPNuclearFission,
02542     kPNuclearAbsorption, kPPbarAnnihilation, kPNCapture, kPHIElastic, 
02543     kPHInhelastic, kPMuonNuclear, kPTOFlimit, kPPhotoFission, kPNoProcess, 
02544     kPRayleigh, kPNoProcess, kPNoProcess, kPNoProcess, kPNull, kPStop};
02545 
02546   const TMCProcess kPG2MC2[9] = {
02547       kPLightAbsorption, kPLightScattering, kStepMax, kPNoProcess, kPCerenkov,
02548       kPLightReflection, kPLightRefraction, kPSynchrotron, kPNoProcess};
02549 
02550   TMCProcess proc=kPNoProcess;
02551   if(0<iproc && iproc<=30) proc= kPG2MC1[iproc-1];
02552   else if(101<=iproc && iproc<=109) proc= kPG2MC2[iproc-100-1];
02553 
02554   //sk:begin
02555   // Modified 2007/10/23 S. Kasahara to print error message when failure
02556   // to find matching VMC process for input G3 process code.
02557   if ( proc == kPNoProcess ) {
02558     cerr << "* TGeant3::G3toVMC failed to find matching TMCProcess "
02559          << "for G3 iproc " << iproc << "!*" << endl;
02560   }
02561   //sk:end
02562 
02563   return proc;
02564 }

Float_t TGeant3::Gbrelm ( Float_t  z,
Float_t  t,
Float_t  cut 
) [virtual]

Definition at line 3449 of file TGeant3.cxx.

References g3brelm.

03450 {
03451   //
03452   // To calculate energy loss due to soft muon BREMSSTRAHLUNG
03453   //
03454   return g3brelm(z,t,bcut);
03455 }

virtual Gcbank_t* TGeant3::Gcbank (  )  const [inline, virtual]

Definition at line 835 of file TGeant3.h.

References fGcbank.

00835 {return fGcbank;}

virtual Gccuts_t* TGeant3::Gccuts (  )  const [inline, virtual]

Definition at line 837 of file TGeant3.h.

References fGccuts.

00837 {return fGccuts;}

virtual Gcflag_t* TGeant3::Gcflag (  )  const [inline, virtual]

Definition at line 849 of file TGeant3.h.

References fGcflag.

Referenced by eustep(), and gustep().

00849 {return fGcflag;}

virtual Gcjump_t* TGeant3::Gcjump (  )  const [inline, virtual]

Definition at line 870 of file TGeant3.h.

References fGcjump.

00870 {return fGcjump;}

virtual Gckin2_t* TGeant3::Gckin2 (  )  const [inline, virtual]

Definition at line 854 of file TGeant3.h.

References fGckin2.

Referenced by gustep().

00854 {return fGckin2;}

virtual Gckin3_t* TGeant3::Gckin3 (  )  const [inline, virtual]

Definition at line 855 of file TGeant3.h.

References fGckin3.

Referenced by gudcay(), and gustep().

00855 {return fGckin3;}

virtual Gckine_t* TGeant3::Gckine (  )  const [inline, virtual]

Definition at line 848 of file TGeant3.h.

References fGckine.

Referenced by gudcay(), and gustep().

00848 {return fGckine;}

virtual Gcking_t* TGeant3::Gcking (  )  const [inline, virtual]

Definition at line 853 of file TGeant3.h.

References fGcking.

Referenced by gudcay(), and gustep().

00853 {return fGcking;}

void TGeant3::Gckmat ( Int_t  itmed,
char *  natmed 
) [virtual]

Definition at line 4652 of file TGeant3.cxx.

References g3ckmat, PASSCHARD, and PASSCHARL.

Referenced by gckmat().

04653 {
04654   //
04655   // Check the parameters of a tracking medium
04656   //
04657   g3ckmat(itmed, PASSCHARD(natmed) PASSCHARL(natmed));
04658 }

void TGeant3::Gckpar ( Int_t  ish,
Int_t  npar,
Float_t *  par 
) [virtual]

Definition at line 4643 of file TGeant3.cxx.

References gckpar.

Referenced by WriteEuclid().

04644 {
04645   //
04646   // Check the parameters of a shape
04647   //
04648   gckpar(ish,npar,par);
04649 }

virtual Gclink_t* TGeant3::Gclink (  )  const [inline, virtual]
virtual Gcmate_t* TGeant3::Gcmate (  )  const [inline, virtual]

Definition at line 840 of file TGeant3.h.

References fGcmate.

00840 {return fGcmate;}

virtual Gcmore_t* TGeant3::Gcmore (  )  const [inline, virtual]

Definition at line 838 of file TGeant3.h.

References fGcmore.

Referenced by eustep().

00838 {return fGcmore;}

virtual Gcmulo_t* TGeant3::Gcmulo (  )  const [inline, virtual]

Definition at line 839 of file TGeant3.h.

References fGcmulo.

00839 {return fGcmulo;}

virtual Gcnum_t* TGeant3::Gcnum (  )  const [inline, virtual]

Definition at line 842 of file TGeant3.h.

References fGcnum.

Referenced by PTGuiRollG3::RollMaterials(), and PTGuiRollG3::RollMedia().

00842 {return fGcnum;}

virtual Gconst_t* TGeant3::Gconst (  )  const [inline, virtual]

Definition at line 868 of file TGeant3.h.

References fGconst.

Referenced by eustep().

00868 {return fGconst;}

virtual Gconsx_t* TGeant3::Gconsx (  )  const [inline, virtual]

Definition at line 869 of file TGeant3.h.

References fGconsx.

00869 {return fGconsx;}

virtual Gcopti_t* TGeant3::Gcopti (  )  const [inline, virtual]

Definition at line 844 of file TGeant3.h.

References fGcopti.

00844 {return fGcopti;}

virtual Gcphlt_t* TGeant3::Gcphlt (  )  const [inline, virtual]

Definition at line 852 of file TGeant3.h.

References fGcphlt.

00852 {return fGcphlt;}

virtual Gcphys_t* TGeant3::Gcphys (  )  const [inline, virtual]

Definition at line 851 of file TGeant3.h.

References fGcphys.

Referenced by ForceDecayTime(), guhadr(), and guphad().

00851 {return fGcphys;}

virtual Gcsets_t* TGeant3::Gcsets (  )  const [inline, virtual]

Definition at line 843 of file TGeant3.h.

References fGcsets.

00843 {return fGcsets;}

virtual Gctlit_t* TGeant3::Gctlit (  )  const [inline, virtual]

Definition at line 845 of file TGeant3.h.

References fGctlit.

00845 {return fGctlit;}

virtual Gctmed_t* TGeant3::Gctmed (  )  const [inline, virtual]

Definition at line 850 of file TGeant3.h.

References fGctmed.

Referenced by gustep(), and guswim().

00850 {return fGctmed;}

virtual Gctpol_t* TGeant3::Gctpol (  )  const [inline, virtual]

Definition at line 841 of file TGeant3.h.

References fGctpol.

00841 {return fGctpol;}

virtual Gctrak_t* TGeant3::Gctrak (  )  const [inline, virtual]

Definition at line 856 of file TGeant3.h.

References fGctrak.

Referenced by eustep(), gudcay(), gustep(), and StepProcesses().

00856 {return fGctrak;}

virtual Gcvdma_t* TGeant3::Gcvdma (  )  const [inline, virtual]

Definition at line 846 of file TGeant3.h.

References fGcvdma.

00846 {return fGcvdma;}

virtual Gcvolu_t* TGeant3::Gcvolu (  )  const [inline, virtual]

Definition at line 847 of file TGeant3.h.

References fGcvolu.

Referenced by GetShape(), and GetTransformation().

00847 {return fGcvolu;}

void TGeant3::Gdclose (  )  [virtual]

Definition at line 4713 of file TGeant3.cxx.

04714 {
04715   //
04716   //  It closes the currently open view bank; it must be called after the
04717   //  end of the drawing to be stored.
04718   //
04719 }

void TGeant3::Gdcxyz (  )  [virtual]

Definition at line 4008 of file TGeant3.cxx.

04009 {
04010   //
04011   // Draw the position of the current track
04012   //
04013 }

void TGeant3::Gdebug (  )  [virtual]

Definition at line 3861 of file TGeant3.cxx.

References g3debug.

Referenced by gdebug(), and gustep().

03862 {
03863   //
03864   // Debug the current step
03865   //
03866   g3debug();
03867 }

void TGeant3::Gdelete ( Int_t  view  )  [virtual]

Definition at line 4686 of file TGeant3.cxx.

04687 {
04688   //
04689   //  IVIEW  View number
04690   //
04691   //  It deletes a view bank from memory.
04692   //
04693 }

void TGeant3::Gdhead ( Int_t  isel,
const char *  name,
Double_t  chrsiz = 0.6 
) [virtual]

Definition at line 4860 of file TGeant3.cxx.

Referenced by gdhead().

04861 {
04862   //
04863   //  Parameters
04864   //  +
04865   //  ISEL   Option flag  D=111110
04866   //  NAME   Title
04867   //  CHRSIZ Character size (cm) of title NAME D=0.6
04868   //
04869   //  ISEL =
04870   //   0      to have only the header lines
04871   //   xxxxx1 to add the text name centered on top of header
04872   //   xxxx1x to add global detector name (first volume) on left
04873   //   xxx1xx to add date on right
04874   //   xx1xxx to select thick characters for text on top of header
04875   //   x1xxxx to add the text 'EVENT NR x' on top of header
04876   //   1xxxxx to add the text 'RUN NR x' on top of header
04877   //  NOTE that ISEL=x1xxx1 or ISEL=1xxxx1 are illegal choices,
04878   //  i.e. they generate overwritten text.
04879   //
04880 }

void TGeant3::Gdman ( Double_t  u0,
Double_t  v0,
const char *  type = "MAN" 
) [virtual]

Definition at line 4883 of file TGeant3.cxx.

Referenced by gdman().

04884 {
04885   //
04886   //  Draw a 2D-man at position (U0,V0)
04887   //  Parameters
04888   //  U      U-coord. (horizontal) of the center of man' R
04889   //  V      V-coord. (vertical) of the center of man' R
04890   //  TYPE   D='MAN' possible values: 'MAN,WM1,WM2,WM3'
04891   //
04892   //   CALL GDMAN(u,v),CALL GDWMN1(u,v),CALL GDWMN2(u,v),CALL GDWMN2(u,v)
04893   //  It superimposes the picture of a man or of a woman, chosen among
04894   //  three different ones, with the same scale factors as the detector
04895   //  in the current drawing.
04896   //
04897 }

void TGeant3::Gdopen ( Int_t  view  )  [virtual]

Definition at line 4696 of file TGeant3.cxx.

Referenced by gdopen().

04697 {
04698   //
04699   //  IVIEW  View number
04700   //
04701   //  When a drawing is very complex and requires a long time to be
04702   //  executed, it can be useful to store it in a view bank: after a
04703   //  call to DOPEN and the execution of the drawing (nothing will
04704   //  appear on the screen), and after a necessary call to DCLOSE,
04705   //  the contents of the bank can be displayed in a very fast way
04706   //  through a call to DSHOW; therefore, the detector can be easily
04707   //  zoomed many times in different ways. Please note that the pictures
04708   //  with solid colors can now be stored in a view bank or in 'PICTURE FILES'
04709   //
04710 }

void TGeant3::Gdopt ( const char *  name,
const char *  value 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4733 of file TGeant3.cxx.

References Vname().

Referenced by G3Volume::Draw(), G3Volume::DrawSpec(), and gdopt().

04734 {
04735   //
04736   //  NAME   Option name
04737   //  VALUE  Option value
04738   //
04739   //  To set/modify the drawing options.
04740   //     IOPT   IVAL      Action
04741   //
04742   //     THRZ    ON       Draw tracks in R vs Z
04743   //             OFF (D)  Draw tracks in X,Y,Z
04744   //             180
04745   //             360
04746   //     PROJ    PARA (D) Parallel projection
04747   //             PERS     Perspective
04748   //     TRAK    LINE (D) Trajectory drawn with lines
04749   //             POIN       " " with markers
04750   //     HIDE    ON       Hidden line removal using the CG package
04751   //             OFF (D)  No hidden line removal
04752   //     SHAD    ON       Fill area and shading of surfaces.
04753   //             OFF (D)  Normal hidden line removal.
04754   //     RAYT    ON       Ray-tracing on.
04755   //             OFF (D)  Ray-tracing off.
04756   //     EDGE    OFF      Does not draw contours when shad is on.
04757   //             ON  (D)  Normal shading.
04758   //     MAPP    1,2,3,4  Mapping before ray-tracing.
04759   //             0   (D)  No mapping.
04760   //     USER    ON       User graphics options in the ray tracing.
04761   //             OFF (D)  Automatic graphics options.
04762   //
04763 
04764   char vname[5];
04765   Vname(name,vname);
04766   char vvalue[5];
04767   Vname(value,vvalue);
04768   //g3dopt(PASSCHARD(vname), PASSCHARD(vvalue) PASSCHARL(vname)
04769   //    PASSCHARL(vvalue));
04770 }

void TGeant3::Gdraw ( const char *  name,
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]

Reimplemented in TGeant3TGeo.

Definition at line 4773 of file TGeant3.cxx.

Referenced by G3Volume::Draw(), and gdraw().

04776 {
04777   //
04778   //  NAME   Volume name
04779   //  +
04780   //  THETA  Viewing angle theta (for 3D projection)
04781   //  PHI    Viewing angle phi (for 3D projection)
04782   //  PSI    Viewing angle psi (for 2D rotation)
04783   //  U0     U-coord. (horizontal) of volume origin
04784   //  V0     V-coord. (vertical) of volume origin
04785   //  SU     Scale factor for U-coord.
04786   //  SV     Scale factor for V-coord.
04787   //
04788   //  This function will draw the volumes,
04789   //  selected with their graphical attributes, set by the Gsatt
04790   //  facility. The drawing may be performed with hidden line removal
04791   //  and with shading effects according to the value of the options HIDE
04792   //  and SHAD; if the option SHAD is ON, the contour's edges can be
04793   //  drawn or not. If the option HIDE is ON, the detector can be
04794   //  exploded (BOMB), clipped with different shapes (CVOL), and some
04795   //  of its parts can be shifted from their original
04796   //  position (SHIFT). When HIDE is ON, if
04797   //  the drawing requires more than the available memory, the program
04798   //  will evaluate and display the number of missing words
04799   //  (so that the user can increase the
04800   //  size of its ZEBRA store). Finally, at the end of each drawing (with 
04801   //  HIDE on), the program will print messages about the memory used and
04802   //  statistics on the volumes' visibility.
04803   //  The following commands will produce the drawing of a green
04804   //  volume, specified by NAME, without using the hidden line removal
04805   //  technique, using the hidden line removal technique,
04806   //  with different line width and color (red), with
04807   //  solid color, with shading of surfaces, and without edges.
04808   //  Finally, some examples are given for the ray-tracing. (A possible
04809   //  string for the NAME of the volume can be found using the command DTREE).
04810   //
04811 }

void TGeant3::Gdrawc ( const char *  name,
Int_t  axis = 1,
Float_t  cut = 0,
Float_t  u0 = 10,
Float_t  v0 = 10,
Float_t  ul = 0.01,
Float_t  vl = 0.01 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4814 of file TGeant3.cxx.

Referenced by gdrawc().

04816 {
04817   //
04818   //  NAME   Volume name
04819   //  CAXIS  Axis value
04820   //  CUTVAL Cut plane distance from the origin along the axis
04821   //  +
04822   //  U0     U-coord. (horizontal) of volume origin
04823   //  V0     V-coord. (vertical) of volume origin
04824   //  SU     Scale factor for U-coord.
04825   //  SV     Scale factor for V-coord.
04826   //
04827   //  The cut plane is normal to caxis (X,Y,Z), corresponding to iaxis (1,2,3),
04828   //  and placed at the distance cutval from the origin.
04829   //  The resulting picture is seen from the the same axis.
04830   //  When HIDE Mode is ON, it is possible to get the same effect with
04831   //  the CVOL/BOX function.
04832   //
04833 }

void TGeant3::Gdrawx ( const char *  name,
Float_t  cutthe,
Float_t  cutphi,
Float_t  cutval,
Float_t  theta = 30,
Float_t  phi = 30,
Float_t  u0 = 10,
Float_t  v0 = 10,
Float_t  ul = 0.01,
Float_t  vl = 0.01 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4836 of file TGeant3.cxx.

Referenced by gdrawx().

04839 {
04840   //
04841   //  NAME   Volume name
04842   //  CUTTHE Theta angle of the line normal to cut plane
04843   //  CUTPHI Phi angle of the line normal to cut plane
04844   //  CUTVAL Cut plane distance from the origin along the axis
04845   //  +
04846   //  THETA  Viewing angle theta (for 3D projection)
04847   //  PHI    Viewing angle phi (for 3D projection)
04848   //  U0     U-coord. (horizontal) of volume origin
04849   //  V0     V-coord. (vertical) of volume origin
04850   //  SU     Scale factor for U-coord.
04851   //  SV     Scale factor for V-coord.
04852   //
04853   //  The cut plane is normal to the line given by the cut angles
04854   //  cutthe and cutphi and placed at the distance cutval from the origin.
04855   //  The resulting picture is seen from the viewing angles theta,phi.
04856   //
04857 }

void TGeant3::Gdshow ( Int_t  view  )  [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4722 of file TGeant3.cxx.

04723 {
04724   //
04725   //  IVIEW  View number
04726   //
04727   //  It shows on the screen the contents of a view bank. It
04728   //  can be called after a view bank has been closed.
04729   //
04730 }

void TGeant3::Gdspec ( const char *  name  )  [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4900 of file TGeant3.cxx.

Referenced by gdspec().

04901 {
04902   //
04903   //  NAME   Volume name
04904   //
04905   //  Shows 3 views of the volume (two cut-views and a 3D view), together with
04906   //  its geometrical specifications. The 3D drawing will
04907   //  be performed according the current values of the options HIDE and
04908   //  SHAD and according the current SetClipBox clipping parameters for that
04909   //  volume.
04910   //
04911 }

void TGeant3::Gdtom ( Double_t *  xd,
Double_t *  xm,
Int_t  iflag 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4039 of file TGeant3.cxx.

References CreateFloatArray(), and Gdtom().

04040 {
04041   //
04042   //  Computes coordinates XM (Master Reference System
04043   //  knowing the coordinates XD (Detector Ref System)
04044   //  The local reference system can be initialized by
04045   //    - the tracking routines and GDTOM used in GUSTEP
04046   //    - a call to GSCMED(NLEVEL,NAMES,NUMBER)
04047   //        (inverse routine is GMTOD)
04048   //
04049   //   If IFLAG=1  convert coordinates
04050   //      IFLAG=2  convert direction cosines
04051   //
04052 
04053   Float_t* fxd = CreateFloatArray(xd, 3);
04054   Float_t* fxm = CreateFloatArray(xm, 3);
04055 
04056   Gdtom(fxd, fxm, iflag) ;
04057 
04058   for (Int_t i=0; i<3; i++) {
04059      xd[i] = fxd[i]; xm[i] = fxm[i];
04060   }
04061 
04062   delete [] fxd;
04063   delete [] fxm;
04064 }

void TGeant3::Gdtom ( Float_t *  xd,
Float_t *  xm,
Int_t  iflag 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4022 of file TGeant3.cxx.

References g3dtom.

Referenced by gdtom(), and Gdtom().

04023 {
04024   //
04025   //  Computes coordinates XM (Master Reference System
04026   //  knowing the coordinates XD (Detector Ref System)
04027   //  The local reference system can be initialized by
04028   //    - the tracking routines and GDTOM used in GUSTEP
04029   //    - a call to GSCMED(NLEVEL,NAMES,NUMBER)
04030   //        (inverse routine is GMTOD)
04031   //
04032   //   If IFLAG=1  convert coordinates
04033   //      IFLAG=2  convert direction cosines
04034   //
04035   g3dtom(xd, xm, iflag);
04036 }

void TGeant3::Gdtree ( const char *  name,
Int_t  levmax = 15,
Int_t  ispec = 0 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4923 of file TGeant3.cxx.

Referenced by gdtree().

04924 {
04925   //
04926   //  NAME   Volume name
04927   //  LEVMAX Depth level
04928   //  ISELT  Options
04929   //
04930   //  This function draws the logical tree,
04931   //  Each volume in the tree is represented by a TPaveTree object.
04932   //  Double-clicking on a TPaveTree draws the specs of the corresponding 
04933   //  volume.
04934   //  Use TPaveTree pop-up menu to select:
04935   //    - drawing specs
04936   //    - drawing tree
04937   //    - drawing tree of parent
04938   //
04939 }

void TGeant3::GdtreeParent ( const char *  name,
Int_t  levmax = 15,
Int_t  ispec = 0 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4942 of file TGeant3.cxx.

04943 {
04944   //
04945   //  NAME   Volume name
04946   //  LEVMAX Depth level
04947   //  ISELT  Options
04948   //
04949   //  This function draws the logical tree of the parent of name.
04950   //
04951 }

void TGeant3::Gdxyz ( Int_t  it  )  [virtual]

Definition at line 4000 of file TGeant3.cxx.

04001 {
04002   //
04003   // Draw the points stored with Gsxyz relative to track it
04004   //
04005 }

void TGeant3::Gekbin (  )  [virtual]

Definition at line 3870 of file TGeant3.cxx.

References g3ekbin.

Referenced by gekbin().

03871 {
03872   //
03873   //       To find bin number in kinetic energy table
03874   //       stored in ELOW(NEKBIN)
03875   //
03876   g3ekbin();
03877 }

void TGeant3::GeomIter (  ) 

Reimplemented in TGeant3TGeo.

Definition at line 1336 of file TGeant3.cxx.

References fGcvolu, fNextVol, and Gcvolu_t::nlevel.

01337 {
01338   //
01339   // Geometry iterator for moving upward in the geometry tree
01340   // Initialize the iterator
01341   //
01342   fNextVol=fGcvolu->nlevel;
01343 }

void TGeant3::GetClose ( Float_t *  p1,
Float_t *  p2,
Float_t *  p3,
Float_t *  len 
) [virtual]

Definition at line 5173 of file TGeant3.cxx.

References Gcmore_t::cleng, fGcmore, Gcmore_t::p1, Gcmore_t::p2, and Gcmore_t::p3.

05174 {
05175   p1[0] = fGcmore->p1[0];
05176   p1[1] = fGcmore->p1[1];
05177   p1[2] = fGcmore->p1[2];
05178   p2[0] = fGcmore->p2[0];
05179   p2[1] = fGcmore->p2[1];
05180   p2[2] = fGcmore->p2[2];
05181   p3[0] = fGcmore->p3[0];
05182   p3[1] = fGcmore->p3[1];
05183   p3[2] = fGcmore->p3[2];
05184   len[0] = fGcmore->cleng[0];
05185   len[1] = fGcmore->cleng[1];
05186   len[2] = fGcmore->cleng[2];
05187 }

Int_t TGeant3::GetIonPdg ( Int_t  z,
Int_t  a,
Int_t  i = 0 
) const [protected]

Definition at line 7200 of file TGeant3.cxx.

Referenced by AddParticlesToPdgDataBase(), DefineIon(), and DefineParticles().

07201 {
07202 // Acording to
07203 // http://cepa.fnal.gov/psm/stdhep/pdg/montecarlorpp-2006.pdf
07204 
07205   return 1000000000 + 10*1000*z + 10*a + i;
07206 }  

Bool_t TGeant3::GetMaterial ( const TString &  volumeName,
TString &  name,
Int_t &  imat,
Double_t &  a,
Double_t &  z,
Double_t &  den,
Double_t &  radl,
Double_t &  inter,
TArrayD &  par 
)

Reimplemented in TGeant3TGeo.

Definition at line 6987 of file TGeant3.cxx.

References Gclink(), Gfmate2(), Gclink_t::jmate, Gclink_t::jtmed, Gclink_t::jvolum, Lq(), nbuf, Q(), and VolId().

06990                                                                         {
06991     // Returns the Material and its parameters for the volume specified
06992     // by volumeName.
06993     // Note, Geant3 stores and uses mixtures as an element with an effective
06994     // Z and A. Consequently, if the parameter Z is not integer, then
06995     // this material represents some sort of mixture.
06996     // Inputs:
06997     //   TString& volumeName  The volume name
06998     // Outputs:
06999     //   TSrting   &name       Material name
07000     //   Int_t     &imat       Material index number
07001     //   Double_t  &a          Average Atomic mass of material
07002     //   Double_t  &z          Average Atomic number of material
07003     //   Double_t  &dens       Density of material [g/cm^3]
07004     //   Double_t  &radl       Average radiation length of material [cm]
07005     //   Double_t  &inter      Average interaction length of material [cm]
07006     //   TArrayD   &par        A TArrayD of user defined parameters.
07007     // Return:
07008     //   kTRUE if no errors
07009     Int_t i,volid,jma,nbuf;
07010     Float_t af,zf,densf,radlf,interf;
07011     Float_t *ubuf;
07012     Char_t namec[20] = {20*'\0'};
07013 
07014     volid = VolId(volumeName.Data());
07015     if(volid==0) return kFALSE; // Error
07016     if(volid>0){ // Get Material number, imat.
07017         Int_t imed = (Int_t) (this->Q()[this->Lq()[
07018                                             this->Gclink()->jvolum-volid]+4]);
07019         Int_t jtm  = this->Lq()[this->Gclink()->jtmed-imed];
07020         imat = (Int_t)(this->Q()[jtm+6]);
07021     } else {
07022         i = this->Gclink()->jvolum + volid;
07023         Int_t jdiv  = this->Lq()[i];
07024         Int_t ivin  = (Int_t) (this->Q()[jdiv+2]);
07025         i = this->Gclink()->jvolum - ivin;
07026         Int_t jvin  = this->Lq()[i];
07027         Int_t idmed = (Int_t)(this->Q()[jvin+4]);
07028         i = this->Gclink()->jtmed-idmed;
07029         Int_t jtm   = this->Lq()[i];
07030         imat = (Int_t)(this->Q()[jtm+6]);
07031     } // end if-else
07032     nbuf = jma = this->Lq()[this->Gclink()->jmate-imat];
07033     ubuf = new Float_t[nbuf];
07034     Gfmate2(imat,namec,af,zf,densf,radlf,interf,ubuf,nbuf);
07035 
07036     // Problem with getting namec back from Gfmate, get it from 
07037     // the Zebra bank directly -> now fixed in Gfmate
07038     //Char_t * ch = (char *)(this->Iq()+jma+1);
07039     //for(i=0;i<20;i++) if(ch[i]!=' ') namec[i] = ch[i];
07040     name = namec;
07041     name = name.Strip();
07042     //
07043     par.Set(nbuf);
07044     for(i=0;i<nbuf;i++) par.AddAt(((Double_t)ubuf[i]),i);
07045     delete[] ubuf;
07046     a      = (Double_t) af;
07047     z      = (Double_t) zf;
07048     dens   = (Double_t) densf;
07049     radl   = (Double_t) radlf;
07050     inter  = (Double_t) interf;
07051     return kTRUE;
07052 }

Bool_t TGeant3::GetMaterial ( Int_t  imat,
TString &  name,
Double_t &  a,
Double_t &  z,
Double_t &  density,
Double_t &  radl,
Double_t &  inter,
TArrayD &  par 
)

Reimplemented in TGeant3TGeo.

Definition at line 6955 of file TGeant3.cxx.

References Gfmate2(), and nbuf.

06958 {
06959   //
06960   // Return parameters for material IMAT
06961   //
06962 
06963   Float_t fa = a;
06964   Float_t fz = z;
06965   Float_t fdens = density;
06966   Float_t fradl = radl;
06967   Float_t finter = inter;
06968   Float_t fubuf[100];
06969   Int_t nbuf;
06970   char matname[21];
06971   
06972   Gfmate2(imat, matname, fa, fz, fdens, fradl, finter, fubuf, nbuf);
06973 
06974   name = matname;
06975   a = fa;
06976   z = fz;
06977   density = fdens;
06978   radl = fradl;
06979   inter = finter;
06980   par.Set(nbuf); // Resize TArrayD
06981   for (Int_t i=0; i<nbuf; i++) par[i] = fubuf[i];
06982   
06983   return kTRUE;
06984 }

Int_t TGeant3::GetMaxNStep (  )  const

Definition at line 2690 of file TGeant3.cxx.

References fGctrak, and Gctrak_t::maxnst.

02691 {
02692   //
02693   // Maximum number of steps allowed in current medium
02694   //
02695   return fGctrak->maxnst;
02696 }

Bool_t TGeant3::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 
)

Reimplemented in TGeant3TGeo.

Definition at line 7054 of file TGeant3.cxx.

References Gclink(), Gftmed(), Gclink_t::jtmed, Gclink_t::jvolum, Lq(), nbuf, Q(), and VolId().

07058                                        {
07059     // Returns the Medium and its parameters for the volume specified
07060     // by volumeName.
07061     // Inputs:
07062     //   TString& volumeName  The volume name.
07063     // Outputs:
07064     //   TString  &name       Medium name
07065     //   Int_t    &nmat       Material number defined for this medium
07066     //   Int_t    &imed       The medium index number
07067     //   Int_t    &isvol      volume number defined for this medium
07068     //   Int_t    &iflield    Magnetic field flag
07069     //   Double_t &fieldm     Magnetic field strength
07070     //   Double_t &tmaxfd     Maximum angle of deflection per step
07071     //   Double_t &stemax     Maximum step size
07072     //   Double_t &deemax     Maximum fraction of energy allowed to be lost
07073     //                        to continuous process.
07074     //   Double_t &epsil      Boundary crossing precision
07075     //   Double_t &stmin      Minimum step size allowed
07076     //   TArrayD  &par        A TArrayD of user parameters with all of the
07077     //                        parameters of the specified medium.
07078     // Return:
07079     //   kTRUE if there where no errors
07080     Int_t i,volid,nbuf;
07081     Float_t fieldmf,tmaxfdf,stemaxf,deemaxf,epsilf,stminf;
07082     Float_t *buf;
07083     Char_t namec[25] = {25*'\0'};
07084 
07085     volid = VolId(volumeName.Data());
07086     if(volid==0) return kFALSE; // Error
07087     if(volid>0){ // Get Material number, imat.
07088         imed = (Int_t)(this->Q()[this->Lq()[this->Gclink()->jvolum-volid]+4]);
07089     } else {
07090         Int_t jdiv  = this->Lq()[this->Gclink()->jvolum + volid];
07091         Int_t ivin  = (Int_t) (this->Q()[jdiv+2]);
07092         Int_t jvin  = this->Lq()[this->Gclink()->jvolum - ivin];
07093         imed = (Int_t)(this->Q()[jvin+4]);
07094     } // end if-else
07095     nbuf = this->Lq()[this->Gclink()->jtmed-imed];
07096     buf  = new Float_t[nbuf];
07097     Gftmed(imed,namec,nmat,isvol,ifield,fieldmf,tmaxfdf,stemaxf,deemaxf,
07098            epsilf,stminf,buf,&nbuf);
07099     name = namec;
07100     name = name.Strip();
07101     par.Set(nbuf);
07102     for(i=0;i<nbuf;i++) par.AddAt(((Double_t)buf[i]),i);
07103     delete[] buf;
07104     fieldm = (Double_t) fieldmf;
07105     tmaxfd = (Double_t) tmaxfdf;
07106     stemax = (Double_t) stemaxf;
07107     deemax = (Double_t) deemaxf;
07108     epsil  = (Double_t) epsilf;
07109     stmin  = (Double_t) stminf;
07110     return kTRUE;
07111 }

Int_t TGeant3::GetMedium (  )  const [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 3053 of file TGeant3.cxx.

References CurrentMedium().

03054 {
03055   //
03056   // Return the number of the current medium
03057   // Deprecated function - replaced with CurrentMedium()
03058   //
03059 
03060   Warning("GetMedium", 
03061           "Deprecated function - use CurrentMedium() instead");
03062 
03063   return CurrentMedium();
03064 }

const char * TGeant3::GetNodeName (  ) 

Reimplemented in TGeant3TGeo.

Definition at line 3116 of file TGeant3.cxx.

References copy(), fGcvolu, fPath, Gcvolu_t::names, Gcvolu_t::nlevel, and Gcvolu_t::number.

03117 {
03118 // Get name of current G3 node
03119    Int_t i=fGcvolu->nlevel-1;
03120    if (i<0) return "";
03121    Int_t gname = fGcvolu->names[i];
03122    Int_t copy = fGcvolu->number[i];
03123    char name[10];
03124    memcpy(name, &gname, 4);
03125    name[4] = 0;
03126    sprintf(fPath, "%s_%d", name, copy);
03127    return fPath;
03128 }

const char * TGeant3::GetPath (  ) 

Reimplemented in TGeant3TGeo.

Definition at line 3089 of file TGeant3.cxx.

References copy(), fGcvolu, fPath, Gcvolu_t::names, Gcvolu_t::nlevel, and Gcvolu_t::number.

Referenced by CurrentVolPath(), gmedia(), gtmedi(), and gtnext().

03090 {
03091 // Get current path inside G3 geometry
03092    Int_t i,j;
03093    if ((i=fGcvolu->nlevel-1)<0) {
03094       Warning("GetPath", "level null");
03095       return fPath;
03096    }
03097    fPath[0] = '/';
03098    char name[10];
03099    char *namcur = fPath+1;
03100    Int_t gname, copy;
03101    Int_t nch=0;
03102    for (j=0; j<i+1; j++) {
03103       gname = fGcvolu->names[j];
03104       copy = fGcvolu->number[j];
03105       memcpy(name, &gname, 4);
03106       name[4]=0;
03107       sprintf(namcur, "%s_%d/", name, copy);
03108       nch = strlen(fPath);
03109       namcur = fPath+nch;
03110    }
03111    fPath[nch-1]=0;
03112    return fPath;
03113 }

void TGeant3::GetSecondary ( Int_t  isec,
Int_t &  ipart,
TLorentzVector &  x,
TLorentzVector &  p 
)

Definition at line 2568 of file TGeant3.cxx.

References fGckin3, fGcking, Gcking_t::gkin, Gckin3_t::gpos, and Gcking_t::tofd.

02570 {
02571   //
02572   // Get the parameters of the secondary track number isec produced
02573   // in the current step
02574   //
02575   Int_t i;
02576   if(-1<isec && isec<fGcking->ngkine) {
02577     ipart=Int_t (fGcking->gkin[isec][4] +0.5);
02578     for(i=0;i<3;i++) {
02579       x[i]=fGckin3->gpos[isec][i];
02580       p[i]=fGcking->gkin[isec][i];
02581     }
02582     x[3]=fGcking->tofd[isec];
02583     p[3]=fGcking->gkin[isec][3];
02584   } else {
02585     printf(" * TGeant3::GetSecondary * Secondary %d does not exist\n",isec);
02586     x[0]=x[1]=x[2]=x[3]=p[0]=p[1]=p[2]=p[3]=0;
02587     ipart=0;
02588   }
02589 }

Bool_t TGeant3::GetShape ( const TString &  volumePath,
TString &  shapeType,
TArrayD &  par 
)

Reimplemented in TGeant3TGeo.

Definition at line 6900 of file TGeant3.cxx.

References ConvertVolumePathString(), Gclink(), Gcvolu(), Glvolu(), Gclink_t::jvolum, Lq(), Gcvolu_t::lvolum, Gcvolu_t::nlevel, and Q().

06901                                       {
06902     // Returns the shape and its parameters for the volume specified
06903     // by the path volumePath. The format of the path volumePath is as 
06904     // follows (assuming ALIC is the Top volume)
06905     // "/ALIC_1/DDIP_1/S05I_2/S05H_1/S05G_3". Here ALIC is the top most
06906     // or master volume which has only 1 instance of. Of all of the daughter
06907     // volumes of ALICE, DDIP volume copy #1 is indicated. Similarly for
06908     // the daughter volume of DDIP is S05I copy #2 and so on.
06909     // Inputs:
06910     //   TString& volumePath  The volume path to the specific volume
06911     //                        for which you want the matrix. Volume name
06912     //                        hierarchy is separated by "/" while the
06913     //                        copy number is appended using a "_".
06914     // Outputs:
06915     //   TString &shapeType   Shape type
06916     //   TArrayD &par         A TArrayD of parameters with all of the
06917     //                        parameters of the specified shape.
06918     // Return:
06919     //   A logical indicating whether there was an error in getting this
06920     //   information
06921     const Int_t nshapes = 16;
06922     const Char_t *vname[nshapes] = {"BOX","TRD1","TRD2","TRAP","TUBE","TUBS",
06923                                    "CONE","CONS","SPHE","PARA","PGON","PCON",
06924                                    "ELTU","HYPE","GTRA","CTUB"};
06925     Int_t volid,i,k,jv0,ishape,npar,*lnam=0,*lnum=0;
06926     Float_t *qpar;
06927 
06928     k=ConvertVolumePathString(volumePath,&lnam,&lnum);//Creates lnam, and lnum
06929     if(k<=0) { // Error from Convert volumePathString.
06930         delete[] lnam;
06931         delete[] lnum;
06932         return kFALSE;
06933     } // end if k<=0
06934     this->Gcvolu()->nlevel = 0;
06935     i = this->Glvolu(k,lnam,lnum);
06936     delete[] lnam;
06937     delete[] lnum;
06938     if(i!=0) {// error
06939         par.Set(0);
06940         return kFALSE;
06941     } // end if i!=1
06942     volid = this->Gcvolu()->lvolum[this->Gcvolu()->nlevel-1];
06943     jv0 = this->Lq()[this->Gclink()->jvolum-volid];
06944     ishape = (Int_t)(this->Q()[jv0+2]);
06945     if(ishape<1||ishape>nshapes) return kFALSE; // error unknown shape
06946     npar   = (Int_t)(this->Q()[jv0+5]);
06947     qpar   = (this->Q())+jv0+7;
06948     par.Set(npar); // Resize TArrayD
06949     for(i=0;i<npar;i++) par.AddAt((Double_t)qpar[i],i);
06950     shapeType = vname[ishape-1];
06951     shapeType = shapeType.Strip();
06952     return kTRUE;
06953 }

Int_t TGeant3::GetSpecialPdg ( Int_t  number  )  const [protected]

Definition at line 7209 of file TGeant3.cxx.

Referenced by AddParticlesToPdgDataBase(), and DefineParticles().

07210 {
07211 // Numbering for special particles
07212 
07213   return 50000000 + number;
07214 }                

Bool_t TGeant3::GetTransformation ( const TString &  volumePath,
TGeoHMatrix &  mat 
)

Reimplemented in TGeant3TGeo.

Definition at line 6811 of file TGeant3.cxx.

References ConvertVolumePathString(), Gcvolu(), Glvolu(), Gcvolu_t::grmat, Gcvolu_t::gtran, Munits::m, n, and Gcvolu_t::nlevel.

06811                                                                            {
06812     // Returns the Transformation matrix between the volume specified
06813     // by the path volumePath and the Top or mater volume. The format
06814     // of the path volumePath is as follows (assuming ALIC is the Top volume)
06815     // "/ALIC_1/DDIP_1/S05I_2/S05H_1/S05G_3". Here ALIC is the top most
06816     // or master volume which has only 1 instance of. Of all of the daughter
06817     // volumes of ALICE, DDIP volume copy #1 is indicated. Similarly for
06818     // the daughter volume of DDIP is S05I copy #2 and so on.
06819     // Inputs:
06820     //   TString& volumePath  The volume path to the specific volume
06821     //                        for which you want the matrix. Volume name
06822     //                        hierarchy is separated by "/" while the
06823     //                        copy number is appended using a "_".
06824     // Outputs:
06825     //  TGeoHMatrix &mat      A matrix with its values set to those
06826     //                        appropriate to the Local to Master transformation
06827     // Return:
06828     //   A logical value if kFALSE then an error occurred and no change to
06829     //   mat was made.
06830     Int_t i,n,k,*lnam=0,*lnum=0;
06831     // Default rotation matrix, Unit
06832     Double_t m[9] = {1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0};
06833     Double_t s[3] = {1.0,1.0,1.0}; // Default scale, Unit
06834     Double_t t[3] = {0.0,0.0,0.0}; // Default translation, none.
06835 
06836     k =ConvertVolumePathString(volumePath,&lnam,&lnum);//Creates lnam, and lnum
06837     if(k<=0) { // Error from Convert volumePathString.
06838         delete[] lnam;
06839         delete[] lnum;
06840         return kFALSE;
06841     } // end if k<=0
06842     if(k==1){// only one volume listed, must be top most, return unit..
06843         delete[] lnam;
06844         delete[] lnum;
06845         mat.SetRotation(m);
06846         mat.SetTranslation(t);
06847         mat.SetScale(s);
06848         return kTRUE;
06849     } // end if k==1
06850     this->Gcvolu()->nlevel = 0;
06851     i = this->Glvolu(k,lnam,lnum);
06852     n = this->Gcvolu()->nlevel -1;
06853     delete[] lnam; // created in ConvertVolumePathString.
06854     delete[] lnum; // created in ConvertVolumePathString.
06855     if(i!=0) return kFALSE; // Error
06856     mat.SetScale(s); // Geant scale always 1.
06857     if(!((this->Gcvolu()->grmat[n][9])==0.0)) { // not Unit matrix
06858         for(i=0;i<9;i++) m[i] = (Double_t) this->Gcvolu()->grmat[n][i];
06859     } // end if
06860     mat.SetRotation(m);
06861     for(i=0;i<3;i++) t[i] = (Double_t) (this->Gcvolu()->gtran[n][i]);
06862     mat.SetTranslation(t);
06863     return kTRUE;
06864 }/*

Double_t TGeant3::GetUserDecayProductStableMinLifetime (  )  const [inline]

Definition at line 1162 of file TGeant3.h.

References fUserDecayProductStableMinLifetime.

Referenced by gudcay().

void TGeant3::Gfang ( Float_t *  p,
Float_t &  costh,
Float_t &  sinth,
Float_t &  cosph,
Float_t &  sinph,
Int_t &  rotate 
) [virtual]

Definition at line 7192 of file TGeant3.cxx.

References g3fang.

07194 {
07195 
07196   g3fang(p, costh, sinth, cosph, sinph, rotate );
07197 } 

void TGeant3::Gfile ( const char *  filename,
const char *  option = "I" 
) [virtual]

Definition at line 3155 of file TGeant3.cxx.

Referenced by gfile().

03156 {
03157   //
03158   //    Routine to open a GEANT/RZ data base.
03159   //
03160   //    LUN logical unit number associated to the file
03161   //
03162   //    CHFILE RZ file name
03163   //
03164   //    CHOPT is a character string which may be
03165   //        N  To create a new file
03166   //        U  to open an existing file for update
03167   //       " " to open an existing file for read only
03168   //        Q  The initial allocation (default 1000 records)
03169   //           is given in IQUEST(10)
03170   //        X  Open the file in exchange format
03171   //        I  Read all data structures from file to memory
03172   //        O  Write all data structures from memory to file
03173   //
03174   // Note:
03175   //      If options "I"  or "O" all data structures are read or
03176   //         written from/to file and the file is closed.
03177   //      See routine GRMDIR to create subdirectories
03178   //      See routines GROUT,GRIN to write,read objects
03179   //
03180   //g3rfile(21, PASSCHARD(filename), PASSCHARD(option) PASSCHARL(filename)
03181 //       PASSCHARL(option));
03182 }

void TGeant3::Gfinds (  )  [virtual]

Definition at line 3880 of file TGeant3.cxx.

References g3finds.

03881 {
03882   //
03883   //       Returns the set/volume parameters corresponding to
03884   //       the current space point in /GCTRAK/
03885   //       and fill common /GCSETS/
03886   //
03887   //       IHSET  user set identifier
03888   //       IHDET  user detector identifier
03889   //       ISET set number in JSET
03890   //       IDET   detector number in JS=LQ(JSET-ISET)
03891   //       IDTYPE detector type (1,2)
03892   //       NUMBV  detector volume numbers (array of length NVNAME)
03893   //       NVNAME number of volume levels
03894   //
03895   g3finds();
03896 }

void TGeant3::Gfkine ( Int_t  itra,
Float_t *  vert,
Float_t *  pvert,
Int_t &  ipart,
Int_t &  nvert 
) [virtual]

Definition at line 3757 of file TGeant3.cxx.

References g3fkine, and nbuf.

Referenced by gfkine().

03759 {
03760   //           Storing/Retrieving Vertex and Track parameters
03761   //           ----------------------------------------------
03762   //
03763   //  Stores vertex parameters.
03764   //  VERT      array of (x,y,z) position of the vertex
03765   //  NTBEAM    beam track number origin of the vertex
03766   //            =0 if none exists
03767   //  NTTARG    target track number origin of the vertex
03768   //  UBUF      user array of NUBUF floating point numbers
03769   //  NUBUF
03770   //  NVTX      new vertex number (=0 in case of error).
03771   //  Prints vertex parameters.
03772   //  IVTX      for vertex IVTX.
03773   //            (For all vertices if IVTX=0)
03774   //  Stores long life track parameters.
03775   //  PLAB      components of momentum
03776   //  IPART     type of particle (see GSPART)
03777   //  NV        vertex number origin of track
03778   //  UBUF      array of NUBUF floating point user parameters
03779   //  NUBUF
03780   //  NT        track number (if=0 error).
03781   //  Retrieves long life track parameters.
03782   //  ITRA      track number for which parameters are requested
03783   //  VERT      vector origin of the track
03784   //  PVERT     4 momentum components at the track origin
03785   //  IPART     particle type (=0 if track ITRA does not exist)
03786   //  NVERT     vertex number origin of the track
03787   //  UBUF      user words stored in GSKINE.
03788   //  Prints initial track parameters.
03789   //  ITRA      for track ITRA
03790   //            (For all tracks if ITRA=0)
03791   //
03792   Float_t *ubuf=0;
03793   Int_t   nbuf;
03794   g3fkine(itra,vert,pvert,ipart,nvert,ubuf,nbuf);
03795 }

void TGeant3::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]

Definition at line 3351 of file TGeant3.cxx.

References Gfmate2().

03354 {
03355   //
03356   // Return parameters for material IMAT
03357   //
03358   Float_t fa = a;
03359   Float_t fz = z;
03360   Float_t fdens = dens;
03361   Float_t fradl = radl;
03362   Float_t fabsl = absl;
03363   Float_t fubuf[100];
03364 
03365   Gfmate2(imat, name, fa, fz, fdens, fradl, fabsl, fubuf, nbuf);
03366 
03367   a = fa;
03368   z = fz;
03369   dens = fdens;
03370   radl = fradl;
03371   absl = fabsl;
03372   for (Int_t i=0; i<nbuf; i++) ubuf[i] = fubuf[i];
03373 
03374 }

void TGeant3::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]

Definition at line 3312 of file TGeant3.cxx.

References Gfmate2().

Referenced by TGeant3TGeo::GetMaterial(), gfmate(), and PTGuiRollG3::RollMaterials().

03315 {
03316   //
03317   // Return parameters for material IMAT
03318   // with added warning about deprecated function
03319   //
03320   
03321   // Temporary warning, to be removed when the Gfmate is removed from
03322   // TVirtualMC interface (and replaced with new GetMaterial(Int_t,...)
03323   // function
03324   Warning("Gfmate",
03325     "Deprecated function - now replaced with GetMaterial(Int_t imat, ...)");
03326 
03327   Gfmate2(imat, name, a, z, dens, radl, absl, ubuf, nbuf);
03328 }

void TGeant3::Gfmate2 ( 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]

Definition at line 3331 of file TGeant3.cxx.

References g3fmate, and PASSCHARD.

Referenced by GetMaterial(), Gfmate(), and WriteEuclid().

03334 {
03335   //
03336   // Return parameters for material IMAT
03337   // without warning about deprecated function
03338   //
03339   
03340   g3fmate(imat, PASSCHARD(name), a, z, dens, radl, absl, ubuf, nbuf, 20);
03341 
03342   for ( Int_t i=0; i<20; i++) {
03343     if ( name[i] == ' ' ) { 
03344       name[i] = '\0';
03345       break;
03346     }  
03347   }
03348 }

void TGeant3::Gfpara ( const char *  name,
Int_t  number,
Int_t  intext,
Int_t &  npar,
Int_t &  natt,
Float_t *  par,
Float_t *  att 
) [virtual]

Definition at line 4632 of file TGeant3.cxx.

References g3fpara, PASSCHARD, and PASSCHARL.

Referenced by gfpara(), and WriteEuclid().

04634 {
04635   //
04636   // Find the parameters of a volume
04637   //
04638   g3fpara(PASSCHARD(name), number, intext, npar, natt, par, att
04639          PASSCHARL(name));
04640 }

void TGeant3::Gfpart ( Int_t  ipart,
char *  name,
Int_t &  itrtyp,
Float_t &  amass,
Float_t &  charge,
Float_t &  tlife 
) const [virtual]

Definition at line 3377 of file TGeant3.cxx.

References g3fpart, IdFromPDG(), nbuf, PASSCHARD, and PASSCHARL.

Referenced by gfpart(), ParticleCharge(), ParticleLifeTime(), ParticleMass(), ParticleMCType(), and ParticleName().

03379 {
03380   //
03381   // Return parameters for particle of type IPART
03382   //
03383   //Float_t *ubuf=0;
03384   Float_t ubuf[100];
03385   Int_t   nbuf;
03386   Int_t igpart = IdFromPDG(ipart);
03387   g3fpart(igpart, PASSCHARD(name), itrtyp, amass, charge, tlife, ubuf, nbuf
03388          PASSCHARL(name));
03389 }

void TGeant3::Gftmat ( Int_t  imate,
Int_t  ipart,
char *  chmeca,
Int_t  kdim,
Float_t *  tkin,
Float_t *  value,
Float_t *  pcut,
Int_t &  ixst 
) [virtual]

Definition at line 3436 of file TGeant3.cxx.

References g3ftmat, PASSCHARD, and PASSCHARL.

Referenced by gftmat().

03439 {
03440   //
03441   // Return parameters for material imate
03442   //
03443   g3ftmat(imate, ipart, PASSCHARD(chmeca), kdim,
03444          tkin, value, pcut, ixst PASSCHARL(chmeca));
03445 
03446 }

void TGeant3::Gftmed ( Int_t  numed,
char *  name,
Int_t &  nmat,
Int_t &  isvol,
Int_t &  ifield,
Float_t &  fieldm,
Float_t &  tmaxfd,
Float_t &  stemax,
Float_t &  deemax,
Float_t &  epsil,
Float_t &  stmin,
Float_t *  buf = 0,
Int_t *  nbuf = 0 
) [virtual]

Definition at line 3410 of file TGeant3.cxx.

References g3ftmed, PASSCHARD, and PASSCHARL.

Referenced by TGeant3TGeo::GetMedium(), GetMedium(), gftmed(), PTGuiRollG3::RollMedia(), and WriteEuclid().

03414 {
03415   //
03416   // Return parameters for tracking medium NUMED
03417   //
03418   g3ftmed(numed, PASSCHARD(name), nmat, isvol, ifield, fieldm, tmaxfd, stemax,
03419          deemax, epsil, stmin, ubuf, nbuf PASSCHARL(name));
03420 }

void TGeant3::Gfvert ( Int_t  nvtx,
Float_t *  v,
Int_t &  ntbeam,
Int_t &  nttarg,
Float_t &  tofg 
) [virtual]

Definition at line 3798 of file TGeant3.cxx.

References g3fvert, and nbuf.

Referenced by gfvert().

03800 {
03801   //
03802   //       Retrieves the parameter of a vertex bank
03803   //       Vertex is generated from tracks NTBEAM NTTARG
03804   //       NVTX is the new vertex number
03805   //
03806   Float_t *ubuf=0;
03807   Int_t   nbuf;
03808   g3fvert(nvtx,v,ntbeam,nttarg,tofg,ubuf,nbuf);
03809 }

void TGeant3::Ggclos (  )  [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 3194 of file TGeant3.cxx.

References fGclink, fGcnum, fVolNames, fZiq, g3gclos, Gclink_t::jvolum, and Gcnum_t::nvolum.

Referenced by FinishGeometry().

03195 {
03196   //
03197   //   Closes off the geometry setting.
03198   //   Initializes the search list for the contents of each
03199   //   volume following the order they have been positioned, and
03200   //   inserting the content '0' when a call to GSNEXT (-1) has
03201   //   been required by the user.
03202   //   Performs the development of the JVOLUM structure for all
03203   //   volumes with variable parameters, by calling GGDVLP.
03204   //   Interprets the user calls to GSORD, through GGORD.
03205   //   Computes and stores in a bank (next to JVOLUM mother bank)
03206   //   the number of levels in the geometrical tree and the
03207   //   maximum number of contents per level, by calling GGNLEV.
03208   //   Sets status bit for CONCAVE volumes, through GGCAVE.
03209   //   Completes the JSET structure with the list of volume names
03210   //   which identify uniquely a given physical detector, the
03211   //   list of bit numbers to pack the corresponding volume copy
03212   //   numbers, and the generic path(s) in the JVOLUM tree,
03213   //   through the routine GHCLOS.
03214   //
03215   g3gclos();
03216   // Create internal list of volumes
03217   fVolNames = new char[fGcnum->nvolum+1][5];
03218   Int_t i;
03219   for(i=0; i<fGcnum->nvolum; ++i) {
03220     strncpy(fVolNames[i], (char *) &fZiq[fGclink->jvolum+i+1], 4);
03221     fVolNames[i][4]='\0';
03222   }
03223   strcpy(fVolNames[fGcnum->nvolum],"NULL");
03224 }

void TGeant3::Glast (  )  [virtual]

Definition at line 3227 of file TGeant3.cxx.

References g3last.

Referenced by glast().

03228 {
03229   //
03230   // Finish a Geant run
03231   //
03232   g3last();
03233 }

void TGeant3::Glmoth ( const char *  iudet,
Int_t  iunum,
Int_t &  nlev,
Int_t *  lvols,
Int_t *  lindx 
) [virtual]

Definition at line 4067 of file TGeant3.cxx.

References g3lmoth, PASSCHARD, and PASSCHARL.

Referenced by glmoth().

04069 {
04070   //
04071   //   Loads the top part of the Volume tree in LVOLS (IVO's),
04072   //   LINDX (IN indices) for a given volume defined through
04073   //   its name IUDET and number IUNUM.
04074   //
04075   //   The routine stores only up to the last level where JVOLUM
04076   //   data structure is developed. If there is no development
04077   //   above the current level, it returns NLEV zero.
04078   Int_t *idum=0;
04079   g3lmoth(PASSCHARD(iudet), iunum, nlev, lvols, lindx, idum PASSCHARL(iudet));
04080 }

Int_t TGeant3::Glvolu ( Int_t  nlev,
Int_t *  lnam,
Int_t *  lnum 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4661 of file TGeant3.cxx.

References g3lvolu.

Referenced by GetShape(), and GetTransformation().

04662 {
04663   //
04664   //  nlev   number of levels deep into the volume tree
04665   //         size of the arrays lnam and lnum
04666   //  lnam   an integer array who's 4 bytes contain the ASCII code for the
04667   //         volume names
04668   //  lnum   an integer array containing the copy numbers for that specific
04669   //         volume
04670   //
04671   //  This routine fills the volume parameters in common /gcvolu/ for a
04672   //  physical tree, specified by the list lnam and lnum of volume names
04673   //  and numbers, and for all its ascendants up to level 1. This routine
04674   //  is optimized and does not re-compute the part of the history already
04675   //  available in GCVOLU. This means that if it is used in user programs
04676   //  outside the usual framework of the tracking, the user has to initialize
04677   //  to zero NLEVEL in the common GCVOLU. It return 0 if there were no
04678   //  problems in make the call.
04679   //
04680   Int_t ier;
04681   g3lvolu(nlev, lnam, lnum, ier);
04682   return ier;
04683 }

void TGeant3::Gmate (  )  [virtual]

Definition at line 3467 of file TGeant3.cxx.

References g3mate.

03468 {
03469   //
03470   // Define standard GEANT materials
03471   //
03472   g3mate();
03473 }

void TGeant3::Gmedia ( Float_t *  x,
Int_t &  numed 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4083 of file TGeant3.cxx.

References g3media.

04084 {
04085   //
04086   //   Finds in which volume/medium the point X is, and updates the
04087   //    common /GCVOLU/ and the structure JGPAR accordingly.
04088   //
04089   //   NUMED returns the tracking medium number, or 0 if point is
04090   //         outside the experimental setup.
04091   //
04092 
04093   static Int_t check = 0;
04094   g3media(x,numed,check);
04095 }

void TGeant3::Gmtod ( Double_t *  xm,
Double_t *  xd,
Int_t  iflag 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4116 of file TGeant3.cxx.

References CreateFloatArray(), and Gmtod().

04117 {
04118   //
04119   //       Computes coordinates XD (in DRS)
04120   //       from known coordinates XM in MRS
04121   //       The local reference system can be initialized by
04122   //         - the tracking routines and GMTOD used in GUSTEP
04123   //         - a call to GMEDIA(XM,NUMED,CHECK)
04124   //         - a call to GLVOLU(NLEVEL,NAMES,NUMBER,IER)
04125   //             (inverse routine is GDTOM)
04126   //
04127   //        If IFLAG=1  convert coordinates
04128   //           IFLAG=2  convert direction cosines
04129   //
04130 
04131 
04132   Float_t* fxm = CreateFloatArray(xm, 3);
04133   Float_t* fxd = CreateFloatArray(xd, 3);
04134 
04135   Gmtod(fxm, fxd, iflag) ;
04136 
04137   for (Int_t i=0; i<3; i++) {
04138      xm[i] = fxm[i]; xd[i] = fxd[i];
04139   }
04140 
04141   delete [] fxm;
04142   delete [] fxd;
04143 }

void TGeant3::Gmtod ( Float_t *  xm,
Float_t *  xd,
Int_t  iflag 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4098 of file TGeant3.cxx.

References g3mtod.

Referenced by gmtod(), and Gmtod().

04099 {
04100   //
04101   //       Computes coordinates XD (in DRS)
04102   //       from known coordinates XM in MRS
04103   //       The local reference system can be initialized by
04104   //         - the tracking routines and GMTOD used in GUSTEP
04105   //         - a call to GMEDIA(XM,NUMED,CHECK)
04106   //         - a call to GLVOLU(NLEVEL,NAMES,NUMBER,IER)
04107   //             (inverse routine is GDTOM)
04108   //
04109   //        If IFLAG=1  convert coordinates
04110   //           IFLAG=2  convert direction cosines
04111   //
04112   g3mtod(xm, xd, iflag);
04113 }

void TGeant3::Gpart (  )  [virtual]

Definition at line 3476 of file TGeant3.cxx.

References g3part.

Referenced by DefineParticles(), and gpart().

03477 {
03478   //
03479   //  Define standard GEANT particles plus selected decay modes
03480   //  and branching ratios.
03481   //
03482   g3part();
03483 }

void TGeant3::Gpcxyz (  )  [virtual]

Definition at line 3185 of file TGeant3.cxx.

References g3pcxyz.

Referenced by gpcxyz().

03186 {
03187   //
03188   //    Print track and volume parameters at current point
03189   //
03190 
03191     g3pcxyz();
03192 }

void TGeant3::Gphysi (  )  [virtual]

Definition at line 3845 of file TGeant3.cxx.

References g3physi.

Referenced by BuildPhysics(), and gphysi().

03846 {
03847   //
03848   //       Initialize material constants for all the physics
03849   //       mechanisms used by GEANT
03850   //
03851   g3physi();
03852 }

void TGeant3::Gppart ( Int_t  ipart = 0  )  [virtual]

Definition at line 3394 of file TGeant3.cxx.

References g3ppart, and IdFromPDG().

03395 {
03396   // Print particle info for particle with pdg code ipart. 
03397   // If ipart = 0 (default), prints all particles.
03398   //
03399   // Note: ipart is a pdg code, not Geant3 particle code, to be consistent
03400   //       with Gfpart.
03401   
03402   Int_t igpart = 0;
03403   if ( ipart != 0 ) igpart = IdFromPDG(ipart);
03404   g3ppart(igpart);
03405 
03406 }

Float_t TGeant3::Gprelm ( Float_t  z,
Float_t  t,
Float_t  cut 
) [virtual]

Definition at line 3458 of file TGeant3.cxx.

References g3prelm.

03459 {
03460   //
03461   // To calculate DE/DX in GeV*barn/atom for direct pair production by muons
03462   //
03463   return g3prelm(z,t,bcut);
03464 }

void TGeant3::Gprint ( const char *  name  )  [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 3236 of file TGeant3.cxx.

References g3print, PASSCHARD, PASSCHARL, and Vname().

Referenced by gprint().

03237 {
03238   //
03239   // Routine to print data structures
03240   // CHNAME   name of a data structure
03241   //
03242   char vname[5];
03243   Vname(name,vname);
03244   g3print(PASSCHARD(vname),0 PASSCHARL(vname));
03245 }

void TGeant3::Gprotm ( Int_t  nmat = 0  )  [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4406 of file TGeant3.cxx.

References g3protm.

04407 {
04408   //
04409   //    To print rotation matrices structure JROTM
04410   //     nmat     Rotation matrix number
04411   //
04412   g3protm(nmat);
04413  }

void TGeant3::Gptmed ( Int_t  numed  )  [virtual]

Definition at line 3425 of file TGeant3.cxx.

References g3ptmed.

03426 {
03427   //
03428   // Print tracking medium NUMED. numed == 0 prints all media.
03429   //
03430   g3ptmed(numed);
03431 
03432 }

void TGeant3::Grndm ( Float_t *  rvec,
Int_t  len 
) const [virtual]

Definition at line 3972 of file TGeant3.cxx.

03973 {
03974   //
03975   //  To set/retrieve the seed of the random number generator
03976   //
03977   TRandom* r=gMC->GetRandom();
03978   for(Int_t i=0; i<len; rvec[i++]=r->Rndm()) {};
03979 }

void TGeant3::Grndmq ( Int_t &  is1,
Int_t &  is2,
Int_t  iseq,
const Text_t *  chopt 
) [virtual]

Definition at line 3982 of file TGeant3.cxx.

03984 {
03985   //
03986   //  To set/retrieve the seed of the random number generator
03987   //
03988   /*printf("Dummy grndmq called\n");*/
03989    is1 = gRandom->GetSeed();
03990    is2 = 0;
03991 }

void TGeant3::Grun (  )  [virtual]

Definition at line 3248 of file TGeant3.cxx.

References g3run.

Referenced by grun().

03249 {
03250   //
03251   // Steering function to process one run
03252   //
03253   g3run();
03254 }

void TGeant3::Gsatt ( const char *  name,
const char *  att,
Int_t  val 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4538 of file TGeant3.cxx.

References g3satt, PASSCHARD, PASSCHARL, and Vname().

Referenced by G3Volume::Draw(), G3Volume::DrawSpec(), gsatt(), and SetColors().

04539 {
04540   //
04541   //  NAME   Volume name
04542   //  IOPT   Name of the attribute to be set
04543   //  IVAL   Value to which the attribute is to be set
04544   //
04545   //  name= "*" stands for all the volumes.
04546   //  iopt can be chosen among the following :
04547   //
04548   //     WORK   0=volume name is inactive for the tracking
04549   //            1=volume name is active for the tracking (default)
04550   //
04551   //     SEEN   0=volume name is invisible
04552   //            1=volume name is visible (default)
04553   //           -1=volume invisible with all its descendants in the tree
04554   //           -2=volume visible but not its descendants in the tree
04555   //
04556   //     LSTY   line style 1,2,3,... (default=1)
04557   //            LSTY=7 will produce a very precise approximation for
04558   //            revolution bodies.
04559   //
04560   //     LWID   line width -7,...,1,2,3,..7 (default=1)
04561   //            LWID<0 will act as abs(LWID) was set for the volume
04562   //            and for all the levels below it. When SHAD is 'ON', LWID
04563   //            represent the line width of the scan lines filling the surfaces
04564   //            (whereas the FILL value represent their number). Therefore
04565   //            tuning this parameter will help to obtain the desired
04566   //            quality/performance ratio.
04567   //
04568   //     COLO   color code -166,...,1,2,..166 (default=1)
04569   //            n=1=black
04570   //            n=2=red;    n=17+m, m=0,25, increasing luminosity according to 'm';
04571   //            n=3=green;  n=67+m, m=0,25, increasing luminosity according to 'm';
04572   //            n=4=blue;   n=117+m, m=0,25, increasing luminosity according to 'm';
04573   //            n=5=yellow; n=42+m, m=0,25, increasing luminosity according to 'm';
04574   //            n=6=violet; n=142+m, m=0,25, increasing luminosity according to 'm';
04575   //            n=7=light-blue; n=92+m, m=0,25, increasing luminosity according to 'm';
04576   //            color=n*10+m, m=1,2,...9, will produce the same color
04577   //            as 'n', but with increasing luminosity according to 'm';
04578   //            COLO<0 will act as if abs(COLO) was set for the volume
04579   //            and for all the levels below it.
04580   //            When for a volume the attribute FILL is > 1 (and the
04581   //            option SHAD is on), the ABS of its color code must be < 8
04582   //            because an automatic shading of its faces will be
04583   //            performed.
04584   //
04585   //     FILL  (1992) fill area  -7,...,0,1,...7 (default=0)
04586   //            when option SHAD is "on" the FILL attribute of any
04587   //            volume can be set different from 0 (normal drawing);
04588   //            if it is set to 1, the faces of such volume will be filled
04589   //            with solid colors; if ABS(FILL) is > 1, then a light
04590   //            source is placed along the observer line, and the faces of
04591   //            such volumes will be painted by colors whose luminosity
04592   //            will depend on the amount of light reflected;
04593   //            if ABS(FILL) = 1, then it is possible to use all the 166
04594   //            colors of the color table, because the automatic shading
04595   //            is not performed;
04596   //            for increasing values of FILL the drawing will be performed
04597   //            with higher and higher resolution improving the quality (the
04598   //            number of scan lines used to fill the faces increases with 
04599   //            FILL); it is possible to set different values of FILL
04600   //            for different volumes, in order to optimize at the same time
04601   //            the performance and the quality of the picture;
04602   //            FILL<0 will act as if abs(FILL) was set for the volume
04603   //            and for all the levels below it.
04604   //            This kind of drawing can be saved in 'picture files'
04605   //            or in view banks.
04606   //            0=drawing without fill area
04607   //            1=faces filled with solid colors and resolution = 6
04608   //            2=lowest resolution (very fast)
04609   //            3=default resolution
04610   //            4=.................
04611   //            5=.................
04612   //            6=.................
04613   //            7=max resolution
04614   //            Finally, if a colored background is desired, the FILL
04615   //            attribute for the first volume of the tree must be set
04616   //            equal to -abs(colo), colo being >0 and <166.
04617   //
04618   //     SET   set number associated to volume name
04619   //     DET   detector number associated to volume name
04620   //     DTYP  detector type (1,2)
04621   //
04622 
04623   char vname[5];
04624   Vname(name,vname);
04625   char vatt[5];
04626   Vname(att,vatt);
04627   g3satt(PASSCHARD(vname), PASSCHARD(vatt), val PASSCHARL(vname)
04628         PASSCHARL(vatt));
04629 }

virtual void TGeant3::Gsbool ( const char *  ,
const char *   
) [inline, virtual]

Definition at line 1045 of file TGeant3.h.

01046                                                       {}

void TGeant3::Gsckov ( Int_t  itmed,
Int_t  npckov,
Float_t *  ppckov,
Float_t *  absco,
Float_t *  effic,
Float_t *  rindex 
) [virtual]

Definition at line 3598 of file TGeant3.cxx.

References g3sckov.

Referenced by gsckov().

03600 {
03601   //
03602   //    Stores the tables for UV photon tracking in medium ITMED
03603   //    Please note that it is the user's responsibility to
03604   //    provide all the coefficients:
03605   //
03606   //
03607   //       ITMED       Tracking medium number
03608   //       NPCKOV      Number of bins of each table
03609   //       PPCKOV      Value of photon momentum (in GeV)
03610   //       ABSCO       Absorption coefficients
03611   //                   dielectric: absorption length in cm
03612   //                   metals    : absorption fraction (0<=x<=1)
03613   //       EFFIC       Detection efficiency for UV photons
03614   //       RINDEX      Refraction index (if=0 metal)
03615   //
03616   g3sckov(itmed,npckov,ppckov,absco,effic,rindex);
03617 }

void TGeant3::Gsdk ( Int_t  ipart,
Float_t *  bratio,
Int_t *  mode 
) [virtual]

Definition at line 3486 of file TGeant3.cxx.

References g3sdk.

Referenced by DefineParticles(), gsdk(), and SetDecayMode().

03487 {
03488 //  Defines branching ratios and decay modes for standard
03489 //  GEANT particles.
03490    g3sdk(ipart,bratio,mode);
03491 }

void TGeant3::Gsdvn ( const char *  name,
const char *  mother,
Int_t  ndiv,
Int_t  iaxis 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4146 of file TGeant3.cxx.

References g3sdvn, PASSCHARD, PASSCHARL, and Vname().

Referenced by gsdvn().

04148 {
04149   //
04150   // Create a new volume by dividing an existing one
04151   //
04152   //  NAME   Volume name
04153   //  MOTHER Mother volume name
04154   //  NDIV   Number of divisions
04155   //  IAXIS  Axis value
04156   //
04157   //  X,Y,Z of CAXIS will be translated to 1,2,3 for IAXIS.
04158   //  It divides a previously defined volume.
04159   //
04160   char vname[5];
04161   Vname(name,vname);
04162   char vmother[5];
04163   Vname(mother,vmother);
04164 
04165   g3sdvn(PASSCHARD(vname), PASSCHARD(vmother), ndiv, iaxis PASSCHARL(vname)
04166         PASSCHARL(vmother));
04167 }

void TGeant3::Gsdvn2 ( const char *  name,
const char *  mother,
Int_t  ndiv,
Int_t  iaxis,
Double_t  c0i,
Int_t  numed 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4170 of file TGeant3.cxx.

References g3sdvn2, PASSCHARD, PASSCHARL, and Vname().

Referenced by gsdvn2().

04172 {
04173   //
04174   // Create a new volume by dividing an existing one
04175   //
04176   // Divides mother into ndiv divisions called name
04177   // along axis iaxis starting at coordinate value c0.
04178   // the new volume created will be medium number numed.
04179   //
04180   char vname[5];
04181   Vname(name,vname);
04182   char vmother[5];
04183   Vname(mother,vmother);
04184 
04185   Float_t fc0i = c0i;
04186   g3sdvn2(PASSCHARD(vname), PASSCHARD(vmother), ndiv, iaxis, fc0i, numed
04187          PASSCHARL(vname) PASSCHARL(vmother));
04188 }

void TGeant3::Gsdvs ( const char *  name,
const char *  mother,
Float_t  step,
Int_t  iaxis,
Int_t  numed 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4191 of file TGeant3.cxx.

References g3sdvs, PASSCHARD, PASSCHARL, and Vname().

Referenced by gsdvs().

04193 {
04194   //
04195   // Create a new volume by dividing an existing one
04196   //
04197   char vname[5];
04198   Vname(name,vname);
04199   char vmother[5];
04200   Vname(mother,vmother);
04201 
04202   g3sdvs(PASSCHARD(vname), PASSCHARD(vmother), step, iaxis, numed
04203         PASSCHARL(vname) PASSCHARL(vmother));
04204 }

void TGeant3::Gsdvs2 ( const char *  name,
const char *  mother,
Float_t  step,
Int_t  iaxis,
Float_t  c0,
Int_t  numed 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4207 of file TGeant3.cxx.

References g3sdvs2, PASSCHARD, PASSCHARL, and Vname().

Referenced by gsdvs2().

04209 {
04210   //
04211   // Create a new volume by dividing an existing one
04212   //
04213   char vname[5];
04214   Vname(name,vname);
04215   char vmother[5];
04216   Vname(mother,vmother);
04217 
04218   g3sdvs2(PASSCHARD(vname), PASSCHARD(vmother), step, iaxis, c0, numed
04219          PASSCHARL(vname) PASSCHARL(vmother));
04220 }

void TGeant3::Gsdvt ( const char *  name,
const char *  mother,
Double_t  step,
Int_t  iaxis,
Int_t  numed,
Int_t  ndvmx 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4223 of file TGeant3.cxx.

References g3sdvt, PASSCHARD, PASSCHARL, and Vname().

Referenced by gsdvt().

04225 {
04226   //
04227   // Create a new volume by dividing an existing one
04228   //
04229   //       Divides MOTHER into divisions called NAME along
04230   //       axis IAXIS in steps of STEP. If not exactly divisible
04231   //       will make as many as possible and will center them
04232   //       with respect to the mother. Divisions will have medium
04233   //       number NUMED. If NUMED is 0, NUMED of MOTHER is taken.
04234   //       NDVMX is the expected maximum number of divisions
04235   //          (If 0, no protection tests are performed)
04236   //
04237   char vname[5];
04238   Vname(name,vname);
04239   char vmother[5];
04240   Vname(mother,vmother);
04241 
04242   Float_t fstep = step;
04243   g3sdvt(PASSCHARD(vname), PASSCHARD(vmother), fstep, iaxis, numed, ndvmx
04244         PASSCHARL(vname) PASSCHARL(vmother));
04245 }

void TGeant3::Gsdvt2 ( const char *  name,
const char *  mother,
Double_t  step,
Int_t  iaxis,
Double_t  c0,
Int_t  numed,
Int_t  ndvmx 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4248 of file TGeant3.cxx.

References g3sdvt2, PASSCHARD, PASSCHARL, and Vname().

Referenced by gsdvt2().

04250 {
04251   //
04252   // Create a new volume by dividing an existing one
04253   //
04254   //           Divides MOTHER into divisions called NAME along
04255   //            axis IAXIS starting at coordinate value C0 with step
04256   //            size STEP.
04257   //           The new volume created will have medium number NUMED.
04258   //           If NUMED is 0, NUMED of mother is taken.
04259   //           NDVMX is the expected maximum number of divisions
04260   //             (If 0, no protection tests are performed)
04261   //
04262   char vname[5];
04263   Vname(name,vname);
04264   char vmother[5];
04265   Vname(mother,vmother);
04266 
04267   Float_t fstep = step;
04268   Float_t fc0 = c0;
04269   g3sdvt2(PASSCHARD(vname), PASSCHARD(vmother), fstep, iaxis, fc0,
04270          numed, ndvmx PASSCHARL(vname) PASSCHARL(vmother));
04271 }

Int_t TGeant3::Gskine ( Float_t *  plab,
Int_t  ipart,
Int_t  nv,
Float_t *  ubuf = 0,
Int_t  nwbuf = 0 
) [virtual]

Definition at line 3812 of file TGeant3.cxx.

References g3skine.

Referenced by gskine().

03814 {
03815   //
03816   //       Store kinematics of track NT into data structure
03817   //       Track is coming from vertex NV
03818   //
03819   Int_t nt = 0;
03820   g3skine(plab, ipart, nv, buf, nwbuf, nt);
03821   return nt;
03822 }

void TGeant3::Gsking ( Int_t  igk  )  [virtual]

Definition at line 3899 of file TGeant3.cxx.

References g3sking.

Referenced by gsking().

03900 {
03901   //
03902   //   Stores in stack JSTAK either the IGKth track of /GCKING/,
03903   //    or the NGKINE tracks when IGK is 0.
03904   //
03905   g3sking(igk);
03906 }

void TGeant3::Gskpho ( Int_t  igk  )  [virtual]

Definition at line 3909 of file TGeant3.cxx.

References g3skpho.

Referenced by gskpho().

03910 {
03911   //
03912   //  Stores in stack JSTAK either the IGKth Cherenkov photon of
03913   //  /GCKIN2/, or the NPHOT tracks when IGK is 0.
03914   //
03915   g3skpho(igk);
03916 }

void TGeant3::Gsmate ( Int_t  imat,
const char *  name,
Float_t  a,
Float_t  z,
Float_t  dens,
Float_t  radl,
Float_t  absl 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 3494 of file TGeant3.cxx.

References g3smate, nbuf, PASSCHARD, and PASSCHARL.

Referenced by gsmate().

03496 {
03497   //
03498   // Defines a Material
03499   //
03500   //  kmat               number assigned to the material
03501   //  name               material name
03502   //  a                  atomic mass in au
03503   //  z                  atomic number
03504   //  dens               density in g/cm3
03505   //  absl               absorption length in cm
03506   //                     if >=0 it is ignored and the program
03507   //                     calculates it, if <0. -absl is taken
03508   //  radl               radiation length in cm
03509   //                     if >=0 it is ignored and the program
03510   //                     calculates it, if <0. -radl is taken
03511   //  buf                pointer to an array of user words
03512   //  nbuf               number of user words
03513   //
03514   Float_t *ubuf=0;
03515   Int_t   nbuf=0;
03516   if (dens <= 0 && a != 0 && z != 0) {
03517      Warning("Gsmate","Density was o, set to 0.01 for imat=%d, name=%s",
03518              imat,name);
03519      dens = 0.01;
03520   }
03521   g3smate(imat,PASSCHARD(name), a, z, dens, radl, absl, ubuf, nbuf
03522          PASSCHARL(name));
03523 }

void TGeant3::Gsmixt ( Int_t  imat,
const char *  name,
Float_t *  a,
Float_t *  z,
Float_t  dens,
Int_t  nlmat,
Float_t *  wmat 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 3526 of file TGeant3.cxx.

References g3smixt, PASSCHARD, and PASSCHARL.

Referenced by gsmixt().

03528 {
03529   //
03530   //       Defines mixture OR COMPOUND IMAT as composed by
03531   //       THE BASIC NLMAT materials defined by arrays A,Z and WMAT
03532   //
03533   //       If NLMAT.GT.0 then WMAT contains the PROPORTION BY
03534   //       WEIGHTS OF EACH BASIC MATERIAL IN THE MIXTURE.
03535   //
03536   //       If NLMAT.LT.0 then WMAT contains the number of atoms
03537   //       of a given kind into the molecule of the COMPOUND
03538   //       In this case, WMAT in output is changed to relative
03539   //       weights.
03540   //
03541   g3smixt(imat,PASSCHARD(name), a, z,dens, nlmat,wmat PASSCHARL(name));
03542 }

void TGeant3::Gsord ( const char *  name,
Int_t  iax 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4274 of file TGeant3.cxx.

References g3sord, PASSCHARD, PASSCHARL, and Vname().

Referenced by gsord().

04275 {
04276   //
04277   //    Flags volume CHNAME whose contents will have to be ordered
04278   //    along axis IAX, by setting the search flag to -IAX
04279   //           IAX = 1    X axis
04280   //           IAX = 2    Y axis
04281   //           IAX = 3    Z axis
04282   //           IAX = 4    Rxy (static ordering only  -> GTMEDI)
04283   //           IAX = 14   Rxy (also dynamic ordering -> GTNEXT)
04284   //           IAX = 5    Rxyz (static ordering only -> GTMEDI)
04285   //           IAX = 15   Rxyz (also dynamic ordering -> GTNEXT)
04286   //           IAX = 6    PHI   (PHI=0 => X axis)
04287   //           IAX = 7    THETA (THETA=0 => Z axis)
04288   //
04289 
04290   char vname[5];
04291   Vname(name,vname);
04292   g3sord(PASSCHARD(vname), iax PASSCHARL(vname));
04293 }

void TGeant3::Gspart ( Int_t  ipart,
const char *  name,
Int_t  itrtyp,
Double_t  amass,
Double_t  charge,
Double_t  tlife 
) [virtual]

Definition at line 3545 of file TGeant3.cxx.

References g3spart, nbuf, PASSCHARD, and PASSCHARL.

Referenced by DefineParticle(), DefineParticles(), and gspart().

03547 {
03548   //
03549   // Store particle parameters
03550   //
03551   // ipart           particle code
03552   // name            particle name
03553   // itrtyp          transport method (see GEANT manual)
03554   // amass           mass in GeV/c2
03555   // charge          charge in electron units
03556   // tlife           lifetime in seconds
03557   //
03558   Float_t *ubuf=0;
03559   Int_t   nbuf=0;
03560   Float_t fmass = amass;
03561   Float_t fcharge = charge;
03562   Float_t flife = tlife;
03563 
03564   g3spart(ipart,PASSCHARD(name), itrtyp, fmass, fcharge, flife, ubuf, nbuf
03565          PASSCHARL(name));
03566 }

void TGeant3::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]

Reimplemented in TGeant3TGeo.

Definition at line 4296 of file TGeant3.cxx.

References g3spos, PASSCHARD, PASSCHARL, and Vname().

Referenced by gspos().

04299 {
04300   //
04301   // Position a volume into an existing one
04302   //
04303   //  NAME   Volume name
04304   //  NUMBER Copy number of the volume
04305   //  MOTHER Mother volume name
04306   //  X      X coord. of the volume in mother ref. sys.
04307   //  Y      Y coord. of the volume in mother ref. sys.
04308   //  Z      Z coord. of the volume in mother ref. sys.
04309   //  IROT   Rotation matrix number w.r.t. mother ref. sys.
04310   //  ONLY   ONLY/MANY flag
04311   //
04312   //  It positions a previously defined volume in the mother.
04313   //
04314 
04315   TString only = konly;
04316   only.ToLower();
04317   Bool_t isOnly = kFALSE;
04318   if (only.Contains("only")) isOnly = kTRUE;
04319   char vname[5];
04320   Vname(name,vname);
04321   char vmother[5];
04322   Vname(mother,vmother);
04323 
04324   Float_t fx = x;
04325   Float_t fy = y;
04326   Float_t fz = z;
04327   g3spos(PASSCHARD(vname), nr, PASSCHARD(vmother), fx, fy, fz, irot,
04328         PASSCHARD(konly) PASSCHARL(vname) PASSCHARL(vmother)
04329         PASSCHARL(konly));
04330 }

void TGeant3::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]

Reimplemented in TGeant3TGeo.

Definition at line 4372 of file TGeant3.cxx.

References CreateFloatArray(), and G3Gsposp().

04375 {
04376   //
04377   //      Place a copy of generic volume NAME with user number
04378   //      NR inside MOTHER, with its parameters UPAR(1..NP)
04379   //
04380 
04381   Float_t* fupar = CreateFloatArray(upar, np);
04382   G3Gsposp(name, nr, mother, x, y, z, irot, konly, fupar, np);
04383   delete [] fupar;
04384 }

void TGeant3::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]

Reimplemented in TGeant3TGeo.

Definition at line 4359 of file TGeant3.cxx.

References G3Gsposp().

Referenced by gsposp().

04362 {
04363   //
04364   //      Place a copy of generic volume NAME with user number
04365   //      NR inside MOTHER, with its parameters UPAR(1..NP)
04366   //
04367 
04368   G3Gsposp(name, nr, mother, x, y, z, irot, konly, upar, np);
04369 }

void TGeant3::Gsrotm ( Int_t  nmat,
Float_t  theta1,
Float_t  phi1,
Float_t  theta2,
Float_t  phi2,
Float_t  theta3,
Float_t  phi3 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4387 of file TGeant3.cxx.

References g3srotm.

Referenced by gsrotm().

04389 {
04390   //
04391   //  nmat   Rotation matrix number
04392   //  THETA1 Polar angle for axis I
04393   //  PHI1   Azimuthal angle for axis I
04394   //  THETA2 Polar angle for axis II
04395   //  PHI2   Azimuthal angle for axis II
04396   //  THETA3 Polar angle for axis III
04397   //  PHI3   Azimuthal angle for axis III
04398   //
04399   //  It defines the rotation matrix number IROT.
04400   //
04401 
04402   g3srotm(nmat, theta1, phi1, theta2, phi2, theta3, phi3);
04403 }

void TGeant3::Gsstak ( Int_t  iflag  )  [virtual]

Definition at line 3919 of file TGeant3.cxx.

References g3sstak.

Referenced by gsstak().

03920 {
03921   //
03922   //   Stores in auxiliary stack JSTAK the particle currently
03923   //    described in common /GCKINE/.
03924   //
03925   //   On request, creates also an entry in structure JKINE :
03926   //    IFLAG =
03927   //     0 : No entry in JKINE structure required (user)
03928   //     1 : New entry in JVERTX / JKINE structures required (user)
03929   //    <0 : New entry in JKINE structure at vertex -IFLAG (user)
03930   //     2 : Entry in JKINE structure exists already (from GTREVE)
03931   //
03932   g3sstak(iflag);
03933 }

void TGeant3::Gstmed ( Int_t  numed,
const char *  name,
Int_t  nmat,
Int_t  isvol,
Int_t  ifield,
Float_t  fieldm,
Float_t  tmaxfd,
Float_t  stemax,
Float_t  deemax,
Float_t  epsil,
Float_t  stmin 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 3569 of file TGeant3.cxx.

References g3stmed, nbuf, PASSCHARD, and PASSCHARL.

Referenced by gstmed().

03573 {
03574   //
03575   //  NTMED  Tracking medium number
03576   //  NAME   Tracking medium name
03577   //  NMAT   Material number
03578   //  ISVOL  Sensitive volume flag
03579   //  IFIELD Magnetic field
03580   //  FIELDM Max. field value (Kilogauss)
03581   //  TMAXFD Max. angle due to field (deg/step)
03582   //  STEMAX Max. step allowed
03583   //  DEEMAX Max. fraction of energy lost in a step
03584   //  EPSIL  Tracking precision (cm)
03585   //  STMIN  Min. step due to continuous processes (cm)
03586   //
03587   //  IFIELD = 0 if no magnetic field; IFIELD = -1 if user decision in GUSWIM;
03588   //  IFIELD = 1 if tracking performed with G3RKUTA; IFIELD = 2 if tracking
03589   //  performed with G3HELIX; IFIELD = 3 if tracking performed with G3HELX3.
03590   //
03591   Float_t *ubuf=0;
03592   Int_t   nbuf=0;
03593   g3stmed(numed,PASSCHARD(name), nmat, isvol, ifield, fieldm, tmaxfd, stemax,
03594          deemax, epsil, stmin, ubuf, nbuf PASSCHARL(name));
03595 }

void TGeant3::Gstpar ( Int_t  itmed,
const char *  param,
Double_t  parval 
) [virtual]

Definition at line 3731 of file TGeant3.cxx.

References g3stpar, PASSCHARD, and PASSCHARL.

Referenced by gstpar().

03732 {
03733   //
03734   //  To change the value of cut  or mechanism "CHPAR"
03735   //      to a new value PARVAL  for tracking medium ITMED
03736   //    The  data   structure  JTMED   contains  the   standard  tracking
03737   //  parameters (CUTS and flags to control the physics processes)  which
03738   //  are used  by default  for all  tracking media.   It is  possible to
03739   //  redefine individually  with GSTPAR  any of  these parameters  for a
03740   //  given tracking medium.
03741   //  ITMED     tracking medium number
03742   //  CHPAR     is a character string (variable name)
03743   //  PARVAL    must be given as a floating point.
03744   //
03745 
03746   Float_t fparval = parval;
03747   g3stpar(itmed,PASSCHARD(param), fparval PASSCHARL(param));
03748 }

Int_t TGeant3::Gsvert ( Float_t *  v,
Int_t  ntbeam,
Int_t  nttarg,
Float_t *  ubuf = 0,
Int_t  nwbuf = 0 
) [virtual]

Definition at line 3825 of file TGeant3.cxx.

References g3svert.

Referenced by gsvert().

03827 {
03828   //
03829   //       Creates a new vertex bank
03830   //       Vertex is generated from tracks NTBEAM NTTARG
03831   //       NVTX is the new vertex number
03832   //
03833   Int_t nwtx = 0;
03834   g3svert(v, ntbeam, nttarg, ubuf, nwbuf, nwtx);
03835   return nwtx;
03836 }

Int_t TGeant3::Gsvolu ( const char *  name,
const char *  shape,
Int_t  nmed,
Double_t *  upar,
Int_t  np 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4460 of file TGeant3.cxx.

References CreateFloatArray(), and G3Gsvolu().

04462 {
04463   //
04464   //  NAME   Volume name
04465   //  SHAPE  Volume type
04466   //  NUMED  Tracking medium number
04467   //  NPAR   Number of shape parameters
04468   //  UPAR   Vector containing shape parameters
04469   //
04470   //  It creates a new volume in the JVOLUM data structure.
04471   //
04472 
04473 
04474   Int_t ivolu = 0;
04475   Float_t* fupar = CreateFloatArray(upar, npar);
04476   ivolu = G3Gsvolu(name, shape, nmed, fupar, npar);
04477   delete [] fupar;
04478   return ivolu;
04479 }

Int_t TGeant3::Gsvolu ( const char *  name,
const char *  shape,
Int_t  nmed,
Float_t *  upar,
Int_t  np 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 4440 of file TGeant3.cxx.

References G3Gsvolu().

Referenced by gsvolu().

04442 {
04443   //
04444   //  NAME   Volume name
04445   //  SHAPE  Volume type
04446   //  NUMED  Tracking medium number
04447   //  NPAR   Number of shape parameters
04448   //  UPAR   Vector containing shape parameters
04449   //
04450   //  It creates a new volume in the JVOLUM data structure.
04451   //
04452 
04453   Int_t ivolu = 0;
04454   ivolu = G3Gsvolu(name, shape, nmed, upar, npar);
04455   return ivolu;
04456 
04457 }

void TGeant3::Gsxyz (  )  [virtual]

Definition at line 3936 of file TGeant3.cxx.

References g3sxyz.

Referenced by gsxyz().

03937 {
03938   //
03939   //   Store space point VECT in banks JXYZ
03940   //
03941   g3sxyz();
03942 }

void TGeant3::Gtrack (  )  [virtual]

Definition at line 3945 of file TGeant3.cxx.

References g3track.

Referenced by gtrack().

03946 {
03947   //
03948   //   Controls tracking of current particle
03949   //
03950   g3track();
03951 }

void TGeant3::Gtreve (  )  [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 3954 of file TGeant3.cxx.

References g3treve.

Referenced by gtreve().

03955 {
03956   //
03957   //   Controls tracking of all particles belonging to the current event
03958   //
03959   g3treve();
03960 }

void TGeant3::GtreveRoot (  )  [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 3963 of file TGeant3.cxx.

References gtreveroot.

03964 {
03965   //
03966   //   Controls tracking of all particles belonging to the current event
03967   //
03968   gtreveroot();
03969 }

void TGeant3::Gtrig (  )  [virtual]

Definition at line 3257 of file TGeant3.cxx.

References g3trig.

Referenced by gtrig(), and ProcessEvent().

03258 {
03259   //
03260   // Steering function to process one event
03261   //
03262   g3trig();
03263 
03264   //printf("count_gmedia= %8d\n",count_gmedia);
03265   //printf("count_gtmedi= %8d\n",count_gtmedi);
03266   //printf("count_ginvol= %8d\n",count_ginvol);
03267   //printf("count_gtnext= %8d\n",count_gtnext);
03268 }

void TGeant3::Gtrigc (  )  [virtual]

Definition at line 3271 of file TGeant3.cxx.

References g3trigc.

Referenced by gtrigc(), and ProcessEvent().

03272 {
03273   //
03274   // Clear event partition
03275   //
03276   g3trigc();
03277 }

void TGeant3::Gtrigi (  )  [virtual]

Definition at line 3280 of file TGeant3.cxx.

References g3trigi.

Referenced by gtrigi(), and ProcessEvent().

03281 {
03282   //
03283   // Initializes event partition
03284   //
03285   g3trigi();
03286 }

void TGeant3::Gwork ( Int_t  nwork  )  [virtual]

Definition at line 3289 of file TGeant3.cxx.

References g3work.

03290 {
03291   //
03292   // Allocates workspace in ZEBRA memory
03293   //
03294   g3work(nwork);
03295 }

void TGeant3::Gzinit (  )  [virtual]

Definition at line 3298 of file TGeant3.cxx.

References g3zinit.

Referenced by gzinit().

03299 {
03300   //
03301   // To initialize GEANT/ZEBRA data structures
03302   //
03303   g3zinit();
03304 }

Int_t TGeant3::IdFromPDG ( Int_t  pdg  )  const

Definition at line 1523 of file TGeant3.cxx.

References fNPDGCodes, and fPDGCode.

Referenced by DefineParticle(), Gfpart(), Gppart(), SetDecayMode(), and SetUserDecay().

01524 {
01525   //
01526   // Return Geant3 code from PDG and pseudo ENDF code
01527   //
01528   for(Int_t i=0;i<fNPDGCodes;++i)
01529     if(pdg==fPDGCode[i]) return i;
01530   return -1;
01531 }

void TGeant3::Init ( void   )  [virtual]

Definition at line 6396 of file TGeant3.cxx.

References DefineParticles(), MuELoss::e, FinishGeometry(), kABAN, kAUTO, kDEBU, kERAN, kOPTI, kSWIT, kTRIG, SetABAN(), SetAUTO(), SetDEBU(), SetERAN(), SetOPTI(), SetSWIT(), and SetTRIG().

06397 {
06398     //
06399     //=================Create Materials and geometry
06400     //
06401 
06402     //  Some default settings, if not changed by user
06403     if (!TestBit(kTRIG)) SetTRIG(1);       // Number of events to be processed
06404     if (!TestBit(kSWIT)) SetSWIT(4, 10);   //
06405     if (!TestBit(kDEBU)) SetDEBU(0, 0, 1); //
06406     if (!TestBit(kAUTO)) SetAUTO(1);       // Select automatic STMIN etc... 
06407                                            // calc. (AUTO 1) or manual (AUTO 0)
06408     if (!TestBit(kABAN)) SetABAN(0);       // Restore 3.16 behaviour for 
06409                                            // abandoned tracks
06410     if (!TestBit(kOPTI)) SetOPTI(2);       // Select optimisation level for 
06411                                            // GEANT geometry searches (0,1,2)
06412     if (!TestBit(kERAN)) SetERAN(5.e-7);   //
06413 
06414     DefineParticles();
06415     fApplication->AddParticles();
06416     fApplication->AddIons();
06417     fApplication->ConstructGeometry();
06418     FinishGeometry();
06419 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,01,1)
06420     fApplication->ConstructOpGeometry();
06421 #endif
06422     fApplication->InitGeometry();
06423 }

void TGeant3::InitGEANE (  )  [virtual]

Definition at line 1257 of file TGeant3.cxx.

References SetClose(), and SetECut().

Referenced by TGeant3().

01258 {
01259   //
01260   // Initialize GEANE for default use
01261   //
01262   Float_t pf[3]={0.,0.,0.};
01263   Float_t w1[3]={0.,0.,0.};
01264   Float_t w2[3]={0.,0.,0.};
01265   Float_t p1[3]={0.,0.,0.};
01266   Float_t p2[3]={0.,0.,0.};
01267   Float_t p3[3]={0.,0.,0.};
01268   Float_t cl[3]={0.,0.,0.};
01269   geant3 = this;
01270   geant3->SetECut(1.);
01271   geant3->SetClose(0,pf,999.,w1,w2,p1,p2,p3,cl);
01272 }

void TGeant3::InitHIGZ (  )  [virtual]

Definition at line 1249 of file TGeant3.cxx.

01250 {
01251   //
01252   // Initialize HIGZ
01253   //
01254 }

void TGeant3::InitLego (  )  [virtual]

Definition at line 2592 of file TGeant3.cxx.

References SetDEBU(), and SetSWIT().

02593 {
02594   //
02595   // Set switches for lego transport
02596   //
02597   SetSWIT(4,0);
02598   SetDEBU(0,0,0);  //do not print a message
02599 }

virtual Int_t* TGeant3::Iq (  )  const [inline, virtual]

Definition at line 857 of file TGeant3.h.

References fZiq.

Referenced by PTGuiRollG3::RollMaterials().

00857 {return fZiq;}

Bool_t TGeant3::IsCollectTracks (  )  const [inline, protected]

Reimplemented in TGeant3TGeo.

Definition at line 1270 of file TGeant3.h.

01270 {return kFALSE;}

Bool_t TGeant3::IsNewTrack (  )  const

Definition at line 2368 of file TGeant3.cxx.

References fGctrak, and Gctrak_t::sleng.

02369 {
02370   //
02371   // True if the track is not at the boundary of the current volume
02372   //
02373   return (fGctrak->sleng==0);
02374 }

virtual Bool_t TGeant3::IsRootGeometrySupported (  )  const [inline, virtual]

Reimplemented in TGeant3TGeo.

Definition at line 670 of file TGeant3.h.

00670 {return kFALSE;}

Bool_t TGeant3::IsTrackAlive (  )  const

Definition at line 2613 of file TGeant3.cxx.

References fGctrak, and Gctrak_t::istop.

02614 {
02615   //
02616   // True if the current particle is alive and will continue to be
02617   // transported
02618   //
02619   return (fGctrak->istop==0);
02620 }

Bool_t TGeant3::IsTrackDisappeared (  )  const

Definition at line 2602 of file TGeant3.cxx.

References fGctrak, and Gctrak_t::istop.

02603 {
02604   //
02605   // True if the current particle has disappeared
02606   // either because it decayed or because it underwent
02607   // an inelastic collision
02608   //
02609   return (fGctrak->istop==1);
02610 }

Bool_t TGeant3::IsTrackEntering (  )  const

Definition at line 2386 of file TGeant3.cxx.

References fGctrak, and Gctrak_t::inwvol.

Referenced by TGeant3TGeo::CurrentBoundaryNormal().

02387 {
02388   //
02389   // True if this is the first step of the track in the current volume
02390   //
02391   return (fGctrak->inwvol==1);
02392 }

Bool_t TGeant3::IsTrackExiting (  )  const

Definition at line 2395 of file TGeant3.cxx.

References fGctrak, and Gctrak_t::inwvol.

Referenced by TGeant3TGeo::CurrentBoundaryNormal().

02396 {
02397   //
02398   // True if this is the last step of the track in the current volume
02399   //
02400   return (fGctrak->inwvol==2);
02401 }

Bool_t TGeant3::IsTrackInside (  )  const

Definition at line 2377 of file TGeant3.cxx.

References fGctrak, and Gctrak_t::inwvol.

02378 {
02379   //
02380   // True if the track is not at the boundary of the current volume
02381   //
02382   return (fGctrak->inwvol==0);
02383 }

Bool_t TGeant3::IsTrackOut (  )  const

Definition at line 2404 of file TGeant3.cxx.

References fGctrak, and Gctrak_t::inwvol.

02405 {
02406   //
02407   // True if the track is out of the setup
02408   //
02409   return (fGctrak->inwvol==3);
02410 }

Bool_t TGeant3::IsTrackStop (  )  const

Definition at line 2413 of file TGeant3.cxx.

References fGctrak, and Gctrak_t::istop.

02414 {
02415   //
02416   // True if the track energy has fallen below the threshold
02417   //
02418   return (fGctrak->istop==2);
02419 }

void TGeant3::LoadAddress (  )  [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 1275 of file TGeant3.cxx.

References fEroptc, fEropts, fErtrio, fErtrio1, fErwork, fGcbank, fGccuts, fGcflag, fGcjump, fGckin2, fGckin3, fGckine, fGcking, fGclink, fGcmate, fGcmore, fGcmulo, fGcnum, fGconst, fGconsx, fGcopti, fGcphlt, fGcphys, fGcsets, fGctlit, fGctmed, fGctpol, fGctrak, fGcvdma, fGcvolu, fPtopts, fQuest, fZiq, fZlq, fZq, gcomad, PASSCHARD, and PASSCHARL.

Referenced by TGeant3().

01276 {
01277   //
01278   // Assigns the address of the GEANT common blocks to the structures
01279   // that allow their access from C++
01280   //
01281    Int_t *addr;
01282    gcomad(PASSCHARD("QUEST"), (int*&) fQuest PASSCHARL("QUEST"));
01283    gcomad(PASSCHARD("GCBANK"),(int*&) fGcbank  PASSCHARL("GCBANK"));
01284    gcomad(PASSCHARD("GCLINK"),(int*&) fGclink  PASSCHARL("GCLINK"));
01285    gcomad(PASSCHARD("GCCUTS"),(int*&) fGccuts  PASSCHARL("GCCUTS"));
01286    gcomad(PASSCHARD("GCMORE"),(int*&) fGcmore  PASSCHARL("GCMORE"));
01287    gcomad(PASSCHARD("GCMULO"),(int*&) fGcmulo  PASSCHARL("GCMULO"));
01288    gcomad(PASSCHARD("GCFLAG"),(int*&) fGcflag  PASSCHARL("GCFLAG"));
01289    gcomad(PASSCHARD("GCKINE"),(int*&) fGckine  PASSCHARL("GCKINE"));
01290    gcomad(PASSCHARD("GCKING"),(int*&) fGcking  PASSCHARL("GCKING"));
01291    gcomad(PASSCHARD("GCKIN2"),(int*&) fGckin2  PASSCHARL("GCKIN2"));
01292    gcomad(PASSCHARD("GCKIN3"),(int*&) fGckin3  PASSCHARL("GCKIN3"));
01293    gcomad(PASSCHARD("GCMATE"),(int*&) fGcmate  PASSCHARL("GCMATE"));
01294    gcomad(PASSCHARD("GCTMED"),(int*&) fGctmed  PASSCHARL("GCTMED"));
01295    gcomad(PASSCHARD("GCTRAK"),(int*&) fGctrak  PASSCHARL("GCTRAK"));
01296    gcomad(PASSCHARD("GCTPOL"),(int*&) fGctpol  PASSCHARL("GCTPOL"));
01297    gcomad(PASSCHARD("GCVOLU"),(int*&) fGcvolu  PASSCHARL("GCVOLU"));
01298    gcomad(PASSCHARD("GCNUM"), (int*&) fGcnum   PASSCHARL("GCNUM"));
01299    gcomad(PASSCHARD("GCSETS"),(int*&) fGcsets  PASSCHARL("GCSETS"));
01300    gcomad(PASSCHARD("GCPHYS"),(int*&) fGcphys  PASSCHARL("GCPHYS"));
01301    gcomad(PASSCHARD("GCPHLT"),(int*&) fGcphlt  PASSCHARL("GCPHLT"));
01302    gcomad(PASSCHARD("GCOPTI"),(int*&) fGcopti  PASSCHARL("GCOPTI"));
01303    gcomad(PASSCHARD("GCTLIT"),(int*&) fGctlit  PASSCHARL("GCTLIT"));
01304    gcomad(PASSCHARD("GCVDMA"),(int*&) fGcvdma  PASSCHARL("GCVDMA"));
01305    gcomad(PASSCHARD("GCCHAN"),(int*&) gcchan   PASSCHARL("GCCHAN"));
01306 
01307    // Commons for GEANE
01308    gcomad(PASSCHARD("ERTRIO"), (int*&) fErtrio  PASSCHARL("ERTRIO"));
01309    gcomad(PASSCHARD("ERTRIO1"),(int*&) fErtrio1 PASSCHARL("ERTRIO1"));
01310    gcomad(PASSCHARD("EROPTS"), (int*&) fEropts  PASSCHARL("EROPTS"));
01311    gcomad(PASSCHARD("EROPTC"), (int*&) fEroptc  PASSCHARL("EROPTC"));
01312    gcomad(PASSCHARD("ERWORK"), (int*&) fErwork  PASSCHARL("ERWORK"));
01313    gcomad(PASSCHARD("GCONST"),(int*&) fGconst  PASSCHARL("GCONST"));
01314    gcomad(PASSCHARD("GCONSX"),(int*&) fGconsx  PASSCHARL("GCONSX"));
01315    gcomad(PASSCHARD("GCJUMP"),(int*&) fGcjump  PASSCHARL("GCJUMP"));
01316 
01317 //sk:begin
01318 //    Modified: S. Kasahara  2006/05/07
01319 //    Add section for G3PTSim customization commons
01320    gcomad(PASSCHARD("PTOPTS"),(int*&) fPtopts  PASSCHARL("PTOPTS"));
01321    fPtopts -> use_alt_dedx = 1;  // default
01322 //sk:end
01323 
01324    // Variables for ZEBRA store
01325    gcomad(PASSCHARD("IQ"), addr  PASSCHARL("IQ"));
01326    fZiq = addr;
01327    gcomad(PASSCHARD("LQ"), addr  PASSCHARL("LQ"));
01328    fZlq = addr;
01329    fZq       = (float*)fZiq;
01330    gctrak = fGctrak;
01331    gcvolu = fGcvolu;
01332    gckine = fGckine;
01333 }

virtual Int_t* TGeant3::Lq (  )  const [inline, virtual]
void TGeant3::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]

Reimplemented in TGeant3TGeo.

Definition at line 2770 of file TGeant3.cxx.

References CreateFloatArray(), and G3Material().

02773 {
02774   //
02775   // Defines a Material
02776   //
02777   //  kmat               number assigned to the material
02778   //  name               material name
02779   //  a                  atomic mass in au
02780   //  z                  atomic number
02781   //  dens               density in g/cm3
02782   //  absl               absorption length in cm
02783   //                     if >=0 it is ignored and the program
02784   //                     calculates it, if <0. -absl is taken
02785   //  radl               radiation length in cm
02786   //                     if >=0 it is ignored and the program
02787   //                     calculates it, if <0. -radl is taken
02788   //  buf                pointer to an array of user words
02789   //  nbuf               number of user words
02790   //
02791 
02792 
02793   Float_t* fbuf = CreateFloatArray(buf, nwbuf);
02794   G3Material(kmat, name, a, z, dens, radl, absl, fbuf, nwbuf);
02795   delete [] fbuf;
02796 }

void TGeant3::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 = 0,
Int_t  nwbuf = 0 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 2744 of file TGeant3.cxx.

References G3Material().

02747 {
02748   //
02749   // Defines a Material
02750   //
02751   //  kmat               number assigned to the material
02752   //  name               material name
02753   //  a                  atomic mass in au
02754   //  z                  atomic number
02755   //  dens               density in g/cm3
02756   //  absl               absorption length in cm
02757   //                     if >=0 it is ignored and the program
02758   //                     calculates it, if <0. -absl is taken
02759   //  radl               radiation length in cm
02760   //                     if >=0 it is ignored and the program
02761   //                     calculates it, if <0. -radl is taken
02762   //  buf                pointer to an array of user words
02763   //  nbuf               number of user words
02764   //
02765 
02766   G3Material(kmat, name, a, z, dens, radl, absl, buf, nwbuf);
02767 }

void TGeant3::Matrix ( Int_t &  krot,
Double_t  thex,
Double_t  phix,
Double_t  they,
Double_t  phiy,
Double_t  thez,
Double_t  phiz 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 3004 of file TGeant3.cxx.

References fGclink, fZiq, fZlq, g3srotm, Gclink_t::jrotm, and Munits::ns.

03006 {
03007   //
03008   //  krot     rotation matrix number assigned
03009   //  theta1   polar angle for axis i
03010   //  phi1     azimuthal angle for axis i
03011   //  theta2   polar angle for axis ii
03012   //  phi2     azimuthal angle for axis ii
03013   //  theta3   polar angle for axis iii
03014   //  phi3     azimuthal angle for axis iii
03015   //
03016   //  it defines the rotation matrix number irot.
03017   //
03018   krot = -1;
03019   Int_t jrotm=fGclink->jrotm;
03020   krot=1;
03021   Int_t ns, i;
03022   if(jrotm>0) {
03023     ns=fZiq[jrotm-2];
03024     krot=ns+1;
03025     for(i=1; i<=ns; i++) {
03026       if(fZlq[jrotm-i]==0) {
03027         krot=i;
03028         break;
03029       }
03030     }
03031   }
03032   g3srotm(krot, thex, phix, they, phiy, thez, phiz);
03033 }

Double_t TGeant3::MaxStep (  )  const

Definition at line 2653 of file TGeant3.cxx.

References fGctmed, and Gctmed_t::stemax.

02654 {
02655   //
02656   // Return the maximum step length in the current medium
02657   //
02658   return fGctmed->stemax;
02659 }

void TGeant3::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]

Reimplemented in TGeant3TGeo.

Definition at line 2973 of file TGeant3.cxx.

References CreateFloatArray(), and G3Medium().

02977 {
02978   //
02979   //  kmed      tracking medium number assigned
02980   //  name      tracking medium name
02981   //  nmat      material number
02982   //  isvol     sensitive volume flag
02983   //  ifield    magnetic field
02984   //  fieldm    max. field value (kilogauss)
02985   //  tmaxfd    max. angle due to field (deg/step)
02986   //  stemax    max. step allowed
02987   //  deemax    max. fraction of energy lost in a step
02988   //  epsil     tracking precision (cm)
02989   //  stmin     min. step due to continuous processes (cm)
02990   //
02991   //  ifield = 0 if no magnetic field; ifield = -1 if user decision in guswim;
02992   //  ifield = 1 if tracking performed with g3rkuta; ifield = 2 if tracking
02993   //  performed with g3helix; ifield = 3 if tracking performed with g3helx3.
02994   //
02995 
02996   Float_t* fubuf = CreateFloatArray(ubuf, nbuf);
02997   G3Medium(kmed,name,nmat,isvol,ifield,fieldm,tmaxfd,stemax,deemax,epsil,
02998            stmin, fubuf, nbuf);
02999   delete [] fubuf;
03000 
03001 }

void TGeant3::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 = 0,
Int_t  nbuf = 0 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 2944 of file TGeant3.cxx.

References G3Medium().

02948 {
02949   //
02950   //  kmed      tracking medium number assigned
02951   //  name      tracking medium name
02952   //  nmat      material number
02953   //  isvol     sensitive volume flag
02954   //  ifield    magnetic field
02955   //  fieldm    max. field value (kilogauss)
02956   //  tmaxfd    max. angle due to field (deg/step)
02957   //  stemax    max. step allowed
02958   //  deemax    max. fraction of energy lost in a step
02959   //  epsil     tracking precision (cm)
02960   //  stmin     min. step due to continuous processes (cm)
02961   //
02962   //  ifield = 0 if no magnetic field; ifield = -1 if user decision in guswim;
02963   //  ifield = 1 if tracking performed with g3rkuta; ifield = 2 if tracking
02964   //  performed with g3helix; ifield = 3 if tracking performed with g3helx3.
02965   //
02966 
02967   G3Medium(kmed,name,nmat,isvol,ifield,fieldm,tmaxfd,stemax,deemax,epsil,
02968            stmin, ubuf, nbuf);
02969 
02970 }

Int_t TGeant3::MediumId ( const Text_t *  name  )  const

Definition at line 1889 of file TGeant3.cxx.

References fMedNames, and Anp::GetString().

01890 {
01891     // Return the unique numeric identifier for medium name                  
01892 
01893   Int_t nmed = fMedNames.GetEntriesFast();
01894   for ( Int_t imed = 1; imed < nmed; imed++ ) {
01895   
01896     TString name = ((TObjString*)fMedNames.At(imed))->GetString();
01897     if ( name == TString(medName) )  return imed;
01898   }
01899   printf("MediumId: Medium %s not found\n", medName);
01900   return 0;
01901 }      

void TGeant3::Mixture ( Int_t &  kmat,
const char *  name,
Double_t *  a,
Double_t *  z,
Double_t  dens,
Int_t  nlmat,
Double_t *  wmat 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 2864 of file TGeant3.cxx.

References CreateFloatArray(), and G3Mixture().

02866 {
02867   //
02868   // Defines mixture OR COMPOUND IMAT as composed by
02869   // THE BASIC NLMAT materials defined by arrays A,Z and WMAT
02870   //
02871   // If NLMAT > 0 then wmat contains the proportion by
02872   // weights of each basic material in the mixture.
02873   //
02874   // If nlmat < 0 then WMAT contains the number of atoms
02875   // of a given kind into the molecule of the COMPOUND
02876   // In this case, WMAT in output is changed to relative
02877   // weights.
02878   //
02879 
02880   Float_t* fa = CreateFloatArray(a, TMath::Abs(nlmat));
02881   Float_t* fz = CreateFloatArray(z, TMath::Abs(nlmat));
02882   Float_t* fwmat = CreateFloatArray(wmat, TMath::Abs(nlmat));
02883 
02884   G3Mixture(kmat, name, fa, fz, dens, nlmat, fwmat);
02885   Int_t i;
02886   for (i=0; i<TMath::Abs(nlmat); i++) {
02887     a[i] = fa[i]; z[i] = fz[i]; wmat[i] = fwmat[i];
02888   }
02889 
02890   delete [] fa;
02891   delete [] fz;
02892   delete [] fwmat;
02893 }

void TGeant3::Mixture ( Int_t &  kmat,
const char *  name,
Float_t *  a,
Float_t *  z,
Double_t  dens,
Int_t  nlmat,
Float_t *  wmat 
) [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 2832 of file TGeant3.cxx.

References CreateFloatArray(), and G3Mixture().

02834 {
02835   //
02836   // Defines mixture OR COMPOUND IMAT as composed by
02837   // THE BASIC NLMAT materials defined by arrays A,Z and WMAT
02838   //
02839   // If NLMAT > 0 then wmat contains the proportion by
02840   // weights of each basic material in the mixture.
02841   //
02842   // If nlmat < 0 then WMAT contains the number of atoms
02843   // of a given kind into the molecule of the COMPOUND
02844   // In this case, WMAT in output is changed to relative
02845   // weights.
02846   //
02847 
02848   Float_t* fa = CreateFloatArray(a, TMath::Abs(nlmat));
02849   Float_t* fz = CreateFloatArray(z, TMath::Abs(nlmat));
02850   Float_t* fwmat = CreateFloatArray(wmat, TMath::Abs(nlmat));
02851 
02852   G3Mixture(kmat, name, fa, fz, dens, nlmat, fwmat);
02853   Int_t i;
02854   for (i=0; i<TMath::Abs(nlmat); i++) {
02855     a[i] = fa[i]; z[i] = fz[i]; wmat[i] = fwmat[i];
02856   }
02857 
02858   delete [] fa;
02859   delete [] fz;
02860   delete [] fwmat;
02861 }

Int_t TGeant3::NextKmat (  )  const [protected]
Int_t TGeant3::NextVolUp ( Text_t *  name,
Int_t &  copy 
)

Reimplemented in TGeant3TGeo.

Definition at line 1346 of file TGeant3.cxx.

References fGclink, fGcvolu, fNextVol, fVolNames, fZiq, Gclink_t::jvolum, Gcvolu_t::lvolum, Gcvolu_t::names, and Gcvolu_t::number.

01347 {
01348   //
01349   // Geometry iterator for moving upward in the geometry tree
01350   // Return next volume up
01351   //
01352   fNextVol--;
01353   Int_t i, gname;
01354   if(fNextVol>=0) {
01355     gname=fGcvolu->names[fNextVol];
01356     copy=fGcvolu->number[fNextVol];
01357     i=fGcvolu->lvolum[fNextVol];
01358     name = fVolNames[i-1];
01359     if(gname == fZiq[fGclink->jvolum+i]) return i;
01360     else printf("GeomTree: Volume %s not found in bank\n",name);
01361   }
01362   return 0;
01363 }

Int_t TGeant3::NofVolDaughters ( const char *  volName  )  const

Reimplemented in TGeant3TGeo.

Definition at line 1913 of file TGeant3.cxx.

References fGclink, fZlq, fZq, Gclink_t::jvolum, and VolId().

01914 {
01915 // Return number of daughters of the volume specified by volName
01916 // According to A. Morsch' G3toRoot class
01917 // ---
01918 
01919   Int_t idvol = VolId(volName);
01920 
01921   Int_t jvo = fZlq[fGclink->jvolum-idvol];
01922   Int_t nin = Int_t(fZq[jvo+3]);
01923   return nin;
01924 }

Int_t TGeant3::NofVolumes (  )  const

Reimplemented in TGeant3TGeo.

Definition at line 1904 of file TGeant3.cxx.

References fGcnum, and Gcnum_t::nvolum.

01905 {
01906   //
01907   // Return total number of volumes in the geometry
01908   //
01909   return fGcnum->nvolum;
01910 }

Int_t TGeant3::NSecondaries (  )  const

Definition at line 2422 of file TGeant3.cxx.

References fGcking, and Gcking_t::ngkine.

02423 {
02424   //
02425   // Number of secondary particles generated in the current step
02426   //
02427   return fGcking->ngkine;
02428 }

TGeant3& TGeant3::operator= ( const TGeant3  )  [inline, protected]

Reimplemented in TGeant3f77, and TGeant3TGeo.

Definition at line 1281 of file TGeant3.h.

01281 {return *this;}

Double_t TGeant3::ParticleCharge ( Int_t  pdg  )  const [virtual]

Definition at line 2201 of file TGeant3.cxx.

References Gfpart().

02202 {
02203 // Return G3 particle charge (in e)
02204 // ---
02205 
02206   char name[20];
02207   Int_t itrtyp;
02208   Float_t mass, charge, tlife;
02209   Gfpart(pdg,name, itrtyp, mass, charge, tlife);
02210 
02211   return charge;
02212 }

TString TGeant3::ParticleClass ( TMCParticleType  particleType  )  const [protected]

Definition at line 6354 of file TGeant3.cxx.

Referenced by DefineParticle().

06355 {
06356 //
06357 // Returns particle class name (used in TDatabasePDG) for
06358 // the specified MCParticleType
06359 // ---
06360 
06361   // CHECK
06362   switch (particleType) {
06363     case kPTGamma:    return TString("Photon");
06364     case kPTElectron: return TString("Lepton");
06365     case kPTNeutron:  return TString("Hadron");
06366     case kPTHadron:   return TString("Hadron");
06367     case kPTMuon:     return TString("Lepton");
06368     case kPTGeantino: return TString("Special");
06369     case kPTIon:      return TString("Ion");
06370     case kPTOpticalPhoton: return TString("Photon");
06371     default:          return TString("Unknown");
06372   }
06373 }

Double_t TGeant3::ParticleLifeTime ( Int_t  pdg  )  const [virtual]

Definition at line 2215 of file TGeant3.cxx.

References Gfpart().

02216 {
02217 // Return G3 particle life time
02218 // ---
02219 
02220   char name[20];
02221   Int_t itrtyp;
02222   Float_t mass, charge, tlife;
02223   Gfpart(pdg, name, itrtyp, mass, charge, tlife);
02224 
02225   return tlife;
02226 }

Double_t TGeant3::ParticleMass ( Int_t  pdg  )  const [virtual]

Definition at line 2187 of file TGeant3.cxx.

References Gfpart().

02188 {
02189 //  Return G3 particle mass
02190 // ---
02191 
02192   char name[20];
02193   Int_t itrtyp;
02194   Float_t mass, charge, tlife;
02195   Gfpart(pdg,name, itrtyp, mass, charge, tlife);
02196 
02197   return mass;
02198 }

TMCParticleType TGeant3::ParticleMCType ( Int_t  pdg  )  const [virtual]

Definition at line 2229 of file TGeant3.cxx.

References Gfpart(), and ParticleType().

02230 {
02231 // Return MC particle type
02232 // ---
02233 
02234   char name[20];
02235   Int_t itrtyp;
02236   Float_t mass, charge, tlife;
02237   Gfpart(pdg,name, itrtyp, mass, charge, tlife);
02238 
02239   return ParticleType(itrtyp);
02240 }

TString TGeant3::ParticleName ( Int_t  pdg  )  const [virtual]

Definition at line 2172 of file TGeant3.cxx.

References Gfpart().

02173 {
02174 //  Return G3 particle name
02175 // ---
02176 
02177   char name[21];
02178   Int_t itrtyp;
02179   Float_t amass, charge, tlife;
02180   Gfpart(pdg, name, itrtyp,amass, charge, tlife);
02181   name[20] = '\0';
02182 
02183   return TString(name);
02184 }

TMCParticleType TGeant3::ParticleType ( Int_t  itrtyp  )  const [protected]

Definition at line 6334 of file TGeant3.cxx.

Referenced by ParticleMCType().

06335 {
06336 //
06337 // Returns MCParticleType for the specified G3 transport method code
06338 // ---
06339 
06340   switch (itrtyp) {
06341     case 1:  return  kPTGamma;
06342     case 2:  return  kPTElectron;
06343     case 3:  return  kPTNeutron;
06344     case 4:  return  kPTHadron;
06345     case 5:  return  kPTMuon;
06346     case 6:  return  kPTGeantino;
06347     case 7:  return  kPTOpticalPhoton;
06348     case 8:  return  kPTIon;
06349     default: return  kPTUndefined;
06350   }
06351 }

Int_t TGeant3::PDGFromId ( Int_t  pdg  )  const

Definition at line 1534 of file TGeant3.cxx.

References fNPDGCodes, and fPDGCode.

Referenced by TrackPid().

01535 {
01536   //
01537   // Return PDG code and pseudo ENDF code from Geant3 code
01538   //
01539   if(id>0 && id<fNPDGCodes) return fPDGCode[id];
01540   else return -1;
01541 }

void TGeant3::ProcessEvent (  )  [virtual]

Definition at line 6463 of file TGeant3.cxx.

References Gtrig(), Gtrigc(), and Gtrigi().

Referenced by ProcessRun().

06464 {
06465   //
06466   // Process one event
06467   //
06468   Gtrigi();
06469   Gtrigc();
06470   Gtrig();
06471 }

Bool_t TGeant3::ProcessRun ( Int_t  nevent  )  [virtual]

Definition at line 6426 of file TGeant3.cxx.

References count_ginvol, count_gmedia, count_gtmedi, count_gtnext, fGcflag, fStopRun, Gcflag_t::idevt, Gcflag_t::ievent, and ProcessEvent().

06427 {
06428   //
06429   // Process the run and return true if run has finished successfully,
06430   // return false in other cases (run aborted by user)
06431 
06432   Int_t todo = TMath::Abs(nevent);
06433   for (Int_t i=0; i<todo; i++) {
06434      // Process one run (one run = one event)
06435      fGcflag->idevt  = i;
06436      fGcflag->ievent = i+1;
06437      if (fStopRun) break;
06438      fApplication->BeginEvent();
06439      if (fStopRun) break;
06440      ProcessEvent();
06441      if (fStopRun) break;
06442      fApplication->FinishEvent();
06443      if (fStopRun) break;
06444   }
06445 
06446   if (fStopRun) printf(" **** Run stopped ***\n");
06447 
06448   Bool_t returnValue = !fStopRun;
06449   fStopRun = kFALSE;
06450 #ifdef STATISTICS
06451   printf("count_gmedia= %8d\n",count_gmedia);
06452   printf("count_gtmedi= %8d\n",count_gtmedi);
06453   printf("count_ginvol= %8d\n",count_ginvol);
06454   printf("count_gtnext= %8d\n",count_gtnext);
06455   stattree->AutoSave();
06456   statfile->Close();
06457   printf("Statistics tree saved.\n");
06458 #endif
06459   return returnValue;
06460 }

TMCProcess TGeant3::ProdProcess ( Int_t  isec  )  const

Definition at line 2440 of file TGeant3.cxx.

References fGcking, fGctrak, G3toVMC(), Gcking_t::kcase, Munits::km, Gctrak_t::lmec, MAXMEC, Gctrak_t::namec, Gcking_t::ngkine, and Gctrak_t::nmec.

02441 {
02442   //
02443   // Name of the process that has produced the secondary particles
02444   // in the current step
02445   //
02446 
02447 //sk:begin
02448 //    Modified: S. Kasahara  2007/09/11 Method rewritten to make
02449 //    use of GCKING/KCASE variable for determining the production 
02450 //    mechanism of the secondaries.  The old method was to pick the first
02451 //    active process from the current step's list of active processes 
02452 //    that had the capability of generating secondaries.  This occasionally 
02453 //    picked the wrong secondary production mechanism.
02454 //    Revised: S. Kasahara 2007/09/22 to improve performance.
02455 
02456   if ( fGcking->ngkine <= 0 ) return kPNoProcess;
02457 
02458   // Secondaries generated, determine production mechanism hollerith  
02459   std::string casestr((const char*)(&(fGcking->kcase)));
02460   casestr.resize(4);
02461     
02462   int imech = -1;
02463   for ( Int_t km = fGctrak->nmec - 1; km >= 0; km-- ) {
02464     // Use the list of active mechanisms to narrow down the choices.
02465     // Start from the end of the list because usually the last mechanism is
02466     // the one resulting in the production of secondaries.
02467     Int_t proclmec = fGctrak->lmec[km] - 1;
02468     std::string namestr((const char*)(&(fGctrak->namec[proclmec])));
02469     namestr.resize(4);
02470     if ( casestr == namestr ) {
02471       imech = proclmec;
02472       break;
02473     }
02474   }
02475   
02476   if ( imech < 0 ) {
02477     // Failure to find matching process in active mechanism list.  This rarely
02478     // happens, but when it does try to find a match for the kcase mechanism 
02479     // using full list of possibilities.
02480     for ( Int_t km = 0; km < MAXMEC; km++ ) {
02481       std::string namestr((const char*)(&(fGctrak->namec[km])));
02482       namestr.resize(4);
02483       if ( casestr == namestr ) {
02484         imech = km;
02485         break;
02486       }
02487     }
02488   }
02489   
02490   if ( imech < 0 ) {
02491     // failure to find matching process
02492     cerr << "* TGeant3::ProdProcess secondaries present, kcase is "
02493          << casestr.c_str() << " but no matching process!*" << endl;
02494     abort();
02495   }
02496   TMCProcess vmcmech = G3toVMC(imech+1);
02497   
02498   return vmcmech;
02499 //sk:end
02500 
02501 }

virtual Ptopts_t* TGeant3::Ptopts (  )  const [inline, virtual]

Definition at line 876 of file TGeant3.h.

References fPtopts.

00876 {return fPtopts;}

virtual Float_t* TGeant3::Q (  )  const [inline, virtual]

Definition at line 859 of file TGeant3.h.

References fZq.

Referenced by PTGuiRollG3::Cut(), GetMaterial(), GetMedium(), and GetShape().

00859 {return fZq;}

virtual Quest_t* TGeant3::Quest (  )  const [inline, virtual]

Definition at line 834 of file TGeant3.h.

References fQuest.

00834 {return fQuest;}

Bool_t TGeant3::SecondariesAreOrdered (  )  const [inline]

Definition at line 727 of file TGeant3.h.

00727 {return kTRUE;}

void TGeant3::SetABAN ( Int_t  par = 1  )  [virtual]

Definition at line 4954 of file TGeant3.cxx.

References Gcphys_t::dphys1, fGcphys, and kABAN.

Referenced by Init().

04955 {
04956   //
04957   // par = 1 particles will be stopped according to their residual
04958   //         range if they are not in a sensitive material and are
04959   //         far enough from the boundary
04960   //       0 particles are transported normally
04961   //
04962   fGcphys->dphys1 = par;
04963   SetBit(kABAN);
04964 }

void TGeant3::SetALTDEDX ( Int_t  par = 1  )  [virtual]

Definition at line 5815 of file TGeant3.cxx.

References fPtopts, and Ptopts_t::use_alt_dedx.

05816 {
05817   //
05818   //   Configure alternative dE/dX modeling on (default) or off.
05819   //   par =0 use standard Geant3 dE/dX modeling for density effect
05820   //       =1 use Mike Kordosky's alternative dE/dX modeling. (default)
05821   //
05822   fPtopts->use_alt_dedx = par;
05823 }

void TGeant3::SetANNI ( Int_t  par = 1  )  [virtual]

Definition at line 4968 of file TGeant3.cxx.

References fGcphys, and Gcphys_t::ianni.

04969 {
04970   //
04971   //   To control positron annihilation.
04972   //    par =0 no annihilation
04973   //        =1 annihilation. Decays processed.
04974   //        =2 annihilation. No decay products stored.
04975   //
04976   fGcphys->ianni = par;
04977 }

void TGeant3::SetAUTO ( Int_t  par = 1  )  [virtual]

Definition at line 4981 of file TGeant3.cxx.

References fGctrak, Gctrak_t::igauto, and kAUTO.

Referenced by Init(), and SetUserParameters().

04982 {
04983   //
04984   //  To control automatic calculation of tracking medium parameters:
04985   //   par =0 no automatic calculation;
04986   //       =1 automatic calculation.
04987   //
04988   fGctrak->igauto = par;
04989   SetBit(kAUTO);
04990 }

void TGeant3::SetBOMB ( Float_t  bomb = 1  )  [virtual]

Definition at line 4994 of file TGeant3.cxx.

04995 {
04996   //
04997   //  BOOM  : Exploding factor for volumes position
04998   //
04999   //  To 'explode' the detector. If BOOM is positive (values smaller
05000   //  than 1. are suggested, but any value is possible)
05001   //  all the volumes are shifted by a distance
05002   //  proportional to BOOM along the direction between their center
05003   //  and the origin of the MARS; the volumes which are symmetric
05004   //  with respect to this origin are simply not shown.
05005   //  BOOM equal to 0 resets the normal mode.
05006   //  A negative (greater than -1.) value of
05007   //  BOOM will cause an 'implosion'; for even lower values of BOOM
05008   //  the volumes' positions will be reflected respect to the origin.
05009   //  This command can be useful to improve the 3D effect for very
05010   //  complex detectors. The following commands will make explode the
05011   //  detector:
05012   //
05013 }

void TGeant3::SetBorderSurface ( const char *  name,
const char *  vol1Name,
int  vol1CopyNo,
const char *  vol2Name,
int  vol2CopyNo,
const char *  opSurfaceName 
) [virtual]

Definition at line 3685 of file TGeant3.cxx.

References Form().

03689 {
03690    Warning("SetBorderSurface","%s",
03691            Form("Called for border surface %s. Not applicable in Geant3 - setting is ignored.", name));
03692 }   

void TGeant3::SetBREM ( Int_t  par = 1  )  [virtual]

Definition at line 5016 of file TGeant3.cxx.

References fGcphys, and Gcphys_t::ibrem.

05017 {
05018   //
05019   //  To control bremsstrahlung.
05020   //   par =0 no bremsstrahlung
05021   //       =1 bremsstrahlung. Photon processed.
05022   //       =2 bremsstrahlung. No photon stored.
05023   //
05024   fGcphys->ibrem = par;
05025 }

void TGeant3::SetCerenkov ( Int_t  itmed,
Int_t  npckov,
Double_t *  ppckov,
Double_t *  absco,
Double_t *  effic,
Double_t *  rindex 
) [virtual]

Definition at line 3642 of file TGeant3.cxx.

References CreateFloatArray(), and SetCerenkov().

03644 {
03645   //
03646   //    Stores the tables for UV photon tracking in medium ITMED
03647   //    Please note that it is the user's responsibility to
03648   //    provide all the coefficients:
03649   //
03650   //
03651   //       ITMED       Tracking medium number
03652   //       NPCKOV      Number of bins of each table
03653   //       PPCKOV      Value of photon momentum (in GeV)
03654   //       ABSCO       Absorption coefficients
03655   //                   dielectric: absorption length in cm
03656   //                   metals    : absorption fraction (0<=x<=1)
03657   //       EFFIC       Detection efficiency for UV photons
03658   //       RINDEX      Refraction index (if=0 metal)
03659   //
03660 
03661   Float_t* fppckov = CreateFloatArray(ppckov, npckov);
03662   Float_t* fabsco  = CreateFloatArray(absco, npckov);
03663   Float_t* feffic  = CreateFloatArray(effic, npckov);
03664   Float_t* frindex = CreateFloatArray(rindex, npckov);
03665 
03666   SetCerenkov(itmed, npckov, fppckov, fabsco, feffic, frindex);
03667 
03668   delete [] fppckov;
03669   delete [] fabsco;
03670   delete [] feffic;
03671   delete [] frindex;
03672 }

void TGeant3::SetCerenkov ( Int_t  itmed,
Int_t  npckov,
Float_t *  ppckov,
Float_t *  absco,
Float_t *  effic,
Float_t *  rindex 
) [virtual]

Definition at line 3620 of file TGeant3.cxx.

References g3sckov.

Referenced by SetCerenkov().

03622 {
03623   //
03624   //    Stores the tables for UV photon tracking in medium ITMED
03625   //    Please note that it is the user's responsibility to
03626   //    provide all the coefficients:
03627   //
03628   //
03629   //       ITMED       Tracking medium number
03630   //       NPCKOV      Number of bins of each table
03631   //       PPCKOV      Value of photon momentum (in GeV)
03632   //       ABSCO       Absorption coefficients
03633   //                   dielectric: absorption length in cm
03634   //                   metals    : absorption fraction (0<=x<=1)
03635   //       EFFIC       Detection efficiency for UV photons
03636   //       RINDEX      Refraction index (if=0 metal)
03637   //
03638   g3sckov(itmed,npckov,ppckov,absco,effic,rindex);
03639 }

void TGeant3::SetCKOV ( Int_t  par = 1  )  [virtual]

Definition at line 5029 of file TGeant3.cxx.

References fGctlit, and Gctlit_t::itckov.

05030 {
05031   //
05032   //  To control Cerenkov production
05033   //   par =0 no Cerenkov;
05034   //       =1 Cerenkov;
05035   //       =2 Cerenkov with primary stopped at each step.
05036   //
05037   fGctlit->itckov = par;
05038 }

void TGeant3::SetClipBox ( const char *  name,
Double_t  xmin = -9999,
Double_t  xmax = 0,
Double_t  ymin = -9999,
Double_t  ymax = 0,
Double_t  zmin = -9999,
Double_t  zmax = 0 
) [virtual]

Definition at line 5042 of file TGeant3.cxx.

Referenced by G3Volume::Draw(), and G3Volume::DrawSpec().

05044 {
05045   //
05046   //  The hidden line removal technique is necessary to visualize properly
05047   //  very complex detectors. At the same time, it can be useful to visualize
05048   //  the inner elements of a detector in detail. This function allows
05049   //  subtractions (via boolean operation) of BOX shape from any part of
05050   //  the detector, therefore showing its inner contents.
05051   //  If "*" is given as the name of the
05052   //  volume to be clipped, all volumes are clipped by the given box.
05053   //  A volume can be clipped at most twice.
05054   //  if a volume is explicitly clipped twice,
05055   //  the "*" will not act on it anymore. Giving "." as the name
05056   //  of the volume to be clipped will reset the clipping.
05057   //  Parameters
05058   //  NAME   Name of volume to be clipped
05059   //  +
05060   //  XMIN   Lower limit of the Shape X coordinate
05061   //  XMAX   Upper limit of the Shape X coordinate
05062   //  YMIN   Lower limit of the Shape Y coordinate
05063   //  YMAX   Upper limit of the Shape Y coordinate
05064   //  ZMIN   Lower limit of the Shape Z coordinate
05065   //  ZMAX   Upper limit of the Shape Z coordinate
05066   //
05067   //  This function performs a boolean subtraction between the volume
05068   //  NAME and a box placed in the MARS according the values of the given
05069   //  coordinates.
05070 
05071 }

void TGeant3::SetClose ( Int_t  iclose,
Float_t *  pf,
Float_t  dstrt,
Float_t *  w1,
Float_t *  w2,
Float_t *  p1,
Float_t *  p2,
Float_t *  p3,
Float_t *  cl 
) [virtual]

Definition at line 5144 of file TGeant3.cxx.

References Gcmore_t::cleng, Gcmore_t::dstrt, fGcmore, Gcmore_t::iclose, Gcmore_t::p1, Gcmore_t::p2, Gcmore_t::p3, Gcmore_t::pfinal, Gcmore_t::wire1, and Gcmore_t::wire2.

Referenced by InitGEANE().

05147 {
05148   fGcmore->iclose = iclose;
05149   fGcmore->pfinal[0] = pf[0];
05150   fGcmore->pfinal[1] = pf[1];
05151   fGcmore->pfinal[2] = pf[2];
05152   fGcmore->dstrt = dstrt;
05153   fGcmore->wire1[0] = w1[0];
05154   fGcmore->wire1[1] = w1[1];
05155   fGcmore->wire1[2] = w1[2];
05156   fGcmore->wire2[0] = w2[0];
05157   fGcmore->wire2[1] = w2[1];
05158   fGcmore->wire2[2] = w2[2];
05159   fGcmore->p1[0] = p1[0];
05160   fGcmore->p1[1] = p1[1];
05161   fGcmore->p1[2] = p1[2];
05162   fGcmore->p2[0] = p2[0];
05163   fGcmore->p2[1] = p2[1];
05164   fGcmore->p2[2] = p2[2];
05165   fGcmore->p3[0] = p3[0];
05166   fGcmore->p3[1] = p3[1];
05167   fGcmore->p3[2] = p3[2];
05168   fGcmore->cleng[0] = clen[0];
05169   fGcmore->cleng[1] = clen[1];
05170   fGcmore->cleng[2] = clen[2];
05171 }

virtual void TGeant3::SetCollectTracks ( Bool_t   )  [inline, protected, virtual]

Reimplemented in TGeant3TGeo.

Definition at line 1269 of file TGeant3.h.

01269 {}

void TGeant3::SetColors (  )  [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 6474 of file TGeant3.cxx.

References fGclink, fGcnum, fZiq, fZlq, fZq, Gsatt(), Gclink_t::jvolum, and Gcnum_t::nvolum.

Referenced by FinishGeometry().

06475 {
06476   //
06477   // Set the colors for all the volumes
06478   // this is done sequentially for all volumes
06479   // based on the number of their medium
06480   //
06481 
06482   Int_t kv, icol;
06483   Int_t jvolum=fGclink->jvolum;
06484   //Int_t jtmed=fGclink->jtmed;
06485   //Int_t jmate=fGclink->jmate;
06486   Int_t nvolum=fGcnum->nvolum;
06487   char name[5];
06488   //
06489   //    Now for all the volumes
06490   for(kv=1;kv<=nvolum;kv++) {
06491     //     Get the tracking medium
06492     Int_t itm=Int_t (fZq[fZlq[jvolum-kv]+4]);
06493     //     Get the material
06494     //Int_t ima=Int_t (fZq[fZlq[jtmed-itm]+6]);
06495     //     Get z
06496     //Float_t z=fZq[fZlq[jmate-ima]+7];
06497     //     Find color number
06498     //icol = Int_t(z)%6+2;
06499     //icol = 17+Int_t(z*150./92.);
06500     //icol = kv%6+2;
06501     icol = itm%6+2;
06502     strncpy(name,(char*)&fZiq[jvolum+kv],4);
06503     name[4]='\0';
06504     Gsatt(name,"COLO",icol);
06505   }
06506 }

void TGeant3::SetCOMP ( Int_t  par = 1  )  [virtual]

Definition at line 5074 of file TGeant3.cxx.

References fGcphys, and Gcphys_t::icomp.

05075 {
05076   //
05077   //  To control Compton scattering
05078   //   par =0 no Compton
05079   //       =1 Compton. Electron processed.
05080   //       =2 Compton. No electron stored.
05081   //
05082   //
05083   fGcphys->icomp = par;
05084 }

Bool_t TGeant3::SetCut ( const char *  cutName,
Double_t  cutValue 
)

Definition at line 1987 of file TGeant3.cxx.

References Gccuts_t::bcute, Gccuts_t::bcutm, Gccuts_t::cutele, Gccuts_t::cutgam, Gccuts_t::cuthad, Gccuts_t::cutmuo, Gccuts_t::cutneu, Gccuts_t::dcute, Gccuts_t::dcutm, fGccuts, Gccuts_t::ppcutm, and Gccuts_t::tofmax.

01988 {
01989   //
01990   // Set transport cuts for particles
01991   //
01992   Bool_t success = kTRUE;
01993 
01994   if(!strcmp(cutName,"CUTGAM"))
01995     fGccuts->cutgam=cutValue;
01996   else if(!strcmp(cutName,"CUTELE"))
01997     fGccuts->cutele=cutValue;
01998   else if(!strcmp(cutName,"CUTNEU"))
01999     fGccuts->cutneu=cutValue;
02000   else if(!strcmp(cutName,"CUTHAD"))
02001     fGccuts->cuthad=cutValue;
02002   else if(!strcmp(cutName,"CUTMUO"))
02003     fGccuts->cutmuo=cutValue;
02004   else if(!strcmp(cutName,"BCUTE"))
02005     fGccuts->bcute=cutValue;
02006   else if(!strcmp(cutName,"BCUTM"))
02007     fGccuts->bcutm=cutValue;
02008   else if(!strcmp(cutName,"DCUTE"))
02009     fGccuts->dcute=cutValue;
02010   else if(!strcmp(cutName,"DCUTM"))
02011     fGccuts->dcutm=cutValue;
02012   else if(!strcmp(cutName,"PPCUTM"))
02013     fGccuts->ppcutm=cutValue;
02014   else if(!strcmp(cutName,"TOFMAX"))
02015     fGccuts->tofmax=cutValue;
02016   else {
02017     Warning("SetCut","Cut %s not implemented\n",cutName);
02018     success = kFALSE;
02019   }
02020 
02021   return success;
02022 }

void TGeant3::SetCUTS ( Float_t  cutgam,
Float_t  cutele,
Float_t  cutneu,
Float_t  cuthad,
Float_t  cutmuo,
Float_t  bcute,
Float_t  bcutm,
Float_t  dcute,
Float_t  dcutm,
Float_t  ppcutm,
Float_t  tofmax,
Float_t *  gcuts = 0 
) [virtual]

Definition at line 5089 of file TGeant3.cxx.

References Gccuts_t::bcute, Gccuts_t::bcutm, Gccuts_t::cutele, Gccuts_t::cutgam, Gccuts_t::cuthad, Gccuts_t::cutmuo, Gccuts_t::cutneu, Gccuts_t::dcute, Gccuts_t::dcutm, fGccuts, Gccuts_t::gcuts, Gccuts_t::ppcutm, and Gccuts_t::tofmax.

05093 {
05094   //
05095   //  CUTGAM   Cut for gammas              D=0.001
05096   //  CUTELE   Cut for electrons           D=0.001
05097   //  CUTHAD   Cut for charged hadrons     D=0.01
05098   //  CUTNEU   Cut for neutral hadrons     D=0.01
05099   //  CUTMUO   Cut for muons               D=0.01
05100   //  BCUTE    Cut for electron brems.     D=-1.
05101   //  BCUTM    Cut for muon brems.         D=-1.
05102   //  DCUTE    Cut for electron delta-rays D=-1.
05103   //  DCUTM    Cut for muon delta-rays     D=-1.
05104   //  PPCUTM   Cut for e+e- pairs by muons D=0.01
05105   //  TOFMAX   Time of flight cut          D=1.E+10
05106   //
05107   //   If the default values (-1.) for       BCUTE ,BCUTM ,DCUTE ,DCUTM
05108   //   are not modified, they will be set to CUTGAM,CUTGAM,CUTELE,CUTELE
05109   //   respectively.
05110   //  If one of the parameters from CUTGAM to PPCUTM included
05111   //  is modified, cross-sections and energy loss tables must be
05112   //  recomputed via the function Gphysi.
05113   //
05114   fGccuts->cutgam = cutgam;
05115   fGccuts->cutele = cutele;
05116   fGccuts->cutneu = cutneu;
05117   fGccuts->cuthad = cuthad;
05118   fGccuts->cutmuo = cutmuo;
05119   fGccuts->bcute  = bcute;
05120   fGccuts->bcutm  = bcutm;
05121   fGccuts->dcute  = dcute;
05122   fGccuts->dcutm  = dcutm;
05123   fGccuts->ppcutm = ppcutm;
05124   fGccuts->tofmax = tofmax;
05125 //sk:begin
05126 //  Modified 2007/11/04 S. Kasahara to protect against null gcuts argument
05127   if ( gcuts != 0 ) { 
05128     fGccuts->gcuts[0] = gcuts[0];
05129     fGccuts->gcuts[1] = gcuts[1];
05130     fGccuts->gcuts[2] = gcuts[2];
05131     fGccuts->gcuts[3] = gcuts[3];
05132     fGccuts->gcuts[4] = gcuts[4];
05133   }
05134 //sk:end
05135 }

void TGeant3::SetDCAY ( Int_t  par = 1  )  [virtual]

Definition at line 5190 of file TGeant3.cxx.

References fGcphys, and Gcphys_t::idcay.

05191 {
05192   //
05193   //  To control Decay mechanism.
05194   //   par =0 no decays.
05195   //       =1 Decays. secondaries processed.
05196   //       =2 Decays. No secondaries stored.
05197   //
05198   fGcphys->idcay = par;
05199 }

void TGeant3::SetDEBU ( Int_t  emin = 1,
Int_t  emax = 999,
Int_t  emod = 1 
) [virtual]

Definition at line 5203 of file TGeant3.cxx.

References fGcflag, Gcflag_t::idemax, Gcflag_t::idemin, Gcflag_t::itest, and kDEBU.

Referenced by Init(), and InitLego().

05204 {
05205   //
05206   // Set the debug flag and frequency
05207   // Selected debug output will be printed from
05208   // event emin to even emax each emod event
05209   //
05210   fGcflag->idemin = emin;
05211   fGcflag->idemax = emax;
05212   fGcflag->itest  = emod;
05213   SetBit(kDEBU);
05214 }

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

Definition at line 5447 of file TGeant3.cxx.

References Gsdk(), IdFromPDG(), and SetUserDecay().

05448 {
05449   //
05450   // Set user decay modes by calling Gsdk
05451   //
05452    if ( pdg == 0 ) {
05453      printf("Cannot define decay mode for particle with PDG=0");
05454      return false;
05455    }
05456 
05457    if ( IdFromPDG(pdg) < 0 ) {
05458      printf("Particle %d not in geant\n",pdg);
05459      return false;
05460    }
05461 
05462    SetUserDecay(pdg);
05463 
05464    Int_t g3mode[6];
05465    Int_t id1,id2,id3;
05466    for (Int_t k1=0; k1<6; k1++) g3mode[k1]=0;
05467    for (Int_t k=0; k<6; k++) {
05468 
05469       if(mode[k][0]!=0) {
05470         id1= IdFromPDG(mode[k][0]);
05471         if ( id1 < 0 ) {
05472           printf("Particle %d not in geant\n",mode[k][0]);
05473           return false;
05474         }
05475       }  
05476       else id1=0;
05477 
05478       if(mode[k][1]!=0) {
05479         id2= IdFromPDG(mode[k][1]);
05480         if ( id2 < 0 ) {
05481           printf("Particle %d not in geant\n",mode[k][1]);
05482           return false;
05483         }
05484       }  
05485       else id2=0;
05486       
05487       if(mode[k][2]!=0) {
05488         id3= IdFromPDG(mode[k][2]);
05489         if ( id3 < 0 ) {
05490           printf("Particle %d not in geant\n",mode[k][1]);
05491           return false;
05492         }
05493       }  
05494       else id3=0;
05495       g3mode[k]=id1 + id2* 100+ id3 * 10000 ;
05496       
05497    }                                      
05498    Gsdk(IdFromPDG(pdg), bratio, g3mode);  
05499    return kTRUE;
05500 }                                

void TGeant3::SetDRAY ( Int_t  par = 1  )  [virtual]

Definition at line 5218 of file TGeant3.cxx.

References fGcphys, and Gcphys_t::idray.

05219 {
05220   //
05221   //  To control delta rays mechanism.
05222   //   par =0 no delta rays.
05223   //       =1 Delta rays. secondaries processed.
05224   //       =2 Delta rays. No secondaries stored.
05225   //
05226   fGcphys->idray = par;
05227 }

void TGeant3::SetECut ( Float_t  gcalpha  )  [virtual]

Definition at line 5139 of file TGeant3.cxx.

References fGcmore, and Gcmore_t::gcalpha.

Referenced by InitGEANE().

05140 {
05141   fGcmore->gcalpha = gcalpha;
05142 }

void TGeant3::SetERAN ( Float_t  ekmin = 1.e-5,
Float_t  ekmax = 1.e4,
Int_t  nekbin = 90 
) [virtual]

Definition at line 5230 of file TGeant3.cxx.

References Gcmulo_t::ekmax, Gcmulo_t::ekmin, fGcmulo, kERAN, and Gcmulo_t::nekbin.

Referenced by Init().

05231 {
05232   //
05233   //  To control cross section tabulations
05234   //   ekmin = minimum kinetic energy in GeV
05235   //   ekmax = maximum kinetic energy in GeV
05236   //   nekbin = number of logarithmic bins (<200)
05237   //
05238   fGcmulo->ekmin = ekmin;
05239   fGcmulo->ekmax = ekmax;
05240   fGcmulo->nekbin = nekbin;
05241   SetBit(kERAN);
05242 }

void TGeant3::SetHADR ( Int_t  par = 1  )  [virtual]

Definition at line 5245 of file TGeant3.cxx.

References fGcphys, and Gcphys_t::ihadr.

05246 {
05247   //
05248   //  To control hadronic interactions.
05249   //   par =0 no hadronic interactions.
05250   //       =1 Hadronic interactions. secondaries processed.
05251   //       =2 Hadronic interactions. No secondaries stored.
05252   //
05253   fGcphys->ihadr = par;
05254 }

void TGeant3::SetKINE ( Int_t  kine,
Float_t  xk1 = 0,
Float_t  xk2 = 0,
Float_t  xk3 = 0,
Float_t  xk4 = 0,
Float_t  xk5 = 0,
Float_t  xk6 = 0,
Float_t  xk7 = 0,
Float_t  xk8 = 0,
Float_t  xk9 = 0,
Float_t  xk10 = 0 
) [virtual]

Definition at line 5257 of file TGeant3.cxx.

References fGckine, Gckine_t::ikine, and Gckine_t::pkine.

05260 {
05261   //
05262   // Set the variables in /GCFLAG/ IKINE, PKINE(10)
05263   // Their meaning is user defined
05264   //
05265   fGckine->ikine    = kine;
05266   fGckine->pkine[0] = xk1;
05267   fGckine->pkine[1] = xk2;
05268   fGckine->pkine[2] = xk3;
05269   fGckine->pkine[3] = xk4;
05270   fGckine->pkine[4] = xk5;
05271   fGckine->pkine[5] = xk6;
05272   fGckine->pkine[6] = xk7;
05273   fGckine->pkine[7] = xk8;
05274   fGckine->pkine[8] = xk9;
05275   fGckine->pkine[9] = xk10;
05276 }

void TGeant3::SetLOSS ( Int_t  par = 2  )  [virtual]

Definition at line 5279 of file TGeant3.cxx.

References fGcphys, and Gcphys_t::iloss.

05280 {
05281   //
05282   //  To control energy loss.
05283   //   par =0 no energy loss;
05284   //       =1 restricted energy loss fluctuations;
05285   //       =2 complete energy loss fluctuations;
05286   //       =3 same as 1;
05287   //       =4 no energy loss fluctuations.
05288   //  If the value ILOSS is changed, then cross-sections and energy loss
05289   //  tables must be recomputed via the command 'PHYSI'.
05290   //
05291   fGcphys->iloss = par;
05292 }

void TGeant3::SetMaterialProperty ( const char *  surfaceName,
const char *  propertyName,
Int_t  np,
Double_t *  pp,
Double_t *  values 
) [virtual]

Definition at line 3722 of file TGeant3.cxx.

References Form().

03725                 {
03726    Warning("SetMaterialProperty","%s",
03727            Form("Called for material surface  %s. Not applicable in Geant3 - setting is ignored.", surfaceName));
03728 }   

void TGeant3::SetMaterialProperty ( Int_t  itmed,
const char *  propertyName,
Double_t  value 
) [virtual]

Definition at line 3713 of file TGeant3.cxx.

References Form().

03716 {
03717    Warning("SetMaterialProperty","%s",
03718            Form("Called for material ID %5d. Not applicable in Geant3 - setting is ignored.", itmed));
03719 }   

void TGeant3::SetMaterialProperty ( Int_t  itmed,
const char *  propertyName,
Int_t  np,
Double_t *  pp,
Double_t *  values 
) [virtual]

Definition at line 3704 of file TGeant3.cxx.

References Form().

03707 {
03708    Warning("SetMaterialProperty","%s",
03709            Form("Called for material ID %5d. Not applicable in Geant3 - setting is ignored.", itmed));
03710 }   

void TGeant3::SetMaxNStep ( Int_t  maxnstp  ) 

Definition at line 2671 of file TGeant3.cxx.

References fGctrak, and Gctrak_t::maxnst.

02672 {
02673   //
02674   // Set the maximum number of steps till the particle is in the current medium
02675   //
02676   fGctrak->maxnst=maxnstp;
02677 }

void TGeant3::SetMaxStep ( Double_t  maxstep  ) 

Definition at line 2662 of file TGeant3.cxx.

References fGctmed, and Gctmed_t::stemax.

02663 {
02664   //
02665   // Set the maximum step allowed till the particle is in the current medium
02666   //
02667   fGctmed->stemax=maxstep;
02668 }

void TGeant3::SetMULS ( Int_t  par = 1  )  [virtual]

Definition at line 5296 of file TGeant3.cxx.

References fGcphys, and Gcphys_t::imuls.

05297 {
05298   //
05299   //  To control multiple scattering.
05300   //   par =0 no multiple scattering.
05301   //       =1 Moliere or Coulomb scattering.
05302   //       =2 Moliere or Coulomb scattering.
05303   //       =3 Gaussian scattering.
05304   //
05305   fGcphys->imuls = par;
05306 }

void TGeant3::SetMUNU ( Int_t  par = 1  )  [virtual]

Definition at line 5310 of file TGeant3.cxx.

References fGcphys, and Gcphys_t::imunu.

05311 {
05312   //
05313   //  To control muon nuclear interactions.
05314   //   par =0 no muon-nuclear interactions.
05315   //       =1 Nuclear interactions. Secondaries processed.
05316   //       =2 Nuclear interactions. Secondaries not processed.
05317   //
05318   fGcphys->imunu = par;
05319 }

void TGeant3::SetOPTI ( Int_t  par = 2  )  [virtual]

Definition at line 5322 of file TGeant3.cxx.

References fGcopti, Gcopti_t::ioptim, and kOPTI.

Referenced by Init().

05323 {
05324   //
05325   //  This flag controls the tracking optimization performed via the
05326   //  GSORD routine:
05327   //      1 no optimization at all; GSORD calls disabled;
05328   //      0 no optimization; only user calls to GSORD kept;
05329   //      1 all non-GSORDered volumes are ordered along the best axis;
05330   //      2 all volumes are ordered along the best axis.
05331   //
05332   fGcopti->ioptim = par;
05333   SetBit(kOPTI);
05334 }

void TGeant3::SetPAIR ( Int_t  par = 1  )  [virtual]

Definition at line 5337 of file TGeant3.cxx.

References fGcphys, and Gcphys_t::ipair.

05338 {
05339   //
05340   //  To control pair production mechanism.
05341   //   par =0 no pair production.
05342   //       =1 Pair production. secondaries processed.
05343   //       =2 Pair production. No secondaries stored.
05344   //
05345   fGcphys->ipair = par;
05346 }

void TGeant3::SetPFIS ( Int_t  par = 1  )  [virtual]

Definition at line 5350 of file TGeant3.cxx.

References fGcphys, and Gcphys_t::ipfis.

05351 {
05352   //
05353   //  To control photo fission mechanism.
05354   //   par =0 no photo fission.
05355   //       =1 Photo fission. secondaries processed.
05356   //       =2 Photo fission. No secondaries stored.
05357   //
05358   fGcphys->ipfis = par;
05359 }

void TGeant3::SetPHOT ( Int_t  par = 1  )  [virtual]

Definition at line 5362 of file TGeant3.cxx.

References fGcphys, and Gcphys_t::iphot.

05363 {
05364   //
05365   //  To control Photo effect.
05366   //   par =0 no photo electric effect.
05367   //       =1 Photo effect. Electron processed.
05368   //       =2 Photo effect. No electron stored.
05369   //
05370   fGcphys->iphot = par;
05371 }

Bool_t TGeant3::SetProcess ( const char *  flagName,
Int_t  flagValue 
)

Definition at line 2025 of file TGeant3.cxx.

References fGcphlt, fGcphys, fGctlit, Gcphys_t::ianni, Gcphys_t::ibrem, Gcphys_t::icomp, Gcphys_t::idcay, Gcphys_t::idray, Gcphys_t::ihadr, Gcphys_t::iloss, Gcphys_t::imuls, Gcphys_t::imunu, Gcphys_t::ipair, Gcphys_t::ipfis, Gcphys_t::iphot, Gcphys_t::irayl, Gcphlt_t::istra, Gcphlt_t::isync, and Gctlit_t::itckov.

02026 {
02027   //
02028   // Set thresholds for different processes
02029   //
02030   Bool_t success = kTRUE;
02031 
02032   if(!strcmp(flagName,"PAIR"))
02033     fGcphys->ipair=flagValue;
02034   else if(!strcmp(flagName,"COMP"))
02035     fGcphys->icomp=flagValue;
02036   else if(!strcmp(flagName,"PHOT"))
02037     fGcphys->iphot=flagValue;
02038   else if(!strcmp(flagName,"PFIS"))
02039     fGcphys->ipfis=flagValue;
02040   else if(!strcmp(flagName,"DRAY"))
02041     fGcphys->idray=flagValue;
02042   else if(!strcmp(flagName,"ANNI"))
02043     fGcphys->ianni=flagValue;
02044   else if(!strcmp(flagName,"BREM"))
02045     fGcphys->ibrem=flagValue;
02046   else if(!strcmp(flagName,"HADR"))
02047     fGcphys->ihadr=flagValue;
02048   else if(!strcmp(flagName,"MUNU"))
02049     fGcphys->imunu=flagValue;
02050   else if(!strcmp(flagName,"DCAY"))
02051     fGcphys->idcay=flagValue;
02052   else if(!strcmp(flagName,"LOSS"))
02053     fGcphys->iloss=flagValue;
02054   else if(!strcmp(flagName,"MULS"))
02055     fGcphys->imuls=flagValue;
02056   else if(!strcmp(flagName,"RAYL"))
02057     fGcphys->irayl=flagValue;
02058   else if(!strcmp(flagName,"STRA"))
02059     fGcphlt->istra=flagValue;
02060   else if(!strcmp(flagName,"SYNC"))
02061     fGcphlt->isync=flagValue;
02062   else if(!strcmp(flagName,"CKOV"))
02063     fGctlit->itckov = flagValue;
02064   else  {
02065     Warning("SetFlag","Flag %s not implemented\n",flagName);
02066     success = kFALSE;
02067   }
02068 
02069   return  success;
02070 }

void TGeant3::SetRAYL ( Int_t  par = 1  )  [virtual]

Definition at line 5374 of file TGeant3.cxx.

References fGcphys, and Gcphys_t::irayl.

05375 {
05376   //
05377   //  To control Rayleigh scattering.
05378   //   par =0 no Rayleigh scattering.
05379   //       =1 Rayleigh.
05380   //
05381   fGcphys->irayl = par;
05382 }

void TGeant3::SetRootGeometry (  )  [virtual]

Reimplemented in TGeant3TGeo.

Definition at line 3067 of file TGeant3.cxx.

References fImportRootGeometry.

03068 {
03069 // Notify Geant3 about use of TGeo geometry.
03070 // The materials and tracking medias will be imported from
03071 // TGeo at FinishGeometry().
03072 
03073   Fatal("SetRootGeometry",
03074         "TGeant3 does not support Root geometry");
03075 
03076   fImportRootGeometry = kTRUE;
03077 }  

void TGeant3::SetSkinSurface ( const char *  name,
const char *  volName,
const char *  opSurfaceName 
) [virtual]

Definition at line 3695 of file TGeant3.cxx.

References Form().

03698 {
03699    Warning("SetSkinSurface","%s",
03700            Form("Called for skin surface %s. Not applicable in Geant3 - setting is ignored.", name));
03701 }   

void TGeant3::SetSkipNeutrinos ( Bool_t  flag  )  [inline]

Definition at line 736 of file TGeant3.h.

References fSkipNeutrinos.

00736 {fSkipNeutrinos = flag;}

void TGeant3::SetSTRA ( Int_t  par = 0  )  [virtual]

Definition at line 5385 of file TGeant3.cxx.

References fGcphlt, and Gcphlt_t::istra.

05386 {
05387   //
05388   //  To control energy loss fluctuations
05389   //  with the Photo-Absorption Ionization model.
05390   //   par =0 no Straggling.
05391   //       =1 Straggling yes => no Delta rays.
05392   //
05393   fGcphlt->istra = par;
05394 }

void TGeant3::SetSWIT ( Int_t  sw,
Int_t  val = 1 
) [virtual]

Definition at line 5397 of file TGeant3.cxx.

References fGcflag, Gcflag_t::iswit, and kSWIT.

Referenced by Init(), and InitLego().

05398 {
05399   //
05400   //  sw    Switch number
05401   //  val   New switch value
05402   //
05403   //  Change one element of array ISWIT(10) in /GCFLAG/
05404   //
05405   if (sw <= 0 || sw > 10) return;
05406   fGcflag->iswit[sw-1] = val;
05407   SetBit(kSWIT);
05408 }

void TGeant3::SetTrack ( Int_t  done,
Int_t  parent,
Int_t  pdg,
Float_t *  pmom,
Float_t *  vpos,
Float_t *  polar,
Float_t  tof,
TMCProcess  mech,
Int_t &  ntr,
Float_t  weight,
Int_t  is 
)

Definition at line 6509 of file TGeant3.cxx.

References MuELoss::e.

Referenced by gustep().

06512 {
06513   //
06514   // Load a track on the stack
06515   //
06516   // done     0 if the track has to be transported
06517   //          1 if not
06518   // parent   identifier of the parent track. -1 for a primary
06519   // pdg    particle code
06520   // pmom     momentum GeV/c
06521   // vpos     position
06522   // polar    polarization
06523   // tof      time of flight in seconds
06524   // mecha    production mechanism
06525   // ntr      on output the number of the track stored
06526   //
06527 
06528   //  const Float_t tlife=0;
06529 
06530   //
06531   // Here we get the static mass
06532   // For MC is ok, but a more sophisticated method could be necessary
06533   // if the calculated mass is required
06534   // also, this method is potentially dangerous if the mass
06535   // used in the MC is not the same of the PDG database
06536   //
06537   Float_t mass = TDatabasePDG::Instance()->GetParticle(pdg)->Mass();
06538   Float_t e=TMath::Sqrt(mass*mass+pmom[0]*pmom[0]+
06539                         pmom[1]*pmom[1]+pmom[2]*pmom[2]);
06540 
06541 //    printf("Loading  mass %f ene %f No %d ip %d parent %d done %d "
06542 //           "pos %f %f %f mom %f %f %f kS %d m \n",
06543 //              mass,e,fNtrack,pdg,parent,done,vpos[0],vpos[1],vpos[2],
06544 //           pmom[0],pmom[1],pmom[2],kS);
06545 
06546 
06547   GetStack()->PushTrack(done, parent, pdg, pmom[0], pmom[1], pmom[2], e,
06548                        vpos[0],vpos[1],vpos[2],tof,polar[0],polar[1],polar[2],
06549                        mech, ntr, weight, is);
06550 }

void TGeant3::SetTRIG ( Int_t  nevents = 1  )  [virtual]

Definition at line 5412 of file TGeant3.cxx.

References fGcflag, kTRIG, and Gcflag_t::nevent.

Referenced by Init().

05413 {
05414   //
05415   // Set number of events to be run
05416   //
05417   fGcflag->nevent = nevents;
05418   SetBit(kTRIG);
05419 }

void TGeant3::SetUserDecay ( Int_t  ipart  )  [virtual]

Definition at line 5422 of file TGeant3.cxx.

References fGcbank, fGclink, fZlq, IdFromPDG(), Gcbank_t::ixcons, Gclink_t::jpart, mzdrop, PASSCHARD, and PASSCHARL.

Referenced by SetDecayMode().

05423 {
05424   //
05425   // Force the decays of particles to be done with Pythia
05426   // and not with the Geant routines.
05427   // just kill pointers doing mzdrop
05428   //
05429   Int_t ipart = IdFromPDG(pdg);
05430   if(ipart<0) {
05431     printf("Particle %d not in geant\n",pdg);
05432     return;
05433   }
05434   Int_t jpart=fGclink->jpart;
05435   Int_t jpa=fZlq[jpart-ipart];
05436   //
05437   if(jpart && jpa) {
05438     Int_t jpa1=fZlq[jpa-1];
05439     if(jpa1)
05440       mzdrop(fGcbank->ixcons,jpa1,PASSCHARD(" ") PASSCHARL(" "));
05441     Int_t jpa2=fZlq[jpa-2];
05442     if(jpa2)
05443       mzdrop(fGcbank->ixcons,jpa2,PASSCHARD(" ") PASSCHARL(" "));
05444   }
05445 }

void TGeant3::SetUserDecayProductStableMinLifetime ( Double_t  lifetime = 1.E-15  )  [virtual]

Definition at line 5826 of file TGeant3.cxx.

References fUserDecayProductStableMinLifetime.

05827 {
05828   // Configure user decay code to set minimum lifetime by which decay
05829   // products will be considered stable for kick back to transport mechanism.  
05830   // If lifetime is less than minimum, the particle will be decayed promptly 
05831   // and only its decay products (if in turn stable) will be passed back 
05832   // to transport.
05833   // Note: Only particle types defined to Geant3 can be kicked back.
05834   // Args: minlifetime (sec) (default = 1.E-15 sec)
05835 
05836   fUserDecayProductStableMinLifetime = minlifetime;
05837 }

void TGeant3::SetUserParameters ( Bool_t  isUserParameters  )  [virtual]

Definition at line 3080 of file TGeant3.cxx.

References SetAUTO().

03081 {
03082 // Activate the parameters defined in tracking media
03083 // (DEEMAX, STMIN, STEMAX), which are, be default, ignored.
03084 
03085   SetAUTO(!isUserParameters);
03086 }  

Bool_t TGeant3::SkipNeutrinos (  )  [inline]

Definition at line 737 of file TGeant3.h.

References fSkipNeutrinos.

Referenced by gudcay(), and gustep().

00737 {return fSkipNeutrinos;}

Int_t TGeant3::StepProcesses ( TArrayI &  proc  )  const

Definition at line 2504 of file TGeant3.cxx.

References G3toVMC(), Gctrak(), and Gctrak_t::nmec.

02505 {
02506   //
02507   // Return processes active in the current step
02508   //
02509   Int_t i;
02510   Int_t nproc=Gctrak()->nmec;
02511   
02512   // Set no active process if there are no processes
02513   if (nproc==0) {
02514     proc.Set(1);
02515     proc[0] = kPNull;
02516     return 1;
02517   }  
02518   
02519   //
02520   proc.Set(nproc);
02521   Int_t nvproc=0;
02522   //
02523   for (i=0; i<nproc; ++i)
02524     if((proc[nvproc]=G3toVMC(Gctrak()->lmec[i]))!=kPNoProcess) nvproc++;
02525   //
02526   proc.Set(nvproc);
02527   //
02528   return nvproc;
02529 }

void TGeant3::StopEvent (  ) 

Definition at line 2632 of file TGeant3.cxx.

References fGcflag, and Gcflag_t::ieotri.

Referenced by StopRun().

02633 {
02634   //
02635   // Stop simulation of the current event and skip to the next
02636   //
02637   fGcflag->ieotri=1;
02638 }

void TGeant3::StopRun (  ) 

Definition at line 2641 of file TGeant3.cxx.

References fStopRun, StopEvent(), and StopTrack().

02642 {
02643   //
02644   // Stop simulation of the current event and set the abort run flag to true
02645   //
02646 
02647   StopTrack();
02648   StopEvent();
02649   fStopRun = kTRUE;
02650 }

void TGeant3::StopTrack (  ) 

Definition at line 2623 of file TGeant3.cxx.

References fGctrak, and Gctrak_t::istop.

Referenced by StopRun().

02624 {
02625   //
02626   // Stop the transport of the current particle and skip to the next
02627   //
02628   fGctrak->istop=1;
02629 }

Double_t TGeant3::TrackCharge (  )  const

Definition at line 2323 of file TGeant3.cxx.

References Gckine_t::charge, and fGckine.

02324 {
02325   //
02326   // Return charge of the track currently transported
02327   //
02328   return fGckine->charge;
02329 }

Double_t TGeant3::TrackLength (  )  const

Definition at line 2359 of file TGeant3.cxx.

References fGctrak, and Gctrak_t::sleng.

02360 {
02361   //
02362   // Return the length of the current track from its origin
02363   //
02364   return fGctrak->sleng;
02365 }

Double_t TGeant3::TrackMass (  )  const

Definition at line 2332 of file TGeant3.cxx.

References Gckine_t::amass, and fGckine.

02333 {
02334   //
02335   // Return the mass of the track currently transported
02336   //
02337   return fGckine->amass;
02338 }

void TGeant3::TrackMomentum ( Double_t &  px,
Double_t &  py,
Double_t &  pz,
Double_t &  etot 
) const

Definition at line 2308 of file TGeant3.cxx.

References fGctrak, Gctrak_t::getot, and Gctrak_t::vect.

02310 {
02311   //
02312   // Return the direction and the momentum (GeV/c) of the track
02313   // currently being transported
02314   //
02315   Double_t ptot=fGctrak->vect[6];
02316   px  =fGctrak->vect[3]*ptot;
02317   py  =fGctrak->vect[4]*ptot;
02318   pz  =fGctrak->vect[5]*ptot;
02319   etot=fGctrak->getot;
02320 }

void TGeant3::TrackMomentum ( TLorentzVector &  xyz  )  const

Definition at line 2294 of file TGeant3.cxx.

References fGctrak, Gctrak_t::getot, and Gctrak_t::vect.

Referenced by ForceDecayTime().

02295 {
02296   //
02297   // Return the direction and the momentum (GeV/c) of the track
02298   // currently being transported
02299   //
02300   Double_t ptot=fGctrak->vect[6];
02301   xyz[0]=fGctrak->vect[3]*ptot;
02302   xyz[1]=fGctrak->vect[4]*ptot;
02303   xyz[2]=fGctrak->vect[5]*ptot;
02304   xyz[3]=fGctrak->getot;
02305 }

Int_t TGeant3::TrackPid (  )  const

Definition at line 2341 of file TGeant3.cxx.

References fGckine, Gckine_t::ipart, and PDGFromId().

02342 {
02343   //
02344   // Return the id of the particle transported
02345   //
02346   return PDGFromId(fGckine->ipart);
02347 }

void TGeant3::TrackPosition ( Double_t &  x,
Double_t &  y,
Double_t &  z 
) const

Definition at line 2273 of file TGeant3.cxx.

References fGctrak, and Gctrak_t::vect.

02274 {
02275   //
02276   // Return the current position in the master reference frame of the
02277   // track being transported
02278   //
02279   x=fGctrak->vect[0];
02280   y=fGctrak->vect[1];
02281   z=fGctrak->vect[2];
02282 }

void TGeant3::TrackPosition ( TLorentzVector &  xyz  )  const

Definition at line 2260 of file TGeant3.cxx.

References fGctrak, Gctrak_t::tofg, and Gctrak_t::vect.

Referenced by TGeant3TGeo::CurrentBoundaryNormal(), ggperpTGeo(), and gustep().

02261 {
02262   //
02263   // Return the current position in the master reference frame of the
02264   // track being transported
02265   //
02266   xyz[0]=fGctrak->vect[0];
02267   xyz[1]=fGctrak->vect[1];
02268   xyz[2]=fGctrak->vect[2];
02269   xyz[3]=fGctrak->tofg;
02270 }

Double_t TGeant3::TrackStep (  )  const

Definition at line 2350 of file TGeant3.cxx.

References fGctrak, and Gctrak_t::step.

02351 {
02352   //
02353   // Return the length in centimeters of the current step
02354   //
02355   return fGctrak->step;
02356 }

Double_t TGeant3::TrackTime (  )  const

Definition at line 2285 of file TGeant3.cxx.

References fGctrak, and Gctrak_t::tofg.

02286 {
02287   //
02288   // Return the current time of flight of the track being transported
02289   //
02290   return fGctrak->tofg;
02291 }

Int_t TGeant3::TransportMethod ( TMCParticleType  particleType  )  const [protected]

Definition at line 6314 of file TGeant3.cxx.

Referenced by DefineParticle().

06315 {
06316 //
06317 // Returns G3 transport method code for the specified MCParticleType
06318 // ---
06319 
06320   switch (particleType) {
06321     case kPTGamma:    return 1;
06322     case kPTElectron: return 2;
06323     case kPTNeutron:  return 3;
06324     case kPTHadron:   return 4;
06325     case kPTMuon:     return 5;
06326     case kPTGeantino: return 6;
06327     case kPTOpticalPhoton: return 7;
06328     case kPTIon:      return 8;
06329     default:          return -1;
06330   }
06331 }

virtual Trcom3_t* TGeant3::Trcom3 (  )  const [inline, virtual]

Definition at line 867 of file TGeant3.h.

References fTrcom3.

00867 {return fTrcom3;}

void TGeant3::Trscsd ( Float_t *  pc,
Float_t *  rc,
Float_t *  pd,
Float_t *  rd,
Float_t *  h,
Float_t  ch,
Int_t  ierr,
Float_t  spu,
Float_t *  dj,
Float_t *  dk 
) [virtual]

Definition at line 5691 of file TGeant3.cxx.

References trscsd.

05691                                                                                                                                         {
05692 
05693 //       SUBROUTINE TRSCSD(PC,RC,PD,RD,H,CH,IERR,SPU,DJ,DK)
05694 // ******************************************************************
05695 //  *** TRANSFORMS ERROR MATRIX
05696 //    FROM   SC   VARIABLES (1/P,LAMBDA,PHI,YT,ZT)
05697 //       TO         VARIABLES (1/P,V',W',V,W)
05698 // 
05699 //      Authors: A. Haas and W. Wittek
05700 //  *** PC(3)     1/P,LAMBDA,PHI                          INPUT
05701 //      PD(3)     1/P,V',W'                              OUTPUT
05702 //      H(3)      MAGNETIC FIELD                          INPUT
05703 //      RC(15)    ERROR MATRIX IN   SC   VARIABLES        INPUT     (TRIANGLE)
05704 //      RD(15)    ERROR MATRIX IN 1/P,V',W',V,W          OUTPUT     (TRIANGLE)
05705 //      CH        CHARGE OF PARTICLE                      INPUT
05706 //                CHARGE AND MAGNETIC FIELD ARE NEEDED
05707 //                FOR CORRELATION TERMS (V',YT),(V',ZT),(W',YT),(W',ZT)
05708 //                THESE CORRELATION TERMS APPEAR BECAUSE RC IS ASSUMED
05709 //                TO BE THE ERROR MATRIX FOR FIXED S (PATH LENGTH)
05710 //                AND RD FOR FIXED U
05711 //      DJ(3)     UNIT VECTOR IN V-DIRECTION
05712 //      DK(3)     UNIT VECTOR IN W-DIRECTION    OF DETECTOR SYSTEM
05713 // 
05714 //      IERR  =   1       PARTICLE MOVES PERPENDICULAR TO U-AXIS
05715 //                       ( V',W' ARE NOT DEFINED )
05716 //      SPU       SIGN OF U-COMPONENT OF PARTICLE MOMENTUM   OUTPUT
05717 // ******************************************************************
05718   printf("%d\n",ierr);
05719   trscsd(pc,rc,pd,rd,h,ch,ierr,spu,dj,dk);
05720 }

void TGeant3::Trscsp ( Float_t *  ps,
Float_t *  rs,
Float_t *  pc,
Float_t *  rc,
Float_t *  h,
Float_t *  ch,
Int_t *  ierr,
Float_t *  spx 
) [virtual]

Definition at line 5750 of file TGeant3.cxx.

References trscsp.

05750                                                                                                                     {
05751 // ******************************************************************
05752 //       SUBROUTINE TRSCSP(PC,RC,PS,RS,H,CH,IERR,SPX)
05753 // 
05754 //  *** TRANSFORMS ERROR MATRIX
05755 //      FROM   SC   VARIABLES (1/P,LAMBDA,PHI,YT,ZT)
05756 //       TO  SPLINE VARIABLES (1/P,Y',Z',Y,Z)
05757 // 
05758 //      Authors: A. Haas and W. Wittek
05759 // 
05760 // 
05761 //  *** PC(3)     1/P,LAMBDA,PHI                          INPUT
05762 //      PS(3)     1/P,Y',Z'                              OUTPUT
05763 //      H(3)      MAGNETIC FIELD                          INPUT
05764 //      RC(15)    ERROR MATRIX IN   SC   VARIABLES        INPUT     (TRIANGLE)
05765 //      RS(15)    ERROR MATRIX IN SPLINE VARIABLES       OUTPUT     (TRIANGLE)
05766 //      CH        CHARGE OF PARTICLE                      INPUT
05767 //                CHARGE AND MAGNETIC FIELD ARE NEEDED
05768 //                FOR CORRELATION TERMS (Y',YT),(Y',ZT),(Z',YT),(Z',ZT)
05769 //                THESE CORRELATION TERMS APPEAR BECAUSE RC IS ASSUMED
05770 //                TO BE THE ERROR MATRIX FOR FIXED S (PATH LENGTH)
05771 //                AND RS FOR FIXED X
05772 // 
05773 //      IERR  =   1       PARTICLE MOVES PERPENDICULAR TO X-AXIS
05774 //                       ( Y',Z' ARE NOT DEFINED )
05775 //      SPX       SIGN OF X-COMPONENT OF PARTICLE MOMENTUM   OUTPUT
05776 // ******************************************************************
05777   trscsp(pc,rc,ps,rs,h,ch,ierr,spx);
05778 }

void TGeant3::Trsdsc ( Float_t *  pd,
Float_t *  rd,
Float_t *  pc,
Float_t *  rc,
Float_t *  h,
Float_t *  ch,
Int_t *  ierr,
Float_t *  spu,
Float_t *  dj,
Float_t *  dk 
) [virtual]

Definition at line 5722 of file TGeant3.cxx.

References trsdsc.

05722                                                                                                                                             {
05723 // ******************************************************************
05724 //       SUBROUTINE TRSDSC(PD,RD,PC,RC,H,CH,IERR,SPU,DJ,DK)
05725 // 
05726 //  *** TRANSFORMS ERROR MATRIX
05727 //      FROM        VARIABLES (1/P,V',W',V,W)
05728 //       TO    SC   VARIABLES (1/P,LAMBDA,PHI,YT,ZT)
05729 //      Authors: A. Haas and W. Wittek
05730 //  *** PD(3)     1/P,V',W'                               INPUT
05731 //      PC(3)     1/P,LAMBDA,PHI                         OUTPUT
05732 //      H(3)      MAGNETIC FIELD                          INPUT
05733 //      RD(15)    ERROR MATRIX IN 1/P,V',W',V,W           INPUT      (TRIANGLE)
05734 //      RC(15)    ERROR MATRIX IN   SC   VARIABLES       OUTPUT      (TRIANGLE)
05735 //      CH        CHARGE OF PARTICLE                      INPUT
05736 //                CHARGE AND MAGNETIC FIELD ARE NEEDED
05737 //                FOR CORRELATION TERMS (LAMBDA,V),(LAMBDA,W),(PHI,V),(PHI,W)
05738 //                THESE CORRELATION TERMS APPEAR BECAUSE RC IS ASSUMED
05739 //                TO BE THE ERROR MATRIX FOR FIXED S (PATH LENGTH)
05740 //                AND RD FOR FIXED U
05741 //      DJ(3)     UNIT VECTOR IN V-DIRECTION
05742 //      DK(3)     UNIT VECTOR IN W-DIRECTION    OF DETECTOR SYSTEM
05743 // 
05744 //      IERR              NOT USED
05745 //      SPU       SIGN OF U-COMPONENT OF PARTICLE MOMENTUM    INPUT
05746 // ******************************************************************
05747  trsdsc(pd,rd,pc,rc,h,ch,ierr,spu,dj,dk);
05748 }

void TGeant3::Trspsc ( Float_t *  ps,
Float_t *  rs,
Float_t *  pc,
Float_t *  rc,
Float_t *  h,
Float_t *  ch,
Int_t *  ierr,
Float_t *  spx 
) [virtual]

Definition at line 5779 of file TGeant3.cxx.

References trspsc.

05779                                                                                                                     {
05780 
05781 //     ******************************************************************
05782 //       SUBROUTINE TRSPSC(PS,RS,PC,RC,H,CH,IERR,SPX)
05783 // 
05784 //  *** TRANSFORMS ERROR MATRIX
05785 //      FROM SPLINE VARIABLES (1/P,Y',Z',Y,Z)
05786 //       TO    SC   VARIABLES (1/P,LAMBDA,PHI,YT,ZT)
05787 // 
05788 //      Authors: A. Haas and W. Wittek
05789 // 
05790 // 
05791 //  *** PS(3)     1/P,Y',Z'                               INPUT
05792 //      PC(3)     1/P,LAMBDA,PHI                         OUTPUT
05793 //      H(3)      MAGNETIC FIELD                          INPUT
05794 //      RS(15)    ERROR MATRIX IN SPLINE VARIABLES        INPUT      (TRIANGLE)
05795 //      RC(15)    ERROR MATRIX IN   SC   VARIABLES       OUTPUT      (TRIANGLE)
05796 //      CH        CHARGE OF PARTICLE                      INPUT
05797 //                CHARGE AND MAGNETIC FIELD ARE NEEDED
05798 //                FOR CORRELATION TERMS (LAMBDA,Y),(LAMBDA,Z),(PHI,Y),(PHI,Z)
05799 //                THESE CORRELATION TERMS APPEAR BECAUSE RC IS ASSUMED
05800 //                TO BE THE ERROR MATRIX FOR FIXED S (PATH LENGTH)
05801 //                AND RS FOR FIXED X
05802 // 
05803 //      IERR              NOT USED
05804 //      SPX       SIGN OF X-COMPONENT OF PARTICLE MOMENTUM    INPUT
05805 // 
05806 //     ******************************************************************
05807 
05808  trspsc(ps,rs,pc,rc,h,ch,ierr,spx);
05809 
05810 }

void TGeant3::Vname ( const char *  name,
char *  vname 
) [virtual]

Definition at line 5503 of file TGeant3.cxx.

Referenced by G3Gsposp(), G3Gsvolu(), Gdopt(), Gprint(), Gsatt(), Gsdvn(), Gsdvn2(), Gsdvs(), Gsdvs2(), Gsdvt(), Gsdvt2(), Gsord(), and Gspos().

05504 {
05505   //
05506   //  convert name to upper case. Make vname at least 4 chars
05507   //
05508   Int_t l = strlen(name);
05509   Int_t i;
05510   l = l < 4 ? l : 4;
05511   for (i=0;i<l;i++) vname[i] = toupper(name[i]);
05512   for (i=l;i<4;i++) vname[i] = ' ';
05513   vname[4] = 0;
05514 }

Int_t TGeant3::VolDaughterCopyNo ( const char *  volName,
Int_t  i 
) const

Reimplemented in TGeant3TGeo.

Definition at line 1945 of file TGeant3.cxx.

References fGclink, fZlq, fZq, Gclink_t::jvolum, and VolId().

01946 {
01947 // Return the copyNo of i-th daughters of the volume specified by volName
01948 // According to A. Morsch' G3toRoot class
01949 // ---
01950 
01951   Int_t idvol = VolId(volName);
01952 
01953   Int_t jvo = fZlq[fGclink->jvolum-idvol];
01954   Int_t nin=i+1;
01955   Int_t jin = fZlq[jvo-nin];
01956 
01957   return  Int_t(fZq[jin +3]);
01958 }

const char * TGeant3::VolDaughterName ( const char *  volName,
Int_t  i 
) const

Reimplemented in TGeant3TGeo.

Definition at line 1927 of file TGeant3.cxx.

References fGclink, fZlq, fZq, Gclink_t::jvolum, VolId(), and VolName().

01928 {
01929 // Return the name of i-th daughters of the volume specified by volName
01930 // According to A. Morsch' G3toRoot class
01931 // ---
01932 
01933   Int_t idvol = VolId(volName);
01934 
01935   Int_t jvo = fZlq[fGclink->jvolum-idvol];
01936   Int_t nin=i+1;
01937   Int_t jin = fZlq[jvo-nin];
01938   Int_t idvold = Int_t(fZq[jin+2]);;
01939 
01940   return VolName(idvold);
01941 }

Int_t TGeant3::VolId ( const Text_t *  name  )  const

Reimplemented in TGeant3TGeo.

Definition at line 1875 of file TGeant3.cxx.

References fGclink, fGcnum, fZiq, Gclink_t::jvolum, and Gcnum_t::nvolum.

Referenced by GetMaterial(), GetMedium(), NofVolDaughters(), VolDaughterCopyNo(), and VolDaughterName().

01876 {
01877   //
01878   // Return the unique numeric identifier for volume name
01879   //
01880   Int_t gname,i;
01881   strncpy((char *) &gname, name, 4);
01882   for(i=1; i<=fGcnum->nvolum; i++)
01883     if(gname == fZiq[fGclink->jvolum+i]) return i;
01884   printf("VolId: Volume %s not found\n",name);
01885   return 0;
01886 }

Int_t TGeant3::VolId2Mate ( Int_t  id  )  const

Reimplemented in TGeant3TGeo.

Definition at line 1961 of file TGeant3.cxx.

References fGclink, fGcnum, fZlq, fZq, Gclink_t::jvolum, and Gcnum_t::nvolum.

01962 {
01963   //
01964   // Return material number for a given volume id
01965   //
01966   if(id<1 || id > fGcnum->nvolum || fGclink->jvolum<=0)
01967     return 0;
01968   else {
01969     Int_t jvo = fZlq[fGclink->jvolum-id];
01970     return Int_t(fZq[jvo+4]);
01971   }
01972 }