Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 #include "DetectorConstruction0.hh" 26 #include "DetectorConstruction0.hh" 27 #include "CLHEP/Units/SystemOfUnits.h" 27 #include "CLHEP/Units/SystemOfUnits.h" 28 28 29 //....oooOO0OOooo........oooOO0OOooo........oo 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 30 30 31 void add_EE(G4int aEEid, std::vector<std::pair 31 void add_EE(G4int aEEid, std::vector<std::pair<G4String, G4double>> &aDzMap, 32 G4double aAirBefore, G4double aAir 32 G4double aAirBefore, G4double aAirMid) { 33 aDzMap.push_back(std::make_pair("Fe_absorber 33 aDzMap.push_back(std::make_pair("Fe_absorber_EE", 34 aAirBefore)) 34 aAirBefore)); // aAirBefore AIR + 0.3 mm Fe 35 aDzMap.push_back(std::make_pair("Pb_absorber 35 aDzMap.push_back(std::make_pair("Pb_absorber_EE", 0)); // 0 + 4.9mm Pb 36 aDzMap.push_back(std::make_pair("Fe_absorber 36 aDzMap.push_back(std::make_pair("Fe_absorber_EE", 0)); // 0 + 0.3 mm Fe 37 aDzMap.push_back(std::make_pair("PCB", aAirM 37 aDzMap.push_back(std::make_pair("PCB", aAirMid)); // aAirMid AIR +1.3mm 38 aDzMap.push_back(std::make_pair("Cu_baseplat 38 aDzMap.push_back(std::make_pair("Cu_baseplate_175um", 0.)); // 0 + 0.175mm Cu 39 aDzMap.push_back(std::make_pair("Si_wafer", 39 aDzMap.push_back(std::make_pair("Si_wafer", 0.)); // 0.3 mm 40 aDzMap.push_back(std::make_pair("Cu_baseplat 40 aDzMap.push_back(std::make_pair("Cu_baseplate_25um", 0.)); // 0 + 0.025mm Cu 41 aDzMap.push_back(std::make_pair("Kapton_laye 41 aDzMap.push_back(std::make_pair("Kapton_layer", 0.)); // 0.075 mm 42 if (aEEid == 11 || aEEid == 12) 42 if (aEEid == 11 || aEEid == 12) 43 aDzMap.push_back(std::make_pair("Cu_basepl 43 aDzMap.push_back(std::make_pair("Cu_baseplate", 0.)); // 1.2 mm 44 aDzMap.push_back(std::make_pair("CuW_basepla 44 aDzMap.push_back(std::make_pair("CuW_baseplate", 0.)); // 1.2 mm 45 if (aEEid == 13) 45 if (aEEid == 13) 46 aDzMap.push_back(std::make_pair("CuW_basep 46 aDzMap.push_back(std::make_pair("CuW_baseplate_550um", 0.)); // 0.55 mm 47 if (aEEid == 14) 47 if (aEEid == 14) 48 aDzMap.push_back(std::make_pair("CuW_basep 48 aDzMap.push_back(std::make_pair("CuW_baseplate_610um", 0.)); // 0.61 mm 49 aDzMap.push_back(std::make_pair("Cu_absorber 49 aDzMap.push_back(std::make_pair("Cu_absorber_EE", 0.)); // 6 mm 50 if (aEEid == 13) 50 if (aEEid == 13) 51 aDzMap.push_back(std::make_pair("CuW_basep 51 aDzMap.push_back(std::make_pair("CuW_baseplate_610um", 0.)); // 0.61 mm 52 if (aEEid == 14) 52 if (aEEid == 14) 53 aDzMap.push_back(std::make_pair("CuW_basep 53 aDzMap.push_back(std::make_pair("CuW_baseplate_710um", 0.)); // 0.71 mm 54 aDzMap.push_back(std::make_pair("CuW_basepla 54 aDzMap.push_back(std::make_pair("CuW_baseplate", 0.)); // 1.2 mm 55 if (aEEid == 11 || aEEid == 12) 55 if (aEEid == 11 || aEEid == 12) 56 aDzMap.push_back(std::make_pair("Cu_basepl 56 aDzMap.push_back(std::make_pair("Cu_baseplate", 0.)); // 1.2 mm 57 aDzMap.push_back(std::make_pair("Kapton_laye 57 aDzMap.push_back(std::make_pair("Kapton_layer", 0.)); // 0.075 mm 58 aDzMap.push_back(std::make_pair("Cu_baseplat 58 aDzMap.push_back(std::make_pair("Cu_baseplate_25um", 0.)); // 0 + 0.025mm Cu 59 aDzMap.push_back(std::make_pair("Si_wafer", 59 aDzMap.push_back(std::make_pair("Si_wafer", 0.)); // 0.3 mm 60 aDzMap.push_back(std::make_pair("Cu_baseplat 60 aDzMap.push_back(std::make_pair("Cu_baseplate_175um", 0.)); // 0 + 0.175mm Cu 61 aDzMap.push_back(std::make_pair("PCB", 0)); 61 aDzMap.push_back(std::make_pair("PCB", 0)); // 1.3 mm 62 } 62 } 63 63 64 //....oooOO0OOooo........oooOO0OOooo........oo 64 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 65 65 66 void add_FH(G4int aFHid, std::vector<std::pair 66 void add_FH(G4int aFHid, std::vector<std::pair<G4String, G4double>> &aDzMap, 67 G4double aAirBefore, G4double aAir 67 G4double aAirBefore, G4double aAirMid) { 68 std::string layout = ""; 68 std::string layout = ""; 69 if (aFHid < 10) 69 if (aFHid < 10) 70 layout = "_DAISY"; 70 layout = "_DAISY"; 71 if (!(aFHid == 1 || aFHid == 7)) 71 if (!(aFHid == 1 || aFHid == 7)) 72 aDzMap.push_back(std::make_pair("Fe_absorb 72 aDzMap.push_back(std::make_pair("Fe_absorber_FH", 73 aAirBefore 73 aAirBefore)); // aAirBefore AIR + 40 mm Fe 74 aDzMap.push_back( 74 aDzMap.push_back( 75 std::make_pair("PCB" + layout, aAirMid)) 75 std::make_pair("PCB" + layout, aAirMid)); // aAirMid AIR + 1.3 mm 76 aDzMap.push_back( 76 aDzMap.push_back( 77 std::make_pair("Cu_baseplate_175um" + la 77 std::make_pair("Cu_baseplate_175um" + layout, 0.)); // 0.175mm Cu 78 aDzMap.push_back(std::make_pair("Si_wafer" + 78 aDzMap.push_back(std::make_pair("Si_wafer" + layout, 0.)); // 0.3 mm 79 if (aFHid == 5) { 79 if (aFHid == 5) { 80 aDzMap.push_back(std::make_pair("PCB_thin" 80 aDzMap.push_back(std::make_pair("PCB_thin" + layout, 0)); // 1.2 mm 81 } 81 } 82 if (aFHid != 5) { 82 if (aFHid != 5) { 83 aDzMap.push_back( 83 aDzMap.push_back( 84 std::make_pair("Cu_baseplate_25um" + l 84 std::make_pair("Cu_baseplate_25um" + layout, 0.)); // 0.025mm Cu 85 aDzMap.push_back(std::make_pair("Kapton_la 85 aDzMap.push_back(std::make_pair("Kapton_layer" + layout, 0.)); // 0.075 mm 86 } 86 } 87 if (aFHid == 6) { 87 if (aFHid == 6) { 88 aDzMap.push_back( 88 aDzMap.push_back( 89 std::make_pair("Cu_baseplate_25um" + l 89 std::make_pair("Cu_baseplate_25um" + layout, 0.)); // 0.025mm Cu 90 aDzMap.push_back(std::make_pair("Kapton_la 90 aDzMap.push_back(std::make_pair("Kapton_layer" + layout, 0.)); // 0.075 mm 91 } 91 } 92 if (aFHid != 5 && aFHid < 9) 92 if (aFHid != 5 && aFHid < 9) 93 aDzMap.push_back(std::make_pair("Cu_basepl 93 aDzMap.push_back(std::make_pair("Cu_baseplate" + layout, 0.)); // 1.2 mm 94 if (aFHid == 9 || aFHid == 10) 94 if (aFHid == 9 || aFHid == 10) 95 aDzMap.push_back(std::make_pair("CuW_basep 95 aDzMap.push_back(std::make_pair("CuW_baseplate" + layout, 0.)); // 1.2 mm 96 if (aFHid != 10) 96 if (aFHid != 10) 97 aDzMap.push_back(std::make_pair("Cu_basepl 97 aDzMap.push_back(std::make_pair("Cu_baseplate" + layout, 0.)); // 1.2 mm 98 aDzMap.push_back(std::make_pair("Cu_absorber 98 aDzMap.push_back(std::make_pair("Cu_absorber_FH", 0.)); // 6 * mm 99 } 99 } 100 100 101 //....oooOO0OOooo........oooOO0OOooo........oo 101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 102 102 103 void DetectorConstruction0( 103 void DetectorConstruction0( 104 std::vector<std::pair<G4String, G4double>> 104 std::vector<std::pair<G4String, G4double>> &aDzMap, 105 G4double &aViewpoint) { 105 G4double &aViewpoint) { 106 aViewpoint = 0.75 * CLHEP::m; 106 aViewpoint = 0.75 * CLHEP::m; 107 107 108 // map means: position this material startin 108 // map means: position this material starting at z, where: 109 // z += <second> 109 // z += <second> 110 // z = z0+ 0.5 * thickness[<first>] 110 // z = z0+ 0.5 * thickness[<first>] 111 111 112 // world (and beam) starts at -45 m 112 // world (and beam) starts at -45 m 113 113 114 G4double firstOffset = 2.6 * CLHEP::cm; 114 G4double firstOffset = 2.6 * CLHEP::cm; 115 // if no beamline is present - shift by beam 115 // if no beamline is present - shift by beamline length 45.0015 m 116 if (aDzMap.size() == 0) { 116 if (aDzMap.size() == 0) { 117 firstOffset += 45.0015 * CLHEP::m; 117 firstOffset += 45.0015 * CLHEP::m; 118 } 118 } 119 119 120 aDzMap.push_back(std::make_pair("Al_case_thi 120 aDzMap.push_back(std::make_pair("Al_case_thick", firstOffset)); // 5 mm Al 121 aDzMap.push_back(std::make_pair("Al_case", 0 121 aDzMap.push_back(std::make_pair("Al_case", 0)); // 2.1 mm Al 122 122 123 // EE1 123 // EE1 124 add_EE(1, aDzMap, 119.7 * CLHEP::mm, 4.7 * C 124 add_EE(1, aDzMap, 119.7 * CLHEP::mm, 4.7 * CLHEP::mm); 125 125 126 // EE2 126 // EE2 127 add_EE(2, aDzMap, 7.7 * CLHEP::mm, 3.7 * CLH 127 add_EE(2, aDzMap, 7.7 * CLHEP::mm, 3.7 * CLHEP::mm); 128 128 129 // EE3 129 // EE3 130 add_EE(3, aDzMap, 7.7 * CLHEP::mm, 3.7 * CLH 130 add_EE(3, aDzMap, 7.7 * CLHEP::mm, 3.7 * CLHEP::mm); 131 131 132 // EE4 132 // EE4 133 add_EE(4, aDzMap, 8.7 * CLHEP::mm, 3.7 * CLH 133 add_EE(4, aDzMap, 8.7 * CLHEP::mm, 3.7 * CLHEP::mm); 134 134 135 // EE5 135 // EE5 136 add_EE(5, aDzMap, 8.7 * CLHEP::mm, 3.7 * CLH 136 add_EE(5, aDzMap, 8.7 * CLHEP::mm, 3.7 * CLHEP::mm); 137 137 138 // EE6 138 // EE6 139 add_EE(6, aDzMap, 8.7 * CLHEP::mm, 3.7 * CLH 139 add_EE(6, aDzMap, 8.7 * CLHEP::mm, 3.7 * CLHEP::mm); 140 140 141 // EE7 141 // EE7 142 add_EE(7, aDzMap, 6.7 * CLHEP::mm, 3.7 * CLH 142 add_EE(7, aDzMap, 6.7 * CLHEP::mm, 3.7 * CLHEP::mm); 143 143 144 // EE8 144 // EE8 145 add_EE(8, aDzMap, 6.7 * CLHEP::mm, 3.7 * CLH 145 add_EE(8, aDzMap, 6.7 * CLHEP::mm, 3.7 * CLHEP::mm); 146 146 147 // EE9 147 // EE9 148 add_EE(9, aDzMap, 6.7 * CLHEP::mm, 3.7 * CLH 148 add_EE(9, aDzMap, 6.7 * CLHEP::mm, 3.7 * CLHEP::mm); 149 149 150 // EE10 150 // EE10 151 add_EE(10, aDzMap, 6.7 * CLHEP::mm, 3.7 * CL 151 add_EE(10, aDzMap, 6.7 * CLHEP::mm, 3.7 * CLHEP::mm); 152 152 153 // EE11 153 // EE11 154 add_EE(11, aDzMap, 6.7 * CLHEP::mm, 5.5 * CL 154 add_EE(11, aDzMap, 6.7 * CLHEP::mm, 5.5 * CLHEP::mm); 155 155 156 // EE12 156 // EE12 157 add_EE(12, aDzMap, 9.5 * CLHEP::mm, 5.5 * CL 157 add_EE(12, aDzMap, 9.5 * CLHEP::mm, 5.5 * CLHEP::mm); 158 158 159 // EE13 159 // EE13 160 add_EE(13, aDzMap, 9.5 * CLHEP::mm, 3.145 * 160 add_EE(13, aDzMap, 9.5 * CLHEP::mm, 3.145 * CLHEP::mm); 161 161 162 // EE14 162 // EE14 163 add_EE(14, aDzMap, 10.09 * CLHEP::mm, 3.095 163 add_EE(14, aDzMap, 10.09 * CLHEP::mm, 3.095 * CLHEP::mm); 164 164 165 aDzMap.push_back(std::make_pair("Steel_case_ 165 aDzMap.push_back(std::make_pair("Steel_case_thick", 0)); // 40 mm 166 aDzMap.push_back(std::make_pair("Al_case", 4 166 aDzMap.push_back(std::make_pair("Al_case", 44 * CLHEP::mm)); // 2.1 mm 167 167 168 // beginning of FH 168 // beginning of FH 169 aDzMap.push_back(std::make_pair("Steel_case" 169 aDzMap.push_back(std::make_pair("Steel_case", 0)); // 9 mm 170 170 171 // FH1 171 // FH1 172 add_FH(1, aDzMap, 0, 8.8 * CLHEP::mm); 172 add_FH(1, aDzMap, 0, 8.8 * CLHEP::mm); 173 173 174 // FH2 174 // FH2 175 add_FH(2, aDzMap, 8 * CLHEP::mm, 8.8 * CLHEP 175 add_FH(2, aDzMap, 8 * CLHEP::mm, 8.8 * CLHEP::mm); 176 176 177 // FH3 177 // FH3 178 add_FH(3, aDzMap, 3 * CLHEP::mm, 13.8 * CLHE 178 add_FH(3, aDzMap, 3 * CLHEP::mm, 13.8 * CLHEP::mm); 179 179 180 // FH4 180 // FH4 181 add_FH(4, aDzMap, 5 * CLHEP::mm, 12.8 * CLHE 181 add_FH(4, aDzMap, 5 * CLHEP::mm, 12.8 * CLHEP::mm); 182 182 183 // FH5 183 // FH5 184 add_FH(5, aDzMap, 7 * CLHEP::mm, 9.8 * CLHEP 184 add_FH(5, aDzMap, 7 * CLHEP::mm, 9.8 * CLHEP::mm); 185 185 186 // FH6 186 // FH6 187 add_FH(6, aDzMap, 6 * CLHEP::mm, 10.7 * CLHE 187 add_FH(6, aDzMap, 6 * CLHEP::mm, 10.7 * CLHEP::mm); 188 188 189 // cases 189 // cases 190 aDzMap.push_back(std::make_pair("Steel_case" 190 aDzMap.push_back(std::make_pair("Steel_case", 4 * CLHEP::mm)); // 9 mm 191 aDzMap.push_back(std::make_pair("Fe_absorber 191 aDzMap.push_back(std::make_pair("Fe_absorber_FH", 36 * CLHEP::mm)); // 40 mm 192 aDzMap.push_back(std::make_pair("Steel_case" 192 aDzMap.push_back(std::make_pair("Steel_case", 52 * CLHEP::mm)); // 9 mm 193 // FH7 193 // FH7 194 add_FH(7, aDzMap, 0, 8.8 * CLHEP::mm); 194 add_FH(7, aDzMap, 0, 8.8 * CLHEP::mm); 195 195 196 // FH8 196 // FH8 197 add_FH(8, aDzMap, 7 * CLHEP::mm, 16.8 * CLHE 197 add_FH(8, aDzMap, 7 * CLHEP::mm, 16.8 * CLHEP::mm); 198 198 199 // FH9 199 // FH9 200 add_FH(9, aDzMap, 9 * CLHEP::mm, 14.8 * CLHE 200 add_FH(9, aDzMap, 9 * CLHEP::mm, 14.8 * CLHEP::mm); 201 201 202 // FH10 202 // FH10 203 add_FH(10, aDzMap, 10 * CLHEP::mm, 18 * CLHE 203 add_FH(10, aDzMap, 10 * CLHEP::mm, 18 * CLHEP::mm); 204 204 205 // FH11 205 // FH11 206 add_FH(11, aDzMap, 8 * CLHEP::mm, 17 * CLHEP 206 add_FH(11, aDzMap, 8 * CLHEP::mm, 17 * CLHEP::mm); 207 207 208 // FH12 208 // FH12 209 add_FH(12, aDzMap, 7 * CLHEP::mm, 17 * CLHEP 209 add_FH(12, aDzMap, 7 * CLHEP::mm, 17 * CLHEP::mm); 210 210 211 aDzMap.push_back(std::make_pair("Steel_case" 211 aDzMap.push_back(std::make_pair("Steel_case", 29 * CLHEP::mm)); 212 212 213 // AHCAL 213 // AHCAL 214 aDzMap.push_back(std::make_pair("Fe_absorber 214 aDzMap.push_back(std::make_pair("Fe_absorber_AHCAL", 50.0 * CLHEP::cm)); 215 for (int l = 0; l < 39; l++) { 215 for (int l = 0; l < 39; l++) { 216 aDzMap.push_back(std::make_pair("Al_absorb 216 aDzMap.push_back(std::make_pair("Al_absorber_AHCAL", 0.5 * CLHEP::cm)); 217 aDzMap.push_back(std::make_pair("AHCAL_SiP 217 aDzMap.push_back(std::make_pair("AHCAL_SiPM_2x2HUB", 0.)); 218 aDzMap.push_back(std::make_pair("Al_absorb 218 aDzMap.push_back(std::make_pair("Al_absorber_AHCAL", 0.)); 219 aDzMap.push_back(std::make_pair("Fe_absorb 219 aDzMap.push_back(std::make_pair("Fe_absorber_AHCAL", 0.5 * CLHEP::cm)); 220 } 220 } 221 aDzMap.push_back(std::make_pair("Fe_absorber 221 aDzMap.push_back(std::make_pair("Fe_absorber_AHCAL", 1.1 * CLHEP::cm)); 222 aDzMap.push_back(std::make_pair("Fe_absorber 222 aDzMap.push_back(std::make_pair("Fe_absorber_AHCAL", 1.1 * CLHEP::cm)); 223 aDzMap.push_back(std::make_pair("Al_absorber 223 aDzMap.push_back(std::make_pair("Al_absorber_AHCAL", 0.5 * CLHEP::cm)); 224 aDzMap.push_back(std::make_pair("AHCAL_SiPM_ 224 aDzMap.push_back(std::make_pair("AHCAL_SiPM_2x2HUB", 0.)); 225 aDzMap.push_back(std::make_pair("Al_absorber 225 aDzMap.push_back(std::make_pair("Al_absorber_AHCAL", 0.)); 226 aDzMap.push_back(std::make_pair("Fe_absorber 226 aDzMap.push_back(std::make_pair("Fe_absorber_AHCAL", 0.5 * CLHEP::cm)); 227 } 227 } 228 228