CMS 3D CMS Logo

PrintGeomInfoAction.h
Go to the documentation of this file.
1 #ifndef SimG4Core_PrintGeomInfoAction_H
2 #define SimG4Core_PrintGeomInfoAction_H
3 
7 
8 #include "G4NavigationHistory.hh"
9 
10 #include <iostream>
11 #include <vector>
12 #include <map>
13 #include <string>
14 
15 class BeginOfJob;
16 class BeginOfRun;
17 class G4LogicalVolume;
18 class G4VPhysicalVolume;
19 class G4VSolid;
20 
21 typedef std::map<G4VPhysicalVolume*, G4VPhysicalVolume*, std::less<G4VPhysicalVolume*> > mpvpv;
22 typedef std::multimap<G4LogicalVolume*, G4VPhysicalVolume*, std::less<G4LogicalVolume*> > mmlvpv;
23 
24 class PrintGeomInfoAction : public SimWatcher, public Observer<const BeginOfJob*>, public Observer<const BeginOfRun*> {
25 public:
27  ~PrintGeomInfoAction() override;
28 
29 private:
30  void update(const BeginOfJob* job) override;
31  void update(const BeginOfRun* run) override;
32  void dumpSummary(std::ostream& out = std::cout);
33  void dumpG4LVList(std::ostream& out = std::cout);
34  void dumpG4LVTree(std::ostream& out = std::cout);
35  void dumpMaterialList(std::ostream& out = std::cout);
36  void dumpG4LVLeaf(G4LogicalVolume* lv, unsigned int leafDepth, unsigned int count, std::ostream& out = std::cout);
37  int countNoTouchables();
38  void add1touchable(G4LogicalVolume* lv, int& nTouch);
39  void dumpHierarchyTreePVLV(std::ostream& out = std::cout);
40  void dumpHierarchyLeafPVLV(G4LogicalVolume* lv, unsigned int leafDepth, std::ostream& out = std::cout);
41  void dumpLV(G4LogicalVolume* lv, unsigned int leafDepth, std::ostream& out = std::cout);
42  void dumpPV(G4VPhysicalVolume* pv, unsigned int leafDepth, std::ostream& out = std::cout);
43  void dumpTouch(G4VPhysicalVolume* pv, unsigned int leafDepth, std::ostream& out = std::cout);
44  std::string spacesFromLeafDepth(unsigned int leafDepth);
45  void dumpSolid(G4VSolid* sol, unsigned int leafDepth, std::ostream& out = std::cout);
46  G4VPhysicalVolume* getTopPV();
47  G4LogicalVolume* getTopLV();
48 
49 private:
55  int nchar;
56  std::vector<std::string> names;
58  G4VPhysicalVolume* theTopPV;
59  G4NavigationHistory fHistory;
60 };
61 
62 #endif
void add1touchable(G4LogicalVolume *lv, int &nTouch)
std::multimap< G4LogicalVolume *, G4VPhysicalVolume *, std::less< G4LogicalVolume * > > mmlvpv
void dumpMaterialList(std::ostream &out=std::cout)
void dumpSummary(std::ostream &out=std::cout)
PrintGeomInfoAction(edm::ParameterSet const &p)
std::map< G4VPhysicalVolume *, G4VPhysicalVolume *, std::less< G4VPhysicalVolume * > > mpvpv
void dumpPV(G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
G4VPhysicalVolume * theTopPV
void dumpHierarchyTreePVLV(std::ostream &out=std::cout)
std::vector< std::string > names
void dumpG4LVTree(std::ostream &out=std::cout)
void dumpSolid(G4VSolid *sol, unsigned int leafDepth, std::ostream &out=std::cout)
void dumpLV(G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
G4NavigationHistory fHistory
def pv(vc)
Definition: MetAnalyzer.py:7
std::string spacesFromLeafDepth(unsigned int leafDepth)
G4VPhysicalVolume * getTopPV()
void dumpHierarchyLeafPVLV(G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
G4LogicalVolume * getTopLV()
void dumpG4LVList(std::ostream &out=std::cout)
void dumpTouch(G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
void update(const BeginOfJob *job) override
This routine will be called when the appropriate signal arrives.
void dumpG4LVLeaf(G4LogicalVolume *lv, unsigned int leafDepth, unsigned int count, std::ostream &out=std::cout)