38 if (
m_debugKeyBase) { std::cout <<
"JetElementKeyBase: m_debugKeyBase output turned on...."<<std::endl; }
48 if (
m_debugKeyBase) { std::cout <<
"JetElementKeyBase: m_debugKeyBase output turned on...."<<std::endl; }
58 if (
m_debugKeyBase) { std::cout <<
"JetElementKeyBase: m_debugKeyBase output turned on...."<<std::endl; }
72 int iphi=iCoord->
phi();
73 int ieta=iCoord->
eta();
74 double centralPhi=0.0;
75 double centralEta=0.0;
76 int phiBin=0;
int etaBin=0;
77 int abs_ieta=abs(ieta);
78 int sign=ieta/abs_ieta;
81 std::cout <<
"JetElementKeyBase: start calculateTriggerBin"<<std::endl;
83 std::cout <<
"iphi, ieta : ("<<iphi<<
", "<<ieta<<
")"<<std::endl;
84 std::cout <<
"abs_ieta : ("<<abs_ieta<<
") and sign : "<<
sign<<std::endl;
103 else if ( abs_ieta<25 ) {
107 else if ( abs_ieta<28 ) {
111 else if ( abs_ieta<30 ) {
115 else if ( abs_ieta<=32 ) {
126 centralEta=(
static_cast<double>(etaBin)*0.2)-0.1;
134 phiBin=iphi/nTTperJE;
139 if (
m_debugKeyBase) std::cout <<
"central : ("<<centralPhi<<
", "<<centralEta<<
")"
140 <<
" bin : ("<<phiBin<<
","<<etaBin<<
")"<<std::endl;
151 if (
m_debugKeyBase) std::cout <<
"JetElementKeyBase: returning key for coords ("<<tower.
phi()<<
","<<tower.
eta()<<
")"<<std::endl;
157 if (
m_debugKeyBase) std::cout <<
"JetElementKeyBase: returning key for coords ("<<jetElement.
phi()<<
","<<jetElement.
eta()<<
")"<<std::endl;
158 return key(jetElement.
phi(), jetElement.
eta());
166 if (
m_debugKeyBase) std::cout <<
"JetElementKeyBase: returning key for coords ("<<
phi<<
","<<
eta<<
")"<<std::endl;
172 if (
m_debugKeyBase) std::cout <<
"JetElementKeyBase: returning key for Coord: ("<<
coord.phi()<<
","<<
coord.eta()<<
")"<<std::endl;
181 double temp_eta=centre.
eta();
184 unsigned int reg=
region(temp_eta);
186 unsigned int maxRegion=5+((temp_eta>0.0)? 0:-1);
193 int sign = ((temp_eta>0.0)? 1:-1);
225 double temp_eta=centre.
eta();
227 unsigned int reg=
region(temp_eta);
229 unsigned int maxRegion=5+((temp_eta>0.0)? -1:0);
236 int sign = ((temp_eta>0.0)? 1:-1);
258 double temp_phi=centre.
phi();
285 double temp_phi=centre.
phi();
399 if((abs_eta>2.2)&&(abs_eta<=2.4)) reg=1;
400 if((abs_eta>2.4)&&(abs_eta<=2.7)) reg=2;
401 if((abs_eta>2.7)&&(abs_eta<=2.9)) reg=3;
402 if((abs_eta>2.9)&&(abs_eta<=3.2)) reg=4;
403 if((abs_eta>3.2)&&(abs_eta<=4.9)) reg=5;
414 if (reg==5)
return FCAL;
486 delete iCoord;
delete bandc ;
504 double allowedSpread=0.0002;
505 if ( (
coord.phi()<(centre.
phi()-allowedSpread))||(
coord.phi()>(centre.
phi()+allowedSpread) ) )
506 std::cout <<
"PHI ERROR: "<<
coord.phi() <<
"!="<<centre.
phi()<<std::endl;
507 if ( (
coord.eta()<(centre.
eta()-allowedSpread))||(
coord.eta()>(centre.
eta()+allowedSpread) ) )
508 std::cout <<
"ETA ERROR: "<<
coord.eta() <<
"!="<<centre.
eta()<<std::endl;
Used to pass data between the methods of the Key Classes: Returns the Eta and Phi bins,...
const Coordinate * coords() const
Coordinate class declaration.
void setCoords(double phi, double eta)
change coords of an existing Coordinate object
double phi() const
return phi
double eta() const
return eta
Used by Key Classes, returns and integer coorginate for the bin Eta-Phi.
int phi() const
return phi
int eta() const
return eta
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.
virtual ~JetElementKeyBase()
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
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.
virtual double eta() const
returns the centre of the TT at eta_coord:
virtual int sign(int temp) const
returns -1 if temp is -ve and +1 if it is +ve.
virtual double phi() const
returns phi coordinate of centre of relevant trigger tower.
ICoordinate * convertCoordsToIntegers(double phi, double eta)
converts the coordinates and corrects for overflows etc.
unsigned int key(double phi, double eta)
calculates a map key from passed phi, eta coordinates
Coordinate coord() const
return central coords of current key value.
KeyUtilities()
the constructor is protected so a user can never make a KeyUtilities object
double m_phi
phi coordinate of key
double m_eta
eta coordinate of key
static const double Region5Width
static const double Region4EtaCentre
static const double Region2EtaCentre
static const unsigned int RegionError
static const double Region4Width
static const double Region2Height
static const double Region3Width
static const double Region1EtaCentre
static const double Region3Height
static const double Region5EtaCentre
static const double Region0Width
static const double RegionERROREtaCentre
static const double Region5Height
static const int RegionERROREtaBin
static const double Region0EtaCentre
static const double Region0Height
static const double Region5JetHeight
static const double Region1Height
static const double Region1Width
static const double Region3EtaCentre
static const double Region2Width
static const double Region4Height
float phi() const
get phi (note that for L1Calo phi runs from 0 to 2pi)
virtual double eta() const final
The pseudorapidity ( ) of the particle.
virtual double phi() const final
The azimuthal angle ( ) of the particle.
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.