CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
PrintGeomInfoAction Class Reference

#include <PrintGeomInfoAction.h>

Inheritance diagram for PrintGeomInfoAction:
SimWatcher Observer< const BeginOfJob * > Observer< const BeginOfRun * >

Public Member Functions

 PrintGeomInfoAction (edm::ParameterSet const &p)
 
 ~PrintGeomInfoAction () override
 
- Public Member Functions inherited from SimWatcher
 SimWatcher ()
 
virtual ~SimWatcher ()
 
- Public Member Functions inherited from Observer< const BeginOfJob * >
 Observer ()
 
void slotForUpdate (const BeginOfJob * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const BeginOfRun * >
 Observer ()
 
void slotForUpdate (const BeginOfRun * iT)
 
virtual ~Observer ()
 

Private Member Functions

void add1touchable (G4LogicalVolume *lv, int &nTouch)
 
int countNoTouchables ()
 
void dumpG4LVLeaf (G4LogicalVolume *lv, unsigned int leafDepth, unsigned int count, std::ostream &out=std::cout)
 
void dumpG4LVList (std::ostream &out=std::cout)
 
void dumpG4LVTree (std::ostream &out=std::cout)
 
void dumpHierarchyLeafPVLV (G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
 
void dumpHierarchyTreePVLV (std::ostream &out=std::cout)
 
void dumpLV (G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
 
void dumpMaterialList (std::ostream &out=std::cout)
 
void dumpPV (G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
 
void dumpSolid (G4VSolid *sol, unsigned int leafDepth, std::ostream &out=std::cout)
 
void dumpSummary (std::ostream &out=std::cout)
 
void dumpTouch (G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
 
G4LogicalVolume * getTopLV ()
 
G4VPhysicalVolume * getTopPV ()
 
std::string spacesFromLeafDepth (unsigned int leafDepth)
 
void update (const BeginOfJob *job) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfRun *run) override
 This routine will be called when the appropriate signal arrives. More...
 

Private Attributes

bool _dumpAtts
 
bool _dumpLV
 
bool _dumpLVList
 
bool _dumpLVTree
 
bool _dumpMaterial
 
bool _dumpPV
 
bool _dumpReplica
 
bool _dumpRotation
 
bool _dumpSense
 
bool _dumpSolid
 
bool _dumpSummary
 
bool _dumpTouch
 
G4NavigationHistory fHistory
 
std::string name
 
std::vector< std::string > names
 
int nchar
 
mpvpv thePVTree
 
G4VPhysicalVolume * theTopPV
 

Additional Inherited Members

Detailed Description

Definition at line 24 of file PrintGeomInfoAction.h.

Constructor & Destructor Documentation

PrintGeomInfoAction::PrintGeomInfoAction ( edm::ParameterSet const &  p)

Definition at line 33 of file PrintGeomInfoAction.cc.

References ecalTB2006H4_GenSimDigiReco_cfg::G4cout, edm::ParameterSet::getUntrackedParameter(), mps_fire::i, dataset::name, names, and AlCaHLTBitMon_QueryRunRegistry::string.

33  {
34  _dumpSummary = p.getUntrackedParameter<bool>("DumpSummary", true);
35  _dumpLVTree = p.getUntrackedParameter<bool>("DumpLVTree", true);
36  _dumpMaterial = p.getUntrackedParameter<bool>("DumpMaterial", false);
37  _dumpLVList = p.getUntrackedParameter<bool>("DumpLVList", false);
38  _dumpLV = p.getUntrackedParameter<bool>("DumpLV", false);
39  _dumpSolid = p.getUntrackedParameter<bool>("DumpSolid", false);
40  _dumpAtts = p.getUntrackedParameter<bool>("DumpAttributes", false);
41  _dumpPV = p.getUntrackedParameter<bool>("DumpPV", false);
42  _dumpRotation = p.getUntrackedParameter<bool>("DumpRotation", false);
43  _dumpReplica = p.getUntrackedParameter<bool>("DumpReplica", false);
44  _dumpTouch = p.getUntrackedParameter<bool>("DumpTouch", false);
45  _dumpSense = p.getUntrackedParameter<bool>("DumpSense", false);
46  name = p.getUntrackedParameter<std::string>("Name", "*");
47  nchar = name.find("*");
48  name.assign(name, 0, nchar);
49  names = p.getUntrackedParameter<std::vector<std::string> >("Names");
50  G4cout << "PrintGeomInfoAction:: initialised with verbosity levels:"
51  << " Summary " << _dumpSummary << " LVTree " << _dumpLVTree << " LVList " << _dumpLVList << " Material "
52  << _dumpMaterial << "\n "
53  << " LV " << _dumpLV << " Solid " << _dumpSolid << " Attribs " << _dumpAtts
54  << "\n "
55  << " PV " << _dumpPV << " Rotation " << _dumpRotation << " Replica " << _dumpReplica
56  << "\n "
57  << " Touchable " << _dumpTouch << " for names (0-" << nchar << ") = " << name
58  << "\n "
59  << " Sensitive " << _dumpSense << " for " << names.size() << " namess";
60  for (unsigned int i = 0; i < names.size(); i++)
61  G4cout << " " << names[i];
62  G4cout << G4endl;
63 }
std::vector< std::string > names
PrintGeomInfoAction::~PrintGeomInfoAction ( )
override

Definition at line 65 of file PrintGeomInfoAction.cc.

65 {}

Member Function Documentation

void PrintGeomInfoAction::add1touchable ( G4LogicalVolume *  lv,
int &  nTouch 
)
private

Definition at line 194 of file PrintGeomInfoAction.cc.

References cuy::ii.

194  {
195  int siz = lv->GetNoDaughters();
196  for (int ii = 0; ii < siz; ii++)
197  add1touchable(lv->GetDaughter(ii)->GetLogicalVolume(), ++nTouch);
198 }
void add1touchable(G4LogicalVolume *lv, int &nTouch)
ii
Definition: cuy.py:590
int PrintGeomInfoAction::countNoTouchables ( )
private

Definition at line 187 of file PrintGeomInfoAction.cc.

187  {
188  int nTouch = 0;
189  G4LogicalVolume *lv = getTopLV();
190  add1touchable(lv, nTouch);
191  return nTouch;
192 }
void add1touchable(G4LogicalVolume *lv, int &nTouch)
G4LogicalVolume * getTopLV()
void PrintGeomInfoAction::dumpG4LVLeaf ( G4LogicalVolume *  lv,
unsigned int  leafDepth,
unsigned int  count,
std::ostream &  out = std::cout 
)
private

Definition at line 166 of file PrintGeomInfoAction.cc.

References cuy::ii.

169  {
170  for (unsigned int ii = 0; ii < leafDepth; ii++)
171  out << " ";
172  out << " LV:(" << leafDepth << ") " << lv->GetName() << " (" << count << ")" << G4endl;
173  //--- If a volume is placed n types as daughter of this LV, it should only be counted once
174  std::map<G4LogicalVolume *, unsigned int> lvCount;
175  std::map<G4LogicalVolume *, unsigned int>::const_iterator cite;
176  for (int ii = 0; ii < lv->GetNoDaughters(); ii++) {
177  cite = lvCount.find(lv->GetDaughter(ii)->GetLogicalVolume());
178  if (cite != lvCount.end())
179  lvCount[cite->first] = (cite->second) + 1;
180  else
181  lvCount.insert(std::pair<G4LogicalVolume *, unsigned int>(lv->GetDaughter(ii)->GetLogicalVolume(), 1));
182  }
183  for (cite = lvCount.begin(); cite != lvCount.end(); cite++)
184  dumpG4LVLeaf((cite->first), leafDepth + 1, (cite->second), out);
185 }
ii
Definition: cuy.py:590
void dumpG4LVLeaf(G4LogicalVolume *lv, unsigned int leafDepth, unsigned int count, std::ostream &out=std::cout)
void PrintGeomInfoAction::dumpG4LVList ( std::ostream &  out = std::cout)
private

Definition at line 143 of file PrintGeomInfoAction.cc.

143  {
144  out << " @@@@@@@@@@@@@@@@ DUMPING G4LogicalVolume's List " << G4endl;
145  const G4LogicalVolumeStore *lvs = G4LogicalVolumeStore::GetInstance();
146  std::vector<G4LogicalVolume *>::const_iterator lvcite;
147  for (lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++)
148  out << "LV:" << (*lvcite)->GetName() << "\tMaterial: " << (*lvcite)->GetMaterial()->GetName() << G4endl;
149 }
void PrintGeomInfoAction::dumpG4LVTree ( std::ostream &  out = std::cout)
private

Definition at line 151 of file PrintGeomInfoAction.cc.

151  {
152  out << " @@@@@@@@@@@@@@@@ DUMPING G4LogicalVolume's Tree " << G4endl;
153  G4LogicalVolume *lv = getTopLV();
154  dumpG4LVLeaf(lv, 0, 1, out);
155 }
G4LogicalVolume * getTopLV()
void dumpG4LVLeaf(G4LogicalVolume *lv, unsigned int leafDepth, unsigned int count, std::ostream &out=std::cout)
void PrintGeomInfoAction::dumpHierarchyLeafPVLV ( G4LogicalVolume *  lv,
unsigned int  leafDepth,
std::ostream &  out = std::cout 
)
private

Definition at line 218 of file PrintGeomInfoAction.cc.

218  {
219  //----- Dump this LV
220  dumpLV(lv, leafDepth, out);
221 
222  //----- Get LV daughters from list of PV daughters
223  mmlvpv lvpvDaughters;
224  std::set<G4LogicalVolume *> lvDaughters;
225  int NoDaughters = lv->GetNoDaughters();
226  while ((NoDaughters--) > 0) {
227  G4VPhysicalVolume *pvD = lv->GetDaughter(NoDaughters);
228  lvpvDaughters.insert(mmlvpv::value_type(pvD->GetLogicalVolume(), pvD));
229  lvDaughters.insert(pvD->GetLogicalVolume());
230  }
231 
232  std::set<G4LogicalVolume *>::const_iterator scite;
233  mmlvpv::const_iterator mmcite;
234 
235  //----- Dump daughters PV and LV
236  for (scite = lvDaughters.begin(); scite != lvDaughters.end(); scite++) {
237  std::pair<mmlvpv::iterator, mmlvpv::iterator> mmER = lvpvDaughters.equal_range(*scite);
238  //----- Dump daughters PV of this LV
239  for (mmcite = mmER.first; mmcite != mmER.second; mmcite++)
240  dumpPV((*mmcite).second, leafDepth + 1, out);
241  //----- Dump daughters LV
242  dumpHierarchyLeafPVLV(*scite, leafDepth + 1, out);
243  }
244 }
std::multimap< G4LogicalVolume *, G4VPhysicalVolume *, std::less< G4LogicalVolume * > > mmlvpv
void dumpPV(G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
void dumpLV(G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
void dumpHierarchyLeafPVLV(G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
void PrintGeomInfoAction::dumpHierarchyTreePVLV ( std::ostream &  out = std::cout)
private

Definition at line 200 of file PrintGeomInfoAction.cc.

200  {
201  //dumps in the following order:
202  // 1) a LV with details
203  // 2) list of PVs daughters of this LV with details
204  // 3) list of LVs daughters of this LV and for each go to 1)
205 
206  //----- Get top PV
207  G4LogicalVolume *topLV = getTopLV();
208 
209  //----- Dump this leaf (it will recursively dump all the tree)
210  dumpHierarchyLeafPVLV(topLV, 0, out);
211  dumpPV(theTopPV, 0, out);
212 
213  //----- Dump the touchables (it will recursively dump all the tree)
214  if (_dumpTouch)
215  dumpTouch(theTopPV, 0, out);
216 }
void dumpPV(G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
G4VPhysicalVolume * theTopPV
void dumpHierarchyLeafPVLV(G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
G4LogicalVolume * getTopLV()
void dumpTouch(G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
void PrintGeomInfoAction::dumpLV ( G4LogicalVolume *  lv,
unsigned int  leafDepth,
std::ostream &  out = std::cout 
)
private

Definition at line 246 of file PrintGeomInfoAction.cc.

References MillePedeFileConverter_cfg::out, and AlCaHLTBitMon_QueryRunRegistry::string.

246  {
247  std::string spaces = spacesFromLeafDepth(leafDepth);
248 
249  //----- dump name
250  if (_dumpLV) {
251  out << leafDepth << spaces << "$$$ VOLUME = " << lv->GetName() << " Solid: " << lv->GetSolid()->GetName()
252  << " MATERIAL: " << lv->GetMaterial()->GetName() << G4endl;
253  if (_dumpSolid)
254  dumpSolid(lv->GetSolid(), leafDepth, out); //----- dump solid
255 
256  //----- dump LV info
257  //--- material
258  if (_dumpAtts) {
259  //--- Visualisation attributes
260  const G4VisAttributes *fVA = lv->GetVisAttributes();
261  if (fVA != nullptr) {
262  out << spaces << " VISUALISATION ATTRIBUTES: " << G4endl;
263  out << spaces << " IsVisible " << fVA->IsVisible() << G4endl;
264  out << spaces << " IsDaughtersInvisible " << fVA->IsDaughtersInvisible() << G4endl;
265  out << spaces << " Colour " << fVA->GetColour() << G4endl;
266  out << spaces << " LineStyle " << fVA->GetLineStyle() << G4endl;
267  out << spaces << " LineWidth " << fVA->GetLineWidth() << G4endl;
268  out << spaces << " IsForceDrawingStyle " << fVA->IsForceDrawingStyle() << G4endl;
269  out << spaces << " ForcedDrawingStyle " << fVA->GetForcedDrawingStyle() << G4endl;
270  }
271 
272  //--- User Limits
273  G4UserLimits *fUL = lv->GetUserLimits();
274  G4Track dummy;
275  if (fUL != nullptr) {
276  out << spaces << " MaxAllowedStep " << fUL->GetMaxAllowedStep(dummy) << G4endl;
277  out << spaces << " UserMaxTrackLength " << fUL->GetUserMaxTrackLength(dummy) << G4endl;
278  out << spaces << " UserMaxTime " << fUL->GetUserMaxTime(dummy) << G4endl;
279  out << spaces << " UserMinEkine " << fUL->GetUserMinEkine(dummy) << G4endl;
280  out << spaces << " UserMinRange " << fUL->GetUserMinRange(dummy) << G4endl;
281  }
282 
283  //--- other LV info
284  if (lv->GetSensitiveDetector())
285  out << spaces << " IS SENSITIVE DETECTOR " << G4endl;
286  if (lv->GetFieldManager())
287  out << spaces << " FIELD ON " << G4endl;
288 
289  // Pointer (possibly NULL) to optimisation info objects.
290  out << spaces << " Quality for optimisation, average number of voxels to be spent per content "
291  << lv->GetSmartless() << G4endl;
292 
293  // Pointer (possibly NULL) to G4FastSimulationManager object.
294  if (lv->GetFastSimulationManager())
295  out << spaces << " Logical Volume is an envelope for a FastSimulationManager " << G4endl;
296  out << spaces << " Weight used in the event biasing technique = " << lv->GetBiasWeight() << G4endl;
297  }
298  }
299 }
void dumpSolid(G4VSolid *sol, unsigned int leafDepth, std::ostream &out=std::cout)
std::string spacesFromLeafDepth(unsigned int leafDepth)
void PrintGeomInfoAction::dumpMaterialList ( std::ostream &  out = std::cout)
private

Definition at line 157 of file PrintGeomInfoAction.cc.

157  {
158  out << " @@@@@@@@@@@@@@@@ DUMPING G4Material List ";
159  const G4MaterialTable *matTab = G4Material::GetMaterialTable();
160  out << " with " << matTab->size() << " materials " << G4endl;
161  std::vector<G4Material *>::const_iterator matite;
162  for (matite = matTab->begin(); matite != matTab->end(); matite++)
163  out << "Material: " << (*matite) << G4endl;
164 }
void PrintGeomInfoAction::dumpPV ( G4VPhysicalVolume *  pv,
unsigned int  leafDepth,
std::ostream &  out = std::cout 
)
private

Definition at line 301 of file PrintGeomInfoAction.cc.

References PFRecoTauDiscriminationByIsolation_cfi::offset, AlCaHLTBitMon_QueryRunRegistry::string, and ApeEstimator_cff::width.

301  {
302  std::string spaces = spacesFromLeafDepth(leafDepth);
303 
304  //----- PV info
305  if (_dumpPV) {
306  std::string mother = "World";
307  if (pv->GetMotherLogical())
308  mother = pv->GetMotherLogical()->GetName();
309  out << leafDepth << spaces << "### VOLUME = " << pv->GetName() << " Copy No " << pv->GetCopyNo() << " in " << mother
310  << " at " << pv->GetTranslation();
311  }
312  if (!pv->IsReplicated()) {
313  if (_dumpPV) {
314  if (pv->GetRotation() == nullptr)
315  out << " with no rotation" << G4endl;
316  else if (!_dumpRotation)
317  out << " with rotation" << G4endl; //just rotation name
318  else
319  out << " with rotation " << *(pv->GetRotation()) << G4endl;
320  }
321  } else {
322  if (_dumpReplica) {
323  out << spaces << " It is replica: " << G4endl;
324  EAxis axis;
325  int nReplicas;
326  double width;
327  double offset;
328  bool consuming;
329  pv->GetReplicationData(axis, nReplicas, width, offset, consuming);
330  out << spaces << " axis " << axis << G4endl << spaces << " nReplicas " << nReplicas << G4endl;
331  if (pv->GetParameterisation() != nullptr)
332  out << spaces << " It is parameterisation " << G4endl;
333  else
334  out << spaces << " width " << width << G4endl << spaces << " offset " << offset << G4endl << spaces
335  << " consuming" << consuming << G4endl;
336  if (pv->GetParameterisation() != nullptr)
337  out << spaces << " It is parameterisation " << G4endl;
338  }
339  }
340 }
def pv(vc)
Definition: MetAnalyzer.py:7
std::string spacesFromLeafDepth(unsigned int leafDepth)
void PrintGeomInfoAction::dumpSolid ( G4VSolid *  sol,
unsigned int  leafDepth,
std::ostream &  out = std::cout 
)
private

Definition at line 382 of file PrintGeomInfoAction.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

382  {
383  std::string spaces = spacesFromLeafDepth(leafDepth);
384  out << spaces << *(sol) << G4endl;
385 }
std::string spacesFromLeafDepth(unsigned int leafDepth)
void PrintGeomInfoAction::dumpSummary ( std::ostream &  out = std::cout)
private

Definition at line 120 of file PrintGeomInfoAction.cc.

120  {
121  //---------- Dump number of objects of each class
122  out << " @@@@@@@@@@@@@@@@@@ Dumping G4 geometry objects Summary " << G4endl;
123  if (theTopPV == nullptr) {
124  out << " No volume created " << G4endl;
125  return;
126  }
127  out << " @@@ Geometry built inside world volume: " << theTopPV->GetName() << G4endl;
128  // Get number of solids (< # LV if several LV share a solid)
129  const G4LogicalVolumeStore *lvs = G4LogicalVolumeStore::GetInstance();
130  std::vector<G4LogicalVolume *>::const_iterator lvcite;
131  std::set<G4VSolid *> theSolids;
132  for (lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++)
133  theSolids.insert((*lvcite)->GetSolid());
134  out << " Number of G4VSolid's: " << theSolids.size() << G4endl;
135  out << " Number of G4LogicalVolume's: " << lvs->size() << G4endl;
136  const G4PhysicalVolumeStore *pvs = G4PhysicalVolumeStore::GetInstance();
137  out << " Number of G4VPhysicalVolume's: " << pvs->size() << G4endl;
138  out << " Number of Touchable's: " << countNoTouchables() << G4endl;
139  const G4MaterialTable *matTab = G4Material::GetMaterialTable();
140  out << " Number of G4Material's: " << matTab->size() << G4endl;
141 }
G4VPhysicalVolume * theTopPV
void PrintGeomInfoAction::dumpTouch ( G4VPhysicalVolume *  pv,
unsigned int  leafDepth,
std::ostream &  out = std::cout 
)
private

Definition at line 342 of file PrintGeomInfoAction.cc.

References dataset::name, and AlCaHLTBitMon_QueryRunRegistry::string.

342  {
343  std::string spaces = spacesFromLeafDepth(leafDepth);
344  if (leafDepth == 0)
345  fHistory.SetFirstEntry(pv);
346  else
347  fHistory.NewLevel(pv, kNormal, pv->GetCopyNo());
348 
349  G4ThreeVector globalpoint = fHistory.GetTopTransform().Inverse().TransformPoint(G4ThreeVector(0, 0, 0));
350  G4LogicalVolume *lv = pv->GetLogicalVolume();
351 
352  std::string mother = "World";
353  if (pv->GetMotherLogical())
354  mother = pv->GetMotherLogical()->GetName();
355  std::string lvname = lv->GetName();
356  lvname.assign(lvname, 0, nchar);
357  if (lvname == name)
358  out << leafDepth << spaces << "### VOLUME = " << lv->GetName() << " Copy No " << pv->GetCopyNo() << " in " << mother
359  << " global position of centre " << globalpoint << " (r = " << globalpoint.perp()
360  << ", phi = " << globalpoint.phi() / deg << ")" << G4endl;
361 
362  int NoDaughters = lv->GetNoDaughters();
363  while ((NoDaughters--) > 0) {
364  G4VPhysicalVolume *pvD = lv->GetDaughter(NoDaughters);
365  if (!pvD->IsReplicated())
366  dumpTouch(pvD, leafDepth + 1, out);
367  }
368 
369  if (leafDepth > 0)
370  fHistory.BackLevel();
371 }
G4NavigationHistory fHistory
def pv(vc)
Definition: MetAnalyzer.py:7
std::string spacesFromLeafDepth(unsigned int leafDepth)
void dumpTouch(G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
G4LogicalVolume * PrintGeomInfoAction::getTopLV ( )
private

Definition at line 391 of file PrintGeomInfoAction.cc.

391 { return theTopPV->GetLogicalVolume(); }
G4VPhysicalVolume * theTopPV
G4VPhysicalVolume * PrintGeomInfoAction::getTopPV ( )
private

Definition at line 387 of file PrintGeomInfoAction.cc.

387  {
388  return G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume();
389 }
std::string PrintGeomInfoAction::spacesFromLeafDepth ( unsigned int  leafDepth)
private

Definition at line 373 of file PrintGeomInfoAction.cc.

References cuy::ii, and AlCaHLTBitMon_QueryRunRegistry::string.

373  {
374  std::string spaces;
375  unsigned int ii;
376  for (ii = 0; ii < leafDepth; ii++) {
377  spaces += " ";
378  }
379  return spaces;
380 }
ii
Definition: cuy.py:590
void PrintGeomInfoAction::update ( const BeginOfJob )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfJob * >.

Definition at line 67 of file PrintGeomInfoAction.cc.

References popcon2dropbox::copy(), DDFilteredView::copyNumbers(), ALCARECOTkAlBeamHalo_cff::filter, DDFilteredView::firstChild(), ecalTB2006H4_GenSimDigiReco_cfg::G4cout, mps_fire::i, gen::k, cmsBatch::log, DDFilteredView::logicalPart(), DDName::name(), DDBase< N, C >::name(), names, DDFilteredView::next(), sd, AlCaHLTBitMon_QueryRunRegistry::string, and DDFilteredView::translation().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

67  {
68  if (_dumpSense) {
70  (*job)()->get<IdealGeometryRecord>().get(pDD);
71 
72  G4cout << "PrintGeomInfoAction::Get Printout of Sensitive Volumes "
73  << "for " << names.size() << " Readout Units" << G4endl;
74  for (unsigned int i = 0; i < names.size(); i++) {
75  std::string attribute = "ReadOutName";
76  std::string sd = names[i];
77  DDSpecificsMatchesValueFilter filter{DDValue(attribute, sd, 0)};
78  DDFilteredView fv(*pDD, filter);
79  G4cout << "PrintGeomInfoAction:: Get Filtered view for " << attribute << " = " << sd << G4endl;
80  bool dodet = fv.firstChild();
81 
82  std::string spaces = spacesFromLeafDepth(1);
83 
84  while (dodet) {
85  const DDLogicalPart &log = fv.logicalPart();
86  std::string lvname = log.name().name();
87  DDTranslation tran = fv.translation();
88  std::vector<int> copy = fv.copyNumbers();
89 
90  unsigned int leafDepth = copy.size();
91  G4cout << leafDepth << spaces << "### VOLUME = " << lvname << " Copy No";
92  for (int k = leafDepth - 1; k >= 0; k--)
93  G4cout << " " << copy[k];
94  G4cout << " Centre at " << tran << " (r = " << tran.Rho() << ", phi = " << tran.phi() / deg << ")" << G4endl;
95  dodet = fv.next();
96  }
97  }
98  }
99 }
const N & name() const
Definition: DDBase.h:74
def copy(args, dbName)
std::vector< std::string > names
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
std::string spacesFromLeafDepth(unsigned int leafDepth)
int k[5][pyjets_maxn]
double sd
const std::string & name() const
Returns the name.
Definition: DDName.cc:53
void PrintGeomInfoAction::update ( const BeginOfRun )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfRun * >.

Definition at line 101 of file PrintGeomInfoAction.cc.

References ecalTB2006H4_GenSimDigiReco_cfg::G4cout.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

101  {
102  theTopPV = getTopPV();
103 
104  if (_dumpSummary)
106  if (_dumpLVTree)
108 
109  //---------- Dump list of objects of each class with detail of parameters
110  if (_dumpMaterial)
112  if (_dumpLVList)
114 
115  //---------- Dump LV and PV information
116  if (_dumpLV || _dumpPV || _dumpTouch)
118 }
void dumpMaterialList(std::ostream &out=std::cout)
void dumpSummary(std::ostream &out=std::cout)
G4VPhysicalVolume * theTopPV
void dumpHierarchyTreePVLV(std::ostream &out=std::cout)
void dumpG4LVTree(std::ostream &out=std::cout)
G4VPhysicalVolume * getTopPV()
void dumpG4LVList(std::ostream &out=std::cout)

Member Data Documentation

bool PrintGeomInfoAction::_dumpAtts
private

Definition at line 52 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpLV
private

Definition at line 52 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpLVList
private

Definition at line 50 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpLVTree
private

Definition at line 50 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpMaterial
private

Definition at line 51 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpPV
private

Definition at line 53 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpReplica
private

Definition at line 53 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpRotation
private

Definition at line 53 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpSense
private

Definition at line 52 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpSolid
private

Definition at line 52 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpSummary
private

Definition at line 50 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpTouch
private

Definition at line 53 of file PrintGeomInfoAction.h.

G4NavigationHistory PrintGeomInfoAction::fHistory
private

Definition at line 59 of file PrintGeomInfoAction.h.

std::string PrintGeomInfoAction::name
private
std::vector<std::string> PrintGeomInfoAction::names
private

Definition at line 56 of file PrintGeomInfoAction.h.

int PrintGeomInfoAction::nchar
private

Definition at line 55 of file PrintGeomInfoAction.h.

mpvpv PrintGeomInfoAction::thePVTree
private

Definition at line 57 of file PrintGeomInfoAction.h.

G4VPhysicalVolume* PrintGeomInfoAction::theTopPV
private

Definition at line 58 of file PrintGeomInfoAction.h.