Mantid
Loading...
Searching...
No Matches
Functions
InstrumentCreationHelper Namespace Reference

Functions

Mantid::Geometry::ComponentaddComponent (Mantid::Geometry::Instrument_sptr &instrument, const Mantid::Kernel::V3D &position, const std::string &name)
 Adds a component to an instrument. More...
 
void addDetector (Mantid::Geometry::Instrument_sptr &instrument, const Mantid::Kernel::V3D &position, const int ID, const std::string &name, Mantid::Geometry::ObjCompAssembly *compAss)
 Adds a detector to an instrument. More...
 
void addFullInstrumentToWorkspace (Mantid::API::MatrixWorkspace &workspace, bool includeMonitors, bool startYNegative, const std::string &instrumentName)
 
void addInstrumentWithGeographicalDetectorsToWorkspace (Mantid::API::MatrixWorkspace &workspace, const int nlat, const int nlong, const double anginc, const std::string &instrumentName)
 
void addMonitor (Mantid::Geometry::Instrument_sptr &instrument, const Mantid::Kernel::V3D &position, const int ID, const std::string &name)
 Adds a monitor to an instrument. More...
 
void addSample (Mantid::Geometry::Instrument_sptr &instrument, const Mantid::Kernel::V3D &position, const std::string &name)
 Adds a sample to an instrument. More...
 
void addSource (Mantid::Geometry::Instrument_sptr &instrument, const Mantid::Kernel::V3D &position, const std::string &name)
 Adds a source to an instrument. More...
 

Function Documentation

◆ addComponent()

Component * InstrumentCreationHelper::addComponent ( Mantid::Geometry::Instrument_sptr instrument,
const Mantid::Kernel::V3D position,
const std::string &  name 
)

Adds a component to an instrument.

Parameters
instrument:: instrument to which the component will be added
position:: position of the component
name:: name of the component
Returns
a component pointer

Definition at line 135 of file InstrumentCreationHelper.cpp.

References position.

Referenced by addSample(), addSource(), WorkspaceCreationHelper::create2DWorkspaceWithReflectometryInstrument(), and WorkspaceCreationHelper::create2DWorkspaceWithReflectometryInstrumentMultiDetector().

◆ addDetector()

void InstrumentCreationHelper::addDetector ( Mantid::Geometry::Instrument_sptr instrument,
const Mantid::Kernel::V3D position,
const int  ID,
const std::string &  name,
Mantid::Geometry::ObjCompAssembly compAss 
)

Adds a detector to an instrument.

Parameters
instrument:: instrument to which the detector will be added
position:: position of the detector
ID:: identification number of the detector
name:: name of the detector
compAss:: optional component assembly (to help with saving geometry with SaveNexusESS)

Definition at line 190 of file InstrumentCreationHelper.cpp.

References Mantid::Geometry::ObjCompAssembly::add(), ComponentCreationHelper::createCuboid(), position, and Mantid::Geometry::Component::setPos().

Referenced by addInstrumentWithGeographicalDetectorsToWorkspace(), WorkspaceCreationHelper::create2DWorkspaceWithReflectometryInstrument(), WorkspaceCreationHelper::create2DWorkspaceWithReflectometryInstrumentMultiDetector(), and WorkspaceCreationHelper::createInstrumentForWorkspaceWithDistances().

◆ addFullInstrumentToWorkspace()

void InstrumentCreationHelper::addFullInstrumentToWorkspace ( Mantid::API::MatrixWorkspace workspace,
bool  includeMonitors,
bool  startYNegative,
const std::string &  instrumentName 
)

◆ addInstrumentWithGeographicalDetectorsToWorkspace()

void InstrumentCreationHelper::addInstrumentWithGeographicalDetectorsToWorkspace ( Mantid::API::MatrixWorkspace workspace,
const int  nlat,
const int  nlong,
const double  anginc,
const std::string &  instrumentName 
)

◆ addMonitor()

void InstrumentCreationHelper::addMonitor ( Mantid::Geometry::Instrument_sptr instrument,
const Mantid::Kernel::V3D position,
const int  ID,
const std::string &  name 
)

Adds a monitor to an instrument.

Parameters
instrument:: instrument to which the monitor will be added
position:: position of the monitor
ID:: identification number of the monitor
name:: name of the monitor

Definition at line 174 of file InstrumentCreationHelper.cpp.

References position.

Referenced by WorkspaceCreationHelper::create2DWorkspaceWithReflectometryInstrument(), and WorkspaceCreationHelper::create2DWorkspaceWithReflectometryInstrumentMultiDetector().

◆ addSample()

void InstrumentCreationHelper::addSample ( Mantid::Geometry::Instrument_sptr instrument,
const Mantid::Kernel::V3D position,
const std::string &  name 
)

Adds a sample to an instrument.

Parameters
instrument:: instrument to which the sample will be added
position:: position of the sample
name:: name of the sample

Definition at line 149 of file InstrumentCreationHelper.cpp.

References addComponent(), and position.

Referenced by addInstrumentWithGeographicalDetectorsToWorkspace(), WorkspaceCreationHelper::create2DWorkspaceWithReflectometryInstrument(), WorkspaceCreationHelper::create2DWorkspaceWithReflectometryInstrumentMultiDetector(), and WorkspaceCreationHelper::createInstrumentForWorkspaceWithDistances().

◆ addSource()

void InstrumentCreationHelper::addSource ( Mantid::Geometry::Instrument_sptr instrument,
const Mantid::Kernel::V3D position,
const std::string &  name 
)

Adds a source to an instrument.

Parameters
instrument:: instrument to which the source will be added
position:: position of the source
name:: name of the source

Definition at line 161 of file InstrumentCreationHelper.cpp.

References addComponent(), and position.

Referenced by addInstrumentWithGeographicalDetectorsToWorkspace(), WorkspaceCreationHelper::create2DWorkspaceWithReflectometryInstrument(), WorkspaceCreationHelper::create2DWorkspaceWithReflectometryInstrumentMultiDetector(), and WorkspaceCreationHelper::createInstrumentForWorkspaceWithDistances().