Skip to content

Commit

Permalink
GenericWLSFiber: add verbosity check
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian committed Sep 21, 2023
1 parent 1553c97 commit ce39503
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 7 additions & 5 deletions source/geometries/GenericWLSFiber.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ using namespace nexus;


GenericWLSFiber::GenericWLSFiber(G4String name,
G4bool verbosity,
G4bool isround,
G4double thickness,
G4double length,
Expand All @@ -37,7 +38,8 @@ GenericWLSFiber::GenericWLSFiber(G4String name,
G4bool visibility):
GeometryBase (),
name_ (name),
isround_ (isround), // "round" or "square"
verbosity_ (verbosity),
isround_ (isround), // true if "round" or false if "square"
thickness_ (thickness), // Diameter (for round), Side (for square)
length_ (length),
doubleclad_ (doubleclad),
Expand Down Expand Up @@ -129,7 +131,7 @@ void GenericWLSFiber::BuildRoundFiber()
G4LogicalVolume* coating_logic;
if (with_coating_) {
G4String coating_name = name_ + "_WLS";
G4cout << "**** Building COATING " << coating_name << G4endl;
if (verbosity_) G4cout << "**** Building COATING " << coating_name << G4endl;
G4Tubs* coating_solid =
new G4Tubs(coating_name, 0., thickness_/2., length_/2., 0., 360.*deg);
coating_logic =
Expand All @@ -150,7 +152,7 @@ void GenericWLSFiber::BuildRoundFiber()
G4LogicalVolume* oclad_logic;
if (doubleclad_) {
G4String oclad_name = name_ + "_OCLAD";
G4cout << "**** Building OCLAD " << oclad_name << G4endl;
if (verbosity_) G4cout << "**** Building OCLAD " << oclad_name << G4endl;
G4Tubs* oclad_solid =
new G4Tubs(oclad_name, 0., oclad_rad_, length_/2., 0., 360.*deg);
oclad_logic =
Expand All @@ -167,7 +169,7 @@ void GenericWLSFiber::BuildRoundFiber()

// Inner Cladding (always built)
G4String iclad_name = name_ + "_ICLAD";
G4cout << "**** Building ICLAD " << iclad_name << G4endl;
if (verbosity_) G4cout << "**** Building ICLAD " << iclad_name << G4endl;
G4Tubs* iclad_solid =
new G4Tubs(iclad_name, 0., iclad_rad_, length_/2., 0., 360.*deg);
G4LogicalVolume* iclad_logic =
Expand All @@ -180,7 +182,7 @@ void GenericWLSFiber::BuildRoundFiber()
iclad_name, innermost_logic, false, 0, false);

// Fiber core (always inside the iclad)
G4cout << "**** Building CORE " << name_ << G4endl;
if (verbosity_) G4cout << "**** Building CORE " << name_ << G4endl;
G4Tubs* core_solid =
new G4Tubs(name_, 0., core_rad_, length_/2., 0., 360.*deg);
G4LogicalVolume* core_logic =
Expand Down
4 changes: 3 additions & 1 deletion source/geometries/GenericWLSFiber.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ namespace nexus {
public:
// Constructor for a generic wavelength shifting optical fiber
GenericWLSFiber(G4String name,
G4bool isround, // "round" or "square"
G4bool verbosity,
G4bool isround, // true if "round" or false if "square"
G4double thickness, // diameter or side
G4double length,
G4bool doubleclad,
Expand Down Expand Up @@ -60,6 +61,7 @@ namespace nexus {
void BuildSquareFiber();

G4String name_;
G4bool verbosity_;
G4bool isround_;
G4double thickness_;
G4double length_;
Expand Down

0 comments on commit ce39503

Please sign in to comment.