File indexing completed on 2025-02-23 09:21:58
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 #ifndef MOLECULAR_ROD_CHROMOSOME_HH
0031 #define MOLECULAR_ROD_CHROMOSOME_HH
0032
0033 #include "VirtualChromosome.hh"
0034
0035 #include "G4RotationMatrix.hh"
0036 #include "G4ThreeVector.hh"
0037 #include "globals.hh"
0038
0039
0040
0041 class RodChromosome : public VirtualChromosome
0042 {
0043 public:
0044 explicit RodChromosome(const G4String&, const G4ThreeVector&, const G4double&, const G4double&);
0045
0046 explicit RodChromosome(const G4String&, const G4ThreeVector&, const G4double&, const G4double&,
0047 const G4RotationMatrix&);
0048
0049 ~RodChromosome() override;
0050
0051 bool PointInChromosome(G4ThreeVector const& position) override;
0052
0053 G4ThreeVector RandomPointInChromosome() override;
0054
0055 G4String GetShape() override { return fShape; };
0056 static const G4String fShape;
0057
0058 void Print() override
0059 {
0060 G4cout << "type: " << fShape << G4endl;
0061 G4cout << "radius: " << fRadius << G4endl;
0062 G4cout << "height: " << fHeight << G4endl;
0063 G4cout << "center: " << fCenter << G4endl;
0064 G4cout << "rotation: " << fRotation.getPhi() << " " << fRotation.getTheta() << " "
0065 << fRotation.getPhi() << G4endl;
0066 }
0067
0068 void SetRotation(const G4RotationMatrix& rot)
0069 {
0070 fRotation = rot;
0071 fInverseRotation = fRotation.inverse();
0072 };
0073
0074 G4RotationMatrix GetRotation() const { return fRotation; };
0075
0076 G4ThreeVector GetPosition() const { return fCenter; };
0077
0078 G4double GetRadius() const { return fRadius; };
0079
0080 G4double GetHeight() const { return fHeight; };
0081
0082 protected:
0083 private:
0084 G4ThreeVector fCenter;
0085 G4double fRadius;
0086 G4double fHeight;
0087 G4RotationMatrix fRotation, fInverseRotation;
0088 };
0089
0090
0091
0092 #endif