ATLAS Offline Software
Loading...
Searching...
No Matches
TLorentzVectorFactory.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGHLTJETHYPOUNITTESTS_LORENTZVECTORFACTORY_H
6#define TRIGHLTJETHYPOUNITTESTS_LORENTZVECTORFACTORY_H
7
9#include <TLorentzVector.h>
10#include <cmath>
11#include <stdexcept>
12
14 public:
15 virtual TLorentzVector make(double eta, double et) const override{
16 if(et <= 0.) {throw std::out_of_range("Et < 0");}
17
18 double ttOn2 = std::exp(-eta); //tan(theta/2)
19 double tt = 2.*ttOn2/(1.- ttOn2*ttOn2); // tan(theta)
20 double ez = et/tt;
21 TLorentzVector tl;
22 tl.SetXYZM(et, 0., ez, 0.);
23
24 return tl;
25 }
26};
27#endif
Scalar eta() const
pseudorapidity method
virtual TLorentzVector make(double eta, double et) const override
Extra patterns decribing particle interation process.