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 #include "DetectorConstruction0.hh"
0027 #include "CLHEP/Units/SystemOfUnits.h"
0028 
0029 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0030 
0031 void add_EE(G4int aEEid, std::vector<std::pair<G4String, G4double>> &aDzMap,
0032             G4double aAirBefore, G4double aAirMid) {
0033   aDzMap.push_back(std::make_pair("Fe_absorber_EE",
0034                                   aAirBefore)); // aAirBefore AIR + 0.3 mm Fe
0035   aDzMap.push_back(std::make_pair("Pb_absorber_EE", 0)); // 0 + 4.9mm Pb
0036   aDzMap.push_back(std::make_pair("Fe_absorber_EE", 0)); // 0 + 0.3 mm Fe
0037   aDzMap.push_back(std::make_pair("PCB", aAirMid));      // aAirMid AIR +1.3mm
0038   aDzMap.push_back(std::make_pair("Cu_baseplate_175um", 0.)); // 0 + 0.175mm Cu
0039   aDzMap.push_back(std::make_pair("Si_wafer", 0.));           // 0.3 mm
0040   aDzMap.push_back(std::make_pair("Cu_baseplate_25um", 0.));  //  0 + 0.025mm Cu
0041   aDzMap.push_back(std::make_pair("Kapton_layer", 0.));       // 0.075 mm
0042   if (aEEid == 11 || aEEid == 12)
0043     aDzMap.push_back(std::make_pair("Cu_baseplate", 0.)); // 1.2 mm
0044   aDzMap.push_back(std::make_pair("CuW_baseplate", 0.));  // 1.2 mm
0045   if (aEEid == 13)
0046     aDzMap.push_back(std::make_pair("CuW_baseplate_550um", 0.)); // 0.55 mm
0047   if (aEEid == 14)
0048     aDzMap.push_back(std::make_pair("CuW_baseplate_610um", 0.)); // 0.61 mm
0049   aDzMap.push_back(std::make_pair("Cu_absorber_EE", 0.));        // 6 mm
0050   if (aEEid == 13)
0051     aDzMap.push_back(std::make_pair("CuW_baseplate_610um", 0.)); // 0.61 mm
0052   if (aEEid == 14)
0053     aDzMap.push_back(std::make_pair("CuW_baseplate_710um", 0.)); // 0.71 mm
0054   aDzMap.push_back(std::make_pair("CuW_baseplate", 0.));         // 1.2 mm
0055   if (aEEid == 11 || aEEid == 12)
0056     aDzMap.push_back(std::make_pair("Cu_baseplate", 0.));     // 1.2 mm
0057   aDzMap.push_back(std::make_pair("Kapton_layer", 0.));       // 0.075 mm
0058   aDzMap.push_back(std::make_pair("Cu_baseplate_25um", 0.));  //  0 + 0.025mm Cu
0059   aDzMap.push_back(std::make_pair("Si_wafer", 0.));           // 0.3 mm
0060   aDzMap.push_back(std::make_pair("Cu_baseplate_175um", 0.)); // 0 + 0.175mm Cu
0061   aDzMap.push_back(std::make_pair("PCB", 0));                 // 1.3 mm
0062 }
0063 
0064 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0065 
0066 void add_FH(G4int aFHid, std::vector<std::pair<G4String, G4double>> &aDzMap,
0067             G4double aAirBefore, G4double aAirMid) {
0068   std::string layout = "";
0069   if (aFHid < 10)
0070     layout = "_DAISY";
0071   if (!(aFHid == 1 || aFHid == 7))
0072     aDzMap.push_back(std::make_pair("Fe_absorber_FH",
0073                                     aAirBefore)); // aAirBefore AIR + 40 mm Fe
0074   aDzMap.push_back(
0075       std::make_pair("PCB" + layout, aAirMid)); // aAirMid AIR + 1.3 mm
0076   aDzMap.push_back(
0077       std::make_pair("Cu_baseplate_175um" + layout, 0.));    // 0.175mm Cu
0078   aDzMap.push_back(std::make_pair("Si_wafer" + layout, 0.)); // 0.3 mm
0079   if (aFHid == 5) {
0080     aDzMap.push_back(std::make_pair("PCB_thin" + layout, 0)); // 1.2 mm
0081   }
0082   if (aFHid != 5) {
0083     aDzMap.push_back(
0084         std::make_pair("Cu_baseplate_25um" + layout, 0.));         // 0.025mm Cu
0085     aDzMap.push_back(std::make_pair("Kapton_layer" + layout, 0.)); // 0.075 mm
0086   }
0087   if (aFHid == 6) {
0088     aDzMap.push_back(
0089         std::make_pair("Cu_baseplate_25um" + layout, 0.));         // 0.025mm Cu
0090     aDzMap.push_back(std::make_pair("Kapton_layer" + layout, 0.)); // 0.075 mm
0091   }
0092   if (aFHid != 5 && aFHid < 9)
0093     aDzMap.push_back(std::make_pair("Cu_baseplate" + layout, 0.)); // 1.2 mm
0094   if (aFHid == 9 || aFHid == 10)
0095     aDzMap.push_back(std::make_pair("CuW_baseplate" + layout, 0.)); // 1.2 mm
0096   if (aFHid != 10)
0097     aDzMap.push_back(std::make_pair("Cu_baseplate" + layout, 0.)); // 1.2 mm
0098   aDzMap.push_back(std::make_pair("Cu_absorber_FH", 0.));          // 6 * mm
0099 }
0100 
0101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0102 
0103 void DetectorConstruction0(
0104     std::vector<std::pair<G4String, G4double>> &aDzMap,
0105     G4double &aViewpoint) {
0106   aViewpoint = 0.75 * CLHEP::m;
0107 
0108   // map means: position this material starting at z, where:
0109   // z += <second>
0110   // z = z0+ 0.5 * thickness[<first>]
0111 
0112   // world (and beam) starts at -45 m
0113 
0114   G4double firstOffset = 2.6 * CLHEP::cm;
0115   // if no beamline is present - shift by beamline length 45.0015 m
0116   if (aDzMap.size() == 0) {
0117     firstOffset += 45.0015 * CLHEP::m;
0118   }
0119 
0120   aDzMap.push_back(std::make_pair("Al_case_thick", firstOffset)); // 5 mm Al
0121   aDzMap.push_back(std::make_pair("Al_case", 0));              // 2.1 mm Al
0122 
0123   // EE1
0124   add_EE(1, aDzMap, 119.7 * CLHEP::mm, 4.7 * CLHEP::mm);
0125 
0126   // EE2
0127   add_EE(2, aDzMap, 7.7 * CLHEP::mm, 3.7 * CLHEP::mm);
0128 
0129   // EE3
0130   add_EE(3, aDzMap, 7.7 * CLHEP::mm, 3.7 * CLHEP::mm);
0131 
0132   // EE4
0133   add_EE(4, aDzMap, 8.7 * CLHEP::mm, 3.7 * CLHEP::mm);
0134 
0135   // EE5
0136   add_EE(5, aDzMap, 8.7 * CLHEP::mm, 3.7 * CLHEP::mm);
0137 
0138   // EE6
0139   add_EE(6, aDzMap, 8.7 * CLHEP::mm, 3.7 * CLHEP::mm);
0140 
0141   // EE7
0142   add_EE(7, aDzMap, 6.7 * CLHEP::mm, 3.7 * CLHEP::mm);
0143 
0144   // EE8
0145   add_EE(8, aDzMap, 6.7 * CLHEP::mm, 3.7 * CLHEP::mm);
0146 
0147   // EE9
0148   add_EE(9, aDzMap, 6.7 * CLHEP::mm, 3.7 * CLHEP::mm);
0149 
0150   // EE10
0151   add_EE(10, aDzMap, 6.7 * CLHEP::mm, 3.7 * CLHEP::mm);
0152 
0153   // EE11
0154   add_EE(11, aDzMap, 6.7 * CLHEP::mm, 5.5 * CLHEP::mm);
0155 
0156   // EE12
0157   add_EE(12, aDzMap, 9.5 * CLHEP::mm, 5.5 * CLHEP::mm);
0158 
0159   // EE13
0160   add_EE(13, aDzMap, 9.5 * CLHEP::mm, 3.145 * CLHEP::mm);
0161 
0162   // EE14
0163   add_EE(14, aDzMap, 10.09 * CLHEP::mm, 3.095 * CLHEP::mm);
0164 
0165   aDzMap.push_back(std::make_pair("Steel_case_thick", 0)); // 40 mm
0166   aDzMap.push_back(std::make_pair("Al_case", 44 * CLHEP::mm));    // 2.1 mm
0167 
0168   // beginning of FH
0169   aDzMap.push_back(std::make_pair("Steel_case", 0)); // 9 mm
0170 
0171   // FH1
0172   add_FH(1, aDzMap, 0, 8.8 * CLHEP::mm);
0173 
0174   // FH2
0175   add_FH(2, aDzMap, 8 * CLHEP::mm, 8.8 * CLHEP::mm);
0176 
0177   // FH3
0178   add_FH(3, aDzMap, 3 * CLHEP::mm, 13.8 * CLHEP::mm);
0179 
0180   // FH4
0181   add_FH(4, aDzMap, 5 * CLHEP::mm, 12.8 * CLHEP::mm);
0182 
0183   // FH5
0184   add_FH(5, aDzMap, 7 * CLHEP::mm, 9.8 * CLHEP::mm);
0185 
0186   // FH6
0187   add_FH(6, aDzMap, 6 * CLHEP::mm, 10.7 * CLHEP::mm);
0188 
0189   // cases
0190   aDzMap.push_back(std::make_pair("Steel_case", 4 * CLHEP::mm));      // 9 mm
0191   aDzMap.push_back(std::make_pair("Fe_absorber_FH", 36 * CLHEP::mm)); // 40 mm
0192   aDzMap.push_back(std::make_pair("Steel_case", 52 * CLHEP::mm));     // 9 mm
0193   // FH7
0194   add_FH(7, aDzMap, 0, 8.8 * CLHEP::mm);
0195 
0196   // FH8
0197   add_FH(8, aDzMap, 7 * CLHEP::mm, 16.8 * CLHEP::mm);
0198 
0199   // FH9
0200   add_FH(9, aDzMap, 9 * CLHEP::mm, 14.8 * CLHEP::mm);
0201 
0202   // FH10
0203   add_FH(10, aDzMap, 10 * CLHEP::mm, 18 * CLHEP::mm);
0204 
0205   // FH11
0206   add_FH(11, aDzMap, 8 * CLHEP::mm, 17 * CLHEP::mm);
0207 
0208   // FH12
0209   add_FH(12, aDzMap, 7 * CLHEP::mm, 17 * CLHEP::mm);
0210 
0211   aDzMap.push_back(std::make_pair("Steel_case", 29 * CLHEP::mm));
0212 
0213   // AHCAL
0214   aDzMap.push_back(std::make_pair("Fe_absorber_AHCAL", 50.0 * CLHEP::cm));
0215   for (int l = 0; l < 39; l++) {
0216     aDzMap.push_back(std::make_pair("Al_absorber_AHCAL", 0.5 * CLHEP::cm));
0217     aDzMap.push_back(std::make_pair("AHCAL_SiPM_2x2HUB", 0.));
0218     aDzMap.push_back(std::make_pair("Al_absorber_AHCAL", 0.));
0219     aDzMap.push_back(std::make_pair("Fe_absorber_AHCAL", 0.5 * CLHEP::cm));
0220   }
0221   aDzMap.push_back(std::make_pair("Fe_absorber_AHCAL", 1.1 * CLHEP::cm));
0222   aDzMap.push_back(std::make_pair("Fe_absorber_AHCAL", 1.1 * CLHEP::cm));
0223   aDzMap.push_back(std::make_pair("Al_absorber_AHCAL", 0.5 * CLHEP::cm));
0224   aDzMap.push_back(std::make_pair("AHCAL_SiPM_2x2HUB", 0.));
0225   aDzMap.push_back(std::make_pair("Al_absorber_AHCAL", 0.));
0226   aDzMap.push_back(std::make_pair("Fe_absorber_AHCAL", 0.5 * CLHEP::cm));
0227 }