Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-27 07:33:54

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