herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
ScalarFormFactor.h
1// -*- C++ -*-
2//
3// ScalarFormFactor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4// Copyright (C) 2002-2019 The Herwig Collaboration
5//
6// Herwig is licenced under version 3 of the GPL, see COPYING for details.
7// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8//
9#ifndef HERWIG_ScalarFormFactor_H
10#define HERWIG_ScalarFormFactor_H
11//
12// This is the declaration of the ScalarFormFactor class.
13//
14#include "ThePEG/Interface/Interfaced.h"
15#include "ScalarFormFactor.fh"
16#include "ThePEG/Config/Complex.h"
17
18namespace Herwig {
19using namespace ThePEG;
20
98
99public:
100
105
106public:
107
115
121 void persistentInput(PersistentIStream & is, int version);
123
127 static void Init();
128
129protected:
130
137 virtual IBPtr clone() const {return new_ptr(*this);}
138
143 virtual IBPtr fullclone() const {return new_ptr(*this);}
145
146public:
147
150
158 int formFactorNumber(int in,int out,bool & cc) const {
159 if(_incomingid.size()==0) return -1;
160 int output(-1);unsigned int ix(0);
161 do {
162 if(_incomingid[ix]== in && _outgoingid[ix]== out) {
163 cc=false;
164 output=ix;
165 }
166 else if (_incomingid[ix]==-in && _outgoingid[ix]==-out) {
167 cc=true;
168 output=ix;
169 }
170 else if(_incomingid[ix]==-in && _outgoingid[ix]==out &&
171 (abs(_outgoingid[ix])/100)%10==(abs(_outgoingid[ix])/10)%10) {
172 cc=true;
173 output=ix;
174 }
175 ++ix;
176 }
177 while(ix<_incomingid.size()&&output<0);
178 return output;
179 }
180
187 void particleID(unsigned int iloc,int& id0,int& id1) const {
188 id0=_incomingid[iloc];
189 id1=_outgoingid[iloc];
190 }
191
200 void formFactorInfo(unsigned int & iloc,int & ispin,int & spect,
201 int & inquark, int & outquark) const {
202 ispin = _outgoingJ[iloc];
203 spect = _spectator[iloc];
204 inquark = _inquark[iloc];
205 outquark = _outquark[iloc];
206 }
207
217 void formFactorInfo(int in,int out,int & ispin,
218 int & spect,int & inquark, int & outquark) const {
219 bool dummy;
220 unsigned int ix(formFactorNumber(in,out,dummy));
221 formFactorInfo(ix,ispin,spect,inquark,outquark);
222 }
223
227 unsigned int numberOfFactors() const {return _incomingid.size();}
229
230public:
231
247 virtual void ScalarScalarFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
248 Energy m0,Energy m1,Complex & f0,
249 Complex & fp) const;
250
266 virtual void ScalarVectorFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1,
267 Energy m0, Energy m1,Complex & A0,
268 Complex & A1,Complex & A2, Complex & V) const;
269
285 virtual void ScalarTensorFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
286 Energy m0, Energy m1, complex<InvEnergy2> & h,
287 Complex & k, complex<InvEnergy2> & bp,
288 complex<InvEnergy2> & bm) const;
289
303 virtual void ScalarScalarSigmaFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
304 Energy m0, Energy m1,Complex & fT) const;
305
321 virtual void ScalarVectorSigmaFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
322 Energy m0, Energy m1, Complex & T1,
323 Complex & T2, Complex & T3) const;
324
326
333 virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
334
335protected:
336
346 void addFormFactor(int in,int out,int spin, int spect,
347 int inquark, int outquark) {
348 _incomingid.push_back(in);
349 _outgoingid.push_back(out);
350 _outgoingJ.push_back(spin);
351 _spectator.push_back(spect);
352 _inquark.push_back(inquark);
353 _outquark.push_back(outquark);
354 }
355
360 void initialModes(unsigned int nmodes) {_numbermodes=nmodes;}
361
365 unsigned int initialModes() const {return _numbermodes;}
366
367protected:
368
376 virtual void doinit();
378
379private:
380
385
386 private:
387
391 vector<int> _incomingid;
392
396 vector<int> _outgoingid;
397
401 vector<int> _outgoingJ;
402
406 vector<int> _spectator;
407
411 vector<int> _inquark;
412
416 vector<int> _outquark;
417
421 unsigned int _numbermodes;
422
423};
424
425}
426
427#endif /* HERWIG_ScalarFormFactor_H */
The ScalarFormFactor class is the base class for the form factors for the weak decay of scalar to sca...
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
virtual IBPtr clone() const
Make a simple clone of this object.
unsigned int _numbermodes
The initial number of modes.
void initialModes(unsigned int nmodes)
Set initial number of modes.
static void Init()
Standard Init function used to initialize the interfaces.
virtual void dataBaseOutput(ofstream &os, bool header, bool create) const
Output the setup information for the particle database.
void particleID(unsigned int iloc, int &id0, int &id1) const
Get the particle ids for an entry.
virtual void ScalarScalarFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1, Energy m0, Energy m1, Complex &f0, Complex &fp) const
The form factor for the weak decay of a scalar to a scalar.
virtual void ScalarScalarSigmaFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1, Energy m0, Energy m1, Complex &fT) const
The form factor for the weak penguin decay of a scalar meson to a scalar meson.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
unsigned int initialModes() const
Get the initial number of modes.
vector< int > _outgoingid
the id's of the outgoing particles
vector< int > _outgoingJ
spin of the outgoing particle
int formFactorNumber(int in, int out, bool &cc) const
Find the location for a given pair of particle.
virtual void doinit()
Initialize this object after the setup phase before saving and EventGenerator to disk.
void formFactorInfo(int in, int out, int &ispin, int &spect, int &inquark, int &outquark) const
Information on the form factor.
vector< int > _spectator
the id of the spectator quark
ScalarFormFactor()
Default constructor.
vector< int > _incomingid
the id's of the incoming particles
void formFactorInfo(unsigned int &iloc, int &ispin, int &spect, int &inquark, int &outquark) const
Information on the form factor.
virtual void ScalarTensorFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1, Energy m0, Energy m1, complex< InvEnergy2 > &h, Complex &k, complex< InvEnergy2 > &bp, complex< InvEnergy2 > &bm) const
The form factor for the weak decay of a scalar to a tensor.
virtual void ScalarVectorSigmaFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1, Energy m0, Energy m1, Complex &T1, Complex &T2, Complex &T3) const
The form factor for the weak penguin decay of a scalar meson to a vector meson.
unsigned int numberOfFactors() const
number of form factors
vector< int > _outquark
the id of the outgoing quark
vector< int > _inquark
the id of the decaying quark
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
void addFormFactor(int in, int out, int spin, int spect, int inquark, int outquark)
Add a form factor to the list.
ScalarFormFactor & operator=(const ScalarFormFactor &)=delete
Private and non-existent assignment operator.
virtual void ScalarVectorFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1, Energy m0, Energy m1, Complex &A0, Complex &A1, Complex &A2, Complex &V) const
The form factor for the weak decay of a scalar to a vector.
-*- C++ -*-
std::complex< double > Complex
ThePEG::Ptr< InterfacedBase >::pointer IBPtr