Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /geant4/examples/advanced/dna/moleculardna/include/BoxChromosome.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 /// file: BoxChromosome.hh
0028 /// brief: declaration file for a Box chromosome model.
0029 
0030 #ifndef MOLECULAR_BOX_CHROMOSOME_HH
0031 #define MOLECULAR_BOX_CHROMOSOME_HH
0032 
0033 #include "VirtualChromosome.hh"
0034 
0035 #include "G4RotationMatrix.hh"
0036 #include "G4ThreeVector.hh"
0037 #include "globals.hh"
0038 
0039 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0040 
0041 class BoxChromosome : public VirtualChromosome
0042 {
0043   public:
0044     BoxChromosome(const G4String&, G4ThreeVector, const G4double&, const G4double&,
0045                   const G4double&);
0046 
0047     BoxChromosome(const G4String&, G4ThreeVector, const G4double&, const G4double&, const G4double&,
0048                   G4RotationMatrix);
0049 
0050     ~BoxChromosome() override;
0051 
0052     G4bool PointInChromosome(G4ThreeVector const& position) override;
0053 
0054     G4ThreeVector RandomPointInChromosome() override;
0055 
0056     G4String GetShape() override { return fShape; };
0057 
0058     static const G4String fShape;
0059 
0060     void Print() override
0061     {
0062       G4cout << "type: " << fShape << G4endl;
0063       G4cout << "x: " << fXdim << G4endl;
0064       G4cout << "y: " << fYdim << G4endl;
0065       G4cout << "z: " << fZdim << G4endl;
0066       G4cout << "center: " << fCenter << G4endl;
0067       G4cout << "rotation: " << fRotation.getPhi() << " " << fRotation.getTheta() << " "
0068              << fRotation.getPhi() << G4endl;
0069     }
0070 
0071     inline void SetRotation(const G4RotationMatrix& rot)
0072     {
0073       fRotation = rot;
0074       fInverseRotation = fRotation.inverse();
0075     };
0076 
0077     inline G4RotationMatrix GetRotation() const { return fRotation; };
0078 
0079     inline G4ThreeVector GetPosition() const { return fCenter; };
0080 
0081     inline G4double GetXDim() const { return fXdim; };
0082     inline G4double GetYDim() const { return fYdim; };
0083     inline G4double GetZDim() const { return fZdim; };
0084 
0085   private:
0086     G4ThreeVector fCenter;
0087     G4double fXdim;
0088     G4double fYdim;
0089     G4double fZdim;
0090     G4RotationMatrix fRotation, fInverseRotation;
0091 };
0092 
0093 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0094 
0095 #endif  // MOLECULAR_BOX_CHROMOSOME_HH