ATLAS Offline Software
InfracolorForce.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INFRACOLORFORCE_H
6 #define INFRACOLORFORCE_H
7 
8 #include <deque>
9 #include "G4LorentzVector.hh"
10 #include "StringVector.h"
11 
12 class G4Track;
13 
15 public:
18  void SetReactionForce(InfracolorForce* reactionForce);
19  const InfracolorForce* GetReactionForce() const;
21  void SetFirstStringLength(G4double firstStringLength);
22  void StartTracking(const G4Track* dest);
23  void TrackKilled();
24  G4bool IsSourceAlive() const;
25  G4bool IsSourceInitialized() const;
26  G4bool HasNextStringVector() const;
27  const std::deque<StringVector>& GetStringVectors() const;
28  void PopTo(std::deque<StringVector>::const_iterator stringPtr, G4double fracLeft);
29  void PushStringVector(const StringVector& v);
30  void SetStringForce(G4double stringForce);
31  G4double GetStringForce() const;
32  void SetMaxBoost(G4double maxBoost);
33  G4double GetMaxExpRapidity() const;
34  void SetMaxMergeT(G4double maxMergeT);
35  void SetMaxMergeMag(G4double maxMergeMag);
36  G4int GetNStrings() const;
37  G4LorentzVector GetSumStrings() const;
38  G4ThreeVector GetAngMomentum() const;
39  G4ThreeVector GetMomentOfE() const;
40  void Clear();
41 
42 private:
43  void CombineStringVector(const StringVector& v);
44 
45  G4double m_stringForce; // strength of string force
46  InfracolorForce* m_reactionForce; // string vectors moving the other direction, creating reaction force on the other quirk
47  G4LorentzVector m_initU; // initial 4-velocity of quirk
48  G4bool m_initialized; // this track has been set up with m_initU
49  G4bool m_killed; // this track has been killed
50  G4bool m_firstStep; // this is the first step and m_firstString must be used
51  std::deque<StringVector> m_stringVectors; // string vectors moving towards tracked quirk, each carrying momentum of F_string * value
52  StringVector m_firstString; // string vector used to take first step
53  StringVector m_borrowedString; // portion of m_firstString used, to be subtracted from next vector pushed
54  G4double m_firstStringLength; // length of string vector to be used for first step
55  G4double m_maxExpRapidity; // maximum exp(rapidity) of boost to be allowed in a single step
56  G4double m_maxMergeT;
57  G4double m_maxMergeMag;
58 };
59 
61  m_reactionForce = reactionForce;
62 }
63 
65  return m_reactionForce;
66 }
67 
69  return m_reactionForce;
70 }
71 
72 inline void InfracolorForce::SetFirstStringLength(G4double firstStringLength) {
73  m_firstStringLength = firstStringLength;
74  m_reactionForce->m_firstStringLength = firstStringLength;
75 }
76 
77 inline G4bool InfracolorForce::IsSourceAlive() const {
78  return !m_reactionForce->m_killed;
79 }
80 
81 inline G4bool InfracolorForce::IsSourceInitialized() const {
83 }
84 
85 inline G4bool InfracolorForce::HasNextStringVector() const {
86  return !m_stringVectors.empty();
87 }
88 
89 inline const std::deque<StringVector>& InfracolorForce::GetStringVectors() const {
90  return m_stringVectors;
91 }
92 
93 inline void InfracolorForce::SetStringForce(G4double stringForce) {
94  m_stringForce = stringForce;
95  m_reactionForce->m_stringForce = stringForce;
96 }
97 
98 inline G4double InfracolorForce::GetStringForce() const {
99  return m_stringForce;
100 }
101 
102 inline void InfracolorForce::SetMaxBoost(G4double maxBoost) {
103  m_maxExpRapidity = std::sqrt((1.0 + maxBoost) / (1.0 - maxBoost));
105 }
106 
107 inline G4double InfracolorForce::GetMaxExpRapidity() const {
108  return m_maxExpRapidity;
109 }
110 
111 inline void InfracolorForce::SetMaxMergeT(G4double maxMergeT) {
112  m_maxMergeT = maxMergeT;
113  m_reactionForce->m_maxMergeT = maxMergeT;
114 }
115 
116 inline void InfracolorForce::SetMaxMergeMag(G4double maxMergeMag) {
117  m_maxMergeMag = maxMergeMag;
118  m_reactionForce->m_maxMergeMag = maxMergeMag;
119 }
120 
121 inline G4int InfracolorForce::GetNStrings() const {
122  return m_stringVectors.size();
123 }
124 
125 #endif
InfracolorForce::GetStringForce
G4double GetStringForce() const
Definition: InfracolorForce.h:98
InfracolorForce::InfracolorForce
InfracolorForce()
Definition: InfracolorForce.cxx:10
InfracolorForce::m_initU
G4LorentzVector m_initU
Definition: InfracolorForce.h:47
InfracolorForce::SetStringForce
void SetStringForce(G4double stringForce)
Definition: InfracolorForce.h:93
InfracolorForce::m_maxExpRapidity
G4double m_maxExpRapidity
Definition: InfracolorForce.h:55
InfracolorForce::m_firstStringLength
G4double m_firstStringLength
Definition: InfracolorForce.h:54
InfracolorForce::GetStringVectors
const std::deque< StringVector > & GetStringVectors() const
Definition: InfracolorForce.h:89
InfracolorForce::m_initialized
G4bool m_initialized
Definition: InfracolorForce.h:48
perfmonmt-printer.dest
dest
Definition: perfmonmt-printer.py:189
InfracolorForce::StartTracking
void StartTracking(const G4Track *dest)
Definition: InfracolorForce.cxx:28
InfracolorForce::IsSourceAlive
G4bool IsSourceAlive() const
Definition: InfracolorForce.h:77
InfracolorForce::~InfracolorForce
~InfracolorForce()
Definition: InfracolorForce.cxx:26
InfracolorForce::SetMaxMergeMag
void SetMaxMergeMag(G4double maxMergeMag)
Definition: InfracolorForce.h:116
InfracolorForce::SetReactionForce
void SetReactionForce(InfracolorForce *reactionForce)
Definition: InfracolorForce.h:60
InfracolorForce::PopTo
void PopTo(std::deque< StringVector >::const_iterator stringPtr, G4double fracLeft)
Definition: InfracolorForce.cxx:72
InfracolorForce::PushStringVector
void PushStringVector(const StringVector &v)
Definition: InfracolorForce.cxx:95
InfracolorForce::m_stringVectors
std::deque< StringVector > m_stringVectors
Definition: InfracolorForce.h:51
InfracolorForce::m_stringForce
G4double m_stringForce
Definition: InfracolorForce.h:45
InfracolorForce
Definition: InfracolorForce.h:14
InfracolorForce::CombineStringVector
void CombineStringVector(const StringVector &v)
Definition: InfracolorForce.cxx:112
InfracolorForce::Clear
void Clear()
Definition: InfracolorForce.cxx:57
InfracolorForce::GetAngMomentum
G4ThreeVector GetAngMomentum() const
Definition: InfracolorForce.cxx:134
InfracolorForce::GetReactionForce
const InfracolorForce * GetReactionForce() const
Definition: InfracolorForce.h:64
InfracolorForce::SetMaxMergeT
void SetMaxMergeT(G4double maxMergeT)
Definition: InfracolorForce.h:111
InfracolorForce::GetNStrings
G4int GetNStrings() const
Definition: InfracolorForce.h:121
InfracolorForce::SetFirstStringLength
void SetFirstStringLength(G4double firstStringLength)
Definition: InfracolorForce.h:72
InfracolorForce::m_reactionForce
InfracolorForce * m_reactionForce
Definition: InfracolorForce.h:46
StringVector
Definition: StringVector.h:11
InfracolorForce::m_maxMergeT
G4double m_maxMergeT
Definition: InfracolorForce.h:56
InfracolorForce::IsSourceInitialized
G4bool IsSourceInitialized() const
Definition: InfracolorForce.h:81
InfracolorForce::m_killed
G4bool m_killed
Definition: InfracolorForce.h:49
InfracolorForce::m_firstString
StringVector m_firstString
Definition: InfracolorForce.h:52
InfracolorForce::GetSumStrings
G4LorentzVector GetSumStrings() const
Definition: InfracolorForce.cxx:125
python.PyAthena.v
v
Definition: PyAthena.py:157
StringVector.h
InfracolorForce::TrackKilled
void TrackKilled()
Definition: InfracolorForce.cxx:67
InfracolorForce::SetMaxBoost
void SetMaxBoost(G4double maxBoost)
Definition: InfracolorForce.h:102
InfracolorForce::m_maxMergeMag
G4double m_maxMergeMag
Definition: InfracolorForce.h:57
InfracolorForce::GetMomentOfE
G4ThreeVector GetMomentOfE() const
Definition: InfracolorForce.cxx:146
InfracolorForce::m_borrowedString
StringVector m_borrowedString
Definition: InfracolorForce.h:53
InfracolorForce::HasNextStringVector
G4bool HasNextStringVector() const
Definition: InfracolorForce.h:85
InfracolorForce::GetMaxExpRapidity
G4double GetMaxExpRapidity() const
Definition: InfracolorForce.h:107
InfracolorForce::m_firstStep
G4bool m_firstStep
Definition: InfracolorForce.h:50