thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
Particle.h
1// -*- C++ -*-
2//
3// Particle.h is a part of ThePEG - Toolkit for HEP Event Generation
4// Copyright (C) 1999-2019 Leif Lonnblad
5//
6// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8//
9#ifndef ThePEG_Particle_H
10#define ThePEG_Particle_H
11// This is the decalaration of the Particle class.
12
13#include "EventConfig.h"
14#include "ThePEG/Vectors/Lorentz5Vector.h"
15#include "ThePEG/Vectors/LorentzRotation.h"
16#include "ThePEG/Utilities/ClassDescription.h"
17#include "ThePEG/EventRecord/MultiColour.h"
18#include "ThePEG/EventRecord/SpinInfo.h"
19#include "ThePEG/PDT/ParticleData.h"
20
21namespace ThePEG {
22
84
85public:
86
88 friend class Event;
90 friend class Collision;
92 friend class Step;
94 friend class SubProcess;
96 friend class ParticleData;
97
98 struct ParticleRep;
99
100public:
101
107 Particle(tcEventPDPtr newData) : theData(newData), theRep(0), theStatus(0) {}
108
113
117 virtual ~Particle();
119
125 bool decayed() const {
126 return hasRep() && !rep().theChildren.empty();
127 }
128
132 const ParticleVector & children() const {
133 static const ParticleVector null;
134 return hasRep() ? rep().theChildren : null;
135 }
136
140 void addChild(tPPtr c) {
141 rep().theChildren.push_back(c);
142 (c->rep()).theParents.push_back(this);
143 }
144
150 void abandonChild(tPPtr child) {
151 removeChild(child);
152 child->removeParent(this);
153 }
154
158 const tParticleVector & parents() const {
159 static const tParticleVector null;
160 return hasRep() ? rep().theParents : null;
161 }
162
170
175 void undecay() {
176 if ( hasRep() ) {
177 rep().theChildren.clear();
178 rep().theNext = tPPtr();
179 }
180 }
181
185 void decayMode(tDMPtr dm) { rep().theDecayMode = dm; }
186
191 return hasRep() ? rep().theDecayMode : tDMPtr();
192 }
193
198 tPPtr next() const {
199 return hasRep() ? rep().theNext : PPtr();
200 }
201
206 tPPtr previous() const {
207 return hasRep() ? rep().thePrevious : tPPtr();
208 }
209
214 tcPPtr original() const {
215 return previous() ? tcPPtr(previous()->original()) : tcPPtr(this);
216 }
217
223 return previous() ? previous()->original() : tPPtr(this);
224 }
225
226
231 tcPPtr final() const {
232 return next() ? tcPPtr(next()->final()) : tcPPtr(this);
233 }
234
239 tPPtr final() {
240 return next() ? next()->final() : tPPtr(this);
241 }
242
244
251 return hasRep() ? rep().theBirthStep : tStepPtr();
252 }
253
257 int number() const {
258 return hasRep() ? rep().theNumber : 0;
259 }
260
264 int status() const { return theStatus; }
265
269 void status(int n) { theStatus = n; }
271
277 const ParticleDataClass & data() const { return *theData; }
278
282 tcEventPDPtr dataPtr() const { return theData; }
283
287 const string & PDGName() const { return data().PDGName(); }
288
292 long id() const { return data().id(); }
294
300 const Lorentz5Momentum & momentum() const { return theMomentum; }
301
306 void set3Momentum(const Momentum3 & p) {
309 }
310
315 void setMomentum(const LorentzMomentum & p) {
316 theMomentum = p;
317 }
318
323 theMomentum = p;
324 }
325
329 Energy mass() const { return momentum().mass(); }
330
334 Energy nominalMass() const { return data().mass(); }
335
339 Energy2 scale() const {
340 return hasRep() ? rep().theScale : -1.0*GeV2;
341 }
342
346 void scale(Energy2 q2) { rep().theScale = q2; }
347
353 return hasRep() ? rep().theVetoScale : -1.0*GeV2;
354 }
355
360 void vetoScale(Energy2 q2) { rep().theVetoScale = q2; }
361
366 Energy2 mt2() const { return sqr(momentum().t()) - sqr(momentum().z()); }
367
372 Energy mt() const { return sqrt(mt2()); }
373
378 Energy2 perpmass2() const { return momentum().perp2() + momentum().mass2(); }
379
384 Energy perpmass() const { return sqrt(perpmass2()); }
385
389 double rapidity() const {
390 return ( Pplus() > ZERO && Pminus() > ZERO )?
391 0.5*log(Pplus()/Pminus()) : Constants::MaxFloat;
392 }
393
397 double eta() const {
398 Energy rho = momentum().rho();
399 return rho > abs(momentum().z())?
400 0.5*log((rho+momentum().z())/(rho-momentum().z())) : Constants::MaxFloat;
401 }
402
406 Energy Pplus() const { return momentum().plus(); }
410 Energy Pminus() const { return momentum().minus(); }
412
419 const LorentzPoint & vertex() const {
420 static const LorentzPoint null;
421 return hasRep() ? rep().theVertex : null;
422 }
423
429
435 return vertex() + lifeLength();
436 }
437
443 return labVertex() + lifeLength();
444 }
445
450 const Lorentz5Distance & lifeLength() const {
451 static const Lorentz5Distance null;
452 return hasRep() ? rep().theLifeLength : null;
453 }
454
458 void setVertex(const LorentzPoint & p) {
459 rep().theVertex = p;
460 }
461
466
472 void setLifeLength(const Distance & d) {
475 }
476
482 rep().theLifeLength = d;
483 }
484
489 rep().theLifeLength = d;
490 }
491
495 Time lifeTime() const { return lifeLength().m(); }
496
498
504 void transform(const LorentzRotation & r);
505
510 void boost(double bx, double by, double bz) {
511 transform(LorentzRotation(Boost(bx, by, bz)));
512 }
513
518 void boost(const Boost & b) { transform(LorentzRotation(b)); }
519
523 void rotateX(double a);
524
528 void rotateY(double a);
529
533 void rotateZ(double a);
534
538 void rotate(double a, const Axis & axis);
539
543 void mirror() { theMomentum.setZ(-theMomentum.z()); }
544
549
555 void deepBoost(double bx, double by, double bz) {
556 deepTransform(LorentzRotation(Boost(bx, by, bz)));
557 }
558
564
568 void deepRotateX(double a);
569
573 void deepRotateY(double a);
574
578 void deepRotateZ(double a);
579
583 void deepRotate(double a, const Axis & axis);
584
586
592 double massError() const { return theMomentum.massError(); }
593
597 double energyError() const { return theMomentum.energyError(); }
598
602 double rhoError() const { return theMomentum.rhoError(); }
603
609
615
622
630 bool hasColourInfo() const {
631 return hasRep() && rep().theColourInfo;
632 }
633
639 return hasColourInfo() ? colourInfo()->antiColourLine() : tColinePtr();
640 }
641
646 tColinePtr colourLine(bool anti = false) const {
647 if ( anti ) return antiColourLine();
648 return hasColourInfo() ? colourInfo()->colourLine() : tColinePtr();
649 }
650
655 bool hasColourLine(tcColinePtr line, bool anti = false) const {
656 return hasColourInfo() ? colourInfo()->hasColourLine(line, anti) : false;
657 }
658
664 return hasColourLine(line, true);
665 }
666
670 bool coloured() const { return data().coloured(); }
671
675 bool hasColour(bool anti = false) const { return data().hasColour(anti); }
676
680 bool hasAntiColour() const { return data().hasAntiColour(); }
681
686 return hasRep() ? rep().theColourInfo : CBPtr();
687 }
688
693 if ( !rep().theColourInfo ) {
694 switch(theData->iColour()) {
695 case PDT::Colour6:
696 case PDT::Colour6bar:
698 break;
699 default:
701 }
702 }
703 return rep().theColourInfo;
704 }
705
710 rep().theColourInfo = c;
711 }
712
719 template <typename Iterator>
720 typename std::iterator_traits<Iterator>::value_type
721 colourNeighbour(Iterator first, Iterator last, bool anti = false) const;
722
728 template <typename Iterator>
729 typename std::iterator_traits<Iterator>::value_type
730 antiColourNeighbour(Iterator first, Iterator last) const {
731 return colourNeighbour(first, last, true);
732 }
733
739 void colourNeighbour(tPPtr, bool anti = false);
740
746
751 void antiColourConnect(tPPtr neighbour) {
752 colourConnect(neighbour, true);
753 }
754
760 void colourConnect(tPPtr neighbour, bool anti = false) {
761 colourNeighbour(neighbour, anti);
762 }
763
769 tPPtr incomingColour(bool anti = false) const;
770
776 tPPtr incomingAntiColour() const { return incomingColour(true); }
777
783 void incomingColour(tPPtr p, bool anti = false) { p->outgoingColour(this, anti); }
784
789 void incomingAntiColour(tPPtr p) { p->outgoingColour(this, true); }
790
796 tPPtr outgoingColour(bool anti = false) const;
802 tPPtr outgoingAntiColour() const { return outgoingColour(true); }
803
809 void outgoingColour(tPPtr, bool anti = false);
810
816
820 void colourFlow(tPPtr child, bool anti = false) {
821 outgoingColour(child, anti);
822 }
823
827 void antiColourFlow(tPPtr child) { colourFlow(child, true); }
828
832 void resetColour() {
833 if ( hasColourInfo() ) rep().theColourInfo = CBPtr();
834 }
835
837
844 return hasRep() ? rep().theSpinInfo : SpinPtr();
845 }
846
851 return hasRep() ? rep().theSpinInfo : SpinPtr();
852 }
853
857 void spinInfo(tSpinPtr s) { rep().theSpinInfo = s; }
859
865 const EIVector & getInfo() const {
866 static const EIVector null;
867 return hasRep() ? rep().theExtraInfo : null;
868 }
869
875
876public:
877
884 bool hasRep() const { return theRep; }
885
890 void initFull();
891
893
894public:
895
902
907
909
914 ostream & print(ostream & os, tcStepPtr step = tcStepPtr()) const;
915
919 template <typename Iterator>
920 static void PrintParticles(ostream & os, Iterator first, Iterator last,
921 tcStepPtr step = tcStepPtr());
922
926 template <typename Cont>
927 static inline void PrintParticles(ostream & os, const Cont & c,
928 tcStepPtr step = tcStepPtr()) {
929 PrintParticles(os, c.begin(), c.end(), step);
930 }
931
935 static void Init();
936
941 static string outputFormat;
942
943private:
944
948 virtual PPtr clone() const;
949
956 virtual void rebind(const EventTranslationMap &);
957
961 void number(int n) { rep().theNumber = n; }
962
967 if ( hasRep() )
968 rep().theChildren.erase(remove(rep().theChildren.begin(),
969 rep().theChildren.end(), c),
970 rep().theChildren.end());
971 }
972
977 if ( hasRep() )
978 rep().theParents.erase(remove(rep().theParents.begin(),
979 rep().theParents.end(), p),
980 rep().theParents.end());
981 }
982
987
992
998 if ( !hasRep() ) initFull();
999 return *theRep;
1000 }
1001
1006 const ParticleRep & rep() const {
1007 static const ParticleRep null;
1008 return hasRep() ? *theRep : null;
1009 }
1010
1015
1020
1026
1031
1032public:
1033
1041
1045 ParticleRep() : theScale(-1.0*GeV2), theVetoScale(-1.0*GeV2), theNumber(0) {}
1046
1051
1056
1061
1066
1071
1077
1082
1087
1092
1097
1102
1107
1112
1117
1122
1123 };
1124
1125public:
1126
1131 virtual void debugme() const;
1132
1133protected:
1134
1140
1145 friend struct ClassTraits<Particle>;
1146
1147private:
1148
1152 Particle & operator=(const Particle &) = delete;
1153
1158
1159};
1160
1164ostream & operator<<(ostream &, const Particle &);
1165
1166
1171template <>
1172struct BaseClassTrait<Particle,1>: public ClassTraitsType {
1174 typedef EventRecordBase NthBase;
1175};
1176
1179template <>
1180struct ClassTraits<Particle>: public ClassTraitsBase<Particle> {
1182 static string className() { return "ThePEG::Particle"; }
1184 static TPtr create() { return TPtr::Create(Particle()); }
1185};
1186
1189}
1190
1191#ifndef ThePEG_TEMPLATES_IN_CC_FILE
1192#include "Particle.tcc"
1193#endif
1194
1195#endif /* ThePEG_Particle_H */
This is the main config header file for the Event classes.
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
This is the decalaration of the Collision class.
Definition: Collision.h:34
ColourBase is the base class to be used to supply a Particle with information about its colour state.
Definition: ColourBase.h:32
The Event class contains all Particles produced in the generation of an event.
Definition: Event.h:37
Value2 mass2() const
Mass/invariant length component squared.
double rhoError() const
Return the relative inconsistency in the spatial components.
void setMass(Value a)
Set invariant length/mass.
void rescaleRho()
Rescale spatial component, so that the invariant length/mass of the LorentzVector agrees with the cur...
double energyError() const
Return the relative inconsistency in the energy component.
Value mass() const
Mass/invariant length component.
void rescaleEnergy()
Rescale energy, so that the invariant length/mass of the LorentzVector agrees with the current one.
void rescaleMass()
Set the invariant length/mass member, so that it agrees with the invariant length/mass of the Lorentz...
double massError() const
Return the relative inconsistency in the mass component.
void setTau(Value a)
Set invariant length/mass.
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
Value2 perp2() const
Squared transverse component of the spatial vector .
Value m() const
Magnitude (signed) .
Value rho() const
Radius.
void setVect(const ThreeVector< Value > &p)
Set the 3-component part.
Value plus() const
Returns the positive light-cone component .
Value minus() const
Returns the negative light-cone component .
This class is used to store colour information of RemnantParticle objects and other particle classes ...
Definition: MultiColour.h:24
@ Colour6bar
Colour-anti-sextet.
Definition: PDT.h:101
@ Colour6
Colour-sextet.
Definition: PDT.h:100
ParticleData inherits from InterfacedBase and represents the properties of a particle type.
Definition: ParticleData.h:36
bool hasColour(bool anti=false) const
Return true if (anti) coloured or colour-octet.
Definition: ParticleData.h:349
bool hasAntiColour() const
Return true if anti coloured or colour-octet.
Definition: ParticleData.h:358
const string & PDGName() const
Return the generic PDG name.
Definition: ParticleData.h:86
long id() const
Return the PDG id number.
Definition: ParticleData.h:80
Energy mass(Energy)
Set the nominal mass.
bool coloured() const
Return true if coloured.
Definition: ParticleData.h:344
The Particle class is used to describe an instance of a particle.
Definition: Particle.h:83
Lorentz5Momentum theMomentum
The momentum.
Definition: Particle.h:1019
const Lorentz5Distance & lifeLength() const
The life time/length.
Definition: Particle.h:450
bool hasRep() const
True if this particle has instantiated the object with information other than type and momentum.
Definition: Particle.h:884
LorentzPoint decayVertex() const
The decay vertex of this particle.
Definition: Particle.h:434
long id() const
Return the PDG id number of this particle.
Definition: Particle.h:292
tPPtr previous() const
Previous instance.
Definition: Particle.h:206
Time lifeTime() const
The invariant life time of this particle.
Definition: Particle.h:495
tColinePtr antiColourLine() const
Return the colour lines to which this particles anti-colour is connected.
Definition: Particle.h:638
bool hasAntiColourLine(tcColinePtr line) const
Return true if the particle is connected to the given anti-colour line.
Definition: Particle.h:663
void rotateY(double a)
Rotate around the y-axis.
tSpinPtr spinInfo()
Return the Spin object.
Definition: Particle.h:850
EIVector & getInfo()
Access user-defined information as a vector of EventInfoBase pointers.
Definition: Particle.h:873
Particle(const Particle &)
Copy constructor.
void rotateX(double a)
Rotate around the x-axis.
void number(int n)
Set the order-number for this particle in the current event.
Definition: Particle.h:961
bool hasColour(bool anti=false) const
True if this particle type carries (anti-)colour.
Definition: Particle.h:675
virtual ~Particle()
Destructor.
void transform(const LorentzRotation &r)
Do Lorentz transformations on this particle.
bool hasAntiColour() const
True if this particle type carries anti-colour.
Definition: Particle.h:680
tcCBPtr colourInfo() const
Get the ColourBase object.
Definition: Particle.h:685
const tParticleVector & parents() const
The list of parent particles.
Definition: Particle.h:158
tDMPtr decayMode() const
If this particle has decayed get the corresponding decay mode.
Definition: Particle.h:190
void abandonChild(tPPtr child)
Remove the given child from the list of children of this particle (the corresponding parent pointer o...
Definition: Particle.h:150
double eta() const
Return the (pseudo) rapidity.
Definition: Particle.h:397
Particle & operator=(const Particle &)=delete
Private and non-existent assignment.
void colourInfo(tCBPtr c)
Set the ColourBase object.
Definition: Particle.h:709
const LorentzPoint & vertex() const
The creation vertex of this particle.
Definition: Particle.h:419
Energy perpmass() const
Return the transverse mass (squared), calculated from the mass and the transverse momentum.
Definition: Particle.h:384
virtual PPtr clone() const
Standard clone function.
void setLifeLength(const LorentzDistance &d)
Set the life time/length of a particle.
Definition: Particle.h:481
void status(int n)
Set the status code of the particle.
Definition: Particle.h:269
Energy mt() const
Return the transverse mass (squared), calculated from the energy and the longitudinal momentum.
Definition: Particle.h:372
void mass(Energy m)
Set the mass of this particle.
Definition: Particle.h:986
LorentzPoint labVertex() const
The creation vertex of this particle.
tPPtr incomingColour(bool anti=false) const
Incoming colour.
void rotateZ(double a)
Rotate around the z-axis.
tcSpinPtr spinInfo() const
Return the Spin object.
Definition: Particle.h:843
tcPPtr original() const
Original instance.
Definition: Particle.h:214
void incomingAntiColour(tPPtr p)
Set incoming anti-colour.
Definition: Particle.h:789
ostream & print(ostream &os, tcStepPtr step=tcStepPtr()) const
Print particle info to a stream os.
static void Init()
Standard Init function.
cEventPDPtr theData
The pointer to the ParticleData object.
Definition: Particle.h:1014
Energy2 vetoScale() const
Get the scale above which this particle should not radiate.
Definition: Particle.h:352
Particle()
Private default constructor must only be used by the PersistentIStream class via the ClassTraits<Part...
Definition: Particle.h:1139
Energy2 mt2() const
Return the transverse mass (squared), calculated from the energy and the longitudinal momentum.
Definition: Particle.h:366
std::iterator_traits< Iterator >::value_type colourNeighbour(Iterator first, Iterator last, bool anti=false) const
Get a pointer to the colour neighbor.
std::iterator_traits< Iterator >::value_type antiColourNeighbour(Iterator first, Iterator last) const
Get a pointer to the anti-colour neighbor.
Definition: Particle.h:730
tStepPtr birthStep() const
Get the first Step object where this particle occurred.
Definition: Particle.h:250
void boost(double bx, double by, double bz)
Do Lorentz transformations on this particle.
Definition: Particle.h:510
virtual void rebind(const EventTranslationMap &)
Rebind to cloned objects.
void deepBoost(const Boost &b)
Do Lorentz transformations on this particle and its decendants.
Definition: Particle.h:563
void deepTransform(const LorentzRotation &r)
Do Lorentz transformations on this particle and its decendants.
tColinePtr colourLine(bool anti=false) const
Return the colour lines to which this particles (anti-)colour is connected.
Definition: Particle.h:646
void removeChild(tPPtr c)
Remove the given particle from the list of children.
Definition: Particle.h:966
double rhoError() const
Return the relative inconsistency in the spatial components.
Definition: Particle.h:602
void boost(const Boost &b)
Do Lorentz transformations on this particle.
Definition: Particle.h:518
Energy Pminus() const
Return the positive and negative light-cone momenta.
Definition: Particle.h:410
void persistentInput(PersistentIStream &, int)
Standard function for reading from a persistent stream.
void setVertex(const LorentzPoint &p)
Set the creation vertex relative to the collision vertex.
Definition: Particle.h:458
void deepRotateZ(double a)
Rotate this particle and its decendants around the z-axis.
void antiColourFlow(tPPtr child)
Specify anticolour flow.
Definition: Particle.h:827
void scale(Energy2 q2)
Set the scale at which this particle is considered resolved.
Definition: Particle.h:346
const ParticleRep & rep() const
Return a reference to the bulk information of this particle.
Definition: Particle.h:1006
const EIVector & getInfo() const
Access user-defined information as a vector of EventInfoBase pointers.
Definition: Particle.h:865
const string & PDGName() const
Return the PDG name of this particle.
Definition: Particle.h:287
void rescaleRho()
Rescale spatial component, so that the invariant length/mass of the LorentzVector agrees with the cur...
Definition: Particle.h:614
void deepRotate(double a, const Axis &axis)
Rotate this particle and its decendants around the given axis.
static void PrintParticles(ostream &os, Iterator first, Iterator last, tcStepPtr step=tcStepPtr())
Print a range of particles.
void setMomentum(const LorentzMomentum &p)
Set the momentum of this particle.
Definition: Particle.h:315
int status() const
Get the status code of the particle.
Definition: Particle.h:264
double massError() const
Return the relative inconsistency in the mass component.
Definition: Particle.h:592
const Lorentz5Momentum & momentum() const
Return the momentum of this particle.
Definition: Particle.h:300
virtual void debugme() const
Print out debugging information for this object on std::cerr.
void rescaleMass()
Set the invariant length/mass member, so that it agrees with the invariant length/mass of the Lorentz...
Definition: Particle.h:620
Energy mass() const
Acces the mass of this particle.
Definition: Particle.h:329
void persistentOutput(PersistentOStream &) const
Standard function for writing to a persistent stream.
ParticleRep & rep()
Return a reference to the bulk information of this particle.
Definition: Particle.h:997
void rescaleEnergy()
Rescale energy, so that the invariant length/mass of the LorentzVector agrees with the current one.
Definition: Particle.h:608
Energy2 perpmass2() const
Return the transverse mass (squared), calculated from the mass and the transverse momentum.
Definition: Particle.h:378
void setLifeLength(const Distance &d)
Set the life length of this particle.
Definition: Particle.h:472
bool hasColourInfo() const
True if this particle has colour information.
Definition: Particle.h:630
double rapidity() const
Return the (pseudo) rapidity.
Definition: Particle.h:389
Energy nominalMass() const
Acces the mass of this particle type.
Definition: Particle.h:334
static ClassDescription< Particle > initParticle
Describe concrete class with persistent data.
Definition: Particle.h:1157
tcEventPDPtr dataPtr() const
Access the ParticleData object of this particle type.
Definition: Particle.h:282
void rotate(double a, const Axis &axis)
Rotate around the given axis.
tCBPtr colourInfo()
Get the ColourBase object.
Definition: Particle.h:692
Energy2 scale() const
Get the scale at which this particle is considered resolved.
Definition: Particle.h:339
void colourNeighbour(tPPtr, bool anti=false)
Set the colour neighbor.
const ParticleVector & children() const
The list of decay products.
Definition: Particle.h:132
ParticleRep * theRep
The rest of the information in this particle is only instantiated if needed.
Definition: Particle.h:1025
static void PrintParticles(ostream &os, const Cont &c, tcStepPtr step=tcStepPtr())
Print a container of particles.
Definition: Particle.h:927
Particle(tcEventPDPtr newData)
Standard Constructor.
Definition: Particle.h:107
tPPtr original()
Original instance.
Definition: Particle.h:222
void deepRotateY(double a)
Rotate this particle and its decendants around the y-axis.
void addChild(tPPtr c)
Add a child (the childs parent pointer will be set accordingly).
Definition: Particle.h:140
void colourConnect(tPPtr neighbour, bool anti=false)
Connect colour.
Definition: Particle.h:760
void resetColour()
Remove all colour information;.
Definition: Particle.h:832
bool hasColourLine(tcColinePtr line, bool anti=false) const
Return true if the particle is connected to the given (anti-) colour line.
Definition: Particle.h:655
void initFull()
If this particle has only a type and momentum, instantiate the rest of the information.
Energy Pplus() const
Return the positive and negative light-cone momenta.
Definition: Particle.h:406
void set5Momentum(const Lorentz5Momentum &p)
Set the momentum and mass.
Definition: Particle.h:322
void incomingColour(tPPtr p, bool anti=false)
Set incoming colour.
Definition: Particle.h:783
tPPtr incomingAntiColour() const
Incoming anti-colour.
Definition: Particle.h:776
void vetoScale(Energy2 q2)
Set the scale above which this particle should not radiate.
Definition: Particle.h:360
void mirror()
Mirror in the xy-plane.
Definition: Particle.h:543
void colourFlow(tPPtr child, bool anti=false)
Specify colour flow.
Definition: Particle.h:820
bool decayed() const
Returns true if and only if this particle has decayed.
Definition: Particle.h:125
void decayMode(tDMPtr dm)
If this particle has decayed set the corresponding decay mode.
Definition: Particle.h:185
const ParticleDataClass & data() const
Access the ParticleData object of this particle type.
Definition: Particle.h:277
void undecay()
Undo the decay of this particle, removing all children (and grand children ...) from the event record...
Definition: Particle.h:175
void set3Momentum(const Momentum3 &p)
Set the 3-momentum of this particle.
Definition: Particle.h:306
void spinInfo(tSpinPtr s)
Set the Spin object.
Definition: Particle.h:857
tParticleSet siblings() const
Return a set of neighboring particles coming from the same decay as this one.
void antiColourNeighbour(tPPtr p)
Set the anti-colour neighbor.
Definition: Particle.h:745
static string outputFormat
Specify how to print particles.
Definition: Particle.h:941
int number() const
Get the order-number for this particle in the current event.
Definition: Particle.h:257
void deepRotateX(double a)
Rotate this particle and its decendants around the x-axis.
void lifeTime(Length t)
Set the invaiant life time of this particle.
Definition: Particle.h:991
void outgoingColour(tPPtr, bool anti=false)
Set outgoing colour.
int theStatus
The status code of the particle.
Definition: Particle.h:1030
double energyError() const
Return the relative inconsistency in the energy component.
Definition: Particle.h:597
LorentzPoint labDecayVertex() const
The decay vertex of this particle.
Definition: Particle.h:442
bool coloured() const
True if this particle type is not a colour singlet.
Definition: Particle.h:670
void deepBoost(double bx, double by, double bz)
Do Lorentz transformations on this particle and its decendants.
Definition: Particle.h:555
void setLabVertex(const LorentzPoint &)
Set the creation vertex in the lab frame of this particle.
tPPtr outgoingAntiColour() const
Outgoing anti-colour.
Definition: Particle.h:802
void antiColourConnect(tPPtr neighbour)
Connect colour.
Definition: Particle.h:751
void outgoingAntiColour(tPPtr p)
Set outgoing anti-colour.
Definition: Particle.h:815
tPPtr outgoingColour(bool anti=false) const
Outgoing colour.
void removeParent(tPPtr p)
Remove the given particle from the list of parents.
Definition: Particle.h:976
tPPtr next() const
Next instance.
Definition: Particle.h:198
void setLifeLength(const Lorentz5Distance &d)
Set the life time/length of a particle.
Definition: Particle.h:488
PersistentIStream is used to read persistent objects from a stream where they were previously written...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
static RCPtr Create()
Allocate and construct an object of class T and return a RCPtr to it.
Definition: RCPtr.h:120
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
Rebinder is a class associating pairs of pointers to objects.
Definition: Rebinder.h:27
The Step class contains information of all particles present after certain step in the event generati...
Definition: Step.h:34
A SubProcess object represents a hard sub-process in a collision.
Definition: SubProcess.h:33
A 3-component vector.
Definition: ThreeVector.h:35
constexpr double MaxFloat
The largest possible float.
Definition: Constants.h:45
Ptr< T >::pointer new_ptr()
Simple interface to the PtrTraits<Ptr>::create()
Definition: PtrTraits.h:195
ThreeVector< double > Boost
A three-dimensional boost vector.
Definition: Unitsystem.h:139
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
vector< EIPtr > EIVector
A vector of pointers to EventInfoBase objects.
Definition: Containers.h:160
ThePEG::Ptr< Particle >::transient_pointer tPPtr
Alias for a transient pointer to Particle .
Definition: Pointers.h:67
ThePEG::Ptr< SpinInfo >::pointer SpinPtr
Alias for a reference counted pointer to SpinInfo .
Definition: Pointers.h:93
set< tPPtr, less< tPPtr > > tParticleSet
A set of transient pointers to Particle.
Definition: EventConfig.h:78
ThePEG::Ptr< Step >::transient_const_pointer tcStepPtr
Alias for a transient pointer to a const Step .
Definition: Pointers.h:85
ThePEG::Ptr< ColourBase >::pointer CBPtr
Alias for a reference counted pointer to ColourBase .
Definition: Pointers.h:92
ThePEG::Ptr< Particle >::transient_const_pointer tcPPtr
Alias for a transient pointer to a const Particle .
Definition: Pointers.h:67
ThePEG::Ptr< DecayMode >::transient_pointer tDMPtr
Alias for a transient pointer to DecayMode .
Definition: Pointers.h:66
ThePEG::Ptr< Step >::transient_pointer tStepPtr
Alias for a transient pointer to Step .
Definition: Pointers.h:85
vector< T > & operator<<(vector< T > &tv, const U &u)
Overload the left shift operator for vector to push_back objects to a vector.
Definition: Containers.h:179
vector< tPPtr > tParticleVector
A vector of transient pointers to Particle.
Definition: EventConfig.h:72
ThePEG::Ptr< Particle >::pointer PPtr
Alias for a reference counted pointer to Particle .
Definition: Pointers.h:67
vector< PPtr > ParticleVector
A vector of pointers to Particle objects.
Definition: Containers.h:73
constexpr ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
Definition: PhysicalQty.h:35
constexpr auto sqr(const T &x) -> decltype(x *x)
The square function should really have been included in the standard C++ library.
Definition: ThePEG.h:117
ThePEG::Ptr< ColourLine >::transient_pointer tColinePtr
Alias for a transient pointer to ColourLine .
Definition: Pointers.h:96
Ptr< ParticleDataClass >::transient_const_pointer tcEventPDPtr
Alias for a transient pointer to const ParticleDataClass.
Definition: EventConfig.h:69
Ptr< ParticleDataClass >::const_pointer cEventPDPtr
Alias for a reference counted pointer to const ParticleDataClass.
Definition: EventConfig.h:65
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition: ClassTraits.h:161
Define the base class from which all (polymorphic) classes in ThePEG are derived.
Definition: ThePEG.h:54
static string className()
Return the name of class T.
Definition: ClassTraits.h:66
static TPtr create()
Create a T object and return a smart pointer to it.
Definition: ClassTraits.h:60
ThePEG::Ptr< T >::pointer TPtr
Alias for a reference counted pointer to T .
Definition: ClassTraits.h:54
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
This class is used internally in the Particle class to represent information besides momentum and typ...
Definition: Particle.h:1040
ParticleRep(const ParticleRep &)
Copy constructor.
ParticleVector theChildren
The pointers to the children.
Definition: Particle.h:1060
CBPtr theColourInfo
A pointer to the colour information object.
Definition: Particle.h:1111
tParticleVector theParents
The pointers to the parents.
Definition: Particle.h:1055
Energy2 theVetoScale
the veto scale.
Definition: Particle.h:1101
SpinPtr theSpinInfo
Spin information.
Definition: Particle.h:1116
EIVector theExtraInfo
Additional used-defined information.
Definition: Particle.h:1121
Energy2 theScale
the resolution scale.
Definition: Particle.h:1096
tPPtr thePrevious
The pointer to the previous instance.
Definition: Particle.h:1065
tDMPtr theDecayMode
If this particle has decayed this is the pointer to the corresponding decay mode.
Definition: Particle.h:1076
ParticleRep()
Default constructor.
Definition: Particle.h:1045
LorentzPoint theVertex
The creation point.
Definition: Particle.h:1086
Lorentz5Distance theLifeLength
The life time/length.
Definition: Particle.h:1091
PPtr theNext
The pointer to the next instance.
Definition: Particle.h:1070
int theNumber
The order-number for this particle in the current event.
Definition: Particle.h:1106
tStepPtr theBirthStep
The pointer to the first step where this particle occurred.
Definition: Particle.h:1081