ATLAS Offline Software
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 
9 #include <TLorentzVector.h>
10 #include <cmath>
11 #include <stdexcept>
12 
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
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
cost
int cost(std::vector< std::string > &files, node &n, const std::string &directory="", bool deleteref=false, bool relocate=false)
Definition: hcg.cxx:921
TLorentzVectorFactoryEtaE::make
virtual TLorentzVector make(double eta, double e) const override
Definition: TLorentzVectorFactoryEtaE.h:15
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
ITLorentzVectorFactory
Definition: ITLorentzVectorFactory.h:10
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
ITLorentzVectorFactory.h
TLorentzVectorFactoryEtaE
Definition: TLorentzVectorFactoryEtaE.h:13
dqt_zlumi_alleff_HIST.tl
tl
Definition: dqt_zlumi_alleff_HIST.py:73
TileDCSDataPlotter.tt
tt
Definition: TileDCSDataPlotter.py:874