  | 
  
    ATLAS Offline Software
    
   | 
 
 
 
 
Go to the documentation of this file.
   15 #include "GaudiKernel/SystemOfUnits.h" 
   25   const double Dx = 0.5 * elt.
dx();
 
   26   const double Dy = 0.5 * elt.
dy();
 
   27   const double phi = elt.
phi();
 
   28   const double r = elt.
r();
 
   34   const double DrT = std::sqrt(dxsphi*dxsphi+dycphi*dycphi);
 
   36   const double inv_r = 1. / 
r;
 
   37   dphi = 2.*DrT * inv_r;
 
   40   double dr = std::sqrt(dxcphi*dxcphi+dysphi*dysphi);
 
   48   double f=elt.
z() * inv_r;
 
   49   double df  = elt.
z()*
dr*inv_r*inv_r;
 
   50   deta = 2.*std::abs(
df) /std::sqrt(
f*
f+1.);
 
   79   if(
m_cell->getEndcapIndex()==0)
 
   82   const double phi_loc = (
m_cell->getPhiLocalLower() + 
m_cell->getPhiLocalUpper())/2.;
 
   84   double x_loc, y_loc, z_loc, r_loc;
 
   99   m_x_raw = 
static_cast<float> (globalDefCoords.x());
 
  100   m_y_raw = 
static_cast<float> (globalDefCoords.y());
 
  101   m_z_raw = 
static_cast<float> (globalDefCoords.z());
 
  103   m_x = 
static_cast<float> (globalAbsCoords.x());
 
  104   m_y = 
static_cast<float> (globalAbsCoords.y());
 
  105   m_z = 
static_cast<float> (globalAbsCoords.z());
 
  107   const double r_raw= std::sqrt(globalDefCoords.x()*globalDefCoords.x()+globalDefCoords.y()*globalDefCoords.y());
 
  110   const double r = std::sqrt(globalAbsCoords.x()*globalAbsCoords.x()+globalAbsCoords.y()*globalAbsCoords.y());
 
  111   m_r=
static_cast<float>(
r);
 
  115     const double big_r = std::sqrt(globalAbsCoords.x()*globalAbsCoords.x()+globalAbsCoords.y()*globalAbsCoords.y()+globalAbsCoords.z()*globalAbsCoords.z());
 
  116     const double inv_big_r = 1. / big_r;
 
  117     const double inv_r = 1. / 
r;
 
  118     m_eta     = 
static_cast<float> (-
std::log((big_r-globalAbsCoords.z()) * inv_r));
 
  119     m_sinTh = 
static_cast<float> (
r * inv_big_r);
 
  120     m_cosTh = 
static_cast<float> (globalAbsCoords.z() * inv_big_r);
 
  121     m_cosPhi=globalAbsCoords.x() * inv_r;
 
  122     m_sinPhi=globalAbsCoords.y() * inv_r;
 
  129   m_phi_raw = 
static_cast<float> (std::atan2(globalDefCoords.y(),globalDefCoords.x()));
 
  130   m_phi = 
static_cast<float> (std::atan2(globalAbsCoords.y(),globalAbsCoords.x()));
 
  133   m_dphi = 
static_cast<float> (std::abs(
m_cell->getPhiLocalUpper() - 
m_cell->getPhiLocalLower()));
 
  164   , m_region(emecRegion)
 
  176   if(
m_cell->getEndcapIndex()==0)
 
  181   double x_loc, y_loc, z_loc, r_loc;
 
  186   if(
m_cell->getEndcapIndex()==0)
 
  208   m_x_raw = 
static_cast<float> (globalNomCoords.x());
 
  209   m_y_raw = 
static_cast<float> (globalNomCoords.y());
 
  210   m_z_raw = 
static_cast<float> (globalNomCoords.z());
 
  212   m_x = 
static_cast<float> (globalAbsCoords.x());
 
  213   m_y = 
static_cast<float> (globalAbsCoords.y());
 
  214   m_z = 
static_cast<float> (globalAbsCoords.z());
 
  217   const double r_raw= sqrt(globalNomCoords.x()*globalNomCoords.x()+globalNomCoords.y()*globalNomCoords.y());
 
  220   const double r = sqrt(globalAbsCoords.x()*globalAbsCoords.x()+globalAbsCoords.y()*globalAbsCoords.y());
 
  221   m_r=
static_cast<float>(
r);
 
  225     const double big_r = std::sqrt(globalAbsCoords.x()*globalAbsCoords.x()+globalAbsCoords.y()*globalAbsCoords.y()+globalAbsCoords.z()*globalAbsCoords.z());
 
  226     const double inv_big_r = 1. / big_r;
 
  227     const double inv_r = 1. /
r;
 
  228     m_eta     = 
static_cast<float> (-
log((big_r-globalAbsCoords.z()) * inv_r));
 
  229     m_sinTh = 
static_cast<float> (
r * inv_big_r);
 
  230     m_cosTh = 
static_cast<float> (globalAbsCoords.z() * inv_big_r);
 
  231     m_cosPhi=globalAbsCoords.x() * inv_r;
 
  232     m_sinPhi=globalAbsCoords.y() * inv_r;
 
  239   m_phi = 
static_cast<float> (std::atan2(globalAbsCoords.y(),globalAbsCoords.x()));
 
  242   m_dphi = 
static_cast<float> (std::abs(
m_cell->getPhiLocalLower() - 
m_cell->getPhiLocalUpper()));
 
  255   if(
m_cell->getEndcapIndex()==1)
 
  264     if(
m_cell->getPhiLocalLower()<0)
 
  288   , m_region(hecRegion)
 
  305   if(
m_cell->getEndcapIndex()==0)
 
  308   double x_loc, y_loc, z_loc, r_loc;
 
  317   if(
m_cell->getEndcapIndex()==0)
 
  336   m_x_raw = 
static_cast<float> (globalNomCoords.x());
 
  337   m_y_raw = 
static_cast<float> (globalNomCoords.y());
 
  338   m_z_raw = 
static_cast<float> (globalNomCoords.z());
 
  340   m_x = 
static_cast<float> (globalAbsCoords.x());
 
  341   m_y = 
static_cast<float> (globalAbsCoords.y());
 
  342   m_z = 
static_cast<float> (globalAbsCoords.z());
 
  345   const double r_raw= std::sqrt(globalNomCoords.x()*globalNomCoords.x()+globalNomCoords.y()*globalNomCoords.y());
 
  348   const double r = std::sqrt(globalAbsCoords.x()*globalAbsCoords.x()+globalAbsCoords.y()*globalAbsCoords.y());
 
  349   m_r=
static_cast<float>(
r);
 
  353     const double big_r = std::sqrt(globalAbsCoords.x()*globalAbsCoords.x()+globalAbsCoords.y()*globalAbsCoords.y()+globalAbsCoords.z()*globalAbsCoords.z());
 
  354     const double inv_r = 1. / 
r;
 
  355     const double inv_big_r = 1. / big_r;
 
  356     m_eta     = 
static_cast<float> (-
std::log((big_r-globalAbsCoords.z()) * inv_r));
 
  357     m_sinTh = 
static_cast<float> (
r * inv_big_r);
 
  358     m_cosTh = 
static_cast<float> (globalAbsCoords.z() * inv_big_r);
 
  359     m_cosPhi=globalAbsCoords.x() * inv_r;
 
  360     m_sinPhi=globalAbsCoords.y() * inv_r;
 
  367   m_phi = 
static_cast<float> (std::atan2(globalAbsCoords.y(),globalAbsCoords.x()));
 
  369   m_deta = 
static_cast<float> (
m_cell->getEtaMaxNominal() - 
m_cell->getEtaMinNominal());
 
  370   m_dphi = 
static_cast<float> (std::abs(
m_cell->getPhiLocalUpper() - 
m_cell->getPhiLocalLower()));
 
  383   if(
m_cell->getEndcapIndex()==1)
 
  392     if(
m_cell->getPhiLocalLower()<0)
 
  422   , m_module(fcalModule)
 
  451         std::cout<<
"Wrong FCAL module for TB, using FCAL1 !!!"<<std::endl;
 
  463   m_x_raw = 
static_cast<float> (globalDefCoords.x());
 
  464   m_y_raw = 
static_cast<float> (globalDefCoords.y());
 
  465   m_z_raw = 
static_cast<float> (globalDefCoords.z());
 
  467   m_x = 
static_cast<float> (globalAbsCoords.x());
 
  468   m_y = 
static_cast<float> (globalAbsCoords.y());
 
  469   m_z = 
static_cast<float> (globalAbsCoords.z());
 
  480   const double r = std::sqrt(globalAbsCoords.x()*globalAbsCoords.x()+globalAbsCoords.y()*globalAbsCoords.y());
 
  481   m_r=
static_cast<float>(
r);
 
  485     const double big_r = std::sqrt(globalAbsCoords.x()*globalAbsCoords.x()+globalAbsCoords.y()*globalAbsCoords.y()+globalAbsCoords.z()*globalAbsCoords.z());
 
  486     const double inv_big_r = 1. / big_r;
 
  487     const double inv_r = 1. / 
r;
 
  488     m_eta     = 
static_cast<float> (-
log((big_r-globalAbsCoords.z()) * inv_r));
 
  489     m_sinTh = 
static_cast<float> (
r * inv_big_r);
 
  490     m_cosTh = 
static_cast<float> (globalAbsCoords.z() * inv_big_r);
 
  491     m_cosPhi=globalAbsCoords.x() * inv_r;
 
  492     m_sinPhi=globalAbsCoords.y() * inv_r;
 
  499   m_phi_raw = 
static_cast<float> (std::atan2(globalDefCoords.y(),globalDefCoords.x()));
 
  500   m_phi = 
static_cast<float> (std::atan2(globalAbsCoords.y(),globalAbsCoords.x()));
 
  503   const double r_raw= sqrt(globalDefCoords.x()*globalDefCoords.x()+globalDefCoords.y()*globalDefCoords.y());
 
  508     const double big_r_raw = std::sqrt(globalDefCoords.x()*globalDefCoords.x()+globalDefCoords.y()*globalDefCoords.y()+globalDefCoords.z()*globalDefCoords.z());
 
  518   m_phi = 
static_cast<float> (std::atan2(globalAbsCoords.y(),globalAbsCoords.x()));
 
  519   m_phi_raw= 
static_cast<float> (std::atan2(globalDefCoords.y(),globalDefCoords.x()));
 
  548   m_r= 
static_cast<float> (
r);
 
  558   m_sinTh=
static_cast<float> (1/std::cosh(
eta));
 
  562   m_z = 
static_cast<float> (
r*std::sinh(
eta));
 
  613 (
const std::vector<const CaloDetDescrElement*>& fromelts)
 
  615   if (fromelts.empty())
 
  617   else if (fromelts.size() == 1)
 
  656   return StatusCode::SUCCESS;
 
  690   return StatusCode::SUCCESS;
 
  703 (
const std::vector<const CaloDetDescrElement*>& fromelts)
 
  705   bool is_barrel = (fromelts[0]->dr() > 0);
 
  707   double eta_raw_min =  99999;
 
  708   double eta_raw_max = -99999;
 
  709   double phi_raw_min =  99999;
 
  710   double phi_raw_max = -99999;
 
  711   double  rz_raw_min =  99999;
 
  712   double  rz_raw_max = -99999;
 
  723     double rz, rz_raw, drz;
 
  726       rz_raw = fromelt->r_raw();
 
  731       rz_raw = fromelt->z_raw();
 
  735     eta_raw_min = 
std::min (eta_raw_min,
 
  736                             (
double)fromelt->eta_raw() - fromelt->deta()/2);
 
  737     eta_raw_max = 
std::max (eta_raw_max,
 
  738                             (
double)fromelt->eta_raw() + fromelt->deta()/2);
 
  740     phi_raw_min = 
std::min (phi_raw_min,
 
  741                             (
double)fromelt->phi_raw() - fromelt->dphi()/2);
 
  742     phi_raw_max = 
std::max (phi_raw_max,
 
  743                             (
double)fromelt->phi_raw() + fromelt->dphi()/2);
 
  745     rz_raw_min = 
std::min (rz_raw_min, rz_raw - drz / 2);
 
  746     rz_raw_max = 
std::max (rz_raw_min, rz_raw + drz / 2);
 
  748     etasum  += fromelt->deta() * fromelt->eta();
 
  749     detasum += fromelt->deta();
 
  751     phisum  += fromelt->dphi() * fromelt->phi();
 
  752     dphisum += fromelt->dphi();
 
  757     volume += fromelt->volume();
 
  762   double eta_raw = (eta_raw_min + eta_raw_max) / 2;
 
  763   double phi_raw = (phi_raw_min + phi_raw_max) / 2;
 
  764   double rz_raw  = (rz_raw_min + rz_raw_max) / 2;
 
  766   m_deta = eta_raw_max - eta_raw_min;
 
  769   m_dphi = phi_raw_max - phi_raw_min;
 
  777   double eta = etasum / detasum;
 
  778   double phi = phisum / dphisum;
 
  794     m_dr = rz_raw_max - rz_raw_min;
 
  802     double z   = rzsum / drzsum;
 
  803     r = 
z / std::sinh(
eta);
 
  805     m_dz = rz_raw_max - rz_raw_min;
 
  820   return StatusCode::SUCCESS;
 
  833 (
const std::vector<const CaloDetDescrElement*>& fromelts)
 
  835   double x_raw_min =  99999;
 
  836   double x_raw_max = -99999;
 
  837   double y_raw_min =  99999;
 
  838   double y_raw_max = -99999;
 
  839   double z_raw_min =  99999;
 
  840   double z_raw_max = -99999;
 
  858                           (
double)fromelt->x_raw() - fromelt->dx()/2);
 
  860                           (
double)fromelt->x_raw() + fromelt->dx()/2);
 
  863                           (
double)fromelt->y_raw() - fromelt->dy()/2);
 
  865                           (
double)fromelt->y_raw() + fromelt->dy()/2);
 
  868                           (
double)fromelt->z_raw() - fromelt->dz()/2);
 
  870                           (
double)fromelt->z_raw() + fromelt->dz()/2);
 
  873     xsum  += fromelt->dx() * fromelt->x();
 
  874     dxsum += fromelt->dx();
 
  876     ysum  += fromelt->dy() * fromelt->y();
 
  877     dysum += fromelt->dy();
 
  879     zsum  += fromelt->dz() * fromelt->z();
 
  880     dzsum += fromelt->dz();
 
  883     volume += fromelt->volume();
 
  888   double x_raw = (x_raw_min + x_raw_max) / 2;
 
  889   double y_raw = (y_raw_min + y_raw_max) / 2;
 
  890   double z_raw = (z_raw_min + z_raw_max) / 2;
 
  900   m_dx = x_raw_max - x_raw_min;
 
  901   m_dy = y_raw_max - y_raw_min;
 
  902   m_dz = z_raw_max - z_raw_min;
 
  905   double x = xsum / dxsum;
 
  906   double y = ysum / dysum;
 
  907   double z = zsum / dzsum;
 
  909   double x = 
m_x_raw + fromelts[0]->x() - fromelts[0]->x_raw();
 
  910   double y = 
m_y_raw + fromelts[0]->y() - fromelts[0]->y_raw();
 
  911   double z = 
m_z_raw + fromelts[0]->z() - fromelts[0]->z_raw();
 
  921   const double r = hypot (
x, 
y);
 
  922   const double inv_r = 1. / 
r;
 
  927   const double big_r = std::sqrt (
x*
x + 
y*
y + 
z*
z);
 
  929   const double inv_big_r = 1. / big_r;
 
  943   return StatusCode::SUCCESS;
 
  960   m_r= 
static_cast<float> (
r);
 
  974   m_sinTh=
static_cast<float> (1/std::cosh(
eta));
 
  978   m_z = 
static_cast<float> (
r*std::sinh(
eta));
 
 1018   m_dr= 
static_cast<float> (
dr); 
 
  
float deta() const
cell deta
 
float cosPhi() const
for fast px py pz computation
 
Ensure that the extensions for the Vector3D are properly loaded.
 
double getY() const
Gets the Y position of the Tile.
 
GeoIntrusivePtr< const HECCell > HECCellConstLink
@Class: HECCellConstLink
 
void propagateRaw()
In test beam configurations force XXX=XXX_RAW.
 
float m_cosTh
this one is cached for algorithm working in transverse Energy
 
float m_dphi
cylindric coordinates : delta phi
 
float m_z_raw
cartesian coordinates : Z raw
 
Smart Pointer to EMEC Cells. This reference counted link allocates on demand. It audits the total poi...
 
void init_description(bool isTestBeam, const GeoAlignmentStore *geoAlignStore, const CaloElementPositionShift *posShift)
initialize base description
 
Scalar phi() const
phi method
 
StatusCode updateNull()
Set this element's geometry to default values.
 
TileDetectorElement(const IdentifierHash subcaloHash, const IdentifierHash onl1, const IdentifierHash onl2, const CaloDetDescriptor *descriptor)
Constructor, takes all necessary parameters for the base class constructor.
 
virtual int getLayer() const override
get layer
 
virtual int getLayer() const override
get layer
 
virtual int getLayer() const override
get layer
 
MbtsDetectorElement()
Constructor, initializes base class constructor parameters with default values.
 
Scalar eta() const
pseudorapidity method
 
const Amg::Transform3D & getDefAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
 
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
 
dx,dy,dz displacement of the calorimeter cell caused by sagging
 
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
 
float m_eta_raw
cylindric coordinates : eta_raw
 
StatusCode updateBE(const std::vector< const CaloDetDescrElement * > &fromelts)
Update this element's geometry from a list of elements.
 
StatusCode updateSingle(const CaloDetDescrElement *fromelt)
Copy this element's geometry from the given offline element.
 
float m_volume
cell volume
 
const FCALModule * m_module
FCAL Module description from LArReadoutGeometry.
 
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index.
 
const EMBDetectorRegion * m_region
EMB Region description from LArReadoutGeometry.
 
float m_sinPhi
cache to allow fast px py pz computation
 
float m_phi_raw
cylindric coordinates : phi_raw
 
double getX() const
Gets the X Position of the Tile.
 
double getProjectivityDisplacement() const
 
float m_phi
cylindric coordinates : phi
 
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
 
float m_dr
cylindric coordinates : delta r
 
float m_dz
cartesian coordinates : delta Z
 
void set_cylindric_raw(double eta_raw, double phi_raw, double r_raw)
set raw cylindric coordinates
 
GeoIntrusivePtr< const EMBCell > EMBCellConstLink
 
float eta_raw() const
cell eta_raw
 
float m_z
cartesian coordinates : Z
 
CaloCell_ID::SUBCALO getSubCalo() const
cell subcalo
 
A tile of the forward calorimeter readout geometry.
 
float m_dy
cartesian coordinates : delta Y
 
double getProjectivityDisplacement() const
 
StatusCode updateFCAL(const std::vector< const CaloDetDescrElement * > &fromelts)
Update this element's geometry from a list of elements.
 
EMECCellConstLink m_cell
EMEC Cell description from LArReadoutGeometry.
 
const HECDetectorRegion * m_region
HEC Region description from LArReadoutGeometry.
 
void init_description(bool isTestBeam, const GeoAlignmentStore *geoAlignStore, const CaloElementPositionShift *posShift)
initialize base description
 
float m_y_raw
cartesian coordinates : Y raw
 
Description of a region of homogenous granularity in the hadronic endcap calorimeter.
 
float m_x_raw
cartesian coordinates : X raw
 
HECCellConstLink m_cell
HEC Cell description from LArReadoutGeometry.
 
::StatusCode StatusCode
StatusCode definition for legacy code.
 
double getFullDepthZ(const FCALTile &) const
Gets Tile (full) Depth.
 
const Amg::Transform3D & getDefAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
 
EMBCellConstLink m_cell
EMB Cell description from LArReadoutGeometry.
 
EMBDetectorElement()=delete
default constructor hidden
 
float m_r_raw
cylindric coordinates : r_raw
 
Eigen::Affine3d Transform3D
 
float m_dx
cartesian coordinates : delta X
 
float m_r
cylindric coordinates : r
 
virtual int getLayer() const override
get layer
 
void init_interpretation()
Fill all missing fields of CaloDetDescrElement which have not been filled by init_description()
 
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
 
double getFullWidthX(const FCALTile &tile) const
Gets Tile Full Width in X.
 
CaloPhiRange class declaration.
 
void set_cylindric_raw(double eta_raw, double phi_raw, double r_raw)
set raw cylindric coordinates
 
void set_cylindric(double eta, double phi, double r)
set cylindric coordinates
 
const FCALTile * m_tile
FCAL Tile description from LArReadoutGeometry.
 
DummyDetDescrElement(const IdentifierHash subcaloHash, const IdentifierHash onl1, const IdentifierHash onl2, const CaloDetDescriptor *descriptor)
Constructor, takes all necessary parameters for the base class constructor.
 
void set_cylindric(double eta, double phi, double r)
set cylindric coordinates
 
const EMECDetectorRegion * m_region
EMEC Region description from LArReadoutGeometry.
 
FCALModule::Module getModuleIndex() const
Returns the Module (1,2, or 3)
 
virtual Identifier customID() const
 
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
 
void init_interpretation()
Fill all missing fields of CaloDetDescrElement which have not been filled by init_description()
 
float m_cosPhi
cache to allow fast px py pz computation
 
float volume() const
cell volume
 
double getProjectivityDisplacement() const
 
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index.
 
float x_raw() const
cell x_raw
 
float z_raw() const
cell z_raw
 
Eigen::Matrix< double, 3, 1 > Vector3D
 
const Amg::Transform3D & getDefAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
 
void set_cylindric_size(double deta, double dphi, double dr)
set cylindric size deta/dphi/dr
 
FCALModule::Endcap getEndcapIndex() const
Returns the side (O=Negative, 1=Positive)
 
float r_raw() const
cell r_raw
 
float m_x
cartesian coordinates : X
 
float dphi() const
cell dphi
 
StatusCode update(const std::vector< const CaloDetDescrElement * > &fromelts)
Update this element's geometry from the given list of offline elements.
 
HECDetectorElement()=delete
default constructor hidden
 
double getFullWidthY(const FCALTile &tile) const
Gets Tile Full Width in Y.
 
This is a base class for LAr and Tile Descriptors The primary goal is to speed up loops over all the ...
 
df
printing table to screen
 
float cosTh() const
for fast px py pz computation
 
Eigen::Translation< double, 3 > Translation3D
 
const Amg::Transform3D & getDefAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
 
EMECDetectorElement()=delete
default constructor hidden
 
float m_y
cartesian coordinates : Y
 
float eta() const
cell eta
 
float phi() const
cell phi
 
float sinTh() const
for algorithm working in transverse Energy
 
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
 
float y_raw() const
cell y_raw
 
float sinPhi() const
for fast px py pz computation
 
float m_deta
cylindric coordinates : delta eta
 
float m_eta
cylindric coordinates : eta
 
void init_description(bool isTestBeam, const GeoAlignmentStore *geoAlignStore, const CaloElementPositionShift *posShift)
initialize base description
 
FCALDetectorElement()=delete
default constructor hidden
 
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index (0-3)
 
void init_description(const GeoAlignmentStore *geoAlignStore, const CaloElementPositionShift *posShift)
initialize base description
 
Calo Subsystem specific Detector Elements + Dummy element for testing.
 
float m_sinTh
this one is cached for algorithm working in transverse Energy
 
float phi_raw() const
cell phi_raw