ATLAS Offline Software
SolenoidTest.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // SolenoidTest.h, (c) ATLAS Detector software
8 
9 #ifndef SOLENOIDTEST_H
10 #define SOLENOIDTEST_H 1
11 
12 // STL includes
13 #include <string>
14 #include <cmath>
15 
16 // FrameWork includes
17 #include "GaudiKernel/ServiceHandle.h"
19 
20 // forward declarations
21 class ITHistSvc;
22 class TTree;
23 namespace MagField {
24  class IMagFieldSvc;
25 }
26 
27 namespace MagField {
28 
29  class SolenoidTest : public AthAlgorithm {
30 
31  public:
32  SolenoidTest( const std::string& name, ISvcLocator* pSvcLocator );
33  virtual ~SolenoidTest();
37 
38  private:
40  void getFieldValue();
42 
44 
46  std::string m_histStream;
47 
48  TTree* m_tree;
49  std::string m_treeName;
50 
51  double m_minR;
52  double m_maxR;
53  double m_minZ;
54  double m_maxZ;
55 
56  int m_stepsR;
57  int m_stepsZ;
58  int m_stepsPhi;
59 
60  double m_xyzt[4]{};
61  double m_field[3]{};
62  double m_fieldZR[3]{};
63  double m_fieldOld[3]{};
64  double m_deriv[9]{};
65  double m_derivZR[9]{};
66  double m_derivOld[9]{};
67 
68  long m_event;
69 
72  bool m_useOldField = false;
75 
76  }; // end class SolenoidTest
77 
78 } // end namespace MagField
79 
80 #endif
MagField::SolenoidTest::m_maxZ
double m_maxZ
maximum z to scan in mm
Definition: SolenoidTest.h:54
MagField::SolenoidTest::m_thistSvc
ServiceHandle< ITHistSvc > m_thistSvc
the histogram service
Definition: SolenoidTest.h:45
MagField::SolenoidTest::m_event
long m_event
event counter
Definition: SolenoidTest.h:68
MagField::SolenoidTest::finalize
StatusCode finalize()
Definition: SolenoidTest.cxx:126
MagField::SolenoidTest::m_minZ
double m_minZ
minimum z to scan in mm
Definition: SolenoidTest.h:53
MagField::SolenoidTest::m_useFastField
bool m_useFastField
Definition: SolenoidTest.h:71
MagField::SolenoidTest::m_derivZR
double m_derivZR[9]
stores derivatives
Definition: SolenoidTest.h:65
MagField::SolenoidTest::m_maxR
double m_maxR
maximum radius to scan in mm
Definition: SolenoidTest.h:52
MagField::SolenoidTest::getFieldValue
void getFieldValue()
get Field value either by G4 or by MagFieldSvc
MagField::SolenoidTest::SolenoidTest
SolenoidTest(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SolenoidTest.cxx:43
MagField::SolenoidTest::m_stepsR
int m_stepsR
the number of steps in R
Definition: SolenoidTest.h:56
MagField::SolenoidTest::m_useOldField
bool m_useOldField
Definition: SolenoidTest.h:72
MagField::SolenoidTest::m_deriv
double m_deriv[9]
stores derivatives
Definition: SolenoidTest.h:64
MagField::SolenoidTest::m_tree
TTree * m_tree
the ROOT tree containing the output
Definition: SolenoidTest.h:48
AthAlgorithm.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MagField::SolenoidTest::m_derivOld
double m_derivOld[9]
stores derivatives
Definition: SolenoidTest.h:66
MagField::SolenoidTest::m_fieldZR
double m_fieldZR[3]
stores the 2d field components
Definition: SolenoidTest.h:62
MagField::SolenoidTest::m_stepsZ
int m_stepsZ
the number of steps in Z
Definition: SolenoidTest.h:57
AthAlgorithm
Definition: AthAlgorithm.h:47
MagField
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Definition: ForwardRegionFieldSvc.h:27
MagField::SolenoidTest::m_minR
double m_minR
minimum radius to scan in mm
Definition: SolenoidTest.h:51
MagField::SolenoidTest::m_magFieldSvc
ServiceHandle< MagField::IMagFieldSvc > m_magFieldSvc
new field svc
Definition: SolenoidTest.h:43
MagField::SolenoidTest::m_useFullField
bool m_useFullField
Definition: SolenoidTest.h:70
MagField::SolenoidTest::m_writeNtuple
bool m_writeNtuple
Definition: SolenoidTest.h:73
MagField::SolenoidTest::m_fieldOld
double m_fieldOld[3]
stores the old field components
Definition: SolenoidTest.h:63
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MagField::SolenoidTest::m_treeName
std::string m_treeName
name of the Tree object
Definition: SolenoidTest.h:49
MagField::SolenoidTest::m_derivatives
bool m_derivatives
Definition: SolenoidTest.h:74
MagField::SolenoidTest::m_field
double m_field[3]
stores the field components
Definition: SolenoidTest.h:61
MagField::SolenoidTest::initialize
StatusCode initialize()
Definition: SolenoidTest.cxx:81
MagField::SolenoidTest::checkWithReference
bool checkWithReference()
check current field with reference field
MagField::SolenoidTest::m_histStream
std::string m_histStream
THistSvc stream name.
Definition: SolenoidTest.h:46
MagField::SolenoidTest::m_stepsPhi
int m_stepsPhi
the number of steps in phi
Definition: SolenoidTest.h:58
MagField::SolenoidTest
Definition: SolenoidTest.h:29
MagField::SolenoidTest::m_xyzt
double m_xyzt[4]
stores the current xyzt position
Definition: SolenoidTest.h:60
MagField::SolenoidTest::~SolenoidTest
virtual ~SolenoidTest()
Definition: SolenoidTest.cxx:77
MagField::SolenoidTest::execute
StatusCode execute()
Definition: SolenoidTest.cxx:133
ServiceHandle< MagField::IMagFieldSvc >
MagField::SolenoidTest::fetchEnvironment
StatusCode fetchEnvironment()
get environment either for g4 or for magFieldSvc