Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DetectorHarris73 Class Reference

#include <DetectorHarris73.hh>

Public Member Functions

 DetectorHarris73 ()
 
 ~DetectorHarris73 ()
 
G4VPhysicalVolumeConstruct ()
 
RadiatorDescriptionGetRadiatorDescription () const
 

Detailed Description

Definition at line 43 of file DetectorHarris73.hh.

Constructor & Destructor Documentation

DetectorHarris73::DetectorHarris73 ( )

Definition at line 55 of file DetectorHarris73.cc.

56  : fRadiatorDescription(0)
57 {}
DetectorHarris73::~DetectorHarris73 ( )

Definition at line 61 of file DetectorHarris73.cc.

62 {
63  // delete fRadiatorDescription;
64  // the description is deleted in detector construction
65 }

Member Function Documentation

G4VPhysicalVolume * DetectorHarris73::Construct ( void  )

Definition at line 69 of file DetectorHarris73.cc.

70 {
71  // Geometry parameters
72  //
73 
74  G4cout << "DetectorHarris73 setup" << G4endl;
75 
76  G4double worldSizeZ = 400.*cm;
77  G4double worldSizeR = 20.*cm;
78 
79  // Radiator and detector parameters
80 
81  G4double radThickness = 0.0127*mm;
82  G4double gasGap = 0.762*mm;
83  G4double foilGasRatio = radThickness/(radThickness+gasGap);
84  G4double foilNumber = 100;
85 
86  G4double absorberThickness = 15.0*mm;
87  G4double absorberRadius = 100.*mm;
88 
89  G4double windowThick = 51.0*micrometer;
90  G4double electrodeThick = 10.0*micrometer;
91  G4double gapThick = 10.0*cm;
92  G4double detGap = 0.01*mm;
93 
94  G4double startZ = 100.0*mm;
95 
96  // Materials
97  //
98 
99  // Change to create materials using NIST
101  G4Material* mylar = Materials::GetInstance()->GetMaterial("Mylar");
102  G4Material* kr7ch4 = Materials::GetInstance()->GetMaterial("Kr7CH4");
103 
104  // Preparation of mixed radiator material
105 
106  G4double foilDensity = mylar->GetDensity();
107  G4double gasDensity = air->GetDensity();
108  G4double totDensity = foilDensity*foilGasRatio
109  + gasDensity*(1.0-foilGasRatio);
110 
111  G4double fractionFoil = foilDensity*foilGasRatio/totDensity;
112  G4double fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity;
113  G4Material* radiatorMat = new G4Material("radiatorMat", totDensity, 2);
114  radiatorMat->AddMaterial(mylar, fractionFoil);
115  radiatorMat->AddMaterial(air, fractionGas);
116 
117  // Radiator description
118  fRadiatorDescription = new RadiatorDescription;
119  fRadiatorDescription->fFoilMaterial = mylar; // CH2; // Kapton; // Mylar ; // Li ; // CH2 ;
120  fRadiatorDescription->fGasMaterial = air; // CO2; // He; //
121  fRadiatorDescription->fFoilThickness = radThickness;
122  fRadiatorDescription->fGasThickness = gasGap;
123  fRadiatorDescription->fFoilNumber = foilNumber;
124 
125  G4Material* worldMaterial = air; // CO2;
126  G4Material* absorberMaterial = kr7ch4;
127 
128  // Volumes
129  //
130 
131  G4VSolid* solidWorld
132  = new G4Box("World", worldSizeR, worldSizeR, worldSizeZ/2.);
133 
134  G4LogicalVolume* logicWorld
135  = new G4LogicalVolume(solidWorld, worldMaterial, "World");
136 
137  G4VPhysicalVolume* physicsWorld
138  = new G4PVPlacement(0, G4ThreeVector(), "World", logicWorld, 0, false, 0);
139 
140  // TR radiator envelope
141 
142  G4double radThick = foilNumber*(radThickness + gasGap) - gasGap + detGap;
143  G4double radZ = startZ + 0.5*radThick;
144 
145  G4VSolid* solidRadiator
146  = new G4Box("Radiator", 1.1*absorberRadius, 1.1*absorberRadius, 0.5*radThick);
147 
148  G4LogicalVolume* logicRadiator
149  = new G4LogicalVolume(solidRadiator, radiatorMat, "Radiator");
150 
151  fRadiatorDescription->fLogicalVolume = logicRadiator;
152 
153  new G4PVPlacement(0, G4ThreeVector(0, 0, radZ),
154  "Radiator", logicRadiator, physicsWorld, false, 0 );
155 
156  // create region for radiator
157 
158  G4Region* radRegion = new G4Region("XTRradiator");
159  radRegion->AddRootLogicalVolume(logicRadiator);
160 
161  G4double windowZ = startZ + radThick + windowThick/2. + 15.0*mm;
162 
163  G4double gapZ = windowZ + windowThick/2. + gapThick/2. + 0.01*mm;
164 
165  G4double electrodeZ = gapZ + gapThick/2. + electrodeThick/2. + 0.01*mm;
166 
167  // Absorber
168 
169  G4double absorberZ = electrodeZ + electrodeThick/2.
170  + absorberThickness/2. + 0.01*mm;
171 
172  G4VSolid* solidAbsorber
173  = new G4Box("Absorber", absorberRadius, absorberRadius, absorberThickness/2.);
174 
175  G4LogicalVolume* logicAbsorber
176  = new G4LogicalVolume(solidAbsorber, absorberMaterial, "Absorber");
177 
178  new G4PVPlacement(0, G4ThreeVector(0., 0., absorberZ),
179  "Absorber", logicAbsorber, physicsWorld, false, 0);
180 
181  G4Region* regGasDet = new G4Region("XTRdEdxDetector");
182  regGasDet->AddRootLogicalVolume(logicAbsorber);
183 
184  // Sensitive Detectors: Absorber
185 
186  SensitiveDetector* sd = new SensitiveDetector("AbsorberSD");
188  logicAbsorber->SetSensitiveDetector(sd);
189 
190  // Print geometry parameters
191 
192  G4cout << "\n The WORLD is made of "
193  << worldSizeZ/mm << "mm of " << worldMaterial->GetName();
194  G4cout << ", the transverse size (R) of the world is "
195  << worldSizeR/mm << " mm. " << G4endl;
196  G4cout << " The ABSORBER is made of "
197  << absorberThickness/mm << "mm of " << absorberMaterial->GetName();
198  G4cout << ", the transverse size (R) is "
199  << absorberRadius/mm << " mm. " << G4endl;
200  G4cout << " Z position of the (middle of the) absorber "
201  << absorberZ/mm << " mm." << G4endl;
202 
203  G4cout << "radZ = " << radZ/mm << " mm" << G4endl;
204  G4cout << "startZ = " << startZ/mm<< " mm" << G4endl;
205 
206  G4cout << "fRadThick = " << radThick/mm << " mm"<<G4endl;
207  G4cout << "fFoilNumber = " << foilNumber << G4endl;
208  G4cout << "fRadiatorMat = " << radiatorMat->GetName() << G4endl;
209  G4cout << "WorldMaterial = " << worldMaterial->GetName() << G4endl;
210  G4cout << G4endl;
211 
212  return physicsWorld;
213 }
static constexpr double mm
Definition: G4SIunits.hh:115
CLHEP::Hep3Vector G4ThreeVector
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
Definition: G4Box.hh:64
const G4String & GetName() const
Definition: G4Material.hh:178
G4double GetDensity() const
Definition: G4Material.hh:180
static Materials * GetInstance()
Definition: Materials.cc:52
G4GLOB_DLL std::ostream G4cout
static constexpr double cm
Definition: G4SIunits.hh:119
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:71
G4Material * GetMaterial(const G4String &)
Definition: Materials.cc:460
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4LogicalVolume * fLogicalVolume
static constexpr double micrometer
Definition: G4SIunits.hh:100
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)

Here is the call graph for this function:

RadiatorDescription* DetectorHarris73::GetRadiatorDescription ( ) const
inline

Definition at line 53 of file DetectorHarris73.hh.

53 { return fRadiatorDescription; }

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