Back to home page

EIC code displayed by LXR

 
 

    


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

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 // G4VPVDivisionFactory
0027 //
0028 // Class description:
0029 //
0030 // Abstract factory that defines interfaces for creating 
0031 // volumes divisions. 
0032 
0033 // Author: Ivana Hrivnacova, 4.5.2004
0034 // ------------------------------------------------------------------------
0035 #ifndef G4VPVDIVISIONFACTORY_HH
0036 #define G4VPVDIVISIONFACTORY_HH 1
0037 
0038 #include "geomdefs.hh"
0039 
0040 class G4LogicalVolume;
0041 class G4VPhysicalVolume;
0042 class G4VPVParameterisation;
0043 
0044 class G4VPVDivisionFactory
0045 {
0046   public:
0047 
0048     virtual ~G4VPVDivisionFactory() = default;
0049     
0050     static  G4VPVDivisionFactory* Instance();
0051     
0052     virtual G4VPhysicalVolume* CreatePVDivision(
0053                              const G4String& pName,
0054                                    G4LogicalVolume* pLogical,
0055                                    G4LogicalVolume* pMother,
0056                              const EAxis pAxis,
0057                              const G4int nReplicas,
0058                              const G4double width,
0059                              const G4double offset ) = 0;
0060       // Create division - with number of divisions and width.
0061 
0062     virtual G4VPhysicalVolume* CreatePVDivision(
0063                              const G4String& pName,
0064                                    G4LogicalVolume* pLogical,
0065                                    G4LogicalVolume* pMotherLogical,
0066                              const EAxis pAxis,
0067                              const G4int nReplicas,
0068                              const G4double offset ) = 0;
0069       // Create division - with number of divisions.
0070 
0071     virtual G4VPhysicalVolume* CreatePVDivision(
0072                              const G4String& pName,
0073                                    G4LogicalVolume* pLogical,
0074                                    G4LogicalVolume* pMotherLogical,
0075                              const EAxis pAxis,
0076                              const G4double width,
0077                              const G4double offset ) = 0;
0078       // Create division - with width.
0079 
0080     virtual G4VPhysicalVolume* CreatePVDivision(
0081                              const G4String& pName,
0082                                    G4LogicalVolume* pLogical,
0083                                    G4LogicalVolume* pMotherLogical,
0084                              const G4VPVParameterisation* param) = 0;
0085       // Create division - with parameterisation.
0086 
0087     virtual G4bool IsPVDivision(const G4VPhysicalVolume* pv) const = 0;
0088       // Returns true if pv is division.
0089 
0090   protected:
0091 
0092     G4VPVDivisionFactory() = default;
0093 
0094   protected:
0095 
0096     static G4ThreadLocal G4VPVDivisionFactory* fgInstance;
0097 };
0098 
0099 #endif