#include <VisExamples/VisG4ExN02/src/VisG4ExampleParametrisation.h>
Public Member Functions | |
virtual void | ComputeDimensions (G4Box &chamber, G4int copy, const G4VPhysicalVolume *pv) const |
virtual void | ComputeTransformation (G4int copy, G4VPhysicalVolume *pv) const |
VisG4ExampleParametrisation (int nchambers, double zstart, double zspacing, double chamberWidth, double initialLen, double finalLen) | |
Private Attributes | |
double | m_halfFirst |
double | m_halfIncr |
double | m_halfWidth |
int | m_nchambers |
double | m_zspacing |
double | m_zstart |
Definition at line 16 of file VisG4ExampleParametrisation.h.
VisG4ExampleParametrisation::VisG4ExampleParametrisation | ( | int | nchambers, | |
double | zstart, | |||
double | zspacing, | |||
double | chamberWidth, | |||
double | initialLen, | |||
double | finalLen | |||
) |
Definition at line 19 of file VisG4ExampleParametrisation.cc.
References ASSERT, and m_zspacing.
00022 : m_nchambers (nchambers), 00023 m_zstart (zstart), 00024 m_zspacing (zspacing), 00025 m_halfWidth (chamberWidth/2), 00026 m_halfFirst (initialLen/2), 00027 m_halfIncr (nchambers > 0 ? (finalLen - initialLen)/(nchambers*2) : 0) 00028 { ASSERT (m_zspacing >= chamberWidth); }
void VisG4ExampleParametrisation::ComputeDimensions | ( | G4Box & | chamber, | |
G4int | copy, | |||
const G4VPhysicalVolume * | pv | |||
) | const [virtual] |
Definition at line 38 of file VisG4ExampleParametrisation.cc.
References m_halfFirst, m_halfIncr, and m_halfWidth.
00040 { 00041 double halfLength = m_halfFirst + copy * m_halfIncr; 00042 chamber.SetXHalfLength (halfLength); 00043 chamber.SetYHalfLength (halfLength); 00044 chamber.SetZHalfLength (m_halfWidth); 00045 }
void VisG4ExampleParametrisation::ComputeTransformation | ( | G4int | copy, | |
G4VPhysicalVolume * | pv | |||
) | const [virtual] |
Definition at line 31 of file VisG4ExampleParametrisation.cc.
References m_zspacing, and m_zstart.
00032 { 00033 pv->SetTranslation (G4ThreeVector (0, 0, m_zstart + (copy+1) * m_zspacing)); 00034 pv->SetRotation (0); 00035 }
double VisG4ExampleParametrisation::m_halfFirst [private] |
double VisG4ExampleParametrisation::m_halfIncr [private] |
double VisG4ExampleParametrisation::m_halfWidth [private] |
int VisG4ExampleParametrisation::m_nchambers [private] |
Definition at line 31 of file VisG4ExampleParametrisation.h.
double VisG4ExampleParametrisation::m_zspacing [private] |
Definition at line 33 of file VisG4ExampleParametrisation.h.
Referenced by ComputeTransformation(), and VisG4ExampleParametrisation().
double VisG4ExampleParametrisation::m_zstart [private] |