Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
mrtInterfaceCurrent.h
Go to the documentation of this file.
1 // This file is part of MARTY.
2 //
3 // MARTY is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // MARTY is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with MARTY. If not, see <https://www.gnu.org/licenses/>.
15 
21 #ifndef HEP_INTERFACE_CURRENT_H_INCLUDED
22 #define HEP_INTERFACE_CURRENT_H_INCLUDED
23 
24 #include "mrtInterface.h"
25 #include "amplitude.h"
26 
27 namespace mty {
28 
30 /*************************************************/
31 // Computation utilities //
32 /*************************************************/
34 
35 inline
36 Amplitude SelfEnergy(
37  mty::Order order,
38  mty::Particle &particle)
39 {
40  return SelfEnergy(order, particle, *mty::Model::current);
41 }
42 
43 inline
44 Amplitude SelfEnergy(
45  mty::Particle &particle)
46 {
47  return SelfEnergy(particle, *mty::Model::current);
48 }
49 
50 inline std::vector<FeynmanRule> ComputeFeynmanRules()
51 {
52  return ComputeFeynmanRules(*mty::Model::current);
53 }
54 
56 /*************************************************/
57 // Model building utilities //
58 /*************************************************/
60 
61 template<class ...Args>
62 inline void AddGaugedGroup(Args&& ...args)
63 {
64  AddGroup(*Model::current, std::forward<Args>(args)...);
65 }
66 
67 inline void AddParticle(
68  mty::Particle& particle,
69  bool initTerms = true
70  )
71 {
72  AddParticle(*mty::Model::current, particle, initTerms);
73 }
74 
75 inline void AddTerm(
76  csl::Expr const& term,
77  bool addCC = false
78  )
79 {
80  AddTerm(*mty::Model::current, term, addCC);
81 }
82 
83 inline void AddTerm(
84  std::vector<csl::Expr> const& terms,
85  bool addCC = false
86  )
87 {
88  AddTerm(*mty::Model::current, terms, addCC);
89 }
90 
91 inline mty::Particle GetParticle(
92  std::string const& name
93  )
94 {
95  return GetParticle(*mty::Model::current, name);
96 }
97 
98 inline void PromoteGoldstone(
99  mty::Particle& goldstone,
100  mty::Particle& gaugeBoson
101  )
102 {
103  PromoteGoldstone(*mty::Model::current, goldstone, gaugeBoson);
104 }
105 
106 inline void PromoteGoldstone(
107  char const* goldstone,
108  char const* gaugeBoson)
109 {
110  PromoteGoldstone(*mty::Model::current, goldstone, gaugeBoson);
111 }
112 
113 inline csl::Expr GetCoupling(std::string const& nameCoupling)
114 {
115  return GetCoupling(*mty::Model::current, nameCoupling);
116 }
117 
118 inline csl::Tensor GetYukawa(std::string const& nameCoupling)
119 {
120  return GetYukawa(*mty::Model::current, nameCoupling);
121 }
122 
123 inline void Rename(
124  std::string const& oldName,
125  std::string const& newName
126  )
127 {
128  Rename(*mty::Model::current, oldName, newName);
129 }
130 
131 inline void Init()
132 {
133  Init(*mty::Model::current);
134 }
135 
136 inline void Replaced(
137  csl::Expr const& init,
138  csl::Expr const& target
139  )
140 {
141  Replaced(*mty::Model::current, init, target);
142 }
143 
144 inline void Replaced(
145  csl::Tensor& init,
146  csl::Expr const& target
147  )
148 {
149  Replaced(*mty::Model::current, init, target);
150 }
151 
152 inline void Replaced(
153  csl::Tensor& init,
154  csl::Tensor& target
155  )
156 {
157  Replaced(*mty::Model::current, init, target);
158 }
159 
160 inline void Replaced(
161  Particle const& particle,
162  csl::Expr const& newTerm
163  )
164 {
165  Replaced(*mty::Model::current, particle, newTerm);
166 }
167 
168 inline void Rotate(
169  std::vector<mty::Particle> const& fields,
170  std::vector<mty::Particle> const& newFields,
171  std::vector<std::vector<csl::Expr>> const& rotation,
172  bool diagonalizeMasses = false
173  )
174 {
175  Rotate(
176  *mty::Model::current,
177  fields,
178  newFields,
179  rotation,
180  diagonalizeMasses
181  );
182 }
183 
184 inline void Rotate(
185  std::vector<std::string> const& fields,
186  std::vector<std::string> const& newFields,
187  std::vector<std::vector<csl::Expr>> const& rotation,
188  bool diagonalizeMasses = false
189  )
190 {
191  Rotate(
192  *mty::Model::current,
193  fields,
194  newFields,
195  rotation,
196  diagonalizeMasses
197  );
198 }
199 
200 inline void DiagonalizeMassMatrices()
201 {
202  DiagonalizeMassMatrices(*mty::Model::current);
203 }
204 
205 inline void BreakGaugeSymmetry(
206  std::string const& brokenGroup,
207  std::vector<Particle> const& brokenFields,
208  std::vector<std::vector<std::string>> const& newNames
209  )
210 {
211  BreakGaugeSymmetry(
212  *mty::Model::current,
213  brokenGroup,
214  brokenFields,
215  newNames
216  );
217 }
218 
219 inline void BreakGaugeSymmetry(
220  std::string const& brokenGroup,
221  std::initializer_list<std::string> const& brokenFields,
222  std::vector<std::vector<std::string>> const& newNames
223  )
224 {
225  BreakGaugeSymmetry(
226  *mty::Model::current,
227  brokenGroup,
228  brokenFields,
229  newNames
230  );
231 }
232 
233 inline void BreakFlavorSymmetry(
234  std::string const& brokenFlavor,
235  std::initializer_list<std::string> const& brokenFields,
236  std::vector<std::vector<std::string>> const& newNames
237  )
238 {
239  BreakFlavorSymmetry(
240  *mty::Model::current,
241  brokenFlavor,
242  brokenFields,
243  newNames
244  );
245 }
246 
247 inline void BreakFlavorSymmetry(
248  std::string const& brokenFlavor,
249  std::vector<mty::Particle> const& brokenFields,
250  std::vector<std::vector<std::string>> const& newNames
251  )
252 {
253  BreakFlavorSymmetry(
254  *mty::Model::current,
255  brokenFlavor,
256  brokenFields,
257  newNames
258  );
259 }
260 
261 inline void Refreshed()
262 {
263  Refreshed(*mty::Model::current);
264 }
265 
267 /*************************************************/
268 // Group theory //
269 /*************************************************/
271 
272 inline void SetGaugeChoice(
273  std::string const& nameParticle,
274  gauge::Type choice
275  )
276 {
278  *mty::Model::current,
279  nameParticle,
280  choice
281  );
282 }
283 
284 }
285 
286 #endif
void Replaced(mty::Model &model, csl::Expr const &init, csl::Expr const &target)
Replaces an expression in all kinetic / mass / interactions terms of a model.
Definition: mrtInterface.cpp:499
This class inherits from std::shared_ptr<QuantumFieldParent> and should be used instead of direct Qua...
Definition: quantumField.h:1409
Namespace of MARTY.
Definition: 2HDM.h:31
Contains the mty::Amplitude object that stores the data of an amplitude calculation.
Contains interface functions for the user.
Expr Refreshed(const Abstract *expr)
Type
Different types of gauge ficing parameter for gauge boson propagators.
Definition: gaugedGroup.h:92
void Rotate(mty::Model &model, std::vector< mty::Particle > const &fields, std::vector< mty::Particle > const &newFields, std::vector< std::vector< csl::Expr >> const &rotation, bool diagonalizeMasses=false)
Rotates a bunch of fields to another using a given matrix.
Definition: mrtInterface.cpp:527
void SetGaugeChoice(mty::Model &model, std::string const &nameParticle, mty::gauge::Type choice)
This function changes the gauge fixing parameter for the gauge boson of name nameGroup. Depending on this choice, the propagator of gauge bosons is modified.
Definition: mrtInterface.cpp:705