#include <EDepSimModuleBuilder.hh>
Public Member Functions | |
ModuleBuilder (G4String n, EDepSim::UserDetectorConstruction *c) | |
ModuleBuilder (G4String n, EDepSim::Builder *p) | |
virtual | ~ModuleBuilder () |
virtual G4LogicalVolume * | GetPiece (void) |
void | SetWidth (double w) |
Set the width of the module. This is the X dimension of the module. More... | |
double | GetWidth (void) |
Get the width of the module. More... | |
void | SetHeight (double w) |
Set the height of the module. This is the Y dimension of the module. More... | |
double | GetHeight (void) |
Get the height of the module. More... | |
double | GetLength (void) |
Get the length of the module. More... | |
void | ClearComponentList (void) |
Clear the list of components to be added to the FG tracker. More... | |
void | AddComponent (G4String m) |
void | SetRepetitions (int r, int c) |
void | SetModuleCompTrans (int m, int cPerM, int c, double transX, double transY) |
void | SetTargetLength (double w) |
double | GetTargetLength (void) |
Get the target length of the module bounding box. More... | |
void | SetFixLength (bool f) |
Set flag to accept the TargetLength as the actual module length. More... | |
bool | GetFixLength (void) |
Get flag to accept the TargetLength as the actual module length. More... | |
void | SetXPosition (double x) |
Set x position at which components are positioned inside the module. More... | |
double | GetXPosition () |
Get x position at which components are positioned inside the module. More... | |
void | SetYPosition (double y) |
Set y position at which components are positioned inside the module. More... | |
double | GetYPosition () |
Get y position at which components are positioned inside the module. More... | |
double | GetXmaxTranslation () |
Get the maximum positive x translation parameter among the modules. More... | |
double | GetXminTranslation () |
Get the minimum negative x translation parameter among the modules. More... | |
double | GetYmaxTranslation () |
Get the maximum positive y translation parameter among the modules. More... | |
double | GetYminTranslation () |
Get the minimum negative y translation parameter among the modules. 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::UserDetectorConstruction * | GetConstruction (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 Types | |
typedef std::vector< EDepSim::ComponentBuilder * > | PartsList |
A vector of ComponentBuilders that will be added to the module. More... | |
typedef std::vector< std::pair< double, double > > | TransList |
Private Member Functions | |
void | Init (void) |
Private Attributes | |
double | fWidth |
The width of the module. More... | |
double | fHeight |
The height of the module. More... | |
double | fLength |
The length of the module. More... | |
double | fTargetLength |
bool | fFixLength |
Logical flag to accept the target length as the module length. More... | |
double | xPosition |
The x position at which components are positioned inside the module. More... | |
double | yPosition |
The y position at which components are positioned inside the module. More... | |
std::pair< double, double > | fPair |
Default pair of translation constants. More... | |
PartsList * | fPartsList |
TransList * | fTransList |
G4double | xmax |
Collect the minimum and maximum of translations in x and y. More... | |
G4double | xmin |
G4double | ymax |
G4double | ymin |
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) |
Definition at line 16 of file EDepSimModuleBuilder.hh.
|
private |
A vector of ComponentBuilders that will be added to the module.
Definition at line 128 of file EDepSimModuleBuilder.hh.
|
private |
A vector of translation parameters in x and y for each component in the module. Used in parallel with fPartsList (same number of entries as fPartsList)
Definition at line 134 of file EDepSimModuleBuilder.hh.
|
inline |
Definition at line 20 of file EDepSimModuleBuilder.hh.
|
inline |
Definition at line 23 of file EDepSimModuleBuilder.hh.
|
virtual |
Definition at line 19 of file EDepSimModuleBuilder.cc.
void EDepSim::ModuleBuilder::AddComponent | ( | G4String | m | ) |
Add a new component name to the FG tracker. Components are added from upstream (-Z) to downstream (+Z).
Definition at line 136 of file EDepSimModuleBuilder.cc.
void EDepSim::ModuleBuilder::ClearComponentList | ( | void | ) |
Clear the list of components to be added to the FG tracker.
Definition at line 132 of file EDepSimModuleBuilder.cc.
|
inline |
Get flag to accept the TargetLength as the actual module length.
Definition at line 79 of file EDepSimModuleBuilder.hh.
|
inline |
Get the height of the module.
Definition at line 43 of file EDepSimModuleBuilder.hh.
|
inline |
Get the length of the module.
Definition at line 46 of file EDepSimModuleBuilder.hh.
|
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.
Position all of the sub volumes.
Create the volume for the envelope.
Implements EDepSim::Builder.
Definition at line 51 of file EDepSimModuleBuilder.cc.
|
inline |
Get the target length of the module bounding box.
Definition at line 74 of file EDepSimModuleBuilder.hh.
|
inline |
Get the width of the module.
Definition at line 38 of file EDepSimModuleBuilder.hh.
|
inline |
Get the maximum positive x translation parameter among the modules.
Definition at line 92 of file EDepSimModuleBuilder.hh.
|
inline |
Get the minimum negative x translation parameter among the modules.
Definition at line 94 of file EDepSimModuleBuilder.hh.
|
inline |
Get x position at which components are positioned inside the module.
Definition at line 84 of file EDepSimModuleBuilder.hh.
|
inline |
Get the maximum positive y translation parameter among the modules.
Definition at line 96 of file EDepSimModuleBuilder.hh.
|
inline |
Get the minimum negative y translation parameter among the modules.
Definition at line 98 of file EDepSimModuleBuilder.hh.
|
inline |
Get y position at which components are positioned inside the module.
Definition at line 89 of file EDepSimModuleBuilder.hh.
|
private |
Definition at line 30 of file EDepSimModuleBuilder.cc.
|
inline |
Set flag to accept the TargetLength as the actual module length.
Definition at line 77 of file EDepSimModuleBuilder.hh.
|
inline |
Set the height of the module. This is the Y dimension of the module.
Definition at line 41 of file EDepSimModuleBuilder.hh.
void EDepSim::ModuleBuilder::SetModuleCompTrans | ( | int | m, |
int | cPerM, | ||
int | c, | ||
double | transX, | ||
double | transY | ||
) |
Translate some components inside the module in X/Y according to module number and total components in a module. This simulates misalignment in FGD layers.
Definition at line 183 of file EDepSimModuleBuilder.cc.
void EDepSim::ModuleBuilder::SetRepetitions | ( | int | r, |
int | c | ||
) |
Set the number of repetitions for the last components added to the module. This counts the total repetitions of the last component, inclduing that component. So "1" repetition doesn't increase the number of components. This also controls the number of previous components to be part of the repetion.
Definition at line 145 of file EDepSimModuleBuilder.cc.
|
inline |
Set the target length of the module bounding box along the beam axis (the Z axis). The actual length must be shorter than this. Note that the beam goes down at at a few degrees, but the Z axis is horizontal.
Definition at line 72 of file EDepSimModuleBuilder.hh.
|
inline |
Set the width of the module. This is the X dimension of the module.
Definition at line 36 of file EDepSimModuleBuilder.hh.
|
inline |
Set x position at which components are positioned inside the module.
Definition at line 82 of file EDepSimModuleBuilder.hh.
|
inline |
Set y position at which components are positioned inside the module.
Definition at line 87 of file EDepSimModuleBuilder.hh.
|
private |
Logical flag to accept the target length as the module length.
Definition at line 116 of file EDepSimModuleBuilder.hh.
|
private |
The height of the module.
Definition at line 106 of file EDepSimModuleBuilder.hh.
|
private |
The length of the module.
Definition at line 109 of file EDepSimModuleBuilder.hh.
|
private |
Default pair of translation constants.
Definition at line 125 of file EDepSimModuleBuilder.hh.
|
private |
Definition at line 129 of file EDepSimModuleBuilder.hh.
|
private |
The target length of module bounding box (parallel to the beam axis). The actual length must be shorter than this.
Definition at line 113 of file EDepSimModuleBuilder.hh.
|
private |
Definition at line 135 of file EDepSimModuleBuilder.hh.
|
private |
The width of the module.
Definition at line 103 of file EDepSimModuleBuilder.hh.
|
private |
Collect the minimum and maximum of translations in x and y.
Definition at line 138 of file EDepSimModuleBuilder.hh.
|
private |
Definition at line 138 of file EDepSimModuleBuilder.hh.
|
private |
The x position at which components are positioned inside the module.
Definition at line 119 of file EDepSimModuleBuilder.hh.
|
private |
Definition at line 138 of file EDepSimModuleBuilder.hh.
|
private |
Definition at line 138 of file EDepSimModuleBuilder.hh.
|
private |
The y position at which components are positioned inside the module.
Definition at line 122 of file EDepSimModuleBuilder.hh.