29 ySplit_(this->ySplitFromAlignable(ali))
39 ySplit_(this->ySplitFromAlignable(alignable))
41 if (parameters.num_row() != N_PARAM) {
42 throw cms::Exception(
"BadParameters") <<
"in TwoBowedSurfacesAlignmentParameters(): "
43 << parameters.num_row() <<
" instead of " << N_PARAM
55 ySplit_(this->ySplitFromAlignable(alignable))
57 if (parameters.num_row() != N_PARAM) {
58 throw cms::Exception(
"BadParameters") <<
"in TwoBowedSurfacesAlignmentParameters(): "
59 << parameters.num_row() <<
" instead of " << N_PARAM
104 const unsigned int indexOffset = (localY <
ySplit_ ? 0 :
dx2);
107 result[indexOffset +
i][0] = derivs[
i][0];
108 result[indexOffset +
i][1] = derivs[
i][1];
121 <<
"TwoBowedSurfacesAlignmentParameters::derivatives: The hit alignable must match the "
122 <<
"aligned one (i.e. bowed surface parameters cannot be used for composed alignables)\n";
134 <<
"TwoBowedSurfacesAlignmentParameters::apply: parameters without alignable";
139 const double halfLength = surface.
length() * 0.5;
140 const double halfLength1 = (halfLength +
ySplit_) * 0.5;
141 const double halfLength2 = (halfLength -
ySplit_) * 0.5;
148 rigidBowPar1[
i] = params[
i];
153 rigidBowPar1[3] = params[
dslopeY1] / halfLength1;
154 rigidBowPar2[3] = params[
dslopeY2] / halfLength2;
155 rigidBowPar1[4] = -params[
dslopeX1] / (surface.
width() * 0.5);
156 rigidBowPar2[4] = -params[
dslopeX2] / (surface.
width() * 0.5);
159 rigidBowPar1[5] = params[
drotZ1] / gammaScale1;
163 rigidBowPar2[5] = params[
drotZ2] / gammaScale2;
167 for (
unsigned int i = 0;
i < 3; ++
i) {
168 angles[
i] = (rigidBowPar1[
i+3] + rigidBowPar2[
i+3]) * 0.5;
173 const double yMean1 = -halfLength + halfLength1;
174 const double yMean2 = halfLength - halfLength2;
175 rigidBowPar1[
dz1] -= angles[0] * yMean1;
176 rigidBowPar2[
dz1] -= angles[0] * yMean2;
178 rigidBowPar1[
dx1] += angles[2] * yMean1;
179 rigidBowPar2[
dx1] += angles[2] * yMean2;
183 (rigidBowPar1[
dy1] + rigidBowPar2[
dy1]) * 0.5,
184 (rigidBowPar1[
dz1] + rigidBowPar2[
dz1]) * 0.5);
195 std::vector<align::Scalar> deformations; deformations.reserve(13);
207 deformations.push_back((rigidBowPar1[
i] - rigidBowPar2[
i]) * 0.5);
210 deformations.push_back(
ySplit_);
231 std::cout <<
"Contents of TwoBowedSurfacesAlignmentParameters:"
232 <<
"\nParameters: " <<
theData->parameters()
233 <<
"\nCovariance: " <<
theData->covariance() << std::endl;
242 const double r =
pos.perp();
253 edm::LogError(
"Alignment") <<
"@SUB=TwoBowedSurfacesAlignmentParameters::ySplitFromAlignable"
254 <<
"There are no split modules for radii < 58, but r = " <<
r;
256 }
else if (fabs(
pos.z()) < 118.) {
258 }
else if (r > 90.) {
271 }
else if (r > 75.) {
align::Scalar width() const
virtual AlgebraicMatrix derivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &aliDet) const
Get all derivatives.
virtual TwoBowedSurfacesAlignmentParameters * cloneFromSelected(const AlgebraicVector ¶meters, const AlgebraicSymMatrix &covMatrix) const
Clone selected parameters (for update of parameters)
const LocalTrajectoryParameters & localParameters() const
AlgebraicSymMatrix expandSymMatrix(const AlgebraicSymMatrix &m, const std::vector< bool > &sel) const
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
const std::vector< bool > & selector(void) const
Get alignment parameter selector vector.
virtual void apply()
apply parameters to alignable
AlignmentUserVariables * userVariables(void) const
Get pointer to user variables.
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
static double gammaScale(double width, double splitLength)
Alignable * alignable(void) const
Get pointer to corresponding alignable.
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
double ySplitFromAlignable(const Alignable *ali) const
CLHEP::HepVector AlgebraicVector
AlgebraicVector EulerAngles
align::Scalar length() const
AlgebraicVector expandVector(const AlgebraicVector &m, const std::vector< bool > &sel) const
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
virtual int type() const
tell type (AlignmentParametersFactory::ParametersType - but no circular dependency) ...
virtual TwoBowedSurfacesAlignmentParameters * clone(const AlgebraicVector ¶meters, const AlgebraicSymMatrix &covMatrix) const
Clone all parameters (for update of parameters)
AlgebraicVector5 mixedFormatVector() const
bool isValid(void) const
Get validity flag.
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
CLHEP::HepSymMatrix AlgebraicSymMatrix
static unsigned int const shift
TwoBowedSurfacesAlignmentParameters(Alignable *alignable)
Constructor with empty parameters/covariance.
const PositionType & globalPosition() const
Return the global position of the object.
virtual void print() const
print parameters to screen