#include <MagFieldReader.h>
Inheritance diagram for MagFieldReader:
Public Types | |
| typedef GaudiAlg::HistoID | HistoID |
| typedef Tuples::Tuple | Tuple |
| typedef GaudiAlg::TupleID | TupleID |
| typedef GaudiAlg::TupleMapTitle | TupleMapTitle |
| typedef GaudiAlg::TupleMapNumericID | TupleMapNumID |
| typedef GaudiAlg::TupleMapLiteralID | TupleMapLitID |
| typedef GaudiAlg::Histo1DMapNumericID | Histo1DMapNumID |
| typedef GaudiAlg::Histo1DMapLiteralID | Histo1DMapLitID |
| typedef GaudiAlg::Histo1DMapTitle | Histo1DMapTitle |
| typedef GaudiAlg::Histo2DMapNumericID | Histo2DMapNumID |
| typedef GaudiAlg::Histo2DMapLiteralID | Histo2DMapLitID |
| typedef GaudiAlg::Histo2DMapTitle | Histo2DMapTitle |
| typedef GaudiAlg::Histo3DMapNumericID | Histo3DMapNumID |
| typedef GaudiAlg::Histo3DMapLiteralID | Histo3DMapLitID |
| typedef GaudiAlg::Histo3DMapTitle | Histo3DMapTitle |
| typedef GaudiAlg::Profile1DMapNumericID | Profile1DMapNumID |
| typedef GaudiAlg::Profile1DMapLiteralID | Profile1DMapLitID |
| typedef GaudiAlg::Profile1DMapTitle | Profile1DMapTitle |
| typedef GaudiAlg::Profile2DMapNumericID | Profile2DMapNumID |
| typedef GaudiAlg::Profile2DMapLiteralID | Profile2DMapLitID |
| typedef GaudiAlg::Profile2DMapTitle | Profile2DMapTitle |
| SUCCESS | |
| NO_INTERFACE | |
| VERSMISMATCH | |
| LAST_ERROR | |
Public Member Functions | |
| MagFieldReader (const std::string &name, ISvcLocator *pSvcLocator) | |
| Standard constructor. | |
| virtual | ~MagFieldReader () |
| virtual StatusCode | initialize () |
| Destructor Algorithm initialization. | |
| virtual StatusCode | execute () |
| Algorithm execution. | |
| virtual StatusCode | finalize () |
| Algorithm finalization. | |
| void | TestBdl () |
| Tuple | nTuple (const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const |
| Tuple | nTuple (const TupleID &ID, const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const |
| Tuple | nTuple (const TupleID &ID, const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const |
| Tuple | evtCol (const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const |
| Tuple | evtCol (const TupleID &ID, const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const |
| Tuple | evtCol (const TupleID &ID, const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const |
| bool | produceNTuples () const |
| bool | splitNTupleDir () const |
| const std::string & | nTupleLUN () const |
| const std::string & | nTupleTopDir () const |
| const std::string & | nTupleDir () const |
| TupleID::NumericID | nTupleOffSet () const |
| std::string | nTuplePath () const |
| bool | produceEvtCols () const |
| bool | splitEvtColDir () const |
| const std::string & | evtColLUN () const |
| const std::string & | evtColTopDir () const |
| const std::string & | evtColDir () const |
| TupleID::NumericID | evtColOffSet () const |
| std::string | evtColPath () const |
| bool | tuplesPrint () const |
| bool | evtColsPrint () const |
| long | printTuples () const |
| long | printEvtCols () const |
| bool | nTupleExists (const TupleID &ID) const |
| bool | nTupleExists (const TupleID &ID) const |
| bool | evtColExists (const TupleID &ID) const |
| bool | evtColExists (const TupleID &ID) const |
| AIDA::IHistogram1D * | plot1D (const double value, const std::string &title, const double low, const double high, const unsigned long bins=100, const double weight=1.0) const |
| AIDA::IHistogram1D * | plot1D (const double value, const HistoID &ID, const std::string &title, const double low, const double high, const unsigned long bins=100, const double weight=1.0) const |
| AIDA::IHistogram1D * | plot (const double value, const std::string &title, const double low, const double high, const unsigned long bins=100, const double weight=1.0) const |
| AIDA::IHistogram1D * | plot (const double value, const Gaudi::Histo1DDef &hdef, const double weight=1.0) const |
| AIDA::IHistogram1D * | plot (const double value, const HistoID &ID, const std::string &title, const double low, const double high, const unsigned long bins=100, const double weight=1.0) const |
| AIDA::IHistogram1D * | plot (const double value, const HistoID &ID, const Gaudi::Histo1DDef &hdef, const double weight=1.0) const |
| AIDA::IHistogram1D * | plot (const FUNCTION &func, OBJECT first, OBJECT last, const std::string &title, const double low, const double high, const unsigned long bins=100) const |
| AIDA::IHistogram1D * | plot (const FUNCTION &func, OBJECT first, OBJECT last, const HistoID &ID, const std::string &title, const double low, const double high, const unsigned long bins=100) const |
| AIDA::IHistogram1D * | plot (const FUNCTION &func, OBJECT first, OBJECT last, const std::string &title, const double low, const double high, const unsigned long bins, const WEIGHT &weight) const |
| AIDA::IHistogram1D * | plot (const FUNCTION &func, OBJECT first, OBJECT last, const HistoID &ID, const std::string &title, const double low, const double high, const unsigned long bins, const WEIGHT &weight) const |
| AIDA::IHistogram2D * | plot2D (const double valueX, const double valueY, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const unsigned long binsX=50, const unsigned long binsY=50, const double weight=1.0) const |
| AIDA::IHistogram2D * | plot2D (const double valueX, const double valueY, const HistoID &ID, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const unsigned long binsX=50, const unsigned long binsY=50, const double weight=1.0) const |
| AIDA::IHistogram3D * | plot3D (const double valueX, const double valueY, const double valueZ, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const double lowZ, const double highZ, const unsigned long binsX=10, const unsigned long binsY=10, const unsigned long binsZ=10, const double weight=1.0) const |
| AIDA::IHistogram3D * | plot3D (const double valueX, const double valueY, const double valueZ, const HistoID &ID, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const double lowZ, const double highZ, const unsigned long binsX=10, const unsigned long binsY=10, const unsigned long binsZ=10, const double weight=1.0) const |
| AIDA::IProfile1D * | profile1D (const double valueX, const double valueY, const std::string &title, const double lowX, const double highX, const unsigned long binsX=100, const std::string &opt="", const double lowY=-std::numeric_limits< double >::max(), const double highY=std::numeric_limits< double >::max(), const double weight=1.0) const |
| AIDA::IProfile1D * | profile1D (const double valueX, const double valueY, const HistoID &ID, const std::string &title, const double lowX, const double highX, const unsigned long binsX=100, const std::string &opt="", const double lowY=-std::numeric_limits< double >::max(), const double highY=std::numeric_limits< double >::max(), const double weight=1.0) const |
| AIDA::IProfile1D * | profile1D (const std::string &title) const |
| AIDA::IProfile1D * | profile1D (const HistoID &ID) const |
| AIDA::IProfile2D * | profile2D (const double valueX, const double valueY, const double valueZ, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const unsigned long binsX=50, const unsigned long binsY=50, const double weight=1.0) const |
| AIDA::IProfile2D * | profile2D (const double valueX, const double valueY, const double valueZ, const HistoID &ID, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const unsigned long binsX=50, const unsigned long binsY=50, const double weight=1.0) const |
| AIDA::IProfile2D * | profile2D (const std::string &title) const |
| AIDA::IProfile2D * | profile2D (const HistoID &ID) const |
| AIDA::IHistogram1D * | book1D (const std::string &title, const double low=0, const double high=100, const unsigned long bins=100) const |
| AIDA::IHistogram1D * | book1D (const HistoID &ID, const std::string &title, const double low=0, const double high=100, const unsigned long bins=100) const |
| AIDA::IHistogram1D * | book (const std::string &title, const double low=0, const double high=100, const unsigned long bins=100) const |
| AIDA::IHistogram1D * | book (const Gaudi::Histo1DDef &hdef) const |
| AIDA::IHistogram1D * | book (const HistoID &ID, const std::string &title, const double low=0, const double high=100, const unsigned long bins=100) const |
| AIDA::IHistogram1D * | book (const HistoID &ID, const Gaudi::Histo1DDef &hdef) const |
| AIDA::IHistogram2D * | book2D (const std::string &title, const double lowX=0, const double highX=100, const unsigned long binsX=50, const double lowY=0, const double highY=100, const unsigned long binsY=50) const |
| AIDA::IHistogram2D * | book2D (const HistoID &ID, const std::string &title, const double lowX=0, const double highX=100, const unsigned long binsX=50, const double lowY=0, const double highY=100, const unsigned long binsY=50) const |
| AIDA::IHistogram3D * | book3D (const std::string &title, const double lowX=0, const double highX=100, const unsigned long binsX=10, const double lowY=0, const double highY=100, const unsigned long binsY=10, const double lowZ=0, const double highZ=100, const unsigned long binsZ=10) const |
| AIDA::IHistogram3D * | book3D (const HistoID &ID, const std::string &title, const double lowX=0, const double highX=100, const unsigned long binsX=10, const double lowY=0, const double highY=100, const unsigned long binsY=10, const double lowZ=0, const double highZ=100, const unsigned long binsZ=10) const |
| AIDA::IProfile1D * | bookProfile1D (const std::string &title, const double low=0, const double high=100, const unsigned long bins=100, const std::string &opt="", const double lowY=-std::numeric_limits< double >::max(), const double highY=std::numeric_limits< double >::max()) const |
| AIDA::IProfile1D * | bookProfile1D (const HistoID &ID, const std::string &title, const double low=0, const double high=100, const unsigned long bins=100, const std::string &opt="", const double lowY=-std::numeric_limits< double >::max(), const double highY=std::numeric_limits< double >::max()) const |
| AIDA::IProfile2D * | bookProfile2D (const std::string &title, const double lowX=0, const double highX=100, const unsigned long binsX=50, const double lowY=0, const double highY=100, const unsigned long binsY=50) const |
| AIDA::IProfile2D * | bookProfile2D (const HistoID &ID, const std::string &title, const double lowX=0, const double highX=100, const unsigned long binsX=50, const double lowY=0, const double highY=100, const unsigned long binsY=50) const |
| AIDA::IHistogram1D * | fill (AIDA::IHistogram1D *histo, const double value, const double weight, const std::string &title="") const |
| AIDA::IHistogram2D * | fill (AIDA::IHistogram2D *histo, const double valueX, const double valueY, const double weight, const std::string &title="") const |
| AIDA::IHistogram3D * | fill (AIDA::IHistogram3D *histo, const double valueX, const double valueY, const double valueZ, const double weight, const std::string &title="") const |
| AIDA::IProfile1D * | fill (AIDA::IProfile1D *histo, const double valueX, const double valueY, const double weight, const std::string &title="") const |
| AIDA::IProfile2D * | fill (AIDA::IProfile2D *histo, const double valueX, const double valueY, const double valueZ, const double weight, const std::string &title="") const |
| AIDA::IHistogram1D * | histo1D (const std::string &title) const |
| AIDA::IHistogram1D * | histo1D (const HistoID &ID) const |
| AIDA::IHistogram1D * | histo (const std::string &title) const |
| AIDA::IHistogram1D * | histo (const HistoID &ID) const |
| AIDA::IHistogram2D * | histo2D (const std::string &title) const |
| AIDA::IHistogram2D * | histo2D (const HistoID &ID) const |
| AIDA::IHistogram3D * | histo3D (const std::string &title) const |
| AIDA::IHistogram3D * | histo3D (const HistoID &ID) const |
| bool | histoExists (const std::string &title) const |
| bool | histoExists (const HistoID &ID) const |
| unsigned int | totalNumberOfHistos () const |
| bool | produceHistos () const |
| bool | fullDetail () const |
| bool | checkForNaN () const |
| bool | splitHistoDir () const |
| HistoID::NumericID | histoOffSet () const |
| const std::string & | histoTopDir () const |
| const std::string & | histoDir () const |
| std::string | histoPath () const |
| bool | histosPrint () const |
| bool | useNumericAutoIDs () const |
| int | printHistos (const MSG::Level level=MSG::ALWAYS) const |
| const Histo1DMapTitle & | histo1DMapTitle () const |
| const Histo1DMapNumID & | histo1DMapNumID () const |
| const Histo1DMapLitID & | histo1DMapLitID () const |
| const Histo2DMapTitle & | histo2DMapTitle () const |
| const Histo2DMapNumID & | histo2DMapNumID () const |
| const Histo2DMapLitID & | histo2DMapLitID () const |
| const Histo3DMapTitle & | histo3DMapTitle () const |
| const Histo3DMapNumID & | histo3DMapNumID () const |
| const Histo3DMapLitID & | histo3DMapLitID () const |
| const Profile1DMapTitle & | profile1DMapTitle () const |
| const Profile1DMapNumID & | profile1DMapNumID () const |
| const Profile1DMapLitID & | profile1DMapLitID () const |
| const Profile2DMapTitle & | profile2DMapTitle () const |
| const Profile2DMapNumID & | profile2DMapNumID () const |
| const Profile2DMapLitID & | profile2DMapLitID () const |
| void | setProduceHistos (const bool val) |
| void | setFullDetail (const bool val) |
| void | setCheckForNaN (const bool val) |
| void | setSplitHistoDir (const bool val) |
| void | setHistoOffSet (const HistoID::NumericID val) |
| void | setHistoTopDir (const std::string &val) |
| void | setHistoDir (const std::string &val) |
| virtual StatusCode | sysExecute () |
| void | put (IDataProviderSvc *svc, DataObject *object, const std::string &address, const bool useRootInTES=true) const |
| void | put (DataObject *object, const std::string &address, const bool useRootInTES=true) const |
| Gaudi::Utils::GetData< TYPE >::return_type | get (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const |
| Gaudi::Utils::GetData< TYPE >::return_type | get (const std::string &location, const bool useRootInTES=true) const |
| TYPE * | getDet (IDataProviderSvc *svc, const std::string &location) const |
| TYPE * | getDet (const std::string &location) const |
| bool | exist (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const |
| bool | exist (const std::string &location, const bool useRootInTES=true) const |
| bool | existDet (IDataProviderSvc *svc, const std::string &location) const |
| bool | existDet (const std::string &location) const |
| TYPE * | getOrCreate (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const |
| TYPE * | getOrCreate (const std::string &location, const bool useRootInTES=true) const |
| bool | registerContext () const |
| INTupleSvc * | evtColSvc () const |
| IAlgContextSvc * | contextSvc () const |
| TOOL * | tool (const std::string &type, const std::string &name, const IInterface *parent=0, bool create=true) const |
| TOOL * | tool (const std::string &type, const IInterface *parent=0, bool create=true) const |
| SERVICE * | svc (const std::string &name, const bool create=true) const |
| IUpdateManagerSvc * | updMgrSvc () const |
| IDataProviderSvc * | fastContainersSvc () const |
| StatusCode | Error (const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const |
| StatusCode | Warning (const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const |
| StatusCode | Print (const std::string &msg, const StatusCode st=StatusCode::SUCCESS, const MSG::Level lev=MSG::INFO) const |
| StatusCode | Assert (const bool ok, const std::string &message="", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
| StatusCode | Assert (const bool ok, const char *message, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
| StatusCode | Exception (const std::string &msg, const GaudiException &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
| StatusCode | Exception (const std::string &msg, const std::exception &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
| StatusCode | Exception (const std::string &msg="no message", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
| MsgStream & | msgStream (const MSG::Level level) const |
| MsgStream & | always () const |
| MsgStream & | fatal () const |
| MsgStream & | err () const |
| MsgStream & | error () const |
| MsgStream & | warning () const |
| MsgStream & | info () const |
| MsgStream & | debug () const |
| MsgStream & | verbose () const |
| MsgStream & | msg () const |
| const Statistics & | counters () const |
| StatEntity & | counter (const std::string &tag) const |
| MSG::Level | msgLevel () const |
| bool | msgLevel (const MSG::Level level) const |
| void | resetMsgStream () const |
| bool | typePrint () const |
| bool | propsPrint () const |
| bool | statPrint () const |
| bool | errorsPrint () const |
| long | printStat (const MSG::Level level=MSG::ALWAYS) const |
| long | printErrors (const MSG::Level level=MSG::ALWAYS) const |
| long | printProps (const MSG::Level level=MSG::ALWAYS) const |
| void | registerCondition (const std::string &condition, StatusCode(CallerClass::*mf)()=NULL) |
| void | registerCondition (const std::string &condition, CondType *&condPtrDest, StatusCode(CallerClass::*mf)()=NULL) |
| void | registerCondition (char *condition, StatusCode(CallerClass::*mf)()=NULL) |
| void | registerCondition (TargetClass *condition, StatusCode(CallerClass::*mf)()=NULL) |
| StatusCode | runUpdate () |
| TransientFastContainer< T > * | getFastContainer (const std::string &location, typename TransientFastContainer< T >::size_type initial=0) |
| StatusCode | release (const IInterface *interface) const |
| unsigned long | release () |
| const std::string & | context () const |
| const std::string & | rootInTES () const |
| double | globalTimeOffset () const |
| virtual StatusCode | sysStart () |
| virtual StatusCode | sysInitialize () |
| virtual StatusCode | sysReinitialize () |
| virtual StatusCode | sysRestart () |
| virtual StatusCode | sysStop () |
| virtual StatusCode | sysFinalize () |
| virtual StatusCode | sysBeginRun () |
| virtual StatusCode | sysEndRun () |
| virtual const std::string & | name () const |
| virtual const std::string & | version () const |
| virtual StatusCode | configure () |
| virtual StatusCode | terminate () |
| virtual StatusCode | start () |
| virtual StatusCode | stop () |
| virtual StatusCode | reinitialize () |
| virtual StatusCode | restart () |
| virtual bool | isExecuted () const |
| virtual void | setExecuted (bool state) |
| virtual void | resetExecuted () |
| virtual StatusCode | beginRun () |
| virtual StatusCode | endRun () |
| virtual Gaudi::StateMachine::State | FSMState () const |
| virtual Gaudi::StateMachine::State | targetFSMState () const |
| virtual bool | isEnabled () const |
| virtual bool | filterPassed () const |
| virtual void | setFilterPassed (bool state) |
| StatusCode | service (const std::string &name, T *&psvc, bool createIf=true) const |
| StatusCode | service (const std::string &svcType, const std::string &svcName, T *&psvc) const |
| void | setOutputLevel (int level) |
| IAuditorSvc * | auditorSvc () const |
| IChronoStatSvc * | chronoSvc () const |
| IChronoStatSvc * | chronoStatService () const |
| IDataProviderSvc * | detSvc () const |
| IDataProviderSvc * | detDataService () const |
| IConversionSvc * | detCnvSvc () const |
| IConversionSvc * | detDataCnvService () const |
| IDataProviderSvc * | eventSvc () const |
| IDataProviderSvc * | evtSvc () const |
| IDataProviderSvc * | eventDataService () const |
| IConversionSvc * | eventCnvSvc () const |
| IConversionSvc * | eventDataCnvService () const |
| IHistogramSvc * | histoSvc () const |
| IHistogramSvc * | histogramDataService () const |
| IMessageSvc * | msgSvc () const |
| IMessageSvc * | messageService () const |
| INTupleSvc * | ntupleSvc () const |
| INTupleSvc * | ntupleService () const |
| IRndmGenSvc * | randSvc () const |
| IToolSvc * | toolSvc () const |
| IExceptionSvc * | exceptionSvc () const |
| ISvcLocator * | serviceLocator () const |
| ISvcLocator * | svcLoc () const |
| StatusCode | createSubAlgorithm (const std::string &type, const std::string &name, Algorithm *&pSubAlg) |
| std::vector< Algorithm * > * | subAlgorithms () const |
| virtual StatusCode | setProperty (const Property &p) |
| virtual StatusCode | setProperty (const std::string &s) |
| virtual StatusCode | setProperty (const std::string &n, const std::string &v) |
| StatusCode | setProperty (const std::string &name, const TYPE &value) |
| virtual StatusCode | getProperty (Property *p) const |
| virtual const Property & | getProperty (const std::string &name) const |
| virtual StatusCode | getProperty (const std::string &n, std::string &v) const |
| virtual const std::vector< Property * > & | getProperties () const |
| StatusCode | setProperties () |
| Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const |
| Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const |
| IMonitorSvc * | monitorSvc () const |
| void | declareInfo (const std::string &name, const T &var, const std::string &desc) const |
| void | declareInfo (const std::string &name, const std::string &format, const void *var, int size, const std::string &desc) const |
| unsigned long | addRef () |
| StatusCode | queryInterface (const InterfaceID &riid, void **) |
Static Public Member Functions | |
| static const InterfaceID & | interfaceID () |
| static const InterfaceID & | interfaceID () |
| static const InterfaceID & | interfaceID () |
Public Attributes | |
| SUCCESS | |
| NO_INTERFACE | |
| VERSMISMATCH | |
| LAST_ERROR | |
Protected Types | |
| typedef std::map< std::string, StatEntity > | Statistics |
| typedef std::map< std::string, unsigned int > | Counter |
| typedef std::vector< IAlgTool * > | AlgTools |
| typedef std::pair< IInterface *, std::string > | ServiceEntry |
| typedef std::vector< ServiceEntry > | Services |
Protected Member Functions | |
| const TupleMapTitle & | nTupleMapTitle () const |
| const TupleMapTitle & | evtColMapTitle () const |
| const TupleMapNumID & | nTupleMapNumID () const |
| const TupleMapNumID & | evtColMapNumID () const |
| const TupleMapLitID & | nTupleMapLitID () const |
| const TupleMapLitID & | evtColMapLitID () const |
| virtual Tuples::TupleObj * | createNTuple (const std::string &name, NTuple::Tuple *tuple, const CLID &clid) const |
| virtual Tuples::TupleObj * | createEvtCol (const std::string &name, NTuple::Tuple *tuple, const CLID &clid) const |
| std::string | convertTitleToID (const std::string &title) const |
| StatusCode | releaseTool (const IAlgTool *tool) const |
| StatusCode | releaseSvc (const IInterface *svc) const |
| bool | isInitialized () const |
| bool | isFinalized () const |
| int | outputLevel () const |
| IntegerProperty & | outputLevelProperty () |
| void | initOutputLevel (Property &prop) |
Static Protected Attributes | |
| static const bool | IgnoreRootInTES |
| static const bool | UseRootInTES |
Private Attributes | |
| IMagneticFieldSvc * | m_pIMF |
| IMagneticFieldSvc * | m_pIAF |
| double | m_zMin |
| double | m_zMax |
| double | m_step |
| double | m_xMin |
| double | m_xMax |
| double | m_yMin |
| double | m_yMax |
| std::string | m_FieldServiceName |
| Indicate the name of the service to be tested (default is MagneticFieldSvc). | |
| bool | m_testbdl |
| Test field integral for random "track" slopes. | |
| int | m_nInt |
| number of field integrals to generate | |
| An | Algorithm to read and plot magnetic filed maps | |
| for | x and y kept constant and varying z. The x, y | |
| positions | and the z range can be set in job options. |
Definition at line 25 of file MagFieldReader.h.
| MagFieldReader::MagFieldReader | ( | const std::string & | name, | |
| ISvcLocator * | pSvcLocator | |||
| ) |
Standard constructor.
Definition at line 36 of file MagFieldReader.cpp.
00038 : GaudiTupleAlg ( name , pSvcLocator ) 00039 , m_pIMF(0) 00040 { 00041 declareProperty("Zmin", m_zMin = -500.0*Gaudi::Units::mm); 00042 declareProperty("Zmax", m_zMax = 14000.0*Gaudi::Units::mm); 00043 declareProperty("Step", m_step = 100.0*Gaudi::Units::mm); 00044 declareProperty("Xmin", m_xMin = 0.0*Gaudi::Units::mm); 00045 declareProperty("Xmax", m_xMax = 4000.0*Gaudi::Units::mm); 00046 declareProperty("Ymin", m_yMin = 0.0*Gaudi::Units::mm); 00047 declareProperty("Ymax", m_yMax = 4000.0*Gaudi::Units::mm); 00048 declareProperty("FieldSvcName",m_FieldServiceName="MagneticFieldSvc"); 00049 declareProperty("TestFieldInt",m_testbdl=false); 00050 declareProperty("NInt",m_nInt=1000); 00051 00052 }
| virtual MagFieldReader::~MagFieldReader | ( | ) | [inline, virtual] |
| StatusCode MagFieldReader::initialize | ( | ) | [virtual] |
Destructor Algorithm initialization.
Reimplemented from GaudiTupleAlg.
Definition at line 57 of file MagFieldReader.cpp.
00057 { 00058 00059 StatusCode sc = GaudiTupleAlg::initialize(); // must be executed first 00060 if ( sc.isFailure() ) return sc; // error printed already by GaudiAlgorithm 00061 00062 debug() << "FieldReader intialize() has been called" << endmsg; 00063 00064 m_pIMF = svc<IMagneticFieldSvc>( m_FieldServiceName, true ); 00065 // m_pIAF = svc<IMagneticFieldSvc>( "AnalyticFieldSvc", true ); 00066 00067 info() << "MagFieldReader initialized with service ==> " << m_FieldServiceName << endmsg; 00068 return StatusCode::SUCCESS; 00069 };
| StatusCode MagFieldReader::execute | ( | ) | [virtual] |
Algorithm execution.
Reimplemented from GaudiTupleAlg.
Definition at line 74 of file MagFieldReader.cpp.
00074 { 00075 00076 if (m_testbdl) TestBdl(); 00077 00078 // Print out info messages with the field value at different locations. 00079 00080 debug() << "m_pIMF = " << m_pIMF << endreq; 00081 00082 Tuple nt1 = nTuple( 10, "Field", CLID_ColumnWiseTuple ); 00083 00084 Gaudi::XYZVector B(0.0,0.0,0.0); 00085 00086 00087 00088 for ( double z = m_zMin; z <= m_zMax; z += m_step ) { 00089 for( double y = m_yMin; y <= m_yMax; y += m_step ) { 00090 for( double x = m_xMin; x <= m_xMax; x += m_step ) { 00091 Gaudi::XYZPoint P( x, y, z ); 00092 00093 00094 m_pIMF->fieldVector( P, B ); 00095 00096 00097 00098 00099 // fill ntuple 00100 nt1->column( "x", P.x()/Gaudi::Units::cm ); 00101 nt1->column( "y", P.y()/Gaudi::Units::cm ); 00102 nt1->column( "z", P.z()/Gaudi::Units::cm ); 00103 nt1->column( "Bx", B.x()/Gaudi::Units::tesla ); 00104 nt1->column( "By", B.y()/Gaudi::Units::tesla ); 00105 nt1->column( "Bz", B.z()/Gaudi::Units::tesla ); 00106 00107 nt1->write(); 00108 } 00109 } 00110 00111 Gaudi::XYZPoint P0( 0.0, 0.0, z); 00112 Gaudi::XYZPoint P02( 0.0, 0.0, z); 00113 m_pIMF->fieldVector( P0, B ); 00114 00115 00116 debug() << "Magnetic Field at (" 00117 << P0.x() << ", " << P0.y() << ", " << P0.z() << " ) = " 00118 << (B.x())/Gaudi::Units::tesla << ", " 00119 << (B.y())/Gaudi::Units::tesla << ", " 00120 << (B.z())/Gaudi::Units::tesla << " Tesla " 00121 << endmsg; 00122 00123 00124 } 00125 00126 00127 00128 // Return status code. 00129 return StatusCode::SUCCESS; 00130 }
| StatusCode MagFieldReader::finalize | ( | ) | [virtual] |
Algorithm finalization.
Reimplemented from GaudiTupleAlg.
Definition at line 133 of file MagFieldReader.cpp.
00133 { 00134 00135 StatusCode sc = GaudiTupleAlg::finalize(); // must be executed first 00136 if ( sc.isFailure() ) return sc; // error printed already by GaudiAlgorithm 00137 if ( sc.isSuccess() ) 00138 info() << "Service finalized successfully" << endmsg; 00139 return StatusCode::SUCCESS; 00140 };
| void MagFieldReader::TestBdl | ( | ) |
Definition at line 143 of file MagFieldReader.cpp.
00144 { 00145 00146 Tuple nt2 = nTuple( 20, "Field Integral", CLID_ColumnWiseTuple ); 00147 00148 IBIntegrator* bIntegrator = tool<IBIntegrator>("BIntegrator"); 00149 00150 Gaudi::XYZPoint start(0,0,0); 00151 Gaudi::XYZPoint stop(0,0,9000/Gaudi::Units::mm); // start and end points 00152 double sigtx(0.3); 00153 double sigty(0.25); // slopes at start 00154 double zC; // z centre of field returned by tool 00155 Gaudi::XYZVector bdl; 00156 00157 // random number generation 00158 Rndm::Numbers gausstx(randSvc(),Rndm::Gauss(0.,sigtx/2)); 00159 Rndm::Numbers gaussty(randSvc(),Rndm::Gauss(0.,sigty/2)); 00160 00161 for (int i=0;i<m_nInt;i++) { 00162 double tx = gausstx(); 00163 double ty = gaussty(); 00164 if (fabs(tx) < sigtx && fabs(ty) < sigty) { 00165 00166 bIntegrator->calculateBdlAndCenter(start, stop, tx, ty, zC, bdl); 00167 00168 nt2->column( "tx", tx); 00169 nt2->column( "ty", ty); 00170 nt2->column( "Bdlx", bdl.x()); 00171 nt2->column( "Bdly", bdl.y()); 00172 nt2->column( "Bdlz", bdl.z()); 00173 nt2->column( "zCenter", zC); 00174 nt2->write(); 00175 } 00176 } 00177 00178 releaseTool(bIntegrator).ignore(); 00179 00180 }
| Tuple GaudiTuples< GaudiHistoAlg >::nTuple | ( | const TupleID & | ID, | |
| const std::string & | title, | |||
| const CLID & | clid = CLID_ColumnWiseTuple | |||
| ) | const [inherited] |
| Tuple GaudiTuples< GaudiHistoAlg >::evtCol | ( | const TupleID & | ID, | |
| const std::string & | title, | |||
| const CLID & | clid = CLID_ColumnWiseTuple | |||
| ) | const [inherited] |
| bool GaudiTuples< GaudiHistoAlg >::nTupleExists | ( | const TupleID & | ID | ) | const [inherited] |
| bool GaudiTuples< GaudiHistoAlg >::evtColExists | ( | const TupleID & | ID | ) | const [inherited] |
IMagneticFieldSvc* MagFieldReader::m_pIMF [private] |
Definition at line 42 of file MagFieldReader.h.
IMagneticFieldSvc* MagFieldReader::m_pIAF [private] |
Definition at line 43 of file MagFieldReader.h.
double MagFieldReader::m_zMin [private] |
Definition at line 49 of file MagFieldReader.h.
double MagFieldReader::m_zMax [private] |
Definition at line 49 of file MagFieldReader.h.
double MagFieldReader::m_step [private] |
Definition at line 49 of file MagFieldReader.h.
double MagFieldReader::m_xMin [private] |
Definition at line 52 of file MagFieldReader.h.
double MagFieldReader::m_xMax [private] |
Definition at line 52 of file MagFieldReader.h.
double MagFieldReader::m_yMin [private] |
Definition at line 52 of file MagFieldReader.h.
double MagFieldReader::m_yMax [private] |
Definition at line 52 of file MagFieldReader.h.
std::string MagFieldReader::m_FieldServiceName [private] |
Indicate the name of the service to be tested (default is MagneticFieldSvc).
Definition at line 53 of file MagFieldReader.h.
bool MagFieldReader::m_testbdl [private] |
int MagFieldReader::m_nInt [private] |
1.4.7