herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
BaryonFormFactor.h
1// -*- C++ -*-
2#ifndef HERWIG_BaryonFormFactor_H
3#define HERWIG_BaryonFormFactor_H
4//
5// This is the declaration of the BaryonFormFactor class.
6//
7#include "ThePEG/Interface/Interfaced.h"
8#include "BaryonFormFactor.fh"
9#include "ThePEG/Config/Complex.h"
10#include "Herwig/Decay/IsoSpin.h"
11
12namespace Herwig {
13using namespace ThePEG;
14
93
94public:
95
99 enum Virtuality {TimeLike, SpaceLike};
100
101
102public:
103
108
116
122 void persistentInput(PersistentIStream & is, int version);
124
128 static void Init();
129
130protected:
131
138 virtual IBPtr clone() const {return new_ptr(*this);}
139
144 virtual IBPtr fullclone() const {return new_ptr(*this);}
146
147public:
148
151
159 int formFactorNumber(int in,int out,bool & cc) const {
160 int output(-1);
161 unsigned int ix(0);
162 if(_incomingid.size()==0){return output;}
163 do {
164 if(_incomingid[ix]== in && _outgoingid[ix]== out) {
165 cc=false;
166 output=ix;
167 }
168 else if (_incomingid[ix]==-in && _outgoingid[ix]==-out) {
169 cc=true;
170 output=ix;
171 }
172 ++ix;
173 }
174 while(ix<_incomingid.size()&&output<0);
175 return output;
176 }
177
184 void particleID(int iloc,int& id0,int& id1) {
185 id0=_incomingid[iloc];
186 id1=_outgoingid[iloc];
187 }
188
199 void formFactorInfo(int iloc,int & ispin,int & ospin,int & spect1,
200 int & spect2, int & inquark,int & outquark) {
201 ispin = _incomingJ[iloc];
202 ospin = _outgoingJ[iloc];
203 spect1 = _spectator1[iloc];
204 spect2 = _spectator2[iloc];
205 inquark = _inquark[iloc];
206 outquark = _outquark[iloc];
207 }
208
220 void formFactorInfo(int in,int out,int & ispin,int & ospin,int & spect1,
221 int & spect2, int & inquark,int & outquark) {
222 bool dummy;
223 unsigned int ix=formFactorNumber(in,out,dummy);
224 formFactorInfo(ix,ispin,ospin,spect1,spect2,inquark,outquark);
225 }
226
230 unsigned int numberOfFactors() const {return _incomingid.size();}
232
233public:
234
257 virtual void SpinHalfSpinHalfFormFactor(Energy2 q2,int iloc, int id0, int id1,
258 Energy m0, Energy m1,
259 Complex & f1v,Complex & f2v,Complex & f3v,
260 Complex & f1a,Complex & f2a,Complex & f3a,
261 FlavourInfo flavour,
262 Virtuality virt=SpaceLike);
263
286 virtual void SpinHalfSpinThreeHalfFormFactor(Energy2 q2,int iloc, int id0, int id1,
287 Energy m0, Energy m1,
288 Complex & g1v,Complex & g2v,Complex & g3v,
289 Complex & g4v,Complex & g1a,Complex & g2a,
290 Complex & g3a,Complex & g4a,
291 FlavourInfo flavour,
292 Virtuality virt=SpaceLike);
294
301 virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
302
303protected:
304
316 void addFormFactor(int in,int out,int inspin, int outspin, int spect1,
317 int spect2, int inquark,int outquark) {
318 _incomingid.push_back(in);
319 _outgoingid.push_back(out);
320 _incomingJ.push_back(inspin);
321 _outgoingJ.push_back(outspin);
322 _spectator1.push_back(spect1);
323 _spectator2.push_back(spect2);
324 _inquark.push_back(inquark);
325 _outquark.push_back(outquark);
326 }
327
332 void initialModes(unsigned int nmodes) {_numbermodes=nmodes;}
333
337 unsigned int initialModes() const {return _numbermodes;}
338
339protected:
340
348 virtual void doinit();
350
351private:
352
357
358 private:
359
363 vector<int> _incomingid;
364
368 vector<int> _outgoingid;
369
373 vector<int> _incomingJ;
374
378 vector<int> _outgoingJ;
379
383 vector<int> _spectator1;
384
388 vector<int> _spectator2;
389
393 vector<int> _inquark;
394
398 vector<int> _outquark;
399
403 unsigned int _numbermodes;
404};
405
406}
407
408#endif /* HERWIG_BaryonFormFactor_H */
The BaryonFormFactor class is the base class for the implementation of the form-factors for the weak ...
vector< int > _outquark
the id of the outgoing quark
vector< int > _incomingJ
spin of the incoming particle
int formFactorNumber(int in, int out, bool &cc) const
Find the location for a given pair of particle.
virtual void SpinHalfSpinHalfFormFactor(Energy2 q2, int iloc, int id0, int id1, Energy m0, Energy m1, Complex &f1v, Complex &f2v, Complex &f3v, Complex &f1a, Complex &f2a, Complex &f3a, FlavourInfo flavour, Virtuality virt=SpaceLike)
The form factor for the weak decay of a spin baryon to a spin baryon.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
virtual void doinit()
Initialize this object after the setup phase before saving and EventGenerator to disk.
Virtuality
Whether the form factor is space- or time-like.
unsigned int _numbermodes
The initial number of modes.
virtual void dataBaseOutput(ofstream &os, bool header, bool create) const
Output the setup information for the particle database.
vector< int > _inquark
the id of the decaying quark
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
vector< int > _spectator2
the id of the second spectator quark
virtual IBPtr clone() const
Make a simple clone of this object.
BaryonFormFactor & operator=(const BaryonFormFactor &)=delete
Private and non-existent assignment operator.
BaryonFormFactor()
Default constructor.
void formFactorInfo(int in, int out, int &ispin, int &ospin, int &spect1, int &spect2, int &inquark, int &outquark)
Information on the form factor.
void formFactorInfo(int iloc, int &ispin, int &ospin, int &spect1, int &spect2, int &inquark, int &outquark)
Information on the form factor.
unsigned int initialModes() const
Get the initial number of modes.
unsigned int numberOfFactors() const
number of form factors
void particleID(int iloc, int &id0, int &id1)
Get the particle ids for an entry.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
vector< int > _outgoingJ
spin of the outgoing particle
virtual void SpinHalfSpinThreeHalfFormFactor(Energy2 q2, int iloc, int id0, int id1, Energy m0, Energy m1, Complex &g1v, Complex &g2v, Complex &g3v, Complex &g4v, Complex &g1a, Complex &g2a, Complex &g3a, Complex &g4a, FlavourInfo flavour, Virtuality virt=SpaceLike)
The form factor for the weak decay of a spin baryon to a spin baryon.
void initialModes(unsigned int nmodes)
Set initial number of modes.
vector< int > _spectator1
the id of the first spectator quark
vector< int > _incomingid
the id's of the incoming particles
vector< int > _outgoingid
the id's of the outgoing particles
void addFormFactor(int in, int out, int inspin, int outspin, int spect1, int spect2, int inquark, int outquark)
Add a form factor to the list.
static void Init()
Standard Init function used to initialize the interfaces.
-*- C++ -*-
std::complex< double > Complex
ThePEG::Ptr< InterfacedBase >::pointer IBPtr