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 dumpSolid(G4VSolid* sol, unsigned int leafDepth, std::ostream& out = std::cout);
43  void dumpTouch(G4VPhysicalVolume* pv, unsigned int leafDepth, std::ostream& out = std::cout);
44  void dumpInFile();
45  void getTouch(G4VPhysicalVolume* pv, unsigned int leafDepth, unsigned int copym, std::vector<std::string>& touches);
46  std::string spacesFromLeafDepth(unsigned int leafDepth);
47  G4VPhysicalVolume* getTopPV();
48  G4LogicalVolume* getTopLV();
49 
50 private:
56  int nchar_;
59  std::vector<std::string> names_;
60  G4VPhysicalVolume* theTopPV_;
61  G4NavigationHistory fHistory_;
62 };
63 
64 #endif
PrintGeomInfoAction::fileSolid_
std::string fileSolid_
Definition: PrintGeomInfoAction.h:57
PrintGeomInfoAction::names_
std::vector< std::string > names_
Definition: PrintGeomInfoAction.h:59
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:399
PrintGeomInfoAction::dumpSolid
void dumpSolid(G4VSolid *sol, unsigned int leafDepth, std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:394
gather_cfg.cout
cout
Definition: gather_cfg.py:144
PrintGeomInfoAction::filePV_
std::string filePV_
Definition: PrintGeomInfoAction.h:57
PrintGeomInfoAction::getTopPV
G4VPhysicalVolume * getTopPV()
Definition: PrintGeomInfoAction.cc:536
PrintGeomInfoAction::dumpTouch_
bool dumpTouch_
Definition: PrintGeomInfoAction.h:53
PrintGeomInfoAction
Definition: PrintGeomInfoAction.h:23
PrintGeomInfoAction::dumpPV_
bool dumpPV_
Definition: PrintGeomInfoAction.h:52
PrintGeomInfoAction::dumpG4LVList
void dumpG4LVList(std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:194
PrintGeomInfoAction::getTopLV
G4LogicalVolume * getTopLV()
Definition: PrintGeomInfoAction.cc:540
PrintGeomInfoAction::dumpReplica_
bool dumpReplica_
Definition: PrintGeomInfoAction.h:53
PrintGeomInfoAction::add1touchable
void add1touchable(G4LogicalVolume *lv, int &nTouch)
Definition: PrintGeomInfoAction.cc:246
Observer.h
PrintGeomInfoAction::dumpPV
void dumpPV(G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:353
SimWatcher.h
PrintGeomInfoAction::fileMat_
std::string fileMat_
Definition: PrintGeomInfoAction.h:57
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
PrintGeomInfoAction::dd4hep_
bool dd4hep_
Definition: PrintGeomInfoAction.h:54
PrintGeomInfoAction::~PrintGeomInfoAction
~PrintGeomInfoAction() override
Definition: PrintGeomInfoAction.cc:83
BeginOfJob
Definition: BeginOfJob.h:8
PrintGeomInfoAction::nchar_
int nchar_
Definition: PrintGeomInfoAction.h:56
PrintGeomInfoAction::dumpLVList_
bool dumpLVList_
Definition: PrintGeomInfoAction.h:51
PrintGeomInfoAction::update
void update(const BeginOfJob *job) override
This routine will be called when the appropriate signal arrives.
Definition: PrintGeomInfoAction.cc:85
PrintGeomInfoAction::getTouch
void getTouch(G4VPhysicalVolume *pv, unsigned int leafDepth, unsigned int copym, std::vector< std::string > &touches)
Definition: PrintGeomInfoAction.cc:496
PrintGeomInfoAction::dumpSense_
bool dumpSense_
Definition: PrintGeomInfoAction.h:54
PrintGeomInfoAction::dumpG4LVLeaf
void dumpG4LVLeaf(G4LogicalVolume *lv, unsigned int leafDepth, unsigned int count, std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:217
PrintGeomInfoAction::dumpLV_
bool dumpLV_
Definition: PrintGeomInfoAction.h:52
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PrintGeomInfoAction::PrintGeomInfoAction
PrintGeomInfoAction(edm::ParameterSet const &p)
Definition: PrintGeomInfoAction.cc:42
PrintGeomInfoAction::dumpRotation_
bool dumpRotation_
Definition: PrintGeomInfoAction.h:53
PrintGeomInfoAction::dumpSolid_
bool dumpSolid_
Definition: PrintGeomInfoAction.h:52
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
PrintGeomInfoAction::dumpLVTree_
bool dumpLVTree_
Definition: PrintGeomInfoAction.h:51
BeginOfRun
Definition: BeginOfRun.h:6
SimWatcher
Definition: SimWatcher.h:27
PrintGeomInfoAction::dumpSummary_
bool dumpSummary_
Definition: PrintGeomInfoAction.h:51
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PrintGeomInfoAction::dumpMaterial_
bool dumpMaterial_
Definition: PrintGeomInfoAction.h:51
PrintGeomInfoAction::dumpMaterialList
void dumpMaterialList(std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:208
PrintGeomInfoAction::dumpHierarchyTreePVLV
void dumpHierarchyTreePVLV(std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:252
writedatasetfile.run
run
Definition: writedatasetfile.py:27
PrintGeomInfoAction::dumpSummary
void dumpSummary(std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:171
PrintGeomInfoAction::dumpLV
void dumpLV(G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:298
PrintGeomInfoAction::fHistory_
G4NavigationHistory fHistory_
Definition: PrintGeomInfoAction.h:61
PrintGeomInfoAction::dumpHierarchyLeafPVLV
void dumpHierarchyLeafPVLV(G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:270
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
PrintGeomInfoAction::spacesFromLeafDepth
std::string spacesFromLeafDepth(unsigned int leafDepth)
Definition: PrintGeomInfoAction.cc:527
PrintGeomInfoAction::fileLV_
std::string fileLV_
Definition: PrintGeomInfoAction.h:57
ParameterSet.h
PrintGeomInfoAction::dumpG4LVTree
void dumpG4LVTree(std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:202
PrintGeomInfoAction::name_
std::string name_
Definition: PrintGeomInfoAction.h:55
PrintGeomInfoAction::theTopPV_
G4VPhysicalVolume * theTopPV_
Definition: PrintGeomInfoAction.h:60
PrintGeomInfoAction::fileDetail_
bool fileDetail_
Definition: PrintGeomInfoAction.h:58
PrintGeomInfoAction::dumpAtts_
bool dumpAtts_
Definition: PrintGeomInfoAction.h:52
PrintGeomInfoAction::dumpInFile
void dumpInFile()
Definition: PrintGeomInfoAction.cc:430
PrintGeomInfoAction::countNoTouchables
int countNoTouchables()
Definition: PrintGeomInfoAction.cc:239
PrintGeomInfoAction::fileTouch_
std::string fileTouch_
Definition: PrintGeomInfoAction.h:57