Geant4  10.02.p03
eRositaDetectorConstruction Class Reference

#include <eRositaDetectorConstruction.hh>

Inheritance diagram for eRositaDetectorConstruction:
Collaboration diagram for eRositaDetectorConstruction:

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
 

Private Attributes

G4BoxsolidWorld
 
G4LogicalVolumelogicWorld
 
G4VPhysicalVolumephysiWorld
 
G4VisAttributesvisWorld
 
G4BoxsolidTarget
 
G4LogicalVolumelogicTarget
 
G4VPhysicalVolumephysiTarget
 
G4VisAttributesvisTarget
 
G4BoxsolidTracker
 
G4LogicalVolumelogicTracker
 
G4VPhysicalVolumephysiTracker
 
G4VisAttributesvisTracker
 
G4MaterialTargetMater
 
G4MaterialTrackerMater
 
G4MaterialWorldMater
 
G4Materialvacuum
 
G4double hWorldLength
 
G4double hTargetLength
 
G4double hTargetDepth
 
G4double hTrackerLength
 
G4double hTrackerDepth
 
G4double xPosTarget
 
G4double yPosTarget
 
G4double zPosTarget
 
G4double xPosTracker
 
G4double yPosTracker
 
G4double zPosTracker
 

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::eRositaDetectorConstruction ( )

Definition at line 55 of file eRositaDetectorConstruction.cc.

57 {
58 
59 }

◆ ~eRositaDetectorConstruction()

eRositaDetectorConstruction::~eRositaDetectorConstruction ( )

Definition at line 63 of file eRositaDetectorConstruction.cc.

64 {
65 
66 }

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * eRositaDetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 70 of file eRositaDetectorConstruction.cc.

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 =
171 
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 =
189 
190  solidTracker =
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);
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
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
235 
236 
237 
238  return physiWorld;
239 }
static const double cm
Definition: G4SIunits.hh:118
void SetColor(const G4Color &)
CLHEP::Hep3Vector G4ThreeVector
int universe_mean_density
Definition: hepunit.py:307
Definition: G4Box.hh:64
void SetVisibility(G4bool)
static G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:589
G4double density
Definition: TRTMaterials.hh:39
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5206
G4GLOB_DLL std::ostream G4cout
#define pascal
G4Material * Si
Definition: TRTMaterials.hh:78
static const double cm3
Definition: G4SIunits.hh:120
G4Colour G4Color
Definition: G4Color.hh:42
static const double kelvin
Definition: G4SIunits.hh:278
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:71
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
static const double mole
Definition: G4SIunits.hh:283
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static const double mm
Definition: G4SIunits.hh:114
void SetVisAttributes(const G4VisAttributes *pVA)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
Here is the call graph for this function:

◆ GetTracker()

const G4VPhysicalVolume* eRositaDetectorConstruction::GetTracker ( )
inline

Definition at line 59 of file eRositaDetectorConstruction.hh.

59 {return physiTracker;};
Here is the call graph for this function:

◆ setTargetMaterial()

void eRositaDetectorConstruction::setTargetMaterial ( G4String  )
Here is the caller graph for this function:

◆ setTrackerMaterial()

void eRositaDetectorConstruction::setTrackerMaterial ( G4String  )
Here is the caller graph for this function:

◆ setWorldMaterial()

void eRositaDetectorConstruction::setWorldMaterial ( G4String  )
Here is the caller graph for this function:

Member Data Documentation

◆ hTargetDepth

G4double eRositaDetectorConstruction::hTargetDepth
private

Definition at line 94 of file eRositaDetectorConstruction.hh.

◆ hTargetLength

G4double eRositaDetectorConstruction::hTargetLength
private

Definition at line 93 of file eRositaDetectorConstruction.hh.

◆ hTrackerDepth

G4double eRositaDetectorConstruction::hTrackerDepth
private

Definition at line 96 of file eRositaDetectorConstruction.hh.

◆ hTrackerLength

G4double eRositaDetectorConstruction::hTrackerLength
private

Definition at line 95 of file eRositaDetectorConstruction.hh.

◆ hWorldLength

G4double eRositaDetectorConstruction::hWorldLength
private

Definition at line 92 of file eRositaDetectorConstruction.hh.

◆ logicTarget

G4LogicalVolume* eRositaDetectorConstruction::logicTarget
private

Definition at line 76 of file eRositaDetectorConstruction.hh.

◆ logicTracker

G4LogicalVolume* eRositaDetectorConstruction::logicTracker
private

Definition at line 81 of file eRositaDetectorConstruction.hh.

◆ logicWorld

G4LogicalVolume* eRositaDetectorConstruction::logicWorld
private

Definition at line 71 of file eRositaDetectorConstruction.hh.

◆ physiTarget

G4VPhysicalVolume* eRositaDetectorConstruction::physiTarget
private

Definition at line 77 of file eRositaDetectorConstruction.hh.

◆ physiTracker

G4VPhysicalVolume* eRositaDetectorConstruction::physiTracker
private

Definition at line 82 of file eRositaDetectorConstruction.hh.

◆ physiWorld

G4VPhysicalVolume* eRositaDetectorConstruction::physiWorld
private

Definition at line 72 of file eRositaDetectorConstruction.hh.

◆ solidTarget

G4Box* eRositaDetectorConstruction::solidTarget
private

Definition at line 75 of file eRositaDetectorConstruction.hh.

◆ solidTracker

G4Box* eRositaDetectorConstruction::solidTracker
private

Definition at line 80 of file eRositaDetectorConstruction.hh.

◆ solidWorld

G4Box* eRositaDetectorConstruction::solidWorld
private

Definition at line 70 of file eRositaDetectorConstruction.hh.

◆ TargetMater

G4Material* eRositaDetectorConstruction::TargetMater
private

Definition at line 85 of file eRositaDetectorConstruction.hh.

◆ TrackerMater

G4Material* eRositaDetectorConstruction::TrackerMater
private

Definition at line 86 of file eRositaDetectorConstruction.hh.

◆ vacuum

G4Material* eRositaDetectorConstruction::vacuum
private

Definition at line 89 of file eRositaDetectorConstruction.hh.

◆ visTarget

G4VisAttributes* eRositaDetectorConstruction::visTarget
private

Definition at line 78 of file eRositaDetectorConstruction.hh.

◆ visTracker

G4VisAttributes* eRositaDetectorConstruction::visTracker
private

Definition at line 83 of file eRositaDetectorConstruction.hh.

◆ visWorld

G4VisAttributes* eRositaDetectorConstruction::visWorld
private

Definition at line 73 of file eRositaDetectorConstruction.hh.

◆ WorldMater

G4Material* eRositaDetectorConstruction::WorldMater
private

Definition at line 87 of file eRositaDetectorConstruction.hh.

◆ xPosTarget

G4double eRositaDetectorConstruction::xPosTarget
private

Definition at line 98 of file eRositaDetectorConstruction.hh.

◆ xPosTracker

G4double eRositaDetectorConstruction::xPosTracker
private

Definition at line 101 of file eRositaDetectorConstruction.hh.

◆ yPosTarget

G4double eRositaDetectorConstruction::yPosTarget
private

Definition at line 99 of file eRositaDetectorConstruction.hh.

◆ yPosTracker

G4double eRositaDetectorConstruction::yPosTracker
private

Definition at line 102 of file eRositaDetectorConstruction.hh.

◆ zPosTarget

G4double eRositaDetectorConstruction::zPosTarget
private

Definition at line 100 of file eRositaDetectorConstruction.hh.

◆ zPosTracker

G4double eRositaDetectorConstruction::zPosTracker
private

Definition at line 103 of file eRositaDetectorConstruction.hh.


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