ATLAS Offline Software
Trigger
TrigT1
L1CaloFEX
TrigT1CaloFexPerf
Root
JGTowerHelper.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigT1CaloFexPerf/JGTowerHelper.h
"
6
#include "TMath.h"
7
#include "TVector2.h"
8
9
namespace
LVL1
10
{
11
// Constructor
12
JGTowerHelper::JGTowerHelper
(
float
eta,
float
deta,
float
phi,
float
dphi)
13
{
14
m_eta
= eta;
15
m_deta
= deta;
16
m_phi
= phi;
17
m_dphi
= dphi;
18
}
19
20
//Destructor
21
JGTowerHelper::~JGTowerHelper
() {}
22
23
//Tools
24
bool
JGTowerHelper::inBox
(
float
eta1
,
float
eta2
,
float
deta,
float
phi1,
float
phi2,
float
dphi)
25
{
26
27
bool
inEtaBox = std::abs(
eta1
-
eta2
) < deta;
28
if
(phi2 > TMath::Pi())
29
phi2 = phi2 - 2 * TMath::Pi();
30
float
deltaPhi
= std::abs(phi1 - phi2);
31
if
(
deltaPhi
> TMath::Pi())
32
deltaPhi
= 2 * TMath::Pi() -
deltaPhi
;
33
bool
inPhiBox =
deltaPhi
< dphi;
34
35
return
inEtaBox && inPhiBox;
36
}
37
38
bool
JGTowerHelper::inBox
(
float
eta,
float
phi)
const
39
{
40
return
inBox
(
Eta
(), eta,
dEta
() / 2,
Phi
(), phi,
dPhi
() / 2);
41
}
42
}
// namespace LVL1
LVL1::JGTowerHelper::dPhi
float dPhi() const
Definition:
JGTowerHelper.h:39
ParticleGun_SamplingFraction.eta2
eta2
Definition:
ParticleGun_SamplingFraction.py:96
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition:
L2StandAloneMuon_v1.cxx:160
xAOD::eta1
setEt setPhi setE277 setWeta2 eta1
Definition:
TrigEMCluster_v1.cxx:41
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition:
ICMMCPHitsCnvTool.h:18
LVL1::JGTowerHelper::Phi
float Phi() const
Definition:
JGTowerHelper.h:37
LVL1::JGTowerHelper::m_eta
float m_eta
Definition:
JGTowerHelper.h:94
LVL1::JGTowerHelper::dEta
float dEta() const
Definition:
JGTowerHelper.h:38
LVL1::JGTowerHelper::m_phi
float m_phi
Definition:
JGTowerHelper.h:96
LVL1::JGTowerHelper::m_dphi
float m_dphi
Definition:
JGTowerHelper.h:97
LVL1::JGTowerHelper::m_deta
float m_deta
Definition:
JGTowerHelper.h:95
LVL1::JGTowerHelper::Eta
float Eta() const
Definition:
JGTowerHelper.h:36
LVL1::JGTowerHelper::~JGTowerHelper
virtual ~JGTowerHelper()
Definition:
JGTowerHelper.cxx:21
JGTowerHelper.h
LVL1::JGTowerHelper::JGTowerHelper
JGTowerHelper()=delete
LVL1::JGTowerHelper::inBox
static bool inBox(float eta1, float eta2, float deta, float phi1, float phi2, float dphi)
Definition:
JGTowerHelper.cxx:24
Generated on Thu Nov 7 2024 21:18:31 for ATLAS Offline Software by
1.8.18