QwGeant4
QweakSimTungstenPlug.cc
Go to the documentation of this file.
1 /**
2 
3  \file QweakSimTungstenPlug.cc
4 
5  \author Wouter Deconinck
6 
7 */
8 //=============================================================================
9 
10 #include "QweakSimTungstenPlug.hh"
12 
13 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
15 {
16  // W-Plug
17  TungstenPlugLogical = NULL;
18  TungstenPlugPhysical = NULL;
19 
20  // get access to material definition
22 
23  // TungstenPlug Material
24  TungstenPlug_Material = pMaterial->GetMaterial("G4_W"); // For now...I thought this was an alloy....
25 }
26 
27 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
29 
30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31 void QweakSimTungstenPlug::ConstructTungstenPlug(G4VPhysicalVolume* MotherVolume)
32 {
33  // Dimensions of W-plug
34  // Updated Numbers found on drawings provided by Greg Smith
35  // Page 13 of
36  G4double WPlugOD = 3.125*inch; // Outer Diameter of Plug
37  G4double WPlugID1 = 0.508*inch; // Front Face Inner Diameter
38  G4double WPlugID2 = 0.848*inch; // Rear Face Inner Diameter
39  G4double WPlugLength = 8.250*inch; // Full Length of Conical Section (Upstream end)
40  G4double ZLocation = -579.2895*cm+2.5*inch; // Global Z position of the center of the W Plug
41 
42  // Define Upstream W-plug
43  G4Cons* TungstenPlugSolid = new G4Cons("TungstenPlugSolid",
44  WPlugID1/2.0,
45  WPlugOD/2.0,
46  WPlugID2/2.0,
47  WPlugOD/2.0,
48  WPlugLength/2.0,
49  0,
50  360*degree);
51 
52  TungstenPlugLogical = new G4LogicalVolume(TungstenPlugSolid,
54  "TungstenPlugLogical");
55 
56  TungstenPlugPhysical = new G4PVPlacement(0,
57  G4ThreeVector(0.0,0.0,ZLocation), // plug position
58  "TungstenPlugPhysical",
60  MotherVolume,
61  false,
62  0,
63  pSurfChk);
64 
65  ////////////////////////////////////
66  // Define Visulization Attributes //
67  ////////////////////////////////////
68 
69  G4Colour red(1.,0.,0.);
70  G4VisAttributes* TungstenPlug_VisAtt = new G4VisAttributes(red);
71  TungstenPlug_VisAtt->SetVisibility(true);
72  TungstenPlugLogical->SetVisAttributes(TungstenPlug_VisAtt);
73 
74  ////////////////////////////////////
75  // Define Sensitive Detectors //
76  ////////////////////////////////////
77 
78  G4SDManager* SDman = G4SDManager::GetSDMpointer();
79 
80  TungstenPlugSD = new QweakSimTungstenPlug_DetectorSD("TungstenPlugSD");
81  SDman->AddNewDetector(TungstenPlugSD);
82  TungstenPlugLogical->SetSensitiveDetector(TungstenPlugSD);
83 
84 }
85 
86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
static QweakSimMaterial * GetInstance()
QweakSimTungstenPlug()
Constructor.
static const G4bool pSurfChk
G4VPhysicalVolume * TungstenPlugPhysical
G4VSensitiveDetector * TungstenPlugSD
static const G4double inch
G4LogicalVolume * TungstenPlugLogical
G4Material * GetMaterial(G4String material)
void ConstructTungstenPlug(G4VPhysicalVolume *)
G4Material * TungstenPlug_Material
QweakSimMaterial * pMaterial
virtual ~QweakSimTungstenPlug()
Destructor.