26 else if (rot.
zx() >= one)
29 angles(2) = std::asin(one);
32 else if (rot.
zx() <= -one)
35 angles(2) = std::asin(-one);
48 return RotationType( c2 * c3,
c1 * s3 + s1 * s2 * c3, s1 * s3 -
c1 * s2 * c3,
49 -c2 * s3,
c1 * c3 - s1 * s2 * s3, s1 * c3 +
c1 * s2 * s3,
50 s2, -s1 * c2,
c1 * c2);
55 unsigned int nDau = dauPos.size();
59 for (
unsigned int i = 0;
i < nDau; ++
i)
115 unsigned int nPoints = nominal.size();
117 for (
unsigned int j = 0; j < nPoints; ++j)
122 I.fast(1, 1) += r.
y() * r.
y() + r.
z() * r.
z();
123 I.fast(2, 2) += r.
x() * r.
x() + r.
z() * r.
z();
124 I.fast(3, 3) += r.
y() * r.
y() + r.
x() * r.
x();
125 I.fast(2, 1) -= r.
x() * r.
y();
126 I.fast(3, 1) -= r.
x() * r.
z();
127 I.fast(3, 2) -= r.
y() * r.
z();
134 for (
unsigned int j = 0; j < nPoints; ++j)
141 rhs(1) += c.
y() * r.
z() - c.
z() * r.
y();
142 rhs(2) += c.
z() * r.
x() - c.
x() * r.
z();
143 rhs(3) += c.
x() * r.
y() - c.
y() * r.
x();
153 std::cout<<
"diffRot infinite loop: dOmega is "<<dOmega.normsq()<<
"\n";
159 for (
unsigned int j = 0; j < nPoints; ++j)
174 unsigned int nPoints = nominal.size();
176 for (
unsigned int j = 0; j < nPoints; ++j)
184 return nCM /=
static_cast<Scalar>(nPoints);
189 unsigned int nPoints = theVs.size();
193 for (
unsigned int j = 0; j < nPoints; ++j) CM += theVs[j];
195 return CM /=
static_cast<Scalar>(nPoints);
224 if (!runRanges.empty()) {
225 std::map<RunNumber,RunNumber> uniqueFirstRunNumbers;
226 for (
const auto& ipset: runRanges) {
227 const auto RunRangeStrings =
228 ipset.getParameter<std::vector<std::string> >(
"RunRanges");
229 for (
const auto& irange: RunRangeStrings) {
230 if (irange.find(
':')==std::string::npos) {
231 long int temp{strtol(irange.c_str(),
nullptr, 0)};
236 <<
"@SUB=align::makeNonOverlappingRunRanges" 237 <<
"Config file contains old format for 'RunRangeSelection'. Only " 238 <<
"the start run number is used internally. The number of the last" 239 <<
" run is ignored and can besafely removed from the config file.";
241 long int temp{strtol(tokens[0].c_str(),
nullptr, 0)};
248 for (
const auto& iFirst: uniqueFirstRunNumbers) {
249 uniqueRunRanges.push_back(std::make_pair(iFirst.first, endValue));
251 for (
unsigned int i = 0;
i<uniqueRunRanges.size()-1;++
i) {
252 uniqueRunRanges[
i].second = uniqueRunRanges[
i+1].first - 1;
255 uniqueRunRanges.push_back(std::make_pair(defaultRun, endValue));
258 return uniqueRunRanges;
265 auto uniqueRunRanges =
267 if (uniqueRunRanges.empty()) {
270 uniqueRunRanges.push_back(runRange);
272 return uniqueRunRanges;
const TimeTypeSpecs timeTypeSpecs[]
TkRotation< Scalar > RotationType
std::vector< ParameterSet > VParameterSet
std::vector< RunRange > RunRanges
Sin< T >::type sin(const T &t)
GlobalVector diffR(const GlobalVectors ¤t, const GlobalVectors &nominal)
RotationType diffRot(const GlobalVectors ¤t, const GlobalVectors &nominal)
Point3DBase< Scalar, GlobalTag > PositionType
void rectify(RotationType &)
Correct a rotation matrix for rounding errors.
RunRanges makeNonOverlappingRunRanges(const edm::VParameterSet &runRanges, const RunNumber &defaultRun)
RunRanges makeUniqueRunRanges(const edm::VParameterSet &runRanges, const RunNumber &defaultRun)
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
const std::complex< double > I
EulerAngles toAngles(const RotationType &)
Convert rotation matrix to angles about x-, y-, z-axes (frame rotation).
GlobalVector centerOfMass(const GlobalVectors &theVs)
Find the CM of a set of points.
std::pair< RunNumber, RunNumber > RunRange
CLHEP::HepVector AlgebraicVector
AlgebraicVector EulerAngles
std::vector< GlobalVector > GlobalVectors
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
CLHEP::HepSymMatrix AlgebraicSymMatrix
PositionType motherPosition(const std::vector< const PositionType * > &dauPos)
Find mother's position from the average of its daughters' positions.
Basic3DVector< T > multiplyInverse(const Basic3DVector< T > &v) const
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Global3DVector GlobalVector
cond::RealTimeType< cond::runnumber >::type RunNumber
std::vector< std::string > tokenize(std::string const &input, std::string const &separator)
breaks the input string into tokens, delimited by the separator