ATLAS Offline Software
Loading...
Searching...
No Matches
TLorentzVectorFactoryEtaE Class Reference

#include <TLorentzVectorFactoryEtaE.h>

Inheritance diagram for TLorentzVectorFactoryEtaE:
Collaboration diagram for TLorentzVectorFactoryEtaE:

Public Member Functions

virtual TLorentzVector make (double eta, double e) const override

Detailed Description

Definition at line 13 of file TLorentzVectorFactoryEtaE.h.

Member Function Documentation

◆ make()

virtual TLorentzVector TLorentzVectorFactoryEtaE::make ( double eta,
double e ) const
inlineoverridevirtual

Implements ITLorentzVectorFactory.

Definition at line 15 of file TLorentzVectorFactoryEtaE.h.

15 {
16 if(e <= 0.) {throw std::out_of_range("E < 0");}
17
18 double ttOn2 = std::exp(-eta); //tan(theta/2)
19 double tt = 2.*ttOn2/(1.- ttOn2*ttOn2); // tan(theta)
20 double cost = sqrt(1./(1+tt*tt)); // 1+ tan^2(theta) = 1/cos^2(theta)
21 double sint = tt*cost;
22 TLorentzVector tl;
23 tl.SetXYZM(0., e*sint, e*cost, 0.);
24
25 return tl;
26 }
Scalar eta() const
pseudorapidity method
int cost(std::vector< std::string > &files, node &n, const std::string &directory="", bool deleteref=false, bool relocate=false)
Definition hcg.cxx:922

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