ATLAS Offline Software
|
This is a base class for LAr and Tile Descriptors The primary goal is to speed up loops over all the calo cells and reduce the size of the CaloDetDescrElements by caching information they have in common. More...
#include <CaloDetDescriptor.h>
Public Member Functions | |
CaloDetDescriptor (const Identifier &id, const AtlasDetectorID *helper, const CaloCell_Base_ID *calo_helper, CaloCell_ID::CaloSample sample=CaloCell_ID::Unknown, int layer=CaloCell_ID::NOT_VALID) | |
Constructor. More... | |
virtual | ~CaloDetDescriptor () |
virtual detructor More... | |
virtual void | print () const |
print the contents More... | |
void | dump (std::ostream &os) const |
dump contents to a stream. More... | |
void | set_n_calo_depth (int n_calo_depth) |
set number of calo depths More... | |
void | set_depth_in (std::vector< double > &calo_depth) |
set vector of in depths More... | |
void | set_depth_out (std::vector< double > &calo_depth) |
set vector of out depths More... | |
bool | is_lar_em () const |
descriptor belongs to EM calorimeter More... | |
bool | is_lar_em_barrel () const |
descriptor belongs to EM barrel More... | |
bool | is_lar_em_endcap () const |
descriptor belongs to EM end cap More... | |
bool | is_lar_em_endcap_inner () const |
descriptor belongs to the inner wheel of EM end cap More... | |
bool | is_lar_em_endcap_outer () const |
descriptor belongs to the outer wheel of EM end cap More... | |
bool | is_lar_hec () const |
descriptor belongs to HEC More... | |
bool | is_lar_fcal () const |
descriptor belongs to FCAL More... | |
bool | is_tile () const |
descriptor belongs to Tile More... | |
CaloCell_ID::CaloSample | getSampling (IdentifierHash onecalo_hash) const |
get sampling More... | |
CaloCell_ID::CaloSample | getSampling () const |
get sampling returns the cached CaloSample, if the descriptor contains more than one sampling, it only returns the first sampling. More... | |
CaloCell_ID::SUBCALO | getSubCalo () const |
get subcalo More... | |
Identifier | identify () const override final |
get region identifier More... | |
IdentifierHash | identifyHash () const override final |
get hash identifier for the region More... | |
IdentifierHash | calo_hash () const |
get calo hash More... | |
IdentifierHash | subcalo_hash () const |
get subcalo hash More... | |
const CaloCell_Base_ID * | get_calo_helper () const |
get Calo Cell ID helper More... | |
int | layer () const |
get layer More... | |
IdentifierHash | caloCellMin () const |
minimal hash identifier for calo cells in the region More... | |
int | calo_sign () const |
'ideal' geometry: calo sign More... | |
double | calo_z_min () const |
'ideal' geometry: z minimal More... | |
double | calo_z_max () const |
'ideal' geometry: z maximal More... | |
double | calo_eta_min () const |
'ideal' geometry: eta minimal More... | |
double | calo_eta_max () const |
'ideal' geometry: eta maximal More... | |
double | calo_phi_min () const |
'ideal' geometry: phi minimal More... | |
double | calo_phi_max () const |
'ideal' geometry: phi maximal More... | |
double | calo_r_min () const |
'ideal' geometry: r minimal More... | |
double | calo_r_max () const |
'ideal' geometry: r maximal More... | |
int | n_calo_depth () const |
number of calo depths More... | |
void | get_depth_in (std::vector< double > &calo_depth) const |
get vector of in depths More... | |
void | get_depth_out (std::vector< double > &calo_depth) const |
get vector of out depths More... | |
double | deta () const |
delta eta More... | |
double | dphi () const |
delta phi More... | |
int | n_eta () const |
eta granularity More... | |
int | n_phi () const |
phi granularity More... | |
bool | get_cylinder_surface (Amg::Transform3D &htrans, double &radius, double &hphi, double &hlength, double &depth) const |
this will be the closest radius of this region More... | |
bool | get_disk_surface (Amg::Transform3D &htrans, double &z, double &rmin, double &rmax, double &hphisec, double &depth) const |
(for Trk::Surface) More... | |
bool | is_in (double eta_min, double eta_max, double phi_min, double phi_max) const |
check overlap with a given zone in eta and phi (for LAr only) More... | |
int | eta_channel (double eta) const |
channel number for a given eta/phi (if outside returns -1). More... | |
int | phi_channel (double phi) const |
channel number for a given eta/phi (if outside returns -1) Should not be used for FCAL More... | |
int | eta_channel_raw (double eta) const |
channel number for a given eta/phi raw (if outside returns -1). More... | |
int | phi_channel_raw (double phi) const |
channel number for a given eta/phi raw (if outside returns -1) Should not be used for FCAL More... | |
double | reg_min () const |
eta min and max once misaligned More... | |
double | reg_max () const |
eta min and max once misaligned More... | |
double | lar_eta_min () const |
minimal Eta for LAr region More... | |
double | lar_phi_min () const |
minimal Phi for LAr region More... | |
void | setCaloEtaMin (double eta_min) |
Set Eta Min. More... | |
void | setCaloEtaMax (double eta_max) |
Set Eta Max. More... | |
void | setCaloPhiMin (double phi_min) |
Set Phi Min. More... | |
void | setCaloPhiMax (double phi_max) |
Set Phi Max. More... | |
void | setCaloZMin (double z_min) |
Set Z Min. More... | |
void | setCaloZMax (double z_max) |
Set Z Max. More... | |
void | setCaloRMin (double r_min) |
Set R Min. More... | |
void | setCaloRMax (double r_max) |
Set R Max. More... | |
void | setLArRegMin (double reg_min) |
Set LAr Region Eta Min. More... | |
void | setLArRegMax (double reg_max) |
Set LAr Region Eta Max. More... | |
void | setLArPhiMin (double phi_min) |
Set LAr Region Phi Min. More... | |
void | setLArEtaMin (double eta_min) |
Set LAr Region Phi Max. More... | |
void | set_eta_phi_granularity (int neta, double deta, int nphi, double dphi) |
Set Phi granularity. More... | |
const Amg::Transform3D & | transform () const |
Get the current transformation matrix. More... | |
void | set_transform (const Amg::Transform3D &transform) |
Set the transformation matrix. More... | |
virtual const IdHelper * | getHelper () const |
Protected Attributes | |
double | m_calo_eta_min |
minimal Eta (to be defined in the derived classes) More... | |
double | m_calo_eta_max |
maximal Eta (to be defined in the derived classes) More... | |
double | m_calo_phi_min |
minimal Phi (to be defined in the derived classes) More... | |
double | m_calo_phi_max |
maximal Phi (to be defined in the derived classes) More... | |
double | m_calo_r_min |
minimal R (to be defined in the derived classes) More... | |
double | m_calo_r_max |
maximal R (to be defined in the derived classes) More... | |
double | m_calo_z_min |
minimal Z (to be defined in the derived classes) More... | |
double | m_calo_z_max |
maximal Z (to be defined in the derived classes) More... | |
int | m_n_calo_depth |
number of depths More... | |
std::vector< double > | m_calo_depth_in |
in depths More... | |
std::vector< double > | m_calo_depth_out |
out depths More... | |
Amg::Transform3D | m_transform |
misalignment transformation More... | |
double | m_lar_reg_min |
minimal Abs Eta for LAr region More... | |
double | m_lar_reg_max |
maximal Abs Eta for LAr region More... | |
double | m_lar_phi_min |
minimal Phi for LAr region More... | |
double | m_lar_eta_min |
minimal Eta for LAr region More... | |
int | m_etachan_min |
minimal Eta channel number More... | |
Private Attributes | |
const AtlasDetectorID * | m_helper |
Atlas Detector ID helper. More... | |
const CaloCell_Base_ID * | m_calo_helper |
Calo Cell ID helper. More... | |
Identifier | m_id |
Region identifier. More... | |
bool | m_is_lar_em |
descriptor belongs to EM calorimeter More... | |
bool | m_is_lar_em_barrel |
descriptor belongs to EM barrel More... | |
bool | m_is_lar_em_endcap |
descriptor belongs to EM end cap More... | |
bool | m_is_lar_em_endcap_inner |
descriptor belongs to the inner wheel of EM end cap More... | |
bool | m_is_lar_em_endcap_outer |
descriptor belongs to the outer wheel of EM end cap More... | |
bool | m_is_lar_hec |
descriptor belongs to HEC More... | |
bool | m_is_lar_fcal |
descriptor belongs to FCAL More... | |
bool | m_is_tile |
descriptor belongs to Tile More... | |
int | m_calo_sign |
calo sign More... | |
int | m_layer |
layer More... | |
CaloCell_ID::CaloSample | m_calo_sampl |
Calo Sample. More... | |
CaloCell_ID::SUBCALO | m_calo_num |
Subcalo. More... | |
IdentifierHash | m_calocell_min |
minimal hash id of region cells More... | |
double | m_lar_deta |
delta eta (LAr) More... | |
double | m_lar_dphi |
delta phi (LAr) More... | |
int | m_lar_n_eta |
eta granularity (LAr) More... | |
int | m_lar_n_phi |
phi granularity (LAr) More... | |
This is a base class for LAr and Tile Descriptors The primary goal is to speed up loops over all the calo cells and reduce the size of the CaloDetDescrElements by caching information they have in common.
There is 1 Descriptor per region of homogeneous grannularity.
1) Phi convention :
The calorimeter convention is to start cell counting at phi=0 and increment up to 2pi ==> the old 0 to 2pi convention is kept internally to Descriptors, and official Atlas one (pi,pi) applied to the CaloDetDescrElements and all methods concerning channels.
2) Data members :
All the m_calo_xxx numbers are "ideal", i.e. correspond to a HepGeom::Transform3D(0.,0.,0.,0.,0.,0.) and are NOT recalculated when a different one is set.
WARNING : eta is always>0 and one has to multiply it by calo_sign()
3) Coordinate systems : we (unfortunately) need 3 on them !!!
cylindric for EMB: eta,phi,cylinder-radius
ec_cylindric for EMEC and HEC: eta, phi, z cartesian for FCAL: x,y,z
Coordinates are kept coherent: set_cylindric re-computes the cartesian coordinates and vice-versa.
Definition at line 57 of file CaloDetDescriptor.h.
CaloDetDescriptor::CaloDetDescriptor | ( | const Identifier & | id, |
const AtlasDetectorID * | helper, | ||
const CaloCell_Base_ID * | calo_helper, | ||
CaloCell_ID::CaloSample | sample = CaloCell_ID::Unknown , |
||
int | layer = CaloCell_ID::NOT_VALID |
||
) |
Constructor.
id | {IN] region identifier |
helper | [IN] Atlas Detector ID helper |
calo_helper | [IN] Calo Cell ID helper |
sample | [IN] sample |
layer | [IN] layer |
Definition at line 12 of file CaloDetDescriptor.cxx.
|
virtualdefault |
virtual detructor
|
inline |
'ideal' geometry: eta maximal
Definition at line 563 of file CaloDetDescriptor.h.
|
inline |
'ideal' geometry: eta minimal
Definition at line 558 of file CaloDetDescriptor.h.
|
inline |
get calo hash
Definition at line 512 of file CaloDetDescriptor.h.
|
inline |
'ideal' geometry: phi maximal
Definition at line 573 of file CaloDetDescriptor.h.
|
inline |
'ideal' geometry: phi minimal
Definition at line 568 of file CaloDetDescriptor.h.
|
inline |
'ideal' geometry: r maximal
Definition at line 583 of file CaloDetDescriptor.h.
|
inline |
'ideal' geometry: r minimal
Definition at line 578 of file CaloDetDescriptor.h.
|
inline |
'ideal' geometry: calo sign
Definition at line 543 of file CaloDetDescriptor.h.
|
inline |
'ideal' geometry: z maximal
Definition at line 553 of file CaloDetDescriptor.h.
|
inline |
'ideal' geometry: z minimal
Definition at line 548 of file CaloDetDescriptor.h.
|
inline |
minimal hash identifier for calo cells in the region
Definition at line 538 of file CaloDetDescriptor.h.
|
inline |
|
inline |
void CaloDetDescriptor::dump | ( | std::ostream & | os | ) | const |
int CaloDetDescriptor::eta_channel | ( | double | eta | ) | const |
channel number for a given eta/phi (if outside returns -1).
Should not be used for FCAL
Definition at line 260 of file CaloDetDescriptor.cxx.
int CaloDetDescriptor::eta_channel_raw | ( | double | eta | ) | const |
channel number for a given eta/phi raw (if outside returns -1).
Should not be used for FCAL
Definition at line 290 of file CaloDetDescriptor.cxx.
|
inline |
get Calo Cell ID helper
Definition at line 523 of file CaloDetDescriptor.h.
bool CaloDetDescriptor::get_cylinder_surface | ( | Amg::Transform3D & | htrans, |
double & | radius, | ||
double & | hphi, | ||
double & | hlength, | ||
double & | depth | ||
) | const |
this will be the closest radius of this region
this will be the closest radius of this region (for Trk::Surface)
Definition at line 199 of file CaloDetDescriptor.cxx.
void CaloDetDescriptor::get_depth_in | ( | std::vector< double > & | calo_depth | ) | const |
get vector of in depths
calo_depth | [OUT] vector of in depths |
Definition at line 325 of file CaloDetDescriptor.cxx.
void CaloDetDescriptor::get_depth_out | ( | std::vector< double > & | calo_depth | ) | const |
get vector of out depths
calo_depth | [OUT] vector of out depths |
Definition at line 332 of file CaloDetDescriptor.cxx.
bool CaloDetDescriptor::get_disk_surface | ( | Amg::Transform3D & | htrans, |
double & | z, | ||
double & | rmin, | ||
double & | rmax, | ||
double & | hphisec, | ||
double & | depth | ||
) | const |
Definition at line 18 of file Identifiable.cxx.
|
inline |
get sampling returns the cached CaloSample, if the descriptor contains more than one sampling, it only returns the first sampling.
Definition at line 134 of file CaloDetDescriptor.h.
CaloCell_ID::CaloSample CaloDetDescriptor::getSampling | ( | IdentifierHash | onecalo_hash | ) | const |
get sampling
onecalo_hash | [IN] hash identifier if the descriptor contains more than one sampling, add offset calculated from hash id. |
Definition at line 185 of file CaloDetDescriptor.cxx.
|
inline |
|
inlinefinaloverridevirtual |
|
inlinefinaloverridevirtual |
get hash identifier for the region
Reimplemented from Identifiable.
Definition at line 506 of file CaloDetDescriptor.h.
bool CaloDetDescriptor::is_in | ( | double | eta_min, |
double | eta_max, | ||
double | phi_min, | ||
double | phi_max | ||
) | const |
check overlap with a given zone in eta and phi (for LAr only)
eta_min | [IN] lower eta boundary of the zone |
eta_max | [IN] higher eta boundary of the zone |
phi_min | [IN] lower phi boundary of the zone |
phi_max | [IN] higher phi boundary of the zone |
Definition at line 250 of file CaloDetDescriptor.cxx.
|
inline |
descriptor belongs to EM calorimeter
Definition at line 461 of file CaloDetDescriptor.h.
|
inline |
descriptor belongs to EM barrel
Definition at line 466 of file CaloDetDescriptor.h.
|
inline |
descriptor belongs to EM end cap
Definition at line 471 of file CaloDetDescriptor.h.
|
inline |
descriptor belongs to the inner wheel of EM end cap
Definition at line 476 of file CaloDetDescriptor.h.
|
inline |
descriptor belongs to the outer wheel of EM end cap
Definition at line 481 of file CaloDetDescriptor.h.
|
inline |
descriptor belongs to FCAL
Definition at line 491 of file CaloDetDescriptor.h.
|
inline |
descriptor belongs to HEC
Definition at line 486 of file CaloDetDescriptor.h.
|
inline |
descriptor belongs to Tile
Definition at line 496 of file CaloDetDescriptor.h.
|
inline |
minimal Eta for LAr region
Definition at line 618 of file CaloDetDescriptor.h.
|
inline |
minimal Phi for LAr region
Definition at line 623 of file CaloDetDescriptor.h.
|
inline |
int CaloDetDescriptor::n_calo_depth | ( | ) | const |
|
inline |
eta granularity
Definition at line 598 of file CaloDetDescriptor.h.
|
inline |
phi granularity
Definition at line 603 of file CaloDetDescriptor.h.
int CaloDetDescriptor::phi_channel | ( | double | phi | ) | const |
channel number for a given eta/phi (if outside returns -1) Should not be used for FCAL
Definition at line 275 of file CaloDetDescriptor.cxx.
int CaloDetDescriptor::phi_channel_raw | ( | double | phi | ) | const |
channel number for a given eta/phi raw (if outside returns -1) Should not be used for FCAL
Definition at line 305 of file CaloDetDescriptor.cxx.
|
virtual |
print the contents
Definition at line 111 of file CaloDetDescriptor.cxx.
|
inline |
eta min and max once misaligned
Definition at line 613 of file CaloDetDescriptor.h.
|
inline |
eta min and max once misaligned
Definition at line 608 of file CaloDetDescriptor.h.
void CaloDetDescriptor::set_depth_in | ( | std::vector< double > & | calo_depth | ) |
set vector of in depths
calo_depth | [IN] vector of in depths |
Definition at line 347 of file CaloDetDescriptor.cxx.
void CaloDetDescriptor::set_depth_out | ( | std::vector< double > & | calo_depth | ) |
set vector of out depths
calo_depth | [IN] vector of out depths |
Definition at line 353 of file CaloDetDescriptor.cxx.
void CaloDetDescriptor::set_eta_phi_granularity | ( | int | neta, |
double | deta, | ||
int | nphi, | ||
double | dphi | ||
) |
void CaloDetDescriptor::set_n_calo_depth | ( | int | n_calo_depth | ) |
set number of calo depths
n_calo_depth | [IN} number of depths |
Definition at line 340 of file CaloDetDescriptor.cxx.
|
inline |
Set the transformation matrix.
Definition at line 696 of file CaloDetDescriptor.h.
|
inline |
Set Eta Max.
Definition at line 633 of file CaloDetDescriptor.h.
|
inline |
Set Eta Min.
Definition at line 628 of file CaloDetDescriptor.h.
|
inline |
Set Phi Max.
Definition at line 643 of file CaloDetDescriptor.h.
|
inline |
Set Phi Min.
Definition at line 638 of file CaloDetDescriptor.h.
|
inline |
Set R Max.
Definition at line 663 of file CaloDetDescriptor.h.
|
inline |
Set R Min.
Definition at line 658 of file CaloDetDescriptor.h.
|
inline |
Set Z Max.
Definition at line 653 of file CaloDetDescriptor.h.
|
inline |
Set Z Min.
Definition at line 648 of file CaloDetDescriptor.h.
|
inline |
Set LAr Region Phi Max.
Definition at line 683 of file CaloDetDescriptor.h.
|
inline |
Set LAr Region Phi Min.
Definition at line 678 of file CaloDetDescriptor.h.
|
inline |
Set LAr Region Eta Max.
Definition at line 673 of file CaloDetDescriptor.h.
|
inline |
Set LAr Region Eta Min.
Definition at line 668 of file CaloDetDescriptor.h.
|
inline |
get subcalo hash
Definition at line 517 of file CaloDetDescriptor.h.
|
inline |
Get the current transformation matrix.
Definition at line 689 of file CaloDetDescriptor.h.
|
protected |
in depths
Definition at line 435 of file CaloDetDescriptor.h.
|
protected |
out depths
Definition at line 438 of file CaloDetDescriptor.h.
|
protected |
maximal Eta (to be defined in the derived classes)
Definition at line 410 of file CaloDetDescriptor.h.
|
protected |
minimal Eta (to be defined in the derived classes)
Definition at line 407 of file CaloDetDescriptor.h.
|
private |
Calo Cell ID helper.
Definition at line 339 of file CaloDetDescriptor.h.
|
private |
Subcalo.
Definition at line 382 of file CaloDetDescriptor.h.
|
protected |
maximal Phi (to be defined in the derived classes)
Definition at line 416 of file CaloDetDescriptor.h.
|
protected |
minimal Phi (to be defined in the derived classes)
Definition at line 413 of file CaloDetDescriptor.h.
|
protected |
maximal R (to be defined in the derived classes)
Definition at line 422 of file CaloDetDescriptor.h.
|
protected |
minimal R (to be defined in the derived classes)
Definition at line 419 of file CaloDetDescriptor.h.
|
private |
Calo Sample.
Definition at line 378 of file CaloDetDescriptor.h.
|
private |
calo sign
Definition at line 371 of file CaloDetDescriptor.h.
|
protected |
maximal Z (to be defined in the derived classes)
Definition at line 428 of file CaloDetDescriptor.h.
|
protected |
minimal Z (to be defined in the derived classes)
Definition at line 425 of file CaloDetDescriptor.h.
|
private |
minimal hash id of region cells
Definition at line 386 of file CaloDetDescriptor.h.
|
protected |
minimal Eta channel number
Definition at line 458 of file CaloDetDescriptor.h.
|
private |
Atlas Detector ID helper.
Definition at line 336 of file CaloDetDescriptor.h.
|
private |
Region identifier.
Definition at line 342 of file CaloDetDescriptor.h.
|
private |
descriptor belongs to EM calorimeter
Definition at line 346 of file CaloDetDescriptor.h.
|
private |
descriptor belongs to EM barrel
Definition at line 349 of file CaloDetDescriptor.h.
|
private |
descriptor belongs to EM end cap
Definition at line 352 of file CaloDetDescriptor.h.
|
private |
descriptor belongs to the inner wheel of EM end cap
Definition at line 355 of file CaloDetDescriptor.h.
|
private |
descriptor belongs to the outer wheel of EM end cap
Definition at line 358 of file CaloDetDescriptor.h.
|
private |
descriptor belongs to FCAL
Definition at line 364 of file CaloDetDescriptor.h.
|
private |
descriptor belongs to HEC
Definition at line 361 of file CaloDetDescriptor.h.
|
private |
descriptor belongs to Tile
Definition at line 367 of file CaloDetDescriptor.h.
|
private |
delta eta (LAr)
Definition at line 390 of file CaloDetDescriptor.h.
|
private |
delta phi (LAr)
Definition at line 393 of file CaloDetDescriptor.h.
|
protected |
minimal Eta for LAr region
Definition at line 455 of file CaloDetDescriptor.h.
|
private |
eta granularity (LAr)
Definition at line 396 of file CaloDetDescriptor.h.
|
private |
phi granularity (LAr)
Definition at line 399 of file CaloDetDescriptor.h.
|
protected |
minimal Phi for LAr region
Definition at line 452 of file CaloDetDescriptor.h.
|
protected |
maximal Abs Eta for LAr region
Definition at line 449 of file CaloDetDescriptor.h.
|
protected |
minimal Abs Eta for LAr region
Definition at line 446 of file CaloDetDescriptor.h.
|
private |
layer
Definition at line 374 of file CaloDetDescriptor.h.
|
protected |
number of depths
Definition at line 432 of file CaloDetDescriptor.h.
|
protected |
misalignment transformation
Definition at line 442 of file CaloDetDescriptor.h.