#include #include using namespace RAT; #include #include #include using namespace std; BucketConstructorParams::BucketConstructorParams( const std::string& bucketType, G4VisAttributes* visAttributes ) { fVisAttributes = new G4VisAttributes( *visAttributes ); fBucketType = bucketType; Construct(); } BucketConstructorParams::BucketConstructorParams( const std::string& bucketType, const int numPetals, const double hexRadius, G4VisAttributes* visAttributes ) { fVisAttributes = new G4VisAttributes( *visAttributes ); fBucketType = bucketType; Construct(); // Now overwrite with extra information fTopHoleRadius = 0.0; fNumPetals = numPetals; fTopHexRadius = hexRadius; } void BucketConstructorParams::Construct() { DBLinkPtr bucketTable = DB::Get()->GetLink( "BUCKET", fBucketType ); fEdgeZCoord = bucketTable->GetDArray( "z_edge" ); fInnerEdgeRhoCoord = bucketTable->GetDArray( "inner_rho_edge" ); fOuterEdgeRhoCoord = bucketTable->GetDArray( "outer_rho_edge" ); fTopHoleRadius = bucketTable->GetD( "top_hole_radius" ); fBottomHoleRadius = bucketTable->GetD( "bottom_hole_radius" ); fTopHoleDepth = bucketTable->GetD( "top_hole_depth" ); fBottomHoleDepth = bucketTable->GetD( "bottom_hole_depth" ); fOffset = bucketTable->GetD( "offset" ); fBulkMaterial = G4Material::GetMaterial( bucketTable->GetS( "bulk_material" ) ); fNumPetals = 0; fTopHexRadius = 0.0; fVisAttributes->SetColor( 0.3, 0.3, 0.3, 1.0 ); }