Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 09:22:21

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 #ifndef HGCALTBMATERIALS_HH
0027 #define HGCALTBMATERIALS_HH
0028 
0029 #include "G4Types.hh"
0030 #include "G4String.hh"
0031 #include "CLHEP/Units/SystemOfUnits.h"
0032 
0033 #include <map>
0034 
0035 class G4Box;
0036 class G4LogicalVolume;
0037 class G4Material;
0038 class G4SubtractionSolid;
0039 
0040 /// Construction of a hexagon solid
0041 /// @param[in] name Name of the solid
0042 /// @param[in] cellThickness Thickness of the hexagon
0043 /// @param[in] cellSideLength Length of a side of the haxagon
0044 /// @return Solid
0045 G4SubtractionSolid *HexagonSolid(G4String name, G4double cellThickness,
0046                                  G4double cellSideLength);
0047 
0048 /// Construction of a logical volume
0049 /// @param[in] name Name of the solid
0050 /// @param[in] cellThickness Thickness of the hexagon
0051 /// @param[in] cellSideLength Length of a side of the haxagon
0052 /// @param[in] material Material
0053 /// @return Logical volume
0054 G4LogicalVolume *HexagonLogical(G4String name, G4double cellThickness,
0055                                 G4double cellSideLength, G4Material *material);
0056 
0057 /**
0058  * @brief HGCal material and elements definitions
0059  *
0060  * Defines materials used for HGCal test-beam.
0061  * Creates logical volumes for every element that may be constructed and placed
0062  * in the test beam.
0063  *
0064  */
0065 
0066 class HGCalTBMaterials {
0067 public:
0068   /// Create HGCal materials
0069   HGCalTBMaterials();
0070   /// Set visualisation attributes
0071   void SetEventDisplayColorScheme();
0072   /// Get length of the beam line (world)
0073   inline G4double GetBeamLineLength() const { return fBeamLineLength; }
0074   /// Get transverse size of the beam line (world)
0075   inline G4double GetBeamLineXY() const { return fBeamLineXY; }
0076   /// Get pointer to the air material
0077   G4Material *GetAir() { return fMatAIR; }
0078   /// Place logical volume
0079   /// @param[in] aName Name of the logical volume
0080   /// @param[in,out] aZ0 Position in front of the logical volume, incremented by
0081   /// half the thickness for placement, and by another half thickness to return
0082   /// the position just behind the placed volume
0083   /// @param[in] aLogicMother Pointer to mother volume for placement
0084   void PlaceItemInLogicalVolume(std::string aName, G4double &aZ0,
0085                                 G4LogicalVolume *aLogicMother);
0086   /// Get logical volume of silicon pixel (cell)
0087   G4LogicalVolume *GetSiPixelLogical() { return this->fSiPixelLogical; }
0088   /// Get logical volume of SiPM
0089   G4LogicalVolume *GetAHCALSiPMlogical() { return this->fAHCALSiPMlogical; }
0090   /// Get any logical volume by name
0091   inline const G4LogicalVolume *GetLogicalVolume(G4String aName) {
0092     return fLogicalVolumeMap[aName];
0093   };
0094   /// Get thickness of logical volume by name
0095   inline G4double GetThickness(std::string aName) {
0096     return fThicknessMap[aName];
0097   };
0098 
0099 private:
0100   /// Define materisals used in HGCal test-beam
0101   void DefineMaterials();
0102   /// Define silicon wafer logical volume from silicon cells/pixels
0103   void DefineSiWaferAndCells();
0104   /// Define logical volumes for HGCal baseplates (CuW, Cu, PCB, Kapton layers)
0105   void DefineHGCalBaseplates();
0106   /// Define logical volumes for HGCal cases (Al, Steel)
0107   void DefineHGCalCases();
0108   /// Define logical volumes for HGCal electromagnetic part absorbers (Pb, Cu,
0109   /// W)
0110   void DefineHGCalEEAbsorbers();
0111   /// Define logical volumes for HGCal hadronic part absorbers (Cu, Fe)
0112   void DefineHGCalFHAbsorbers();
0113   /// Define logical volumes for AHCAL SiPM
0114   void DefineAHCALSiPM();
0115   /// Define logical volumes for AHCAL absorbers
0116   void DefineAHCALAbsorbers();
0117   /// Define logical volumes for beamline elements (MCP, scintillators, DWC)
0118   void DefineBeamLineElements();
0119   /// Length of the beam line
0120   G4double fBeamLineLength = 90 * CLHEP::m;
0121   /// Transverse dimension of the beam line
0122   G4double fBeamLineXY = 4 * CLHEP::m;
0123   /// Rotation angle of silicon hexagon
0124   G4double fAlpha;
0125   /// Side length of silicon cell hexagon
0126   G4double fSiPixelSideLength;
0127   /// Thickness of silicon wafer hexagon
0128   G4double fSiWaferThickness;
0129   /// Side length of silicon wafer haxagon
0130   G4double fSiWaferSideLength;
0131   /// Transverse size of AHCAL SiPM
0132   G4double fAHCALSiPMxy;
0133   /// Box representing AHCAL SiPM
0134   G4Box *fAHCALSiPMsolid;
0135   /// Map of volume name to its thickness
0136   std::map<G4String, G4double> fThicknessMap;
0137   /// Map of volume name to its logical volume
0138   std::map<G4String, G4LogicalVolume *> fLogicalVolumeMap;
0139   /// Map of volume name to counter of placed copies
0140   std::map<G4String, int> fCopyCounterMap;
0141   /// Materials
0142   G4Material *fMatVacuum;
0143   G4Material *fMatAIR;
0144   G4Material *fMatAr;
0145   G4Material *fMatAl;
0146   G4Material *fMatFe;
0147   G4Material *fMatGlass;
0148   G4Material *fMatSteel;
0149   G4Material *fMatPb;
0150   G4Material *fMatCu;
0151   G4Material *fMatW;
0152   G4Material *fMatSi;
0153   G4Material *fMatKAPTON;
0154   G4Material *fMatAu;
0155   G4Material *fMatPCB;
0156   G4Material *fMatQuartz;
0157   G4Material *fMatPolystyrene;
0158   G4Material *fMatCuW;
0159   G4Material *fMatC;
0160   G4Material *fMatH;
0161   G4Material *fMatO;
0162   G4Material *fMatMn;
0163   G4Material *fMatCr;
0164   G4Material *fMatNi;
0165   G4Material *fMatPolyethylene;
0166   G4Material *fMatFreon;
0167   G4Material *fMatScintillator;
0168   G4Material *fMatArCO2;
0169   G4Material *fMatCl;
0170   G4Material *fMatF;
0171 
0172   /// Logical volumes
0173   G4LogicalVolume *fSiPixelLogical;
0174   G4LogicalVolume *fSiWaferLogical;
0175   G4LogicalVolume *fCuWbaseplateLogical;
0176   G4LogicalVolume *fCuWbaseplate550umLogical;
0177   G4LogicalVolume *fCuWbaseplate610umLogical;
0178   G4LogicalVolume *fCuWbaseplate710umLogical;
0179   G4LogicalVolume *fCuBaseplateLogical;
0180   G4LogicalVolume *fCuBaseplate25umLogical;
0181   G4LogicalVolume *fCuBaseplate175umLogical;
0182   G4LogicalVolume *fPCBbaseplateLogical;
0183   G4LogicalVolume *fPCBbaseplateThinLogical;
0184   G4LogicalVolume *fKaptonLayerLogical;
0185   G4LogicalVolume *fAlCaseLogical;
0186   G4LogicalVolume *fAlCaseThickLogical;
0187   G4LogicalVolume *fAlChipLogical;
0188   G4LogicalVolume *fSteelCaseLogical;
0189   G4LogicalVolume *fSteelCaseThickLogical;
0190   G4LogicalVolume *fPbAbsorberEElogical;
0191   G4LogicalVolume *fFeAbsorberEElogical;
0192   G4LogicalVolume *fCuAbsorberEElogical;
0193   G4LogicalVolume *fWabsorberEElogical;
0194   G4LogicalVolume *fW2mmAbsorberEEDESY2018Logical;
0195   G4LogicalVolume *fW4mmAbsorberEEDESY2018Logical;
0196   G4LogicalVolume *fCuAbsorberFHlogical;
0197   G4LogicalVolume *fFeAbsorberFHlogical;
0198   G4LogicalVolume *fAHCALSiPMlogical;
0199   G4LogicalVolume *fAHCALSiPM2x2HUBlogical;
0200   G4LogicalVolume *fAlAbsorberAHCALlogical;
0201   G4LogicalVolume *fPCBAHCALlogical;
0202   G4LogicalVolume *fFeAbsorberAHCALlogical;
0203   G4LogicalVolume *fScintillatorLogical;
0204   G4LogicalVolume *fScintillatorThinLogical;
0205   G4LogicalVolume *fMCPlogical;
0206   G4LogicalVolume *fDWClogical;
0207   G4LogicalVolume *fDWCgasLogical;
0208   G4LogicalVolume *fCK3logical;
0209 };
0210 #endif /* HGCALTBMATERIALS_HH */