Public Member Functions | Private Member Functions | Private Attributes | List of all members
CaptImmersedBuilder Class Reference

#include <CaptImmersedBuilder.hh>

Inheritance diagram for CaptImmersedBuilder:
EDepSim::Builder

Public Member Functions

 CaptImmersedBuilder (G4String name, EDepSim::Builder *parent)
 
virtual ~CaptImmersedBuilder ()
 
virtual G4LogicalVolume * GetPiece (void)
 
G4ThreeVector GetOffset ()
 
double GetRadius ()
 Get the radius of the exposed region. This is calculated. More...
 
double GetHeight ()
 Get the height of the exposed region. This is calculated. More...
 
- Public Member Functions inherited from EDepSim::Builder
 Builder (G4String n, EDepSim::UserDetectorConstruction *c)
 
 Builder (G4String n, EDepSim::Builder *parent)
 
virtual ~Builder ()
 
G4String GetName (void)
 Return the base name of the object that this builds. More...
 
G4String GetLocalName (void)
 Return the base name of the object that this builds. More...
 
void SetLocalName (const G4String &name)
 Set the base name of the logical volume that this builds. More...
 
void SetOpacity (double v)
 Set the relative opacity of the constructed object. More...
 
double GetOpacity (void) const
 Get the relative opacity of the constructed object. More...
 
void SetDaughterOpacity (double v)
 Set the relative opacity of the object daughters. More...
 
EDepSim::UserDetectorConstructionGetConstruction (void)
 Return the detector construction that is building this piece. More...
 
virtual void SetSensitiveDetector (G4VSensitiveDetector *s)
 Set the sensitive detector for this component. More...
 
virtual G4VSensitiveDetector * GetSensitiveDetector (void)
 Get the sensitive detector for this component. More...
 
virtual void SetSensitiveDetector (G4String name, G4String type)
 Set the sensitive detector for this component by name. More...
 
virtual void SetMaximumHitSagitta (double sagitta)
 
virtual void SetMaximumHitLength (double length)
 Set the maximum length of a single hit segment. More...
 
G4UImessenger * GetMessenger (void)
 Return the messenger for this constructor. More...
 
void SetMessenger (G4UImessenger *m)
 Set the messenger for this constructor. More...
 
void AddBuilder (EDepSim::Builder *c)
 
template<class T >
T & Get (G4String n)
 
template<class T >
T * Find (G4String n)
 
bool Check ()
 
void SetCheck (bool v)
 Set the check value. More...
 

Private Member Functions

void Init (void)
 

Private Attributes

G4ThreeVector fOffset
 

Additional Inherited Members

- Protected Member Functions inherited from EDepSim::Builder
G4Material * FindMaterial (G4String m)
 
G4VisAttributes GetColor (G4LogicalVolume *volume, double opacity=0.0)
 
G4VisAttributes GetColor (G4Material *volume, double opacity=0.0)
 

Detailed Description

Construct the exposed part of the CAPTAIN detector. This builds exposed parts of the TPC that are in the argon gas. The exposed volume is returned as a cylinder filled with liquid argon.

Definition at line 12 of file CaptImmersedBuilder.hh.

Constructor & Destructor Documentation

CaptImmersedBuilder::CaptImmersedBuilder ( G4String  name,
EDepSim::Builder parent 
)
inline

Definition at line 14 of file CaptImmersedBuilder.hh.

15  : EDepSim::Builder(name,parent) {Init();};
static QCString name
Definition: declinfo.cpp:673
CaptImmersedBuilder::~CaptImmersedBuilder ( )
virtual

Definition at line 54 of file CaptImmersedBuilder.cc.

54 {}

Member Function Documentation

double CaptImmersedBuilder::GetHeight ( )

Get the height of the exposed region. This is calculated.

Definition at line 62 of file CaptImmersedBuilder.cc.

62  {
63  CaptDriftRegionBuilder& drift = Get<CaptDriftRegionBuilder>("Drift");
64  double height = drift.GetHeight();
65  return height;
66 }
double GetHeight()
Get the total height of the drift region.
G4ThreeVector CaptImmersedBuilder::GetOffset ( )
inline

Return the offset of the intended origin of the volume relative to the center of the logical volume. To get the origin at the right location (say originPosition), the logical volume should be positioned at originPosition-GetOffset(). The offset is defined by the bottom of the wire plane assembly (a decision will be made in the future as to whether this is the bottom of the grid, or the bottom of the V plane. This means that the wires for the V plane are at a (very) small positive z coordinate.

Definition at line 32 of file CaptImmersedBuilder.hh.

32 {return fOffset;}
G4LogicalVolume * CaptImmersedBuilder::GetPiece ( void  )
virtual

Construct and return a G4 volume for the object. This is a pure virtual function, which means it must be implemented by the inheriting classes. This returns an unplaced logical volume which faces along the Z axis.

All the space above the drift region.

Implements EDepSim::Builder.

Definition at line 68 of file CaptImmersedBuilder.cc.

68  {
69 
70  G4LogicalVolume* logVolume
71  = new G4LogicalVolume(new G4Tubs(GetName(),
72  0.0, GetRadius(), GetHeight()/2,
74  FindMaterial("Argon_Liquid"),
75  GetName());
76  logVolume->SetVisAttributes(GetColor(logVolume));
77  if (GetSensitiveDetector()) {
78  logVolume->SetSensitiveDetector(GetSensitiveDetector());
79  }
80 
81  G4ThreeVector center(0.0,0.0,GetHeight()/2);
82 
83  /// All the space above the drift region.
84  center -= G4ThreeVector(0.0,0.0,0.0);
85 
86  // Put in the drift region.
87  CaptDriftRegionBuilder& drift = Get<CaptDriftRegionBuilder>("Drift");
88  G4LogicalVolume* logDrift = drift.GetPiece();
89  center -= G4ThreeVector(0.0,0.0,drift.GetHeight()/2);
90  fOffset = center + drift.GetOffset();
91  new G4PVPlacement(NULL, // rotation.
92  center, // position
93  logDrift, // logical volume
94  logDrift->GetName(), // name
95  logVolume, // mother volume
96  false, // (not used)
97  0, // Copy number (zero)
98  Check()); // Check overlaps.
99 
100 
101  // Put in the field cage.
102  double fieldInner[] = {drift.GetApothem()+10*CLHEP::mm, drift.GetApothem()+10*CLHEP::mm};
103  double fieldOuter[] = {drift.GetApothem()+13*CLHEP::mm, drift.GetApothem()+13*CLHEP::mm};
104  double fieldPlane[] = {-drift.GetHeight()/2,
105  drift.GetHeight()/2-drift.GetGridPlaneOffset()};
106 
107  G4LogicalVolume *logFieldCage
108  = new G4LogicalVolume(new G4Polyhedra(GetName()+"/FieldCage",
110  6, 2,
111  fieldPlane,
112  fieldInner, fieldOuter),
113  FindMaterial("FR4_Copper"),
114  GetName()+"/FieldCage");
115  logFieldCage->SetVisAttributes(GetColor(logFieldCage));
116 
117  new G4PVPlacement(NULL, // rotation.
118  center, // position
119  logFieldCage, // logical volume
120  logFieldCage->GetName(), // name
121  logVolume, // mother volume
122  false, // (not used)
123  0, // Copy number (zero)
124  Check()); // Check overlaps.
125 
126  return logVolume;
127 }
G4String GetName(void)
Return the base name of the object that this builds.
double GetHeight()
Get the total height of the drift region.
double GetGridPlaneOffset()
Get the offset of the grid from the top of the drift region.
virtual G4VSensitiveDetector * GetSensitiveDetector(void)
Get the sensitive detector for this component.
G4Material * FindMaterial(G4String m)
virtual G4LogicalVolume * GetPiece(void)
double GetRadius()
Get the radius of the exposed region. This is calculated.
def center(depos, point)
Definition: depos.py:117
G4VisAttributes GetColor(G4LogicalVolume *volume, double opacity=0.0)
static constexpr double mm
Definition: Units.h:65
static constexpr double degree
Definition: Units.h:161
double GetHeight()
Get the height of the exposed region. This is calculated.
double CaptImmersedBuilder::GetRadius ( )

Get the radius of the exposed region. This is calculated.

Definition at line 56 of file CaptImmersedBuilder.cc.

56  {
57  CaptDriftRegionBuilder& drift = Get<CaptDriftRegionBuilder>("Drift");
58  double radius = drift.GetRadius() + 2*CLHEP::cm;
59  return radius;
60 }
static constexpr double cm
Definition: Units.h:68
void CaptImmersedBuilder::Init ( void  )
private

Set the drift region parameters for CAPTAIN.

Definition at line 41 of file CaptImmersedBuilder.cc.

41  {
43  SetSensitiveDetector("cryo","segment");
44 
45  AddBuilder(new CaptDriftRegionBuilder("Drift",this));
46 
47  /// Set the drift region parameters for CAPTAIN.
48  CaptDriftRegionBuilder& drift = Get<CaptDriftRegionBuilder>("Drift");
49  drift.SetApothem(1037.5*CLHEP::mm);
50  drift.SetDriftLength(1000*CLHEP::mm);
51  drift.SetWirePlaneSpacing(3.18*CLHEP::mm);
52 }
void SetMessenger(G4UImessenger *m)
Set the messenger for this constructor.
void SetWirePlaneSpacing(double v)
Set the spacing between the wire planes.
void AddBuilder(EDepSim::Builder *c)
virtual void SetSensitiveDetector(G4VSensitiveDetector *s)
Set the sensitive detector for this component.
static constexpr double mm
Definition: Units.h:65

Member Data Documentation

G4ThreeVector CaptImmersedBuilder::fOffset
private

The offset of the exposed part of the TPC. This is calculated during GetPiece.

Definition at line 45 of file CaptImmersedBuilder.hh.


The documentation for this class was generated from the following files: