VMC Version 2.0
Loading...
Searching...
No Matches
TVirtualMCGeometry.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------
2// Copyright (C) 2019 CERN and copyright holders of VMC Project.
3// This software is distributed under the terms of the GNU General Public
4// License v3 (GPL Version 3), copied verbatim in the file "LICENSE".
5//
6// See https://github.com/vmc-project/vmc for full licensing information.
7// -----------------------------------------------------------------------
8
9// Authors: Alice collaboration 25/06/2002
10
11/*************************************************************************
12 * Copyright (C) 2006, Rene Brun and Fons Rademakers. *
13 * Copyright (C) 2002, ALICE Experiment at CERN. *
14 * All rights reserved. *
15 * *
16 * For the licensing terms see $ROOTSYS/LICENSE. *
17 * For the list of contributors see $ROOTSYS/README/CREDITS. *
18 *************************************************************************/
19
20#ifndef ROOT_TVirtualMCGeometry
21#define ROOT_TVirtualMCGeometry
22
23//
24// Class TVirtualMCGeometry
25// -------------------------
26// Interface to Monte Carlo geometry construction
27// (separated from VirtualMC)
28
29#include "TNamed.h"
30
31class TGeoHMatrix;
32class TArrayD;
33class TString;
34
35class TVirtualMCGeometry : public TNamed {
36
37public:
38 // Standard constructor
39 TVirtualMCGeometry(const char *name, const char *title);
40
41 // Default constructor
43
44 // Destructor
45 virtual ~TVirtualMCGeometry();
46
47 //
48 // detector composition
49 // ------------------------------------------------
50 //
51
66 virtual void Material(Int_t &kmat, const char *name, Double_t a, Double_t z, Double_t dens, Double_t radl,
67 Double_t absl, Float_t *buf, Int_t nwbuf) = 0;
68
70 virtual void Material(Int_t &kmat, const char *name, Double_t a, Double_t z, Double_t dens, Double_t radl,
71 Double_t absl, Double_t *buf, Int_t nwbuf) = 0;
72
76 //
79 //
84 virtual void Mixture(Int_t &kmat, const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nlmat,
85 Float_t *wmat) = 0;
86
88 virtual void Mixture(Int_t &kmat, const char *name, Double_t *a, Double_t *z, Double_t dens, Int_t nlmat,
89 Double_t *wmat) = 0;
90
110 virtual void Medium(Int_t &kmed, const char *name, Int_t nmat, Int_t isvol, Int_t ifield, Double_t fieldm,
111 Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin, Float_t *ubuf,
112 Int_t nbuf) = 0;
113
115 virtual void Medium(Int_t &kmed, const char *name, Int_t nmat, Int_t isvol, Int_t ifield, Double_t fieldm,
116 Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin,
117 Double_t *ubuf, Int_t nbuf) = 0;
118
127 virtual void Matrix(Int_t &krot, Double_t thetaX, Double_t phiX, Double_t thetaY, Double_t phiY, Double_t thetaZ,
128 Double_t phiZ) = 0;
129
130 //
131 // functions from GGEOM
132 // ------------------------------------------------
133 //
134
141 virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t np) = 0;
142
144 virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed, Double_t *upar, Int_t np) = 0;
145
153 virtual void Gsdvn(const char *name, const char *mother, Int_t ndiv, Int_t iaxis) = 0;
154
159 virtual void Gsdvn2(const char *name, const char *mother, Int_t ndiv, Int_t iaxis, Double_t c0i, Int_t numed) = 0;
160
169 virtual void Gsdvt(const char *name, const char *mother, Double_t step, Int_t iaxis, Int_t numed, Int_t ndvmx) = 0;
170
179 virtual void Gsdvt2(const char *name, const char *mother, Double_t step, Int_t iaxis, Double_t c0, Int_t numed,
180 Int_t ndvmx) = 0;
181
185 virtual void Gsord(const char *name, Int_t iax) = 0;
186
197 virtual void Gspos(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot,
198 const char *konly = "ONLY") = 0;
199
202 virtual void Gsposp(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot,
203 const char *konly, Float_t *upar, Int_t np) = 0;
204
206 virtual void Gsposp(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot,
207 const char *konly, Double_t *upar, Int_t np) = 0;
208
213 virtual void Gsbool(const char *onlyVolName, const char *manyVolName) = 0;
214
215 //
216 // functions for access to geometry
217 // ------------------------------------------------
218 //
219
222 virtual Bool_t GetTransformation(const TString &volumePath, TGeoHMatrix &matrix) = 0;
223
226 virtual Bool_t GetShape(const TString &volumePath, TString &shapeType, TArrayD &par) = 0;
227
230 virtual Bool_t GetMaterial(const TString &volumeName, TString &name, Int_t &imat, Double_t &a, Double_t &z,
231 Double_t &density, Double_t &radl, Double_t &inter, TArrayD &par) = 0;
232
235 virtual Bool_t GetMedium(const TString &volumeName, TString &name, Int_t &imed, Int_t &nmat, Int_t &isvol,
236 Int_t &ifield, Double_t &fieldm, Double_t &tmaxfd, Double_t &stemax, Double_t &deemax,
237 Double_t &epsil, Double_t &stmin, TArrayD &par) = 0;
238
239 // functions for drawing
240 // virtual void DrawOneSpec(const char* name) = 0;
241 // virtual void Gsatt(const char* name, const char* att, Int_t val) = 0;
242 // virtual void Gdraw(const char*,Double_t theta = 30, Double_t phi = 30,
243 // Double_t psi = 0, Double_t u0 = 10, Double_t v0 = 10,
244 // Double_t ul = 0.01, Double_t vl = 0.01) = 0;
245
246 // Euclid
247 // virtual void WriteEuclid(const char*, const char*, Int_t, Int_t) = 0;
248
249 //
250 // get methods
251 // ------------------------------------------------
252 //
253
255 virtual Int_t VolId(const char *volName) const = 0;
256
258 virtual const char *VolName(Int_t id) const = 0;
259
261 virtual Int_t MediumId(const char *mediumName) const = 0;
262
264 virtual Int_t NofVolumes() const = 0;
265
267 virtual Int_t NofVolDaughters(const char *volName) const = 0;
268
270 virtual const char *VolDaughterName(const char *volName, Int_t i) const = 0;
271
273 virtual Int_t VolDaughterCopyNo(const char *volName, Int_t i) const = 0;
274
276 virtual Int_t VolId2Mate(Int_t id) const = 0;
277
278protected:
281
282 ClassDef(TVirtualMCGeometry, 1) // Interface to Monte Carlo geometry construction
283};
284
285#endif // ROOT_TVirtualMCGeometry
Interface to Monte Carlo geometry construction.
virtual Bool_t GetMaterial(const TString &volumeName, TString &name, Int_t &imat, Double_t &a, Double_t &z, Double_t &density, Double_t &radl, Double_t &inter, TArrayD &par)=0
Return the material parameters for the volume specified by the volumeName.
virtual Int_t VolId2Mate(Int_t id) const =0
Return material number for a given volume id.
virtual ~TVirtualMCGeometry()
Destructor.
virtual Int_t MediumId(const char *mediumName) const =0
Return the unique numeric identifier for medium name mediumName.
TVirtualMCGeometry & operator=(const TVirtualMCGeometry &)
virtual Int_t NofVolDaughters(const char *volName) const =0
Return number of daughters of the volume specified by volName.
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...
TVirtualMCGeometry(const TVirtualMCGeometry &)
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 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 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 Gsposp(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char *konly, Double_t *upar, Int_t np)=0
The same as previous but in double precision.
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 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.
TVirtualMCGeometry()
Default constructor.
virtual void Medium(Int_t &kmed, const char *name, Int_t nmat, Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin, Double_t *ubuf, Int_t nbuf)=0
The same as previous but in double precision.
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 void Mixture(Int_t &kmat, const char *name, Double_t *a, Double_t *z, Double_t dens, Int_t nlmat, Double_t *wmat)=0
The same as previous but in double precision.
virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed, Double_t *upar, Int_t np)=0
The same as previous but in double precision.
virtual const char * VolName(Int_t id) const =0
Return the volume name for a given volume identifier id.
virtual Int_t VolId(const char *volName) const =0
Return the unique numeric identifier for volume name volName.
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 Int_t NofVolumes() const =0
Return total number of volumes in the geometry.
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 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.
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 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 const char * VolDaughterName(const char *volName, Int_t i) const =0
Return the name of i-th daughter of the volume specified by volName.
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 mixture or compound with a number kmat composed by the basic nlmat materials defined by arrays...
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...
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....
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 void Gsbool(const char *onlyVolName, const char *manyVolName)=0
Helper function for resolving MANY.
virtual void Material(Int_t &kmat, const char *name, Double_t a, Double_t z, Double_t dens, Double_t radl, Double_t absl, Double_t *buf, Int_t nwbuf)=0
The same as previous but in double precision.