ATLAS Offline Software
Loading...
Searching...
No Matches
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
15class G4Track;
16class G4Field;
17class G4ElectroMagneticField;
18
19class HyperbolaStepper : public G4MagIntegratorStepper {
20public:
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
51private:
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
70inline G4double HyperbolaStepper::GetForce() const {return m_string.GetStringForce();}
71inline const G4ElectroMagneticField* HyperbolaStepper::GetField() const {return m_field;}
72inline G4double HyperbolaStepper::GetMass() const {return m_mass;}
73inline G4double HyperbolaStepper::GetCharge() const {return m_charge;}
74inline const G4LorentzVector& HyperbolaStepper::GetStartMomentum() const {return m_startMomentum;}
76
77inline G4double HyperbolaStepper::GetMaxLength() const {return m_steps.back().GetMaxLength();}
78
80
81#endif
double length(const pvec &v)
const bool debug
#define y
Header file for AthHistogramAlgorithm.
const G4double m_charge
G4double GetMass() const
HyperbolaStepper(InfracolorForce &string, const G4Track &track, const G4Field *field=0)
G4double GetForce() const
virtual G4double DistChord() const
virtual void ComputeRightHandSide(const G4double[], G4double[])
const G4ElectroMagneticField * GetField() const
void SetCurrStep(G4double length)
G4double GetCharge() const
InfracolorForce & m_string
const G4double m_maxExpRapidity
void SetDebug(G4bool debug)
virtual void Stepper(const G4double y[], const G4double[], G4double h, G4double yout[], G4double yerr[])
const G4double m_mass
const G4ElectroMagneticField *const m_field
G4double GetMaxExpRapidity() const
virtual G4int IntegratorOrder() const
static const G4int m_NUM_VARS
void Update(G4FieldTrack &fieldTrack, G4bool forceStep)
const G4LorentzVector & GetStartMomentum() const
std::vector< HyperbolaStep >::size_type m_nPrevSteps
std::vector< HyperbolaStep > m_steps
G4double GetMaxLength() const
HyperbolaStep m_currStep
const G4LorentzVector m_startMomentum