Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:10

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 // G4tgrPlaceDivRep
0027 //
0028 // Class description:
0029 //
0030 // Class to descripe the position of a G4tgrVolume inside another
0031 // G4tgrVolume as a replica, i.e. filling the whole parent volume.
0032 
0033 // Author: P.Arce, CIEMAT (November 2007)
0034 // --------------------------------------------------------------------
0035 #ifndef G4tgrPlaceDivRep_hh
0036 #define G4tgrPlaceDivRep_hh 1
0037 
0038 #include <vector>
0039 
0040 #include "globals.hh"
0041 #include "geomdefs.hh"
0042 #include "G4tgrPlace.hh"
0043 
0044 enum G4DivType
0045 {
0046   DivByNdiv,
0047   DivByWidth,
0048   DivByNdivAndWidth
0049 };
0050 
0051 class G4tgrPlaceDivRep : public G4tgrPlace
0052 {
0053   public:
0054 
0055     G4tgrPlaceDivRep();
0056     ~G4tgrPlaceDivRep();
0057 
0058     G4tgrPlaceDivRep(const std::vector<G4String>& wl);
0059       // Creates an object passing the only data that is fixed
0060       // (ndiv, width, offset may be have to be recalculated)
0061 
0062     EAxis BuildAxis(const G4String& axisName);
0063 
0064     // Access functions
0065 
0066     EAxis GetAxis() const { return theAxis; }
0067     G4int GetNDiv() const { return theNDiv; }
0068     G4double GetWidth() const { return theWidth; }
0069     G4double GetOffset() const { return theOffset; }
0070     G4DivType GetDivType() const { return theDivType; }
0071 
0072     void SetParentName(const G4String& parentName) { theParentName=parentName; }
0073     void SetNDiv(G4int ndiv) { theNDiv = ndiv; }
0074     void SetWidth(G4double width) { theWidth = width; }
0075     void SetAxis(EAxis axis) { theAxis = axis; }
0076     void SetOffset(G4double offset) { theOffset = offset; }
0077     void SetDivType(G4DivType typ) { theDivType = typ; }
0078 
0079     friend std::ostream& operator<<(std::ostream& os,
0080                                     const G4tgrPlaceDivRep& obj);
0081 
0082   private:
0083 
0084     G4int theNDiv = 0;
0085     G4double theWidth = 0.0;
0086     EAxis theAxis = kUndefined;
0087     G4double theOffset = 0.0;
0088     G4DivType theDivType = DivByNdivAndWidth;
0089 };
0090 
0091 #endif