Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:34

0001 #include <vector>
0002 
0003 #include "DetectorDescription/Core/interface/DDRotationMatrix.h"
0004 #include "DetectorDescription/Core/interface/DDTranslation.h"
0005 #include "DetectorDescription/Core/interface/DDCompactView.h"
0006 #include "DetectorDescription/Core/interface/DDExpandedView.h"
0007 #include "DetectorDescription/Core/interface/DDLogicalPart.h"
0008 #include "DetectorDescription/Core/interface/DDSolid.h"
0009 #include "DetectorDescription/Core/interface/DDTransform.h"
0010 
0011 class DDCompactView;
0012 class DDExpandedView;
0013 
0014 /// DDComparators need to know if names of DDRotation matter.
0015 /**
0016    Therefore the constructors (default) are set to care about rotation names
0017    but if one really wants to compare without regard to the name, for example
0018    in the case of two DDCompactViews created in-memory from reading two 
0019    separate sets of XML rather than from DB objects, then one must set this
0020    to false.
0021  **/
0022 struct DDCompOptions {
0023   DDCompOptions()
0024       : compRotName_(false),
0025         attResync_(false),
0026         contOnError_(false),
0027         distTol_(0.0004),
0028         rotTol_(0.0004),
0029         specTol_(0.0004) {}
0030 
0031   bool compRotName_;
0032   bool attResync_;
0033   bool contOnError_;
0034   double distTol_;
0035   double rotTol_;
0036   double specTol_;
0037 };
0038 
0039 bool DDCompareEPV(DDExpandedView& lhs, DDExpandedView& rhs, const DDCompOptions& ddco);
0040 bool DDCompareCPV(const DDCompactView& lhs, const DDCompactView& rhs, const DDCompOptions& ddco);
0041 
0042 /// LogicalParts have solids which could be BooleanSolids.
0043 /**
0044    This means they need to know if the DDRotation naems matter.
0045  **/
0046 bool DDCompareLP(const DDLogicalPart& lhs, const DDLogicalPart& rhs, const DDCompOptions& ddco);
0047 
0048 /// Needs to know about rotmat because of BooleanSolid
0049 bool DDCompareSolid(const DDSolid& lhs, const DDSolid& rhs, const DDCompOptions& ddco);
0050 
0051 bool DDCompareDBLVEC(const std::vector<double>& lhs, const std::vector<double>& rhs, double tol = 0.0004);
0052 
0053 /// Needs to know because of Rotation Matrix of Boolean Relationship.
0054 bool DDCompareBoolSol(const DDBooleanSolid& lhs, const DDBooleanSolid& rhs, const DDCompOptions& ddco);
0055 bool DDCompareDDTrans(const DDTranslation& lhs, const DDTranslation& rhs, double tol = 0.0004);
0056 
0057 /// Allows to compare name or not. If not, compares only values of the rotation matrix.
0058 bool DDCompareDDRot(const DDRotation& lhs, const DDRotation& rhs, const DDCompOptions& ddco);
0059 
0060 bool DDCompareDDRotMat(const DDRotationMatrix& lhs, const DDRotationMatrix& rhs, double tol = 0.0004);