Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VReadOutGeometry Class Referenceabstract

#include <G4VReadOutGeometry.hh>

Public Member Functions

 G4VReadOutGeometry ()
 
 G4VReadOutGeometry (G4String)
 
virtual ~G4VReadOutGeometry ()
 
G4int operator== (const G4VReadOutGeometry &right) const
 
G4int operator!= (const G4VReadOutGeometry &right) const
 
void BuildROGeometry ()
 
virtual G4bool CheckROVolume (G4Step *, G4TouchableHistory *&)
 
const G4SensitiveVolumeListGetIncludeList () const
 
void SetIncludeList (G4SensitiveVolumeList *value)
 
const G4SensitiveVolumeListGetExcludeList () const
 
void SetExcludeList (G4SensitiveVolumeList *value)
 
G4String GetName () const
 
void SetName (G4String value)
 
G4VPhysicalVolumeGetROWorld () const
 

Protected Member Functions

virtual G4VPhysicalVolumeBuild ()=0
 
 G4VReadOutGeometry (const G4VReadOutGeometry &right)
 
const G4VReadOutGeometryoperator= (const G4VReadOutGeometry &right)
 
virtual G4bool FindROTouchable (G4Step *)
 

Protected Attributes

G4VPhysicalVolumeROworld
 
G4SensitiveVolumeListfincludeList
 
G4SensitiveVolumeListfexcludeList
 
G4String name
 
G4NavigatorROnavigator
 
G4TouchableHistorytouchableHistory
 

Detailed Description

Definition at line 40 of file G4VReadOutGeometry.hh.

Constructor & Destructor Documentation

◆ G4VReadOutGeometry() [1/3]

G4VReadOutGeometry::G4VReadOutGeometry ( )

Definition at line 34 of file G4VReadOutGeometry.cc.

35 :ROworld(0),fincludeList(0),
37{
38 name = "unknown";
40}
G4VPhysicalVolume * ROworld
G4SensitiveVolumeList * fincludeList
G4Navigator * ROnavigator
G4TouchableHistory * touchableHistory
G4SensitiveVolumeList * fexcludeList

◆ G4VReadOutGeometry() [2/3]

G4VReadOutGeometry::G4VReadOutGeometry ( G4String  n)

Definition at line 54 of file G4VReadOutGeometry.cc.

55 :ROworld(0),fincludeList(0),
57{
59}

◆ ~G4VReadOutGeometry()

G4VReadOutGeometry::~G4VReadOutGeometry ( )
virtual

Definition at line 61 of file G4VReadOutGeometry.cc.

62{
63 //if(ROworld) delete ROworld; //should we do ? will it delete the goem tree also ?
64 if(fincludeList) delete fincludeList;
65 if(fexcludeList) delete fexcludeList;
67 if(ROnavigator) delete ROnavigator;
68}

◆ G4VReadOutGeometry() [3/3]

G4VReadOutGeometry::G4VReadOutGeometry ( const G4VReadOutGeometry right)
protected

Definition at line 42 of file G4VReadOutGeometry.cc.

43{
44 fincludeList = 0;
45 fexcludeList = 0;
46 name = right.name;
47 ROworld = right.ROworld;
50 // COPY CONSTRUCTOR NOT STRAIGHT FORWARD: need to copy the touchabelHistory
51 // VALUE, same for navigator and same for the World+Geom hierachy
52}

Member Function Documentation

◆ Build()

virtual G4VPhysicalVolume * G4VReadOutGeometry::Build ( )
protectedpure virtual

Referenced by BuildROGeometry().

◆ BuildROGeometry()

void G4VReadOutGeometry::BuildROGeometry ( )

Definition at line 87 of file G4VReadOutGeometry.cc.

88{
89 ROworld = Build();
91}
void SetWorldVolume(G4VPhysicalVolume *pWorld)
virtual G4VPhysicalVolume * Build()=0

◆ CheckROVolume()

G4bool G4VReadOutGeometry::CheckROVolume ( G4Step currentStep,
G4TouchableHistory *&  ROhist 
)
virtual

Definition at line 93 of file G4VReadOutGeometry.cc.

94{
95 ROhist = 0;
96 G4bool incFlg = true;
99 { incFlg = false; }
100 else if ((fincludeList)&&(fincludeList->CheckPV(PV)))
101 { incFlg = true; }
103 { incFlg = false; }
105 { incFlg = true; }
106 if(!incFlg) return false;
107
108 if(ROworld)
109 { incFlg = FindROTouchable(currentStep); }
110 if(incFlg)
111 { ROhist = touchableHistory; }
112 return incFlg;
113}
bool G4bool
Definition: G4Types.hh:67
G4bool CheckLV(const G4LogicalVolume *lvp) const
G4bool CheckPV(const G4VPhysicalVolume *pvp) const
G4VPhysicalVolume * GetPhysicalVolume() const
G4StepPoint * GetPreStepPoint() const
G4LogicalVolume * GetLogicalVolume() const
virtual G4bool FindROTouchable(G4Step *)

Referenced by G4VGFlashSensitiveDetector::Hit(), and G4VSensitiveDetector::Hit().

◆ FindROTouchable()

G4bool G4VReadOutGeometry::FindROTouchable ( G4Step currentStep)
protectedvirtual

Definition at line 115 of file G4VReadOutGeometry.cc.

116{
117 // Update G4TouchableHistory object (touchableHistory)
118 // using the parallel readout world (ROworld)
119 // Return false in case the current Step is outside of the
120 // sensitive volume of the readout world.
121
122 // At first invokation, creates the touchable history. Note
123 // that default value (false) of Locate method is used.
124 // ---------> But the default Value is TRUE <-------------------- J.A.
126 {
129 currentStep->GetPreStepPoint()->GetPosition(),
130 currentStep->GetPreStepPoint()->GetMomentumDirection(),
132 }
133 else
134 {
136 currentStep->GetPreStepPoint()->GetPosition(),
137 currentStep->GetPreStepPoint()->GetMomentumDirection(),
139 true);
140 }
141 // Can the above be improved by the use of an isotropic safety
142 // in order to avoid LocateGlobalPointAndUpdateTouchable
143 // at each Step ?
144 // Should require that an RO geometry is notified at the
145 // starting of a track to avoid possible confusion looking
146 // at the safety value only.
147
148 // checks if volume is sensitive:
149 G4VPhysicalVolume* currentVolume = touchableHistory->GetVolume();
150 // checks first if a physical volume exists here:
151 if ( currentVolume )
152 {
153 return currentVolume->GetLogicalVolume()->
154 GetSensitiveDetector() != 0;
155 }
156 // no sensitive volume found: returns false
157 return false;
158}
void LocateGlobalPointAndUpdateTouchable(const G4ThreeVector &position, const G4ThreeVector &direction, G4VTouchable *touchableToUpdate, const G4bool RelativeSearch=true)
const G4ThreeVector & GetPosition() const
const G4ThreeVector & GetMomentumDirection() const
G4VPhysicalVolume * GetVolume(G4int depth=0) const

Referenced by CheckROVolume().

◆ GetExcludeList()

const G4SensitiveVolumeList * G4VReadOutGeometry::GetExcludeList ( ) const
inline

Definition at line 79 of file G4VReadOutGeometry.hh.

80 { return fexcludeList; }

◆ GetIncludeList()

const G4SensitiveVolumeList * G4VReadOutGeometry::GetIncludeList ( ) const
inline

Definition at line 75 of file G4VReadOutGeometry.hh.

76 { return fincludeList; }

◆ GetName()

G4String G4VReadOutGeometry::GetName ( ) const
inline

◆ GetROWorld()

G4VPhysicalVolume * G4VReadOutGeometry::GetROWorld ( ) const
inline

Definition at line 88 of file G4VReadOutGeometry.hh.

89 { return ROworld;}

Referenced by G4LogicalVolumeModel::DescribeYourselfTo().

◆ operator!=()

G4int G4VReadOutGeometry::operator!= ( const G4VReadOutGeometry right) const

Definition at line 84 of file G4VReadOutGeometry.cc.

85{ return (this != (G4VReadOutGeometry *) &right); }

◆ operator=()

const G4VReadOutGeometry & G4VReadOutGeometry::operator= ( const G4VReadOutGeometry right)
protected

Definition at line 70 of file G4VReadOutGeometry.cc.

71{
72 delete fincludeList; fincludeList = 0;
73 delete fexcludeList; fexcludeList = 0;
74 name = right.name;
75 ROworld = right.ROworld;
77 delete ROnavigator; ROnavigator = new G4Navigator();
78 return *this;
79}

◆ operator==()

G4int G4VReadOutGeometry::operator== ( const G4VReadOutGeometry right) const

Definition at line 81 of file G4VReadOutGeometry.cc.

82{ return (this == (G4VReadOutGeometry *) &right); }

◆ SetExcludeList()

void G4VReadOutGeometry::SetExcludeList ( G4SensitiveVolumeList value)
inline

Definition at line 81 of file G4VReadOutGeometry.hh.

82 { fexcludeList = value; }

◆ SetIncludeList()

void G4VReadOutGeometry::SetIncludeList ( G4SensitiveVolumeList value)
inline

Definition at line 77 of file G4VReadOutGeometry.hh.

78 { fincludeList = value; }

◆ SetName()

void G4VReadOutGeometry::SetName ( G4String  value)
inline

Definition at line 85 of file G4VReadOutGeometry.hh.

86 { name = value; }

Member Data Documentation

◆ fexcludeList

G4SensitiveVolumeList* G4VReadOutGeometry::fexcludeList
protected

◆ fincludeList

G4SensitiveVolumeList* G4VReadOutGeometry::fincludeList
protected

◆ name

G4String G4VReadOutGeometry::name
protected

Definition at line 69 of file G4VReadOutGeometry.hh.

Referenced by G4VReadOutGeometry(), GetName(), operator=(), and SetName().

◆ ROnavigator

G4Navigator* G4VReadOutGeometry::ROnavigator
protected

◆ ROworld

G4VPhysicalVolume* G4VReadOutGeometry::ROworld
protected

◆ touchableHistory

G4TouchableHistory* G4VReadOutGeometry::touchableHistory
protected

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