Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F10881423
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
10 KB
Subscribers
None
View Options
diff --git a/src/P8Particles.pl.in b/src/P8Particles.pl.in
--- a/src/P8Particles.pl.in
+++ b/src/P8Particles.pl.in
@@ -1,201 +1,217 @@
#!@PERL@ -w
# @configure_input@
#
use strict;
sub getattr($$);
sub fixname($);
my @lines = (<>);
chomp(@lines);
my $file = "@lines";
my @particlecmds;
my @decaycmds;
my %pnames;
my %allnames;
my %colours;
my %constm = ( 1 => 0.325,
-1 => 0.325,
2 => 0.325,
-2 => 0.325,
3 => 0.5,
-3 => 0.5,
4 => 1.6,
-4 => 1.6,
5 => 5.0,
-5 => 5.0,
21 => 0.0);
while ( $file =~ /<particle(.*?)>(.*?)<\/particle>/g ) {
my $tags = $1;
my $content = $2;
my $id = getattr($tags, "id");
next if !$id;
next if $id == 82 || $id == 81;
my $name;
my $aname;
my $spin = getattr($tags, "spinType");
my $charge = getattr($tags, "chargeType");
my $colour = getattr($tags, "colType");
$colour = 0 if !$colour;
if ( $colour == 1 ) {
$colour = 3;
} elsif ( $colour == -1 ) {
$colour = -3;
} elsif ( $colour == 2 ) {
$colour = 8;
}
my $mass = getattr($tags, "m0");
my $width = getattr($tags, "mWidth");
$width = 0 if !$width;
my $tau = getattr($tags, "tau0");
$tau = 0 if !$tau;
my $minmass = getattr($tags, "mMin");
my $maxmass = getattr($tags, "mMax");
my $stable = 1;
my $widthcut = -1.0;
$name = fixname(getattr($tags, "name"));
$aname = fixname(getattr($tags, "antiName"));
$name .= "#" if defined($allnames{$name});
$aname .= "#" if $aname && defined($allnames{$aname});
$allnames{$name} = 1;
$allnames{$aname} = 1 if $aname;
while ( $content =~ /<channel(.*?)\/>/g ) {
$stable = 0;
push @decaycmds, "$id $1";
}
my $pclass = "ThePEG::ParticleData";
my $cmass = "";
if ( abs($id) < 6 || $id == 21 ) {
$pclass = "ThePEG::ConstituentParticleData";
$cmass = " $constm{$id}";
} elsif ( $id > 1000 && $id < 10000 && ($id/10)%10 == 0 ) {
my $id1 = ($id/1000)%10;
my $id2 = ($id/100)%10;
if ( abs($id1) < 6 && abs($id2) < 6 ) {
$pclass = "ThePEG::ConstituentParticleData";
$constm{$id} = $constm{$id1} + $constm{$id2};
$cmass = " $constm{$id}";
}
}
if ( abs($id) == 11 || abs($id) == 13 || $id == 22 || $id == 111 ||
abs($id) == 2112 || abs($id) == 2212 ) {
$pclass = "ThePEG::BeamParticleData"
}
$pnames{$id} = $name;
$colours{$id} = $colour;
push @particlecmds, "create $pclass $name";
push @particlecmds, "setup $name $id $name $mass $width "
. "$widthcut $tau $charge $colour $spin $stable$cmass";
- push @particlecmds, "set $name:WidthLoCut " .
+ push @particlecmds, "newdef $name:WidthCut " .
+ ($maxmass - $mass)
+ if $maxmass && $maxmass - $mass > 0 && $minmass && $mass - $minmass > 0 &&
+ $maxmass - $mass > $mass - $minmass;
+ push @particlecmds, "newdef $name:WidthCut " .
+ ($mass - $minmass)
+ if $maxmass && $maxmass - $mass > 0 && $minmass && $mass - $minmass > 0 &&
+ $maxmass - $mass <= $mass - $minmass;
+ push @particlecmds, "newdef $name:WidthLoCut " .
($mass - $minmass) if $minmass && $mass - $minmass > 0;
- push @particlecmds, "set $name:WidthUpCut " .
+ push @particlecmds, "newdef $name:WidthUpCut " .
($maxmass - $mass) if $maxmass && $maxmass - $mass > 0;
if ( $aname ) {
$id = 0 - $id;
$charge = 0 - $charge;
$colour = 0 - $colour if $colour == 3 || $colour == -3;
$pnames{$id} = $aname;
$colours{$id} = $colour;
push @particlecmds, "create $pclass $aname";
push @particlecmds, "setup $aname $id $aname $mass "
. "$width $widthcut $tau $charge $colour $spin $stable$cmass";
- push @particlecmds, "set $aname:WidthLoCut " .
+ push @particlecmds, "newdef $aname:WidthCut " .
+ ($maxmass - $mass)
+ if $maxmass && $maxmass - $mass > 0 && $minmass && $mass - $minmass > 0
+ && $maxmass - $mass > $mass - $minmass;
+ push @particlecmds, "newdef $aname:WidthCut " .
+ ($mass - $minmass)
+ if $maxmass && $maxmass - $mass > 0 && $minmass && $mass - $minmass > 0
+ && $maxmass - $mass <= $mass - $minmass;
+ push @particlecmds, "newdef $aname:WidthLoCut " .
($mass - $minmass) if $minmass && $mass - $minmass > 0;
- push @particlecmds, "set $aname:WidthUpCut " .
+ push @particlecmds, "newdef $aname:WidthUpCut " .
($maxmass - $mass) if $maxmass && $maxmass - $mass > 0;
push @particlecmds,
"makeanti $name $aname";
}
}
foreach my $cmd (@particlecmds) {
print "$cmd\n";
}
foreach my $dec ( @decaycmds ) {
my @words = split ' ',$dec;
my $id = $words[0];
my $onmode = getattr($dec, "onMode");
my $memode = getattr($dec, "meMode");
if ( $memode ) {
$memode = "/TheP8I/Decayers/DecayMECode$memode";
} else {
$memode = "/TheP8I/Decayers/FlatDecayer";
}
my $brat = getattr($dec, "bRatio");
my @products = split(' ', getattr($dec, "products"));
my $totcol = 0;
my $children;
foreach my $p ( @products ) {
if ( $p == 81 ) {
if ( ($id/100)%10 == 0 ) {
$p = (-$id/10)%10;
}
elsif ( ($id/100)%10 >= ($id/10)%10 ) {
$p = 100*(($id/10)%100) + 3;
}
else {
$p = 1000*(($id/10)%10) + 100*(($id/100)%10) + 1;
}
}
my $sep = ",";
if ( $totcol ) {
if (defined($colours{$p}) && $colours{$p} + $totcol == 0 ) {
$sep = "=";
} elsif ( !defined($colours{$p}) ) {
print STDERR "HallÅÅÅ $p\n";
}
$totcol = 0;
} else {
$totcol = $colours{$p} if defined($colours{$p}) && $colours{$p} != 8;
}
if ( $p == 83 || $p == -83 ) {
$memode .= "G";
}
if ( $p == 82 || $p == 83 ) {
$p = "?MatchLightQuark";
}
elsif ( $p == -82 || $p == -83 ) {
$p = "?MatchLightAntiQuark";
}
else {
$p = $pnames{$p};
}
if ( !$children ) {
$children ="$p";
} else {
$children .= "$sep$p";
}
}
print "decaymode $pnames{$id}->$children; $brat 1 $memode\n";
}
sub getattr($$) {
my $string = $_[0];
my $tag = $_[1];
my $ret;
if ( $string =~ /$tag\w*=\w*"(.*?)"/ ) {
$ret = $1;
}
return $ret;
}
sub fixname($) {
my $name = $_[0];
if ( $name ) {
$name =~ tr/[]/{}/;
$name =~ s/J\/psi/Jpsi/g;
}
return $name;
}
diff --git a/src/TheP8IDefaults.in b/src/TheP8IDefaults.in
--- a/src/TheP8IDefaults.in
+++ b/src/TheP8IDefaults.in
@@ -1,80 +1,84 @@
rrmdir /TheP8I
mkdir /TheP8I
mkdir /TheP8I/Decayers/
cd /TheP8I/Decayers/
cp /Defaults/Decayers/Flat FlatDecayer
cp /Defaults/Decayers/OmegaPhi3Pi DecayMECode1
# 22: weak decay; if there is a quark spectator system it collapses to one
# hadron; for leptonic/semileptonic decays the V-A matrix element is used,
# for hadronic decays simple phase space
cp /Defaults/Decayers/WeakToHadrons DecayMECode22
# 23 : as 22, but require at least three particles in decay
cp /Defaults/Decayers/WeakToHadrons DecayMECode23
# 21: decay to phase space, but weight up neutrino_tau spectrum in tau decay
cp /Defaults/Decayers/Flat DecayMECode21
# 103: reserved for the description of partial widths of resonances
cp /Defaults/Decayers/Flat DecayMECode103
# 11: Dalitz decay into one particle, in addition to the lepton pair
# (also allowed to specify a quark-antiquark pair that should collapse
# to a single hadron)
cp /Defaults/Decayers/Flat DecayMECode11
# 13: double Dalitz decay into two lepton pairs
cp /Defaults/Decayers/Flat DecayMECode13
# 2: polarization in V -> PS + PS (V = vector, PS = pseudoscalar),
# when V is produced by PS -> PS + V or PS -> gamma + V
cp /Defaults/Decayers/V2PP DecayMECode2
# 12: Dalitz decay into two or more particles in addition to the lepton pair
cp /Defaults/Decayers/Flat DecayMECode12
# 31 : decays of type B -> gamma X, very primitive simulation where X
# is given in terms of its flavour content, the X multiplicity is picked
# according to a geometrical distribution with average number 2, and the
# photon energy spectrum is weighted up relative to pure phase space
cp /Defaults/Decayers/Flat DecayMECode31
# 42 - 50 : turn partons into a random number of hadrons, picked
# according to a Poissonian with average value as described above,
# but at least code - 40 and at most 10, and then distribute then in
# pure phase space; make a new try with another multiplicity if the
# sum of daughter masses exceed the mother one
cp /Defaults/Decayers/OniumToHadrons DecayMECode43GG
cp /Defaults/Decayers/QsToHadrons DecayMECode42GG
cp /Defaults/Decayers/Flat DecayMECode42
cp /Defaults/Decayers/Flat DecayMECode43
# 52 - 60: as 42 - 50, with multiplicity between code - 50 and 10, but avoid
# already explicitly listed non-partonic channels
cp /Defaults/Decayers/OniumToHadrons DecayMECode52GG
cp /Defaults/Decayers/OniumToHadrons DecayMECode53GG
cp /Defaults/Decayers/Flat DecayMECode55
# 62 - 70 : as 42 - 50, but fixed multiplicity code - 60
cp /Defaults/Decayers/Flat DecayMECode63
# 91 : decay to q qbar or g g, which should shower and hadronize
cp /Defaults/Decayers/ColourPairs DecayMECode91
# 92 : decay onium to g g g or g g gamma, which should shower and hadronize
cp /Defaults/Decayers/Onium3G DecayMECode92
-
-
-
+# 15?? : New tau decayer with spin correlations replaced by old default
+cp FlatDecayer DecayMECode1521
+cp DecayMECode22 DecayMECode1531
+cp DecayMECode21 DecayMECode1532
+cp DecayMECode21 DecayMECode1533
+cp DecayMECode21 DecayMECode1541
+cp DecayMECode21 DecayMECode1551
mkdir /TheP8I/Particles
cd /TheP8I/Particles
read TheP8IParticles.in
set /TheP8I/Particles/pi+:Stable Stable
set /TheP8I/Particles/pi-:Stable Stable
set /TheP8I/Particles/K+:Stable Stable
set /TheP8I/Particles/K-:Stable Stable
set /TheP8I/Particles/K_L0:Stable Stable
set /TheP8I/Particles/mu+:Stable Stable
set /TheP8I/Particles/mu-:Stable Stable
set /TheP8I/Particles/n0:Stable Stable
set /TheP8I/Particles/nbar0:Stable Stable
cd /TheP8I
create TheP8I::TheP8IStrategy StdStrategy libTheP8I.so
insert StdStrategy:DefaultParticlesDirs[0] /TheP8I/Particles
mkdir /TheP8I/Handlers
mkdir /TheP8I/Handlers/StringFrag
cd /TheP8I/Handlers/StringFrag
create TheP8I::StringFragmentation StringFragmenter
read OverlapStringFragmenter.in
cd /
doxygendump TheP8I:: ../Doc/AllInterfaces.h
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, May 3, 6:21 AM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4982991
Default Alt Text
(10 KB)
Attached To
rTHEPEGPEIGHTIHG thepegpeightihg
Event Timeline
Log In to Comment