ACTARSim
ACTAR TPC Simulation Reference Guide
ActarSimDetectorConstruction.cc
Go to the documentation of this file.
1 // - AUTHOR: Hector Alvarez-Pol 05/2005
2 /******************************************************************
3  * Copyright (C) 2005-2016, Hector Alvarez-Pol *
4  * All rights reserved. *
5  * *
6  * License according to GNU LESSER GPL (see lgpl-3.0.txt). *
7  * For the list of contributors see CREDITS. *
8  ******************************************************************/
9 //////////////////////////////////////////////////////////////////
10 /// \class ActarSimDetectorConstruction
11 /// Detector construction and complementary definitions
12 /////////////////////////////////////////////////////////////////
13 
16 
23 
24 #include "ActarSimGasSD.hh"
25 #include "ActarSimSilSD.hh"
26 #include "ActarSimSilRingSD.hh"
27 #include "ActarSimSciSD.hh"
28 #include "ActarSimSciRingSD.hh"
29 #include "ActarSimPlaSD.hh"
30 
31 #include "ActarSimROOTAnalysis.hh"
32 
33 #include "G4RotationMatrix.hh"
34 #include "G4Material.hh"
35 #include "G4Box.hh"
36 #include "G4Tubs.hh"
37 #include "G4LogicalVolume.hh"
38 #include "G4PVPlacement.hh"
39 #include "G4VisAttributes.hh"
40 #include "G4Colour.hh"
41 #include "G4RunManager.hh"
42 #include "G4SDManager.hh"
43 #include "globals.hh"
44 #include "G4AssemblyVolume.hh"
45 
46 #include "G4PhysicalConstants.hh"
47 #include "G4SystemOfUnits.hh"
48 
49 //////////////////////////////////////////////////////////////////
50 /// Constructor: initialize all variables, materials and pointers
52  : gasSD(0), silSD(0), silRingSD(0), sciSD(0),sciRingSD(0),plaSD(0),
53  solidWorld(0), worldLog(0), chamberLog(0), AlplateLog(0), DiamondLog(0), SupportLog(0),
54  worldPhys(0), chamberPhys(0), AlplatePhys(0), DiamondPhys(0), SupportPhys(0),
55  mediumMaterial(0), defaultMaterial(0), chamberMaterial(0), windowMaterial(0),
56  emField(0), MaikoGeoIncludedFlag("off"), ACTARTPCGeoIncludedFlag("off"),
57  gasGeoIncludedFlag("on"), silGeoIncludedFlag("off"), sciGeoIncludedFlag("off"),
58  gasDet(0), silDet(0),silRingDet(0), sciDet(0), sciRingDet(0), plaDet(0) {
59  //default values of half-length -> size of World (2x2x2 m3)
60  worldSizeX = 1.*m;
61  worldSizeY = 1.*m;
62  worldSizeZ = 1.*m;
63  //default values of half-length -> size of Chamber (1x1x1 m3)
64  chamberSizeX = 0.5*m;
65  chamberSizeY = 0.5*m;
66  chamberSizeZ = 0.5*m;
67 
68  //SD are here defined to avoid problems in the Construct function
69  //turning on twice the detectors
70  G4SDManager* SDman = G4SDManager::GetSDMpointer();
71  // gas volume sensitive detector
72  G4String gasSDname = "gasSD";
73  gasSD = new ActarSimGasSD( gasSDname );
74  SDman->AddNewDetector( gasSD );
75  // sil volume sensitive detector
76  G4String silSDname = "silSD";
77  silSD = new ActarSimSilSD( silSDname );
78  SDman->AddNewDetector( silSD );
79  // silRing volume sensitive detector
80  G4String silRingSDname = "silRingSD";
81  silRingSD = new ActarSimSilRingSD( silRingSDname );
82  SDman->AddNewDetector( silRingSD );
83  // sci volume sensitive detector
84  G4String sciSDname = "sciSD";
85  sciSD = new ActarSimSciSD( sciSDname );
86  SDman->AddNewDetector( sciSD );
87  // sciRing volume sensitive detector
88  G4String sciRingSDname = "sciRingSD";
89  sciRingSD = new ActarSimSciRingSD( sciRingSDname );
90  SDman->AddNewDetector( sciRingSD );
91  // pla volume sensitive detector
92  G4String plaSDname = "plaSD";
93  plaSD = new ActarSimPlaSD( plaSDname );
94  SDman->AddNewDetector( plaSD );
95 
96  //define default materials and set medium, default, chamber, window default materials
98  SetMediumMaterial("Air");
99  SetDefaultMaterial("Galactic");
100  SetChamberMaterial("Galactic");
101  SetWindowMaterial("Mylar");
102 
103  //electric and magnetic fields
105 
106  //Modular detector construction objects
113 
114  // create commands for interactive definition of the detector
116 }
117 
118 //////////////////////////////////////////////////////////////////
119 /// Destructor
121  if (emField != NULL) delete emField;
122  if (gasDet != NULL) delete gasDet;
123  if (silDet != NULL) delete silDet;
124  if (silRingDet != NULL) delete silRingDet;
125  if (sciDet != NULL) delete sciDet;
126  if (sciRingDet != NULL) delete sciRingDet;
127  if (plaDet != NULL) delete plaDet;
128  /*
129  if (gasSD != NULL) delete gasSD;
130  if (silSD != NULL) delete silSD;
131  if (silRingSD != NULL) delete silRingSD;
132  if (sciSD != NULL) delete sciSD;
133  if (sciRingSD != NULL) delete sciRingSD;
134  if (plaSD != NULL) delete plaSD;
135  */
136  if (detectorMessenger != NULL) delete detectorMessenger;
137 }
138 
139 //////////////////////////////////////////////////////////////////
140 /// GEANT4 mandatory method for the geometry implementation.
141 ///
142 /// The geometry of the detector is constructed according to user-specified flags.
143 /// Available detectors:
144 /// - ACTAR_TPC
145 /// - ACTAR demonstrator
146 /// - Maiko geometry
147 /// - SpecMAT geometry
148 /// - Generic geometry
149 ///
150 /// Returns a pointer to the World Physical Volume according to G4 specifications
151 ///
152 /// Only one geometry option can be specified.
153 /// In case of multiple geometry definiotn an error message is displayed and a NULL pointer returned.
155  G4int geo = 0;
156  G4int i_geo = 1;
157 
158  if(ACTARTPCGeoIncludedFlag == "on"){
159  geo = 1; i_geo += 1;
160  }
161 
162  if(ACTARTPCDEMOGeoIncludedFlag == "on"){
163  geo = 2; i_geo += 1;
164  }
165 
166  if(SpecMATGeoIncludedFlag == "on"){
167  geo = 3; i_geo += 1;
168  }
169 
170  if(MaikoGeoIncludedFlag == "on"){
171  geo = 4; i_geo += 1;
172  }
173 
174  if(OthersGeoIncludedFlag == "on"){
175  geo = 5; i_geo += 1;
176  }
177 
178  if (i_geo > 2){
179  G4cout<<"ERROR, multiple geometry definition. Verify inputfile. (geo="<< geo <<", i_geo="<<i_geo<<")"<<G4endl;
180  exit (-1);
181  }
182 
183  //Build the DETECTOR according to the specified layout
184  switch (geo){
185 
186  case 0: G4cout << "Building empty geometry" <<G4endl;
187  return ConstructEmptyWorld();
188 
189  case 1: G4cout << "Building ACTAR_TPC geometry" <<G4endl;
190  return ConstructActarTPC();
191 
192  case 2: G4cout << "Building ACTAR_TPC Demonstrator geometry"<<G4endl;
193  return ConstructActarTPCDEMO();
194 
195  case 3: G4cout << "Building SpecMAT geometry"<<G4endl;
196  return ConstructSpecMAT();
197 
198  case 4: G4cout << "Building MAIKO geometry"<<G4endl;
199  return ConstructMAIKO();
200 
201  case 5: G4cout << "Building Other geometry"<<G4endl;
202  return ConstructOthers();
203 
204  default: G4cout << "UNKNOWN geometry"<<G4endl;
205  }
206 
207  return NULL;
208 }
209 
210 /////////////////////////////////////////////////////////////////
211 /// Constructs an empty World volume with default sizes.
212 ///
213 /// It is used if no geometry is specified when inizialization is called.
215 
216  solidWorld = new G4Box("World", //its name
217  worldSizeX,worldSizeY,worldSizeZ); //its size
218 
219  worldLog = new G4LogicalVolume(solidWorld, //its solid
220  mediumMaterial, //its material
221  "World"); //its name
222 
223  worldPhys = new G4PVPlacement(0, //no rotation
224  G4ThreeVector(), //at (0,0,0)
225  worldLog, //its logical volume
226  "World", //its name
227  0, //its mother volume
228  false, //no boolean operation
229  0); //copy number
230 
231  return worldPhys;
232 }
233 
234 ////////////////////////////////////////////////////////////////
235 /// Constructs the ActarTPC geometry
236 ///
237 /// A-The World is a Box with HALF-SIZES OF 1.5m x 1.5m x 1.5m (user-settings overridden).
238 ///
239 /// B-The scattering chamber is a box with user-defined sizes
240 /// (default HALF-LENGTH values are 0.5x0.5x0.5 m^3 set in the constructor)
241 /// The position is user-defined
242 ///
243 /// C-Hard-coded subvolumes:
244 ///
245 /// D-Optional sub-volumes and ancillaries:
246 /// -Gas volume (see ActarSimGasDetectorConstruction)
247 /// -Sil volume (see ActarSimSilDetectorConstruction)
248 /// -Sci volume (see ActarSimSciDetectorConstruction)
249 ///
250 /// The Analysis is eventually configured according to the implemented geometry.
251 ///
252 /// Returns a pointer to the world's physical volume.
254  //--------------------------
255  //World Volume
256  //--------------------------
257 
258  //Geometrical definition of the world, half sizes
259  SetWorldSizeX(1.5*m);
260  SetWorldSizeY(1.5*m);
261  SetWorldSizeZ(1.5*m);
262 
263  solidWorld = new G4Box("World", //its name
264  worldSizeX,worldSizeY,worldSizeZ); //its size
265 
266  worldLog = new G4LogicalVolume(solidWorld, //its solid
267  mediumMaterial, //its material
268  "World"); //its name
269 
270  worldPhys = new G4PVPlacement(0, //no rotation
271  G4ThreeVector(), //at (0,0,0)
272  worldLog, //its logical volume
273  "World", //its name
274  0, //its mother volume
275  false, //no boolean operation
276  0); //copy number
277 
278  //--------------------------
279  //Scattering Chamber
280  //--------------------------
281  //Definition of the ACTAR-TPC detector
282  //Chamber half-lengths are (150, 105, 150)mm,
283  //also selectable using /ActarSim/det/setXLengthGasChamber... in the macros
284  //Last sentence is not true if chamberSizeX,Y,Z are reinitialized here - T.M. Feb 2016
285  chamberSizeX = 200.*mm;
286  chamberSizeY = 105.*mm;
287  chamberSizeZ = 200.*mm;
288 
289  //Chamber X,Y,Z Center
290  chamberCenterX = 0.*m;
291  chamberCenterY = 0.*m;
292  chamberCenterZ = 0.*m;
293 
294  G4Box* solidChamber = new G4Box("Chamber", //its name
296 
297  chamberLog = new G4LogicalVolume(solidChamber, //its solid
299  "Chamber"); //its name
300 
301  chamberPhys = new G4PVPlacement(0, //no rotation
302  G4ThreeVector(chamberCenterX,
305  chamberLog, //its logical volume
306  "Chamber", //its name
307  worldLog, //its mother volume
308  false, //no boolean operation
309  0);
310 
311  if(chamberPhys){;}
312 
313  //--------------------------
314  // Gas volume
315  //--------------------------
316  if(gasGeoIncludedFlag=="on")
318 
319  //--------------------------
320  //An Aluminium plate to see the Pads active area just below the gas volume
321  //--------------------------
322  G4double plateSizeX = 128.*mm;
323  G4double plateSizeY = 4.54/2*mm;
324  G4double plateSizeZ = 128.*mm;
325 
326  G4Box *Alplate=new G4Box("Al_plate",plateSizeX,plateSizeY,plateSizeZ);
327  AlplateLog=new G4LogicalVolume(Alplate,G4Material::GetMaterial("Aluminium"),"Al_plate");
328 
329  G4double platePosX = 0.*cm;
330  G4double platePosY =-chamberSizeY + plateSizeY;
331  G4double platePosZ = 0.*cm;
332 
333  AlplatePhys=new G4PVPlacement(0,G4ThreeVector( platePosX,platePosY,platePosZ),
334  AlplateLog,"Al_plate",chamberLog,false,0);
335 
336  G4VisAttributes* plateVisAtt= new G4VisAttributes(G4Colour(1.0,0.,1.0));
337  plateVisAtt->SetVisibility(true);
338  AlplateLog->SetVisAttributes(plateVisAtt);
339 
340  //--------------------------
341  // Sil volume
342  //--------------------------
343  if(silGeoIncludedFlag=="on")
345 
346  //--------------------------
347  // Sci volume
348  //--------------------------
349  if(sciGeoIncludedFlag=="on")
351 
352  //--------------------------
353  // Histogramming
354  //--------------------------
357 
358  //--------------------------
359  //Connection to the analysis only for those detectors included!
360  //--------------------------
361  if (gActarSimROOTAnalysis) {
366  }
367 
368  //visibility
369  worldLog->SetVisAttributes (G4VisAttributes::Invisible);
370 
371  return worldPhys;
372 }
373 
374 ////////////////////////////////////////////////////////////////
375 /// Constructs the ActarTPC DEMONSTRATOR geometry
376 ///
377 /// A-The World is a Box with HALF-SIZES OF 1.5m x 1.5m x 1.5m (user-settings overridden).
378 ///
379 /// B-The scattering chamber is a box with HARD-CODED HALF SIZES
380 /// its position is FIXED at the center of the World's volume
381 ///
382 /// C-Hard-coded Sub-volumes and ancillaries:
383 /// -Beam entrance window
384 /// -Field cage support
385 /// -Al plate
386 /// -Beam diamond detector
387 ///
388 /// D-Optional sub-volumes and ancillaries:
389 /// -Gas volume (see ActarSimGasDetectorConstruction)
390 /// -Sil volume (see ActarSimSilDetectorConstruction)
391 /// -Sci volume (see ActarSimSciDetectorConstruction)
392 ///
393 /// The Analysis is eventually configured according to the implemented geometry.
394 ///
395 /// Returns a pointer to the world's physical volume.
397  //--------------------------
398  //World Volume
399  //--------------------------
400 
401  //Geometrical definition of the world, half sizes
402  SetWorldSizeX(1.5*m);
403  SetWorldSizeY(1.5*m);
404  SetWorldSizeZ(1.5*m);
405 
406  solidWorld = new G4Box("World", //its name
407  worldSizeX,worldSizeY,worldSizeZ); //its size
408 
409  worldLog = new G4LogicalVolume(solidWorld, //its solid
410  mediumMaterial, //its material
411  "World"); //its name
412 
413  worldPhys = new G4PVPlacement(0, //no rotation
414  G4ThreeVector(), //at (0,0,0)
415  worldLog, //its logical volume
416  "World", //its name
417  0, //its mother volume
418  false, //no boolean operation
419  0); //copy number
420 
421  //--------------------------
422  //Scattering Chamber
423  //--------------------------
424  //Definition of the ACTAR-TPC Demonstrator
425  //Chamber half-lengths are (95, 105, 120)mm,
426  //also selectable using /ActarSim/det/setXLengthGasChamber... in the macros
427  //Last sentence is not true if chamberSizeX,Y,Z are reinitialized here - T.M. Feb 2016
428  chamberSizeX = 95.*mm;
429  chamberSizeY = 105.*mm;
430  chamberSizeZ = 120.*mm;
431 
432  //Chamber X,Y,Z Center
433  chamberCenterX = 0.*m;
434  chamberCenterY = 0.*m; //OLD chamberSizeY-(yGasBoxPosition+yPadSize)
435  //chamberCenterY = 105.*mm-85.*mm-4.54*mm; //So Y centered with GasBox
436  chamberCenterZ = 0.*m; //OLD zGasBoxPosition
437 
438  G4Box* solidChamber = new G4Box("Chamber", //its name
440 
441  chamberLog = new G4LogicalVolume(solidChamber, //its solid
443  "Chamber"); //its name
444 
445  chamberPhys = new G4PVPlacement(0, //no rotation
446  G4ThreeVector(chamberCenterX,
449  chamberLog, //its logical volume
450  "Chamber", //its name
451  worldLog, //its mother volume
452  false, //no boolean operation
453  0);
454 
455  if(chamberPhys){;}
456 
457  //--------------------------
458  //Beam entrance Window in Chamber
459  //--------------------------
460  G4double window_outer_radius = 36.*mm;
461  G4double window_inner_radius = 0.*mm;
462  G4double window_half_length = 5.*mm;
463  G4double startAngle = 0.*deg;
464  G4double spanningAngle = 360.*deg;
465 
466  G4Tubs *window = new G4Tubs("Window",window_inner_radius,window_outer_radius,window_half_length,
467  startAngle,spanningAngle);
468  G4VisAttributes* windowVisAtt= new G4VisAttributes(G4Colour(1.0,0.,0.));
469  windowVisAtt->SetVisibility(true);
470 
471  G4LogicalVolume* window_log = new G4LogicalVolume(window,chamberMaterial,"window_log",0,0,0);
472  window_log->SetVisAttributes(windowVisAtt);
473 
474  G4double windowPosX = 0.*mm;
475  G4double windowPosY = 0.*mm;
476  G4double windowPosZ = -chamberSizeZ+window_half_length+22.*mm;//enter window is situated 22mm inside chamber
477 
478  G4VPhysicalVolume* window_phys=new G4PVPlacement(0,G4ThreeVector(windowPosX,windowPosY,windowPosZ),
479  window_log,"window",chamberLog,false,0);
480 
481  if(window_phys){;}
482 
483  //--------------------------
484  //Support of the field cage
485  //--------------------------
486  G4RotationMatrix* rotLeft = new G4RotationMatrix(pi/2,pi/2,-pi/2);//ZY planes
487  G4RotationMatrix* rotRight = new G4RotationMatrix(-pi/2,pi/2,pi/2);//ZY planes
488 
489  G4double Support_x = 8. *mm;
490  G4double Support_x2 = 6.4*mm;
491  G4double Support_y = 85. *mm;
492  //G4double Support_y = 89.54*mm;
493  G4double Support_z = 1.6*mm;
494 
495  G4Box* SupportBox = new G4Box("SupportBox", Support_x, Support_y, Support_z);
496  G4Box* SupportBox2 = new G4Box("SupportBox2", Support_x2, Support_y, Support_z);
497 
498  SupportLog=new G4LogicalVolume(SupportBox,G4Material::GetMaterial("Lead"),"SupportLog");
499 
500  //TO BE IMPROVED: should take the pad x syze from a variable, will do it later
501  //SupportPhys=new G4PVPlacement(0,G4ThreeVector(32+6.175-8,0,64+6.575),
502  SupportPhys=new G4PVPlacement(0,G4ThreeVector(32+6.175-8,-105+85+4.54,64+6.575),
503  SupportLog,"Support",chamberLog,false,0);
504  //SupportPhys=new G4PVPlacement(0,G4ThreeVector(-32-6.175+8,0,64+6.575),
505  SupportPhys=new G4PVPlacement(0,G4ThreeVector(-32-6.175+8,-105+85+4.54,64+6.575),
506  SupportLog,"Support",chamberLog,false,1);
507 
508  G4VisAttributes* SupportVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
509  SupportVisAtt->SetVisibility(true);
510  SupportLog->SetVisAttributes(SupportVisAtt);
511 
512  SupportLog=new G4LogicalVolume(SupportBox2,G4Material::GetMaterial("Lead"),"SupportLog");
513 
514  //SupportPhys=new G4PVPlacement(rotRight,G4ThreeVector(32+4.575,0,64+4.975-6.4),//should take the pad x syze from a variable, will do it later
515  SupportPhys=new G4PVPlacement(rotRight,G4ThreeVector(32+4.575,-105+85+4.54,64+4.975-6.4),//should take the pad x syze from a variable, will do it later
516  SupportLog,"Support",chamberLog,false,2);
517 
518  //SupportPhys=new G4PVPlacement(rotLeft,G4ThreeVector(-32-4.575,0,64+4.975-6.4),//should take the pad x syze from a variable, will do it later
519  SupportPhys=new G4PVPlacement(rotLeft,G4ThreeVector(-32-4.575,-105+85+4.54,64+4.975-6.4),//should take the pad x syze from a variable, will do it later
520  SupportLog,"Support",chamberLog,false,2);
521 
522  SupportVisAtt->SetVisibility(true);
523  SupportLog->SetVisAttributes(SupportVisAtt);
524 
525  //--------------------------
526  //A Diamond detector in front of the DSSD detectors to catch the beam
527  //--------------------------
528  G4double Diamond_x = 12.*mm;
529  G4double Diamond_y = 12.*mm;
530  G4double Diamond_z = 0.75*mm;
531 
532  G4Box* DiamondBox = new G4Box("DiamondBox", Diamond_x, Diamond_y, Diamond_z);
533 
534  DiamondLog=new G4LogicalVolume(DiamondBox,G4Material::GetMaterial("Lead"),"DiamondLog");
535  DiamondPhys=new G4PVPlacement(0,G4ThreeVector(0,0,64+23),//should take the pad x syze from a variable, will do it later
536  DiamondLog,"Diamond",chamberLog,false,0);
537 
538  G4VisAttributes* DiamondVisAtt= new G4VisAttributes(G4Colour(1.0,0.,1.0));
539  DiamondVisAtt->SetVisibility(true);
540  DiamondLog->SetVisAttributes(DiamondVisAtt);
541 
542  //--------------------------
543  // Gas volume
544  //--------------------------
545  if(gasGeoIncludedFlag=="on")
547 
548  //--------------------------
549  //An Aluminium plate to see the Pads active area just below the gas volume
550  //--------------------------
551  G4double plateSizeX = 32.*mm;
552  G4double plateSizeY = 4.54/2*mm;
553  G4double plateSizeZ = 64.*mm;
554 
555  G4Box *Alplate=new G4Box("Al_plate",plateSizeX,plateSizeY,plateSizeZ);
556  AlplateLog=new G4LogicalVolume(Alplate,G4Material::GetMaterial("Aluminium"),"Al_plate");
557 
558  G4double platePosX = 0.*cm;
559  //G4double platePosY = -gasDet->GetGasBoxSizeY() +2* plateSizeY;
560  G4double platePosY =-chamberSizeY + plateSizeY;
561  G4double platePosZ = 0.*cm;
562 
563  AlplatePhys=new G4PVPlacement(0,G4ThreeVector( platePosX,platePosY,platePosZ),
564  AlplateLog,"Al_plate",chamberLog,false,0);
565 
566  G4VisAttributes* plateVisAtt= new G4VisAttributes(G4Colour(1.0,0.,1.0));
567  plateVisAtt->SetVisibility(true);
568  AlplateLog->SetVisAttributes(plateVisAtt);
569 
570  //--------------------------
571  // Sil volume
572  //--------------------------
573  if(silGeoIncludedFlag=="on")
575 
576  //--------------------------
577  // Sci volume
578  //--------------------------
579  if(sciGeoIncludedFlag=="on")
581 
582  //--------------------------
583  // Histogramming
584  //--------------------------
587 
588  //--------------------------
589  //connection to the analysis only for those detectors included!
590  //--------------------------
591  if (gActarSimROOTAnalysis) {
596  }
597 
598  //visibility
599  worldLog->SetVisAttributes (G4VisAttributes::Invisible);
600 
601  return worldPhys;
602 }
603 
604 ////////////////////////////////////////////////////////////////
605 /// Builds the SpecMAT geometry
606 ///
607 /// A-The World Volume is a box with user-specified dimensions
608 /// (default HALF LENGTHS are 1.0m x 1.0m x 1.0m defined in the constructor)
609 ///
610 /// B-The scattering chamber is .... still to be defined (tube or hexagonal prism)
611 ///
612 /// C-Hard-coded Sub-volumes and ancillaries:
613 ///
614 /// D-Optional sub-volumes and ancillaries:
615 /// -Gas volume (see ActarSimGasDetectorConstruction)
616 /// -Array of scintillation detectors (see ActarSimScintillatorDetectorConstruction)
617 ///
618 /// The Analysis is eventually configured according to the implemented geometry.
619 ///
620 /// Returns a pointer to the world's physical volume.
622  //--------------------------
623  //World Volume
624  //--------------------------
625 
626  solidWorld = new G4Box("World", //its name
627  worldSizeX,worldSizeY,worldSizeZ); //its size
628 
629  worldLog = new G4LogicalVolume(solidWorld, //its solid
630  mediumMaterial, //its material
631  "World"); //its name
632 
633  worldPhys = new G4PVPlacement(0, //no rotation
634  G4ThreeVector(), //at (0,0,0)
635  worldLog, //its logical volume
636  "World", //its name
637  0, //its mother volume
638  false, //no boolean operation
639  0); //copy number
640 
641  //--------------------------
642  //Scattering Chamber
643  //--------------------------
644 
645  //--------------------------
646  //Gas Volume
647  //--------------------------
648 
649  //--------------------------
650  //Array of scintillation detectors
651  //--------------------------
652 
653  return worldPhys;
654 }
655 
656 ////////////////////////////////////////////////////////////////
657 /// Builds the MAIKO geometry
658 ///
659 /// A-The World Volume is a box with FIXED (user settings overridden)
660 /// (HALF SIZES of 6.0m x 6.0m x 6.0m)
661 ///
662 /// B-The scattering chamber is a Box with user defined half-sizes
663 ///
664 /// C-Hard-coded Sub-volumes and ancillaries:
665 /// -Beam exit window
666 /// -Maiko ancillaries: silRingDet, sciRingDet, plaDet
667 ///
668 /// D-Optional sub-volumes and ancillaries:
669 /// -Gas volume (see ActarSimGasDetectorConstruction)
670 /// -DO WE KEEP Sci and Sil or are they included in the "Rings" ??????????????????
671 ///
672 /// The Analysis is eventually configured according to the implemented geometry.
673 ///
674 /// Returns a pointer to the world's physical volume.
676  //--------------------------
677  //World Volume
678  //--------------------------
679 
680  //Geometrical definition of the world, half sizes
681  //Hard coded geometry for the MAIKO detector (216 m^3 box!)
682  SetWorldSizeX(6.0*m);
683  SetWorldSizeY(6.0*m);
684  SetWorldSizeZ(6.0*m);
685 
686  //Build the World Volume
687  solidWorld = new G4Box("World", //its name
688  worldSizeX,worldSizeY,worldSizeZ); //its size
689 
690  worldLog = new G4LogicalVolume(solidWorld, //its solid
691  mediumMaterial, //its material
692  "World"); //its name
693 
694  worldPhys = new G4PVPlacement(0, //no rotation
695  G4ThreeVector(), //at (0,0,0)
696  worldLog, //its logical volume
697  "World", //its name
698  0, //its mother volume
699  false, //no boolean operation
700  0); //copy number
701 
702  //--------------------------
703  //Scattering Chamber
704  //--------------------------
705  G4Box* solidChamber = new G4Box("Chamber", //its name
707 
708  chamberLog = new G4LogicalVolume(solidChamber, //its solid
710  "Chamber"); //its name
711 
712  chamberPhys = new G4PVPlacement(0, //no rotation
713  G4ThreeVector(chamberCenterX,
716  chamberLog, //its logical volume
717  "Chamber", //its name
718  worldLog, //its mother volume
719  false, //no boolean operation
720  0);
721 
722  if(chamberPhys){;}
723 
724  //--------------------------
725  // Beam exit Window in Chamber
726  //--------------------------
727  G4double innerRadius = 0.*cm;
728  G4double outerRadius = 10.*cm;
729  G4double hz = 0.037*mm;
730  G4double startAngle = 0.*deg;
731  G4double spanningAngle = 360.*deg;
732 
733  G4VPhysicalVolume* mylarWin;
734 
735  G4Tubs* mwindow= new G4Tubs("mwindow",
736  innerRadius,
737  outerRadius,
738  hz,
739  startAngle,
740  spanningAngle);
741 
742  G4LogicalVolume* mwindowLog = new G4LogicalVolume(mwindow, //its solid
743  windowMaterial, //its material
744  "mwindow"); //its name
745 
746  mylarWin = new G4PVPlacement(0, //no rotation
747  G4ThreeVector(0,0,chamberSizeZ), //OLD G4ThreeVector(0,0,chamberSizeZ+zGasBoxPosition),
748  mwindowLog, //its logical volume
749  "mwindow", //its name
750  worldLog, //its mother volume
751  false, //no boolean operation
752  0); //copy number
753 
754  if(mylarWin){;}
755 
756  G4VisAttributes* mylarVisAtt = new G4VisAttributes(G4Colour(1.0,0.0,0.0));
757  mylarVisAtt->SetVisibility(true);
758  mwindowLog->SetVisAttributes(mylarVisAtt);
759 
760  //--------------------------
761  // Gas volume
762  //--------------------------
763  if(gasGeoIncludedFlag=="on")
765 
766  //--------------------------
767  // Sil volume
768  //--------------------------
769  if(silGeoIncludedFlag=="on")
771 
772  //--------------------------
773  // Sci volume
774  //--------------------------
775  if(sciGeoIncludedFlag=="on")
777 
778  //--------------------------
779  // Maiko ancillaries
780  //--------------------------
784 
785  // Histogramming
788 
789  //connection to the analysis only for those detectors included!
790  if (gActarSimROOTAnalysis) {
795  }
796 
797  //visibility
798  worldLog->SetVisAttributes (G4VisAttributes::Invisible);
799 
800  return worldPhys;
801 }
802 
803 ////////////////////////////////////////////////////////////////
804 /// Builds the Other geometries
805 ///
806 /// A-The World Volume is a box with user defined half sizes
807 ///
808 /// B-The scattering chamber is (to be defined)
809 ///
810 /// C-Hard-coded Sub-volumes and ancillaries: (none yet)
811 ///
812 /// D-Optional sub-volumes and ancillaries: (none yet)
813 ///
814 /// Returns a pointer to the world's physical volume.
816  //--------------------------
817  //World Volume
818  //--------------------------
819 
820  solidWorld = new G4Box("World", //its name
821  worldSizeX,worldSizeY,worldSizeZ); //its size
822 
823  worldLog = new G4LogicalVolume(solidWorld, //its solid
824  mediumMaterial, //its material
825  "World"); //its name
826 
827  worldPhys = new G4PVPlacement(0, //no rotation
828  G4ThreeVector(), //at (0,0,0)
829  worldLog, //its logical volume
830  "World", //its name
831  0, //its mother volume
832  false, //no boolean operation
833  0); //copy number
834 
835  //--------------------------
836  //Scattering Chamber
837  //--------------------------
838  // Chamber dimensions set by user
839 
840  G4Box* solidChamber = new G4Box("Chamber", //its name
842 
843  chamberLog = new G4LogicalVolume(solidChamber, //its solid
845  "Chamber"); //its name
846 
847  chamberPhys = new G4PVPlacement(0, //no rotation
848  G4ThreeVector(chamberCenterX,
851  chamberLog, //its logical volume
852  "Chamber", //its name
853  worldLog, //its mother volume
854  false, //no boolean operation
855  0);
856 
857  if(chamberPhys){;}
858 
859  //--------------------------
860  // Gas volume
861  //--------------------------
862  if(gasGeoIncludedFlag=="on")
864 
865  //--------------------------
866  // Sil volume
867  //--------------------------
868  if(silGeoIncludedFlag=="on")
870 
871  //--------------------------
872  // Sci volume
873  //--------------------------
874  if(sciGeoIncludedFlag=="on")
876 
877  //--------------------------
878  // Histogramming
879  //--------------------------
882 
883  //--------------------------
884  //Connection to the analysis only for those detectors included!
885  //--------------------------
886  if (gActarSimROOTAnalysis) {
891  }
892 
893  //visibility
894  worldLog->SetVisAttributes (G4VisAttributes::Invisible);
895 
896  return worldPhys;
897 }
898 
899 ////////////////////////////////////////////////////////////////
900 /// Print current detector parameters
902  G4cout << G4endl
903  << "##################################################################" << G4endl
904  << "## ActarSimDetectorConstruction::PrintDetectorParameters() " << G4endl
905  << "## " << G4endl
906  << "## Geometry FLAGS: " << G4endl
907  << "## -ACTARTPCGeoIncludedFlag : "<< ACTARTPCGeoIncludedFlag << G4endl
908  << "## -ACTARTPCDEMOGeoIncludedFlag: "<< ACTARTPCDEMOGeoIncludedFlag << G4endl
909  << "## -SpecMATGeoIncludedFlag : "<< SpecMATGeoIncludedFlag << G4endl
910  << "## -MaikoGeoIncludedFlag : "<< MaikoGeoIncludedFlag << G4endl
911  << "## -OthersGeoIncludedFlag : "<< OthersGeoIncludedFlag << G4endl
912  << "## Ancillary FLAGS: " << G4endl
913  << "## -gasGeoIncludedFlag : "<< gasGeoIncludedFlag << G4endl
914  << "## -silGeoIncludedFlag : "<< silGeoIncludedFlag << G4endl
915  << "## -sciGeoIncludedFlag : "<< sciGeoIncludedFlag << G4endl
916  << "## " << G4endl
917  << "## The medium material is: "<< G4endl << mediumMaterial << G4endl << G4endl << G4endl
918  << "## The chamber material is: "<< G4endl << chamberMaterial << G4endl << G4endl;
919  G4cout << G4endl << " The EM field applied has the following components:"
920  << G4endl << " Magnetic component: "
921  << emField->GetMagneticFieldValue().x() << " "
922  << emField->GetMagneticFieldValue().y() << " "
924  << G4endl << " Electric component: "
925  << emField->GetElectricFieldValue().x() << " "
926  << emField->GetElectricFieldValue().y() << " "
927  << emField->GetElectricFieldValue().z() << G4endl
928  << "##################################################################" << G4endl;
932  if (MaikoGeoIncludedFlag=="on") {
936  }
937  G4cout << "##################################################################" << G4endl << G4endl << G4endl;
938 }
939 
940 ////////////////////////////////////////////////////////////////
941 /// Sets the material the medium is made of
943  G4Material* pttoMaterial = G4Material::GetMaterial(mat);
944  if (pttoMaterial) mediumMaterial = pttoMaterial;
945 }
946 
947 ////////////////////////////////////////////////////////////////
948 /// Sets the default material
950  G4Material* pttoMaterial = G4Material::GetMaterial(mat);
951  if (pttoMaterial) defaultMaterial = pttoMaterial;
952 }
953 
954 ////////////////////////////////////////////////////////////////
955 /// Sets the material the chamber is made of (the same as GasBox)
957  //DefineMaterials();
958  G4Material* pttoMaterial = G4Material::GetMaterial(mat);
959  if (pttoMaterial) chamberMaterial = pttoMaterial;
960  //G4cout << " The chamber gas material is: " << chamberMaterial << G4endl;
961 }
962 
963 ////////////////////////////////////////////////////////////////
964 /// Sets the material the chamber is made of (the same as GasBox)
965 /// define by user (T and P)
967  chamberMaterial = mater;
968  //G4cout << " The chamber gas material is: " << chamberMaterial << G4endl;
969 }
970 
971 ////////////////////////////////////////////////////////////////
972 /// Sets the material the window is made of
974  G4Material* pttoMaterial = G4Material::GetMaterial(mat);
975  if (pttoMaterial) windowMaterial = pttoMaterial;
976 }
977 
978 ////////////////////////////////////////////////////////////////
979 /// Updates any change on the geometry of the detectors
981  G4RunManager::GetRunManager()->DefineWorldVolume(this->Construct());
982 }
983 
984 ////////////////////////////////////////////////////////////////
985 /// Setting the uniform EM field
988 }
989 
990 ////////////////////////////////////////////////////////////////
991 /// Define the materials to be used
992 /// (NOTE: it results impossible to define externally (via messenger)
993 /// the density of the gases, because the materials table is an static element
994 /// which remains constant from creation to the end of the program)
995 ///
996 /// Do we really need those definitions here?
998 
999  G4double a; // atomic mass
1000  G4double z; // atomic number
1001 
1002  G4Element* H = new G4Element("Hydrogen" ,"H" , z= 1., a= 1.00794*g/mole);
1003  //G4Element* D = new G4Element("Deuterium","D" , z= 1., a= 2.0140*g/mole);
1004  G4Element* He = new G4Element("Helium" ,"He", z= 2., a= 4.0026*g/mole);
1005  G4Element* C = new G4Element("Carbon" ,"C", z=6., a= 12.0107*g/mole);
1006  G4Element* N = new G4Element("Nitrogen" ,"N" , z= 7., a= 14.00674*g/mole);
1007  G4Element* O = new G4Element("Oxygen" ,"O" , z= 8., a= 15.9994*g/mole);
1008  G4Element* F = new G4Element("Fluorine" ,"F", z=9., a=18.9984032*g/mole);
1009  G4Element* Na = new G4Element("Sodium" ,"Na", z=11., a= 22.98977*g/mole);
1010  G4Element* S = new G4Element("Sulphur" ,"S", z=16., a= 32.066*g/mole);
1011  G4Element* Ar = new G4Element("Argon" ,"Ar", z=18., a= 39.9481*g/mole);
1012  G4Element* Zn = new G4Element("Zinc", "Zn", z=30., a= 65.39*g/mole);
1013  G4Element* Ge = new G4Element("Germanium","Ge", z=32., a= 72.61*g/mole);
1014  G4Element* Br = new G4Element("Bromine" ,"Br", z=35., a= 79.904*g/mole);
1015  G4Element* Cd = new G4Element("Cadmium" ,"Cd", z=48., a= 112.411*g/mole);
1016  G4Element* Te = new G4Element("Tellurium","Te", z=52., a= 127.60*g/mole);
1017  G4Element* I = new G4Element("Iodine" ,"I", z=53., a= 126.90447*g/mole);
1018  G4Element* Cs = new G4Element("Cesium" ,"Cs", z=55., a= 132.90545*g/mole);
1019  G4Element* Ba = new G4Element("Barium" ,"Ba", z=56., a= 137.327*g/mole);
1020  G4Element* La = new G4Element("Lanthanum","La", z=57., a= 138.9055*g/mole);
1021  G4Element* Ce = new G4Element("Cerium" ,"Ce", z=58., a= 140.116*g/mole);
1022  G4Element* Lu = new G4Element("Lutecium" ,"Lu", z=71., a= 174.967*g/mole);
1023  G4Element* W = new G4Element("Tungsten" ,"W" , z=74., a= 183.84*g/mole);
1024  G4Element* Pb = new G4Element("Lead" ,"Pb", z=82., a= 207.20*g/mole);
1025  G4Element* Bi = new G4Element("Bismuth" ,"Bi", z=83., a= 208.98038*g/mole);
1026 
1027  //
1028  // define materials
1029  //
1030  G4double density, pressure, temperature;
1031  G4int ncomponents, natoms;
1032  G4double fractionmass;
1033 
1034  G4Material* Al =
1035  new G4Material("Aluminium", z= 13., a= 26.98*g/mole, density= 2.7*g/cm3);
1036 
1037  G4Material* Cu =
1038  new G4Material("Copper", z= 29., a= 63.546*g/mole, density= 8.96*g/cm3);
1039 
1040  if(Al){;}
1041  if(Cu){;}
1042 
1043  G4Material* Vacuum =
1044  new G4Material("Galactic", z=1., a=1.01*g/mole,density= universe_mean_density,
1045  kStateGas, 3.e-18*pascal, 2.73*kelvin);
1046  Vacuum->SetChemicalFormula("NOMATTER");
1047 
1048  density =0.0688*mg/cm3;
1049  pressure =0.3*bar;
1050  temperature =298.2*kelvin;
1051  G4Material* HeCF4300=
1052  new G4Material("HeCF4_300", density,ncomponents=3,kStateGas, temperature, pressure);
1053  HeCF4300->AddElement (He,natoms=98);
1054  HeCF4300->AddElement (C,natoms=2);
1055  HeCF4300->AddElement (F,natoms=8);
1056 
1057  density =0.1376*mg/cm3;
1058  pressure =0.6*bar;
1059  temperature =298.2*kelvin;
1060  G4Material* HeCF4600=
1061  new G4Material("HeCF4_600", density,ncomponents=3,kStateGas, temperature, pressure);
1062  HeCF4600->AddElement (He,natoms=98);
1063  HeCF4600->AddElement (C,natoms=2);
1064  HeCF4600->AddElement (F,natoms=8);
1065 
1066  density =0.1835*mg/cm3;
1067  pressure =0.8*bar;
1068  temperature =298.2*kelvin;
1069  G4Material* HeCF4800=
1070  new G4Material("HeCF4_800", density,ncomponents=3,kStateGas, temperature, pressure);
1071  HeCF4800->AddElement (He,natoms=98);
1072  HeCF4800->AddElement (C,natoms=2);
1073  HeCF4800->AddElement (F,natoms=8);
1074 
1075  density =0.2521*mg/cm3;
1076  pressure =1.1*bar;
1077  temperature =298.2*kelvin;
1078  G4Material* HeCF41100=
1079  new G4Material("HeCF4_1100", density,ncomponents=3,kStateGas, temperature, pressure);
1080  HeCF41100->AddElement (He,natoms=98);
1081  HeCF41100->AddElement (C,natoms=2);
1082  HeCF41100->AddElement (F,natoms=8);
1083 
1084  density =1.818*mg/cm3;
1085  pressure =1.1*bar;
1086  temperature =298.2*kelvin;
1087  G4Material* ArCF41100=
1088  new G4Material("ArCF4_1100", density,ncomponents=3,kStateGas, temperature, pressure);
1089  ArCF41100->AddElement (Ar,natoms=98);
1090  ArCF41100->AddElement (C,natoms=2);
1091  ArCF41100->AddElement (F,natoms=8);
1092 
1093  //////////////////////////////////////////////
1094  //Air (STP: 1.290*mg/cm3)
1095  density = 1.290*mg/cm3;
1096  G4Material* Air =
1097  new G4Material("Air", density, ncomponents=2);
1098  Air->AddElement(N, fractionmass=70.*perCent);
1099  Air->AddElement(O, fractionmass=30.*perCent);
1100 
1101  //Methane (default 0.7174*mg/cm3 STP)
1102  density = 0.7174*mg/cm3;
1103  G4Material* methane =
1104  new G4Material("CH4", density, ncomponents=2) ;
1105  methane->AddElement(C,1);
1106  methane->AddElement(H,4);
1107 
1108  //Propane (default 2.005*mg/cm3 STP)
1109  density = 2.005*mg/cm3;
1110  G4Material* propane =
1111  new G4Material("C3H8", density, ncomponents=2) ;
1112  propane->AddElement(C,3);
1113  propane->AddElement(H,8);
1114 
1115  G4Material* H2O =
1116  new G4Material("Water", density= 1.000*g/cm3, ncomponents=2);
1117  H2O->AddElement(H, natoms=2);
1118  H2O->AddElement(O, natoms=1);
1119  H2O->SetChemicalFormula("H_2O");
1120  H2O->GetIonisation()->SetMeanExcitationEnergy(75.0*eV);
1121 
1122  G4Material* BGO =
1123  new G4Material("BGO", density= 7.10*g/cm3, ncomponents=3);
1124  BGO->AddElement(O , natoms=12);
1125  BGO->AddElement(Ge, natoms= 3);
1126  BGO->AddElement(Bi, natoms= 4);
1127 
1128  G4Material* SodiumIodine =
1129  new G4Material("NaI",density= 3.67*g/cm3,ncomponents=2);
1130  SodiumIodine->AddElement(Na , natoms=1);
1131  SodiumIodine->AddElement(I , natoms=1);
1132 
1133  G4Material* BariumFluoride =
1134  new G4Material("BaF",density= 4.89*g/cm3,ncomponents=2);
1135  BariumFluoride->AddElement(Ba , natoms=1);
1136  BariumFluoride->AddElement(F , natoms=2);
1137 
1138  G4Material* CesiumIodine=
1139  new G4Material("CsI",density= 4.51*g/cm3,ncomponents=2);
1140  CesiumIodine->AddElement(Cs, natoms=1);
1141  CesiumIodine->AddElement(I, natoms=1);
1142 
1143  G4Material* CeriumFluoride =
1144  new G4Material("CeF3",density= 6.16*g/cm3,ncomponents=2);
1145  CeriumFluoride->AddElement(Ce , natoms=1);
1146  CeriumFluoride->AddElement(F , natoms=3);
1147 
1148  G4Material* LantanumBromide =
1149  new G4Material("LaBr3",density= 5.29*g/cm3,ncomponents=2);
1150  LantanumBromide->AddElement(La , natoms=1);
1151  LantanumBromide->AddElement(Br , natoms=3);
1152 
1153  G4Material* LSO=
1154  new G4Material("LSO",density= 7.4*g/cm3,ncomponents=3);
1155  LSO->AddElement(Lu , natoms=2);
1156  LSO->AddElement(S , natoms=1);
1157  LSO->AddElement(O , natoms=5);
1158 
1159  G4Material* CdZnTe=
1160  new G4Material("CdZnTe",density= 5.78*g/cm3 ,ncomponents=3);
1161  CdZnTe->AddElement(Cd, natoms=9);
1162  CdZnTe->AddElement(Zn, natoms=1);
1163  CdZnTe->AddElement(Te, natoms=10);
1164 
1165  G4Material* PWO=
1166  new G4Material("PWO",density= 8.28*g/cm3 ,ncomponents=3);
1167  PWO->AddElement(Pb, natoms=1);
1168  PWO->AddElement(W, natoms=1);
1169  PWO->AddElement(O, natoms=4);
1170 
1171  //Mylar
1172  G4Material* mylar=new G4Material("Mylar",density= 1.4*g/cm3,ncomponents=3);
1173  mylar -> AddElement(H,0.042);
1174  mylar -> AddElement(C,0.625);
1175  mylar -> AddElement(O,0.333);
1176 
1177  G4Material* Scint = new G4Material("BC408", density= 1.032*g/cm3, ncomponents=2);
1178  Scint->AddElement(C, natoms=9);
1179  Scint->AddElement(H, natoms=10);
1180 
1181  new G4Material("Silicon" , z=14., a= 28.09*g/mole, density= 2.330*g/cm3);
1182 
1183  new G4Material("Germanium" , z=32., a= 72.61*g/mole, density= 5.323*g/cm3);
1184 
1185  new G4Material("Iron" , z=26., a= 55.85*g/mole, density= 7.870*g/cm3);
1186 
1187  new G4Material("Tungsten" , z=74., a=183.85*g/mole, density= 19.30*g/cm3);
1188 
1189  new G4Material("Lead" , z=82., a=207.19*g/mole, density= 11.35*g/cm3);
1190 
1191  new G4Material("Uranium" , z=92., a=238.03*g/mole, density= 18.95*g/cm3);
1192 
1193  //
1194  //materials printout
1195  //
1196  // G4cout << *(G4Material::GetMaterialTable()) << G4endl;
1197 
1198  //default materials of the World
1199  defaultMaterial = Vacuum;
1200 }
1201 
1202 ////////////////////////////////////////////////////////////////
1203 /// Setting the uniform electric field vector
1204 ///
1205 /// ATT to the units! There is no elec field unit defined in the
1206 /// program by default!!! I had problems defining the electric
1207 /// field units... Data is supposed to come in kV/cm from the
1208 /// messenger, but... what is the input unit for GEANT4 in the
1209 /// class G4ElectroMagneticField? Not clear to me...
1210 void ActarSimDetectorConstruction::SetEleField(G4ThreeVector eVector){
1211  eField = eVector;
1212 }
1213 
1214 ////////////////////////////////////////////////////////////////
1215 /// Setting the uniform magnetic field vector
1216 void ActarSimDetectorConstruction::SetMagField(G4ThreeVector mVector){
1217  mField = mVector;
1218 }
void SetMagField(G4ThreeVector mVector)
Setting the uniform magnetic field vector.
G4String silGeoIncludedFlag
Control variable for including the silicons.
G4String gasGeoIncludedFlag
Control variable for including a gas volume.
G4String ACTARTPCDEMOGeoIncludedFlag
Control variable for including ACTARTPCDEMO.
ActarSimSilDetectorConstruction * silDet
Pointer to recoil silicon constructor.
G4String SpecMATGeoIncludedFlag
Control variable for including SpecMAT.
G4VPhysicalVolume * DiamondPhys
Pointer to physical Diamond detector.
G4VPhysicalVolume * Construct(G4LogicalVolume *)
Wrap for the construction function.
G4ThreeVector GetMagneticFieldValue()
Returns the uniform magnetic field value.
G4double chamberCenterZ
Chamber Z Center.
G4ThreeVector mField
Magnetic field vector.
void PrintDetectorParameters()
Prints Gas volume detector parameters.
ActarSimPlaSD * plaSD
Pointer to plastic sensitive detector.
G4String sciGeoIncludedFlag
Control variable for including the scintillators.
void PrintDetectorParameters()
Prints Scintillator detector parameters. To be filled.
G4VPhysicalVolume * Construct(G4LogicalVolume *)
Wrap for the construction function within the Silicon.
G4ThreeVector GetElectricFieldValue()
Returns the uniform electric field value.
ActarSimSciSD * sciSD
Pointer to scintillator sensitive detector.
ActarSimSilRingDetectorConstruction * silRingDet
Pointer to silRing for MAIKO constructor.
G4VPhysicalVolume * Construct(G4LogicalVolume *)
Wrap for the construction functions.
G4double chamberCenterY
Chamber Y Center.
G4LogicalVolume * DiamondLog
Pointer to logic Diamond detector.
ActarSimSilRingSD * silRingSD
Pointer to silicon ring sensitive detector.
G4Material * windowMaterial
Pointer to the window material.
G4double worldSizeY
World Y half-lengths (always centered at (0,0,0))
ActarSimDetectorMessenger * detectorMessenger
Pointer to the Messenger.
G4VPhysicalVolume * chamberPhys
Pointer to physical chamber.
G4VPhysicalVolume * SupportPhys
Pointer to physical CageField support.
G4VPhysicalVolume * Construct(G4LogicalVolume *)
Wrap for the construction functions within the TOF.
G4VPhysicalVolume * Construct(G4LogicalVolume *)
Wrap for the construction functions.
G4double worldSizeZ
World Z half-lengths (always centered at (0,0,0))
G4Material * defaultMaterial
Pointer to the default material.
G4VPhysicalVolume * AlplatePhys
Pointer to physical Al plate.
ActarSimGasDetectorConstruction * gasDet
Pointer to target constructor.
void SetChamberMaterial(G4String)
Sets the material the chamber is made of (the same as GasBox)
G4LogicalVolume * AlplateLog
Pointer to logic aluminium plate.
G4VPhysicalVolume * worldPhys
Pointer to physical world.
G4String OthersGeoIncludedFlag
Control variable for including other geometries.
G4double worldSizeX
World X half-lengths (always centered at (0,0,0))
void SetWindowMaterial(G4String)
Sets the material the window is made of.
G4double chamberCenterX
Chamber X Center.
G4double chamberSizeX
Chamber X half-lengths.
G4ThreeVector eField
Electric field vector.
ActarSimPlaDetectorConstruction * plaDet
Pointer to Hodoscope constructor.
G4LogicalVolume * worldLog
Pointer to logic world.
G4Material * mediumMaterial
Pointer to the medium material.
void PrintDetectorParameters()
Prints Scintillator detector parameters.
ActarSimSciRingDetectorConstruction * sciRingDet
Pointer to sciRing for MAIKO constructor.
void Construct(const G4VPhysicalVolume *)
Things to do while contructing...
G4VPhysicalVolume * Construct(G4LogicalVolume *)
Wrap for the construction functions within the TOF.
G4LogicalVolume * chamberLog
Pointer to logic chamber.
ActarSimROOTAnalysis * gActarSimROOTAnalysis
Global pointer to this soliton.
G4String ACTARTPCGeoIncludedFlag
Control variable for including ACTARTPC.
ActarSimSciRingSD * sciRingSD
Pointer to scintillator ring sensitive detector.
G4String MaikoGeoIncludedFlag
Control variable for including MAIKO.
void UpdateGeometry()
Updates any change on the geometry of the detectors.
void PrintDetectorParameters()
Prints Scintillator detector parameters. To be filled.
void PrintDetectorParameters()
Prints Scintillator detector parameters. To be filled.
void SetMediumMaterial(G4String)
Sets the material the medium is made of.
G4double chamberSizeY
Chamber Y half-lengths.
void PrintDetectorParameters()
Print current detector parameters.
G4LogicalVolume * SupportLog
Pointer to logic CageField support.
ActarSimSciDetectorConstruction * sciDet
Pointer to scintillator constructor.
ActarSimSilSD * silSD
Pointer to silicon sensitive detector.
ActarSimDetectorConstruction()
Constructor: initialize all variables, materials and pointers.
void PrintDetectorParameters()
Prints Scintillator detector parameters. TODO: To be filled.
void SetDefaultMaterial(G4String)
Sets the default material.
void UpdateEMField()
Setting the uniform EM field.
G4double chamberSizeZ
Chamber Z half-lengths.
G4Material * chamberMaterial
Pointer to the chamber material.
ActarSimUniformEMField * emField
Pointer to the uniform em. field.
void SetFieldValue(const G4ThreeVector magFieldVector, const G4ThreeVector elecFieldVector)
Set the value of the Global Field to fieldVector along Y.
ActarSimGasSD * gasSD
Pointer to gas sensitive detector.