Logo ROOT   6.14/05
Reference Guide
TVirtualMC.h
Go to the documentation of this file.
1 // @(#)root/vmc:$Name: $:$Id$
2 // Authors: Ivana Hrivnacova, Rene Brun, Federico Carminati 13/04/2002
3 
4 /*************************************************************************
5  * Copyright (C) 2006, Rene Brun and Fons Rademakers. *
6  * Copyright (C) 2002, ALICE Experiment at CERN. *
7  * All rights reserved. *
8  * *
9  * For the licensing terms see $ROOTSYS/LICENSE. *
10  * For the list of contributors see $ROOTSYS/README/CREDITS. *
11  *************************************************************************/
12 
13 #ifndef ROOT_TVirtualMC
14 #define ROOT_TVirtualMC
15 
16 ///////////////////////////////////////////////////////////////////////////////
17 // //
18 // //
19 // Abstract Monte Carlo interface //
20 // //
21 // //
22 ///////////////////////////////////////////////////////////////////////////////
23 
24 #include "TMCProcess.h"
25 #include "TMCParticleType.h"
26 #include "TMCOptical.h"
27 #include "TMCtls.h"
28 #include "TVirtualMCApplication.h"
29 #include "TVirtualMCStack.h"
30 #include "TVirtualMCDecayer.h"
31 #include "TVirtualMagField.h"
32 #include "TRandom.h"
33 #include "TString.h"
34 #include "TError.h"
35 
36 class TLorentzVector;
37 class TGeoHMatrix;
38 class TArrayI;
39 class TArrayD;
41 
42 class TVirtualMC : public TNamed {
43 
44 public:
45  /// Standard constructor
46  ///
47  /// isRootGeometrySupported = True if implementation of TVirtualMC
48  /// supports geometry defined with TGeo
49  TVirtualMC(const char *name, const char *title,
50  Bool_t isRootGeometrySupported = kFALSE);
51 
52  /// Default constructor
53  TVirtualMC();
54 
55  /// Destructor
56  virtual ~TVirtualMC();
57 
58  /// Static access method
59  static TVirtualMC* GetMC();
60 
61  //
62  // ------------------------------------------------
63  // methods for building/management of geometry
64  // ------------------------------------------------
65  //
66 
67  /// Info about supporting geometry defined via Root
68  virtual Bool_t IsRootGeometrySupported() const = 0;
69 
70  //
71  // functions from GCONS
72  // ------------------------------------------------
73  //
74 
75  /// Define a material
76  /// - kmat number assigned to the material
77  /// - name material name
78  /// - a atomic mass in au
79  /// - z atomic number
80  /// - dens density in g/cm3
81  /// - absl absorption length in cm;
82  /// if >=0 it is ignored and the program
83  /// calculates it, if <0. -absl is taken
84  /// - radl radiation length in cm
85  /// if >=0 it is ignored and the program
86  /// calculates it, if <0. -radl is taken
87  /// - buf pointer to an array of user words
88  /// - nwbuf number of user words
89  virtual void Material(Int_t& kmat, const char* name, Double_t a,
90  Double_t z, Double_t dens, Double_t radl, Double_t absl,
91  Float_t* buf, Int_t nwbuf) = 0;
92 
93  /// The same as previous but in double precision
94  virtual void Material(Int_t& kmat, const char* name, Double_t a,
95  Double_t z, Double_t dens, Double_t radl, Double_t absl,
96  Double_t* buf, Int_t nwbuf) = 0;
97 
98  /// Define a mixture or a compound
99  /// with a number kmat composed by the basic nlmat materials defined
100  /// by arrays a, z and wmat
101  ///
102  /// If nlmat > 0 then wmat contains the proportion by
103  /// weights of each basic material in the mixture.
104  ///
105  /// If nlmat < 0 then wmat contains the number of atoms
106  /// of a given kind into the molecule of the compound.
107  /// In this case, wmat in output is changed to relative
108  /// weights.
109  virtual void Mixture(Int_t& kmat, const char *name, Float_t *a,
110  Float_t *z, Double_t dens, Int_t nlmat, Float_t *wmat) = 0;
111 
112  /// The same as previous but in double precision
113  virtual void Mixture(Int_t& kmat, const char *name, Double_t *a,
114  Double_t *z, Double_t dens, Int_t nlmat, Double_t *wmat) = 0;
115 
116  /// Define a medium.
117  /// - kmed tracking medium number assigned
118  /// - name tracking medium name
119  /// - nmat material number
120  /// - isvol sensitive volume flag
121  /// - ifield magnetic field:
122  /// - ifield = 0 if no magnetic field;
123  /// - ifield = -1 if user decision in guswim;
124  /// - ifield = 1 if tracking performed with g3rkuta;
125  /// - ifield = 2 if tracking performed with g3helix;
126  /// - ifield = 3 if tracking performed with g3helx3.
127  /// - fieldm max. field value (kilogauss)
128  /// - tmaxfd max. angle due to field (deg/step)
129  /// - stemax max. step allowed
130  /// - deemax max. fraction of energy lost in a step
131  /// - epsil tracking precision (cm)
132  /// - stmin min. step due to continuous processes (cm)
133  /// - ubuf pointer to an array of user words
134  /// - nbuf number of user words
135  virtual void Medium(Int_t& kmed, const char *name, Int_t nmat,
136  Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd,
137  Double_t stemax, Double_t deemax, Double_t epsil,
138  Double_t stmin, Float_t* ubuf, Int_t nbuf) = 0;
139 
140  /// The same as previous but in double precision
141  virtual void Medium(Int_t& kmed, const char *name, Int_t nmat,
142  Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd,
143  Double_t stemax, Double_t deemax, Double_t epsil,
144  Double_t stmin, Double_t* ubuf, Int_t nbuf) = 0;
145 
146  /// Define a rotation matrix
147  /// - krot rotation matrix number assigned
148  /// - thetaX polar angle for axis X
149  /// - phiX azimuthal angle for axis X
150  /// - thetaY polar angle for axis Y
151  /// - phiY azimuthal angle for axis Y
152  /// - thetaZ polar angle for axis Z
153  /// - phiZ azimuthal angle for axis Z
154  virtual void Matrix(Int_t& krot, Double_t thetaX, Double_t phiX,
155  Double_t thetaY, Double_t phiY, Double_t thetaZ,
156  Double_t phiZ) = 0;
157 
158  /// Change the value of cut or mechanism param
159  /// to a new value parval for tracking medium itmed.
160  /// In Geant3, the data structure JTMED contains the standard tracking
161  /// parameters (CUTS and flags to control the physics processes) which
162  /// are used by default for all tracking media.
163  /// It is possible to redefine individually with this function any of these
164  /// parameters for a given tracking medium.
165  /// - itmed tracking medium number
166  /// - param is a character string (variable name)
167  /// - parval must be given as a floating point.
168  virtual void Gstpar(Int_t itmed, const char *param, Double_t parval) = 0;
169 
170  //
171  // functions from GGEOM
172  // ------------------------------------------------
173  //
174 
175  /// Create a new volume
176  /// - name Volume name
177  /// - shape Volume type
178  /// - nmed Tracking medium number
179  /// - np Number of shape parameters
180  /// - upar Vector containing shape parameters
181  virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed,
182  Float_t *upar, Int_t np) = 0;
183 
184  /// The same as previous but in double precision
185  virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed,
186  Double_t *upar, Int_t np) = 0;
187 
188  /// Create a new volume by dividing an existing one.
189  /// It divides a previously defined volume
190  /// - name Volume name
191  /// - mother Mother volume name
192  /// - ndiv Number of divisions
193  /// - iaxis Axis value:
194  /// X,Y,Z of CAXIS will be translated to 1,2,3 for IAXIS.
195  virtual void Gsdvn(const char *name, const char *mother, Int_t ndiv,
196  Int_t iaxis) = 0;
197 
198  /// Create a new volume by dividing an existing one.
199  /// Divide mother into ndiv divisions called name
200  /// along axis iaxis starting at coordinate value c0i.
201  /// The new volume created will be medium number numed.
202  virtual void Gsdvn2(const char *name, const char *mother, Int_t ndiv,
203  Int_t iaxis, Double_t c0i, Int_t numed) = 0;
204 
205  /// Create a new volume by dividing an existing one
206  /// Divide mother into divisions called name along
207  /// axis iaxis in steps of step. If not exactly divisible
208  /// will make as many as possible and will center them
209  /// with respect to the mother. Divisions will have medium
210  /// number numed. If numed is 0, numed of mother is taken.
211  /// ndvmx is the expected maximum number of divisions
212  /// (If 0, no protection tests are performed in Geant3)
213  virtual void Gsdvt(const char *name, const char *mother, Double_t step,
214  Int_t iaxis, Int_t numed, Int_t ndvmx) = 0;
215 
216  /// Create a new volume by dividing an existing one
217  /// Divides mother into divisions called name along
218  /// axis iaxis starting at coordinate value c0 with step
219  /// size step.
220  /// The new volume created will have medium number numed.
221  /// If numed is 0, numed of mother is taken.
222  /// ndvmx is the expected maximum number of divisions
223  /// (If 0, no protection tests are performed in Geant3)
224  virtual void Gsdvt2(const char *name, const char *mother, Double_t step,
225  Int_t iaxis, Double_t c0, Int_t numed, Int_t ndvmx) = 0;
226 
227  /// Flag volume name whose contents will have to be ordered
228  /// along axis iax, by setting the search flag to -iax
229  /// (Geant3 only)
230  virtual void Gsord(const char *name, Int_t iax) = 0;
231 
232  /// Position a volume into an existing one.
233  /// It positions a previously defined volume in the mother.
234  /// - name Volume name
235  /// - nr Copy number of the volume
236  /// - mother Mother volume name
237  /// - x X coord. of the volume in mother ref. sys.
238  /// - y Y coord. of the volume in mother ref. sys.
239  /// - z Z coord. of the volume in mother ref. sys.
240  /// - irot Rotation matrix number w.r.t. mother ref. sys.
241  /// - konly ONLY/MANY flag
242  virtual void Gspos(const char *name, Int_t nr, const char *mother,
243  Double_t x, Double_t y, Double_t z, Int_t irot,
244  const char *konly="ONLY") = 0;
245 
246  /// Place a copy of generic volume name with user number
247  /// nr inside mother, with its parameters upar(1..np)
248  virtual void Gsposp(const char *name, Int_t nr, const char *mother,
249  Double_t x, Double_t y, Double_t z, Int_t irot,
250  const char *konly, Float_t *upar, Int_t np) = 0;
251 
252  /// The same as previous but in double precision
253  virtual void Gsposp(const char *name, Int_t nr, const char *mother,
254  Double_t x, Double_t y, Double_t z, Int_t irot,
255  const char *konly, Double_t *upar, Int_t np) = 0;
256 
257  /// Helper function for resolving MANY.
258  /// Specify the ONLY volume that overlaps with the
259  /// specified MANY and has to be substracted.
260  /// (Geant4 only)
261  virtual void Gsbool(const char* onlyVolName, const char* manyVolName) = 0;
262 
263  /// Define the tables for UV photon tracking in medium itmed.
264  /// Please note that it is the user's responsibility to
265  /// provide all the coefficients:
266  /// - itmed Tracking medium number
267  /// - npckov Number of bins of each table
268  /// - ppckov Value of photon momentum (in GeV)
269  /// - absco Absorption coefficients
270  /// - dielectric: absorption length in cm
271  /// - metals : absorption fraction (0<=x<=1)
272  /// - effic Detection efficiency for UV photons
273  /// - rindex Refraction index (if=0 metal)
274  virtual void SetCerenkov(Int_t itmed, Int_t npckov, Float_t *ppckov,
275  Float_t *absco, Float_t *effic, Float_t *rindex) = 0;
276 
277  /// The same as previous but in double precision
278  virtual void SetCerenkov(Int_t itmed, Int_t npckov, Double_t *ppckov,
279  Double_t *absco, Double_t *effic, Double_t *rindex) = 0;
280 
281  //
282  // functions for definition of surfaces
283  // and material properties for optical physics
284  // ------------------------------------------------
285  //
286 
287  /// Define the optical surface
288  /// - name surface name
289  /// - model selection of model (see #EMCOpSurfaceModel values)
290  /// - surfaceType surface type (see #EMCOpSurfaceType values)
291  /// - surfaceFinish surface quality (see #EMCOpSurfaceType values)
292  /// - sigmaAlpha an unified model surface parameter
293  /// (Geant4 only)
294  virtual void DefineOpSurface(const char* name,
296  EMCOpSurfaceType surfaceType,
297  EMCOpSurfaceFinish surfaceFinish,
298  Double_t sigmaAlpha) = 0;
299 
300  /// Define the optical surface border
301  /// - name border surface name
302  /// - vol1Name first volume name
303  /// - vol1CopyNo first volume copy number
304  /// - vol2Name second volume name
305  /// - vol2CopyNo second volume copy number
306  /// - opSurfaceName name of optical surface which this border belongs to
307  /// (Geant4 only)
308  virtual void SetBorderSurface(const char* name,
309  const char* vol1Name, int vol1CopyNo,
310  const char* vol2Name, int vol2CopyNo,
311  const char* opSurfaceName) = 0;
312 
313  /// Define the optical skin surface
314  /// - name skin surface name
315  /// - volName volume name
316  /// - opSurfaceName name of optical surface which this border belongs to
317  /// (Geant4 only)
318  virtual void SetSkinSurface(const char* name,
319  const char* volName,
320  const char* opSurfaceName) = 0;
321 
322  /// Define material property via a table of values
323  /// - itmed tracking medium id
324  /// - propertyName property name
325  /// - np number of bins of the table
326  /// - pp value of photon momentum (in GeV)
327  /// - values property values
328  /// (Geant4 only)
329  virtual void SetMaterialProperty(
330  Int_t itmed, const char* propertyName,
331  Int_t np, Double_t* pp, Double_t* values) = 0;
332 
333  /// Define material property via a value
334  /// - itmed tracking medium id
335  /// - propertyName property name
336  /// - value property value
337  /// (Geant4 only)
338  virtual void SetMaterialProperty(
339  Int_t itmed, const char* propertyName,
340  Double_t value) = 0;
341 
342  /// Define optical surface property via a table of values
343  /// - surfaceName optical surface name
344  /// - propertyName property name
345  /// - np number of bins of the table
346  /// - pp value of photon momentum (in GeV)
347  /// - values property values
348  /// (Geant4 only)
349  virtual void SetMaterialProperty(
350  const char* surfaceName, const char* propertyName,
351  Int_t np, Double_t* pp, Double_t* values) = 0;
352 
353  //
354  // functions for access to geometry
355  // ------------------------------------------------
356  //
357 
358  /// Return the transformation matrix between the volume specified by
359  /// the path volumePath and the top or master volume.
360  virtual Bool_t GetTransformation(const TString& volumePath,
361  TGeoHMatrix& matrix) = 0;
362 
363  /// Return the name of the shape (shapeType) and its parameters par
364  /// for the volume specified by the path volumePath .
365  virtual Bool_t GetShape(const TString& volumePath,
366  TString& shapeType, TArrayD& par) = 0;
367 
368  /// Return the material parameters for the material specified by
369  /// the material Id
370  virtual Bool_t GetMaterial(Int_t imat, TString& name,
371  Double_t& a, Double_t& z, Double_t& density,
372  Double_t& radl, Double_t& inter, TArrayD& par) = 0;
373 
374  /// Return the material parameters for the volume specified by
375  /// the volumeName.
376  virtual Bool_t GetMaterial(const TString& volumeName,
377  TString& name, Int_t& imat,
378  Double_t& a, Double_t& z, Double_t& density,
379  Double_t& radl, Double_t& inter, TArrayD& par) = 0;
380 
381  /// Return the medium parameters for the volume specified by the
382  /// volumeName.
383  virtual Bool_t GetMedium(const TString& volumeName,
384  TString& name, Int_t& imed,
385  Int_t& nmat, Int_t& isvol, Int_t& ifield,
386  Double_t& fieldm, Double_t& tmaxfd, Double_t& stemax,
387  Double_t& deemax, Double_t& epsil, Double_t& stmin,
388  TArrayD& par) = 0;
389 
390  /// Write out the geometry of the detector in EUCLID file format
391  /// - filnam file name - will be with the extension .euc *
392  /// - topvol volume name of the starting node
393  /// - number copy number of topvol (relevant for gsposp)
394  /// - nlevel number of levels in the tree structure
395  /// to be written out, starting from topvol
396  /// (Geant3 only)
397  /// Deprecated
398  virtual void WriteEuclid(const char* filnam, const char* topvol,
399  Int_t number, Int_t nlevel) = 0;
400 
401  /// Set geometry from Root (built via TGeo)
402  virtual void SetRootGeometry() = 0;
403 
404  /// Activate the parameters defined in tracking media
405  /// (DEEMAX, STMIN, STEMAX), which are, be default, ignored.
406  /// In Geant4 case, only STEMAX is taken into account.
407  /// In FLUKA, all tracking media parameters are ignored.
408  virtual void SetUserParameters(Bool_t isUserParameters) = 0;
409 
410  //
411  // get methods
412  // ------------------------------------------------
413  //
414 
415  /// Return the unique numeric identifier for volume name volName
416  virtual Int_t VolId(const char* volName) const = 0;
417 
418  /// Return the volume name for a given volume identifier id
419  virtual const char* VolName(Int_t id) const = 0;
420 
421  /// Return the unique numeric identifier for medium name mediumName
422  virtual Int_t MediumId(const char* mediumName) const = 0;
423 
424  /// Return total number of volumes in the geometry
425  virtual Int_t NofVolumes() const = 0;
426 
427  /// Return material number for a given volume id
428  virtual Int_t VolId2Mate(Int_t id) const = 0;
429 
430  /// Return number of daughters of the volume specified by volName
431  virtual Int_t NofVolDaughters(const char* volName) const = 0;
432 
433  /// Return the name of i-th daughter of the volume specified by volName
434  virtual const char* VolDaughterName(const char* volName, Int_t i) const = 0;
435 
436  /// Return the copyNo of i-th daughter of the volume specified by volName
437  virtual Int_t VolDaughterCopyNo(const char* volName, Int_t i) const = 0;
438 
439  //
440  // ------------------------------------------------
441  // methods for sensitive detectors
442  // ------------------------------------------------
443  //
444 
445  /// Set a sensitive detector to a volume
446  /// - volName - the volume name
447  /// - sd - the user sensitive detector
448  virtual void SetSensitiveDetector(const TString &volName, TVirtualMCSensitiveDetector *sd);
449 
450  /// Get a sensitive detector of a volume
451  /// - volName - the volume name
452  virtual TVirtualMCSensitiveDetector *GetSensitiveDetector(const TString &volName) const;
453 
454  /// The scoring option:
455  /// if true, scoring is performed only via user defined sensitive detectors and
456  /// MCApplication::Stepping is not called
457  virtual void SetExclusiveSDScoring(Bool_t exclusiveSDScoring);
458 
459  //
460  // ------------------------------------------------
461  // methods for physics management
462  // ------------------------------------------------
463  //
464 
465  //
466  // set methods
467  // ------------------------------------------------
468  //
469 
470  /// Set transport cuts for particles
471  virtual Bool_t SetCut(const char* cutName, Double_t cutValue) = 0;
472 
473  /// Set process control
474  virtual Bool_t SetProcess(const char* flagName, Int_t flagValue) = 0;
475 
476  /// Set a user defined particle
477  /// Function is ignored if particle with specified pdg
478  /// already exists and error report is printed.
479  /// - pdg PDG encoding
480  /// - name particle name
481  /// - mcType VMC Particle type
482  /// - mass mass [GeV]
483  /// - charge charge [eplus]
484  /// - lifetime time of life [s]
485  /// - pType particle type as in Geant4
486  /// - width width [GeV]
487  /// - iSpin spin
488  /// - iParity parity
489  /// - iConjugation conjugation
490  /// - iIsospin isospin
491  /// - iIsospinZ isospin - #rd component
492  /// - gParity gParity
493  /// - lepton lepton number
494  /// - baryon baryon number
495  /// - stable stability
496  /// - shortlived is shorlived?
497  /// - subType particle subType as in Geant4
498  /// - antiEncoding anti encoding
499  /// - magMoment magnetic moment
500  /// - excitation excitation energy [GeV]
501  virtual Bool_t DefineParticle(Int_t pdg, const char* name,
502  TMCParticleType mcType,
503  Double_t mass, Double_t charge, Double_t lifetime) = 0;
504 
505  /// Set a user defined particle
506  /// Function is ignored if particle with specified pdg
507  /// already exists and error report is printed.
508  /// - pdg PDG encoding
509  /// - name particle name
510  /// - mcType VMC Particle type
511  /// - mass mass [GeV]
512  /// - charge charge [eplus]
513  /// - lifetime time of life [s]
514  /// - pType particle type as in Geant4
515  /// - width width [GeV]
516  /// - iSpin spin
517  /// - iParity parity
518  /// - iConjugation conjugation
519  /// - iIsospin isospin
520  /// - iIsospinZ isospin - #rd component
521  /// - gParity gParity
522  /// - lepton lepton number
523  /// - baryon baryon number
524  /// - stable stability
525  /// - shortlived is shorlived?
526  /// - subType particle subType as in Geant4
527  /// - antiEncoding anti encoding
528  /// - magMoment magnetic moment
529  /// - excitation excitation energy [GeV]
530  virtual Bool_t DefineParticle(Int_t pdg, const char* name,
531  TMCParticleType mcType,
532  Double_t mass, Double_t charge, Double_t lifetime,
533  const TString& pType, Double_t width,
534  Int_t iSpin, Int_t iParity, Int_t iConjugation,
535  Int_t iIsospin, Int_t iIsospinZ, Int_t gParity,
536  Int_t lepton, Int_t baryon,
537  Bool_t stable, Bool_t shortlived = kFALSE,
538  const TString& subType = "",
539  Int_t antiEncoding = 0, Double_t magMoment = 0.0,
540  Double_t excitation = 0.0) = 0;
541 
542  /// Set a user defined ion.
543  /// - name ion name
544  /// - Z atomic number
545  /// - A atomic mass
546  /// - Q charge [eplus}
547  /// - excitation excitation energy [GeV]
548  /// - mass mass [GeV] (if not specified by user, approximative
549  /// mass is calculated)
550  virtual Bool_t DefineIon(const char* name, Int_t Z, Int_t A,
551  Int_t Q, Double_t excEnergy, Double_t mass = 0.) = 0;
552 
553  /// Set a user phase space decay for a particle
554  /// - pdg particle PDG encoding
555  /// - bratios the array with branching ratios (in %)
556  /// - mode[6][3] the array with daughters particles PDG codes for each
557  /// decay channel
558  virtual Bool_t SetDecayMode(Int_t pdg, Float_t bratio[6], Int_t mode[6][3]) = 0;
559 
560  /// Calculate X-sections
561  /// (Geant3 only)
562  /// Deprecated
563  virtual Double_t Xsec(char*, Double_t, Int_t, Int_t) = 0;
564 
565  //
566  // particle table usage
567  // ------------------------------------------------
568  //
569 
570  /// Return MC specific code from a PDG and pseudo ENDF code (pdg)
571  virtual Int_t IdFromPDG(Int_t pdg) const =0;
572 
573  /// Return PDG code and pseudo ENDF code from MC specific code (id)
574  virtual Int_t PDGFromId(Int_t id) const =0;
575 
576  //
577  // get methods
578  // ------------------------------------------------
579  //
580 
581  /// Return name of the particle specified by pdg.
582  virtual TString ParticleName(Int_t pdg) const = 0;
583 
584  /// Return mass of the particle specified by pdg.
585  virtual Double_t ParticleMass(Int_t pdg) const = 0;
586 
587  /// Return charge (in e units) of the particle specified by pdg.
588  virtual Double_t ParticleCharge(Int_t pdg) const = 0;
589 
590  /// Return life time of the particle specified by pdg.
591  virtual Double_t ParticleLifeTime(Int_t pdg) const = 0;
592 
593  /// Return VMC type of the particle specified by pdg.
594  virtual TMCParticleType ParticleMCType(Int_t pdg) const = 0;
595  //
596  // ------------------------------------------------
597  // methods for step management
598  // ------------------------------------------------
599  //
600 
601  //
602  // action methods
603  // ------------------------------------------------
604  //
605 
606  /// Stop the transport of the current particle and skip to the next
607  virtual void StopTrack() = 0;
608 
609  /// Stop simulation of the current event and skip to the next
610  virtual void StopEvent() = 0;
611 
612  /// Stop simulation of the current event and set the abort run flag to true
613  virtual void StopRun() = 0;
614 
615  //
616  // set methods
617  // ------------------------------------------------
618  //
619 
620  /// Set the maximum step allowed till the particle is in the current medium
621  virtual void SetMaxStep(Double_t) = 0;
622 
623  /// Set the maximum number of steps till the particle is in the current medium
624  virtual void SetMaxNStep(Int_t) = 0;
625 
626  /// Force the decays of particles to be done with Pythia
627  /// and not with the Geant routines.
628  virtual void SetUserDecay(Int_t pdg) = 0;
629 
630  /// Force the decay time of the current particle
631  virtual void ForceDecayTime(Float_t) = 0;
632 
633  //
634  // tracking volume(s)
635  // ------------------------------------------------
636  //
637 
638  /// Return the current volume ID and copy number
639  virtual Int_t CurrentVolID(Int_t& copyNo) const =0;
640 
641  /// Return the current volume off upward in the geometrical tree
642  /// ID and copy number
643  virtual Int_t CurrentVolOffID(Int_t off, Int_t& copyNo) const =0;
644 
645  /// Return the current volume name
646  virtual const char* CurrentVolName() const =0;
647 
648  /// Return the current volume off upward in the geometrical tree
649  /// name and copy number'
650  /// if name=0 no name is returned
651  virtual const char* CurrentVolOffName(Int_t off) const =0;
652 
653  /// Return the path in geometry tree for the current volume
654  virtual const char* CurrentVolPath() = 0;
655 
656  /// If track is on a geometry boundary, fill the normal vector of the crossing
657  /// volume surface and return true, return false otherwise
659  Double_t &x, Double_t &y, Double_t &z) const = 0;
660 
661  /// Return the parameters of the current material during transport
662  virtual Int_t CurrentMaterial(Float_t &a, Float_t &z,
663  Float_t &dens, Float_t &radl, Float_t &absl) const =0;
664 
665  //// Return the number of the current medium
666  virtual Int_t CurrentMedium() const = 0;
667  // new function (to replace GetMedium() const)
668 
669  /// Return the number of the current event
670  virtual Int_t CurrentEvent() const =0;
671 
672  /// Computes coordinates xd in daughter reference system
673  /// from known coordinates xm in mother reference system.
674  /// - xm coordinates in mother reference system (input)
675  /// - xd coordinates in daughter reference system (output)
676  /// - iflag
677  /// - IFLAG = 1 convert coordinates
678  /// - IFLAG = 2 convert direction cosines
679  virtual void Gmtod(Float_t* xm, Float_t* xd, Int_t iflag) = 0;
680 
681  /// The same as previous but in double precision
682  virtual void Gmtod(Double_t* xm, Double_t* xd, Int_t iflag) = 0;
683 
684  /// Computes coordinates xm in mother reference system
685  /// from known coordinates xd in daughter reference system.
686  /// - xd coordinates in daughter reference system (input)
687  /// - xm coordinates in mother reference system (output)
688  /// - iflag
689  /// - IFLAG = 1 convert coordinates
690  /// - IFLAG = 2 convert direction cosines
691  virtual void Gdtom(Float_t* xd, Float_t* xm, Int_t iflag)= 0 ;
692 
693  /// The same as previous but in double precision
694  virtual void Gdtom(Double_t* xd, Double_t* xm, Int_t iflag)= 0 ;
695 
696  /// Return the maximum step length in the current medium
697  virtual Double_t MaxStep() const =0;
698 
699  /// Return the maximum number of steps allowed in the current medium
700  virtual Int_t GetMaxNStep() const = 0;
701 
702  //
703  // get methods
704  // tracking particle
705  // dynamic properties
706  // ------------------------------------------------
707  //
708 
709  /// Return the current position in the master reference frame of the
710  /// track being transported
711  virtual void TrackPosition(TLorentzVector& position) const =0;
712 
713  /// Return the current position in the master reference frame of the
714  /// track being transported (as double)
715  virtual void TrackPosition(Double_t &x, Double_t &y, Double_t &z) const =0;
716 
717  /// Return the current position in the master reference frame of the
718  /// track being transported (as float)
719  virtual void TrackPosition(Float_t &x, Float_t &y, Float_t &z) const =0;
720 
721  /// Return the direction and the momentum (GeV/c) of the track
722  /// currently being transported
723  virtual void TrackMomentum(TLorentzVector& momentum) const =0;
724 
725  /// Return the direction and the momentum (GeV/c) of the track
726  /// currently being transported (as double)
727  virtual void TrackMomentum(Double_t &px, Double_t &py, Double_t &pz, Double_t &etot) const =0;
728 
729  /// Return the direction and the momentum (GeV/c) of the track
730  /// currently being transported (as float)
731  virtual void TrackMomentum(Float_t &px, Float_t &py, Float_t &pz, Float_t &etot) const =0;
732 
733  /// Return the length in centimeters of the current step (in cm)
734  virtual Double_t TrackStep() const =0;
735 
736  /// Return the length of the current track from its origin (in cm)
737  virtual Double_t TrackLength() const =0;
738 
739  /// Return the current time of flight of the track being transported
740  virtual Double_t TrackTime() const =0;
741 
742  /// Return the energy lost in the current step
743  virtual Double_t Edep() const =0;
744 
745  /// Return the non-ionising energy lost (NIEL) in the current step
746  virtual Double_t NIELEdep() const;
747 
748  //
749  // get methods
750  // tracking particle
751  // static properties
752  // ------------------------------------------------
753  //
754 
755  /// Return the PDG of the particle transported
756  virtual Int_t TrackPid() const =0;
757 
758  /// Return the charge of the track currently transported
759  virtual Double_t TrackCharge() const =0;
760 
761  /// Return the mass of the track currently transported
762  virtual Double_t TrackMass() const =0;
763 
764  /// Return the total energy of the current track
765  virtual Double_t Etot() const =0;
766 
767  //
768  // get methods - track status
769  // ------------------------------------------------
770  //
771 
772  /// Return true when the track performs the first step
773  virtual Bool_t IsNewTrack() const =0;
774 
775  /// Return true if the track is not at the boundary of the current volume
776  virtual Bool_t IsTrackInside() const =0;
777 
778  /// Return true if this is the first step of the track in the current volume
779  virtual Bool_t IsTrackEntering() const =0;
780 
781  /// Return true if this is the last step of the track in the current volume
782  virtual Bool_t IsTrackExiting() const =0;
783 
784  /// Return true if the track is out of the setup
785  virtual Bool_t IsTrackOut() const =0;
786 
787  /// Return true if the current particle has disappeared
788  /// either because it decayed or because it underwent
789  /// an inelastic collision
790  virtual Bool_t IsTrackDisappeared() const =0;
791 
792  /// Return true if the track energy has fallen below the threshold
793  virtual Bool_t IsTrackStop() const =0;
794 
795  /// Return true if the current particle is alive and will continue to be
796  /// transported
797  virtual Bool_t IsTrackAlive() const=0;
798 
799  //
800  // get methods - secondaries
801  // ------------------------------------------------
802  //
803 
804  /// Return the number of secondary particles generated in the current step
805  virtual Int_t NSecondaries() const=0;
806 
807  /// Return the parameters of the secondary track number isec produced
808  /// in the current step
809  virtual void GetSecondary(Int_t isec, Int_t& particleId,
810  TLorentzVector& position, TLorentzVector& momentum) =0;
811 
812  /// Return the VMC code of the process that has produced the secondary
813  /// particles in the current step
814  virtual TMCProcess ProdProcess(Int_t isec) const =0;
815 
816  /// Return the array of the VMC code of the processes active in the current
817  /// step
818  virtual Int_t StepProcesses(TArrayI &proc) const = 0;
819 
820  /// Return the information about the transport order needed by the stack
821  virtual Bool_t SecondariesAreOrdered() const = 0;
822 
823 
824  //
825  // ------------------------------------------------
826  // Control methods
827  // ------------------------------------------------
828  //
829 
830  /// Initialize MC
831  virtual void Init() = 0;
832 
833  /// Initialize MC physics
834  virtual void BuildPhysics() = 0;
835 
836  /// Process one event
837  /// Deprecated
838  virtual void ProcessEvent() = 0;
839 
840  /// Process one run and return true if run has finished successfully,
841  /// return false in other cases (run aborted by user)
842  virtual Bool_t ProcessRun(Int_t nevent) = 0;
843 
844  /// Set switches for lego transport
845  virtual void InitLego() = 0;
846 
847  /// (In)Activate collecting TGeo tracks
848  virtual void SetCollectTracks(Bool_t collectTracks) = 0;
849 
850  /// Return the info if collecting tracks is activated
851  virtual Bool_t IsCollectTracks() const = 0;
852 
853  /// Return the info if multi-threading is supported/activated
854  virtual Bool_t IsMT() const { return kFALSE; }
855 
856  //
857  // ------------------------------------------------
858  // Set methods
859  // ------------------------------------------------
860  //
861 
862  /// Set the particle stack
863  virtual void SetStack(TVirtualMCStack* stack);
864 
865  /// Set the external decayer
866  virtual void SetExternalDecayer(TVirtualMCDecayer* decayer);
867 
868  /// Set the random number generator
869  virtual void SetRandom(TRandom* random);
870 
871  /// Set the magnetic field
872  virtual void SetMagField(TVirtualMagField* field);
873 
874  //
875  // ------------------------------------------------
876  // Get methods
877  // ------------------------------------------------
878  //
879 
880  /// Return the particle stack
881  TVirtualMCStack* GetStack() const { return fStack; }
882 
883  /// Return the external decayer
884  TVirtualMCDecayer* GetDecayer() const { return fDecayer; }
885 
886  /// Return the random number generator
887  TRandom* GetRandom() const { return fRandom; }
888 
889  /// Return the magnetic field
891 
892 protected:
893  TVirtualMCApplication* fApplication; //!< User MC application
894 
895 private:
896  TVirtualMC(const TVirtualMC &mc);
897  TVirtualMC & operator=(const TVirtualMC &);
898 
899 #if !defined(__CINT__)
900  static TMCThreadLocal TVirtualMC* fgMC; ///< Monte Carlo singleton instance
901 #else
902  static TVirtualMC* fgMC; ///< Monte Carlo singleton instance
903 #endif
904 
905  TVirtualMCStack* fStack; //!< Particles stack
906  TVirtualMCDecayer* fDecayer; //!< External decayer
907  TRandom* fRandom; //!< Random number generator
908  TVirtualMagField* fMagField;//!< Magnetic field
909 
910  ClassDef(TVirtualMC,1) //Interface to Monte Carlo
911 };
912 
913 // inline functions (with temorary implementation)
914 
916 {
917  /// Set a sensitive detector to a volume
918  /// - volName - the volume name
919  /// - sd - the user sensitive detector
920 
921  Warning("SetSensitiveDetector(...)", "New function - not yet implemented.");
922 }
923 
925 {
926  /// Get a sensitive detector of a volume
927  /// - volName - the volume name
928 
929  Warning("GetSensitiveDetector()", "New function - not yet implemented.");
930 
931  return 0;
932 }
933 
934 inline void TVirtualMC::SetExclusiveSDScoring(Bool_t /*exclusiveSDScoring*/)
935 {
936  /// The scoring option:
937  /// if true, scoring is performed only via user defined sensitive detectors and
938  /// MCApplication::Stepping is not called
939 
940  Warning("SetExclusiveSDScoring(...)", "New function - not yet implemented.");
941 }
942 
944 {
945  /// Return the non-ionising energy lost (NIEL) in the current step
946 
947  Warning("NIELEdep()", "New function - not yet implemented.");
948 
949  return 0.;
950 }
951 
952 #define gMC (TVirtualMC::GetMC())
953 
954 #endif //ROOT_TVirtualMC
955 
virtual Bool_t IsTrackExiting() const =0
Return true if this is the last step of the track in the current volume.
virtual void Gsdvn(const char *name, const char *mother, Int_t ndiv, Int_t iaxis)=0
Create a new volume by dividing an existing one.
virtual void SetUserParameters(Bool_t isUserParameters)=0
Activate the parameters defined in tracking media (DEEMAX, STMIN, STEMAX), which are, be default, ignored.
virtual Bool_t SetCut(const char *cutName, Double_t cutValue)=0
Set transport cuts for particles.
virtual Bool_t IsMT() const
Return the info if multi-threading is supported/activated.
Definition: TVirtualMC.h:854
virtual Int_t VolDaughterCopyNo(const char *volName, Int_t i) const =0
Return the copyNo of i-th daughter of the volume specified by volName.
virtual void Init()=0
Initialize MC.
virtual void Gsord(const char *name, Int_t iax)=0
Flag volume name whose contents will have to be ordered along axis iax, by setting the search flag to...
static TMCThreadLocal TVirtualMC * fgMC
Monte Carlo singleton instance.
Definition: TVirtualMC.h:900
virtual Double_t Etot() const =0
Return the total energy of the current track.
virtual Double_t ParticleLifeTime(Int_t pdg) const =0
Return life time of the particle specified by pdg.
TVirtualMCStack * fStack
Particles stack.
Definition: TVirtualMC.h:905
virtual TMCProcess ProdProcess(Int_t isec) const =0
Return the VMC code of the process that has produced the secondary particles in the current step...
TMCParticleType
VMC particle type codes.
virtual Int_t VolId2Mate(Int_t id) const =0
Return material number for a given volume id.
float Float_t
Definition: RtypesCore.h:53
EMCOpSurfaceModel
Optical surface models.
Definition: TMCOptical.h:21
TVirtualMC & operator=(const TVirtualMC &)
virtual void Material(Int_t &kmat, const char *name, Double_t a, Double_t z, Double_t dens, Double_t radl, Double_t absl, Float_t *buf, Int_t nwbuf)=0
Define a material.
virtual const char * VolName(Int_t id) const =0
Return the volume name for a given volume identifier id.
virtual Int_t IdFromPDG(Int_t pdg) const =0
Return MC specific code from a PDG and pseudo ENDF code (pdg)
virtual TVirtualMCSensitiveDetector * GetSensitiveDetector(const TString &volName) const
Get a sensitive detector of a volume.
Definition: TVirtualMC.h:924
virtual void Gspos(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char *konly="ONLY")=0
Position a volume into an existing one.
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
Definition: TGaxis.cxx:2551
TRandom * fRandom
Random number generator.
Definition: TVirtualMC.h:907
virtual Int_t CurrentMedium() const =0
virtual void SetMaxNStep(Int_t)=0
Set the maximum number of steps till the particle is in the current medium.
virtual void StopTrack()=0
Stop the transport of the current particle and skip to the next.
TVirtualMCDecayer * fDecayer
External decayer.
Definition: TVirtualMC.h:906
virtual Int_t MediumId(const char *mediumName) const =0
Return the unique numeric identifier for medium name mediumName.
virtual Double_t ParticleMass(Int_t pdg) const =0
Return mass of the particle specified by pdg.
Basic string class.
Definition: TString.h:131
Matrix class used for computing global transformations Should NOT be used for node definition...
Definition: TGeoMatrix.h:420
virtual Bool_t GetMaterial(Int_t imat, TString &name, Double_t &a, Double_t &z, Double_t &density, Double_t &radl, Double_t &inter, TArrayD &par)=0
Return the material parameters for the material specified by the material Id.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Double_t TrackTime() const =0
Return the current time of flight of the track being transported.
virtual void TrackMomentum(TLorentzVector &momentum) const =0
Return the direction and the momentum (GeV/c) of the track currently being transported.
TVirtualMCStack * GetStack() const
Return the particle stack.
Definition: TVirtualMC.h:881
virtual void SetRootGeometry()=0
Set geometry from Root (built via TGeo)
virtual void SetSensitiveDetector(const TString &volName, TVirtualMCSensitiveDetector *sd)
Set a sensitive detector to a volume.
Definition: TVirtualMC.h:915
virtual void InitLego()=0
Set switches for lego transport.
virtual void SetExclusiveSDScoring(Bool_t exclusiveSDScoring)
The scoring option: if true, scoring is performed only via user defined sensitive detectors and MCApp...
Definition: TVirtualMC.h:934
virtual Bool_t DefineIon(const char *name, Int_t Z, Int_t A, Int_t Q, Double_t excEnergy, Double_t mass=0.)=0
Set a user defined ion.
Abstract base class for particle decays.
virtual Double_t TrackCharge() const =0
Return the charge of the track currently transported.
virtual void StopRun()=0
Stop simulation of the current event and set the abort run flag to true.
static double A[]
virtual Bool_t CurrentBoundaryNormal(Double_t &x, Double_t &y, Double_t &z) const =0
If track is on a geometry boundary, fill the normal vector of the crossing volume surface and return ...
virtual Int_t GetMaxNStep() const =0
Return the maximum number of steps allowed in the current medium.
virtual void ForceDecayTime(Float_t)=0
Force the decay time of the current particle.
virtual void Gdtom(Float_t *xd, Float_t *xm, Int_t iflag)=0
Computes coordinates xm in mother reference system from known coordinates xd in daughter reference sy...
Array of integers (32 bits per element).
Definition: TArrayI.h:27
virtual const char * CurrentVolName() const =0
Return the current volume name.
EMCOpSurfaceFinish
Optical surface finish types.
Definition: TMCOptical.h:37
virtual Bool_t GetShape(const TString &volumePath, TString &shapeType, TArrayD &par)=0
Return the name of the shape (shapeType) and its parameters par for the volume specified by the path ...
virtual ~TVirtualMC()
Destructor.
Definition: TVirtualMC.cxx:84
virtual Bool_t IsTrackAlive() const =0
Return true if the current particle is alive and will continue to be transported. ...
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:320
TVirtualMC()
Default constructor.
Definition: TVirtualMC.cxx:69
This is the base class for the ROOT Random number generators.
Definition: TRandom.h:27
virtual void TrackPosition(TLorentzVector &position) const =0
Return the current position in the master reference frame of the track being transported.
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
virtual Double_t NIELEdep() const
Return the non-ionising energy lost (NIEL) in the current step.
Definition: TVirtualMC.h:943
virtual Bool_t GetTransformation(const TString &volumePath, TGeoHMatrix &matrix)=0
Return the transformation matrix between the volume specified by the path volumePath and the top or m...
virtual void Gsbool(const char *onlyVolName, const char *manyVolName)=0
Helper function for resolving MANY.
virtual Int_t NSecondaries() const =0
Return the number of secondary particles generated in the current step.
virtual void DefineOpSurface(const char *name, EMCOpSurfaceModel model, EMCOpSurfaceType surfaceType, EMCOpSurfaceFinish surfaceFinish, Double_t sigmaAlpha)=0
Define the optical surface.
virtual void Gmtod(Float_t *xm, Float_t *xd, Int_t iflag)=0
Computes coordinates xd in daughter reference system from known coordinates xm in mother reference sy...
virtual void WriteEuclid(const char *filnam, const char *topvol, Int_t number, Int_t nlevel)=0
Write out the geometry of the detector in EUCLID file format.
virtual Int_t CurrentVolOffID(Int_t off, Int_t &copyNo) const =0
Return the current volume off upward in the geometrical tree ID and copy number.
virtual void SetCollectTracks(Bool_t collectTracks)=0
(In)Activate collecting TGeo tracks
virtual Int_t CurrentEvent() const =0
Return the number of the current event.
virtual void SetBorderSurface(const char *name, const char *vol1Name, int vol1CopyNo, const char *vol2Name, int vol2CopyNo, const char *opSurfaceName)=0
Define the optical surface border.
virtual Double_t Edep() const =0
Return the energy lost in the current step.
virtual Bool_t SecondariesAreOrdered() const =0
Return the information about the transport order needed by the stack.
virtual Bool_t IsTrackInside() const =0
Return true if the track is not at the boundary of the current volume.
virtual Int_t CurrentVolID(Int_t &copyNo) const =0
Return the current volume ID and copy number.
virtual Int_t StepProcesses(TArrayI &proc) const =0
Return the array of the VMC code of the processes active in the current step.
virtual Double_t TrackStep() const =0
Return the length in centimeters of the current step (in cm)
virtual void Gsposp(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char *konly, Float_t *upar, Int_t np)=0
Place a copy of generic volume name with user number nr inside mother, with its parameters upar(1...
TVirtualMCApplication * fApplication
User MC application.
Definition: TVirtualMC.h:893
TLorentzVector is a general four-vector class, which can be used either for the description of positi...
auto * a
Definition: textangle.C:12
TVirtualMagField * fMagField
Magnetic field.
Definition: TVirtualMC.h:908
Interface to a user defined sensitive detector.
virtual Double_t TrackLength() const =0
Return the length of the current track from its origin (in cm)
virtual Double_t TrackMass() const =0
Return the mass of the track currently transported.
virtual Bool_t IsNewTrack() const =0
Return true when the track performs the first step.
virtual Int_t PDGFromId(Int_t id) const =0
Return PDG code and pseudo ENDF code from MC specific code (id)
virtual Double_t MaxStep() const =0
Return the maximum step length in the current medium.
TRandom * GetRandom() const
Return the random number generator.
Definition: TVirtualMC.h:887
Interface to a user defined particles stack.
virtual void GetSecondary(Int_t isec, Int_t &particleId, TLorentzVector &position, TLorentzVector &momentum)=0
Return the parameters of the secondary track number isec produced in the current step.
virtual Bool_t IsTrackDisappeared() const =0
Return true if the current particle has disappeared either because it decayed or because it underwent...
virtual void SetUserDecay(Int_t pdg)=0
Force the decays of particles to be done with Pythia and not with the Geant routines.
virtual void SetCerenkov(Int_t itmed, Int_t npckov, Float_t *ppckov, Float_t *absco, Float_t *effic, Float_t *rindex)=0
Define the tables for UV photon tracking in medium itmed.
virtual const char * CurrentVolOffName(Int_t off) const =0
Return the current volume off upward in the geometrical tree name and copy number&#39; if name=0 no name ...
virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t np)=0
Create a new volume.
virtual Bool_t SetProcess(const char *flagName, Int_t flagValue)=0
Set process control.
virtual void StopEvent()=0
Stop simulation of the current event and skip to the next.
Interface to a user Monte Carlo application.
virtual Bool_t ProcessRun(Int_t nevent)=0
Process one run and return true if run has finished successfully, return false in other cases (run ab...
virtual const char * CurrentVolPath()=0
Return the path in geometry tree for the current volume.
virtual void Mixture(Int_t &kmat, const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nlmat, Float_t *wmat)=0
Define a mixture or a compound with a number kmat composed by the basic nlmat materials defined by ar...
TVirtualMCDecayer * GetDecayer() const
Return the external decayer.
Definition: TVirtualMC.h:884
virtual void SetSkinSurface(const char *name, const char *volName, const char *opSurfaceName)=0
Define the optical skin surface.
virtual Double_t ParticleCharge(Int_t pdg) const =0
Return charge (in e units) of the particle specified by pdg.
const Bool_t kFALSE
Definition: RtypesCore.h:88
virtual void SetMaterialProperty(Int_t itmed, const char *propertyName, Int_t np, Double_t *pp, Double_t *values)=0
Define material property via a table of values.
virtual TString ParticleName(Int_t pdg) const =0
Return name of the particle specified by pdg.
TVirtualMagField * GetMagField() const
Return the magnetic field.
Definition: TVirtualMC.h:890
#define TMCThreadLocal
Definition: TMCtls.h:80
virtual void SetMagField(TVirtualMagField *field)
Set the magnetic field.
Definition: TVirtualMC.cxx:138
virtual void ProcessEvent()=0
Process one event Deprecated.
double Double_t
Definition: RtypesCore.h:55
Abstract Monte Carlo interface.
Definition: TVirtualMC.h:42
virtual void SetRandom(TRandom *random)
Set the random number generator.
Definition: TVirtualMC.cxx:127
virtual TMCParticleType ParticleMCType(Int_t pdg) const =0
Return VMC type of the particle specified by pdg.
Double_t y[n]
Definition: legend1.C:17
virtual Bool_t IsCollectTracks() const =0
Return the info if collecting tracks is activated.
virtual Double_t Xsec(char *, Double_t, Int_t, Int_t)=0
Calculate X-sections (Geant3 only) Deprecated.
virtual const char * VolDaughterName(const char *volName, Int_t i) const =0
Return the name of i-th daughter of the volume specified by volName.
Abstract class for magnetic field.
virtual void BuildPhysics()=0
Initialize MC physics.
Array of doubles (64 bits per element).
Definition: TArrayD.h:27
TMCProcess
VMC physics process codes.
Definition: TMCProcess.h:23
virtual Bool_t DefineParticle(Int_t pdg, const char *name, TMCParticleType mcType, Double_t mass, Double_t charge, Double_t lifetime)=0
Set a user defined particle Function is ignored if particle with specified pdg already exists and err...
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
virtual Bool_t IsTrackEntering() const =0
Return true if this is the first step of the track in the current volume.
virtual void Gsdvt(const char *name, const char *mother, Double_t step, Int_t iaxis, Int_t numed, Int_t ndvmx)=0
Create a new volume by dividing an existing one Divide mother into divisions called name along axis i...
virtual void SetExternalDecayer(TVirtualMCDecayer *decayer)
Set the external decayer.
Definition: TVirtualMC.cxx:117
virtual void Gstpar(Int_t itmed, const char *param, Double_t parval)=0
Change the value of cut or mechanism param to a new value parval for tracking medium itmed...
virtual Int_t CurrentMaterial(Float_t &a, Float_t &z, Float_t &dens, Float_t &radl, Float_t &absl) const =0
Return the parameters of the current material during transport.
virtual void SetStack(TVirtualMCStack *stack)
Set the particle stack.
Definition: TVirtualMC.cxx:107
virtual Bool_t IsTrackOut() const =0
Return true if the track is out of the setup.
virtual Int_t TrackPid() const =0
Return the PDG of the particle transported.
virtual void Gsdvn2(const char *name, const char *mother, Int_t ndiv, Int_t iaxis, Double_t c0i, Int_t numed)=0
Create a new volume by dividing an existing one.
virtual void SetMaxStep(Double_t)=0
Set the maximum step allowed till the particle is in the current medium.
virtual void Medium(Int_t &kmed, const char *name, Int_t nmat, Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin, Float_t *ubuf, Int_t nbuf)=0
Define a medium.
virtual Int_t NofVolumes() const =0
Return total number of volumes in the geometry.
virtual Bool_t SetDecayMode(Int_t pdg, Float_t bratio[6], Int_t mode[6][3])=0
Set a user phase space decay for a particle.
virtual void Gsdvt2(const char *name, const char *mother, Double_t step, Int_t iaxis, Double_t c0, Int_t numed, Int_t ndvmx)=0
Create a new volume by dividing an existing one Divides mother into divisions called name along axis ...
virtual void Matrix(Int_t &krot, Double_t thetaX, Double_t phiX, Double_t thetaY, Double_t phiY, Double_t thetaZ, Double_t phiZ)=0
Define a rotation matrix.
virtual Int_t VolId(const char *volName) const =0
Return the unique numeric identifier for volume name volName.
virtual Bool_t GetMedium(const TString &volumeName, TString &name, Int_t &imed, Int_t &nmat, Int_t &isvol, Int_t &ifield, Double_t &fieldm, Double_t &tmaxfd, Double_t &stemax, Double_t &deemax, Double_t &epsil, Double_t &stmin, TArrayD &par)=0
Return the medium parameters for the volume specified by the volumeName.
virtual Int_t NofVolDaughters(const char *volName) const =0
Return number of daughters of the volume specified by volName.
static double Q[]
static TVirtualMC * GetMC()
Static access method.
Definition: TVirtualMC.cxx:98
char name[80]
Definition: TGX11.cxx:109
virtual Bool_t IsTrackStop() const =0
Return true if the track energy has fallen below the threshold.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:866
virtual Bool_t IsRootGeometrySupported() const =0
Info about supporting geometry defined via Root.
EMCOpSurfaceType
Optical surface types.
Definition: TMCOptical.h:28