WCSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WCSimLC.cc
Go to the documentation of this file.
1 #include "G4UnitsTable.hh"
2 #include "G4PhysicalConstants.hh"
3 #include "G4SystemOfUnits.hh"
4 
5 #include "WCSimLC.hh"
6 
7 #include "CLHEP/Units/SystemOfUnits.h"
8 #include "G4Material.hh"
9 #include "G4PVPlacement.hh"
10 #include "G4Box.hh"
11 #include "G4LogicalVolume.hh"
12 #include "G4Polycone.hh"
13 #include "G4Polyhedra.hh"
14 #include "G4OpticalSurface.hh"
15 #include "G4LogicalBorderSurface.hh"
16 #include "G4LogicalSkinSurface.hh"
17 #include "G4VisAttributes.hh"
18 
19 #include <vector>
20 using namespace std;
21 
22 G4OpticalSurface * WCSimLC::OpLCMirrorSurface = NULL;
23 
25  const G4String &name,
26  G4Material* bulkMaterial,
27  G4int LCType
28  ) : G4LogicalVolume(new G4Box("temp",10,10,10), bulkMaterial, name)
29 {
30 
31  a = 110*2.32;//millimeter; // smallest radius of LC
32  t = 50*2.32;//millimeter;
33  theta = 60*CLHEP::degree; // or convert as needed
34  costh = cos(theta);
35  sinth = sin(theta);
36  f = 0.5*(t*costh+a*sinth)+0.5*sqrt(a*a+t*t);
37  G4cout<<"THETA= "<<theta/CLHEP::degree<<G4endl;
38  G4cout<<"F= "<<f<<G4endl;
39 
40  rmin = a;
41  G4cout<<"*WCSimLC* Light collector enabled."<<G4endl;
42  if(LCType==2){
43  G4cout<<"*WCSimLC* Tsukada Mirror enabled."<<G4endl;
44  rmax = 320;//millimeter;// Tsukada
45  }
46  else if (LCType==1){
47  rmax = 139*2.32;//millimeter;// Winston
48  }
49 
50  n = 0;
51  thickness_mirror=5*mm;
52  LCOffset = 60 *mm;
53 
54  r = rmin;
55 
56  G4double rin[70], rout[70], z[70];
57 
58  while (1)
59  {
60  rin[n] = r;
61  rout[n] = rin[n] + thickness_mirror;//millimeter;
62  if(LCType==2){
63  z[n] = Tsukada_z_from_r(rin[n]);
64  }
65  else if (LCType==1){
66  z[n] = Winston_z_from_r(rin[n]);
67  }
68  //r = r + (4.*(2.636-r*0.0181));//millimeter;
69  r = r + 2;//millimeter;
70  if (r > rmax){
71  n=n-1;
72  break;
73  }
74  G4cout<<"*Tsukada* n= "<<n<<"; r= "<<rin[n]<<"; z= "<<z[n]<<G4endl;
75  n++;
76  }
77 
78  if ( OpLCMirrorSurface == NULL )
79  {
80  /*
81  OpLCMirrorSurface = new G4OpticalSurface("Mirror_opsurf");
82  OpLCMirrorSurface->SetFinish(polishedfrontpainted);
83  OpLCMirrorSurface->SetModel(glisur);
84  OpLCMirrorSurface->SetType(dielectric_metal);
85  OpLCMirrorSurface->SetPolish(0.999);
86  */
87 
88  OpLCMirrorSurface = new G4OpticalSurface("Mirror_opsurf");
89  OpLCMirrorSurface->SetType(dielectric_metal);
90  OpLCMirrorSurface->SetModel(unified);
91  //OpLCMirrorSurface->SetFinish(polishedfrontpainted);
92  OpLCMirrorSurface->SetFinish(polished);
93  OpLCMirrorSurface->SetSigmaAlpha(0);
94 
95  G4MaterialPropertiesTable* propMirror=
96  new G4MaterialPropertiesTable();
97 
98  const int NUMENTRIES_water = 60;
99  G4double ENERGY_water[NUMENTRIES_water] =
100  { 1.56962e-09*GeV, 1.58974e-09*GeV, 1.61039e-09*GeV, 1.63157e-09*GeV,
101  1.65333e-09*GeV, 1.67567e-09*GeV, 1.69863e-09*GeV, 1.72222e-09*GeV,
102  1.74647e-09*GeV, 1.77142e-09*GeV,1.7971e-09*GeV, 1.82352e-09*GeV,
103  1.85074e-09*GeV, 1.87878e-09*GeV, 1.90769e-09*GeV, 1.93749e-09*GeV,
104  1.96825e-09*GeV, 1.99999e-09*GeV, 2.03278e-09*GeV, 2.06666e-09*GeV,
105  2.10169e-09*GeV, 2.13793e-09*GeV, 2.17543e-09*GeV, 2.21428e-09*GeV,
106  2.25454e-09*GeV, 2.29629e-09*GeV, 2.33962e-09*GeV, 2.38461e-09*GeV,
107  2.43137e-09*GeV, 2.47999e-09*GeV, 2.53061e-09*GeV, 2.58333e-09*GeV,
108  2.63829e-09*GeV, 2.69565e-09*GeV, 2.75555e-09*GeV, 2.81817e-09*GeV,
109  2.88371e-09*GeV, 2.95237e-09*GeV, 3.02438e-09*GeV, 3.09999e-09*GeV,
110  3.17948e-09*GeV, 3.26315e-09*GeV, 3.35134e-09*GeV, 3.44444e-09*GeV,
111  3.54285e-09*GeV, 3.64705e-09*GeV, 3.75757e-09*GeV, 3.87499e-09*GeV,
112  3.99999e-09*GeV, 4.13332e-09*GeV, 4.27585e-09*GeV, 4.42856e-09*GeV,
113  4.59258e-09*GeV, 4.76922e-09*GeV, 4.95999e-09*GeV, 5.16665e-09*GeV,
114  5.39129e-09*GeV, 5.63635e-09*GeV, 5.90475e-09*GeV, 6.19998e-09*GeV };
115 
116  G4double REF_mirror = 0.9;
117 
118  G4double REFLECTIVITY_mirror[NUMENTRIES_water] =
119  { REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror,
120  REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror,
121  REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror,
122  REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror,
123  REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror,
124  REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror,
125  REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror,
126  REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror,
127  REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror,
128  REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror, REF_mirror};
129 
130  propMirror->AddProperty("REFLECTIVITY", ENERGY_water, REFLECTIVITY_mirror, NUMENTRIES_water);
131 
132  /*
133  propMirror->AddProperty("REFLECTIVITY", new G4MaterialPropertyVector());
134  propMirror->AddEntry("REFLECTIVITY", 2*M_PI*CLHEP::hbarc/(800.0e-9*CLHEP::m), 0.9);
135  propMirror->AddEntry("REFLECTIVITY", 2*M_PI*CLHEP::hbarc/(200.0e-9*CLHEP::m), 0.9);
136  */
137  OpLCMirrorSurface->SetMaterialPropertiesTable( propMirror );
138  }
139 
140  G4cout<<"N= "<<n<<G4endl;
141 
142  G4Polycone *conc_solid = new G4Polycone(name+"_plastic", 0, 2*M_PI, n, z,
143  rin,
144  rout);
145 
146  SetSolid(conc_solid);
147  SetName(name+"_plastic");
148 
149  new G4LogicalSkinSurface(name+"_conc_surface",this, OpLCMirrorSurface);
150 
151  G4VisAttributes* visAtt= new G4VisAttributes(G4Color(1.0,1.0,0.,1.0));
152  visAtt->SetForceSolid(true);
153 
154 }
155 
157 {
159 }
160 
162 {
163  return rmax;
164 }
165 
167 {
168  return LCOffset;
169 }
170 
171 G4double WCSimLC::Winston_z_from_r (double radius)
172 {
173  G4double z2;
174 
175  z2 = (2*f-radius*costh)*costh-2*sqrt(f*(f-radius*sinth));
176  z2 = z2/(sinth*sinth) + t;
177  return z2;
178 }
179 
180 /* 2018Oct mirror, by Tsukada-san */
181 G4double WCSimLC::Tsukada_z_from_r (double radius)
182 {
183  G4double offset = 62.3;
184  radius = radius * 3./5.;
185  G4double par[5] = {0.0000435759,0.00000830419,-0.00003567787,-0.01320270214,0.00526226472};
186  G4double z2;
187  z2 =((-par[2]*radius-par[4])/(2*par[1])-sqrt((((par[2]*radius+par[4])*(par[2]*radius+par[4]))/(2*par[1]*2*par[1]))-((par[0]*radius*radius+par[3]*radius+1)/par[1])));
188  z2 = z2 * 5./3.;
189 
190  return z2 + offset;
191 }
192 
194 {
195  this->SetVisAttributes(G4VisAttributes::Invisible);
196 
197 }
G4double thickness_mirror
Definition: WCSimLC.hh:27
WCSimLC(const G4String &name, G4Material *bulkMaterial, G4int LCType)
Definition: WCSimLC.cc:24
G4double rmax
Definition: WCSimLC.hh:26
G4double theta
Definition: WCSimLC.hh:25
G4double GetRadius()
Definition: WCSimLC.cc:161
void SetInvisible()
Definition: WCSimLC.cc:193
G4double Tsukada_z_from_r(double radius)
Definition: WCSimLC.cc:181
G4double GetOffset()
Definition: WCSimLC.cc:166
G4double a
Definition: WCSimLC.hh:25
G4double sinth
Definition: WCSimLC.hh:25
G4double t
Definition: WCSimLC.hh:25
G4double r
Definition: WCSimLC.hh:26
G4double GetHeight()
Definition: WCSimLC.cc:156
G4int n
Definition: WCSimLC.hh:29
G4double Winston_z_from_r(double r)
Definition: WCSimLC.cc:171
static G4OpticalSurface * OpLCMirrorSurface
Definition: WCSimLC.hh:37
G4double f
Definition: WCSimLC.hh:25
G4double costh
Definition: WCSimLC.hh:25
G4double LCOffset
Definition: WCSimLC.hh:28
G4double rmin
Definition: WCSimLC.hh:26