|
ATLAS Offline Software
|
Go to the documentation of this file.
37 if (m_debugModuleKey) std::cout <<
"JetEnergyModuleKey: m_debugModuleKey output turned on...."<<std::endl;
40 JetEnergyModuleKey::~JetEnergyModuleKey(){
44 unsigned int JetEnergyModuleKey::jemKey(
const xAOD::JetElement* jetElement) {
51 unsigned int JetEnergyModuleKey::jemKey(
unsigned int crate,
unsigned int module) {
52 double eta = ((
module%8)+0.5)*TrigT1CaloDefs::jemEtaSize - 3.2;
53 int quadrant = crate + ((
module>7) ? 2 : 0);
54 double phi = (quadrant+0.5)*TrigT1CaloDefs::jemPhiSize;
59 std::vector<unsigned int> JetEnergyModuleKey::jeKeys(
unsigned int crate,
unsigned int module) {
60 std::vector<unsigned int>
keys;
66 std::vector<Coordinate> coords = jeCoords(crate,
module);
79 std::vector<Coordinate> JetEnergyModuleKey::jeCoords(
unsigned int crate,
unsigned int module) {
80 std::vector<Coordinate> coords;
83 if (crate > 1 ||
module > 15)
return coords;
92 double phiStart = crate*TrigT1CaloDefs::jemPhiSize
93 + 2.*
top*TrigT1CaloDefs::jemPhiSize
94 + 0.5*TrigT1CaloDefs::Region0Height;
98 etaStart = (
module%8)*TrigT1CaloDefs::jemEtaSize - 3.1;
102 etaStart = -TrigT1CaloDefs::Region5EtaCentre;
106 Coordinate startCol(phiStart, etaStart);
109 JetElementKey
get(0.,0.);
110 while (cth.jepModule( startCol ) ==
module) {
111 Coordinate
next =
get.getCentre(startCol);
112 while (cth.jepCrate(
next ) == crate) {
113 coords.push_back(
next);
116 startCol =
get.rightEta(startCol);
117 if (startCol.eta() == TrigT1CaloDefs::RegionERROREtaCentre)
break;
128 unsigned int rowsPerJEM = 8
u;
129 int rowNum=
static_cast<int>(
phi/rowHeight);
130 rowNum=rowNum%rowsPerJEM;
153 std::cerr <<
"ERROR!!! JetEnergyModuleKey::rowPhiCoord exceeds allowed range. Row, "<<rowNum
154 <<
" will be set to zero"<<std::endl;
158 phi+=
static_cast<double>( rowNum )*0.2+0.1;
160 if (m_debugModuleKey){
161 if ( (phi<(jemCoord.
phi()-0.8))||(phi>(jemCoord.
phi()+0.8) ) ){
162 std::cerr <<
"ERROR!!! JetEnergyModuleKey::rowPhiCoord phi of row is "<<phi
163 <<
" in a JEM at ("<<jemCoord.
phi()<<
", "<<jemCoord.
eta()<<
")"<<std::endl;
192 std::cerr <<
"JetEnergyModuleKey::region ... Unknown region!"<<std::endl
202 unsigned int iPhiSize=16 ;
205 etaBin=sharpRound2(iCoord->
eta(),iEtaSize);
215 switch (region(
coord)){
217 return midJEMEtaCol(
coord);
219 return leftEndJEMEtaCol(
coord);
221 return rightEndJEMEtaCol(
coord);
223 std::cerr <<
"JetEnergyModuleKey::etaColumn UNKNOWN REGION"<<std::endl;
225 return static_cast<unsigned int>(JEMRegionERROR);
230 double min=3.2;
double jemEtaWidth=0.8;
231 unsigned int crateModifier=(phiQuadrant(
coord.phi())/2);
234 double temp = (
coord.eta()+
min)/jemEtaWidth;
235 int jem =
static_cast<int>(temp);
236 jem=(jem < 0 ? 0 : jem);
237 jem=(jem > 7 ? 7 : jem);
239 jem+=(8*crateModifier);
240 return static_cast<unsigned int>(jem);
248 int abs_ieta=abs(iCoord->
eta() );
249 int sign=( iCoord->
eta() )/abs_ieta;
256 double centralEta=0.0;
261 centralEta=3.65*
sign;
263 if (m_debugModuleKey){
264 std::cout <<
"JetEnergyModuleKey: start calcTrigBin"<<std::endl;
265 std::cout <<
"phi, eta : ("<<m_phi<<
", "<<m_eta<<
")"<<std::endl;
266 std::cout <<
"iphi, ieta : ("<<( iCoord->
phi() )<<
", "<<( iCoord->
eta() )<<
")"<<std::endl;
267 std::cout <<
"abs_ieta : ("<<abs_ieta<<
" and sign : "<<
sign<<std::endl;
268 std::cout <<
"central : ("<<centralPhi<<
", "<<centralEta<<
")"
273 if (m_debugModuleKey) std::cout <<
" JetEnergyModuleKey : created coord "<<(*centralCoords)<<std::endl;
280 double JEMEtaSize=0.8;
286 int colNum=sharpRound(temp);
288 colNum=(colNum < 0 ? 0 : colNum);
289 colNum=(colNum > 3 ? 3 : colNum);
317 return static_cast<unsigned int>(JEMRegionERROR);
344 return static_cast<unsigned int>(JEMRegionERROR);
355 double temp = phi/(
M_PI/2);
356 unsigned int quad =
static_cast<unsigned int>(temp);
359 return static_cast<unsigned int>(
quad);
virtual double phi() const
returns phi coordinate of centre of relevant trigger tower.
double dPhi(const Coordinate &coord) const
height
double phi() const
return phi
Scalar phi() const
phi method
double rowPhiCoord(unsigned int row, const Coordinate &jemCoord)
returns the phi coord of the row of the JEM at the coordinates passed
Scalar eta() const
pseudorapidity method
Description of JetElement_v2.
static const double jemEtaSize
void setBins(ICoordinate *iCoord, unsigned int &phiBin, int &etaBin)
sets the eta and phi bins
unsigned int phiQuadrant(const double phi) const
returns the quadrant number associated with the phi coordinate, 0 - 90 = 0 90 - 180 = 1 180-270 = 2 2...
unsigned int col(const Coordinate &coord)
return row of passed coordinate
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
@ u
Enums for curvilinear frames.
Used by Key Classes, returns and integer coorginate for the bin Eta-Phi.
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap etaBin
Coordinate coord() const
return central coords of current key value.
Coordinate class declaration.
unsigned int leftEndJEMEtaCol(const Coordinate &coord) const
returns eta row of JEMs 0, or 8
unsigned int jem(const Coordinate &coord) const
returns ID of JEP module (i.e.
unsigned int rightEndJEMEtaCol(const Coordinate &coord) const
returns eta row of JEMs 7 or 15
JetEnergyModuleKey()
constructs a JetEnergyModuleKey object
Used to pass data between the methods of the Key Classes: Returns the Eta and Phi bins,...
int phi() const
return phi
The JetElementKey object provides the key for each JetElement depending on its eta,...
BinAndCoord * calculateTriggerBin(ICoordinate *iCoord)
converts integer phi, eta coordinates to phi, eta trigger bins, and central coords
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setPhiMap phiBin
double dEta(const Coordinate &coord) const
width
JEMRegion region(const Coordinate &coord) const
region
double eta() const
return eta
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
bool absEta(const xAOD::TauJet &tau, double &out)
int eta() const
return eta
float phi() const
get phi (note that for L1Calo phi runs from 0 to 2pi)
unsigned int row(const Coordinate &coord) const
returns the phi row of a coord within the JEM that contains it.
static const double jemPhiSize
unsigned int midJEMEtaCol(const Coordinate &coord) const
No descriptions.