Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /geant4/examples/advanced/purging_magnet/include/PurgMagDetectorConstruction.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 // Code developed by:
0027 //  S.Larsson
0028 //
0029 //    *****************************************
0030 //    *                                       *
0031 //    *    PurgMagDetectorConstruction.hh     *
0032 //    *                                       *
0033 //    *****************************************
0034 //
0035 //
0036 
0037 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0038 
0039 #ifndef PurgMagDetectorConstruction_h
0040 #define PurgMagDetectorConstruction_h 1
0041 
0042 #include "G4VUserDetectorConstruction.hh"
0043 #include "globals.hh"
0044 #include "G4ThreeVector.hh"
0045 #include "G4RotationMatrix.hh"
0046 #include "G4Cache.hh"
0047 #include "G4MagneticField.hh"
0048 
0049 
0050 class G4Box;
0051 class G4Trd;
0052 class G4LogicalVolume;
0053 class G4VPhysicalVolume;
0054 class G4Material;
0055 class G4UniformMagField;
0056 class PurgMagTabulatedField3D;
0057 
0058 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0059 
0060 class PurgMagDetectorConstruction : public G4VUserDetectorConstruction
0061 {
0062 public:
0063   PurgMagDetectorConstruction();
0064   ~PurgMagDetectorConstruction();
0065 
0066 public:  
0067      
0068   G4VPhysicalVolume* Construct();
0069   void ConstructSDandField();
0070      
0071 public:
0072 
0073   void PrintDetectorParameters();
0074                     
0075   G4double GetWorldSizeXY()  const       {return WorldSizeXY;};
0076   G4double GetWorldSizeZ() const          {return WorldSizeZ;}; 
0077 
0078   G4double GetMeasureVolumeSizeXY() const {return MeasureVolumeSizeXY;}; 
0079   G4double GetMeasureVolumeSizeZ() const  {return MeasureVolumeSizeZ;};
0080 
0081   G4double GetGapSizeX1()            {return GapSizeX1;}; 
0082   G4double GetGapSizeX2()            {return GapSizeX2;}; 
0083   G4double GetGapSizeY1()            {return GapSizeY1;}; 
0084   G4double GetGapSizeY2()            {return GapSizeY2;}; 
0085   G4double GetGapSizeZ()             {return GapSizeZ;};
0086 
0087   G4Material* GetWorldMaterial()         {return WorldMaterial;};
0088   G4Material* GetGapMaterial()           {return GapMaterial;};
0089   
0090   const G4VPhysicalVolume* GetWorld() const          {return physiWorld;};           
0091   const G4VPhysicalVolume* GetMeasureVolume() const  {return physiMeasureVolume;};           
0092   const G4VPhysicalVolume* GetGap1() const           {return physiGap1;};
0093   const G4VPhysicalVolume* GetGap2() const      {return physiGap2;};
0094 
0095 private:
0096    
0097 
0098 
0099   G4double           WorldSizeXY;
0100   G4double           WorldSizeZ;
0101 
0102   G4double           MeasureVolumeSizeXY;
0103   G4double           MeasureVolumeSizeZ;
0104   G4double           MeasureVolumePosition;
0105 
0106   G4double           GapSizeX1;
0107   G4double           GapSizeX2;
0108   G4double           GapSizeY1;
0109   G4double           GapSizeY2;
0110   G4double           GapSizeZ;
0111   G4double           Gap1PosX; 
0112   G4double           Gap1PosY; 
0113   G4double           Gap1PosZ; 
0114   G4double           Gap2PosX; 
0115   G4double           Gap2PosY; 
0116   G4double           Gap2PosZ; 
0117 
0118   G4double           SSD;
0119   G4double           zOffset;
0120 
0121   G4VPhysicalVolume* physiWorld;
0122   G4LogicalVolume*   logicWorld;  
0123   G4Box*             solidWorld;
0124   
0125 
0126   G4VPhysicalVolume* physiGap1;
0127   G4LogicalVolume*   logicGap1;
0128   G4Trd*             solidGap1;
0129 
0130 
0131   G4VPhysicalVolume* physiGap2;
0132   G4LogicalVolume*   logicGap2;
0133   G4Trd*             solidGap2;
0134 
0135   G4VPhysicalVolume* physiMeasureVolume;
0136   G4LogicalVolume*   logicMeasureVolume;
0137   G4Box*             solidMeasureVolume;
0138 
0139   G4Material*        WorldMaterial;
0140   G4Material*        GapMaterial;
0141 
0142   G4Cache<G4MagneticField*> fField;  //pointer to the thread-local fields
0143 
0144 private:
0145   
0146 
0147 
0148   void DefineMaterials();
0149   G4VPhysicalVolume* ConstructCalorimeter();     
0150 };
0151 
0152 
0153 #endif
0154 
0155