G4GDMLParameterisation.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 //
00030 // class G4GDMLParameterisation
00031 //
00032 // Class description:
00033 //
00034 // GDML class for interpretation of parameterisations.
00035 
00036 // History:
00037 // - Created.                                  Zoltan Torzsok, November 2007
00038 // -------------------------------------------------------------------------
00039 
00040 #ifndef _G4GDMLPARAMETERISATION_INCLUDED_
00041 #define _G4GDMLPARAMETERISATION_INCLUDED_
00042 
00043 #include "G4VPVParameterisation.hh"
00044 #include "G4VPhysicalVolume.hh"
00045 #include "G4ThreeVector.hh"
00046 #include "G4Box.hh"
00047 #include "G4Trd.hh"
00048 #include "G4Trap.hh"
00049 #include "G4Cons.hh"
00050 #include "G4Sphere.hh"
00051 #include "G4Orb.hh"
00052 #include "G4Torus.hh"
00053 #include "G4Para.hh"
00054 #include "G4Hype.hh"
00055 #include "G4Tubs.hh"
00056 #include "G4Polycone.hh"
00057 #include "G4Polyhedra.hh"
00058 #include "G4RotationMatrix.hh"
00059 #include "G4ThreeVector.hh"
00060 
00061 #include <vector>
00062 
00063 class G4GDMLParameterisation : public G4VPVParameterisation
00064 {
00065 
00066  public:
00067 
00068    struct PARAMETER
00069    {
00070       G4RotationMatrix* pRot;
00071       G4ThreeVector position;
00072       G4double dimension[16];
00073 
00074       PARAMETER() : pRot(0) { memset(dimension,0,sizeof(dimension)); }
00075    };
00076 
00077    G4int GetSize() const;
00078    void  AddParameter(const PARAMETER&);
00079 
00080  private:
00081 
00082    void ComputeTransformation(const G4int,G4VPhysicalVolume*) const;
00083    void ComputeDimensions(G4Box&,const G4int,const G4VPhysicalVolume*) const;
00084    void ComputeDimensions(G4Trd&,const G4int,const G4VPhysicalVolume*) const;
00085    void ComputeDimensions(G4Trap&,const G4int,const G4VPhysicalVolume*) const;
00086    void ComputeDimensions(G4Cons&,const G4int,const G4VPhysicalVolume*) const;
00087    void ComputeDimensions(G4Sphere&,const G4int,const G4VPhysicalVolume*) const;
00088    void ComputeDimensions(G4Orb&,const G4int,const G4VPhysicalVolume*) const;
00089    void ComputeDimensions(G4Torus&,const G4int,const G4VPhysicalVolume*) const;
00090    void ComputeDimensions(G4Para&,const G4int,const G4VPhysicalVolume*) const;
00091    void ComputeDimensions(G4Hype&,const G4int,const G4VPhysicalVolume*) const;
00092    void ComputeDimensions(G4Tubs&,const G4int,const G4VPhysicalVolume*) const;
00093    void ComputeDimensions(G4Polycone&,const G4int,const G4VPhysicalVolume*) const;
00094    void ComputeDimensions(G4Polyhedra&,const G4int,const G4VPhysicalVolume*) const;
00095 
00096  private:
00097 
00098    std::vector<PARAMETER> parameterList;
00099 
00100 };
00101 
00102 #endif

Generated on Mon May 27 17:48:19 2013 for Geant4 by  doxygen 1.4.7