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_;
58  std::vector<std::string> names_;
59  G4VPhysicalVolume* theTopPV_;
60  G4NavigationHistory fHistory_;
61 };
62 
63 #endif
PrintGeomInfoAction::fileSolid_
std::string fileSolid_
Definition: PrintGeomInfoAction.h:57
PrintGeomInfoAction::names_
std::vector< std::string > names_
Definition: PrintGeomInfoAction.h:58
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:398
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:393
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:515
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:193
PrintGeomInfoAction::getTopLV
G4LogicalVolume * getTopLV()
Definition: PrintGeomInfoAction.cc:519
PrintGeomInfoAction::dumpReplica_
bool dumpReplica_
Definition: PrintGeomInfoAction.h:53
PrintGeomInfoAction::add1touchable
void add1touchable(G4LogicalVolume *lv, int &nTouch)
Definition: PrintGeomInfoAction.cc:245
Observer.h
PrintGeomInfoAction::dumpPV
void dumpPV(G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:352
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:82
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:84
PrintGeomInfoAction::getTouch
void getTouch(G4VPhysicalVolume *pv, unsigned int leafDepth, unsigned int copym, std::vector< std::string > &touches)
Definition: PrintGeomInfoAction.cc:475
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:216
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PrintGeomInfoAction::dumpLV_
bool dumpLV_
Definition: PrintGeomInfoAction.h:52
edm::ParameterSet
Definition: ParameterSet.h:47
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
PrintGeomInfoAction::dumpMaterial_
bool dumpMaterial_
Definition: PrintGeomInfoAction.h:51
PrintGeomInfoAction::dumpMaterialList
void dumpMaterialList(std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:207
PrintGeomInfoAction::dumpHierarchyTreePVLV
void dumpHierarchyTreePVLV(std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:251
writedatasetfile.run
run
Definition: writedatasetfile.py:27
PrintGeomInfoAction::dumpSummary
void dumpSummary(std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:170
PrintGeomInfoAction::dumpLV
void dumpLV(G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:297
PrintGeomInfoAction::fHistory_
G4NavigationHistory fHistory_
Definition: PrintGeomInfoAction.h:60
PrintGeomInfoAction::dumpHierarchyLeafPVLV
void dumpHierarchyLeafPVLV(G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:269
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
PrintGeomInfoAction::spacesFromLeafDepth
std::string spacesFromLeafDepth(unsigned int leafDepth)
Definition: PrintGeomInfoAction.cc:506
PrintGeomInfoAction::fileLV_
std::string fileLV_
Definition: PrintGeomInfoAction.h:57
ParameterSet.h
PrintGeomInfoAction::dumpG4LVTree
void dumpG4LVTree(std::ostream &out=std::cout)
Definition: PrintGeomInfoAction.cc:201
PrintGeomInfoAction::name_
std::string name_
Definition: PrintGeomInfoAction.h:55
PrintGeomInfoAction::theTopPV_
G4VPhysicalVolume * theTopPV_
Definition: PrintGeomInfoAction.h:59
PrintGeomInfoAction::dumpAtts_
bool dumpAtts_
Definition: PrintGeomInfoAction.h:52
PrintGeomInfoAction::dumpInFile
void dumpInFile()
Definition: PrintGeomInfoAction.cc:429
PrintGeomInfoAction::countNoTouchables
int countNoTouchables()
Definition: PrintGeomInfoAction.cc:238
PrintGeomInfoAction::fileTouch_
std::string fileTouch_
Definition: PrintGeomInfoAction.h:57