MiniCaptExposedBuilder.cc
Go to the documentation of this file.
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 
30 
31  void SetNewValue(G4UIcommand *cmd, G4String val) {
33  };
34 };
35 
37  SetMessenger(new MiniCaptExposedMessenger(this));
38 }
39 
41 
43  return 65*CLHEP::cm;
44 }
45 
47  return 3*CLHEP::cm;
48 }
49 
50 G4LogicalVolume *MiniCaptExposedBuilder::GetPiece(void) {
51 
52 #ifdef MAKE_EMPTY_EXPOSED
53  G4LogicalVolume* logVolume
54  = new G4LogicalVolume(new G4Tubs(GetName(),
55  0.0, GetRadius(), GetHeight()/2,
56  0*degree, 360*degree),
57  FindMaterial("Argon_Gas"),
58  GetName());
59  logVolume->SetVisAttributes(GetColor(logVolume));
60 
61  G4ThreeVector center(0.0,0.0,-GetHeight()/2);
62  fOffset = center;
63 
64  /// All the space above the drift region.
65  center += G4ThreeVector(0.0,0.0,0.0);
66 #else
67  G4LogicalVolume* logVolume = NULL;
68 #endif
69 
70  return logVolume;
71 }
static constexpr double cm
Definition: Units.h:68
void SetNewValue(G4UIcommand *cmd, G4String val)
MiniCaptExposedMessenger(MiniCaptExposedBuilder *c)
double GetHeight()
Get the height of the exposed region. This is calculated.
void SetNewValue(G4UIcommand *cmd, G4String val)
Construct a module from components.
Definition: TG4HitSegment.h:10
BuilderMessenger(EDepSim::Builder *c, const char *guide=NULL)
MiniCaptExposedBuilder * fBuilder
def center(depos, point)
Definition: depos.py:117
double GetRadius()
Get the radius of the exposed region. This is calculated.
static constexpr double degree
Definition: Units.h:161
list cmd
Definition: getreco.py:22
virtual G4LogicalVolume * GetPiece(void)