Page MenuHomeHEPForge

No OneTemporary

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -1,167 +1,171 @@
.*/Makefile
.*/Makefile\.in
.*/\.deps
.*/\.libs
.*/.*\.l[ao]
.*/.*\.so\.*
.*/.*\.o
.*~
.*/done-all-links
lib/AriadneDefaults.rpo
(DIPSY|src)/.*\.(run|tex|out|log|rpo|spc|top|dump|dot|aux|pdf|ps|png|svg|hepmc|dat|aida|rz|eps|root|tuple|gp|exe)
src/done-all-links
autom4te.cache
aclocal.m4
libtool
Makefile
Makefile.in
config.log
config.status
configure
Config/config.h
Config/config.h.in
Config/config.sub
Config/depcomp
Config/install-sh
Config/missing
Config/stamp-h.
Config/config.guess
include/done-all-links
include/Ariadne
DIPSY/NuclearDistribution-1.C
DIPSY/NuclearDistribution.C
DIPSY/plots
FTuneLEP/plots
src/plots
src/.*\.prof
src/3jet.lhe.gz
src/MadGraph_DIS
src/mgdis.in
src/runThePEG
DIPSY/runThePEG
lib/Ariadne5Defaults.rpo
DIPSY/fsswing.txt
DIPSY/rphi.pl
DIPSY1991
DIPSY/mcnetRivetbin
DIPSY/pythia8
DIPSY/exps
DIPSY/temp.*
DIPSY/95
DIPSY/.*\.yoda
src/.*\.yoda
DIPSY/.*\.info
DIPSY/.*\.plot
DIPSY/bugtest.in
DIPSY/PPTune/.*\.prof
DIPSY/PPTune/.*\.weights
DIPSY/PPTune/.*\.prold
DIPSY/PPTune/.*\.prout
DIPSY/PPTune/.*\.prin
src/.*\.prout
src/.*\.prin
DIPSY/PPTune/plots2
# added by aHg on Tue Oct 8 16:20:34 2013
syntax: glob
DIPSY/TestRemnants.in
# added by aHg on Tue Oct 8 16:21:11 2013
syntax: glob
src/MTuneLEP.prof/ipol/profipol_quadratic_a3d80e6417a4670a4a51a4dbc59e222b.pkl
# added by aHg on Tue Nov 5 17:09:03 2013
syntax: glob
src/used_params
# added by aHg on Tue Nov 26 09:38:47 2013
syntax: glob
DIPSY/dummy.pl
# added by aHg on Fri Feb 7 15:50:55 2014
syntax: glob
DIPSY/PPTune.in
# added by aHg on Fri Feb 7 15:51:31 2014
syntax: glob
DIPSY/PPTune/PPTune.in
# added by aHg on Fri Feb 7 15:51:42 2014
syntax: glob
DIPSY/PPTune/runThePEG
# added by aHg on Thu Feb 13 15:30:42 2014
syntax: glob
DIPSY/PPTune/plots
# added by aHg on Thu Feb 13 15:31:13 2014
syntax: glob
lib/DIPSYDefaults.rpo
# added by aHg on Thu Feb 13 15:31:23 2014
syntax: glob
DIPSY/PPTune/refs/refs
# added by aHg on Mon Mar 24 12:09:16 2014
syntax: glob
DIPSY/PPTune/dummy.in
# added by aHg on Mon Mar 24 12:09:57 2014
syntax: glob
DIPSY/RHICAuAuCBorig.in
# added by aHg on Mon Mar 24 12:10:24 2014
syntax: glob
DIPSY/RHICAuAuCB.in
# added by aHg on Mon Mar 24 12:10:37 2014
syntax: glob
DIPSY/PPTune/MC_MYFB.cc
# added by aHg on Tue May 20 12:01:05 2014
syntax: glob
DIPSY/testrebind.in
# added by aHg on Tue Jun 24 10:20:44 2014
syntax: glob
DIPSY/PPTune/ratio.txt
# added by aHg on Tue Jun 24 10:21:04 2014
syntax: glob
src/ratio.txt
# added by aHg on Fri Jun 27 14:15:27 2014
syntax: glob
DIPSY/PPTune/test.in
# added by aHg on Fri Aug 29 15:09:08 2014
syntax: glob
DIPSY/CBDebug.in
# added by aHg on Tue Dec 2 11:03:02 2014
syntax: glob
DIPSY/#glauber.txt#
# added by aHg on Tue Oct 13 09:11:34 2015
syntax: glob
src/FTuneLEP/Ariadne5Defaults.in
# added by aHg on Tue Oct 13 09:11:49 2015
syntax: glob
src/FTuneLEP/Ariadne5Remove.in
# added by aHg on Tue Oct 13 09:11:58 2015
syntax: glob
src/FTuneLEP/TestAriadne5.in
# added by aHg on Tue Oct 13 09:12:04 2015
syntax: glob
src/FTuneLEP/TestAriadne5DIS.in
# added by aHg on Tue Oct 13 09:12:09 2015
syntax: glob
src/FTuneLEP/TestAriadne5Z0.in
# added by aHg on Tue Oct 13 09:15:48 2015
syntax: glob
src/FTuneLEP/runThePEG
+
+# added by aHg on Tue Dec 1 22:51:13 2015
+syntax: glob
+include/C:\\nppdf32Log\\debuglog.txt
diff --git a/Config/ColourInfo.cc b/Config/ColourInfo.cc
--- a/Config/ColourInfo.cc
+++ b/Config/ColourInfo.cc
@@ -1,61 +1,57 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the ColourInfo class.
//
#include "ColourInfo.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Ariadne5;
ColourInfo::~ColourInfo() {}
int ColourInfo::colIndex(const Particle & p) {
- for ( int i = 0, N = p.getInfo().size(); i < N; ++i )
- if ( const ColourInfo * cin =
- dynamic_cast<const ColourInfo *>(p.getInfo()[i].operator->()) )
- return cin->indices().first;
+ if ( const ColourInfo * cin = get<ColourInfo>(p) )
+ return cin->indices().first;
return 0;
}
int ColourInfo::acoIndex(const Particle & p) {
- for ( int i = 0, N = p.getInfo().size(); i < N; ++i )
- if ( const ColourInfo * cin =
- dynamic_cast<const ColourInfo *>(p.getInfo()[i].operator->()) )
- return cin->indices().second;
+ if ( const ColourInfo * cin = get<ColourInfo>(p) )
+ return cin->indices().second;
return 0;
}
void ColourInfo::persistentOutput(PersistentOStream & os) const {
os << theIndices;
}
void ColourInfo::persistentInput(PersistentIStream & is, int) {
is >> theIndices;
}
// *** Attention *** The following static variable is needed for the type
// description system in ThePEG. Please check that the template arguments
// are correct (the class and its base class), and that the constructor
// arguments are correct (the class name and the name of the dynamically
// loadable library where the class implementation can be found).
DescribeClass<ColourInfo,ThePEG::EventInfoBase>
describeAriadne5ColourInfo("Ariadne5::ColourInfo", "libAriadne5.so");
void ColourInfo::Init() {
static ClassDocumentation<ColourInfo> documentation
("There is no documentation for the ColourInfo class");
}
diff --git a/Config/ColourInfo.h b/Config/ColourInfo.h
--- a/Config/ColourInfo.h
+++ b/Config/ColourInfo.h
@@ -1,103 +1,124 @@
// -*- C++ -*-
#ifndef Ariadne5_ColourInfo_H
#define Ariadne5_ColourInfo_H
//
// This is the declaration of the ColourInfo class which is used to
// convey colour indices of connecting dipoles for coloured particles.
//
#include "ThePEG/EventRecord/EventInfoBase.h"
#include "ThePEG/EventRecord/Particle.h"
namespace Ariadne5 {
using namespace ThePEG;
/**
* Here is the documentation of the ColourInfo class.
*/
class ColourInfo: public ThePEG::EventInfoBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor, optionally taking indices on the colour
* and anticolour side as arguments.
*/
ColourInfo(unsigned colindx = 0, unsigned acoindx = 0): theIndices(colindx, acoindx) {}
/**
* The destructor.
*/
virtual ~ColourInfo();
//@}
public:
/**
+ * Set the colour indices of connecting dipoles on the colour and
+ * anti-colour side.
+ */
+ void indices(pair<unsigned,unsigned> indxs) {
+ theIndices = indxs;
+ }
+
+ /**
* Return the colour indices of connecting dipoles on the colour and
* anti-colour side.
*/
pair<unsigned,unsigned> indices() const {
return theIndices;
}
/**
* Return the colour index of a dipole connecting the given
* particle's colour. If no ColourInfo is present or no index
* is defined, return -1.
*/
static int colIndex(const Particle & p);
/**
* Return the colour index of a dipole connecting the given
* particle's anti colour. If no ColourInfo is present or no index
* is defined, return -1.
*/
static int acoIndex(const Particle & p);
/** @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);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
+ /**
+ * Return a possible EventInfoBase object in a particle.
+ */
+ template <typename EI>
+ static typename ThePEG::Ptr<EI>::transient_const_pointer
+ get(const Particle & particle) {
+ typedef typename ThePEG::Ptr<EI>::transient_const_pointer eiptr;
+ for ( int i = 0, N = particle.getInfo().size(); i < N; ++i )
+ if ( eiptr ei = dynamic_ptr_cast<eiptr>(particle.getInfo()[i]) )
+ return ei;
+ return eiptr();
+ }
+
private:
/**
* The colour indices of connecting dipoles on the colour and
* anti-colour side.
*/
pair<unsigned,unsigned> theIndices;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
ColourInfo & operator=(const ColourInfo &);
};
}
#endif /* Ariadne5_ColourInfo_H */
diff --git a/DIPSY/FSDipole5Ordering.cc b/DIPSY/FSDipole5Ordering.cc
--- a/DIPSY/FSDipole5Ordering.cc
+++ b/DIPSY/FSDipole5Ordering.cc
@@ -1,203 +1,216 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the FSDipole5Ordering class.
//
#include "FSDipole5Ordering.h"
#include "Ariadne/Cascade/AriadneHandler.h"
#include "Ariadne/Cascade/Parton.h"
#include "Ariadne/Cascade/DipoleState.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Utilities/UtilityBase.h"
#include "ThePEG/Utilities/Current.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/Parameter.h"
-
+#include "Ariadne/DIPSY/ParticleInfo.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace DIPSY;
FSDipole5Ordering::FSDipole5Ordering()
- : ReweightBase(true), isGenerous(0), useOnlyOriginal(false), f(1.0),
+ : ReweightBase(true), isGenerous(0), useOnlyOriginal(0), f(1.0),
ptmin(ZERO), hardSuppression(0), fudge(1.0) {}
FSDipole5Ordering::~FSDipole5Ordering() {}
bool FSDipole5Ordering::
finalVeto(const Emission & emission) const {
if ( emission.rho < ptmin || emission.partons.empty() ) return false;
pair<tcParPtr,tcParPtr> parents =
make_pair(emission.colourParent, emission.antiColourParent);
if ( hardSuppression ) {
LorentzRotation Rcm = Utilities::getBoostToCM(emission.pold);
double alpha = ( hardSuppression == 1? Current<AriadneHandler>()->hardAlpha():
Current<AriadneHandler>()->softAlpha());
double beta = Current<AriadneHandler>()->beta();
Energy W = (emission.pold.first + emission.pold.second).m();
double frac =
(fudge*emission.rho*(Rcm*(parents.first->vertex() - parents.second->vertex())).perp())/hbarc;
double fmax = pow(1.0 - (Rcm*parents.first->momentum()).plus()/W, -1.0/alpha);
if ( frac > fmax && pow(fmax/frac, beta) < UseRandom::rnd() ) return true;
fmax = pow(1.0 - (Rcm*parents.first->momentum()).minus()/W, -1.0/alpha);
if ( frac > fmax && pow(fmax/frac, beta) < UseRandom::rnd() ) return true;
}
bool o1 = parents.first->orig();
bool o3 = parents.second->orig();
while ( !parents.first->orig() )
parents.first = parents.first->emission()->colourParent;
while ( !parents.second->orig() )
parents.second = parents.second->emission()->antiColourParent;
LorentzMomentum p1 = parents.first->orig()->momentum();
LorentzMomentum p3 = parents.second->orig()->momentum();
for ( int i = 0, N = emission.partons.size(); i < N; ++i ) {
tcParPtr parton = emission.partons[i];
LorentzMomentum p2 = parton->momentum();
if ( useOnlyOriginal ) {
- if ( !o1 && !o3 ) return false;
+ if ( !o1 && !o3 ) continue;
if ( o1 && ( p2.perp2() > f*p1.perp2() ||
p2.plus() > f*p1.plus() ||
p2.minus() > f*p1.minus() ) ) return true;
if ( o3 && ( p2.perp2() > f*p3.perp2() ||
p2.plus() > f*p3.plus() ||
p2.minus() > f*p3.minus() ) ) return true;
- if ( o1 || o3 ) return false;
+ if ( o1 || o3 ) continue;
}
Energy2 pt2cut = min(p1.perp2(), p3.perp2());
if ( isGenerous > 0 ) pt2cut = sqrt(p1.perp2()*p3.perp2());
if ( isGenerous < 0 ) pt2cut = ZERO;
+ if ( useOnlyOriginal > 1 ) {
+ pt2cut = ZERO;
+ if ( tcPartonPtr p = ParticleInfo::getParton(*parents.first->orig()) )
+ pt2cut = p->colPropagator();
+ if ( tcPartonPtr p = ParticleInfo::getParton(*parents.second->orig()) )
+ pt2cut = max(pt2cut, p->acoPropagator());
+ }
if ( p2.perp2() < f*pt2cut ) return false;
- if ( p2.plus() < f*p1.plus() && p2.minus() < f*p1.minus() ) return false;
- if ( p2.plus() < f*p3.plus() && p2.minus() < f*p3.minus() ) return false;
+ if ( p2.plus() < f*p1.plus() && p2.minus() < f*p1.minus() ) continue;
+ if ( p2.plus() < f*p3.plus() && p2.minus() < f*p3.minus() ) continue;
+ return true;
}
- return true;
+ return false;
}
IBPtr FSDipole5Ordering::clone() const {
return new_ptr(*this);
}
IBPtr FSDipole5Ordering::fullclone() const {
return new_ptr(*this);
}
// If needed, insert default implementations of virtual function defined
// in the InterfacedBase class here (using ThePEG-interfaced-impl in Emacs).
void FSDipole5Ordering::persistentOutput(PersistentOStream & os) const {
os << isGenerous << useOnlyOriginal << f << ounit(ptmin, GeV) << hardSuppression << fudge;
}
void FSDipole5Ordering::persistentInput(PersistentIStream & is, int) {
is >> isGenerous >> useOnlyOriginal >> f >> iunit(ptmin, GeV) >> hardSuppression >> fudge;
}
DescribeClass<FSDipole5Ordering,Ariadne5::ReweightBase>
describeDIPSYFSDipole5Ordering("DIPSY::FSDipole5Ordering",
"FSDipole5Ordering.so");
void FSDipole5Ordering::Init() {
static ClassDocumentation<FSDipole5Ordering> documentation
("There is no documentation for the FSDipole5Ordering class");
static Switch<FSDipole5Ordering,int> interfaceGenerous
("Generous",
"Determines whether the phase space constraints for new emissions is "
"relaxed from the minimum of the transverse momenta of the emittors to "
"the geometric mean. Alternatively the phase space can be more "
"constrained giving pure light-cone momentum ordering.",
&FSDipole5Ordering::isGenerous, 0, true, false);
static SwitchOption interfaceGenerousNormal
(interfaceGenerous,
"Normal",
"The transverse momentum of a gluon is restricted to be less than any "
"of its mothers, if outside their light-cone triangle.",
0);
static SwitchOption interfaceGenerousGenerous
(interfaceGenerous,
"Generous",
"The transverse momentum of a gluon is restricted to be less than the "
"geometrical mean of that of its original parents, if outside their "
"light-cone triangle.",
1);
static SwitchOption interfaceGenerousRestrictive
(interfaceGenerous,
"Restrictive",
"No gluons are allowed outside the light-cone triangle of the "
"original parents.",
-1);
- static Switch<FSDipole5Ordering,bool> interfaceOnlyOriginal
+ static Switch<FSDipole5Ordering,int> interfaceOnlyOriginal
("OnlyOriginal",
"Determines whether all emissions are restricted by the kinematics of "
"the original partons, or only those where original partons are involved",
- &FSDipole5Ordering::useOnlyOriginal, false, true, false);
+ &FSDipole5Ordering::useOnlyOriginal, 0, true, false);
static SwitchOption interfaceOnlyOriginalAllEmissions
(interfaceOnlyOriginal,
"AllEmissions",
"All emissions are restricted by the kinematics of the original partons.",
- false);
+ 0);
static SwitchOption interfaceOnlyOriginalOnlyOriginalEmissions
(interfaceOnlyOriginal,
"OnlyOriginalEmissions",
"Emissions are restricted by the kinematics of the original partons only "
"if original partons are involved in the emission.",
- true);
-
+ 1);
+ static SwitchOption interfaceOnlyOriginalOriginalPropagators
+ (interfaceOnlyOriginal,
+ "OriginalPropagators",
+ "Emissions are restricted by the kinematics of the original partons and "
+ "their connecting propagators.",
+ 2);
static Parameter<FSDipole5Ordering,double> interfaceFudge
("Fudge",
"Fudge parameter to allow less strict ordering if larger than unity.",
&FSDipole5Ordering::f, 1.0, 0.0, 2.0,
true, false, Interface::limited);
static Parameter<FSDipole5Ordering,Energy> interfacePTMin
("PTMin",
"Limit on invariant transverse momentum. Any emission below this is "
"not checked.",
&FSDipole5Ordering::ptmin, GeV, 0.0*GeV, 0.0*GeV, 0*GeV,
true, false, Interface::lowerlim);
static Switch<FSDipole5Ordering,int> interfaceHardSuppression
("HardSuppression",
"Options for suppression of hard emissions due to the distance between the partons in the radiating dipole.",
&FSDipole5Ordering::hardSuppression, 0, true, false);
static SwitchOption interfaceHardSuppressionOff
(interfaceHardSuppression,
"Off",
"No suppression.",
0);
static SwitchOption interfaceHardSuppressionSuppression
(interfaceHardSuppression,
"HardParameters",
"Suppression using the parameters for hard remnants in the soft radiation model.",
1);
static SwitchOption interfaceHardSuppressionSoftParameters
(interfaceHardSuppression,
"SoftParameters",
"Suppression using the parameters for soft remnants in the soft radiation model.",
2);
static Parameter<FSDipole5Ordering,double> interfaceHardFudge
("HardFudge",
"Fudge factor multiplying transverse momentum of an emission when calculating hard suppression.",
&FSDipole5Ordering::fudge, 1.0, 0.0, 0,
true, false, Interface::lowerlim);
}
diff --git a/DIPSY/FSDipole5Ordering.h b/DIPSY/FSDipole5Ordering.h
--- a/DIPSY/FSDipole5Ordering.h
+++ b/DIPSY/FSDipole5Ordering.h
@@ -1,143 +1,143 @@
// -*- C++ -*-
#ifndef DIPSY_FSDipole5Ordering_H
#define DIPSY_FSDipole5Ordering_H
//
// This is the declaration of the FSDipole5Ordering class.
//
#include "Ariadne/Cascade/ReweightBase.h"
namespace DIPSY {
using namespace Ariadne5;
/**
* Here is the documentation of the FSDipole5Ordering class.
*
* @see \ref FSDipole5OrderingInterfaces "The interfaces"
* defined for FSDipole5Ordering.
*/
class FSDipole5Ordering: public Ariadne5::ReweightBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FSDipole5Ordering();
/**
* The destructor.
*/
virtual ~FSDipole5Ordering();
//@}
public:
/**
* In addition to the reweight function a final hit/miss veto may be
* given after the \a emission has been performed. Will only be
* called if hasFinalVeto() returns true.
*/
virtual bool finalVeto(const Emission & emission) const;
public:
/** @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);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
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.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* If positive, the phase space restriction on final-state emissions
* is somewhat relaxed. If negative the phase space is strict and
* only given by light-cone momentum non-ordering.
*/
int isGenerous;
/**
* Veto only emissions from original partons.
*/
- bool useOnlyOriginal;
+ int useOnlyOriginal;
/**
* Fudge factor for +/- ordering. Values above one increases the
* phase space.
*/
double f;
/**
* Limit on invariant transverse momentum. Any emission below this
* is not checked.
*/
Energy ptmin;
/**
* Option for suppression of hard radiation if partons in the dipole
* are far separated.
*/
int hardSuppression;
/**
* Fudge factor to scale the fraction of light-cone momentum
* available for radiation.
*/
double fudge;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
FSDipole5Ordering & operator=(const FSDipole5Ordering &);
};
}
#endif /* DIPSY_FSDipoleOrdering_H */
diff --git a/DIPSY/PPTune/PPTune.inc b/DIPSY/PPTune/PPTune.inc
--- a/DIPSY/PPTune/PPTune.inc
+++ b/DIPSY/PPTune/PPTune.inc
@@ -1,810 +1,814 @@
# -*- eval: (ThePEG-repository-mode) -*-
# HOW TO TUNE
#
# We need to generate a number of yoda files for different energies
# different observables and different parameter settings. This can be
# done in an semi-automated way.
#
# For the total and elastic cross sections we do not need to generate
# final states and these runs can in principle be done once and for
# all. In fact running PP16XSECYM??.run (generated in the SAVERUNYM
# just after the line "# 16 inclusive observables" below) will produce
# all necessary data.
#
# This input file is (to make a gross understatement) a terrible
# mess. It needs to beprocessed by the script ./expand.pl before going
# to setupThePEG and it will produce an awfull amount of .run
# files. However doing eg.
# > make blaha
# in this directory yo will only produce the .run files matching "blaha".
#
# For the final state you have to run the files generated after the
# line "# 16 final state observables" below. You will have one run per
# energy in PP16XSECYM@??.run (where @ is some arbitrary letter used
# to differentiate between settings). The 7TeV will take quite a while
# so it is best to divide it up in smaller runs. Using the scripts
# "sub" and "runtag" in ~leif/bin you can start the programs as
# follows:
#
# > sub runtag ./runThePEG, PP16XSECYM@02, PP16XSECYM@09,
# PP16XSECYM@71_61-80, PP16XSECYM@71_41-60,
# PP16XSECYM@71_21-40, PP16XSECYM@71_1-20
# PP16XSECYM@71_81-100
#
# After these runs are done you can start the actual tuning with
# professor. First you need to copy the relevant files from the
# inclusive runs to match the names of the final states runs as
# follows:
# > cp PP16XSECYM01.log PP16XSECYM@01.log
# > cp PP16XSECYM05.log PP16XSECYM@05.log
# > cp PP16XSECYM18.log PP16XSECYM@18.log
# > cp PP16XSECYM70.log PP16XSECYM@70.log
# then run the mkprof.pl script as follows to get a "global" tune
#
# > ./mkprof.pl -t -w PPTuneFS00.weights -o PP16XSECYM@00.prof PP16XSECYM@
# preferably redirecting both stdout and stderr to some file (there
# will be a lot of output). Similarly
# > ./mkprof.pl -t -w PPTuneFS70.weights -o PP16XSECYM@70.prof PP16XSECYM@
# will give the tune restricting the final state data to 7TeV, and
# changing all "70" to "09" or "02" will give 900 GeV or 200 GeV to
# look at the result check the file
# PP16XSECYM@00.prof/tunes/results.pkl or use the following script
# > ./profsum.pl PP16XSECYM@00.prof/tunes/results.pkl
# To get just a summary.
#
# After the line "# 16 pipeing the tunes" below you can then pipe the
# different tunes, just set the parameters according to the fit, do
# > make PPT16XSECYM@
# and run eg.
# > sub runtag ./runThePEG, PPT16XSECYM@02, PPT16XSECYM@09, PPT16XSECYM@71,
# PPT16XSECYM@0202, PPT16XSECYM@0909, PPT16XSECYM@7170
#
#
#
#
cd /DIPSY
## First we setup some previously tuned tuned parameters
#read CurrentTune.in
read ../Tune31.in
## Now we set up an event generator.
cp EventHandler PPEventHandler
set stdProton:R0 0.0
set stdAntiProton:R0 0.0
set Proton:R0 0.0
set AntiProton:R0 0.0
set PPEventHandler:WFL stdProton
set PPEventHandler:WFR stdProton
set PPEventHandler:ConsistencyLevel 1
set PPEventHandler:XSecFn:CheckOffShell false
set PPEventHandler:CascadeHandler AriadneCascade
set PPEventHandler:HadronizationHandler Frag8
set PPEventHandler:DecayHandler /Defaults/Handlers/StandardDecayHandler
create ThePEG::FixedCMSLuminosity PPLumi
set PPEventHandler:LuminosityFunction PPLumi
cp Generator PPGenerator
erase PPGenerator:AnalysisHandlers[0]
set PPGenerator:HistogramFactory NULL
set PPGenerator:EventHandler PPEventHandler
set PPEventHandler:BGen:Width 5
set PPEventHandler:WFL Proton
set PPEventHandler:WFR Proton
set PPEventHandler:EventFiller:SoftRemove NoValence
set PPEventHandler:FudgeME 1
set PPEventHandler:EventFiller:PTCut 1.0
set FSOrdering:PTMin 1.0
set PPEventHandler:Emitter:PSInflation 1.0
set PPEventHandler:Swinger:Lambda 1.0
set PPEventHandler:EffectivePartonMode Colours
set PPEventHandler:CoherenceRange 2.5
## These are the analysess we will run
## Some semi-inclusive cross section for DIPSY which need at least
## four combinations of left- and right-moving cascades.
erase PPEventHandler:AnalysisHandlers[0]
erase PPEventHandler:AnalysisHandlers[0]
create DIPSY::SemiInclusiveXSecAnalysis SemiIncl SemiInclusiveXSecAnalysis.so
insert PPEventHandler:AnalysisHandlers[0] SemiIncl
set PPEventHandler:PreSampleL 2
set PPEventHandler:PreSampleR 2
## This is just to keep track of the progress of a run
create DIPSY::AnalysisProgress AnaLog AnalysisProgress.so
set AnaLog:Interval 600
insert PPEventHandler:AnalysisHandlers[0] AnaLog
## The sample rates need to be adjusted so that we get a reasonable
## statistics in a reasonable time. It is typically efficient to
## sample a number of impact parameter values for each pair of DIPSY
## cascades.
set PPEventHandler:PreSampleB 1
## We need the same set of parameters for all different energies, so
## we use a separate random generator.
cp /Defaults/Random RandomArg
set PPGenerator:SeparateRandom RandomArg
## These are the parameters we want to tune
## Now we want to run for all energies and two values for YFrametest
set Frag8:Collapser /Ariadne5/Defaults/Collapser
# This is the fragmentation parameters tuned without rope and with swing at LEP
# ../../src/FTuneSwLEP01.prin
set Frag8:FragmentationScheme none
set Frag8:StringZ_aLund 0.42
set Frag8:StringZ_bLund 0.40
set Frag8:StringPT_sigma 0.32
set Frag8:StringFlav_probQQtoQ 0.084
set Frag8:StringFlav_probStoUD 0.22
# This is the fragmentation parameters tuned without rope and swing at LEP
# ../../src/FTuneLEP01.prin
cp Frag8 Frag8Sw0
set Frag8Sw0:StringZ_aLund 0.30
set Frag8Sw0:StringZ_bLund 0.36
set Frag8Sw0:StringPT_sigma 0.32
set Frag8Sw0:StringFlav_probQQtoQ 0.082
set Frag8Sw0:StringFlav_probStoUD 0.22
# TEST fragmentation parameters tuned at LEP without rope and swing with MaxRho = 1
# ../../src/FTuneswLEP03.prin
cp Frag8 Frag8Sw2
set Frag8Sw2:StringZ_aLund 0.45
set Frag8Sw2:StringZ_bLund 0.42
set Frag8Sw2:StringPT_sigma 0.32
set Frag8Sw2:StringFlav_probQQtoQ 0.085
set Frag8Sw2:StringFlav_probStoUD 0.22
# This is the fragmentation parameters tuned to rope and default swing at LEP
# ../../src/FTuneSwLEP07.prin
cp Frag8 Frag8Rope
set Frag8Rope:FragmentationScheme dipole
set Frag8Rope:StringR0 1.0
set Frag8Rope:Stringm0 0.2
set Frag8Rope:Average false
set Frag8Rope:ThrowAway true
set Frag8Rope:BaryonSuppression 0.25
set Frag8Rope:StringZ_aLund 0.41
set Frag8Rope:StringZ_bLund 0.37
set Frag8Rope:StringPT_sigma 0.31
set Frag8Rope:StringFlav_probQQtoQ 0.073
set Frag8Rope:StringFlav_probStoUD 0.21
cp AriadneCascade AriadneNoSwing
erase AriadneNoSwing:Emitters[0]
set PPGenerator:EventHandler:PreSamples 0
set PPGenerator:EventHandler:YFrametest 0.5
set /DIPSY/PPEventHandler:BaryonSize 0.0
set FSSwinger:SetRmax -2.7
set FSSwinger:MaxRho -2.0
create ThePEG::ProgressLog Logger ProgressLog.so
set Logger:Interval 600
create ThePEG::RivetAnalysis RivetTune RivetAnalysis.so
insert RivetTune:Paths[0] .
insert RivetTune:Analyses[0] ATLAS_2010_S8918562
insert RivetTune:Analyses[0] STAR_2008_S7869363
insert RivetTune:Analyses[0] CMS_2011_S8978280
insert RivetTune:Analyses[0] PYTHIA_TUNING
insert PPGenerator:AnalysisHandlers[0] Logger
insert PPGenerator:AnalysisHandlers[0] RivetTune
set PPGenerator:EventHandler:LuminosityFunction:Energy 7000
set PPGenerator:DumpPeriod 0
cp PPGenerator PPTestTune
set PPGenerator:NumberOfEvents 10000
set PPTestTune:NumberOfEvents 100000
create ThePEG::LWHFactory LWHFactory LWHFactory.so
set LWHFactory:Suffix dat
set LWHFactory:StoreType flat
set PPTestTune:HistogramFactory LWHFactory
create DIPSY::PTAnalysis PTAnalysis PTAnalysis.so
insert PPTestTune:AnalysisHandlers[0] PTAnalysis
do PPGenerator:AddRndInterface /DIPSY/PPEventHandler:RMax 100 1.0 5.0 2.9 0.6
do PPGenerator:AddRndInterface /DIPSY/PPEventHandler:LambdaQCD 1 0.10 0.3 0.22 0.04
do PPGenerator:AddRndInterface /DIPSY/PPEventHandler:Emitter:PTScale 1 0.5 2.5 1.4 0.5
do PPGenerator:AddRndInterface /DIPSY/PPEventHandler:Emitter:PMinusOrdering 1 0.5 2.0 1.0 0.2
cp PPGenerator PPXSecGenerator
erase PPXSecGenerator:AnalysisHandlers[0]
erase PPXSecGenerator:AnalysisHandlers[0]
create ThePEG::Settings OnlyXSec
do OnlyXSec:set PPXSecGenerator:EventHandler:PreSamples 1000
insert PPXSecGenerator:DefaultObjects[0] OnlyXSec
set PPXSecGenerator:NumberOfEvents 0
cp OnlyXSec AddXSec
insert PPTestTune:DefaultObjects[0] AddXSec
create ThePEG::Settings Default
cp Default NoSwing
cp Default DefRope
do Default:set PPEventHandler:HadronizationHandler Frag8
do Default:set PPEventHandler:CascadeHandler AriadneCascade
do NoSwing:set PPEventHandler:HadronizationHandler Frag8Sw0
do NoSwing:set PPEventHandler:CascadeHandler AriadneNoSwing
do DefRope:set PPEventHandler:HadronizationHandler Frag8Rope
do DefRope:set PPEventHandler:CascadeHandler AriadneCascade
insert PPGenerator:DefaultObjects[0] Default
insert PPXSecGenerator:DefaultObjects[0] Default
insert PPTestTune:DefaultObjects[0] Default
cp Default NewSing
do NewSing:set PPEventHandler:EventFiller:Mode NewSingle
do NewSing:set PPTestTune:EventHandler:EventFiller:OnlyOnce true
do NewSing:set PPEventHandler:FudgeME 2
do NewSing:set PPEventHandler:XSecFn:SinFunction Average
cp Default NewSinF
do NewSinF:set PPEventHandler:XSecFn:SinFunction Average
cp Default NewSinS
do NewSinS:set PPEventHandler:XSecFn:SinFunction Scaled
cp Default EffPRel
do EffPRel:set PPEventHandler:EffectivePartonMode Relatives
cp Default DefaY7F
do DefaY7F:set PPGenerator:EventHandler:YFrametest 0.7
cp DefaY7F Def01Y7
do Def01Y7:set PPEventHandler:Swinger:Lambda 0.1
cp Default DefEven
do DefEven:set PPEventHandler:EventFiller:EffectiveWeights PlusEvenWeighted
cp Default DefSwL4
do DefSwL4:set PPEventHandler:Swinger:Lambda 4.0
cp Default DefSw01
do DefSw01:set PPEventHandler:Swinger:Lambda 0.1
cp Default DefFSGO
do DefFSGO:set FSOrdering:Generous Generous
do DefFSGO:set FSOrdering:OnlyOriginal OnlyOriginalEmissions
cp DefFSGO DefFSG2
do DefFSG2:set FSOrdering:Fudge 1.6
cp Default Shadows
do Shadows:set PPEventHandler:EffectivePartonMode Shadows
cp Default DefSing
do DefSing:set PPEventHandler:FudgeME 2
do DefSing:set PPTestTune:EventHandler:EventFiller:OnlyOnce true
do DefSing:set PPTestTune:EventHandler:EventFiller:SingleMother 1
cp DefSing DefComp
do DefComp:set PPTestTune:EventHandler:EventFiller:CompatMode 1
cp Default Shadow8
do Shadow8:set PPEventHandler:EffectivePartonMode Shadows
do Shadow8:set PPEventHandler:FudgeME 2
do Shadow8:set PPTestTune:EventHandler:EventFiller:OnlyOnce true
do Shadow8:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do Shadow8:set stdEmitter:MinusOrderingMode OrderedShadow
do Shadow8:set stdXSec:IntOrdering ShadowOpen
cp Default Shadow9
do Shadow9:set PPEventHandler:EffectivePartonMode Shadows
do Shadow9:set PPEventHandler:FudgeME 2
do Shadow9:set PPTestTune:EventHandler:EventFiller:OnlyOnce true
do Shadow9:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do Shadow9:set stdEmitter:MinusOrderingMode OrderedShadow
do Shadow9:set stdXSec:IntOrdering ShadowColour
cp Default ShadowA
do ShadowA:set PPEventHandler:EffectivePartonMode Shadows
do ShadowA:set PPEventHandler:FudgeME 2
do ShadowA:set PPTestTune:EventHandler:EventFiller:OnlyOnce true
do ShadowA:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowA:set stdEmitter:MinusOrderingMode UnrderedShadow
do ShadowA:set stdXSec:IntOrdering ShadowColour
# cp ShadowA ShadowB the former is with new setEmissionMomentum (-DDIPSY::PlusEvo)
# cp ShadowA ShadowC the former with small bugfix?
cp Default ShadowD
do ShadowD:set PPEventHandler:EffectivePartonMode Shadows
do ShadowD:set PPEventHandler:FudgeME 2
do ShadowD:set PPTestTune:EventHandler:EventFiller:OnlyOnce false
do ShadowD:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowD:set stdEmitter:MinusOrderingMode CutShadow
do ShadowD:set stdXSec:IntOrdering ShadowColourMax
cp Default ShadowE
do ShadowE:set PPEventHandler:EffectivePartonMode Shadows
do ShadowE:set PPEventHandler:FudgeME 2
do ShadowE:set PPTestTune:EventHandler:EventFiller:OnlyOnce false
do ShadowE:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowE:set stdEmitter:MinusOrderingMode CutShadow
do ShadowE:set stdXSec:IntOrdering ShadowColourMax
do ShadowE:set stdXSec:RMax -1.0
cp Default ShadowF
do ShadowF:set PPEventHandler:EffectivePartonMode Shadows
do ShadowF:set PPEventHandler:FudgeME 2
do ShadowF:set PPTestTune:EventHandler:EventFiller:OnlyOnce false
do ShadowF:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowF:set stdEmitter:MinusOrderingMode CutShadow
do ShadowF:set stdXSec:IntOrdering ShadowColourMax
do ShadowF:set stdXSec:SinFunction Scaled
do ShadowF:set stdXSec:RMax -1.0
cp Default ShadowG
do ShadowG:set PPEventHandler:EffectivePartonMode Shadows
do ShadowG:set PPEventHandler:FudgeME 2
do ShadowG:set PPTestTune:EventHandler:EventFiller:OnlyOnce false
do ShadowG:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowG:set stdEmitter:MinusOrderingMode CutShadow
do ShadowG:set stdXSec:IntOrdering ShadowColourMax
do ShadowG:set stdXSec:PTScale 1.0
do ShadowG:set stdXSec:RMax -1.0
cp Default ShadowH
do ShadowH:set PPEventHandler:EffectivePartonMode Shadows
do ShadowH:set PPEventHandler:FudgeME 2
do ShadowH:set PPTestTune:EventHandler:EventFiller:OnlyOnce false
do ShadowH:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowH:set stdEmitter:MinusOrderingMode CutShadow
do ShadowH:set stdXSec:IntOrdering ShadowColourMax
cp Default ShadowI
do ShadowI:set PPEventHandler:EffectivePartonMode Shadows
do ShadowI:set PPEventHandler:FudgeME 2
# do ShadowI:set PPTestTune:EventHandler:EventFiller:OnlyOnce false
do ShadowI:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowI:set PPTestTune:EventHandler:PTScale -1
do ShadowI:set PPTestTune:EventHandler:FixedAlphaS -0.5
do ShadowI:set stdEmitter:MinusOrderingMode PtGen
do ShadowI:set stdXSec:IntOrdering ShadowColourMax
cp Default ShadowJ
do ShadowJ:set PPEventHandler:EffectivePartonMode Shadows
do ShadowJ:set PPEventHandler:FudgeME 2
do ShadowJ:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowJ:set PPTestTune:EventHandler:PTScale -1
do ShadowJ:set PPTestTune:EventHandler:FixedAlphaS -0.5
do ShadowJ:set stdEmitter:MinusOrderingMode PtGen
do ShadowJ:set stdXSec:IntOrdering ShadowColourMax
do ShadowJ:set stdXSec:SinFunction Scaled
cp Default ShadowK
do ShadowK:set PPEventHandler:EffectivePartonMode Shadows
do ShadowK:set PPEventHandler:FudgeME 2
do ShadowK:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowK:set PPTestTune:EventHandler:PTScale -1
do ShadowK:set PPTestTune:EventHandler:FixedAlphaS -0.5
do ShadowK:set stdEmitter:MinusOrderingMode CutShadow
do ShadowK:set stdXSec:IntOrdering ShadowColourMax
do ShadowK:set stdXSec:SinFunction Scaled
cp Default ShadowL
do ShadowL:set PPEventHandler:EffectivePartonMode Shadows
do ShadowL:set PPEventHandler:FudgeME 2
do ShadowL:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowL:set PPTestTune:EventHandler:PTScale -1
do ShadowL:set PPTestTune:EventHandler:FixedAlphaS -0.5
do ShadowL:set stdEmitter:MinusOrderingMode PtGen
do ShadowL:set stdXSec:IntOrdering ShadowColourMax
do ShadowL:set stdXSec:SinFunction Scaled
do ShadowL:set stdEmitter:SplittingFunction FullAP
cp Default ShadowM
do ShadowM:set PPEventHandler:EffectivePartonMode Shadows
do ShadowM:set PPEventHandler:FudgeME 2
do ShadowM:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowM:set PPTestTune:EventHandler:PTScale -1
do ShadowM:set PPTestTune:EventHandler:FixedAlphaS -0.5
do ShadowM:set stdEmitter:MinusOrderingMode PtGen
do ShadowM:set stdXSec:IntOrdering ShadowColourMax
do ShadowM:set stdXSec:SinFunction Scaled
do ShadowM:set stdEmitter:SplittingFunction FullAP
do ShadowM:set PPTestTune:EventHandler:EventFiller:OnlyOnce true
cp Default ShadowN
do ShadowN:set PPEventHandler:EffectivePartonMode Shadows
do ShadowN:set PPEventHandler:FudgeME 2
do ShadowN:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowN:set PPTestTune:EventHandler:PTScale -1
do ShadowN:set PPTestTune:EventHandler:FixedAlphaS -0.5
do ShadowN:set stdEmitter:MinusOrderingMode PtGen
do ShadowN:set stdXSec:IntOrdering ShadowColourMax
do ShadowN:set stdXSec:SinFunction Scaled
do ShadowN:set stdEmitter:SplittingFunction FullAP
do ShadowN:set PPTestTune:EventHandler:EventFiller:OnlyOnce true
cp Default ShadowO
do ShadowO:set PPEventHandler:EffectivePartonMode Shadows
do ShadowO:set PPEventHandler:FudgeME 2
do ShadowO:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowO:set PPTestTune:EventHandler:PTScale -1
do ShadowO:set PPTestTune:EventHandler:FixedAlphaS -0.5
do ShadowO:set stdEmitter:MinusOrderingMode PtGen
do ShadowO:set stdXSec:IntOrdering ShadowColourMax
do ShadowO:set stdEmitter:SplittingFunction FullAP
do ShadowO:set PPTestTune:EventHandler:EventFiller:OnlyOnce true
cp Default ShadowP
do ShadowP:set PPEventHandler:EffectivePartonMode Shadows
do ShadowP:set PPEventHandler:FudgeME 2
do ShadowP:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowP:set PPTestTune:EventHandler:PTScale -1
do ShadowP:set PPTestTune:EventHandler:FixedAlphaS -0.5
do ShadowP:set stdEmitter:MinusOrderingMode PtGen
do ShadowP:set stdXSec:IntOrdering ShadowColourMax
do ShadowP:set stdEmitter:SplittingFunction FullAP
do ShadowP:set PPTestTune:EventHandler:EventFiller:OnlyOnce false
cp Default ShadowQ
do ShadowQ:set PPEventHandler:EffectivePartonMode Shadows
do ShadowQ:set PPEventHandler:FudgeME 2
do ShadowQ:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowQ:set PPTestTune:EventHandler:PTScale -1
do ShadowQ:set PPTestTune:EventHandler:FixedAlphaS -0.5
do ShadowQ:set stdEmitter:MinusOrderingMode PtGenZ
do ShadowQ:set stdXSec:IntOrdering ShadowColourMax
do ShadowQ:set stdEmitter:SplittingFunction FullAP
do ShadowQ:set PPTestTune:EventHandler:EventFiller:OnlyOnce false
cp Default ShadowR
do ShadowR:set PPEventHandler:EffectivePartonMode Shadows
do ShadowR:set PPEventHandler:FudgeME 2
do ShadowR:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowR:set PPTestTune:EventHandler:PTScale -1
do ShadowR:set PPTestTune:EventHandler:FixedAlphaS -1.0
do ShadowR:set stdEmitter:MinusOrderingMode PtGenZ
do ShadowR:set stdXSec:IntOrdering ShadowColourMax
do ShadowR:set stdEmitter:SplittingFunction FullAP
do ShadowR:set PPTestTune:EventHandler:EventFiller:OnlyOnce false
cp Default ShadowS
do ShadowS:set PPEventHandler:EffectivePartonMode Shadows
do ShadowS:set PPEventHandler:FudgeME 2
do ShadowS:set PPTestTune:EventHandler:EventFiller:SingleMother 1
do ShadowS:set PPTestTune:EventHandler:PTScale -1
do ShadowS:set PPTestTune:EventHandler:FixedAlphaS -1.0
do ShadowS:set stdEmitter:MinusOrderingMode PtGenZ
do ShadowS:set stdXSec:IntOrdering ShadowColourMax
do ShadowS:set stdEmitter:SplittingFunction FullAPkTsup4
do ShadowS:set PPTestTune:EventHandler:EventFiller:OnlyOnce false
cp Default Defaupt
do Defaupt:set PPTestTune:EventHandler:EventFiller:PTCut 2.0
do Defaupt:set FSOrdering:PTMin 2.0
# Run for tuning
SAVERUNFSXD Default PPGenerator Default PPXSecGenerator
SAVERUNFSXD DefRope PPGenerator Default PPXSecGenerator
SAVERUNFSXD NoSwing PPGenerator Default PPXSecGenerator
SAVERUNFSXD NewSinF PPGenerator NewSinF PPXSecGenerator
SAVERUNFSXD NewSinS PPGenerator NewSinS PPXSecGenerator
SAVERUNFSXD NewSing PPGenerator NewSing PPXSecGenerator
SAVERUNFSXD EffPRel PPGenerator EffPRel PPXSecGenerator
SAVERUNFSXD DefaY7F PPGenerator DefaY7F PPXSecGenerator
SAVERUNFSXD Def01Y7 PPGenerator Def01Y7 PPXSecGenerator
SAVERUNFSXD DefEven PPGenerator DefEven PPXSecGenerator
SAVERUNFSXD DefSwL4 PPGenerator DefSwL4 PPXSecGenerator
SAVERUNFSXD DefSw01 PPGenerator DefSw01 PPXSecGenerator
SAVERUNFSXD DefFSGO PPGenerator Default PPXSecGenerator
SAVERUNFSXD DefFSG2 PPGenerator Default PPXSecGenerator
SAVERUNFSXD Shadows PPGenerator Shadows PPXSecGenerator
SAVERUNFSXD DefSing PPGenerator DefSing PPXSecGenerator
SAVERUNFSXD DefComp PPGenerator DefComp PPXSecGenerator
SAVERUNFSXD Shadow8 PPGenerator Shadow8 PPXSecGenerator
SAVERUNFSXD Shadow9 PPGenerator Shadow9 PPXSecGenerator
SAVERUNFSXD ShadowA PPGenerator ShadowA PPXSecGenerator
SAVERUNFSXD ShadowD PPGenerator ShadowD PPXSecGenerator
SAVERUNFSXD Defaupt PPGenerator Defaupt PPXSecGenerator
do PPGenerator:RemoveInterface /DIPSY/PPEventHandler:Emitter:PMinusOrdering
do PPGenerator:AddRndInterface /DIPSY/PPEventHandler:Emitter:RMax 1 1.0 5.0 2.9 0.6
do PPXSecGenerator:RemoveInterface /DIPSY/PPEventHandler:Emitter:PMinusOrdering
do PPXSecGenerator:AddRndInterface /DIPSY/PPEventHandler:Emitter:RMax 1 1.0 5.0 2.9 0.6
SAVERUNFSXD ShadowE PPGenerator ShadowE PPXSecGenerator
SAVERUNFSXD ShadowF PPGenerator ShadowF PPXSecGenerator
SAVERUNFSXD ShadowG PPGenerator ShadowG PPXSecGenerator
do PPGenerator:RemoveInterface /DIPSY/PPEventHandler:Emitter:RMax
do PPGenerator:AddRndInterface /DIPSY/PPEventHandler:BaryonSize 1 1.0 5.0 2.9 0.6
do PPXSecGenerator:RemoveInterface /DIPSY/PPEventHandler:Emitter:RMax
do PPXSecGenerator:AddRndInterface /DIPSY/PPEventHandler:BaryonSize 1 1.0 5.0 2.9 0.6
SAVERUNFSXD ShadowH PPGenerator ShadowH PPXSecGenerator
SAVERUNFSXD ShadowI PPGenerator ShadowI PPXSecGenerator
do PPGenerator:AddRndInterface /DIPSY/PPEventHandler:Emitter:PTScale 1 1.5 2.5 1.0 0.5
do PPXSecGenerator:AddRndInterface /DIPSY/PPEventHandler:Emitter:PTScale 1 1.5 2.5 1.0 0.5
SAVERUNFSXD ShadowJ PPGenerator ShadowJ PPXSecGenerator
SAVERUNFSXD ShadowK PPGenerator ShadowK PPXSecGenerator
SAVERUNFSXD ShadowL PPGenerator ShadowL PPXSecGenerator
SAVERUNFSXD ShadowM PPGenerator ShadowM PPXSecGenerator
do PPGenerator:AddRndInterface /DIPSY/PPEventHandler:Emitter:PTScale 1 0.5 2.5 1.5 0.5
do PPXSecGenerator:AddRndInterface /DIPSY/PPEventHandler:Emitter:PTScale 1 0.5 2.5 1.5 0.5
do PPGenerator:RemoveInterface /DIPSY/PPEventHandler:RMax
do PPGenerator:AddRndInterface /DIPSY/PPEventHandler:M0 100 0.5 2.0 0.8 0.6
do PPXSecGenerator:RemoveInterface /DIPSY/PPEventHandler:RMax
do PPXSecGenerator:AddRndInterface /DIPSY/PPEventHandler:M0 100 0.5 2.0 0.8 0.6
SAVERUNFSXD ShadowN PPGenerator ShadowN PPXSecGenerator
SAVERUNFSXD ShadowO PPGenerator ShadowO PPXSecGenerator
SAVERUNFSXD ShadowP PPGenerator ShadowP PPXSecGenerator
SAVERUNFSXD ShadowQ PPGenerator ShadowQ PPXSecGenerator
SAVERUNFSXD ShadowR PPGenerator ShadowR PPXSecGenerator
SAVERUNFSXD ShadowS PPGenerator ShadowS PPXSecGenerator
# testing the tunes
SAVERUNTUNED Default PPTestTune
SAVERUNTUNED DefRope PPTestTune
SAVERUNTUNED NewSinF PPTestTune
SAVERUNTUNED NewSinS PPTestTune
SAVERUNTUNED NoSwing PPTestTune
SAVERUNTUNED NewSing PPTestTune
SAVERUNTUNED EffPRel PPTestTune
SAVERUNTUNED DefaY7F PPTestTune
SAVERUNTUNED Def01Y7 PPTestTune
SAVERUNTUNED DefEven PPTestTune
SAVERUNTUNED DefSwL4 PPTestTune
SAVERUNTUNED DefSw01 PPTestTune
SAVERUNTUNED DefFSGO PPTestTune
SAVERUNTUNED DefFSG2 PPTestTune
SAVERUNTUNED Shadows PPTestTune
SAVERUNTUNED DefSing PPTestTune
SAVERUNTUNED DefComp PPTestTune
SAVERUNTUNED Shadow8 PPTestTune
SAVERUNTUNED Shadow9 PPTestTune
SAVERUNTUNED ShadowA PPTestTune
SAVERUNTUNED ShadowD PPTestTune
SAVERUNTUNED ShadowE PPTestTune
SAVERUNTUNED ShadowF PPTestTune
SAVERUNTUNED ShadowG PPTestTune
SAVERUNTUNED ShadowH PPTestTune
SAVERUNTUNED ShadowI PPTestTune
SAVERUNTUNED ShadowJ PPTestTune
SAVERUNTUNED ShadowK PPTestTune
SAVERUNTUNED ShadowL PPTestTune
SAVERUNTUNED ShadowM PPTestTune
SAVERUNTUNED ShadowN PPTestTune
SAVERUNTUNED ShadowO PPTestTune
SAVERUNTUNED ShadowP PPTestTune
SAVERUNTUNED ShadowQ PPTestTune
SAVERUNTUNED ShadowR PPTestTune
SAVERUNTUNED ShadowS PPTestTune
SAVERUNTUNED Defaupt PPTestTune
##### playground #####
erase PPTestTune:DefaultObjects[0]
set PPTestTune:DefaultObjects[0] Default
set PPEventHandler:LambdaQCD 0.22
set PPEventHandler:RMax 3.0
set stdEmitter:PMinusOrdering 1.0
set stdEmitter:PTScale 1.0
set PPGenerator:EventHandler:PreSamples 0
# set PPGenerator:EventHandler:PreSamples 0
set PPGenerator:EventHandler:EventFiller:DebugHist 1
set PPTestTune:NumberOfEvents 10000
saverun compare PPTestTune
set stdEmitter:PTScale 2
saverun compar6 PPTestTune
set stdEmitter:PTScale 1
set stdEmitter:PMinusOrdering 2.0
saverun compar5 PPTestTune
set stdEmitter:PMinusOrdering 1.0
set PPEventHandler:FudgeME 2
set PPTestTune:EventHandler:EventFiller:OnlyOnce true
set PPTestTune:EventHandler:EventFiller:SingleMother 1
saverun compar2 PPTestTune
set PPTestTune:EventHandler:EventFiller:CompatMode 1
saverun compar3 PPTestTune
set PPTestTune:EventHandler:EventFiller:CompatMode 0
set PPTestTune:EventHandler:EffectivePartonMode Relatives
saverun compar4 PPTestTune
set PPTestTune:EventHandler:EventFiller:OnlyOnce false
set PPEventHandler:FudgeME 1
set PPTestTune:EventHandler:EventFiller:SingleMother 0
set PPTestTune:EventHandler:EventFiller:CompatMode 0
set PPTestTune:EventHandler:EffectivePartonMode Shadows
saverun shadows PPTestTune
set PPEventHandler:FudgeME 2
set PPTestTune:EventHandler:EventFiller:OnlyOnce true
set PPTestTune:EventHandler:EventFiller:SingleMother 1
saverun shadow2 PPTestTune
saverun shadow3 PPTestTune
set stdEmitter:MinusOrderingMode EffectiveParton
saverun shadow4 PPTestTune
set stdEmitter:MinusOrderingMode TrueShadow
saverun shadow6 PPTestTune
set stdEmitter:MinusOrderingMode OrderedShadow
saverun shadow7 PPTestTune
set stdXSec:IntOrdering ShadowOpen
saverun shadow8 PPTestTune
set stdXSec:IntOrdering ShadowColour
set PPTestTune:NumberOfEvents 10000
saverun shadow9 PPTestTune
set PPTestTune:EventHandler:EventFiller:PTCut 2.0
set FSOrdering:PTMin 2.0
saverun shadow11 PPTestTune
set PPTestTune:EventHandler:EventFiller:PTCut 4.0
set FSOrdering:PTMin 4.0
saverun shadow12 PPTestTune
set PPTestTune:EventHandler:EventFiller:PTCut 1.0
set FSOrdering:PTMin 1.0
set stdEmitter:MinusOrderingMode UnorderedShadow
saverun shadow14 PPTestTune
set stdXSec:IntOrdering ShadowColourMax
saverun shadow15 PPTestTune
saverun shadow16 PPTestTune
saverun shadow17 PPTestTune
set stdEmitter:PlusInflation 2.0
saverun shadow18 PPTestTune
set stdEmitter:PlusInflation 1.0
set stdEmitter:MinusOrderingMode CutShadow
# erase PPTestTune:AnalysisHandlers[0]
# erase PPTestTune:AnalysisHandlers[0]
# erase PPTestTune:AnalysisHandlers[0]
# set PPTestTune:EventHandler:CascadeHandler NULL
# set PPTestTune:EventHandler:HadronizationHandler NULL
# set PPTestTune:EventHandler:DecayHandler NULL
# erase PPTestTune:DefaultObjects[0]
saverun shadow21 PPTestTune
set PPTestTune:EventHandler:EventFiller:OnlyOnce false
saverun shadow23 PPTestTune
set stdEmitter:SizeFactor 1.0
saverun shadow30 PPTestTune
set stdEmitter:SizeFactor 2.0
# set stdEmitter:MinusOrderingMode PtGen
# saverun shadow32 PPTestTune
set stdEmitter:MinusOrderingMode CutShadow
set stdXSec:KTPow 2.0
set stdXSec:KT0 1.0
saverun shadow29 PPTestTune
set stdEmitter:SizeFactor 1.0
saverun shadow31 PPTestTune
set stdEmitter:SizeFactor 2.0
set stdXSec:KTPow 0.0
set stdEmitter:PMinusOrdering 2.0
saverun shadow25 PPTestTune
set stdEmitter:PMinusOrdering 1.0
set stdEmitter:PTScale 2.0
saverun shadow26 PPTestTune
set stdXSec:PTScale 1
saverun shadow28 PPTestTune
set stdXSec:PTScale 0
set stdXSec:SinFunction Scaled
saverun shadow27 PPTestTune
set stdEmitter:PTScale 1.0
set stdXSec:SinFunction Exact
set PPTestTune:EventHandler:EventFiller:OnlyOnce true
set PPTestTune:EventHandler:EffectivePartonMode NewShadows
saverun shadow22 PPTestTune
set PPTestTune:EventHandler:EventFiller:OnlyOnce false
saverun shadow24 PPTestTune
set PPTestTune:EventHandler:EventFiller:OnlyOnce true
set PPTestTune:EventHandler:EffectivePartonMode Shadows
saverun shadow23 PPTestTune
set stdEmitter:PTScale 2
saverun shadow33 PPTestTune
set PPTestTune:EventHandler:PTScale -1
set PPTestTune:NumberOfEvents 10000
saverun shadow34 PPTestTune
set stdEmitter:MinusOrderingMode PtGen
saverun shadow35 PPTestTune
set stdEmitter:SplittingFunction FullAP
saverun shadow36 PPTestTune
set stdEmitter:MinusOrderingMode PtGenZ
saverun shadow37 PPTestTune
set PPTestTune:EventHandler:EventFiller:OnlyOnce false
set PPTestTune:EventHandler:FixedAlphaS -0.5
set PPTestTune:EventHandler:PTScale -1
saverun shadow40 PPTestTune
saverun shadow41 PPTestTune
saverun shadow42 PPTestTune
set stdEmitter:SplittingFunction FullAPkTsup
saverun shadow43 PPTestTune
set stdEmitter:SplittingFunction FullAPkTsup3
saverun shadow44 PPTestTune
set stdEmitter:SplittingFunction FullAPkTsup4
saverun shadow45 PPTestTune
set stdEmitter:SplittingFunction FullAPkTsup4
saverun shadow45 PPTestTune
set stdEmitter:SplittingFunction FullAPkTsupm4
saverun shadow48 PPTestTune
set stdEmitter:SplittingFunction FullAP
set stdEmitter:PTScale 1
saverun shadow46 PPTestTune
set stdEmitter:PTScale 0.5
saverun shadow47 PPTestTune
set stdEmitter:PTScale 1
set stdEmitter:RMax 0.1
saverun shadow49 PPTestTune
set stdEmitter:RMax 0
saverun shadow50 PPTestTune
+saverun shadow60 PPTestTune
+set FSOrdering:OnlyOriginal OriginalPropagators
+saverun shadow61 PPTestTune
+set FSOrdering:OnlyOriginal AllEmissions
set PPTestTune:EventHandler:EventFiller:PTCut 0.5
set FSOrdering:PTMin 0.5
saverun shadow51 PPTestTune
set PPTestTune:EventHandler:EventFiller:PTCut 2.0
set FSOrdering:PTMin 2.0
saverun shadow52 PPTestTune
set PPTestTune:EventHandler:EventFiller:PTCut 4.0
set FSOrdering:PTMin 4.0
saverun shadow53 PPTestTune
set PPTestTune:EventHandler:EventFiller:PTCut 10.0
set FSOrdering:PTMin 10.0
saverun shadow54 PPTestTune
set PPTestTune:EventHandler:EventFiller:PTCut 6.0
set FSOrdering:PTMin 6.0
saverun shadow55 PPTestTune
set PPTestTune:EventHandler:EventFiller:PTCut 5.0
set FSOrdering:PTMin 5.0
saverun shadow56 PPTestTune
set PPTestTune:EventHandler:EventFiller:PTCut 1.0
set FSOrdering:PTMin 1.0
set stdXSec:SinFunction Scaled
saverun shadow38 PPTestTune
set stdXSec:SinFunction Exact
set PPTestTune:EventHandler:EventFiller:OnlyOnce false
saverun shadow39 PPTestTune
set PPTestTune:EventHandler:EventFiller:OnlyOnce true
set stdEmitter:SplittingFunction SmallX
set stdEmitter:MinusOrderingMode CutShadow
set PPTestTune:EventHandler:PTScale 2
set stdEmitter:PTScale 1
set stdXSec:IntOrdering ShadowColour
set stdEmitter:MinusOrderingMode OrderedShadow
set PPTestTune:NumberOfEvents 2
set PPGenerator:EventHandler:PreSamples 10000
saverun shadow10 PPTestTune
set stdEmitter:MinusOrderingMode UnorderedShadow
saverun shadow13 PPTestTune
set stdXSec:IntOrdering ShadowColourMax
saverun shadow19 PPTestTune
set stdEmitter:PlusInflation 10.0
saverun shadow20 PPTestTune
set stdEmitter:PlusInflation 1.0
set stdEmitter:MinusOrderingMode OrderedShadow
set PPGenerator:EventHandler:PreSamples 0
set PPTestTune:NumberOfEvents 10000
set stdXSec:IntOrdering VeryOpen
set stdEmitter:MinusOrderingMode EffectivePT
saverun shadow5 PPTestTune
set PPEventHandler:FudgeME 1
set PPTestTune:EventHandler:EventFiller:OnlyOnce false
set PPTestTune:EventHandler:EventFiller:SingleMother 0
set PPTestTune:EventHandler:EffectivePartonMode Colours
set PPTestTune:EventHandler:EventFiller:Mode NewSingle
saverun compsng PPTestTune
set PPEventHandler:FudgeME 2
set PPTestTune:EventHandler:EventFiller:OnlyOnce true
set PPTestTune:EventHandler:EventFiller:SingleMother 1
saverun compsn2 PPTestTune
set PPTestTune:EventHandler:EventFiller:CompatMode 1
saverun compsn3 PPTestTune
set PPEventHandler:FudgeME 1
set PPTestTune:EventHandler:EventFiller:OnlyOnce false
set PPTestTune:EventHandler:EventFiller:SingleMother 0
set PPTestTune:EventHandler:EventFiller:CompatMode 0
diff --git a/DIPSY/ParticleInfo.cc b/DIPSY/ParticleInfo.cc
--- a/DIPSY/ParticleInfo.cc
+++ b/DIPSY/ParticleInfo.cc
@@ -1,59 +1,72 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the ParticleInfo class.
//
#include "ParticleInfo.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "Dipole.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace DIPSY;
ParticleInfo::ParticleInfo(tcPartonPtr p)
: ColourInfo(p->dipoles().second? p->dipoles().second->colour() + 1: 0,
p->dipoles().first? p->dipoles().first->colour() + 1: 0), theParton(p) {}
+ParticleInfo::ParticleInfo(tcPPtr particle) {
+ init(*particle);
+}
+
+ParticleInfo::ParticleInfo(const Particle & particle) {
+ init(particle);
+}
+
ParticleInfo::~ParticleInfo() {}
+void ParticleInfo::init(const Particle & particle) {
+ const ParticleInfo * pin = get<ParticleInfo>(particle);
+ if ( !pin ) return;
+ theParton = pin->parton();
+ indices(pin->indices());
+}
+
tcPartonPtr ParticleInfo::getParton(const Particle & particle) {
- for ( int i = 0, N = particle.getInfo().size(); i < N; ++i )
- if ( const ParticleInfo * pin =
- dynamic_cast<const ParticleInfo *>(particle.getInfo()[i].operator->()) )
- return pin->parton();
+ if ( const ParticleInfo * pin = get<ParticleInfo>(particle) )
+ return pin->parton();
return tcPartonPtr();
}
void ParticleInfo::persistentOutput(PersistentOStream & os) const {
os << theParton;
}
void ParticleInfo::persistentInput(PersistentIStream & is, int) {
is >> theParton;
}
// *** Attention *** The following static variable is needed for the type
// description system in ThePEG. Please check that the template arguments
// are correct (the class and its base class), and that the constructor
// arguments are correct (the class name and the name of the dynamically
// loadable library where the class implementation can be found).
DescribeClass<ParticleInfo,Ariadne5::ColourInfo>
describeDIPSYParticleInfo("DIPSY::ParticleInfo", "ParticleInfo.so");
void ParticleInfo::Init() {
static ClassDocumentation<ParticleInfo> documentation
("There is no documentation for the ParticleInfo class");
}
diff --git a/DIPSY/ParticleInfo.h b/DIPSY/ParticleInfo.h
--- a/DIPSY/ParticleInfo.h
+++ b/DIPSY/ParticleInfo.h
@@ -1,94 +1,110 @@
// -*- C++ -*-
#ifndef DIPSY_ParticleInfo_H
#define DIPSY_ParticleInfo_H
//
// This is the declaration of the ParticleInfo class.
//
#include "Ariadne/Config/ColourInfo.h"
#include "Parton.h"
namespace DIPSY {
using namespace ThePEG;
/**
* Here is the documentation of the ParticleInfo class.
*/
class ParticleInfo: public Ariadne5::ColourInfo {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
ParticleInfo(tcPartonPtr p = tcPartonPtr());
/**
+ * Construct from information supplied by a \a particle.
+ */
+ ParticleInfo(tcPPtr particle);
+
+ /**
+ * Construct from information supplied by a \a particle.
+ */
+ ParticleInfo(const Particle & particle);
+
+ /**
* The destructor.
*/
virtual ~ParticleInfo();
//@}
public:
/**
* Return the parton from which the particle was created.
*/
tcPartonPtr parton() const {
return theParton;
}
/**
* Return the parton from which the given particle was created.
*/
static tcPartonPtr getParton(const Particle & particle);
+
public:
/** @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);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
private:
/**
+ * Construct from information supplied by a \a particle.
+ */
+ void init(const Particle & particle);
+
+ /**
* The DIPSY::Parton from which the particle was created.
*/
cPartonPtr theParton;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
ParticleInfo & operator=(const ParticleInfo &);
};
}
#endif /* DIPSY_ParticleInfo_H */
diff --git a/DIPSY/Parton.cc b/DIPSY/Parton.cc
--- a/DIPSY/Parton.cc
+++ b/DIPSY/Parton.cc
@@ -1,257 +1,259 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the Parton class.
//
#include "Parton.h"
#include "ShadowParton.h"
#include "DipoleState.h"
#include "DipoleEventHandler.h"
#include "Dipole.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Utilities/Debug.h"
#include "ThePEG/Utilities/Throw.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Utilities/DescribeClass.h"
using namespace DIPSY;
Parton::~Parton() {}
Ariadne5::ClonePtr Parton::clone() const {
return new_ptr(*this);
}
void Parton::rebind(const TranslationMap & trans) {
theParents.first = trans.translate(theParents.first);
theParents.second = trans.translate(theParents.second);
theMainParent = trans.translate(theMainParent);
theDipoles.first = trans.translate(theDipoles.first);
theDipoles.second = trans.translate(theDipoles.second);
set<tPartonPtr> kids;
kids.swap(theChildren);
trans.translate(inserter(theChildren), kids.begin(), kids.end());
}
void Parton::interact(bool onegluon) {
if ( interacted() ) return;
hasInteracted = true;
if ( onegluon && mainParent() ) {
mainParent()->interact(true);
return;
}
if ( parents().first ) parents().first->interact();
if ( parents().second ) parents().second->interact();
}
bool Parton::inInteractingLoop() const {
//search in one direction
DipolePtr d = dipoles().first;
while ( d && d != dipoles().second && !(d->interacted()) ) {
if ( d->neighbors().first )
d = d->neighbors().first;
else
break;
}
if ( !d ) { //if stopped at a quark, look also in other direction
d = dipoles().second;
while ( d && d != dipoles().second && !(d->interacted()) ) {
if ( d->neighbors().first )
d = d->neighbors().first;
else
break;
}
}
if ( d && d->interacted() )
return true;
else
return false;
}
int Parton::nOnShellInChain() const {
int ret = 0;
DipolePtr d = dipoles().first;
if ( onShell() ) ret++;
while ( d && d != dipoles().second ) {
if ( d->partons().first->onShell() && ++ret > 1 ) return ret;;
d = d->neighbors().first;
}
if ( !d ) {
d = dipoles().second;
while ( d ) {
if ( d->partons().second->valence() && ++ret > 1 ) return ret;;
d = d->neighbors().second;
}
}
return ret;
}
DipoleState& Parton::dipoleState() const {
if ( dipoles().first ) return dipoles().first->dipoleState();
else return dipoles().second->dipoleState();
}
bool Parton::valenceParton() const {
DipoleState & state = dipoleState();
for ( int i = 0, N = state.initialDipoles().size(); i < N; i++ ) {
if ( state.initialDipoles()[i]->partons().first == this ||
state.initialDipoles()[i]->partons().second == this )
return true;
}
return false;
}
bool Parton::inValenceChain() const {
//search in one direction
DipolePtr d = dipoles().first;
if ( valence() ) {
if ( !d )
cout << "found valence quark" << endl;
return true;
}
while ( d && d != dipoles().second ) {
if ( d->partons().first->valence() ) {
return true;
}
d = d->neighbors().first;
}
if ( !d ) { //if stopped at a quark, look also in other direction
cout << "found non-valence quark at x =" << position().x()*GeV
<< ", y = " << position().y()*GeV << endl;
DipoleState & state = dipoleState();
for ( int i = 0, N = state.initialDipoles().size(); i < N; i++ ) {
cout << "valence partons at x = "
<< state.initialDipoles()[i]->partons().first->position().x()*GeV
<< ", y = " << state.initialDipoles()[i]->partons().first->position().y()*GeV << endl;
cout << "valence partons at x = "
<< state.initialDipoles()[i]->partons().second->position().x()*GeV
<< ", y = "
<< state.initialDipoles()[i]->partons().second->position().y()*GeV << endl;
}
d = dipoles().second;
while ( d && d != dipoles().second ) {
if ( d->partons().second->valence() ) {
return true;
}
d = d->neighbors().second;
}
}
return false;
}
bool Parton::swingedEmission() const {
if ( !parents().first || !parents().second ) return false;
else if ( parents().first->parents().second == parents().second ) return false;
else if ( parents().second->parents().first == parents().first ) return false;
if ( Debug::level > 5 ) cout << "parton at " << oY() << " is a swinged emission" << endl;
return true;
}
bool Parton::absorbed() const {
return dipoles().first->children().first || dipoles().first->children().second ||
dipoles().second->children().first || dipoles().second->children().second;
}
double Parton::pTScale() const {
return dipoleState().handler().emitter().pTScale();
}
void Parton::updateMomentum() {
if ( dipoles().first && dipoles().second ) {
tPartonPtr p1 = dipoles().first->partons().first;
tPartonPtr p2 = dipoles().second->partons().second;
pT( pTScale()*((position() - p1->position())/(position() - p1->position()).pt2() +
(position() - p2->position())/(position() - p2->position()).pt2()) );
}
else if ( dipoles().first ) {
tPartonPtr p1 = dipoles().first->partons().first;
pT( pTScale()*(position() - p1->position())/(position() - p1->position()).pt2());
}
else if ( dipoles().second ) {
tPartonPtr p2 = dipoles().second->partons().second;
pT( pTScale()*(position() - p2->position())/(position() - p2->position()).pt2() );
}
else
cout << "Parton without any dipoles?? :o" << endl;
if ( isRightMoving ) {
y( log(pT().pt()/plus()) );
minus( pT().pt()*exp(y()) );
}
else {
y( log(minus()/pT().pt()) );
plus( pT().pt()*exp(-y()) );
}
}
TransverseMomentum Parton::recoil(tPartonPtr p) const {
return pTScale()*(position() - p->position())/dist2(*p);
}
Energy Parton::mass() const {
if ( theMass < ZERO )
theMass = CurrentGenerator::current().getParticleData(flavour())->mass();
return theMass;
}
PPtr Parton::produceParticle() const {
return dipoleState().getParticle(this);
}
void Parton::coutData() {
cout << "data for Parton " << this << endl;
cout << "thePosition1: " << thePosition.first*GeV
<< ", thePosition2: " << thePosition.second*GeV
<< ", thePlus: " << thePlus/GeV
<< ", theOriginalY: " << theOriginalY
<< ", thePT: " << thePT.pt()/GeV
<< ", theValencePT: " << theValencePT.pt()/GeV
<< ", theValencePlus: " << theValencePlus/GeV
<< ", theMinus: " << theMinus/GeV
<< ", theY: " << theY
<< ", isRightMoving: " << isRightMoving
<< ", theFlavour: " << theFlavour
<< ", theParents1: " << theParents.first
<< ", theParents2: " << theParents.second
<< ", theMainParent: " << theMainParent
<< ", theChildren: ";
for( set<tPartonPtr>::iterator it = theChildren.begin();
it != theChildren.end();it++)
cout << *it << ", ";
cout << "theDipoles1: " << theDipoles.first
<< ", theDipoles2: " << theDipoles.second
<< ", hasInteracted: " << hasInteracted
<< ", isOrdered: " << isOrdered
<< ", isOnShell: " << isOnShell
<< ", isValence: " << isValence
<< ", theNumber: " << theNumber
<< ", theMass: " << theMass/GeV << endl;
}
void Parton::persistentOutput(PersistentOStream & os) const {
os << ounit(thePosition, InvGeV) << ounit(thePlus, GeV) << theOriginalY
<< ounit(thePT, GeV) << ounit(theValencePT, GeV)
<< ounit(theValencePlus, GeV) << ounit(theMinus, GeV) << theY
<< isRightMoving << theFlavour << theParents << theMainParent << theDipoles
<< hasInteracted << isOrdered << isOnShell << isValence
- << ounit(theMass, GeV) << theShadow;
+ << ounit(theMass, GeV) << theShadow << ounit(theColProp, GeV2)
+ << ounit(theAcoProp, GeV2);
}
void Parton::persistentInput(PersistentIStream & is, int) {
is >> iunit(thePosition, InvGeV) >> iunit(thePlus, GeV) >> theOriginalY
>> iunit(thePT, GeV) >> iunit(theValencePT, GeV)
>> iunit(theValencePlus, GeV) >> iunit(theMinus, GeV) >> theY
>> isRightMoving >> theFlavour >> theParents >> theMainParent >> theDipoles
>> hasInteracted >> isOrdered >> isOnShell >> isValence
- >> iunit(theMass, GeV) >> theShadow;
+ >> iunit(theMass, GeV) >> theShadow >> iunit(theColProp, GeV2)
+ >> iunit(theAcoProp, GeV2);
}
DescribeClass<Parton,Ariadne5::CloneBase>
describeDIPSYParton("DIPSY::Parton", "libAriadne5.so libDIPSY.so");
// Definition of the static class description member.
void Parton::Init() {}
diff --git a/DIPSY/Parton.h b/DIPSY/Parton.h
--- a/DIPSY/Parton.h
+++ b/DIPSY/Parton.h
@@ -1,694 +1,743 @@
// -*- C++ -*-
#ifndef DIPSY_Parton_H
#define DIPSY_Parton_H
//
// This is the declaration of the Parton class.
//
#include "ThePEG/Config/ThePEG.h"
#include "ThePEG/Vectors/Transverse.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "Ariadne/Config/CloneBase.h"
#include "Parton.fh"
#include "ShadowParton.fh"
#include "Dipole.fh"
namespace DIPSY {
using namespace ThePEG;
/**
* Here is the documentation of the Parton class.
*/
class Parton: public Ariadne5::CloneBase {
public:
friend class RealParton;
/**
* Typedef for position in transverse coordinate space.
*/
typedef Transverse<InvEnergy> Point;
/**
* A pair of partons.
*/
typedef pair<tPartonPtr,tPartonPtr> tPartonPair;
/**
* A pair of dipoles.
*/
typedef pair<tDipolePtr,tDipolePtr> tDipolePair;
/**
* The Dipole is a friend.
*/
friend class Dipole;
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
inline Parton()
: thePosition(Point()), thePlus(0.0*GeV), theOriginalY(0.0),
thePT(TransverseMomentum()),
theValencePT(TransverseMomentum()),theValencePlus(ZERO),
theMinus(0*GeV), theY(0), isRightMoving(true), theFlavour(ParticleID::g),
theParents(tPartonPair()), theDipoles(tDipolePair()), hasInteracted(false),
- isOnShell(false), isValence(false), theMass(-1*GeV), theShadow(tSPartonPtr()) {}
+ isOnShell(false), isValence(false), theMass(-1*GeV),
+ theShadow(tSPartonPtr()), theColProp(ZERO), theAcoProp(ZERO) {}
/**
* The copy constructor.
*/
inline Parton(const Parton & x)
- : thePosition(x.thePosition), thePlus(x.thePlus),theOriginalY(x.theOriginalY),
- thePT(x.thePT), theValencePT(x.theValencePT),theValencePlus(x.theValencePlus),
+ : thePosition(x.thePosition), thePlus(x.thePlus),
+ theOriginalY(x.theOriginalY), thePT(x.thePT),
+ theValencePT(x.theValencePT),theValencePlus(x.theValencePlus),
theMinus(x.theMinus), theY(x.theY), isRightMoving(x.isRightMoving),
theFlavour(x.theFlavour),theParents(x.theParents),
theChildren(x.theChildren), theDipoles(x.theDipoles),
- hasInteracted(x.hasInteracted), isOrdered(x.isOrdered), isOnShell(x.isOnShell),
- isValence(x.isValence), theMass(x.theMass), theShadow(x.theShadow) {}
+ hasInteracted(x.hasInteracted), isOrdered(x.isOrdered),
+ isOnShell(x.isOnShell), isValence(x.isValence), theMass(x.theMass),
+ theShadow(x.theShadow), theColProp(x.theColProp),
+ theAcoProp(x.theAcoProp) {}
/**
* The destructor.
*/
virtual ~Parton();
//@}
protected:
/** @name The virtual functions to be overridden in sub-classes. */
//@{
/**
* Return a simple clone of this object. Should be implemented as
* <code>return new_ptr(*this);</code> by a derived class.
*/
virtual Ariadne5::ClonePtr clone() const;
/**
* Rebind pointers to other CloneBase objects. Called after a number
* of interconnected CloneBase objects have been cloned, so that
* the cloned objects will refer to the cloned copies afterwards.
*
* @param trans a TranslationMap relating the original objects to
* their respective clones.
*/
virtual void rebind(const TranslationMap & trans);
//@}
public:
/**
* Return the DipoleState to which this parton belongs. If it was
* originally belonged to one state which was subsequently merged
* into another, the parton will belong to the latter state.
*/
DipoleState & dipoleState() const;
/**
* finds the pTscale through the dipolestates emitter.
*/
double pTScale() const;
/**
* Calculate the squared transverse distance to the given parton.
*/
inline InvEnergy2 dist2(const Parton & p) const {
return (position() - p.position()).pt2();
}
/**
* Produce a ThePEG::Particle corresponding to this parton.
*/
PPtr produceParticle() const;
/**
* The mass of this parton.
*/
Energy mass() const;
/**
* The scalar transverse momentum squared of this parton.
*/
Energy2 pt2() const {
return pT().pt2();
}
/**
* The scalar transverse mass squared of this parton.
*/
Energy2 mt2() const {
return pT().pt2() + sqr(mass());
}
/**
* The scalar transverse momentum of this parton.
*/
Energy pt() const {
return sqrt(pt2());
}
/**
* The scalar transverse mass of this parton.
*/
Energy mt() const {
return sqrt(mt2());
}
/**
* The final-state momentum of this particle.
*/
LorentzMomentum momentum() const {
return lightCone(plus(), minus(), pT());
}
/** @name Simple access functions. */
//@{
/**
* Get the position in impact parameter space.
*/
inline const Point & position() const {
return thePosition;
}
/**
* Get the positive light-cone momentum.
*/
inline Energy plus() const {
return thePlus;
}
/**
* Get the transverse momentum.
*/
inline TransverseMomentum pT() const {
return thePT;
}
/**
* Get the transverse valence momentum. 0 if not a valence parton.
*/
inline TransverseMomentum valencePT() const {
if (isValence)
return theValencePT;
return TransverseMomentum();
}
/**
* Get the valence energy. 0 if not a valence parton.
*/
inline Energy valencePlus() const {
if (isValence)
return theValencePlus;
return ZERO;
}
/**
* Get the accumulated negative light-cone momentum deficit.
*/
inline Energy minus() const {
return theMinus;
}
/**
* Get the rapidity.
*/
inline double y() const {
return theY;
}
/**
* Get the flavour of this parton.
*/
inline long flavour() const {
return theFlavour;
}
/**
* Get the parent partons.
*/
inline tPartonPair parents() const {
return theParents;
}
/**
* Get the main parent.
*/
inline tPartonPtr mainParent() const {
return theMainParent;
}
/**
* Get the children partons.
*/
inline const set<tPartonPtr> & children() const {
return theChildren;
};
/**
* Remove a child
**/
inline void removeChild(PartonPtr child) {
theChildren.erase(child);
};
/**
* Remove all children
**/
inline void removeAllChildren() {
theChildren.clear();
};
/**
* Get the connecting dipoles.
*/
inline tDipolePair dipoles() const {
return theDipoles;
}
/**
* Indicate if this parton has interacted.
*/
inline bool interacted() const {
return hasInteracted;
}
/**
* Indicate if this parton is ordered.
*/
inline bool ordered() const {
return isOrdered;
}
/**
* Set if this parton is ordered.
*/
inline void ordered(bool b) {
isOrdered = b;
}
/**
* Return if this parton is on shell.
*/
inline bool onShell() const {
return isOnShell;
}
/**
* Set if this parton is on shell.
*/
inline void onShell(bool b) {
isOnShell = b;
}
/**
* Return if this parton is a valence parton.
*/
inline bool valence() const {
return isValence;
}
/**
* Returns true if the parton is absorbed.
*/
bool absorbed() const;
/**
* Set if this parton is a valence parton.
*/
inline void valence(bool b) {
isValence = b;
}
/**
* Set the position in impact parameter space.
*/
inline void position(const Point & x) {
thePosition = x;
}
/**
* Set the positive light-cone momentum.
*/
inline void plus(Energy x) {
thePlus = x;
}
/**
* Set the transverse momentum.
*/
inline void pT(TransverseMomentum x) {
thePT = x;
}
/**
* Set the transverse valence momentum, and set isValence to true.
*/
inline void valencePT(TransverseMomentum x) {
isValence = true;
theValencePT = x;
}
/**
* Set the valence energy.
*/
inline void valencePlus(Energy E) {
theValencePlus = E;
}
/**
* Set the accumulated negative light-cone momentum deficit.
*/
inline void minus(Energy x) {
theMinus = x;
}
/**
* Set the rapidity.
*/
inline void y(double x) {
theY = x;
}
/**
* Set the flavour of this parton.
*/
inline void flavour(long x) {
theFlavour = (x == 0? ParticleID::g: x);
}
/**
* Set the parent partons.
*/
inline void parents(tPartonPair x) {
theParents = x;
}
/**
* Set the main parent parton.
*/
inline void mainParent(tPartonPtr p) {
theMainParent = p;
}
/**
* Set the connecting dipoles.
*/
inline void dipoles(tDipolePair x) {
theDipoles = x;
}
/**
* Get the original emission rapidity.
*/
inline const double oY() const {
return theOriginalY;
}
/**
* Set the original emission rapidity.
*/
inline void oY(double y) {
theOriginalY = y;
}
/**
* Indicate that this parton has interacted. If \a onegluon is true,
* only the main parent is recursively flagged as interacted.
*/
void interact(bool onegluon = false);
/**
* Returns true if the parton comes from a rightmoving state.
*/
inline bool rightMoving() const {
return isRightMoving;
}
/**
* Set the direction of the original state.
*/
inline void rightMoving(bool rM) {
isRightMoving = rM;
}
/**
* Get and set the number of the parton.
*/
inline int number() {
return theNumber;
}
inline void number(int N) {
theNumber = N;
}
/**
* Checks if the parton is colour connected (in many steps if
* needed) to an interacting dipole.
*/
bool inInteractingLoop() const;
/**
* counts the number of on shell partons in this partons colour chain.
*/
int nOnShellInChain() const;
/**
* Checks if the parton is part of on of its states original dipoles.
*/
bool valenceParton() const;
/**
* Checks if the parton is in a colour chain containing a valenceparton.
*/
bool inValenceChain() const;
/**
* Returns true if the dipole the parton was emitted from is the result of a swing.
**/
bool swingedEmission() const;
/**
* Updates pT according to the colour neighbours, and changes y and
* plus/minus for right/left moving. minus/plus unchanged.
*/
void updateMomentum();
/**
* Updates y and p- from plus and pT.
*/
inline void updateYMinus() {
theY = log(thePT.pt()/thePlus);
theMinus = thePT.pt()*exp(theY);
}
inline void mirror(double y0) {
y(2.0*y0 - y());
swap(thePlus, theMinus);
rightMoving(!rightMoving());
}
/**
* Prints all the member variables to cout.
*/
void coutData();
/**
* Returns the recoil this parton would get from the argument parton.
*/
TransverseMomentum recoil(tPartonPtr) const;
/**
* Return the current shadow parton.
*/
tSPartonPtr shadow() const {
return theShadow;
}
/**
* Return a new shadow parton.
*/
void shadow(tSPartonPtr sp) {
theShadow = sp;
}
+ /**
+ * Set the virtuality for the propagator conecting the colour side of
+ * this parton.
+ */
+ void colPropagator(Energy2 kt2) {
+ theColProp = kt2;
+ }
+
+ /**
+ * Set the virtuality for the propagator conecting the anti-colour side of
+ * this parton.
+ */
+ void acoPropagator(Energy2 kt2) {
+ theAcoProp = kt2;
+ }
+
+ /**
+ * The virtuality for the propagator conecting the colour side of
+ * this parton.
+ */
+ Energy2 colPropagator() const {
+ return theColProp;
+ }
+
+ /**
+ * The virtuality for the propagator conecting the anti-colour side of
+ * this parton.
+ */
+ Energy2 acoPropagator() const {
+ return theAcoProp;
+ }
+
+
//@}
public:
/**
* debugging
*/
mutable TransverseMomentum m1pT, m2pT;
mutable Energy m1plus, m2plus;
mutable InvEnergy minr1, minr2, maxr1, maxr2;
public:
/** @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);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
private:
/**
* The position in impact parameter space.
*/
Point thePosition;
/**
* The positive light-cone momentum.
*/
Energy thePlus;
/**
* The enumeration of this emission.
*/
double theOriginalY;
/**
* The transverse momentum.
*/
TransverseMomentum thePT;
/**
* The transverse momentum and energy a valenceparton got at creation.
*/
TransverseMomentum theValencePT;
Energy theValencePlus;
/**
* The accumulated negative light-cone momentum deficit.
*/
Energy theMinus;
/**
* The rapidity.
*/
double theY;
/**
* The original direction of the particle.
*/
bool isRightMoving;
/**
* The flavour of this parton.
*/
long theFlavour;
/**
* The parent partons.
*/
tPartonPair theParents;
/**
* The main parent parton.
*/
tPartonPtr theMainParent;
/**
* The children
**/
set<tPartonPtr> theChildren;
/**
* The connecting dipoles.
*/
tDipolePair theDipoles;
/**
* Indicate if this parton has interacted.
*/
bool hasInteracted;
/**
* Indicate if this parton is ordered with respect to its colour neighbours.
*/
bool isOrdered;
/**
* Indicate if this parton is on shell, that is if it has
* been supplied with the neccesary p+ or p- for left or rightmoving
* particles respectively.
*/
bool isOnShell;
/**
* Indicate if this parton is a valence parton.
*/
bool isValence;
/**
* A number that identifies the parton in a dipole state.
*/
int theNumber;
/**
* The mass of this parton.
*/
mutable Energy theMass;
/**
* The current shadow parton.
*/
tSPartonPtr theShadow;
+ /**
+ * The virtuality for the propagator conecting the colour side of
+ * this parton.
+ */
+ Energy2 theColProp;
+
+ /**
+ * The virtuality for the propagator conecting the anti-colour side of
+ * this parton.
+ */
+ Energy2 theAcoProp;
+
protected:
/**
* Exception class for bad kinematics.
*/
struct PartonKinematicsException: public Exception {};
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
Parton & operator=(const Parton &);
};
}
template <typename T, typename Alloc>
std::vector<T,Alloc> &
expandToFit(std::vector<T,Alloc> & v,
typename std::vector<T,Alloc>::size_type indx) {
if ( indx >= v.size() ) v.resize(indx + 1);
return v;
}
template <typename T, typename Alloc>
T & forceAt(std::vector<T,Alloc> & v,
typename std::vector<T,Alloc>::size_type indx) {
return expandToFit(v, indx)[indx];
}
#endif /* DIPSY_Parton_H */
diff --git a/DIPSY/ShadowParton.cc b/DIPSY/ShadowParton.cc
--- a/DIPSY/ShadowParton.cc
+++ b/DIPSY/ShadowParton.cc
@@ -1,576 +1,585 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the ShadowParton class.
//
#include "ShadowParton.h"
#include "Parton.h"
#include "DipoleState.h"
#include "DipoleEventHandler.h"
#include "Dipole.h"
#include "ImpactParameters.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Utilities/Debug.h"
#include "ThePEG/Utilities/Throw.h"
#include "ThePEG/Utilities/EnumIO.h"
#include "ThePEG/Utilities/Current.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Utilities/DebugItem.h"
using namespace DIPSY;
ShadowParton::ShadowParton(Parton & p)
: theOriginal(&p), thePlus(p.plus()),
thePT(p.pT()), thePT0(p.pT()), theMass(p.mass()), theMinus(p.minus()),
theY(p.y()), theY0(p.y()), theFlavour(p.flavour()),
theEmissionFactor(ZERO), theRes(ZERO), isLocked(false),
hasInteracted(false), isOnShell(false),
isValence(p.valence()), hasColourSibling(false), memememe(false) {}
ShadowParton::~ShadowParton() {}
void ShadowParton::setupParton() {
if ( tSPartonPtr sp = original()->shadow() ) {
sp->theNext = this;
thePrevious = sp;
}
original()->shadow(this);
}
SPartonPtr ShadowParton::createValence(Parton & p) {
SPartonPtr sp = new_ptr(ShadowParton(p));
sp->setupParton();
sp->isValence = true;
return sp;
}
void ShadowParton::setupEmission(Parton & emitter,
Parton & produced, Parton & recoiler) {
SPartonPtr se = new_ptr(ShadowParton(emitter));
se->setupParton();
SPartonPtr sp = new_ptr(ShadowParton(produced));
sp->setupParton();
se->theSibling = sp;
se->hasColourSibling =
( emitter.dipoles().first &&
emitter.dipoles().first == produced.dipoles().second );
sp->theParent = this;
sp->theSibling = se;
sp->hasColourSibling = !se->hasColourSibling;
theChild = sp;
InvEnergy2 d2 = se->dist2(*sp);
se->theRes = sp->theRes = alphaSr(d2)*d2;
se->theEmissionFactor = sp->theEmissionFactor = se->res()/UseRandom::rnd();
// se->theRes = sp->theRes = d2;
// se->theEmissionFactor = sp->theEmissionFactor = alphaS(d2)*d2/UseRandom::rnd();
}
void ShadowParton::lock() {
if ( mother() ) mother()->lock();
isLocked = true;
}
void ShadowParton::unlock() {
if ( mother() && locked() ) mother()->unlock();
isLocked = false;
}
tSPartonPtr ShadowParton::last() {
if ( next() ) return next();
return this;
}
tSPartonPtr ShadowParton::initial() {
if ( previous() ) return previous();
return this;
}
tSPartonPtr ShadowParton::valenceMother() {
if ( mother() ) return mother()->valenceMother();
return this;
}
tcSPartonPtr ShadowParton::last() const {
if ( next() ) return next();
return this;
}
double ShadowParton::alphaSr(InvEnergy2 r2) {
return Current<DipoleEventHandler>()->alphaSr(sqrt(r2));
}
// tcSPartonPtr ShadowParton::resolve(InvEnergy2 r2, tPartonPtr stopp) const {
// if ( resolved(r2, stopp) || !mother() ) return this;
// return mother()->resolve(r2, stopp);
// }
tSPartonPtr ShadowParton::resolve(InvEnergy2 r2) {
if ( resolved(r2) || !mother() ) return this;
return mother()->resolve(r2);
}
tSPartonPtr ShadowParton::resolveInteraction(InvEnergy2 r2) {
if ( resolved(r2)
|| !mother()
|| forceEmission()
|| onShell()
|| ( sibling() && sibling()->interacted() ) ) return this;
return mother()->resolveInteraction(r2);
}
void ShadowParton::pTplus(const TransverseMomentum & qt, Energy qp) {
pT(qt);
plus(qp);
minus(mt2()/plus());
y(log(mt()/plus()));
}
void ShadowParton::setOnShell(int mode, const Propagator & incprop) {
if ( mode < 0 ) return;
onShell(true);
theIncomingPropagator = incprop;
if ( mode <= 0 ) return;
original()->plus(plus());
original()->pT(pT());
original()->minus(original()->mt2()/plus());
original()->y(log(original()->mt()/original()->plus()));
original()->onShell(true);
+ Energy2 kt2in = incprop.p.perp2();
+ Energy2 kt2out = (incprop.p - momentum()).perp2();
+ if ( colourSibling() ) {
+ original()->acoPropagator(kt2out);
+ original()->colPropagator(kt2in);
+ } else {
+ original()->acoPropagator(kt2in);
+ original()->colPropagator(kt2out);
+ }
}
void ShadowParton::unsetOnShell() {
if ( onShell() ) {
original()->onShell(false);
onShell(false);
}
}
void ShadowParton::interact() {
if ( interacted() ) return;
hasInteracted = true;
if ( mother() ) mother()->interact();
}
void ShadowParton::resetInteracted() {
if ( !mother() ) {
pT(pT0());
y(y0());
plus(mt()*exp(-y()));
minus(mt()*exp(y()));
}
hasInteracted = false;
theInteractions.clear();
onShell(false);
if ( next() ) next()->resetInteracted();
if ( child() ) child()->resetInteracted();
}
void ShadowParton::reset() {
if ( !mother() ) {
pT(pT0());
y(y0());
plus(mt()*exp(-y()));
minus(mt()*exp(y()));
}
onShell(false);
theInteractions.clear();
hasInteracted = false;
theInteractionRoots.clear();
if ( next() ) next()->reset();
if ( child() ) child()->reset();
}
void ShadowParton::insertInteraction(int i) {
// If this parton has been set on-shell by a previous interaction we
// do not have to look further. Similarly if the sibling has
// interacted.
if ( onShell()
|| ( sibling() && sibling()->interacted() )
|| !mother() ) {
interactionRoot(i);
}
// Otherwise we try with the mother instead.
else mother()->insertInteraction(i);
}
bool ShadowParton::checkInteractionRoot(int i) const {
if ( onShell() ) return true;
if ( mother() ) {
if ( hasInteractionRoot(i) ) return false;
else return mother()->checkInteractionRoot(i);
} else
return hasInteractionRoot(i);
}
void ShadowParton::rejectInteraction(int i) {
if ( hasInteractionRoot(i) ) theInteractionRoots.erase(i);
else mother()->rejectInteraction(i);
}
void ShadowParton::acceptInteraction(int i) {
hasInteracted = true;
if ( !hasInteractionRoot(i) ) mother()->acceptInteraction(i);
}
void ShadowParton::makeIncoming() {
if ( interacted() && onShell() ) onShell(false);
else if ( mother() ) mother()->makeIncoming();
}
bool ShadowParton::setEmissionMomenta(const LorentzMomentum & p,
bool forced) {
static DebugItem plusevo("DIPSY::PlusEvo", 6);
// if ( plusevo )
return setEmissionMomentaPlus(p, forced);
// *** TODO *** Think this through! If the emission unresolved but
// anyway should be done because a valence need to be put on shell,
// or a subsequent emission needs it, the generated pt is ignored
// and the emitted parton and the continuing propagator will share
// the incoming pt, while the generated rapidity of the emission
// remains untouched.
// *** TODO *** Think about the mass of the propagator.
TransverseMomentum qT = parent()? pT0(): sibling()->pT0();
if ( forced ) qT = TransverseMomentum(-p.x()/2.0, -p.y()/2.0);
if ( parent() ) {
// If this parton was emitted, pretend it was actually he emitter
// and continues as a propagator. It will retain its original
// rapidity, but will get the transverse momentum of the incoming
// propagator.
pT(TransverseMomentum(p.x(), p.y()) + qT);
y(y0());
plus(mt()*exp(-y()));
// The sibling will get minus the original transverse momentum and
// what ever is left of the positive light-cone momenta. (return
// false if not enough to put on shell).
sibling()->pT(-qT);
sibling()->plus(p.plus() - plus());
if ( sibling()->plus() <= ZERO ) return false;
sibling()->minus(sibling()->mt2()/sibling()->plus());
sibling()->y(log(sibling()->mt()/sibling()->plus()));
// The propagators negative light-cone momentum is trivial,
// minus(p.minus() - sibling()->minus());
} else {
// If this parton was assumed emitter in the evolution, life is simpler.
sibling()->pT(-qT);
sibling()->y(sibling()->y0());
sibling()->plus(sibling()->mt()*exp(-sibling()->y()));
sibling()->minus(sibling()->mt2()/sibling()->plus());
pT(TransverseMomentum(p.x(), p.y()) + qT);
plus(p.plus() - sibling()->plus());
if ( plus() <= ZERO ) return false;
// minus(mt2()/plus());
y(log(mt()/plus()));
}
minus(p.minus() - sibling()->minus());
return true;
}
bool ShadowParton::setEmissionMomentaPlus(const LorentzMomentum & p, bool forced) {
static DebugItem noforce("DIPSY::NeverForceKT", 6);
static DebugItem forcektz("DIPSY::ForceKTZ", 6);
// *** TODO *** Think this through! What is actually generated in
// the momentum space sense is lightcone fraction and transverese
// momentum. So the emission will always succeed.
TransverseMomentum qT = parent()? -pT0(): sibling()->pT0();
double z = plus0()/(plus0() + sibling()->plus0());
if ( noforce ) forced = false;
double ffac = 0.5;
if ( forcektz) ffac = 1.0 - z;
if ( forced ) qT = ffac*TransverseMomentum(p.x(), p.y());
sibling()->plus((1.0 - z)*p.plus());
if ( sibling()->plus() <= ZERO ) return false;
sibling()->pT(qT);
sibling()->minus(sibling()->mt2()/sibling()->plus());
sibling()->y(log(sibling()->mt()/sibling()->plus()));
plus(z*p.plus());
if ( plus() <= ZERO ) return false;
pT(TransverseMomentum(p.x(), p.y()) - qT);
y(log(mt()/plus()));
minus(p.minus() - sibling()->minus());
return true;
}
bool ShadowParton::orderfail(const Propagator & prop) const {
Energy pos = colourSibling()? prop.acopos: prop.colpos;
Energy neg = colourSibling()? prop.aconeg: prop.colneg;
Energy2 ptp = colourSibling()? prop.acoptp: prop.colptp;
Energy2 ptnow = prop.p.perp2();
Energy2 ptnxt = (prop.p - sibling()->momentum()).perp2();
if ( ptnow >= max(ptp, ptnxt) || ptnow <= min(ptp, ptnxt) )
return false;
return sibling()->plus() > pos || sibling()->minus() < neg;
}
ShadowParton::Propagator ShadowParton::
propagator(InvEnergy2 r2, int mode) {
static DebugItem unorderlock("DIPSY::UnorderLock", 6);
Propagator prop;
// If we reach a parton that has been set on shell, we will simply
// return its momentum and set it off-shell.
if ( onShell() ) {
if ( mode >= 0 ) unsetOnShell();
return momentum();
}
// If this was a valence, ask the DipoleState about its momentum.
if ( !mother() ) return dipoleState().incomingMomentum(this, mode);
// Now, if this emission was not resolved then simply return the
// propagator of the mother. However, if the emission is needed for
// subsequent interactions or if the emitted parton was a valence,
// we need to force it. with a special procedure.
bool forced = forceEmission();
bool unresolved = !resolved(r2);
// First we check if a resolved emission is possible.
if ( !unresolved ) {
// Get the propagator of the mother with the new resolution
// scale. But don't put anything on-shell yet in case the emission
// is rejected later.
prop = mother()->propagator(res(), -1);
// First check that it was at all kinematically possible perform
// the emission.
if ( !prop.fail && setEmissionMomenta(prop.p, false) ) {
// OK. That seemed to work, but we must also check the ordering.
// Now depending on the colour line of the emitted parton, it
// must be ordered in light-cone momenta with previous partons
// on the same side. If that is not the case, the emissionis
// marked unresolved.
if ( !( unorderlock && sibling() && sibling()->locked() ) )
unresolved = orderfail(prop);
} else {
// Since the emission could not be performed, we flag it
// unresolved.
unresolved = true;
}
}
// If the emission was really resolved, we get the incoming
// propagator again, but this time put stuff on-shell. Then we
// return the outgoing propagator, after setting the ordering for
// the subsequent emissions, and we're done.
if ( !unresolved ) {
if ( mode >= 0 ) prop = mother()->propagator(res(), mode);
sibling()->setOnShell(mode, prop);
return setup(prop);
}
// OK, so it was unresolved. Get the incoming propagator with the
// previous resolution scale. If it was not forced, then let it go.
prop = mother()->propagator(r2, mode);
if ( !forced ) return prop;
// However, if we have to force it we need to check that it really works.
if ( !setEmissionMomenta(prop.p, true) ) {
// If it doesn't work, just give up the whole thing and fail the
// whole propagator chain.
prop.fail = true;
return prop;
}
// If it does work we set things on-shell, return the propagator and
// we're done.
sibling()->setOnShell(mode, prop);
prop.p -= sibling()->momentum();
prop.setmaxkt();
return prop;
}
ShadowParton::Propagator ShadowParton::setup(Propagator & prop) const {
if ( colourSibling() ) {
prop.acopos = sibling()->plus();
prop.aconeg = sibling()->minus();
prop.acoptp = prop.p.perp2();
} else {
prop.colpos = sibling()->plus();
prop.colneg = sibling()->minus();
prop.colptp = prop.p.perp2();
}
prop.p -= sibling()->momentum();
prop.setmaxkt();
return prop;
}
tSPartonPtr ShadowParton::findFirstOnShell() {
if ( original()->onShell() ) return this;
if ( !next() ) return tSPartonPtr();
if ( next()->colourSibling() ) {
tSPartonPtr ch = child()->findFirstOnShell();
if ( ch ) return ch;
}
return next()->findFirstOnShell();
}
tSPartonPtr ShadowParton::findSecondOnShell() {
if ( original()->onShell() ) return this;
if ( !next() ) return tSPartonPtr();
if ( !next()->colourSibling() ) {
tSPartonPtr ch = child()->findSecondOnShell();
if ( ch ) return ch;
}
return next()->findSecondOnShell();
}
Ariadne5::ClonePtr ShadowParton::clone() const {
return new_ptr(*this);
}
void ShadowParton::mirror(double yf) {
y(2.0*yf - y());
swap(thePlus, theMinus);
if ( next() ) next()->mirror(yf);
if ( child() ) child()->mirror(yf);
}
void ShadowParton::translate(const ImpactParameters & b) {
thePT = b.rotatePT(thePT);
if ( next() ) next()->translate(b);
if ( child() ) child()->translate(b);
}
void ShadowParton::rebind(const TranslationMap & trans) {
thePrevious = trans.translate(thePrevious);
theParent = trans.translate(theParent);
theSibling = trans.translate(theSibling);
theNext = trans.translate(theNext);
theChild = trans.translate(theChild);
}
DipoleState& ShadowParton::dipoleState() const {
return original()->dipoleState();
}
double ShadowParton::pTScale() const {
return Current<DipoleEventHandler>()->emitter().pTScale();
}
Energy ShadowParton::mass() const {
if ( theMass < ZERO )
theMass = CurrentGenerator::current().getParticleData(flavour())->mass();
return theMass;
}
void ShadowParton::debugme() {
// cout << "data for ShadowParton " << this << endl;
// cout << "thePosition1: " << thePosition.first*GeV
// << ", thePosition2: " << thePosition.second*GeV
// << ", thePlus: " << thePlus/GeV
// << ", thePT: " << thePT.pt()/GeV
// << ", theMinus: " << theMinus/GeV
// << ", theY: " << theY
// << ", theFlavour: " << theFlavour
// << ", hasInteracted: " << hasInteracted
// << ", isOnShell: " << isOnShell
// << ", isValence: " << isValence
// << ", theMass: " << theMass/GeV << endl;
memememe = true;
valenceMother()->debugTree("");
memememe = false;
}
void ShadowParton::checkMomentum(Sum20Momentum & sum20,
const ImpactParameters * b) const {
if ( onShell() ) {
if ( b ) sum20 -= lightCone(minus(), plus(), b->rotatePT(pT()));
else sum20 -= momentum();
}
if ( next() ) next()->checkMomentum(sum20, b);
if ( child() ) child()->checkMomentum(sum20, b);
}
void ShadowParton::debugTree(string indent) {
cerr << indent << (memememe? "==": "--")
<< (valence()? "v": "-") << (locked()? "%": "-");
if ( interactionRoot() ) {
set<int>::iterator i = theInteractionRoots.begin();
cerr << "{" << *i;
while ( ++i != theInteractionRoots.end() )
cerr << "," << *i;
cerr << "}";
}
cerr << (interacted()? "+": "-");
if ( interacting() ) {
set<int>::iterator i = theInteractions.begin();
cerr << "[" << *i;
while ( ++i != theInteractions.end() )
cerr << "," << *i;
cerr << "]";
}
cerr << (onShell()? "*": "-") << (memememe? "=>": "->");
if ( onShell() )
cerr << "[" << pT().x()/GeV << ", "
<< pT().y()/GeV << ", "
<< plus()/GeV << "]";
else if ( interacted() )
cerr << "(" << pT().x()/GeV << ", "
<< pT().y()/GeV << ", "
<< plus()/GeV << ")";
cerr << endl;
if ( indent.size() > 1 && indent[indent.size() - 1] == '\\' )
indent[indent.size() - 1] = ' ';
if ( next() && child() ) {
if ( child()->interacted() ) next()->debugTree(indent + " +");
else next()->debugTree(indent + " |");
}
if ( next() && !child() ) next()->debugTree(indent + " ");
if ( child() ) child()->debugTree(indent + " \\");
}
/*
----->
|---->
| |---->
| \---->
| |---->
| \---->
\---->
*/
void ShadowParton::persistentOutput(PersistentOStream & os) const {
os << theOriginal << ounit(thePlus, GeV)
<< ounit(thePT, GeV) << ounit(thePT0, GeV) << ounit(theMass, GeV)
<< ounit(theMinus, GeV) << theY << theY0 << theFlavour
<< thePrevious << theParent << theSibling
<< theNext << theChild
<< ounit(theEmissionFactor, 1.0/GeV2) << ounit(theRes, 1.0/GeV2)
<< hasInteracted << isOnShell << isValence << hasColourSibling;
}
void ShadowParton::persistentInput(PersistentIStream & is, int) {
is >> theOriginal >> iunit(thePlus, GeV)
>> iunit(thePT, GeV) >> iunit(thePT0, GeV) >> iunit(theMass, GeV)
>> iunit(theMinus, GeV) >> theY >> theY0 >> theFlavour
>> thePrevious >> theParent >> theSibling
>> theNext >> theChild
>> iunit(theEmissionFactor, 1.0/GeV2) >> iunit(theRes, 1.0/GeV2)
>> hasInteracted >> isOnShell >> isValence >> hasColourSibling;
}
DescribeClass<ShadowParton,Ariadne5::CloneBase>
describeDIPSYShadowParton("DIPSY::ShadowParton", "libAriadne5.so libDIPSY.so");
// Definition of the static class description member.
void ShadowParton::Init() {}
diff --git a/DIPSY/SimpleProton.cc b/DIPSY/SimpleProton.cc
--- a/DIPSY/SimpleProton.cc
+++ b/DIPSY/SimpleProton.cc
@@ -1,345 +1,356 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the SimpleProton class.
//
#include "SimpleProton.h"
#include "SimpleProtonState.h"
#include "DipoleEventHandler.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/PDT/ParticleData.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "ThePEG/Utilities/Throw.h"
#include "ThePEG/Utilities/UtilityBase.h"
#include "ThePEG/Utilities/SimplePhaseSpace.h"
#include "ThePEG/Utilities/MaxCmp.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/PDT/StandardMatchers.h"
#include "ThePEG/Utilities/Current.h"
#include "Ariadne/Config/ColourInfo.h"
+#include "ParticleInfo.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "gsl/gsl_sf_erf.h"
using namespace DIPSY;
SimpleProton::SimpleProton()
: theR(0.0*InvGeV), theR0(0.0*InvGeV), theRapidityWidth(0.0), theAngleWidth(0.0),
theConnected(0), theCollapseTolerance(0.1*GeV) {}
SimpleProton::~SimpleProton() {}
IBPtr SimpleProton::clone() const {
return new_ptr(*this);
}
IBPtr SimpleProton::fullclone() const {
return new_ptr(*this);
}
InvEnergy SimpleProton::R() const {
return theR > ZERO? theR: Current<DipoleEventHandler>()->rMax();
}
InvEnergy SimpleProton::r0() const {
return theR0 > ZERO? theR0: Current<DipoleEventHandler>()->baryonSize();
}
void SimpleProton::initialize(const DipoleEventHandler & eh) {
tcPDPtr gluon = generator()->getParticleData(ParticleID::g);
if ( remdec && !remdec->canHandle(particle(), gluon ) )
Throw<InitException>()
<< "The given remnant decayer could not handle the particle "
<< "in this wave function.";
}
Energy2 SimpleProton::m2() const {
return sqr(particle()->mass());
}
DipoleStatePtr SimpleProton::
generate(const DipoleEventHandler & eh, Energy plus) {
InvEnergy r = rndShiftGauss();
Energy minus = m2()/plus;
return new_ptr(SimpleProtonState(eh, plus, minus, theAngleWidth, theRapidityWidth,
connectOption(), new_ptr(WFInfo(this, r)), 1.0));
}
InvEnergy SimpleProton::rndShiftGauss() const {
InvEnergy2 s1 = R()*r0()*sqrt(Constants::pi);
InvEnergy2 s2 = sqr(R());
InvEnergy2 s3 = s1*gsl_sf_erf(r0()/R());
do {
InvEnergy2 rsum = UseRandom::rnd()*(s1 + s2 + s3);
if ( s1 > rsum )
return R()*UseRandom::rndGauss() + r0();
else if ( s1 + s2 > rsum )
return R()*sqrt(-log(UseRandom::rnd())) + r0();
InvEnergy r = r0() - R()*UseRandom::rndGauss();
if ( r > 0.0*InvGeV && r/r0() > UseRandom::rnd() ) return r;
} while ( true );
return 0.0*InvGeV;
}
void SimpleProton::setParticle(PDPtr p) {
if ( !BaryonMatcher::Check(abs(p->id())) )
throw InterfaceException()
<< "Cannot set " << p->name()
<< " as particle for a proton wave function. "
<< "Only baryons are allowed." << Exception::warning;
WaveFunction::setParticle(p);
}
void SimpleProton::fixValence(Step & step, tPPtr particle, const vector<PPtr> & val) const {
if ( connectOption() != 0 || !remdec ) return;
// If the hadron is not colour connected to the rest of the state,
// then try to collapse it into the original hadron.
if ( collapseToProton(step, particle, val) ) return;
// Otherwise first find the gluon to split into a q and qq pair and split it.
splitValence(step, particle, val);
}
bool SimpleProton::collapseToProton(Step & step, tPPtr p, const vector<PPtr> & val) const {
if ( val.size() != 3 ) return false;
if ( val[0]->colourLine() == val[1]->antiColourLine() ) {
if ( val[1]->colourLine() != val[2]->antiColourLine() ) return false;
if ( val[2]->colourLine() != val[0]->antiColourLine() ) return false;
} else {
if ( val[0]->colourLine() != val[2]->antiColourLine() ) return false;
if ( val[2]->colourLine() != val[1]->antiColourLine() ) return false;
if ( val[1]->colourLine() != val[0]->antiColourLine() ) return false;
}
// Get an instance of the hadron and check that its mass is not too different.
Lorentz5Momentum pv = Utilities::sumMomentum(val);
if ( abs(pv.mass() - p->mass()) > collapseTolerance() ) return false;
// get the total momentum of the collision and determine how to
// boost it to put the hadron on-shell.
Lorentz5Momentum ptot = step.collision()->incoming().first->momentum() +
step.collision()->incoming().second->momentum();
Lorentz5Momentum pr = ptot - pv; // This is the recoil system to be used for momentum shuffling
LorentzRotation Rshift;
try {
p->setMomentum(DipoleState::changeMass(pv, p->mass(), pr, &Rshift));
} catch ( ImpossibleKinematics e ) {
return false;
}
p->setVertex((val[0]->vertex() + val[1]->vertex() + val[2]->vertex())/3.0);
step.addDecayProduct(val.begin(), val.end(), p);
step.collision()->incoming().first->transform(Rshift);
step.collision()->incoming().second->transform(Rshift);
return true;
}
bool SimpleProton::splitValence(Step & step, tPPtr p, const vector<PPtr> & val) const {
// First get the total momentum of the collision.
LorentzMomentum ptot = step.collision()->incoming().first->momentum() +
step.collision()->incoming().second->momentum();
// Now we choose the valence gluon with the smallest transverse
// momentum. Primarily we only consider those valence gluons which
// can be split into massive quarks and di-quarks, if this is not
// possible also others are considered with quark masses put to zero
// and hoping for the best.
MinCmp<Energy2,tPPtr> sel, primsel;
LorentzPoint vnew;
for ( int i = 0, N = val.size(); i < N; ++i ) {
vnew += val[i]->vertex()/double(N);
if ( val[i]->id() == ParticleID::g ) {
sel(val[i]->momentum().perp2(), val[i]);
if ( ptot.m() - (ptot - val[i]->momentum()).m() > 2.0*p->mass() )
primsel(val[i]->momentum().perp2(), val[i]);
}
}
tPVector valence(1, sel.index());
if ( valence.empty() ) return false;
if ( primsel.index() ) valence[0] = primsel.index();
- int colindx = Ariadne5::ColourInfo::colIndex(*valence[0]);
- int acoindx = Ariadne5::ColourInfo::acoIndex(*valence[0]);
+ // int colindx = Ariadne5::ColourInfo::colIndex(*valence[0]);
+ // int acoindx = Ariadne5::ColourInfo::acoIndex(*valence[0]);
tPPtr coln = valence[0]->colourNeighbour(val.begin(), val.end());
tColinePtr coll = valence[0]->colourLine();
tColinePtr acol = valence[0]->antiColourLine();
+ tcPartonPtr colp = ParticleInfo::getParton(*valence[0]);
+ tcPartonPtr acop = ParticleInfo::getParton(*valence[0]);
if ( coln && (valence[0]->momentum() + coln->momentum()).m() < p->mass() ) {
valence.push_back(coln);
acol = coln->antiColourLine();
- acoindx = Ariadne5::ColourInfo::acoIndex(*coln);
+ // acoindx = Ariadne5::ColourInfo::acoIndex(*coln);
+ acop = ParticleInfo::getParton(*coln);
}
coln = valence[0]->antiColourNeighbour(val.begin(), val.end());
if ( coln && (valence[0]->momentum() + coln->momentum()).m() < p->mass() ) {
valence.push_back(coln);
coll = coln->colourLine();
- colindx = Ariadne5::ColourInfo::colIndex(*coln);
+ // colindx = Ariadne5::ColourInfo::colIndex(*coln);
+ colp = ParticleInfo::getParton(*coln);
}
if ( valence.size() == 3 && ( valence[1] == valence[2] || coll == acol ) ) {
valence = tPVector(1, valence[0]);
coll = valence[0]->colourLine();
acol = valence[0]->antiColourLine();
- colindx = Ariadne5::ColourInfo::colIndex(*valence[0]);
- acoindx = Ariadne5::ColourInfo::acoIndex(*valence[0]);
+ // colindx = Ariadne5::ColourInfo::colIndex(*valence[0]);
+ // acoindx = Ariadne5::ColourInfo::acoIndex(*valence[0]);
+ colp = ParticleInfo::getParton(*valence[0]);
+ acop = ParticleInfo::getParton(*valence[0]);
}
// Now find the momentum of the recoil system used to put the remnants on-shell.
Lorentz5Momentum pv = Utilities::sumMomentum(valence);
LorentzMomentum pr = ptot - pv;
Energy maxmass = sqrt(sqr(ptot.m() - pr.mt()) - pr.perp2());
const SimpleBaryonRemnantDecayer::BaryonContent & bi = remdec->getBaryonInfo(p->dataPtr());
while ( true ) {
// Select remnant flavours
pair<int,int> r = bi.flavsel.select(UseRandom::current());
PPtr qv = getParticleData(r.first*bi.sign)->produceParticle();
PPtr dqv = getParticleData(r.second*bi.sign)->produceParticle();
// Generate transverse momenum and energy splitting.
TransverseMomentum ptv = remdec->pTGenerator()->generate();
Energy2 mt02 = qv->momentum().mass2() + ptv.pt2();
Energy2 mt12 = dqv->momentum().mass2() + ptv.pt2();
// If still too large recoil mass we put quark masses to zero and hope for the best.
if ( maxmass < 2.0*p->mass() ) mt02 = mt12 = ptv.pt2();
double z = remdec->zGenerator().generate(dqv->dataPtr(), qv->dataPtr(), mt12);
Energy mv = sqrt(mt02/(1.0 - z) + mt12/z);
// Make sure the mass is small enough to be kinamatically allowd.
if ( mv >= maxmass ) continue;
// Calculate the momenta of the remnants and how much the rest
// frame of the collision has moved due to momentum reshuffling.
LorentzMomentum pqv = lightCone((1.0 - z)*mv, mt02/((1.0 - z)*mv), ptv);
LorentzMomentum pdqv = lightCone(z*mv, mt12/(z*mv), -ptv);
LorentzRotation Rshift;
Lorentz5Momentum pvnew = DipoleState::changeMass(pv, mv, pr, &Rshift);
// LorentzRotation Rr = Utilities::transformFromCMS(pvnew);
LorentzRotation Rr(pvnew.x()/pvnew.e(), pvnew.y()/pvnew.e(),
pvnew.z()/pvnew.e(), pvnew.e()/mv);
qv->setMomentum(Rr*pqv);
if ( qv->hasColour() ) {
coll->addColoured(qv);
- qv->getInfo().push_back(new_ptr(Ariadne5::ColourInfo(colindx, 0)));
+ // qv->getInfo().push_back(new_ptr(Ariadne5::ColourInfo(colindx, 0)));
+ qv->getInfo().push_back(new_ptr(ParticleInfo(colp)));
} else {
acol->addAntiColoured(qv);
- qv->getInfo().push_back(new_ptr(Ariadne5::ColourInfo(0, acoindx)));
+ // qv->getInfo().push_back(new_ptr(Ariadne5::ColourInfo(0, acoindx)));
+ qv->getInfo().push_back(new_ptr(ParticleInfo(acop)));
}
dqv->setMomentum(Rr*pdqv);
if ( dqv->hasColour() ) {
coll->addColoured(dqv);
- dqv->getInfo().push_back(new_ptr(Ariadne5::ColourInfo(colindx, 0)));
+ // dqv->getInfo().push_back(new_ptr(Ariadne5::ColourInfo(colindx, 0)));
+ dqv->getInfo().push_back(new_ptr(ParticleInfo(colp)));
} else {
acol->addAntiColoured(dqv);
- dqv->getInfo().push_back(new_ptr(Ariadne5::ColourInfo(0, acoindx)));
+ // dqv->getInfo().push_back(new_ptr(Ariadne5::ColourInfo(0, acoindx)));
+ dqv->getInfo().push_back(new_ptr(ParticleInfo(acop)));
}
// Lorentz5Momentum pvcheck = qv->momentum() + dqv->momentum();
qv->setVertex(vnew);
dqv->setVertex(vnew);
step.addDecayProduct(valence.begin(), valence.end(), qv);
step.addDecayProduct(valence.begin(), valence.end(), dqv);
step.collision()->incoming().first->transform(Rshift);
step.collision()->incoming().second->transform(Rshift);
DipoleState dummy;
dummy.checkFSMomentum(step);
return true;
}
return false;
}
void SimpleProton::persistentOutput(PersistentOStream & os) const {
os << ounit(theR, InvGeV) << ounit(theR0, InvGeV)
<< ounit(theRapidityWidth, 1.0) << ounit(theAngleWidth, 1.0) << theConnected
<< ounit(theCollapseTolerance, GeV) << remdec;
}
void SimpleProton::persistentInput(PersistentIStream & is, int) {
is >> iunit(theR, InvGeV) >> iunit(theR0, InvGeV)
>> iunit(theRapidityWidth, 1.0) >> iunit(theAngleWidth, 1.0) >> theConnected
>> iunit(theCollapseTolerance, GeV) >> remdec;
}
// Static variable needed for the type description system in ThePEG.
#include "ThePEG/Utilities/DescribeClass.h"
DescribeClass<SimpleProton,DIPSY::WaveFunction>
describeDIPSYSimpleProton("DIPSY::SimpleProton", "libAriadne5.so libDIPSY.so");
void SimpleProton::Init() {
static ClassDocumentation<SimpleProton> documentation
("The SimpleProton class represents the unevolved proton wave function "
"described in terms of an equilatteral triangle of dipoles with a size "
"distributed as a Gaussian.");
static Parameter<SimpleProton,InvEnergy> interfaceR
("R",
"The width of the Gaussian distribution in units of inverse GeV. If zero, "
"the value of <interface>DipoleEventHandler::RMax</interface> of the "
"controlling event handler will be used.",
&SimpleProton::theR, InvGeV, 0.0*InvGeV, 0.0*InvGeV, 0.0*InvGeV,
true, false, Interface::lowerlim);
static Parameter<SimpleProton,InvEnergy> interfaceR0
("R0",
"The shift in the average of the Gaussian distribution in units of "
"inverse GeV. If zero, <interface>DipoleEventHandler::BaryonSize</interface> "
"is used instead.",
&SimpleProton::theR0, InvGeV, 0.0*InvGeV, 0.0*InvGeV, 0.0*InvGeV,
true, false, Interface::lowerlim);
static Parameter<SimpleProton, double> interfaceRapidityWidth
("RapidityWidth",
"The width of the gaussian smearing in rapidity of the individual partons "
"in the starting triangle.",
&SimpleProton::theRapidityWidth, 1.0, 0.2, 0.0, 0.0,
true, false, Interface::lowerlim);
static Parameter<SimpleProton, double> interfaceAngleWidth
("AngleWidth",
"The width in radians of the gaussian smearing of the shape of the triangle. ",
&SimpleProton::theAngleWidth, 1.0, 0.2, 0.0, 0.0,
true, false, Interface::lowerlim);
static Switch<SimpleProton,int> interfaceConnected
("Connected",
"If the three dipoles are connected or not.",
&SimpleProton::theConnected, 0, true, false);
static SwitchOption interfaceConnectedConnected
(interfaceConnected,
"Connected",
"Three gluons.",
0);
static SwitchOption interfaceDisconnected
(interfaceConnected,
"Disconnected",
"6 quarks, pairwise on top of each other.",
1);
static Parameter<SimpleProton,Energy> interfaceCollapseTolerance
("CollapseTolerance",
"The maximum mass difference between the valence system and the "
"hadron allowed for collapsing into the original hadron after "
"the evolution.",
&SimpleProton::theCollapseTolerance, GeV, 0.1*GeV, 0.0*GeV, 0*GeV,
true, false, Interface::lowerlim);
static Reference<SimpleProton,SimpleBaryonRemnantDecayer> interfaceRemnantDecayer
("RemnantDecayer",
"A RemnantDecayer object which is able to produce remnants for the particle ",
&SimpleProton::remdec, false, false, true, true, true);
}

File Metadata

Mime Type
text/x-diff
Expires
Sat, May 3, 6:35 AM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4983092
Default Alt Text
(115 KB)

Event Timeline