ATLAS Offline Software
Loading...
Searching...
No Matches
JetElementKeyBase.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4/***************************************************************************
5 JetElementKeyBase.h - description
6 -------------------
7 begin : Monday August 20 2001
8 email : e.moyse@qmw.ac.uk
9
10 Converted to base class JetElementKeyBase by Alan Watson, 20/01/06
11***************************************************************************/
12
13
14#ifndef JetElementKeyBase_H
15#define JetElementKeyBase_H
16
17#include <iostream>
18#include <stdlib.h>
19#include <vector>
20
21#ifndef TRIGGERSPACE
22// running in Athena
28
29#else
30// running in TRIGGERSPACE
31#include "KeyUtilities.h"
32#include "BinAndCoord.h"
33#include "Coordinate.h"
34
35#endif
36
37
38
39namespace LVL1 {
40
49
50public:
59 virtual ~JetElementKeyBase();
60#ifndef TRIGGERSPACE
61// only applicable if running in Athena
63 virtual unsigned int jeKey( const xAOD::TriggerTower& tower) ;
65 virtual unsigned int jeKey( const xAOD::JetElement& jetElement) ;
66#endif
68 virtual unsigned int jeKey( const double phi, const double eta);
70 virtual unsigned int jeKey( const Coordinate coord);
72 unsigned int leftEtaKey(const double phi, const double eta);
74 unsigned int rightEtaKey(const double phi, const double eta);
76 unsigned int upPhiKey(const double phi, const double eta);
78 unsigned int downPhiKey(const double phi, const double eta);
79
81 Coordinate getCentre(const double phi, const double eta);
83
85 Coordinate rightEta(const double phi,const double eta);
86 Coordinate leftEta(const double phi,const double eta);
87 Coordinate downPhi(const double phi,const double eta);
88 Coordinate upPhi(const double phi,const double eta);
93 Coordinate upperLeft(const double phi,const double eta);
94 Coordinate upperRight(const double phi,const double eta);
95 Coordinate lowerLeft(const double phi,const double eta);
96 Coordinate lowerRight(const double phi,const double eta);
102 double dPhi(const double phi, const double eta) const ;
104 double dPhi() const;
106 double dPhi(const Coordinate& coord) const;
108 double dEta(const double phi, const double eta) const ;
110 double dEta() const ;
112 double dEta(const Coordinate& coord) const;
114 unsigned int region(double eta) const;
115 /*
116 Region Eta
117 Barrel <2.2
118 EndBarrel 2.2 - 2.4
119 EndCap1 2.4 - 2.7
120 EndCap2 2.7 - 2.9
121 EndCap3 2.9 - 3.2
122 FCAL 3.2 - 4.9 */
123 JERegion jeRegion(const Coordinate& coord) const;
125 bool isFCAL(double eta) const;
126
127protected: // Methods we don't want accessed except through inheritance
128
129 // User should construct a JetElementKey or JetInputKey, not this base class
130 JetElementKeyBase(double phi, double eta);
133
134 void setupRegionData();
135 void setupJetRegionData();
136
137private: // Internal methods of the base class
141
147
148private:
149// double m_phi;
150// double m_eta;
161 std::vector<double> m_regionEtaCentre;
163 std::vector<double> m_regionWidth;
165 std::vector<double> m_regionHeight;
166};
167}
168#endif
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
double coord
Type of coordination system.
Coordinate policies.
Used to pass data between the methods of the Key Classes: Returns the Eta and Phi bins,...
Definition BinAndCoord.h:35
Used by Key Classes, returns and integer coorginate for the bin Eta-Phi.
Definition ICoordinate.h:26
bool m_debugKeyBase
set to true to turn debugging info on
void setupJetRegionData()
Does same as setupRegionData, except in FCAL where uses phi granularity appropriate for the jet trigg...
Coordinate upperLeft(const double phi, const double eta)
std::vector< double > m_regionHeight
holds height of JEs in regions:
BinAndCoord * calculateTriggerBin(ICoordinate *iCoord)
converts integer phi, eta coordinates to phi, eta trigger bins.
void analCoordChecking(const Coordinate &coord)
this is a bit over the top, but it looks to see if the calculated coordinate matches a coordinate cen...
Coordinate getCentre(const double phi, const double eta)
returns the central coordinate of the JE which contains the passed coord
unsigned int rightEtaKey(const double phi, const double eta)
returns key of JE in -ve eta dir.
double dEta() const
return width of JE
JetElementKeyBase()
constructs a JetElementKeyBase object
Coordinate rightEta(const double phi, const double eta)
Functions for finding coordinates of neighbouring JEs.
Coordinate downPhi(const double phi, const double eta)
returns coord of next JE in -ve phi dir.
unsigned int region(double eta) const
returns region number at eta, where region is:
std::vector< double > m_regionEtaCentre
holds central coords of JEs in regions: Region Eta 0 <2.2 1 2.2-2.4 2 2.4-2.7 3 2....
Coordinate leftEta(const double phi, const double eta)
returns key of JE in -ve eta dir.
void setupRegionData()
get region data from TrigT1CaloDefs and put in more useful format - vectors
JERegion jeRegion(const Coordinate &coord) const
Coordinate upperRight(const double phi, const double eta)
double dPhi() const
return height of JE
JetElementKeyBase(double phi, double eta)
takes phi and eta and constructs a JetElementKeyBase object which can return the key for this coord
unsigned int downPhiKey(const double phi, const double eta)
returns key of next JE in -ve phi dir.
unsigned int leftEtaKey(const double phi, const double eta)
returns key of JE in +ve eta dir.
virtual unsigned int jeKey(const xAOD::TriggerTower &tower)
returns key of passed tower
std::vector< double > m_regionWidth
holds width of JEs in regions:
Coordinate lowerLeft(const double phi, const double eta)
unsigned int upPhiKey(const double phi, const double eta)
returns key of next JE in +ve phi dir.
bool isFCAL(double eta) const
returns TRUE if this coordinate is in the FCAL
Coordinate lowerRight(const double phi, const double eta)
Coordinate upPhi(const double phi, const double eta)
returns coord of next JE in +ve phi dir.
KeyUtilities()
the constructor is protected so a user can never make a KeyUtilities object
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
JetElement_v2 JetElement
Define the latest version of the JetElement class.
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.