Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:25

0001 #ifndef CondFormats_PCLConfig_AlignPCLThresholds_h
0002 #define CondFormats_PCLConfig_AlignPCLThresholds_h
0003 
0004 #include "CondFormats/PCLConfig/interface/AlignPCLThreshold.h"
0005 #include "CondFormats/Serialization/interface/Serializable.h"
0006 
0007 #include <array>
0008 #include <map>
0009 #include <string>
0010 #include <vector>
0011 
0012 class AlignPCLThresholds {
0013 public:
0014   typedef std::map<std::string, AlignPCLThreshold> threshold_map;
0015   enum coordType { X, Y, Z, theta_X, theta_Y, theta_Z, extra_DOF, endOfTypes };
0016 
0017   AlignPCLThresholds() {}
0018   virtual ~AlignPCLThresholds() {}
0019 
0020   void setAlignPCLThreshold(const std::string &AlignableId, const AlignPCLThreshold &Threshold);
0021   void setAlignPCLThresholds(const int &Nrecords, const threshold_map &Thresholds);
0022   void setNRecords(const int &Nrecords);
0023 
0024   const threshold_map &getThreshold_Map() const { return m_thresholds; }
0025   const int &getNrecords() const { return m_nrecords; }
0026 
0027   AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const;
0028   AlignPCLThreshold &getAlignPCLThreshold(const std::string &AlignableId);
0029 
0030   float getSigCut(const std::string &AlignableId, const coordType &type) const;
0031   float getCut(const std::string &AlignableId, const coordType &type) const;
0032   float getMaxMoveCut(const std::string &AlignableId, const coordType &type) const;
0033   float getMaxErrorCut(const std::string &AlignableId, const coordType &type) const;
0034 
0035   // overloaded methods to get all the coordinates
0036   std::array<float, 6> getSigCut(const std::string &AlignableId) const;
0037   std::array<float, 6> getCut(const std::string &AlignableId) const;
0038   std::array<float, 6> getMaxMoveCut(const std::string &AlignableId) const;
0039   std::array<float, 6> getMaxErrorCut(const std::string &AlignableId) const;
0040 
0041   std::array<float, 4> getExtraDOFCutsForAlignable(const std::string &AlignableId, const unsigned int i) const;
0042   std::string getExtraDOFLabelForAlignable(const std::string &AlignableId, const unsigned int i) const;
0043 
0044   double size() const { return m_thresholds.size(); }
0045   std::vector<std::string> getAlignableList() const;
0046 
0047   void printAll() const;
0048 
0049 protected:
0050   threshold_map m_thresholds;
0051   int m_nrecords;
0052 
0053   COND_SERIALIZABLE;
0054 };
0055 
0056 #endif