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.
bool hasAntiColour() const
Return true if anti coloured or colour-octet.
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.
double energyError() const
Return the relative inconsistency in the energy component.
void deepRotateY(double a)
Rotate this particle and its decendants around the y-axis.
bool hasAntiColourLine(tcColinePtr line) const
Return true if the particle is connected to the given anti-colour line.
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.
void setVertex(const LorentzPoint &p)
Set the creation vertex relative to the collision vertex.
bool coloured() const
Return true if coloured.
bool coloured() const
True if this particle type is not a colour singlet.
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.
void persistentOutput(PersistentOStream &) const
Standard function for writing to a persistent stream.
Value m() const
Magnitude (signed) .
Define the base class from which all (polymorphic) classes in ThePEG are derived. ...
void deepRotateX(double a)
Rotate this particle and its decendants around the x-axis.
const string & PDGName() const
Return the PDG name of this particle.
ClassTraitsType is an empty, non-polymorphic, base class.
Value2 mass2() const
Mass/invariant length component squared.
void removeChild(tPPtr c)
Remove the given particle from the list of children.
void colourConnect(tPPtr neighbour, bool anti=false)
Connect colour.
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 ...
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 .
const ParticleDataClass & data() const
Access the ParticleData object of this particle type.
set< tPPtr, less< tPPtr > > tParticleSet
A set of transient pointers to Particle.
LorentzPoint labVertex() const
The creation vertex of this particle.
const Lorentz5Distance & lifeLength() const
The life time/length.
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
void spinInfo(tSpinPtr s)
Set the Spin object.
int number() const
Get the order-number for this particle in the current event.
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...
void deepRotateZ(double a)
Rotate this particle and its decendants around the z-axis.
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
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...
tPPtr outgoingColour(bool anti=false) const
Outgoing colour.
Value2 perp2() const
Squared transverse component of the spatial vector .
tColinePtr antiColourLine() const
Return the colour lines to which this particles anti-colour is connected.
double massError() const
Return the relative inconsistency in the mass component.
LorentzPoint theVertex
The creation point.
void setMomentum(const LorentzMomentum &p)
Set the momentum of this particle.
Rebinder is a class associating pairs of pointers to objects.
void setLifeLength(const Lorentz5Distance &d)
Set the life time/length of a particle.
tParticleSet siblings() const
Return a set of neighboring particles coming from the same decay as this one.
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.
Energy mass() const
Acces the mass of this particle.
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.
Energy perpmass() const
Return the transverse mass (squared), calculated from the mass and the transverse momentum...
bool hasAntiColour() const
True if this particle type carries anti-colour.
std::iterator_traits< Iterator >::value_type antiColourNeighbour(Iterator first, Iterator last) const
Get a pointer to the anti-colour neighbor.
tDMPtr decayMode() const
If this particle has decayed get the corresponding decay mode.
Energy2 perpmass2() const
Return the transverse mass (squared), calculated from the mass and the transverse momentum...
tCBPtr colourInfo()
Get the ColourBase object.
Time lifeTime() const
The invariant life time of this particle.
const Lorentz5Momentum & momentum() const
Return the momentum of this particle.
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.
bool hasColour(bool anti=false) const
True if this particle type carries (anti-)colour.
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.
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.
Energy mt() const
Return the transverse mass (squared), calculated from the energy and the longitudinal momentum...
This class is used internally in the Particle class to represent information besides momentum and typ...
bool hasColour(bool anti=false) const
Return true if (anti) coloured or colour-octet.
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.
tcEventPDPtr dataPtr() const
Access the ParticleData object of this particle type.
ParticleRep & rep()
Return a reference to the bulk information of this particle.
virtual void rebind(const EventTranslationMap &)
Rebind to cloned objects.
void rescaleRho()
Rescale spatial component, so that the invariant length/mass of the LorentzVector agrees with the cur...
void antiColourFlow(tPPtr child)
Specify anticolour flow.
virtual PPtr clone() const
Standard clone function.
QTY< 0, 1, 0 >::Type Energy
Energy.
tParticleVector theParents
The pointers to the parents.
Value minus() const
Returns the negative light-cone component .
static void Init()
Standard Init function.
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.
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 .
Energy Pminus() const
Return the positive and negative light-cone momenta.
double rhoError() const
Return the relative inconsistency in the spatial components.
virtual void debugme() const
Print out debugging information for this object on std::cerr.
void set5Momentum(const Lorentz5Momentum &p)
Set the momentum and mass.
QTY< 1, 0, 0 >::Type Length
Length.
static ClassDescription< Particle > initParticle
Describe concrete class with persistent data.
ThePEG::Ptr< DecayMode >::transient_pointer tDMPtr
Alias for a transient pointer to DecayMode .
void rescaleEnergy()
Rescale energy, so that the invariant length/mass of the LorentzVector agrees with the current one...
tPPtr next() const
Next instance.
double massError() const
Return the relative inconsistency in the mass component.
Energy2 vetoScale() const
Get the scale above which this particle should not radiate.
tcCBPtr colourInfo() const
Get the ColourBase object.
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.
Value mass() const
Mass/invariant length component.
double energyError() const
Return the relative inconsistency in the energy component.
LorentzPoint decayVertex() const
The decay vertex of this particle.
Energy mass() const
Return the nominal mass.
void transform(const LorentzRotation &r)
Do Lorentz transformations on this particle.
Length Time
Time has the same unit as Length.
Energy2 theVetoScale
the veto scale.
void number(int n)
Set the order-number for this particle in the current event.
LorentzPoint labDecayVertex() const
The decay vertex of this particle.
RCPtr is a reference counted (smart) pointer.
ThePEG::Ptr< Particle >::transient_pointer tPPtr
Alias for a transient pointer to Particle .
Energy Pplus() const
Return the positive and negative light-cone momenta.
void rescaleMass()
Set the invariant length/mass member, so that it agrees with the invariant length/mass of the Lorentz...
tStepPtr birthStep() const
Get the first Step object where this particle occurred.
void rotateX(double a)
Rotate around the x-axis.
Value plus() const
Returns the positive light-cone component .
Value rho() const
Radius.
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...
Energy2 scale() const
Get the scale at which this particle is considered resolved.
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.
tPPtr previous() const
Previous instance.
ParticleRep()
Default constructor.
const string & PDGName() const
Return the generic PDG name.
Energy2 theScale
the resolution scale.
double rapidity() const
Return the (pseudo) rapidity.
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.
bool hasColourInfo() const
True if this particle has colour information.
const ParticleRep & rep() const
Return a reference to the bulk information of this particle.
std::iterator_traits< Iterator >::value_type colourNeighbour(Iterator first, Iterator last, bool anti=false) const
Get a pointer to the colour neighbor.
Energy2 mt2() const
Return the transverse mass (squared), calculated from the energy and the longitudinal momentum...
const tParticleVector & parents() const
The list of parent particles.
tStepPtr theBirthStep
The pointer to the first step where this particle occurred.
void resetColour()
Remove all colour information;.
void setLabVertex(const LorentzPoint &)
Set the creation vertex in the lab frame of this particle.
Particle()
Private default constructor must only be used by the PersistentIStream class via the ClassTraits<Part...
PPtr theNext
The pointer to the next instance.
void incomingColour(tPPtr p, bool anti=false)
Set incoming colour.
void setVect(const ThreeVector< Value > &p)
Set the 3-component part.
const ParticleVector & children() const
The list of decay products.
The default concrete implementation of ClassTraitsBase.
void rescaleRho()
Rescale spatial component, so that the invariant length/mass of the LorentzVector agrees with the cur...
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.
long id() const
Return the PDG id number.
virtual ~Particle()
Destructor.
tPPtr incomingAntiColour() const
Incoming anti-colour.
bool hasRep() const
True if this particle has instantiated the object with information other than type and momentum...
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.
tcSpinPtr spinInfo() const
Return the Spin object.
tcPPtr original() const
Original instance.
Energy nominalMass() const
Acces the mass of this particle type.
void vetoScale(Energy2 q2)
Set the scale above which this particle should not radiate.
tPPtr outgoingAntiColour() const
Outgoing anti-colour.
void mirror()
Mirror in the xy-plane.
bool hasColourLine(tcColinePtr line, bool anti=false) const
Return true if the particle is connected to the given (anti-) colour line.
ostream & print(ostream &os, tcStepPtr step=tcStepPtr()) const
Print particle info to a stream os.
const LorentzPoint & vertex() const
The creation vertex of this particle.
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.
double eta() const
Return the (pseudo) rapidity.
vector< PPtr > ParticleVector
A vector of pointers to Particle objects.
void setTau(Value a)
Set invariant length/mass.
long id() const
Return the PDG id number of this particle.
void set3Momentum(const Momentum3 &p)
Set the 3-momentum of this particle.
BaseClassTraits describes the base classes of the templated class.
bool decayed() const
Returns true if and only if this particle has decayed.
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.
tColinePtr colourLine(bool anti=false) const
Return the colour lines to which this particles (anti-)colour is connected.
Particle & operator=(const Particle &)
Private and non-existent assignment.
void lifeTime(Length t)
Set the invaiant life time of this particle.
const EIVector & getInfo() const
Access user-defined information as a vector of EventInfoBase pointers.
vector< EIPtr > EIVector
A vector of pointers to EventInfoBase objects.
tPPtr incomingColour(bool anti=false) const
Incoming colour.
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...
void rotateZ(double a)
Rotate around the z-axis.
double rhoError() const
Return the relative inconsistency in the spatial components.