Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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 
0038   std::string name() const { return name_; }
0039   double value() const { return value_; }
0040   double sigma() const { return error_; }
0041   int quality() const { return quality_; }
0042   std::string dimType() const { return dim_type_; }
0043 
0044 public:
0045   double value_;
0046   double error_;
0047   int quality_;  // f = fixed, c = calibrated, u = unknown.
0048   std::string name_;
0049   std::string dim_type_;
0050 
0051   void clear() {
0052     value_ = 0.0;
0053     error_ = 0.0;
0054     quality_ = int(oa_unknown);
0055     name_.clear();
0056   }
0057 
0058   COND_SERIALIZABLE;
0059 };
0060 
0061 // a Class holding data for an Optical Alignment transformation
0062 /**
0063     Author:  Michael Case
0064     Date:    Dec. 15, 2005
0065 
0066     It is my understanding that each optical geometrical object
0067     has a position in space and possible other parameters such as
0068     
0069  **/
0070 class OpticalAlignInfo {
0071 public:
0072   /*
0073   OpticalAlignParam x() const { return x_; }
0074   OpticalAlignParam y() const { return y_; }
0075   OpticalAlignParam z() const { return z_; }
0076   OpticalAlignParam angX() const { return angx_; }
0077   OpticalAlignParam angY() const { return angy_; }
0078   OpticalAlignParam angZ() const { return angz_; }
0079   std::vector<OpticalAlignParam> extraEntries() const { return extraEntries_; }
0080   std::string type() { return type_; }
0081   std::string name() const { return name_; }
0082   std::string parentName() const { return parentObjectName_; }
0083   unsigned int ID() const { return ID_; }
0084   */
0085   OpticalAlignParam *findExtraEntry(std::string &name);
0086 
0087 public:
0088   OpticalAlignParam x_, y_, z_, angx_, angy_, angz_;
0089   std::vector<OpticalAlignParam> extraEntries_;
0090   std::string type_;
0091   std::string name_;
0092   std::string parentName_;
0093   unsigned int ID_;
0094   void clear() {
0095     x_.clear();
0096     y_.clear();
0097     z_.clear();
0098     angx_.clear();
0099     angy_.clear();
0100     angz_.clear();
0101     extraEntries_.clear();
0102     type_.clear();
0103     ID_ = 0;
0104   }
0105 
0106   COND_SERIALIZABLE;
0107 };
0108 
0109 /**
0110     Author:  Michael Case
0111     Date:    Dec. 15, 2005
0112 
0113     It is my understanding that each optical geometrical object
0114     has a position in space and possible other parameters such as
0115     
0116  **/
0117 /* class  OpticalAlignCOPSInfo : public OpticalAlignInfo { */
0118 /*  public:   */
0119 /*   OpticalAlignParam dowel1X_, dowel1Y_; */
0120 /*   OpticalAlignParam upCCDtoDowel2X_, upCCDtoDowel2Y_; */
0121 /*   OpticalAlignParam downCCDtoDowel2X_, downCCDtoDowel2Y_; */
0122 /*   OpticalAlignParam leftCCDtoDowel2X_, leftCCDtoDowel2Y_; */
0123 /*   OpticalAlignParam rightCCDtoDowel2X_, rightCCDtoDowel2Y_; */
0124 /* }; */
0125 
0126 #endif  //OpticalAlignInfo_H