thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.1.5
Particle.h
1 // -*- C++ -*-
2 //
3 // Particle.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2017 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) {}
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  }
261 
267  const ParticleDataClass & data() const { return *theData; }
268 
272  tcEventPDPtr dataPtr() const { return theData; }
273 
277  const string & PDGName() const { return data().PDGName(); }
278 
282  long id() const { return data().id(); }
284 
290  const Lorentz5Momentum & momentum() const { return theMomentum; }
291 
296  void set3Momentum(const Momentum3 & p) {
297  theMomentum.setVect(p);
299  }
300 
305  void setMomentum(const LorentzMomentum & p) {
306  theMomentum = p;
307  }
308 
312  void set5Momentum(const Lorentz5Momentum & p) {
313  theMomentum = p;
314  }
315 
319  Energy mass() const { return momentum().mass(); }
320 
324  Energy nominalMass() const { return data().mass(); }
325 
329  Energy2 scale() const {
330  return hasRep() ? rep().theScale : -1.0*GeV2;
331  }
332 
336  void scale(Energy2 q2) { rep().theScale = q2; }
337 
342  Energy2 vetoScale() const {
343  return hasRep() ? rep().theVetoScale : -1.0*GeV2;
344  }
345 
350  void vetoScale(Energy2 q2) { rep().theVetoScale = q2; }
351 
356  Energy2 mt2() const { return sqr(momentum().t()) - sqr(momentum().z()); }
357 
362  Energy mt() const { return sqrt(mt2()); }
363 
368  Energy2 perpmass2() const { return momentum().perp2() + momentum().mass2(); }
369 
374  Energy perpmass() const { return sqrt(perpmass2()); }
375 
379  double rapidity() const {
380  return ( Pplus() > ZERO && Pminus() > ZERO )?
381  0.5*log(Pplus()/Pminus()) : Constants::MaxFloat;
382  }
383 
387  double eta() const {
388  Energy rho = momentum().rho();
389  return rho > abs(momentum().z())?
390  0.5*log((rho+momentum().z())/(rho-momentum().z())) : Constants::MaxFloat;
391  }
392 
396  Energy Pplus() const { return momentum().plus(); }
400  Energy Pminus() const { return momentum().minus(); }
402 
409  const LorentzPoint & vertex() const {
410  static const LorentzPoint null;
411  return hasRep() ? rep().theVertex : null;
412  }
413 
418  LorentzPoint labVertex() const;
419 
425  return vertex() + lifeLength();
426  }
427 
433  return labVertex() + lifeLength();
434  }
435 
440  const Lorentz5Distance & lifeLength() const {
441  static const Lorentz5Distance null;
442  return hasRep() ? rep().theLifeLength : null;
443  }
444 
448  void setVertex(const LorentzPoint & p) {
449  rep().theVertex = p;
450  }
451 
455  void setLabVertex(const LorentzPoint &);
456 
462  void setLifeLength(const Distance & d) {
465  }
466 
471  void setLifeLength(const LorentzDistance & d) {
472  rep().theLifeLength = d;
473  }
474 
478  void setLifeLength(const Lorentz5Distance & d) {
479  rep().theLifeLength = d;
480  }
481 
485  Time lifeTime() const { return lifeLength().m(); }
486 
488 
494  void transform(const LorentzRotation & r);
495 
500  void boost(double bx, double by, double bz) {
501  transform(LorentzRotation(Boost(bx, by, bz)));
502  }
503 
508  void boost(const Boost & b) { transform(LorentzRotation(b)); }
509 
513  void rotateX(double a);
514 
518  void rotateY(double a);
519 
523  void rotateZ(double a);
524 
528  void rotate(double a, const Axis & axis);
529 
533  void mirror() { theMomentum.setZ(-theMomentum.z()); }
534 
538  void deepTransform(const LorentzRotation & r);
539 
545  void deepBoost(double bx, double by, double bz) {
546  deepTransform(LorentzRotation(Boost(bx, by, bz)));
547  }
548 
553  void deepBoost(const Boost & b) { deepTransform(LorentzRotation(b)); }
554 
558  void deepRotateX(double a);
559 
563  void deepRotateY(double a);
564 
568  void deepRotateZ(double a);
569 
573  void deepRotate(double a, const Axis & axis);
574 
576 
582  double massError() const { return theMomentum.massError(); }
583 
587  double energyError() const { return theMomentum.energyError(); }
588 
592  double rhoError() const { return theMomentum.rhoError(); }
593 
599 
605 
612 
620  bool hasColourInfo() const {
621  return hasRep() && rep().theColourInfo;
622  }
623 
629  return hasColourInfo() ? colourInfo()->antiColourLine() : tColinePtr();
630  }
631 
636  tColinePtr colourLine(bool anti = false) const {
637  if ( anti ) return antiColourLine();
638  return hasColourInfo() ? colourInfo()->colourLine() : tColinePtr();
639  }
640 
645  bool hasColourLine(tcColinePtr line, bool anti = false) const {
646  return hasColourInfo() ? colourInfo()->hasColourLine(line, anti) : false;
647  }
648 
653  bool hasAntiColourLine(tcColinePtr line) const {
654  return hasColourLine(line, true);
655  }
656 
660  bool coloured() const { return data().coloured(); }
661 
665  bool hasColour(bool anti = false) const { return data().hasColour(anti); }
666 
670  bool hasAntiColour() const { return data().hasAntiColour(); }
671 
675  tcCBPtr colourInfo() const {
676  return hasRep() ? rep().theColourInfo : CBPtr();
677  }
678 
683  if ( !rep().theColourInfo ) {
684  switch(theData->iColour()) {
685  case PDT::Colour6:
686  case PDT::Colour6bar:
688  break;
689  default:
691  }
692  }
693  return rep().theColourInfo;
694  }
695 
699  void colourInfo(tCBPtr c) {
700  rep().theColourInfo = c;
701  }
702 
709  template <typename Iterator>
710  typename std::iterator_traits<Iterator>::value_type
711  colourNeighbour(Iterator first, Iterator last, bool anti = false) const;
712 
718  template <typename Iterator>
719  typename std::iterator_traits<Iterator>::value_type
720  antiColourNeighbour(Iterator first, Iterator last) const {
721  return colourNeighbour(first, last, true);
722  }
723 
729  void colourNeighbour(tPPtr, bool anti = false);
730 
736 
741  void antiColourConnect(tPPtr neighbour) {
742  colourConnect(neighbour, true);
743  }
744 
750  void colourConnect(tPPtr neighbour, bool anti = false) {
751  colourNeighbour(neighbour, anti);
752  }
753 
759  tPPtr incomingColour(bool anti = false) const;
760 
766  tPPtr incomingAntiColour() const { return incomingColour(true); }
767 
773  void incomingColour(tPPtr p, bool anti = false) { p->outgoingColour(this, anti); }
774 
779  void incomingAntiColour(tPPtr p) { p->outgoingColour(this, true); }
780 
786  tPPtr outgoingColour(bool anti = false) const;
792  tPPtr outgoingAntiColour() const { return outgoingColour(true); }
793 
799  void outgoingColour(tPPtr, bool anti = false);
800 
806 
810  void colourFlow(tPPtr child, bool anti = false) {
811  outgoingColour(child, anti);
812  }
813 
817  void antiColourFlow(tPPtr child) { colourFlow(child, true); }
818 
822  void resetColour() {
823  if ( hasColourInfo() ) rep().theColourInfo = CBPtr();
824  }
825 
827 
833  tcSpinPtr spinInfo() const {
834  return hasRep() ? rep().theSpinInfo : SpinPtr();
835  }
836 
841  return hasRep() ? rep().theSpinInfo : SpinPtr();
842  }
843 
847  void spinInfo(tSpinPtr s) { rep().theSpinInfo = s; }
849 
855  const EIVector & getInfo() const {
856  static const EIVector null;
857  return hasRep() ? rep().theExtraInfo : null;
858  }
859 
863  EIVector & getInfo() { return rep().theExtraInfo; }
865 
866 public:
867 
874  bool hasRep() const { return theRep; }
875 
880  void initFull();
881 
883 
884 public:
885 
891  void persistentOutput(PersistentOStream &) const;
892 
896  void persistentInput(PersistentIStream &, int);
897 
899 
904  ostream & print(ostream & os, tcStepPtr step = tcStepPtr()) const;
905 
909  template <typename Iterator>
910  static void PrintParticles(ostream & os, Iterator first, Iterator last,
911  tcStepPtr step = tcStepPtr());
912 
916  template <typename Cont>
917  static inline void PrintParticles(ostream & os, const Cont & c,
918  tcStepPtr step = tcStepPtr()) {
919  PrintParticles(os, c.begin(), c.end(), step);
920  }
921 
925  static void Init();
926 
931  static string outputFormat;
932 
933 private:
934 
938  virtual PPtr clone() const;
939 
946  virtual void rebind(const EventTranslationMap &);
947 
951  void number(int n) { rep().theNumber = n; }
952 
956  void removeChild(tPPtr c) {
957  if ( hasRep() )
958  rep().theChildren.erase(remove(rep().theChildren.begin(),
959  rep().theChildren.end(), c),
960  rep().theChildren.end());
961  }
962 
966  void removeParent(tPPtr p) {
967  if ( hasRep() )
968  rep().theParents.erase(remove(rep().theParents.begin(),
969  rep().theParents.end(), p),
970  rep().theParents.end());
971  }
972 
976  void mass(Energy m) { theMomentum.setMass(m); }
977 
982 
988  if ( !hasRep() ) initFull();
989  return *theRep;
990  }
991 
996  const ParticleRep & rep() const {
997  static const ParticleRep null;
998  return hasRep() ? *theRep : null;
999  }
1000 
1005 
1010 
1016 
1017 public:
1018 
1025  struct ParticleRep {
1026 
1030  ParticleRep() : theScale(-1.0*GeV2), theVetoScale(-1.0*GeV2), theNumber(0) {}
1031 
1035  ParticleRep(const ParticleRep &);
1036 
1041 
1046 
1051 
1056 
1062 
1067 
1072 
1077 
1082 
1087 
1092 
1097 
1102 
1107 
1108  };
1109 
1110 public:
1111 
1116  virtual void debugme() const;
1117 
1118 protected:
1119 
1124  Particle() : theRep(0) {}
1125 
1130  friend struct ClassTraits<Particle>;
1131 
1132 private:
1133 
1137  Particle & operator=(const Particle &) = delete;
1138 
1143 
1144 };
1145 
1149 ostream & operator<<(ostream &, const Particle &);
1150 
1151 
1156 template <>
1157 struct BaseClassTrait<Particle,1>: public ClassTraitsType {
1159  typedef EventRecordBase NthBase;
1160 };
1161 
1164 template <>
1165 struct ClassTraits<Particle>: public ClassTraitsBase<Particle> {
1167  static string className() { return "ThePEG::Particle"; }
1169  static TPtr create() { return TPtr::Create(Particle()); }
1170 };
1171 
1174 }
1175 
1176 #ifndef ThePEG_TEMPLATES_IN_CC_FILE
1177 #include "Particle.tcc"
1178 #endif
1179 
1180 #endif /* ThePEG_Particle_H */
tDMPtr theDecayMode
If this particle has decayed this is the pointer to the corresponding decay mode. ...
Definition: Particle.h:1061
void antiColourConnect(tPPtr neighbour)
Connect colour.
Definition: Particle.h:741
tcCBPtr colourInfo() const
Get the ColourBase object.
Definition: Particle.h:675
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:699
void deepBoost(const Boost &b)
Do Lorentz transformations on this particle and its decendants.
Definition: Particle.h:553
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:440
ParticleVector theChildren
The pointers to the children.
Definition: Particle.h:1045
tSpinPtr spinInfo()
Return the Spin object.
Definition: Particle.h:840
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:1009
void scale(Energy2 q2)
Set the scale at which this particle is considered resolved.
Definition: Particle.h:336
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:448
Energy Pminus() const
Return the positive and negative light-cone momenta.
Definition: Particle.h:400
void boost(const Boost &b)
Do Lorentz transformations on this particle.
Definition: Particle.h:508
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:319
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:956
void colourConnect(tPPtr neighbour, bool anti=false)
Connect colour.
Definition: Particle.h:750
const LorentzPoint & vertex() const
The creation vertex of this particle.
Definition: Particle.h:409
double massError() const
Return the relative inconsistency in the mass component.
void antiColourNeighbour(tPPtr p)
Set the anti-colour neighbor.
Definition: Particle.h:735
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:645
Colour-sextet.
Definition: PDT.h:100
void setLifeLength(const LorentzDistance &d)
Set the life time/length of a particle.
Definition: Particle.h:471
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:432
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:847
tPPtr next() const
Next instance.
Definition: Particle.h:198
const ParticleDataClass & data() const
Access the ParticleData object of this particle type.
Definition: Particle.h:267
std::iterator_traits< Iterator >::value_type antiColourNeighbour(Iterator first, Iterator last) const
Get a pointer to the anti-colour neighbor.
Definition: Particle.h:720
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:917
int theNumber
The order-number for this particle in the current event.
Definition: Particle.h:1091
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:356
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
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:966
Lorentz5Distance theLifeLength
The life time/length.
Definition: Particle.h:1076
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
double rhoError() const
Return the relative inconsistency in the spatial components.
LorentzPoint theVertex
The creation point.
Definition: Particle.h:1071
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:305
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:628
void setLifeLength(const Lorentz5Distance &d)
Set the life time/length of a particle.
Definition: Particle.h:478
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:379
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:810
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:485
const ParticleRep & rep() const
Return a reference to the bulk information of this particle.
Definition: Particle.h:996
tCBPtr colourInfo()
Get the ColourBase object.
Definition: Particle.h:682
void boost(double bx, double by, double bz)
Do Lorentz transformations on this particle.
Definition: Particle.h:500
void setLifeLength(const Distance &d)
Set the life length of this particle.
Definition: Particle.h:462
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:779
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:1004
bool hasAntiColour() const
True if this particle type carries anti-colour.
Definition: Particle.h:670
LorentzPoint decayVertex() const
The decay vertex of this particle.
Definition: Particle.h:424
This class is used internally in the Particle class to represent information besides momentum and typ...
Definition: Particle.h:1025
void mass(Energy m)
Set the mass of this particle.
Definition: Particle.h:976
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:987
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:874
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:290
void antiColourFlow(tPPtr child)
Specify anticolour flow.
Definition: Particle.h:817
tParticleVector theParents
The pointers to the parents.
Definition: Particle.h:1040
Energy2 scale() const
Get the scale at which this particle is considered resolved.
Definition: Particle.h:329
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:374
static void Init()
Standard Init function.
const string & PDGName() const
Return the PDG name of this particle.
Definition: Particle.h:277
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:545
void setMass(Value a)
Set invariant length/mass.
double energyError() const
Return the relative inconsistency in the energy component.
Definition: Particle.h:587
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:1096
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:312
Value plus() const
Returns the positive light-cone component .
static ClassDescription< Particle > initParticle
Describe concrete class with persistent data.
Definition: Particle.h:1142
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:598
bool coloured() const
True if this particle type is not a colour singlet.
Definition: Particle.h:660
bool hasColourInfo() const
True if this particle has colour information.
Definition: Particle.h:620
ThePEG::Ptr< ColourLine >::transient_pointer tColinePtr
Alias for a transient pointer to ColourLine .
Definition: Pointers.h:96
SpinPtr theSpinInfo
Spin information.
Definition: Particle.h:1101
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:636
tPPtr outgoingAntiColour() const
Outgoing anti-colour.
Definition: Particle.h:792
Energy2 theVetoScale
the veto scale.
Definition: Particle.h:1086
void number(int n)
Set the order-number for this particle in the current event.
Definition: Particle.h:951
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:324
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:805
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:1030
Energy2 theScale
the resolution scale.
Definition: Particle.h:1081
ParticleRep * theRep
The rest of the information in this particle is only instantiated if needed.
Definition: Particle.h:1015
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:855
virtual void debugme() const
Print out debugging information for this object on std::cerr.
double eta() const
Return the (pseudo) rapidity.
Definition: Particle.h:387
Energy mass(Energy)
Set the nominal mass.
tcEventPDPtr dataPtr() const
Access the ParticleData object of this particle type.
Definition: Particle.h:272
tStepPtr theBirthStep
The pointer to the first step where this particle occurred.
Definition: Particle.h:1066
void resetColour()
Remove all colour information;.
Definition: Particle.h:822
Energy2 perpmass2() const
Return the transverse mass (squared), calculated from the mass and the transverse momentum...
Definition: Particle.h:368
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:833
Particle()
Private default constructor must only be used by the PersistentIStream class via the ClassTraits<Part...
Definition: Particle.h:1124
PPtr theNext
The pointer to the next instance.
Definition: Particle.h:1055
tcPPtr original() const
Original instance.
Definition: Particle.h:214
void incomingColour(tPPtr p, bool anti=false)
Set incoming colour.
Definition: Particle.h:773
Energy mt() const
Return the transverse mass (squared), calculated from the energy and the longitudinal momentum...
Definition: Particle.h:362
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:604
bool hasAntiColourLine(tcColinePtr line) const
Return true if the particle is connected to the given anti-colour line.
Definition: Particle.h:653
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:931
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:396
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:282
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:582
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:350
void mirror()
Mirror in the xy-plane.
Definition: Particle.h:533
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:1106
void rescaleMass()
Set the invariant length/mass member, so that it agrees with the invariant length/mass of the Lorentz...
Definition: Particle.h:610
tPPtr thePrevious
The pointer to the previous instance.
Definition: Particle.h:1050
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:592
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:665
tPPtr incomingAntiColour() const
Incoming anti-colour.
Definition: Particle.h:766
void set3Momentum(const Momentum3 &p)
Set the 3-momentum of this particle.
Definition: Particle.h:296
Energy2 vetoScale() const
Get the scale above which this particle should not radiate.
Definition: Particle.h:342
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
EIVector & getInfo()
Access user-defined information as a vector of EventInfoBase pointers.
Definition: Particle.h:863
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:33
Value minus() const
Returns the negative light-cone component .
void lifeTime(Length t)
Set the invaiant life time of this particle.
Definition: Particle.h:981
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.