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;
17
18class HyperbolaStepper : public G4MagIntegratorStepper {
19public:
21 InfracolorForce& string,
22 const G4Track& track,
23 const G4Field* field = 0
24 );
25 virtual ~HyperbolaStepper();
26
27 virtual void Stepper(
28 const G4double y[],
29 const G4double[], //dydx
30 G4double h,
31 G4double yout[],
32 G4double yerr[]
33 );
34 virtual G4double DistChord() const;
35 virtual void ComputeRightHandSide(const G4double[], G4double[]) {}
36 virtual G4int IntegratorOrder() const {return 1;}
37
38 G4double GetForce() const;
39 const G4Field* GetField() const;
40 G4double GetMass() const;
41 G4double GetCharge() const;
42 const G4LorentzVector& GetStartMomentum() const;
43 G4double GetMaxExpRapidity() const;
44
45 G4double GetMaxLength() const;
46 void Update(G4FieldTrack& fieldTrack, G4bool forceStep);
47
48 void SetDebug(G4bool debug);
49
50private:
51 static const G4int m_NUM_VARS = 9;
52
54 const G4Field* const m_field;
55 const G4double m_mass;
56 const G4double m_charge;
57 const G4LorentzVector m_startMomentum;
58 const G4double m_maxExpRapidity;
59
60 std::vector<HyperbolaStep> m_steps;
62 std::vector<HyperbolaStep>::size_type m_nPrevSteps;
63
64 G4bool m_debug;
65
66 void SetCurrStep(G4double length);
67};
68
69inline G4double HyperbolaStepper::GetForce() const {return m_string.GetStringForce();}
70inline const G4Field* HyperbolaStepper::GetField() const {return m_field;}
71inline G4double HyperbolaStepper::GetMass() const {return m_mass;}
72inline G4double HyperbolaStepper::GetCharge() const {return m_charge;}
73inline const G4LorentzVector& HyperbolaStepper::GetStartMomentum() const {return m_startMomentum;}
75
76inline G4double HyperbolaStepper::GetMaxLength() const {return m_steps.back().GetMaxLength();}
77
79
80#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[])
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
G4double GetMaxExpRapidity() const
virtual G4int IntegratorOrder() const
const G4Field * GetField() const
static const G4int m_NUM_VARS
const G4Field *const m_field
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