25using namespace TrigConf;
59 double de =
get.dEta()/4.;
70 int minEtaOffset = -1;
76 double tempEta = startCoord.
eta();
77 double startPhi = startCoord.
phi();
96 std::vector<int> et6x6(4);
97 std::vector<int> cores(9);
98 for (
int etaOffset=minEtaOffset; etaOffset<=2 ; etaOffset++){
100 for (
int phiOffset=-1; phiOffset<=2 ; phiOffset++){
101 int tempKey =
get.jeKey(tempCoord);
102 std::map<int, JetInput*>::const_iterator ji = jiContainer->find(tempKey);
103 if (ji != jiContainer->end() ){
105 int ET = (ji->second)->energy();
109 if (phiOffset > -1) {
110 if (etaOffset < 2) et6x6[1] += ET;
111 if (etaOffset > -1) et6x6[2] += ET;
114 if (etaOffset < 2) et6x6[0] += ET;
115 if (etaOffset > -1) et6x6[3] += ET;
119 if (etaOffset >= 0) {
120 if (phiOffset >= 0) cores[phiOffset+3*etaOffset] += ET;
121 if (phiOffset < 2) cores[phiOffset+3*etaOffset+1] += ET;
124 if (phiOffset >= 0) cores[phiOffset+3*etaOffset+3] += ET;
125 if (phiOffset < 2) cores[phiOffset+3*etaOffset+4] += ET;
128 tempCoord =
get.upPhi(tempCoord);
130 tempCoord =
get.rightEta(tempCoord);
131 tempEta = tempCoord.
eta();
139 for (
int i = 0; i < 4; i++)
if (et6x6[i] >
m_ET6x6)
m_ET6x6 = et6x6[i];
161 double lowerEta = lowerLeft.
eta() - ( keyLL.
dEta()/2. );
162 double lowerPhi = lowerLeft.
phi() - ( keyLL.
dPhi()/2. );
177 double upperEta = upperRight.
eta() + ( keyUR.
dEta()/2. );
178 double upperPhi = upperRight.
phi() + ( keyUR.
dPhi()/2. );
201 for (
int i = 0; i < 4; i++)
if (cores[4] < cores[i])
m_EtMax =
false;
202 for (
int i = 5; i < 9; i++)
if (cores[4] <= cores[i])
m_EtMax =
false;
217 unsigned int sizeSmall{4};
218 unsigned int sizeLarge{8};
224 float scale =
m_l1menu->thrExtraInfo().JET().jetScale();
225 threshSmall =
m_l1menu->thrExtraInfo().JET().ptMinToTopoSmallWindowCounts()*scale;
226 threshLarge =
m_l1menu->thrExtraInfo().JET().ptMinToTopoLargeWindowCounts()*scale;
229 if (sizeLarge == 6) etLarge =
m_ET6x6;
230 else if (sizeLarge == 4) etLarge =
m_ET4x4;
233 if (sizeSmall == 6) etLarge =
m_ET6x6;
234 else if (sizeSmall == 8) etLarge =
m_ET8x8;
236 if (etLarge <= threshLarge && etSmall <= threshSmall)
return;
309 int frame = (jemCoord>>2);
returns the trigger hardware components associated with a given Coordinate
unsigned int jepModule(const Coordinate &coord)
returns ID of JEP module (i.e.
unsigned int jepLocalCoordinate(const Coordinate &coord)
returns the roi's local coord, in the form of a 5b word.
unsigned int jepCrate(const Coordinate &Coord)
returns ID of JEP Crate that covers this coordinate
CoordinateRange class declaration.
Coordinate class declaration.
double phi() const
return phi
double eta() const
return eta
bool isEtMax()
Does this window pass the local ET maximum condition.
const TrigConf::L1Menu * m_l1menu
int ET4x4()
Returns 4x4 TT cluster ET.
double m_eta
Algorithm results.
int Core()
Returns RoI Core ET.
int ETSmall()
Returns Small cluster ET.
static const int m_satSmall
bool isRoI()
Does this window pass the local ET maximum condition.
double phi()
Returns phi coordinate of RoI, using standard ATLAS convention.
int ETLarge()
Returns Large cluster ET.
JEMJetAlgorithm(double eta, double phi, const std::map< int, JetInput * > *jiContainer, const TrigConf::L1Menu *l1menu)
void passesTrigger()
Check trigger condition and set ET values if TOB created.
xAOD::JEMTobRoI * jemTobRoI()
Create JEMTobRoI and return pointers to it.
static const int m_satLarge
Algorithm parameters.
void setRoICoord(double eta, double phi)
Compute RoI coordinate.
void testEtMax(const std::vector< int > &cores)
Form all 2x2 clusters within window and test centre is a local ET maximum.
int ET8x8()
Returns 8x8 TT cluster ET.
int ET6x6()
Returns 6x6 TT cluster ET.
Coordinate getCentre(const double phi, const double eta)
returns the central coordinate of the JE which contains the passed coord
double dEta(const double phi, const double eta) const
return width of JE
Coordinate upperRight(const double phi, const double eta)
double dPhi(const double phi, const double eta) const
return height of JE
bool isFCAL(double eta) const
returns TRUE if this coordinate is in the FCAL
Coordinate upPhi(const double phi, const double eta)
returns coord of next JE in +ve phi dir.
static const double RegionERROREtaCentre
void makePrivateStore()
Create a new (empty) private store for this object.
virtual void initialize(const int crate, const int jem, const int frame, const int location, const int energyLarge, const int energySmall)
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
JEMTobRoI_v1 JEMTobRoI
Define the latest version of the JEMTobRoI class.