/usr/include/ThePEG/Handlers/SimpleFlavour.h is in libthepeg-dev 1.8.0-3build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 | // -*- C++ -*-
//
// SimpleFlavour.h is a part of ThePEG - Toolkit for HEP Event Generation
// Copyright (C) 1999-2011 Leif Lonnblad
//
// ThePEG is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef THEPEG_SimpleFlavour_H
#define THEPEG_SimpleFlavour_H
// This is the declaration of the SimpleFlavour class.
#include "ThePEG/Handlers/FlavourGenerator.h"
#include "ThePEG/Utilities/VSelector.h"
// #include "SimpleFlavour.fh"
// #include "SimpleFlavour.xh"
namespace ThePEG {
/**
* SimpleFlavour is a simple class to generate hadrons given the quark
* flavours. It implements a simplified version of the model of the
* old fortran version of Pythia.
*
* @see \ref SimpleFlavourInterfaces "The interfaces"
* defined for SimpleFlavour.
*/
class SimpleFlavour: public FlavourGenerator {
public:
/** A map of <code>Selector</code>s. */
typedef map<long, VSelector< pair<long,long> > > ProbabilityMap;
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor.
*/
SimpleFlavour();
/**
* Destructor.
*/
virtual ~SimpleFlavour();
//@}
public:
/** @name Virtual functions mandated by the FlavourGenerator base class. */
//@{
/**
* Generate a hadron from a quark. Given a quark(antiquark, diquark
* or antidiquark), choose a quark-antiquark (or
* antidiquark-diquark) pair. Return (first) a hadron formed by the
* original quark and the antiquark together with (second) the
* generated quark. Returns null pointers if the generation failed.
* @param quark a quark, antiquark, diquark or antidiquark.
* @return a pair of ParticleData pointers. The \a first is the
* hadron produced and the \a second is the anti-partner of the
* (anti-)(di-)quark generated to form the hadron.
*/
virtual tcPDPair generateHadron(tcPDPtr quark) const;
/**
* Get hadron from flavours. Return a hadron with the flavour
* content given by the (anti-)(di-)quarks in the argument. The
* arguments are given as PDG codes.
* @param iq1 the PDG code of the first flavour.
* @param iq2 the PDG code of the second flavour.
* @return the corresponding hadron type or null if none could be
* generated.
*/
virtual tcPDPtr getHadron(long iq1, long iq2) const;
using FlavourGenerator::getHadron;
/**
* Return a baryon with the flavour content given by the
* (anti)quarks in the argument. The arguments are given as
* particle data pointers.
* @param q1 the PDG code of the first flavour.
* @param q2 the PDG code of the second flavour.
* @param q3 the PDG code of the third flavour.
* @return the corresponding baryon type or null if none could be
* generated.
*/
virtual tcPDPtr getBaryon(long q1, long q2, long q3) const;
using FlavourGenerator::getBaryon;
/**
* Generate a random quark flavour.
*/
virtual long selectQuark() const;
/**
* Generate a random (di)quark flavour.
*/
virtual long selectFlavour() const;
//@}
public:
/** @name Access the parameters controlling the generation. */
//@{
/**
* Return the suppression factor of strange quarks w.r.t. u and d.
*/
double sSup() const { return theSSup; }
/**
* Return the suppression factor for di-quarks w.r.t. quarks
*/
double diSup() const { return theDiSup; }
/**
* Return the suppression of spin-1 di-quarks w.r.t. spin-0 ones;
*/
double di1Sup() const { return theDi1Sup; }
/**
* Return the suppression of strange di-quarks w.r.t. u and d ones
* in addition to the standard strangness suppression of quarks.
*/
double diSSup() const { return theDiSSup; }
/**
* Return the extra suppression of eta's
*/
double etaSup() const { return theEtaSup; }
/**
* Return the extra suppression of ets-prime's
*/
double etaPSup() const { return theEtaPSup; }
/**
* Return the extra suppression for baryons of the spin 3/2
* decuplet.
*/
double baryon10Sup() const { return theBaryon10Sup; }
/**
* Return the probability that light (u/d) mesons has spin 1;
*/
double pSpin1() const { return thePSpin1; }
/**
* Return the probability that strange mesons has spin 1;
*/
double pSpinS1() const { return thePSpinS1; }
/**
* Return the probability that charmed and heavier mesons has spin
* 1;
*/
double pSpinC1() const { return thePSpinC1; }
//@}
protected:
/**
* Calculate the probabilities for generateHadron for the given
* flavour.
*/
virtual void setProbabilities(long iq) const;
/**
* Return the probability that the given quark flavours end up in a
* vector meson rather than in a pseudo scalar meson.
*/
virtual double vectorMesonProbability(long iq1, long iq2) const;
/**
* Return the probability that the given quark and diquark flavours
* end up in a spin 3/2 decuplet baryon rather than in a spin 1/2
* octet baryon.
*/
virtual double baryonDecupletProbability(long iq1, long iq2) const;
/**
* Return a pseudo scalar meson formed by the two quark flavours.
*/
virtual tcPDPtr pseudoScalarMeson(long iq, long iqbar) const;
/**
* Return a vector meson formed by the two quark flavours.
*/
virtual tcPDPtr vectorMeson(long iq, long iqbar) const;
/**
* Return a spin 1/2 octet baryon formed by the given quark and
* diquark flavours.
*/
virtual tcPDPtr baryonOctet(long iq, long idq) const;
/**
* Return a spin 3/2 decuplet baryon formed by the given quark and
* diquark flavours.
*/
virtual tcPDPtr baryonDecuplet(long iq, long idq) const;
/**
* Return the PDG code of a pseudo scalar meson formed by the two
* quark flavours for \a iqh >= \a iql > 0.
*/
virtual long pseudoScalarId(long iqh, long iql) const;
/**
* Return the PDG code of a vector meson formed by the two quark
* flavours for \a iqh >= \a iql > 0.
*/
virtual long vectorId(long iqh, long iql) const;
/**
* Return the PDG code for a spin 1/2 octet baryon formed by the
* given quark flavours (\a iqa >= \a iqb >= \a iqc > 0). iq is one
* of the flavours and the other two are assumed to be in a diquark
* (in a spin-1 state if \a dqs1).
*/
virtual long baryonOctetId(long iqa, long iqb, long iqc,
long iq, bool dqs1) const;
/**
* Return the PDG code for a spin 3/2 decuplet baryon formed by the
* given quark flavours (\a iqa >= \a iqb >= \a iqc > 0).
*/
virtual long baryonDecupletId(long iqa, long iqb, long iqc) const;
/**
* Return the PDG code of pseudo scalar mesons formed by the two
* quark flavours (for \a iqh >= \a iql > 0), together with suitable
* weights.
*/
virtual vector< pair<long,double> >
pseudoScalarIds(long iqh, long iql) const;
/**
* Return the PDG codes of vector mesons formed by the two quark
* flavours (for \a iqh >= \a iql > 0), together with
* suitable weights.
*/
virtual vector< pair<long,double> > vectorIds(long iqh, long iql) const;
/**
* Return the PDG codes for spin 1/2 octet baryons formed by the
* given quark flavours (\a iqa >= \a iqb >= \a iqc > 0) together
* with suitable weights. iq is one of the flavours and the other
* two are assumed to be in a diquark (in a spin-1 state if \a dqs1).
*/
virtual vector< pair<long,double> >
baryonOctetIds(long iqa, long iqb, long iqc,
long iq, bool dqs1) const;
/**
* Return the PDG codes for spin 3/2 decuplet baryons formed by
* the given quark flavours (\a iqa >= \a iqb >= \a iqc > 0) together with
* suitable weights.
*/
virtual vector< pair<long,double> >
baryonDecupletIds(long iqa, long iqb, long iqc) const;
/**
* Clear all cashed weights.
*/
void clear();
/**
* Return the SU(6) weight for the given quark and di-quark flavours
* to end up with in a baryon with the given spin (2S+1).
*/
static double weightSU6QDiQSpin(long iq, long idq, int spin);
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);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
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;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* Suppression factor of strange quarks w.r.t. u and d.
*/
double theSSup;
/**
* Suppression factor for di-quarks w.r.t. quarks.
*/
double theDiSup;
/**
* Suppression of spin-1 di-quarks w.r.t. spin-0 ones.
*/
double theDi1Sup;
/**
* Suppression of strange di-quarks w.r.t. u and d ones in addition
* to the standard strangness suppression of quarks.
*/
double theDiSSup;
/**
* Extra suppression of eta's.
*/
double theEtaSup;
/**
* Extra suppression of ets-prime's.
*/
double theEtaPSup;
/**
* Extra suppression for baryons of the spin 3/2 decuplet.
*/
double theBaryon10Sup;
/**
* Probability that light (u/d) mesons has spin 1.
*/
double thePSpin1;
/**
* Probability that strange mesons has spin 1.
*/
double thePSpinS1;
/**
* Probability that charmed and heavier mesons has spin 1.
*/
double thePSpinC1;
/**
* A selector used to weight the creation of (di)quark-anti(di)quark
* pairs.
*/
mutable VSelector<long> theFlavourSelector;
/**
* A map of selectors to cash probabilities for generateHadron.
*/
mutable ProbabilityMap theProbabilities;
private:
/**
* Describe a concrete class with persistent data.
*/
static ClassDescription<SimpleFlavour> initSimpleFlavour;
/**
* Private and non-existent assignment operator.
*/
SimpleFlavour & operator=(const SimpleFlavour &);
};
}
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/**
* This template specialization informs ThePEG about the base class of
* SimpleFlavour.
*/
template <>
struct BaseClassTrait<SimpleFlavour,1>: public ClassTraitsType {
/** Typedef of the base class of SimpleFlavour. */
typedef FlavourGenerator NthBase;
};
template <>
/**
* This template specialization informs ThePEG about the name of the
* SimpleFlavour class and the shared object where it is defined.
*/
struct ClassTraits<SimpleFlavour>
: public ClassTraitsBase<SimpleFlavour> {
/** Return the class name. */
static string className() { return "ThePEG::SimpleFlavour"; }
/**
* Return the name of the shared library to be loaded to get access
* to the SimpleFlavour class and every other class it uses (except
* the base class).
*/
static string library() { return "SimpleFlavour.so"; }
};
/** @endcond */
}
#endif /* THEPEG_SimpleFlavour_H */
|