File indexing completed on 2023-10-25 09:32:10
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Alignment/LaserAlignmentSimulation/interface/MaterialProperties.h"
0010 #include "G4LogicalVolumeStore.hh"
0011
0012 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0013
0014 #include "G4SystemOfUnits.hh"
0015
0016 MaterialProperties::MaterialProperties(int DebugLevel, double SiAbsLengthScale)
0017 : theMaterialTable(),
0018 theMPDebugLevel(0),
0019 theSiAbsLengthScalingFactor(0),
0020 theMPT(),
0021 theTECWafer(),
0022 theTOBWafer(),
0023 theTIBWafer() {
0024 theMPDebugLevel = DebugLevel;
0025 theSiAbsLengthScalingFactor = SiAbsLengthScale;
0026
0027
0028
0029
0030
0031
0032
0033
0034 G4double theDensity = 2.33 * g / cm3;
0035 G4double theAtomicWeight = 28.09 * g / mole;
0036 G4double theAtomicNumber = 14.0;
0037
0038 theTECWafer = new G4Material("TEC_Wafer", theAtomicNumber, theAtomicWeight, theDensity);
0039 theTOBWafer = new G4Material("TOB_Wafer", theAtomicNumber, theAtomicWeight, theDensity);
0040 theTIBWafer = new G4Material("TIB_Wafer", theAtomicNumber, theAtomicWeight, theDensity);
0041
0042
0043 setMaterialProperties();
0044 }
0045
0046 MaterialProperties::~MaterialProperties() {
0047 if (theMPT != nullptr) {
0048 delete theMPT;
0049 }
0050 if (theTECWafer != nullptr) {
0051 delete theTECWafer;
0052 }
0053 if (theTOBWafer != nullptr) {
0054 delete theTOBWafer;
0055 }
0056 if (theTIBWafer != nullptr) {
0057 delete theTIBWafer;
0058 }
0059 }
0060
0061 void MaterialProperties::setMaterialProperties() {
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071 theMaterialTable = G4Material::GetMaterialTable();
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085 LogDebug("SimLaserAlignment:MaterialProperties")
0086 << " **** here comes the material table **** " << *(G4Material::GetMaterialTable());
0087
0088
0089
0090
0091
0092 const G4int nEntries = 3;
0093
0094
0095 G4double PhotonEnergy[nEntries] = {1.10 * eV, 1.15 * eV, 1.20 * eV};
0096
0097
0098 G4double Scintillation[nEntries] = {0.1, 1.0, 0.1};
0099
0100
0101 G4double RefractiveIndex[nEntries] = {3.5400, 3.5425, 3.5450};
0102
0103 G4double RefractiveIndexMirror[nEntries] = {1.50669, 1.50669, 1.50669};
0104
0105
0106
0107
0108
0109
0110 G4double RefractiveIndexGeneral[nEntries] = {1.0, 1.0, 1.0};
0111
0112
0113
0114
0115 G4double AbsorptionLengthSi[nEntries] = {1136 * micrometer, 1136 * micrometer, 1136 * micrometer};
0116
0117 G4double AbsorptionLengthSiBarrel[nEntries] = {0.1 * fermi, 0.1 * fermi, 0.1 * fermi};
0118
0119
0120 G4double AbsorptionLengthMirror[nEntries] = {11.7 * cm, 0.5 * 11.7 * cm, 11.7 * cm};
0121
0122
0123
0124
0125
0126 G4double AbsorptionLengthDead[nEntries] = {0.001 * micrometer, 0.001 * micrometer, 0.001 * micrometer};
0127
0128
0129 G4double AbsorptionLengthGeneral[nEntries] = {75 * cm, 75 * cm, 75 * cm};
0130
0131
0132 G4double AbsorptionLengthTAir[nEntries] = {10 * m, 1.8 * m, 10 * m};
0133
0134 G4double AbsorptionLengthAl[nEntries] = {10 * mm, 10 * mm, 10 * mm};
0135 G4double AbsorptionLengthTOB_CF_Str[nEntries] = {1 * cm, 10 * cm, 1 * cm};
0136 G4double AbsorptionLengthTOBCF[nEntries] = {0.1 * mm, 20 * mm, 0.1 * mm};
0137 G4double AbsorptionLengthTIBCF[nEntries] = {15.0 * cm, 15.0 * cm, 15.0 * cm};
0138
0139
0140 G4double SiReflectivity[nEntries] = {0.0, 0.0, 0.0};
0141
0142
0143 G4double TECEfficiency[nEntries] = {0.9, 0.9, 0.9};
0144 G4double BarrelEfficiency[nEntries] = {1.0, 1.0, 1.0};
0145
0146
0147 G4double Reflectivity[nEntries] = {0.05, 0.05, 0.05};
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161 {
0162 for (G4MaterialTable::const_iterator theMTEntry = theMaterialTable->begin(); theMTEntry != theMaterialTable->end();
0163 theMTEntry++) {
0164 if (*theMTEntry) {
0165 G4Material *theMaterial = const_cast<G4Material *>(*theMTEntry);
0166
0167 if (theMaterial->GetMaterialPropertiesTable()) {
0168 theMPT = theMaterial->GetMaterialPropertiesTable();
0169 } else {
0170 theMPT = new G4MaterialPropertiesTable;
0171 }
0172
0173
0174 if (theMaterial->GetName() == "TEC_Wafer") {
0175 theMPT->AddProperty("FASTCOMPONENT", PhotonEnergy, Scintillation, nEntries);
0176 theMPT->AddProperty("SLOWCOMPONENT", PhotonEnergy, Scintillation, nEntries);
0177 theMPT->AddProperty("RINDEX", PhotonEnergy, RefractiveIndex, nEntries);
0178 theMPT->AddProperty("ABSLENGTH", PhotonEnergy, AbsorptionLengthSi, nEntries);
0179 theMPT->AddProperty("EFFICIENCY", PhotonEnergy, TECEfficiency, nEntries);
0180
0181 theMPT->AddConstProperty("SCINTILLATIONYIELD", 12000.0 / MeV);
0182 theMPT->AddConstProperty("RESOLTUIONSCALE", 1.0);
0183 theMPT->AddConstProperty("FASTTIMECONSTANT", 20.0 * ns);
0184 theMPT->AddConstProperty("SLOWTIMECONSTANT", 45.0 * ns);
0185 theMPT->AddConstProperty("YIELDRATIO", 1.0);
0186
0187
0188 theMaterial->SetMaterialPropertiesTable(theMPT);
0189 }
0190
0191
0192 else if (theMaterial->GetName() == "Silicon") {
0193 theMPT->AddProperty("FASTCOMPONENT", PhotonEnergy, Scintillation, nEntries);
0194 theMPT->AddProperty("SLOWCOMPONENT", PhotonEnergy, Scintillation, nEntries);
0195 theMPT->AddProperty("RINDEX", PhotonEnergy, RefractiveIndex, nEntries);
0196 theMPT->AddProperty("ABSLENGTH", PhotonEnergy, AbsorptionLengthSi, nEntries);
0197 theMPT->AddProperty("EFFICIENCY", PhotonEnergy, TECEfficiency, nEntries);
0198
0199 theMPT->AddConstProperty("SCINTILLATIONYIELD", 12000.0 / MeV);
0200 theMPT->AddConstProperty("RESOLTUIONSCALE", 1.0);
0201 theMPT->AddConstProperty("FASTTIMECONSTANT", 20.0 * ns);
0202 theMPT->AddConstProperty("SLOWTIMECONSTANT", 45.0 * ns);
0203 theMPT->AddConstProperty("YIELDRATIO", 1.0);
0204
0205
0206 theMaterial->SetMaterialPropertiesTable(theMPT);
0207 }
0208
0209
0210 else if ((theMaterial->GetName() == "TOB_Wafer") || (theMaterial->GetName() == "TIB_Wafer")) {
0211 theMPT->AddProperty("FASTCOMPONENT", PhotonEnergy, Scintillation, nEntries);
0212 theMPT->AddProperty("SLOWCOMPONENT", PhotonEnergy, Scintillation, nEntries);
0213 theMPT->AddProperty("RINDEX", PhotonEnergy, RefractiveIndex, nEntries);
0214 theMPT->AddProperty("ABSLENGTH", PhotonEnergy, AbsorptionLengthSiBarrel, nEntries);
0215 theMPT->AddProperty("REFLECTIVITY", PhotonEnergy, SiReflectivity, nEntries);
0216 theMPT->AddProperty("EFFICIENCY", PhotonEnergy, BarrelEfficiency, nEntries);
0217
0218 theMPT->AddConstProperty("SCINTILLATIONYIELD", 12000.0 / MeV);
0219 theMPT->AddConstProperty("RESOLTUIONSCALE", 1.0);
0220 theMPT->AddConstProperty("FASTTIMECONSTANT", 20.0 * ns);
0221 theMPT->AddConstProperty("SLOWTIMECONSTANT", 45.0 * ns);
0222 theMPT->AddConstProperty("YIELDRATIO", 1.0);
0223
0224
0225 theMaterial->SetMaterialPropertiesTable(theMPT);
0226 }
0227
0228
0229 else if (theMaterial->GetName() == "TIB_ledge_side") {
0230
0231 theMPT->AddProperty("RINDEX", PhotonEnergy, RefractiveIndexGeneral, nEntries);
0232 theMPT->AddProperty("ABSLENGTH", PhotonEnergy, AbsorptionLengthGeneral, nEntries);
0233
0234
0235 theMaterial->SetMaterialPropertiesTable(theMPT);
0236 }
0237
0238
0239 else if ((theMaterial->GetName() == "T_Air") || (theMaterial->GetName() == "Air")) {
0240
0241 theMPT->AddProperty("RINDEX", PhotonEnergy, RefractiveIndexGeneral, nEntries);
0242
0243 theMPT->AddProperty("REFLECTIVITY", PhotonEnergy, SiReflectivity, nEntries);
0244
0245 theMPT->AddProperty("ABSLENGTH", PhotonEnergy, AbsorptionLengthTAir, nEntries);
0246
0247
0248 theMaterial->SetMaterialPropertiesTable(theMPT);
0249 }
0250
0251
0252
0253 else if ((theMaterial->GetName() == "TIB_connector") || (theMaterial->GetName() == "TIB_cylinder") ||
0254 (theMaterial->GetName() == "TID_Connector")) {
0255
0256 theMPT->AddProperty("RINDEX", PhotonEnergy, RefractiveIndexGeneral, nEntries);
0257
0258 theMPT->AddProperty("REFLECTIVITY", PhotonEnergy, SiReflectivity, nEntries);
0259
0260 theMPT->AddProperty("ABSLENGTH", PhotonEnergy, AbsorptionLengthDead, nEntries);
0261
0262
0263 theMaterial->SetMaterialPropertiesTable(theMPT);
0264 }
0265
0266
0267 else if (theMaterial->GetName() == "Si O_2") {
0268
0269 theMPT->AddProperty("RINDEX", PhotonEnergy, RefractiveIndexMirror, nEntries);
0270
0271 theMPT->AddProperty("ABSLENGTH", PhotonEnergy, AbsorptionLengthMirror, nEntries);
0272
0273 theMPT->AddProperty("REFLECTIVITY", PhotonEnergy, Reflectivity, nEntries);
0274
0275
0276 theMaterial->SetMaterialPropertiesTable(theMPT);
0277 }
0278
0279
0280 else if ((theMaterial->GetName() == "TOB_Aluminium") || (theMaterial->GetName() == "Aluminium")) {
0281
0282 theMPT->AddProperty("RINDEX", PhotonEnergy, RefractiveIndexGeneral, nEntries);
0283
0284 theMPT->AddProperty("REFLECTIVITY", PhotonEnergy, SiReflectivity, nEntries);
0285
0286 theMPT->AddProperty("ABSLENGTH", PhotonEnergy, AbsorptionLengthAl, nEntries);
0287
0288
0289 theMaterial->SetMaterialPropertiesTable(theMPT);
0290 }
0291
0292
0293 else if ((theMaterial->GetName() == "TOB_CF_Str")) {
0294
0295 theMPT->AddProperty("RINDEX", PhotonEnergy, RefractiveIndexGeneral, nEntries);
0296
0297 theMPT->AddProperty("REFLECTIVITY", PhotonEnergy, SiReflectivity, nEntries);
0298
0299 theMPT->AddProperty("ABSLENGTH", PhotonEnergy, AbsorptionLengthTOB_CF_Str, nEntries);
0300
0301
0302 theMaterial->SetMaterialPropertiesTable(theMPT);
0303 }
0304
0305
0306 else if ((theMaterial->GetName() == "TID_CF") || (theMaterial->GetName() == "Nomex") ||
0307 (theMaterial->GetName() == "TOB_Nomex") || (theMaterial->GetName() == "TID_Nomex") ||
0308 (theMaterial->GetName() == "TOB_plate_C") || (theMaterial->GetName() == "TOB_rod") ||
0309 (theMaterial->GetName() == "TOB_cool_DS") || (theMaterial->GetName() == "TOB_cool_SS") ||
0310 (theMaterial->GetName() == "TID_in_cable") || (theMaterial->GetName() == "TOB_PA_rphi") ||
0311 (theMaterial->GetName() == "TOB_frame_ele") || (theMaterial->GetName() == "TOB_PA_ster") ||
0312 (theMaterial->GetName() == "TOB_ICB") || (theMaterial->GetName() == "TOB_CONN1") ||
0313 (theMaterial->GetName() == "TOB_CONN2") || (theMaterial->GetName() == "TOB_CONN3") ||
0314 (theMaterial->GetName() == "TOB_rail") || (theMaterial->GetName() == "TOB_sid_rail1") ||
0315 (theMaterial->GetName() == "TOB_sid_rail2")) {
0316
0317 theMPT->AddProperty("RINDEX", PhotonEnergy, RefractiveIndexGeneral, nEntries);
0318
0319 theMPT->AddProperty("REFLECTIVITY", PhotonEnergy, SiReflectivity, nEntries);
0320
0321 theMPT->AddProperty("ABSLENGTH", PhotonEnergy, AbsorptionLengthTOBCF, nEntries);
0322
0323
0324 theMaterial->SetMaterialPropertiesTable(theMPT);
0325 }
0326
0327
0328 else if ((theMaterial->GetName() == "TIB_CF") || (theMaterial->GetName() == "TIB_cables_ax_out") ||
0329 (theMaterial->GetName() == "TIB_outer_supp") || (theMaterial->GetName() == "TIB_PA_rphi") ||
0330 (theMaterial->GetName() == "TIB_rail") || (theMaterial->GetName() == "TIB_sid_rail1") ||
0331 (theMaterial->GetName() == "TIB_sid_rail2") || (theMaterial->GetName() == "TIB_mod_cool")) {
0332
0333 theMPT->AddProperty("RINDEX", PhotonEnergy, RefractiveIndexGeneral, nEntries);
0334
0335 theMPT->AddProperty("REFLECTIVITY", PhotonEnergy, SiReflectivity, nEntries);
0336
0337 theMPT->AddProperty("ABSLENGTH", PhotonEnergy, AbsorptionLengthTIBCF, nEntries);
0338
0339
0340 theMaterial->SetMaterialPropertiesTable(theMPT);
0341 }
0342
0343
0344 else {
0345
0346 theMPT->AddProperty("RINDEX", PhotonEnergy, RefractiveIndexGeneral, nEntries);
0347
0348 theMPT->AddProperty("ABSLENGTH", PhotonEnergy, AbsorptionLengthGeneral, nEntries);
0349
0350
0351 theMaterial->SetMaterialPropertiesTable(theMPT);
0352 }
0353 }
0354 }
0355 }
0356
0357
0358
0359 const G4LogicalVolumeStore *theLogicalVolumeStore = G4LogicalVolumeStore::GetInstance();
0360 std::vector<G4LogicalVolume *>::const_iterator theLogicalVolume;
0361
0362 for (theLogicalVolume = theLogicalVolumeStore->begin(); theLogicalVolume != theLogicalVolumeStore->end();
0363 theLogicalVolume++) {
0364 if (((*theLogicalVolume)->GetName() == "TECModule0StereoActive") ||
0365 ((*theLogicalVolume)->GetName() == "TECModule0RphiActive") ||
0366 ((*theLogicalVolume)->GetName() == "TECModule1StereoActive") ||
0367 ((*theLogicalVolume)->GetName() == "TECModule1RphiActive") ||
0368 ((*theLogicalVolume)->GetName() == "TECModule2RphiActive") ||
0369 ((*theLogicalVolume)->GetName() == "TECModule3RphiActive") ||
0370 ((*theLogicalVolume)->GetName() == "TECModule4StereoActive") ||
0371 ((*theLogicalVolume)->GetName() == "TECModule4RphiActive") ||
0372 ((*theLogicalVolume)->GetName() == "TECModule5RphiActive") ||
0373 ((*theLogicalVolume)->GetName() == "TECModule6RphiActive")) {
0374
0375 (*theLogicalVolume)->SetMaterial(theTECWafer);
0376
0377 if (theMPDebugLevel > 2) {
0378 std::cout << " AC1CMS: found a logical volume: " << (*theLogicalVolume)->GetName() << std::endl;
0379 std::cout << " AC1CMS: the logical volume material = " << (*theLogicalVolume)->GetMaterial()->GetName()
0380 << std::endl;
0381 std::cout << " AC1CMS: the MaterialPropertiesTable = " << std::endl;
0382 (*theLogicalVolume)->GetMaterial()->GetMaterialPropertiesTable()->DumpTable();
0383 }
0384 } else if (((*theLogicalVolume)->GetName() == "TOBActiveSter0") ||
0385 ((*theLogicalVolume)->GetName() == "TOBActiveRphi0") ||
0386 ((*theLogicalVolume)->GetName() == "TOBActiveRphi2") ||
0387 ((*theLogicalVolume)->GetName() == "TOBActiveRphi4")) {
0388
0389 (*theLogicalVolume)->SetMaterial(theTOBWafer);
0390
0391 if (theMPDebugLevel > 2) {
0392 std::cout << " AC1CMS: found a logical volume: " << (*theLogicalVolume)->GetName() << std::endl;
0393 std::cout << " AC1CMS: the logical volume material = " << (*theLogicalVolume)->GetMaterial()->GetName()
0394 << std::endl;
0395 std::cout << " AC1CMS: the MaterialPropertiesTable = " << std::endl;
0396 (*theLogicalVolume)->GetMaterial()->GetMaterialPropertiesTable()->DumpTable();
0397 }
0398 } else if (((*theLogicalVolume)->GetName() == "TIBActiveSter0") ||
0399 ((*theLogicalVolume)->GetName() == "TIBActiveRphi0") ||
0400 ((*theLogicalVolume)->GetName() == "TIBActiveRphi2")) {
0401
0402 (*theLogicalVolume)->SetMaterial(theTIBWafer);
0403
0404 if (theMPDebugLevel > 2) {
0405 std::cout << " AC1CMS: found a logical volume: " << (*theLogicalVolume)->GetName() << std::endl;
0406 std::cout << " AC1CMS: the logical volume material = " << (*theLogicalVolume)->GetMaterial()->GetName()
0407 << std::endl;
0408 std::cout << " AC1CMS: the MaterialPropertiesTable = " << std::endl;
0409 (*theLogicalVolume)->GetMaterial()->GetMaterialPropertiesTable()->DumpTable();
0410 }
0411 }
0412 }
0413 }