MINT2
Public Member Functions | List of all members
polVector Class Reference

#include <polVector.h>

Inheritance diagram for polVector:
TLorentzVectorC

Public Member Functions

 polVector (const TLorentzVector p, const double m, const int lambda)
 
 polVector (const polVector &other, bool conj=false)
 
- Public Member Functions inherited from TLorentzVectorC
const TLorentzVector & v (int i) const
 
 TLorentzVectorC ()
 
 TLorentzVectorC (const TLorentzVector &re, const TLorentzVector &im)
 
 TLorentzVectorC (const TLorentzVector &re)
 
 TLorentzVectorC (const TLorentzVectorC &other, bool conj=false)
 
const TLorentzVector & Re () const
 
const TLorentzVector & Im () const
 
TLorentzVector & Re ()
 
TLorentzVector & Im ()
 
void conj ()
 
complex< double > Dot (const TLorentzVectorC &rhs)
 
complex< double > Dot (const TLorentzVector &rhs)
 
TLorentzVectorCoperator= (const TLorentzVectorC &other)
 
TLorentzVectorC operator+ (const TLorentzVectorC &other) const
 
TLorentzVectorC operator * (Double_t a) const
 
Bool_t operator== (const TLorentzVectorC &other) const
 
void Print ()
 

Additional Inherited Members

- Protected Member Functions inherited from TLorentzVectorC
bool makeZero ()
 
- Protected Attributes inherited from TLorentzVectorC
TLorentzVector _v [2]
 

Detailed Description

Definition at line 14 of file polVector.h.

Constructor & Destructor Documentation

◆ polVector() [1/2]

polVector::polVector ( const TLorentzVector  p,
const double  m,
const int  lambda 
)
inline

Definition at line 18 of file polVector.h.

18  :TLorentzVectorC(){
19 
20 
21  if(m>0.){
22  if(lambda==-1){
23  _v[0].SetXYZT(m+p.Px()*p.Px()/(p.E()+m),p.Px()*p.Py()/(p.E()+m),p.Px()*p.Pz()/(p.E()+m),p.Px());
24  _v[0]*=1./(m*sqrt(2));
25  _v[1].SetXYZT(p.Px()*p.Py()/(p.E()+m),m+p.Py()*p.Py()/(p.E()+m),p.Py()*p.Pz()/(p.E()+m),p.Py());
26  _v[1]*=-1./(m*sqrt(2));
27  }
28 
29  else if(lambda==0){
30  _v[0].SetXYZT(p.Pz()*p.Px()/(p.E()+m),p.Pz()*p.Py()/(p.E()+m),m+p.Pz()*p.Pz()/(p.E()+m),p.Pz());
31  _v[0]*=1./m;
32  _v[1].SetXYZT(0,0,0,0);
33  }
34  else if(lambda==1){
35  _v[0].SetXYZT(m+p.Px()*p.Px()/(p.E()+m),p.Px()*p.Py()/(p.E()+m),p.Px()*p.Pz()/(p.E()+m),p.Px());
36  _v[0]*=-1./(m*sqrt(2));
37  _v[1].SetXYZT(p.Px()*p.Py()/(p.E()+m),m+p.Py()*p.Py()/(p.E()+m),p.Py()*p.Pz()/(p.E()+m),p.Py());
38  _v[1]*=-1./(m*sqrt(2));
39  }
40  else if(lambda==-999){
41  TLorentzVectorC tmp = polVector(p,m,-1) + polVector(p,m,0) + polVector(p,m,1);
42  _v[0]= tmp.Re();
43  _v[1]= tmp.Im();
44  }
45 
46  else {
47  std::cout << "I can't handle spin > 1 particles. I'll set everything to 0. " << std::endl;
48  _v[0].SetXYZT(0,0,0,0);
49  _v[1].SetXYZT(0,0,0,0);
50  }
51 
52  }
53  else{
54 
55  double px = p.Px()/p.E();
56  double py = p.Py()/p.E();
57  double pz = p.Pz()/p.E();
58 
59  if((abs(px) > 1.E-4)||(abs(py) > 1.E-4)){
60  double x = -py/sqrt(px*px + py*py);
61  double y = px/sqrt(px*px + py*py);
62  double c = pz;
63  double s = sin(acos(c));
64 
65  if(lambda==-1){
66  _v[0].SetXYZT((x*x*(1-c)+c),x*y*(1-c),-y*s,0 );
67  _v[0]*=1./sqrt(2);
68  _v[1].SetXYZT(-x*y*(1-c),-(y*y*(1-c)+c),-x*s,0);
69  _v[1]*=1./sqrt(2);
70  }
71 
72  else if(lambda==1){
73  _v[0].SetXYZT(-(x*x*(1-c)+c),-x*y*(1-c),y*s,0 );
74  _v[0]*=1./sqrt(2);
75  _v[1].SetXYZT(-x*y*(1-c),-(y*y*(1-c)+c),-x*s,0);
76  _v[1]*=1./sqrt(2);
77  }
78 
79  else if(lambda==-999){
80  TLorentzVectorC tmp = polVector(p,m,-1) + polVector(p,m,1);
81  _v[0]= tmp.Re();
82  _v[1]= tmp.Im();
83  }
84 
85  else {
86  _v[0].SetXYZT(0,0,0,0);
87  _v[1].SetXYZT(0,0,0,0);
88  }
89 
90 
91  }
92 
93  else{
94 
95  if(lambda==-1){
96  _v[0].SetXYZT(1/sqrt(2),0,0,0);
97  _v[1].SetXYZT(0,-1/sqrt(2),0,0);
98  }
99 
100  else if(lambda==1){
101  _v[0].SetXYZT(-1/sqrt(2),0,0,0);
102  _v[1].SetXYZT(0,-1/sqrt(2),0,0);
103  }
104 
105  else if(lambda==-999){
106  TLorentzVectorC tmp = polVector(p,m,-1) + polVector(p,m,1);
107  _v[0]= tmp.Re();
108  _v[1]= tmp.Im();
109  }
110 
111  else {
112  _v[0].SetXYZT(0,0,0,0);
113  _v[1].SetXYZT(0,0,0,0);
114  }
115 
116 
117  }
118 
119 
120  }
121 
122 
123  }
TLorentzVector _v[2]
static const double s
const TLorentzVector & Re() const
static const double m
const TLorentzVector & Im() const
double lambda(double x, double y, double z)
Definition: lambda.h:8
polVector(const TLorentzVector p, const double m, const int lambda)
Definition: polVector.h:18

◆ polVector() [2/2]

polVector::polVector ( const polVector other,
bool  conj = false 
)
inline

Definition at line 125 of file polVector.h.


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