| [1035] | 1 | //
|
|---|
| 2 | // ********************************************************************
|
|---|
| 3 | // * License and Disclaimer *
|
|---|
| 4 | // * *
|
|---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of *
|
|---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and *
|
|---|
| 7 | // * conditions of the Geant4 Software License, included in the file *
|
|---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These *
|
|---|
| 9 | // * include a list of copyright holders. *
|
|---|
| 10 | // * *
|
|---|
| 11 | // * Neither the authors of this software system, nor their employing *
|
|---|
| 12 | // * institutes,nor the agencies providing financial support for this *
|
|---|
| 13 | // * work make any representation or warranty, express or implied, *
|
|---|
| 14 | // * regarding this software system or assume any liability for its *
|
|---|
| 15 | // * use. Please see the license in the file LICENSE and URL above *
|
|---|
| 16 | // * for the full disclaimer and the limitation of liability. *
|
|---|
| 17 | // * *
|
|---|
| 18 | // * This code implementation is the result of the scientific and *
|
|---|
| 19 | // * technical work of the GEANT4 collaboration. *
|
|---|
| 20 | // * By using, copying, modifying or distributing the software (or *
|
|---|
| 21 | // * any work based on the software) you agree to acknowledge its *
|
|---|
| 22 | // * use in resulting scientific publications, and indicate your *
|
|---|
| 23 | // * acceptance of all terms of the Geant4 Software license. *
|
|---|
| 24 | // ********************************************************************
|
|---|
| 25 | //
|
|---|
| 26 | //
|
|---|
| 27 | // $Id: G4tgrPlaceDivRep.hh,v 1.5 2008/12/18 12:58:52 gunter Exp $
|
|---|
| 28 | // GEANT4 tag $Name: geant4-09-02-ref-02 $
|
|---|
| 29 | //
|
|---|
| 30 | //
|
|---|
| 31 | // class G4tgrPlaceDivRep
|
|---|
| 32 | //
|
|---|
| 33 | // Class description:
|
|---|
| 34 | //
|
|---|
| 35 | // Class to descripe the position of a G4tgrVolume inside another
|
|---|
| 36 | // G4tgrVolume as a replica, i.e. filling the whole parent volume.
|
|---|
| 37 |
|
|---|
| 38 | // History:
|
|---|
| 39 | // - Created. P.Arce, CIEMAT (November 2007)
|
|---|
| 40 | // -------------------------------------------------------------------------
|
|---|
| 41 |
|
|---|
| 42 | #ifndef G4tgrPlaceDivRep_h
|
|---|
| 43 | #define G4tgrPlaceDivRep_h
|
|---|
| 44 |
|
|---|
| 45 | #include "globals.hh"
|
|---|
| 46 | #include "geomdefs.hh"
|
|---|
| 47 |
|
|---|
| 48 | #include <vector>
|
|---|
| 49 |
|
|---|
| 50 | #include "G4tgrPlace.hh"
|
|---|
| 51 |
|
|---|
| 52 | enum G4DivType { DivByNdiv, DivByWidth, DivByNdivAndWidth };
|
|---|
| 53 |
|
|---|
| 54 | class G4tgrPlaceDivRep : public G4tgrPlace
|
|---|
| 55 | {
|
|---|
| 56 |
|
|---|
| 57 | public: // with description
|
|---|
| 58 |
|
|---|
| 59 | G4tgrPlaceDivRep();
|
|---|
| 60 | ~G4tgrPlaceDivRep();
|
|---|
| 61 |
|
|---|
| 62 | G4tgrPlaceDivRep( const std::vector<G4String>& wl );
|
|---|
| 63 | // Creates an object passing the only data that is fixed
|
|---|
| 64 | // (ndiv, width, offset may be have to be recalculated)
|
|---|
| 65 |
|
|---|
| 66 | EAxis BuildAxis( const G4String& axisName );
|
|---|
| 67 |
|
|---|
| 68 | // Access functions
|
|---|
| 69 |
|
|---|
| 70 | EAxis GetAxis() const { return theAxis; }
|
|---|
| 71 | G4int GetNDiv() const { return theNDiv; }
|
|---|
| 72 | G4double GetWidth() const { return theWidth; }
|
|---|
| 73 | G4double GetOffset() const { return theOffset; }
|
|---|
| 74 | G4DivType GetDivType() const { return theDivType; }
|
|---|
| 75 |
|
|---|
| 76 | void SetParentName(const G4String& parentName) { theParentName=parentName; }
|
|---|
| 77 | void SetNDiv( G4int ndiv ) { theNDiv = ndiv; }
|
|---|
| 78 | void SetWidth( G4double width ) { theWidth = width; }
|
|---|
| 79 | void SetAxis( EAxis axis ) { theAxis = axis; }
|
|---|
| 80 | void SetOffset( G4double offset ) { theOffset = offset; }
|
|---|
| 81 | void SetDivType( G4DivType typ ) { theDivType = typ; }
|
|---|
| 82 |
|
|---|
| 83 | friend std::ostream& operator<<(std::ostream& os,
|
|---|
| 84 | const G4tgrPlaceDivRep& obj);
|
|---|
| 85 | private:
|
|---|
| 86 |
|
|---|
| 87 | G4int theNDiv;
|
|---|
| 88 | G4double theWidth;
|
|---|
| 89 | EAxis theAxis;
|
|---|
| 90 | G4double theOffset;
|
|---|
| 91 | G4DivType theDivType;
|
|---|
| 92 | };
|
|---|
| 93 |
|
|---|
| 94 | #endif
|
|---|