5 #include <Geant4/G4Box.hh>
6 #include <Geant4/G4Color.hh>
7 #include <Geant4/G4LogicalVolume.hh>
8 #include <Geant4/G4Material.hh>
9 #include <Geant4/G4PVPlacement.hh>
10 #include <Geant4/G4RotationMatrix.hh>
11 #include <Geant4/G4String.hh>
12 #include <Geant4/G4SystemOfUnits.hh>
13 #include <Geant4/G4ThreeVector.hh>
14 #include <Geant4/G4Transform3D.hh>
15 #include <Geant4/G4VisAttributes.hh>
47 cout <<
"constructing DIRC" << endl;
48 double cb_DIRC_bars_DZ = 340 *
cm;
49 double cb_DIRC_bars_DY = 42. *
cm;
50 double cb_DIRC_bars_DX = 1.7 *
cm;
51 double dR = 83.65 *
cm;
52 double myL = 2 *
M_PI * dR;
53 int NUM = myL / cb_DIRC_bars_DY;
54 double cb_DIRC_bars_deltaphi = 2 *
M_PI / NUM;
55 string solidname =
"cb_DIRC_bars_Solid";
56 G4VSolid *solid =
new G4Box(solidname, cb_DIRC_bars_DX / 2., cb_DIRC_bars_DY / 2., cb_DIRC_bars_DZ / 2.);
57 string logicname =
"cb_DIRC_bars_Logic";
62 for (
int ia = 0; ia < NUM; ia++)
64 double phi = (ia * (cb_DIRC_bars_deltaphi));
65 double x = -dR * cos(phi);
66 double y = -dR * sin(phi);
68 rot.
rotateZ(cb_DIRC_bars_deltaphi * ia);
69 string physname =
"cb_DIRC_bars_Phys_" +
to_string(ia);
80 cout <<
"JLeic DIRC Detector:" << endl;
81 if (what ==
"ALL" || what ==
"VOLUME")
83 cout <<
"Version 0.1" << endl;