22 #include <phgeom/PHGeomUtility.h>
26 #include <phfield/PHFieldConfigv1.h>
27 #include <phfield/PHFieldConfigv2.h>
28 #include <phfield/PHFieldUtility.h>
43 #include <eicphysicslist/EICPhysicsList.hh>
47 #include <CLHEP/Random/Random.h>
49 #include <Geant4/G4Cerenkov.hh>
50 #include <Geant4/G4Scintillation.hh>
51 #include <Geant4/G4Element.hh>
52 #include <Geant4/G4EventManager.hh>
53 #include <Geant4/G4HadronicProcessStore.hh>
54 #include <Geant4/G4IonisParamMat.hh>
55 #include <Geant4/G4LossTableManager.hh>
56 #include <Geant4/G4Material.hh>
57 #include <Geant4/G4MaterialPropertiesTable.hh>
58 #include <Geant4/G4MaterialPropertyVector.hh>
59 #include <Geant4/G4NistManager.hh>
60 #include <Geant4/G4OpAbsorption.hh>
61 #include <Geant4/G4OpBoundaryProcess.hh>
62 #include <Geant4/G4OpMieHG.hh>
63 #include <Geant4/G4OpRayleigh.hh>
64 #include <Geant4/G4OpWLS.hh>
65 #include <Geant4/G4OpticalPhoton.hh>
66 #include <Geant4/G4ParticleDefinition.hh>
67 #include <Geant4/G4ParticleTable.hh>
68 #include <Geant4/G4PhotoElectricEffect.hh>
69 #include <Geant4/G4ProcessManager.hh>
70 #include <Geant4/G4ProductionCuts.hh>
71 #include <Geant4/G4Region.hh>
72 #include <Geant4/G4RegionStore.hh>
73 #include <Geant4/G4RunManager.hh>
74 #include <Geant4/G4StepLimiterPhysics.hh>
75 #include <Geant4/G4String.hh>
76 #include <Geant4/G4SystemOfUnits.hh>
77 #include <Geant4/G4Types.hh>
78 #include <Geant4/G4UIExecutive.hh>
79 #include <Geant4/G4UImanager.hh>
80 #include <Geant4/G4UImessenger.hh>
81 #include <Geant4/G4VModularPhysicsList.hh>
82 #include <Geant4/G4Version.hh>
83 #include <Geant4/G4VisExecutive.hh>
84 #include <Geant4/G4VisManager.hh>
87 #include <Geant4/FTFP_BERT.hh>
88 #include <Geant4/FTFP_BERT_HP.hh>
89 #include <Geant4/FTFP_INCLXX.hh>
90 #include <Geant4/FTFP_INCLXX_HP.hh>
91 #include <Geant4/QGSP_BERT.hh>
92 #include <Geant4/QGSP_BERT_HP.hh>
93 #include <Geant4/QGSP_BIC.hh>
94 #include <Geant4/QGSP_BIC_HP.hh>
95 #include <Geant4/QGSP_INCLXX.hh>
96 #include <Geant4/QGSP_INCLXX_HP.hh>
98 #include <boost/filesystem.hpp>
108 class G4TrackingManager;
109 class G4VPhysicalVolume;
120 , m_MagneticFieldRescale(1.0)
122 , m_RunManager(nullptr)
123 , m_UISession(nullptr)
124 , m_Detector(nullptr)
125 , m_EventAction(nullptr)
126 , m_SteppingAction(nullptr)
127 , m_TrackingAction(nullptr)
128 , m_DisplayAction(nullptr)
129 , m_GeneratorAction(nullptr)
130 , m_VisManager(nullptr)
132 , m_UImanager(nullptr)
135 , m_FieldMapFile(
"NONE")
136 , m_WorldShape(
"G4Tubs")
137 , m_WorldMaterial(
"G4_AIR")
138 #if G4VERSION_NUMBER >= 1033
139 , m_PhysicsList(
"FTFP_BERT")
141 , m_PhysicsList(
"QGSP_BERT")
143 , m_ActiveDecayerFlag(
true)
144 , m_ActiveForceDecayFlag(
false)
145 , m_ForceDecayType(
kAll)
146 , m_SaveDstGeometryFlag(
true)
147 , m_disableUserActions(
false)
149 for (
int i = 0; i < 3; i++)
179 cout <<
"========================= PHG4Reco::Init() ================================" << endl;
185 if (
Verbosity() > 1) cout <<
"PHG4Reco::Init - create run manager" << endl;
191 G4UImanager *uimanager = G4UImanager::GetUIpointer();
201 G4VModularPhysicsList *myphysicslist =
nullptr;
204 myphysicslist =
new FTFP_BERT(
Verbosity());
208 setenv(
"AllowForHeavyElements",
"1", 1);
209 myphysicslist =
new FTFP_BERT_HP(
Verbosity());
213 myphysicslist =
new FTFP_INCLXX(
Verbosity());
217 setenv(
"AllowForHeavyElements",
"1", 1);
218 myphysicslist =
new FTFP_INCLXX_HP(
Verbosity());
222 myphysicslist =
new QGSP_BERT(
Verbosity());
226 setenv(
"AllowForHeavyElements",
"1", 1);
227 myphysicslist =
new QGSP_BERT_HP(
Verbosity());
231 myphysicslist =
new QGSP_BIC(
Verbosity());
235 setenv(
"AllowForHeavyElements",
"1", 1);
236 myphysicslist =
new QGSP_BIC_HP(
Verbosity());
240 myphysicslist =
new QGSP_INCLXX(
Verbosity());
244 setenv(
"AllowForHeavyElements",
"1", 1);
245 myphysicslist =
new QGSP_INCLXX_HP(
Verbosity());
253 cout <<
"Physics List " <<
m_PhysicsList <<
" not implemented" << endl;
265 myphysicslist->RegisterPhysics(decayer);
267 myphysicslist->RegisterPhysics(
new G4StepLimiterPhysics());
270 myphysicslist->SetCutsWithDefault();
274 #if G4VERSION_NUMBER >= 1033
275 G4EmSaturation *emSaturation = G4LossTableManager::Instance()->EmSaturation();
278 cout <<
PHWHERE <<
"Could not initialize EmSaturation, Birks constants will fail" << endl;
289 cout <<
"===========================================================================" << endl;
296 if (
Verbosity() > 1) cout <<
"PHG4Reco::InitField - create magnetic field setup" << endl;
298 unique_ptr<PHFieldConfig> default_field_cfg(
nullptr);
309 if (
Verbosity() > 1) cout <<
"PHG4Reco::InitField - create magnetic field setup" << endl;
329 static int InitRunDone = 0;
337 cout <<
"========================= PHG4Reco::InitRun() ================================" << endl;
356 const int field_ret =
InitField(topNode);
359 cout <<
"PHG4Reco::InitRun- Error - Failed field init with status = " << field_ret << endl;
368 cout <<
"PHG4Reco::InitRun - " << reco->Name() <<
"->InitRun" << endl;
370 reco->InitRun(topNode);
376 if (
Verbosity() > 1) cout <<
"PHG4Reco::Init - create detector" << endl;
387 if (g4sub->GetDetector())
396 cout <<
"PHG4Reco::InitRun - WARNING - event/track/stepping action disabled! "
397 <<
"This is aimed to reduce resource consumption for G4 running only. E.g. dose analysis. "
398 <<
"Meanwhile, it will disable all Geant4 based analysis. Toggle this feature on/off with PHG4Reco::setDisableUserActions()" << endl;
428 cout <<
"Adding steppingaction for " << g4sub->Name() << endl;
434 if (not m_disableUserActions)
448 cout <<
"Adding steppingaction for " << g4sub->Name() << endl;
455 if (not m_disableUserActions)
467 if (g4sub->GetTrackingAction())
470 if (G4TrackingManager *trackingManager = G4EventManager::GetEventManager()->GetTrackingManager())
472 g4sub->GetTrackingAction()->SetTrackingManagerPointer(trackingManager);
477 if (not m_disableUserActions)
487 G4Cerenkov *theCerenkovProcess =
new G4Cerenkov(
"Cerenkov");
489 G4Scintillation* theScintillationProcess =
new G4Scintillation(
"Scintillation");
498 theCerenkovProcess->SetMaxNumPhotonsPerStep(300);
499 theCerenkovProcess->SetMaxBetaChangePerStep(10.0);
500 theCerenkovProcess->SetTrackSecondariesFirst(
false);
502 theScintillationProcess->SetScintillationYieldFactor(1.0);
503 theScintillationProcess->SetTrackSecondariesFirst(
false);
511 G4ParticleTable *theParticleTable = G4ParticleTable::GetParticleTable();
512 G4ParticleTable::G4PTblDicIterator *_theParticleIterator;
513 _theParticleIterator = theParticleTable->GetIterator();
514 _theParticleIterator->reset();
515 while ((*_theParticleIterator)())
517 G4ParticleDefinition *
particle = _theParticleIterator->value();
518 G4String particleName = particle->GetParticleName();
519 G4ProcessManager *pmanager = particle->GetProcessManager();
520 if (theCerenkovProcess->IsApplicable(*particle))
522 pmanager->AddProcess(theCerenkovProcess);
523 pmanager->SetProcessOrdering(theCerenkovProcess, idxPostStep);
525 if (theScintillationProcess->IsApplicable(*particle))
527 pmanager->AddProcess(theScintillationProcess);
528 pmanager->SetProcessOrderingToLast(theScintillationProcess, idxAtRest);
529 pmanager->SetProcessOrderingToLast(theScintillationProcess, idxPostStep);
533 g4sub->AddProcesses(particle);
536 G4ProcessManager *pmanager = G4OpticalPhoton::OpticalPhoton()->GetProcessManager();
538 pmanager->AddDiscreteProcess(
new G4OpAbsorption());
539 pmanager->AddDiscreteProcess(
new G4OpRayleigh());
540 pmanager->AddDiscreteProcess(
new G4OpMieHG());
541 pmanager->AddDiscreteProcess(
new G4OpBoundaryProcess());
542 pmanager->AddDiscreteProcess(
new G4OpWLS());
543 pmanager->AddDiscreteProcess(
new G4PhotoElectricEffect());
553 G4HadronicProcessStore::Instance()->SetVerbose(0);
554 G4LossTableManager::Instance()->SetVerbose(1);
565 cout <<
"PHG4Reco::InitRun - export geometry to DST via tmp file " << filename << endl;
576 cout <<
"===========================================================================" << endl;
609 char *
args[] = {(
char *) (
"root.exe")};
610 G4UIExecutive *ui =
new G4UIExecutive(1, args);
612 m_UImanager->ApplyCommand(
"/control/execute init_gui_vis.mac");
635 PHG4InEvent *ineve = findNode::getClass<PHG4InEvent>(topNode,
"PHG4INEVENT");
641 cout <<
"PHG4Reco::process_event - " << reco->Name() <<
"->process_event" << endl;
645 reco->process_event(topNode);
647 catch (
const exception &
e)
649 cout <<
PHWHERE <<
" caught exception thrown during process_event from "
650 << reco->Name() << endl;
651 cout <<
"error: " << e.what() << endl;
659 cout <<
" PHG4Reco::process_event - "
660 <<
"run one event :" << endl;
668 cout <<
" PHG4Reco::process_event - " << g4sub->Name() <<
"->process_after_geant" << endl;
671 g4sub->process_after_geant(topNode);
673 catch (
const exception &
e)
675 cout <<
PHWHERE <<
" caught exception thrown during process_after_geant from "
676 << g4sub->Name() << endl;
677 cout <<
"error: " << e.what() << endl;
688 reco->ResetEvent(topNode);
697 if (what.empty() || what ==
"ALL" || (reco->Name()).find(what) != string::npos)
699 cout <<
"Printing " << reco->Name() << endl;
701 cout <<
"---------------------------" << endl;
709 PHG4InEvent *ineve = findNode::getClass<PHG4InEvent>(topNode,
"PHG4INEVENT");
737 CLHEP::HepRandom::setTheSeed(i);
744 G4String symbol,
name;
746 G4double fractionmass,a;
747 G4int ncomponents, natoms,
z;
757 G4Material *quartz =
new G4Material(
"Quartz", density = 2.200 *
g /
cm3, ncomponents = 2);
758 quartz->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Si"), 1);
759 quartz->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), 2);
762 G4Material *cfrp_intt =
new G4Material(
"CFRP_INTT", density = 1.69 *
g /
cm3, ncomponents = 3);
763 cfrp_intt->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), 10);
764 cfrp_intt->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"H"), 6);
765 cfrp_intt->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), 1);
768 G4Material *PropyleneGlycol =
new G4Material(
"Propyleneglycol", 1.036 *
g /
cm3, 3);
769 PropyleneGlycol->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), 3);
770 PropyleneGlycol->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"H"), 8);
771 PropyleneGlycol->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), 2);
773 G4Material *WaterGlycol_INTT =
new G4Material(
"WaterGlycol_INTT", density = (0.997 * 0.7 + 1.036 * 0.3) *
g /
cm3, ncomponents = 2);
774 WaterGlycol_INTT->AddMaterial(PropyleneGlycol, fractionmass = 0.30811936);
775 WaterGlycol_INTT->AddMaterial(G4NistManager::Instance()->FindOrBuildMaterial(
"G4_WATER"), fractionmass = 0.69188064);
778 G4Material *rohacell_foam_110 =
new G4Material(
"ROHACELL_FOAM_110", density = 0.110 *
g /
cm3, ncomponents = 4);
779 rohacell_foam_110->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), 8);
780 rohacell_foam_110->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"H"), 11);
781 rohacell_foam_110->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), 2);
782 rohacell_foam_110->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"N"), 1);
786 G4Material *rohacell_foam_51 =
new G4Material(
"ROHACELL_FOAM_51", density = 0.052 *
g /
cm3, ncomponents = 4);
787 rohacell_foam_51->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), 8);
788 rohacell_foam_51->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"H"), 11);
789 rohacell_foam_51->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), 2);
790 rohacell_foam_51->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"N"), 1);
794 G4Material *peek =
new G4Material(
"PEEK", density = 1.32 *
g /
cm3, ncomponents = 3);
795 peek->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), 19);
796 peek->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"H"), 12);
797 peek->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), 3);
799 G4Material *cf =
new G4Material(
"CF", density = 1.62 *
g /
cm3, ncomponents = 1);
800 cf->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), 1.);
802 G4Material *cf30_peek70 =
new G4Material(
"CF30_PEEK70", density = (1.32 * 0.7 + 1.62 * 0.3) *
g /
cm3, ncomponents = 2);
803 cf30_peek70->AddMaterial(cf, fractionmass = 0.34468085);
804 cf30_peek70->AddMaterial(peek, fractionmass = 0.65531915);
807 G4Material *IsoButane =
new G4Material(
"Isobutane", 0.00265 *
g /
cm3, 2);
808 IsoButane->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), 4);
809 IsoButane->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"H"), 10);
811 G4Material *MuIDgas =
new G4Material(
"MuIDgas", density = (1.977
e-3 * 0.92 + 0.00265 * 0.08) *
g /
cm3, ncomponents = 2);
812 MuIDgas->AddMaterial(IsoButane, fractionmass = 0.08);
813 MuIDgas->AddMaterial(G4NistManager::Instance()->FindOrBuildMaterial(
"G4_CARBON_DIOXIDE"), fractionmass = 0.92);
816 G4Material *StainlessSteel =
817 new G4Material(
"SS304", density = 7.9 *
g /
cm3, ncomponents = 8);
818 StainlessSteel->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Fe"), 0.70105);
819 StainlessSteel->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Cr"), 0.18);
820 StainlessSteel->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Ni"), 0.09);
821 StainlessSteel->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Mn"), 0.02);
822 StainlessSteel->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), 0.0007);
823 StainlessSteel->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"S"), 0.0003);
824 StainlessSteel->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Si"), 0.0075);
825 StainlessSteel->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"P"), 0.00045);
828 new G4Material(
"SS310", density = 8.0 *
g /
cm3, ncomponents = 8);
829 SS310->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Fe"), 0.50455);
830 SS310->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Cr"), 0.25);
831 SS310->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Ni"), 0.20);
832 SS310->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Mn"), 0.02);
833 SS310->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), 0.0025);
834 SS310->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"S"), 0.015);
835 SS310->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Si"), 0.0075);
836 SS310->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"P"), 0.00045);
840 new G4Material(
"SS316", density = 8.0 *
g /
cm3, ncomponents = 9);
841 SS316->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Fe"), 0.68095);
842 SS316->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Cr"), 0.16);
843 SS316->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Ni"), 0.11);
844 SS316->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Mn"), 0.02);
845 SS316->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Mo"), 0.02);
846 SS316->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), 0.0008);
847 SS316->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"S"), 0.0003);
848 SS316->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Si"), 0.0075);
849 SS316->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"P"), 0.00045);
852 new G4Material(
"Steel", density = 7.86 *
g /
cm3, ncomponents = 5);
853 Steel->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Fe"), 0.9834);
854 Steel->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Mn"), 0.014);
855 Steel->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), 0.0017);
856 Steel->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"S"), 0.00045);
857 Steel->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"P"), 0.00045);
860 G4Material *a36 =
new G4Material(
"Steel_A36", density = 7.85 *
g /
cm3, ncomponents = 5);
861 a36->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Fe"), 0.9824);
862 a36->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Cu"), 0.002);
863 a36->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), 0.0025);
864 a36->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Mn"), 0.0103);
865 a36->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Si"), 0.0028);
868 G4Material *steel_1006 =
new G4Material(
"Steel_1006", density = 7.872 *
g /
cm3, ncomponents = 2);
869 steel_1006->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Fe"), 0.996);
870 steel_1006->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Mn"), 0.004);
873 G4Material *Al5083 =
new G4Material(
"Al5083", density = 2.65 *
g /
cm3, ncomponents = 3);
874 Al5083->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Mn"), 0.004);
875 Al5083->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Mg"), 0.04);
876 Al5083->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Al"), 0.956);
879 G4Material *Al4046 =
new G4Material(
"Al4046", density = 2.66 *
g /
cm3, ncomponents = 3);
880 Al4046->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Al"), 0.897);
881 Al4046->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Si"), 0.1);
882 Al4046->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Mg"), 0.003);
885 G4Material *Al6061T6 =
new G4Material(
"Al6061T6", density = 2.70 *
g /
cm3, ncomponents = 4);
886 Al6061T6->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Al"), 0.975);
887 Al6061T6->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Si"), 0.008);
888 Al6061T6->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Mg"), 0.01);
889 Al6061T6->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Fe"), 0.007);
894 G4double density_e864 = (0.99 * 11.34 + 0.01 * 6.697) *
g /
cm3;
895 G4Material *absorber_e864 =
new G4Material(
"E864_Absorber", density_e864, 2);
896 absorber_e864->AddMaterial(G4NistManager::Instance()->FindOrBuildMaterial(
"G4_Pb"), 0.99);
897 absorber_e864->AddMaterial(G4NistManager::Instance()->FindOrBuildMaterial(
"G4_Sb"), 0.01);
899 G4Material *FPC =
new G4Material(
"FPC", 1.542 *
g /
cm3, 2);
900 FPC->AddMaterial(G4NistManager::Instance()->FindOrBuildMaterial(
"G4_Cu"), 0.0162);
901 FPC->AddMaterial(G4NistManager::Instance()->FindOrBuildMaterial(
"G4_KAPTON"), 0.9838);
904 G4Material *W_Epoxy =
new G4Material(
"W_Epoxy", density = 10.2 *
g /
cm3, ncomponents = 2);
905 W_Epoxy->AddMaterial(G4NistManager::Instance()->FindOrBuildMaterial(
"G4_W"), fractionmass = 0.5);
906 W_Epoxy->AddMaterial(G4NistManager::Instance()->FindOrBuildMaterial(
"G4_POLYSTYRENE"), fractionmass = 0.5);
911 G4Material *Epoxy =
new G4Material(
"Epoxy", 1.2 *
g /
cm3, ncomponents = 2);
912 Epoxy->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"H"), natoms = 2);
913 Epoxy->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), natoms = 2);
916 density = 1.86 *
g /
cm3;
917 G4Material *FR4 =
new G4Material(
"FR4", density, ncomponents = 2);
918 FR4->AddMaterial(quartz, fractionmass = 0.528);
919 FR4->AddMaterial(Epoxy, fractionmass = 0.472);
925 density = 29 *
kg /
m3;
926 G4Material *NOMEX =
new G4Material(
"NOMEX", density, ncomponents = 4);
927 NOMEX->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), natoms = 14);
928 NOMEX->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"H"), natoms = 10);
929 NOMEX->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"N"), natoms = 2);
930 NOMEX->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), natoms = 2);
937 G4Material *Spacal_W_Epoxy =
938 new G4Material(
"Spacal_W_Epoxy", density = 12.18 *
g /
cm3, ncomponents = 3);
939 Spacal_W_Epoxy->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), 0.029);
940 Spacal_W_Epoxy->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"H"), 0.002);
941 Spacal_W_Epoxy->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"W"), 0.969);
948 new G4Material(
"PMMA", density = 1.19 *
g /
cm3, ncomponents = 3);
949 PMMA->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), 3.6 / (3.6 + 5.7 + 1.4));
950 PMMA->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"H"), 5.7 / (3.6 + 5.7 + 1.4));
951 PMMA->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), 1.4 / (3.6 + 5.7 + 1.4));
954 new G4Material(
"G10", density = 1.700 *
g /
cm3, ncomponents = 4);
955 G10->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Si"), natoms = 1);
956 G10->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), natoms = 2);
957 G10->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), natoms = 3);
958 G10->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"H"), natoms = 3);
961 new G4Material(
"CsI", density = 4.534 *
g /
cm3, ncomponents = 2);
962 CsI->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Cs"), natoms = 1);
963 CsI->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"I"), natoms = 1);
964 CsI->GetIonisation()->SetMeanExcitationEnergy(553.1 *
eV);
967 new G4Material(
"C4F10", density = 0.00973 *
g /
cm3, ncomponents = 2);
968 C4F10->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), natoms = 4);
969 C4F10->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"F"), natoms = 10);
971 G4Material *CF4 =
new G4Material(
"CF4", density = 3.72 * mg /
cm3, ncomponents = 2, kStateGas, 288.15 * kelvin, 1 * atmosphere);
972 CF4->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), natoms = 1);
973 CF4->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"F"), natoms = 4);
975 G4Element* elLu =
new G4Element(name=
"Lutetium", symbol=
"Lu", z=71., a=174.97*
g/mole);
976 G4Material *LSO =
new G4Material(
"LSO",
980 LSO->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Si"), natoms = 1);
981 LSO->AddElement(elLu, natoms = 2);
982 LSO->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), natoms = 5);
985 G4Material *SilverEpoxyGlue_INTT =
new G4Material(
"SilverEpoxyGlue_INTT", density = 3.2 *
g /
cm3, ncomponents = 2);
986 SilverEpoxyGlue_INTT->AddMaterial(Epoxy, fractionmass = 0.79);
987 SilverEpoxyGlue_INTT->AddMaterial(G4NistManager::Instance()->FindOrBuildMaterial(
"G4_Ag"), fractionmass = 0.21);
993 const double den_CF4 = CF4->GetDensity() * .1;
994 const double den_G4_Ar = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_Ar")->GetDensity() * .8;
995 const double den_G4_CARBON_DIOXIDE = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_CARBON_DIOXIDE")->GetDensity() * .1;
996 const double den = den_CF4 + den_G4_Ar + den_G4_CARBON_DIOXIDE;
998 G4Material *ePHEINX_TPC_Gas =
new G4Material(
"ePHEINX_TPC_Gas", den,
999 ncomponents = 3, kStateGas);
1000 ePHEINX_TPC_Gas->AddMaterial(CF4, den_CF4 / den);
1001 ePHEINX_TPC_Gas->AddMaterial(G4NistManager::Instance()->FindOrBuildMaterial(
"G4_Ar"), den_G4_Ar / den);
1002 ePHEINX_TPC_Gas->AddMaterial(G4NistManager::Instance()->FindOrBuildMaterial(
"G4_CARBON_DIOXIDE"),
1003 den_G4_CARBON_DIOXIDE / den);
1006 double G4_Ne_frac = 0.5;
1007 double CF4_frac = 0.5;
1008 const double den_G4_Ne = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_Ne")->GetDensity();
1009 const double den_CF4_2 = CF4->GetDensity();
1010 const double den_sphenix_tpc_gas = den_G4_Ne * G4_Ne_frac + den_CF4_2 * CF4_frac;
1011 G4Material *sPHENIX_tpc_gas =
new G4Material(
"sPHENIX_TPC_Gas", den_sphenix_tpc_gas, ncomponents = 2, kStateGas);
1012 sPHENIX_tpc_gas->AddMaterial(CF4, den_CF4_2 * CF4_frac / den_sphenix_tpc_gas);
1013 sPHENIX_tpc_gas->AddMaterial(G4NistManager::Instance()->FindOrBuildMaterial(
"G4_Ne"), den_G4_Ne * G4_Ne_frac / den_sphenix_tpc_gas);
1017 G4Material *SiO2AerogelQuartz =
new G4Material(
"ePHENIX_AerogelQuartz",
1018 2.200 *
g /
cm3, 2);
1019 SiO2AerogelQuartz->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Si"), 1);
1020 SiO2AerogelQuartz->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), 2);
1022 G4Material *AerogTypeA =
new G4Material(
"ePHENIX_AeroGel", 0.200 *
g /
cm3, 1);
1023 AerogTypeA->AddMaterial(G4NistManager::Instance()->FindOrBuildMaterial(
"ePHENIX_AerogelQuartz"),
1029 const G4int nEntries_CF4 = 50;
1031 G4double PhotonEnergy_CF4[nEntries_CF4] =
1032 {5.5 *
eV, 5.6 *
eV, 5.7 *
eV, 5.8 *
eV, 5.9 *
eV,
1033 6.0 *
eV, 6.1 *
eV, 6.2 *
eV, 6.3 *
eV, 6.4 *
eV,
1034 6.5 *
eV, 6.6 *
eV, 6.7 *
eV, 6.8 *
eV, 6.9 *
eV,
1035 7.0 *
eV, 7.1 *
eV, 7.2 *
eV, 7.3 *
eV, 7.4 *
eV,
1036 7.5 *
eV, 7.6 *
eV, 7.7 *
eV, 7.8 *
eV, 7.9 *
eV,
1037 8.0 *
eV, 8.1 *
eV, 8.2 *
eV, 8.4 *
eV, 8.6 *
eV,
1038 8.8 *
eV, 9.0 *
eV, 9.2 *
eV, 9.4 *
eV, 9.6 *
eV,
1039 9.8 *
eV, 10.0 *
eV, 10.2 *
eV, 10.4 *
eV, 10.6 *
eV,
1040 10.8 *
eV, 11.0 *
eV, 11.2 *
eV, 11.3 *
eV, 11.4 *
eV,
1041 11.5 *
eV, 11.6 *
eV, 11.7 *
eV, 11.8 *
eV, 11.9 *
eV};
1043 G4double RefractiveIndex_CF4[nEntries_CF4] =
1044 {1.000480, 1.000482, 1.000483, 1.000485, 1.000486,
1045 1.000488, 1.000490, 1.000491, 1.000493, 1.000495,
1046 1.000497, 1.000498, 1.000500, 1.000502, 1.000504,
1047 1.000506, 1.000508, 1.000510, 1.000512, 1.000514,
1048 1.000517, 1.000519, 1.000521, 1.000524, 1.000526,
1049 1.000529, 1.000531, 1.000534, 1.000539, 1.000545,
1050 1.000550, 1.000557, 1.000563, 1.000570, 1.000577,
1051 1.000584, 1.000592, 1.000600, 1.000608, 1.000617,
1052 1.000626, 1.000636, 1.000646, 1.000652, 1.000657,
1053 1.000662, 1.000667, 1.000672, 1.000677, 1.000682};
1055 G4double Absorption_CF4[nEntries_CF4] =
1056 {1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1057 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1058 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1059 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1060 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1061 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1062 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1063 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1064 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1065 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m};
1067 G4MaterialPropertiesTable *MPT_CF4 =
new G4MaterialPropertiesTable();
1069 MPT_CF4->AddProperty(
"RINDEX", PhotonEnergy_CF4, RefractiveIndex_CF4, nEntries_CF4)
1071 MPT_CF4->AddProperty(
"ABSLENGTH", PhotonEnergy_CF4, Absorption_CF4, nEntries_CF4)
1074 CF4->SetMaterialPropertiesTable(MPT_CF4);
1079 G4Material *g4_lif = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_LITHIUM_FLUORIDE");
1080 G4Material *LiF =
new G4Material(
"LiF", density = 2.635 *
g /
cm3, ncomponents = 2);
1081 LiF->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Li"), natoms = 1);
1082 LiF->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"F"), natoms = 1);
1086 cout <<
"g4_lif: " << g4_lif << endl;
1087 cout <<
"LiF: " << LiF << endl;
1090 const G4int nEntries_LiF = 50;
1092 G4double PhotonEnergy_LiF[nEntries_LiF] =
1093 {5.5 *
eV, 5.6 *
eV, 5.7 *
eV, 5.8 *
eV, 5.9 *
eV,
1094 6.0 *
eV, 6.1 *
eV, 6.2 *
eV, 6.3 *
eV, 6.4 *
eV,
1095 6.5 *
eV, 6.6 *
eV, 6.7 *
eV, 6.8 *
eV, 6.9 *
eV,
1096 7.0 *
eV, 7.1 *
eV, 7.2 *
eV, 7.3 *
eV, 7.4 *
eV,
1097 7.5 *
eV, 7.6 *
eV, 7.7 *
eV, 7.8 *
eV, 7.9 *
eV,
1098 8.0 *
eV, 8.1 *
eV, 8.2 *
eV, 8.4 *
eV, 8.6 *
eV,
1099 8.8 *
eV, 9.0 *
eV, 9.2 *
eV, 9.4 *
eV, 9.6 *
eV,
1100 9.8 *
eV, 10.0 *
eV, 10.2 *
eV, 10.4 *
eV, 10.6 *
eV,
1101 10.8 *
eV, 11.0 *
eV, 11.2 *
eV, 11.3 *
eV, 11.4 *
eV,
1102 11.5 *
eV, 11.6 *
eV, 11.7 *
eV, 11.8 *
eV, 11.9 *
eV};
1104 G4double RefractiveIndex_LiF[nEntries_LiF] =
1105 {1.42709, 1.42870, 1.42998, 1.43177, 1.43368,
1106 1.43520, 1.43736, 1.43907, 1.44088, 1.44279,
1107 1.44481, 1.44694, 1.44920, 1.45161, 1.45329,
1108 1.45595, 1.45781, 1.46077, 1.46285, 1.46503,
1109 1.46849, 1.47093, 1.47349, 1.47618, 1.47901,
1110 1.48198, 1.48511, 1.48841, 1.49372, 1.50152,
1111 1.50799, 1.51509, 1.52290, 1.53152, 1.54108,
1112 1.54805, 1.55954, 1.56799, 1.58202, 1.59243,
1113 1.60382, 1.61632, 1.63010, 1.63753, 1.64536,
1114 1.65363, 1.66236, 1.67159, 1.68139, 1.69178};
1116 G4double Absorption_LiF[nEntries_LiF] =
1117 {1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1118 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1119 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1120 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1121 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1122 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1123 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1124 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1125 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m,
1126 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m, 1.e4 *
m};
1128 G4MaterialPropertiesTable *MPT_LiF =
new G4MaterialPropertiesTable();
1130 MPT_LiF->AddProperty(
"RINDEX", PhotonEnergy_LiF, RefractiveIndex_LiF, nEntries_LiF)
1132 MPT_LiF->AddProperty(
"ABSLENGTH", PhotonEnergy_LiF, Absorption_LiF, nEntries_LiF)
1135 LiF->SetMaterialPropertiesTable(MPT_LiF);
1140 const G4int nEntries_CsI = 50;
1142 G4double PhotonEnergy_CsI[nEntries_CsI] =
1143 {5.5 *
eV, 5.6 *
eV, 5.7 *
eV, 5.8 *
eV, 5.9 *
eV,
1144 6.0 *
eV, 6.1 *
eV, 6.2 *
eV, 6.3 *
eV, 6.4 *
eV,
1145 6.5 *
eV, 6.6 *
eV, 6.7 *
eV, 6.8 *
eV, 6.9 *
eV,
1146 7.0 *
eV, 7.1 *
eV, 7.2 *
eV, 7.3 *
eV, 7.4 *
eV,
1147 7.5 *
eV, 7.6 *
eV, 7.7 *
eV, 7.8 *
eV, 7.9 *
eV,
1148 8.0 *
eV, 8.1 *
eV, 8.2 *
eV, 8.4 *
eV, 8.6 *
eV,
1149 8.8 *
eV, 9.0 *
eV, 9.2 *
eV, 9.4 *
eV, 9.6 *
eV,
1150 9.8 *
eV, 10.0 *
eV, 10.2 *
eV, 10.4 *
eV, 10.6 *
eV,
1151 10.8 *
eV, 11.0 *
eV, 11.2 *
eV, 11.3 *
eV, 11.4 *
eV,
1152 11.5 *
eV, 11.6 *
eV, 11.7 *
eV, 11.8 *
eV, 11.9 *
eV};
1154 G4double RefractiveIndex_CsI[nEntries_CsI] =
1155 {1., 1., 1., 1., 1.,
1164 1., 1., 1., 1., 1.};
1166 G4double Absorption_CsI[nEntries_CsI] =
1167 {0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m,
1168 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m,
1169 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m,
1170 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m,
1171 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m,
1172 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m,
1173 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m,
1174 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m,
1175 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m,
1176 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m, 0.0000001 *
m};
1178 G4MaterialPropertiesTable *MPT_CsI =
new G4MaterialPropertiesTable();
1180 MPT_CsI->AddProperty(
"RINDEX", PhotonEnergy_CsI, RefractiveIndex_CsI, nEntries_CsI)->SetSpline(
true);
1181 MPT_CsI->AddProperty(
"ABSLENGTH", PhotonEnergy_CsI, Absorption_CsI, nEntries_CsI)->SetSpline(
true);
1183 CsI->SetMaterialPropertiesTable(MPT_CsI);
1187 new G4Material(
"P10", density = 1.74 * mg /
cm3, ncomponents = 3);
1188 P10->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Ar"), fractionmass = 0.9222);
1189 P10->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), fractionmass = 0.0623);
1190 P10->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"H"), fractionmass = 0.0155);
1197 const int mRICH_nEntries_Air_Opt = 2;
1199 G4double mRICH_PhotonEnergy_Air_Opt[mRICH_nEntries_Air_Opt] = {2.034 *
eV, 4.136 *
eV};
1200 G4double mRICH_RefractiveIndex_Air_Opt[mRICH_nEntries_Air_Opt] = {1.00, 1.00};
1202 G4MaterialPropertiesTable *mRICH_Air_Opt_MPT =
new G4MaterialPropertiesTable();
1203 mRICH_Air_Opt_MPT->AddProperty(
"RINDEX", mRICH_PhotonEnergy_Air_Opt, mRICH_RefractiveIndex_Air_Opt, mRICH_nEntries_Air_Opt);
1205 G4Material *mRICH_Air_Opt =
new G4Material(
"mRICH_Air_Opt", density = 1.29 * mg /
cm3, ncomponents = 2);
1206 mRICH_Air_Opt->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"N"), fractionmass = 70. * perCent);
1207 mRICH_Air_Opt->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), fractionmass = 30. * perCent);
1208 mRICH_Air_Opt->SetMaterialPropertiesTable(mRICH_Air_Opt_MPT);
1211 const int mRICH_nEntries1 = 32;
1214 G4double mRICH_PhotonEnergy[mRICH_nEntries1] =
1215 {2.034 *
eV, 2.068 *
eV, 2.103 *
eV, 2.139 *
eV,
1216 2.177 *
eV, 2.216 *
eV, 2.256 *
eV, 2.298 *
eV,
1217 2.341 *
eV, 2.386 *
eV, 2.433 *
eV, 2.481 *
eV,
1218 2.532 *
eV, 2.585 *
eV, 2.640 *
eV, 2.697 *
eV,
1219 2.757 *
eV, 2.820 *
eV, 2.885 *
eV, 2.954 *
eV,
1220 3.026 *
eV, 3.102 *
eV, 3.181 *
eV, 3.265 *
eV,
1221 3.353 *
eV, 3.446 *
eV, 3.545 *
eV, 3.649 *
eV,
1222 3.760 *
eV, 3.877 *
eV, 4.002 *
eV, 4.136 *
eV};
1224 G4double mRICH_AcRefractiveIndex[mRICH_nEntries1] =
1225 {1.4902, 1.4907, 1.4913, 1.4918, 1.4924,
1226 1.4930, 1.4936, 1.4942, 1.4948, 1.4954,
1227 1.4960, 1.4965, 1.4971, 1.4977, 1.4983,
1228 1.4991, 1.5002, 1.5017, 1.5017, 1.5017,
1229 1.5017, 1.5017, 1.5017, 1.5017, 1.5017,
1230 1.5017, 1.5017, 1.5017, 1.5017, 1.5017,
1233 G4double mRICH_AcAbsorption[mRICH_nEntries1] =
1234 {25.25 *
cm, 25.25 *
cm, 25.25 *
cm, 25.25 *
cm,
1235 25.25 *
cm, 25.25 *
cm, 25.25 *
cm, 25.25 *
cm,
1236 25.25 *
cm, 25.25 *
cm, 25.25 *
cm, 25.25 *
cm,
1237 25.25 *
cm, 25.25 *
cm, 25.25 *
cm, 25.25 *
cm,
1238 25.25 *
cm, 25.25 *
cm, 25.25 *
cm, 25.25 *
cm,
1239 25.25 *
cm, 00.667 *
cm, 00.037 *
cm, 00.333 *
cm,
1240 00.001 *
cm, 00.001 *
cm, 00.001 *
cm, 00.001 *
cm,
1241 00.001 *
cm, 00.001 *
cm, 00.001 *
cm, 00.001 *
cm};
1243 G4MaterialPropertiesTable *mRICH_Ac_myMPT =
new G4MaterialPropertiesTable();
1244 mRICH_Ac_myMPT->AddProperty(
"RINDEX", mRICH_PhotonEnergy, mRICH_AcRefractiveIndex, mRICH_nEntries1);
1245 mRICH_Ac_myMPT->AddProperty(
"ABSLENGTH", mRICH_PhotonEnergy, mRICH_AcAbsorption, mRICH_nEntries1);
1247 G4Material *mRICH_Acrylic =
new G4Material(
"mRICH_Acrylic", density = 1.19 *
g /
cm3, ncomponents = 3);
1248 mRICH_Acrylic->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), natoms = 5);
1249 mRICH_Acrylic->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"H"), natoms = 8);
1250 mRICH_Acrylic->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), natoms = 2);
1251 mRICH_Acrylic->SetMaterialPropertiesTable(mRICH_Ac_myMPT);
1256 G4double mRICH_Agel1RefractiveIndex[mRICH_nEntries1] =
1257 {1.02435, 1.0244, 1.02445, 1.0245, 1.02455,
1258 1.0246, 1.02465, 1.0247, 1.02475, 1.0248,
1259 1.02485, 1.02492, 1.025, 1.02505, 1.0251,
1260 1.02518, 1.02522, 1.02530, 1.02535, 1.0254,
1261 1.02545, 1.0255, 1.02555, 1.0256, 1.02568,
1262 1.02572, 1.0258, 1.02585, 1.0259, 1.02595,
1265 G4double mRICH_Agel1Absorption[mRICH_nEntries1] =
1266 {3.448 *
m, 4.082 *
m, 6.329 *
m, 9.174 *
m, 12.346 *
m, 13.889 *
m,
1267 15.152 *
m, 17.241 *
m, 18.868 *
m, 20.000 *
m, 26.316 *
m, 35.714 *
m,
1268 45.455 *
m, 47.619 *
m, 52.632 *
m, 52.632 *
m, 55.556 *
m, 52.632 *
m,
1269 52.632 *
m, 47.619 *
m, 45.455 *
m, 41.667 *
m, 37.037 *
m, 33.333 *
m,
1270 30.000 *
m, 28.500 *
m, 27.000 *
m, 24.500 *
m, 22.000 *
m, 19.500 *
m,
1271 17.500 *
m, 14.500 *
m};
1273 G4double mRICH_Agel1Rayleigh[mRICH_nEntries1];
1275 const G4double AerogelTypeAClarity = 0.0020 * micrometer * micrometer * micrometer * micrometer /
cm;
1276 G4double Cparam = AerogelTypeAClarity *
cm / (micrometer * micrometer * micrometer * micrometer);
1277 G4double PhotMomWaveConv = 1239 *
eV *
nm;
1281 for (
int i = 0; i < mRICH_nEntries1; i++)
1283 G4double ephoton = mRICH_PhotonEnergy[i];
1285 G4double wphoton = (PhotMomWaveConv / ephoton) / (1000.0 * nm);
1286 mRICH_Agel1Rayleigh[i] = (std::pow(wphoton, 4)) / Cparam;
1290 G4MaterialPropertiesTable *mRICH_Agel1_myMPT =
new G4MaterialPropertiesTable();
1291 mRICH_Agel1_myMPT->AddProperty(
"RINDEX", mRICH_PhotonEnergy, mRICH_Agel1RefractiveIndex, mRICH_nEntries1);
1292 mRICH_Agel1_myMPT->AddProperty(
"ABSLENGTH", mRICH_PhotonEnergy, mRICH_Agel1Absorption, mRICH_nEntries1);
1293 mRICH_Agel1_myMPT->AddProperty(
"RAYLEIGH", mRICH_PhotonEnergy, mRICH_Agel1Rayleigh, mRICH_nEntries1);
1294 mRICH_Agel1_myMPT->AddConstProperty(
"SCINTILLATIONYIELD", 0. /
MeV);
1295 mRICH_Agel1_myMPT->AddConstProperty(
"RESOLUTIONSCALE", 1.0);
1297 G4Material *mRICH_Aerogel1 =
new G4Material(
"mRICH_Aerogel1", density = 0.02 *
g /
cm3, ncomponents = 2);
1298 mRICH_Aerogel1->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Si"), natoms = 1);
1299 mRICH_Aerogel1->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), natoms = 2);
1300 mRICH_Aerogel1->SetMaterialPropertiesTable(mRICH_Agel1_myMPT);
1303 const int mRICH_nEntries2 = 50;
1305 G4double mRICH_Agel2PhotonEnergy[mRICH_nEntries2] =
1306 {1.87855 *
eV, 1.96673 *
eV, 2.05490 *
eV, 2.14308 *
eV, 2.23126 *
eV,
1307 2.31943 *
eV, 2.40761 *
eV, 2.49579 *
eV, 2.58396 *
eV, 2.67214 *
eV,
1308 2.76032 *
eV, 2.84849 *
eV, 2.93667 *
eV, 3.02485 *
eV, 3.11302 *
eV,
1309 3.20120 *
eV, 3.28938 *
eV, 3.37755 *
eV, 3.46573 *
eV, 3.55391 *
eV,
1310 3.64208 *
eV, 3.73026 *
eV, 3.81844 *
eV, 3.90661 *
eV, 3.99479 *
eV,
1311 4.08297 *
eV, 4.17114 *
eV, 4.25932 *
eV, 4.34750 *
eV, 4.43567 *
eV,
1312 4.52385 *
eV, 4.61203 *
eV, 4.70020 *
eV, 4.78838 *
eV, 4.87656 *
eV,
1313 4.96473 *
eV, 5.05291 *
eV, 5.14109 *
eV, 5.22927 *
eV, 5.31744 *
eV,
1314 5.40562 *
eV, 5.49380 *
eV, 5.58197 *
eV, 5.67015 *
eV, 5.75833 *
eV,
1315 5.84650 *
eV, 5.93468 *
eV, 6.02286 *
eV, 6.11103 *
eV, 6.19921 *
eV};
1317 G4double mRICH_Agel2RefractiveIndex[mRICH_nEntries2] =
1318 {1.02825, 1.02829, 1.02834, 1.02839, 1.02844,
1319 1.02849, 1.02854, 1.02860, 1.02866, 1.02872,
1320 1.02878, 1.02885, 1.02892, 1.02899, 1.02906,
1321 1.02914, 1.02921, 1.02929, 1.02938, 1.02946,
1322 1.02955, 1.02964, 1.02974, 1.02983, 1.02993,
1323 1.03003, 1.03014, 1.03025, 1.03036, 1.03047,
1324 1.03059, 1.03071, 1.03084, 1.03096, 1.03109,
1325 1.03123, 1.03137, 1.03151, 1.03166, 1.03181,
1326 1.03196, 1.03212, 1.03228, 1.03244, 1.03261,
1327 1.03279, 1.03297, 1.03315, 1.03334, 1.03354};
1329 G4double mRICH_Agel2Absorption[mRICH_nEntries2] =
1330 {17.5000 *
cm, 17.7466 *
cm, 17.9720 *
cm, 18.1789 *
cm, 18.3694 *
cm,
1331 18.5455 *
cm, 18.7086 *
cm, 18.8602 *
cm, 19.0015 *
cm, 19.1334 *
cm,
1332 19.2569 *
cm, 19.3728 *
cm, 19.4817 *
cm, 19.5843 *
cm, 19.6810 *
cm,
1333 19.7725 *
cm, 19.8590 *
cm, 19.9410 *
cm, 20.0188 *
cm, 20.0928 *
cm,
1334 18.4895 *
cm, 16.0174 *
cm, 13.9223 *
cm, 12.1401 *
cm, 10.6185 *
cm,
1335 9.3147 *
cm, 8.1940 *
cm, 7.2274 *
cm, 6.3913 *
cm, 5.6659 *
cm,
1336 5.0347 *
cm, 4.4841 *
cm, 4.0024 *
cm, 3.5801 *
cm, 3.2088 *
cm,
1337 2.8817 *
cm, 2.5928 *
cm, 2.3372 *
cm, 2.1105 *
cm, 1.9090 *
cm,
1338 1.7296 *
cm, 1.5696 *
cm, 1.4266 *
cm, 1.2986 *
cm, 1.1837 *
cm,
1339 1.0806 *
cm, 0.9877 *
cm, 0.9041 *
cm, 0.8286 *
cm, 0.7603 *
cm};
1341 G4double mRICH_Agel2Rayleigh[mRICH_nEntries2] =
1342 {35.1384 *
cm, 29.24805 *
cm, 24.5418 *
cm, 20.7453 *
cm, 17.6553 *
cm,
1343 15.1197 *
cm, 13.02345 *
cm, 11.2782 *
cm, 9.81585 *
cm, 8.58285 *
cm,
1344 7.53765 *
cm, 6.6468 *
cm, 5.88375 *
cm, 5.22705 *
cm, 4.6596 *
cm,
1345 4.167 *
cm, 3.73785 *
cm, 3.36255 *
cm, 3.03315 *
cm, 2.7432 *
cm,
1346 2.487 *
cm, 2.26005 *
cm, 2.05845 *
cm, 1.87875 *
cm, 1.71825 *
cm,
1347 1.57455 *
cm, 1.44555 *
cm, 1.3296 *
cm, 1.2249 *
cm, 1.1304 *
cm,
1348 1.04475 *
cm, 0.9672 *
cm, 0.89655 *
cm, 0.83235 *
cm, 0.77385 *
cm,
1349 0.7203 *
cm, 0.67125 *
cm, 0.6264 *
cm, 0.58515 *
cm, 0.54735 *
cm,
1350 0.51255 *
cm, 0.48045 *
cm, 0.45075 *
cm, 0.4233 *
cm, 0.39795 *
cm,
1351 0.37455 *
cm, 0.3528 *
cm, 0.33255 *
cm, 0.3138 *
cm, 0.29625 *
cm};
1353 G4MaterialPropertiesTable *mRICH_Agel2MPT =
new G4MaterialPropertiesTable();
1354 mRICH_Agel2MPT->AddProperty(
"RINDEX", mRICH_Agel2PhotonEnergy, mRICH_Agel2RefractiveIndex, mRICH_nEntries2);
1355 mRICH_Agel2MPT->AddProperty(
"ABSLENGTH", mRICH_Agel2PhotonEnergy, mRICH_Agel2Absorption, mRICH_nEntries2);
1356 mRICH_Agel2MPT->AddProperty(
"RAYLEIGH", mRICH_Agel2PhotonEnergy, mRICH_Agel2Rayleigh, mRICH_nEntries2);
1357 mRICH_Agel2MPT->AddConstProperty(
"SCINTILLATIONYIELD", 0. /
MeV);
1358 mRICH_Agel2MPT->AddConstProperty(
"RESOLUTIONSCALE", 1.0);
1360 G4Material *mRICH_Aerogel2 =
new G4Material(
"mRICH_Aerogel2", density = 0.02 *
g /
cm3, ncomponents = 2);
1361 mRICH_Aerogel2->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Si"), natoms = 1);
1362 mRICH_Aerogel2->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), natoms = 2);
1363 mRICH_Aerogel2->SetMaterialPropertiesTable(mRICH_Agel2MPT);
1368 G4double mRICH_glassRefractiveIndex[mRICH_nEntries1] =
1369 {1.47, 1.47, 1.47, 1.47, 1.47,
1370 1.47, 1.47, 1.47, 1.47, 1.47,
1371 1.47, 1.47, 1.47, 1.47, 1.47,
1372 1.47, 1.47, 1.47, 1.47, 1.47,
1373 1.47, 1.47, 1.47, 1.47, 1.47,
1374 1.47, 1.47, 1.47, 1.47, 1.47,
1377 G4double mRICH_glassAbsorption[mRICH_nEntries1] =
1378 {4.25 *
cm, 4.25 *
cm, 4.25 *
cm, 4.25 *
cm,
1379 4.25 *
cm, 4.25 *
cm, 4.25 *
cm, 4.25 *
cm,
1380 4.25 *
cm, 4.25 *
cm, 4.25 *
cm, 4.25 *
cm,
1381 4.25 *
cm, 4.25 *
cm, 4.25 *
cm, 4.25 *
cm,
1382 4.25 *
cm, 4.25 *
cm, 4.25 *
cm, 4.25 *
cm,
1383 4.25 *
cm, 00.667 *
cm, 00.037 *
cm, 00.333 *
cm,
1384 00.001 *
cm, 00.001 *
cm, 00.001 *
cm, 00.001 *
cm,
1385 00.001 *
cm, 00.001 *
cm, 00.001 *
cm, 00.001 *
cm};
1387 G4MaterialPropertiesTable *mRICH_glass_myMPT =
new G4MaterialPropertiesTable();
1389 mRICH_glass_myMPT->AddProperty(
"RINDEX", mRICH_PhotonEnergy, mRICH_glassRefractiveIndex, mRICH_nEntries1);
1390 mRICH_glass_myMPT->AddProperty(
"ABSLENGTH", mRICH_PhotonEnergy, mRICH_glassAbsorption, mRICH_nEntries1);
1392 const G4Material *G4_Pyrex_Glass = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_Pyrex_Glass");
1393 G4Material *mRICH_Borosilicate =
new G4Material(
"mRICH_Borosilicate", G4_Pyrex_Glass->GetDensity(), G4_Pyrex_Glass, G4_Pyrex_Glass->GetState(), G4_Pyrex_Glass->GetTemperature(), G4_Pyrex_Glass->GetPressure());
1394 mRICH_Borosilicate->SetMaterialPropertiesTable(mRICH_glass_myMPT);
1399 G4double mRICH_AirRefractiveIndex[mRICH_nEntries1] =
1400 {1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
1401 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
1402 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
1403 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
1404 1.00, 1.00, 1.00, 1.00};
1406 G4MaterialPropertiesTable *mRICH_Air_myMPT =
new G4MaterialPropertiesTable();
1407 mRICH_Air_myMPT->AddProperty(
"RINDEX", mRICH_PhotonEnergy, mRICH_AirRefractiveIndex, mRICH_nEntries1);
1408 const G4Material *G4_AIR = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_AIR");
1409 G4Material *mRICH_Air =
new G4Material(
"mRICH_Air", G4_AIR->GetDensity(), G4_AIR, G4_AIR->GetState(), G4_AIR->GetTemperature(), G4_AIR->GetPressure());
1410 mRICH_Air->SetMaterialPropertiesTable(mRICH_Air_myMPT);
1437 if (subsys->Name() ==
name)
1441 cout <<
"Found Subsystem " << name << endl;
1446 cout <<
"Could not find Subsystem " << name << endl;
1473 cout <<
"Adding steppingaction for " << g4sub->Name() << endl;