Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/advanced/xray_telescope/src/XrayTelDetectorConstruction.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/advanced/xray_telescope/src/XrayTelDetectorConstruction.cc (Version 11.3.0) and /examples/advanced/xray_telescope/src/XrayTelDetectorConstruction.cc (Version 9.2.p3)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 //                                                 26 //
 27 // *******************************************     27 // **********************************************************************
 28 // *                                               28 // *                                                                    *
 29 // *                    GEANT 4 xray_telescope     29 // *                    GEANT 4 xray_telescope advanced example         *
 30 // *                                               30 // *                                                                    *
 31 // * MODULE:            XrayTelDetectorConstru     31 // * MODULE:            XrayTelDetectorConstruction.cc                  *     
 32 // * -------                                       32 // * -------                                                            *
 33 // *                                               33 // *                                                                    *
 34 // * Version:           0.4                        34 // * Version:           0.4                                             *
 35 // * Date:              06/11/00                   35 // * Date:              06/11/00                                        *
 36 // * Author:            R Nartallo                 36 // * Author:            R Nartallo                                      *
 37 // * Organisation:      ESA/ESTEC, Noordwijk,      37 // * Organisation:      ESA/ESTEC, Noordwijk, THe Netherlands           *
 38 // *                                               38 // *                                                                    *
 39 // *******************************************     39 // **********************************************************************
 40 //                                                 40 // 
 41 // CHANGE HISTORY                                  41 // CHANGE HISTORY
 42 // --------------                                  42 // --------------
 43 //                                                 43 //
 44 // 06.11.2000 R.Nartallo                           44 // 06.11.2000 R.Nartallo
 45 // - First implementation of xray_telescope ge     45 // - First implementation of xray_telescope geometry
 46 // - Based on Chandra and XMM models by R Nart     46 // - Based on Chandra and XMM models by R Nartallo, P Truscott, F Lei 
 47 //   and P Arce                                    47 //   and P Arce
 48 //                                                 48 //
 49 //                                                 49 //
 50 // *******************************************     50 // **********************************************************************
 51                                                    51 
 52 #include "XrayTelDetectorConstruction.hh"      << 
 53                                                << 
 54 #include "globals.hh"                          << 
 55 #include "G4PhysicalConstants.hh"              << 
 56 #include "G4SystemOfUnits.hh"                  << 
 57 #include "G4UnitsTable.hh"                         52 #include "G4UnitsTable.hh"
 58 #include "G4VUserDetectorConstruction.hh"          53 #include "G4VUserDetectorConstruction.hh"
 59 #include "G4Material.hh"                           54 #include "G4Material.hh"
 60 #include "G4MaterialTable.hh"                      55 #include "G4MaterialTable.hh"
 61 #include "G4Element.hh"                            56 #include "G4Element.hh"
 62 #include "G4ElementTable.hh"                       57 #include "G4ElementTable.hh"
 63 #include "G4Box.hh"                                58 #include "G4Box.hh"
 64 #include "G4Cons.hh"                               59 #include "G4Cons.hh"
 65 #include "G4Tubs.hh"                               60 #include "G4Tubs.hh"
 66 #include "G4LogicalVolume.hh"                      61 #include "G4LogicalVolume.hh"
 67 #include "G4ThreeVector.hh"                        62 #include "G4ThreeVector.hh"
 68 #include "G4PVPlacement.hh"                        63 #include "G4PVPlacement.hh"
 69 #include "G4PVReplica.hh"                          64 #include "G4PVReplica.hh"
 70 #include "G4SDManager.hh"                          65 #include "G4SDManager.hh"
 71 #include "G4VisAttributes.hh"                      66 #include "G4VisAttributes.hh"
 72 #include "G4Colour.hh"                             67 #include "G4Colour.hh"
 73                                                    68 
                                                   >>  69 #include "globals.hh"
                                                   >>  70 
                                                   >>  71 #include "XrayTelDetectorConstruction.hh"
                                                   >>  72 
 74 XrayTelDetectorConstruction::XrayTelDetectorCo     73 XrayTelDetectorConstruction::XrayTelDetectorConstruction()
 75 {                                                  74 {
 76   world_x = 2500.*cm;                              75   world_x = 2500.*cm;
 77   world_y = 2500.*cm;                              76   world_y = 2500.*cm;
 78   world_z = 2500.*cm;                              77   world_z = 2500.*cm;
 79 }                                                  78 }
 80                                                    79 
 81 XrayTelDetectorConstruction::~XrayTelDetectorC     80 XrayTelDetectorConstruction::~XrayTelDetectorConstruction()
 82 {;}                                                81 {;}
 83                                                    82 
 84 G4VPhysicalVolume* XrayTelDetectorConstruction     83 G4VPhysicalVolume* XrayTelDetectorConstruction::Construct( )
 85 {                                                  84 {
 86                                                    85 
 87   // Material: Vacuum                              86   // Material: Vacuum
 88   G4Material* Vacuum = new G4Material("Vacuum"     87   G4Material* Vacuum = new G4Material("Vacuum",
 89               1.0 , 1.01*g/mole, 1.0E-25*g/cm3     88               1.0 , 1.01*g/mole, 1.0E-25*g/cm3,
 90               kStateGas, 2.73*kelvin, 3.0E-18*     89               kStateGas, 2.73*kelvin, 3.0E-18*pascal );
 91                                                    90 
 92   // Visualization attributes                      91   // Visualization attributes
 93   G4VisAttributes* VisAttWorld= new G4VisAttri     92   G4VisAttributes* VisAttWorld= new G4VisAttributes( G4Colour(204/255.,255/255.,255/255.));
 94                                                    93 
 95   // World                                         94   // World
 96   G4Box * solidWorld = new G4Box( "world_S", w     95   G4Box * solidWorld = new G4Box( "world_S", world_x, world_y, world_z );
 97   G4LogicalVolume * logicalWorld = new G4Logic     96   G4LogicalVolume * logicalWorld = new G4LogicalVolume( solidWorld, // solid
 98               Vacuum,                              97               Vacuum,                          // material
 99               "world_L",                           98               "world_L",                       // name 
100               0,0,0);                              99               0,0,0);
101                                                   100 
102   logicalWorld -> SetVisAttributes(VisAttWorld    101   logicalWorld -> SetVisAttributes(VisAttWorld);
103                                                   102 
104   // Physical volume                              103   // Physical volume
105   physicalWorld= new G4PVPlacement( 0,            104   physicalWorld= new G4PVPlacement( 0,
106             G4ThreeVector(),                      105             G4ThreeVector(),
107             "world_P",        // name (2nd con    106             "world_P",        // name (2nd constructor)
108             logicalWorld,     // logical volum    107             logicalWorld,     // logical volume
109             NULL,             // mother volume    108             NULL,             // mother volume
110             false,            // no boolean op    109             false,            // no boolean operation
111             0);               // copy number      110             0);               // copy number
112                                                   111 
113   // Make Invisible                               112   // Make Invisible
114   logicalWorld -> SetVisAttributes(G4VisAttrib << 113   logicalWorld -> SetVisAttributes(G4VisAttributes::Invisible);
115                                                   114 
116   // Construct geometry                           115   // Construct geometry
117   ConstructTelescope();                           116   ConstructTelescope();
118   ConstructFocalPlane();                          117   ConstructFocalPlane();
119                                                   118 
120   return physicalWorld;                           119   return physicalWorld;
121 }                                                 120 }
122                                                   121 
123 //....oooOO0OOooo........oooOO0OOooo........oo    122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
124                                                   123 
125 // Construct Telescope                            124 // Construct Telescope
126                                                   125 
127 void XrayTelDetectorConstruction::ConstructTel    126 void XrayTelDetectorConstruction::ConstructTelescope()
128 {                                                 127 {
129   // Construct Mirror                             128   // Construct Mirror
130   // Single shell mirror made of Nickel with t    129   // Single shell mirror made of Nickel with thin Gold coating
131   // Mirror made up of two cones approximating    130   // Mirror made up of two cones approximating the parabolic section and
132   // two cones approximating the hyperbolic se    131   // two cones approximating the hyperbolic section
133   // The centre of the mirror is filled wiith     132   // The centre of the mirror is filled wiith a solid aluminium rod shaped as the
134   // mirrors, so as to leave a constant Baffle    133   // mirrors, so as to leave a constant BaffleGap distance from the mirror surface
135                                                   134 
136   // Build materials                              135   // Build materials
137   G4Material* Ni = new G4Material("Nickel", 28    136   G4Material* Ni = new G4Material("Nickel", 28., 58.6934*g/mole, 8.902*g/cm3);
138   G4Material* Au = new G4Material("Gold", 79.,    137   G4Material* Au = new G4Material("Gold", 79., 196.96654*g/mole, 19.300*g/cm3);
139   G4Material* Al = new G4Material("Aluminium",    138   G4Material* Al = new G4Material("Aluminium", 13., 26.98*g/mole, 2.700*g/cm3);
140                                                   139 
141   // Visualization attributes                     140   // Visualization attributes
142   G4VisAttributes* VisAttMirror = new G4VisAtt    141   G4VisAttributes* VisAttMirror = new G4VisAttributes(
143                   G4Colour(0/255., 0/255.,255/    142                   G4Colour(0/255., 0/255.,255/255.));
144   G4VisAttributes* VisAttAuCoating = new G4Vis    143   G4VisAttributes* VisAttAuCoating = new G4VisAttributes(
145                G4Colour(255/255., 255/255., 0/    144                G4Colour(255/255., 255/255., 0/255.));
146   G4VisAttributes* VisAttBaffle = new G4VisAtt    145   G4VisAttributes* VisAttBaffle = new G4VisAttributes(
147                   G4Colour(128/255., 128/255.,    146                   G4Colour(128/255., 128/255., 128/255.));
148                                                   147 
149   // Rotation Matrix                              148   // Rotation Matrix
150   G4RotationMatrix *rotateMatrix = new G4Rotat    149   G4RotationMatrix *rotateMatrix = new G4RotationMatrix();
151   rotateMatrix -> rotateY(90.*deg);               150   rotateMatrix -> rotateY(90.*deg);
152                                                   151 
153   // Construct cones to make  Mirror sections     152   // Construct cones to make  Mirror sections
154   G4int i;                                        153   G4int i;
155   G4double MirrorEnd[5] = { 34.9995975*cm, 34.    154   G4double MirrorEnd[5] = { 34.9995975*cm, 34.8277209*cm, 34.6549918*cm,
156           34.1347834*cm, 33.6137753*cm };         155           34.1347834*cm, 33.6137753*cm };
157   G4double MirrorPosition[4] = { 772.5*cm, 757    156   G4double MirrorPosition[4] = { 772.5*cm, 757.5*cm, 742.5*cm, 727.5*cm };
158   G4double MirrorSectionLength = 15.0*cm;         157   G4double MirrorSectionLength = 15.0*cm;
159   G4double MirrorNiThickness = 1.07*mm;           158   G4double MirrorNiThickness = 1.07*mm;
160   G4double MirrorAuCoating = 50.0e-6*mm;          159   G4double MirrorAuCoating = 50.0e-6*mm;
161   G4double BaffleGap = 4.0*mm;                    160   G4double BaffleGap = 4.0*mm;
162                                                   161 
163   G4Cons* MirrorSolid[4];                         162   G4Cons* MirrorSolid[4];
164   G4Cons* MirrorAuCoatingSolid[4];                163   G4Cons* MirrorAuCoatingSolid[4];
165   G4Cons* BaffleSolid[4];                         164   G4Cons* BaffleSolid[4];
166                                                   165 
167   G4LogicalVolume* MirrorLogicalVolume[4];        166   G4LogicalVolume* MirrorLogicalVolume[4];
168   G4LogicalVolume* MirrorAuCoatingLogicalVolum    167   G4LogicalVolume* MirrorAuCoatingLogicalVolume[4];
169   G4LogicalVolume* BaffleLogicalVolume[4];        168   G4LogicalVolume* BaffleLogicalVolume[4];
170                                                   169 
171   for ( i=0; i<4; i++ ) {                         170   for ( i=0; i<4; i++ ) {
172                                                   171 
173     // Mirror Nickel base                         172     // Mirror Nickel base
174     MirrorSolid[i] = new G4Cons( "Mirror_S",      173     MirrorSolid[i] = new G4Cons( "Mirror_S",
175          MirrorEnd[i], MirrorEnd[i] + MirrorNi    174          MirrorEnd[i], MirrorEnd[i] + MirrorNiThickness,
176          MirrorEnd[i+1], MirrorEnd[i+1] + Mirr    175          MirrorEnd[i+1], MirrorEnd[i+1] + MirrorNiThickness,
177          MirrorSectionLength/2, 0*deg, 360.*de    176          MirrorSectionLength/2, 0*deg, 360.*deg);
178     MirrorLogicalVolume[i] = new G4LogicalVolu    177     MirrorLogicalVolume[i] = new G4LogicalVolume(
179              MirrorSolid[i], Ni, "Mirror_L", 0    178              MirrorSolid[i], Ni, "Mirror_L", 0, 0, 0 );
180     MirrorLogicalVolume[i]->SetVisAttributes(V    179     MirrorLogicalVolume[i]->SetVisAttributes(VisAttMirror);
181                                                   180 
182     // Gold coating on mirror                     181     // Gold coating on mirror
183     MirrorAuCoatingSolid[i] = new G4Cons(         182     MirrorAuCoatingSolid[i] = new G4Cons( 
184            "MirrorAuCoating_S",                   183            "MirrorAuCoating_S",
185            MirrorEnd[i] - MirrorAuCoating, Mir    184            MirrorEnd[i] - MirrorAuCoating, MirrorEnd[i],
186            MirrorEnd[i+1] - MirrorAuCoating, M    185            MirrorEnd[i+1] - MirrorAuCoating, MirrorEnd[i+1], 
187            MirrorSectionLength/2, 0*deg, 360.*    186            MirrorSectionLength/2, 0*deg, 360.*deg);
188     MirrorAuCoatingLogicalVolume[i] = new G4Lo    187     MirrorAuCoatingLogicalVolume[i] = new G4LogicalVolume(
189                 MirrorAuCoatingSolid[i],          188                 MirrorAuCoatingSolid[i],
190                 Au,                               189                 Au,
191                 "MirrorAuCoating_L",              190                 "MirrorAuCoating_L",
192                 0, 0, 0 );                        191                 0, 0, 0 );
193     MirrorAuCoatingLogicalVolume[i]->SetVisAtt    192     MirrorAuCoatingLogicalVolume[i]->SetVisAttributes(VisAttAuCoating);
194                                                   193 
195     // Aluminium baffle inside mirror             194     // Aluminium baffle inside mirror
196     BaffleSolid[i] = new G4Cons( "Baffle_S",      195     BaffleSolid[i] = new G4Cons( "Baffle_S",
197          0, MirrorEnd[i] - BaffleGap,             196          0, MirrorEnd[i] - BaffleGap,
198          0, MirrorEnd[i+1] - BaffleGap,           197          0, MirrorEnd[i+1] - BaffleGap,
199          MirrorSectionLength/2, 0*deg, 360.*de    198          MirrorSectionLength/2, 0*deg, 360.*deg);
200     BaffleLogicalVolume[i] = new G4LogicalVolu    199     BaffleLogicalVolume[i] = new G4LogicalVolume(
201              BaffleSolid[i], Al, "Baffle_L", 0    200              BaffleSolid[i], Al, "Baffle_L", 0, 0, 0 );
202     BaffleLogicalVolume[i]-> SetVisAttributes(    201     BaffleLogicalVolume[i]-> SetVisAttributes(VisAttBaffle);
203   }                                               202   }
204                                                   203 
205   // Physical volume                              204   // Physical volume
206                                                << 205   G4VPhysicalVolume* MirrorPhysicalVolume[4];
                                                   >> 206   G4VPhysicalVolume* MirrorAuCoatingPhysicalVolume[4];
                                                   >> 207   G4VPhysicalVolume* BafflePhysicalVolume[4];
                                                   >> 208 
207   for ( i=0; i<4; i++ ) {                         209   for ( i=0; i<4; i++ ) {
208      new G4PVPlacement(                        << 210     MirrorPhysicalVolume[i] = new G4PVPlacement(
209            rotateMatrix,                       << 211             rotateMatrix,
210            G4ThreeVector( MirrorPosition[i], 0 << 212             G4ThreeVector( MirrorPosition[i], 0.0*cm, 0.0*cm ),
211            "Mirror_P",                         << 213             "Mirror_P",
212            MirrorLogicalVolume[i],             << 214             MirrorLogicalVolume[i],
213            physicalWorld, false, 0 );          << 215             physicalWorld, false, 0 );
214      new G4PVPlacement(                        << 216     MirrorAuCoatingPhysicalVolume[i] = new G4PVPlacement(
215            rotateMatrix,                       << 217                rotateMatrix,
216            G4ThreeVector( MirrorPosition[i], 0 << 218                G4ThreeVector( MirrorPosition[i], 0.0*cm, 0.0*cm ),
217            "MirrorAuCoating_P",                << 219                "MirrorAuCoating_P",
218            MirrorAuCoatingLogicalVolume[i],    << 220                MirrorAuCoatingLogicalVolume[i],
219            physicalWorld, false, 0 );          << 221                physicalWorld, false, 0 );
220     new G4PVPlacement(                         << 222     BafflePhysicalVolume[i] = new G4PVPlacement(
221           rotateMatrix,                        << 223             rotateMatrix,
222           G4ThreeVector( MirrorPosition[i], 0. << 224             G4ThreeVector( MirrorPosition[i], 0.0*cm, 0.0*cm ),
223           "Baffle_P",                          << 225             "Baffle_P",
224           BaffleLogicalVolume[i],              << 226             BaffleLogicalVolume[i],
225           physicalWorld, false, 0 );           << 227             physicalWorld, false, 0 );
226   }                                               228   }
227                                                   229 
228   // Make Mirror Invisible                        230   // Make Mirror Invisible
229                                                   231 
230   for ( i=0; i<4; i++ ) {                         232   for ( i=0; i<4; i++ ) {
231     //   MirrorLogicalVolume[i] -> SetVisAttri << 233     //   MirrorLogicalVolume[i] -> SetVisAttributes(G4VisAttributes::Invisible);
232     //   MirrorAuCoatingLogicalVolume[i] -> Se << 234     //   MirrorAuCoatingLogicalVolume[i] -> SetVisAttributes(G4VisAttributes::Invisible);
233     BaffleLogicalVolume[i] -> SetVisAttributes << 235     BaffleLogicalVolume[i] -> SetVisAttributes(G4VisAttributes::Invisible);
234   }                                               236   }
235                                                   237 
236                                                   238 
237   // Construct Optical Bench                      239   // Construct Optical Bench
238   // Main Telescope carbon fibre tube and two     240   // Main Telescope carbon fibre tube and two aluminium end caps
239                                                   241 
240   G4int nel;                                      242   G4int nel;
241   G4String symbol;                                243   G4String symbol;
242                                                   244 
243   // Elements                                     245   // Elements
244   G4Element* C = new G4Element("Carbon", symbo    246   G4Element* C = new G4Element("Carbon", symbol="C", 6., 12.011*g/mole);
245   G4Element* H = new G4Element("Hydrogen",symb    247   G4Element* H = new G4Element("Hydrogen",symbol="H", 1., 1.00794*g/mole);
246                                                   248 
247   // Materials from Combination                   249   // Materials from Combination
248   G4Material* Cf = new G4Material("Carbon Fibr    250   G4Material* Cf = new G4Material("Carbon Fibre", 2.0*g/cm3, nel=2);
249   Cf->AddElement(C,1);                            251   Cf->AddElement(C,1);
250   Cf->AddElement(H,2);                            252   Cf->AddElement(H,2);
251                                                   253 
252   // Visualization attributes                     254   // Visualization attributes
253   G4VisAttributes* VisAttBench = new G4VisAttr    255   G4VisAttributes* VisAttBench = new G4VisAttributes(
254                  G4Colour(0/255., 200/255., 0/    256                  G4Colour(0/255., 200/255., 0/255.));
255                                                   257 
256   // Construct Optical bench                      258   // Construct Optical bench
257   G4double BenchThickness = 1.0*cm;               259   G4double BenchThickness = 1.0*cm;
258   G4double BenchFrontEndMinRadiusOut = MirrorE    260   G4double BenchFrontEndMinRadiusOut = MirrorEnd[4] + 
259     ( MirrorEnd[3] - MirrorEnd[4] )*7.5/15        261     ( MirrorEnd[3] - MirrorEnd[4] )*7.5/15
260     + MirrorNiThickness;                          262     + MirrorNiThickness;
261   G4double BenchFrontEndMinRadiusIn  = MirrorE    263   G4double BenchFrontEndMinRadiusIn  = MirrorEnd[4] + 
262     ( MirrorEnd[3] - MirrorEnd[4] )*7.4/15        264     ( MirrorEnd[3] - MirrorEnd[4] )*7.4/15
263     + MirrorNiThickness;                          265     + MirrorNiThickness;
264   G4double BenchFrontEndMaxRadius = MirrorEnd[    266   G4double BenchFrontEndMaxRadius = MirrorEnd[4] + MirrorNiThickness + 25.*cm;
265   G4double BenchBackEndMinRadius = 0.0*cm;        267   G4double BenchBackEndMinRadius = 0.0*cm;
266   G4double BenchBackEndMaxRadius =  MirrorEnd[    268   G4double BenchBackEndMaxRadius =  MirrorEnd[4] + MirrorNiThickness + 5.*cm;
267   G4double BenchMainLength;                       269   G4double BenchMainLength;
268                                                   270 
269   BenchMainLength = MirrorPosition[3] - BenchT    271   BenchMainLength = MirrorPosition[3] - BenchThickness;
270                                                   272 
271   G4Cons* BenchFrontEndSolid;                     273   G4Cons* BenchFrontEndSolid;
272   G4Tubs* BenchBackEndSolid;                      274   G4Tubs* BenchBackEndSolid;
273   G4Cons* BenchMainSolid;                         275   G4Cons* BenchMainSolid;
274                                                   276 
275   G4LogicalVolume* BenchFrontEndLogicalVolume;    277   G4LogicalVolume* BenchFrontEndLogicalVolume;
276   G4LogicalVolume* BenchBackEndLogicalVolume;     278   G4LogicalVolume* BenchBackEndLogicalVolume;
277   G4LogicalVolume* BenchMainLogicalVolume;        279   G4LogicalVolume* BenchMainLogicalVolume;
278                                                   280 
279   BenchFrontEndSolid = new G4Cons( "BenchFront    281   BenchFrontEndSolid = new G4Cons( "BenchFrontEnd_S",
280            BenchFrontEndMinRadiusOut, BenchFro    282            BenchFrontEndMinRadiusOut, BenchFrontEndMaxRadius,
281            BenchFrontEndMinRadiusIn, BenchFron    283            BenchFrontEndMinRadiusIn, BenchFrontEndMaxRadius,
282            BenchThickness/2, 0*deg, 360.*deg )    284            BenchThickness/2, 0*deg, 360.*deg );
283   BenchFrontEndLogicalVolume = new G4LogicalVo    285   BenchFrontEndLogicalVolume = new G4LogicalVolume(
284                BenchFrontEndSolid, Al, "BenchF    286                BenchFrontEndSolid, Al, "BenchFrontEnd_L", 0, 0, 0 );
285   BenchFrontEndLogicalVolume->SetVisAttributes    287   BenchFrontEndLogicalVolume->SetVisAttributes(VisAttBench);
286                                                   288 
287   BenchBackEndSolid  = new G4Tubs( "BenchBackE    289   BenchBackEndSolid  = new G4Tubs( "BenchBackEnd_S",
288            BenchBackEndMinRadius, BenchBackEnd    290            BenchBackEndMinRadius, BenchBackEndMaxRadius,
289            BenchThickness/2, 0*deg, 360.*deg )    291            BenchThickness/2, 0*deg, 360.*deg );
290   BenchBackEndLogicalVolume = new G4LogicalVol    292   BenchBackEndLogicalVolume = new G4LogicalVolume(
291               BenchBackEndSolid, Al, "BenchBac    293               BenchBackEndSolid, Al, "BenchBackEnd_L", 0, 0, 0 );
292   BenchBackEndLogicalVolume->SetVisAttributes(    294   BenchBackEndLogicalVolume->SetVisAttributes(VisAttBench);
293                                                   295 
294   BenchMainSolid     = new G4Cons( "BenchMain_    296   BenchMainSolid     = new G4Cons( "BenchMain_S",
295            BenchFrontEndMaxRadius - BenchThick    297            BenchFrontEndMaxRadius - BenchThickness,
296            BenchFrontEndMaxRadius,                298            BenchFrontEndMaxRadius,
297            BenchBackEndMaxRadius - BenchThickn    299            BenchBackEndMaxRadius - BenchThickness,
298            BenchBackEndMaxRadius,                 300            BenchBackEndMaxRadius,
299            BenchMainLength/2, 0*deg, 360.*deg)    301            BenchMainLength/2, 0*deg, 360.*deg);
300   BenchMainLogicalVolume = new G4LogicalVolume    302   BenchMainLogicalVolume = new G4LogicalVolume(
301                  BenchMainSolid, Cf, "BenchMai    303                  BenchMainSolid, Cf, "BenchMain_L", 0, 0, 0 );
302   BenchMainLogicalVolume -> SetVisAttributes(V    304   BenchMainLogicalVolume -> SetVisAttributes(VisAttBench);
303                                                   305 
304   // Physical volume                              306   // Physical volume
                                                   >> 307   G4VPhysicalVolume* BenchFrontEndPhysicalVolume;
                                                   >> 308   G4VPhysicalVolume* BenchBackEndPhysicalVolume;
                                                   >> 309   G4VPhysicalVolume* BenchMainPhysicalVolume;
                                                   >> 310 
                                                   >> 311   BenchFrontEndPhysicalVolume = new G4PVPlacement(
                                                   >> 312               rotateMatrix,
                                                   >> 313               G4ThreeVector( MirrorPosition[3] - BenchThickness/2,
                                                   >> 314                  0.0*cm, 0.0*cm ),
                                                   >> 315               "BenchFrontEnd_P",
                                                   >> 316               BenchFrontEndLogicalVolume,
                                                   >> 317               physicalWorld, false, 0 );
                                                   >> 318 
                                                   >> 319   BenchBackEndPhysicalVolume = new G4PVPlacement(
                                                   >> 320              rotateMatrix,
                                                   >> 321              G4ThreeVector(0.0*cm - BenchThickness/2, 0.0*cm, 0.0*cm ),
                                                   >> 322              "BenchBackEnd_P",
                                                   >> 323              BenchBackEndLogicalVolume,
                                                   >> 324              physicalWorld, false, 0 );
                                                   >> 325 
                                                   >> 326   BenchMainPhysicalVolume = new G4PVPlacement(
                                                   >> 327                 rotateMatrix,
                                                   >> 328                 G4ThreeVector( BenchMainLength/2, 0.0*cm, 0.0*cm ),
                                                   >> 329                 "BenchMain_P",
                                                   >> 330                 BenchMainLogicalVolume,
                                                   >> 331                 physicalWorld, false, 0 );
305                                                   332 
306   new G4PVPlacement(                           << 
307         rotateMatrix,                          << 
308         G4ThreeVector( MirrorPosition[3] - Ben << 
309            0.0*cm, 0.0*cm ),                   << 
310         "BenchFrontEnd_P",                     << 
311         BenchFrontEndLogicalVolume,            << 
312         physicalWorld, false, 0 );             << 
313                                                << 
314   new G4PVPlacement(                           << 
315         rotateMatrix,                          << 
316         G4ThreeVector(0.0*cm - BenchThickness/ << 
317         "BenchBackEnd_P",                      << 
318         BenchBackEndLogicalVolume,             << 
319         physicalWorld, false, 0 );             << 
320                                                << 
321   new G4PVPlacement(                           << 
322         rotateMatrix,                          << 
323         G4ThreeVector( BenchMainLength/2, 0.0* << 
324         "BenchMain_P",                         << 
325         BenchMainLogicalVolume,                << 
326         physicalWorld, false, 0 );             << 
327                                                << 
328   //--- Make Bench Invisible                      333   //--- Make Bench Invisible
329                                                   334 
330   // BenchFrontEndLogicalVolume -> SetVisAttri << 335   // BenchFrontEndLogicalVolume -> SetVisAttributes(G4VisAttributes::Invisible);
331                                                << 336   // BenchBackEndLogicalVolume -> SetVisAttributes(G4VisAttributes::Invisible);
332   // BenchBackEndLogicalVolume -> SetVisAttrib << 337   BenchMainLogicalVolume -> SetVisAttributes(G4VisAttributes::Invisible);
333   BenchMainLogicalVolume -> SetVisAttributes(G << 
334                                                   338 
335   return;                                         339   return;
336 }                                                 340 }
337                                                   341 
338 // Construct Focal Plane                          342 // Construct Focal Plane
339 // Conical Titanium baffle and silicon detecto    343 // Conical Titanium baffle and silicon detector
340                                                   344 
341 void XrayTelDetectorConstruction::ConstructFoc    345 void XrayTelDetectorConstruction::ConstructFocalPlane()
342 {                                                 346 {
343                                                   347 
344   // Elements                                     348   // Elements
345   G4Material* Ti = new G4Material("Titanium",     349   G4Material* Ti = new G4Material("Titanium", 22., 47.867*g/mole, 4.54*g/cm3);
346   G4Material* Si = new G4Material("Silicon", 1    350   G4Material* Si = new G4Material("Silicon", 14., 28.090*g/mole, 2.33*g/cm3);
347                                                   351 
348   // Visualization attributes                     352   // Visualization attributes
349   G4VisAttributes* VisDetectorBaffle = new G4V    353   G4VisAttributes* VisDetectorBaffle = new G4VisAttributes(
350                  G4Colour(190/255., 255/255.,     354                  G4Colour(190/255., 255/255., 0/255.) );
351   G4VisAttributes* VisDetector = new G4VisAttr    355   G4VisAttributes* VisDetector = new G4VisAttributes(
352                  G4Colour(255/255., 0/255., 0/    356                  G4Colour(255/255., 0/255., 0/255.) );
353                                                   357 
354   // Rotation Matrix                              358   // Rotation Matrix
355   G4RotationMatrix *rotateMatrix = new G4Rotat    359   G4RotationMatrix *rotateMatrix = new G4RotationMatrix();
356   rotateMatrix -> rotateY(90.*deg);               360   rotateMatrix -> rotateY(90.*deg);
357                                                   361 
358   // Construct Detector Baffle                    362   // Construct Detector Baffle
359   G4double DetectorBaffleLength = 57.2*cm;        363   G4double DetectorBaffleLength = 57.2*cm;
360   G4double DetectorBaffleOuterRadiusIn = 7.1*c    364   G4double DetectorBaffleOuterRadiusIn = 7.1*cm;
361   G4double DetectorBaffleOuterRadiusOut = 7.35    365   G4double DetectorBaffleOuterRadiusOut = 7.35*cm;
362   G4double DetectorBaffleInnerRadiusIn = 4.55*    366   G4double DetectorBaffleInnerRadiusIn = 4.55*cm;
363   G4double DetectorBaffleInnerRadiusOut = 5.75    367   G4double DetectorBaffleInnerRadiusOut = 5.75*cm;
364                                                   368 
365   G4Cons* DetectorBaffleSolid;                    369   G4Cons* DetectorBaffleSolid;
366                                                   370 
367   G4LogicalVolume* DetectorBaffleLogicalVolume    371   G4LogicalVolume* DetectorBaffleLogicalVolume;
368                                                   372 
369   DetectorBaffleSolid = new G4Cons( "DetectorB    373   DetectorBaffleSolid = new G4Cons( "DetectorBaffle_S",              
370             DetectorBaffleOuterRadiusIn,          374             DetectorBaffleOuterRadiusIn,
371             DetectorBaffleOuterRadiusOut,         375             DetectorBaffleOuterRadiusOut,
372             DetectorBaffleInnerRadiusIn,          376             DetectorBaffleInnerRadiusIn,
373             DetectorBaffleInnerRadiusOut,         377             DetectorBaffleInnerRadiusOut,
374             DetectorBaffleLength/2, 0*deg, 360    378             DetectorBaffleLength/2, 0*deg, 360.*deg);  
375   DetectorBaffleLogicalVolume = new G4LogicalV    379   DetectorBaffleLogicalVolume = new G4LogicalVolume( 
376                 DetectorBaffleSolid, Ti, "Dete    380                 DetectorBaffleSolid, Ti, "DetectorBaffle_L", 0, 0, 0 );
377   DetectorBaffleLogicalVolume -> SetVisAttribu    381   DetectorBaffleLogicalVolume -> SetVisAttributes( VisDetectorBaffle );
378                                                   382 
379   // Physical volume                              383   // Physical volume
380                                                << 384   G4VPhysicalVolume* DetectorBafflePhysicalVolume;
381   /* G4VPhysicalVolume* DetectorBafflePhysical << 385 
382   new G4PVPlacement(                           << 386   DetectorBafflePhysicalVolume = new G4PVPlacement(
383         rotateMatrix,                          << 387                rotateMatrix,
384         G4ThreeVector( DetectorBaffleLength/2, << 388                G4ThreeVector( DetectorBaffleLength/2, 0.0*cm, 0.0*cm),
385         "DetectorBaffle_P",                    << 389                "DetectorBaffle_P",
386         DetectorBaffleLogicalVolume,           << 390                DetectorBaffleLogicalVolume,
387         physicalWorld, false, 0 );             << 391                physicalWorld, false, 0 );
388                                                << 392 
389   //--- Make Invisible                            393   //--- Make Invisible
390                                                   394 
391   // DetectorBaffleLogicalVolume -> SetVisAttr << 395   // DetectorBaffleLogicalVolume -> SetVisAttributes( G4VisAttributes::Invisible );
392                                                   396 
393   // Construct Detector                           397   // Construct Detector
394                                                   398 
395   G4double DetectorRadius = 32.5*mm;              399   G4double DetectorRadius = 32.5*mm;
396   G4double DetectorThickness = 50e-6*m;           400   G4double DetectorThickness = 50e-6*m;
397                                                   401 
398   G4Tubs* DetectorSolid;                          402   G4Tubs* DetectorSolid;
399                                                   403 
400   G4LogicalVolume* DetectorLogicalVolume;         404   G4LogicalVolume* DetectorLogicalVolume;
401                                                   405 
402   DetectorSolid = new G4Tubs( "Detector_S",       406   DetectorSolid = new G4Tubs( "Detector_S",                        
403             0, DetectorRadius,                    407             0, DetectorRadius,
404             DetectorThickness/2, 0*deg, 360.*d    408             DetectorThickness/2, 0*deg, 360.*deg);  
405   DetectorLogicalVolume = new G4LogicalVolume(    409   DetectorLogicalVolume = new G4LogicalVolume( 
406                 DetectorSolid, Si, "Detector_L    410                 DetectorSolid, Si, "Detector_L", 0, 0, 0 );
407   DetectorLogicalVolume -> SetVisAttributes( V    411   DetectorLogicalVolume -> SetVisAttributes( VisDetector );
408                                                   412 
409   // Physical volume                              413   // Physical volume
410   /*G4VPhysicalVolume* DetectorPhysicalVolume  << 414   G4VPhysicalVolume* DetectorPhysicalVolume;
411   new G4PVPlacement(                           << 415 
412         rotateMatrix,                          << 416   DetectorPhysicalVolume = new G4PVPlacement( 
413         G4ThreeVector( DetectorThickness/2, 0. << 417                rotateMatrix,
414         "Detector_P",                          << 418                G4ThreeVector( DetectorThickness/2, 0.0*cm, 0.0*cm),
415         DetectorLogicalVolume,                 << 419                "Detector_P",
416         physicalWorld, false, 0 );             << 420                DetectorLogicalVolume,
417                                                << 421                physicalWorld, false, 0 );
                                                   >> 422 
418   //--- Make Invisible                            423   //--- Make Invisible
419   // DetectorLogicalVolume -> SetVisAttributes << 424   // DetectorLogicalVolume -> SetVisAttributes( G4VisAttributes::Invisible );
420                                                   425 
421   return;                                         426   return;
422 }                                                 427 }
423                                                   428