CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PrintMaterialBudgetInfo.h
Go to the documentation of this file.
1 #ifndef SimG4CorePrintGeomInfo_PrintMaterialBudgetInfo_H
2 #define SimG4CorePrintGeomInfo_PrintMaterialBudgetInfo_H
3 
7 
8 #include "G4NavigationHistory.hh"
9 
10 #include <iostream>
11 #include <fstream>
12 #include <vector>
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 
25  public Observer<const BeginOfJob*>,
26  public Observer<const BeginOfRun*> {
27 
28 public:
31 private:
32  void update(const BeginOfJob* job) {};
33  void update(const BeginOfRun* run);
34  void dumpHeader(std::ostream& out = std::cout);
35  void dumpLaTeXHeader(std::ostream& out = std::cout);
36  void dumpHierarchyLeaf(G4VPhysicalVolume* pv, G4LogicalVolume* lv, unsigned int leafDepth,
37  std::ostream& weightOut = std::cout, std::ostream& texOut = std::cout);
38  void printInfo(G4VPhysicalVolume* pv, G4LogicalVolume* lv, unsigned int leafDepth,
39  std::ostream& weightOut = std::cout, std::ostream& texOut = std::cout);
40  void dumpElementMassFraction(std::ostream& elementOut = std::cout);
41  void dumpLaTeXFooter(std::ostream& out = std::cout);
42 
43 private:
44  std::string name;
45  int nchar;
47  G4VPhysicalVolume* theTopPV;
48  G4NavigationHistory fHistory;
50  unsigned int levelFound;
51  std::ofstream weightOutputFile;
52  std::ofstream elementOutputFile;
53  std::ofstream texOutputFile;
54  std::vector<std::string> elementNames;
55  std::vector<double> elementTotalWeight;
56  std::vector<double> elementWeightFraction;
57  //
58  std::string stringLaTeXUnderscore(std::string stringname);
59  std::string stringLaTeXSuperscript(std::string stringname);
60 };
61 
62 #endif
std::multimap< G4LogicalVolume *, G4VPhysicalVolume *, std::less< G4LogicalVolume * > > mmlvpv
std::vector< std::string > elementNames
std::vector< double > elementWeightFraction
std::vector< double > elementTotalWeight
void dumpElementMassFraction(std::ostream &elementOut=std::cout)
void dumpHierarchyLeaf(G4VPhysicalVolume *pv, G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &weightOut=std::cout, std::ostream &texOut=std::cout)
void printInfo(G4VPhysicalVolume *pv, G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &weightOut=std::cout, std::ostream &texOut=std::cout)
PrintMaterialBudgetInfo(edm::ParameterSet const &p)
std::map< G4VPhysicalVolume *, G4VPhysicalVolume *, std::less< G4VPhysicalVolume * > > mpvpv
tuple out
Definition: dbtoconf.py:99
void dumpLaTeXFooter(std::ostream &out=std::cout)
std::string stringLaTeXSuperscript(std::string stringname)
void dumpHeader(std::ostream &out=std::cout)
tuple job
Definition: launcher.py:57
void update(const BeginOfJob *job)
This routine will be called when the appropriate signal arrives.
std::string stringLaTeXUnderscore(std::string stringname)
tuple cout
Definition: gather_cfg.py:121
void dumpLaTeXHeader(std::ostream &out=std::cout)