File indexing completed on 2024-04-06 11:56:06
0001 #ifndef Alignment_CommonAlignment_Utilities_H
0002 #define Alignment_CommonAlignment_Utilities_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include <map>
0014 #include <memory>
0015 #include <vector>
0016
0017 #include "CondCore/CondDB/interface/Time.h"
0018 #include "CondFormats/Alignment/interface/Definitions.h"
0019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0020
0021 class Alignable;
0022 class AlignmentParameters;
0023 class AlignmentLevel;
0024
0025 namespace align {
0026 typedef std::vector<Scalar> Scalars;
0027 typedef std::vector<GlobalPoint> GlobalPoints;
0028 typedef std::vector<GlobalVector> GlobalVectors;
0029 typedef std::vector<LocalPoint> LocalPoints;
0030 typedef std::vector<LocalVector> LocalVectors;
0031 typedef std::vector<Alignable*> Alignables;
0032 typedef std::vector<AlignmentParameters*> Parameters;
0033 typedef std::vector<std::unique_ptr<AlignmentLevel> > AlignmentLevels;
0034
0035 typedef std::map<std::pair<Alignable*, Alignable*>, AlgebraicMatrix> Correlations;
0036
0037 using RunNumber = cond::RealTimeType<cond::runnumber>::type;
0038 using RunRange = std::pair<RunNumber, RunNumber>;
0039 using RunRanges = std::vector<RunRange>;
0040
0041
0042 EulerAngles toAngles(const RotationType&);
0043
0044
0045 RotationType toMatrix(const EulerAngles&);
0046
0047
0048 PositionType motherPosition(const std::vector<const PositionType*>& dauPos);
0049
0050
0051
0052 RotationType diffRot(const GlobalVectors& current, const GlobalVectors& nominal);
0053
0054 GlobalVector diffR(const GlobalVectors& current, const GlobalVectors& nominal);
0055
0056
0057 GlobalVector centerOfMass(const GlobalVectors& theVs);
0058
0059
0060 void rectify(RotationType&);
0061
0062 RunRanges makeNonOverlappingRunRanges(const edm::VParameterSet& runRanges, const RunNumber& defaultRun);
0063 RunRanges makeUniqueRunRanges(const edm::VParameterSet& runRanges, const RunNumber& defaultRun);
0064 }
0065
0066 #endif