diff --git a/NPSimulation/Detectors/Actar/Actar.cc b/NPSimulation/Detectors/Actar/Actar.cc index f41979c9a448f080c95826f49dc0e4c2abb7cf21..15ee6ccbaf7e63335db490c69ead96e0e547fafe 100644 --- a/NPSimulation/Detectors/Actar/Actar.cc +++ b/NPSimulation/Detectors/Actar/Actar.cc @@ -263,6 +263,7 @@ G4LogicalVolume* Actar::BuildDetector() { cout << GasComponent[i] << endl; } +#if NPS_GEANT4_VERSION_MAJOR > 10 G4MaterialPropertiesTable* MPT = new G4MaterialPropertiesTable(); MPT->AddConstProperty("DE_PAIRENERGY", 20 * eV, true); MPT->AddConstProperty("DE_YIELD", 3e-1, true); @@ -271,15 +272,27 @@ G4LogicalVolume* Actar::BuildDetector() { MPT->AddConstProperty("DE_DRIFTSPEED", 0.8 * cm / microsecond, true); MPT->AddConstProperty("DE_TRANSVERSALSPREAD", 2e-5 * mm2 / ns, true); MPT->AddConstProperty("DE_LONGITUDINALSPREAD", 4e-6 * mm2 / ns, true); - DriftGasMaterial->SetMaterialPropertiesTable(MPT); - G4MaterialPropertiesTable* MPT2 = new G4MaterialPropertiesTable(); MPT2->AddConstProperty("DE_AMPLIFICATION", 1000, true); MPT2->AddConstProperty("DE_ABSLENGTH", 1 * pc, true); - + Al->SetMaterialPropertiesTable(MPT2); +#else + G4MaterialPropertiesTable* MPT = new G4MaterialPropertiesTable(); + MPT->AddConstProperty("DE_PAIRENERGY", 20 * eV); + MPT->AddConstProperty("DE_YIELD", 3e-1); + // MPT->AddConstProperty("DE_AMPLIFICATION",2,true); + MPT->AddConstProperty("DE_ABSLENGTH", 1 * pc); + MPT->AddConstProperty("DE_DRIFTSPEED", 0.8 * cm / microsecond); + MPT->AddConstProperty("DE_TRANSVERSALSPREAD", 2e-5 * mm2 / ns); + MPT->AddConstProperty("DE_LONGITUDINALSPREAD", 4e-6 * mm2 / ns); + DriftGasMaterial->SetMaterialPropertiesTable(MPT); + G4MaterialPropertiesTable* MPT2 = new G4MaterialPropertiesTable(); + MPT2->AddConstProperty("DE_AMPLIFICATION", 1000); + MPT2->AddConstProperty("DE_ABSLENGTH", 1 * pc); Al->SetMaterialPropertiesTable(MPT2); +#endif m_SquareDetector = new G4LogicalVolume(sChamber, GasMaterial, "logic_Actar_Box", 0, 0, 0); m_logicGas = new G4LogicalVolume(sCage, DriftGasMaterial, "logic_Gas", 0, 0, 0); G4LogicalVolume* logicPad = new G4LogicalVolume(sPad, Cu, "logic_Pad", 0, 0, 0); diff --git a/NPSimulation/Detectors/Chio/Chio.cc b/NPSimulation/Detectors/Chio/Chio.cc index b1d3c77db7eb6ee0795928e906544bfeb622d4a7..f378c06ab68ea1409cccfdccf3456523e544a90f 100644 --- a/NPSimulation/Detectors/Chio/Chio.cc +++ b/NPSimulation/Detectors/Chio/Chio.cc @@ -142,6 +142,9 @@ G4LogicalVolume* Chio::BuildDetector() { G4Material* Mylar = MaterialManager::getInstance()->GetMaterialFromLibrary("Mylar"); G4MaterialPropertiesTable* MPT = new G4MaterialPropertiesTable(); + + G4MaterialPropertiesTable* MPT2 = new G4MaterialPropertiesTable(); +#if NPS_GEANT4_VERSION_MAJOR > 10 MPT->AddConstProperty("DE_PAIRENERGY", 30 * eV, true); // MPT->AddConstProperty("DE_AMPLIFICATION",1e4,true); MPT->AddConstProperty("DE_ABSLENGTH", 1 * pc, true); @@ -149,14 +152,22 @@ G4LogicalVolume* Chio::BuildDetector() { MPT->AddConstProperty("DE_TRANSVERSALSPREAD", 6e-5 * mm2 / ns, true); MPT->AddConstProperty("DE_LONGITUDINALSPREAD", 4e-5 * mm2 / ns, true); - CF4->SetMaterialPropertiesTable(MPT); - - G4MaterialPropertiesTable* MPT2 = new G4MaterialPropertiesTable(); MPT2->AddConstProperty("DE_YIELD", 1, true); MPT2->AddConstProperty("DE_AMPLIFICATION", 2, true); MPT2->AddConstProperty("DE_ABSLENGTH", 1 * pc, true); - +#else + MPT->AddConstProperty("DE_PAIRENERGY", 30 * eV); + // MPT->AddConstProperty("DE_AMPLIFICATION",1e4,true); + MPT->AddConstProperty("DE_ABSLENGTH", 1 * pc); + MPT->AddConstProperty("DE_DRIFTSPEED", 11 * cm / microsecond); + MPT->AddConstProperty("DE_TRANSVERSALSPREAD", 6e-5 * mm2 / ns); + MPT->AddConstProperty("DE_LONGITUDINALSPREAD", 4e-5 * mm2 / ns); + MPT2->AddConstProperty("DE_YIELD", 1); + MPT2->AddConstProperty("DE_AMPLIFICATION", 2); + MPT2->AddConstProperty("DE_ABSLENGTH", 1 * pc); +#endif Al->SetMaterialPropertiesTable(MPT2); + CF4->SetMaterialPropertiesTable(MPT); m_SquareDetector = new G4LogicalVolume(sChamber, Fe, "logic_Chio_Box", 0, 0, 0); G4LogicalVolume* logicGas = new G4LogicalVolume(sGas, CF4, "logic_Gas", 0, 0, 0);