Page MenuHomeHEPForge

No OneTemporary

This document is not UTF8. It was detected as ISO-8859-1 (Latin 1) and converted to UTF8 for display.
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,594 +1,603 @@
+2004-09-04 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
+
+ * Shower (directory): Modified comments to doxygen format.
+
+ * Config/Pythia7.h: Modified comments to doxygen format.
+
+ * Makefile, src/Makefile: Introduce init target to just initialize
+ the repository. The doc target depends on init.
+
2004-09-03 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* Makefile: Modified the doc target to prepare for doxygen.
* *** GLOBAL ***: Modified all descriptions in declarations of
interfaces to conform to doxygen format.
2004-08-25 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* *** GLOBAL ***: Changed inheritance of BaseClassTrait
specializations for documentation purposes.
2003-08-31 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* StringFrag/StringRegion.cc: Don't try to construnct transverse
directions of a zero-mass string region.
2003-08-14 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* StringFrag/LundFragHandler.cc: Recombination of two gluons now
gives a massless gluon by energy shuffling. Still it is impossible
to hadronize a closed loop of two gluons.
* StringFrag/LundFragHandler.*: Increased the number of attempts
for each string by a factor 8, increasing the minimum mass and
angle for gluon recombination at most seven times.
2003-08-13 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* StringFrag/LundFragHandler.cc: Changed the call to the
ClusterCollapser::collapse() function to the new signature.
2003-08-12 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* Makefile: Removed -$(MAKEFLAGS) in recursive calls.
2003-07-29 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* StringFrag/*.*: Various minor changes to allow the
LundFlavourGenerator class to implement the new FlavourGenerator
interface.
2003-07-27 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* src/Pythia7Defaults.in: Changed the copying of particles since
the behavior of the "cp" command was changed for particles. Also
changed the naming of classes from "/{namespace}/{class}" to
"{namespace}::{class}".
2003-07-23 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* Shower/Beam.h: Fixed initialization of PDF class.
2003-07-22 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* Makefile: Changed the version number to 1.0ab (between alpha and
beta).
2003-07-21 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* Shower/ShowerHandler.cc: Fixed the umlauts on Torbjörns
references.
2003-07-16 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* src/Pythia7Defaults.in, src/SimpleLEP.in, src/SimpleLHC.in: All
objects specific to Pythia seven are now copied into
subdirectories of the /Pythia7 directory. No change is made to the
default ThePEG repository.
* StringFrag/LundFragHandler.cc: Changed the names of the
LundPtGenerator, LundZGenerator and LundFlGenerator interfaces to
PtGenerator, ZGenerator and FlavourGenerator respectively.
* StringFrag/LundFlavourGenerator.cc: Changed the name of the
interface theBaryonMode to BaryonMode in Init().
* Shower/ShowerHandler.cc: Added References in the class
description in Init().
* Config/Makefile.common.in: Removed unneccessary variables.
* Makefile: install now depends on the check target.
2003-07-14 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* StringFrag/Hadron.icc: Just cosmetics.
2003-07-13 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* lib/Makefile: The .so files in the listed sub-directories are
explicitly soft-linked to the lib directory.
2003-07-12 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* StringFrag/LundFragHandler.*: Added recombination of very nearby
partons to avoid infinite loops. Also boost all strings to cms
before fragmenting to avoid precision problems (possibly leading
to infinite loops).
* StringFrag/String.*: Changed the way the string is initialized
internaly.
2003-07-09 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* StringFrag/*: Fixed up units on variables and literals. Removed
obsolete class LundFragHandlerBase.
* StringFrag/LundFragHandler.cc: Added rescaling of z for heavy
quarks (need to be checked with Torbjörn). Now use newStep()
method.
2003-07-08 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* src/Makefile: Removed uneccessary cleaning of .exe files.
* Makefile: Hid unnecessary output with @.
* src/Pythia7Defaults.in: Added parton showers to the pre-defined
event handlers
* StringFrag/LundFragHandler.cc: Fixed (hopefully) a bug in the
creation of the two last hadrons (needs to be checked with
Torbjörn). Formerly ther longitudinal and transverse momenta were
set according to the reference frame of two different string
regions (current and final) now they are both set according to the
final.
* StringFrag/Hadron.icc: Changed the setting of hadron masses to
use ParticleData::generateMass(), rather than just using the
nominal mass. Also changed the limits on the mass inconsistency
when hadrons are actualy created. This should no longer be
necessary after fixing the bug above in LundFragHandler.
2003-07-07 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* src/Makefile (Module): Added dependency on libP7Shower.so
2003-06-18 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* Shower: Started to add the Pythia7 parton shower classes.
2003-06-14 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* StringFrag/String.cc: Added extra check to avoid ending up in a
non-existent string region.
2003-02-27 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* LundFragHandler.*: Removed old string finding functions. Instead
LundFragHandler now has a reference to a ClusterCollapser object
which extracts strings and also collapses ones which are too
small.
2003-02-26 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* StringCollapser.icc: Added class for handling the collapsing of
strings which are too small to be fragmented. So far it does not
do anything besides what the ClusterCollapser base class does, but
it will soon.
2002-09-21 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* LundFragHandler.cc: Fixed unPhysicalString() which was not
working properly before - also fixed LundFragHdlrUnphysicalString
exception to be a proper Pythia7 exception.
2001-07-06 Leif Lönnblad <Leif.Lonnblad@thep.lu.se>
* StringRegion.cc: In CLHEP-1.7 the behaviour of
LorentzVector::boostVector has changed to give an error message if
unphysical boost is produced. This caused a problem in the init()
function, which now calculates the (unphysical) boost vectors by
hand.
2000-08-18 Leif Lönnblad <leif@thep.lu.se>
* String.cc (getStringRegionPtr): Optimized by avoiding several
'map::find' where only one was needed.
* LundFlavourGenerator.cc: Optimized using 'push_back' random
numbers for some boolean choices.
2000-08-02 Marc Bertini <marc@odin.thep.lu.se>
* EndPoint.icc: Destructor flag for speed test
* LundZGenerator.cc: changed setShape() inlined/no-inlined
for speed test
2000-06-15 Marc Bertini <marc@odin.thep.lu.se>
* EndPoint.h, String.h, StringRegion.h,
Oriented.h, OrientedIndex.h : html Doc
* EndPoint.h, String.h, StringRegion.h, Oriented.h,
OrientedIndex.h : html Doc
2000-06-14 Marc Bertini <marc@odin.thep.lu.se>
* Hadron[.h, .icc]: theParticle member and storeMomentum()
function commented out
2000-06-12 Marc Bertini <marc@odin.thep.lu.se>
* LundFlavourGenerator.h: touched for debugging
unchanged!
html-link to LundFlavourHandler corrected
2000-06-09 Leif Lönnblad <leif@thep.lu.se>
* LundFragHandler.cc: Delete the String before each event. This
should be handled in a better way.
2000-06-06 Marc Bertini <marc@odin.thep.lu.se>
* LundFlavourGenerator.cc: some comments changed,
* LundFlavourGenerator.h: Documentation added,
newHadron member suppressed,
RandomFlavourMixing(...) made inline,
PopSelectCurtainFlavour(long inDQ) inline canceled,
argument name in isQuark, isDiquark added.
2000-06-04 Marc Bertini <marc@odin.thep.lu.se>
* LundFlavourGenerator.h: Documentation added
argument names, changed in Q2MesonQ, formMeson, selectMesonMultiplet,
2000-05-31 Marc Bertini <marc@odin.thep.lu.se>
* LundFragHandler.h: Documentation added
* LundFlavourHandler.h: Documentation added
* EndPoint.[h, icc]: member thepT suppressed.
argument changed in SR(SRPtr) method
2000-05-30 Marc Bertini <marc@odin.thep.lu.se>
* EndPoint.h: Agument names added in EndPoint, Init, updatedFrom, PData
* String.h: Add argument meaning in the update methods
( reset(..), updatePtotRem(..) -Xremf(..) -Xremb(..)) and the
setXpolusRem(..),-XminusRem(..) methods
* Hadron.[h,icc]: Document added
* LundZGenerator.[cc,icc]: minor changes +
comments suppressed.
2000-05-29 Marc Bertini <marc@odin.thep.lu.se>
* LundZGenerator.h: Documentation added
* String.h: Add indices in Pplus(int), Pminus(), Pfwd(), Pbwd()
Xremf() Xremb, XplusRem(), XminusRem() declarations.
setLightConeVector() suppressed
2000-05-26 Marc Bertini <marc@odin.thep.lu.se>
* LundFlavourGenerator.h: documentation added
* EndPoint.[h, icc, cc]: documentation added
* String.[h, icc, cc]: documentation added
* ZGenerator.h: documentation added,
Units in generate function added (mT -> mT2)
* PtGenerator.[h, icc, cc]: documentation added
* LundPtGenerator.[h, icc, cc]: documentation added
2000-05-23 Leif Lönnblad <leif@thep.lu.se>
* LundFragHandler.cc: Added a call to 'useMe()' in the 'handle'
method to enable writing out of references.
2000-05-19 Marc Bertini <marc@odin.thep.lu.se>
* LundFragHandler.[cc, h]:
modelDescription() and modelReferences() added
2000-05-14 Lenita Lönnblad Ohlin <lenita@localhost>
* LundFragHandler.[h, cc]: Added Stop exception specification for
handle() method.
2000-03-24 Leif Lönnblad <leif@thep.lu.se>
* LundZGenerator.cc, LundPtGenerator.cc, LundFragHandler.cc:
Added units to some parameter definitions.
2000-03-23 Marc Bertini <marc@odin.thep.lu.se>
* EndPoint.icc:
- mass() touched for debugging -
problem Diquark constituent mass != nominal mass
* LundFragHandler.icc:
- comment on the destructor suppressed
2000-03-22 Marc Bertini <marc@odin.thep.lu.se>
* ZGenerator.[h, icc, cc]:
- generate() made const
- documentation added
* LundZGenerator.[h, icc, cc]:
- New ZGenerator including Diquark, HeavyQuark (Bowler) implementation
- new parameter deltaDQ, rQc added and fully interfaced
- Coefficients for internal description added -> all mutable
- added af(), bf, cf() to return internal Coefficients
- a(), b(), become aSym(), bSym()
- cc becomes theCf; no more in the constructor list
- new methods setShape() and rQ() to set the form of the flavour dependent
of the Lund Symmetric Fragmentation function
- smallZmax() and largeZmax() modified to take the Zmax value
2000-03-20 Marc Bertini <marc@odin.thep.lu.se>
* EndPoint.icc:
- stepUp() and stepDown() forward stepping procedure to
the String::nextUp(), String::nextDown(), methods
* String.h, String.cc:
- nextUp(), nextDown() methods added to move
in the string region map - Avoid EndPoint class
ti use StringRegion::j(), k() accessors.
2000-03-17 Marc Bertini <marc@odin.thep.lu.se>
* StringRegion.[h,icc,cc]:
- minor changes in the constructor, Documentation added
* LundFragHandler.[h,icc,cc]:
- Documentation added
* LundFlavourHandler.[h,icc,cc]:
- class for handling flavour (PopCorn) generation added
- compiles ** not yet tested **
* Makefile: LundFlavourHandler added
* LundFlavourGenerator.h, .icc:
- PopCorn interfaces PopMesonN(tcPDPtr) and
PopSelectCurtainFlavour(tcPDPtr) added
* EndPoint.h:
- comments added
2000-03-15 Marc Bertini <marc@odin.thep.lu.se>
* LundFragHandler.cc:
- Typos in infinit Loop exception corrected
* EndPoint.icc:
- mass() returns the constituantMass of the quark-diquark
standing at the EndPoint -> no more infinite loop exception
due to use of current quark.
2000-03-14 Marc Bertini <marc@odin.thep.lu.se>
* LundFlavourGenerator.h, .cc:
- virtual splitHadron() added ** not yet implemented **
* LundPtGenerator.h, .cc:
- generate made const
- member pT not used any more
* PtGenerator.h:
- virtual generate() made const
- return pair<,> instead of pair<,> &
2000-03-13 Marc Bertini <marc@odin.thep.lu.se>
* LundFragHandler.xh, .cc:
- LundFragLoopException(), LundFragInitException() implemented
to be catched by previous event handlers.
* FragHelpers.h: Touched for debugging - No changes
* Hadron.icc:
- In PData(newPDPtr) newPDPtr can be null, when the joining is rejected
by the flavour generator.
Particularly for the final configuration (DQ1-DQ2)
test of PData added before calling the mass() function
* LundFragHandler.cc:
- default curtainQ=0 suppressed in generateHadron(...) definition
2000-03-10 Marc Bertini <marc@odin.thep.lu.se>
* LundFlavourGenerator.cc, icc:
- Bug fixed : Diquark test in isDiquark(long) corrected
- Bug fixed : (Diquark-quark) test corrected in consistentJoin(long, long)
* LundFlavourGenerator.cc:
- Persistent-Input-Output() modified to read/write the different
vectors (mixingAngles, DQWeight, SU6Tables ...) and the temporary
POPweight parameters.
2000-03-09 Marc Bertini <marc@odin.thep.lu.se>
* LundFlavourGenerator.cc, .icc:
- Copy cstor modified to allow copy of user-modified
flavour generator
- initialize() added in doupdate ()
2000-03-08 Marc Bertini <marc@odin.thep.lu.se>
* LundFlavourGenerator.cc, .h:
- print() added for debuging
* FragHelpers.h:
- Bug fixed in sign(long, long)
* FragInterface.h:
- fuctions rnd(), abd getParticleData(long) added
2000-03-07 Marc Bertini <marc@odin.thep.lu.se>
* LundFlavourGenerator.cc, .h:
- PersistentIO functions added
- Copy constructor changed
- Add initialize() method to init parameters depending on the
user changes
* LundFragHandler.cc, .h:
- virtual functions for flavour generation added
2000-03-03 Marc Bertini <marc@odin.thep.lu.se>
* LundFlavourGenerator.h, .icc, .cc:
- PopCorn meson methods added
- Interface getRandomFlavour() added to be used by the
pickFirstEPts() in LundFragHandler
- Compliles - not tested -
* LundFragHandler.cc: Fixed bug in the calculation of the
RndFlavourId in pickFirstEPts().
2000-03-02 Marc Bertini <marc@odin.thep.lu.se>
* LundFlavourGenerator.h, .icc, .cc:
- Baryon production methods added
- SU6 Weights not yet implemented
2000-03-01 Marc Bertini <marc@odin.thep.lu.se>
* FragHelpers.h:
- sign(long, long) added for Flavour Generator
* LundFlavourGenerator.h, .icc, .cc:
- Most of the meson production method added
- Corresponding parameter Interfaces added
- ** Problems with the Mixing Angles Parameters **
- ** and Parameter initialization **
* EndPoint.h, icc, .cc:
- Add first function descriptions
- Change notation of accessors to set/get Pt component
to cancel the notation ambiguity with Pt()
2000-02-25 Marc Bertini <marc@odin.thep.lu.se>
* LundFragHandler.xh: Added to Pythia7
* LundFragHandlerBase.cc: Added to Pythia7
* LundFragHandler.icc: Added to Pythia7
* LundFragHandler.h: Added to Pythia7
- handle() method added
- ** LundFragHandler ** do not derive from LundFragHandlerBase
- any more => all LundFragHandlerBase functionalities included
in LundFragHandler
- Use default constructor for RCPtr.
- Set Interfaced parameters
- Set Units
* LundFragHandlerBase.cc: Added to Pythia7
* LundFragHandlerBase.icc: Added to Pythia7
* LundFragHandlerBase.h: Added to Pythia7
* LundFlavourGenerator.cc:
- Access to PD as getParticleData(long)
- No local DBase
* LundFlavourGenerator.icc:
- Add Inteface methods
* LundFlavourGenerator.h: Add the trivial Flavour Generator
- Change input cPDPtr to tcPDPtr in virtual function
- Change Handlers/FlavourGenerator virtual functions
- Add Inteface methods
* LundZGenerator.cc: Added to Pythia7
* LundZGenerator.icc: Added to Pythia7
* LundZGenerator.h: Added to Pythia7
- Add Interface methods and Parameters
- Add copy constructor
- Set units
* ZGenerator.cc: Added to Pythia7
- Add Standard Interface methods
* ZGenerator.icc: Added to Pythia7
* ZGenerator.h: Added to Pythia7
- Add Interface methods
- Add local rnd()
* LundPtGenerator.cc: Added to Pythia7
- Add Interface methods and Parameters
* LundPtGenerator.icc: Added to Pythia7
* LundPtGenerator.h: Added to Pythia7
- Add Copy Constructor for Clone method
- Add Interface methods and Parameters
- Inherit rnd() from PtGenerator()
- Set units
* PtGenerator.cc: Added to Pythia7
- Add Standard Interface methods
* PtGenerator.icc: Added to Pythia7
* PtGenerator.h: Added to Pythia7
- Add Standard Interface methods
- Add local rnd()
* Hadron.icc: Added to Pythia7
* Hadron.h: Added to Pythia7
- Use Pointer defaults constructor to initialize PDPtr
- Change createParticle() by PD::produceParticle()
- Set units
* EndPoint.cc: Added tp Pythia7
- Set units
* EndPoint.icc: Added to Pythia7
- Use Pointer defaults constructor to initialize PDPtr
* EndPoint.h: Added to Pythia7
- Set units
* StringRegion.cc: Added to Pythia7
- Set units
* StringRegion.icc: Added to Pythia7
- Set units
* StringRegion.h: Added to Pythia7
- Change Threevector to Momentum3
- Suppress Index() and W2totRem()
- Set units
* FragConfig.h: Added to Pythia7
- Add pointer to Lund Generators and Lund Frag Handler
- Add FragHelpers for PTComp and LorentzVector
- Add new unit InvEnergy4
* OrientedIndex.h: Added to Pythia7
- No Change
* Oriented.h: Added Oriented to Pythia7
- No Change
* String.cc: Added to Pythia7
- Set Units
* String.icc: Added to Pythia7
- Set units in constructors
* String.h: Added String to Pythia7
- Change PDT::gluon to ParticleID::g
- Suppress member theInputSystem, theType, W2rem
- Suppress firstPD(), lastPD(), ofqqbarSystem(),
checkStringRegionIndex(int,int), String(const PV &)
- Set units
2000-01-17 Marc Bertini <marc@odin.thep.lu.se>
* Here we go!
diff --git a/Config/Pythia7.h b/Config/Pythia7.h
--- a/Config/Pythia7.h
+++ b/Config/Pythia7.h
@@ -1,14 +1,21 @@
// -*- C++ -*-
#ifndef PYTHIA7_H
#define PYTHIA7_H
-// This is the main config header file for Pythia7.
+/** \file Pythia7.h
+ * This is the main config header file for Pythia7. All classes using
+ * Pythia7 classes should include this file directly or indirectly.
+ */
#include "ThePEG/Config/ThePEG.h"
+/**
+ * This is the main namespace which all identifiers in Pythia7 are
+ * declared. All identifiers from the ThePEG namespace are available.
+ */
namespace Pythia7 {
using namespace ThePEG;
}
#endif /* PYTHIA7_H */
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1,62 +1,65 @@
SUBDIRS = Config StringFrag Strategy Shower
DISTFILES = ChangeLog Makefile configure configure.in
VERSION = 1.0ab
TAG = ThePEG-$(VERSION)
PYTTAG = Pythia7-$(VERSION)
all: check
depend: setup
@for dir in $(SUBDIRS) ; do cd $$dir ; $(MAKE) depend ; cd .. ; done
setup: Config/Makefile.common
Config/Makefile.common: Config/Makefile.common.in configure
./configure
configure: configure.in
autoconf
check: setup lib
@cd src ; $(MAKE) check ; cd ..
+init: setup lib
+ @cd src ; $(MAKE) init ; cd ..
+
lib: setup
@for dir in $(SUBDIRS) lib; do cd $$dir ; $(MAKE) lib; cd .. ; done
-doc: check
+doc: init
@cd Doc ; $(MAKE) doc ; cd ..
install: check
@for dir in $(SUBDIRS) lib src ; do cd $$dir ; $(MAKE) VERSION=$(VERSION) install ; cd .. ; done
clean: setup
@for dir in $(SUBDIRS) lib src; do cd $$dir ; $(MAKE) clean ; cd .. ; done
distclean: setup clean
@cd src ; $(MAKE) distclean ; cd ..
rm -f config.cache config.status config.log Config/Makefile.common
dist: doc
rm -rf $(TAG)
mkdir -p $(TAG)/Pythia7
cp $(DISTFILES) $(TAG)/Pythia7
for dir in $(SUBDIRS) src Doc lib ; do cd $$dir ; $(MAKE) TAGDIR=$(TAG)/Pythia7 VERSION=$(VERSION) dist ; cd .. ; done
tar czf $(PYTTAG).tgz $(TAG)
rm -rf $(TAG)
snapshot: doc
$(MAKE) thesnapshot SNAPTAG=ThePEG-`/bin/date '+%y%m%d'` PYTTAG=Pythia7-`/bin/date '+%y%m%d'`
thesnapshot:
rm -rf $(SNAPTAG)
mkdir $(SNAPTAG)
cvs export -D today ThePEG
mv ThePEG/Pythia7 $(SNAPTAG)
rm -rf ThePEG
cp Doc/*.html $(SNAPTAG)/Pythia7/Doc
tar czf $(PYTTAG).tgz $(SNAPTAG)
rm -rf $(SNAPTAG)
diff --git a/Shower/Basics.h b/Shower/Basics.h
--- a/Shower/Basics.h
+++ b/Shower/Basics.h
@@ -1,431 +1,790 @@
// Header file for the Rndm, Hist, Vec4 and Particle classes,
// and for some convenient global functions.
#ifndef Basics_H
#define Basics_H
#include <iostream>
#include <vector>
#include <cmath>
#include <ctime>
#include "Pythia7/Config/Pythia7.h"
namespace Pythia7 {
+
+/**
+ * The underlying classes in the Pythia7 parton shower handler do not
+ * directly use the ThePEG framework. All these classes are included
+ * in the Shower namespace.
+ */
namespace Shower {
using namespace std;
//**************************************************************************
// Some simple global functions that are very convenient.
// Minimum and maximum for long integers - should have been part of compiler?
// inline long min(long i, long j) {return (i < j) ? i : j;}
// inline long max(long i, long j) {return (i > j) ? i : j;}
// Ensure that roundoff does not give square root of negative number.
+
+/**
+ * Return the square root. If the argument is negative, zero will be
+ * returned.
+ */
inline double sqrtpos(double x) {if (x < 0.) return 0.; else return sqrt(x);}
-// Square root with sign for negative input (mass representation convention).
+
+/**
+ * Return the square root. If the argument \a x is negative the
+ * negative of the square root of the absolute, \f$-\sqrt{-x}\f$, is
+ * returned.
+ */
inline double sqrtsgn(double x) {if (x < 0.) return -sqrt(-x);
else return sqrt(x);}
-// Kallens lambda function, with or without square root.
-inline double lambdaKRoot(double a, double b, double c)
- {return sqrtpos(pow(a - b - c, 2) - 4. * b * c);}
-inline double lambdaK(double a, double b, double c)
- {return max(0., pow(a - b - c, 2) - 4. * b * c);}
-// Magnitude of three-momentum given mother and daughter squared masses.
-inline double pAbsLambdaK(double a, double b, double c)
- {return 0.5*sqrtpos( (pow(a - b - c, 2) - 4. * b * c) / a );}
+/**
+ * The Kallens lambda function. \f$\lambda_K(a,b,c)=(a-b-c)^2-4bc\f$.
+ */
+inline double lambdaK(double a, double b, double c) {
+ return max(0., pow(a - b - c, 2) - 4. * b * c);
+}
-//**************************************************************************
+/**
+ * Square root of the Kallens lambda
+ * function. \f$\sqrt{\lambda_K(a,b,c)}=\sqrt{(a-b-c)^2-4bc}\f$.
+ */
+inline double lambdaKRoot(double a, double b, double c) {
+ return sqrt(lambdaK(a, b, c));
+}
-// Rndm class.
-// This class handles random number generation according to the
-// Marsaglia-Zaman algorithm.
+/**
+ * Magnitude of three-momentum. Given the mass squared, \a a, of a
+ * decaying particle return the magnitude of the three-momentum of the
+ * two daughters with squared masses \a b and \a c in the rest system
+ * of the decay.
+ */
+inline double pAbsLambdaK(double a, double b, double c) {
+ return 0.5*sqrt(lambdaK(a, b, c)/a);
+}
+/**
+ * The random number generator class used internally in the Pythia7
+ * Shower routines. This should be replaced with the ThePEG
+ * RandomGenerator. Uses only static methods.
+ */
class Rndm {
public:
- // Constructors.
+
+ /** Default constructor. */
Rndm() {;}
- Rndm(long inseed) {init(inseed);}
+ /**
+ * Standard constructor giving a seed. Note that although this looks
+ * like a new Rndm object is constructed with a separate random
+ * number sequence, the underlying static generator is
+ * reinitialized.
+ */
+ Rndm(long inseed) {init(inseed);}
- // Member functions.
- // Initialize, normally at construction or in first call.
- static void init(long = 0) ;
- // Generate next random number uniformly between 0 and 1.
+ /**
+ * Initialize the random generator optionally giving a seed.
+ */
+ static void init(long = 0);
+
+ /**
+ * Return a number uniformly distributed between 0 and 1.
+ */
static double flat() ;
- // Generate random numbers according to exp(-x).
+
+ /**
+ * Return a random number distributed according to \f$\exp(x)\f$.
+ */
static double exp() { return -log(flat()) ;}
- // Generate random numbers according to x * exp(-x).
+
+ /**
+ * Return a random number distributed according to \f$x\exp(x)\f$.
+ */
static double xexp() { return -log(flat() * flat()) ;}
- // Generate random numbers according to exp(-x^2/2).
+
+ /**
+ * Return a random number distributed according to
+ * \f$\exp(-x^2/2)\f$.
+ */
static double gauss() ;
- // Pick one option among vector of (positive) probabilities.
+
+ /**
+ * Return an index of the given vector according to the relative
+ * (positive) probabilities therein.
+ */
static long pick(const vector<double>&) ;
private:
- static bool initrndm, savgauss;
+
+ /**
+ * Has the generator been initialized? Has a gaussian number been
+ * saved?
+ */
+ static bool initrndm, savgauss;
+
+ /**
+ * Internal indices.
+ */
static long i97, j97;
+
+ /**
+ * Internal variables.
+ */
static double u[97], c, cd, cm, save;
};
//**************************************************************************
-// Hist class.
-// This class handles a single histogram at a time.
-
+/**
+ * Simple histogram class to be used internally in the Pythia7 Shower
+ * classes for testing purposes.
+ */
class Hist{
public:
- // Constants (possibly to be changed externally).
+
+ /** The maximum number of lines a histogram can use at output. */
static long NLINES;
- static double TOLERANCE, TINY;
- // Constructors, including copy constructors.
- Hist() {;}
+ /** Tolerance in deviation of xmin and xmax between two histograms. */
+ static double TOLERANCE;
+
+ /** Small number to avoid division by zero. */
+ static double TINY;
+
+ /**
+ * Default constructor.
+ */
+ Hist() {}
+
+ /**
+ * Standard constructor.
+ * @param titlein the title of the histogram.
+ * @param nbinin the number of bins.
+ * @param xminin the lower edge of the histogram.
+ * @param xmaxin the upper edge of the histogram
+ */
Hist(string titlein, long nbinin = 100, double xminin = 0.,
double xmaxin = 1.) {
- book(titlein, nbinin, xminin, xmaxin);}
+ book(titlein, nbinin, xminin, xmaxin);
+ }
+
+ /**
+ * Copy constructor.
+ */
Hist(const Hist& h) {
title = h.title; nbin = h.nbin; xmin = h.xmin; xmax = h.xmax;
dx = h.dx; nfill = h.nfill; under = h.under; inside = h.inside;
- over = h.over; res = h.res; }
+ over = h.over; res = h.res;
+ }
+
+ /**
+ * Copy constructor giving a new title.
+ */
Hist(string titlein, const Hist& h) {
title = titlein; nbin = h.nbin; xmin = h.xmin; xmax = h.xmax;
dx = h.dx; nfill = h.nfill; under = h.under; inside = h.inside;
- over = h.over;res = h.res; }
- Hist& operator=(const Hist& h) { if(this != &h) {
- nbin = h.nbin; xmin = h.xmin; xmax = h.xmax;
- dx = h.dx; nfill = h.nfill; under = h.under; inside = h.inside;
- over = h.over; res = h.res; return *this; } }
-
- // Member functions.
- // Book a histogram.
- void book(string = " ", long = 100, double = 0., double = 1.) ;
- // Set title of a histogram.
- void name(string = " ") ;
- // Reset bin contents.
+ over = h.over;res = h.res;
+ }
+
+ /**
+ * Assignment operator.
+ */
+ Hist& operator=(const Hist& h) {
+ if(this != &h) {
+ nbin = h.nbin; xmin = h.xmin; xmax = h.xmax;
+ dx = h.dx; nfill = h.nfill; under = h.under; inside = h.inside;
+ over = h.over; res = h.res;
+ return *this;
+ }
+ }
+
+ /**
+ * (Re-) Book this histogram. (Same parameters as in the Standard
+ * constructor)
+ */
+ void book(string = " ", long = 100, double = 0., double = 1.);
+
+ /**
+ * Set a new name.
+ */
+ void name(string = " ");
+
+ /**
+ * Reset this histogram.
+ */
void null() ;
- // Fill bin with weight.
- void fill(double, double = 1.) ;
- // Print histogram contents as a table (e.g. for Gnuplot).
+
+ /**
+ * Fill histogram.
+ */
+ void fill(double, double = 1.);
+
+ /**
+ * Print histogram to the given stream. Print a table of x and y
+ * values suitable to be used by programs such as gnuplot.
+ */
void table(ostream& = cout) const ;
- // Check whether another histogram has same size and limits.
+
+ /**
+ * Check if the given histogram is compatible with this.
+ */
bool sameSize(const Hist&) const ;
- // Operator overloading with member functions
+ /** Add histogram. */
Hist& operator+=(const Hist&) ;
+ /** Subtract histogram. */
Hist& operator-=(const Hist&) ;
+ /** Multiply by histogram (bin-by-bin). */
Hist& operator*=(const Hist&) ;
+ /** Divide by histogram (bin-by-bin). */
Hist& operator/=(const Hist&) ;
+ /** Add number to each bin. */
Hist& operator+=(double) ;
+ /** Subtract number from each bin. */
Hist& operator-=(double) ;
+ /** Multiply by number in each bin. */
Hist& operator*=(double) ;
+ /** Divide by number in each bin. */
Hist& operator/=(double) ;
- // Operator overloading with friends
+ /** Add number and histogram. */
friend Hist operator+(double, const Hist&);
+ /** Add number and histogram. */
friend Hist operator+(const Hist&, double);
+ /** Add two histograms. */
friend Hist operator+(const Hist&, const Hist&);
+ /** Subtraction between number and histogram. */
friend Hist operator-(double, const Hist&);
+ /** Subtraction between number and histogram. */
friend Hist operator-(const Hist&, double);
+ /** Subtraction between two histograms. */
friend Hist operator-(const Hist&, const Hist&);
+ /** Multiply number with histogram (bin-by-bin). */
friend Hist operator*(double, const Hist&);
+ /** Multiply number with histogram (bin-by-bin). */
friend Hist operator*(const Hist&, double);
+ /** Multiply two histograms (bin-by-bin). */
friend Hist operator*(const Hist&, const Hist&);
+ /** Divide number with histogram (bin-by-bin). */
friend Hist operator/(double, const Hist&);
+ /** Divide histogram with number (bin-by-bin). */
friend Hist operator/(const Hist&, double);
+ /** Divide two histograms (bin-by-bin). */
friend Hist operator/(const Hist&, const Hist&);
- // Print a histogram
+ /** Standard output operator. */
friend ostream& operator<<(ostream&, const Hist&) ;
- // Print vector of histogram contents as a table (e.g. for Gnuplot).
+ /** Non-member function of table(ostream&). */
friend void table(const vector<Hist>&, ostream& = cout) ;
private:
+
+ /** The title. */
string title;
- long nbin, nfill;
+ /** The number of bins and number of times fill() has been called. */
+ long nbin, nfill;
+ /** the lower, upper cut, the bbin width, the underflow, sum of all,
+ * and overflow bins. */
double xmin, xmax, dx, under, inside, over;
+ /** The bins. */
vector<double> res;
};
//**************************************************************************
// Forward reference to RotBstMatrix class.
class RotBstMatrix;
//**************************************************************************
-// Vec4 class.
-// This class implements four-vectors, in energy-momentum space.
-// (But could equally well be used to hold space-time four-vectors.)
+/**
+ * Vec4 class.
+ * This class implements four-vectors, in energy-momentum space.
+ * (But could equally well be used to hold space-time four-vectors.)
+ * Used by the internal Pythia7 Shower classes.
+ */
class Vec4 {
public:
- // Constructors.
+ /**
+ * Constructors.
+ */
Vec4(double xin = 0., double yin = 0., double zin = 0., double tin = 0.)
: xx(xin), yy(yin), zz(zin), tt(tin) {}
+ /** NOT DOCUMENTED */
Vec4(const Vec4& v)
: xx(v.xx), yy(v.yy), zz(v.zz), tt(v.tt) {}
+ /** NOT DOCUMENTED */
Vec4& operator=(const Vec4& v) {
if (this != &v) {xx = v.xx; yy = v.yy; zz = v.zz; tt = v.tt; }
return *this; }
+
- // Member functions for input.
+ /**
+ * Member functions for input.
+ */
void p(double xin, double yin, double zin, double tin)
{xx = xin; yy = yin; zz = zin; tt = tin;}
+ /** NOT DOCUMENTED */
void px(double xin) {xx = xin;}
+ /** NOT DOCUMENTED */
void py(double yin) {yy = yin;}
+ /** NOT DOCUMENTED */
void pz(double zin) {zz = zin;}
+ /** NOT DOCUMENTED */
void e(double tin) {tt = tin;}
- // Member functions for output.
+
+ /**
+ * Member functions for output.
+ */
double px() const {return xx;}
+ /** NOT DOCUMENTED */
double py() const {return yy;}
+ /** NOT DOCUMENTED */
double pz() const {return zz;}
+ /** NOT DOCUMENTED */
double e() const {return tt;}
+ /** NOT DOCUMENTED */
double m2calc() const {return tt*tt - xx*xx - yy*yy - zz*zz;}
+ /** NOT DOCUMENTED */
double mcalc() const {return sqrtsgn(tt*tt - xx*xx - yy*yy - zz*zz);}
+ /** NOT DOCUMENTED */
double pT() const {return sqrt(xx*xx + yy*yy);}
+ /** NOT DOCUMENTED */
double pT2() const {return xx*xx + yy*yy;}
+ /** NOT DOCUMENTED */
double pAbs() const {return sqrt(xx*xx + yy*yy + zz*zz);}
+ /** NOT DOCUMENTED */
double p2() const {return xx*xx + yy*yy + zz*zz;}
+ /** NOT DOCUMENTED */
double theta() const {return atan2(sqrt(xx*xx + yy*yy), zz);}
+ /** NOT DOCUMENTED */
double phi() const {return atan2(yy,xx);}
- // Member functions that perform operations.
+
+ /**
+ * Member functions that perform operations.
+ */
void rescalep(double fac) {xx = fac * xx; yy = fac * yy; zz = fac * zz;}
+ /** NOT DOCUMENTED */
void flip(){xx = -xx; yy = -yy; zz = -zz;}
+ /** NOT DOCUMENTED */
void rot(double, double);
+ /** NOT DOCUMENTED */
void rotaxis(double, double, double, double);
+ /** NOT DOCUMENTED */
void rotaxis(double, const Vec4&);
+ /**
+ * Member functions that perform operations.
+ */
void bst(double, double, double);
+ /** NOT DOCUMENTED */
void bst(const Vec4&);
+ /** NOT DOCUMENTED */
void rotbst(const RotBstMatrix&);
- // Operator overloading with member functions
+
+ /**
+ * Operator overloading with member functions
+ */
Vec4& operator+=(const Vec4& v) {xx += v.xx; yy += v.yy; zz += v.zz;
tt += v.tt; return *this;}
+ /** NOT DOCUMENTED */
Vec4& operator-=(const Vec4& v) {xx -= v.xx; yy -= v.yy; zz -= v.zz;
tt -= v.tt; return *this;}
+ /** NOT DOCUMENTED */
Vec4& operator*=(double f) {xx *= f; yy *= f; zz *= f;
tt *= f; return *this;}
+ /** NOT DOCUMENTED */
Vec4& operator/=(double f) {xx /= f; yy /= f; zz /= f;
tt /= f; return *this;}
- // Operator overloading with friends
+
+ /**
+ * Operator overloading with friends
+ */
friend Vec4 operator+(const Vec4&, const Vec4&);
+ /**
+ * Operator overloading with friends
+ */
friend Vec4 operator-(const Vec4&, const Vec4&);
+ /**
+ * Operator overloading with friends
+ */
friend Vec4 operator*(double, const Vec4&);
+ /**
+ * Operator overloading with friends
+ */
friend Vec4 operator*(const Vec4&, double);
+ /**
+ * Operator overloading with friends
+ */
friend Vec4 operator/(const Vec4&, double);
+ /**
+ * Operator overloading with friends
+ */
friend double operator*(const Vec4&, const Vec4&);
- // Scalar and cross product of 3-vector parts.
+ /**
+ * Scalar and cross product of 3-vector parts.
+ * theta is polar angle between v1 and v2.
+ * phi is azimuthal angle between v1 and v2 around n axis.
+ */
friend double dot3(const Vec4&, const Vec4&);
+ /**
+ * Scalar and cross product of 3-vector parts.
+ * theta is polar angle between v1 and v2.
+ * phi is azimuthal angle between v1 and v2 around n axis.
+ */
friend Vec4 cross3(const Vec4&, const Vec4&);
- // theta is polar angle between v1 and v2.
+ /**
+ * Scalar and cross product of 3-vector parts.
+ * theta is polar angle between v1 and v2.
+ * phi is azimuthal angle between v1 and v2 around n axis.
+ */
friend double costheta(const Vec4&, const Vec4&);
+ /**
+ * Scalar and cross product of 3-vector parts.
+ * theta is polar angle between v1 and v2.
+ * phi is azimuthal angle between v1 and v2 around n axis.
+ */
friend double theta(const Vec4& v1, const Vec4& v2) {
return acos(costheta(v1, v2)); }
- // phi is azimuthal angle between v1 and v2 around n axis.
friend double cosphi(const Vec4&, const Vec4&, const Vec4&);
+ /**
+ * Scalar and cross product of 3-vector parts.
+ * theta is polar angle between v1 and v2.
+ * phi is azimuthal angle between v1 and v2 around n axis.
+ */
friend double phi(const Vec4& v1, const Vec4& v2, const Vec4& n) {
return acos(cosphi(v1, v2, n)); }
- // Print a four-vector
+
+ /**
+ * Print a four-vector
+ */
friend ostream& operator<<(ostream&, const Vec4&) ;
private:
double xx, yy, zz, tt;
};
// Implementation of operator overloading with friends.
+/** NOT DOCUMENTED */
inline Vec4 operator+(const Vec4& v1, const Vec4& v2)
{Vec4 v = v1 ; return v += v2;}
+/** NOT DOCUMENTED */
inline Vec4 operator-(const Vec4& v1, const Vec4& v2)
{Vec4 v = v1 ; return v -= v2;}
+/** NOT DOCUMENTED */
inline Vec4 operator*(double f, const Vec4& v1)
{Vec4 v = v1; return v *= f;}
+/** NOT DOCUMENTED */
inline Vec4 operator*(const Vec4& v1, double f)
{Vec4 v = v1; return v *= f;}
+/** NOT DOCUMENTED */
inline Vec4 operator/(const Vec4& v1, double f)
{Vec4 v = v1; return v /= f;}
+/** NOT DOCUMENTED */
inline double operator*(const Vec4& v1, const Vec4& v2)
{return v1.tt*v2.tt - v1.xx*v2.xx - v1.yy*v2.yy - v1.zz*v2.zz;}
//**************************************************************************
-// RotBstMatrix class.
-// This class implements 4 * 4 matrices that encode an arbitrary combination
-// of rotations and boosts, that can be applied to Vec4 four-vectors.
+/**
+ * RotBstMatrix class.
+ * This class implements 4 * 4 matrices that encode an arbitrary combination
+ * of rotations and boosts, that can be applied to Vec4 four-vectors.
+ * Used by the internal Pythia7 Shower classes.
+ */
class RotBstMatrix {
public:
- // Constructors.
+ /**
+ * Constructors.
+ */
RotBstMatrix() {for (long i = 0; i < 4; ++i) { for (long j = 0; j < 4; ++j) {
M[i][j] = (i==j) ? 1. : 0.; } } }
+ /** NOT DOCUMENTED */
RotBstMatrix(const RotBstMatrix& Min) {
for (long i = 0; i < 4; ++i) { for (long j = 0; j < 4; ++j) {
M[i][j] = Min.M[i][j]; } } }
+ /** NOT DOCUMENTED */
RotBstMatrix& operator=(const RotBstMatrix& Min) {if (this != &Min) {
for (long i = 0; i < 4; ++i) { for (long j = 0; j < 4; ++j) {
M[i][j] = Min.M[i][j]; } }} return *this; }
- // Member functions.
+
+ /**
+ * Member functions.
+ */
void rot(double = 0., double = 0.);
+ /**
+ * Member functions.
+ */
void rot(const Vec4& p);
+ /**
+ * Member functions.
+ */
void bst(double = 0., double = 0., double = 0.);
+ /**
+ * Member functions.
+ */
void bst(const Vec4&);
+ /**
+ * Member functions.
+ */
void bstback(const Vec4&);
+ /**
+ * Member functions.
+ */
void bst(const Vec4&, const Vec4&);
+ /**
+ * Member functions.
+ */
void rotbst(const RotBstMatrix&);
+ /**
+ * Member functions.
+ */
void invert();
+ /**
+ * Member functions.
+ */
void toCMframe(const Vec4&, const Vec4&);
+ /**
+ * Member functions.
+ */
void fromCMframe(const Vec4&, const Vec4&);
+ /**
+ * Member functions.
+ */
void reset();
- // Print a transformation matrix.
+ /**
+ * Print a transformation matrix.
+ */
friend ostream& operator<<(ostream&, const RotBstMatrix&) ;
- // Private members to be accessible from Vec4.
+ /**
+ * Private members to be accessible from Vec4.
+ */
friend class Vec4;
private:
+ /** NOT DOCUMENTED */
double M[4][4];
};
//**************************************************************************
-// Particle class.
-// This class holds info on a particle in general.
+/**
+ * Particle class.
+ * This class holds info on a particle in general.
+ * Used by the internal Pythia7 Shower classes.
+ */
class Particle {
public:
- // Constructors.
+ /**
+ * Constructors.
+ */
Particle() {idp = 0; statusp = 0; mother1p = -1; mother2p = -1; prevp = -1;
colp = 0; anticolp = 0; pp = Vec4(0.,0.,0.,0.); mp = 0.; scalep = 0.;}
+ /** NOT DOCUMENTED */
Particle(long idin, long statusin = 0, long mother1in = -1,
long mother2in = -1, long colin = 0, long anticolin = 0,
Vec4 pin = Vec4(0.,0.,0.,0.), double min = 0., double scalein = 0.) {
idp = idin; statusp = statusin; mother1p = mother1in;
mother2p = mother2in; prevp = -1; colp = colin; anticolp = anticolin;
pp = pin; mp = min; scalep = scalein;}
+ /** NOT DOCUMENTED */
Particle(long idin, long statusin = 0, long mother1in = -1,
long mother2in = -1, long colin = 0, long anticolin = 0,
double pxin = 0., double pyin = 0., double pzin = 0.,
double ein = 0., double min = 0., double scalein = 0.) {
idp = idin; statusp = statusin; mother1p = mother1in;
mother2p = mother2in; prevp = -1; colp = colin; anticolp = anticolin;
pp = Vec4(pxin, pyin, pzin, ein); mp = min; scalep = scalein;}
+ /** NOT DOCUMENTED */
Particle(const Particle& pt) {
idp = pt.idp; statusp = pt.statusp; mother1p = pt.mother1p;
mother2p = pt.mother2p; prevp = pt.prevp;
+ /**
+ * Constructors.
+ */
colp = pt.colp; anticolp = pt.anticolp;
pp = pt.pp; mp = pt.mp; scalep = pt.scalep;}
+ /** NOT DOCUMENTED */
Particle& operator=(const Particle& pt) {if (this != &pt) {
idp = pt.idp; statusp = pt.statusp; mother1p = pt.mother1p;
mother2p = pt.mother2p; prevp = pt.prevp;
colp = pt.colp; anticolp = pt.anticolp;
pp = pt.pp; mp = pt.mp; scalep = pt.scalep;} return *this; }
+
- // Member functions for input.
+ /**
+ * Member functions for input.
+ */
void id(long idin) {idp = idin;}
+ /** NOT DOCUMENTED */
void status(long statusin) {statusp = statusin;}
+ /** NOT DOCUMENTED */
void addstatus(long change) {statusp += change;}
+ /** NOT DOCUMENTED */
void mother1(long mother1in) {mother1p = mother1in;}
+ /** NOT DOCUMENTED */
void mother2(long mother2in) {mother2p = mother2in;}
+ /** NOT DOCUMENTED */
void mothers(long mother1in = -1, long mother2in = -1)
{mother1p = mother1in; mother2p = mother2in;}
+ /** NOT DOCUMENTED */
void prev(long previn) {prevp = previn;}
+ /** NOT DOCUMENTED */
void col(long colin) {colp = colin;}
+ /** NOT DOCUMENTED */
void anticol(long anticolin) {anticolp = anticolin;}
+ /** NOT DOCUMENTED */
void cols(long colin = 0,long anticolin = 0)
{colp = colin; anticolp = anticolin;}
+ /** NOT DOCUMENTED */
void p(Vec4 pin) {pp = pin;}
+ /** NOT DOCUMENTED */
void p(double pxin, double pyin, double pzin, double ein)
{pp.p(pxin, pyin, pzin, ein);}
+ /** NOT DOCUMENTED */
void px(double pxin) {pp.px(pxin);}
+ /** NOT DOCUMENTED */
void py(double pyin) {pp.py(pyin);}
+ /** NOT DOCUMENTED */
void pz(double pzin) {pp.pz(pzin);}
+ /** NOT DOCUMENTED */
void e(double ein) {pp.e(ein);}
+ /** NOT DOCUMENTED */
void m(double min) {mp = min;}
+ /** NOT DOCUMENTED */
void scale(double scalein) {scalep = scalein;}
- // Member functions for output.
+
+ /**
+ * Member functions for output.
+ */
long id() const {return idp;}
+ /** NOT DOCUMENTED */
long status() const {return statusp;}
+ /** NOT DOCUMENTED */
long mother1() const {return mother1p;}
+ /** NOT DOCUMENTED */
long mother2() const {return mother2p;}
+ /** NOT DOCUMENTED */
long prev() const {return prevp;}
+ /** NOT DOCUMENTED */
long col() const {return colp;}
+ /** NOT DOCUMENTED */
long anticol() const {return anticolp;}
+ /** NOT DOCUMENTED */
Vec4 p() const {return pp;}
+ /** NOT DOCUMENTED */
double px() const {return pp.px();}
+ /** NOT DOCUMENTED */
double py() const {return pp.py();}
+ /** NOT DOCUMENTED */
double pz() const {return pp.pz();}
+ /** NOT DOCUMENTED */
double e() const {return pp.e();}
+ /** NOT DOCUMENTED */
double m() const {return mp;}
+ /** NOT DOCUMENTED */
double scale() const {return scalep;}
+ /** NOT DOCUMENTED */
double m2() const {return mp*mp;}
+ /** NOT DOCUMENTED */
double mcalc() const {return pp.mcalc();}
+ /** NOT DOCUMENTED */
double m2calc() const {return pp.m2calc();}
+ /** NOT DOCUMENTED */
double pT() const {return pp.pT();}
+ /** NOT DOCUMENTED */
double pT2() const {return pp.pT2();}
+ /** NOT DOCUMENTED */
double mT() const {return sqrt(mp*mp + pp.pT2());}
+ /** NOT DOCUMENTED */
double mT2() const {return mp*mp + pp.pT2();}
+ /** NOT DOCUMENTED */
double pAbs() const {return pp.pAbs();}
+ /** NOT DOCUMENTED */
double p2() const {return pp.p2();}
+ /** NOT DOCUMENTED */
double theta() const {return pp.theta();}
+ /** NOT DOCUMENTED */
double phi() const {return pp.phi();}
- // Member functions that perform operations.
+
+ /**
+ * Member functions that perform operations.
+ */
void rescalep(double fac) {pp.rescalep(fac);}
+ /** NOT DOCUMENTED */
void rot(double theta, double phi) {pp.rot(theta, phi);}
+ /** NOT DOCUMENTED */
void bst(double betaX, double betaY, double betaZ)
{pp.bst(betaX, betaY, betaZ);}
+ /** NOT DOCUMENTED */
void bst(const Vec4& vec) {pp.bst(vec);}
+ /** NOT DOCUMENTED */
void rotbst(const RotBstMatrix& M) {pp.rotbst(M);}
- // Print a particle
+
+ /**
+ * Print a particle
+ */
friend ostream& operator<<(ostream&, const Particle&) ;
private:
+ /** NOT DOCUMENTED */
long idp, statusp, mother1p, mother2p, prevp, colp, anticolp;
+ /** NOT DOCUMENTED */
Vec4 pp;
+ /** NOT DOCUMENTED */
double mp, scalep;
};
//**************************************************************************
-// Function to give particle masses.
+/** Function to give particle masses. */
double Mass(long);
-// Function to give spin of particle.
+/** Function to give spin of particle. */
long iSpin(long);
-// Function to give charge of particle.
+/** Function to give charge of particle. */
long iCharge(long);
-// Function to give colour of particle.
+/** Function to give colour of particle. */
long iColour(long);
//**************************************************************************
}
}
#endif // Basics_H
diff --git a/Shower/Beam.h b/Shower/Beam.h
--- a/Shower/Beam.h
+++ b/Shower/Beam.h
@@ -1,133 +1,195 @@
// Header file for information on incoming beams, including PDF's.
#ifndef Beam_H
#define Beam_H
#include <iostream>
#include <vector>
#include <cmath>
#include <ctime>
#include "Pythia7/Config/Pythia7.h"
#include "ThePEG/PDF/PDFBase.h"
namespace Pythia7 {
namespace Shower {
using namespace std;
//**************************************************************************
-// Base class for parton distribution functions.
-
+/**
+ * Base class for parton distribution functions.
+ * Used by the internal Pythia7 Shower classes.
+ */
class PDF {
public:
+ /** NOT DOCUMENTED */
PDF(long idBeamin = 2212)
: idBeam(idBeamin), xSav(-1.0), Q2Sav(-1.0), xu(0.0), xd(0.0), xubar(0.0),
xdbar(0.0), xs(0.0), xc(0.0), xb(0.0), xg(0.0), xlepton(0.0),
xgamma(0.0) {}
+ /** NOT DOCUMENTED */
virtual ~PDF() {}
+ /** NOT DOCUMENTED */
double xfx(long, double, double);
+ /** NOT DOCUMENTED */
virtual bool isParton(long) const;
+ /** NOT DOCUMENTED */
virtual bool isValence(long) const;
protected:
+ /** NOT DOCUMENTED */
long idBeam;
+ /** NOT DOCUMENTED */
double xSav, Q2Sav;
+ /** NOT DOCUMENTED */
double xu, xd, xubar, xdbar, xs, xc, xb, xg, xlepton, xgamma;
+ /** NOT DOCUMENTED */
virtual void xfUpdate(double x, double Q2) = 0;
};
//*********
-// Gives the GRV 94 L (leading order) parton distribution function set
-// in parametrized form. Authors: M. Glueck, E. Reya and A. Vogt.
+/**
+ * Gives the GRV 94 L (leading order) parton distribution function set
+ * in parametrized form. Authors: M. Glueck, E. Reya and A. Vogt.
+ * Used by the internal Pythia7 Shower classes.
+ */
class GRV94L : public PDF {
public:
+ /** NOT DOCUMENTED */
GRV94L(long idBeamin = 2212) : PDF(idBeamin) {;}
private:
+ /** NOT DOCUMENTED */
void xfUpdate(double x, double Q2);
+ /** NOT DOCUMENTED */
double grvv (double x, double n, double ak, double bk, double a,
double b, double c, double d);
+ /** NOT DOCUMENTED */
double grvw (double x, double s, double al, double be, double ak,
double bk, double a, double b, double c, double d, double e, double es);
+ /** NOT DOCUMENTED */
double grvs (double x, double s, double sth, double al, double be,
double ak, double ag, double b, double d, double e, double es);
};
//*********
-// Gives electron (or muon, or tau) parton distribution.
+/**
+ * Gives electron (or muon, or tau) parton distribution.
+ * Used by the internal Pythia7 Shower classes.
+ */
class Lepton : public PDF {
public:
+ /** NOT DOCUMENTED */
Lepton(long idBeamin = 11) : PDF(idBeamin) {;}
private:
+ /** NOT DOCUMENTED */
void xfUpdate(double x, double Q2);
};
//**************************************************************************
-// This class holds info on a beam particle in the shower evolution.
-// It derives from the particle class.
+/**
+ * This class holds info on a beam particle in the shower evolution.
+ * It derives from the particle class.
+ */
class BeamParticle : public Particle {
public:
- // Constructors.
+ /**
+ * Constructors.
+ */
BeamParticle() : Particle() {pdfbm = 0;}
+ /** NOT DOCUMENTED */
BeamParticle(long idin, Vec4 pin = Vec4(0.,0.,0.,0.), double min = 0.,
PDF* pdfin = 0) : Particle(idin, -9, -1, -1, 0, 0, pin, min, 0.)
{pdf(pdfin);}
+ /** NOT DOCUMENTED */
BeamParticle(const BeamParticle& pt) : Particle(pt) {pdfbm = pt.pdfbm;}
+ /** NOT DOCUMENTED */
BeamParticle& operator=(const BeamParticle& pt) {if (this != &pt) {
pdfbm = pt.pdfbm; return *this;} }
- // Construct a BeamParticle from a Particle.
+ /**
+ * Construct a BeamParticle from a Particle.
+ */
BeamParticle(const Particle& pt) : Particle(pt) {pdfbm = 0;}
+ /** NOT DOCUMENTED */
BeamParticle& operator=(const Particle& pt) {Particle::operator=(pt);
pdfbm = 0; return *this; }
- // Member functions.
+
+ /**
+ * Member functions.
+ */
double xfx(long id, double x, double Q2) {return pdfbm->xfx(id, x, Q2);}
+ /** NOT DOCUMENTED */
void pdf(PDF* pdfin) {pdfbm = pdfin;}
PDF* pdf() const {return pdfbm;}
+ /** NOT DOCUMENTED */
bool isParton(long id) const {return pdfbm->isParton(id);}
+ /** NOT DOCUMENTED */
bool isValence(long id) const {return pdfbm->isValence(id);}
+ /** NOT DOCUMENTED */
bool isHadron() const {if (abs(id()) > 100) return true; return false;}
+ /** NOT DOCUMENTED */
bool isLepton() const {if (abs(id()) == 11 || abs(id()) == 13
|| abs(id()) == 15) return true; return false;}
+
private:
+ /** NOT DOCUMENTED */
PDF* pdfbm;
};
-
+
+/**
+ * Interface class to make the ThePEG pdf classes available to the
+ * internal Pythia7 Shower classes.
+ */
class ThePEGPDF: public PDF {
public:
+ /**
+ * Constructor taking a ThePEG::PDFBase object and a
+ * ThePEG::ParticleData as arguments.
+ */
ThePEGPDF(tcPDFPtr pdf, tcPDPtr parent);
+
+ /**
+ * Calculate new values of the parton densities to be cached.
+ */
virtual void xfUpdate(double x, double Q2);
+
+ /** Set the cached value of the density \a xf for parton type \a id. */
void set(long id, double xf);
private:
+ /** The ThePEG pdf object. */
tcPDFPtr thePDF;
+ /** The ThePEG particle type. */
tcPDPtr theParent;
+ /** Map of possible partons indexed by their id. */
map<long, tcPDPtr> thePartons;
+ /** The type of lepton if this is a lepton pdf. */
long theLeptonID;
};
//**************************************************************************
}
}
#endif // Beam_H
diff --git a/Shower/Shower.h b/Shower/Shower.h
--- a/Shower/Shower.h
+++ b/Shower/Shower.h
@@ -1,99 +1,156 @@
// This file collects top-level classes for shower evolution.
#ifndef Shower_H
#define Shower_H
#include <iostream>
#include <vector>
#include <cmath>
#include <ctime>
#include "Pythia7/Config/Pythia7.h"
namespace Pythia7 {
namespace Shower {
using namespace std;
class TimeShower;
class SpaceShower;
//**************************************************************************
-// This class hold a partonic event, which is to shower (on input)
-// or has showered (on output).
+/**
+ * This class hold a partonic event, which is to shower (on input)
+ * or has showered (on output).
+ * Used by the internal Pythia7 Shower classes.
+ */
class Event {
public:
- // Constructor.
+ /**
+ * Constructor.
+ */
Event(long capacity = 100) {entry.reserve(capacity); maxColIndx = 0;}
- // Input of new particle at the end of the event record.
+
+ /**
+ * Input of new particle at the end of the event record.
+ */
long append(Particle entryin) {
entry.push_back(entryin);
if (entryin.col() > maxColIndx) maxColIndx = entryin.col();
if (entryin.anticol() > maxColIndx) maxColIndx = entryin.anticol();
return entry.size() - 1;
}
- // Removal of particle.
+
+ /**
+ * Removal of particle.
+ */
void remove(long index) {entry.erase(entry.begin() + index);}
- // Overload index operator to access element of Particle vector.
+
+ /**
+ * Overload index operator to access element of Particle vector.
+ */
Particle& operator[](long i) {return entry[i];}
+ /**
+ * Overload index operator to access element of Particle vector.
+ */
const Particle & operator[](long i) const {return entry[i];}
- // Find if given entry is daughter/granddaughter/... of another one.
+ /**
+ * Find if given entry is daughter/granddaughter/... of another one.
+ */
bool isDescendent(long, long) const;
- // Query or reset size. Manipulate colour index.
+ /**
+ * Query or reset size.
+ */
long size() const {return entry.size();}
+ /**
+ * Query or reset size.
+ */
void zero() {entry.resize(0); maxColIndx = 0;}
+ /**
+ * Manipulate colour index.
+ */
void colIndx(long indx) {maxColIndx = indx;}
+ /**
+ * Manipulate colour index.
+ */
long colIndx() const {return maxColIndx;}
- // Print an event.
+
+ /**
+ * Print an event.
+ */
friend ostream& operator<<(ostream&, const Event&) ;
+
private:
+ /** NOT DOCUMENTED */
vector<Particle> entry;
+ /** NOT DOCUMENTED */
long maxColIndx;
};
//**************************************************************************
-// The Shower class administrates initial- and final-state radiation,
-// by one call to SpaceShower and repeated calls to TimeShower.
-// (Currently only latter implemented.)
+/**
+ * The Shower class administrates initial- and final-state radiation,
+ * by one call to SpaceShower and repeated calls to TimeShower.
+ * (Currently only latter implemented.)
+ * Used by the internal Pythia7 Shower classes.
+ */
class Shower {
public:
- // Constants (possibly to be changed externally).
+ /**
+ * Constants (possibly to be changed externally).
+ */
static long ISR, FSR, FSRONISR;
+ /**
+ * Pointer to the object doing the actual work for time-like showers.
+ */
static TimeShower * theTimeShower;
- // Pointer to the object doing the actual work for time-like showers.
+ /**
+ * Pointer to the object doing the actual work for space-like showers.
+ */
static SpaceShower * theSpaceShower;
- // Pointer to the object doing the actual work for time-like showers.
- // Driver routine to handle a succession of showers.
+ /**
+ * Driver routine to handle a succession of showers.
+ */
void shower(Event&, BeamParticle&, BeamParticle&, bool = false);
- // Simpler version for final-state radiation only; no beams required.
+ /**
+ * Driver routine to handle a succession of showers.
+ * Simpler version for final-state radiation only; no beams required.
+ */
void shower(Event&);
+
private:
+ /** NOT DOCUMENTED */
long in1Old, in2Old, in1New, in2New, sizeOld,sizeMid, sizeNew;
+ /** NOT DOCUMENTED */
bool hadISR;
+ /** NOT DOCUMENTED */
void doSpaceShower(Event&, BeamParticle&, BeamParticle&);
+ /** NOT DOCUMENTED */
void doTimeOnSpaceShower(Event&);
+ /** NOT DOCUMENTED */
void copyFinalState(Event&);
+ /** NOT DOCUMENTED */
void doTimeShower(Event&);
};
//**************************************************************************
}
}
#endif // Shower_H
diff --git a/Shower/ShowerHandler.h b/Shower/ShowerHandler.h
--- a/Shower/ShowerHandler.h
+++ b/Shower/ShowerHandler.h
@@ -1,214 +1,403 @@
// -*- C++ -*-
#ifndef PYTHIA7_ShowerHandler_H
#define PYTHIA7_ShowerHandler_H
-//
-// This is the declaration of the <!id>ShowerHandler<!!id> class.
-//
-// CLASSDOC SUBSECTION Description:
-//
-// The <!id>ShowerHandler<!!id> class administers parton showers for
-// external partons in a hard <!class>SubProcess<!!class> or in a
-// decay of a heavy resonance. The main function will identify partons
-// in the current step which should shower and create corresponding
-// <!class>TimeParticle<!!class> and <!class>SpaceParticle<!!class>
-// objects which, using the assigned <!class>TimeShower<!!class> and
-// <!class>SpaceShower<!!class> objects, will administer the
-// showering.
-//
-// CLASSDOC SUBSECTION See also:
-//
-// <a href="http:SubProcess.html">SubProcess.h</a>,
-// <a href="http:TimeParticle.html">TimeParticle.h</a>,
-// <a href="http:SpaceParticle.html">SpaceParticle.h</a>,
-// <a href="http:TimeShower.html">TimeShower.h</a>,
-// <a href="http:SpaceShower.html">SpaceShower.h</a>.
-//
+// This is the declaration of the ShowerHandler class.
#include "Pythia7/Config/Pythia7.h"
#include "ThePEG/Handlers/CascadeHandler.h"
#include "ThePEG/Utilities/ObjectIndexer.h"
// #include "ShowerHandler.fh"
// #include "ShowerHandler.xh"
#include "Pythia7/Shower/SpaceShowerHandler.h"
#include "Pythia7/Shower/TimeShowerHandler.h"
#include "Pythia7/Shower/Basics.h"
#include "Pythia7/Shower/Shower.h"
#include "ThePEG/PDF/PartonBinInstance.h"
namespace Pythia7 {
+/**
+ * The <code>ShowerHandler</code> class administers parton showers for
+ * external partons in a hard SubProcess or in a
+ * decay of a heavy resonance. The main function will identify partons
+ * in the current step which should shower and create corresponding
+ * TimeParticle and SpaceParticle
+ * objects which, using the assigned TimeShower and
+ * SpaceShower objects, will administer the
+ * showering.
+ *
+ *
+ * @see SubProcess,
+ * @see TimeParticle,
+ * @see SpaceParticle,
+ * @see TimeShower,
+ * @see SpaceShower.
+ *
+ */
class ShowerHandler: public CascadeHandler {
public:
+ /** @name Standard constructors and destructors. */
+ //@{
+ /**
+ * The default constructor.
+ */
inline ShowerHandler();
+
+ /**
+ * The copy constructor.
+ */
inline ShowerHandler(const ShowerHandler &);
+
+ /**
+ * The destructor.
+ */
virtual ~ShowerHandler();
- // Standard ctors and dtor.
+ //@}
public:
+ /** @name Virtual functions required by the CascadeHandler class. */
+ //@{
+ /**
+ * The main function called by the PartialCollisionHandler class to
+ * perform a step. Stores important information and calls
+ * cascade().
+ * @param ch the PartialCollisionHandler in charge of the Event generation.
+ * @param tagged if not empty these are the only particles which should
+ * be considered by the StepHandler.
+ * @param hint a Hint object with possible information from previously
+ * performed steps.
+ * @throws Veto if the StepHandler requires the current step to be
+ * discarded.
+ * @throws Stop if the generation of the current Event should be stopped
+ * after this call.
+ * @throws Exception if something goes wrong.
+ */
virtual void handle(PartialCollisionHandler & ch, const tPVector & tagged,
const Hint & hint)
ThePEG_THROW_SPEC((Veto, Stop, Exception));
- // The default version stores important information and calls cascade().
+ /**
+ * Perform the actual cascade.
+ */
virtual void cascade();
- // Perform the actual cascade.
+ //@}
+ /**
+ * Perform a final-state cascade on the given partons.
+ */
virtual void cascade(const tPVector & final);
- // Perform a final-state cascade on the given partons.
+ /**
+ * Perform an initial-state cascade on the incoming partons of the
+ * given sub-process.
+ */
virtual void cascade(tSubProPtr sub);
- // Perform an initial-state cascade on the incomng partons of the
- // given sub-process.
+ /**
+ * Return true if the given particle can be showered.
+ */
virtual bool canShower(tcPPtr p) const;
- // Return true if the given particle can be showered.
+ /**
+ * If true all branchings in the shower will be added to the new
+ * step. Otherwise only the final partons will be added.
+ */
inline bool history() const;
- // If true all branchings in the shower will be added to the new
- // step. Otherwise only the final partons will be added.
public:
- void persistentOutput(PersistentOStream &) const;
- void persistentInput(PersistentIStream &, int);
- // Standard functions for writing and reading from persistent streams.
+ /** @name Functions used by the persistent I/O system. */
+ //@{
+ /**
+ * Function used to write out object persistently.
+ * @param os the persistent output stream written to.
+ */
+ void persistentOutput(PersistentOStream & os) const;
+
+ /**
+ * Function used to read in object persistently.
+ * @param is the persistent input stream read from.
+ * @param version the version number of the object when written.
+ */
+ void persistentInput(PersistentIStream & is, int version);
+ //@}
+
+ /**
+ * Standard Init function used to initialize the interfaces.
+ */
static void Init();
- // Standard Init function used to initialize the interfaces.
protected:
+ /**
+ * Add a particle to the internal event record with the given
+ * status. Note that if the parent particles has not already been
+ * added, they will not be listed as parents in the internal event
+ * record.
+ */
long addParticle(tPPtr p, long status);
+ /**
+ * Add a particle to the internal event record with the given status
+ * and mother indices. Note that if the parent particles has not
+ * already been added, they will not be listed as parents in the
+ * internal event record.
+ */
long addParticle(tPPtr p, long status, long mother1, long mother2);
- // Add a particle to the internal event record with the given status
- // (and mother indices). Note that if the parent particles has not
- // already been added, they will not be listed as parents in the
- // internal event record.
+ /**
+ * Add a time-like particle to the internal event record with the
+ * given mother indices. If the particle has decayed add its
+ * children recursively.
+ */
void addFinalParticles(tPPtr p, long mother1, long mother2);
- // Add a time-like particle to the internal event record with the
- // given mother indices. If the particle has decayed add its
- // children recursively.
+ /**
+ * Set the static parameters of the underlying model object and
+ * return an instance.
+ */
Shower::Shower * getModel();
- // Set the static parameters of the underlying model object and
- // return an instance.
+ /**
+ * Return true if the given particle is a resonance (defined by the
+ * fact that all children only has the resonance as a parent).
+ */
bool isResonance(tcPPtr r) const;
- // Return true if the given particle is a resonance (defined by the
- // fact that all children only has the resonance as a parent).
+protected:
+
+ /**
+ * Recursively find the first and last indices in the internal event
+ * record of the incoming shower initiator.
+ */
void findChain(pair<long,long> & chain, long init) const;
+
+ /**
+ * Find the parent ThePEG::Particle pair of a given entry in the
+ * internal event record.
+ */
tPPair findParent(long i) const;
+
+ /**
+ * Create a ThePEG::Particle corresponding to a given entry in the
+ * internal event record.
+ */
tPPtr createParticle(long i);
+
+ /**
+ * Copy information of the given entry in the internal event record
+ * to the given ThePEG::Particle.
+ */
tPPtr copyParticle(long i, tPPtr p);
+
+ /**
+ * Return the ThePEG::Particle corresponding to a given entry in the
+ * internal event record.
+ */
tPPtr getParticle(long i) const;
+
+ /**
+ * Return the momentum of the given entry in the internal event
+ * record.
+ */
Lorentz5Momentum momentum(long i) const;
+
+ /**
+ * Return the boost needed to transform the shower system to the
+ * original system.
+ */
LorentzRotation getBoost(PBIPair & bins, LorentzVector k1, LorentzVector k2,
bool side1, bool side2);
+
+ /**
+ * After recreating the remnants, boost them to preserve momentum.
+ */
void transformRemnants(LorentzMomentum & Ph, LorentzMomentum & Pr,
LorentzMomentum & k, LorentzMomentum P, bool side);
+
+
protected:
+ /** @name Clone Methods. */
+ //@{
+ /**
+ * Make a simple clone of this object.
+ * @return a pointer to the new object.
+ */
inline virtual IBPtr clone() const;
+
+ /** Make a clone of this object, possibly modifying the cloned object
+ * to make it sane.
+ * @return a pointer to the new object.
+ */
inline virtual IBPtr fullclone() const;
- // Standard clone methods.
+ //@}
public:
+ /**
+ * Return a pointer to the object which implements the actual
+ * time-like shower model.
+ */
inline tTimeShowerPtr timeShower() const;
+ /**
+ * Return a pointer to the object which implements the actual
+ * space-like shower model.
+ */
inline tSpaceShowerPtr spaceShower() const;
- // Return pointers to the objects which implements the actual shower
- // models.
protected:
+
+protected:
+
+ /** @name Standard Interfaced functions. */
+ //@{
+ /**
+ * Check sanity of the object during the setup phase.
+ */
inline virtual void doupdate() throw(UpdateException);
+
+ /**
+ * Initialize this object after the setup phase before saving and
+ * EventGenerator to disk.
+ * @throws InitException if object could not be initialized properly.
+ */
inline virtual void doinit() throw(InitException);
+
+ /**
+ * Initialize this object. Called in the run phase just before
+ * a run begins.
+ */
inline virtual void doinitrun();
+
+ /**
+ * Finalize this object. Called in the run phase just after a
+ * run has ended. Used eg. to write out statistics.
+ */
inline virtual void dofinish();
- // Standard Interfaced virtual functions.
+ /**
+ * Rebind pointer to other Interfaced objects. Called in the setup phase
+ * after all objects used in an EventGenerator has been cloned so that
+ * the pointers will refer to the cloned objects afterwards.
+ * @param trans a TranslationMap relating the original objects to
+ * their respective clones.
+ * @throws RebindException if no cloned object was found for a given
+ * pointer.
+ */
inline virtual void rebind(const TranslationMap & trans)
throw(RebindException);
- // Change all pointers to Interfaced objects to corresponding clones.
+ /**
+ * Return a vector of all pointers to Interfaced objects used in this
+ * object.
+ * @return a vector of pointers.
+ */
inline virtual IVector getReferences();
- // Return pointers to all Interfaced objects refered to by this.
+ //@}
private:
+ /**
+ * The object implementing the administration of the time- and
+ * space-like showers.
+ */
Shower::Shower * theShowerModel;
- // The object implementing the administration of the time and space
- // showers.
+ /**
+ * The object which implements the actual time-like shower model.
+ */
TimeShowerPtr theTimeShower;
+
+ /**
+ * The object which implements the actual space-like shower model.
+ */
SpaceShowerPtr theSpaceShower;
- // The objects which implements the actual shower models.
+ /**
+ * If true add final-state radiation off initial-state cascade.
+ */
bool addFSROnISR;
- // If true add final-state radiation off initial-state cascade.
+ /**
+ * If true all branchings in the shower will be added to the new
+ * step. Otherwise only the final partons will be added.
+ */
bool theFullHistory;
- // If true all branchings in the shower will be added to the new
- // step. Otherwise only the final partons will be added.
protected:
+ /**
+ * The event record used internally.
+ */
Shower::Event event;
- // The event record used internally.
+ /**
+ * Association between ColourLines and colour indices.
+ */
ObjectIndexer<long,ColourLine> colourIndex;
- // Association between ColourLines and colour indices.
+ /**
+ * Association between Particles and indices.
+ */
ObjectIndexer<long,Particle> particleIndex;
- // Association between Particles and indices.
private:
+ /**
+ * Describe a concrete class with persistent data.
+ */
static ClassDescription<ShowerHandler> initShowerHandler;
- // Describe a concrete class with persistent data.
+ /**
+ * Private and non-existent assignment operator.
+ */
ShowerHandler & operator=(const ShowerHandler &);
- // Private and non-existent assignment operator.
};
}
-// CLASSDOC OFF
namespace ThePEG {
-// The following template specialization informs Pythia7 about the
-// base class of ShowerHandler.
+/**
+ * This template specialization informs ThePEG about the base class of
+ * Pythia7::ShowerHandler.
+ */
template <>
struct BaseClassTrait<Pythia7::ShowerHandler,1>: public ClassTraitsType {
+ /** Typedef of the base class of Pythia7::ShowerHandler. */
typedef CascadeHandler NthBase;
};
-// The following template specialization informs Pythia7 about the
-// name of this class and the shared object where it is defined.
+/**
+ * This template specialization informs ThePEG about the name of the
+ * Pythia7::ShowerHandler class and the shared object where it is
+ * defined.
+ */
template <>
struct ClassTraits<Pythia7::ShowerHandler>
: public ClassTraitsBase<Pythia7::ShowerHandler> {
+ /** Return the class name. */
static string className() { return "Pythia7::ShowerHandler"; }
- // Return the class name.
+ /** Return the name of the shared library be loaded to get access to
+ * the Pythia7::ShowerHandler class and every other class it uses
+ * (except the base class). */
static string library() { return "libP7Shower.so"; }
- // Return the name of the shared library to be loaded to get
- // access to this class and every other class it uses
- // (except the base class).
+
};
}
#include "ShowerHandler.icc"
#ifndef PYTHIA7_TEMPLATES_IN_CC_FILE
// #include "ShowerHandler.tcc"
#endif
#endif /* PYTHIA7_ShowerHandler_H */
diff --git a/Shower/SpaceShower.h b/Shower/SpaceShower.h
--- a/Shower/SpaceShower.h
+++ b/Shower/SpaceShower.h
@@ -1,170 +1,245 @@
// Header file for the SpaceParticle and SpaceShower classes.
#ifndef SpaceShower_H
#define SpaceShower_H
#include <iostream>
#include <vector>
#include <cmath>
#include <ctime>
#include "Pythia7/Config/Pythia7.h"
#include "Basics.h"
#include "Beam.h"
namespace Pythia7 {
namespace Shower {
using namespace std;
//**************************************************************************
-// This class holds info on a spacelike particle in the shower evolution.
-// It derives from the Particle class.
-// Note that specific shower info is initialized in an off state.
+/**
+ * This class holds info on a spacelike particle in the shower evolution.
+ * It derives from the Particle class.
+ * Note that specific shower info is initialized in an off state.
+ * Used by the internal Pythia7 Shower classes.
+ */
class SpaceParticle : public Particle {
public:
- // Constructors.
+ /**
+ * Constructors.
+ */
SpaceParticle()
: Particle(), canBranch(false), hasBranched(false),
shouldEvolveMore(false), idMother(-1), idSister(-1),
coneSide(0), copyOfPrimary(-1), Q2Now(0.0), x(0.0),
zMother(0.0), phiDaughter(0.0), sin2thetaMax(0.0),
sin2thetaNow(0.0), hasColVec4(false), hasAntiColVec4(false) {}
+ /** NOT DOCUMENTED */
SpaceParticle(long idin, long statusin = 0, long mother1in = -1,
long mother2in = -1, long colin = 0, long anticolin = 0,
Vec4 pin = Vec4(0.,0.,0.,0.),
double min = 0., double scalein = 0.)
: Particle(idin, statusin, mother1in, mother2in,
colin, anticolin, pin, min), canBranch(false),
hasBranched(false), shouldEvolveMore(false), idMother(-1),
idSister(-1), coneSide( 0), copyOfPrimary(-1), Q2Now(0.0),
x(0.0), zMother(0.0), phiDaughter(0.0), sin2thetaMax(0.0),
sin2thetaNow(0.0), hasColVec4(false), hasAntiColVec4(false) {}
+ /** NOT DOCUMENTED */
SpaceParticle(const SpaceParticle& pt)
: Particle(pt), canBranch(pt.canBranch), hasBranched(pt.hasBranched),
shouldEvolveMore(pt.shouldEvolveMore), idMother(pt.idMother),
idSister(pt.idSister), coneSide(pt.coneSide),
copyOfPrimary(pt.copyOfPrimary), Q2Now(pt.Q2Now), x(pt.x),
zMother(pt.zMother), phiDaughter(pt.phiDaughter),
sin2thetaMax(pt.sin2thetaMax), sin2thetaNow(pt.sin2thetaNow),
hasColVec4(pt.hasColVec4), hasAntiColVec4(pt.hasAntiColVec4),
colVec4(pt.colVec4), antiColVec4(pt.antiColVec4) {}
+ /** NOT DOCUMENTED */
SpaceParticle& operator=(const SpaceParticle& pt) {
if (this != &pt) { Particle::operator=(pt);
canBranch = pt.canBranch; hasBranched = pt.hasBranched;
shouldEvolveMore = pt.shouldEvolveMore; idMother = pt.idMother;
idSister = pt.idSister; coneSide = pt.coneSide;
copyOfPrimary = pt.copyOfPrimary; Q2Now = pt.Q2Now;
x = pt.x; zMother = pt.zMother; phiDaughter = pt.phiDaughter;
sin2thetaMax = pt.sin2thetaMax; sin2thetaNow = pt.sin2thetaNow;
hasColVec4 = pt.hasColVec4; hasAntiColVec4 = pt.hasAntiColVec4;
colVec4 = pt.colVec4; antiColVec4 = pt.antiColVec4;} return *this; }
- // Construct a SpaceParticle from a Particle.
+ /**
+ * Construct a SpaceParticle from a Particle.
+ */
SpaceParticle(const Particle& pt) : Particle(pt) {
canBranch = false; hasColVec4 = false; hasAntiColVec4 = false;}
+ /** NOT DOCUMENTED */
SpaceParticle& operator=(const Particle& pt) {Particle::operator=(pt);
canBranch = false; hasColVec4 = false; hasAntiColVec4 = false;
return *this; }
- // Member functions.
+
+ /**
+ * Member functions.
+ */
double mNow() const {if (!hasBranched) return 0.; return -sqrt(Q2Now);}
+ /** NOT DOCUMENTED */
double m2Now() const {if (!hasBranched) return 0.; return -Q2Now;}
+ /** NOT DOCUMENTED */
void setColVec4() {hasColVec4 = false;}
+ /** NOT DOCUMENTED */
void setColVec4(Vec4 colVec4in)
{colVec4 = colVec4in; hasColVec4 = true;}
+ /** NOT DOCUMENTED */
void setAntiColVec4() {hasAntiColVec4 = false;}
+ /** NOT DOCUMENTED */
void setAntiColVec4(Vec4 antiColVec4in)
{antiColVec4 = antiColVec4in; hasAntiColVec4 = true;}
+ /** NOT DOCUMENTED */
void rot(double theta, double phi) {
Particle::rot(theta, phi);
if (hasColVec4) colVec4.rot(theta, phi);
if (hasAntiColVec4) antiColVec4.rot(theta, phi); }
+ /** NOT DOCUMENTED */
void bst(double betaX, double betaY, double betaZ) {
Particle::bst(betaX, betaY, betaZ);
if (hasColVec4) colVec4.bst(betaX, betaY, betaZ);
if (hasAntiColVec4) antiColVec4.bst(betaX, betaY, betaZ); }
+ /** NOT DOCUMENTED */
void bst(const Vec4& vec) {
Particle::bst(vec);
if (hasColVec4) colVec4.bst(vec);
if (hasAntiColVec4) antiColVec4.bst(vec); }
+ /** NOT DOCUMENTED */
void rotbst(const RotBstMatrix& M) {
Particle::rotbst(M);
if (hasColVec4) colVec4.rotbst(M);
if (hasAntiColVec4) antiColVec4.rotbst(M); }
- // Private members to be accessible from SpaceShower.
+
+ /**
+ * Private members to be accessible from SpaceShower.
+ */
friend class SpaceShower;
+
private:
+ /** NOT DOCUMENTED */
bool canBranch, hasBranched, shouldEvolveMore;
+ /** NOT DOCUMENTED */
long idMother, idSister, coneSide, copyOfPrimary;
+ /** NOT DOCUMENTED */
double Q2Now, x, zMother, phiDaughter, sin2thetaMax, sin2thetaNow;
+ /** NOT DOCUMENTED */
bool hasColVec4, hasAntiColVec4;
+ /** NOT DOCUMENTED */
Vec4 colVec4, antiColVec4;
};
//**************************************************************************
-// The SpaceShower class does spacelike showers.
+/**
+ * The SpaceShower class does spacelike showers.
+ * Used by the internal Pythia7 Shower classes.
+ */
class SpaceShower {
public:
- // Constants (possibly to be changed externally).
+ /**
+ * Constants (possibly to be changed externally).
+ */
static long HADRONSHOWER, LEPTONSHOWER, ANGULARORDER, NQUARK, ALPHASMODE,
Q2ORDER, MAXVIRTUALITY, MEMODE, SOFTGLUONRESUM, FINALCONE, PHIPOLASYM,
PHICOHERASYM, RESPECTSCALE;
+ /**
+ * Constants (possibly to be changed externally).
+ */
static double Q0, Q0CHGQ,Q0CHGL, ALPHASFIX, LAMBDA5, ALPHAEMFIX,
EMINEMITTED, ZMINEMITTED, XMINEMITTEDCHG, TINYQCHG, TINYPDF,
TINYKERNELPDF, TINYKINPREC, HEAVYEVOL, EXTRAQEDPREWT, HEAVYXMAX,
Q2STARTFRAC;
- // Constructor.
+ /**
+ * Constructor.
+ */
SpaceShower(long capacity = 20) {entry1.reserve(capacity);
entry2.reserve(capacity);}
- // Top-level driver routine to do a single time-like shower.
+
+ /**
+ * Top-level driver routine to do a single time-like shower.
+ */
void shower(Event&, BeamParticle&, BeamParticle&, long = -1, long = -1,
long = -1);
private:
+ /** NOT DOCUMENTED */
BeamParticle* beam1;
+ /** NOT DOCUMENTED */
BeamParticle* beam2;
+ /** NOT DOCUMENTED */
vector<SpaceParticle> entry1;
+ /** NOT DOCUMENTED */
vector<SpaceParticle> entry2;
+ /** NOT DOCUMENTED */
bool hasME;
+ /** NOT DOCUMENTED */
long in1, in2, maxColIndx, MEkind, nFinal, finalId1, finalId2;
+ /** NOT DOCUMENTED */
double s, eCM, sHat, mHat, sHatFinalState, avgMT2, minMT2;
- // Read in info on system to be treated.
+ /**
+ * Read in info on system to be treated.
+ */
void read(Event&, BeamParticle&, BeamParticle&, long, long);
- // Write back shower after treatment.
+ /**
+ * Write back shower after treatment.
+ */
void write(Event&);
- // Set up primary partons for evolution.
+ /**
+ * Set up primary partons for evolution.
+ */
bool setUpPrimary(long);
- // Check and set kinematics for primary partons after evolution.
+ /**
+ * Check and set kinematics for primary partons after evolution.
+ */
bool kinemPrimary();
- // Pick one of the sides for further evolution when required.
+ /**
+ * Pick one of the sides for further evolution when required.
+ */
long pickSide();
- // Set up daughters of parton branching for subsequent evolution.
+ /**
+ * Set up daughters of parton branching for subsequent evolution.
+ */
void setUpBranching(long);
- // Check and set kinematics for branching after daughter evolution.
+ /**
+ * Check and set kinematics for branching after daughter evolution.
+ */
bool kinemBranching(long);
- // Evolve a single parton; main physics routine.
+ /**
+ * Evolve a single parton; main physics routine.
+ */
void evolveParton(long);
- // Find class of ME correction.
+ /**
+ * Find class of ME correction.
+ */
void findMEkind(long);
- // Provide maximum of expected ME weight; for preweighting of evolution.
+ /**
+ * Provide maximum of expected ME weight; for preweighting of evolution.
+ */
double calcMEmax(long, long);
- // Provide actual ME weight for current branching.
+ /**
+ * Provide actual ME weight for current branching.
+ */
double calcMEcorr(long, long, double, double);
+
};
//**************************************************************************
}
}
#endif // SpaceShower_H
diff --git a/Shower/SpaceShowerHandler.h b/Shower/SpaceShowerHandler.h
--- a/Shower/SpaceShowerHandler.h
+++ b/Shower/SpaceShowerHandler.h
@@ -1,353 +1,560 @@
// -*- C++ -*-
#ifndef PYTHIA7_SpaceShowerHandler_H
#define PYTHIA7_SpaceShowerHandler_H
-//
-// This is the declaration of the <!id>SpaceShowerHandler<!!id> class.
-//
-// CLASSDOC SUBSECTION Description:
-//
-//
-//
-// CLASSDOC SUBSECTION See also:
-//
-// <a href="http:.html">.h</a>,
-// <a href="http:.html">.h</a>.
-//
+// This is the declaration of the SpaceShowerHandler class.
#include "Pythia7/Config/Pythia7.h"
#include "ThePEG/Handlers/HandlerBase.h"
#include "Pythia7/Shower/SpaceShower.h"
#include "SpaceShowerHandler.fh"
// #include "SpaceShowerHandler.xh"
#include "TimeShowerHandler.fh"
namespace Pythia7 {
+/**
+ * SpaceShowerHandler is a wrapper around the internal
+ * Shower::SpaceShower class to perform a space-like parton shower.
+ */
class SpaceShowerHandler: public HandlerBase {
public:
+ /** @name Standard constructors and destructors. */
+ //@{
+ /**
+ * The default constructor.
+ */
inline SpaceShowerHandler();
+
+ /**
+ * The copy constructor.
+ */
inline SpaceShowerHandler(const SpaceShowerHandler &);
+
+ /**
+ * The destructor.
+ */
virtual ~SpaceShowerHandler();
- // Standard ctors and dtor.
+ //@}
public:
+ /**
+ * Set the static parameters of the underlying model object and
+ * return an instance.
+ */
Shower::SpaceShower * getModel();
- // Set the static parameters of the underlying model object and
- // return an instance.
+ /**
+ * Allowed ISR showers for incoming hadron: = 0: none; = 1: QCD
+ * ones; = 2 : also allow photon emission; = 3 : allow spacelike
+ * photon branchings, if supported by the PDF used (not the case
+ * currently) (does not address VMD part of resolved photons).
+ */
inline int hadronShower() const;
- // Allowed ISR showers for incoming hadron: = 0: none; = 1: QCD
- // ones; = 2 : also allow photon emission; = 3 : allow spacelike
- // photon branchings, if supported by the PDF used (not the case
- // currently) (does not address VMD part of resolved photons).
+ /**
+ * Allowed ISR showers for incoming lepton: = 0: none; = 1: photon
+ * emission; = 2 : allow spacelike photon branchings, if supported
+ * by the PDF used (not the case currently) (does not address VMD
+ * part of resolved photons).
+ */
inline int leptonShower() const;
- // Allowed ISR showers for incoming lepton: = 0: none; = 1: photon
- // emission; = 2 : allow spacelike photon branchings, if supported
- // by the PDF used (not the case currently) (does not address VMD
- // part of resolved photons).
+ /**
+ * Number of allowed quark flavours in \f$g\rightarrow q \bar{q}\f$
+ * branching.
+ */
inline int nQuarks() const;
- // Number of allowed quark flavours in g -> q qbar branching.
+ /**
+ * Running of alpha_strong in evolution: = 0: fixed; = 1: scale
+ * \f$Q^2\f$; = 2: scale \f$p_\parp^2\f$. But note that PDF's are
+ * always evaluated at \f$Q^2\f$.
+ */
inline int alphaSMode() const;
- // Running of alpha_strong in evolution:
- // = 0: fixed; = 1: scale Q^2; = 2: scale pT^2.
- // But note that PDF's are always evaluated at Q2.
+ /**
+ * Maximum virtuality setting the starting point of the evolution: =
+ * 0: \f$s\f$; = 1: \f$\hat{s}\f$; = 2: average \f$m_\perp^2\f$; =
+ * 3: smallest \f$m_\perp^2\f$.
+ */
inline int maxVirtuality() const;
- // Maximum virtuality setting the starting point of the evolution: =
- // 0: s; = 1: sHat; = 2: average mT^2; = 3: smallest mT^2.
+ /**
+ * Use of matrix element corrections:
+ * = 0: no; = 1: yes.
+ */
inline int MEMode() const;
- // Use of matrix element corrections:
- // = 0: no; = 1: yes.
+ /**
+ * Resum the effect of multiple soft gluon emissions: = 0: no; = 1: yes.
+ */
inline int softGluonResum() const;
- // Resum the effect of multiple soft gluon emissions: = 0: no; = 1: yes.
+ /**
+ * Restrict first emission within cone given by colour flow in hard
+ * process. = 0: no; = 1: yes, isotropic phi angle inside cone; = 2:
+ * yes, also with anisotropic phi angle inside cone.
+ */
inline int finalCone() const;
- // Restrict first emission within cone given by colour flow in hard
- // process. = 0: no; = 1: yes, isotropic phi angle inside cone; = 2:
- // yes, also with anisotropic phi angle inside cone.
+ /**
+ * Q2 ordering is normal, but could be relaxed (to be developed in
+ * future). = 0: yes; = 1: no, allow maximum kinematically possible
+ * (toy scenario).
+ */
inline int Q2Order() const;
- // Q2 ordering is normal, but could be relaxed (to be developed in
- // future). = 0: yes; = 1: no, allow maximum kinematically possible
- // (toy scenario).
+ /**
+ * Use angular ordering?
+ */
inline bool angularOrdering() const;
- // Use angular ordering?
+ /**
+ * Azimuthal asymmetry induced by gluon polarization.
+ * = 0: no; = 1: yes.
+ */
inline int phiPolAsym() const;
- // Azimuthal asymmetry induced by gluon polarization.
- // = 0: no; = 1: yes.
+ /**
+ * Azimuthal asymmetry induced by colour coherence.
+ * = 0: no; = 1: yes.
+ */
inline int phiCoherAsym() const;
- // Azimuthal asymmetry induced by colour coherence.
- // = 0: no; = 1: yes.
+ /**
+ * Use the scale variable of original partons to restrict
+ * branchings. = 0: no; = 1: yes, \f$Q^2 <\f$ scale; = 2: yes,
+ * \f$p_\perp^2 <\f$ scale, = 3: yes, \f$(E\theta)^2 <\f$ scale; =
+ * 4: yes, \f$\theta^2 <\f$ scale. Here theta is the full opening
+ * angle of a branching, defined in the rest frame of the event. (In
+ * all cases relations are approximate.)
+ */
inline int respectScale() const;
- // Use the scale variable of original partons to restrict
- // branchings. = 0: no; = 1: yes, the Q2 < scale; = 2: yes, the pT2
- // < scale, = 3: yes, the (E*theta)^2 < scale; = 4: yes, the theta^2
- // < scale. Here theta is the full opening angle of a branching,
- // defined in the rest frame of the event. (In all cases relations
- // are approximate.)
+ /**
+ * Parton shower cut-off mass for QCD emissions.
+ */
inline Energy Q0() const;
- // Parton shower cut-off mass for QCD emissions.
+ /**
+ * Parton shower cut-off mass for photon coupling to coloured particle.
+ */
inline Energy Q0ChgQ() const;
- // Parton shower cut-off mass for photon coupling to coloured particle.
+ /**
+ * Parton shower cut-off mass for pure QED branchings. Assumed <= Q0CHGQ.
+ */
inline Energy Q0ChgL() const;
- // Parton shower cut-off mass for pure QED branchings. Assumed <= Q0CHGQ.
+ /**
+ * Fixed alpha_strong value for AlphaSMode == 0.
+ */
inline double alphaSFix() const;
- // Fixed alpha_strong value for AlphaSMode == 0.
+ /**
+ * Lambda_QCD(five flavours) in alpha_strong for AlphaSMode >= 1.
+ */
inline Energy Lambda5() const;
- // Lambda_QCD(five flavours) in alpha_strong for AlphaSMode >= 1.
+ /**
+ * Fixed alpha_em value.
+ */
inline double alphaEMFix() const;
- // Fixed alpha_em value.
+ /**
+ * Minimum energy of emitted QCD parton in rest frame of subprocess.
+ */
inline Energy EMinEmitted() const;
- // Minimum energy of emitted QCD parton in rest frame of subprocess.
+ /**
+ * Minimum fraction \f$1 - z\f$ of emitted QCD parton, in addition
+ * to other limits.
+ */
inline double zMinEmitted() const;
- // Minimum fraction 1 - z of emitted QCD parton, in addition to
- // other limits.
+ /**
+ * Minimum \f$x\f$ fraction of emitted photon - matched to treatment of
+ * photon PDF.
+ */
inline double xMinEmittedChg() const;
- // Minimum x fraction of emitted photon - matched to treatment of
- // photon PDF.
+ /**
+ * Smallest particle mass for QED evolution (= electron mass).
+ */
inline Energy tinyQChg() const;
- // Smallest particle mass for QED evolution (= electron mass).
+ /**
+ * Vanishingly small parton density.
+ */
inline double tinyPDF() const;
- // Vanishingly small parton density.
+ /**
+ * Vanishingly small product of splitting kernels and parton density
+ * ratios.
+ */
inline double tinyKernelPDF() const;
- // Vanishingly small product of splitting kernels and parton density
- // ratios.
+ /**
+ * Vanishingly small recoil mass in branching kinematics reconstruction.
+ */
inline double tinyKinPrec() const;
- // Vanishingly small recoil mass in branching kinematics reconstruction.
+ /**
+ * Safety margin in \f$x\f$ that heavy flavour evolution is at all
+ * possible.
+ */
inline double heavyEvol() const;
- // Safety margin in x that heavy flavour evolution is at all possible.
+ /**
+ * Extra preweight in QED shower evolution, to avoid maximum violation.
+ */
inline double extraPreweight() const;
- // Extra preweight in QED shower evolution, to avoid maximum violation.
+ /**
+ * Maximum allowed \f$x\f$ when reconstructing back to heavy flavour
+ * from gluon or photon.
+ */
inline double heavyMax() const;
- // Maximum allowed x when reconstructing back to heavy flavour from
- // gluon or photon.
+ /**
+ * Mimimum gap in \f$Q^2\f$ values to allow iteration when parton
+ * density vanishes.
+ */
inline double Q2StartFrac() const;
- // Mimimum gap in Q2 values to allow iteration when parton density
- // vanishes.
public:
- void persistentOutput(PersistentOStream &) const;
- void persistentInput(PersistentIStream &, int);
- // Standard functions for writing and reading from persistent streams.
+ /** @name Functions used by the persistent I/O system. */
+ //@{
+ /**
+ * Function used to write out object persistently.
+ * @param os the persistent output stream written to.
+ */
+ void persistentOutput(PersistentOStream & os) const;
+
+ /**
+ * Function used to read in object persistently.
+ * @param is the persistent input stream read from.
+ * @param version the version number of the object when written.
+ */
+ void persistentInput(PersistentIStream & is, int version);
+ //@}
+
+ /**
+ * Standard Init function used to initialize the interfaces.
+ */
static void Init();
- // Standard Init function used to initialize the interfaces.
protected:
- inline virtual IBPtr clone() const;
- inline virtual IBPtr fullclone() const;
- // Standard clone methods.
protected:
+ /** @name Clone Methods. */
+ //@{
+ /**
+ * Make a simple clone of this object.
+ * @return a pointer to the new object.
+ */
+ inline virtual IBPtr clone() const;
+
+ /** Make a clone of this object, possibly modifying the cloned object
+ * to make it sane.
+ * @return a pointer to the new object.
+ */
+ inline virtual IBPtr fullclone() const;
+ //@}
+
+protected:
+
+
+protected:
+
+ /** @name Standard Interfaced functions. */
+ //@{
+ /**
+ * Check sanity of the object during the setup phase.
+ */
inline virtual void doupdate() throw(UpdateException);
+
+ /**
+ * Initialize this object after the setup phase before saving and
+ * EventGenerator to disk.
+ * @throws InitException if object could not be initialized properly.
+ */
inline virtual void doinit() throw(InitException);
+
+ /**
+ * Initialize this object. Called in the run phase just before
+ * a run begins.
+ */
inline virtual void doinitrun();
+
+ /**
+ * Finalize this object. Called in the run phase just after a
+ * run has ended. Used eg. to write out statistics.
+ */
inline virtual void dofinish();
- // Standard Interfaced virtual functions.
+ /**
+ * Rebind pointer to other Interfaced objects. Called in the setup phase
+ * after all objects used in an EventGenerator has been cloned so that
+ * the pointers will refer to the cloned objects afterwards.
+ * @param trans a TranslationMap relating the original objects to
+ * their respective clones.
+ * @throws RebindException if no cloned object was found for a given
+ * pointer.
+ */
inline virtual void rebind(const TranslationMap & trans)
throw(RebindException);
- // Change all pointers to Interfaced objects to corresponding clones.
+ /**
+ * Return a vector of all pointers to Interfaced objects used in this
+ * object.
+ * @return a vector of pointers.
+ */
inline virtual IVector getReferences();
- // Return pointers to all Interfaced objects refered to by this.
+ //@}
private:
+ /**
+ * The object implementing the actual model.
+ */
Shower::SpaceShower * theShowerModel;
- // The object implementing the actual model.
+ /**
+ * Allowed ISR showers for incoming hadron: = 0: none; = 1: QCD
+ * ones; = 2 : also allow photon emission; = 3 : allow spacelike
+ * photon branchings, if supported by the PDF used (not the case
+ * currently) (does not address VMD part of resolved photons).
+ */
+ int theHadronShower;
- int theHadronShower;
- // Allowed ISR showers for incoming hadron: = 0: none; = 1: QCD
- // ones; = 2 : also allow photon emission; = 3 : allow spacelike
- // photon branchings, if supported by the PDF used (not the case
- // currently) (does not address VMD part of resolved photons).
+ /**
+ * Allowed ISR showers for incoming lepton: = 0: none; = 1: photon
+ * emission; = 2 : allow spacelike photon branchings, if supported
+ * by the PDF used (not the case currently) (does not address VMD
+ * part of resolved photons).
+ */
+ int theLeptonShower;
- int theLeptonShower;
- // Allowed ISR showers for incoming lepton: = 0: none; = 1: photon
- // emission; = 2 : allow spacelike photon branchings, if supported
- // by the PDF used (not the case currently) (does not address VMD
- // part of resolved photons).
+ /**
+ * Number of allowed quark flavours in g -> q qbar branching.
+ */
+ int theNQuarks;
- int theNQuarks;
- // Number of allowed quark flavours in g -> q qbar branching.
+ /**
+ * Running of alpha_strong in evolution:
+ * = 0: fixed; = 1: scale Q^2; = 2: scale pT^2.
+ * But note that PDF's are always evaluated at Q2.
+ */
+ int theAlphaSMode;
- int theAlphaSMode;
- // Running of alpha_strong in evolution:
- // = 0: fixed; = 1: scale Q^2; = 2: scale pT^2.
- // But note that PDF's are always evaluated at Q2.
+ /**
+ * Maximum virtuality setting the starting point of the evolution: =
+ * 0: s; = 1: sHat; = 2: average mT^2; = 3: smallest mT^2.
+ */
+ int theMaxVirtuality;
- int theMaxVirtuality;
- // Maximum virtuality setting the starting point of the evolution: =
- // 0: s; = 1: sHat; = 2: average mT^2; = 3: smallest mT^2.
+ /**
+ * Use of matrix element corrections:
+ * = 0: no; = 1: yes.
+ */
+ int theMEMode;
- int theMEMode;
- // Use of matrix element corrections:
- // = 0: no; = 1: yes.
+ /**
+ * Resum the effect of multiple soft gluon emissions: = 0: no; = 1: yes.
+ */
+ int theSoftGluonResum;
- int theSoftGluonResum;
- // Resum the effect of multiple soft gluon emissions: = 0: no; = 1: yes.
+ /**
+ * Restrict first emission within cone given by colour flow in hard
+ * process. = 0: no; = 1: yes, isotropic phi angle inside cone; = 2:
+ * yes, also with anisotropic phi angle inside cone.
+ */
+ int theFinalCone;
- int theFinalCone;
- // Restrict first emission within cone given by colour flow in hard
- // process. = 0: no; = 1: yes, isotropic phi angle inside cone; = 2:
- // yes, also with anisotropic phi angle inside cone.
+ /**
+ * Q2 ordering is normal, but could be relaxed (to be developed in
+ * future). = 0: yes; = 1: no, allow maximum kinematically possible
+ * (toy scenario).
+ */
+ int theQ2Order;
- int theQ2Order;
- // Q2 ordering is normal, but could be relaxed (to be developed in
- // future). = 0: yes; = 1: no, allow maximum kinematically possible
- // (toy scenario).
+ /**
+ * Use angular ordering if non-zero.
+ */
+ int useAngularOrdering;
- int useAngularOrdering;
- // Use angular ordering if non-zero.
+ /**
+ * Azimuthal asymmetry induced by gluon polarization.
+ * = 0: no; = 1: yes.
+ */
+ int thePhiPolAsym;
- int thePhiPolAsym;
- // Azimuthal asymmetry induced by gluon polarization.
- // = 0: no; = 1: yes.
+ /**
+ * Azimuthal asymmetry induced by colour coherence.
+ * = 0: no; = 1: yes.
+ */
+ int thePhiCoherAsym;
- int thePhiCoherAsym;
- // Azimuthal asymmetry induced by colour coherence.
- // = 0: no; = 1: yes.
+ /**
+ * Use the scale variable of original partons to restrict
+ * branchings. = 0: no; = 1: yes, the Q2 < scale; = 2: yes, the pT2
+ * < scale, = 3: yes, the (E*theta)^2 < scale; = 4: yes, the theta^2
+ * < scale. Here theta is the full opening angle of a branching,
+ * defined in the rest frame of the event. (In all cases relations
+ * are approximate.)
+ */
+ int theRespectScale;
- int theRespectScale;
- // Use the scale variable of original partons to restrict
- // branchings. = 0: no; = 1: yes, the Q2 < scale; = 2: yes, the pT2
- // < scale, = 3: yes, the (E*theta)^2 < scale; = 4: yes, the theta^2
- // < scale. Here theta is the full opening angle of a branching,
- // defined in the rest frame of the event. (In all cases relations
- // are approximate.)
+ /**
+ * Parton shower cut-off mass for QCD emissions.
+ */
+ Energy theQ0;
- Energy theQ0;
- // Parton shower cut-off mass for QCD emissions.
+ /**
+ * Parton shower cut-off mass for photon coupling to coloured particle.
+ */
+ Energy theQ0ChgQ;
- Energy theQ0ChgQ;
- // Parton shower cut-off mass for photon coupling to coloured particle.
+ /**
+ * Parton shower cut-off mass for pure QED branchings. Assumed <= Q0CHGQ.
+ */
+ Energy theQ0ChgL;
- Energy theQ0ChgL;
- // Parton shower cut-off mass for pure QED branchings. Assumed <= Q0CHGQ.
+ /**
+ * Fixed alpha_strong value for AlphaSMode == 0.
+ */
+ double theAlphaSFix;
- double theAlphaSFix;
- // Fixed alpha_strong value for AlphaSMode == 0.
+ /**
+ * Lambda_QCD(five flavours) in alpha_strong for AlphaSMode >= 1.
+ */
+ Energy theLambda5;
- Energy theLambda5;
- // Lambda_QCD(five flavours) in alpha_strong for AlphaSMode >= 1.
+ /**
+ * Fixed alpha_em value.
+ */
+ double theAlphaEMFix;
- double theAlphaEMFix;
- // Fixed alpha_em value.
+ /**
+ * Minimum energy of emitted QCD parton in rest frame of subprocess.
+ */
+ Energy theEMinEmitted;
- Energy theEMinEmitted;
- // Minimum energy of emitted QCD parton in rest frame of subprocess.
+ /**
+ * Minimum fraction 1 - z of emitted QCD parton, in addition to
+ * other limits.
+ */
+ double theZMinEmitted;
- double theZMinEmitted;
- // Minimum fraction 1 - z of emitted QCD parton, in addition to
- // other limits.
+ /**
+ * Minimum x fraction of emitted photon - matched to treatment of
+ * photon PDF.
+ */
+ double theXMinEmittedChg;
- double theXMinEmittedChg;
- // Minimum x fraction of emitted photon - matched to treatment of
- // photon PDF.
+ /**
+ * Smallest particle mass for QED evolution (= electron mass).
+ */
+ Energy theTinyQChg;
- Energy theTinyQChg;
- // Smallest particle mass for QED evolution (= electron mass).
+ /**
+ * Vanishingly small parton density.
+ */
+ double theTinyPDF;
- double theTinyPDF;
- // Vanishingly small parton density.
+ /**
+ * Vanishingly small product of splitting kernels and parton density
+ * ratios.
+ */
+ double theTinyKernelPDF;
- double theTinyKernelPDF;
- // Vanishingly small product of splitting kernels and parton density
- // ratios.
+ /**
+ * Vanishingly small recoil mass in branching kinematics reconstruction.
+ */
+ double theTinyKinPrec;
- double theTinyKinPrec;
- // Vanishingly small recoil mass in branching kinematics reconstruction.
+ /**
+ * Safety margin in x that heavy flavour evolution is at all possible.
+ */
+ double theHeavyEvol;
- double theHeavyEvol;
- // Safety margin in x that heavy flavour evolution is at all possible.
+ /**
+ * Extra preweight in QED shower evolution, to avoid maximum violation.
+ */
+ double theExtraPreweight;
- double theExtraPreweight;
- // Extra preweight in QED shower evolution, to avoid maximum violation.
+ /**
+ * Maximum allowed x when reconstructing back to heavy flavour from
+ * gluon or photon.
+ */
+ double theHeavyMax;
- double theHeavyMax;
- // Maximum allowed x when reconstructing back to heavy flavour from
- // gluon or photon.
-
+ /**
+ * Mimimum gap in Q2 values to allow iteration when parton density
+ * vanishes.
+ */
double theQ2StartFrac;
- // Mimimum gap in Q2 values to allow iteration when parton density
- // vanishes.
private:
+ /**
+ * Describe a concrete class with persistent data.
+ */
static ClassDescription<SpaceShowerHandler> initSpaceShowerHandler;
- // Describe a concrete class with persistent data.
+ /**
+ * Private and non-existent assignment operator.
+ */
SpaceShowerHandler & operator=(const SpaceShowerHandler &);
- // Private and non-existent assignment operator.
};
}
-// CLASSDOC OFF
namespace ThePEG {
-// The following template specialization informs Pythia7 about the
-// base class of SpaceShowerHandler.
+/**
+ * This template specialization informs ThePEG about the base class of
+ * Pythia7::SpaceShowerHandler.
+ */
template <>
struct BaseClassTrait<Pythia7::SpaceShowerHandler,1>: public ClassTraitsType {
+ /** Typedef of the base class of Pythia7::SpaceShowerHandler. */
typedef HandlerBase NthBase;
};
-// The following template specialization informs Pythia7 about the
-// name of this class and the shared object where it is defined.
+/**
+ * This template specialization informs ThePEG about the name of the
+ * Pythia7::SpaceShowerHandler class and the shared object where it is
+ * defined.
+ */
template <>
struct ClassTraits<Pythia7::SpaceShowerHandler>
: public ClassTraitsBase<Pythia7::SpaceShowerHandler> {
+ /** Return the class name. */
static string className() { return "Pythia7::SpaceShowerHandler"; }
- // Return the class name.
+ /** Return the name of the shared library be loaded to get access to
+ * the Pythia7::SpaceShowerHandler class and every other class it uses
+ * (except the base class). */
static string library() { return "libP7Shower.so"; }
- // Return the name of the shared library to be loaded to get
- // access to this class and every other class it uses
- // (except the base class).
+
};
}
#include "SpaceShowerHandler.icc"
#ifndef PYTHIA7_TEMPLATES_IN_CC_FILE
// #include "SpaceShowerHandler.tcc"
#endif
#endif /* PYTHIA7_SpaceShowerHandler_H */
diff --git a/Shower/TimeShower.h b/Shower/TimeShower.h
--- a/Shower/TimeShower.h
+++ b/Shower/TimeShower.h
@@ -1,177 +1,258 @@
// Header file for the TimeParticle and TimeShower classes.
#ifndef TimeShower_H
#define TimeShower_H
#include <iostream>
#include <vector>
#include <cmath>
#include <ctime>
#include "Pythia7/Config/Pythia7.h"
#include "Basics.h"
#include "Beam.h"
namespace Pythia7 {
namespace Shower {
using namespace std;
//**************************************************************************
-// This class holds info on a timelike particle in the shower evolution.
-// It derives from the Particle class.
-// Note that specific shower info is initialized in an off state.
+/**
+ * This class holds info on a timelike particle in the shower evolution.
+ * It derives from the Particle class.
+ * Note that specific shower info is initialized in an off state.
+ * Used by the internal Pythia7 Shower classes.
+ */
class TimeParticle : public Particle {
public:
- // Constructors.
+ /**
+ * Constructors.
+ */
TimeParticle()
: canBranch(false), hasBranched(false),
shouldEvolveMore(false), idDaughter(0), copyOfPrimary(-1), coneSide(0),
sister(-1), Q2Now(0.0), eMax(0.0), eNow(0.0), pAbsNow(0.0),
zDaughter(0.0), phiDaughter(0.0), hasColVec4(false),
hasAntiColVec4(false) {}
+ /** NOT DOCUMENTED */
TimeParticle(long idin, long statusin = 0, long mother1in = -1,
long mother2in = -1, long colin = 0, long anticolin = 0,
Vec4 pin = Vec4(0.,0.,0.,0.), double min = 0., double scalein = 0.)
: Particle(idin, statusin, mother1in, mother2in, colin, anticolin, pin,
min, scalein),
canBranch(false), hasBranched(false), shouldEvolveMore(false),
idDaughter(0), copyOfPrimary(-1), coneSide(0), sister(-1), Q2Now(0.0),
eMax(0.0), eNow(0.0), pAbsNow(0.0), zDaughter(0.0), phiDaughter(0.0),
hasColVec4(false), hasAntiColVec4(false) {}
+ /** NOT DOCUMENTED */
TimeParticle(const TimeParticle& pt)
: Particle(pt), canBranch(pt.canBranch), hasBranched(pt.hasBranched),
shouldEvolveMore(pt.shouldEvolveMore), idDaughter(pt.idDaughter),
copyOfPrimary(pt.copyOfPrimary), coneSide(pt.coneSide), sister(pt.sister),
Q2Now(pt.Q2Now), eMax(pt.eMax), eNow(pt.eNow), pAbsNow(pt.pAbsNow),
zDaughter(pt.zDaughter), phiDaughter(pt.phiDaughter),
hasColVec4(pt.hasColVec4), hasAntiColVec4(pt.hasAntiColVec4),
colVec4(pt.colVec4), antiColVec4(pt.antiColVec4) {}
+ /** NOT DOCUMENTED */
TimeParticle& operator=(const TimeParticle& pt) {
if (this != &pt) { Particle::operator=(pt);
canBranch = pt.canBranch; hasBranched = pt.hasBranched;
shouldEvolveMore = pt.shouldEvolveMore; idDaughter = pt.idDaughter;
copyOfPrimary = pt.copyOfPrimary; coneSide = pt.coneSide;
sister = pt.sister; Q2Now = pt.Q2Now; eMax = pt.eMax; eNow = pt.eNow;
pAbsNow = pt.pAbsNow; zDaughter = pt.zDaughter;
phiDaughter = pt.phiDaughter; hasColVec4 = pt.hasColVec4;
hasAntiColVec4 = pt.hasAntiColVec4; colVec4 = pt.colVec4;
antiColVec4 = pt.antiColVec4;} return *this; }
- // Construct a TimeParticle from a Particle.
+ /** NOT DOCUMENTED */
TimeParticle(const Particle& pt) : Particle(pt) {
canBranch = false; hasBranched = false; sister = -1;
hasColVec4 = false; hasAntiColVec4 = false;}
+ /** NOT DOCUMENTED */
TimeParticle& operator=(const Particle& pt) {Particle::operator=(pt);
canBranch = false; hasBranched = false; sister = -1;
hasColVec4 = false; hasAntiColVec4 = false; return *this; }
- // Member functions.
+
+ /**
+ * Member functions.
+ */
double mNow() const {if (hasBranched) return sqrt(m()*m() + Q2Now);
else return m(); }
+ /** NOT DOCUMENTED */
double m2Now() const {if (hasBranched) return m()*m() + Q2Now;
else return m()*m(); }
+ /** NOT DOCUMENTED */
double mOff() const {return sqrt(m()*m() + Q2Now); }
+ /** NOT DOCUMENTED */
double m2Off() const {return m()*m() + Q2Now; }
+ /** NOT DOCUMENTED */
void setColVec4() {hasColVec4 = false;}
+ /** NOT DOCUMENTED */
void setColVec4(Vec4 colVec4in)
{colVec4 = colVec4in; hasColVec4 = true;}
+ /** NOT DOCUMENTED */
void setAntiColVec4() {hasAntiColVec4 = false;}
+ /** NOT DOCUMENTED */
void setAntiColVec4(Vec4 antiColVec4in)
{antiColVec4 = antiColVec4in; hasAntiColVec4 = true;}
+ /** NOT DOCUMENTED */
void rot(double theta, double phi) {
Particle::rot(theta, phi);
if (hasColVec4) colVec4.rot(theta, phi);
if (hasAntiColVec4) antiColVec4.rot(theta, phi); }
+ /** NOT DOCUMENTED */
void bst(double betaX, double betaY, double betaZ) {
Particle::bst(betaX, betaY, betaZ);
if (hasColVec4) colVec4.bst(betaX, betaY, betaZ);
if (hasAntiColVec4) antiColVec4.bst(betaX, betaY, betaZ); }
+ /** NOT DOCUMENTED */
void bst(const Vec4& vec) {
Particle::bst(vec);
if (hasColVec4) colVec4.bst(vec);
if (hasAntiColVec4) antiColVec4.bst(vec); }
+ /** NOT DOCUMENTED */
void rotbst(const RotBstMatrix& M) {
Particle::rotbst(M);
if (hasColVec4) colVec4.rotbst(M);
if (hasAntiColVec4) antiColVec4.rotbst(M); }
- // Private members to be accessible from TimeShower.
+
+ /**
+ * Private members to be accessible from TimeShower.
+ */
friend class TimeShower;
+
private:
+ /** NOT DOCUMENTED */
bool canBranch, hasBranched, shouldEvolveMore;
+ /** NOT DOCUMENTED */
long idDaughter, copyOfPrimary, coneSide, sister;
+ /** NOT DOCUMENTED */
double Q2Now, eMax, eNow, pAbsNow, zDaughter, phiDaughter;
+ /** NOT DOCUMENTED */
bool hasColVec4, hasAntiColVec4;
+ /** NOT DOCUMENTED */
Vec4 colVec4, antiColVec4;
};
//**************************************************************************
-// The TimeShower class does timelike showers.
+/**
+ * The TimeShower class does timelike showers.
+ * Used by the internal Pythia7 Shower classes.
+ */
class TimeShower {
public:
- // Constants (possibly to be changed externally).
+ /**
+ * Constants (possibly to be changed externally).
+ */
static long ANGULARORDER, NQUARK, ALPHASMODE, MEMODE, QEDSHOWER,
INITIALCONE, PHIPOLASYM, PHICOHERASYM, RESPECTSCALE;
+ /**
+ * Constants (possibly to be changed externally).
+ */
static double Q0, Q0CHGQ,Q0CHGL, ALPHASFIX, LAMBDA5, ALPHAEMFIX,
Q0FRACPS;
- // Constructor.
+ /**
+ * Constructor.
+ */
TimeShower(long capacity = 100) {entry.reserve(capacity);}
- // Top-level driver routine to do a single time-like shower.
+
+ /**
+ * Top-level driver routine to do a single time-like shower.
+ */
void shower(Event&, vector<long> = vector<long>(1,long(-1)),
double = -1., long = 0, long = 0, double = 0.5);
private:
+ /** NOT DOCUMENTED */
vector<TimeParticle> entry;
+ /** NOT DOCUMENTED */
long nPrimary, maxColIndx, inFlavour1, inFlavour2;
+ /** NOT DOCUMENTED */
RotBstMatrix bstMother;
+ /** NOT DOCUMENTED */
bool hasME, MEorder, MEsplit, MEgluinoDau;
+ /** NOT DOCUMENTED */
long MEkind, MEcombi;
+ /** NOT DOCUMENTED */
double MEmix;
- // Read in info on system to be treated.
+ /**
+ * Read in info on system to be treated.
+ */
void read(Event&, vector<long>);
- // Write back shower after treatment.
+ /**
+ * Write back shower after treatment.
+ */
void write(Event&);
- // Set up primary partons for evolution.
+ /**
+ * Set up primary partons for evolution.
+ */
bool setUpPrimary(double, long, long, double);
- // Check and set kinematics for primary partons after evolution.
+ /**
+ * Check and set kinematics for primary partons after evolution.
+ */
bool kinemPrimary();
- // Set up daughters of parton branching for subsequent evolution.
+ /**
+ * Set up daughters of parton branching for subsequent evolution.
+ */
void setUpBranching(long);
- // Check and set kinematics for branching after daughter evolution.
+ /**
+ * Check and set kinematics for branching after daughter evolution.
+ */
bool kinemBranching(long, long, long);
- // Evolve a single parton; main physics routine.
+ /**
+ * Evolve a single parton; main physics routine.
+ */
void evolveParton(long);
- // Pick one of the partons for further evolution when required.
+ /**
+ * Pick one of the partons for further evolution when required.
+ */
long pickParton(long, long);
- // Check that z and Q2 choices of branching are consistent.
+ /**
+ * Check that z and Q2 choices of branching are consistent.
+ */
bool zQcheck(long);
- // Construct branching kinematics for setUpBranching & kinemBranching.
+ /**
+ * Construct branching kinematics for setUpBranching & kinemBranching.
+ */
void kinemConstruct(long, long, long);
- // Find class of QCD ME correction.
+ /**
+ * Find class of QCD ME correction.
+ */
void findMEkind(long, long, double);
- // Find type of particle; used by findMEkind.
+ /**
+ * Find type of particle; used by findMEkind.
+ */
long findMEparticle(long);
- // Find mixture of V and A in gamma/Z: energy- and flavour-dependent.
+ /**
+ * Find mixture of V and A in gamma/Z: energy- and flavour-dependent.
+ */
double gammaZmix();
- // Set up to calculate QCD ME correction with calcMEcorr.
+ /**
+ * Set up to calculate QCD ME correction with calcMEcorr.
+ */
double findMEcorr(long);
- // Calculate value of QCD ME correction.
+ /**
+ * Calculate value of QCD ME correction.
+ */
static double calcMEcorr(long, long, double, double, double, double, double);
};
//**************************************************************************
}
}
#endif // TimeShower_H
diff --git a/Shower/TimeShowerHandler.h b/Shower/TimeShowerHandler.h
--- a/Shower/TimeShowerHandler.h
+++ b/Shower/TimeShowerHandler.h
@@ -1,241 +1,410 @@
// -*- C++ -*-
#ifndef PYTHIA7_TimeShowerHandler_H
#define PYTHIA7_TimeShowerHandler_H
-//
-// This is the declaration of the <!id>TimeShowerHandler<!!id> class.
-//
-// CLASSDOC SUBSECTION Description:
-//
-//
-//
-// CLASSDOC SUBSECTION See also:
-//
-// <a href="http:.html">.h</a>,
-// <a href="http:.html">.h</a>.
-//
+// This is the declaration of the TimeShowerHandler class.
#include "Pythia7/Config/Pythia7.h"
#include "ThePEG/Handlers/HandlerBase.h"
#include "Pythia7/Shower/TimeShower.h"
#include "TimeShowerHandler.fh"
// #include "TimeShowerHandler.xh"
namespace Pythia7 {
+/**
+ * TimeShowerHandler is a wrapper around the internal
+ * Shower::TimeShower class to perform a space-like parton shower.
+ */
class TimeShowerHandler: public HandlerBase {
public:
+ /** @name Standard constructors and destructors. */
+ //@{
+ /**
+ * The default constructor.
+ */
inline TimeShowerHandler();
+
+ /**
+ * The copy constructor.
+ */
inline TimeShowerHandler(const TimeShowerHandler &);
+
+ /**
+ * The destructor.
+ */
virtual ~TimeShowerHandler();
- // Standard ctors and dtor.
+ //@}
public:
+ /**
+ * Set the static parameters of the underlying model object and
+ * return an instance.
+ */
Shower::TimeShower * getModel();
- // Set the static parameters of the underlying model object and
- // return an instance.
+ /**
+ * Angular ordering; = 0: off, = 1: on for g emission, = 2: on also
+ * for \f$g\rightarrow q \bar{q}\f$ splitting.
+ */
inline int angularOrder() const;
- // Angular ordering; = 0: off, = 1: on for g emission,
- // = 2: on also for g -> q qbar splitting.
+ /**
+ * Number of allowed quark flavours in \f$g\rightarrow q \bar{q}\f$
+ * branching.
+ */
inline int nQuark() const;
- // Number of allowed quark flavours in g -> q qbar branching.
+ /**
+ * Running of alpha_strong in evolution: = 0: fixed; = 1: scale
+ * \f$Q^2/4\f$; = 2: scale \f$p_\perp^2\f$; = 3: scale
+ * \f$p_\perp^2\f$, except for \f$g\rightarrow q \bar{q}\f$, where
+ * it is \f$Q^2/4\f$.
+ */
inline int alphaSMode() const;
- // Running of alpha_strong in evolution:
- // = 0: fixed; = 1: scale Q^2/4; = 2: scale pT^2;
- // = 3: scale pT2, except for g -> q qbar, where it is Q^2/4 .
+ /**
+ * Also allow a QED shower together with QCD ones: = 0: no; = 1:
+ * radiate on-shell photons; = 2 : also allow photons to branch.
+ */
inline int MEMode() const;
- // Also allow a QED shower together with QCD ones: = 0: no; = 1:
- // radiate on-shell photons; = 2 : also allow photons to branch.
+ /**
+ * Also allow a QED shower together with QCD ones: = 0: no;
+ * = 1: radiate on-shell photons; = 2 : also allow photons to branch.
+ */
inline int QEDShower() const;
- // Also allow a QED shower together with QCD ones: = 0: no;
- // = 1: radiate on-shell photons; = 2 : also allow photons to branch.
+ /**
+ * Restrict first emission within cone given by colour flow in hard
+ * process. = 0: no; = 1: yes, isotropic phi angle inside cone; =
+ * 2: yes, also with anisotropic phi angle inside cone.
+ */
inline int initialCone() const;
- // Restrict first emission within cone given by colour flow in hard
- // process. = 0: no; = 1: yes, isotropic phi angle inside cone; =
- // 2: yes, also with anisotropic phi angle inside cone.
+ /**
+ * Azimuthal asymmetry induced by gluon polarization.
+ * = 0: no; = 1: yes.
+ */
inline int phiPolAsym() const;
- // Azimuthal asymmetry induced by gluon polarization.
- // = 0: no; = 1: yes.
+ /**
+ * Azimuthal asymmetry induced by colour coherence.
+ * = 0: no; = 1: yes.
+ */
inline int phoCoherAsym() const;
- // Azimuthal asymmetry induced by colour coherence.
- // = 0: no; = 1: yes.
+ /**
+ * Use the scale variable of original partons to restrict
+ * branchings. = 0: no; = 1: yes, \f$Q^2 <\f$ scale; = 2: yes,
+ * \f$p_\perp^2 <\f$ scale, = 3: yes, \f$(E\theta)^2 <\f$ scale; =
+ * 4: yes, \f$\theta^2 <\f$ scale. (In all cases relations are
+ * approximate.)
+ */
inline int respectScale() const;
- // Use the scale variable of original partons to restrict
- // branchings. = 0: no; = 1: yes, the Q2 < scale; = 2: yes, the pT2
- // < scale, = 3: yes, the (E*theta)^2 < scale; = 4: yes, the theta^2
- // < scale. (In all cases relations are approximate.)
+ /**
+ * Parton shower cut-off mass for QCD emissions.
+ */
inline Energy Q0() const;
- // Parton shower cut-off mass for QCD emissions.
+ /**
+ * Parton shower cut-off mass for photon coupling to coloured particle.
+ */
inline Energy Q0ChgQ() const;
- // Parton shower cut-off mass for photon coupling to coloured particle.
+ /**
+ * Parton shower cut-off mass for pure QED branchings. Assumed <= Q0CHGQ.
+ */
inline Energy Q0ChgL() const;
- // Parton shower cut-off mass for pure QED branchings. Assumed <= Q0CHGQ.
+ /**
+ * Fixed alpha_strong value for AlphaSMode == 0.
+ */
inline double alphaSFix() const;
- // Fixed alpha_strong value for AlphaSMode == 0.
+ /**
+ * \f$\Lambda_{\mbox{QCD}}\f$ (five flavours) in alpha_strong for
+ * AlphaSMode >= 1.
+ */
inline Energy Lambda5() const;
- // Lambda_QCD(five flavours) in alpha_strong for AlphaSMode >= 1.
+ /**
+ * Fixed \f$\alpha_{\mbox{EM}}\f$ value.
+ */
inline double alphaEMFix() const;
- // Fixed alpha_EM value.
+ /**
+ * Fraction of Q0 cut-off mass used as safety margin in
+ * daughter mass sum. Relevant for total parton multiplicity.
+ */
inline double Q0FracPS() const;
- // Fraction of Q0 cut-off mass used as safety margin in
- // daughter mass sum. Relevant for total parton multiplicity.
public:
- void persistentOutput(PersistentOStream &) const;
- void persistentInput(PersistentIStream &, int);
- // Standard functions for writing and reading from persistent streams.
+ /** @name Functions used by the persistent I/O system. */
+ //@{
+ /**
+ * Function used to write out object persistently.
+ * @param os the persistent output stream written to.
+ */
+ void persistentOutput(PersistentOStream & os) const;
+
+ /**
+ * Function used to read in object persistently.
+ * @param is the persistent input stream read from.
+ * @param version the version number of the object when written.
+ */
+ void persistentInput(PersistentIStream & is, int version);
+ //@}
+
+ /**
+ * Standard Init function used to initialize the interfaces.
+ */
static void Init();
- // Standard Init function used to initialize the interfaces.
protected:
- inline virtual IBPtr clone() const;
- inline virtual IBPtr fullclone() const;
- // Standard clone methods.
protected:
+ /** @name Clone Methods. */
+ //@{
+ /**
+ * Make a simple clone of this object.
+ * @return a pointer to the new object.
+ */
+ inline virtual IBPtr clone() const;
+
+ /** Make a clone of this object, possibly modifying the cloned object
+ * to make it sane.
+ * @return a pointer to the new object.
+ */
+ inline virtual IBPtr fullclone() const;
+ //@}
+
+protected:
+
+
+protected:
+
+ /** @name Standard Interfaced functions. */
+ //@{
+ /**
+ * Check sanity of the object during the setup phase.
+ */
inline virtual void doupdate() throw(UpdateException);
+
+ /**
+ * Initialize this object after the setup phase before saving and
+ * EventGenerator to disk.
+ * @throws InitException if object could not be initialized properly.
+ */
inline virtual void doinit() throw(InitException);
+
+ /**
+ * Initialize this object. Called in the run phase just before
+ * a run begins.
+ */
inline virtual void doinitrun();
+
+ /**
+ * Finalize this object. Called in the run phase just after a
+ * run has ended. Used eg. to write out statistics.
+ */
inline virtual void dofinish();
- // Standard Interfaced virtual functions.
+ /**
+ * Rebind pointer to other Interfaced objects. Called in the setup phase
+ * after all objects used in an EventGenerator has been cloned so that
+ * the pointers will refer to the cloned objects afterwards.
+ * @param trans a TranslationMap relating the original objects to
+ * their respective clones.
+ * @throws RebindException if no cloned object was found for a given
+ * pointer.
+ */
inline virtual void rebind(const TranslationMap & trans)
throw(RebindException);
- // Change all pointers to Interfaced objects to corresponding clones.
+ /**
+ * Return a vector of all pointers to Interfaced objects used in this
+ * object.
+ * @return a vector of pointers.
+ */
inline virtual IVector getReferences();
- // Return pointers to all Interfaced objects refered to by this.
+ //@}
private:
+ /**
+ * The object implementing the actual model.
+ */
Shower::TimeShower * theShowerModel;
- // The object implementing the actual model.
+ /**
+ * Angular ordering; = 0: off, = 1: on for g emission, = 2: on also
+ * for g -> q qbar splitting.
+ */
int theAngularOrdering;
- // Angular ordering; = 0: off, = 1: on for g emission, = 2: on also
- // for g -> q qbar splitting.
+
+ /**
+ * Number of allowed quark flavours in g -> q qbar branching.
+ */
int theNQuark;
- // Number of allowed quark flavours in g -> q qbar branching.
+
+ /**
+ * Running of alpha_strong in evolution: = 0: fixed; = 1: scale
+ * Q^2/4; = 2: scale pT^2; = 3: scale pT2, except for g -> q qbar,
+ * where it is Q^2/4 .
+ */
int theAlphaSMode;
- // Running of alpha_strong in evolution: = 0: fixed; = 1: scale
- // Q^2/4; = 2: scale pT^2; = 3: scale pT2, except for g -> q qbar,
- // where it is Q^2/4 .
+
+ /**
+ * Also allow a QED shower together with QCD ones: = 0: no; = 1:
+ * radiate on-shell photons; = 2 : also allow photons to branch.
+ */
int theMEMode;
- // Also allow a QED shower together with QCD ones: = 0: no; = 1:
- // radiate on-shell photons; = 2 : also allow photons to branch.
+
+ /**
+ * Also allow a QED shower together with QCD ones: = 0: no;
+ * = 1: radiate on-shell photons; = 2 : also allow photons to branch.
+ */
int theQEDShower;
- // Also allow a QED shower together with QCD ones: = 0: no;
- // = 1: radiate on-shell photons; = 2 : also allow photons to branch.
+
+ /**
+ * Restrict first emission within cone given by colour flow in hard
+ * process. = 0: no; = 1: yes, isotropic phi angle inside cone; =
+ * 2: yes, also with anisotropic phi angle inside cone.
+ */
int theInitialCone;
- // Restrict first emission within cone given by colour flow in hard
- // process. = 0: no; = 1: yes, isotropic phi angle inside cone; =
- // 2: yes, also with anisotropic phi angle inside cone.
+
+ /**
+ * Azimuthal asymmetry induced by gluon polarization.
+ * = 0: no; = 1: yes.
+ */
int thePhiPolAsym;
- // Azimuthal asymmetry induced by gluon polarization.
- // = 0: no; = 1: yes.
+
+ /**
+ * Azimuthal asymmetry induced by colour coherence.
+ * = 0: no; = 1: yes.
+ */
int thePhiCoherAsym;
- // Azimuthal asymmetry induced by colour coherence.
- // = 0: no; = 1: yes.
+
+ /**
+ * Use the scale variable of original partons to restrict
+ * branchings. = 0: no; = 1: yes, the Q2 < scale; = 2: yes, the pT2
+ * < scale, = 3: yes, the (E*theta)^2 < scale; = 4: yes, the theta^2
+ * < scale. (In all cases relations are approximate.)
+ */
int theRespectScale;
- // Use the scale variable of original partons to restrict
- // branchings. = 0: no; = 1: yes, the Q2 < scale; = 2: yes, the pT2
- // < scale, = 3: yes, the (E*theta)^2 < scale; = 4: yes, the theta^2
- // < scale. (In all cases relations are approximate.)
+
+ /**
+ * Parton shower cut-off mass for QCD emissions.
+ */
Energy theQ0;
- // Parton shower cut-off mass for QCD emissions.
+
+ /**
+ * Parton shower cut-off mass for photon coupling to coloured particle.
+ */
Energy theQ0ChgQ;
- // Parton shower cut-off mass for photon coupling to coloured particle.
+
+ /**
+ * Parton shower cut-off mass for pure QED branchings. Assumed <= Q0CHGQ.
+ */
Energy theQ0ChgL;
- // Parton shower cut-off mass for pure QED branchings. Assumed <= Q0CHGQ.
+
+ /**
+ * Fixed alpha_strong value for AlphaSMode == 0.
+ */
double theAlphaSFix;
- // Fixed alpha_strong value for AlphaSMode == 0.
+
+ /**
+ * Lambda_QCD(five flavours) in alpha_strong for AlphaSMode >= 1.
+ */
Energy theLambda5;
- // Lambda_QCD(five flavours) in alpha_strong for AlphaSMode >= 1.
+
+ /**
+ * Fixed alpha_EM value.
+ */
double theAlphaEMFix;
- // Fixed alpha_EM value.
+
+ /**
+ * Fraction of Q0 cut-off mass used as safety margin in
+ * daughter mass sum. Relevant for total parton multiplicity.
+ */
double theQ0FracPS;
- // Fraction of Q0 cut-off mass used as safety margin in
- // daughter mass sum. Relevant for total parton multiplicity.
+
private:
+ /**
+ * Describe a concrete class with persistent data.
+ */
static ClassDescription<TimeShowerHandler> initTimeShowerHandler;
- // Describe a concrete class with persistent data.
+ /**
+ * Private and non-existent assignment operator.
+ */
TimeShowerHandler & operator=(const TimeShowerHandler &);
- // Private and non-existent assignment operator.
};
}
-// CLASSDOC OFF
namespace ThePEG {
-// The following template specialization informs Pythia7 about the
-// base class of TimeShowerHandler.
+/**
+ * This template specialization informs ThePEG about the base class of
+ * Pythia7::TimeShowerHandler.
+ */
template <>
struct BaseClassTrait<Pythia7::TimeShowerHandler,1>: public ClassTraitsType {
+ /** Typedef of the base class of Pythia7::TimeShowerHandler. */
typedef HandlerBase NthBase;
};
-// The following template specialization informs Pythia7 about the
-// name of this class and the shared object where it is defined.
+/**
+ * This template specialization informs ThePEG about the name of the
+ * Pythia7::TimeShowerHandler class and the shared object where it is
+ * defined.
+ */
template <>
struct ClassTraits<Pythia7::TimeShowerHandler>
: public ClassTraitsBase<Pythia7::TimeShowerHandler> {
+ /** Return the class name. */
static string className() { return "Pythia7::TimeShowerHandler"; }
- // Return the class name.
+ /** Return the name of the shared library be loaded to get access to
+ * the Pythia7::TimeShowerHandler class and every other class it uses
+ * (except the base class). */
static string library() { return "libP7Shower.so"; }
- // Return the name of the shared library to be loaded to get
- // access to this class and every other class it uses
- // (except the base class).
+
};
}
#include "TimeShowerHandler.icc"
#ifndef ThePEG_TEMPLATES_IN_CC_FILE
// #include "TimeShowerHandler.tcc"
#endif
#endif /* PYTHIA7_TimeShowerHandler_H */
diff --git a/src/Makefile b/src/Makefile
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,43 +1,45 @@
.PHONY: save
include ../Config/Makefile.common
SRCDIR = ../../ThePEG
LIBFILES = ../lib/Pythia7Defaults.rpo Pythia7Defaults.in
DISTFILES = Makefile SimpleLEP.in SimpleLHC.in Pythia7Defaults.in
install-local: ../lib/Pythia7Defaults.rpo
check: SimpleLEP.out SimpleLHC.out
+init: ../lib/Pythia7Defaults.rpo
+
SimpleLEP.out: SimpleLEP.run $(SRCDIR)/src/runThePEG.exe
time $(SRCDIR)/src/runThePEG -L../lib -d 0 SimpleLEP.run
SimpleLHC.out: SimpleLHC.run $(SRCDIR)/src/runThePEG.exe
time $(SRCDIR)/src/runThePEG -L../lib -d 1 SimpleLHC.run
%.out: %.run $(SRCDIR)/src/runThePEG.exe
time $(SRCDIR)/src/runThePEG -L../lib -d 1 $<
SimpleLEP.run: SimpleLEP.in ../lib/Pythia7Defaults.rpo $(SRCDIR)/src/setupThePEG.exe
$(SRCDIR)/src/setupThePEG -L../lib -r ../lib/Pythia7Defaults.rpo SimpleLEP.in
SimpleLHC.run: SimpleLHC.in ../lib/Pythia7Defaults.rpo $(SRCDIR)/src/setupThePEG.exe
$(SRCDIR)/src/setupThePEG -L../lib -r ../lib/Pythia7Defaults.rpo SimpleLHC.in
%.run: %.in ../lib/Pythia7Defaults.rpo $(SRCDIR)/src/setupThePEG.exe
$(SRCDIR)/src/setupThePEG -L../lib -r ../lib/Pythia7Defaults.rpo $<
../lib/Pythia7Defaults.rpo: Pythia7Defaults.in $(SRCDIR)/lib/ThePEGDefaults.rpo $(SRCDIR)/src/setupThePEG.exe ../lib/Pythia7Strategy.so ../lib/libP7String.so ../lib/libP7Shower.so
$(SRCDIR)/src/setupThePEG -L../lib -init -r $(SRCDIR)/lib/ThePEGDefaults.rpo -o ../lib/Pythia7Defaults.rpo Pythia7Defaults.in
save:
mkdir -p save
csh -c "cp -f ../lib/Pythia7Defaults.rpo *.out *.log *.run *.dump *.tex save"
distclean:
rm -f *.log *.out *.run *.tex ../lib/Pythia7Defaults.rpo

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 19, 6:05 PM (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3805492
Default Alt Text
(128 KB)

Event Timeline