Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions
WLSDetectorConstruction Class Reference

#include <WLSDetectorConstruction.hh>

Inheritance diagram for WLSDetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 WLSDetectorConstruction ()
 
virtual ~WLSDetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
G4VPhysicalVolumeConstructDetector ()
 
virtual void ConstructSDandField ()
 
void SetWorldMaterial (G4String)
 
void SetWLSFiberMaterial (G4String)
 
void SetCoupleMaterial (G4String)
 
void SetPhotonDetGeometry (G4String)
 
void SetNumberOfCladding (G4int)
 
void SetWLSLength (G4double)
 
void SetWLSRadius (G4double)
 
void SetClad1Radius (G4double)
 
void SetClad2Radius (G4double)
 
void SetPhotonDetHalfLength (G4double)
 
void SetGap (G4double)
 
void SetPhotonDetAlignment (G4double)
 
void SetXYRatio (G4double)
 
void SetSurfaceRoughness (G4double)
 
void SetMirrorReflectivity (G4double)
 
void SetMirrorPolish (G4double)
 
void SetPhotonDetReflectivity (G4double)
 
void SetPhotonDetPolish (G4double)
 
void SetMirror (G4bool)
 
void SetBarLength (G4double)
 
void SetBarBase (G4double)
 
void SetHoleRadius (G4double)
 
void SetCoatingThickness (G4double)
 
void SetCoatingRadius (G4double)
 
G4double GetWLSFiberLength ()
 
G4double GetWLSFiberEnd ()
 
G4double GetWLSFiberRMax ()
 
G4double GetSurfaceRoughness ()
 
G4bool IsPerfectFiber ()
 
G4double GetBarLength ()
 
G4double GetBarBase ()
 
G4double GetHoleRadius ()
 
G4double GetHoleLength ()
 
G4double GetFiberRadius ()
 
G4double GetCoatingThickness ()
 
G4double GetCoatingRadius ()
 
G4MaterialFindMaterial (G4String)
 
- Public Member Functions inherited from G4VUserDetectorConstruction
 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
virtual void CloneSD ()
 
virtual void CloneF ()
 
void RegisterParallelWorld (G4VUserParallelWorld *)
 
G4int ConstructParallelGeometries ()
 
void ConstructParallelSD ()
 
G4int GetNumberOfParallelWorld () const
 
G4VUserParallelWorldGetParallelWorld (G4int i) const
 

Static Public Member Functions

static G4RotationMatrix StringToRotationMatrix (G4String rotation)
 

Additional Inherited Members

- Protected Member Functions inherited from G4VUserDetectorConstruction
void SetSensitiveDetector (const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
 
void SetSensitiveDetector (G4LogicalVolume *logVol, G4VSensitiveDetector *aSD)
 

Detailed Description

Definition at line 60 of file WLSDetectorConstruction.hh.

Constructor & Destructor Documentation

WLSDetectorConstruction::WLSDetectorConstruction ( )

Definition at line 67 of file WLSDetectorConstruction.cc.

References python.hepunit::deg, python.hepunit::m, and python.hepunit::mm.

68  : fMaterials(NULL), fLogicHole(NULL), fLogicWorld(NULL),
69  fPhysiWorld(NULL), fPhysiHole(NULL)
70 {
71  fDetectorMessenger = new WLSDetectorMessenger(this);
72 
73  fNumOfCladLayers = 0;
74 
75  fSurfaceRoughness = 1;
76 
77  fMirrorToggle = true;
78  fMirrorPolish = 1.;
79  fMirrorReflectivity = 1.;
80 
81  fMPPCPolish = 1.;
82  fMPPCReflectivity = 0.;
83 
84  fExtrusionPolish = 1.;
85  fExtrusionReflectivity = 1.;
86 
87  fXYRatio = 1.0;
88 
89  fWLSfiberZ = 1.*m;
90  fWLSfiberRY = 0.5*mm;
91  fWLSfiberOrigin = 0.0;
92 
93  fMPPCShape = "Circle";
94  fMPPCHalfL = fWLSfiberRY;
95  fMPPCDist = 0.00*mm;
96  fMPPCTheta = 0.0*deg;
97  fMPPCZ = 0.05*mm;
98 
99  fClrfiberZ = fMPPCZ + 10.*nm;
100  fMirrorZ = 0.1*mm;
101 
102  fBarLength = 1.*m;
103  fBarBase = 9.6*mm;
104  fHoleRadius = 0.9*mm;
105  fHoleLength = fBarLength;
106  fCoatingThickness = 0.25*mm;
107  fCoatingRadius = 1.875*mm;
108 }
WLSDetectorConstruction::~WLSDetectorConstruction ( )
virtual

Definition at line 112 of file WLSDetectorConstruction.cc.

113 {
114  if (fDetectorMessenger) delete fDetectorMessenger;
115  if (fMaterials) delete fMaterials;
116 }

Member Function Documentation

G4VPhysicalVolume * WLSDetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 120 of file WLSDetectorConstruction.cc.

References G4PhysicalVolumeStore::Clean(), G4SolidStore::Clean(), G4LogicalVolumeStore::Clean(), G4LogicalSkinSurface::CleanSurfaceTable(), G4LogicalBorderSurface::CleanSurfaceTable(), ConstructDetector(), WLSMaterials::GetInstance(), G4PhysicalVolumeStore::GetInstance(), G4LogicalVolumeStore::GetInstance(), G4SolidStore::GetInstance(), G4GeometryManager::GetInstance(), and G4GeometryManager::OpenGeometry().

121 {
122  if (fPhysiWorld) {
129  }
130 
131  fMaterials = WLSMaterials::GetInstance();
132 
133  UpdateGeometryParameters();
134 
135  return ConstructDetector();
136 }
static void Clean()
Definition: G4SolidStore.cc:79
static G4PhysicalVolumeStore * GetInstance()
static G4LogicalVolumeStore * GetInstance()
static G4SolidStore * GetInstance()
static G4GeometryManager * GetInstance()
void OpenGeometry(G4VPhysicalVolume *vol=0)
static WLSMaterials * GetInstance()
Definition: WLSMaterials.cc:62
G4VPhysicalVolume * ConstructDetector()
G4VPhysicalVolume * WLSDetectorConstruction::ConstructDetector ( )

Definition at line 140 of file WLSDetectorConstruction.cc.

References python.hepunit::cm, python.hepunit::deg, dielectric_metal, python.hepunit::eV, FindMaterial(), GetBarBase(), GetBarLength(), GetCoatingRadius(), GetCoatingThickness(), GetFiberRadius(), GetHoleLength(), GetHoleRadius(), glisur, ground, CLHEP::HepRotation::inverse(), python.hepunit::mm, StringToRotationMatrix(), and test::x.

Referenced by Construct().

141 {
142  //--------------------------------------------------
143  // World
144  //--------------------------------------------------
145 
146  G4VSolid* solidWorld =
147  new G4Box("World", fWorldSizeX, fWorldSizeY, fWorldSizeZ);
148 
149  fLogicWorld = new G4LogicalVolume(solidWorld,
150  FindMaterial("G4_AIR"),
151  "World");
152 
153  fPhysiWorld = new G4PVPlacement(0,
154  G4ThreeVector(),
155  fLogicWorld,
156  "World",
157  0,
158  false,
159  0);
160 
161  //--------------------------------------------------
162  // Extrusion
163  //--------------------------------------------------
164 
165  G4VSolid* solidExtrusion =
166  new G4Box("Extrusion",GetBarBase()/2,GetBarBase()/2,GetBarLength()/2);
167 
168  G4LogicalVolume* logicExtrusion =
169  new G4LogicalVolume(solidExtrusion,
170  FindMaterial("Coating"),
171  "Extrusion");
172 
173  G4OpticalSurface* TiO2Surface = new G4OpticalSurface("TiO2Surface",
174  glisur,
175  ground,
177  fExtrusionPolish);
178 
179  G4MaterialPropertiesTable* TiO2SurfaceProperty =
181 
182  G4double p_TiO2[2] = {2.00*eV, 3.47*eV};
183  G4double refl_TiO2[2] = {fExtrusionReflectivity,fExtrusionReflectivity};
184  G4double effi_TiO2[2] = {0, 0};
185 
186  TiO2SurfaceProperty -> AddProperty("REFLECTIVITY",p_TiO2,refl_TiO2,2);
187  TiO2SurfaceProperty -> AddProperty("EFFICIENCY",p_TiO2,effi_TiO2,2);
188 
189  TiO2Surface -> SetMaterialPropertiesTable(TiO2SurfaceProperty);
190 
191  new G4PVPlacement(0,
192  G4ThreeVector(),
193  logicExtrusion,
194  "Extrusion",
195  fLogicWorld,
196  false,
197  0);
198 
199  new G4LogicalSkinSurface("TiO2Surface",logicExtrusion,TiO2Surface);
200 
201  //--------------------------------------------------
202  // Scintillator
203  //--------------------------------------------------
204 
205  G4VSolid* solidScintillator = new G4Box("Scintillator",
207  -GetCoatingRadius(),
209  -GetCoatingRadius(),
210  GetBarLength()/2);
211 
212  G4LogicalVolume* logicScintillator =
213  new G4LogicalVolume(solidScintillator,
214  FindMaterial("Polystyrene"),
215  "Scintillator");
216 
217  new G4PVPlacement(0,
218  G4ThreeVector(),
219  logicScintillator,
220  "Scintillator",
221  logicExtrusion,
222  false,
223  0);
224 
225  if (GetCoatingRadius() > 0.*mm) {
226  G4VSolid* solidScintside = new G4Box("SideOfBar",
228  -GetCoatingRadius(),
229  GetCoatingRadius()/2,
230  GetBarLength()/2);
231  G4VSolid* solidScintcrnr = new G4Tubs("CrnrOfBar",
232  0.0*cm,
234  GetBarLength()/2,
235  0.*deg,
236  90.*deg);
237  G4LogicalVolume* logicScintSide =
238  new G4LogicalVolume(solidScintside,
239  FindMaterial("Polystyrene"),
240  "SideOfBar");
241 
242  G4LogicalVolume* logicScintCrnr =
243  new G4LogicalVolume(solidScintcrnr,
244  FindMaterial("Polystyrene"),
245  "CrnrOfBar");
246 
249 
250  new G4PVPlacement(0,
251  G4ThreeVector(0,-y,0),
252  logicScintSide,
253  "SideOfBar",
254  logicExtrusion,
255  false,
256  0);
257  new G4PVPlacement(0,
258  G4ThreeVector(0, y,0),
259  logicScintSide,
260  "SideOfBar",
261  logicExtrusion,
262  false,
263  1);
264 
265  G4RotationMatrix* g4rot = new G4RotationMatrix();
266  *g4rot = StringToRotationMatrix("Z90");
267  *g4rot = g4rot->inverse();
268  if (*g4rot == G4RotationMatrix()) g4rot = NULL;
269 
270  new G4PVPlacement(g4rot,
271  G4ThreeVector(x,0,0),
272  logicScintSide,
273  "SideOfBar",
274  logicExtrusion,
275  false,
276  2);
277  new G4PVPlacement(g4rot,
278  G4ThreeVector(-x,0,0),
279  logicScintSide,
280  "SideOfBar",
281  logicExtrusion,
282  false,
283  3);
284 
287 
288  new G4PVPlacement(0,
289  G4ThreeVector(x,y,0),
290  logicScintCrnr,
291  "CrnrOfBar",
292  logicExtrusion,
293  false,
294  0);
295 
296  new G4PVPlacement(g4rot,
297  G4ThreeVector(-x,y,0),
298  logicScintCrnr,
299  "CrnrOfBar",
300  logicExtrusion,
301  false,
302  1);
303 
304  g4rot = new G4RotationMatrix();
305  *g4rot = StringToRotationMatrix("Z180");
306  *g4rot = g4rot->inverse();
307  if (*g4rot == G4RotationMatrix()) g4rot = NULL;
308 
309  new G4PVPlacement(g4rot,
310  G4ThreeVector(-x,-y,0),
311  logicScintCrnr,
312  "CrnrOfBar",
313  logicExtrusion,
314  false,
315  2);
316 
317  g4rot = new G4RotationMatrix();
318  *g4rot = StringToRotationMatrix("Z270");
319  *g4rot = g4rot->inverse();
320  if (*g4rot == G4RotationMatrix()) g4rot = NULL;
321 
322  new G4PVPlacement(g4rot,
323  G4ThreeVector(x,-y,0),
324  logicScintCrnr,
325  "CrnrOfBar",
326  logicExtrusion,
327  false,
328  3);
329 
330  }
331 
332  if (GetFiberRadius()<GetHoleRadius()) {
333 
334  G4VSolid* solidHole = new G4Tubs("Hole",
335  0.0*cm,
336  GetHoleRadius(),
337  GetHoleLength()/2,
338  0.*deg,
339  360.*deg);
340  fLogicHole = new G4LogicalVolume(solidHole,
341  FindMaterial("G4_AIR"),
342  "Hole");
343 
344  fPhysiHole = new G4PVPlacement(0,
345  G4ThreeVector(),
346  fLogicHole,
347  "Hole",
348  logicScintillator,
349  false,
350  0);
351  }
352 
353  //--------------------------------------------------
354  // Fiber
355  //--------------------------------------------------
356 
357  ConstructFiber();
358 
359  //--------------------------------------------------
360  // End of Construction
361  //--------------------------------------------------
362 
363  return fPhysiWorld;
364 }
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepRotation G4RotationMatrix
Definition: G4Box.hh:63
Definition: G4Tubs.hh:84
HepRotation inverse() const
static G4RotationMatrix StringToRotationMatrix(G4String rotation)
G4Material * FindMaterial(G4String)
double G4double
Definition: G4Types.hh:76
void WLSDetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 678 of file WLSDetectorConstruction.cc.

References G4Cache< VALTYPE >::Get(), G4Cache< VALTYPE >::Put(), and G4VUserDetectorConstruction::SetSensitiveDetector().

679 {
680  if (!fmppcSD.Get()) {
681  G4String mppcSDName = "WLS/PhotonDet";
682  WLSPhotonDetSD* mppcSD = new WLSPhotonDetSD(mppcSDName);
683  fmppcSD.Put(mppcSD);
684  }
685  SetSensitiveDetector("PhotonDet_LV", fmppcSD.Get(), true);
686 
687 }
value_type & Get() const
Definition: G4Cache.hh:253
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
void Put(const value_type &val) const
Definition: G4Cache.hh:257
G4Material * WLSDetectorConstruction::FindMaterial ( G4String  name)

Definition at line 1047 of file WLSDetectorConstruction.cc.

References G4Material::GetMaterial(), and eplot::material.

Referenced by ConstructDetector().

1047  {
1049  return material;
1050 }
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:578
string material
Definition: eplot.py:19
G4double WLSDetectorConstruction::GetBarBase ( )

Definition at line 989 of file WLSDetectorConstruction.cc.

Referenced by ConstructDetector().

989 { return fBarBase; }
G4double WLSDetectorConstruction::GetBarLength ( )

Definition at line 985 of file WLSDetectorConstruction.cc.

Referenced by ConstructDetector().

985 { return fBarLength; }
G4double WLSDetectorConstruction::GetCoatingRadius ( )

Definition at line 1010 of file WLSDetectorConstruction.cc.

Referenced by ConstructDetector().

1010 { return fCoatingRadius; }
G4double WLSDetectorConstruction::GetCoatingThickness ( )

Definition at line 1005 of file WLSDetectorConstruction.cc.

Referenced by ConstructDetector().

1006  { return fCoatingThickness; }
G4double WLSDetectorConstruction::GetFiberRadius ( )

Definition at line 1001 of file WLSDetectorConstruction.cc.

References GetWLSFiberRMax().

Referenced by ConstructDetector().

1001 { return GetWLSFiberRMax(); }
G4double WLSDetectorConstruction::GetHoleLength ( )

Definition at line 997 of file WLSDetectorConstruction.cc.

Referenced by ConstructDetector().

997 { return fHoleLength; }
G4double WLSDetectorConstruction::GetHoleRadius ( )

Definition at line 993 of file WLSDetectorConstruction.cc.

Referenced by ConstructDetector().

993 { return fHoleRadius; }
G4double WLSDetectorConstruction::GetSurfaceRoughness ( )

Definition at line 1030 of file WLSDetectorConstruction.cc.

1031 {
1032  return fSurfaceRoughness;
1033 }
G4double WLSDetectorConstruction::GetWLSFiberEnd ( )

Definition at line 1014 of file WLSDetectorConstruction.cc.

Referenced by WLSSteppingAction::UserSteppingAction().

1015 {
1016  return fWLSfiberOrigin + fWLSfiberZ;
1017 }
G4double WLSDetectorConstruction::GetWLSFiberLength ( )

Definition at line 981 of file WLSDetectorConstruction.cc.

981 { return fWLSfiberZ; }
G4double WLSDetectorConstruction::GetWLSFiberRMax ( )

Definition at line 1021 of file WLSDetectorConstruction.cc.

Referenced by GetFiberRadius().

1022 {
1023  if (fNumOfCladLayers == 2) return fClad2RY;
1024  if (fNumOfCladLayers == 1) return fClad1RY;
1025  return fWLSfiberRY;
1026 }
G4bool WLSDetectorConstruction::IsPerfectFiber ( )

Definition at line 1038 of file WLSDetectorConstruction.cc.

Referenced by WLSSteppingAction::UserSteppingAction().

1039 {
1040  return fSurfaceRoughness == 1. && fXYRatio == 1.
1041  && (!fMirrorToggle ||
1042  (fMirrorPolish == 1. && fMirrorReflectivity == 1.));
1043 }
void WLSDetectorConstruction::SetBarBase ( G4double  side)

Definition at line 945 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by WLSDetectorMessenger::SetNewValue().

947 {
948  fBarBase = side;
950 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetBarLength ( G4double  length)

Definition at line 936 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by WLSDetectorMessenger::SetNewValue().

938 {
939  fBarLength = length;
941 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetClad1Radius ( G4double  radius)

Definition at line 816 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

818 {
819  fClad1RY = radius;
821 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetClad2Radius ( G4double  radius)

Definition at line 825 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

827 {
828  fClad2RY = radius;
830 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetCoatingRadius ( G4double  radius)

Definition at line 972 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by WLSDetectorMessenger::SetNewValue().

974 {
975  fCoatingRadius = radius;
977 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetCoatingThickness ( G4double  thick)

Definition at line 963 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by WLSDetectorMessenger::SetNewValue().

965 {
966  fCoatingThickness = thick;
968 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetCoupleMaterial ( G4String  )
void WLSDetectorConstruction::SetGap ( G4double  gap)

Definition at line 844 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by WLSDetectorMessenger::SetNewValue().

846 {
847  fMPPCDist = gap;
849 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetHoleRadius ( G4double  radius)

Definition at line 954 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by WLSDetectorMessenger::SetNewValue().

956 {
957  fHoleRadius = radius;
959 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetMirror ( G4bool  flag)

Definition at line 915 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by WLSDetectorMessenger::SetNewValue().

918 {
919  fMirrorToggle = flag;
921 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetMirrorPolish ( G4double  polish)

Definition at line 875 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by WLSDetectorMessenger::SetNewValue().

878 {
879  fMirrorPolish = polish;
881 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetMirrorReflectivity ( G4double  reflectivity)

Definition at line 885 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

888 {
889  fMirrorReflectivity = reflectivity;
891 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetNumberOfCladding ( G4int  num)

Definition at line 788 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by WLSDetectorMessenger::SetNewValue().

791 {
792  fNumOfCladLayers = num;
794 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetPhotonDetAlignment ( G4double  theta)

Definition at line 853 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

858 {
859  fMPPCTheta = theta;
861 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetPhotonDetGeometry ( G4String  shape)

Definition at line 778 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by WLSDetectorMessenger::SetNewValue().

781 {
782  if (shape == "Circle" || shape == "Square" ) fMPPCShape = shape;
784 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetPhotonDetHalfLength ( G4double  halfL)

Definition at line 834 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

837 {
838  fMPPCHalfL = halfL;
840 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetPhotonDetPolish ( G4double  polish)

Definition at line 895 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by WLSDetectorMessenger::SetNewValue().

898 {
899  fMPPCPolish = polish;
901 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetPhotonDetReflectivity ( G4double  reflectivity)

Definition at line 905 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

908 {
909  fMPPCReflectivity = reflectivity;
911 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetSurfaceRoughness ( G4double  roughness)

Definition at line 865 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by WLSDetectorMessenger::SetNewValue().

868 {
869  fSurfaceRoughness = roughness;
871 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetWLSFiberMaterial ( G4String  )
void WLSDetectorConstruction::SetWLSLength ( G4double  length)

Definition at line 798 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by WLSDetectorMessenger::SetNewValue().

800 {
801  fWLSfiberZ = length;
803 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetWLSRadius ( G4double  radius)

Definition at line 807 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by WLSDetectorMessenger::SetNewValue().

809 {
810  fWLSfiberRY = radius;
812 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void WLSDetectorConstruction::SetWorldMaterial ( G4String  )
void WLSDetectorConstruction::SetXYRatio ( G4double  r)

Definition at line 925 of file WLSDetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by WLSDetectorMessenger::SetNewValue().

928 {
929  fXYRatio = r;
931 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
G4RotationMatrix WLSDetectorConstruction::StringToRotationMatrix ( G4String  rotation)
static

Definition at line 723 of file WLSDetectorConstruction.cc.

References python.hepunit::deg, G4cerr, and G4endl.

Referenced by ConstructDetector().

724 {
725  // We apply successive rotations OF THE OBJECT around the FIXED
726  // axes of the parent's local coordinates; rotations are applied
727  // left-to-right (rotation="r1,r2,r3" => r1 then r2 then r3).
728 
729  G4RotationMatrix rot;
730 
731  unsigned int place = 0;
732 
733  while (place < rotation.size()) {
734 
735  G4double angle;
736  char* p;
737 
738  const G4String tmpstring=rotation.substr(place+1);
739 
740  angle = strtod(tmpstring.c_str(),&p) * deg;
741 
742  if (!p || (*p != (char)',' && *p != (char)'\0')) {
743  G4cerr << "Invalid rotation specification: " <<
744  rotation.c_str() << G4endl;
745  return rot;
746  }
747 
748  G4RotationMatrix thisRotation;
749 
750  switch(rotation.substr(place,1).c_str()[0]) {
751  case 'X': case 'x':
752  thisRotation = G4RotationMatrix(CLHEP::HepRotationX(angle));
753  break;
754  case 'Y': case 'y':
755  thisRotation = G4RotationMatrix(CLHEP::HepRotationY(angle));
756  break;
757  case 'Z': case 'z':
758  thisRotation = G4RotationMatrix(CLHEP::HepRotationZ(angle));
759  break;
760  default:
761  G4cerr << " Invalid rotation specification: "
762  << rotation << G4endl;
763  return rot;
764  }
765 
766  rot = thisRotation * rot;
767  place = rotation.find(',',place);
768  if (place > rotation.size()) break;
769  ++place;
770  }
771 
772  return rot;
773 
774 }
CLHEP::HepRotation G4RotationMatrix
const char * p
Definition: xmltok.h:285
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4GLOB_DLL std::ostream G4cerr

The documentation for this class was generated from the following files: