Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes
G4VReadOutGeometry Class Referenceabstract

#include <G4VReadOutGeometry.hh>

Inheritance diagram for G4VReadOutGeometry:
CML2ReadOutGeometry ExN04CalorimeterROGeometry ExN04CalorimeterROGeometry GammaRayTelTrackerROGeometry IORTDetectorROGeometry RE01CalorimeterROGeometry

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

Definition at line 34 of file G4VReadOutGeometry.cc.

References G4Exception(), JustWarning, and ROnavigator.

35  :ROworld(0),fincludeList(0),
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 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4Navigator * ROnavigator
G4SensitiveVolumeList * fincludeList
G4VPhysicalVolume * ROworld
const XML_Char * name
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4TouchableHistory * touchableHistory
G4SensitiveVolumeList * fexcludeList
G4VReadOutGeometry::G4VReadOutGeometry ( G4String  n)

Definition at line 62 of file G4VReadOutGeometry.cc.

References ROnavigator.

63  :ROworld(0),fincludeList(0),
65 {
66  ROnavigator = new G4Navigator();
67 }
G4Navigator * ROnavigator
G4SensitiveVolumeList * fincludeList
G4VPhysicalVolume * ROworld
G4TouchableHistory * touchableHistory
G4SensitiveVolumeList * fexcludeList
G4VReadOutGeometry::~G4VReadOutGeometry ( )
virtual

Definition at line 69 of file G4VReadOutGeometry.cc.

References fexcludeList, fincludeList, ROnavigator, and touchableHistory.

70 {
71  //if(ROworld) delete ROworld; //should we do ? will it delete the goem tree also ?
72  if(fincludeList) delete fincludeList;
73  if(fexcludeList) delete fexcludeList;
75  if(ROnavigator) delete ROnavigator;
76 }
G4Navigator * ROnavigator
G4SensitiveVolumeList * fincludeList
G4TouchableHistory * touchableHistory
G4SensitiveVolumeList * fexcludeList
G4VReadOutGeometry::G4VReadOutGeometry ( const G4VReadOutGeometry right)
protected

Definition at line 50 of file G4VReadOutGeometry.cc.

References fexcludeList, fincludeList, name, ROnavigator, ROworld, and touchableHistory.

51 {
52  fincludeList = 0;
53  fexcludeList = 0;
54  name = right.name;
55  ROworld = right.ROworld;
56  touchableHistory = 0;
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 }
G4Navigator * ROnavigator
G4SensitiveVolumeList * fincludeList
G4VPhysicalVolume * ROworld
const XML_Char * name
G4TouchableHistory * touchableHistory
G4SensitiveVolumeList * fexcludeList

Member Function Documentation

virtual G4VPhysicalVolume* G4VReadOutGeometry::Build ( )
protectedpure virtual
void G4VReadOutGeometry::BuildROGeometry ( )

Definition at line 95 of file G4VReadOutGeometry.cc.

References Build(), ROnavigator, ROworld, and G4Navigator::SetWorldVolume().

Referenced by ExN04DetectorConstruction::Construct(), RE01DetectorConstruction::Construct(), CML2Ph_FullWater::Construct(), and CML2Ph_BoxInBox::Construct().

96 {
97  ROworld = Build();
99 }
G4Navigator * ROnavigator
G4VPhysicalVolume * ROworld
virtual G4VPhysicalVolume * Build()=0
void SetWorldVolume(G4VPhysicalVolume *pWorld)
G4bool G4VReadOutGeometry::CheckROVolume ( G4Step currentStep,
G4TouchableHistory *&  ROhist 
)
virtual

Definition at line 101 of file G4VReadOutGeometry.cc.

References G4SensitiveVolumeList::CheckLV(), G4SensitiveVolumeList::CheckPV(), fexcludeList, fincludeList, FindROTouchable(), G4VPhysicalVolume::GetLogicalVolume(), G4StepPoint::GetPhysicalVolume(), G4Step::GetPreStepPoint(), ROworld, and touchableHistory.

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

102 {
103  ROhist = 0;
104  G4bool incFlg = true;
105  G4VPhysicalVolume* PV = currentStep->GetPreStepPoint()->GetPhysicalVolume();
106  if((fexcludeList)&&(fexcludeList->CheckPV(PV)))
107  { incFlg = false; }
108  else if ((fincludeList)&&(fincludeList->CheckPV(PV)))
109  { incFlg = true; }
110  else if((fexcludeList)&&(fexcludeList->CheckLV(PV->GetLogicalVolume())))
111  { incFlg = false; }
112  else if((fincludeList)&&(fincludeList->CheckLV(PV->GetLogicalVolume())))
113  { incFlg = true; }
114  if(!incFlg) return false;
115 
116  if(ROworld)
117  { incFlg = FindROTouchable(currentStep); }
118  if(incFlg)
119  { ROhist = touchableHistory; }
120  return incFlg;
121 }
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
G4bool G4VReadOutGeometry::FindROTouchable ( G4Step currentStep)
protectedvirtual

Definition at line 123 of file G4VReadOutGeometry.cc.

References G4VPhysicalVolume::GetLogicalVolume(), G4StepPoint::GetMomentumDirection(), G4StepPoint::GetPosition(), G4Step::GetPreStepPoint(), G4TouchableHistory::GetVolume(), G4Navigator::LocateGlobalPointAndUpdateTouchable(), ROnavigator, and touchableHistory.

Referenced by CheckROVolume().

124 {
125  // Update G4TouchableHistory object (touchableHistory)
126  // using the parallel readout world (ROworld)
127  // Return false in case the current Step is outside of the
128  // sensitive volume of the readout world.
129 
130  // At first invokation, creates the touchable history. Note
131  // that default value (false) of Locate method is used.
132  // ---------> But the default Value is TRUE <-------------------- J.A.
133  if(!touchableHistory)
134  {
137  currentStep->GetPreStepPoint()->GetPosition(),
138  currentStep->GetPreStepPoint()->GetMomentumDirection(),
140  }
141  else
142  {
144  currentStep->GetPreStepPoint()->GetPosition(),
145  currentStep->GetPreStepPoint()->GetMomentumDirection(),
147  true);
148  }
149  // Can the above be improved by the use of an isotropic safety
150  // in order to avoid LocateGlobalPointAndUpdateTouchable
151  // at each Step ?
152  // Should require that an RO geometry is notified at the
153  // starting of a track to avoid possible confusion looking
154  // at the safety value only.
155 
156  // checks if volume is sensitive:
157  G4VPhysicalVolume* currentVolume = touchableHistory->GetVolume();
158  // checks first if a physical volume exists here:
159  if ( currentVolume )
160  {
161  return currentVolume->GetLogicalVolume()->
162  GetSensitiveDetector() != 0;
163  }
164  // no sensitive volume found: returns false
165  return false;
166 }
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
const G4SensitiveVolumeList* G4VReadOutGeometry::GetExcludeList ( ) const
inline

Definition at line 79 of file G4VReadOutGeometry.hh.

References fexcludeList.

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

Definition at line 75 of file G4VReadOutGeometry.hh.

References fincludeList.

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

Definition at line 83 of file G4VReadOutGeometry.hh.

References name.

Referenced by G4LogicalVolumeModel::DescribeYourselfTo(), and G4ASCIITreeSceneHandler::RequestPrimitives().

84  { return name; }
G4VPhysicalVolume* G4VReadOutGeometry::GetROWorld ( ) const
inline

Definition at line 88 of file G4VReadOutGeometry.hh.

References ROworld.

Referenced by CML2PhantomConstruction::applyNewCentre(), and G4LogicalVolumeModel::DescribeYourselfTo().

89  { return ROworld;}
G4VPhysicalVolume * ROworld
G4int G4VReadOutGeometry::operator!= ( const G4VReadOutGeometry right) const

Definition at line 92 of file G4VReadOutGeometry.cc.

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

Definition at line 78 of file G4VReadOutGeometry.cc.

References fexcludeList, fincludeList, name, ROnavigator, ROworld, and touchableHistory.

79 {
80  delete fincludeList; fincludeList = 0;
81  delete fexcludeList; fexcludeList = 0;
82  name = right.name;
83  ROworld = right.ROworld;
85  delete ROnavigator; ROnavigator = new G4Navigator();
86  return *this;
87 }
G4Navigator * ROnavigator
G4SensitiveVolumeList * fincludeList
G4VPhysicalVolume * ROworld
const XML_Char * name
G4TouchableHistory * touchableHistory
G4SensitiveVolumeList * fexcludeList
G4int G4VReadOutGeometry::operator== ( const G4VReadOutGeometry right) const

Definition at line 89 of file G4VReadOutGeometry.cc.

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

Definition at line 81 of file G4VReadOutGeometry.hh.

References fexcludeList.

82  { fexcludeList = value; }
G4SensitiveVolumeList * fexcludeList
const XML_Char int const XML_Char * value
void G4VReadOutGeometry::SetIncludeList ( G4SensitiveVolumeList value)
inline

Definition at line 77 of file G4VReadOutGeometry.hh.

References fincludeList.

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

Definition at line 85 of file G4VReadOutGeometry.hh.

86  { name = value; }
const XML_Char * name
const XML_Char int const XML_Char * value

Field Documentation

G4SensitiveVolumeList* G4VReadOutGeometry::fexcludeList
protected
G4SensitiveVolumeList* G4VReadOutGeometry::fincludeList
protected
G4String G4VReadOutGeometry::name
protected

Definition at line 69 of file G4VReadOutGeometry.hh.

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

G4Navigator* G4VReadOutGeometry::ROnavigator
protected
G4VPhysicalVolume* G4VReadOutGeometry::ROworld
protected
G4TouchableHistory* G4VReadOutGeometry::touchableHistory
protected

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