G4Root Version 6.6
Loading...
Searching...
No Matches
TG4RootSolid.h
Go to the documentation of this file.
1// @(#)root/g4root:$Id$
2// Author: Andrei Gheata 07/08/06
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
16
17#ifndef ROOT_TG4RootSolid
18#define ROOT_TG4RootSolid
19
20#include "G4VSolid.hh"
21#include "G4Version.hh"
22
23class TGeoShape;
24
30
31class TG4RootSolid : public G4VSolid
32{
33
34 protected:
35 TGeoShape* fShape;
36
37 public:
39 TG4RootSolid(TGeoShape* shape);
40 virtual ~TG4RootSolid() {}
41
42 virtual G4bool CalculateExtent(const EAxis pAxis,
43 const G4VoxelLimits& pVoxelLimit, const G4AffineTransform& pTransform,
44 G4double& pMin, G4double& pMax) const;
45 virtual EInside Inside(const G4ThreeVector& p) const;
46 virtual G4ThreeVector SurfaceNormal(const G4ThreeVector& p) const;
47 virtual G4double DistanceToIn(
48 const G4ThreeVector& p, const G4ThreeVector& v) const;
49 virtual G4double DistanceToIn(const G4ThreeVector& p) const;
50 virtual G4double DistanceToOut(const G4ThreeVector& p, const G4ThreeVector& v,
51 const G4bool calcNorm = false, G4bool* validNorm = 0,
52 G4ThreeVector* n = 0) const;
53 virtual G4double DistanceToOut(const G4ThreeVector& p) const;
54 virtual void ComputeDimensions(
55 G4VPVParameterisation* p, const G4int n, const G4VPhysicalVolume* pRep);
56 virtual G4double GetCubicVolume();
57 virtual G4GeometryType GetEntityType() const;
58 virtual G4ThreeVector GetPointOnSurface() const;
59 virtual std::ostream& StreamInfo(std::ostream& os) const;
60 virtual void DescribeYourselfTo(G4VGraphicsScene& scene) const;
61 virtual G4VisExtent GetExtent() const;
62 virtual G4Polyhedron* CreatePolyhedron() const;
63#if G4VERSION_NUMBER < 1000
64 virtual G4NURBS* CreateNURBS() const;
65#endif
66 virtual G4Polyhedron* GetPolyhedron() const;
67 virtual const G4VSolid* GetConstituentSolid(G4int no) const;
68 virtual G4VSolid* GetConstituentSolid(G4int no);
69 virtual const G4DisplacedSolid* GetDisplacedSolidPtr() const;
70 virtual G4DisplacedSolid* GetDisplacedSolidPtr();
71
72 // ClassDef(TG4RootSolid,0) // Class defining a G4Solid based on a ROOT
73 // shape
74};
75#endif
GEANT4 solid implemented by a ROOT shape.
virtual G4GeometryType GetEntityType() const
virtual const G4VSolid * GetConstituentSolid(G4int no) const
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
virtual const G4DisplacedSolid * GetDisplacedSolidPtr() const
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
virtual std::ostream & StreamInfo(std::ostream &os) const
virtual G4Polyhedron * GetPolyhedron() const
TGeoShape * fShape
TGeo associated shape.
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
virtual G4double GetCubicVolume()
virtual void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
TG4RootSolid()
Default ctor.
virtual G4NURBS * CreateNURBS() const
virtual G4ThreeVector GetPointOnSurface() const
virtual G4VisExtent GetExtent() const
virtual G4Polyhedron * CreatePolyhedron() const
virtual EInside Inside(const G4ThreeVector &p) const
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
virtual void DescribeYourselfTo(G4VGraphicsScene &scene) const
virtual ~TG4RootSolid()
Destructor.