File indexing completed on 2025-02-23 09:21:57
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 #ifndef MOLECULAR_CYLINDRICAL_CHROMOSOME_HH
0030 #define MOLECULAR_CYLINDRICAL_CHROMOSOME_HH
0031
0032 #include "VirtualChromosome.hh"
0033
0034 #include "G4RotationMatrix.hh"
0035 #include "G4ThreeVector.hh"
0036 #include "globals.hh"
0037
0038
0039
0040 class CylindricalChromosome : public VirtualChromosome
0041 {
0042 public:
0043 CylindricalChromosome(const G4String&, const G4ThreeVector&, const G4double&, const G4double&);
0044
0045 CylindricalChromosome(const G4String& name, const G4ThreeVector& pos, const G4double& radius,
0046 const G4double& height, const G4RotationMatrix& rot);
0047
0048 ~CylindricalChromosome() override = default;
0049
0050 G4ThreeVector RandomPointInChromosome() override;
0051
0052 bool PointInChromosome(G4ThreeVector const& position) override;
0053
0054 G4String GetShape() override { return fShape; };
0055 static const G4String fShape;
0056
0057 void Print() override
0058 {
0059 G4cout << "type: " << fShape << G4endl;
0060 G4cout << "radius: " << fRadius << G4endl;
0061 G4cout << "height: " << fHeight << G4endl;
0062 G4cout << "center: " << fCenter << G4endl;
0063 G4cout << "rotation: " << fRotation.getPhi() << " " << fRotation.getTheta() << " "
0064 << fRotation.getPhi() << G4endl;
0065 }
0066
0067 void SetRotation(G4RotationMatrix rot)
0068 {
0069 fRotation = rot;
0070 fInverseRotation = fRotation.inverse();
0071 };
0072
0073 G4RotationMatrix GetRotation() const { return fRotation; };
0074
0075 G4ThreeVector GetPosition() const { return fCenter; };
0076
0077 G4double GetRadius() const { return fRadius; };
0078
0079 G4double GetHeight() const { return fHeight; };
0080
0081 protected:
0082 private:
0083 G4ThreeVector fCenter;
0084 G4double fRadius;
0085 G4double fHeight;
0086 G4RotationMatrix fRotation, fInverseRotation;
0087 };
0088
0089
0090
0091 #endif