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, cscdqm::h::names, and AlCaHLTBitMon_QueryRunRegistry::string.

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

Definition at line 70 of file PrintGeomInfoAction.cc.

70 {}

Member Function Documentation

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

Definition at line 199 of file PrintGeomInfoAction.cc.

References cuy::ii.

199  {
200 
201  int siz = lv->GetNoDaughters();
202  for(int ii = 0; ii < siz; ii++)
203  add1touchable(lv->GetDaughter(ii)->GetLogicalVolume(), ++nTouch);
204 }
void add1touchable(G4LogicalVolume *lv, int &nTouch)
ii
Definition: cuy.py:589
int PrintGeomInfoAction::countNoTouchables ( )
private

Definition at line 191 of file PrintGeomInfoAction.cc.

191  {
192 
193  int nTouch = 0;
194  G4LogicalVolume * lv = getTopLV();
195  add1touchable(lv, nTouch);
196  return nTouch;
197 }
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 174 of file PrintGeomInfoAction.cc.

References cuy::ii.

174  {
175 
176  for (unsigned int ii=0; ii < leafDepth; ii++) out << " ";
177  out << " LV:(" << leafDepth << ") " << lv->GetName() << " (" << count
178  << ")" << G4endl;
179  //--- If a volume is placed n types as daughter of this LV, it should only be counted once
180  std::map<G4LogicalVolume*, unsigned int> lvCount;
181  std::map<G4LogicalVolume*, unsigned int>::const_iterator cite;
182  for (int ii = 0; ii < lv->GetNoDaughters(); ii++) {
183  cite = lvCount.find(lv->GetDaughter(ii)->GetLogicalVolume());
184  if (cite != lvCount.end()) lvCount[cite->first] = (cite->second) + 1;
185  else lvCount.insert(std::pair< G4LogicalVolume*,unsigned int>(lv->GetDaughter(ii)->GetLogicalVolume(),1));
186  }
187  for (cite = lvCount.begin(); cite != lvCount.end(); cite++)
188  dumpG4LVLeaf((cite->first), leafDepth+1, (cite->second), out);
189 }
ii
Definition: cuy.py:589
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 148 of file PrintGeomInfoAction.cc.

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

Definition at line 157 of file PrintGeomInfoAction.cc.

157  {
158 
159  out << " @@@@@@@@@@@@@@@@ DUMPING G4LogicalVolume's Tree " << G4endl;
160  G4LogicalVolume * lv = getTopLV();
161  dumpG4LVLeaf(lv,0,1,out);
162 }
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 224 of file PrintGeomInfoAction.cc.

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

206  {
207 
208  //dumps in the following order:
209  // 1) a LV with details
210  // 2) list of PVs daughters of this LV with details
211  // 3) list of LVs daughters of this LV and for each go to 1)
212 
213  //----- Get top PV
214  G4LogicalVolume* topLV = getTopLV();
215 
216  //----- Dump this leaf (it will recursively dump all the tree)
217  dumpHierarchyLeafPVLV(topLV, 0, out);
218  dumpPV(theTopPV, 0, out);
219 
220  //----- Dump the touchables (it will recursively dump all the tree)
221  if (_dumpTouch) dumpTouch(theTopPV, 0, out);
222 }
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 253 of file PrintGeomInfoAction.cc.

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

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

164  {
165 
166  out << " @@@@@@@@@@@@@@@@ DUMPING G4Material List ";
167  const G4MaterialTable * matTab = G4Material::GetMaterialTable();
168  out << " with " << matTab->size() << " materials " << G4endl;
169  std::vector<G4Material*>::const_iterator matite;
170  for (matite = matTab->begin(); matite != matTab->end(); matite++)
171  out << "Material: " << (*matite) << G4endl;
172 }
void PrintGeomInfoAction::dumpPV ( G4VPhysicalVolume *  pv,
unsigned int  leafDepth,
std::ostream &  out = std::cout 
)
private

Definition at line 313 of file PrintGeomInfoAction.cc.

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

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

Definition at line 391 of file PrintGeomInfoAction.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

391  {
392 
393  std::string spaces = spacesFromLeafDepth(leafDepth);
394  out << spaces << *(sol) << G4endl;
395 }
std::string spacesFromLeafDepth(unsigned int leafDepth)
void PrintGeomInfoAction::dumpSummary ( std::ostream &  out = std::cout)
private

Definition at line 124 of file PrintGeomInfoAction.cc.

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

Definition at line 354 of file PrintGeomInfoAction.cc.

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

354  {
355 
356  std::string spaces = spacesFromLeafDepth(leafDepth);
357  if (leafDepth == 0) fHistory.SetFirstEntry(pv);
358  else fHistory.NewLevel(pv, kNormal, pv->GetCopyNo());
359 
360  G4ThreeVector globalpoint = fHistory.GetTopTransform().Inverse().TransformPoint(G4ThreeVector(0,0,0));
361  G4LogicalVolume * lv = pv->GetLogicalVolume();
362 
363  std::string mother = "World";
364  if (pv->GetMotherLogical()) mother = pv->GetMotherLogical()->GetName();
365  std::string lvname = lv->GetName();
366  lvname.assign(lvname,0,nchar);
367  if (lvname == name)
368  out << leafDepth << spaces << "### VOLUME = " << lv->GetName()
369  << " Copy No " << pv->GetCopyNo() << " in " << mother
370  << " global position of centre " << globalpoint << " (r = "
371  << globalpoint.perp() << ", phi = " << globalpoint.phi()/deg
372  << ")" << G4endl;
373 
374  int NoDaughters = lv->GetNoDaughters();
375  while ((NoDaughters--)>0) {
376  G4VPhysicalVolume * pvD = lv->GetDaughter(NoDaughters);
377  if (!pvD->IsReplicated()) dumpTouch(pvD, leafDepth+1, out);
378  }
379 
380  if (leafDepth > 0) fHistory.BackLevel();
381 }
G4NavigationHistory fHistory
def pv(vc)
Definition: MetAnalyzer.py:6
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 402 of file PrintGeomInfoAction.cc.

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

Definition at line 397 of file PrintGeomInfoAction.cc.

397  {
398 
399  return G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume();
400 }
std::string PrintGeomInfoAction::spacesFromLeafDepth ( unsigned int  leafDepth)
private

Definition at line 383 of file PrintGeomInfoAction.cc.

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

383  {
384 
385  std::string spaces;
386  unsigned int ii;
387  for(ii = 0; ii < leafDepth; ii++) { spaces += " "; }
388  return spaces;
389 }
ii
Definition: cuy.py:589
void PrintGeomInfoAction::update ( const BeginOfJob )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfJob * >.

Definition at line 72 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(), cscdqm::h::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().

72  {
73 
74  if (_dumpSense) {
76  (*job)()->get<IdealGeometryRecord>().get(pDD);
77 
78  G4cout << "PrintGeomInfoAction::Get Printout of Sensitive Volumes "
79  << "for " << names.size() << " Readout Units" << G4endl;
80  for (unsigned int i=0; i<names.size(); i++) {
81  std::string attribute = "ReadOutName";
82  std::string sd = names[i];
84  DDFilteredView fv(*pDD,filter);
85  G4cout << "PrintGeomInfoAction:: Get Filtered view for "
86  << attribute << " = " << sd << G4endl;
87  bool dodet = fv.firstChild();
88 
89  std::string spaces = spacesFromLeafDepth(1);
90 
91  while (dodet) {
92  const DDLogicalPart & log = fv.logicalPart();
93  std::string lvname = log.name().name();
94  DDTranslation tran = fv.translation();
95  std::vector<int> copy = fv.copyNumbers();
96 
97  unsigned int leafDepth = copy.size();
98  G4cout << leafDepth << spaces << "### VOLUME = " << lvname
99  << " Copy No";
100  for (int k=leafDepth-1; k>=0; k--) G4cout << " " << copy[k];
101  G4cout << " Centre at " << tran << " (r = " << tran.Rho()
102  << ", phi = " << tran.phi()/deg << ")" << G4endl;
103  dodet = fv.next();
104  }
105  }
106  }
107 }
const N & name() const
Definition: DDBase.h:78
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:92
std::string spacesFromLeafDepth(unsigned int leafDepth)
int k[5][pyjets_maxn]
double sd
const std::string & name() const
Returns the name.
Definition: DDName.cc:88
void PrintGeomInfoAction::update ( const BeginOfRun )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfRun * >.

Definition at line 109 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().

109  {
110 
111  theTopPV = getTopPV();
112 
115 
116  //---------- Dump list of objects of each class with detail of parameters
119 
120  //---------- Dump LV and PV information
122 }
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 53 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpLV
private

Definition at line 53 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpLVList
private

Definition at line 51 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpLVTree
private

Definition at line 51 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpMaterial
private

Definition at line 52 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpPV
private

Definition at line 54 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpReplica
private

Definition at line 54 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpRotation
private

Definition at line 54 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpSense
private

Definition at line 53 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpSolid
private

Definition at line 53 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpSummary
private

Definition at line 51 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpTouch
private

Definition at line 54 of file PrintGeomInfoAction.h.

G4NavigationHistory PrintGeomInfoAction::fHistory
private

Definition at line 60 of file PrintGeomInfoAction.h.

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

Definition at line 57 of file PrintGeomInfoAction.h.

int PrintGeomInfoAction::nchar
private

Definition at line 56 of file PrintGeomInfoAction.h.

mpvpv PrintGeomInfoAction::thePVTree
private

Definition at line 58 of file PrintGeomInfoAction.h.

G4VPhysicalVolume* PrintGeomInfoAction::theTopPV
private

Definition at line 59 of file PrintGeomInfoAction.h.