Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:57:51

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 //
0028 // ----------------------
0029 // Class description:
0030 //
0031 // This class tranforms G3 divided volumes to G4 replicated volumes. 
0032 // UpdateVTE() method checks parameters of mother volume
0033 // and in case they are complete the solid that will be replicated 
0034 // is created. In case of division with offset an additinal envelope 
0035 // VTE (G3VolTableEntry instance) is created.
0036 // CreatePVReplica() methods creates the G4PVReplica instance.
0037 
0038 // ----------------------
0039 //
0040 // by I.Hrivnacova, V.Berejnoi, 27 Sep 99
0041 
0042 #ifndef G3DIVISION_HH
0043 #define G3DIVISION_HH 1
0044 
0045 #include "globals.hh"
0046 #include "geomdefs.hh"
0047 
0048 class G3VolTableEntry;
0049 class G4VPhysicalVolume;
0050 class G4LogicalVolume;
0051 
0052 enum G3DivType { kDvn, kDvn2, kDvt, kDvt2 };
0053 
0054 class G3Division 
0055 {
0056   public: // with description
0057 
0058     G3Division(G3DivType type, G3VolTableEntry* vte, G3VolTableEntry* mvte, 
0059                G4int nofDivision, G4int iaxis, G4int nmed, G4double c0, 
0060            G4double step);
0061     G3Division(G3VolTableEntry* vte, G3VolTableEntry* mvte,
0062                const G3Division& division);
0063     virtual ~G3Division();
0064     
0065     // methods
0066     void UpdateVTE();
0067     void CreatePVReplica();   
0068     
0069   private:
0070 
0071     // methods
0072     void SetRangeAndAxis();
0073     void CreateSolid(G4String shape, G4double par[], G4int npar);
0074     G3VolTableEntry* CreateEnvelope(G4String shape, G4double hi, G4double lo, 
0075                        G4double par[], G4int npar);
0076     G3VolTableEntry* Dvn ();
0077     G3VolTableEntry* Dvn2();
0078     G3VolTableEntry* Dvt ();
0079     G3VolTableEntry* Dvt2();
0080     void Exception(G4String where, G4String what);
0081     
0082     // data members 
0083     G3DivType         fType;
0084     G3VolTableEntry*  fVTE;    
0085     G3VolTableEntry*  fMVTE;    
0086     G4int             fNofDivisions;  // ndiv/ndvmx    
0087     G4int             fIAxis;
0088     G4int             fNmed;
0089     G4double          fC0;
0090     G4double          fStep;
0091     G4double          fLowRange;  
0092     G4double          fHighRange;
0093     G4double          fWidth;
0094     G4double          fOffset;
0095     EAxis             fAxis;
0096 };
0097 
0098 #endif //G3_DIVISION_H