Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-25 07:41:20

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 /// \file DetectorConstruction.hh
0027 /// \brief Definition of the DetectorConstruction class
0028 
0029 /////////////////////////////////////////////////////////////////////////
0030 //
0031 // TestEm9: Crystal calorimetry
0032 //
0033 // Created: 31.01.03 V.Ivanchenko
0034 //
0035 // Modified:
0036 //
0037 ////////////////////////////////////////////////////////////////////////
0038 //
0039 
0040 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0041 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0042 
0043 #ifndef DetectorConstruction_h
0044 #define DetectorConstruction_h 1
0045 
0046 #include "G4Material.hh"
0047 #include "G4ThreeVector.hh"
0048 #include "G4VPhysicalVolume.hh"
0049 #include "G4VUserDetectorConstruction.hh"
0050 #include "globals.hh"
0051 
0052 class G4Tubs;
0053 class G4LogicalVolume;
0054 class G4UniformMagField;
0055 class DetectorMessenger;
0056 class G4Region;
0057 class G4ProductionCuts;
0058 
0059 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0060 
0061 class DetectorConstruction : public G4VUserDetectorConstruction
0062 {
0063   public:
0064     DetectorConstruction();
0065     virtual ~DetectorConstruction();
0066 
0067     virtual G4VPhysicalVolume* Construct();
0068 
0069     void SetEcalMaterial(const G4String&);
0070     void SetAbsMaterial(const G4String&);
0071     void SetEcalLength(G4double val);
0072     void SetEcalWidth(G4double val);
0073     void SetVertexLength(G4double val);
0074     void SetPadLength(G4double val);
0075     void SetPadWidth(G4double val);
0076     void SetAbsLength(G4double val);
0077 
0078     void UpdateGeometry();
0079 
0080     inline G4double GetWorldSizeZ() { return fWorldZ; }
0081 
0082   private:
0083     void DefineMaterials();
0084     G4VPhysicalVolume* ConstructVolumes();
0085 
0086     DetectorConstruction& operator=(const DetectorConstruction& right);
0087     DetectorConstruction(const DetectorConstruction&);
0088 
0089     G4double fEcalLength;
0090     G4double fEcalWidth;
0091     G4double fVertexLength;
0092     G4double fPadLength;
0093     G4double fPadWidth;
0094     G4double fAbsLength;
0095     G4double fWorldZ;
0096 
0097     G4Material* fCalMaterial;
0098     G4Material* fVertMaterial;
0099     G4Material* fAbsMaterial;
0100     G4Material* fWorldMaterial;
0101     G4Material* fYorkMaterial;
0102 
0103     G4LogicalVolume* fLogicWorld;
0104     G4LogicalVolume* fLogicCal;
0105     G4LogicalVolume* fLogicA1;
0106     G4LogicalVolume* fLogicA2;
0107     G4LogicalVolume* fLogicA3;
0108     G4LogicalVolume* fLogicA4;
0109 
0110     G4Region* fVertexRegion;
0111     G4Region* fMuonRegion;
0112 
0113     G4ProductionCuts* fVertexDetectorCuts;
0114     G4ProductionCuts* fMuonDetectorCuts;
0115 
0116     DetectorMessenger* fDetectorMessenger;  // pointer to the Messenger
0117 };
0118 
0119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
0120 
0121 #endif