ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigHLTJetHypoUnitTests
src
TLorentzVectorFactoryEtaE.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TRIGHLTJETHYPOUNITTESTS_LORENTZVECTORFACTORYETAE_H
6
#define TRIGHLTJETHYPOUNITTESTS_LORENTZVECTORFACTORYETAE_H
7
8
#include "
./ITLorentzVectorFactory.h
"
9
#include <TLorentzVector.h>
10
#include <cmath>
11
#include <stdexcept>
12
13
class
TLorentzVectorFactoryEtaE
:
public
ITLorentzVectorFactory
{
14
public
:
15
virtual
TLorentzVector
make
(
double
eta
,
double
e)
const override
{
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
}
27
};
28
#endif
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
ITLorentzVectorFactory.h
ITLorentzVectorFactory
Definition
ITLorentzVectorFactory.h:10
TLorentzVectorFactoryEtaE
Definition
TLorentzVectorFactoryEtaE.h:13
TLorentzVectorFactoryEtaE::make
virtual TLorentzVector make(double eta, double e) const override
Definition
TLorentzVectorFactoryEtaE.h:15
cost
int cost(std::vector< std::string > &files, node &n, const std::string &directory="", bool deleteref=false, bool relocate=false)
Definition
hcg.cxx:922
Generated on
for ATLAS Offline Software by
1.14.0