CMS 3D CMS Logo

TrackerG4SimHitNumberingScheme.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_TrackerG4SimHitNumberingScheme_H
2 #define SimG4CMS_TrackerG4SimHitNumberingScheme_H
3 
4 #include<vector>
5 #include<map>
6 #include<string>
7 
8 class G4VTouchable;
9 class G4VPhysicalVolume;
10 class DDFilteredView;
11 class DDCompactView;
12 class GeometricDet;
13 
15 {
16 public:
17 
18  // Nav_Story is G4
19  // nav_type is DDD
20  typedef std::vector<int> Nav_type;
21  typedef std::vector<std::pair<int,std::string> > Nav_Story;
22  typedef std::map<Nav_Story,Nav_type> MapType;
23  typedef std::map<Nav_Story,unsigned int> DirectMapType;
24 
27 
28  unsigned int g4ToNumberingScheme(const G4VTouchable*);
29 
30  const G4VPhysicalVolume& getTouchable(DDFilteredView&);
31  const DDFilteredView& getFilteredView(const G4VTouchable&, DDFilteredView&);
32 
33 private:
34 
35  Nav_type& getNavType(const G4VTouchable&);
36  Nav_type& touchableToNavType(const G4VTouchable*);
37  void getNavStory(DDFilteredView&, Nav_Story&);
38  void touchToNavStory(const G4VTouchable*, Nav_Story&);
39  void dumpG4VPV(const G4VTouchable*);
40 
41  void buildAll();
42 
43  MapType myMap;
44  DirectMapType myDirectMap;
45  bool alreadySet;
48 };
49 
50 
51 
52 #endif
TrackerG4SimHitNumberingScheme(const DDCompactView &, const GeometricDet &)
Nav_type & touchableToNavType(const G4VTouchable *)
std::map< Nav_Story, Nav_type > MapType
const G4VPhysicalVolume & getTouchable(DDFilteredView &)
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:83
std::vector< std::pair< int, std::string > > Nav_Story
unsigned int g4ToNumberingScheme(const G4VTouchable *)
std::map< Nav_Story, unsigned int > DirectMapType
Nav_type & getNavType(const G4VTouchable &)
void getNavStory(DDFilteredView &, Nav_Story &)
const DDFilteredView & getFilteredView(const G4VTouchable &, DDFilteredView &)
void touchToNavStory(const G4VTouchable *, Nav_Story &)