| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

TouchableToDetectorElement.h

Go to the documentation of this file.
00001 #ifndef TOUCHABLETODETECTORELEMENT_H
00002 #define TOUCHABLETODETECTORELEMENT_H
00003 
00007 
00008 #include "G4DataHelpers/ITouchableToDetectorElement.h"
00009 #include "GaudiAlg/GaudiTool.h"
00010 
00011 #include "DetDesc/ILVolume.h"
00012 
00013 class TouchableToDetectorElement : public GaudiTool, virtual ITouchableToDetectorElement
00014 {
00015   public:
00016   TouchableToDetectorElement(const std::string& type,
00017                              const std::string& name,
00018                             const IInterface* parent);
00019   virtual ~TouchableToDetectorElement() {};
00020 
00022   virtual StatusCode GetBestDetectorElement(
00023                           const G4TouchableHistory* inHistory,  // The current particle location
00024                           const std::vector<std::string>& inPath,// Name(s) of specific detElements, or paths to be searched
00025                           const IDetectorElement* &outElement,  // output: The best element (may be zero!) 
00026                           int& outCompatibility );              // output: the goodness of the match (lower is better, -ve is no match)
00027 
00029   virtual StatusCode G4VolumeToDetDesc( const G4VPhysicalVolume* inVol,     
00030                                         const IPVolume* &outVol             
00031                                        );
00032 
00033 
00035   virtual StatusCode ClearCache() { return StatusCode::SUCCESS; }; // no caches here.
00036 
00037   // And now the machinery:
00038    struct SpecifiedVolume {
00039      const IDetectorElement*  mTop;
00040      ILVolume::ReplicaPath mRpath;
00041    };
00043   virtual StatusCode G4VolumeToDetDesc( const G4VPhysicalVolume* inVol,     
00044                                         const IPVolume* &outVol,            
00045                                         ILVolume::ReplicaPath& outPath 
00046                                        );
00047 
00048   StatusCode GetSpecifiedVolume(const G4TouchableHistory* inHistory, SpecifiedVolume& outVol);
00049   StatusCode GetSpecifiedVolume(const IDetectorElement* inElem,   const IDetectorElement* inTopElem, SpecifiedVolume& outVol);
00050 
00051 
00053   int        Compatability(const SpecifiedVolume& inPlace, const SpecifiedVolume& inContainer);
00054   
00055   template < class T  >
00056   StatusCode FindObjectsInDirectory(const std::string& dirname, std::vector<const T*>& outList);
00057   
00058 };
00059 
00060 
00061 #endif /* TOUCHABLETODETECTORELEMENT_H */
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:32:08 2011 for G4DataHelpers by doxygen 1.4.7