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

#include <eRositaDetectorConstruction.hh>

Inheritance diagram for eRositaDetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 eRositaDetectorConstruction ()
 
 ~eRositaDetectorConstruction ()
 
G4VPhysicalVolumeConstruct ()
 
const G4VPhysicalVolumeGetTracker ()
 
void setTargetMaterial (G4String)
 
void setTrackerMaterial (G4String)
 
void setWorldMaterial (G4String)
 
- Public Member Functions inherited from G4VUserDetectorConstruction
 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
virtual void ConstructSDandField ()
 
virtual void CloneSD ()
 
virtual void CloneF ()
 
void RegisterParallelWorld (G4VUserParallelWorld *)
 
G4int ConstructParallelGeometries ()
 
void ConstructParallelSD ()
 
G4int GetNumberOfParallelWorld () const
 
G4VUserParallelWorldGetParallelWorld (G4int i) const
 

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 47 of file eRositaDetectorConstruction.hh.

Constructor & Destructor Documentation

eRositaDetectorConstruction::eRositaDetectorConstruction ( )

Definition at line 55 of file eRositaDetectorConstruction.cc.

57 {
58 
59 }
eRositaDetectorConstruction::~eRositaDetectorConstruction ( )

Definition at line 63 of file eRositaDetectorConstruction.cc.

64 {
65 
66 }

Member Function Documentation

G4VPhysicalVolume * eRositaDetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 70 of file eRositaDetectorConstruction.cc.

References test::a, G4SDManager::AddNewDetector(), python.hepunit::cm, python.hepunit::cm3, density, g(), G4cout, G4endl, G4Material::GetMaterialTable(), G4SDManager::GetSDMpointer(), python.hepunit::kelvin, kStateGas, python.hepunit::mm, python.hepunit::mole, pascal, G4VisAttributes::SetColor(), G4LogicalVolume::SetSensitiveDetector(), G4LogicalVolume::SetVisAttributes(), G4VisAttributes::SetVisibility(), Si, python.hepunit::universe_mean_density, and z.

71 {
72 //--------- Material definition ---------
73 
74  G4double a, z;
76 // G4int nel;
77 
78 // //Air
79 // G4Element* N = new G4Element("Nitrogen", "N", z=7., a= 14.01*g/mole);
80 // G4Element* O = new G4Element("Oxygen" , "O", z=8., a= 16.00*g/mole);
81 
82 // G4Material* Air = new G4Material("Air", density= 1.29*mg/cm3, nel=2);
83 // Air->AddElement(N, 70*perCent);
84 // Air->AddElement(O, 30*perCent);
85 
86  //Copper
87  G4Material* Cu =
88  new G4Material("Copper", z=29., a= 63.55*g/mole, density= 8.92*g/cm3);
89 
90 // //Aluminium for testing
91 // G4Material* Cu =
92 // new G4Material("Aluminium", z=13., a= 26.98*g/mole, density= 2.7*g/cm3);
93 
94  //Silicon
95  G4Material* Si =
96  new G4Material("Silicon", z=14., a= 28.09*g/mole, density= 2.33*g/cm3);
97 
98  // Vacuum
99  density = universe_mean_density; //from PhysicalConstants.h
100  G4double pressure = 3.e-18*pascal;
101  G4double temperature = 2.73*kelvin;
102  a = 1.01*g/mole;
103  z = 1;
104  vacuum = new G4Material("Galactic", z, a,
105  density, kStateGas, temperature, pressure);
106 
107  // Print all the materials defined.
108  //
109  G4cout << G4endl << "The materials defined are : " << G4endl << G4endl;
110  G4cout << *(G4Material::GetMaterialTable()) << G4endl;
111 
112 //--------- Sizes of the principal geometrical components (solids) ---------
113 
114  // world volume
115  hWorldLength = 50.0*mm;
116 
117  // target
118  hTargetLength = 2.5*mm;
119  hTargetDepth = 15.0*mm;
120 
121  // CCD
122  hTrackerLength = 20.0*mm;
123  hTrackerDepth = 0.225*mm;
124 
125 //--------- positions of the principal geometrical components --------
126 
127  // target
128  xPosTarget = 0.0*cm;
129  yPosTarget = 0.0*cm;
130  zPosTarget = 0.0*cm;
131 
132  // tracker
133  xPosTracker = 0.0*cm;
134  yPosTracker = 2.0*cm;
135  zPosTracker = 0.0*cm;
136 
137 //--------- material names of the principal geometrical components --------
138 
139 // WorldMater = Air;
140  WorldMater = vacuum;
141  TargetMater = Cu;
142  TrackerMater = Si;
143 
144 //--------- Definitions of Solids, Logical Volumes, Physical Volumes ---------
145 
146 
147  //------------------------------
148  // World
149  //------------------------------
150 
151  solidWorld= new G4Box("world",hWorldLength,hWorldLength,hWorldLength);
152  logicWorld= new G4LogicalVolume(solidWorld,WorldMater,"World",0,0,0);
153 
154  // Must place the World Physical volume unrotated at (0,0,0).
155  //
156  physiWorld = new G4PVPlacement(0, // no rotation
157  G4ThreeVector(), // at (0,0,0)
158  logicWorld, // its logical volume
159  "World", // its name
160  0, // its mother volume
161  false, // no boolean operations
162  0); // copy number
163 
164 
165  //------------------------------
166  // Target
167  //------------------------------
168 
169  G4ThreeVector positionTarget =
170  G4ThreeVector(xPosTarget,yPosTarget,zPosTarget);
171 
172  solidTarget = new G4Box("target",hTargetLength,hTargetLength,hTargetDepth);
173  logicTarget = new G4LogicalVolume(solidTarget,TargetMater,"Target",0,0,0);
174  physiTarget = new G4PVPlacement(0, // no rotation
175  positionTarget, // at (x,y,z)
176  logicTarget, // its logical volume
177  "Target", // its name
178  logicWorld, // its mother volume
179  false, // no boolean operations
180  0); // copy number
181 
182 
183  //------------------------------
184  // Tracker
185  //------------------------------
186 
187  G4ThreeVector positionTracker =
188  G4ThreeVector(xPosTracker,yPosTracker,zPosTracker);
189 
190  solidTracker =
191  new G4Box("tracker",hTrackerLength,hTrackerDepth,hTrackerLength);
192  logicTracker =
193  new G4LogicalVolume(solidTracker,TrackerMater,"Tracker",0,0,0);
194  physiTracker = new G4PVPlacement(0, // no rotation
195  positionTracker, // at (x,y,z)
196  logicTracker, // its logical volume
197  "Tracker", // its name
198  logicWorld, // its mother volume
199  false, // no boolean operations
200  0); // copy number
201 
202 
203 
204 
205  //------------------------------------------------
206  // Sensitive detectors
207  //------------------------------------------------
208 
210 
211  G4String trackerChamberSDname = "eRosita/TrackerChamberSD";
212  eRositaTrackerSD* aTrackerSD = new eRositaTrackerSD( trackerChamberSDname );
213  SDman->AddNewDetector( aTrackerSD );
214  logicTracker->SetSensitiveDetector( aTrackerSD );
215 
216 
217 //--------- Visualization attributes -------------------------------
218 
219  // use this to make world volume invisible
220  visWorld = new G4VisAttributes();
221  visWorld->SetVisibility(false);
222  logicWorld->SetVisAttributes(visWorld);
223 
224  // render target in redish color
225  visTarget = new G4VisAttributes();
226 // visTarget->SetColor(G4Color(1.0,0.3,0.3)); // redish
227  visTarget->SetColor(G4Color(1.0,1.0,1.0)); // black
228  logicTarget->SetVisAttributes(visTarget);
229 
230  // render tracker in blueish color
231  visTracker = new G4VisAttributes();
232 // visTracker->SetColor(G4Color(0.3,0.3,1.0)); // blueish
233  visTracker->SetColor(G4Color(1.0,1.0,1.0)); // black
234  logicTracker->SetVisAttributes(visTracker);
235 
236 
237 
238  return physiWorld;
239 }
void SetColor(const G4Color &)
CLHEP::Hep3Vector G4ThreeVector
G4double z
Definition: TRTMaterials.hh:39
int universe_mean_density
Definition: hepunit.py:307
Definition: G4Box.hh:63
void SetVisibility(G4bool)
static G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:564
G4double density
Definition: TRTMaterials.hh:39
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5205
G4GLOB_DLL std::ostream G4cout
#define pascal
G4Material * Si
Definition: TRTMaterials.hh:78
G4Colour G4Color
Definition: G4Color.hh:42
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:67
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
void SetVisAttributes(const G4VisAttributes *pVA)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
const G4VPhysicalVolume* eRositaDetectorConstruction::GetTracker ( )
inline

Definition at line 59 of file eRositaDetectorConstruction.hh.

59 {return physiTracker;};
void eRositaDetectorConstruction::setTargetMaterial ( G4String  )
void eRositaDetectorConstruction::setTrackerMaterial ( G4String  )
void eRositaDetectorConstruction::setWorldMaterial ( G4String  )

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