Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:07

0001 #ifndef TRACKBASE_ALIGNMENTTRANSFORMATIONCONTAINER_H
0002 #define TRACKBASE_ALIGNMENTTRANSFORMATIONCONTAINER_H
0003 
0004 /**
0005  * @file trackbase/alignmentTranformationContainer
0006  * @author R. Boucher
0007  * @date August 2022
0008  * @brief Storage class for alignment transformation to node tree
0009  */
0010 
0011 #include "ActsGeometry.h"
0012 #include "TrkrDefs.h"
0013 
0014 #include <Eigen/Dense>
0015 #include <Eigen/Geometry>
0016 
0017 #include <iostream>  // for cout, ostream
0018 #include <map>
0019 #include <utility>  // for pair
0020 
0021 /**
0022  * @brief Container class for Alignment transformations
0023  *
0024  * Association object holding transformations associated with given tracker hitset
0025  */
0026 class alignmentTransformationContainer : public Acts::GeometryContext
0027 {
0028  public:
0029   alignmentTransformationContainer();
0030 
0031   virtual ~alignmentTransformationContainer() {}
0032 
0033   void Reset();
0034   void identify(std::ostream& os = std::cout);
0035   void addTransform(Acts::GeometryIdentifier, const Acts::Transform3&);
0036   Acts::Transform3& getTransform(Acts::GeometryIdentifier id);
0037   void replaceTransform(const Acts::GeometryIdentifier id, Acts::Transform3 transform);
0038   const std::vector<std::vector<Acts::Transform3>>& getMap() const;
0039   void setMisalignmentFactor(uint8_t layer, double factor);
0040   const double& getMisalignmentFactor(uint8_t layer) const { return m_misalignmentFactor.find(layer)->second; }
0041   static bool use_alignment;
0042 
0043  private:
0044   unsigned int getsphlayer(Acts::GeometryIdentifier);
0045 
0046   std::map<unsigned int, unsigned int> base_layer_map = {{10, 0}, {12, 3}, {14, 7}, {16, 55}};
0047 
0048   std::vector<std::vector<Acts::Transform3>> transformVec;
0049 
0050   /// Map of TrkrDefs::Layer to misalignment factor
0051   std::map<uint8_t, double> m_misalignmentFactor;
0052 
0053 };
0054 
0055 #endif  // TRACKBASE_ALIGNMENTTRANSFORMATIONCONTAINER_H