Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ParameterisationPolyconeRho Class Reference

#include <G4ParameterisationPolycone.hh>

Inheritance diagram for G4ParameterisationPolyconeRho:
Collaboration diagram for G4ParameterisationPolyconeRho:

Public Member Functions

 G4ParameterisationPolyconeRho (EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType)
 
 ~G4ParameterisationPolyconeRho ()
 
void CheckParametersValidity ()
 
G4double GetMaxParameter () const
 
void ComputeTransformation (const G4int copyNo, G4VPhysicalVolume *physVol) const
 
void ComputeDimensions (G4Polycone &pcone, const G4int copyNo, const G4VPhysicalVolume *physVol) const
 
- Public Member Functions inherited from G4VParameterisationPolycone
 G4VParameterisationPolycone (EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
 
virtual ~G4VParameterisationPolycone ()
 
- Public Member Functions inherited from G4VDivisionParameterisation
 G4VDivisionParameterisation (EAxis axis, G4int nDiv, G4double width, G4double offset, DivisionType divType, G4VSolid *motherSolid=0)
 
virtual ~G4VDivisionParameterisation ()
 
virtual G4VSolidComputeSolid (const G4int, G4VPhysicalVolume *)
 
const G4StringGetType () const
 
EAxis GetAxis () const
 
G4int GetNoDiv () const
 
G4double GetWidth () const
 
G4double GetOffset () const
 
G4VSolidGetMotherSolid () const
 
void SetType (const G4String &type)
 
G4int VolumeFirstCopyNo () const
 
void SetHalfGap (G4double hg)
 
G4double GetHalfGap () const
 
- Public Member Functions inherited from G4VPVParameterisation
 G4VPVParameterisation ()
 
virtual ~G4VPVParameterisation ()
 
virtual G4MaterialComputeMaterial (const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
 
virtual G4bool IsNested () const
 
virtual G4VVolumeMaterialScannerGetMaterialScanner ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4VDivisionParameterisation
void ChangeRotMatrix (G4VPhysicalVolume *physVol, G4double rotZ=0.) const
 
G4int CalculateNDiv (G4double motherDim, G4double width, G4double offset) const
 
G4double CalculateWidth (G4double motherDim, G4int nDiv, G4double offset) const
 
void CheckOffset (G4double maxPar)
 
void CheckNDivAndWidth (G4double maxPar)
 
G4double OffsetZ () const
 
- Protected Attributes inherited from G4VDivisionParameterisation
G4String ftype
 
EAxis faxis
 
G4int fnDiv
 
G4double fwidth
 
G4double foffset
 
DivisionType fDivisionType
 
G4VSolidfmotherSolid
 
G4bool fReflectedSolid
 
G4bool fDeleteSolid
 
G4int theVoluFirstCopyNo
 
G4double kCarTolerance
 
G4double fhgap
 
- Static Protected Attributes inherited from G4VDivisionParameterisation
static G4ThreadLocal
G4RotationMatrix
fRot = 0
 
static const G4int verbose = 5
 

Detailed Description

Definition at line 80 of file G4ParameterisationPolycone.hh.

Constructor & Destructor Documentation

G4ParameterisationPolyconeRho::G4ParameterisationPolyconeRho ( EAxis  axis,
G4int  nCopies,
G4double  offset,
G4double  step,
G4VSolid motherSolid,
DivisionType  divType 
)

Definition at line 99 of file G4ParameterisationPolycone.cc.

102  : G4VParameterisationPolycone( axis, nDiv, width, offset, msolid, divType )
103 {
105  SetType( "DivisionPolyconeRho" );
106 
107  G4Polycone* msol = (G4Polycone*)(fmotherSolid);
108  G4PolyconeHistorical* origparamMother = msol->GetOriginalParameters();
109 
110  if( divType == DivWIDTH )
111  {
112  fnDiv = CalculateNDiv( origparamMother->Rmax[0]
113  - origparamMother->Rmin[0], width, offset );
114  }
115  else if( divType == DivNDIV )
116  {
117  fwidth = CalculateWidth( origparamMother->Rmax[0]
118  - origparamMother->Rmin[0], nDiv, offset );
119  }
120 
121 #ifdef G4DIVDEBUG
122  if( verbose >= -1 )
123  {
124  G4cout << " G4ParameterisationPolyconeRho - # divisions " << fnDiv
125  << " = " << nDiv << G4endl
126  << " Offset " << foffset << " = " << offset << G4endl
127  << " Width " << fwidth << " = " << width << G4endl;
128  }
129 #endif
130 }
void SetType(const G4String &type)
#define width
G4double CalculateWidth(G4double motherDim, G4int nDiv, G4double offset) const
G4GLOB_DLL std::ostream G4cout
G4VParameterisationPolycone(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
G4PolyconeHistorical * GetOriginalParameters() const
G4int CalculateNDiv(G4double motherDim, G4double width, G4double offset) const
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

G4ParameterisationPolyconeRho::~G4ParameterisationPolyconeRho ( )

Definition at line 133 of file G4ParameterisationPolycone.cc.

134 {
135 }

Member Function Documentation

void G4ParameterisationPolyconeRho::CheckParametersValidity ( )
virtual

Reimplemented from G4VDivisionParameterisation.

Definition at line 138 of file G4ParameterisationPolycone.cc.

139 {
141 
142  G4Polycone* msol = (G4Polycone*)(fmotherSolid);
143 
145  {
146  std::ostringstream message;
147  message << "In solid " << msol->GetName() << G4endl
148  << "Division along R will be done with a width "
149  << "different for each solid section." << G4endl
150  << "WIDTH will not be used !";
151  G4Exception("G4VParameterisationPolycone::CheckParametersValidity()",
152  "GeomDiv1001", JustWarning, message);
153  }
154  if( foffset != 0. )
155  {
156  std::ostringstream message;
157  message << "In solid " << msol->GetName() << G4endl
158  << "Division along R will be done with a width "
159  << "different for each solid section." << G4endl
160  << "OFFSET will not be used !";
161  G4Exception("G4VParameterisationPolycone::CheckParametersValidity()",
162  "GeomDiv1001", JustWarning, message);
163  }
164 }
G4String GetName() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

void G4ParameterisationPolyconeRho::ComputeDimensions ( G4Polycone pcone,
const G4int  copyNo,
const G4VPhysicalVolume physVol 
) const
virtual

Reimplemented from G4VPVParameterisation.

Definition at line 213 of file G4ParameterisationPolycone.cc.

215 {
216  G4Polycone* msol = (G4Polycone*)(fmotherSolid);
217 
218  G4PolyconeHistorical* origparamMother = msol->GetOriginalParameters();
219  G4PolyconeHistorical origparam( *origparamMother );
220  G4int nZplanes = origparamMother->Num_z_planes;
221 
222  G4double width = 0.;
223  for( G4int ii = 0; ii < nZplanes; ii++ )
224  {
225  width = CalculateWidth( origparamMother->Rmax[ii]
226  - origparamMother->Rmin[ii], fnDiv, foffset );
227  origparam.Rmin[ii] = origparamMother->Rmin[ii]+foffset+width*copyNo;
228  origparam.Rmax[ii] = origparamMother->Rmin[ii]+foffset+width*(copyNo+1);
229  }
230 
231  pcone.SetOriginalParameters(&origparam); // copy values & transfer pointers
232  pcone.Reset(); // reset to new solid parameters
233 
234 #ifdef G4DIVDEBUG
235  if( verbose >= -2 )
236  {
237  G4cout << "G4ParameterisationPolyconeRho::ComputeDimensions()" << G4endl
238  << "-- Parametrised pcone copy-number: " << copyNo << G4endl;
239  pcone.DumpInfo();
240  }
241 #endif
242 }
#define width
G4double CalculateWidth(G4double motherDim, G4int nDiv, G4double offset) const
int G4int
Definition: G4Types.hh:78
void DumpInfo() const
G4GLOB_DLL std::ostream G4cout
void SetOriginalParameters(G4PolyconeHistorical *pars)
G4PolyconeHistorical * GetOriginalParameters() const
G4bool Reset()
Definition: G4Polycone.cc:447
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

void G4ParameterisationPolyconeRho::ComputeTransformation ( const G4int  copyNo,
G4VPhysicalVolume physVol 
) const
virtual

Implements G4VDivisionParameterisation.

Definition at line 178 of file G4ParameterisationPolycone.cc.

179 {
180  //----- translation
181  G4ThreeVector origin(0.,0.,0.);
182  //----- set translation
183  physVol->SetTranslation( origin );
184 
185  //----- calculate rotation matrix: unit
186 
187 #ifdef G4DIVDEBUG
188  if( verbose >= 2 )
189  {
190  G4cout << " G4ParameterisationPolyconeRho " << G4endl
191  << " foffset: " << foffset
192  << " - fwidth: " << fwidth << G4endl;
193  }
194 #endif
195 
196  ChangeRotMatrix( physVol );
197 
198 #ifdef G4DIVDEBUG
199  if( verbose >= 2 )
200  {
201  G4cout << std::setprecision(8) << " G4ParameterisationPolyconeRho "
202  << G4endl
203  << " Position: " << origin/mm
204  << " - Width: " << fwidth/deg
205  << " - Axis: " << faxis << G4endl;
206  }
207 #endif
208 }
static constexpr double mm
Definition: G4SIunits.hh:115
G4GLOB_DLL std::ostream G4cout
void ChangeRotMatrix(G4VPhysicalVolume *physVol, G4double rotZ=0.) const
void SetTranslation(const G4ThreeVector &v)
#define G4endl
Definition: G4ios.hh:61
static constexpr double deg
Definition: G4SIunits.hh:152

Here is the call graph for this function:

G4double G4ParameterisationPolyconeRho::GetMaxParameter ( ) const
virtual

Implements G4VDivisionParameterisation.

Definition at line 167 of file G4ParameterisationPolycone.cc.

168 {
169  G4Polycone* msol = (G4Polycone*)(fmotherSolid);
170  G4PolyconeHistorical* original_pars = msol->GetOriginalParameters();
171  return original_pars->Rmax[0] - original_pars->Rmin[0];
172 }
G4PolyconeHistorical * GetOriginalParameters() const

Here is the call graph for this function:


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