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::multimap<G4LogicalVolume*, G4VPhysicalVolume*, std::less<G4LogicalVolume*> > mmlvpv;
22 
23 class PrintGeomInfoAction : public SimWatcher, public Observer<const BeginOfJob*>, public Observer<const BeginOfRun*> {
24 public:
26  ~PrintGeomInfoAction() override;
27 
28 private:
29  void update(const BeginOfJob* job) override;
30  void update(const BeginOfRun* run) override;
31  void dumpSummary(std::ostream& out = std::cout);
32  void dumpG4LVList(std::ostream& out = std::cout);
33  void dumpG4LVTree(std::ostream& out = std::cout);
34  void dumpMaterialList(std::ostream& out = std::cout);
35  void dumpG4LVLeaf(G4LogicalVolume* lv, unsigned int leafDepth, unsigned int count, std::ostream& out = std::cout);
36  int countNoTouchables();
37  void add1touchable(G4LogicalVolume* lv, int& nTouch);
38  void dumpHierarchyTreePVLV(std::ostream& out = std::cout);
39  void dumpHierarchyLeafPVLV(G4LogicalVolume* lv, unsigned int leafDepth, std::ostream& out = std::cout);
40  void dumpLV(G4LogicalVolume* lv, unsigned int leafDepth, std::ostream& out = std::cout);
41  void dumpPV(G4VPhysicalVolume* pv, unsigned int leafDepth, std::ostream& out = std::cout);
42  void dumpTouch(G4VPhysicalVolume* pv, unsigned int leafDepth, std::ostream& out = std::cout);
43  std::string spacesFromLeafDepth(unsigned int leafDepth);
44  void dumpSolid(G4VSolid* sol, unsigned int leafDepth, std::ostream& out = std::cout);
45  G4VPhysicalVolume* getTopPV();
46  G4LogicalVolume* getTopLV();
47 
48 private:
54  int nchar_;
55  std::vector<std::string> names_;
56  G4VPhysicalVolume* theTopPV_;
57  G4NavigationHistory fHistory_;
58 };
59 
60 #endif
PrintGeomInfoAction::names_
std::vector< std::string > names_
Definition: PrintGeomInfoAction.h:55
Observer
Definition: Observer.h:23
mmlvpv
std::multimap< G4LogicalVolume *, G4VPhysicalVolume *, std::less< G4LogicalVolume * > > mmlvpv
Definition: PrintGeomInfoAction.h:19
PrintGeomInfoAction::dumpTouch
void dumpTouch(G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:373
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PrintGeomInfoAction::dumpSolid
void dumpSolid(G4VSolid *sol, unsigned int leafDepth, std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:413
gather_cfg.cout
cout
Definition: gather_cfg.py:144
PrintGeomInfoAction::getTopPV
G4VPhysicalVolume * getTopPV()
Definition: PrintGeomInfoAction.cc:418
PrintGeomInfoAction::dumpTouch_
bool dumpTouch_
Definition: PrintGeomInfoAction.h:51
PrintGeomInfoAction
Definition: PrintGeomInfoAction.h:23
PrintGeomInfoAction::dumpPV_
bool dumpPV_
Definition: PrintGeomInfoAction.h:50
PrintGeomInfoAction::dumpG4LVList
void dumpG4LVList(std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:173
PrintGeomInfoAction::getTopLV
G4LogicalVolume * getTopLV()
Definition: PrintGeomInfoAction.cc:422
PrintGeomInfoAction::dumpReplica_
bool dumpReplica_
Definition: PrintGeomInfoAction.h:51
PrintGeomInfoAction::add1touchable
void add1touchable(G4LogicalVolume *lv, int &nTouch)
Definition: PrintGeomInfoAction.cc:225
Observer.h
PrintGeomInfoAction::dumpPV
void dumpPV(G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:332
SimWatcher.h
PrintGeomInfoAction::dd4hep_
bool dd4hep_
Definition: PrintGeomInfoAction.h:52
PrintGeomInfoAction::~PrintGeomInfoAction
~PrintGeomInfoAction() override
Definition: PrintGeomInfoAction.cc:66
BeginOfJob
Definition: BeginOfJob.h:8
PrintGeomInfoAction::nchar_
int nchar_
Definition: PrintGeomInfoAction.h:54
PrintGeomInfoAction::dumpLVList_
bool dumpLVList_
Definition: PrintGeomInfoAction.h:49
PrintGeomInfoAction::update
void update(const BeginOfJob *job) override
This routine will be called when the appropriate signal arrives.
Definition: PrintGeomInfoAction.cc:68
PrintGeomInfoAction::dumpSense_
bool dumpSense_
Definition: PrintGeomInfoAction.h:52
PrintGeomInfoAction::dumpG4LVLeaf
void dumpG4LVLeaf(G4LogicalVolume *lv, unsigned int leafDepth, unsigned int count, std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:196
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PrintGeomInfoAction::dumpLV_
bool dumpLV_
Definition: PrintGeomInfoAction.h:50
edm::ParameterSet
Definition: ParameterSet.h:36
PrintGeomInfoAction::PrintGeomInfoAction
PrintGeomInfoAction(edm::ParameterSet const &p)
Definition: PrintGeomInfoAction.cc:33
KineDebug3::count
void count()
Definition: KinematicConstrainedVertexUpdatorT.h:21
PrintGeomInfoAction::dumpRotation_
bool dumpRotation_
Definition: PrintGeomInfoAction.h:51
PrintGeomInfoAction::dumpSolid_
bool dumpSolid_
Definition: PrintGeomInfoAction.h:50
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
PrintGeomInfoAction::dumpLVTree_
bool dumpLVTree_
Definition: PrintGeomInfoAction.h:49
BeginOfRun
Definition: BeginOfRun.h:6
SimWatcher
Definition: SimWatcher.h:33
PrintGeomInfoAction::dumpSummary_
bool dumpSummary_
Definition: PrintGeomInfoAction.h:49
PrintGeomInfoAction::dumpMaterial_
bool dumpMaterial_
Definition: PrintGeomInfoAction.h:49
PrintGeomInfoAction::dumpMaterialList
void dumpMaterialList(std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:187
PrintGeomInfoAction::dumpHierarchyTreePVLV
void dumpHierarchyTreePVLV(std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:231
writedatasetfile.run
run
Definition: writedatasetfile.py:27
PrintGeomInfoAction::dumpSummary
void dumpSummary(std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:150
PrintGeomInfoAction::dumpLV
void dumpLV(G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:277
PrintGeomInfoAction::fHistory_
G4NavigationHistory fHistory_
Definition: PrintGeomInfoAction.h:57
PrintGeomInfoAction::dumpHierarchyLeafPVLV
void dumpHierarchyLeafPVLV(G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:249
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
PrintGeomInfoAction::spacesFromLeafDepth
std::string spacesFromLeafDepth(unsigned int leafDepth)
Definition: PrintGeomInfoAction.cc:404
ParameterSet.h
PrintGeomInfoAction::dumpG4LVTree
void dumpG4LVTree(std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:181
PrintGeomInfoAction::name_
std::string name_
Definition: PrintGeomInfoAction.h:53
PrintGeomInfoAction::theTopPV_
G4VPhysicalVolume * theTopPV_
Definition: PrintGeomInfoAction.h:56
PrintGeomInfoAction::dumpAtts_
bool dumpAtts_
Definition: PrintGeomInfoAction.h:50
PrintGeomInfoAction::countNoTouchables
int countNoTouchables()
Definition: PrintGeomInfoAction.cc:218