CMS 3D CMS Logo

VisG4ExampleParametrisation Class Reference

#include <VisExamples/VisG4ExN02/src/VisG4ExampleParametrisation.h>

List of all members.

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


Detailed Description

Definition at line 16 of file VisG4ExampleParametrisation.h.


Constructor & Destructor Documentation

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); }


Member Function Documentation

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 }


Member Data Documentation

double VisG4ExampleParametrisation::m_halfFirst [private]

Definition at line 35 of file VisG4ExampleParametrisation.h.

Referenced by ComputeDimensions().

double VisG4ExampleParametrisation::m_halfIncr [private]

Definition at line 36 of file VisG4ExampleParametrisation.h.

Referenced by ComputeDimensions().

double VisG4ExampleParametrisation::m_halfWidth [private]

Definition at line 34 of file VisG4ExampleParametrisation.h.

Referenced by ComputeDimensions().

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]

Definition at line 32 of file VisG4ExampleParametrisation.h.

Referenced by ComputeTransformation().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:35:24 2009 for CMSSW by  doxygen 1.5.4