////////////////////////////////////////////////////////////////////////////// // \class RAT::GeoSc48SourceFactory // // \brief Geometry for the scandium calibration source // // \author Valentina Lozza --contact person // // REVISION HISTORY:\n // // // \details Construct the scandium sample, consisting of two containers // enclosing a small titanium cylinder of 0.25 inches diameter // and 0.5 inches height. // // To load this geometry into the simulation, use: // // /rat/db/load geo/Sc48Source.geo // // This geometry is intended to be used to study calibration of SNO+ // using a gamma-emitting Ti sample. // // The sc48source generator should be used, as it automatically sets // the position of the source. // // /generator/add sc48source 48Sc:1300 47Sc:350 46Sc:15 DecayTime:3day // // Alternatively, a decaychain or decay0 generator can be used. // // /generator/add decaychain 48Sc:fill:poisson // // In this case, position and rate have to be set separately for the // generator. The name of the active volume is Sc48Source_sample. // // If you want to shift the position of the Scandium source, the value // of sample_position in data/geo/Sc48Source.geo file can be changed: // // sample_position: [x, y, z], // // This is also possible in the macro, using // // /rat/db/set GEO[Sc48Source] position [x, y, z] // // The dimensions and materials, as above, may also be changed in this // file. // ////////////////////////////////////////////////////////////////////////////// #ifndef __RAT_GeoSc48SourceFactory__ #define __RAT_GeoSc48SourceFactory__ #include #include namespace RAT { class GeoSc48SourceFactory : public GeoFactory { public: GeoSc48SourceFactory() : GeoFactory("Sc48Source") { }; virtual ~GeoSc48SourceFactory() { }; virtual void Construct(DBLinkPtr table, const bool checkOverlaps); private: /// read colorName entry from table and apply value as color to logicalVolume void SetColor(DBLinkPtr table, G4String colorName, G4LogicalVolume *logicalVolume); /// multiply elements of vector v by unit std::vector MultiplyVectorByUnit(std::vector v, const double unit); /// place a volume and check for overlaps (if pSurfChk) G4PVPlacement* G4PVPlacementWithCheck(G4Transform3D &Transform3D, G4LogicalVolume *pCurrentLogical, const G4String& pName, G4LogicalVolume *pMotherLogical, G4bool pMany, G4int pCopyNo, G4bool pSurfChk = false); }; } // namespace RAT #endif