CaptExposedBuilder.cc
Go to the documentation of this file.
1 #include "CaptExposedBuilder.hh"
2 
3 #include "EDepSimBuilder.hh"
4 
5 #include "EDepSimLog.hh"
6 
7 #include <globals.hh>
8 #include <G4Material.hh>
9 #include <G4LogicalVolume.hh>
10 #include <G4VPhysicalVolume.hh>
11 #include <G4PVPlacement.hh>
12 #include <G4VisAttributes.hh>
13 #include <G4Tubs.hh>
14 #include <G4Polyhedra.hh>
15 
16 #include <G4SystemOfUnits.hh>
17 #include <G4PhysicalConstants.hh>
18 
20  : public EDepSim::BuilderMessenger {
21 private:
23 
24 public:
26  : EDepSim::BuilderMessenger(c,"Control the exposed geometry."),
27  fBuilder(c) {
28 
29  };
30 
32  };
33 
34  void SetNewValue(G4UIcommand *cmd, G4String val) {
36  };
37 };
38 
40  SetMessenger(new CaptExposedMessenger(this));
41 
42 }
43 
45 
47  double radius = 2*CLHEP::cm;
48  return radius;
49 }
50 
52  return 1*CLHEP::cm;
53 }
54 
55 G4LogicalVolume *CaptExposedBuilder::GetPiece(void) {
56 
57  G4LogicalVolume* logVolume
58  = new G4LogicalVolume(new G4Tubs(GetName(),
59  0.0, GetRadius(), GetHeight()/2,
61  FindMaterial("Argon_Gas"),
62  GetName());
63  logVolume->SetVisAttributes(GetColor(logVolume));
64 
65  G4ThreeVector center(0.0,0.0,-GetHeight()/2);
66  fOffset = center;
67 
68  /// All the space above the drift region.
69  center += G4ThreeVector(0.0,0.0,0.0);
70 
71  return logVolume;
72 }
static constexpr double cm
Definition: Units.h:68
double GetHeight()
Get the height of the exposed region. This is calculated.
double GetRadius()
Get the radius of the exposed region. This is calculated.
CaptExposedBuilder * fBuilder
void SetNewValue(G4UIcommand *cmd, G4String val)
void SetNewValue(G4UIcommand *cmd, G4String val)
Construct a module from components.
Definition: TG4HitSegment.h:10
BuilderMessenger(EDepSim::Builder *c, const char *guide=NULL)
CaptExposedMessenger(CaptExposedBuilder *c)
def center(depos, point)
Definition: depos.py:117
virtual G4LogicalVolume * GetPiece(void)
static constexpr double degree
Definition: Units.h:161
list cmd
Definition: getreco.py:22