Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef CondFormats_PCLConfig_AlignPCLThreshold_h
0002 #define CondFormats_PCLConfig_AlignPCLThreshold_h
0003 
0004 #include "CondFormats/Serialization/interface/Serializable.h"
0005 #include <array>
0006 
0007 class AlignPCLThreshold {
0008 public:
0009   struct coordThresholds {
0010     coordThresholds() {
0011       m_Cut = 5.;
0012       m_sigCut = 2.5;
0013       m_errorCut = 10.;
0014       m_maxMoveCut = 200;
0015       m_label = "default";
0016     }
0017     ~coordThresholds() {}
0018     void setThresholds(
0019         float theCut, float theSigCut, float theErrorCut, float theMaxMoveCut, const std::string &theLabel) {
0020       m_Cut = theCut;
0021       m_sigCut = theSigCut;
0022       m_errorCut = theErrorCut;
0023       m_maxMoveCut = theMaxMoveCut;
0024       m_label = theLabel;
0025     }
0026 
0027     float m_Cut;
0028     float m_sigCut;
0029     float m_errorCut;
0030     float m_maxMoveCut;
0031     std::string m_label;
0032 
0033     COND_SERIALIZABLE;
0034   };
0035 
0036   virtual ~AlignPCLThreshold() {}
0037 
0038   AlignPCLThreshold(coordThresholds X = coordThresholds(),
0039                     coordThresholds tX = coordThresholds(),
0040                     coordThresholds Y = coordThresholds(),
0041                     coordThresholds tY = coordThresholds(),
0042                     coordThresholds Z = coordThresholds(),
0043                     coordThresholds tZ = coordThresholds(),
0044                     std::vector<coordThresholds> extraDOF = std::vector<coordThresholds>());
0045 
0046   float getXcut() const { return m_xCoord.m_Cut; }
0047   float getYcut() const { return m_yCoord.m_Cut; }
0048   float getZcut() const { return m_zCoord.m_Cut; }
0049   float getThetaXcut() const { return m_thetaXCoord.m_Cut; }
0050   float getThetaYcut() const { return m_thetaYCoord.m_Cut; }
0051   float getThetaZcut() const { return m_thetaZCoord.m_Cut; }
0052 
0053   float getSigXcut() const { return m_xCoord.m_sigCut; }
0054   float getSigYcut() const { return m_yCoord.m_sigCut; }
0055   float getSigZcut() const { return m_zCoord.m_sigCut; }
0056   float getSigThetaXcut() const { return m_thetaXCoord.m_sigCut; }
0057   float getSigThetaYcut() const { return m_thetaYCoord.m_sigCut; }
0058   float getSigThetaZcut() const { return m_thetaZCoord.m_sigCut; }
0059 
0060   float getErrorXcut() const { return m_xCoord.m_errorCut; }
0061   float getErrorYcut() const { return m_yCoord.m_errorCut; }
0062   float getErrorZcut() const { return m_zCoord.m_errorCut; }
0063   float getErrorThetaXcut() const { return m_thetaXCoord.m_errorCut; }
0064   float getErrorThetaYcut() const { return m_thetaYCoord.m_errorCut; }
0065   float getErrorThetaZcut() const { return m_thetaZCoord.m_errorCut; }
0066 
0067   float getMaxMoveXcut() const { return m_xCoord.m_maxMoveCut; }
0068   float getMaxMoveYcut() const { return m_yCoord.m_maxMoveCut; }
0069   float getMaxMoveZcut() const { return m_zCoord.m_maxMoveCut; }
0070   float getMaxMoveThetaXcut() const { return m_thetaXCoord.m_maxMoveCut; }
0071   float getMaxMoveThetaYcut() const { return m_thetaYCoord.m_maxMoveCut; }
0072   float getMaxMoveThetaZcut() const { return m_thetaZCoord.m_maxMoveCut; }
0073 
0074   bool hasExtraDOF() const { return (!m_extraDOF.empty()); }
0075   unsigned int extraDOFSize() const { return m_extraDOF.size(); }
0076   std::array<float, 4> getExtraDOFCuts(const unsigned int i) const;
0077   std::string getExtraDOFLabel(const unsigned int i) const;
0078 
0079 private:
0080   coordThresholds m_xCoord;
0081   coordThresholds m_yCoord;
0082   coordThresholds m_zCoord;
0083   coordThresholds m_thetaXCoord;
0084   coordThresholds m_thetaYCoord;
0085   coordThresholds m_thetaZCoord;
0086   std::vector<coordThresholds> m_extraDOF;
0087 
0088   COND_SERIALIZABLE;
0089 };
0090 
0091 #endif