ATLAS Offline Software
Loading...
Searching...
No Matches
P4Impl< P4Mom_t > Class Template Reference

hub for various interface implementations of I4Momentum More...

#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)
enum  Kind {
  P4EETAPHIM , P4IPTCOTTHPHIM , P4PTETAPHIM , P4PXPYPZE ,
  UNKNOWN
}

Public Member Functions

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

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{}
hub for various interface implementations of I4Momentum
Definition P4Impl.h:31

◆ 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{}
const P4Mom_t & base() const
access to underlying base type
Definition P4Impl.h:255

◆ 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{}
double p2() const
square of momentum magnitude
Definition P4Impl.h:297

◆ 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{
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 ( ) const
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 ( ) const
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 ( ) const
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 ( ) const
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 ( ) const
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 ( ) const
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 ( void ) const
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 ( ) const
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 ( ) const
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 ( ) const
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 ( void ) const
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 ( ) const
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 ) {
237 }
238 return *this;
239}

◆ p()

template<class P4Mom_t>
double P4Impl< P4Mom_t >::p ( ) const
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 ( ) const
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 ( void ) const
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 ( void ) const
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 ( ) const
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 ( ) const
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 ( ) const
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 ( ) const
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
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{
403}

◆ sinPhi()

template<class P4Mom_t>
double P4Impl< P4Mom_t >::sinPhi ( ) const
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 ( ) const
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 ( ) const
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: