ATLAS Offline Software
Public Types | Public Member Functions | List of all members
P4Impl< P4Mom_t > Class Template Reference

#include <P4Impl.h>

Inheritance diagram for P4Impl< P4Mom_t >:
Collaboration diagram for P4Impl< P4Mom_t >:

Public Types

typedef P4Mom_t base_type
 publish the type of the base class (ie: 'traits-itize' it) More...
 
enum  Kind {
  P4EETAPHIM, P4IPTCOTTHPHIM, P4PTETAPHIM, P4PXPYPZE,
  UNKNOWN
}
 

Public Member Functions

 P4Impl ()
 Default constructor. More...
 
 P4Impl (const P4Impl &rhs)
 Copy constructor. More...
 
P4Imploperator= (const P4Impl &rhs)
 Assignment operator. More...
 
 P4Impl (const double p1, const double p2, const double p3, const double p4)
 Constructor with arguments. More...
 
 P4Impl (const CLHEP::HepLorentzVector &theHlv)
 
 P4Impl (const P4Mom_t &rhs)
 
 P4Impl (const I4Momentum &rhs)
 
 P4Impl (const I4Momentum *const rhs)
 
virtual ~P4Impl ()
 Default constructor: More...
 
const P4Mom_t & base () const
 access to underlying base type More...
 
P4Mom_t & base ()
 access to underlying base type More...
 
double px () const
 x component of momentum More...
 
double py () const
 y component of momentum More...
 
double pz () const
 z component of momentum More...
 
double m () const
 mass More...
 
double m2 () const
 mass squared More...
 
double p () const
 momentum magnitude More...
 
double p2 () const
 square of momentum magnitude More...
 
double eta () const
 pseudo rapidity More...
 
double rapidity () const
 rapidity More...
 
double phi () const
 phi in [-pi,pi[ More...
 
double sinPhi () const
 sin(phi) More...
 
double cosPhi () const
 cos(phi) More...
 
double e () const
 energy More...
 
double et () const
 transverse energy defined to be e*sin(theta) More...
 
double pt () const
 transverse momentum More...
 
double iPt () const
 inverse of transverse momentum More...
 
double cosTh () const
 cosinus theta More...
 
double sinTh () const
 sinus theta More...
 
double tanTh () const
 tan theta More...
 
double cotTh () const
 cottan theta More...
 
CLHEP::HepLorentzVector hlv () const
 CLHEP HepLorentzVector. More...
 
virtual const I4MomentumErrorerrors () const
 Access to errors, if available; returns 0 if no errors. More...
 
I4Momentum::Kind kind () const
 kind (what type of P4XYZ) of underlying class More...
 
virtual void set4Mom (const I4Momentum *const theI4Mom)
 set 4Momentum (will throw exception if cannot be implemented) More...
 
virtual void set4Mom (const I4Momentum &theI4Mom)
 set 4Momentum (will throw exception if cannot be implemented) More...
 
virtual void set4Mom (const CLHEP::HepLorentzVector &theHlv)
 set 4Momentum (will throw exception if cannot be implemented) More...
 
std::ostream & dump (std::ostream &out) const
 Print I4Momentum content. More...
 

Detailed Description

template<class P4Mom_t>
class P4Impl< P4Mom_t >

hub for various interface implementations of I4Momentum

Definition at line 29 of file P4Impl.h.

Member Typedef Documentation

◆ base_type

template<class P4Mom_t >
typedef P4Mom_t P4Impl< P4Mom_t >::base_type

publish the type of the base class (ie: 'traits-itize' it)

Definition at line 40 of file P4Impl.h.

Member Enumeration Documentation

◆ Kind

enum I4Momentum::Kind
inherited
Enumerator
P4EETAPHIM 
P4IPTCOTTHPHIM 
P4PTETAPHIM 
P4PXPYPZE 
UNKNOWN 

Definition at line 33 of file I4Momentum.h.

Constructor & Destructor Documentation

◆ P4Impl() [1/7]

template<class P4Mom_t >
P4Impl< P4Mom_t >::P4Impl
inline

Default constructor.

Inline methods:

Definition at line 188 of file P4Impl.h.

188  :
189  I4Momentum ( ),
190  P4Mom_t ( )
191 {}

◆ P4Impl() [2/7]

template<class P4Mom_t >
P4Impl< P4Mom_t >::P4Impl ( const P4Impl< P4Mom_t > &  rhs)
inlineexplicit

Copy constructor.

Definition at line 195 of file P4Impl.h.

195  :
196  I4Momentum ( ),
197  P4Mom_t ( rhs.base() )
198 {}

◆ P4Impl() [3/7]

template<class P4Mom_t >
P4Impl< P4Mom_t >::P4Impl ( const double  p1,
const double  p2,
const double  p3,
const double  p4 
)
inline

Constructor with arguments.

Definition at line 243 of file P4Impl.h.

244  :
245  I4Momentum( ),
246  P4Mom_t ( p1, p2, p3, p4 )
247 {}

◆ P4Impl() [4/7]

template<class P4Mom_t >
P4Impl< P4Mom_t >::P4Impl ( const CLHEP::HepLorentzVector &  theHlv)
inlineexplicit

Definition at line 202 of file P4Impl.h.

202  :
203  I4Momentum ( ),
204  P4Mom_t ( theHlv )
205 {}

◆ P4Impl() [5/7]

template<class P4Mom_t >
P4Impl< P4Mom_t >::P4Impl ( const P4Mom_t &  rhs)
inlineexplicit

Definition at line 209 of file P4Impl.h.

209  :
210  I4Momentum ( ),
211  P4Mom_t ( rhs )
212 {}

◆ P4Impl() [6/7]

template<class P4Mom_t >
P4Impl< P4Mom_t >::P4Impl ( const I4Momentum rhs)
inlineexplicit

Definition at line 216 of file P4Impl.h.

216  :
217  I4Momentum ( ),
218  P4Mom_t ( )
219 {
220  P4Mom_t::set4Mom(theI4M);
221 }

◆ P4Impl() [7/7]

template<class P4Mom_t >
P4Impl< P4Mom_t >::P4Impl ( const I4Momentum *const  rhs)
inlineexplicit

Definition at line 225 of file P4Impl.h.

225  :
226  I4Momentum ( ),
227  P4Mom_t ( theI4M )
228 {}

◆ ~P4Impl()

template<class P4Mom_t >
P4Impl< P4Mom_t >::~P4Impl
inlinevirtual

Default constructor:

Definition at line 251 of file P4Impl.h.

252 {}

Member Function Documentation

◆ base() [1/2]

template<class P4Mom_t >
P4Mom_t & P4Impl< P4Mom_t >::base
inline

access to underlying base type

Definition at line 431 of file P4Impl.h.

432 {
433  return *this;
434 }

◆ base() [2/2]

template<class P4Mom_t >
const P4Mom_t & P4Impl< P4Mom_t >::base
inline

access to underlying base type

Definition at line 255 of file P4Impl.h.

256 {
257  return *this;
258 }

◆ cosPhi()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::cosPhi
inlinevirtual

cos(phi)

Implements I4Momentum.

Definition at line 321 of file P4Impl.h.

322 {
323  return P4Mom_t::cosPhi();
324 }

◆ cosTh()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::cosTh
inlinevirtual

cosinus theta

Implements I4Momentum.

Definition at line 357 of file P4Impl.h.

358 {
359  return P4Mom_t::cosTh();
360 }

◆ cotTh()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::cotTh
inlinevirtual

cottan theta

Implements I4Momentum.

Definition at line 375 of file P4Impl.h.

376 {
377  return P4Mom_t::cotTh();
378 }

◆ dump()

template<class P4Mom_t >
std::ostream & P4Impl< P4Mom_t >::dump ( std::ostream &  out) const
inlinevirtual

Print I4Momentum content.

Implements I4Momentum.

Definition at line 424 of file P4Impl.h.

425 {
426  return P4Mom_t::dump( out );
427 }

◆ e()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::e
inlinevirtual

energy

Implements I4Momentum.

Definition at line 333 of file P4Impl.h.

334 {
335  return P4Mom_t::e();
336 }

◆ errors()

template<class P4Mom_t >
const I4MomentumError * P4Impl< P4Mom_t >::errors ( ) const
inlinevirtual

Access to errors, if available; returns 0 if no errors.

Implements I4Momentum.

Definition at line 387 of file P4Impl.h.

388 {
389  return P4Mom_t::errors();
390 }

◆ et()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::et
inlinevirtual

transverse energy defined to be e*sin(theta)

Implements I4Momentum.

Definition at line 339 of file P4Impl.h.

340 {
341  return P4Mom_t::et();
342 }

◆ eta()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::eta
inlinevirtual

pseudo rapidity

Implements I4Momentum.

Definition at line 303 of file P4Impl.h.

304 {
305  return P4Mom_t::eta();
306 }

◆ hlv()

template<class P4Mom_t >
CLHEP::HepLorentzVector P4Impl< P4Mom_t >::hlv
inlinevirtual

CLHEP HepLorentzVector.

Implements I4Momentum.

Definition at line 381 of file P4Impl.h.

382 {
383  return P4Mom_t::hlv();
384 }

◆ iPt()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::iPt
inlinevirtual

inverse of transverse momentum

Implements I4Momentum.

Definition at line 351 of file P4Impl.h.

352 {
353  return P4Mom_t::iPt();
354 }

◆ kind()

template<class P4Mom_t >
I4Momentum::Kind P4Impl< P4Mom_t >::kind
inlinevirtual

kind (what type of P4XYZ) of underlying class

Implements I4Momentum.

Definition at line 393 of file P4Impl.h.

394 {
395  return P4Mom_t::kind();
396 }

◆ m()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::m
inlinevirtual

mass

Implements I4Momentum.

Definition at line 279 of file P4Impl.h.

280 {
281  return P4Mom_t::m();
282 }

◆ m2()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::m2
inlinevirtual

mass squared

Implements I4Momentum.

Definition at line 285 of file P4Impl.h.

286 {
287  return P4Mom_t::m2();
288 }

◆ operator=()

template<class P4Mom_t >
P4Impl< P4Mom_t > & P4Impl< P4Mom_t >::operator= ( const P4Impl< P4Mom_t > &  rhs)

Assignment operator.

Definition at line 232 of file P4Impl.h.

233 {
234  if ( this != &rhs ) {
235  I4Momentum::operator=( rhs );
236  P4Mom_t::operator=( rhs );
237  }
238  return *this;
239 }

◆ p()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::p
inlinevirtual

momentum magnitude

Implements I4Momentum.

Definition at line 291 of file P4Impl.h.

292 {
293  return P4Mom_t::p();
294 }

◆ p2()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::p2
inlinevirtual

square of momentum magnitude

Implements I4Momentum.

Definition at line 297 of file P4Impl.h.

298 {
299  return P4Mom_t::p2();
300 }

◆ phi()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::phi
inlinevirtual

phi in [-pi,pi[

Implements I4Momentum.

Definition at line 315 of file P4Impl.h.

316 {
317  return P4Mom_t::phi();
318 }

◆ pt()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::pt
inlinevirtual

transverse momentum

Implements I4Momentum.

Definition at line 345 of file P4Impl.h.

346 {
347  return P4Mom_t::pt();
348 }

◆ px()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::px
inlinevirtual

x component of momentum

I4Momentum interface forwarding

Implements I4Momentum.

Definition at line 261 of file P4Impl.h.

262 {
263  return P4Mom_t::px();
264 }

◆ py()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::py
inlinevirtual

y component of momentum

Implements I4Momentum.

Definition at line 267 of file P4Impl.h.

268 {
269  return P4Mom_t::py();
270 }

◆ pz()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::pz
inlinevirtual

z component of momentum

Implements I4Momentum.

Definition at line 273 of file P4Impl.h.

274 {
275  return P4Mom_t::pz();
276 }

◆ rapidity()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::rapidity
inlinevirtual

rapidity

Implements I4Momentum.

Definition at line 309 of file P4Impl.h.

310 {
311  return P4Mom_t::rapidity();
312 }

◆ set4Mom() [1/3]

template<class P4Mom_t >
void P4Impl< P4Mom_t >::set4Mom ( const CLHEP::HepLorentzVector &  theHlv)
inlinevirtual

set 4Momentum (will throw exception if cannot be implemented)

Implements I4Momentum.

Definition at line 413 of file P4Impl.h.

414 {
415  return P4Mom_t::set4Mom(theHlv);
416 }

◆ set4Mom() [2/3]

template<class P4Mom_t >
void P4Impl< P4Mom_t >::set4Mom ( const I4Momentum theI4Mom)
inlinevirtual

set 4Momentum (will throw exception if cannot be implemented)

Implements I4Momentum.

Definition at line 406 of file P4Impl.h.

407 {
408  return
409  P4Mom_t::set4Mom(theI4Mom);
410 }

◆ set4Mom() [3/3]

template<class P4Mom_t >
void P4Impl< P4Mom_t >::set4Mom ( const I4Momentum *const  theI4Mom)
inlinevirtual

set 4Momentum (will throw exception if cannot be implemented)

Implements I4Momentum.

Definition at line 400 of file P4Impl.h.

401 {
402  return P4Mom_t::set4Mom(theI4Mom);
403 }

◆ sinPhi()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::sinPhi
inlinevirtual

sin(phi)

Implements I4Momentum.

Definition at line 327 of file P4Impl.h.

328 {
329  return P4Mom_t::sinPhi();
330 }

◆ sinTh()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::sinTh
inlinevirtual

sinus theta

Implements I4Momentum.

Definition at line 363 of file P4Impl.h.

364 {
365  return P4Mom_t::sinTh();
366 }

◆ tanTh()

template<class P4Mom_t >
double P4Impl< P4Mom_t >::tanTh
inlinevirtual

tan theta

Implements I4Momentum.

Definition at line 369 of file P4Impl.h.

370 {
371  return P4Mom_t::tanTh();
372 }

The documentation for this class was generated from the following file:
P4Impl::p2
double p2() const
square of momentum magnitude
Definition: P4Impl.h:297
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
I4Momentum
Definition: I4Momentum.h:31
test_pyathena.px
px
Definition: test_pyathena.py:18
python.SystemOfUnits.m2
int m2
Definition: SystemOfUnits.py:92
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
I4Momentum::P4IPTCOTTHPHIM
@ P4IPTCOTTHPHIM
Definition: I4Momentum.h:33
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
test_pyathena.pt
pt
Definition: test_pyathena.py:11
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
P4Impl::base
const P4Mom_t & base() const
access to underlying base type
Definition: P4Impl.h:255
run_Egamma1_LArStrip_Fex.dump
dump
Definition: run_Egamma1_LArStrip_Fex.py:88
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
I4Momentum::P4PTETAPHIM
@ P4PTETAPHIM
Definition: I4Momentum.h:33
mergePhysValFiles.errors
list errors
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:43
Amg::py
@ py
Definition: GeoPrimitives.h:39
I4Momentum::UNKNOWN
@ UNKNOWN
Definition: I4Momentum.h:33
TRTCalib_cfilter.p3
p3
Definition: TRTCalib_cfilter.py:132
I4Momentum::P4EETAPHIM
@ P4EETAPHIM
Definition: I4Momentum.h:33
I4Momentum::P4PXPYPZE
@ P4PXPYPZE
Definition: I4Momentum.h:33