35 if (
m_debug) { std::cout <<
"TriggerTowerKey: m_debug output turned on...."<<std::endl; }
46 if (
m_debug) { std::cout <<
"TriggerTowerKey: m_debug output turned on...."<<std::endl; }
58 double phiBinWidth=((2*
M_PI)/64.0);
59 int iphi=iCoord->
phi();
60 int ieta=iCoord->
eta();
61 double centralPhi=0.0;
62 double centralEta=0.0;
63 int phiBin=0;
int etaBin=0;
64 int abs_ieta=abs(ieta);
65 int sign=ieta/abs_ieta;
68 std::cout <<
"TriggerTowerKey: start calcTrigBin"<<std::endl;
69 std::cout <<
"phi, eta : ("<<iCoord->
phi()<<
", "<<iCoord->
eta()<<
")"<<std::endl;
70 std::cout <<
"iphi, ieta : ("<<iphi<<
", "<<ieta<<
")"<<std::endl;
71 std::cout <<
"abs_ieta : ("<<abs_ieta<<
" and sign : "<<
sign<<std::endl;
81 centralEta=( (
static_cast<double>(abs_ieta)*0.1)-0.05)*
sign;
82 centralPhi=(iphi*phiBinWidth)+(phiBinWidth/2);
83 if (
m_debug) std::cout <<
"central : ("<<centralPhi<<
", "<<centralEta<<
")"<<std::endl;
86 if (abs_ieta>25 && abs_ieta<=32){
91 etaBin=( ( (abs_ieta-24) /2 )+25)*
sign;
100 centralPhi=(
static_cast<double>(phiBin)*2.0+1.0)*phiBinWidth;
103 centralEta=((
static_cast<double>(
static_cast<int>((abs_ieta-26)/2))*0.2)+2.6)*
sign;
106 centralEta=3.15*
sign;
113 double fcalEtaSize=0.425;
115 double abs_eta = iCoord->
dEta()*
sign;
116 double temp=
static_cast<double>(abs_eta-3.2);
117 temp = (temp/ fcalEtaSize );
118 int iTemp=
static_cast<int>(temp);
119 etaBin=(iTemp+32)*
sign;
123 centralEta=((
static_cast<double>(iTemp)*fcalEtaSize)+3.2+(fcalEtaSize/2))*
sign;
125 centralPhi=(
static_cast<double>(phiBin)*phiBinWidth*4)+(phiBinWidth*2);
128 if (
m_debug) std::cout <<
"central : /t("<<centralPhi<<
", "<<centralEta<<
")"<<std::endl;
144 return key(calocell.
phi(), calocell.
eta());
150 if (
m_debug) std::cout <<
"TTK: returning key for coords ("<<
phi<<
","<<
eta<<
")"<<std::endl;
159 double absEta=fabs(
coord.eta());
161 if ((absEta>=2.5)&&(absEta<3.1))
return TTEndCap1;
162 if ((absEta>=3.1)&&(absEta<3.2))
return TTEndCap2;
163 if ((absEta>=3.2)&&(absEta<=4.9))
return TTFCAL;
164 std::cerr <<
"TriggerTowerKey::region UNKNOWN REGION"
165 <<
"Coordinate is ("<<
coord.phi()<<
", "<<
coord.eta()<<
")"
176 if (reg==
TTFCAL)
return 0.425;
Data object for each calorimeter readout cell.
virtual double phi() const override final
get phi (through CaloDetDescrElement)
virtual double eta() const override final
get eta (through CaloDetDescrElement)
Used to pass data between the methods of the Key Classes: Returns the Eta and Phi bins,...
Coordinate class declaration.
Used by Key Classes, returns and integer coorginate for the bin Eta-Phi.
int phi() const
return phi
double dEta() const
return double eta
int eta() const
return eta
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.
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.
void setupThisKeyValues()
bool m_debug
turns DEBUG code on and off
double m_phi
phi coordinate of key
double m_eta
eta coordinate of key
virtual ~TriggerTowerKey()
TriggerTowerRegion region(const Coordinate &coord) const
returns the TT region that the coordinate corresponds to.
double dPhi(const Coordinate &coord) const
returns phi height of trigger tower at coordinate coord
double dEta(const Coordinate &coord) const
returns eta width of trigger tower at coordinate coord
TriggerTowerKey()
constructs a TriggerTowerKey object
virtual unsigned int ttKey(const TriggerTower &tower)
returns the key of the passed tower
BinAndCoord * calculateTriggerBin(ICoordinate *iCoord)
converts integer phi, eta coordinates to phi, eta trigger bins.
Trigger towers are the inputs to all other parts of the calorimeter trigger.
double phi() const
returns phi coord of tower
double eta() const
returns eta coord
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...