Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4tgbPlaceParamLinear Class Reference

#include <G4tgbPlaceParamLinear.hh>

Inheritance diagram for G4tgbPlaceParamLinear:
Collaboration diagram for G4tgbPlaceParamLinear:

Public Member Functions

 G4tgbPlaceParamLinear (G4tgrPlaceParameterisation *)
 
 ~G4tgbPlaceParamLinear ()
 
void ComputeTransformation (const G4int copyNo, G4VPhysicalVolume *physVol) const
 
- Public Member Functions inherited from G4tgbPlaceParameterisation
 G4tgbPlaceParameterisation (G4tgrPlaceParameterisation *tgrParam)
 
virtual ~G4tgbPlaceParameterisation ()
 
void CheckNExtraData (G4tgrPlaceParameterisation *tgrParam, G4int nWcheck, WLSIZEtype st, const G4String &methodName)
 
G4int GetNCopies () const
 
EAxis GetAxis () 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 ()
 
virtual void ComputeDimensions (G4Box &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Tubs &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Trd &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Trap &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Cons &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Sphere &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Orb &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Ellipsoid &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Torus &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Para &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Polycone &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Polyhedra &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Hype &, const G4int, const G4VPhysicalVolume *) const
 

Additional Inherited Members

- Protected Attributes inherited from G4tgbPlaceParameterisation
G4int theNCopies
 
EAxis theAxis
 
G4ThreeVector theTranslation
 
G4RotationMatrixtheRotationMatrix
 

Detailed Description

Definition at line 51 of file G4tgbPlaceParamLinear.hh.

Constructor & Destructor Documentation

G4tgbPlaceParamLinear::G4tgbPlaceParamLinear ( G4tgrPlaceParameterisation tgrParam)

Definition at line 50 of file G4tgbPlaceParamLinear.cc.

51  : G4tgbPlaceParameterisation(tgrParam)
52 {
53  //---- Get translation and rotation
54  if( tgrParam->GetParamType() == "LINEAR" )
55  {
56  CheckNExtraData( tgrParam, 6, WLSIZE_EQ, "G4tgbPlaceParamLinear:");
57  theDirection = G4ThreeVector( tgrParam->GetExtraData()[3],
58  tgrParam->GetExtraData()[4],
59  tgrParam->GetExtraData()[5] );
60  theAxis = kZAxis;
61  }
62  else
63  {
64  CheckNExtraData( tgrParam, 3, WLSIZE_EQ, "G4tgbPlaceParamLinear:");
65  if( tgrParam->GetParamType() == "LINEAR_X" ) {
66  theDirection = G4ThreeVector(1.,0.,0.);
67  theAxis = kXAxis;
68  } else if( tgrParam->GetParamType() == "LINEAR_Y" ) {
69  theDirection = G4ThreeVector(0.,1.,0.);
70  theAxis = kYAxis;
71  } else if( tgrParam->GetParamType() == "LINEAR_Z" ) {
72  theDirection = G4ThreeVector(0.,0.,1.);
73  theAxis = kZAxis;
74  }
75  }
76 
77  if( theDirection.mag() == 0. )
78  {
79  G4Exception("G4tgbPlaceParamLinear::G4tgbPlaceParamLinear()",
80  "InvalidSetup", FatalException, "Direction is zero !");
81  }
82  else
83  {
84  theDirection /= theDirection.mag();
85  }
86 
87  theNCopies = G4int(tgrParam->GetExtraData()[0]);
88  theStep = tgrParam->GetExtraData()[1];
89  theOffset = tgrParam->GetExtraData()[2];
90 
91  theTranslation = G4ThreeVector(0.,0.,0.)+theOffset*theDirection;
92 
93 #ifdef G4VERBOSE
95  {
96  G4cout << " G4tgbPlaceParamLinear::G4tgbPlaceParamLinear(): "
97  << " param type " << tgrParam->GetParamType() << G4endl
98  << " N copies " << theNCopies << G4endl
99  << " step " << theStep << G4endl
100  << " offset " << theOffset << G4endl
101  << " translation " << theTranslation << G4endl
102  << " direction " << theDirection << G4endl
103  << " axis " << theAxis << G4endl;
104  }
105 #endif
106 }
void CheckNExtraData(G4tgrPlaceParameterisation *tgrParam, G4int nWcheck, WLSIZEtype st, const G4String &methodName)
CLHEP::Hep3Vector G4ThreeVector
int G4int
Definition: G4Types.hh:78
std::vector< G4double > GetExtraData() const
G4tgbPlaceParameterisation(G4tgrPlaceParameterisation *tgrParam)
G4GLOB_DLL std::ostream G4cout
static G4int GetVerboseLevel()
const G4String & GetParamType() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
double mag() const

Here is the call graph for this function:

G4tgbPlaceParamLinear::~G4tgbPlaceParamLinear ( )

Definition at line 43 of file G4tgbPlaceParamLinear.cc.

44 {
45 }

Member Function Documentation

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

Reimplemented from G4tgbPlaceParameterisation.

Definition at line 111 of file G4tgbPlaceParamLinear.cc.

112 {
113  G4ThreeVector origin = theTranslation + copyNo*theStep*theDirection;
114 
115 #ifdef G4VERBOSE
117  {
118  G4cout << " G4tgbPlaceParamLinear::ComputeTransformation() -"
119  << physVol->GetName() << G4endl
120  << " copyNo " << copyNo << " pos " << origin << G4endl;
121  }
122 #endif
123  //----- Set traslation and rotation
124  physVol->SetTranslation(origin);
125  physVol->SetCopyNo( copyNo );
126  physVol->SetRotation( theRotationMatrix );
127 }
void SetRotation(G4RotationMatrix *)
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
static G4int GetVerboseLevel()
virtual void SetCopyNo(G4int CopyNo)=0
void SetTranslation(const G4ThreeVector &v)
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:


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