CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
MagneticField/MagneticField-00-01-38/MagneticField/MagFieldReader.h
Go to the documentation of this file.
1#ifndef MAGFIELDREADER_H
2#define MAGFIELDREADER_H 1
3
4// Include files
5// from STL
6#include <string>
7
8// from Gaudi
9#include "GaudiKernel/Algorithm.h"
10#include "GaudiKernel/NTuple.h"
11#include "BesTimerSvc/IBesTimerSvc.h"
12#include "BesTimerSvc/BesTimerSvc.h"
13
14// Forward references
16
17/** @class MagFieldReader MagFieldReader.h
18 * @param An Algorithm to read and plot magnetic filed maps
19 * @param for x and y kept constant and varying z. The x, y
20 * @param positions and the z range can be set in job options.
21 *
22 */
23
24class MagFieldReader : public Algorithm {
25public:
26 /// Standard constructor
27 MagFieldReader( const std::string& name, ISvcLocator* pSvcLocator );
28
29 virtual ~MagFieldReader( ){ }; ///< Destructor
30
31 virtual StatusCode initialize(); ///< Algorithm initialization
32 virtual StatusCode execute (); ///< Algorithm execution
33 virtual StatusCode finalize (); ///< Algorithm finalization
34
35protected:
36
37private:
38
39 StatusCode readField();
40
41 // Pointer to the magnetic field service
42 IMagneticFieldSvc* m_pIMF;
43
44 // range and steps in z to get the magnetic field
45 double m_zMin, m_zMax, m_step;
46
47 // range in x and y
48 double m_xMin, m_xMax, m_yMin, m_yMax;
49
50 NTuple::Tuple* m_ntuple;
51 NTuple::Tuple* m_tuple1;
52 NTuple::Tuple* m_tuple2;
53 NTuple::Tuple* m_tuple3;
54 NTuple::Tuple* m_tuple4;
55 NTuple::Item<float> m_x, m_y, m_z, m_Bx, m_By, m_Bz, m_r;
56 NTuple::Item<float> m_x2, m_y2, m_z2, m_Bx2, m_By2, m_Bz2, m_r2;
57 NTuple::Item<float> m_x3, m_y3, m_z3, m_Bx3, m_By3, m_Bz3, m_r3, m_phi3;
58 NTuple::Item<float> m_sigma_bx,m_sigma_by,m_sigma_bz;
59 NTuple::Item<float> m_time;
60
61 std::string m_filename;
62
63 IBesTimerSvc* m_timersvc;
64 BesTimer* m_timer;
65};
66#endif // MAGFIELDREADER_H
MagFieldReader(const std::string &name, ISvcLocator *pSvcLocator)
Standard constructor.
virtual StatusCode finalize()
Algorithm finalization.
virtual StatusCode execute()
Algorithm execution.
virtual StatusCode initialize()
Destructor.