CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/SimG4CMS/Tracker/interface/TouchableToHistory.h

Go to the documentation of this file.
00001 #ifndef SimG4CMS_Tracker_TouchableToHistory_H
00002 #define SimG4CMS_Tracker_TouchableToHistory_H
00003 
00004 
00005 #include "G4VTouchable.hh"
00006 
00007 #include<vector>
00008 #include<map>
00009 
00010 class G4VTouchable;
00011 class G4VPhysicalVolume;
00012 class DDFilteredView;
00013 class DDCompactView;
00014 class GeometricDet;
00015 
00016 class TouchableToHistory{
00017  public:
00018   // Nav_Story is G4
00019   // nav_type  is DDD
00020   typedef std::vector<int> nav_type;
00021   typedef std::vector<std::pair<int,std::string> > Nav_Story;
00022   typedef std::map <Nav_Story,nav_type> MapType;
00023   typedef std::map <Nav_Story,int> DirectMapType;
00024       TouchableToHistory(const DDCompactView&cpv, const GeometricDet& det): 
00025          alreadySet(false), myCompactView(&cpv), myGeomDet(&det) {} 
00026   G4VPhysicalVolume& getTouchable(DDFilteredView&);
00027   Nav_Story getNavStory(DDFilteredView&);
00028   void buildAll();
00029   DDFilteredView& getFilteredView(const G4VTouchable&, DDFilteredView&);
00030   nav_type getNavType(const G4VTouchable&);
00031   Nav_Story touchableToNavStory(const G4VTouchable*);
00032   nav_type touchableToNavType(const G4VTouchable*);
00033   int touchableToInt(const G4VTouchable*);
00034  private:
00035   void dumpG4VPV(const G4VTouchable*);
00036   MapType myMap;
00037   DirectMapType myDirectMap;
00038   bool alreadySet;
00039   const DDCompactView* myCompactView;
00040   const GeometricDet* myGeomDet;
00041 };
00042 
00043 #endif
00044 
00045