ATLAS Offline Software
HyperbolaStepper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef HYPERBOLASTEPPER_H
6 #define HYPERBOLASTEPPER_H
7 
8 #include <vector>
9 #include "G4LorentzVector.hh"
10 #include "G4MagIntegratorStepper.hh"
11 #include "G4FieldTrack.hh"
12 #include "InfracolorForce.h"
13 #include "HyperbolaStep.h"
14 
15 class G4Track;
16 class G4Field;
17 class G4ElectroMagneticField;
18 
19 class HyperbolaStepper : public G4MagIntegratorStepper {
20 public:
22  InfracolorForce& string,
23  const G4Track& track,
24  const G4Field* field = 0
25  );
26  virtual ~HyperbolaStepper();
27 
28  virtual void Stepper(
29  const G4double y[],
30  const G4double[], //dydx
31  G4double h,
32  G4double yout[],
33  G4double yerr[]
34  );
35  virtual G4double DistChord() const;
36  virtual void ComputeRightHandSide(const G4double[], G4double[]) {}
37  virtual G4int IntegratorOrder() const {return 1;}
38 
39  G4double GetForce() const;
40  const G4ElectroMagneticField* GetField() const;
41  G4double GetMass() const;
42  G4double GetCharge() const;
43  const G4LorentzVector& GetStartMomentum() const;
44  G4double GetMaxExpRapidity() const;
45 
46  G4double GetMaxLength() const;
47  void Update(G4FieldTrack& fieldTrack, G4bool forceStep);
48 
49  void SetDebug(G4bool debug);
50 
51 private:
52  static const G4int m_NUM_VARS = 9;
53 
55  const G4ElectroMagneticField* const m_field;
56  const G4double m_mass;
57  const G4double m_charge;
58  const G4LorentzVector m_startMomentum;
59  const G4double m_maxExpRapidity;
60 
61  std::vector<HyperbolaStep> m_steps;
63  std::vector<HyperbolaStep>::size_type m_nPrevSteps;
64 
65  G4bool m_debug;
66 
67  void SetCurrStep(G4double length);
68 };
69 
70 inline G4double HyperbolaStepper::GetForce() const {return m_string.GetStringForce();}
71 inline const G4ElectroMagneticField* HyperbolaStepper::GetField() const {return m_field;}
72 inline G4double HyperbolaStepper::GetMass() const {return m_mass;}
73 inline G4double HyperbolaStepper::GetCharge() const {return m_charge;}
74 inline const G4LorentzVector& HyperbolaStepper::GetStartMomentum() const {return m_startMomentum;}
75 inline G4double HyperbolaStepper::GetMaxExpRapidity() const {return m_maxExpRapidity;}
76 
77 inline G4double HyperbolaStepper::GetMaxLength() const {return m_steps.back().GetMaxLength();}
78 
80 
81 #endif
InfracolorForce::GetStringForce
G4double GetStringForce() const
Definition: InfracolorForce.h:98
HyperbolaStepper::m_startMomentum
const G4LorentzVector m_startMomentum
Definition: HyperbolaStepper.h:58
HyperbolaStepper::GetStartMomentum
const G4LorentzVector & GetStartMomentum() const
Definition: HyperbolaStepper.h:74
HyperbolaStepper::m_field
const G4ElectroMagneticField *const m_field
Definition: HyperbolaStepper.h:55
HyperbolaStepper::IntegratorOrder
virtual G4int IntegratorOrder() const
Definition: HyperbolaStepper.h:37
HyperbolaStepper::m_nPrevSteps
std::vector< HyperbolaStep >::size_type m_nPrevSteps
Definition: HyperbolaStepper.h:63
HyperbolaStepper::GetMass
G4double GetMass() const
Definition: HyperbolaStepper.h:72
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
HyperbolaStepper::m_currStep
HyperbolaStep m_currStep
Definition: HyperbolaStepper.h:62
HyperbolaStepper::Update
void Update(G4FieldTrack &fieldTrack, G4bool forceStep)
Definition: HyperbolaStepper.cxx:90
HyperbolaStepper::GetMaxLength
G4double GetMaxLength() const
Definition: HyperbolaStepper.h:77
HyperbolaStepper::m_maxExpRapidity
const G4double m_maxExpRapidity
Definition: HyperbolaStepper.h:59
HyperbolaStepper
Definition: HyperbolaStepper.h:19
HyperbolaStepper::SetCurrStep
void SetCurrStep(G4double length)
Definition: HyperbolaStepper.cxx:54
InfracolorForce
Definition: InfracolorForce.h:14
HyperbolaStepper::SetDebug
void SetDebug(G4bool debug)
Definition: HyperbolaStepper.h:79
HyperbolaStepper::HyperbolaStepper
HyperbolaStepper(InfracolorForce &string, const G4Track &track, const G4Field *field=0)
Definition: HyperbolaStepper.cxx:12
HyperbolaStepper::DistChord
virtual G4double DistChord() const
Definition: HyperbolaStepper.cxx:85
HyperbolaStepper::m_mass
const G4double m_mass
Definition: HyperbolaStepper.h:56
HyperbolaStepper::GetMaxExpRapidity
G4double GetMaxExpRapidity() const
Definition: HyperbolaStepper.h:75
HyperbolaStepper::GetField
const G4ElectroMagneticField * GetField() const
Definition: HyperbolaStepper.h:71
HyperbolaStepper::GetForce
G4double GetForce() const
Definition: HyperbolaStepper.h:70
HyperbolaStepper::m_steps
std::vector< HyperbolaStep > m_steps
Definition: HyperbolaStepper.h:61
HyperbolaStepper::ComputeRightHandSide
virtual void ComputeRightHandSide(const G4double[], G4double[])
Definition: HyperbolaStepper.h:36
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
InfracolorForce.h
HyperbolaStepper::GetCharge
G4double GetCharge() const
Definition: HyperbolaStepper.h:73
HyperbolaStepper::m_string
InfracolorForce & m_string
Definition: HyperbolaStepper.h:54
HyperbolaStepper::m_charge
const G4double m_charge
Definition: HyperbolaStepper.h:57
y
#define y
h
HyperbolaStepper::Stepper
virtual void Stepper(const G4double y[], const G4double[], G4double h, G4double yout[], G4double yerr[])
Definition: HyperbolaStepper.cxx:63
HyperbolaStepper::m_NUM_VARS
static const G4int m_NUM_VARS
Definition: HyperbolaStepper.h:52
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
HyperbolaStepper::m_debug
G4bool m_debug
Definition: HyperbolaStepper.h:65
HyperbolaStep.h
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
HyperbolaStepper::~HyperbolaStepper
virtual ~HyperbolaStepper()
Definition: HyperbolaStepper.cxx:50
HyperbolaStep
Definition: HyperbolaStep.h:17