29 ySplit_(this->ySplitFromAlignable(ali)) {}
38 <<
" instead of " <<
N_PARAM <<
" parameters.";
50 <<
" instead of " <<
N_PARAM <<
" parameters.";
91 result[indexOffset +
i][0] = derivs[
i][0];
92 result[indexOffset +
i][1] = derivs[
i][1];
105 throw cms::Exception(
"MisMatch") <<
"TwoBowedSurfacesAlignmentParameters::derivatives: The hit " 106 "alignable must match the " 107 <<
"aligned one (i.e. bowed surface parameters cannot be used for " 108 "composed alignables)\n";
118 throw cms::Exception(
"BadParameters") <<
"TwoBowedSurfacesAlignmentParameters::apply: parameters without " 124 const double halfLength = surface.
length() * 0.5;
125 const double halfLength1 = (halfLength +
ySplit_) * 0.5;
126 const double halfLength2 = (halfLength -
ySplit_) * 0.5;
152 for (
unsigned int i = 0;
i < 3; ++
i) {
153 angles[
i] = (rigidBowPar1[
i + 3] + rigidBowPar2[
i + 3]) * 0.5;
158 const double yMean1 = -halfLength + halfLength1;
159 const double yMean2 = halfLength - halfLength2;
168 (rigidBowPar1[
dy1] + rigidBowPar2[
dy1]) * 0.5,
169 (rigidBowPar1[
dz1] + rigidBowPar2[
dz1]) * 0.5);
184 std::vector<align::Scalar> deformations;
185 deformations.reserve(13);
197 deformations.push_back((rigidBowPar1[
i] - rigidBowPar2[
i]) * 0.5);
200 deformations.push_back(
ySplit_);
216 std::cout <<
"Contents of TwoBowedSurfacesAlignmentParameters:" 217 <<
"\nParameters: " <<
theData->parameters() <<
"\nCovariance: " <<
theData->covariance() << std::endl;
226 const double r =
pos.perp();
237 edm::LogError(
"Alignment") <<
"@SUB=TwoBowedSurfacesAlignmentParameters::ySplitFromAlignable" 238 <<
"There are no split modules for radii < 58, but r = " <<
r;
240 }
else if (fabs(
pos.z()) < 118.) {
242 }
else if (
r > 90.) {
256 }
else if (
r > 75.) {
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Alignable * alignable(void) const
Get pointer to corresponding alignable.
int type() const override
tell type (AlignmentParametersFactory::ParametersType - but no circular dependency) ...
align::Scalar width() const
const AlgebraicVector & parameters(void) const
Get alignment parameters.
const LocalTrajectoryParameters & localParameters() const
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
void apply() override
apply parameters to alignable
Log< level::Error, false > LogError
AlgebraicVector expandVector(const AlgebraicVector &m, const std::vector< bool > &sel) const
AlgebraicSymMatrix expandSymMatrix(const AlgebraicSymMatrix &m, const std::vector< bool > &sel) const
TwoBowedSurfacesAlignmentParameters * cloneFromSelected(const AlgebraicVector ¶meters, const AlgebraicSymMatrix &covMatrix) const override
Clone selected parameters (for update of parameters)
const PositionType & globalPosition() const
Return the global position of the object.
CLHEP::HepMatrix AlgebraicMatrix
void rectify(RotationType &)
Correct a rotation matrix for rounding errors.
void setValid(bool v)
Set validity flag.
virtual void addSurfaceDeformation(const SurfaceDeformation *deformation, bool propagateDown)=0
AlignmentUserVariables * userVariables(void) const
Get pointer to user variables.
TwoBowedSurfacesAlignmentParameters * clone(const AlgebraicVector ¶meters, const AlgebraicSymMatrix &covMatrix) const override
Clone all parameters (for update of parameters)
static double gammaScale(double width, double splitLength)
bool isValid(void) const
Get validity flag.
CLHEP::HepVector AlgebraicVector
AlgebraicVector5 mixedFormatVector() const
AlgebraicVector EulerAngles
BowedSurfaceAlignmentDerivatives BowedDerivs
Give parameters a name (do not change order, see derivatives(..)!)
void setUserVariables(AlignmentUserVariables *auv)
Set pointer to user variables.
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
align::Scalar length() const
constexpr uint16_t localY(uint16_t py, uint16_t n)
virtual void print() const
print parameters to screen
const std::vector< bool > & selector(void) const
Get alignment parameter selector vector.
AlgebraicMatrix derivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &aliDet) const override
Get all derivatives.
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
CLHEP::HepSymMatrix AlgebraicSymMatrix
static unsigned int const shift
double ySplitFromAlignable(const Alignable *ali) const
TwoBowedSurfacesAlignmentParameters(Alignable *alignable)
Constructor with empty parameters/covariance.