|
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include "Identifier/Identifier.h"
29 const std::string&
name )
108 throw std::runtime_error(
"SCT_DetectorManager: Error adding detector element.");
156 GeoVAlignmentStore* alignStore)
const
163 if (!idHash.
is_valid())
return false;
172 if (!element)
return false;
187 ATH_MSG_WARNING(
"Frames other than global or local are not supported.");
191 }
else if (
level == 1) {
195 if (!idHash.
is_valid())
return false;
197 int idModuleHash = idHash / 2;
209 if (!element)
return false;
223 ATH_MSG_WARNING(
"Frames other than global or local are not supported.");
230 ATH_MSG_WARNING(
"Non global shift at higher levels is not supported.");
238 AlignableTransformMap::const_iterator iter;
251 const GeoVPhysVol * child)
255 const GeoVFullPhysVol * childFPV =
dynamic_cast<const GeoVFullPhysVol *
>(child);
257 ATH_MSG_ERROR(
"Child of alignable transform is not a full physical volume");
267 const GeoVFullPhysVol * child)
276 }
else if (
level == 1) {
309 ATH_MSG_INFO(
"Processing new global alignment containers with key " <<
key <<
" in the " << frame <<
" frame at level ");
314 <<
key <<
" - no new global alignment ");
318 bool alignmentChange =
false;
325 if (atrlist[
"det"].data<int>()!=2)
continue;
328 atrlist[
"layer"].data<int>(),
329 atrlist[
"ring"].data<int>(),
330 atrlist[
"sector"].data<int>(),
335 Amg::Translation3D newtranslation(atrlist[
"Tx"].data<float>(),atrlist[
"Ty"].data<float>(),atrlist[
"Tz"].data<float>());
336 Amg::Transform3D newtrans = newtranslation * Amg::RotationMatrix3D::Identity();
342 <<
" ,det: " << atrlist[
"det"].data<
int>()
343 <<
" ,bec: " << atrlist[
"bec"].data<
int>()
344 <<
" ,layer: " << atrlist[
"layer"].data<
int>()
345 <<
" ,ring: " << atrlist[
"ring"].data<
int>()
346 <<
" ,sector: " << atrlist[
"sector"].data<
int>()
347 <<
" ,Tx: " << atrlist[
"Tx"].data<
float>()
348 <<
" ,Ty: " << atrlist[
"Ty"].data<
float>()
349 <<
" ,Tz: " << atrlist[
"Tz"].data<
float>()
350 <<
" ,Rx: " << atrlist[
"Rx"].data<
float>()
351 <<
" ,Ry: " << atrlist[
"Ry"].data<
float>()
352 <<
" ,Rz: " << atrlist[
"Rz"].data<
float>());
362 ATH_MSG_DEBUG(
"Cannot set AlignableTransform for identifier."
364 <<
" at level " <<
level <<
" for new global DB ");
367 alignmentChange = (alignmentChange ||
status);
369 return alignmentChange;
379 GeoVAlignmentStore* )
const {
JetConstituentVector::iterator iterator
void addMotherDesign(std::unique_ptr< const SCT_ModuleSideDesign > &&)
std::vector< AlignableTransformMap > m_higherAlignableTransforms
virtual unsigned int getNumTreeTops() const override
int get_next_in_phi(const IdentifierHash &id, IdentifierHash &next) const
Next wafer hash in phi (return == 0 for neighbor found)
const_iterator end() const
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
void setOtherSide(const SiDetectorElement *element)
For SCT only.
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
SCT_DetectorManager(StoreGateSvc *detStore)
Constructor.
void setPrevInEta(const SiDetectorElement *element)
virtual bool identifierBelongs(const Identifier &id) const override
Check identifier is for this detector.
std::vector< std::unique_ptr< ExtendedAlignableTransform > > m_moduleAlignableTransforms
int get_prev_in_phi(const IdentifierHash &id, IdentifierHash &prev) const
Previous wafer hash in phi (return == 0 for neighbor found)
std::vector< std::unique_ptr< const SCT_ModuleSideDesign > > m_motherDesigns
bool is_sct(Identifier id) const
static bool setAlignableTransformLocalDelta(ExtendedAlignableTransform *extXF, const Amg::Transform3D &localToGlobalXF, const Amg::Transform3D &delta, GeoVAlignmentStore *alignStore=nullptr)
Helper method to set delta transform from a local delta - Amg interface.
bool m_isLogical
This variable switches the how the local alignment corrections are applied If true they will be calcu...
virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const override
virtual bool setAlignableTransformDelta(int level, const Identifier &id, const Amg::Transform3D &delta, FrameType frame, GeoVAlignmentStore *alignStore) const override
implements the main alignment update for delta transforms in different frames, it translates into the...
void setPrevInPhi(const SiDetectorElement *element)
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
void setNextInEta(const SiDetectorElement *element)
bool processSpecialAlignment(const std::string &key, InDetDD::AlignFolderType alignfolder) const override
Comply with InDetDetectorManager interface (not implemented for SCT)
virtual bool processGlobalAlignment(const std::string &, int level, FrameType frame, const CondAttrListCollection *obj, GeoVAlignmentStore *alignStore) const override
Process new global DB folders for L1 and L2.
#define ATH_MSG_VERBOSE(x)
void setCache()
Set/calculate cache values (inline)
const SCT_ID * m_idHelper
This class is a collection of AttributeLists where each one is associated with a channel number....
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements via Identifier
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
virtual const SCT_ID * getIdHelper() const override
static bool setAlignableTransformGlobalDelta(ExtendedAlignableTransform *extXF, const Amg::Transform3D &delta, GeoVAlignmentStore *alignStore=nullptr)
Helper method to set delta transform from a global delta - Amg interface.
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
virtual const SiDetectorElementCollection * getDetectorElementCollection() const override
access to whole collectiom
const Amg::Transform3D defTransform() const
The Athena Transient Store API.
const Amg::Transform3D & moduleTransform() const
Module to global frame transform.
std::vector< std::unique_ptr< ExtendedAlignableTransform > > m_alignableTransforms
::StatusCode StatusCode
StatusCode definition for legacy code.
const SiDetectorDesign * getDesign(int i) const
Eigen::Affine3d Transform3D
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
const int FIRST_HIGHER_LEVEL
void addTreeTop(const PVConstLink &vol)
Add tree top.
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
int get_other_side(const IdentifierHash &id, IdentifierHash &other) const
Wafer hash on other side.
StoreGateSvc * m_detStore
bool is_valid() const
Check if id is in a valid state.
const SCT_ModuleSideDesign * getSCT_Design(int i) const
Access to module design, casts to SCT_ModuleSideDesign.
SiDetectorElementCollection m_elementCollection
virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd() const override
size_type wafer_hash_max(void) const
std::vector< PVConstLink > m_volume
Amg::Transform3D defModuleTransform() const
Default module to global frame transform, ie with no misalignment.
Eigen::Matrix< double, 3, 1 > Vector3D
int get_prev_in_eta(const IdentifierHash &id, IdentifierHash &prev) const
Previous wafer hash in eta (return == 0 for neighbor found)
int get_next_in_eta(const IdentifierHash &id, IdentifierHash &next) const
Next wafer hash in eta (return == 0 for neighbor found)
virtual PVConstLink getTreeTop(unsigned int i) const override
void setNextInPhi(const SiDetectorElement *element)
#define ATH_MSG_WARNING(x)
ChanAttrListMap::const_iterator const_iterator
virtual void addAlignableTransform(int level, const Identifier &id, GeoAlignableTransform *xf, const GeoVFullPhysVol *child)
Add alignable transforms. No access to these, they will be changed by manager:
Eigen::Translation< double, 3 > Translation3D
virtual void addDetectorElement(SiDetectorElement *element) override
Add elememts during construction.
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Eigen::AngleAxisd AngleAxis3D
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
virtual const Amg::Transform3D & transform() const override final
Return local to global transform.
virtual void initNeighbours() override
Initialize the neighbours. This can only be done when all elements are built.