9 #ifndef ThePEG_Particle_H 10 #define ThePEG_Particle_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" 142 (c->rep()).theParents.push_back(
this);
152 child->removeParent(
this);
500 void boost(
double bx,
double by,
double bz) {
683 if ( !
rep().theColourInfo ) {
709 template <
typename Iterator>
710 typename std::iterator_traits<Iterator>::value_type
711 colourNeighbour(Iterator first, Iterator last,
bool anti =
false)
const;
718 template <
typename Iterator>
719 typename std::iterator_traits<Iterator>::value_type
909 template <
typename Iterator>
910 static void PrintParticles(ostream & os, Iterator first, Iterator last,
916 template <
typename Cont>
1167 static string className() {
return "ThePEG::Particle"; }
1169 static TPtr create() {
return TPtr::Create(
Particle()); }
1176 #ifndef ThePEG_TEMPLATES_IN_CC_FILE 1177 #include "Particle.tcc" tDMPtr theDecayMode
If this particle has decayed this is the pointer to the corresponding decay mode. ...
void antiColourConnect(tPPtr neighbour)
Connect colour.
tcCBPtr colourInfo() const
Get the ColourBase object.
ThePEG::Ptr< Particle >::pointer PPtr
Alias for a reference counted pointer to Particle .
void colourInfo(tCBPtr c)
Set the ColourBase object.
void deepBoost(const Boost &b)
Do Lorentz transformations on this particle and its decendants.
void deepRotateY(double a)
Rotate this particle and its decendants around the y-axis.
const Lorentz5Distance & lifeLength() const
The life time/length.
ParticleVector theChildren
The pointers to the children.
tSpinPtr spinInfo()
Return the Spin object.
Ptr< T >::pointer new_ptr()
Simple interface to the PtrTraits<Ptr>::create()
PersistentIStream is used to read persistent objects from a stream where they were previously written...
Lorentz5Momentum theMomentum
The momentum.
void scale(Energy2 q2)
Set the scale at which this particle is considered resolved.
tDMPtr decayMode() const
If this particle has decayed get the corresponding decay mode.
void setVertex(const LorentzPoint &p)
Set the creation vertex relative to the collision vertex.
Energy Pminus() const
Return the positive and negative light-cone momenta.
void boost(const Boost &b)
Do Lorentz transformations on this particle.
ThePEG::Ptr< Step >::transient_pointer tStepPtr
Alias for a transient pointer to Step .
void undecay()
Undo the decay of this particle, removing all children (and grand children ...) from the event record...
The Particle class is used to describe an instance of a particle.
void deepRotate(double a, const Axis &axis)
Rotate this particle and its decendants around the given axis.
tPPtr previous() const
Previous instance.
Define the base class from which all (polymorphic) classes in ThePEG are derived. ...
Value m() const
Magnitude (signed) .
Energy mass() const
Acces the mass of this particle.
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.
void removeChild(tPPtr c)
Remove the given particle from the list of children.
void colourConnect(tPPtr neighbour, bool anti=false)
Connect colour.
const LorentzPoint & vertex() const
The creation vertex of this particle.
double massError() const
Return the relative inconsistency in the mass component.
void antiColourNeighbour(tPPtr p)
Set the anti-colour neighbor.
This is the main config header file for the Event classes.
The Event class contains all Particles produced in the generation of an event.
This class is used to store colour information of RemnantParticle objects and other particle classes ...
bool hasColourLine(tcColinePtr line, bool anti=false) const
Return true if the particle is connected to the given (anti-) colour line.
void setLifeLength(const LorentzDistance &d)
Set the life time/length of a particle.
ThePEG::Ptr< ColourBase >::pointer CBPtr
Alias for a reference counted pointer to ColourBase .
LorentzPoint labDecayVertex() const
The decay vertex of this particle.
set< tPPtr, less< tPPtr > > tParticleSet
A set of transient pointers to Particle.
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.
tPPtr next() const
Next instance.
const ParticleDataClass & data() const
Access the ParticleData object of this particle type.
std::iterator_traits< Iterator >::value_type antiColourNeighbour(Iterator first, Iterator last) const
Get a pointer to the anti-colour neighbor.
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.
int theNumber
The order-number for this particle in the current event.
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...
void deepRotateZ(double a)
Rotate this particle and its decendants around the z-axis.
const string & PDGName() const
Return the generic PDG name.
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Energy mass() const
Return the nominal mass.
void removeParent(tPPtr p)
Remove the given particle from the list of parents.
Lorentz5Distance theLifeLength
The life time/length.
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...
double rhoError() const
Return the relative inconsistency in the spatial components.
LorentzPoint theVertex
The creation point.
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.
void setMomentum(const LorentzMomentum &p)
Set the momentum of this particle.
Rebinder is a class associating pairs of pointers to objects.
tColinePtr antiColourLine() const
Return the colour lines to which this particles anti-colour is connected.
void setLifeLength(const Lorentz5Distance &d)
Set the life time/length of a particle.
const tParticleVector & parents() const
The list of parent particles.
This is the main namespace within which all identifiers in ThePEG are declared.
void rotate(double a, const Axis &axis)
Rotate around the given axis.
double rapidity() const
Return the (pseudo) rapidity.
void deepTransform(const LorentzRotation &r)
Do Lorentz transformations on this particle and its decendants.
void colourFlow(tPPtr child, bool anti=false)
Specify colour flow.
Particle(tcEventPDPtr newData)
Standard Constructor.
Value2 perp2() const
Squared transverse component of the spatial vector .
Time lifeTime() const
The invariant life time of this particle.
const ParticleRep & rep() const
Return a reference to the bulk information of this particle.
tCBPtr colourInfo()
Get the ColourBase object.
void boost(double bx, double by, double bz)
Do Lorentz transformations on this particle.
void setLifeLength(const Distance &d)
Set the life length of this particle.
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.
void incomingAntiColour(tPPtr p)
Set incoming anti-colour.
Ptr< ParticleDataClass >::const_pointer cEventPDPtr
Alias for a reference counted pointer to const ParticleDataClass.
ParticleData inherits from InterfacedBase and represents the properties of a particle type...
cEventPDPtr theData
The pointer to the ParticleData object.
bool hasAntiColour() const
True if this particle type carries anti-colour.
LorentzPoint decayVertex() const
The decay vertex of this particle.
This class is used internally in the Particle class to represent information besides momentum and typ...
void mass(Energy m)
Set the mass of this particle.
A SubProcess object represents a hard sub-process in a collision.
tPPtr original()
Original instance.
ParticleRep & rep()
Return a reference to the bulk information of this particle.
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...
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.
void antiColourFlow(tPPtr child)
Specify anticolour flow.
QTY< 0, 1, 0 >::Type Energy
Energy.
tParticleVector theParents
The pointers to the parents.
Energy2 scale() const
Get the scale at which this particle is considered resolved.
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...
static void Init()
Standard Init function.
const string & PDGName() const
Return the PDG name of this particle.
vector< tPPtr > tParticleVector
A vector of transient pointers to Particle.
void deepBoost(double bx, double by, double bz)
Do Lorentz transformations on this particle and its decendants.
void setMass(Value a)
Set invariant length/mass.
double energyError() const
Return the relative inconsistency in the energy component.
void abandonChild(tPPtr child)
Remove the given child from the list of children of this particle (the corresponding parent pointer o...
CBPtr theColourInfo
A pointer to the colour information object.
ThePEG::Ptr< Step >::transient_const_pointer tcStepPtr
Alias for a transient pointer to a const Step .
void set5Momentum(const Lorentz5Momentum &p)
Set the momentum and mass.
QTY< 1, 0, 0 >::Type Length
Length.
Value plus() const
Returns the positive light-cone component .
static ClassDescription< Particle > initParticle
Describe concrete class with persistent data.
ThePEG::Ptr< DecayMode >::transient_pointer tDMPtr
Alias for a transient pointer to DecayMode .
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...
bool coloured() const
True if this particle type is not a colour singlet.
bool hasColourInfo() const
True if this particle has colour information.
ThePEG::Ptr< ColourLine >::transient_pointer tColinePtr
Alias for a transient pointer to ColourLine .
SpinPtr theSpinInfo
Spin information.
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.
Length Time
Time has the same unit as Length.
tPPtr outgoingAntiColour() const
Outgoing anti-colour.
Energy2 theVetoScale
the veto scale.
void number(int n)
Set the order-number for this particle in the current event.
RCPtr is a reference counted (smart) pointer.
ThePEG::Ptr< Particle >::transient_pointer tPPtr
Alias for a transient pointer to Particle .
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.
void rotateX(double a)
Rotate around the x-axis.
bool hasColour(bool anti=false) const
Return true if (anti) coloured or colour-octet.
ColourBase is the base class to be used to supply a Particle with information about its colour state...
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.
ThePEG::Ptr< Particle >::transient_const_pointer tcPPtr
Alias for a transient pointer to a const Particle .
const ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
ParticleRep()
Default constructor.
Energy2 theScale
the resolution scale.
ParticleRep * theRep
The rest of the information in this particle is only instantiated if needed.
ThePEG::Ptr< SpinInfo >::pointer SpinPtr
Alias for a reference counted pointer to SpinInfo .
This is the decalaration of the Collision class.
const EIVector & getInfo() const
Access user-defined information as a vector of EventInfoBase pointers.
virtual void debugme() const
Print out debugging information for this object on std::cerr.
double eta() const
Return the (pseudo) rapidity.
tcEventPDPtr dataPtr() const
Access the ParticleData object of this particle type.
tStepPtr theBirthStep
The pointer to the first step where this particle occurred.
void resetColour()
Remove all colour information;.
Energy2 perpmass2() const
Return the transverse mass (squared), calculated from the mass and the transverse momentum...
void setLabVertex(const LorentzPoint &)
Set the creation vertex in the lab frame of this particle.
const ParticleVector & children() const
The list of decay products.
tcSpinPtr spinInfo() const
Return the Spin object.
Particle()
Private default constructor must only be used by the PersistentIStream class via the ClassTraits<Part...
PPtr theNext
The pointer to the next instance.
tcPPtr original() const
Original instance.
void incomingColour(tPPtr p, bool anti=false)
Set incoming colour.
Energy mt() const
Return the transverse mass (squared), calculated from the energy and the longitudinal momentum...
void setVect(const ThreeVector< Value > &p)
Set the 3-component part.
The default concrete implementation of ClassTraitsBase.
void rescaleRho()
Rescale spatial component, so that the invariant length/mass of the LorentzVector agrees with the cur...
bool hasAntiColourLine(tcColinePtr line) const
Return true if the particle is connected to the given anti-colour line.
void addChild(tPPtr c)
Add a child (the childs parent pointer will be set accordingly).
void decayMode(tDMPtr dm)
If this particle has decayed set the corresponding decay mode.
vector< T > & operator<<(vector< T > &tv, const U &u)
Overload the left shift operator for vector to push_back objects to a vector.
const double MaxFloat
The largest possible float.
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.
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.
LorentzPoint labVertex() const
The creation vertex of this particle.
long id() const
Return the PDG id number of this particle.
bool coloured() const
Return true if coloured.
long id() const
Return the PDG id number.
double massError() const
Return the relative inconsistency in the mass component.
Value2 mass2() const
Mass/invariant length component squared.
void vetoScale(Energy2 q2)
Set the scale above which this particle should not radiate.
void mirror()
Mirror in the xy-plane.
bool decayed() const
Returns true if and only if this particle has decayed.
EIVector theExtraInfo
Additional used-defined information.
void rescaleMass()
Set the invariant length/mass member, so that it agrees with the invariant length/mass of the Lorentz...
tPPtr thePrevious
The pointer to the previous instance.
vector< PPtr > ParticleVector
A vector of pointers to Particle objects.
double rhoError() const
Return the relative inconsistency in the spatial components.
void setTau(Value a)
Set invariant length/mass.
bool hasColour(bool anti=false) const
True if this particle type carries (anti-)colour.
tPPtr incomingAntiColour() const
Incoming anti-colour.
void set3Momentum(const Momentum3 &p)
Set the 3-momentum of this particle.
Energy2 vetoScale() const
Get the scale above which this particle should not radiate.
BaseClassTraits describes the base classes of the templated class.
EIVector & getInfo()
Access user-defined information as a vector of EventInfoBase pointers.
Ptr< ParticleDataClass >::transient_const_pointer tcEventPDPtr
Alias for a transient pointer to const ParticleDataClass.
Value minus() const
Returns the negative light-cone component .
Particle & operator=(const Particle &)
Private and non-existent assignment.
void lifeTime(Length t)
Set the invaiant life time of this particle.
vector< EIPtr > EIVector
A vector of pointers to EventInfoBase objects.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
The Step class contains information of all particles present after certain step in the event generati...
bool hasAntiColour() const
Return true if anti coloured or colour-octet.
void rotateZ(double a)
Rotate around the z-axis.
tPPtr outgoingColour(bool anti=false) const
Outgoing colour.