Geant4  10.02.p03
RE01DetectorConstruction Class Reference

#include <RE01DetectorConstruction.hh>

Inheritance diagram for RE01DetectorConstruction:
Collaboration diagram for RE01DetectorConstruction:

Public Member Functions

 RE01DetectorConstruction ()
 
virtual ~RE01DetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
virtual void ConstructSDandField ()
 
- 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
 

Private Attributes

G4double fExpHall_x
 
G4double fExpHall_y
 
G4double fExpHall_z
 
G4double fTrkTubs_rmax
 
G4double fTrkTubs_rmin
 
G4double fTrkTubs_dz
 
G4double fTrkTubs_sphi
 
G4double fTrkTubs_dphi
 
G4int fNotrkLayers
 
G4double fTracker_radius [5]
 
G4double fTracker_thick
 
G4double fTracker_length [5]
 
G4double fCaloTubs_rmax
 
G4double fCaloTubs_rmin
 
G4double fCaloTubs_dz
 
G4double fCaloTubs_sphi
 
G4double fCaloTubs_dphi
 
G4int fNocaloLayers
 
G4double fAbsorber_thick
 
G4double fScinti_thick
 
G4int fSegmentsinZ
 
G4double fCaloRing_rmax
 
G4double fCaloRing_rmin
 
G4double fCaloRing_dz
 
G4double fCaloRing_sphi
 
G4double fCaloRing_dphi
 
G4int fSegmentsinPhi
 
G4double fCaloCell_rmax
 
G4double fCaloCell_rmin
 
G4double fCaloCell_dz
 
G4double fCaloCell_sphi
 
G4double fCaloCell_dphi
 
G4LogicalVolumefTrackerLayer_log
 
G4LogicalVolumefCalorimeter_log
 
G4VReadOutGeometryfCalorimeterRO
 

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 42 of file RE01DetectorConstruction.hh.

Constructor & Destructor Documentation

◆ RE01DetectorConstruction()

RE01DetectorConstruction::RE01DetectorConstruction ( )

◆ ~RE01DetectorConstruction()

RE01DetectorConstruction::~RE01DetectorConstruction ( )
virtual

Definition at line 71 of file RE01DetectorConstruction.cc.

72 {;}

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * RE01DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 75 of file RE01DetectorConstruction.cc.

76 {
77  //-------------------------------------------------------------------------
78  // Magnetic field
79  //-------------------------------------------------------------------------
80  /******************************************************************
81  static G4bool fieldIsInitialized = false;
82  if(!fieldIsInitialized)
83  {
84  RE01Field* myField = new RE01Field;
85  G4FieldManager* fieldMgr
86  = G4TransportationManager::GetTransportationManager()
87  ->GetFieldManager();
88  fieldMgr->SetDetectorField(myField);
89  fieldMgr->CreateChordFinder(myField);
90  fieldIsInitialized = true;
91  }
92  *******************************************************************/
93  //-------------------------------------------------------------------------
94  // Materials
95  //-------------------------------------------------------------------------
96 
97  G4double a, iz, density;
99  G4int nel;
100 
101  a = 1.01*g/mole;
102  G4Element* elH = new G4Element(name="Hydrogen", symbol="H", iz=1., a);
103 
104  a = 12.01*g/mole;
105  G4Element* elC = new G4Element(name="Carbon", symbol="C", iz=6., a);
106 
107  // Material Information imported from NIST database.
109  G4Material* air = NISTman->FindOrBuildMaterial("G4_AIR");
110  G4Material* lead = NISTman->FindOrBuildMaterial("G4_Pb");
111  G4Material* arGas = NISTman->FindOrBuildMaterial("G4_Ar");
112  G4Material* silicon = NISTman->FindOrBuildMaterial("G4_Si");
113 
114  density = 1.032*g/cm3;
115  G4Material* scinti = new G4Material(name="Scintillator", density, nel=2);
116  scinti->AddElement(elC, 9);
117  scinti->AddElement(elH, 10);
118 
119  //-------------------------------------------------------------------------
120  // Detector geometry
121  //-------------------------------------------------------------------------
122  //------------------------------ experimental hall
123  G4Box * experimentalHall_box
124  = new G4Box("expHall_b",fExpHall_x,fExpHall_y,fExpHall_z);
125  G4LogicalVolume * experimentalHall_log
126  = new G4LogicalVolume(experimentalHall_box,air,"expHall_L",0,0,0);
127  G4VPhysicalVolume * experimentalHall_phys
128  = new G4PVPlacement(0,G4ThreeVector(),experimentalHall_log,"expHall_P",
129  0,false,0);
130  G4VisAttributes* experimentalHallVisAtt
131  = new G4VisAttributes(G4Colour(1.0,1.0,1.0));
132  experimentalHallVisAtt->SetForceWireframe(true);
133  experimentalHall_log->SetVisAttributes(experimentalHallVisAtt);
134  G4Region* defaultRegion = (*(G4RegionStore::GetInstance()))[0];
135  RE01RegionInformation* defaultRInfo = new RE01RegionInformation();
136  defaultRInfo->SetWorld();
137  defaultRInfo->Print();
138  defaultRegion->SetUserInformation(defaultRInfo);
139 
140  //------------------------------ tracker
141  G4VSolid * tracker_tubs
142  = new G4Tubs("trkTubs_tubs",fTrkTubs_rmin,fTrkTubs_rmax,fTrkTubs_dz,
144  G4LogicalVolume * tracker_log
145  = new G4LogicalVolume(tracker_tubs,arGas,"trackerT_L",0,0,0);
146  // G4VPhysicalVolume * tracker_phys =
147  new G4PVPlacement(0,G4ThreeVector(),tracker_log,"tracker_phys",
148  experimentalHall_log,false,0);
149  G4VisAttributes* tracker_logVisAtt
150  = new G4VisAttributes(G4Colour(1.0,0.0,1.0));
151  tracker_logVisAtt->SetForceWireframe(true);
152  tracker_log->SetVisAttributes(tracker_logVisAtt);
153  G4Region* trackerRegion = new G4Region("TrackerRegion");
154  RE01RegionInformation* trackerInfo = new RE01RegionInformation();
155  trackerInfo->SetTracker();
156  trackerRegion->SetUserInformation(trackerInfo);
157  tracker_log->SetRegion(trackerRegion);
158  trackerRegion->AddRootLogicalVolume(tracker_log);
159 
160  //------------------------------ tracker layers
161  // As an example for Parameterised volume
162  // dummy values for G4Tubs -- modified by parameterised volume
163  G4VSolid * trackerLayer_tubs
164  = new G4Tubs("trackerLayer_tubs",fTrkTubs_rmin,fTrkTubs_rmax,fTrkTubs_dz,
167  = new G4LogicalVolume(trackerLayer_tubs,silicon,"trackerB_L",0,0,0);
168  G4VPVParameterisation * trackerParam
170  // dummy value : kXAxis -- modified by parameterised volume
171  // G4VPhysicalVolume *trackerLayer_phys =
172  new G4PVParameterised("trackerLayer_phys",fTrackerLayer_log,tracker_log,
173  kXAxis, fNotrkLayers, trackerParam);
174  G4VisAttributes* trackerLayer_logVisAtt
175  = new G4VisAttributes(G4Colour(0.5,0.0,1.0));
176  trackerLayer_logVisAtt->SetForceWireframe(true);
177  fTrackerLayer_log->SetVisAttributes(trackerLayer_logVisAtt);
178 
179  //------------------------------ calorimeter
180  G4VSolid * calorimeter_tubs
181  = new G4Tubs("calorimeter_tubs",fCaloTubs_rmin,fCaloTubs_rmax,
184  = new G4LogicalVolume(calorimeter_tubs,scinti,"caloT_L",0,0,0);
185  // G4VPhysicalVolume * calorimeter_phys =
186  new G4PVPlacement(0,G4ThreeVector(),fCalorimeter_log,"caloM_P",
187  experimentalHall_log,false,0);
188  G4VisAttributes* calorimeter_logVisATT
189  = new G4VisAttributes(G4Colour(1.0,1.0,0.0));
190  calorimeter_logVisATT->SetForceWireframe(true);
191  fCalorimeter_log->SetVisAttributes(calorimeter_logVisATT);
192  G4Region* calorimeterRegion = new G4Region("CalorimeterRegion");
193  RE01RegionInformation* calorimeterInfo = new RE01RegionInformation();
194  calorimeterInfo->SetCalorimeter();
195  calorimeterRegion->SetUserInformation(calorimeterInfo);
196  fCalorimeter_log->SetRegion(calorimeterRegion);
197  calorimeterRegion->AddRootLogicalVolume(fCalorimeter_log);
198 
199  G4String ROgeometryName = "CalorimeterROGeom";
200  fCalorimeterRO = new RE01CalorimeterROGeometry(ROgeometryName);
202 
203  //------------------------------- Lead layers
204  // As an example for Parameterised volume
205  // dummy values for G4Tubs -- modified by parameterised volume
206  G4VSolid * caloLayer_tubs
207  = new G4Tubs("caloLayer_tubs",fCaloRing_rmin,fCaloRing_rmax,
209  G4LogicalVolume * caloLayer_log
210  = new G4LogicalVolume(caloLayer_tubs,lead,"caloR_L",0,0,0);
211  G4VPVParameterisation * calorimeterParam
213  // dummy value : kXAxis -- modified by parameterised volume
214  // G4VPhysicalVolume * caloLayer_phys =
215  new G4PVParameterised("caloLayer_phys",caloLayer_log,fCalorimeter_log,
216  kXAxis, fNocaloLayers, calorimeterParam);
217  G4VisAttributes* caloLayer_logVisAtt
218  = new G4VisAttributes(G4Colour(0.7,1.0,0.0));
219  caloLayer_logVisAtt->SetForceWireframe(true);
220  caloLayer_log->SetVisAttributes(caloLayer_logVisAtt);
221 
222 
223  return experimentalHall_phys;
224 }
void SetUserInformation(G4VUserRegionInformation *ui)
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
G4String symbol
Definition: TRTMaterials.hh:40
void SetForceWireframe(G4bool)
CLHEP::Hep3Vector G4ThreeVector
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
Definition: G4Box.hh:64
G4String name
Definition: TRTMaterials.hh:40
Definition: G4Tubs.hh:85
G4Element * elC
Definition: TRTMaterials.hh:48
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
G4Element * elH
Definition: TRTMaterials.hh:50
static G4RegionStore * GetInstance()
G4double density
Definition: TRTMaterials.hh:39
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5206
void SetRegion(G4Region *reg)
void SetWorld(G4bool v=true)
G4double iz
Definition: TRTMaterials.hh:39
static const double cm3
Definition: G4SIunits.hh:120
void SetCalorimeter(G4bool v=true)
static const double mole
Definition: G4SIunits.hh:283
void AddElement(G4Element *element, G4int nAtoms)
Definition: G4Material.cc:364
G4VReadOutGeometry * fCalorimeterRO
double G4double
Definition: G4Types.hh:76
virtual void Print() const
void SetVisAttributes(const G4VisAttributes *pVA)
G4int nel
Definition: TRTMaterials.hh:41
void SetTracker(G4bool v=true)
Here is the call graph for this function:

◆ ConstructSDandField()

void RE01DetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 227 of file RE01DetectorConstruction.cc.

227  {
228 
229  //------------------------------------------------------------------
230  // Sensitive Detector
231  //------------------------------------------------------------------
232  //G4SDManager* SDman = G4SDManager::GetSDMpointer();
233 
234  G4String trackerSDname = "/mydet/tracker";
235  RE01TrackerSD * trackerSD = new RE01TrackerSD(trackerSDname);
236  //SDman->AddNewDetector(trackerSD);
238 
239  G4String calorimeterSDname = "/mydet/calorimeter";
240  RE01CalorimeterSD * calorimeterSD = new RE01CalorimeterSD(calorimeterSDname);
241  calorimeterSD->SetROgeometry(fCalorimeterRO);
242  //SDman->AddNewDetector(calorimeterSD);
243  SetSensitiveDetector(fCalorimeter_log, calorimeterSD);
244 
245 }
void SetROgeometry(G4VReadOutGeometry *value)
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
G4VReadOutGeometry * fCalorimeterRO
Here is the call graph for this function:

Member Data Documentation

◆ fAbsorber_thick

G4double RE01DetectorConstruction::fAbsorber_thick
private

Definition at line 55 of file RE01DetectorConstruction.hh.

◆ fCaloCell_dphi

G4double RE01DetectorConstruction::fCaloCell_dphi
private

Definition at line 70 of file RE01DetectorConstruction.hh.

◆ fCaloCell_dz

G4double RE01DetectorConstruction::fCaloCell_dz
private

Definition at line 68 of file RE01DetectorConstruction.hh.

◆ fCaloCell_rmax

G4double RE01DetectorConstruction::fCaloCell_rmax
private

Definition at line 66 of file RE01DetectorConstruction.hh.

◆ fCaloCell_rmin

G4double RE01DetectorConstruction::fCaloCell_rmin
private

Definition at line 67 of file RE01DetectorConstruction.hh.

◆ fCaloCell_sphi

G4double RE01DetectorConstruction::fCaloCell_sphi
private

Definition at line 69 of file RE01DetectorConstruction.hh.

◆ fCalorimeter_log

G4LogicalVolume* RE01DetectorConstruction::fCalorimeter_log
private

Definition at line 56 of file RE01DetectorConstruction.hh.

◆ fCalorimeterRO

G4VReadOutGeometry* RE01DetectorConstruction::fCalorimeterRO
private

Definition at line 57 of file RE01DetectorConstruction.hh.

◆ fCaloRing_dphi

G4double RE01DetectorConstruction::fCaloRing_dphi
private

Definition at line 63 of file RE01DetectorConstruction.hh.

◆ fCaloRing_dz

G4double RE01DetectorConstruction::fCaloRing_dz
private

Definition at line 61 of file RE01DetectorConstruction.hh.

◆ fCaloRing_rmax

G4double RE01DetectorConstruction::fCaloRing_rmax
private

Definition at line 59 of file RE01DetectorConstruction.hh.

◆ fCaloRing_rmin

G4double RE01DetectorConstruction::fCaloRing_rmin
private

Definition at line 60 of file RE01DetectorConstruction.hh.

◆ fCaloRing_sphi

G4double RE01DetectorConstruction::fCaloRing_sphi
private

Definition at line 62 of file RE01DetectorConstruction.hh.

◆ fCaloTubs_dphi

G4double RE01DetectorConstruction::fCaloTubs_dphi
private

Definition at line 52 of file RE01DetectorConstruction.hh.

◆ fCaloTubs_dz

G4double RE01DetectorConstruction::fCaloTubs_dz
private

Definition at line 50 of file RE01DetectorConstruction.hh.

◆ fCaloTubs_rmax

G4double RE01DetectorConstruction::fCaloTubs_rmax
private

Definition at line 48 of file RE01DetectorConstruction.hh.

◆ fCaloTubs_rmin

G4double RE01DetectorConstruction::fCaloTubs_rmin
private

Definition at line 49 of file RE01DetectorConstruction.hh.

◆ fCaloTubs_sphi

G4double RE01DetectorConstruction::fCaloTubs_sphi
private

Definition at line 51 of file RE01DetectorConstruction.hh.

◆ fExpHall_x

G4double RE01DetectorConstruction::fExpHall_x
private

Definition at line 33 of file RE01DetectorConstruction.hh.

◆ fExpHall_y

G4double RE01DetectorConstruction::fExpHall_y
private

Definition at line 34 of file RE01DetectorConstruction.hh.

◆ fExpHall_z

G4double RE01DetectorConstruction::fExpHall_z
private

Definition at line 35 of file RE01DetectorConstruction.hh.

◆ fNocaloLayers

G4int RE01DetectorConstruction::fNocaloLayers
private

Definition at line 54 of file RE01DetectorConstruction.hh.

◆ fNotrkLayers

G4int RE01DetectorConstruction::fNotrkLayers
private

Definition at line 43 of file RE01DetectorConstruction.hh.

◆ fScinti_thick

G4double RE01DetectorConstruction::fScinti_thick
private

Definition at line 56 of file RE01DetectorConstruction.hh.

◆ fSegmentsinPhi

G4int RE01DetectorConstruction::fSegmentsinPhi
private

Definition at line 65 of file RE01DetectorConstruction.hh.

◆ fSegmentsinZ

G4int RE01DetectorConstruction::fSegmentsinZ
private

Definition at line 58 of file RE01DetectorConstruction.hh.

◆ fTracker_length

G4double RE01DetectorConstruction::fTracker_length[5]
private

Definition at line 46 of file RE01DetectorConstruction.hh.

◆ fTracker_radius

G4double RE01DetectorConstruction::fTracker_radius[5]
private

Definition at line 44 of file RE01DetectorConstruction.hh.

◆ fTracker_thick

G4double RE01DetectorConstruction::fTracker_thick
private

Definition at line 45 of file RE01DetectorConstruction.hh.

◆ fTrackerLayer_log

G4LogicalVolume* RE01DetectorConstruction::fTrackerLayer_log
private

Definition at line 55 of file RE01DetectorConstruction.hh.

◆ fTrkTubs_dphi

G4double RE01DetectorConstruction::fTrkTubs_dphi
private

Definition at line 41 of file RE01DetectorConstruction.hh.

◆ fTrkTubs_dz

G4double RE01DetectorConstruction::fTrkTubs_dz
private

Definition at line 39 of file RE01DetectorConstruction.hh.

◆ fTrkTubs_rmax

G4double RE01DetectorConstruction::fTrkTubs_rmax
private

Definition at line 37 of file RE01DetectorConstruction.hh.

◆ fTrkTubs_rmin

G4double RE01DetectorConstruction::fTrkTubs_rmin
private

Definition at line 38 of file RE01DetectorConstruction.hh.

◆ fTrkTubs_sphi

G4double RE01DetectorConstruction::fTrkTubs_sphi
private

Definition at line 40 of file RE01DetectorConstruction.hh.


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