Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:22

0001 #ifndef OpticalAlignInfo_H
0002 #define OpticalAlignInfo_H
0003 
0004 #include "CondFormats/Serialization/interface/Serializable.h"
0005 
0006 #include <string>
0007 #include <vector>
0008 #include <iostream>
0009 
0010 #include "CondFormats/OptAlignObjects/interface/OAQuality.h"
0011 
0012 /**
0013   easy output...
0014 **/
0015 
0016 class OpticalAlignInfo;
0017 
0018 std::ostream &operator<<(std::ostream &, const OpticalAlignInfo &);
0019 
0020 /**
0021    easy output...
0022 **/
0023 
0024 class OpticalAlignParam;
0025 
0026 std::ostream &operator<<(std::ostream &, const OpticalAlignParam &);
0027 
0028 /** a Class holding data for each parameter, the value, error and whether
0029     it is an unknown, calibrated or fixed parameter.
0030 
0031     Author:  Michael Case
0032     Date:    Dec. 19, 2005
0033  **/
0034 class OpticalAlignParam {
0035 public:
0036   OpticalAlignParam();
0037   OpticalAlignParam(const OpticalAlignParam &rhs);
0038 
0039   std::string name() const { return name_; }
0040   double value() const { return value_; }
0041   double sigma() const { return error_; }
0042   int quality() const { return quality_; }
0043   std::string dimType() const { return dim_type_; }
0044 
0045 public:
0046   double value_;
0047   double error_;
0048   int quality_;  // f = fixed, c = calibrated, u = unknown.
0049   std::string name_;
0050   std::string dim_type_;
0051 
0052   void clear() {
0053     value_ = 0.0;
0054     error_ = 0.0;
0055     quality_ = int(oa_unknown);
0056     name_.clear();
0057   }
0058 
0059   COND_SERIALIZABLE;
0060 };
0061 
0062 // a Class holding data for an Optical Alignment transformation
0063 /**
0064     Author:  Michael Case
0065     Date:    Dec. 15, 2005
0066 
0067     It is my understanding that each optical geometrical object
0068     has a position in space and possible other parameters such as
0069     
0070  **/
0071 class OpticalAlignInfo {
0072 public:
0073   /*
0074   OpticalAlignParam x() const { return x_; }
0075   OpticalAlignParam y() const { return y_; }
0076   OpticalAlignParam z() const { return z_; }
0077   OpticalAlignParam angX() const { return angx_; }
0078   OpticalAlignParam angY() const { return angy_; }
0079   OpticalAlignParam angZ() const { return angz_; }
0080   std::vector<OpticalAlignParam> extraEntries() const { return extraEntries_; }
0081   std::string type() { return type_; }
0082   std::string name() const { return name_; }
0083   std::string parentName() const { return parentObjectName_; }
0084   unsigned int ID() const { return ID_; }
0085   */
0086   OpticalAlignParam *findExtraEntry(std::string &name);
0087 
0088 public:
0089   OpticalAlignParam x_, y_, z_, angx_, angy_, angz_;
0090   std::vector<OpticalAlignParam> extraEntries_;
0091   std::string type_;
0092   std::string name_;
0093   std::string parentName_;
0094   unsigned int ID_;
0095   void clear() {
0096     x_.clear();
0097     y_.clear();
0098     z_.clear();
0099     angx_.clear();
0100     angy_.clear();
0101     angz_.clear();
0102     extraEntries_.clear();
0103     type_.clear();
0104     ID_ = 0;
0105   }
0106 
0107   COND_SERIALIZABLE;
0108 };
0109 
0110 /**
0111     Author:  Michael Case
0112     Date:    Dec. 15, 2005
0113 
0114     It is my understanding that each optical geometrical object
0115     has a position in space and possible other parameters such as
0116     
0117  **/
0118 /* class  OpticalAlignCOPSInfo : public OpticalAlignInfo { */
0119 /*  public:   */
0120 /*   OpticalAlignParam dowel1X_, dowel1Y_; */
0121 /*   OpticalAlignParam upCCDtoDowel2X_, upCCDtoDowel2Y_; */
0122 /*   OpticalAlignParam downCCDtoDowel2X_, downCCDtoDowel2Y_; */
0123 /*   OpticalAlignParam leftCCDtoDowel2X_, leftCCDtoDowel2Y_; */
0124 /*   OpticalAlignParam rightCCDtoDowel2X_, rightCCDtoDowel2Y_; */
0125 /* }; */
0126 
0127 #endif  //OpticalAlignInfo_H