#include <G4VReadOutGeometry.hh>
Definition at line 40 of file G4VReadOutGeometry.hh.
G4VReadOutGeometry::G4VReadOutGeometry | ( | ) |
Definition at line 34 of file G4VReadOutGeometry.cc.
References name, and ROnavigator.
00035 :ROworld(0),fincludeList(0), 00036 fexcludeList(0),touchableHistory(0) 00037 { 00038 name = "unknown"; 00039 ROnavigator = new G4Navigator(); 00040 }
G4VReadOutGeometry::G4VReadOutGeometry | ( | G4String | ) |
Definition at line 54 of file G4VReadOutGeometry.cc.
References ROnavigator.
00055 :ROworld(0),fincludeList(0), 00056 fexcludeList(0),name(n),touchableHistory(0) 00057 { 00058 ROnavigator = new G4Navigator(); 00059 }
G4VReadOutGeometry::~G4VReadOutGeometry | ( | ) | [virtual] |
Definition at line 61 of file G4VReadOutGeometry.cc.
References fexcludeList, fincludeList, ROnavigator, and touchableHistory.
00062 { 00063 //if(ROworld) delete ROworld; //should we do ? will it delete the goem tree also ? 00064 if(fincludeList) delete fincludeList; 00065 if(fexcludeList) delete fexcludeList; 00066 if(touchableHistory) delete touchableHistory; 00067 if(ROnavigator) delete ROnavigator; 00068 }
G4VReadOutGeometry::G4VReadOutGeometry | ( | const G4VReadOutGeometry & | right | ) | [protected] |
Definition at line 42 of file G4VReadOutGeometry.cc.
References fexcludeList, fincludeList, name, ROnavigator, ROworld, and touchableHistory.
00043 { 00044 fincludeList = 0; 00045 fexcludeList = 0; 00046 name = right.name; 00047 ROworld = right.ROworld; 00048 touchableHistory = 0; 00049 ROnavigator = new G4Navigator(); 00050 // COPY CONSTRUCTOR NOT STRAIGHT FORWARD: need to copy the touchabelHistory 00051 // VALUE, same for navigator and same for the World+Geom hierachy 00052 }
virtual G4VPhysicalVolume* G4VReadOutGeometry::Build | ( | ) | [protected, pure virtual] |
Referenced by BuildROGeometry().
void G4VReadOutGeometry::BuildROGeometry | ( | ) |
Definition at line 87 of file G4VReadOutGeometry.cc.
References Build(), ROnavigator, ROworld, and G4Navigator::SetWorldVolume().
00088 { 00089 ROworld = Build(); 00090 ROnavigator->SetWorldVolume(ROworld); 00091 }
G4bool G4VReadOutGeometry::CheckROVolume | ( | G4Step * | , | |
G4TouchableHistory *& | ||||
) | [virtual] |
Definition at line 93 of file G4VReadOutGeometry.cc.
References G4SensitiveVolumeList::CheckLV(), G4SensitiveVolumeList::CheckPV(), fexcludeList, fincludeList, FindROTouchable(), G4StepPoint::GetPhysicalVolume(), G4Step::GetPreStepPoint(), ROworld, and touchableHistory.
Referenced by G4VSensitiveDetector::Hit().
00094 { 00095 ROhist = 0; 00096 G4bool incFlg = true; 00097 G4VPhysicalVolume* PV = currentStep->GetPreStepPoint()->GetPhysicalVolume(); 00098 if((fexcludeList)&&(fexcludeList->CheckPV(PV))) 00099 { incFlg = false; } 00100 else if ((fincludeList)&&(fincludeList->CheckPV(PV))) 00101 { incFlg = true; } 00102 else if((fexcludeList)&&(fexcludeList->CheckLV(PV->GetLogicalVolume()))) 00103 { incFlg = false; } 00104 else if((fincludeList)&&(fincludeList->CheckLV(PV->GetLogicalVolume()))) 00105 { incFlg = true; } 00106 if(!incFlg) return false; 00107 00108 if(ROworld) 00109 { incFlg = FindROTouchable(currentStep); } 00110 if(incFlg) 00111 { ROhist = touchableHistory; } 00112 return incFlg; 00113 }
Definition at line 115 of file G4VReadOutGeometry.cc.
References G4VPhysicalVolume::GetLogicalVolume(), G4StepPoint::GetMomentumDirection(), G4StepPoint::GetPosition(), G4Step::GetPreStepPoint(), G4TouchableHistory::GetVolume(), G4Navigator::LocateGlobalPointAndUpdateTouchable(), ROnavigator, and touchableHistory.
Referenced by CheckROVolume().
00116 { 00117 // Update G4TouchableHistory object (touchableHistory) 00118 // using the parallel readout world (ROworld) 00119 // Return false in case the current Step is outside of the 00120 // sensitive volume of the readout world. 00121 00122 // At first invokation, creates the touchable history. Note 00123 // that default value (false) of Locate method is used. 00124 // ---------> But the default Value is TRUE <-------------------- J.A. 00125 if(!touchableHistory) 00126 { 00127 touchableHistory = new G4TouchableHistory(); 00128 ROnavigator->LocateGlobalPointAndUpdateTouchable( 00129 currentStep->GetPreStepPoint()->GetPosition(), 00130 currentStep->GetPreStepPoint()->GetMomentumDirection(), 00131 touchableHistory); 00132 } 00133 else 00134 { 00135 ROnavigator->LocateGlobalPointAndUpdateTouchable( 00136 currentStep->GetPreStepPoint()->GetPosition(), 00137 currentStep->GetPreStepPoint()->GetMomentumDirection(), 00138 touchableHistory, 00139 true); 00140 } 00141 // Can the above be improved by the use of an isotropic safety 00142 // in order to avoid LocateGlobalPointAndUpdateTouchable 00143 // at each Step ? 00144 // Should require that an RO geometry is notified at the 00145 // starting of a track to avoid possible confusion looking 00146 // at the safety value only. 00147 00148 // checks if volume is sensitive: 00149 G4VPhysicalVolume* currentVolume = touchableHistory->GetVolume(); 00150 // checks first if a physical volume exists here: 00151 if ( currentVolume ) 00152 { 00153 return currentVolume->GetLogicalVolume()-> 00154 GetSensitiveDetector() != 0; 00155 } 00156 // no sensitive volume found: returns false 00157 return false; 00158 }
const G4SensitiveVolumeList* G4VReadOutGeometry::GetExcludeList | ( | ) | const [inline] |
Definition at line 79 of file G4VReadOutGeometry.hh.
References fexcludeList.
00080 { return fexcludeList; }
const G4SensitiveVolumeList* G4VReadOutGeometry::GetIncludeList | ( | ) | const [inline] |
Definition at line 75 of file G4VReadOutGeometry.hh.
References fincludeList.
00076 { return fincludeList; }
G4String G4VReadOutGeometry::GetName | ( | ) | const [inline] |
Definition at line 83 of file G4VReadOutGeometry.hh.
References name.
Referenced by G4LogicalVolumeModel::DescribeYourselfTo(), and G4ASCIITreeSceneHandler::RequestPrimitives().
00084 { return name; }
G4VPhysicalVolume* G4VReadOutGeometry::GetROWorld | ( | ) | const [inline] |
Definition at line 88 of file G4VReadOutGeometry.hh.
References ROworld.
Referenced by G4LogicalVolumeModel::DescribeYourselfTo().
00089 { return ROworld;}
G4int G4VReadOutGeometry::operator!= | ( | const G4VReadOutGeometry & | right | ) | const |
Definition at line 84 of file G4VReadOutGeometry.cc.
00085 { return (this != (G4VReadOutGeometry *) &right); }
const G4VReadOutGeometry & G4VReadOutGeometry::operator= | ( | const G4VReadOutGeometry & | right | ) | [protected] |
Definition at line 70 of file G4VReadOutGeometry.cc.
References fexcludeList, fincludeList, name, ROnavigator, ROworld, and touchableHistory.
00071 { 00072 delete fincludeList; fincludeList = 0; 00073 delete fexcludeList; fexcludeList = 0; 00074 name = right.name; 00075 ROworld = right.ROworld; 00076 delete touchableHistory; touchableHistory = 0; 00077 delete ROnavigator; ROnavigator = new G4Navigator(); 00078 return *this; 00079 }
G4int G4VReadOutGeometry::operator== | ( | const G4VReadOutGeometry & | right | ) | const |
Definition at line 81 of file G4VReadOutGeometry.cc.
00082 { return (this == (G4VReadOutGeometry *) &right); }
void G4VReadOutGeometry::SetExcludeList | ( | G4SensitiveVolumeList * | value | ) | [inline] |
Definition at line 81 of file G4VReadOutGeometry.hh.
References fexcludeList.
00082 { fexcludeList = value; }
void G4VReadOutGeometry::SetIncludeList | ( | G4SensitiveVolumeList * | value | ) | [inline] |
Definition at line 77 of file G4VReadOutGeometry.hh.
References fincludeList.
00078 { fincludeList = value; }
void G4VReadOutGeometry::SetName | ( | G4String | value | ) | [inline] |
G4SensitiveVolumeList* G4VReadOutGeometry::fexcludeList [protected] |
Definition at line 68 of file G4VReadOutGeometry.hh.
Referenced by CheckROVolume(), G4VReadOutGeometry(), GetExcludeList(), operator=(), SetExcludeList(), and ~G4VReadOutGeometry().
G4SensitiveVolumeList* G4VReadOutGeometry::fincludeList [protected] |
Definition at line 67 of file G4VReadOutGeometry.hh.
Referenced by CheckROVolume(), G4VReadOutGeometry(), GetIncludeList(), operator=(), SetIncludeList(), and ~G4VReadOutGeometry().
G4String G4VReadOutGeometry::name [protected] |
Definition at line 69 of file G4VReadOutGeometry.hh.
Referenced by G4VReadOutGeometry(), GetName(), operator=(), and SetName().
G4Navigator* G4VReadOutGeometry::ROnavigator [protected] |
Definition at line 71 of file G4VReadOutGeometry.hh.
Referenced by BuildROGeometry(), FindROTouchable(), G4VReadOutGeometry(), operator=(), and ~G4VReadOutGeometry().
G4VPhysicalVolume* G4VReadOutGeometry::ROworld [protected] |
Definition at line 66 of file G4VReadOutGeometry.hh.
Referenced by BuildROGeometry(), CheckROVolume(), G4VReadOutGeometry(), GetROWorld(), and operator=().
G4TouchableHistory* G4VReadOutGeometry::touchableHistory [protected] |
Definition at line 72 of file G4VReadOutGeometry.hh.
Referenced by CheckROVolume(), FindROTouchable(), G4VReadOutGeometry(), operator=(), and ~G4VReadOutGeometry().