////////////////////////////////////////////////////////////////////////////// // \class RAT::GeoCo57SourceFactory // // \brief Geometry for the Cobalt-57 source // // \author Valentina Lozza --contact person // // REVISION HISTORY:\n // // // \details Construct the Co57 source, consisting of a commercially available Co57 source // in a double encapsulation system // To load this geometry into the simulation, use: // // /rat/db/load geo/calib/Co57Source.geo // // This geometry is intended to be used to study calibration of SNO+ // using a gamma-emitting commercial Co57 source. // A specific 57Co generator is used to generate the decays, // for example: // // /generator/add co57source // // The center of the source is, by default, placed at the center of // the liquid scintillator volume (scint). // // If you want to shift the position of the Co57 source, the value // of Position in data/geo/calib/Co57Source.geo file can be changed: // // position: [x, y, z], // // This is also possible in the macro, using // // /rat/db/set GEO[Co57Source] position [x, y, z] // // The dimensions and materials, as above, may also be changed in this // file. The sample position can be changed inside the RAT macro. // ////////////////////////////////////////////////////////////////////////////// #ifndef __RAT_GeoCo57SourceFactory__ #define __RAT_GeoCo57SourceFactory__ #include #include namespace RAT { class GeoCo57SourceFactory : public GeoFactory { public: GeoCo57SourceFactory() : GeoFactory("Co57Source") {}; virtual ~GeoCo57SourceFactory() { }; 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