#include <PseudoJet.hh>
Public Types | |
| enum | { X = 0, Y = 1, Z = 2, T = 3, NUM_COORDINATES = 4, SIZE = NUM_COORDINATES } |
Public Member Functions | |
| PseudoJet () | |
| PseudoJet (const double px, const double py, const double pz, const double E) | |
| construct a pseudojet from explicit components | |
| template<class L> | |
| PseudoJet (const L &some_four_vector) | |
| constructor from any object that has px,py,pz,E = some_four_vector[0--3], | |
| double | E () const |
| double | e () const |
| double | px () const |
| double | py () const |
| double | pz () const |
| const double | phi () const |
| returns phi (in the range 0..2pi) | |
| const double | phi_std () const |
| returns phi in the range -pi..pi | |
| const double | phi_02pi () const |
| returns phi in the range 0..2pi | |
| double | rap () const |
| returns the rapidity or some large value when the rapidity is infinite | |
| double | rapidity () const |
| the same as rap() | |
| double | kt2 () const |
| returns the squared transverse momentum | |
| double | perp2 () const |
| returns the squared transverse momentum | |
| double | perp () const |
| returns the scalar transverse momentum | |
| double | m2 () const |
| returns the squared invariant mass // like CLHEP | |
| double | operator() (int i) const |
| returns component i, where X==0, Y==1, Z==2, E==3 | |
| double | operator[] (int i) const |
| returns component i, where X==0, Y==1, Z==2, E==3 | |
| const int & | cluster_hist_index () const |
| return the cluster_hist_index, intended to be used by clustering routines. | |
| void | set_cluster_hist_index (const int index) |
| set the cluster_hist_index, intended to be used by clustering routines. | |
| const int & | user_index () const |
| return the user_index, intended to allow the user to "add" information | |
| void | set_user_index (const int index) |
| set the user_index, intended to allow the user to "add" information | |
| std::valarray< double > | four_mom () const |
| return a valarray containing the four-momentum (components 0-2 are 3-mom, component 3 is energy). | |
| double | kt_distance (const PseudoJet &other) const |
| returns kt distance (R=1) between this jet and another | |
| double | plain_distance (const PseudoJet &other) const |
| returns squared cylinder (eta-phi) distance between this jet and another | |
| double | beam_distance () const |
| returns distance between this jet and the beam | |
| void | operator *= (double) |
| multiply the jet's momentum by the coefficient | |
| void | operator/= (double) |
| divide the jet's momentum by the coefficient | |
| void | operator+= (const PseudoJet &) |
| add the other jet's momentum to this jet | |
| void | operator-= (const PseudoJet &) |
| subtract the other jet's momentum from this jet | |
Private Member Functions | |
| void | _finish_init () |
| do standard end of initialisation | |
Private Attributes | |
| double | _px |
| double | _py |
| double | _pz |
| double | _E |
| double | _phi |
| double | _rap |
| double | _kt2 |
| int | _cluster_hist_index |
| int | _user_index |
Definition at line 53 of file PseudoJet.hh.
|
|
Definition at line 103 of file PseudoJet.hh. 00103 { X=0, Y=1, Z=2, T=3, NUM_COORDINATES=4, SIZE=NUM_COORDINATES };
|
|
|
Definition at line 55 of file PseudoJet.hh. 00055 {};
|
|
||||||||||||||||||||
|
construct a pseudojet from explicit components
Definition at line 46 of file PseudoJet.cc. References _E, _finish_init(), _px, _py, and _pz. 00046 {
00047
00048 _E = E ;
00049 _px = px;
00050 _py = py;
00051 _pz = pz;
00052
00053 this->_finish_init();
00054 };
|
|
||||||||||
|
constructor from any object that has px,py,pz,E = some_four_vector[0--3],
Definition at line 207 of file PseudoJet.hh. References _E, _finish_init(), _px, _py, and _pz. 00207 {
00208
00209 _px = some_four_vector[0];
00210 _py = some_four_vector[1];
00211 _pz = some_four_vector[2];
00212 _E = some_four_vector[3];
00213 this->_finish_init();
00214 };
|
|
|
do standard end of initialisation
Definition at line 59 of file PseudoJet.cc. References _E, _kt2, _phi, _pz, _rap, m2(), fastjet::MaxRap, px(), py(), and fastjet::twopi. Referenced by operator+=(), operator-=(), and PseudoJet(). 00059 {
00060 _kt2 = this->px()*this->px() + this->py()*this->py();
00061 if (_kt2 == 0.0) {
00062 _phi = 0.0; }
00063 else {
00064 _phi = atan2(this->py(),this->px());
00065 }
00066 if (_phi < 0.0) {_phi += twopi;}
00067 if (_phi >= twopi) {_phi -= twopi;} // can happen if phi=-|eps<1e-15|?
00068 if (this->E() == abs(this->pz()) && _kt2 == 0) {
00069 // Point has infinite rapidity -- convert that into a very large
00070 // number, but in such a way that different 0-pt momenta will have
00071 // different rapidities (so as to lift the degeneracy between
00072 // them) [this can be relevant at parton-level]
00073 double MaxRapHere = MaxRap + abs(this->pz());
00074 if (this->pz() >= 0.0) {_rap = MaxRapHere;} else {_rap = -MaxRapHere;}
00075 } else {
00076 // get the rapidity in a way that's modestly insensitive to roundoff
00077 // error when things pz,E are large (actually the best we can do without
00078 // explicit knowledge of mass)
00079 double effective_m2 = max(0.0,m2()); // force non tachyonic mass
00080 double E_plus_pz = _E + abs(_pz); // the safer of p+, p-
00081 // p+/p- = (p+ p-) / (p-)^2 = (kt^2+m^2)/(p-)^2
00082 _rap = 0.5*log((_kt2 + effective_m2)/(E_plus_pz*E_plus_pz));
00083 if (_pz > 0) {_rap = - _rap;}
00084 }
00086 //if (this->E() != abs(this->pz())) {
00087 // _rap = 0.5*log((this->E() + this->pz())/(this->E() - this->pz()));
00088 // } else {
00089 // // Overlapping points can give problems. Let's lift the degeneracy
00090 // // in case of multiple 0-pT points (can be found at parton-level)
00091 // double MaxRapHere = MaxRap + abs(this->pz());
00092 // if (this->pz() >= 0.0) {_rap = MaxRapHere;} else {_rap = -MaxRapHere;}
00093 //}
00094 }
|
|
|
returns distance between this jet and the beam
Definition at line 133 of file PseudoJet.hh. 00133 {return _kt2;};
|
|
|
return the cluster_hist_index, intended to be used by clustering routines.
Definition at line 108 of file PseudoJet.hh. Referenced by fastjet::ClusterSequence::add_constituents(), fastjet::ClusterSequenceActiveArea::area(), fastjet::ClusterSequenceActiveAreaExplicitGhosts::area_4vector(), fastjet::ClusterSequenceActiveArea::area_4vector(), fastjet::ClusterSequenceActiveArea::area_error(), and fastjet::ClusterSequenceActiveAreaExplicitGhosts::is_pure_ghost(). 00108 {return _cluster_hist_index;};
|
|
|
Definition at line 67 of file PseudoJet.hh. Referenced by operator()(). 00067 {return _E;}; // like CLHEP
|
|
|
Definition at line 66 of file PseudoJet.hh. Referenced by fastjet::operator+(), fastjet::operator-(), and print_jets(). 00066 {return _E;};
|
|
|
return a valarray containing the four-momentum (components 0-2 are 3-mom, component 3 is energy).
Definition at line 99 of file PseudoJet.cc. References _E, _px, _py, and _pz. 00099 {
00100 valarray<double> mom(4);
00101 mom[0] = _px;
00102 mom[1] = _py;
00103 mom[2] = _pz;
00104 mom[3] = _E ;
00105 return mom;
00106 }
|
|
|
returns the squared transverse momentum
Definition at line 90 of file PseudoJet.hh. Referenced by fastjet::ClusterSequence::jet_scale_for_algorithm(). 00090 {return _kt2;};
|
|
|
returns kt distance (R=1) between this jet and another
Definition at line 213 of file PseudoJet.cc. References _kt2, _phi, _rap, fastjet::pi, and fastjet::twopi. 00213 {
00214 //double distance = min(this->kt2(), other.kt2());
00215 double distance = min(_kt2, other._kt2);
00216 double dphi = abs(_phi - other._phi);
00217 if (dphi > pi) {dphi = twopi - dphi;}
00218 double drap = _rap - other._rap;
00219 distance = distance * (dphi*dphi + drap*drap);
00220 return distance;
00221 }
|
|
|
returns the squared invariant mass // like CLHEP
Definition at line 96 of file PseudoJet.hh. Referenced by _finish_init().
|
|
|
multiply the jet's momentum by the coefficient
Definition at line 173 of file PseudoJet.cc. References _E, _kt2, _px, _py, and _pz. 00173 {
00174 _px *= coeff;
00175 _py *= coeff;
00176 _pz *= coeff;
00177 _E *= coeff;
00178 _kt2*= coeff*coeff;
00179 // phi and rap are unchanged
00180 }
|
|
|
returns component i, where X==0, Y==1, Z==2, E==3
Definition at line 111 of file PseudoJet.cc. References e(), px(), py(), pz(), T, X, Y, and Z. 00111 {
00112 switch(i) {
00113 case X:
00114 return px();
00115 case Y:
00116 return py();
00117 case Z:
00118 return pz();
00119 case T:
00120 return e();
00121 default:
00122 ostringstream err;
00123 err << "PseudoJet subscripting: bad index (" << i << ")";
00124 throw Error(err.str());
00125 }
00126 return 0.;
00127 }
|
|
|
add the other jet's momentum to this jet
Definition at line 191 of file PseudoJet.cc. References _E, _finish_init(), _px, _py, and _pz. 00191 {
00192 _px += other_jet._px;
00193 _py += other_jet._py;
00194 _pz += other_jet._pz;
00195 _E += other_jet._E ;
00196 _finish_init(); // we need to recalculate phi,rap,kt2
00197 }
|
|
|
subtract the other jet's momentum from this jet
Definition at line 202 of file PseudoJet.cc. References _E, _finish_init(), _px, _py, and _pz. 00202 {
00203 _px -= other_jet._px;
00204 _py -= other_jet._py;
00205 _pz -= other_jet._pz;
00206 _E -= other_jet._E ;
00207 _finish_init(); // we need to recalculate phi,rap,kt2
00208 }
|
|
|
divide the jet's momentum by the coefficient
Definition at line 184 of file PseudoJet.cc. 00184 {
00185 (*this) *= 1.0/coeff;
00186 }
|
|
|
returns component i, where X==0, Y==1, Z==2, E==3
Definition at line 100 of file PseudoJet.hh. 00100 { return (*this)(i); }; // this too
|
|
|
returns the scalar transverse momentum
Definition at line 94 of file PseudoJet.hh. Referenced by fastjet::ClusterSequenceActiveArea::_transfer_areas(). 00094 {return sqrt(_kt2);}; // like CLHEP
|
|
|
returns the squared transverse momentum
Definition at line 92 of file PseudoJet.hh. Referenced by fastjet::ClusterSequenceActiveArea::_transfer_areas(), fastjet::ClusterSequence::inclusive_jets(), and print_jets(). 00092 {return _kt2;}; // like CLHEP
|
|
|
returns phi (in the range 0..2pi)
Definition at line 73 of file PseudoJet.hh. 00073 {return phi_02pi();};
|
|
|
returns phi in the range 0..2pi
Definition at line 80 of file PseudoJet.hh. 00080 {return _phi;};
|
|
|
returns phi in the range -pi..pi
Definition at line 76 of file PseudoJet.hh. References fastjet::pi, and fastjet::twopi.
|
|
|
returns squared cylinder (eta-phi) distance between this jet and another
Definition at line 226 of file PseudoJet.cc. References _phi, _rap, fastjet::pi, and fastjet::twopi. 00226 {
00227 double dphi = abs(_phi - other._phi);
00228 if (dphi > pi) {dphi = twopi - dphi;}
00229 double drap = _rap - other._rap;
00230 return (dphi*dphi + drap*drap);
00231 }
|
|
|
Definition at line 68 of file PseudoJet.hh. Referenced by _finish_init(), operator()(), fastjet::operator+(), and fastjet::operator-(). 00068 {return _px;};
|
|
|
Definition at line 69 of file PseudoJet.hh. Referenced by _finish_init(), operator()(), fastjet::operator+(), and fastjet::operator-(). 00069 {return _py;};
|
|
|
Definition at line 70 of file PseudoJet.hh. Referenced by operator()(), fastjet::operator+(), and fastjet::operator-(). 00070 {return _pz;};
|
|
|
returns the rapidity or some large value when the rapidity is infinite
Definition at line 84 of file PseudoJet.hh. Referenced by main(). 00084 {return _rap;};
|
|
|
the same as rap()
Definition at line 87 of file PseudoJet.hh. 00087 {return _rap;}; // like CLHEP
|
|
|
set the cluster_hist_index, intended to be used by clustering routines.
Definition at line 110 of file PseudoJet.hh. 00110 {_cluster_hist_index = index;};
|
|
|
set the user_index, intended to allow the user to "add" information
Definition at line 115 of file PseudoJet.hh. Referenced by main(). 00115 {_user_index = index;};
|
|
|
return the user_index, intended to allow the user to "add" information
Definition at line 113 of file PseudoJet.hh. 00113 {return _user_index;};
|
|
|
Definition at line 145 of file PseudoJet.hh. |
|
|
Definition at line 143 of file PseudoJet.hh. Referenced by _finish_init(), four_mom(), operator *=(), operator+=(), operator-=(), and PseudoJet(). |
|
|
Definition at line 144 of file PseudoJet.hh. Referenced by _finish_init(), kt_distance(), and operator *=(). |
|
|
Definition at line 144 of file PseudoJet.hh. Referenced by _finish_init(), kt_distance(), and plain_distance(). |
|
|
Definition at line 143 of file PseudoJet.hh. Referenced by four_mom(), operator *=(), operator+=(), operator-=(), and PseudoJet(). |
|
|
Definition at line 143 of file PseudoJet.hh. Referenced by four_mom(), operator *=(), operator+=(), operator-=(), and PseudoJet(). |
|
|
Definition at line 143 of file PseudoJet.hh. Referenced by _finish_init(), four_mom(), operator *=(), operator+=(), operator-=(), and PseudoJet(). |
|
|
Definition at line 144 of file PseudoJet.hh. Referenced by _finish_init(), kt_distance(), and plain_distance(). |
|
|
Definition at line 145 of file PseudoJet.hh. |
1.4.2