ATLAS Offline Software
CaloDescriptors.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
16 #include "GaudiKernel/SystemOfUnits.h"
17 
18 // -- EMBDescriptor --
20  , const AtlasDetectorID* helper
21  , const CaloCell_ID* calo_helper
22  , const EMBDetectorRegion* embRegion
23  , const GeoAlignmentStore* alignStore)
24  : CaloDetDescriptor(id,helper,calo_helper)
25 {
26  const Amg::Transform3D &xfDef = embRegion->getDefAbsoluteTransform(alignStore);
27  const Amg::Transform3D &xfAbs = embRegion->getAbsoluteTransform(alignStore);
28 
29  m_transform = xfAbs*xfDef.inverse();
30 }
31 
33 = default;
34 
35 // -- EMECDescriptor --
37  , const AtlasDetectorID* helper
38  , const CaloCell_ID* calo_helper
39  , const EMECDetectorRegion* emecRegion
40  , const GeoAlignmentStore* alignStore)
41  : CaloDetDescriptor(id,helper,calo_helper)
42 {
43  // -- m_transform
44  const Amg::Transform3D &xfDef = emecRegion->getDefAbsoluteTransform(alignStore);
45  // we need to apply the famous ZShift.
46  Amg::Transform3D xfNominal;
47  if(emecRegion->getEndcapIndex()==0) {
48  xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,emecRegion->getProjectivityDisplacement()*Gaudi::Units::cm))*xfDef; // Negative EMEC
49  }
50  else {
51  xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,-emecRegion->getProjectivityDisplacement()*Gaudi::Units::cm))*xfDef; // Positive EMEC
52  }
53  const Amg::Transform3D &xfAbs = emecRegion->getAbsoluteTransform(alignStore);
54 
55  m_transform = xfAbs*xfNominal.inverse();
56 }
57 
59 = default;
60 
61 // -- HECDescriptor --
63  , const AtlasDetectorID* helper
64  , const CaloCell_ID* calo_helper
65  , const HECDetectorRegion* hecRegion
66  , const GeoAlignmentStore* alignStore)
67  : CaloDetDescriptor(id,helper,calo_helper)
68 {
69  // -- m_transform
70  const Amg::Transform3D &xfDef = hecRegion->getDefAbsoluteTransform(alignStore);
71  // we need to apply the famous ZShift
72  Amg::Transform3D xfNominal;
73  if(hecRegion->getEndcapIndex()==0) {
74  xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,hecRegion->getProjectivityDisplacement()*Gaudi::Units::cm))*xfDef; // Negative HEC
75  }
76  else {
77  xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,-hecRegion->getProjectivityDisplacement()*Gaudi::Units::cm))*xfDef; // Positive HEC
78  }
79  const Amg::Transform3D &xfAbs = hecRegion->getAbsoluteTransform(alignStore);
80 
81  m_transform = xfAbs*xfNominal.inverse();
82 }
83 
85 = default;
86 
87 // -- FCALDescriptor --
89  , const AtlasDetectorID* helper
90  , const CaloCell_ID* calo_helper
91  , const FCALModule* fcalModule
92  , const GeoAlignmentStore* alignStore)
93  : CaloDetDescriptor(id,helper,calo_helper)
94 {
95  // -- m_transform
96  const Amg::Transform3D &xfDef = fcalModule->getDefAbsoluteTransform(alignStore);
97  // we need to apply the famous ZShift.
98  Amg::Transform3D xfNominal;
99  if(fcalModule->getEndcapIndex()==FCALModule::POS) {
100  xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,fcalModule->getProjectivityDisplacement()*Gaudi::Units::cm))*xfDef; // Negative FCAL
101  }
102  else {
103  xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,-fcalModule->getProjectivityDisplacement()*Gaudi::Units::cm))*xfDef; // Positive FCAL
104  }
105  const Amg::Transform3D &xfAbs = fcalModule->getAbsoluteTransform(alignStore);
106 
107  m_transform = xfAbs*xfNominal.inverse();
108 }
109 
111 = default;
GeoAlignmentStore
Ensure that the extensions for the Vector3D are properly loaded.
Definition: GeoAlignmentStore.h:24
CaloDetDescriptor::m_transform
Amg::Transform3D m_transform
misalignment transformation
Definition: CaloDetDescriptor.h:442
EMECDetectorRegion::getEndcapIndex
EMECDetectorRegion::DetectorSide getEndcapIndex() const
The endcap index.
Definition: EMECDetectorRegion.h:214
EMBDetectorRegion.h
EMBDetectorRegion::getDefAbsoluteTransform
const Amg::Transform3D & getDefAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: EMBDetectorRegion.cxx:35
FCALModule::getAbsoluteTransform
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: FCALModule.cxx:94
FCALModule::POS
@ POS
Definition: FCALModule.h:38
HECDescriptor::HECDescriptor
HECDescriptor()=delete
default constructor hidden
EMECDetectorRegion
Definition: EMECDetectorRegion.h:30
EMECDetectorRegion::getProjectivityDisplacement
double getProjectivityDisplacement() const
Definition: EMECDetectorRegion.h:221
CaloDescriptors.h
LAr subsystem specific descriptors.
HECDetectorRegion.h
EMECDetectorRegion::getAbsoluteTransform
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: EMECDetectorRegion.cxx:52
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
EMBCell.h
FCALDescriptor::~FCALDescriptor
virtual ~FCALDescriptor()
Destructor.
HECDetectorRegion::getProjectivityDisplacement
double getProjectivityDisplacement() const
Definition: HECDetectorRegion.h:216
HECDetectorRegion
Description of a region of homogenous granularity in the hadronic endcap calorimeter.
Definition: HECDetectorRegion.h:31
FCALTile.h
FCALModule::getDefAbsoluteTransform
const Amg::Transform3D & getDefAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: FCALModule.cxx:102
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
EMBDetectorRegion::getAbsoluteTransform
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: EMBDetectorRegion.cxx:27
EMECCell.h
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
HECDetectorRegion::getEndcapIndex
HECDetectorRegion::DetectorSide getEndcapIndex() const
The endcap index.
Definition: HECDetectorRegion.h:209
HECDetectorRegion::getAbsoluteTransform
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: HECDetectorRegion.cxx:37
GeoAlignmentStore.h
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
FCALModule::getProjectivityDisplacement
double getProjectivityDisplacement() const
Definition: FCALModule.h:175
FCALModule
Definition: FCALModule.h:33
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
EMECDetectorRegion::getDefAbsoluteTransform
const Amg::Transform3D & getDefAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: EMECDetectorRegion.cxx:60
FCALModule::getEndcapIndex
FCALModule::Endcap getEndcapIndex() const
Returns the side (O=Negative, 1=Positive)
Definition: FCALModule.cxx:69
HECDescriptor::~HECDescriptor
virtual ~HECDescriptor()
Destructor.
CaloDetDescriptor
This is a base class for LAr and Tile Descriptors The primary goal is to speed up loops over all the ...
Definition: CaloDetDescriptor.h:58
EMECDescriptor::EMECDescriptor
EMECDescriptor()=delete
default constructor hidden
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
HECDetectorRegion::getDefAbsoluteTransform
const Amg::Transform3D & getDefAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: HECDetectorRegion.cxx:45
FCALDescriptor::FCALDescriptor
FCALDescriptor()=delete
default constructor hidden
EMBDescriptor::EMBDescriptor
EMBDescriptor()=delete
default constructor hidden
HECCell.h
EMBDescriptor::~EMBDescriptor
virtual ~EMBDescriptor()
Destructor.
EMBDetectorRegion
Definition: EMBDetectorRegion.h:28
EMECDetectorRegion.h
EMECDescriptor::~EMECDescriptor
virtual ~EMECDescriptor()
Destructor.
FCALModule.h
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
Identifier
Definition: IdentifierFieldParser.cxx:14