lcdd/include
diff -u -r1.14 -r1.15
--- G4SensitiveDetector.hh 18 Dec 2006 22:49:01 -0000 1.14
+++ G4SensitiveDetector.hh 20 Dec 2006 00:13:10 -0000 1.15
@@ -83,8 +83,12 @@
/**
* Check whether the G4LogicalVolume can be readout by this detector.
+ * Base function just returns if the volume was assigned to this detector.
*/
- inline virtual bool isValidVolume(G4LogicalVolume* lv);
+ inline virtual bool isValidVolume(G4LogicalVolume* lv)
+ {
+ return lv != 0 && lv->GetSensitiveDetector() == this;
+ }
/**
* Return the hits collection name associated with this detector.
lcdd/src
diff -u -r1.11 -r1.12
--- G4SensitiveDetector.cc 18 Dec 2006 21:21:20 -0000 1.11
+++ G4SensitiveDetector.cc 20 Dec 2006 00:13:10 -0000 1.12
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/G4SensitiveDetector.cc,v 1.11 2006/12/18 21:21:20 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/G4SensitiveDetector.cc,v 1.12 2006/12/20 00:13:10 jeremy Exp $
#include "G4SensitiveDetector.hh"
@@ -46,17 +46,6 @@
G4SensitiveDetector::~G4SensitiveDetector()
{}
-bool G4SensitiveDetector::isValidVolume(G4LogicalVolume* lv)
-{
- bool valid = true;
-
- if ( 0 == lv ) {
- valid = false;
- }
-
- return valid;
-}
-
void G4SensitiveDetector::Initialize(G4HCofThisEvent *)
{
// no-op