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

#include <ChromosomeParameterisation.hh>

Inheritance diagram for ChromosomeParameterisation:
Collaboration diagram for ChromosomeParameterisation:

Public Member Functions

 ChromosomeParameterisation (const char *filename)
 
virtual ~ChromosomeParameterisation ()
 
int GetNumRosettes ()
 
virtual void ComputeTransformation (const G4int copyNo, G4VPhysicalVolume *physVol) const
 
virtual void ComputeDimensions (G4Tubs &rosette, const G4int copyNo, const G4VPhysicalVolume *physVol) const
 
- Public Member Functions inherited from G4VPVParameterisation
 G4VPVParameterisation ()
 
virtual ~G4VPVParameterisation ()
 
virtual G4VSolidComputeSolid (const G4int, G4VPhysicalVolume *)
 
virtual G4MaterialComputeMaterial (const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
 
virtual G4bool IsNested () const
 
virtual G4VVolumeMaterialScannerGetMaterialScanner ()
 

Detailed Description

Definition at line 72 of file ChromosomeParameterisation.hh.

Constructor & Destructor Documentation

ChromosomeParameterisation::ChromosomeParameterisation ( const char *  filename)

Definition at line 53 of file ChromosomeParameterisation.cc.

53  :
55 {
56  ifstream f(filename, ios::in);
57  if (!f)
58  return;
59 
60  fPositions.reserve(100);
61  fRotations.reserve(100);
62 
63  while (!f.eof())
64  {
65  double x, y, z, rot;
66  f >> x >> y >> z >> rot;
67  fPositions.push_back(new G4ThreeVector(x * nanometer,
68  y * nanometer,
69  z * nanometer));
70  fRotations.push_back(new G4RotationMatrix(0, 0, rot * degree));
71  }
72 }
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepRotation G4RotationMatrix
static constexpr double nanometer
Definition: G4SIunits.hh:101
tuple x
Definition: test.py:50
static constexpr double degree
Definition: G4SIunits.hh:144
tuple z
Definition: test.py:28
ChromosomeParameterisation::~ChromosomeParameterisation ( )
virtual

Definition at line 76 of file ChromosomeParameterisation.cc.

77 {
78  unsigned int i;
79  for (i = 0; i < fPositions.size(); i++)
80  delete fPositions[i];
81  for (i = 0; i < fRotations.size(); i++)
82  delete fRotations[i];
83 }

Member Function Documentation

void ChromosomeParameterisation::ComputeDimensions ( G4Tubs rosette,
const G4int  copyNo,
const G4VPhysicalVolume physVol 
) const
virtual

Reimplemented from G4VPVParameterisation.

Definition at line 87 of file ChromosomeParameterisation.cc.

91 {
92 
93 }
void ChromosomeParameterisation::ComputeTransformation ( const G4int  copyNo,
G4VPhysicalVolume physVol 
) const
virtual

Implements G4VPVParameterisation.

Definition at line 97 of file ChromosomeParameterisation.cc.

99 {
100  // see passive vs active method to specify
101  // this transformation
102  physVol->SetTranslation(*fPositions[copyNo]);
103  physVol->SetRotation(fRotations[copyNo]);
104 }
void SetRotation(G4RotationMatrix *)
void SetTranslation(const G4ThreeVector &v)

Here is the call graph for this function:

int ChromosomeParameterisation::GetNumRosettes ( )
inline

Definition at line 78 of file ChromosomeParameterisation.hh.

79  {
80  return fPositions.size();
81  }

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