| [807] | 1 | //
|
|---|
| 2 | // ********************************************************************
|
|---|
| 3 | // * License and Disclaimer *
|
|---|
| 4 | // * *
|
|---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of *
|
|---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and *
|
|---|
| 7 | // * conditions of the Geant4 Software License, included in the file *
|
|---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These *
|
|---|
| 9 | // * include a list of copyright holders. *
|
|---|
| 10 | // * *
|
|---|
| 11 | // * Neither the authors of this software system, nor their employing *
|
|---|
| 12 | // * institutes,nor the agencies providing financial support for this *
|
|---|
| 13 | // * work make any representation or warranty, express or implied, *
|
|---|
| 14 | // * regarding this software system or assume any liability for its *
|
|---|
| 15 | // * use. Please see the license in the file LICENSE and URL above *
|
|---|
| 16 | // * for the full disclaimer and the limitation of liability. *
|
|---|
| 17 | // * *
|
|---|
| 18 | // * This code implementation is the result of the scientific and *
|
|---|
| 19 | // * technical work of the GEANT4 collaboration. *
|
|---|
| 20 | // * By using, copying, modifying or distributing the software (or *
|
|---|
| 21 | // * any work based on the software) you agree to acknowledge its *
|
|---|
| 22 | // * use in resulting scientific publications, and indicate your *
|
|---|
| 23 | // * acceptance of all terms of the Geant4 Software license. *
|
|---|
| 24 | // ********************************************************************
|
|---|
| 25 | //
|
|---|
| 26 | //
|
|---|
| 27 | // $Id: Em10DetectorConstruction.cc,v 1.32 2007/07/27 17:52:04 vnivanch Exp $
|
|---|
| 28 | // GEANT4 tag $Name: $
|
|---|
| 29 | //
|
|---|
| 30 | //
|
|---|
| 31 |
|
|---|
| 32 | #include "Em10DetectorConstruction.hh"
|
|---|
| 33 | #include "Em10DetectorMessenger.hh"
|
|---|
| 34 | #include "Em10CalorimeterSD.hh"
|
|---|
| 35 | #include "Em10Materials.hh"
|
|---|
| 36 |
|
|---|
| 37 | #include "G4Material.hh"
|
|---|
| 38 | #include "G4Box.hh"
|
|---|
| 39 | #include "G4LogicalVolume.hh"
|
|---|
| 40 | #include "G4PVPlacement.hh"
|
|---|
| 41 | #include "G4UniformMagField.hh"
|
|---|
| 42 | #include "G4FieldManager.hh"
|
|---|
| 43 | #include "G4TransportationManager.hh"
|
|---|
| 44 | #include "G4SDManager.hh"
|
|---|
| 45 | #include "G4GeometryManager.hh"
|
|---|
| 46 | #include "G4RunManager.hh"
|
|---|
| 47 |
|
|---|
| 48 | #include "G4Region.hh"
|
|---|
| 49 | #include "G4RegionStore.hh"
|
|---|
| 50 | #include "G4PhysicalVolumeStore.hh"
|
|---|
| 51 | #include "G4LogicalVolumeStore.hh"
|
|---|
| 52 | #include "G4SolidStore.hh"
|
|---|
| 53 | #include "G4ProductionCuts.hh"
|
|---|
| 54 |
|
|---|
| 55 | #include "G4VisAttributes.hh"
|
|---|
| 56 | #include "G4Colour.hh"
|
|---|
| 57 |
|
|---|
| 58 | #include "G4UnitsTable.hh"
|
|---|
| 59 | #include "G4ios.hh"
|
|---|
| 60 |
|
|---|
| 61 | /////////////////////////////////////////////////////////////////////////////
|
|---|
| 62 | //
|
|---|
| 63 | //
|
|---|
| 64 |
|
|---|
| 65 | Em10DetectorConstruction::Em10DetectorConstruction()
|
|---|
| 66 | :fWorldChanged(false), fAbsorberMaterial(0), fGapMat(0),fSetUp("simpleALICE"),
|
|---|
| 67 | fWorldMaterial(0), fSolidWorld(0), fLogicWorld(0), fPhysicsWorld(0),
|
|---|
| 68 | fSolidRadSlice(0), fLogicRadSlice(0), fPhysicRadSlice(0),
|
|---|
| 69 | fSolidRadiator(0), fLogicRadiator(0), fPhysicsRadiator(0),
|
|---|
| 70 | fRadiatorMat(0), fPipe(false), fPipeField(false),
|
|---|
| 71 | fSolidAbsorber(0), fLogicAbsorber(0), fPhysicsAbsorber(0),
|
|---|
| 72 | fMagField(0), fCalorimeterSD(0), fRegGasDet(0), fRadRegion(0), fMat(0)
|
|---|
| 73 | {
|
|---|
| 74 | fDetectorMessenger = new Em10DetectorMessenger(this);
|
|---|
| 75 | fMat = new Em10Materials();
|
|---|
| 76 | }
|
|---|
| 77 |
|
|---|
| 78 | //////////////////////////////////////////////////////////////////////////
|
|---|
| 79 | //
|
|---|
| 80 | //
|
|---|
| 81 |
|
|---|
| 82 | Em10DetectorConstruction::~Em10DetectorConstruction()
|
|---|
| 83 | {
|
|---|
| 84 | delete fDetectorMessenger;
|
|---|
| 85 | delete fMat;
|
|---|
| 86 | }
|
|---|
| 87 |
|
|---|
| 88 | //////////////////////////////////////////////////////////////////////////
|
|---|
| 89 | //
|
|---|
| 90 | //
|
|---|
| 91 |
|
|---|
| 92 | G4VPhysicalVolume* Em10DetectorConstruction::Construct()
|
|---|
| 93 | {
|
|---|
| 94 | return ConstructDetectorXTR();
|
|---|
| 95 | }
|
|---|
| 96 |
|
|---|
| 97 |
|
|---|
| 98 | /////////////////////////////////////////////////////////////////////////
|
|---|
| 99 | //
|
|---|
| 100 | //
|
|---|
| 101 |
|
|---|
| 102 | G4VPhysicalVolume* Em10DetectorConstruction::ConstructDetectorXTR()
|
|---|
| 103 | {
|
|---|
| 104 | // Cleanup old geometry
|
|---|
| 105 |
|
|---|
| 106 | G4GeometryManager::GetInstance()->OpenGeometry();
|
|---|
| 107 | G4PhysicalVolumeStore::GetInstance()->Clean();
|
|---|
| 108 | G4LogicalVolumeStore::GetInstance()->Clean();
|
|---|
| 109 | G4SolidStore::GetInstance()->Clean();
|
|---|
| 110 |
|
|---|
| 111 | if( fSetUp == "simpleALICE" )
|
|---|
| 112 | {
|
|---|
| 113 | return SimpleSetUpALICE();
|
|---|
| 114 | }
|
|---|
| 115 | else if( fSetUp == "alice06" )
|
|---|
| 116 | {
|
|---|
| 117 | return SetUpALICE06();
|
|---|
| 118 | }
|
|---|
| 119 | else if( fSetUp == "bari05" )
|
|---|
| 120 | {
|
|---|
| 121 | return SetUpBari05();
|
|---|
| 122 | }
|
|---|
| 123 | else if( fSetUp == "harris73" )
|
|---|
| 124 | {
|
|---|
| 125 | return SetUpHarris73();
|
|---|
| 126 | }
|
|---|
| 127 | else if( fSetUp == "watase86" )
|
|---|
| 128 | {
|
|---|
| 129 | return SetUpWatase86();
|
|---|
| 130 | }
|
|---|
| 131 | else if( fSetUp == "barr90" )
|
|---|
| 132 | {
|
|---|
| 133 | return SetUpBarr90();
|
|---|
| 134 | }
|
|---|
| 135 | else
|
|---|
| 136 | {
|
|---|
| 137 | G4cout<<"Experimental setup is unsupported. Check /XTRdetector/setup "<<G4endl;
|
|---|
| 138 | G4cout<<"Run default: barr90 "<<G4endl;
|
|---|
| 139 | return SetUpBarr90();
|
|---|
| 140 |
|
|---|
| 141 | // return 0;
|
|---|
| 142 | }
|
|---|
| 143 | }
|
|---|
| 144 |
|
|---|
| 145 | /////////////////////////////////////////////////////////////////////////////////
|
|---|
| 146 | //
|
|---|
| 147 | // Simplified setup for ALICE XTR test beam (~2004).
|
|---|
| 148 | // Runs by : TestEm10 salice.mac
|
|---|
| 149 |
|
|---|
| 150 | G4VPhysicalVolume* Em10DetectorConstruction::SimpleSetUpALICE()
|
|---|
| 151 | {
|
|---|
| 152 | fWorldSizeZ = 400.*cm;
|
|---|
| 153 | fWorldSizeR = 20.*cm;
|
|---|
| 154 |
|
|---|
| 155 | // Radiator and detector parameters
|
|---|
| 156 |
|
|---|
| 157 | fRadThickness = 0.020*mm;
|
|---|
| 158 | fGasGap = 0.250*mm;
|
|---|
| 159 | foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
|
|---|
| 160 |
|
|---|
| 161 | fFoilNumber = 220;
|
|---|
| 162 |
|
|---|
| 163 | fAbsorberThickness = 38.3*mm;
|
|---|
| 164 |
|
|---|
| 165 | fAbsorberRadius = 100.*mm;
|
|---|
| 166 | fAbsorberZ = 136.*cm;
|
|---|
| 167 |
|
|---|
| 168 | fWindowThick = 51.0*micrometer ;
|
|---|
| 169 | fElectrodeThick = 10.0*micrometer ;
|
|---|
| 170 | fGapThick = 10.0*cm ;
|
|---|
| 171 |
|
|---|
| 172 |
|
|---|
| 173 | fDetThickness = 40.0*mm ;
|
|---|
| 174 | fDetLength = 200.0*cm ;
|
|---|
| 175 | fDetGap = 0.01*mm ;
|
|---|
| 176 |
|
|---|
| 177 |
|
|---|
| 178 | fStartR = 40*cm ;
|
|---|
| 179 | fStartZ = 100.0*mm ;
|
|---|
| 180 |
|
|---|
| 181 | fModuleNumber = 1 ;
|
|---|
| 182 |
|
|---|
| 183 | // Preparation of mixed radiator material
|
|---|
| 184 |
|
|---|
| 185 |
|
|---|
| 186 | G4Material* Mylar = fMat->GetMaterial("Mylar");
|
|---|
| 187 | G4Material* Air = fMat->GetMaterial("Air");
|
|---|
| 188 | G4Material* Al = fMat->GetMaterial("Al");
|
|---|
| 189 |
|
|---|
| 190 | G4double foilDensity = 1.39*g/cm3; // Mylar // 0.91*g/cm3; // CH2 0.534*g/cm3; //Li
|
|---|
| 191 | G4double gasDensity = 1.2928*mg/cm3; // Air // 1.977*mg/cm3; // CO2 0.178*mg/cm3; // He
|
|---|
| 192 | G4double totDensity = foilDensity*foilGasRatio + gasDensity*(1.0-foilGasRatio) ;
|
|---|
| 193 |
|
|---|
| 194 | G4double fractionFoil = foilDensity*foilGasRatio/totDensity ;
|
|---|
| 195 | G4double fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity ;
|
|---|
| 196 |
|
|---|
| 197 | G4Material* radiatorMat = new G4Material("radiatorMat" , totDensity,
|
|---|
| 198 | 2);
|
|---|
| 199 | radiatorMat->AddMaterial( Mylar, fractionFoil ) ;
|
|---|
| 200 | radiatorMat->AddMaterial( Air, fractionGas ) ;
|
|---|
| 201 |
|
|---|
| 202 | // default materials of the detector and TR radiator
|
|---|
| 203 |
|
|---|
| 204 | fRadiatorMat = radiatorMat;
|
|---|
| 205 | fFoilMat = Mylar; // CH2; // Kapton; // Mylar ; // Li ; // CH2 ;
|
|---|
| 206 | fGasMat = Air; // CO2; // He; //
|
|---|
| 207 |
|
|---|
| 208 | fWindowMat = Mylar ;
|
|---|
| 209 | fElectrodeMat = Al ;
|
|---|
| 210 |
|
|---|
| 211 | fAbsorberMaterial = fMat->GetMaterial("Xe15CO2");
|
|---|
| 212 |
|
|---|
| 213 |
|
|---|
| 214 | fGapMat = fAbsorberMaterial;
|
|---|
| 215 |
|
|---|
| 216 | fWorldMaterial = Air; // CO2 ;
|
|---|
| 217 |
|
|---|
| 218 | fSolidWorld = new G4Box("World", fWorldSizeR,fWorldSizeR,fWorldSizeZ/2.);
|
|---|
| 219 |
|
|---|
| 220 | fLogicWorld = new G4LogicalVolume(fSolidWorld, fWorldMaterial, "World");
|
|---|
| 221 |
|
|---|
| 222 | fPhysicsWorld = new G4PVPlacement(0, G4ThreeVector(), "World",
|
|---|
| 223 | fLogicWorld, 0, false, 0);
|
|---|
| 224 |
|
|---|
| 225 | // TR radiator envelope
|
|---|
| 226 |
|
|---|
| 227 | fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
|
|---|
| 228 |
|
|---|
| 229 | fRadZ = fStartZ + 0.5*fRadThick ;
|
|---|
| 230 |
|
|---|
| 231 | fSolidRadiator = new G4Box("Radiator",1.1*fAbsorberRadius ,
|
|---|
| 232 | 1.1*fAbsorberRadius, 0.5*fRadThick );
|
|---|
| 233 |
|
|---|
| 234 | fLogicRadiator = new G4LogicalVolume(fSolidRadiator, fRadiatorMat,
|
|---|
| 235 | "Radiator");
|
|---|
| 236 |
|
|---|
| 237 | fPhysicsRadiator = new G4PVPlacement(0,
|
|---|
| 238 | G4ThreeVector(0,0,fRadZ),
|
|---|
| 239 | "Radiator", fLogicRadiator,
|
|---|
| 240 | fPhysicsWorld, false, 0 );
|
|---|
| 241 |
|
|---|
| 242 | // create region for window inside windowR for
|
|---|
| 243 |
|
|---|
| 244 | if( fRadRegion != 0 ) delete fRadRegion;
|
|---|
| 245 | if( fRadRegion == 0 ) fRadRegion = new G4Region("XTRradiator");
|
|---|
| 246 | fRadRegion->AddRootLogicalVolume(fLogicRadiator);
|
|---|
| 247 |
|
|---|
| 248 |
|
|---|
| 249 |
|
|---|
| 250 | fWindowZ = fStartZ + fRadThick + fWindowThick/2. + 15.0*mm ;
|
|---|
| 251 |
|
|---|
| 252 | // G4Box* solidWindowR = new G4Box("WindowR",fAbsorberRadius+0.001,
|
|---|
| 253 | // fAbsorberRadius+0.001,
|
|---|
| 254 | // fWindowThick/2.+0.001 );
|
|---|
| 255 |
|
|---|
| 256 | // G4LogicalVolume* logicWindowR = new G4LogicalVolume(solidWindowR,
|
|---|
| 257 | // fWorldMaterial, "WindowR");
|
|---|
| 258 |
|
|---|
| 259 | // G4VPhysicalVolume* physiWindowR = new G4PVPlacement(0,
|
|---|
| 260 | // G4ThreeVector(0.,0.,fWindowZ),
|
|---|
| 261 | // "WindowR",logicWindowR,fPhysicsWorld,false,0);
|
|---|
| 262 | // window
|
|---|
| 263 |
|
|---|
| 264 | // G4Box* solidWindow = new G4Box("Window",fAbsorberRadius,
|
|---|
| 265 | // fAbsorberRadius, fWindowThick/2.);
|
|---|
| 266 |
|
|---|
| 267 | // G4LogicalVolume* logicWindow = new G4LogicalVolume(solidWindow,
|
|---|
| 268 | // fWindowMat, "Window");
|
|---|
| 269 |
|
|---|
| 270 | // G4VPhysicalVolume* physiWindow = new G4PVPlacement(0, G4ThreeVector(0.,0.,0.),
|
|---|
| 271 | // "Window", logicWindow, physiWindowR, false, 0);
|
|---|
| 272 |
|
|---|
| 273 |
|
|---|
| 274 | fGapZ = fWindowZ + fWindowThick/2. + fGapThick/2. + 0.01*mm ;
|
|---|
| 275 |
|
|---|
| 276 | fElectrodeZ = fGapZ + fGapThick/2. + fElectrodeThick/2. + 0.01*mm;
|
|---|
| 277 |
|
|---|
| 278 | // Absorber
|
|---|
| 279 |
|
|---|
| 280 | fAbsorberZ = fElectrodeZ + fElectrodeThick/2. + fAbsorberThickness/2. + 0.01*mm;
|
|---|
| 281 |
|
|---|
| 282 | fSolidAbsorber = new G4Box("Absorber", fAbsorberRadius,
|
|---|
| 283 | fAbsorberRadius, fAbsorberThickness/2.);
|
|---|
| 284 |
|
|---|
| 285 | fLogicAbsorber = new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
|
|---|
| 286 | "Absorber");
|
|---|
| 287 |
|
|---|
| 288 | fPhysicsAbsorber = new G4PVPlacement(0, G4ThreeVector(0.,0.,fAbsorberZ),
|
|---|
| 289 | "Absorber", fLogicAbsorber,
|
|---|
| 290 | fPhysicsWorld, false, 0);
|
|---|
| 291 |
|
|---|
| 292 | if( fRegGasDet != 0 ) delete fRegGasDet;
|
|---|
| 293 | if( fRegGasDet == 0 ) fRegGasDet = new G4Region("XTRdEdxDetector");
|
|---|
| 294 | fRegGasDet->AddRootLogicalVolume(fLogicAbsorber);
|
|---|
| 295 |
|
|---|
| 296 | // Sensitive Detectors: Absorber
|
|---|
| 297 |
|
|---|
| 298 | G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
|---|
| 299 |
|
|---|
| 300 | if(!fCalorimeterSD)
|
|---|
| 301 | {
|
|---|
| 302 | fCalorimeterSD = new Em10CalorimeterSD("CalorSD",this);
|
|---|
| 303 | SDman->AddNewDetector( fCalorimeterSD );
|
|---|
| 304 | }
|
|---|
| 305 | if (fLogicAbsorber) fLogicAbsorber->SetSensitiveDetector(fCalorimeterSD);
|
|---|
| 306 |
|
|---|
| 307 | PrintGeometryParameters();
|
|---|
| 308 |
|
|---|
| 309 | return fPhysicsWorld;
|
|---|
| 310 | }
|
|---|
| 311 |
|
|---|
| 312 | /////////////////////////////////////////////////////////////////////////////////
|
|---|
| 313 | //
|
|---|
| 314 | // Setup for ALICE XTR test beam (~2004). With He beam-pipe
|
|---|
| 315 | // Runs by : TestEm10 alice06.mac
|
|---|
| 316 |
|
|---|
| 317 | G4VPhysicalVolume* Em10DetectorConstruction::SetUpALICE06()
|
|---|
| 318 | {
|
|---|
| 319 | fWorldSizeZ = 600.*cm;
|
|---|
| 320 | fWorldSizeR = 22.*cm;
|
|---|
| 321 |
|
|---|
| 322 | // Radiator and detector parameters
|
|---|
| 323 |
|
|---|
| 324 | //fRadThickness = 0.01*mm; // Gamma XTR (malz: 0.01)
|
|---|
| 325 | //fGasGap = 0.19*mm; // Gamma XTR (malz: 0.09)
|
|---|
| 326 | //fFoilNumber = 240; // Gamma XTR (malz: 480)
|
|---|
| 327 |
|
|---|
| 328 | fRadThickness = 0.020*mm; // Reg1
|
|---|
| 329 | fGasGap = 0.500*mm; // Reg1
|
|---|
| 330 | fFoilNumber = 120; // Reg1
|
|---|
| 331 |
|
|---|
| 332 | //fRadThickness = 0.013*mm; // Anton
|
|---|
| 333 | //fGasGap = 0.060*mm; // Anton
|
|---|
| 334 | //fFoilNumber = 550; // Anton
|
|---|
| 335 |
|
|---|
| 336 |
|
|---|
| 337 | // fRadThickness = 0.020*mm; // Reg2
|
|---|
| 338 | // fGasGap = 0.250*mm; // Reg2
|
|---|
| 339 | // fFoilNumber = 220; // Reg2
|
|---|
| 340 |
|
|---|
| 341 | foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
|
|---|
| 342 |
|
|---|
| 343 |
|
|---|
| 344 | fAbsorberThickness = 37.*mm; // 38.3*mm;
|
|---|
| 345 |
|
|---|
| 346 | fAbsorberRadius = 100.*mm;
|
|---|
| 347 | fAbsorberZ = 136.*cm;
|
|---|
| 348 |
|
|---|
| 349 | fPipeLength = 160.0*cm;
|
|---|
| 350 | fMylarThick = 20.0*micrometer;
|
|---|
| 351 |
|
|---|
| 352 | fWindowThick = 51.0*micrometer ;
|
|---|
| 353 | fElectrodeThick = 100.0*micrometer ;
|
|---|
| 354 | fGapThick = 10.0*cm ;
|
|---|
| 355 |
|
|---|
| 356 |
|
|---|
| 357 | fDetThickness = 40.0*mm ;
|
|---|
| 358 | fDetLength = 200.0*cm ;
|
|---|
| 359 | fDetGap = 0.01*mm ;
|
|---|
| 360 |
|
|---|
| 361 |
|
|---|
| 362 | fStartR = 40*cm ;
|
|---|
| 363 | fStartZ = 100.0*mm ;
|
|---|
| 364 |
|
|---|
| 365 | fModuleNumber = 1 ;
|
|---|
| 366 |
|
|---|
| 367 | // Preparation of mixed radiator material
|
|---|
| 368 |
|
|---|
| 369 |
|
|---|
| 370 | G4Material* Mylar = fMat->GetMaterial("Mylar");
|
|---|
| 371 | G4Material* Air = fMat->GetMaterial("Air");
|
|---|
| 372 | G4Material* Al = fMat->GetMaterial("Al");
|
|---|
| 373 | G4Material* CH2 = fMat->GetMaterial("CH2");
|
|---|
| 374 | G4Material* He = fMat->GetMaterial("He");
|
|---|
| 375 |
|
|---|
| 376 | G4double foilDensity = CH2->GetDensity();
|
|---|
| 377 | G4double gasDensity = Air->GetDensity();
|
|---|
| 378 | G4double totDensity = foilDensity*foilGasRatio + gasDensity*(1.0-foilGasRatio) ;
|
|---|
| 379 |
|
|---|
| 380 | G4double fractionFoil = foilDensity*foilGasRatio/totDensity ;
|
|---|
| 381 | G4double fractionGas = 1.0 - fractionFoil; // gasDensity*(1.0-foilGasRatio)/totDensity ;
|
|---|
| 382 |
|
|---|
| 383 | G4Material* radiatorMat = new G4Material("radiatorMat" , totDensity,
|
|---|
| 384 | 2);
|
|---|
| 385 | radiatorMat->AddMaterial( CH2, fractionFoil ) ;
|
|---|
| 386 | radiatorMat->AddMaterial( Air, fractionGas ) ;
|
|---|
| 387 |
|
|---|
| 388 | // default materials of the detector and TR radiator
|
|---|
| 389 |
|
|---|
| 390 | fRadiatorMat = radiatorMat;
|
|---|
| 391 | fFoilMat = CH2; // Kapton; // Mylar ; // Li ; // CH2 ;
|
|---|
| 392 | fGasMat = Air; // CO2; // He; //
|
|---|
| 393 |
|
|---|
| 394 | fWindowMat = Mylar;
|
|---|
| 395 | fElectrodeMat = Al;
|
|---|
| 396 |
|
|---|
| 397 | fAbsorberMaterial = fMat->GetMaterial("Xe15CO2");
|
|---|
| 398 |
|
|---|
| 399 | // pipe material is assumed to be He + small admixture of air
|
|---|
| 400 | /*
|
|---|
| 401 | foilGasRatio = 0.000001;
|
|---|
| 402 | foilDensity = Air->GetDensity();
|
|---|
| 403 | gasDensity = He->GetDensity();
|
|---|
| 404 | totDensity = foilDensity*foilGasRatio + gasDensity*( 1.0 - foilGasRatio );
|
|---|
| 405 |
|
|---|
| 406 | fractionFoil = foilDensity*foilGasRatio/totDensity;
|
|---|
| 407 | fractionGas = 1.0 - fractionFoil; // gasDensity*(1.0 - foilGasRatio)/totDensity;
|
|---|
| 408 |
|
|---|
| 409 | fPipeMat = new G4Material("pipeMat" , totDensity, 2);
|
|---|
| 410 | fPipeMat->AddMaterial( Air, fractionFoil );
|
|---|
| 411 | fPipeMat->AddMaterial( He, fractionGas );
|
|---|
| 412 | */
|
|---|
| 413 | fPipeMat = He;
|
|---|
| 414 |
|
|---|
| 415 | fGapMat = fAbsorberMaterial;
|
|---|
| 416 |
|
|---|
| 417 | fWorldMaterial = Air;
|
|---|
| 418 |
|
|---|
| 419 |
|
|---|
| 420 | fSolidWorld = new G4Box("World", fWorldSizeR, fWorldSizeR, fWorldSizeZ/2.);
|
|---|
| 421 |
|
|---|
| 422 | fLogicWorld = new G4LogicalVolume(fSolidWorld, fWorldMaterial, "World");
|
|---|
| 423 |
|
|---|
| 424 | fPhysicsWorld = new G4PVPlacement(0, G4ThreeVector(), "World",
|
|---|
| 425 | fLogicWorld, 0, false, 0);
|
|---|
| 426 |
|
|---|
| 427 | // TR radiator envelope
|
|---|
| 428 |
|
|---|
| 429 | fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
|
|---|
| 430 |
|
|---|
| 431 | fRadZ = fStartZ + 0.5*fRadThick;
|
|---|
| 432 |
|
|---|
| 433 | // fRadZ = -fRadThick/2. - fElectrodeThick;
|
|---|
| 434 | // if ( fabs(pipe) > 1.e-15 ) fRadZ -= ( fPipeLength/2. + pipeDist );
|
|---|
| 435 |
|
|---|
| 436 |
|
|---|
| 437 | fSolidRadiator = new G4Box("Radiator",1.1*fAbsorberRadius ,
|
|---|
| 438 | 1.1*fAbsorberRadius, 0.5*fRadThick );
|
|---|
| 439 |
|
|---|
| 440 | fLogicRadiator = new G4LogicalVolume(fSolidRadiator, fRadiatorMat,
|
|---|
| 441 | "Radiator");
|
|---|
| 442 |
|
|---|
| 443 | fPhysicsRadiator = new G4PVPlacement(0,
|
|---|
| 444 | G4ThreeVector(0,0,fRadZ),
|
|---|
| 445 | "Radiator", fLogicRadiator,
|
|---|
| 446 | fPhysicsWorld, false, 0 );
|
|---|
| 447 |
|
|---|
| 448 | // create region for radiator
|
|---|
| 449 |
|
|---|
| 450 | if( fRadRegion != 0 ) delete fRadRegion;
|
|---|
| 451 | if( fRadRegion == 0 ) fRadRegion = new G4Region("XTRradiator");
|
|---|
| 452 | fRadRegion->AddRootLogicalVolume(fLogicRadiator);
|
|---|
| 453 |
|
|---|
| 454 | // Drift Electrode on both sides of Radiator:
|
|---|
| 455 |
|
|---|
| 456 | G4double zElectrode1 = fRadZ - fRadThick/2. - fElectrodeThick/2.;
|
|---|
| 457 | G4double zElectrode2 = fRadZ + fRadThick/2. + fElectrodeThick/2.;
|
|---|
| 458 | /*
|
|---|
| 459 | G4Box* solidElectrode = new G4Box("Electrode",fAbsorberRadius*1.1,
|
|---|
| 460 | fAbsorberRadius*1.1,
|
|---|
| 461 | fElectrodeThick/2.);
|
|---|
| 462 |
|
|---|
| 463 | G4LogicalVolume* logicElectrode = new G4LogicalVolume(solidElectrode,
|
|---|
| 464 | fElectrodeMat,
|
|---|
| 465 | "Electrode");
|
|---|
| 466 |
|
|---|
| 467 | G4VPhysicalVolume* physiElectrode1 = new G4PVPlacement(0,
|
|---|
| 468 | G4ThreeVector(0.,0.,zElectrode1),
|
|---|
| 469 | "Electrode1",logicElectrode,
|
|---|
| 470 | fPhysicsWorld,false,0);
|
|---|
| 471 |
|
|---|
| 472 | G4VPhysicalVolume* physiElectrode2 = new G4PVPlacement(0,
|
|---|
| 473 | G4ThreeVector(0.,0.,zElectrode2),
|
|---|
| 474 | "Electrode1",logicElectrode,
|
|---|
| 475 | fPhysicsWorld,false,0);
|
|---|
| 476 | */
|
|---|
| 477 | G4cout<<"zElectrode1 = "<<zElectrode1/mm<<" mm"<<G4endl;
|
|---|
| 478 | G4cout<<"zElectrode2 = "<<zElectrode2/mm<<" mm"<<G4endl;
|
|---|
| 479 | G4cout<<"fElectrodeThick = "<<fElectrodeThick/mm<<" mm"<<G4endl<<G4endl;
|
|---|
| 480 |
|
|---|
| 481 | // Helium Pipe:
|
|---|
| 482 |
|
|---|
| 483 | G4double pipeDist = 1.*cm; //Distance between pipe and radiator / absorber
|
|---|
| 484 | G4double fieldStrength = 1.0*tesla; // 0.01*tesla; // field strength in pipe
|
|---|
| 485 | G4double alphaB = 90.*degree;
|
|---|
| 486 | fPipe = true; // 0.; // use helium pipe is setup
|
|---|
| 487 |
|
|---|
| 488 | fPipeField = true; // field in helium pipe used?
|
|---|
| 489 |
|
|---|
| 490 | G4double zPipe = zElectrode2 + fElectrodeThick/2. +
|
|---|
| 491 | pipeDist/2. + fPipeLength/2.;
|
|---|
| 492 |
|
|---|
| 493 | if ( fPipe )
|
|---|
| 494 | {
|
|---|
| 495 |
|
|---|
| 496 | G4Box* solidPipe = new G4Box("Pipe",fAbsorberRadius*0.5,
|
|---|
| 497 | fAbsorberRadius*0.5,
|
|---|
| 498 | fPipeLength/2. );
|
|---|
| 499 |
|
|---|
| 500 | G4LogicalVolume* logicPipe = new G4LogicalVolume(solidPipe,
|
|---|
| 501 | fPipeMat, // fWorldMaterial, //
|
|---|
| 502 | "Pipe");
|
|---|
| 503 |
|
|---|
| 504 | // G4VPhysicalVolume* physiPipe = new G4PVPlacement(0,
|
|---|
| 505 | // G4ThreeVector(0., 0., zPipe),
|
|---|
| 506 | // "Pipe1",logicPipe,
|
|---|
| 507 | // fPhysicsWorld,false,0);
|
|---|
| 508 |
|
|---|
| 509 | G4cout<<"zPipe = "<<zPipe/mm<<" mm"<<G4endl;
|
|---|
| 510 | G4cout<<"fPipeLength = "<<fPipeLength/mm<<" mm"<<G4endl<<G4endl;
|
|---|
| 511 |
|
|---|
| 512 | // magnetic field in Pipe:
|
|---|
| 513 |
|
|---|
| 514 | if ( fPipeField )
|
|---|
| 515 | {
|
|---|
| 516 | if( fMagField ) delete fMagField; //delete the existing mag field
|
|---|
| 517 |
|
|---|
| 518 | fMagField = new G4UniformMagField(G4ThreeVector(fieldStrength*std::sin(alphaB),
|
|---|
| 519 | 0., fieldStrength*std::cos(alphaB)));
|
|---|
| 520 | // fMagField = new G4UniformMagField(G4ThreeVector(fieldStrength, 0., 0.));
|
|---|
| 521 | // fMagField = new G4UniformMagField(G4ThreeVector(0., 0., fieldStrength));
|
|---|
| 522 | G4FieldManager* fieldMgr = new G4FieldManager(fMagField);
|
|---|
| 523 | fieldMgr->SetDetectorField(fMagField);
|
|---|
| 524 | fieldMgr->CreateChordFinder(fMagField);
|
|---|
| 525 | logicPipe->SetFieldManager(fieldMgr, true);
|
|---|
| 526 | }
|
|---|
| 527 |
|
|---|
| 528 | }
|
|---|
| 529 | else G4cout<<"No Helium pipe is used"<<G4endl<<G4endl;
|
|---|
| 530 |
|
|---|
| 531 | // Mylar Foil on both sides of helium pipe:
|
|---|
| 532 |
|
|---|
| 533 | G4double zMylar1 = zPipe - fPipeLength/2. - fMylarThick/2. - 0.001*mm;
|
|---|
| 534 | G4double zMylar2 = zPipe + fPipeLength/2. + fMylarThick/2. + 0.001*mm;
|
|---|
| 535 |
|
|---|
| 536 | // G4Box* solidMylar = new G4Box("MylarB",fAbsorberRadius*0.6,
|
|---|
| 537 | // fAbsorberRadius*0.6,
|
|---|
| 538 | // fMylarThick/2.);
|
|---|
| 539 |
|
|---|
| 540 | // G4LogicalVolume* logicMylar = new G4LogicalVolume(solidMylar,
|
|---|
| 541 | // fWindowMat,
|
|---|
| 542 | // "MylarL");
|
|---|
| 543 |
|
|---|
| 544 | if ( fPipe )
|
|---|
| 545 | {
|
|---|
| 546 |
|
|---|
| 547 | // G4VPhysicalVolume* physiMylar1 = new G4PVPlacement(0,
|
|---|
| 548 | // G4ThreeVector( 0., 0., zMylar1),
|
|---|
| 549 | // "Mylar1", logicMylar, fPhysicsWorld,
|
|---|
| 550 | // false, 0);
|
|---|
| 551 |
|
|---|
| 552 | // G4VPhysicalVolume* physiMylar2 = new G4PVPlacement(0,
|
|---|
| 553 | // G4ThreeVector(0., 0., zMylar2),
|
|---|
| 554 | // "Mylar2", logicMylar, fPhysicsWorld,
|
|---|
| 555 | // false, 0);
|
|---|
| 556 |
|
|---|
| 557 | G4cout<<"zMylar1 = "<<zMylar1/mm<<" mm"<<G4endl;
|
|---|
| 558 | G4cout<<"zMylar2 = "<<zMylar2/mm<<" mm"<<G4endl;
|
|---|
| 559 | G4cout<<"fMylarThick = "<<fMylarThick/mm<<" mm"<<G4endl<<G4endl;
|
|---|
| 560 | }
|
|---|
| 561 |
|
|---|
| 562 | // Mylar Foil on Chamber:
|
|---|
| 563 |
|
|---|
| 564 | G4double zMylar = zElectrode2 + fElectrodeThick/2. + fMylarThick/2. + 1.0*mm;
|
|---|
| 565 |
|
|---|
| 566 | // if ( fPipe )
|
|---|
| 567 | {
|
|---|
| 568 | zMylar += ( fPipeLength + pipeDist );
|
|---|
| 569 | }
|
|---|
| 570 | // G4VPhysicalVolume* physiMylar = new G4PVPlacement(0,
|
|---|
| 571 | // G4ThreeVector(0., 0., zMylar),
|
|---|
| 572 | // "Mylar",logicMylar,fPhysicsWorld,false,0);
|
|---|
| 573 |
|
|---|
| 574 |
|
|---|
| 575 | G4cout<<"zMylar = "<<zMylar/mm<<" mm"<<G4endl;
|
|---|
| 576 | G4cout<<"fMylarThick = "<<fMylarThick/mm<<" mm"<<G4endl<<G4endl;
|
|---|
| 577 |
|
|---|
| 578 |
|
|---|
| 579 | // Absorber
|
|---|
| 580 |
|
|---|
| 581 | fAbsorberZ = zMylar + fMylarThick + fAbsorberThickness/2.;
|
|---|
| 582 |
|
|---|
| 583 |
|
|---|
| 584 | fSolidAbsorber = new G4Box("Absorber",
|
|---|
| 585 | fAbsorberRadius,
|
|---|
| 586 | // fAbsorberRadius,
|
|---|
| 587 | // 10.*mm,
|
|---|
| 588 | 10.*mm,
|
|---|
| 589 | fAbsorberThickness/2.);
|
|---|
| 590 |
|
|---|
| 591 | fLogicAbsorber = new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
|
|---|
| 592 | "Absorber");
|
|---|
| 593 |
|
|---|
| 594 | fPhysicsAbsorber = new G4PVPlacement(0,
|
|---|
| 595 | G4ThreeVector(0., 0., fAbsorberZ),
|
|---|
| 596 | "Absorber", fLogicAbsorber,
|
|---|
| 597 | fPhysicsWorld, false, 0);
|
|---|
| 598 |
|
|---|
| 599 | if( fRegGasDet != 0 ) delete fRegGasDet;
|
|---|
| 600 | if( fRegGasDet == 0 ) fRegGasDet = new G4Region("XTRdEdxDetector");
|
|---|
| 601 | fRegGasDet->AddRootLogicalVolume(fLogicAbsorber);
|
|---|
| 602 |
|
|---|
| 603 | // Sensitive Detectors: Absorber
|
|---|
| 604 |
|
|---|
| 605 | G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
|---|
| 606 |
|
|---|
| 607 | if(!fCalorimeterSD)
|
|---|
| 608 | {
|
|---|
| 609 | fCalorimeterSD = new Em10CalorimeterSD("CalorSD",this);
|
|---|
| 610 | SDman->AddNewDetector( fCalorimeterSD );
|
|---|
| 611 | }
|
|---|
| 612 | if (fLogicAbsorber) fLogicAbsorber->SetSensitiveDetector(fCalorimeterSD);
|
|---|
| 613 |
|
|---|
| 614 | PrintGeometryParameters();
|
|---|
| 615 |
|
|---|
| 616 | return fPhysicsWorld;
|
|---|
| 617 | }
|
|---|
| 618 |
|
|---|
| 619 | /////////////////////////////////////////////////////////////////////////////////
|
|---|
| 620 | //
|
|---|
| 621 | // Setup for Bari INFN XTR test beam (~2004) at CERN. With He beam-pipe
|
|---|
| 622 | // M. Brigida et al, NIM A550 (2005) 157-168
|
|---|
| 623 | // Runs by : TestEm10 bari05.mac
|
|---|
| 624 |
|
|---|
| 625 | G4VPhysicalVolume* Em10DetectorConstruction::SetUpBari05()
|
|---|
| 626 | {
|
|---|
| 627 | fWorldSizeZ = 600.*cm;
|
|---|
| 628 | fWorldSizeR = 22.*cm;
|
|---|
| 629 |
|
|---|
| 630 | // Radiator and detector parameters
|
|---|
| 631 |
|
|---|
| 632 | //fRadThickness = 0.01*mm; // Gamma XTR (malz: 0.01)
|
|---|
| 633 | //fGasGap = 0.19*mm; // Gamma XTR (malz: 0.09)
|
|---|
| 634 | //fFoilNumber = 240; // Gamma XTR (malz: 480)
|
|---|
| 635 |
|
|---|
| 636 | //fRadThickness = 0.020*mm; // Reg1
|
|---|
| 637 | //fGasGap = 0.500*mm; // Reg1
|
|---|
| 638 | //fFoilNumber = 120; // Reg1
|
|---|
| 639 |
|
|---|
| 640 | //fRadThickness = 0.013*mm; // Anton
|
|---|
| 641 | //fGasGap = 0.230*mm; // Anton
|
|---|
| 642 | //fFoilNumber = 550; // Anton
|
|---|
| 643 |
|
|---|
| 644 |
|
|---|
| 645 | fRadThickness = 0.0055*mm; // Reg2
|
|---|
| 646 | fGasGap = 0.23*mm; // Reg2
|
|---|
| 647 | fFoilNumber = 191; // Reg2
|
|---|
| 648 |
|
|---|
| 649 | foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
|
|---|
| 650 |
|
|---|
| 651 |
|
|---|
| 652 | fAbsorberThickness = 0.4*mm;
|
|---|
| 653 |
|
|---|
| 654 | fAbsorberRadius = 100.*mm;
|
|---|
| 655 | fAbsorberZ = 136.*cm;
|
|---|
| 656 |
|
|---|
| 657 | fPipeLength = 50.0*cm;
|
|---|
| 658 | fMylarThick = 20.0*micrometer;
|
|---|
| 659 |
|
|---|
| 660 | fWindowThick = 51.0*micrometer ;
|
|---|
| 661 | fElectrodeThick = 100.0*micrometer ;
|
|---|
| 662 | fGapThick = 10.0*cm ;
|
|---|
| 663 |
|
|---|
| 664 |
|
|---|
| 665 | fDetThickness = 40.0*mm ;
|
|---|
| 666 | fDetLength = 200.0*cm ;
|
|---|
| 667 | fDetGap = 0.01*mm ;
|
|---|
| 668 |
|
|---|
| 669 |
|
|---|
| 670 | fStartR = 40*cm ;
|
|---|
| 671 | fStartZ = 100.0*mm ;
|
|---|
| 672 |
|
|---|
| 673 | fModuleNumber = 1 ;
|
|---|
| 674 |
|
|---|
| 675 | // Preparation of mixed radiator material
|
|---|
| 676 |
|
|---|
| 677 |
|
|---|
| 678 | G4Material* Mylar = fMat->GetMaterial("Mylar");
|
|---|
| 679 | G4Material* Air = fMat->GetMaterial("Air");
|
|---|
| 680 | G4Material* Al = fMat->GetMaterial("Al");
|
|---|
| 681 | G4Material* CH2 = fMat->GetMaterial("CH2");
|
|---|
| 682 | G4Material* He = fMat->GetMaterial("He");
|
|---|
| 683 |
|
|---|
| 684 | G4double foilDensity = 0.91*g/cm3; // CH2 1.39*g/cm3; // Mylar // 0.534*g/cm3; //Li
|
|---|
| 685 | G4double gasDensity = 1.2928*mg/cm3; // Air // 1.977*mg/cm3; // CO2 0.178*mg/cm3; // He
|
|---|
| 686 | G4double totDensity = foilDensity*foilGasRatio + gasDensity*(1.0-foilGasRatio) ;
|
|---|
| 687 |
|
|---|
| 688 | G4double fractionFoil = foilDensity*foilGasRatio/totDensity ;
|
|---|
| 689 | G4double fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity ;
|
|---|
| 690 |
|
|---|
| 691 | G4Material* radiatorMat = new G4Material("radiatorMat" , totDensity,
|
|---|
| 692 | 2);
|
|---|
| 693 | radiatorMat->AddMaterial( CH2, fractionFoil ) ;
|
|---|
| 694 | radiatorMat->AddMaterial( Air, fractionGas ) ;
|
|---|
| 695 |
|
|---|
| 696 | // default materials of the detector and TR radiator
|
|---|
| 697 |
|
|---|
| 698 | fRadiatorMat = radiatorMat;
|
|---|
| 699 | fFoilMat = CH2; // Kapton; // Mylar ; // Li ; // CH2 ;
|
|---|
| 700 | fGasMat = Air; // CO2; // He; //
|
|---|
| 701 |
|
|---|
| 702 | fWindowMat = Mylar;
|
|---|
| 703 | fElectrodeMat = Al;
|
|---|
| 704 |
|
|---|
| 705 | fAbsorberMaterial = fMat->GetMaterial("Si");
|
|---|
| 706 |
|
|---|
| 707 | // pipe material is assumed to be He + small admixture of air
|
|---|
| 708 |
|
|---|
| 709 | foilGasRatio = 0.99999;
|
|---|
| 710 | foilDensity = 1.2928*mg/cm3; // Air
|
|---|
| 711 | gasDensity = 0.178*mg/cm3; // He
|
|---|
| 712 | totDensity = foilDensity*foilGasRatio + gasDensity*(1.0-foilGasRatio);
|
|---|
| 713 |
|
|---|
| 714 | fractionFoil = foilDensity*foilGasRatio/totDensity;
|
|---|
| 715 | fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity;
|
|---|
| 716 |
|
|---|
| 717 | fPipeMat = new G4Material("pipeMat" , totDensity, 2);
|
|---|
| 718 | fPipeMat->AddMaterial( Air, fractionFoil );
|
|---|
| 719 | fPipeMat->AddMaterial( He, fractionGas );
|
|---|
| 720 |
|
|---|
| 721 | // fPipeMat = He;
|
|---|
| 722 |
|
|---|
| 723 | fGapMat = fAbsorberMaterial;
|
|---|
| 724 |
|
|---|
| 725 | fWorldMaterial = Air;
|
|---|
| 726 |
|
|---|
| 727 |
|
|---|
| 728 | fSolidWorld = new G4Box("World", fWorldSizeR,fWorldSizeR,fWorldSizeZ/2.);
|
|---|
| 729 |
|
|---|
| 730 | fLogicWorld = new G4LogicalVolume(fSolidWorld, fWorldMaterial, "World");
|
|---|
| 731 |
|
|---|
| 732 | fPhysicsWorld = new G4PVPlacement(0, G4ThreeVector(), "World",
|
|---|
| 733 | fLogicWorld, 0, false, 0);
|
|---|
| 734 |
|
|---|
| 735 | // TR radiator envelope
|
|---|
| 736 |
|
|---|
| 737 | fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
|
|---|
| 738 |
|
|---|
| 739 | fRadZ = fStartZ + 0.5*fRadThick ;
|
|---|
| 740 | // fRadZ = -fRadThick/2. - fElectrodeThick;
|
|---|
| 741 | // if ( fabs(pipe) > 1.e-15 ) fRadZ -= ( fPipeLength/2. + pipeDist );
|
|---|
| 742 |
|
|---|
| 743 |
|
|---|
| 744 | fSolidRadiator = new G4Box("Radiator",1.1*fAbsorberRadius ,
|
|---|
| 745 | 1.1*fAbsorberRadius, 0.5*fRadThick );
|
|---|
| 746 |
|
|---|
| 747 | fLogicRadiator = new G4LogicalVolume(fSolidRadiator, fRadiatorMat,
|
|---|
| 748 | "Radiator");
|
|---|
| 749 |
|
|---|
| 750 | fPhysicsRadiator = new G4PVPlacement(0,
|
|---|
| 751 | G4ThreeVector(0,0,fRadZ),
|
|---|
| 752 | "Radiator", fLogicRadiator,
|
|---|
| 753 | fPhysicsWorld, false, 0 );
|
|---|
| 754 |
|
|---|
| 755 | // create region for radiator
|
|---|
| 756 |
|
|---|
| 757 | if( fRadRegion != 0 ) delete fRadRegion;
|
|---|
| 758 | if( fRadRegion == 0 ) fRadRegion = new G4Region("XTRradiator");
|
|---|
| 759 | fRadRegion->AddRootLogicalVolume(fLogicRadiator);
|
|---|
| 760 |
|
|---|
| 761 | // Drift Electrode on both sides of Radiator:
|
|---|
| 762 |
|
|---|
| 763 | // G4Box* solidElectrode = new G4Box("Electrode",fAbsorberRadius*1.1,
|
|---|
| 764 | // fAbsorberRadius*1.1,
|
|---|
| 765 | // fElectrodeThick/2.);
|
|---|
| 766 |
|
|---|
| 767 | // G4LogicalVolume* logicElectrode = new G4LogicalVolume(solidElectrode,
|
|---|
| 768 | // fElectrodeMat,
|
|---|
| 769 | // "Electrode");
|
|---|
| 770 |
|
|---|
| 771 | G4double zElectrode1 = fRadZ - fRadThick/2. - fElectrodeThick/2.;
|
|---|
| 772 | G4double zElectrode2 = fRadZ + fRadThick/2. + fElectrodeThick/2.;
|
|---|
| 773 |
|
|---|
| 774 | // G4VPhysicalVolume* physiElectrode1 = new G4PVPlacement(0,
|
|---|
| 775 | // G4ThreeVector(0.,0.,zElectrode1),
|
|---|
| 776 | // "Electrode1",logicElectrode,
|
|---|
| 777 | // fPhysicsWorld,false,0);
|
|---|
| 778 |
|
|---|
| 779 | // G4VPhysicalVolume* physiElectrode2 = new G4PVPlacement(0,
|
|---|
| 780 | // G4ThreeVector(0.,0.,zElectrode2),
|
|---|
| 781 | // "Electrode1",logicElectrode,
|
|---|
| 782 | // fPhysicsWorld,false,0);
|
|---|
| 783 |
|
|---|
| 784 |
|
|---|
| 785 | G4cout<<"zElectrode1 = "<<zElectrode1/mm<<" mm"<<G4endl;
|
|---|
| 786 | G4cout<<"zElectrode2 = "<<zElectrode2/mm<<" mm"<<G4endl;
|
|---|
| 787 | G4cout<<"fElectrodeThick = "<<fElectrodeThick/mm<<" mm"<<G4endl<<G4endl;
|
|---|
| 788 |
|
|---|
| 789 | // Helium Pipe:
|
|---|
| 790 |
|
|---|
| 791 |
|
|---|
| 792 | G4double pipe = 1.0; // use helium pipe is setup
|
|---|
| 793 |
|
|---|
| 794 | G4double pipeDist = 1.*cm; //Distance between pipe and radiator / absorber
|
|---|
| 795 |
|
|---|
| 796 |
|
|---|
| 797 |
|
|---|
| 798 | G4double zPipe = zElectrode2 + fElectrodeThick/2. + fPipeLength/2. + pipeDist/2.;
|
|---|
| 799 |
|
|---|
| 800 | // G4double field = 1.0; // field in helium pipe used?
|
|---|
| 801 | // G4double fieldStrength = 1.0*tesla; // field strength in pipe
|
|---|
| 802 |
|
|---|
| 803 | if ( std::fabs(pipe) > 1.e-15 )
|
|---|
| 804 | {
|
|---|
| 805 |
|
|---|
| 806 | // G4Box* solidPipe = new G4Box("Pipe",fAbsorberRadius*0.5,
|
|---|
| 807 | // fAbsorberRadius*0.5,
|
|---|
| 808 | // fPipeLength/2. );
|
|---|
| 809 |
|
|---|
| 810 | // G4LogicalVolume* logicPipe = new G4LogicalVolume(solidPipe,
|
|---|
| 811 | // fPipeMat,
|
|---|
| 812 | // "Pipe");
|
|---|
| 813 |
|
|---|
| 814 | // magnetic field in Pipe:
|
|---|
| 815 | // if( fMagField ) delete fMagField; //delete the existing mag field
|
|---|
| 816 | // fMagField = new G4UniformMagField(G4ThreeVector(fieldStrength,0.,0.));
|
|---|
| 817 | // G4FieldManager* fieldMgr= new G4FieldManager(fMagField);
|
|---|
| 818 | // fieldMgr->SetDetectorField(fMagField);
|
|---|
| 819 | // fieldMgr->CreateChordFinder(fMagField);
|
|---|
| 820 | // if ( fabs(field) > 1.e-15 ) logicPipe->SetFieldManager(fieldMgr, true);
|
|---|
| 821 |
|
|---|
| 822 | // G4VPhysicalVolume* physiPipe = new G4PVPlacement(0,
|
|---|
| 823 | // G4ThreeVector(0.,0.,zPipe),
|
|---|
| 824 | // "Pipe1",logicPipe,
|
|---|
| 825 | // fPhysicsWorld,false,0);
|
|---|
| 826 |
|
|---|
| 827 | G4cout<<"zPipe = "<<zPipe/mm<<" mm"<<G4endl;
|
|---|
| 828 | G4cout<<"fPipeLength = "<<fPipeLength/mm<<" mm"<<G4endl<<G4endl;
|
|---|
| 829 |
|
|---|
| 830 | }
|
|---|
| 831 | else G4cout<<"No Helium pipe is used"<<G4endl<<G4endl;
|
|---|
| 832 |
|
|---|
| 833 | // Mylar Foil on both sides of helium pipe:
|
|---|
| 834 |
|
|---|
| 835 | G4double zMylar1 = zPipe - fPipeLength/2. - fMylarThick/2 - 0.01*mm;
|
|---|
| 836 | G4double zMylar2 = zPipe + fPipeLength/2. + fMylarThick/2 + 0.01*mm;
|
|---|
| 837 |
|
|---|
| 838 | // G4Box* solidMylar = new G4Box("Mylar",fAbsorberRadius*0.6,
|
|---|
| 839 | // fAbsorberRadius*0.6,
|
|---|
| 840 | // fMylarThick/2.);
|
|---|
| 841 |
|
|---|
| 842 | // G4LogicalVolume* logicMylar = new G4LogicalVolume(solidMylar,
|
|---|
| 843 | // fWindowMat,
|
|---|
| 844 | // "Mylar");
|
|---|
| 845 |
|
|---|
| 846 | if ( std::fabs(pipe) > 1.e-15 )
|
|---|
| 847 | {
|
|---|
| 848 |
|
|---|
| 849 | // G4VPhysicalVolume* physiMylar1 = new G4PVPlacement(0,
|
|---|
| 850 | // G4ThreeVector( 0., 0., zMylar1),
|
|---|
| 851 | // "Mylar1", logicMylar, fPhysicsWorld,
|
|---|
| 852 | // false, 0);
|
|---|
| 853 |
|
|---|
| 854 | // G4VPhysicalVolume* physiMylar2 = new G4PVPlacement(0,
|
|---|
| 855 | // G4ThreeVector(0.,0.,zMylar2),
|
|---|
| 856 | // "Mylar2", logicMylar, fPhysicsWorld,
|
|---|
| 857 | // false, 0);
|
|---|
| 858 |
|
|---|
| 859 | G4cout<<"zMylar1 = "<<zMylar1/mm<<" mm"<<G4endl;
|
|---|
| 860 | G4cout<<"zMylar2 = "<<zMylar2/mm<<" mm"<<G4endl;
|
|---|
| 861 | G4cout<<"fMylarThick = "<<fMylarThick/mm<<" mm"<<G4endl<<G4endl;
|
|---|
| 862 |
|
|---|
| 863 | }
|
|---|
| 864 |
|
|---|
| 865 | // Mylar Foil on Chamber:
|
|---|
| 866 |
|
|---|
| 867 | G4double zMylar = zElectrode2 + fElectrodeThick/2. + fMylarThick/2. + 1.0*mm;
|
|---|
| 868 |
|
|---|
| 869 | if ( std::fabs(pipe) > 1.e-15 ) zMylar += ( fPipeLength + pipeDist );
|
|---|
| 870 |
|
|---|
| 871 | // G4VPhysicalVolume* physiMylar = new G4PVPlacement(0,
|
|---|
| 872 | // G4ThreeVector(0.,0.,zMylar),
|
|---|
| 873 | // "Mylar",logicMylar,fPhysicsWorld,false,0);
|
|---|
| 874 |
|
|---|
| 875 |
|
|---|
| 876 | G4cout<<"zMylar = "<<zMylar/mm<<" mm"<<G4endl;
|
|---|
| 877 | G4cout<<"fMylarThick = "<<fMylarThick/mm<<" mm"<<G4endl<<G4endl;
|
|---|
| 878 |
|
|---|
| 879 |
|
|---|
| 880 | // Absorber
|
|---|
| 881 |
|
|---|
| 882 | fAbsorberZ = zMylar + fMylarThick/2. + fAbsorberThickness/2.;
|
|---|
| 883 |
|
|---|
| 884 |
|
|---|
| 885 | fSolidAbsorber = new G4Box("Absorber",
|
|---|
| 886 | // fAbsorberRadius, fAbsorberRadius,
|
|---|
| 887 | 10.*mm,10.*mm,
|
|---|
| 888 | fAbsorberThickness/2.);
|
|---|
| 889 |
|
|---|
| 890 | fLogicAbsorber = new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
|
|---|
| 891 | "Absorber");
|
|---|
| 892 |
|
|---|
| 893 | fPhysicsAbsorber = new G4PVPlacement(0, G4ThreeVector(0.,0.,fAbsorberZ),
|
|---|
| 894 | "Absorber", fLogicAbsorber,
|
|---|
| 895 | fPhysicsWorld, false, 0);
|
|---|
| 896 |
|
|---|
| 897 | if( fRegGasDet != 0 ) delete fRegGasDet;
|
|---|
| 898 | if( fRegGasDet == 0 ) fRegGasDet = new G4Region("XTRdEdxDetector");
|
|---|
| 899 | fRegGasDet->AddRootLogicalVolume(fLogicAbsorber);
|
|---|
| 900 |
|
|---|
| 901 | // Sensitive Detectors: Absorber
|
|---|
| 902 |
|
|---|
| 903 | G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
|---|
| 904 |
|
|---|
| 905 | if(!fCalorimeterSD)
|
|---|
| 906 | {
|
|---|
| 907 | fCalorimeterSD = new Em10CalorimeterSD("CalorSD",this);
|
|---|
| 908 | SDman->AddNewDetector( fCalorimeterSD );
|
|---|
| 909 | }
|
|---|
| 910 | if (fLogicAbsorber) fLogicAbsorber->SetSensitiveDetector(fCalorimeterSD);
|
|---|
| 911 |
|
|---|
| 912 | PrintGeometryParameters();
|
|---|
| 913 |
|
|---|
| 914 | return fPhysicsWorld;
|
|---|
| 915 | }
|
|---|
| 916 |
|
|---|
| 917 | /////////////////////////////////////////////////////////////////////////////////
|
|---|
| 918 | //
|
|---|
| 919 | // Setuo from F. Harris et al NIM 107 (1973) 413-422 (fig.5b)
|
|---|
| 920 |
|
|---|
| 921 | G4VPhysicalVolume* Em10DetectorConstruction::SetUpHarris73()
|
|---|
| 922 | {
|
|---|
| 923 | fWorldSizeZ = 400.*cm;
|
|---|
| 924 | fWorldSizeR = 20.*cm;
|
|---|
| 925 |
|
|---|
| 926 | // Radiator and detector parameters
|
|---|
| 927 |
|
|---|
| 928 | fRadThickness = 0.0127*mm;
|
|---|
| 929 | fGasGap = 0.762*mm;
|
|---|
| 930 | foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
|
|---|
| 931 |
|
|---|
| 932 | fFoilNumber = 100;
|
|---|
| 933 |
|
|---|
| 934 | fAbsorberThickness = 15.0*mm;
|
|---|
| 935 |
|
|---|
| 936 | fAbsorberRadius = 100.*mm;
|
|---|
| 937 | fAbsorberZ = 136.*cm;
|
|---|
| 938 |
|
|---|
| 939 | fWindowThick = 51.0*micrometer ;
|
|---|
| 940 | fElectrodeThick = 10.0*micrometer ;
|
|---|
| 941 | fGapThick = 10.0*cm ;
|
|---|
| 942 |
|
|---|
| 943 |
|
|---|
| 944 | fDetThickness = 40.0*mm ;
|
|---|
| 945 | fDetLength = 200.0*cm ;
|
|---|
| 946 | fDetGap = 0.01*mm ;
|
|---|
| 947 |
|
|---|
| 948 |
|
|---|
| 949 | fStartR = 40*cm ;
|
|---|
| 950 | fStartZ = 100.0*mm ;
|
|---|
| 951 |
|
|---|
| 952 | fModuleNumber = 1 ;
|
|---|
| 953 |
|
|---|
| 954 | // Preparation of mixed radiator material
|
|---|
| 955 |
|
|---|
| 956 |
|
|---|
| 957 | G4Material* Mylar = fMat->GetMaterial("Mylar");
|
|---|
| 958 | G4Material* Air = fMat->GetMaterial("Air");
|
|---|
| 959 | G4Material* Al = fMat->GetMaterial("Al");
|
|---|
| 960 |
|
|---|
| 961 | G4double foilDensity = 1.39*g/cm3; // Mylar // 0.91*g/cm3; // CH2 0.534*g/cm3; //Li
|
|---|
| 962 | G4double gasDensity = 1.2928*mg/cm3; // Air // 1.977*mg/cm3; // CO2 0.178*mg/cm3; // He
|
|---|
| 963 |
|
|---|
| 964 | G4double totDensity = foilDensity*foilGasRatio + gasDensity*(1.0-foilGasRatio) ;
|
|---|
| 965 |
|
|---|
| 966 | G4double fractionFoil = foilDensity*foilGasRatio/totDensity ;
|
|---|
| 967 | G4double fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity ;
|
|---|
| 968 |
|
|---|
| 969 | G4Material* radiatorMat = new G4Material("radiatorMat" , totDensity,
|
|---|
| 970 | 2);
|
|---|
| 971 | radiatorMat->AddMaterial( Mylar, fractionFoil ) ;
|
|---|
| 972 | radiatorMat->AddMaterial( Air, fractionGas ) ;
|
|---|
| 973 |
|
|---|
| 974 | // default materials of the detector and TR radiator
|
|---|
| 975 |
|
|---|
| 976 | fRadiatorMat = radiatorMat;
|
|---|
| 977 | fFoilMat = Mylar;
|
|---|
| 978 | fGasMat = Air;
|
|---|
| 979 |
|
|---|
| 980 | fWindowMat = Mylar ;
|
|---|
| 981 | fElectrodeMat = Al ;
|
|---|
| 982 |
|
|---|
| 983 | fAbsorberMaterial = fMat->GetMaterial("Kr7CH4");
|
|---|
| 984 |
|
|---|
| 985 |
|
|---|
| 986 | fGapMat = fAbsorberMaterial;
|
|---|
| 987 |
|
|---|
| 988 | fWorldMaterial = Air; // CO2 ;
|
|---|
| 989 |
|
|---|
| 990 | fSolidWorld = new G4Box("World", fWorldSizeR,fWorldSizeR,fWorldSizeZ/2.);
|
|---|
| 991 |
|
|---|
| 992 | fLogicWorld = new G4LogicalVolume(fSolidWorld, fWorldMaterial, "World");
|
|---|
| 993 |
|
|---|
| 994 | fPhysicsWorld = new G4PVPlacement(0, G4ThreeVector(), "World",
|
|---|
| 995 | fLogicWorld, 0, false, 0);
|
|---|
| 996 |
|
|---|
| 997 | // TR radiator envelope
|
|---|
| 998 |
|
|---|
| 999 | fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
|
|---|
| 1000 |
|
|---|
| 1001 | fRadZ = fStartZ + 0.5*fRadThick ;
|
|---|
| 1002 |
|
|---|
| 1003 | fSolidRadiator = new G4Box("Radiator",1.1*fAbsorberRadius ,
|
|---|
| 1004 | 1.1*fAbsorberRadius, 0.5*fRadThick );
|
|---|
| 1005 |
|
|---|
| 1006 | fLogicRadiator = new G4LogicalVolume(fSolidRadiator, fRadiatorMat,
|
|---|
| 1007 | "Radiator");
|
|---|
| 1008 |
|
|---|
| 1009 | fPhysicsRadiator = new G4PVPlacement(0,
|
|---|
| 1010 | G4ThreeVector(0,0,fRadZ),
|
|---|
| 1011 | "Radiator", fLogicRadiator,
|
|---|
| 1012 | fPhysicsWorld, false, 0 );
|
|---|
| 1013 |
|
|---|
| 1014 | // create region for window inside windowR for
|
|---|
| 1015 |
|
|---|
| 1016 | if( fRadRegion != 0 ) delete fRadRegion;
|
|---|
| 1017 | if( fRadRegion == 0 ) fRadRegion = new G4Region("XTRradiator");
|
|---|
| 1018 | fRadRegion->AddRootLogicalVolume(fLogicRadiator);
|
|---|
| 1019 |
|
|---|
| 1020 |
|
|---|
| 1021 |
|
|---|
| 1022 | fWindowZ = fStartZ + fRadThick + fWindowThick/2. + 15.0*mm ;
|
|---|
| 1023 |
|
|---|
| 1024 | // G4Box* solidWindowR = new G4Box("WindowR",fAbsorberRadius+0.001,
|
|---|
| 1025 | // fAbsorberRadius+0.001,
|
|---|
| 1026 | // fWindowThick/2.+0.001 );
|
|---|
| 1027 |
|
|---|
| 1028 | // G4LogicalVolume* logicWindowR = new G4LogicalVolume(solidWindowR,
|
|---|
| 1029 | // fWorldMaterial, "WindowR");
|
|---|
| 1030 |
|
|---|
| 1031 | // G4VPhysicalVolume* physiWindowR = new G4PVPlacement(0,
|
|---|
| 1032 | // G4ThreeVector(0.,0.,fWindowZ),
|
|---|
| 1033 | // "WindowR",logicWindowR,fPhysicsWorld,false,0);
|
|---|
| 1034 | // window
|
|---|
| 1035 |
|
|---|
| 1036 | // G4Box* solidWindow = new G4Box("Window",fAbsorberRadius,
|
|---|
| 1037 | // fAbsorberRadius, fWindowThick/2.);
|
|---|
| 1038 |
|
|---|
| 1039 | // G4LogicalVolume* logicWindow = new G4LogicalVolume(solidWindow,
|
|---|
| 1040 | // fWindowMat, "Window");
|
|---|
| 1041 |
|
|---|
| 1042 | // G4VPhysicalVolume* physiWindow = new G4PVPlacement(0, G4ThreeVector(0.,0.,0.),
|
|---|
| 1043 | // "Window", logicWindow, physiWindowR, false, 0);
|
|---|
| 1044 |
|
|---|
| 1045 |
|
|---|
| 1046 | fGapZ = fWindowZ + fWindowThick/2. + fGapThick/2. + 0.01*mm ;
|
|---|
| 1047 |
|
|---|
| 1048 | fElectrodeZ = fGapZ + fGapThick/2. + fElectrodeThick/2. + 0.01*mm;
|
|---|
| 1049 |
|
|---|
| 1050 | // Absorber
|
|---|
| 1051 |
|
|---|
| 1052 | fAbsorberZ = fElectrodeZ + fElectrodeThick/2. + fAbsorberThickness/2. + 0.01*mm;
|
|---|
| 1053 |
|
|---|
| 1054 | fSolidAbsorber = new G4Box("Absorber", fAbsorberRadius,
|
|---|
| 1055 | fAbsorberRadius, fAbsorberThickness/2.);
|
|---|
| 1056 |
|
|---|
| 1057 | fLogicAbsorber = new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
|
|---|
| 1058 | "Absorber");
|
|---|
| 1059 |
|
|---|
| 1060 | fPhysicsAbsorber = new G4PVPlacement(0, G4ThreeVector(0.,0.,fAbsorberZ),
|
|---|
| 1061 | "Absorber", fLogicAbsorber,
|
|---|
| 1062 | fPhysicsWorld, false, 0);
|
|---|
| 1063 |
|
|---|
| 1064 | if( fRegGasDet != 0 ) delete fRegGasDet;
|
|---|
| 1065 | if( fRegGasDet == 0 ) fRegGasDet = new G4Region("XTRdEdxDetector");
|
|---|
| 1066 | fRegGasDet->AddRootLogicalVolume(fLogicAbsorber);
|
|---|
| 1067 |
|
|---|
| 1068 | // Sensitive Detectors: Absorber
|
|---|
| 1069 |
|
|---|
| 1070 | G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
|---|
| 1071 |
|
|---|
| 1072 | if(!fCalorimeterSD)
|
|---|
| 1073 | {
|
|---|
| 1074 | fCalorimeterSD = new Em10CalorimeterSD("CalorSD",this);
|
|---|
| 1075 | SDman->AddNewDetector( fCalorimeterSD );
|
|---|
| 1076 | }
|
|---|
| 1077 | if (fLogicAbsorber) fLogicAbsorber->SetSensitiveDetector(fCalorimeterSD);
|
|---|
| 1078 |
|
|---|
| 1079 | PrintGeometryParameters();
|
|---|
| 1080 |
|
|---|
| 1081 | return fPhysicsWorld;
|
|---|
| 1082 | }
|
|---|
| 1083 |
|
|---|
| 1084 | /////////////////////////////////////////////////////////////////////////////////
|
|---|
| 1085 | //
|
|---|
| 1086 | // Setuo from Y. Watase et al, NIM A248 (1986) 379-388 (fig.7; Li, e-, 2 Gev/c)
|
|---|
| 1087 |
|
|---|
| 1088 | G4VPhysicalVolume* Em10DetectorConstruction::SetUpWatase86()
|
|---|
| 1089 | {
|
|---|
| 1090 | fWorldSizeZ = 400.*cm;
|
|---|
| 1091 | fWorldSizeR = 20.*cm;
|
|---|
| 1092 |
|
|---|
| 1093 | // Radiator and detector parameters
|
|---|
| 1094 |
|
|---|
| 1095 | fRadThickness = 0.04*mm;
|
|---|
| 1096 | fGasGap = 0.126*mm;
|
|---|
| 1097 | foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
|
|---|
| 1098 |
|
|---|
| 1099 | fFoilNumber = 300;
|
|---|
| 1100 |
|
|---|
| 1101 | fAbsorberThickness = 30.0*mm;
|
|---|
| 1102 |
|
|---|
| 1103 | fAbsorberRadius = 100.*mm;
|
|---|
| 1104 | fAbsorberZ = 136.*cm;
|
|---|
| 1105 |
|
|---|
| 1106 | fWindowThick = 51.0*micrometer ;
|
|---|
| 1107 | fElectrodeThick = 10.0*micrometer ;
|
|---|
| 1108 | fGapThick = 10.0*cm ;
|
|---|
| 1109 |
|
|---|
| 1110 |
|
|---|
| 1111 | fDetThickness = 30.0*mm ;
|
|---|
| 1112 | fDetLength = 200.0*cm ;
|
|---|
| 1113 | fDetGap = 0.01*mm ;
|
|---|
| 1114 |
|
|---|
| 1115 |
|
|---|
| 1116 | fStartR = 40*cm ;
|
|---|
| 1117 | fStartZ = 100.0*mm ;
|
|---|
| 1118 |
|
|---|
| 1119 | fModuleNumber = 1 ;
|
|---|
| 1120 |
|
|---|
| 1121 | // Preparation of mixed radiator material
|
|---|
| 1122 |
|
|---|
| 1123 |
|
|---|
| 1124 | G4Material* Li = fMat->GetMaterial("Li");
|
|---|
| 1125 | // G4Material* Air = fMat->GetMaterial("Air");
|
|---|
| 1126 | G4Material* He = fMat->GetMaterial("He");
|
|---|
| 1127 | G4Material* Al = fMat->GetMaterial("Al");
|
|---|
| 1128 | G4Material* Mylar = fMat->GetMaterial("Mylar");
|
|---|
| 1129 |
|
|---|
| 1130 | G4double foilDensity = 0.534*g/cm3; //Li 1.39*g/cm3; // Mylar 0.91*g/cm3; // CH2
|
|---|
| 1131 | G4double gasDensity = 0.178*mg/cm3; // He 1.2928*mg/cm3; // Air // 1.977*mg/cm3; // CO2
|
|---|
| 1132 |
|
|---|
| 1133 | G4double totDensity = foilDensity*foilGasRatio + gasDensity*(1.0-foilGasRatio) ;
|
|---|
| 1134 |
|
|---|
| 1135 | G4double fractionFoil = foilDensity*foilGasRatio/totDensity ;
|
|---|
| 1136 | G4double fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity ;
|
|---|
| 1137 |
|
|---|
| 1138 | G4Material* radiatorMat = new G4Material("radiatorMat" , totDensity,
|
|---|
| 1139 | 2);
|
|---|
| 1140 | radiatorMat->AddMaterial( Li, fractionFoil ) ;
|
|---|
| 1141 | radiatorMat->AddMaterial( He, fractionGas ) ;
|
|---|
| 1142 |
|
|---|
| 1143 | // default materials of the detector and TR radiator
|
|---|
| 1144 |
|
|---|
| 1145 | fRadiatorMat = radiatorMat;
|
|---|
| 1146 | fFoilMat = Li;
|
|---|
| 1147 | fGasMat = He;
|
|---|
| 1148 |
|
|---|
| 1149 | fWindowMat = Mylar ;
|
|---|
| 1150 | fElectrodeMat = Al ;
|
|---|
| 1151 |
|
|---|
| 1152 | fAbsorberMaterial = fMat->GetMaterial("Xe10CH4");
|
|---|
| 1153 |
|
|---|
| 1154 |
|
|---|
| 1155 | fGapMat = fAbsorberMaterial;
|
|---|
| 1156 |
|
|---|
| 1157 | fWorldMaterial = He; // Air; // CO2 ;
|
|---|
| 1158 |
|
|---|
| 1159 | fSolidWorld = new G4Box("World", fWorldSizeR,fWorldSizeR,fWorldSizeZ/2.);
|
|---|
| 1160 |
|
|---|
| 1161 | fLogicWorld = new G4LogicalVolume(fSolidWorld, fWorldMaterial, "World");
|
|---|
| 1162 |
|
|---|
| 1163 | fPhysicsWorld = new G4PVPlacement(0, G4ThreeVector(), "World",
|
|---|
| 1164 | fLogicWorld, 0, false, 0);
|
|---|
| 1165 |
|
|---|
| 1166 | // TR radiator envelope
|
|---|
| 1167 |
|
|---|
| 1168 | fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
|
|---|
| 1169 |
|
|---|
| 1170 | fRadZ = fStartZ + 0.5*fRadThick ;
|
|---|
| 1171 |
|
|---|
| 1172 | fSolidRadiator = new G4Box("Radiator",1.1*fAbsorberRadius ,
|
|---|
| 1173 | 1.1*fAbsorberRadius, 0.5*fRadThick );
|
|---|
| 1174 |
|
|---|
| 1175 | fLogicRadiator = new G4LogicalVolume(fSolidRadiator, fRadiatorMat,
|
|---|
| 1176 | "Radiator");
|
|---|
| 1177 |
|
|---|
| 1178 | fPhysicsRadiator = new G4PVPlacement(0,
|
|---|
| 1179 | G4ThreeVector(0,0,fRadZ),
|
|---|
| 1180 | "Radiator", fLogicRadiator,
|
|---|
| 1181 | fPhysicsWorld, false, 0 );
|
|---|
| 1182 |
|
|---|
| 1183 | // create region for window inside windowR for
|
|---|
| 1184 |
|
|---|
| 1185 | if( fRadRegion != 0 ) delete fRadRegion;
|
|---|
| 1186 | if( fRadRegion == 0 ) fRadRegion = new G4Region("XTRradiator");
|
|---|
| 1187 | fRadRegion->AddRootLogicalVolume(fLogicRadiator);
|
|---|
| 1188 |
|
|---|
| 1189 |
|
|---|
| 1190 |
|
|---|
| 1191 | fWindowZ = fStartZ + fRadThick + fWindowThick/2. + 15.0*mm ;
|
|---|
| 1192 |
|
|---|
| 1193 | // G4Box* solidWindowR = new G4Box("WindowR",fAbsorberRadius+0.001,
|
|---|
| 1194 | // fAbsorberRadius+0.001,
|
|---|
| 1195 | // fWindowThick/2.+0.001 );
|
|---|
| 1196 |
|
|---|
| 1197 | // G4LogicalVolume* logicWindowR = new G4LogicalVolume(solidWindowR,
|
|---|
| 1198 | // fWorldMaterial, "WindowR");
|
|---|
| 1199 |
|
|---|
| 1200 | // G4VPhysicalVolume* physiWindowR = new G4PVPlacement(0,
|
|---|
| 1201 | // G4ThreeVector(0.,0.,fWindowZ),
|
|---|
| 1202 | // "WindowR",logicWindowR,fPhysicsWorld,false,0);
|
|---|
| 1203 | // window
|
|---|
| 1204 |
|
|---|
| 1205 | // G4Box* solidWindow = new G4Box("Window",fAbsorberRadius,
|
|---|
| 1206 | // fAbsorberRadius, fWindowThick/2.);
|
|---|
| 1207 |
|
|---|
| 1208 | // G4LogicalVolume* logicWindow = new G4LogicalVolume(solidWindow,
|
|---|
| 1209 | // fWindowMat, "Window");
|
|---|
| 1210 |
|
|---|
| 1211 | // G4VPhysicalVolume* physiWindow = new G4PVPlacement(0, G4ThreeVector(0.,0.,0.),
|
|---|
| 1212 | // "Window", logicWindow, physiWindowR, false, 0);
|
|---|
| 1213 |
|
|---|
| 1214 |
|
|---|
| 1215 | fGapZ = fWindowZ + fWindowThick/2. + fGapThick/2. + 0.01*mm ;
|
|---|
| 1216 |
|
|---|
| 1217 | fElectrodeZ = fGapZ + fGapThick/2. + fElectrodeThick/2. + 0.01*mm;
|
|---|
| 1218 |
|
|---|
| 1219 | // Absorber
|
|---|
| 1220 |
|
|---|
| 1221 | fAbsorberZ = fElectrodeZ + fElectrodeThick/2. + fAbsorberThickness/2. + 0.01*mm;
|
|---|
| 1222 |
|
|---|
| 1223 | fSolidAbsorber = new G4Box("Absorber", fAbsorberRadius,
|
|---|
| 1224 | fAbsorberRadius, fAbsorberThickness/2.);
|
|---|
| 1225 |
|
|---|
| 1226 | fLogicAbsorber = new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
|
|---|
| 1227 | "Absorber");
|
|---|
| 1228 |
|
|---|
| 1229 | fPhysicsAbsorber = new G4PVPlacement(0, G4ThreeVector(0.,0.,fAbsorberZ),
|
|---|
| 1230 | "Absorber", fLogicAbsorber,
|
|---|
| 1231 | fPhysicsWorld, false, 0);
|
|---|
| 1232 |
|
|---|
| 1233 | if( fRegGasDet != 0 ) delete fRegGasDet;
|
|---|
| 1234 | if( fRegGasDet == 0 ) fRegGasDet = new G4Region("XTRdEdxDetector");
|
|---|
| 1235 | fRegGasDet->AddRootLogicalVolume(fLogicAbsorber);
|
|---|
| 1236 |
|
|---|
| 1237 | // Sensitive Detectors: Absorber
|
|---|
| 1238 |
|
|---|
| 1239 | G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
|---|
| 1240 |
|
|---|
| 1241 | if(!fCalorimeterSD)
|
|---|
| 1242 | {
|
|---|
| 1243 | fCalorimeterSD = new Em10CalorimeterSD("CalorSD",this);
|
|---|
| 1244 | SDman->AddNewDetector( fCalorimeterSD );
|
|---|
| 1245 | }
|
|---|
| 1246 | if (fLogicAbsorber) fLogicAbsorber->SetSensitiveDetector(fCalorimeterSD);
|
|---|
| 1247 |
|
|---|
| 1248 | PrintGeometryParameters();
|
|---|
| 1249 |
|
|---|
| 1250 | return fPhysicsWorld;
|
|---|
| 1251 | }
|
|---|
| 1252 |
|
|---|
| 1253 | /////////////////////////////////////////////////////////////////////////////////
|
|---|
| 1254 | //
|
|---|
| 1255 | // Setuo from G.D. Barr et al NIM A294 (1990) 465-472 (fig.11)
|
|---|
| 1256 |
|
|---|
| 1257 | G4VPhysicalVolume* Em10DetectorConstruction::SetUpBarr90()
|
|---|
| 1258 | {
|
|---|
| 1259 | fWorldSizeZ = 400.*cm;
|
|---|
| 1260 | fWorldSizeR = 20.*cm;
|
|---|
| 1261 |
|
|---|
| 1262 | // Radiator and detector parameters
|
|---|
| 1263 |
|
|---|
| 1264 | fRadThickness = 0.019*mm;
|
|---|
| 1265 | fGasGap = 0.6*mm;
|
|---|
| 1266 | foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
|
|---|
| 1267 |
|
|---|
| 1268 | fFoilNumber = 350;
|
|---|
| 1269 |
|
|---|
| 1270 | fAbsorberThickness = 50.0*mm;
|
|---|
| 1271 |
|
|---|
| 1272 | fAbsorberRadius = 100.*mm;
|
|---|
| 1273 | fAbsorberZ = 136.*cm;
|
|---|
| 1274 |
|
|---|
| 1275 | fWindowThick = 51.0*micrometer ;
|
|---|
| 1276 | fElectrodeThick = 10.0*micrometer ;
|
|---|
| 1277 | fGapThick = 10.0*cm ;
|
|---|
| 1278 |
|
|---|
| 1279 |
|
|---|
| 1280 | fDetThickness = 50.0*mm ;
|
|---|
| 1281 | fDetLength = 200.0*cm ;
|
|---|
| 1282 | fDetGap = 0.01*mm ;
|
|---|
| 1283 |
|
|---|
| 1284 |
|
|---|
| 1285 | fStartR = 40*cm ;
|
|---|
| 1286 | fStartZ = 100.0*mm ;
|
|---|
| 1287 |
|
|---|
| 1288 | fModuleNumber = 1 ;
|
|---|
| 1289 |
|
|---|
| 1290 | // Preparation of mixed radiator material
|
|---|
| 1291 |
|
|---|
| 1292 |
|
|---|
| 1293 | G4Material* CH2 = fMat->GetMaterial("CH2");
|
|---|
| 1294 | G4Material* CO2 = fMat->GetMaterial("CO2");
|
|---|
| 1295 | G4Material* Air = fMat->GetMaterial("Air");
|
|---|
| 1296 | G4Material* Al = fMat->GetMaterial("Al");
|
|---|
| 1297 | G4Material* Mylar = fMat->GetMaterial("Mylar");
|
|---|
| 1298 |
|
|---|
| 1299 | G4double foilDensity = 0.91*g/cm3; // CH21.39*g/cm3; // Mylar // 0.534*g/cm3; //Li
|
|---|
| 1300 | G4double gasDensity = 1.977*mg/cm3; // CO2 1.2928*mg/cm3; // Air // 0.178*mg/cm3; // He
|
|---|
| 1301 |
|
|---|
| 1302 | G4double totDensity = foilDensity*foilGasRatio + gasDensity*(1.0-foilGasRatio) ;
|
|---|
| 1303 |
|
|---|
| 1304 | G4double fractionFoil = foilDensity*foilGasRatio/totDensity ;
|
|---|
| 1305 | G4double fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity ;
|
|---|
| 1306 |
|
|---|
| 1307 | G4Material* radiatorMat = new G4Material("radiatorMat" , totDensity,
|
|---|
| 1308 | 2);
|
|---|
| 1309 | radiatorMat->AddMaterial( CH2, fractionFoil ) ;
|
|---|
| 1310 | radiatorMat->AddMaterial( CO2, fractionGas ) ;
|
|---|
| 1311 |
|
|---|
| 1312 | // default materials of the detector and TR radiator
|
|---|
| 1313 |
|
|---|
| 1314 | fRadiatorMat = radiatorMat;
|
|---|
| 1315 | fFoilMat = CH2;
|
|---|
| 1316 | fGasMat = CO2;
|
|---|
| 1317 |
|
|---|
| 1318 | fWindowMat = Mylar ;
|
|---|
| 1319 | fElectrodeMat = Al ;
|
|---|
| 1320 |
|
|---|
| 1321 | fAbsorberMaterial = fMat->GetMaterial("Xe55He15CH4");
|
|---|
| 1322 |
|
|---|
| 1323 |
|
|---|
| 1324 | fGapMat = fAbsorberMaterial;
|
|---|
| 1325 |
|
|---|
| 1326 | fWorldMaterial = Air; // CO2; //
|
|---|
| 1327 |
|
|---|
| 1328 | fSolidWorld = new G4Box("World", fWorldSizeR,fWorldSizeR,fWorldSizeZ/2.);
|
|---|
| 1329 |
|
|---|
| 1330 | fLogicWorld = new G4LogicalVolume(fSolidWorld, fWorldMaterial, "World");
|
|---|
| 1331 |
|
|---|
| 1332 | fPhysicsWorld = new G4PVPlacement(0, G4ThreeVector(), "World",
|
|---|
| 1333 | fLogicWorld, 0, false, 0);
|
|---|
| 1334 |
|
|---|
| 1335 | // TR radiator envelope
|
|---|
| 1336 |
|
|---|
| 1337 | fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
|
|---|
| 1338 |
|
|---|
| 1339 | fRadZ = fStartZ + 0.5*fRadThick ;
|
|---|
| 1340 |
|
|---|
| 1341 | fSolidRadiator = new G4Box("Radiator",1.1*fAbsorberRadius ,
|
|---|
| 1342 | 1.1*fAbsorberRadius, 0.5*fRadThick );
|
|---|
| 1343 |
|
|---|
| 1344 | fLogicRadiator = new G4LogicalVolume(fSolidRadiator, fRadiatorMat,
|
|---|
| 1345 | "Radiator");
|
|---|
| 1346 |
|
|---|
| 1347 | fPhysicsRadiator = new G4PVPlacement(0,
|
|---|
| 1348 | G4ThreeVector(0,0,fRadZ),
|
|---|
| 1349 | "Radiator", fLogicRadiator,
|
|---|
| 1350 | fPhysicsWorld, false, 0 );
|
|---|
| 1351 |
|
|---|
| 1352 | // create region for window inside windowR for
|
|---|
| 1353 |
|
|---|
| 1354 | if( fRadRegion != 0 ) delete fRadRegion;
|
|---|
| 1355 | if( fRadRegion == 0 ) fRadRegion = new G4Region("XTRradiator");
|
|---|
| 1356 | fRadRegion->AddRootLogicalVolume(fLogicRadiator);
|
|---|
| 1357 |
|
|---|
| 1358 |
|
|---|
| 1359 |
|
|---|
| 1360 | fWindowZ = fStartZ + fRadThick + fWindowThick/2. + 15.0*mm ;
|
|---|
| 1361 |
|
|---|
| 1362 | // G4Box* solidWindowR = new G4Box("WindowR",fAbsorberRadius+0.001,
|
|---|
| 1363 | // fAbsorberRadius+0.001,
|
|---|
| 1364 | // fWindowThick/2.+0.001 );
|
|---|
| 1365 |
|
|---|
| 1366 | // G4LogicalVolume* logicWindowR = new G4LogicalVolume(solidWindowR,
|
|---|
| 1367 | // fWorldMaterial, "WindowR");
|
|---|
| 1368 | //
|
|---|
| 1369 | // G4VPhysicalVolume* physiWindowR = new G4PVPlacement(0,
|
|---|
| 1370 | // G4ThreeVector(0.,0.,fWindowZ),
|
|---|
| 1371 | // "WindowR",logicWindowR,fPhysicsWorld,false,0);
|
|---|
| 1372 | // window
|
|---|
| 1373 |
|
|---|
| 1374 | // G4Box* solidWindow = new G4Box("Window",fAbsorberRadius,
|
|---|
| 1375 | // fAbsorberRadius, fWindowThick/2.);
|
|---|
| 1376 |
|
|---|
| 1377 | // G4LogicalVolume* logicWindow = new G4LogicalVolume(solidWindow,
|
|---|
| 1378 | // fWindowMat, "Window");
|
|---|
| 1379 |
|
|---|
| 1380 | // G4VPhysicalVolume* physiWindow = new G4PVPlacement(0, G4ThreeVector(0.,0.,0.),
|
|---|
| 1381 | // "Window", logicWindow, physiWindowR, false, 0);
|
|---|
| 1382 |
|
|---|
| 1383 |
|
|---|
| 1384 | fGapZ = fWindowZ + fWindowThick/2. + fGapThick/2. + 0.01*mm ;
|
|---|
| 1385 |
|
|---|
| 1386 | fElectrodeZ = fGapZ + fGapThick/2. + fElectrodeThick/2. + 0.01*mm;
|
|---|
| 1387 |
|
|---|
| 1388 | // Absorber
|
|---|
| 1389 |
|
|---|
| 1390 | fAbsorberZ = fElectrodeZ + fElectrodeThick/2. + fAbsorberThickness/2. + 0.01*mm;
|
|---|
| 1391 |
|
|---|
| 1392 | fSolidAbsorber = new G4Box("Absorber", fAbsorberRadius,
|
|---|
| 1393 | fAbsorberRadius, fAbsorberThickness/2.);
|
|---|
| 1394 |
|
|---|
| 1395 | fLogicAbsorber = new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
|
|---|
| 1396 | "Absorber");
|
|---|
| 1397 |
|
|---|
| 1398 | fPhysicsAbsorber = new G4PVPlacement(0, G4ThreeVector(0.,0.,fAbsorberZ),
|
|---|
| 1399 | "Absorber", fLogicAbsorber,
|
|---|
| 1400 | fPhysicsWorld, false, 0);
|
|---|
| 1401 |
|
|---|
| 1402 | if( fRegGasDet != 0 ) delete fRegGasDet;
|
|---|
| 1403 | if( fRegGasDet == 0 ) fRegGasDet = new G4Region("XTRdEdxDetector");
|
|---|
| 1404 | fRegGasDet->AddRootLogicalVolume(fLogicAbsorber);
|
|---|
| 1405 |
|
|---|
| 1406 | // Sensitive Detectors: Absorber
|
|---|
| 1407 |
|
|---|
| 1408 | G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
|---|
| 1409 |
|
|---|
| 1410 | if(!fCalorimeterSD)
|
|---|
| 1411 | {
|
|---|
| 1412 | fCalorimeterSD = new Em10CalorimeterSD("CalorSD",this);
|
|---|
| 1413 | SDman->AddNewDetector( fCalorimeterSD );
|
|---|
| 1414 | }
|
|---|
| 1415 | if (fLogicAbsorber) fLogicAbsorber->SetSensitiveDetector(fCalorimeterSD);
|
|---|
| 1416 |
|
|---|
| 1417 | PrintGeometryParameters();
|
|---|
| 1418 |
|
|---|
| 1419 | return fPhysicsWorld;
|
|---|
| 1420 | }
|
|---|
| 1421 |
|
|---|
| 1422 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 1423 | //
|
|---|
| 1424 | //
|
|---|
| 1425 |
|
|---|
| 1426 | void Em10DetectorConstruction::TestOld()
|
|---|
| 1427 | {
|
|---|
| 1428 | // G4double inch = 2.54*cm ;
|
|---|
| 1429 | // G4double mil = inch/1000.0 ;
|
|---|
| 1430 | // G4double GetzstartAbs() {return zstartAbs;};
|
|---|
| 1431 | // G4double GetzendAbs() {return zendAbs;};
|
|---|
| 1432 | // void ComputeCalorParameters();
|
|---|
| 1433 |
|
|---|
| 1434 | // void SetGammaCut(G4double cut){fGammaCut = cut;};
|
|---|
| 1435 | // void SetElectronCut(G4double cut){fElectronCut = cut;};
|
|---|
| 1436 | // void SetPositronCut(G4double cut){fPositronCut = cut;};
|
|---|
| 1437 | // G4int fModelNumber ; // selection of parametrisation model1-10
|
|---|
| 1438 | // void SetAlphaPlate (G4double val){fAlphaPlate = val;};
|
|---|
| 1439 | // void SetAlphaGas (G4double val){fAlphaGas = val;};
|
|---|
| 1440 |
|
|---|
| 1441 | // G4double fAlphaPlate ;
|
|---|
| 1442 | // G4double fAlphaGas ;
|
|---|
| 1443 |
|
|---|
| 1444 | // fAlphaPlate = 160.0;
|
|---|
| 1445 | // fAlphaGas = 160.0;
|
|---|
| 1446 | // fModelNumber = 0;
|
|---|
| 1447 |
|
|---|
| 1448 |
|
|---|
| 1449 | // create commands for interactive definition of the calorimeter
|
|---|
| 1450 |
|
|---|
| 1451 | // fGammaCut = 23*mm;
|
|---|
| 1452 | // fElectronCut = 23*mm;
|
|---|
| 1453 | // fPositronCut = 23*mm;
|
|---|
| 1454 |
|
|---|
| 1455 | // G4cout << *(G4Material::GetMaterialTable()) << G4endl;
|
|---|
| 1456 |
|
|---|
| 1457 |
|
|---|
| 1458 | // G4int i, j ;
|
|---|
| 1459 | // G4int j ;
|
|---|
| 1460 | // G4double zModule, zRadiator, rModule, rRadiator ;
|
|---|
| 1461 |
|
|---|
| 1462 | // complete the Calor parameters definition and Print
|
|---|
| 1463 |
|
|---|
| 1464 | //ComputeCalorParameters();
|
|---|
| 1465 |
|
|---|
| 1466 | // zRadiator ;
|
|---|
| 1467 |
|
|---|
| 1468 | // World
|
|---|
| 1469 |
|
|---|
| 1470 | // if(solidWorld) delete solidWorld ;
|
|---|
| 1471 | // if(logicWorld) delete logicWorld ;
|
|---|
| 1472 | // if(physiWorld) delete physiWorld ;
|
|---|
| 1473 |
|
|---|
| 1474 | // if(solidRadiator) delete solidRadiator;
|
|---|
| 1475 | // if(logicRadiator) delete logicRadiator;
|
|---|
| 1476 | // if(physiRadiator) delete physiRadiator;
|
|---|
| 1477 |
|
|---|
| 1478 | // radThick *= 1.02 ;
|
|---|
| 1479 |
|
|---|
| 1480 | // if(fSolidRadSlice) delete fSolidRadSlice;
|
|---|
| 1481 | // if(fLogicRadSlice) delete fLogicRadSlice;
|
|---|
| 1482 | // if(fPhysicRadSlice) delete fPhysicRadSlice;
|
|---|
| 1483 | // fSolidRadSlice = new G4Box("RadSlice",fAbsorberRadius,
|
|---|
| 1484 | // fAbsorberRadius,0.5*fRadThickness ) ;
|
|---|
| 1485 |
|
|---|
| 1486 | // fLogicRadSlice = new G4LogicalVolume(fSolidRadSlice,fRadiatorMat,
|
|---|
| 1487 | // "RadSlice",0,0,0);
|
|---|
| 1488 |
|
|---|
| 1489 | /*
|
|---|
| 1490 | for(j=0;j<fFoilNumber;j++)
|
|---|
| 1491 | {
|
|---|
| 1492 |
|
|---|
| 1493 | zRadiator = zModule + j*(fRadThickness + fGasGap) ;
|
|---|
| 1494 | G4cout<<zRadiator/mm<<" mm"<<"\t" ;
|
|---|
| 1495 | // G4cout<<"j = "<<j<<"\t" ;
|
|---|
| 1496 |
|
|---|
| 1497 | fPhysicRadSlice = new G4PVPlacement(0,G4ThreeVector(0.,0.,zRadiator-zRad),
|
|---|
| 1498 | "RadSlice",fLogicRadSlice,
|
|---|
| 1499 | physiRadiator,false,j);
|
|---|
| 1500 | }
|
|---|
| 1501 | G4cout<<G4endl ;
|
|---|
| 1502 | */
|
|---|
| 1503 | // fRadRegion->RemoveRootLogicalVolume(logicWindowR);
|
|---|
| 1504 | // G4ProductionCuts* cutsR = 0;
|
|---|
| 1505 | // cutsR = new G4ProductionCuts();
|
|---|
| 1506 | // fRadRegion->SetProductionCuts(cutsR);
|
|---|
| 1507 |
|
|---|
| 1508 | // else // Second time - get a cut object from region
|
|---|
| 1509 | {
|
|---|
| 1510 | // cutsR = fRadRegion->GetProductionCuts();
|
|---|
| 1511 | }
|
|---|
| 1512 |
|
|---|
| 1513 | // cutsR->SetProductionCut(fGammaCut,"gamma");
|
|---|
| 1514 | // cutsR->SetProductionCut(fElectronCut,"e-");
|
|---|
| 1515 | // cutsR->SetProductionCut(fPositronCut,"e+");
|
|---|
| 1516 | // G4Box* solidGap = new G4Box("Gap",fAbsorberRadius, fAbsorberRadius,
|
|---|
| 1517 | // fGapThick/2. ) ;
|
|---|
| 1518 |
|
|---|
| 1519 | // G4LogicalVolume* logicGap = new G4LogicalVolume(solidGap,fGapMat, "Gap");
|
|---|
| 1520 |
|
|---|
| 1521 | // G4VPhysicalVolume* physiGap = new G4PVPlacement(0,
|
|---|
| 1522 | // G4ThreeVector(0.,0.,zGap),
|
|---|
| 1523 | // "Gap",logicGap,physiWorld,false,0);
|
|---|
| 1524 |
|
|---|
| 1525 |
|
|---|
| 1526 | // G4Box* solidElectrode = new G4Box("Electrode",fAbsorberRadius,
|
|---|
| 1527 | // fAbsorberRadius, fElectrodeThick/2. );
|
|---|
| 1528 |
|
|---|
| 1529 | // G4LogicalVolume* logicElectrode = new G4LogicalVolume(solidElectrode,
|
|---|
| 1530 | // fElectrodeMat, "Electrode");
|
|---|
| 1531 |
|
|---|
| 1532 | // G4VPhysicalVolume* physiElectrode = new G4PVPlacement(0,
|
|---|
| 1533 | // G4ThreeVector(0.,0.,zElectrode),
|
|---|
| 1534 | // "Electrode",logicElectrode,
|
|---|
| 1535 | // physiWorld,false,0);
|
|---|
| 1536 | // if(solidAbsorber) delete solidAbsorber ;
|
|---|
| 1537 | // if(logicAbsorber) delete logicAbsorber ;
|
|---|
| 1538 | // if(physiAbsorber) delete physiAbsorber ;
|
|---|
| 1539 | // if (fAbsorberThickness > 0.)
|
|---|
| 1540 | // {
|
|---|
| 1541 | // }
|
|---|
| 1542 |
|
|---|
| 1543 | // fRegGasDet->RemoveRootLogicalVolume(logicAbsorber);
|
|---|
| 1544 | // G4ProductionCuts* cuts = 0;
|
|---|
| 1545 | // cuts = new G4ProductionCuts();
|
|---|
| 1546 | // fRegGasDet->SetProductionCuts(cuts);
|
|---|
| 1547 | // else // Second time - get a cut object from region
|
|---|
| 1548 | {
|
|---|
| 1549 | // cuts = fRegGasDet->GetProductionCuts();
|
|---|
| 1550 | }
|
|---|
| 1551 |
|
|---|
| 1552 |
|
|---|
| 1553 | // cuts->SetProductionCut(fGammaCut,"gamma");
|
|---|
| 1554 | // cuts->SetProductionCut(fElectronCut,"e-");
|
|---|
| 1555 | // cuts->SetProductionCut(fPositronCut,"e+");
|
|---|
| 1556 |
|
|---|
| 1557 | }
|
|---|
| 1558 |
|
|---|
| 1559 |
|
|---|
| 1560 |
|
|---|
| 1561 |
|
|---|
| 1562 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 1563 | //
|
|---|
| 1564 | //
|
|---|
| 1565 |
|
|---|
| 1566 | void Em10DetectorConstruction::PrintGeometryParameters()
|
|---|
| 1567 | {
|
|---|
| 1568 | G4cout << "\n The WORLD is made of "
|
|---|
| 1569 | << fWorldSizeZ/mm << "mm of " << fWorldMaterial->GetName() ;
|
|---|
| 1570 | G4cout << ", the transverse size (R) of the world is " << fWorldSizeR/mm << " mm. " << G4endl;
|
|---|
| 1571 | G4cout << " The ABSORBER is made of "
|
|---|
| 1572 | << fAbsorberThickness/mm << "mm of " << fAbsorberMaterial->GetName() ;
|
|---|
| 1573 | G4cout << ", the transverse size (R) is " << fAbsorberRadius/mm << " mm. " << G4endl;
|
|---|
| 1574 | G4cout << " Z position of the (middle of the) absorber " << fAbsorberZ/mm << " mm." << G4endl;
|
|---|
| 1575 |
|
|---|
| 1576 | G4cout<<"fRadZ = "<<fRadZ/mm<<" mm"<<G4endl ;
|
|---|
| 1577 |
|
|---|
| 1578 | G4cout<<"fStartZ = "<<fStartZ/mm<<" mm"<<G4endl ;
|
|---|
| 1579 |
|
|---|
| 1580 | G4cout<<"fRadThick = "<<fRadThick/mm<<" mm"<<G4endl ;
|
|---|
| 1581 | G4cout<<"fFoilNumber = "<<fFoilNumber<<G4endl ;
|
|---|
| 1582 | G4cout<<"fRadiatorMat = "<<fRadiatorMat->GetName()<<G4endl ;
|
|---|
| 1583 | G4cout<<"WorldMaterial = "<<fWorldMaterial->GetName()<<G4endl ;
|
|---|
| 1584 | // G4cout<<"fAbsorberZ = "<<fAbsorberZ/mm<<" mm"<<G4endl;
|
|---|
| 1585 | G4cout << G4endl;
|
|---|
| 1586 | }
|
|---|
| 1587 |
|
|---|
| 1588 | ///////////////////////////////////////////////////////////////////////////
|
|---|
| 1589 | //
|
|---|
| 1590 | //
|
|---|
| 1591 |
|
|---|
| 1592 | void Em10DetectorConstruction::SetAbsorberMaterial(G4String materialChoice)
|
|---|
| 1593 | {
|
|---|
| 1594 | // get the pointer to the material table
|
|---|
| 1595 | const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
|
|---|
| 1596 |
|
|---|
| 1597 | // search the material by its name
|
|---|
| 1598 | G4Material* pttoMaterial;
|
|---|
| 1599 |
|
|---|
| 1600 | for (size_t J=0 ; J<theMaterialTable->size() ; J++)
|
|---|
| 1601 | {
|
|---|
| 1602 | pttoMaterial = (*theMaterialTable)[J];
|
|---|
| 1603 |
|
|---|
| 1604 | if(pttoMaterial->GetName() == materialChoice)
|
|---|
| 1605 | {
|
|---|
| 1606 | fAbsorberMaterial = pttoMaterial;
|
|---|
| 1607 | fLogicAbsorber->SetMaterial(pttoMaterial);
|
|---|
| 1608 | // PrintCalorParameters();
|
|---|
| 1609 | }
|
|---|
| 1610 | }
|
|---|
| 1611 | }
|
|---|
| 1612 | ///////////////////////////////////////////////////////////////////////////
|
|---|
| 1613 | //
|
|---|
| 1614 | //
|
|---|
| 1615 |
|
|---|
| 1616 | void Em10DetectorConstruction::SetRadiatorMaterial(G4String materialChoice)
|
|---|
| 1617 | {
|
|---|
| 1618 | // get the pointer to the material table
|
|---|
| 1619 |
|
|---|
| 1620 | const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
|
|---|
| 1621 |
|
|---|
| 1622 | // search the material by its name
|
|---|
| 1623 |
|
|---|
| 1624 | G4Material* pttoMaterial;
|
|---|
| 1625 | for (size_t J=0 ; J<theMaterialTable->size() ; J++)
|
|---|
| 1626 | {
|
|---|
| 1627 | pttoMaterial = (*theMaterialTable)[J];
|
|---|
| 1628 |
|
|---|
| 1629 | if(pttoMaterial->GetName() == materialChoice)
|
|---|
| 1630 | {
|
|---|
| 1631 | fRadiatorMat = pttoMaterial;
|
|---|
| 1632 | fLogicRadSlice->SetMaterial(pttoMaterial);
|
|---|
| 1633 | // PrintCalorParameters();
|
|---|
| 1634 | }
|
|---|
| 1635 | }
|
|---|
| 1636 | }
|
|---|
| 1637 |
|
|---|
| 1638 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 1639 | //
|
|---|
| 1640 | //
|
|---|
| 1641 |
|
|---|
| 1642 | void Em10DetectorConstruction::SetWorldMaterial(G4String materialChoice)
|
|---|
| 1643 | {
|
|---|
| 1644 | // get the pointer to the material table
|
|---|
| 1645 | const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
|
|---|
| 1646 |
|
|---|
| 1647 | // search the material by its name
|
|---|
| 1648 | G4Material* pttoMaterial;
|
|---|
| 1649 |
|
|---|
| 1650 | for (size_t J=0 ; J<theMaterialTable->size() ; J++)
|
|---|
| 1651 | {
|
|---|
| 1652 | pttoMaterial = (*theMaterialTable)[J];
|
|---|
| 1653 |
|
|---|
| 1654 | if(pttoMaterial->GetName() == materialChoice)
|
|---|
| 1655 | {
|
|---|
| 1656 | fWorldMaterial = pttoMaterial;
|
|---|
| 1657 | fLogicWorld->SetMaterial(pttoMaterial);
|
|---|
| 1658 | // PrintCalorParameters();
|
|---|
| 1659 | }
|
|---|
| 1660 | }
|
|---|
| 1661 | }
|
|---|
| 1662 |
|
|---|
| 1663 | ///////////////////////////////////////////////////////////////////////////
|
|---|
| 1664 | //
|
|---|
| 1665 | //
|
|---|
| 1666 |
|
|---|
| 1667 | void Em10DetectorConstruction::SetAbsorberThickness(G4double val)
|
|---|
| 1668 | {
|
|---|
| 1669 | // change Absorber thickness and recompute the calorimeter parameters
|
|---|
| 1670 | fAbsorberThickness = val;
|
|---|
| 1671 | // ComputeCalorParameters();
|
|---|
| 1672 | }
|
|---|
| 1673 |
|
|---|
| 1674 | ///////////////////////////////////////////////////////////////////////////
|
|---|
| 1675 | //
|
|---|
| 1676 | //
|
|---|
| 1677 |
|
|---|
| 1678 | void Em10DetectorConstruction::SetRadiatorThickness(G4double val)
|
|---|
| 1679 | {
|
|---|
| 1680 | // change XTR radiator thickness and recompute the calorimeter parameters
|
|---|
| 1681 | fRadThickness = val;
|
|---|
| 1682 | // ComputeCalorParameters();
|
|---|
| 1683 | }
|
|---|
| 1684 |
|
|---|
| 1685 | ///////////////////////////////////////////////////////////////////////////
|
|---|
| 1686 | //
|
|---|
| 1687 | //
|
|---|
| 1688 |
|
|---|
| 1689 | void Em10DetectorConstruction::SetGasGapThickness(G4double val)
|
|---|
| 1690 | {
|
|---|
| 1691 | // change XTR gas gap thickness and recompute the calorimeter parameters
|
|---|
| 1692 | fGasGap = val;
|
|---|
| 1693 | // ComputeCalorParameters();
|
|---|
| 1694 | }
|
|---|
| 1695 |
|
|---|
| 1696 | /////////////////////////////////////////////////////////////////////////////
|
|---|
| 1697 | //
|
|---|
| 1698 | //
|
|---|
| 1699 |
|
|---|
| 1700 | void Em10DetectorConstruction::SetAbsorberRadius(G4double val)
|
|---|
| 1701 | {
|
|---|
| 1702 | // change the transverse size and recompute the calorimeter parameters
|
|---|
| 1703 | fAbsorberRadius = val;
|
|---|
| 1704 | // ComputeCalorParameters();
|
|---|
| 1705 | }
|
|---|
| 1706 |
|
|---|
| 1707 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 1708 | //
|
|---|
| 1709 | //
|
|---|
| 1710 |
|
|---|
| 1711 | void Em10DetectorConstruction::SetWorldSizeZ(G4double val)
|
|---|
| 1712 | {
|
|---|
| 1713 | fWorldChanged=true;
|
|---|
| 1714 | fWorldSizeZ = val;
|
|---|
| 1715 | // ComputeCalorParameters();
|
|---|
| 1716 | }
|
|---|
| 1717 |
|
|---|
| 1718 | ///////////////////////////////////////////////////////////////////////////
|
|---|
| 1719 | //
|
|---|
| 1720 | //
|
|---|
| 1721 |
|
|---|
| 1722 | void Em10DetectorConstruction::SetWorldSizeR(G4double val)
|
|---|
| 1723 | {
|
|---|
| 1724 | fWorldChanged=true;
|
|---|
| 1725 | fWorldSizeR = val;
|
|---|
| 1726 | // ComputeCalorParameters();
|
|---|
| 1727 | }
|
|---|
| 1728 |
|
|---|
| 1729 | //////////////////////////////////////////////////////////////////////////////
|
|---|
| 1730 | //
|
|---|
| 1731 | //
|
|---|
| 1732 |
|
|---|
| 1733 | void Em10DetectorConstruction::SetAbsorberZpos(G4double val)
|
|---|
| 1734 | {
|
|---|
| 1735 | fAbsorberZ = val;
|
|---|
| 1736 | // ComputeCalorParameters();
|
|---|
| 1737 | }
|
|---|
| 1738 |
|
|---|
| 1739 | //////////////////////////////////////////////////////////////////////////////
|
|---|
| 1740 | //
|
|---|
| 1741 | //
|
|---|
| 1742 |
|
|---|
| 1743 | void Em10DetectorConstruction::SetMagField(G4double)
|
|---|
| 1744 | {
|
|---|
| 1745 | //apply a global uniform magnetic field along X axis
|
|---|
| 1746 |
|
|---|
| 1747 | /* *********************************************************
|
|---|
| 1748 |
|
|---|
| 1749 | G4FieldManager* fieldMgr
|
|---|
| 1750 | = G4TransportationManager::GetTransportationManager()->GetFieldManager();
|
|---|
| 1751 |
|
|---|
| 1752 | if(magField) delete magField; //delete the existing magn field
|
|---|
| 1753 |
|
|---|
| 1754 | if(fieldValue!=0.) // create a new one if non nul
|
|---|
| 1755 | {
|
|---|
| 1756 | magField = new G4UniformMagField(G4ThreeVector(fieldValue,0.,0.));
|
|---|
| 1757 | fieldMgr->SetDetectorField(magField);
|
|---|
| 1758 | fieldMgr->CreateChordFinder(magField);
|
|---|
| 1759 | }
|
|---|
| 1760 | else
|
|---|
| 1761 | {
|
|---|
| 1762 | magField = 0;
|
|---|
| 1763 | fieldMgr->SetDetectorField(magField);
|
|---|
| 1764 | }
|
|---|
| 1765 |
|
|---|
| 1766 | *************************************************************** */
|
|---|
| 1767 |
|
|---|
| 1768 | }
|
|---|
| 1769 |
|
|---|
| 1770 | ///////////////////////////////////////////////////////////////////////////////
|
|---|
| 1771 | //
|
|---|
| 1772 | //
|
|---|
| 1773 |
|
|---|
| 1774 | void Em10DetectorConstruction::UpdateGeometry()
|
|---|
| 1775 | {
|
|---|
| 1776 | G4RunManager::GetRunManager()->DefineWorldVolume(ConstructDetectorXTR());
|
|---|
| 1777 | }
|
|---|
| 1778 |
|
|---|
| 1779 | //
|
|---|
| 1780 | //
|
|---|
| 1781 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 1782 |
|
|---|
| 1783 |
|
|---|
| 1784 |
|
|---|
| 1785 |
|
|---|
| 1786 |
|
|---|
| 1787 |
|
|---|
| 1788 |
|
|---|
| 1789 |
|
|---|
| 1790 |
|
|---|
| 1791 |
|
|---|
| 1792 |
|
|---|
| 1793 |
|
|---|
| 1794 |
|
|---|
| 1795 |
|
|---|
| 1796 |
|
|---|
| 1797 |
|
|---|
| 1798 |
|
|---|