thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
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 
21 namespace ThePEG {
22 
83 class Particle: public EventRecordBase {
84 
85 public:
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 
100 public:
101 
107  Particle(tcEventPDPtr newData) : theData(newData), theRep(0), theStatus(0) {}
108 
112  Particle(const Particle &);
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 
169  tParticleSet siblings() const;
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 
190  tDMPtr decayMode() const {
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 
250  tStepPtr birthStep() const {
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) {
307  theMomentum.setVect(p);
309  }
310 
315  void setMomentum(const LorentzMomentum & p) {
316  theMomentum = p;
317  }
318 
322  void set5Momentum(const Lorentz5Momentum & p) {
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 
352  Energy2 vetoScale() const {
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 
428  LorentzPoint labVertex() const;
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 
465  void setLabVertex(const LorentzPoint &);
466 
472  void setLifeLength(const Distance & d) {
475  }
476 
481  void setLifeLength(const LorentzDistance & d) {
482  rep().theLifeLength = d;
483  }
484 
488  void setLifeLength(const Lorentz5Distance & d) {
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 
548  void deepTransform(const LorentzRotation & r);
549 
555  void deepBoost(double bx, double by, double bz) {
556  deepTransform(LorentzRotation(Boost(bx, by, bz)));
557  }
558 
563  void deepBoost(const Boost & b) { deepTransform(LorentzRotation(b)); }
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 
663  bool hasAntiColourLine(tcColinePtr line) const {
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 
685  tcCBPtr colourInfo() const {
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 
709  void colourInfo(tCBPtr c) {
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 
843  tcSpinPtr spinInfo() const {
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 
873  EIVector & getInfo() { return rep().theExtraInfo; }
875 
876 public:
877 
884  bool hasRep() const { return theRep; }
885 
890  void initFull();
891 
893 
894 public:
895 
901  void persistentOutput(PersistentOStream &) const;
902 
906  void persistentInput(PersistentIStream &, int);
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 
943 private:
944 
948  virtual PPtr clone() const;
949 
956  virtual void rebind(const EventTranslationMap &);
957 
961  void number(int n) { rep().theNumber = n; }
962 
966  void removeChild(tPPtr c) {
967  if ( hasRep() )
968  rep().theChildren.erase(remove(rep().theChildren.begin(),
969  rep().theChildren.end(), c),
970  rep().theChildren.end());
971  }
972 
976  void removeParent(tPPtr p) {
977  if ( hasRep() )
978  rep().theParents.erase(remove(rep().theParents.begin(),
979  rep().theParents.end(), p),
980  rep().theParents.end());
981  }
982 
986  void mass(Energy m) { theMomentum.setMass(m); }
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 
1032 public:
1033 
1040  struct ParticleRep {
1041 
1045  ParticleRep() : theScale(-1.0*GeV2), theVetoScale(-1.0*GeV2), theNumber(0) {}
1046 
1050  ParticleRep(const ParticleRep &);
1051 
1056 
1061 
1066 
1071 
1077 
1082 
1087 
1092 
1097 
1102 
1107 
1112 
1117 
1122 
1123  };
1124 
1125 public:
1126 
1131  virtual void debugme() const;
1132 
1133 protected:
1134 
1139  Particle() : theRep(0), theStatus(0) {}
1140 
1145  friend struct ClassTraits<Particle>;
1146 
1147 private:
1148 
1152  Particle & operator=(const Particle &) = delete;
1153 
1158 
1159 };
1160 
1164 ostream & operator<<(ostream &, const Particle &);
1165 
1166 
1171 template <>
1172 struct BaseClassTrait<Particle,1>: public ClassTraitsType {
1174  typedef EventRecordBase NthBase;
1175 };
1176 
1179 template <>
1180 struct 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 */
tDMPtr theDecayMode
If this particle has decayed this is the pointer to the corresponding decay mode. ...
Definition: Particle.h:1076
void antiColourConnect(tPPtr neighbour)
Connect colour.
Definition: Particle.h:751
tcCBPtr colourInfo() const
Get the ColourBase object.
Definition: Particle.h:685
ThePEG::Ptr< Particle >::pointer PPtr
Alias for a reference counted pointer to Particle .
Definition: Pointers.h:67
void colourInfo(tCBPtr c)
Set the ColourBase object.
Definition: Particle.h:709
void deepBoost(const Boost &b)
Do Lorentz transformations on this particle and its decendants.
Definition: Particle.h:563
void deepRotateY(double a)
Rotate this particle and its decendants around the y-axis.
const Lorentz5Distance & lifeLength() const
The life time/length.
Definition: Particle.h:450
ParticleVector theChildren
The pointers to the children.
Definition: Particle.h:1060
tSpinPtr spinInfo()
Return the Spin object.
Definition: Particle.h:850
Ptr< T >::pointer new_ptr()
Simple interface to the PtrTraits<Ptr>::create()
Definition: PtrTraits.h:195
PersistentIStream is used to read persistent objects from a stream where they were previously written...
Lorentz5Momentum theMomentum
The momentum.
Definition: Particle.h:1019
void scale(Energy2 q2)
Set the scale at which this particle is considered resolved.
Definition: Particle.h:346
tDMPtr decayMode() const
If this particle has decayed get the corresponding decay mode.
Definition: Particle.h:190
void setVertex(const LorentzPoint &p)
Set the creation vertex relative to the collision vertex.
Definition: Particle.h:458
Energy Pminus() const
Return the positive and negative light-cone momenta.
Definition: Particle.h:410
void boost(const Boost &b)
Do Lorentz transformations on this particle.
Definition: Particle.h:518
ThePEG::Ptr< Step >::transient_pointer tStepPtr
Alias for a transient pointer to Step .
Definition: Pointers.h:85
Particle & operator=(const Particle &)=delete
Private and non-existent assignment.
void undecay()
Undo the decay of this particle, removing all children (and grand children ...) from the event record...
Definition: Particle.h:175
The Particle class is used to describe an instance of a particle.
Definition: Particle.h:83
void deepRotate(double a, const Axis &axis)
Rotate this particle and its decendants around the given axis.
tPPtr previous() const
Previous instance.
Definition: Particle.h:206
Define the base class from which all (polymorphic) classes in ThePEG are derived. ...
Definition: ThePEG.h:54
Value m() const
Magnitude (signed) .
Energy mass() const
Acces the mass of this particle.
Definition: Particle.h:329
void deepRotateX(double a)
Rotate this particle and its decendants around the x-axis.
virtual PPtr clone() const
Standard clone function.
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
void removeChild(tPPtr c)
Remove the given particle from the list of children.
Definition: Particle.h:966
void colourConnect(tPPtr neighbour, bool anti=false)
Connect colour.
Definition: Particle.h:760
const LorentzPoint & vertex() const
The creation vertex of this particle.
Definition: Particle.h:419
double massError() const
Return the relative inconsistency in the mass component.
void antiColourNeighbour(tPPtr p)
Set the anti-colour neighbor.
Definition: Particle.h:745
This is the main config header file for the Event classes.
The Event class contains all Particles produced in the generation of an event.
Definition: Event.h:36
This class is used to store colour information of RemnantParticle objects and other particle classes ...
Definition: MultiColour.h:24
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
Colour-sextet.
Definition: PDT.h:100
void setLifeLength(const LorentzDistance &d)
Set the life time/length of a particle.
Definition: Particle.h:481
ThePEG::Ptr< ColourBase >::pointer CBPtr
Alias for a reference counted pointer to ColourBase .
Definition: Pointers.h:92
Value rho() const
Radius.
LorentzPoint labDecayVertex() const
The decay vertex of this particle.
Definition: Particle.h:442
set< tPPtr, less< tPPtr > > tParticleSet
A set of transient pointers to Particle.
Definition: EventConfig.h:78
double energyError() const
Return the relative inconsistency in the energy component.
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
void spinInfo(tSpinPtr s)
Set the Spin object.
Definition: Particle.h:857
tPPtr next() const
Next instance.
Definition: Particle.h:198
const ParticleDataClass & data() const
Access the ParticleData object of this particle type.
Definition: Particle.h:277
std::iterator_traits< Iterator >::value_type antiColourNeighbour(Iterator first, Iterator last) const
Get a pointer to the anti-colour neighbor.
Definition: Particle.h:730
std::iterator_traits< Iterator >::value_type colourNeighbour(Iterator first, Iterator last, bool anti=false) const
Get a pointer to the colour neighbor.
static void PrintParticles(ostream &os, const Cont &c, tcStepPtr step=tcStepPtr())
Print a container of particles.
Definition: Particle.h:927
int theNumber
The order-number for this particle in the current event.
Definition: Particle.h:1106
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
Energy2 mt2() const
Return the transverse mass (squared), calculated from the energy and the longitudinal momentum...
Definition: Particle.h:366
void deepRotateZ(double a)
Rotate this particle and its decendants around the z-axis.
Colour-anti-sextet.
Definition: PDT.h:101
A 3-component vector.
Definition: ThreeVector.h:34
const string & PDGName() const
Return the generic PDG name.
Definition: ParticleData.h:94
int status() const
Get the status code of the particle.
Definition: Particle.h:264
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
void removeParent(tPPtr p)
Remove the given particle from the list of parents.
Definition: Particle.h:976
Lorentz5Distance theLifeLength
The life time/length.
Definition: Particle.h:1091
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
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
double rhoError() const
Return the relative inconsistency in the spatial components.
LorentzPoint theVertex
The creation point.
Definition: Particle.h:1086
ostream & print(ostream &os, tcStepPtr step=tcStepPtr()) const
Print particle info to a stream os.
tStepPtr birthStep() const
Get the first Step object where this particle occurred.
Definition: Particle.h:250
void setMomentum(const LorentzMomentum &p)
Set the momentum of this particle.
Definition: Particle.h:315
Rebinder is a class associating pairs of pointers to objects.
Definition: Rebinder.h:27
tColinePtr antiColourLine() const
Return the colour lines to which this particles anti-colour is connected.
Definition: Particle.h:638
void setLifeLength(const Lorentz5Distance &d)
Set the life time/length of a particle.
Definition: Particle.h:488
const tParticleVector & parents() const
The list of parent particles.
Definition: Particle.h:158
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
void rotate(double a, const Axis &axis)
Rotate around the given axis.
double rapidity() const
Return the (pseudo) rapidity.
Definition: Particle.h:389
void deepTransform(const LorentzRotation &r)
Do Lorentz transformations on this particle and its decendants.
void colourFlow(tPPtr child, bool anti=false)
Specify colour flow.
Definition: Particle.h:820
Particle(tcEventPDPtr newData)
Standard Constructor.
Definition: Particle.h:107
Value2 perp2() const
Squared transverse component of the spatial vector .
Time lifeTime() const
The invariant life time of this particle.
Definition: Particle.h:495
const ParticleRep & rep() const
Return a reference to the bulk information of this particle.
Definition: Particle.h:1006
tCBPtr colourInfo()
Get the ColourBase object.
Definition: Particle.h:692
void boost(double bx, double by, double bz)
Do Lorentz transformations on this particle.
Definition: Particle.h:510
void setLifeLength(const Distance &d)
Set the life length of this particle.
Definition: Particle.h:472
void rotateY(double a)
Rotate around the y-axis.
static void PrintParticles(ostream &os, Iterator first, Iterator last, tcStepPtr step=tcStepPtr())
Print a range of particles.
int number() const
Get the order-number for this particle in the current event.
Definition: Particle.h:257
void incomingAntiColour(tPPtr p)
Set incoming anti-colour.
Definition: Particle.h:789
Ptr< ParticleDataClass >::const_pointer cEventPDPtr
Alias for a reference counted pointer to const ParticleDataClass.
Definition: EventConfig.h:65
ParticleData inherits from InterfacedBase and represents the properties of a particle type...
Definition: ParticleData.h:36
cEventPDPtr theData
The pointer to the ParticleData object.
Definition: Particle.h:1014
bool hasAntiColour() const
True if this particle type carries anti-colour.
Definition: Particle.h:680
LorentzPoint decayVertex() const
The decay vertex of this particle.
Definition: Particle.h:434
This class is used internally in the Particle class to represent information besides momentum and typ...
Definition: Particle.h:1040
void mass(Energy m)
Set the mass of this particle.
Definition: Particle.h:986
A SubProcess object represents a hard sub-process in a collision.
Definition: SubProcess.h:33
tPPtr original()
Original instance.
Definition: Particle.h:222
ParticleRep & rep()
Return a reference to the bulk information of this particle.
Definition: Particle.h:997
virtual void rebind(const EventTranslationMap &)
Rebind to cloned objects.
bool hasRep() const
True if this particle has instantiated the object with information other than type and momentum...
Definition: Particle.h:884
void rescaleRho()
Rescale spatial component, so that the invariant length/mass of the LorentzVector agrees with the cur...
const Lorentz5Momentum & momentum() const
Return the momentum of this particle.
Definition: Particle.h:300
void antiColourFlow(tPPtr child)
Specify anticolour flow.
Definition: Particle.h:827
void status(int n)
Set the status code of the particle.
Definition: Particle.h:269
tParticleVector theParents
The pointers to the parents.
Definition: Particle.h:1055
Energy2 scale() const
Get the scale at which this particle is considered resolved.
Definition: Particle.h:339
void persistentOutput(PersistentOStream &) const
Standard function for writing to a persistent stream.
Energy perpmass() const
Return the transverse mass (squared), calculated from the mass and the transverse momentum...
Definition: Particle.h:384
static void Init()
Standard Init function.
const string & PDGName() const
Return the PDG name of this particle.
Definition: Particle.h:287
vector< tPPtr > tParticleVector
A vector of transient pointers to Particle.
Definition: EventConfig.h:72
void deepBoost(double bx, double by, double bz)
Do Lorentz transformations on this particle and its decendants.
Definition: Particle.h:555
void setMass(Value a)
Set invariant length/mass.
double energyError() const
Return the relative inconsistency in the energy component.
Definition: Particle.h:597
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
CBPtr theColourInfo
A pointer to the colour information object.
Definition: Particle.h:1111
ThePEG::Ptr< Step >::transient_const_pointer tcStepPtr
Alias for a transient pointer to a const Step .
Definition: Pointers.h:85
void set5Momentum(const Lorentz5Momentum &p)
Set the momentum and mass.
Definition: Particle.h:322
Value plus() const
Returns the positive light-cone component .
static ClassDescription< Particle > initParticle
Describe concrete class with persistent data.
Definition: Particle.h:1157
ThePEG::Ptr< DecayMode >::transient_pointer tDMPtr
Alias for a transient pointer to DecayMode .
Definition: Pointers.h:66
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...
Definition: Particle.h:608
bool coloured() const
True if this particle type is not a colour singlet.
Definition: Particle.h:670
bool hasColourInfo() const
True if this particle has colour information.
Definition: Particle.h:630
ThePEG::Ptr< ColourLine >::transient_pointer tColinePtr
Alias for a transient pointer to ColourLine .
Definition: Pointers.h:96
SpinPtr theSpinInfo
Spin information.
Definition: Particle.h:1116
void persistentInput(PersistentIStream &, int)
Standard function for reading from a persistent stream.
void transform(const LorentzRotation &r)
Do Lorentz transformations on this particle.
tColinePtr colourLine(bool anti=false) const
Return the colour lines to which this particles (anti-)colour is connected.
Definition: Particle.h:646
tPPtr outgoingAntiColour() const
Outgoing anti-colour.
Definition: Particle.h:802
Energy2 theVetoScale
the veto scale.
Definition: Particle.h:1101
void number(int n)
Set the order-number for this particle in the current event.
Definition: Particle.h:961
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
ThePEG::Ptr< Particle >::transient_pointer tPPtr
Alias for a transient pointer to Particle .
Definition: Pointers.h:67
void rescaleMass()
Set the invariant length/mass member, so that it agrees with the invariant length/mass of the Lorentz...
Energy nominalMass() const
Acces the mass of this particle type.
Definition: Particle.h:334
void rotateX(double a)
Rotate around the x-axis.
bool hasColour(bool anti=false) const
Return true if (anti) coloured or colour-octet.
Definition: ParticleData.h:357
ColourBase is the base class to be used to supply a Particle with information about its colour state...
Definition: ColourBase.h:32
void rescaleEnergy()
Rescale energy, so that the invariant length/mass of the LorentzVector agrees with the current one...
void outgoingAntiColour(tPPtr p)
Set outgoing anti-colour.
Definition: Particle.h:815
ThePEG::Ptr< Particle >::transient_const_pointer tcPPtr
Alias for a transient pointer to a const Particle .
Definition: Pointers.h:67
ParticleRep()
Default constructor.
Definition: Particle.h:1045
Energy2 theScale
the resolution scale.
Definition: Particle.h:1096
ParticleRep * theRep
The rest of the information in this particle is only instantiated if needed.
Definition: Particle.h:1025
ThePEG::Ptr< SpinInfo >::pointer SpinPtr
Alias for a reference counted pointer to SpinInfo .
Definition: Pointers.h:93
This is the decalaration of the Collision class.
Definition: Collision.h:34
const EIVector & getInfo() const
Access user-defined information as a vector of EventInfoBase pointers.
Definition: Particle.h:865
virtual void debugme() const
Print out debugging information for this object on std::cerr.
double eta() const
Return the (pseudo) rapidity.
Definition: Particle.h:397
Energy mass(Energy)
Set the nominal mass.
tcEventPDPtr dataPtr() const
Access the ParticleData object of this particle type.
Definition: Particle.h:282
tStepPtr theBirthStep
The pointer to the first step where this particle occurred.
Definition: Particle.h:1081
void resetColour()
Remove all colour information;.
Definition: Particle.h:832
Energy2 perpmass2() const
Return the transverse mass (squared), calculated from the mass and the transverse momentum...
Definition: Particle.h:378
void setLabVertex(const LorentzPoint &)
Set the creation vertex in the lab frame of this particle.
const ParticleVector & children() const
The list of decay products.
Definition: Particle.h:132
tcSpinPtr spinInfo() const
Return the Spin object.
Definition: Particle.h:843
Particle()
Private default constructor must only be used by the PersistentIStream class via the ClassTraits<Part...
Definition: Particle.h:1139
PPtr theNext
The pointer to the next instance.
Definition: Particle.h:1070
tcPPtr original() const
Original instance.
Definition: Particle.h:214
void incomingColour(tPPtr p, bool anti=false)
Set incoming colour.
Definition: Particle.h:783
Energy mt() const
Return the transverse mass (squared), calculated from the energy and the longitudinal momentum...
Definition: Particle.h:372
void setVect(const ThreeVector< Value > &p)
Set the 3-component part.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
void rescaleRho()
Rescale spatial component, so that the invariant length/mass of the LorentzVector agrees with the cur...
Definition: Particle.h:614
bool hasAntiColourLine(tcColinePtr line) const
Return true if the particle is connected to the given anti-colour line.
Definition: Particle.h:663
void addChild(tPPtr c)
Add a child (the childs parent pointer will be set accordingly).
Definition: Particle.h:140
void decayMode(tDMPtr dm)
If this particle has decayed set the corresponding decay mode.
Definition: Particle.h:185
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
tPPtr incomingColour(bool anti=false) const
Incoming colour.
tParticleSet siblings() const
Return a set of neighboring particles coming from the same decay as this one.
virtual ~Particle()
Destructor.
static string outputFormat
Specify how to print particles.
Definition: Particle.h:941
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
constexpr double MaxFloat
The largest possible float.
Definition: Constants.h:45
LorentzPoint labVertex() const
The creation vertex of this particle.
long id() const
Return the PDG id number of this particle.
Definition: Particle.h:292
bool coloured() const
Return true if coloured.
Definition: ParticleData.h:352
long id() const
Return the PDG id number.
Definition: ParticleData.h:88
double massError() const
Return the relative inconsistency in the mass component.
Definition: Particle.h:592
Value2 mass2() const
Mass/invariant length component squared.
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
bool decayed() const
Returns true if and only if this particle has decayed.
Definition: Particle.h:125
EIVector theExtraInfo
Additional used-defined information.
Definition: Particle.h:1121
void rescaleMass()
Set the invariant length/mass member, so that it agrees with the invariant length/mass of the Lorentz...
Definition: Particle.h:620
tPPtr thePrevious
The pointer to the previous instance.
Definition: Particle.h:1065
vector< PPtr > ParticleVector
A vector of pointers to Particle objects.
Definition: Containers.h:73
double rhoError() const
Return the relative inconsistency in the spatial components.
Definition: Particle.h:602
void setTau(Value a)
Set invariant length/mass.
bool hasColour(bool anti=false) const
True if this particle type carries (anti-)colour.
Definition: Particle.h:675
tPPtr incomingAntiColour() const
Incoming anti-colour.
Definition: Particle.h:776
void set3Momentum(const Momentum3 &p)
Set the 3-momentum of this particle.
Definition: Particle.h:306
Energy2 vetoScale() const
Get the scale above which this particle should not radiate.
Definition: Particle.h:352
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
int theStatus
The status code of the particle.
Definition: Particle.h:1030
EIVector & getInfo()
Access user-defined information as a vector of EventInfoBase pointers.
Definition: Particle.h:873
Ptr< ParticleDataClass >::transient_const_pointer tcEventPDPtr
Alias for a transient pointer to const ParticleDataClass.
Definition: EventConfig.h:69
constexpr ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
Definition: PhysicalQty.h:35
Value minus() const
Returns the negative light-cone component .
void lifeTime(Length t)
Set the invaiant life time of this particle.
Definition: Particle.h:991
vector< EIPtr > EIVector
A vector of pointers to EventInfoBase objects.
Definition: Containers.h:160
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52
The Step class contains information of all particles present after certain step in the event generati...
Definition: Step.h:34
bool hasAntiColour() const
Return true if anti coloured or colour-octet.
Definition: ParticleData.h:366
void rotateZ(double a)
Rotate around the z-axis.
tPPtr outgoingColour(bool anti=false) const
Outgoing colour.