Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4tgbGeometryDumper Class Reference

#include <G4tgbGeometryDumper.hh>

Public Member Functions

 ~G4tgbGeometryDumper ()
 
void DumpGeometry (const G4String &fname)
 
G4VPhysicalVolumeGetTopPhysVol ()
 
void DumpPhysVol (G4VPhysicalVolume *pv)
 
void DumpPVPlacement (G4VPhysicalVolume *pv, const G4String &lvName, G4int copyNo=-999)
 
void DumpPVParameterised (G4PVParameterised *pv)
 
void DumpPVReplica (G4PVReplica *pv, const G4String &lvName)
 
G4String DumpLogVol (G4LogicalVolume *lv, G4String extraName="", G4VSolid *solid=0, G4Material *mate=0)
 
G4String DumpMaterial (G4Material *mat)
 
void DumpElement (G4Element *ele)
 
void DumpIsotope (G4Isotope *ele)
 
G4String DumpSolid (G4VSolid *solid, const G4String &extraName="")
 
void DumpBooleanVolume (const G4String &solidType, G4VSolid *so)
 
void DumpSolidParams (G4VSolid *so)
 
std::vector< G4doubleGetSolidParams (const G4VSolid *so)
 
void DumpPolySections (G4int zPlanes, G4double *z, G4double *rmin, G4double *rmax)
 
G4String DumpRotationMatrix (G4RotationMatrix *rotm)
 

Static Public Member Functions

static G4tgbGeometryDumperGetInstance ()
 

Detailed Description

Definition at line 56 of file G4tgbGeometryDumper.hh.

Constructor & Destructor Documentation

G4tgbGeometryDumper::~G4tgbGeometryDumper ( )

Definition at line 136 of file G4tgbGeometryDumper.cc.

137 {
138 }

Member Function Documentation

void G4tgbGeometryDumper::DumpBooleanVolume ( const G4String solidType,
G4VSolid so 
)

Definition at line 700 of file G4tgbGeometryDumper.cc.

702 {
703  G4BooleanSolid * bso = dynamic_cast < G4BooleanSolid * > (so);
704  if (!bso) { return; }
705  G4VSolid* solid0 = bso->GetConstituentSolid( 0 );
706  G4VSolid* solid1 = bso->GetConstituentSolid( 1 );
707  G4DisplacedSolid* solid1Disp = 0;
708  G4bool displaced = dynamic_cast<G4DisplacedSolid*>(solid1);
709  if( displaced )
710  {
711  solid1Disp = dynamic_cast<G4DisplacedSolid*>(solid1);
712  if (solid1Disp) { solid1 = solid1Disp->GetConstituentMovedSolid(); }
713  }
714  DumpSolid( solid0 );
715  DumpSolid( solid1 );
716 
717  G4String rotName;
719  if( displaced )
720  {
721  pos = solid1Disp->GetObjectTranslation(); // translation is of mother frame
722  rotName = DumpRotationMatrix( new G4RotationMatrix( (solid1Disp->
723  GetTransform().NetRotation()).inverse() ) );
724  }
725  else // no displacement
726  {
727  rotName = DumpRotationMatrix( new G4RotationMatrix );
728  pos = G4ThreeVector();
729  }
730 
731  G4String bsoName = GetObjectName(so,theSolids);
732  if( theSolids.find( bsoName ) != theSolids.end() ) return; // alredy dumped
733  G4String solid0Name = FindSolidName( solid0 );
734  G4String solid1Name = FindSolidName( solid1 );
735 
736  (*theFile) << ":SOLID "
737  << AddQuotes(bsoName) << " "
738  << AddQuotes(solidType) << " "
739  << AddQuotes(solid0Name) << " "
740  << AddQuotes(solid1Name) << " "
741  << AddQuotes(rotName) << " "
742  << approxTo0(pos.x()) << " "
743  << approxTo0(pos.y()) << " "
744  << approxTo0(pos.z()) << " " << G4endl;
745 
746  theSolids[bsoName] = bso;
747 }
CLHEP::Hep3Vector G4ThreeVector
double x() const
CLHEP::HepRotation G4RotationMatrix
G4ThreeVector GetObjectTranslation() const
double z() const
bool G4bool
Definition: G4Types.hh:79
virtual const G4VSolid * GetConstituentSolid(G4int no) const
G4String DumpRotationMatrix(G4RotationMatrix *rotm)
G4VSolid * GetConstituentMovedSolid() const
double y() const
#define G4endl
Definition: G4ios.hh:61
G4String DumpSolid(G4VSolid *solid, const G4String &extraName="")
static const G4double pos

Here is the call graph for this function:

Here is the caller graph for this function:

void G4tgbGeometryDumper::DumpElement ( G4Element ele)

Definition at line 580 of file G4tgbGeometryDumper.cc.

581 {
582  G4String elemName = GetObjectName(ele,theElements);
583 
584  if( theElements.find( elemName ) != theElements.end() ) // alredy dumped
585  {
586  return;
587  }
588 
589  //--- Add symbol name: Material mixtures store the components as elements
590  // (even if the input are materials), but without symbol
591  //
592  G4String symbol = ele->GetSymbol();
593  if( symbol == "" || symbol == " " )
594  {
595  symbol = elemName;
596  }
597 
598  if( ele->GetNumberOfIsotopes() == 0 )
599  {
600  (*theFile) << ":ELEM " << AddQuotes(elemName) << " "
601  << AddQuotes(symbol) << " " << ele->GetZ() << " "
602  << ele->GetA()/(g/mole) << " " << G4endl;
603  }
604  else
605  {
606  const G4IsotopeVector* isots = ele->GetIsotopeVector();
607  for (size_t ii = 0; ii < ele->GetNumberOfIsotopes(); ii++)
608  {
609  DumpIsotope( (*isots)[ii] );
610  }
611 
612  (*theFile) << ":ELEM_FROM_ISOT " << AddQuotes(elemName) << " "
613  << AddQuotes(symbol) << " " << ele->GetNumberOfIsotopes()
614  << G4endl;
615  const G4double* fractions = ele->GetRelativeAbundanceVector();
616  for (size_t ii = 0; ii < ele->GetNumberOfIsotopes(); ii++)
617  {
618  (*theFile) << " "
619  << AddQuotes(GetObjectName((*isots)[ii],theIsotopes)) << " "
620  << fractions[ii] << G4endl;
621  }
622  }
623  theElements[elemName] = ele;
624 }
size_t GetNumberOfIsotopes() const
Definition: G4Element.hh:159
std::vector< G4Isotope * > G4IsotopeVector
void DumpIsotope(G4Isotope *ele)
const G4String & GetSymbol() const
Definition: G4Element.hh:128
G4double GetZ() const
Definition: G4Element.hh:131
G4double GetA() const
Definition: G4Element.hh:139
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5205
G4double * GetRelativeAbundanceVector() const
Definition: G4Element.hh:167
G4IsotopeVector * GetIsotopeVector() const
Definition: G4Element.hh:163
static const G4double ele
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static constexpr double mole
Definition: G4SIunits.hh:286

Here is the call graph for this function:

Here is the caller graph for this function:

void G4tgbGeometryDumper::DumpGeometry ( const G4String fname)

Definition at line 101 of file G4tgbGeometryDumper.cc.

102 {
103  theFile = new std::ofstream(fname);
104 
106  DumpPhysVol( pv ); // dump volume and recursively it will dump all hierarchy
107 }
void DumpPhysVol(G4VPhysicalVolume *pv)
G4VPhysicalVolume * GetTopPhysVol()

Here is the call graph for this function:

Here is the caller graph for this function:

void G4tgbGeometryDumper::DumpIsotope ( G4Isotope ele)

Definition at line 628 of file G4tgbGeometryDumper.cc.

629 {
630  G4String isotName = GetObjectName(isot,theIsotopes);
631  if( theIsotopes.find( isotName ) != theIsotopes.end() ) // alredy dumped
632  {
633  return;
634  }
635 
636  (*theFile) << ":ISOT " << AddQuotes(isotName) << " "
637  << isot->GetZ() << " " << isot->GetN() << " "
638  << isot->GetA()/(g/mole) << " " << G4endl;
639 
640  theIsotopes[isotName] = isot;
641 }
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5205
#define G4endl
Definition: G4ios.hh:61
static constexpr double mole
Definition: G4SIunits.hh:286

Here is the call graph for this function:

Here is the caller graph for this function:

G4String G4tgbGeometryDumper::DumpLogVol ( G4LogicalVolume lv,
G4String  extraName = "",
G4VSolid solid = 0,
G4Material mate = 0 
)

Definition at line 462 of file G4tgbGeometryDumper.cc.

464 {
465  G4String lvName;
466 
467  if( extraName == "" ) //--- take out the '_refl' in the name
468  {
469  lvName = GetObjectName(lv,theLogVols);
470  }
471  else
472  {
473  lvName = lv->GetName()+extraName;
474  }
475 
476  if( theLogVols.find( lvName ) != theLogVols.end() ) // alredy dumped
477  {
478  return lvName;
479  }
480 
481  if( !solid ) { solid = lv->GetSolid(); }
482 
483  //---- Dump solid
484  G4String solidName = DumpSolid( solid, extraName );
485 
486  //---- Dump material
487  if( !mate ) { mate = lv->GetMaterial(); }
488  G4String mateName = DumpMaterial( mate );
489 
490  //---- Dump logical volume (solid + material)
491  (*theFile) << ":VOLU " << SubstituteRefl(AddQuotes(lvName)) << " "
492  << SupressRefl(AddQuotes(solidName))
493  << " " << AddQuotes(mateName) << G4endl;
494 
495  theLogVols[lvName] = lv;
496 
497  return lvName;
498 }
G4Material * GetMaterial() const
G4String DumpMaterial(G4Material *mat)
G4VSolid * GetSolid() const
#define G4endl
Definition: G4ios.hh:61
G4String DumpSolid(G4VSolid *solid, const G4String &extraName="")
const G4String & GetName() const

Here is the call graph for this function:

Here is the caller graph for this function:

G4String G4tgbGeometryDumper::DumpMaterial ( G4Material mat)

Definition at line 502 of file G4tgbGeometryDumper.cc.

503 {
504  G4String mateName = GetObjectName(mat,theMaterials);
505  if( theMaterials.find( mateName ) != theMaterials.end() ) // alredy dumped
506  {
507  return mateName;
508  }
509 
510  size_t numElements = mat->GetNumberOfElements();
511  G4double density = mat->GetDensity()/g*cm3;
512 
513 
514  // start tag
515  //
516  if (numElements == 1)
517  {
518  (*theFile) << ":MATE " << AddQuotes(mateName) << " "
519  << mat->GetZ() << " " << mat->GetA()/(g/mole) << " "
520  << density << G4endl;
521  }
522  else
523  {
524  const G4ElementVector* elems = mat->GetElementVector();
525  const G4double* fractions = mat->GetFractionVector();
526  for (size_t ii = 0; ii < numElements; ii++)
527  {
528  DumpElement( (*elems)[ii] );
529  }
530 
531  (*theFile) << ":MIXT "<< AddQuotes(mateName) << " "
532  << density << " " << numElements << G4endl;
533  // close start element tag and get ready to do composit "parts"
534  for (size_t ii = 0; ii < numElements; ii++)
535  {
536  (*theFile) << " "
537  << AddQuotes(GetObjectName((*elems)[ii],theElements)) << " "
538  << fractions[ii] << G4endl;
539  }
540 
541  }
542 
543  (*theFile) << ":MATE_MEE " << AddQuotes(mateName) << " "
545  << "*eV" << G4endl;
546 
547  (*theFile) << ":MATE_TEMPERATURE " << AddQuotes(mateName) << " "
548  << mat->GetTemperature()/kelvin << "*kelvin" << G4endl;
549 
550  (*theFile) << ":MATE_PRESSURE " << AddQuotes(mateName) << " "
551  << mat->GetPressure()/atmosphere << "*atmosphere" << G4endl;
552 
553  G4State state = mat->GetState();
554  G4String stateStr;
555  switch (state) {
556  case kStateUndefined:
557  stateStr = "Undefined";
558  break;
559  case kStateSolid:
560  stateStr = "Solid";
561  break;
562  case kStateLiquid:
563  stateStr = "Liquid";
564  break;
565  case kStateGas:
566  stateStr = "Gas";
567  break;
568  }
569 
570  (*theFile) << ":MATE_STATE " << AddQuotes(mateName) << " "
571  << stateStr << G4endl;
572 
573  theMaterials[mateName] = mat;
574 
575  return mateName;
576 }
G4double GetPressure() const
Definition: G4Material.hh:183
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:226
G4double GetZ() const
Definition: G4Material.cc:623
std::vector< G4Element * > G4ElementVector
G4State
Definition: G4Material.hh:114
G4double GetDensity() const
Definition: G4Material.hh:180
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:190
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5205
static constexpr double eV
Definition: G4SIunits.hh:215
static constexpr double kelvin
Definition: G4SIunits.hh:281
static constexpr double cm3
Definition: G4SIunits.hh:121
G4double GetA() const
Definition: G4Material.cc:636
G4double GetMeanExcitationEnergy() const
G4double GetTemperature() const
Definition: G4Material.hh:182
#define G4endl
Definition: G4ios.hh:61
size_t GetNumberOfElements() const
Definition: G4Material.hh:186
G4State GetState() const
Definition: G4Material.hh:181
double G4double
Definition: G4Types.hh:76
const G4double * GetFractionVector() const
Definition: G4Material.hh:194
static constexpr double atmosphere
Definition: G4SIunits.hh:237
static constexpr double mole
Definition: G4SIunits.hh:286
void DumpElement(G4Element *ele)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4tgbGeometryDumper::DumpPhysVol ( G4VPhysicalVolume pv)

Definition at line 141 of file G4tgbGeometryDumper.cc.

142 {
143 
144  //--- Dump logical volume first
145  G4LogicalVolume* lv = pv->GetLogicalVolume();
146 
148 
149  //--- It is not needed to dump _refl volumes created when parent is reflected
150  // !!WARNING : it must be avoided to reflect a volume hierarchy if children
151  // has also been reflected, as both will have same name
152 
153  if( reffact->IsReflected( lv )
154  && reffact->IsReflected( pv->GetMotherLogical() ) ) { return; }
155 
156 
157  G4bool bVolExists = CheckIfLogVolExists( lv->GetName(), lv );
158 
159  //---- Construct this PV
160  if( pv->GetMotherLogical() != 0 ) // not WORLD volume
161  {
162  if( !pv->IsReplicated() )
163  {
164  G4String lvName = lv->GetName();
165  if( !bVolExists )
166  {
167  lvName = DumpLogVol( lv );
168  }
169  DumpPVPlacement( pv, lvName );
170  }
171  else if( pv->IsParameterised() )
172  {
173  G4PVParameterised* pvparam = (G4PVParameterised*)(pv);
174  DumpPVParameterised( pvparam );
175  }
176  else
177  {
178  G4String lvName = lv->GetName();
179  if( !bVolExists )
180  {
181  lvName = DumpLogVol( lv );
182  }
183  G4PVReplica* pvrepl = (G4PVReplica*)(pv);
184  DumpPVReplica( pvrepl, lvName );
185  }
186 
187  }
188  else
189  {
190  DumpLogVol( lv );
191  }
192 
193  if( !bVolExists )
194  {
195  //---- Construct PV's who has this LV as mother
196  std::vector<G4VPhysicalVolume*> pvChildren = GetPVChildren( lv );
197  std::vector<G4VPhysicalVolume*>::const_iterator ite;
198  for( ite = pvChildren.begin(); ite != pvChildren.end(); ite++ )
199  {
200  DumpPhysVol( *ite );
201  }
202  }
203 }
virtual G4bool IsReplicated() const =0
G4bool IsReflected(G4LogicalVolume *lv) const
static G4ReflectionFactory * Instance()
void DumpPVReplica(G4PVReplica *pv, const G4String &lvName)
void DumpPhysVol(G4VPhysicalVolume *pv)
bool G4bool
Definition: G4Types.hh:79
G4LogicalVolume * GetMotherLogical() const
virtual G4bool IsParameterised() const =0
void DumpPVPlacement(G4VPhysicalVolume *pv, const G4String &lvName, G4int copyNo=-999)
G4LogicalVolume * GetLogicalVolume() const
void DumpPVParameterised(G4PVParameterised *pv)
const G4String & GetName() const
G4String DumpLogVol(G4LogicalVolume *lv, G4String extraName="", G4VSolid *solid=0, G4Material *mate=0)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4tgbGeometryDumper::DumpPolySections ( G4int  zPlanes,
G4double z,
G4double rmin,
G4double rmax 
)
void G4tgbGeometryDumper::DumpPVParameterised ( G4PVParameterised pv)

Definition at line 269 of file G4tgbGeometryDumper.cc.

270 {
271  G4String pvName = pv->GetName();
272 
273  EAxis axis;
274  G4int nReplicas;
275  G4double width;
276  G4double offset;
277  G4bool consuming;
278  pv->GetReplicationData(axis, nReplicas, width, offset, consuming);
279 
281 
282  G4LogicalVolume* lv = pv->GetLogicalVolume();
283  G4VSolid* solid1st = param->ComputeSolid(0, pv);
284  G4Material* mate1st = param->ComputeMaterial(0, pv );
285  std::vector<G4double> params1st = GetSolidParams( solid1st );
286  std::vector<G4double> newParams;
287  G4VSolid* newSolid = solid1st;
288  G4String lvName;
289 
290  for( G4int ii = 0; ii < nReplicas; ii++ )
291  {
292  G4Material* newMate = param->ComputeMaterial(ii, pv );
293  if( solid1st->GetEntityType() == "G4Box")
294  {
295  G4Box* box = (G4Box*)(solid1st);
296  param->ComputeDimensions(*box, ii, pv );
297  newParams = GetSolidParams( box );
298  newSolid = (G4VSolid*)box;
299  }
300  else if( solid1st->GetEntityType() == "G4Tubs")
301  {
302  G4Tubs* tubs = (G4Tubs*)(solid1st);
303  param->ComputeDimensions(*tubs, ii, pv );
304  newParams = GetSolidParams( tubs );
305  newSolid = (G4VSolid*)tubs;
306  }
307  else if( solid1st->GetEntityType() == "G4Trd")
308  {
309  G4Trd* trd = (G4Trd*)(solid1st);
310  param->ComputeDimensions(*trd, ii, pv );
311  newParams = GetSolidParams( trd );
312  newSolid = (G4VSolid*)trd;
313  }
314  else if( solid1st->GetEntityType() == "G4Trap")
315  {
316  G4Trap* trap = (G4Trap*)(solid1st);
317  param->ComputeDimensions(*trap, ii, pv );
318  newParams = GetSolidParams( trap );
319  newSolid = (G4VSolid*)trap;
320  }
321  else if( solid1st->GetEntityType() == "G4Cons")
322  {
323  G4Cons* cons = (G4Cons*)(solid1st);
324  param->ComputeDimensions(*cons, ii, pv );
325  newParams = GetSolidParams( cons );
326  newSolid = (G4VSolid*)cons;
327  }
328  else if( solid1st->GetEntityType() == "G4Sphere")
329  {
330  G4Sphere* sphere = (G4Sphere*)(solid1st);
331  param->ComputeDimensions(*sphere, ii, pv );
332  newParams = GetSolidParams( sphere );
333  newSolid = (G4VSolid*)sphere;
334  }
335  else if( solid1st->GetEntityType() == "G4Orb")
336  {
337  G4Orb* orb = (G4Orb*)(solid1st);
338  param->ComputeDimensions(*orb, ii, pv );
339  newParams = GetSolidParams( orb );
340  newSolid = (G4VSolid*)orb;
341  }
342  else if( solid1st->GetEntityType() == "G4Torus")
343  {
344  G4Torus* torus = (G4Torus*)(solid1st);
345  param->ComputeDimensions(*torus, ii, pv );
346  newParams = GetSolidParams( torus );
347  newSolid = (G4VSolid*)torus;
348  }
349  else if( solid1st->GetEntityType() == "G4Para")
350  {
351  G4Para* para = (G4Para*)(solid1st);
352  param->ComputeDimensions(*para, ii, pv );
353  newParams = GetSolidParams( para );
354  newSolid = (G4VSolid*)para;
355  }
356  else if( solid1st->GetEntityType() == "G4Polycone")
357  {
358  G4Polycone* polycone = (G4Polycone*)(solid1st);
359  param->ComputeDimensions(*polycone, ii, pv );
360  newParams = GetSolidParams( polycone );
361  newSolid = (G4VSolid*)polycone;
362  }
363  else if( solid1st->GetEntityType() == "G4Polyhedra")
364  {
365  G4Polyhedra* polyhedra = (G4Polyhedra*)(solid1st);
366  param->ComputeDimensions(*polyhedra, ii, pv );
367  newParams = GetSolidParams( polyhedra );
368  newSolid = (G4VSolid*)polyhedra;
369  }
370  else if( solid1st->GetEntityType() == "G4Hype")
371  {
372  G4Hype* hype = (G4Hype*)(solid1st);
373  param->ComputeDimensions(*hype, ii, pv );
374  newParams = GetSolidParams( hype );
375  newSolid = (G4VSolid*)hype;
376  }
377  if( ii == 0 || mate1st != newMate || params1st[0] != newParams[0] )
378  {
379  G4String extraName = "";
380  if( ii != 0 )
381  {
382  extraName= "#"+G4UIcommand::ConvertToString(ii)
383  +"/"+pv->GetMotherLogical()->GetName();
384  }
385  lvName = DumpLogVol( lv, extraName, newSolid, newMate );
386  }
387 
388  param->ComputeTransformation(ii, pv);
389  DumpPVPlacement( pv, lvName, ii );
390  }
391 }
Definition: G4Para.hh:77
virtual G4Material * ComputeMaterial(const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
Definition: G4Box.hh:64
virtual G4VSolid * ComputeSolid(const G4int, G4VPhysicalVolume *)
Definition: G4Tubs.hh:85
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:372
#define width
Definition: G4Trd.hh:72
virtual G4GeometryType GetEntityType() const =0
int G4int
Definition: G4Types.hh:78
G4VPVParameterisation * GetParameterisation() const
const G4String & GetName() const
Definition: G4Hype.hh:67
bool G4bool
Definition: G4Types.hh:79
Definition: G4Cons.hh:83
G4LogicalVolume * GetMotherLogical() const
Definition: G4Orb.hh:61
virtual void ComputeDimensions(G4Box &, const G4int, const G4VPhysicalVolume *) const
void DumpPVPlacement(G4VPhysicalVolume *pv, const G4String &lvName, G4int copyNo=-999)
G4LogicalVolume * GetLogicalVolume() const
void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const
std::vector< G4double > GetSolidParams(const G4VSolid *so)
EAxis
Definition: geomdefs.hh:54
virtual void ComputeTransformation(const G4int, G4VPhysicalVolume *) const =0
const G4String & GetName() const
double G4double
Definition: G4Types.hh:76
G4String DumpLogVol(G4LogicalVolume *lv, G4String extraName="", G4VSolid *solid=0, G4Material *mate=0)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4tgbGeometryDumper::DumpPVPlacement ( G4VPhysicalVolume pv,
const G4String lvName,
G4int  copyNo = -999 
)

Definition at line 207 of file G4tgbGeometryDumper.cc.

209 {
210  G4String pvName = pv->GetName();
211 
212  G4RotationMatrix* rotMat = pv->GetRotation();
213  if( !rotMat ) rotMat = new G4RotationMatrix();
214 
215  //---- Check if it is reflected
217  G4LogicalVolume* lv = pv->GetLogicalVolume();
218  if( reffact->IsReflected( lv ) )
219  {
220 #ifdef G4VERBOSE
222  {
223  G4cout << " G4tgbGeometryDumper::DumpPVPlacement() - Reflected volume: "
224  << pv->GetName() << G4endl;
225  }
226 #endif
227  G4ThreeVector colx = rotMat->colX();
228  G4ThreeVector coly = rotMat->colY();
229  G4ThreeVector colz = rotMat->colZ();
230  // apply a Z reflection (reflection matrix is decomposed in new
231  // reflection-free rotation + z-reflection)
232  colz *= -1.;
233  G4Rep3x3 rottemp(colx.x(),coly.x(),colz.x(),
234  colx.y(),coly.y(),colz.y(),
235  colx.z(),coly.z(),colz.z());
236  // matrix representation (inverted)
237  *rotMat = G4RotationMatrix(rottemp);
238  *rotMat = (*rotMat).inverse();
239  pvName += "_refl";
240  }
241  G4String rotName = DumpRotationMatrix( rotMat );
243 
244  if( copyNo == -999 ) //for parameterisations copy number is provided
245  {
246  copyNo = pv->GetCopyNo();
247  }
248 
249  G4String fullname = pvName
250  +"#"+G4UIcommand::ConvertToString(copyNo)
251  +"/"+pv->GetMotherLogical()->GetName();
252 
253  if( !CheckIfPhysVolExists(fullname, pv ))
254  {
255  (*theFile)
256  << ":PLACE "
257  << SubstituteRefl(AddQuotes(lvName))
258  << " " << copyNo << " "
259  << SubstituteRefl(AddQuotes(pv->GetMotherLogical()->GetName()))
260  << " " << AddQuotes(rotName) << " "
261  << pos.x() << " " << pos.y() << " " << pos.z() << G4endl;
262 
263  thePhysVols[fullname] = pv;
264  }
265 }
double x() const
CLHEP::HepRotation G4RotationMatrix
Hep3Vector colX() const
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:372
const G4RotationMatrix * GetRotation() const
G4bool IsReflected(G4LogicalVolume *lv) const
double z() const
static G4ReflectionFactory * Instance()
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
static G4int GetVerboseLevel()
G4LogicalVolume * GetMotherLogical() const
Hep3Vector colZ() const
Hep3Vector colY() const
const G4ThreeVector & GetTranslation() const
G4String DumpRotationMatrix(G4RotationMatrix *rotm)
G4LogicalVolume * GetLogicalVolume() const
virtual G4int GetCopyNo() const =0
double y() const
#define G4endl
Definition: G4ios.hh:61
const G4String & GetName() const
static const G4double pos

Here is the call graph for this function:

Here is the caller graph for this function:

void G4tgbGeometryDumper::DumpPVReplica ( G4PVReplica pv,
const G4String lvName 
)

Definition at line 395 of file G4tgbGeometryDumper.cc.

397 {
398  EAxis axis;
399  G4int nReplicas;
400  G4double width;
401  G4double offset;
402  G4bool consuming;
403  pv->GetReplicationData(axis, nReplicas, width, offset, consuming);
404  G4String axisName;
405  switch (axis )
406  {
407  case kXAxis:
408  axisName = "X";
409  break;
410  case kYAxis:
411  axisName = "Y";
412  break;
413  case kZAxis:
414  axisName = "Z";
415  break;
416  case kRho:
417  axisName = "R";
418  break;
419  case kPhi:
420  axisName = "PHI";
421  break;
422  case kRadial3D:
423  case kUndefined:
424  G4String ErrMessage = "Unknown axis of replication for volume"
425  + pv->GetName();
426  G4Exception("G4tgbGeometryDumper::DumpPVReplica",
427  "Wrong axis ", FatalException, ErrMessage);
428  break;
429  }
430 
431  G4String fullname = lvName
432  +"/"+pv->GetMotherLogical()->GetName();
433 
434  if( !CheckIfPhysVolExists(fullname, pv ))
435  {
436  (*theFile)
437  << ":REPL "
438  << SubstituteRefl(AddQuotes(lvName))
439  << " " << SubstituteRefl(AddQuotes(pv->GetMotherLogical()->GetName()))
440  << " " << axisName
441  << " " << nReplicas;
442  if( axis != kPhi )
443  {
444  (*theFile)
445  << " " << width
446  << " " << offset << G4endl;
447  }
448  else
449  {
450  (*theFile)
451  << " " << width/deg << "*deg"
452  << " " << offset/deg << "*deg" << G4endl;
453  }
454 
455  thePhysVols[fullname] = pv;
456  }
457 }
Definition: geomdefs.hh:54
virtual void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const
Definition: G4PVReplica.cc:230
#define width
int G4int
Definition: G4Types.hh:78
const G4String & GetName() const
bool G4bool
Definition: G4Types.hh:79
G4LogicalVolume * GetMotherLogical() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
EAxis
Definition: geomdefs.hh:54
#define G4endl
Definition: G4ios.hh:61
const G4String & GetName() const
double G4double
Definition: G4Types.hh:76
Definition: geomdefs.hh:54
static constexpr double deg
Definition: G4SIunits.hh:152

Here is the call graph for this function:

Here is the caller graph for this function:

G4String G4tgbGeometryDumper::DumpRotationMatrix ( G4RotationMatrix rotm)

Definition at line 1008 of file G4tgbGeometryDumper.cc.

1009 {
1010  if (!rotm) { rotm = new G4RotationMatrix(); }
1011 
1012  G4double de = MatDeterminant(rotm);
1013  G4String rotName = LookForExistingRotation( rotm );
1014  if( rotName != "" ) { return rotName; }
1015 
1016  G4ThreeVector v(1.,1.,1.);
1017  if (de < -0.9 ) // a reflection ....
1018  {
1019  (*theFile) << ":ROTM ";
1020  rotName = "RRM";
1021  rotName += G4UIcommand::ConvertToString(theRotationNumber++);
1022 
1023  (*theFile) << AddQuotes(rotName) << std::setprecision(9) << " "
1024  << approxTo0(rotm->xx()) << " "
1025  << approxTo0(rotm->yx()) << " "
1026  << approxTo0(rotm->zx()) << " "
1027  << approxTo0(rotm->xy()) << " "
1028  << approxTo0(rotm->yy()) << " "
1029  << approxTo0(rotm->zy()) << " "
1030  << approxTo0(rotm->xz()) << " "
1031  << approxTo0(rotm->yz()) << " "
1032  << approxTo0(rotm->zz()) << G4endl;
1033  }
1034  else if(de > 0.9 ) // a rotation ....
1035  {
1036  (*theFile) << ":ROTM ";
1037  rotName = "RM";
1038  rotName += G4UIcommand::ConvertToString(theRotationNumber++);
1039 
1040  (*theFile) << AddQuotes(rotName) << " "
1041  << approxTo0(rotm->thetaX()/deg) << " "
1042  << approxTo0(rotm->phiX()/deg) << " "
1043  << approxTo0(rotm->thetaY()/deg) << " "
1044  << approxTo0(rotm->phiY()/deg) << " "
1045  << approxTo0(rotm->thetaZ()/deg) << " "
1046  << approxTo0(rotm->phiZ()/deg) << G4endl;
1047  }
1048 
1049  theRotMats[rotName] = rotm;
1050 
1051  return rotName;
1052 }
double xx() const
double thetaX() const
Definition: Rotation.cc:141
CLHEP::HepRotation G4RotationMatrix
double yy() const
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:372
double xz() const
double zx() const
double phiY() const
Definition: Rotation.cc:133
double yz() const
double phiX() const
Definition: Rotation.cc:129
double thetaY() const
Definition: Rotation.cc:145
tuple v
Definition: test.py:18
double thetaZ() const
Definition: Rotation.cc:149
double phiZ() const
Definition: Rotation.cc:137
double zy() const
#define G4endl
Definition: G4ios.hh:61
double yx() const
double G4double
Definition: G4Types.hh:76
static constexpr double deg
Definition: G4SIunits.hh:152
double zz() const
double xy() const

Here is the call graph for this function:

Here is the caller graph for this function:

G4String G4tgbGeometryDumper::DumpSolid ( G4VSolid solid,
const G4String extraName = "" 
)

Definition at line 645 of file G4tgbGeometryDumper.cc.

647 {
648  G4String solidName;
649  if( extraName == "" )
650  {
651  solidName = GetObjectName(solid,theSolids);
652  }
653  else
654  {
655  solidName = solid->GetName()+extraName;
656  }
657 
658  if( theSolids.find( solidName ) != theSolids.end() ) // alredy dumped
659  {
660  return solidName;
661  }
662 
663  G4String solidType = solid->GetEntityType();
664  solidType = GetTGSolidType( solidType );
665 
666  if (solidType == "UNIONSOLID")
667  {
668  DumpBooleanVolume( "UNION", solid );
669 
670  } else if (solidType == "SUBTRACTIONSOLID") {
671  DumpBooleanVolume( "SUBTRACTION", solid );
672 
673  } else if (solidType == "INTERSECTIONSOLID") {
674  DumpBooleanVolume( "INTERSECTION", solid );
675 
676  } else if (solidType == "REFLECTEDSOLID") {
677  G4ReflectedSolid* solidrefl = dynamic_cast<G4ReflectedSolid*>(solid);
678  if (!solidrefl)
679  {
680  G4Exception("G4tgbGeometryDumper::DumpSolid()",
681  "InvalidType", FatalException, "Invalid reflected solid!");
682  return solidName;
683  }
684  G4VSolid* solidori = solidrefl->GetConstituentMovedSolid();
685  DumpSolid( solidori );
686  }
687  else
688  {
689  (*theFile) << ":SOLID " << AddQuotes(solidName) << " ";
690  (*theFile) << AddQuotes(solidType) << " ";
691  DumpSolidParams( solid );
692  theSolids[solidName] = solid;
693  }
694 
695  return solidName;
696 }
G4String GetName() const
void DumpSolidParams(G4VSolid *so)
virtual G4GeometryType GetEntityType() const =0
G4VSolid * GetConstituentMovedSolid() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
void DumpBooleanVolume(const G4String &solidType, G4VSolid *so)
G4String DumpSolid(G4VSolid *solid, const G4String &extraName="")

Here is the call graph for this function:

Here is the caller graph for this function:

void G4tgbGeometryDumper::DumpSolidParams ( G4VSolid so)

Definition at line 751 of file G4tgbGeometryDumper.cc.

752 {
753  std::vector<G4double> params = GetSolidParams( so );
754  for( size_t ii = 0 ; ii < params.size(); ii++ )
755  {
756  (*theFile) << params[ii] << " " ;
757  }
758  (*theFile) << G4endl;
759 }
std::vector< G4double > GetSolidParams(const G4VSolid *so)
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

G4tgbGeometryDumper * G4tgbGeometryDumper::GetInstance ( void  )
static

Definition at line 90 of file G4tgbGeometryDumper.cc.

91 {
92  if( theInstance == 0 ){
93  theInstance = new G4tgbGeometryDumper;
94  }
95 
96  return theInstance;
97 
98 }

Here is the caller graph for this function:

std::vector< G4double > G4tgbGeometryDumper::GetSolidParams ( const G4VSolid so)

Definition at line 763 of file G4tgbGeometryDumper.cc.

764 {
765  std::vector<G4double> params;
766 
767  G4String solidType = so->GetEntityType();
768  solidType = GetTGSolidType( solidType );
769 
770  if (solidType == "BOX") {
771  const G4Box * sb = dynamic_cast < const G4Box*>(so);
772  if (sb) {
773  params.push_back( sb->GetXHalfLength() );
774  params.push_back( sb->GetYHalfLength() );
775  params.push_back( sb->GetZHalfLength() );
776  }
777  } else if (solidType == "TUBS") {
778  const G4Tubs * tu = dynamic_cast < const G4Tubs * > (so);
779  if (tu) {
780  params.push_back( tu->GetInnerRadius() );
781  params.push_back( tu->GetOuterRadius() );
782  params.push_back( tu->GetZHalfLength() );
783  params.push_back( tu->GetStartPhiAngle()/deg );
784  params.push_back( tu->GetDeltaPhiAngle()/deg );
785  }
786  } else if (solidType == "TRAP") {
787  const G4Trap * trp = dynamic_cast < const G4Trap * > (so);
788  if (trp) {
789  G4ThreeVector symAxis(trp->GetSymAxis());
790  params.push_back( trp->GetZHalfLength() );
791  params.push_back( symAxis.theta()/deg);
792  params.push_back( symAxis.phi()/deg);
793  params.push_back( trp->GetYHalfLength1() );
794  params.push_back( trp->GetXHalfLength1() );
795  params.push_back( trp->GetXHalfLength2() );
796  params.push_back( std::atan(trp->GetTanAlpha1())/deg );
797  params.push_back( trp->GetYHalfLength2() );
798  params.push_back( trp->GetXHalfLength3() );
799  params.push_back( trp->GetXHalfLength4() );
800  params.push_back( std::atan(trp->GetTanAlpha2())/deg );
801  }
802  } else if (solidType == "TRD") {
803  const G4Trd * tr = dynamic_cast < const G4Trd * > (so);
804  if (tr) {
805  params.push_back( tr->GetXHalfLength1() );
806  params.push_back( tr->GetXHalfLength2() );
807  params.push_back( tr->GetYHalfLength1() );
808  params.push_back( tr->GetYHalfLength2() );
809  params.push_back( tr->GetZHalfLength());
810  }
811  } else if (solidType == "PARA") {
812  const G4Para * para = dynamic_cast < const G4Para * > (so);
813  if (para) {
814  G4ThreeVector symAxis(para->GetSymAxis());
815  params.push_back( para->GetXHalfLength());
816  params.push_back( para->GetYHalfLength());
817  params.push_back( para->GetZHalfLength());
818  params.push_back( std::atan(para->GetTanAlpha())/deg);
819  params.push_back( symAxis.theta()/deg);
820  params.push_back( symAxis.phi()/deg);
821  }
822  } else if (solidType == "CONS") {
823  const G4Cons * cn = dynamic_cast < const G4Cons * > (so);
824  if (cn) {
825  params.push_back( cn->GetInnerRadiusMinusZ() );
826  params.push_back( cn->GetOuterRadiusMinusZ() );
827  params.push_back( cn->GetInnerRadiusPlusZ() );
828  params.push_back( cn->GetOuterRadiusPlusZ() );
829  params.push_back( cn->GetZHalfLength() );
830  params.push_back( cn->GetStartPhiAngle()/deg );
831  params.push_back( cn->GetDeltaPhiAngle()/deg );
832  }
833  } else if (solidType == "SPHERE") {
834  const G4Sphere * sphere = dynamic_cast < const G4Sphere * > (so);
835  if (sphere) {
836  params.push_back( sphere->GetInnerRadius());
837  params.push_back( sphere->GetOuterRadius());
838  params.push_back( sphere->GetStartPhiAngle()/deg);
839  params.push_back( sphere->GetDeltaPhiAngle()/deg);
840  params.push_back( sphere->GetStartThetaAngle()/deg);
841  params.push_back( sphere->GetDeltaThetaAngle()/deg);
842  }
843  } else if (solidType == "ORB") {
844  const G4Orb * orb = dynamic_cast < const G4Orb * > (so);
845  if (orb) {
846  params.push_back( orb->GetRadius());
847  }
848  } else if (solidType == "TORUS") {
849  const G4Torus * torus = dynamic_cast < const G4Torus * > (so);
850  if (torus) {
851  params.push_back( torus->GetRmin());
852  params.push_back( torus->GetRmax());
853  params.push_back( torus->GetRtor());
854  params.push_back( torus->GetSPhi()/deg);
855  params.push_back( torus->GetDPhi()/deg);
856  }
857  } else if (solidType == "POLYCONE") {
858  //--- Dump RZ corners, as original parameters will not be present
859  // if it was build from RZ corners
860  const G4Polycone * plc = dynamic_cast < const G4Polycone * > (so);
861  if (plc) {
862  G4double angphi = plc->GetStartPhi()/deg;
863  if( angphi > 180*deg ) { angphi -= 360*deg; }
864  G4int ncor = plc->GetNumRZCorner();
865  params.push_back( angphi );
866  params.push_back( plc->GetOriginalParameters()->Opening_angle/deg );
867  params.push_back( ncor );
868 
869  for( G4int ii = 0; ii < ncor; ii++ )
870  {
871  params.push_back( plc->GetCorner(ii).r );
872  params.push_back( plc->GetCorner(ii).z );
873  }
874  }
875  } else if (solidType == "GENERICPOLYCONE") {
876  //--- Dump RZ corners
877  const G4GenericPolycone * plc =
878  dynamic_cast < const G4GenericPolycone * > (so);
879  if (plc) {
880  G4double angphi = plc->GetStartPhi()/deg;
881  if( angphi > 180*deg ) { angphi -= 360*deg; }
882  G4double endphi = plc->GetEndPhi()/deg;
883  if( endphi > 180*deg ) { endphi -= 360*deg; }
884  G4int ncor = plc->GetNumRZCorner();
885  params.push_back( angphi );
886  params.push_back( endphi-angphi );
887  params.push_back( ncor );
888 
889  for( G4int ii = 0; ii < ncor; ii++ )
890  {
891  params.push_back( plc->GetCorner(ii).r );
892  params.push_back( plc->GetCorner(ii).z );
893  }
894  }
895  } else if (solidType == "POLYHEDRA") {
896  //--- Dump RZ corners, as original parameters will not be present
897  // if it was build from RZ corners
898  const G4Polyhedra * ph = (dynamic_cast < const G4Polyhedra * > (so));
899  if (ph) {
900  G4double angphi = ph->GetStartPhi()/deg;
901  if( angphi > 180*deg ) angphi -= 360*deg;
902 
903  G4int ncor = ph->GetNumRZCorner();
904 
905  params.push_back( angphi );
906  params.push_back( ph->GetOriginalParameters()->Opening_angle/deg );
907  params.push_back( ph->GetNumSide() );
908  params.push_back( ncor );
909 
910  for( G4int ii = 0; ii < ncor; ii++ )
911  {
912  params.push_back( ph->GetCorner(ii).r );
913  params.push_back( ph->GetCorner(ii).z );
914  }
915  }
916  } else if (solidType == "ELLIPTICALTUBE") {
917  const G4EllipticalTube * eltu =
918  dynamic_cast < const G4EllipticalTube * > (so);
919  if (eltu) {
920  params.push_back( eltu->GetDx());
921  params.push_back( eltu->GetDy());
922  params.push_back( eltu->GetDz());
923  }
924  } else if (solidType == "ELLIPSOID" ){
925  const G4Ellipsoid* dso = dynamic_cast < const G4Ellipsoid * > (so);
926  if (dso) {
927  params.push_back( dso->GetSemiAxisMax(0) );
928  params.push_back( dso->GetSemiAxisMax(1) );
929  params.push_back( dso->GetSemiAxisMax(2) );
930  params.push_back( dso->GetZBottomCut() );
931  params.push_back( dso->GetZTopCut() );
932  }
933  } else if (solidType == "ELLIPTICAL_CONE") {
934  const G4EllipticalCone * elco =
935  dynamic_cast < const G4EllipticalCone * > (so);
936  if (elco) {
937  params.push_back( elco-> GetSemiAxisX() );
938  params.push_back( elco-> GetSemiAxisY() );
939  params.push_back( elco-> GetZMax() );
940  params.push_back( elco-> GetZTopCut() );
941  }
942  } else if (solidType == "HYPE") {
943  const G4Hype* hype = dynamic_cast < const G4Hype * > (so);
944  if (hype) {
945  params.push_back( hype->GetInnerRadius());
946  params.push_back( hype->GetOuterRadius());
947  params.push_back( hype->GetInnerStereo()/deg);
948  params.push_back( hype->GetOuterStereo()/deg);
949  params.push_back( 2*hype->GetZHalfLength());
950  }
951 // } else if( solidType == "TET" ) {
952 
953  } else if( solidType == "TWISTEDBOX" ) {
954  const G4TwistedBox* tbox = dynamic_cast < const G4TwistedBox * > (so);
955  if (tbox) {
956  params.push_back( tbox->GetPhiTwist()/deg );
957  params.push_back( tbox->GetXHalfLength() );
958  params.push_back( tbox->GetYHalfLength() );
959  params.push_back( tbox->GetZHalfLength() );
960  }
961  } else if( solidType == "TWISTEDTRAP" ) {
962  const G4TwistedTrap * ttrap = dynamic_cast < const G4TwistedTrap * > (so);
963  if (ttrap) {
964  params.push_back( ttrap->GetPhiTwist()/deg );
965  params.push_back( ttrap->GetZHalfLength() );
966  params.push_back( ttrap->GetPolarAngleTheta()/deg );
967  params.push_back( ttrap->GetAzimuthalAnglePhi()/deg );
968  params.push_back( ttrap->GetY1HalfLength() );
969  params.push_back( ttrap->GetX1HalfLength() );
970  params.push_back( ttrap->GetX2HalfLength() );
971  params.push_back( ttrap->GetY2HalfLength() );
972  params.push_back( ttrap->GetX3HalfLength() );
973  params.push_back( ttrap->GetX4HalfLength() );
974  params.push_back( ttrap->GetTiltAngleAlpha()/deg );
975  }
976  } else if( solidType == "TWISTEDTRD" ) {
977  const G4TwistedTrd * ttrd = dynamic_cast < const G4TwistedTrd * > (so);
978  if (ttrd) {
979  params.push_back( ttrd->GetX1HalfLength());
980  params.push_back( ttrd->GetX2HalfLength() );
981  params.push_back( ttrd->GetY1HalfLength() );
982  params.push_back( ttrd->GetY2HalfLength() );
983  params.push_back( ttrd->GetZHalfLength() );
984  params.push_back( ttrd->GetPhiTwist()/deg );
985  }
986  } else if( solidType == "TWISTEDTUBS" ) {
987  const G4TwistedTubs * ttub = dynamic_cast < const G4TwistedTubs * > (so);
988  if (ttub) {
989  params.push_back( ttub->GetInnerRadius() );
990  params.push_back( ttub->GetOuterRadius() );
991  params.push_back( ttub->GetZHalfLength() );
992  params.push_back( ttub->GetDPhi()/deg );
993  params.push_back( ttub->GetPhiTwist()/deg );
994  }
995  }
996  else
997  {
998  G4String ErrMessage = "Solid type not supported, sorry... " + solidType;
999  G4Exception("G4tgbGeometryDumpe::DumpSolidParams()",
1000  "NotImplemented", FatalException, ErrMessage);
1001  }
1002 
1003  return params;
1004 }
G4ThreeVector GetSymAxis() const
G4double GetSPhi() const
G4PolyconeSideRZ GetCorner(G4int index) const
G4double GetXHalfLength4() const
G4double GetXHalfLength() const
G4double GetOuterStereo() const
Definition: G4Para.hh:77
G4double GetX1HalfLength() const
Definition: G4TwistedTrd.hh:77
G4double GetY1HalfLength() const
Definition: G4TwistedTrd.hh:79
G4double GetPolarAngleTheta() const
G4double GetYHalfLength2() const
G4double GetYHalfLength1() const
G4double GetInnerStereo() const
G4double GetDy() const
G4double GetInnerRadius() const
Definition: G4Box.hh:64
G4int GetNumRZCorner() const
G4double GetZTopCut() const
G4double GetZHalfLength() const
Definition: G4Tubs.hh:85
G4double GetZHalfLength() const
G4double GetRmax() const
G4double GetZBottomCut() const
G4double GetOuterRadiusMinusZ() const
Definition: G4Trd.hh:72
G4double GetX2HalfLength() const
Definition: G4TwistedTrd.hh:78
G4double GetInnerRadius() const
virtual G4GeometryType GetEntityType() const =0
G4double GetZHalfLength() const
G4double GetDeltaPhiAngle() const
int G4int
Definition: G4Types.hh:78
G4double GetZHalfLength() const
G4double GetSemiAxisMax(G4int i) const
G4double GetXHalfLength2() const
G4double GetZHalfLength() const
Definition: G4TwistedTrd.hh:81
G4double GetRtor() const
G4double GetZHalfLength() const
Definition: G4TwistedBox.hh:75
G4double GetEndPhi() const
G4double GetTanAlpha2() const
G4int GetNumRZCorner() const
G4double GetPhiTwist() const
G4double GetY1HalfLength() const
G4double GetXHalfLength2() const
G4double GetRadius() const
G4int GetNumSide() const
G4double GetXHalfLength1() const
G4double GetDz() const
G4double GetDeltaPhiAngle() const
G4double GetStartThetaAngle() const
G4double GetRmin() const
G4double GetXHalfLength3() const
Definition: G4Hype.hh:67
G4double GetY2HalfLength() const
Definition: G4TwistedTrd.hh:80
Definition: G4Cons.hh:83
G4double GetX3HalfLength() const
G4double GetPhiTwist() const
Definition: G4TwistedTrd.hh:82
G4double GetDPhi() const
G4double GetYHalfLength() const
G4double GetStartPhiAngle() const
G4double GetYHalfLength2() const
G4double GetOuterRadius() const
G4double GetStartPhiAngle() const
G4double GetStartPhi() const
G4double GetInnerRadiusPlusZ() const
G4double GetDPhi() const
G4double GetInnerRadius() const
G4PolyconeHistorical * GetOriginalParameters() const
G4double GetStartPhi() const
G4double GetDx() const
Definition: G4Orb.hh:61
G4double GetXHalfLength() const
G4double GetInnerRadius() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4double GetX4HalfLength() const
G4double GetYHalfLength() const
Definition: G4TwistedBox.hh:74
G4double GetZHalfLength() const
G4double GetTanAlpha() const
G4PolyhedraHistorical * GetOriginalParameters() const
G4double GetZHalfLength() const
G4double GetZHalfLength() const
G4ThreeVector GetSymAxis() const
G4double GetZHalfLength() const
G4double GetAzimuthalAnglePhi() const
G4double GetStartPhi() const
G4double GetXHalfLength1() const
G4double GetOuterRadius() const
G4double GetStartPhiAngle() const
G4PolyhedraSideRZ GetCorner(const G4int index) const
G4double GetYHalfLength1() const
double G4double
Definition: G4Types.hh:76
G4double GetPhiTwist() const
Definition: G4TwistedBox.hh:76
G4double GetInnerRadiusMinusZ() const
static constexpr double deg
Definition: G4SIunits.hh:152
G4double GetTanAlpha1() const
G4int GetNumRZCorner() const
G4double GetDeltaThetaAngle() const
G4PolyconeSideRZ GetCorner(G4int index) const
G4double GetX1HalfLength() const
G4double GetTiltAngleAlpha() const
G4double GetX2HalfLength() const
G4double GetOuterRadiusPlusZ() const
G4double GetZHalfLength() const
G4double GetOuterRadius() const
G4double GetXHalfLength() const
Definition: G4TwistedBox.hh:73
G4double GetPhiTwist() const
G4double GetOuterRadius() const
G4double GetY2HalfLength() const
G4double GetDeltaPhiAngle() const
G4double GetYHalfLength() const

Here is the caller graph for this function:

G4VPhysicalVolume * G4tgbGeometryDumper::GetTopPhysVol ( )

Definition at line 110 of file G4tgbGeometryDumper.cc.

111 {
113  G4PhysicalVolumeStore::const_iterator ite;
114  G4VPhysicalVolume* pv = *(pvstore->begin());
115  for( ;; )
116  {
117  G4LogicalVolume* lv = pv->GetMotherLogical();
118  if( lv == 0 ) { break; }
119 
120  //----- look for one PV of this LV
121  for( ite = pvstore->begin(); ite != pvstore->end(); ite++ )
122  {
123  pv = (*ite);
124  if( pv->GetLogicalVolume() == lv )
125  {
126  break;
127  }
128  }
129  }
130 
131  return pv;
132 }
static G4PhysicalVolumeStore * GetInstance()
G4LogicalVolume * GetMotherLogical() const
G4LogicalVolume * GetLogicalVolume() const

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: