Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:22:14

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 /// \file medical/electronScattering2/include/ElectronBenchmarkDetector.hh
0028 /// \brief Definition of the ElectronBenchmarkDetector class
0029 
0030 #ifndef ElectronBenchmarkDetector_h
0031 #define ElectronBenchmarkDetector_h 1
0032 
0033 #include "G4Cache.hh"
0034 #include "G4ThreeVector.hh"
0035 #include "G4VUserDetectorConstruction.hh"
0036 #include "globals.hh"
0037 
0038 class G4LogicalVolume;
0039 class G4VPhysicalVolume;
0040 class G4Tubs;
0041 class G4MultiFunctionalDetector;
0042 class G4Material;
0043 class G4VisAttributes;
0044 class ElectronBenchmarkDetectorMessenger;
0045 
0046 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0047 
0048 class ElectronBenchmarkDetector : public G4VUserDetectorConstruction
0049 {
0050   public:
0051     ElectronBenchmarkDetector();
0052     ~ElectronBenchmarkDetector() override;
0053 
0054     G4VPhysicalVolume* Construct() override;
0055 
0056     // Sensitive Detector
0057     void ConstructSDandField() override;
0058 
0059     // Material Definition
0060     void DefineMaterials();
0061 
0062     // Geometry Definition
0063     G4VPhysicalVolume* CreateWorld();
0064     void CreateExitWindow(G4LogicalVolume* logicWorld);
0065     void CreatePrimaryFoil(G4LogicalVolume* logicWorld);
0066     void CreateMonitor(G4LogicalVolume* logicWorld);
0067     void CreateHeliumBag(G4LogicalVolume* logicWorld);
0068     void CreateScorer(G4LogicalVolume* logicWorld);
0069     G4VPhysicalVolume* CreateGeometry();
0070 
0071     // Command Interface
0072     void SetPrimFoilMaterial(const G4String& matname);
0073     void SetPrimFoilThickness(G4double thicknessPrimFoil);
0074 
0075   private:
0076     // Exit Window.
0077     G4double fPosWindow0;
0078     G4double fPosWindow1;
0079 
0080     // Primary Foil
0081     G4Material* fMaterialPrimFoil = nullptr;
0082     G4double fHalfThicknessPrimFoil;
0083     G4double fPosPrimFoil;
0084     G4LogicalVolume* fLogPrimFoil = nullptr;
0085     G4Tubs* fSolidPrimFoil;
0086 
0087     // Monitor Chambers
0088     G4double fPosMon0;
0089     G4double fPosMon1;
0090 
0091     // Helium Bag
0092     G4double fPosBag0;
0093     G4double fPosBag1;
0094     G4double fPosHelium0;
0095     G4double fPosHelium1;
0096     G4double fThicknessRing;
0097 
0098     // Scoring Plane
0099     G4double fPosScorer;
0100     G4double fThicknessScorer;
0101     G4double fWidthScorerRing;
0102     G4LogicalVolume* fScorerRingLog = nullptr;
0103 
0104     // Radii
0105     G4double fRadOverall;
0106     G4double fRadRingInner;
0107 
0108     // Extra space remaining in world volume around apparatus
0109     G4double fPosDelta;
0110     G4double fRadDelta;
0111 
0112     // World volume
0113     G4LogicalVolume* fLogWorld = nullptr;
0114     G4VPhysicalVolume* fPhysiWorld = nullptr;
0115 
0116     // SensitiveDetector
0117     // G4Cache mechanism is necessary for multi-threaded operation
0118     // as it allows us to store separate detector pointer per thread
0119     const G4Cache<G4MultiFunctionalDetector*> fSensitiveDetectorCache;
0120 
0121     // Messenger
0122     ElectronBenchmarkDetectorMessenger* fMessenger = nullptr;
0123 
0124     // Visualization Attributes
0125     G4VisAttributes* fWorldVisAtt = nullptr;
0126     G4VisAttributes* fWindowVisAtt = nullptr;
0127     G4VisAttributes* fPrimFoilVisAtt = nullptr;
0128     G4VisAttributes* fMonVisAtt = nullptr;
0129     G4VisAttributes* fBagVisAtt = nullptr;
0130     G4VisAttributes* fHeliumVisAtt = nullptr;
0131     G4VisAttributes* fRingVisAtt = nullptr;
0132     G4VisAttributes* fScorerVisAtt = nullptr;
0133 };
0134 
0135 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0136 
0137 #endif