FairRoot/PandaRoot
Public Member Functions | Static Public Attributes | List of all members
Photospp::PhotosParticle Class Referenceabstract

#include <PhotosParticle.h>

Inheritance diagram for Photospp::PhotosParticle:
Photospp::PhotosHEPEVTParticle Photospp::PhotosHEPEVTParticle Photospp::PhotosHepMCParticle Photospp::PhotosHepMCParticle

Public Member Functions

virtual ~PhotosParticle ()
 
bool hasDaughters ()
 
PhotosParticlefindLastSelf ()
 
std::vector< PhotosParticle * > findProductionMothers ()
 
std::vector< PhotosParticle * > getDecayTree ()
 
void boostToRestFrame (PhotosParticle *boost)
 
void boostDaughtersToRestFrame (PhotosParticle *boost)
 
void boostFromRestFrame (PhotosParticle *boost)
 
void boostDaughtersFromRestFrame (PhotosParticle *boost)
 
void boostAlongZ (double pz, double e)
 
void rotate (int axis, double phi, int second_axis=Z_AXIS)
 
void rotateDaughters (int axis, double phi, int second_axis=Z_AXIS)
 
double getRotationAngle (int axis, int second_axis=Z_AXIS)
 
double getP ()
 
double getP (int axis)
 
void setP (int axis, double p_component)
 
virtual double getVirtuality ()
 
virtual bool checkMomentumConservation ()=0
 
virtual double getPx ()=0
 
virtual double getPy ()=0
 
virtual double getPz ()=0
 
virtual double getE ()=0
 
virtual double getMass ()=0
 
virtual void setPx (double px)=0
 
virtual void setPy (double py)=0
 
virtual void setPz (double pz)=0
 
virtual void setE (double e)=0
 
virtual void setMothers (std::vector< PhotosParticle * > mothers)=0
 
virtual void setDaughters (std::vector< PhotosParticle * > daughters)=0
 
virtual void addDaughter (PhotosParticle *daughter)=0
 
virtual std::vector
< PhotosParticle * > 
getMothers ()=0
 
virtual std::vector
< PhotosParticle * > 
getDaughters ()=0
 
virtual std::vector
< PhotosParticle * > 
getAllDecayProducts ()=0
 
virtual void setPdgID (int pdg_id)=0
 
virtual void setMass (double mass)=0
 
virtual void setStatus (int status)=0
 
virtual int getPdgID ()=0
 
virtual int getStatus ()=0
 
virtual int getBarcode ()=0
 
virtual PhotosParticlecreateNewParticle (int pdg_id, int status, double mass, double px, double py, double pz, double e)=0
 
virtual void createHistoryEntry ()=0
 
virtual void createSelfDecayVertex (PhotosParticle *out)=0
 
virtual void print ()=0
 
virtual ~PhotosParticle ()
 
bool hasDaughters ()
 
PhotosParticlefindLastSelf ()
 
std::vector< PhotosParticle * > findProductionMothers ()
 
std::vector< PhotosParticle * > getDecayTree ()
 
void boostToRestFrame (PhotosParticle *boost)
 
void boostDaughtersToRestFrame (PhotosParticle *boost)
 
void boostFromRestFrame (PhotosParticle *boost)
 
void boostDaughtersFromRestFrame (PhotosParticle *boost)
 
void boostAlongZ (double pz, double e)
 
void rotate (int axis, double phi, int second_axis=Z_AXIS)
 
void rotateDaughters (int axis, double phi, int second_axis=Z_AXIS)
 
double getRotationAngle (int axis, int second_axis=Z_AXIS)
 
double getP ()
 
double getP (int axis)
 
void setP (int axis, double p_component)
 
virtual double getVirtuality ()
 
virtual bool checkMomentumConservation ()=0
 
virtual double getPx ()=0
 
virtual double getPy ()=0
 
virtual double getPz ()=0
 
virtual double getE ()=0
 
virtual double getMass ()=0
 
virtual void setPx (double px)=0
 
virtual void setPy (double py)=0
 
virtual void setPz (double pz)=0
 
virtual void setE (double e)=0
 
virtual void setMothers (std::vector< PhotosParticle * > mothers)=0
 
virtual void setDaughters (std::vector< PhotosParticle * > daughters)=0
 
virtual void addDaughter (PhotosParticle *daughter)=0
 
virtual std::vector
< PhotosParticle * > 
getMothers ()=0
 
virtual std::vector
< PhotosParticle * > 
getDaughters ()=0
 
virtual std::vector
< PhotosParticle * > 
getAllDecayProducts ()=0
 
virtual void setPdgID (int pdg_id)=0
 
virtual void setMass (double mass)=0
 
virtual void setStatus (int status)=0
 
virtual int getPdgID ()=0
 
virtual int getStatus ()=0
 
virtual int getBarcode ()=0
 
virtual PhotosParticlecreateNewParticle (int pdg_id, int status, double mass, double px, double py, double pz, double e)=0
 
virtual void createHistoryEntry ()=0
 
virtual void createSelfDecayVertex (PhotosParticle *out)=0
 
virtual void print ()=0
 

Static Public Attributes

static const int STABLE =1
 
static const int DECAYED =2
 
static const int HISTORY =3
 
static const int X_AXIS =1
 
static const int Y_AXIS =2
 
static const int Z_AXIS =3
 
static const int Z0 = 23
 
static const int HIGGS = 25
 
static const int HIGGS_H = 35
 
static const int HIGGS_A = 36
 
static const int HIGGS_PLUS = 37
 
static const int HIGGS_MINUS = -37
 
static const int W_PLUS = 24
 
static const int W_MINUS = -24
 
static const int GAMMA = 22
 
static const int TAU_PLUS = -15
 
static const int TAU_MINUS = 15
 
static const int TAU_NEUTRINO = 16
 
static const int TAU_ANTINEUTRINO = -16
 
static const int MUON_PLUS = -13
 
static const int MUON_MINUS = 13
 
static const int MUON_NEUTRINO = 14
 
static const int MUON_ANTINEUTRINO = -14
 
static const int POSITRON = -11
 
static const int ELECTRON = 11
 
static const int ELECTRON_NEUTRINO = 12
 
static const int ELECTRON_ANTINEUTRINO = -12
 
static const int UP = 2
 
static const int ANTIUP = -2
 
static const int DOWN = 1
 
static const int ANTIDOWN = -1
 
static const int OTHER = 0
 

Detailed Description

Definition at line 25 of file PhotosParticle.h.

Constructor & Destructor Documentation

virtual Photospp::PhotosParticle::~PhotosParticle ( )
inlinevirtual

Definition at line 125 of file PhotosParticle.h.

125 {};
virtual Photospp::PhotosParticle::~PhotosParticle ( )
inlinevirtual

Definition at line 125 of file 3.52/src/photosCInterfaces/PhotosParticle.h.

125 {};

Member Function Documentation

virtual void Photospp::PhotosParticle::addDaughter ( PhotosParticle daughter)
pure virtual
virtual void Photospp::PhotosParticle::addDaughter ( PhotosParticle daughter)
pure virtual
void PhotosParticle::boostAlongZ ( double  boost_pz,
double  boost_e 
)

Do a Lorenz transformation along the Z axis.

Boost this vector along the Z direction. Assume no momentum components in the X or Y directions.

Definition at line 155 of file PhotosParticle.cxx.

References getE(), getPz(), p, setE(), setPz(), and sqrt().

Referenced by boostFromRestFrame(), and boostToRestFrame().

156 {
157  // Boost along the Z axis
158  double m_tau=sqrt(boost_e*boost_e-boost_pz*boost_pz);
159 
160  double p=getPz();
161  double e=getE();
162 
163  setPz((boost_e*p + boost_pz*e)/m_tau);
164  setE((boost_pz*p + boost_e*e )/m_tau);
165 }
Double_t p
Definition: anasim.C:58
virtual void setPz(double pz)=0
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
virtual double getPz()=0
virtual void setE(double e)=0
virtual double getE()=0
void Photospp::PhotosParticle::boostAlongZ ( double  pz,
double  e 
)

Do a Lorenz transformation along the Z axis.

void PhotosParticle::boostDaughtersFromRestFrame ( PhotosParticle boost)

Transform this particles four momentum from the lab frame to the rest frame of the parameter PhotosParticle.

Definition at line 63 of file PhotosParticle.cxx.

References getAllDecayProducts(), and hasDaughters().

Referenced by Photospp::PH_HEPEVT_Interface::get().

64 {
65  if(!hasDaughters()) //if there are no daughters
66  return;
67 
68  // get all daughters, granddaughters, etc. then rotate and boost them
69  vector<PhotosParticle*> list = getAllDecayProducts();
70  vector<PhotosParticle*>::iterator pcl_itr = list.begin();
71 
72  for(;pcl_itr != list.end();pcl_itr++)
73  {
74  (*pcl_itr)->boostFromRestFrame(tau_momentum);
75  }
76 
77  //checkMomentumConservation();
78 }
virtual std::vector< PhotosParticle * > getAllDecayProducts()=0
void Photospp::PhotosParticle::boostDaughtersFromRestFrame ( PhotosParticle boost)

Transform this particles four momentum from the lab frame to the rest frame of the parameter PhotosParticle.

void PhotosParticle::boostDaughtersToRestFrame ( PhotosParticle boost)

Transform the four momentum of all the daughters recursively into the frame of the "particle" PhotosParticle.

Definition at line 80 of file PhotosParticle.cxx.

References getAllDecayProducts(), and hasDaughters().

Referenced by Photospp::PH_HEPEVT_Interface::get().

81 {
82  if(!hasDaughters()) //if there are no daughters
83  return;
84 
85  // get all daughters, granddaughters, etc. then rotate and boost them
86  vector<PhotosParticle*> list = getAllDecayProducts();
87  vector<PhotosParticle*>::iterator pcl_itr = list.begin();
88 
89  for(;pcl_itr != list.end();pcl_itr++)
90  {
91  (*pcl_itr)->boostToRestFrame(tau_momentum);
92  }
93 
94  //checkMomentumConservation();
95 }
virtual std::vector< PhotosParticle * > getAllDecayProducts()=0
void Photospp::PhotosParticle::boostDaughtersToRestFrame ( PhotosParticle boost)

Transform the four momentum of all the daughters recursively into the frame of the "particle" PhotosParticle.

void Photospp::PhotosParticle::boostFromRestFrame ( PhotosParticle boost)

Transform this particles four momentum from the rest frame of the paramter PhotosParticle, back into the lab frame.

void PhotosParticle::boostFromRestFrame ( PhotosParticle boost)

Transform this particles four momentum from the rest frame of the paramter PhotosParticle, back into the lab frame.

Definition at line 114 of file PhotosParticle.cxx.

References boostAlongZ(), getE(), getP(), getRotationAngle(), phi, rotate(), theta, X_AXIS, and Y_AXIS.

Referenced by Photospp::PH_HEPEVT_Interface::get().

115 {
116  //get the rotation angles
117  //and boost z
118 
119  double theta = tau_momentum->getRotationAngle(Y_AXIS);
120  tau_momentum->rotate(Y_AXIS,theta);
121 
122  double phi = tau_momentum->getRotationAngle(X_AXIS);
123  tau_momentum->rotate(Y_AXIS,-theta);
124 
125  //Now rotate coordinates to get boost in Z direction.
126  rotate(Y_AXIS,theta);
127  rotate(X_AXIS,phi);
128  boostAlongZ(tau_momentum->getP(),tau_momentum->getE());
129  rotate(X_AXIS,-phi);
130  rotate(Y_AXIS,-theta);
131 }
void boostAlongZ(double pz, double e)
static const int Y_AXIS
static const int X_AXIS
void rotate(int axis, double phi, int second_axis=Z_AXIS)
void Photospp::PhotosParticle::boostToRestFrame ( PhotosParticle boost)

Transform this particles four momentum from the lab frome into the rest frame of the paramter PhotosParticle.

void PhotosParticle::boostToRestFrame ( PhotosParticle boost)

Transform this particles four momentum from the lab frome into the rest frame of the paramter PhotosParticle.

Definition at line 98 of file PhotosParticle.cxx.

References boostAlongZ(), getE(), getP(), getRotationAngle(), phi, rotate(), theta, X_AXIS, and Y_AXIS.

Referenced by Photospp::PH_HEPEVT_Interface::get().

99 {
100  double theta = tau_momentum->getRotationAngle(Y_AXIS);
101  tau_momentum->rotate(Y_AXIS,theta);
102 
103  double phi = tau_momentum->getRotationAngle(X_AXIS);
104  tau_momentum->rotate(Y_AXIS,-theta);
105 
106  //Now rotate coordinates to get boost in Z direction.
107  rotate(Y_AXIS,theta);
108  rotate(X_AXIS,phi);
109  boostAlongZ(-1*tau_momentum->getP(),tau_momentum->getE());
110  rotate(X_AXIS,-phi);
111  rotate(Y_AXIS,-theta);
112 }
void boostAlongZ(double pz, double e)
static const int Y_AXIS
static const int X_AXIS
void rotate(int axis, double phi, int second_axis=Z_AXIS)
virtual bool Photospp::PhotosParticle::checkMomentumConservation ( )
pure virtual

check that the 4 momentum in conserved at the vertices producing and ending this particle

Implemented in Photospp::PhotosHepMCParticle, Photospp::PhotosHepMCParticle, Photospp::PhotosHEPEVTParticle, and Photospp::PhotosHEPEVTParticle.

Referenced by Photospp::PhotosBranch::checkMomentumConservation().

virtual bool Photospp::PhotosParticle::checkMomentumConservation ( )
pure virtual

check that the 4 momentum in conserved at the vertices producing and ending this particle

Implemented in Photospp::PhotosHepMCParticle, Photospp::PhotosHepMCParticle, Photospp::PhotosHEPEVTParticle, and Photospp::PhotosHEPEVTParticle.

virtual void Photospp::PhotosParticle::createHistoryEntry ( )
pure virtual

Create history entry of this particle before modifications of PHOTOS. Implementation of this method depends strongly on the event record.

Implemented in Photospp::PhotosHepMCParticle, Photospp::PhotosHepMCParticle, Photospp::PhotosHEPEVTParticle, and Photospp::PhotosHEPEVTParticle.

virtual void Photospp::PhotosParticle::createHistoryEntry ( )
pure virtual

Create history entry of this particle before modifications of PHOTOS. Implementation of this method depends strongly on the event record.

Implemented in Photospp::PhotosHepMCParticle, Photospp::PhotosHepMCParticle, Photospp::PhotosHEPEVTParticle, and Photospp::PhotosHEPEVTParticle.

Referenced by Photospp::PH_HEPEVT_Interface::get().

virtual PhotosParticle* Photospp::PhotosParticle::createNewParticle ( int  pdg_id,
int  status,
double  mass,
double  px,
double  py,
double  pz,
double  e 
)
pure virtual

Create a new particle of the same type, with the given properties. The new particle bares no relations to this particle, but it provides a way of creating a intance of the derived class. eg. createNewParticle() is used inside filhep_() so that an eg. PhotosHepMCParticle is created without the method having explicit knowledge of the PhotosHepMCParticle class

Implemented in Photospp::PhotosHepMCParticle, Photospp::PhotosHepMCParticle, Photospp::PhotosHEPEVTParticle, and Photospp::PhotosHEPEVTParticle.

Referenced by Photospp::PH_HEPEVT_Interface::get().

virtual PhotosParticle* Photospp::PhotosParticle::createNewParticle ( int  pdg_id,
int  status,
double  mass,
double  px,
double  py,
double  pz,
double  e 
)
pure virtual

Create a new particle of the same type, with the given properties. The new particle bares no relations to this particle, but it provides a way of creating a intance of the derived class. eg. createNewParticle() is used inside filhep_() so that an eg. PhotosHepMCParticle is created without the method having explicit knowledge of the PhotosHepMCParticle class

Implemented in Photospp::PhotosHepMCParticle, Photospp::PhotosHepMCParticle, Photospp::PhotosHEPEVTParticle, and Photospp::PhotosHEPEVTParticle.

virtual void Photospp::PhotosParticle::createSelfDecayVertex ( PhotosParticle out)
pure virtual

Create a self-decay vertex for this particle with 'out' being the outgoing particle in new vertex

Implemented in Photospp::PhotosHepMCParticle, Photospp::PhotosHepMCParticle, Photospp::PhotosHEPEVTParticle, and Photospp::PhotosHEPEVTParticle.

virtual void Photospp::PhotosParticle::createSelfDecayVertex ( PhotosParticle out)
pure virtual

Create a self-decay vertex for this particle with 'out' being the outgoing particle in new vertex

Implemented in Photospp::PhotosHepMCParticle, Photospp::PhotosHepMCParticle, Photospp::PhotosHEPEVTParticle, and Photospp::PhotosHEPEVTParticle.

PhotosParticle * PhotosParticle::findLastSelf ( )

Traverse the event structure and find the final version of this particle which does not have a particle of it's own type as it's daughter. eg. Generally the final stable copy

Definition at line 16 of file PhotosParticle.cxx.

References getDaughters(), and getPdgID().

17 {
18  vector<PhotosParticle*> daughters = getDaughters();
19  vector<PhotosParticle*>::iterator pcl_itr = daughters.begin();
20 
21  //get all daughters and look for stable with same pgd id
22  for(;pcl_itr != daughters.end();pcl_itr++)
23  {
24  if((*pcl_itr)->getPdgID()==this->getPdgID())
25  return (*pcl_itr)->findLastSelf();
26  }
27 
28  return this;
29 }
virtual int getPdgID()=0
virtual std::vector< PhotosParticle * > getDaughters()=0
PhotosParticle* Photospp::PhotosParticle::findLastSelf ( )

Traverse the event structure and find the final version of this particle which does not have a particle of it's own type as it's daughter. eg. Generally the final stable copy

std::vector<PhotosParticle *> Photospp::PhotosParticle::findProductionMothers ( )

Traverse the event structure and find the first set of mothers which are not of the same type as this particle.

vector< PhotosParticle * > PhotosParticle::findProductionMothers ( )

Traverse the event structure and find the first set of mothers which are not of the same type as this particle.

Definition at line 31 of file PhotosParticle.cxx.

References getMothers(), and getPdgID().

Referenced by Photospp::PhotosBranch::PhotosBranch().

32 {
33  vector<PhotosParticle*> mothers = getMothers();
34  vector<PhotosParticle*>::iterator pcl_itr = mothers.begin();
35 
36  //get all mothers and check none have pdg id of this one
37  for(;pcl_itr != mothers.end();pcl_itr++)
38  {
39  if((*pcl_itr)->getPdgID()==this->getPdgID())
40  return (*pcl_itr)->findProductionMothers();
41  }
42  return mothers;
43 }
virtual int getPdgID()=0
virtual std::vector< PhotosParticle * > getMothers()=0
virtual std::vector<PhotosParticle*> Photospp::PhotosParticle::getAllDecayProducts ( )
pure virtual
virtual std::vector<PhotosParticle*> Photospp::PhotosParticle::getAllDecayProducts ( )
pure virtual

Returns all particles in the decay tree of this particle via a vector of PhotosParticle

Implemented in Photospp::PhotosHepMCParticle, Photospp::PhotosHepMCParticle, Photospp::PhotosHEPEVTParticle, and Photospp::PhotosHEPEVTParticle.

virtual int Photospp::PhotosParticle::getBarcode ( )
pure virtual
virtual int Photospp::PhotosParticle::getBarcode ( )
pure virtual
virtual std::vector<PhotosParticle*> Photospp::PhotosParticle::getDaughters ( )
pure virtual
virtual std::vector<PhotosParticle*> Photospp::PhotosParticle::getDaughters ( )
pure virtual
vector< PhotosParticle * > PhotosParticle::getDecayTree ( )

Return whole decay tree starting from this particle

Definition at line 45 of file PhotosParticle.cxx.

References getBarcode(), getDaughters(), getDecayTree(), getMothers(), i, p, and tree.

Referenced by Photospp::PhotosBranch::createBranches(), getDecayTree(), and Photospp::Photos::processBranch().

46 {
47  vector<PhotosParticle *> particles;
48  particles.push_back(this);
49  vector<PhotosParticle *> daughters = getDaughters();
50  for(int i=0;i<(int)daughters.size();i++)
51  {
52  // Check if we are the first mother of each daughters
53  // If not - skip this daughter
54  PhotosParticle *p = daughters.at(i);
55  vector<PhotosParticle *> mothers = p->getMothers();
56  if(mothers.size()>1 && mothers.at(0)->getBarcode()!=getBarcode()) continue;
57  vector<PhotosParticle *> tree = p->getDecayTree();
58  particles.insert(particles.end(),tree.begin(),tree.end());
59  }
60  return particles;
61 }
Double_t p
Definition: anasim.C:58
Int_t i
Definition: run_full.C:25
TTree * tree
Definition: plot_dirc.C:12
virtual int getBarcode()=0
Abstract base class for particle in the event. This class also handles boosting.
virtual std::vector< PhotosParticle * > getDaughters()=0
std::vector<PhotosParticle *> Photospp::PhotosParticle::getDecayTree ( )

Return whole decay tree starting from this particle

virtual double Photospp::PhotosParticle::getE ( )
pure virtual
virtual double Photospp::PhotosParticle::getE ( )
pure virtual
virtual double Photospp::PhotosParticle::getMass ( )
pure virtual
virtual double Photospp::PhotosParticle::getMass ( )
pure virtual
virtual std::vector<PhotosParticle*> Photospp::PhotosParticle::getMothers ( )
pure virtual
virtual std::vector<PhotosParticle*> Photospp::PhotosParticle::getMothers ( )
pure virtual
double PhotosParticle::getP ( )

Get scalar momentum

Definition at line 202 of file PhotosParticle.cxx.

References getPx(), getPy(), getPz(), and sqrt().

Referenced by boostFromRestFrame(), boostToRestFrame(), getRotationAngle(), getVirtuality(), and rotate().

203 {
204  return sqrt(getPx()*getPx()+getPy()*getPy()+getPz()*getPz());
205 }
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
virtual double getPy()=0
virtual double getPx()=0
virtual double getPz()=0
double Photospp::PhotosParticle::getP ( )

Get scalar momentum

double Photospp::PhotosParticle::getP ( int  axis)

Get momentum component in the direction of "axis" (x,y,z)

double PhotosParticle::getP ( int  axis)

Get momentum component in the direction of "axis" (x,y,z)

Definition at line 207 of file PhotosParticle.cxx.

References getPx(), getPy(), getPz(), X_AXIS, Y_AXIS, and Z_AXIS.

208 {
209  if(axis==X_AXIS) return getPx();
210  if(axis==Y_AXIS) return getPy();
211  if(axis==Z_AXIS) return getPz();
212  return 0;
213 }
static const int Z_AXIS
virtual double getPy()=0
virtual double getPx()=0
virtual double getPz()=0
axis
Definition: PndRadMapPlane.h:9
static const int Y_AXIS
static const int X_AXIS
virtual int Photospp::PhotosParticle::getPdgID ( )
pure virtual
virtual int Photospp::PhotosParticle::getPdgID ( )
pure virtual
virtual double Photospp::PhotosParticle::getPx ( )
pure virtual
virtual double Photospp::PhotosParticle::getPx ( )
pure virtual
virtual double Photospp::PhotosParticle::getPy ( )
pure virtual
virtual double Photospp::PhotosParticle::getPy ( )
pure virtual
virtual double Photospp::PhotosParticle::getPz ( )
pure virtual
virtual double Photospp::PhotosParticle::getPz ( )
pure virtual
double PhotosParticle::getRotationAngle ( int  axis,
int  second_axis = Z_AXIS 
)

Returns the angle around the axis "axis" needed to rotate the four momenum is such a way that the non-Z component disappears and Z>0. This is used to in rotating the coordinate system into a frame with only a Z component before calling boostAlongZ().

Get the angle needed to rotate the 4 momentum vector so that the x (y) component disapears. (and the Z component is > 0)

if(getP(axis)==0){ if(getPz()>0) return 0; //no rotaion required else return M_PI; }

Definition at line 135 of file PhotosParticle.cxx.

References getP().

Referenced by boostFromRestFrame(), and boostToRestFrame().

136 {
143  if(getP(second_axis)==0)
144  {
145  if(getP(axis)>0) return -M_PI/2.0;
146  else return M_PI/2.0;
147  }
148  if(getP(second_axis)>0) return -atan(getP(axis)/getP(second_axis));
149  else return M_PI-atan(getP(axis)/getP(second_axis));
150 
151 }
axis
Definition: PndRadMapPlane.h:9
double Photospp::PhotosParticle::getRotationAngle ( int  axis,
int  second_axis = Z_AXIS 
)

Returns the angle around the axis "axis" needed to rotate the four momenum is such a way that the non-Z component disappears and Z>0. This is used to in rotating the coordinate system into a frame with only a Z component before calling boostAlongZ().

virtual int Photospp::PhotosParticle::getStatus ( )
pure virtual
virtual int Photospp::PhotosParticle::getStatus ( )
pure virtual
virtual double Photospp::PhotosParticle::getVirtuality ( )
virtual

Get sqrt(e^2-p^2)

double PhotosParticle::getVirtuality ( )
virtual

Get sqrt(e^2-p^2)

Definition at line 193 of file PhotosParticle.cxx.

References getE(), getP(), and sqrt().

Referenced by Photospp::PH_HEPEVT_Interface::add_particle().

194 {
195  double e_sq=getE()*getE();
196  double p_sq=getP()*getP();
197 
198  if(e_sq>p_sq) return sqrt(e_sq-p_sq);
199  else return -1*sqrt(p_sq-e_sq); //if it's negative
200 }
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
virtual double getE()=0
bool PhotosParticle::hasDaughters ( )

Return whether the particle has any chidren

Definition at line 10 of file PhotosParticle.cxx.

References getDaughters().

Referenced by boostDaughtersFromRestFrame(), boostDaughtersToRestFrame(), Photospp::PhotosHEPEVTParticle::getAllDecayProducts(), Photospp::PhotosHepMCParticle::getAllDecayProducts(), and rotateDaughters().

11 {
12  if(getDaughters().size()==0) return false;
13  else return true;
14 }
virtual std::vector< PhotosParticle * > getDaughters()=0
bool Photospp::PhotosParticle::hasDaughters ( )

Return whether the particle has any chidren

virtual void Photospp::PhotosParticle::print ( )
pure virtual

Print some information about this particle to standard output

Implemented in Photospp::PhotosHepMCParticle, Photospp::PhotosHepMCParticle, Photospp::PhotosHEPEVTParticle, and Photospp::PhotosHEPEVTParticle.

virtual void Photospp::PhotosParticle::print ( )
pure virtual

Print some information about this particle to standard output

Implemented in Photospp::PhotosHepMCParticle, Photospp::PhotosHepMCParticle, Photospp::PhotosHEPEVTParticle, and Photospp::PhotosHEPEVTParticle.

void PhotosParticle::rotate ( int  axis,
double  theta,
int  second_axis = Z_AXIS 
)

rotate this particles 4-momentum by an angle phi from the axisis "axis" towards the axis "second_axis".

Rotation around an axis X or Y

Definition at line 168 of file PhotosParticle.cxx.

References cos(), getP(), setP(), and sin().

Referenced by boostFromRestFrame(), and boostToRestFrame().

169 {
170  double temp_px=getP(axis);
171  double temp_pz=getP(second_axis);
172  setP(axis,cos(theta)*temp_px + sin(theta)*temp_pz);
173  setP(second_axis,-sin(theta)*temp_px + cos(theta)*temp_pz);
174 }
friend F32vec4 cos(const F32vec4 &a)
Definition: P4_F32vec4.h:112
friend F32vec4 sin(const F32vec4 &a)
Definition: P4_F32vec4.h:111
void setP(int axis, double p_component)
axis
Definition: PndRadMapPlane.h:9
void Photospp::PhotosParticle::rotate ( int  axis,
double  phi,
int  second_axis = Z_AXIS 
)

rotate this particles 4-momentum by an angle phi from the axisis "axis" towards the axis "second_axis".

void PhotosParticle::rotateDaughters ( int  axis,
double  phi,
int  second_axis = Z_AXIS 
)

rotate 4-momentum of daughters of this particle by an angle phi from the axisis "axis" towards the axis "second_axis".

Definition at line 176 of file PhotosParticle.cxx.

References getDaughters(), and hasDaughters().

177 {
178  if(!hasDaughters()) //if there are no daughters
179  return;
180 
181  vector<PhotosParticle*> daughters = getDaughters();
182  vector<PhotosParticle*>::iterator pcl_itr = daughters.begin();
183 
184  //get all daughters then rotate and boost them.
185  for(;pcl_itr != daughters.end();pcl_itr++)
186  {
187  (*pcl_itr)->rotate(axis,theta,second_axis);
188  (*pcl_itr)->rotateDaughters(axis,theta,second_axis);
189  }
190  //checkMomentumConservation();
191 }
axis
Definition: PndRadMapPlane.h:9
virtual std::vector< PhotosParticle * > getDaughters()=0
void Photospp::PhotosParticle::rotateDaughters ( int  axis,
double  phi,
int  second_axis = Z_AXIS 
)

rotate 4-momentum of daughters of this particle by an angle phi from the axisis "axis" towards the axis "second_axis".

virtual void Photospp::PhotosParticle::setDaughters ( std::vector< PhotosParticle * >  daughters)
pure virtual
virtual void Photospp::PhotosParticle::setDaughters ( std::vector< PhotosParticle * >  daughters)
pure virtual
virtual void Photospp::PhotosParticle::setE ( double  e)
pure virtual
virtual void Photospp::PhotosParticle::setE ( double  e)
pure virtual
virtual void Photospp::PhotosParticle::setMass ( double  mass)
pure virtual
virtual void Photospp::PhotosParticle::setMass ( double  mass)
pure virtual
virtual void Photospp::PhotosParticle::setMothers ( std::vector< PhotosParticle * >  mothers)
pure virtual
virtual void Photospp::PhotosParticle::setMothers ( std::vector< PhotosParticle * >  mothers)
pure virtual
void Photospp::PhotosParticle::setP ( int  axis,
double  p_component 
)

Set momentum component in the direction of "axis" (x,y,z)

void PhotosParticle::setP ( int  axis,
double  p_component 
)

Set momentum component in the direction of "axis" (x,y,z)

Definition at line 215 of file PhotosParticle.cxx.

References setPx(), setPy(), setPz(), X_AXIS, Y_AXIS, and Z_AXIS.

Referenced by rotate().

216 {
217  if(axis==X_AXIS) setPx(p_component);
218  if(axis==Y_AXIS) setPy(p_component);
219  if(axis==Z_AXIS) setPz(p_component);
220 }
virtual void setPz(double pz)=0
static const int Z_AXIS
virtual void setPx(double px)=0
virtual void setPy(double py)=0
axis
Definition: PndRadMapPlane.h:9
static const int Y_AXIS
static const int X_AXIS
virtual void Photospp::PhotosParticle::setPdgID ( int  pdg_id)
pure virtual
virtual void Photospp::PhotosParticle::setPdgID ( int  pdg_id)
pure virtual
virtual void Photospp::PhotosParticle::setPx ( double  px)
pure virtual
virtual void Photospp::PhotosParticle::setPx ( double  px)
pure virtual
virtual void Photospp::PhotosParticle::setPy ( double  py)
pure virtual
virtual void Photospp::PhotosParticle::setPy ( double  py)
pure virtual
virtual void Photospp::PhotosParticle::setPz ( double  pz)
pure virtual
virtual void Photospp::PhotosParticle::setPz ( double  pz)
pure virtual
virtual void Photospp::PhotosParticle::setStatus ( int  status)
pure virtual
virtual void Photospp::PhotosParticle::setStatus ( int  status)
pure virtual

Member Data Documentation

static const int PhotosParticle::ANTIDOWN = -1
static

anti-down quark

Definition at line 119 of file PhotosParticle.h.

static const int PhotosParticle::ANTIUP = -2
static

anti-up quark

Definition at line 113 of file PhotosParticle.h.

static const int PhotosParticle::DECAYED =2
static

Decayed particle status

Definition at line 32 of file PhotosParticle.h.

Referenced by Photospp::PhotosHepMCParticle::setMothers().

static const int PhotosParticle::DOWN = 1
static

down quark

Definition at line 116 of file PhotosParticle.h.

static const int PhotosParticle::ELECTRON = 11
static

e- particle

Definition at line 101 of file PhotosParticle.h.

static const int PhotosParticle::ELECTRON_ANTINEUTRINO = -12
static

e antineutrino particle

Definition at line 107 of file PhotosParticle.h.

static const int PhotosParticle::ELECTRON_NEUTRINO = 12
static

e neutrino particle

Definition at line 104 of file PhotosParticle.h.

static const int PhotosParticle::GAMMA = 22
static

photon

Definition at line 71 of file PhotosParticle.h.

static const int PhotosParticle::HIGGS = 25
static

H particle

Definition at line 50 of file PhotosParticle.h.

static const int PhotosParticle::HIGGS_A = 36
static

A0 particle

Definition at line 56 of file PhotosParticle.h.

static const int PhotosParticle::HIGGS_H = 35
static

H0 particle

Definition at line 53 of file PhotosParticle.h.

static const int PhotosParticle::HIGGS_MINUS = -37
static

H- particle

Definition at line 62 of file PhotosParticle.h.

static const int PhotosParticle::HIGGS_PLUS = 37
static

H+ particle

Definition at line 59 of file PhotosParticle.h.

static const int PhotosParticle::HISTORY =3
static

History particle status

Definition at line 35 of file PhotosParticle.h.

static const int PhotosParticle::MUON_ANTINEUTRINO = -14
static

muon antineutrino particle

Definition at line 95 of file PhotosParticle.h.

static const int PhotosParticle::MUON_MINUS = 13
static

muon- particle

Definition at line 89 of file PhotosParticle.h.

static const int PhotosParticle::MUON_NEUTRINO = 14
static

muon neutrino particle

Definition at line 92 of file PhotosParticle.h.

static const int PhotosParticle::MUON_PLUS = -13
static

muon+ particle

Definition at line 86 of file PhotosParticle.h.

static const int PhotosParticle::OTHER = 0
static

All other particle types

Definition at line 122 of file PhotosParticle.h.

static const int PhotosParticle::POSITRON = -11
static

e+ particle

Definition at line 98 of file PhotosParticle.h.

static const int PhotosParticle::STABLE =1
static

Stable particle status

Definition at line 29 of file PhotosParticle.h.

Referenced by Photospp::PhotosEvent::filterParticles(), and Photospp::PhotosHepMCParticle::setMothers().

static const int PhotosParticle::TAU_ANTINEUTRINO = -16
static

tau antineutrino particle

Definition at line 83 of file PhotosParticle.h.

static const int PhotosParticle::TAU_MINUS = 15
static

tau- particle

Definition at line 77 of file PhotosParticle.h.

static const int PhotosParticle::TAU_NEUTRINO = 16
static

tau neutrino particle

Definition at line 80 of file PhotosParticle.h.

static const int PhotosParticle::TAU_PLUS = -15
static

tau+ particle

Definition at line 74 of file PhotosParticle.h.

static const int PhotosParticle::UP = 2
static

up quark

Definition at line 110 of file PhotosParticle.h.

static const int PhotosParticle::W_MINUS = -24
static

W- particle

Definition at line 68 of file PhotosParticle.h.

static const int PhotosParticle::W_PLUS = 24
static

W+ particle

Definition at line 65 of file PhotosParticle.h.

static const int PhotosParticle::X_AXIS =1
static

X Axis

Definition at line 38 of file PhotosParticle.h.

Referenced by boostFromRestFrame(), boostToRestFrame(), getP(), and setP().

static const int PhotosParticle::Y_AXIS =2
static

Y Axis

Definition at line 41 of file PhotosParticle.h.

Referenced by boostFromRestFrame(), boostToRestFrame(), getP(), and setP().

static const int PhotosParticle::Z0 = 23
static

Z0 particle

Definition at line 47 of file PhotosParticle.h.

static const int PhotosParticle::Z_AXIS =3
static

Z Axis

Definition at line 44 of file PhotosParticle.h.

Referenced by getP(), and setP().


The documentation for this class was generated from the following files: