Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VReadOutGeometry Class Referenceabstract

#include <G4VReadOutGeometry.hh>

Inheritance diagram for G4VReadOutGeometry:
Collaboration diagram for G4VReadOutGeometry:

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)
 
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::G4VReadOutGeometry ( )

Definition at line 34 of file G4VReadOutGeometry.cc.

35  :ROworld(nullptr),fincludeList(nullptr),
36  fexcludeList(nullptr),touchableHistory(nullptr)
37 {
38  name = "unknown";
39  ROnavigator = new G4Navigator();
41  ed<<"The concept and the functionality of Readout Geometry has been merged\n"
42  <<"into Parallel World. This G4VReadOutGeometry is kept for the sake of\n"
43  <<"not breaking the commonly-used interface in the sensitive detector class.\n"
44  <<"But this functionality of G4VReadOutGeometry class is no longer tested\n"
45  <<"and thus may not be working well. We strongly recommend our customers to\n"
46  <<"migrate to Parallel World scheme.";
47  G4Exception("G4VReadOutGeometry","DIGIHIT1001",JustWarning,ed);
48 }
const XML_Char * name
Definition: expat.h:151
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4Navigator * ROnavigator
G4SensitiveVolumeList * fincludeList
G4VPhysicalVolume * ROworld
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4TouchableHistory * touchableHistory
G4SensitiveVolumeList * fexcludeList

Here is the call graph for this function:

G4VReadOutGeometry::G4VReadOutGeometry ( G4String  n)

Definition at line 62 of file G4VReadOutGeometry.cc.

63  :ROworld(nullptr),fincludeList(nullptr),
64  fexcludeList(nullptr),name(n),touchableHistory(nullptr)
65 {
66  ROnavigator = new G4Navigator();
68  ed<<"The concept and the functionality of Readout Geometry has been merged\n"
69  <<"into Parallel World. This G4VReadOutGeometry is kept for the sake of\n"
70  <<"not breaking the commonly-used interface in the sensitive detector class.\n"
71  <<"But this functionality of G4VReadOutGeometry class is no longer tested\n"
72  <<"and thus may not be working well. We strongly recommend our customers to\n"
73  <<"migrate to Parallel World scheme.";
74  G4Exception("G4VReadOutGeometry","DIGIHIT1001",JustWarning,ed);
75 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4Navigator * ROnavigator
G4SensitiveVolumeList * fincludeList
G4VPhysicalVolume * ROworld
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4TouchableHistory * touchableHistory
G4SensitiveVolumeList * fexcludeList

Here is the call graph for this function:

G4VReadOutGeometry::~G4VReadOutGeometry ( )
virtual

Definition at line 77 of file G4VReadOutGeometry.cc.

78 {
79  //if(ROworld) delete ROworld; //should we do ? will it delete the goem tree also ?
80  if(fincludeList) delete fincludeList;
81  if(fexcludeList) delete fexcludeList;
83  if(ROnavigator) delete ROnavigator;
84 }
G4Navigator * ROnavigator
G4SensitiveVolumeList * fincludeList
G4TouchableHistory * touchableHistory
G4SensitiveVolumeList * fexcludeList
G4VReadOutGeometry::G4VReadOutGeometry ( const G4VReadOutGeometry right)
protected

Definition at line 50 of file G4VReadOutGeometry.cc.

51 {
52  fincludeList = nullptr;
53  fexcludeList = nullptr;
54  name = right.name;
55  ROworld = right.ROworld;
56  touchableHistory = nullptr;
57  ROnavigator = new G4Navigator();
58  // COPY CONSTRUCTOR NOT STRAIGHT FORWARD: need to copy the touchabelHistory
59  // VALUE, same for navigator and same for the World+Geom hierachy
60 }
const XML_Char * name
Definition: expat.h:151
G4Navigator * ROnavigator
G4SensitiveVolumeList * fincludeList
G4VPhysicalVolume * ROworld
G4TouchableHistory * touchableHistory
G4SensitiveVolumeList * fexcludeList

Member Function Documentation

virtual G4VPhysicalVolume* G4VReadOutGeometry::Build ( )
protectedpure virtual

Implemented in CML2ReadOutGeometry.

Here is the caller graph for this function:

void G4VReadOutGeometry::BuildROGeometry ( )

Definition at line 104 of file G4VReadOutGeometry.cc.

105 {
106  ROworld = Build();
108 }
G4Navigator * ROnavigator
G4VPhysicalVolume * ROworld
virtual G4VPhysicalVolume * Build()=0
void SetWorldVolume(G4VPhysicalVolume *pWorld)

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 110 of file G4VReadOutGeometry.cc.

111 {
112  ROhist = nullptr;
113  G4bool incFlg = true;
114  G4VPhysicalVolume* PV = currentStep->GetPreStepPoint()->GetPhysicalVolume();
115  if((fexcludeList)&&(fexcludeList->CheckPV(PV)))
116  { incFlg = false; }
117  else if ((fincludeList)&&(fincludeList->CheckPV(PV)))
118  { incFlg = true; }
119  else if((fexcludeList)&&(fexcludeList->CheckLV(PV->GetLogicalVolume())))
120  { incFlg = false; }
121  else if((fincludeList)&&(fincludeList->CheckLV(PV->GetLogicalVolume())))
122  { incFlg = true; }
123  if(!incFlg) return false;
124 
125  if(ROworld)
126  { incFlg = FindROTouchable(currentStep); }
127  if(incFlg)
128  { ROhist = touchableHistory; }
129  return incFlg;
130 }
G4bool CheckPV(const G4VPhysicalVolume *pvp) const
G4SensitiveVolumeList * fincludeList
G4VPhysicalVolume * ROworld
virtual G4bool FindROTouchable(G4Step *)
G4StepPoint * GetPreStepPoint() const
G4VPhysicalVolume * GetPhysicalVolume() const
bool G4bool
Definition: G4Types.hh:79
G4LogicalVolume * GetLogicalVolume() const
G4TouchableHistory * touchableHistory
G4SensitiveVolumeList * fexcludeList
G4bool CheckLV(const G4LogicalVolume *lvp) const

Here is the call graph for this function:

Here is the caller graph for this function:

G4bool G4VReadOutGeometry::FindROTouchable ( G4Step currentStep)
protectedvirtual

Definition at line 132 of file G4VReadOutGeometry.cc.

133 {
134  // Update G4TouchableHistory object (touchableHistory)
135  // using the parallel readout world (ROworld)
136  // Return false in case the current Step is outside of the
137  // sensitive volume of the readout world.
138 
139  // At first invokation, creates the touchable history. Note
140  // that default value (false) of Locate method is used.
141  // ---------> But the default Value is TRUE <-------------------- J.A.
142  if(!touchableHistory)
143  {
146  currentStep->GetPreStepPoint()->GetPosition(),
147  currentStep->GetPreStepPoint()->GetMomentumDirection(),
149  }
150  else
151  {
153  currentStep->GetPreStepPoint()->GetPosition(),
154  currentStep->GetPreStepPoint()->GetMomentumDirection(),
156  true);
157  }
158  // Can the above be improved by the use of an isotropic safety
159  // in order to avoid LocateGlobalPointAndUpdateTouchable
160  // at each Step ?
161  // Should require that an RO geometry is notified at the
162  // starting of a track to avoid possible confusion looking
163  // at the safety value only.
164 
165  // checks if volume is sensitive:
166  G4VPhysicalVolume* currentVolume = touchableHistory->GetVolume();
167  // checks first if a physical volume exists here:
168  if ( currentVolume )
169  {
170  return currentVolume->GetLogicalVolume()->
171  GetSensitiveDetector() != 0;
172  }
173  // no sensitive volume found: returns false
174  return false;
175 }
G4VPhysicalVolume * GetVolume(G4int depth=0) const
G4Navigator * ROnavigator
G4StepPoint * GetPreStepPoint() const
const G4ThreeVector & GetMomentumDirection() const
const G4ThreeVector & GetPosition() const
void LocateGlobalPointAndUpdateTouchable(const G4ThreeVector &position, const G4ThreeVector &direction, G4VTouchable *touchableToUpdate, const G4bool RelativeSearch=true)
G4LogicalVolume * GetLogicalVolume() const
G4TouchableHistory * touchableHistory

Here is the call graph for this function:

Here is the caller graph for this function:

const G4SensitiveVolumeList* G4VReadOutGeometry::GetExcludeList ( ) const
inline

Definition at line 79 of file G4VReadOutGeometry.hh.

80  { return fexcludeList; }
G4SensitiveVolumeList * fexcludeList
const G4SensitiveVolumeList* G4VReadOutGeometry::GetIncludeList ( ) const
inline

Definition at line 75 of file G4VReadOutGeometry.hh.

76  { return fincludeList; }
G4SensitiveVolumeList * fincludeList
G4String G4VReadOutGeometry::GetName ( void  ) const
inline

Definition at line 83 of file G4VReadOutGeometry.hh.

84  { return name; }

Here is the caller graph for this function:

G4VPhysicalVolume* G4VReadOutGeometry::GetROWorld ( ) const
inline

Definition at line 88 of file G4VReadOutGeometry.hh.

89  { return ROworld;}
G4VPhysicalVolume * ROworld

Here is the caller graph for this function:

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

Definition at line 101 of file G4VReadOutGeometry.cc.

102 { return (this != (G4VReadOutGeometry *) &right); }
G4VReadOutGeometry & G4VReadOutGeometry::operator= ( const G4VReadOutGeometry right)
protected

Definition at line 86 of file G4VReadOutGeometry.cc.

87 {
88  if ( this == &right ) return *this;
89  delete fincludeList; fincludeList = nullptr;
90  delete fexcludeList; fexcludeList = nullptr;
91  name = right.name;
92  ROworld = right.ROworld;
93  delete touchableHistory; touchableHistory = nullptr;
94  delete ROnavigator; ROnavigator = new G4Navigator();
95  return *this;
96 }
const XML_Char * name
Definition: expat.h:151
G4Navigator * ROnavigator
G4SensitiveVolumeList * fincludeList
G4VPhysicalVolume * ROworld
G4TouchableHistory * touchableHistory
G4SensitiveVolumeList * fexcludeList
G4int G4VReadOutGeometry::operator== ( const G4VReadOutGeometry right) const

Definition at line 98 of file G4VReadOutGeometry.cc.

99 { return (this == (G4VReadOutGeometry *) &right); }
void G4VReadOutGeometry::SetExcludeList ( G4SensitiveVolumeList value)
inline

Definition at line 81 of file G4VReadOutGeometry.hh.

82  { fexcludeList = value; }
const XML_Char int const XML_Char * value
Definition: expat.h:331
G4SensitiveVolumeList * fexcludeList
void G4VReadOutGeometry::SetIncludeList ( G4SensitiveVolumeList value)
inline

Definition at line 77 of file G4VReadOutGeometry.hh.

78  { fincludeList = value; }
G4SensitiveVolumeList * fincludeList
const XML_Char int const XML_Char * value
Definition: expat.h:331
void G4VReadOutGeometry::SetName ( G4String  value)
inline

Definition at line 85 of file G4VReadOutGeometry.hh.

86  { name = value; }
const XML_Char * name
Definition: expat.h:151
const XML_Char int const XML_Char * value
Definition: expat.h:331

Member Data Documentation

G4SensitiveVolumeList* G4VReadOutGeometry::fexcludeList
protected

Definition at line 68 of file G4VReadOutGeometry.hh.

G4SensitiveVolumeList* G4VReadOutGeometry::fincludeList
protected

Definition at line 67 of file G4VReadOutGeometry.hh.

G4String G4VReadOutGeometry::name
protected

Definition at line 69 of file G4VReadOutGeometry.hh.

G4Navigator* G4VReadOutGeometry::ROnavigator
protected

Definition at line 71 of file G4VReadOutGeometry.hh.

G4VPhysicalVolume* G4VReadOutGeometry::ROworld
protected

Definition at line 66 of file G4VReadOutGeometry.hh.

G4TouchableHistory* G4VReadOutGeometry::touchableHistory
protected

Definition at line 72 of file G4VReadOutGeometry.hh.


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