CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions
BowedSurfaceAlignmentDerivatives Class Reference

#include <BowedSurfaceAlignmentDerivatives.h>

Public Types

enum  AlignmentParameterName {
  dx = 0, dy, dz, dslopeX,
  dslopeY, drotZ, dsagittaX, dsagittaXY,
  dsagittaY, N_PARAM
}
 

Public Member Functions

AlgebraicMatrix operator() (const TrajectoryStateOnSurface &tsos, double uWidth, double vLength, bool doSplit=false, double ySplit=0.) const
 Returns 9x2 jacobian matrix. More...
 

Static Public Member Functions

static double gammaScale (double width, double splitLength)
 

Detailed Description

Calculates alignment derivatives for a bowed surface using Legendre polynomials for the surface structure (as studied by Claus Kleinwort), i.e.

If a surface is split into two parts at a given ySplit value, rotation axes are re-centred to that part hit by the track (as predicted by TSOS) and the length of the surface is re-scaled.

by Gero Flucke, October 2010 $Date$ $Revision$ (last update by $Author$)

Definition at line 25 of file BowedSurfaceAlignmentDerivatives.h.

Member Enumeration Documentation

◆ AlignmentParameterName

Enumerator
dx 
dy 
dz 
dslopeX 
dslopeY 
drotZ 
dsagittaX 
dsagittaXY 
dsagittaY 
N_PARAM 

Definition at line 27 of file BowedSurfaceAlignmentDerivatives.h.

27  {
28  dx = 0,
29  dy,
30  dz,
31  dslopeX, // NOTE: slope(u) -> k*tan(beta),
32  dslopeY, // slope(v) -> k*tan(alpha)
33  drotZ, // rotation around w axis, scaled by gammaScale
34  dsagittaX,
35  dsagittaXY,
36  dsagittaY,
37  N_PARAM
38  };

Member Function Documentation

◆ gammaScale()

double BowedSurfaceAlignmentDerivatives::gammaScale ( double  width,
double  splitLength 
)
static

scale to apply to convert drotZ to karimaki-gamma, depending on module width and length (the latter after splitting!)

Definition at line 88 of file BowedSurfaceAlignmentDerivatives.cc.

88  {
89  // return 0.5 * std::sqrt(width*width + splitLength*splitLength);
90  // return 0.5 * (std::fabs(width) + std::fabs(splitLength));
91  return 0.5 * (width + splitLength);
92 }

References ApeEstimator_cff::width.

Referenced by TwoBowedSurfacesAlignmentParameters::apply(), operator()(), and BowedSurfaceAlignmentParameters::rotation().

◆ operator()()

AlgebraicMatrix BowedSurfaceAlignmentDerivatives::operator() ( const TrajectoryStateOnSurface tsos,
double  uWidth,
double  vLength,
bool  doSplit = false,
double  ySplit = 0. 
) const

Returns 9x2 jacobian matrix.

Definition at line 13 of file BowedSurfaceAlignmentDerivatives.cc.

14  {
16 
17  // track parameters on surface:
18  const AlgebraicVector5 tsosPar(tsos.localParameters().mixedFormatVector());
19  // [1] dxdz : direction tangent in local xz-plane
20  // [2] dydz : direction tangent in local yz-plane
21  // [3] x : local x-coordinate
22  // [4] y : local y-coordinate
23  double myY = tsosPar[4];
24  double myLengthV = vLength;
25  if (doSplit) { // re-'calibrate' y length and transform myY to be w.r.t.
26  // surface middle
27  // Some signs depend on whether we are in surface part below or above
28  // ySplit:
29  const double sign = (tsosPar[4] < ySplit ? +1. : -1.);
30  const double yMiddle = ySplit * 0.5 - sign * vLength * .25; // middle of surface
31  myY = tsosPar[4] - yMiddle;
32  myLengthV = vLength * 0.5 + sign * ySplit;
33  }
34 
35  const AlgebraicMatrix karimaki(KarimakiAlignmentDerivatives()(tsos)); // it's just 6x2...
36  // copy u, v, w from Karimaki - they are independent of splitting
37  result[dx][0] = karimaki[0][0];
38  result[dx][1] = karimaki[0][1];
39  result[dy][0] = karimaki[1][0];
40  result[dy][1] = karimaki[1][1];
41  result[dz][0] = karimaki[2][0];
42  result[dz][1] = karimaki[2][1];
43  const double aScale = gammaScale(uWidth, myLengthV);
44  result[drotZ][0] = myY / aScale; // Since karimaki[5][0] == vx;
45  result[drotZ][1] = karimaki[5][1] / aScale;
46 
47  double uRel = 2. * tsosPar[3] / uWidth; // relative u (-1 .. +1)
48  double vRel = 2. * myY / myLengthV; // relative v (-1 .. +1)
49  // 'range check':
50  const double cutOff = 1.5;
51  if (uRel < -cutOff) {
52  uRel = -cutOff;
53  } else if (uRel > cutOff) {
54  uRel = cutOff;
55  }
56  if (vRel < -cutOff) {
57  vRel = -cutOff;
58  } else if (vRel > cutOff) {
59  vRel = cutOff;
60  }
61 
62  // Legendre polynomials renormalized to LPn(1)-LPn(0)=1 (n>0)
63  const double uLP0 = 1.0;
64  const double uLP1 = uRel;
65  const double uLP2 = uRel * uRel - 1. / 3.;
66  const double vLP0 = 1.0;
67  const double vLP1 = vRel;
68  const double vLP2 = vRel * vRel - 1. / 3.;
69 
70  // 1st order (slopes, replacing angles beta, alpha)
71  result[dslopeX][0] = tsosPar[1] * uLP1 * vLP0;
72  result[dslopeX][1] = tsosPar[2] * uLP1 * vLP0;
73  result[dslopeY][0] = tsosPar[1] * uLP0 * vLP1;
74  result[dslopeY][1] = tsosPar[2] * uLP0 * vLP1;
75 
76  // 2nd order (sagitta)
77  result[dsagittaX][0] = tsosPar[1] * uLP2 * vLP0;
78  result[dsagittaX][1] = tsosPar[2] * uLP2 * vLP0;
79  result[dsagittaXY][0] = tsosPar[1] * uLP1 * vLP1;
80  result[dsagittaXY][1] = tsosPar[2] * uLP1 * vLP1;
81  result[dsagittaY][0] = tsosPar[1] * uLP0 * vLP2;
82  result[dsagittaY][1] = tsosPar[2] * uLP0 * vLP2;
83 
84  return result;
85 }

References drotZ, dsagittaX, dsagittaXY, dsagittaY, dslopeX, dslopeY, dx, dy, dz, gammaScale(), TrajectoryStateOnSurface::localParameters(), LocalTrajectoryParameters::mixedFormatVector(), N_PARAM, mps_fire::result, and Validation_hcalonly_cfi::sign.

ApeEstimator_cff.width
width
Definition: ApeEstimator_cff.py:24
BowedSurfaceAlignmentDerivatives::gammaScale
static double gammaScale(double width, double splitLength)
Definition: BowedSurfaceAlignmentDerivatives.cc:88
BowedSurfaceAlignmentDerivatives::dz
Definition: BowedSurfaceAlignmentDerivatives.h:30
BowedSurfaceAlignmentDerivatives::N_PARAM
Definition: BowedSurfaceAlignmentDerivatives.h:37
Validation_hcalonly_cfi.sign
sign
Definition: Validation_hcalonly_cfi.py:32
BowedSurfaceAlignmentDerivatives::dsagittaX
Definition: BowedSurfaceAlignmentDerivatives.h:34
BowedSurfaceAlignmentDerivatives::dslopeX
Definition: BowedSurfaceAlignmentDerivatives.h:31
KarimakiAlignmentDerivatives
Definition: KarimakiAlignmentDerivatives.h:16
TrajectoryStateOnSurface::localParameters
const LocalTrajectoryParameters & localParameters() const
Definition: TrajectoryStateOnSurface.h:73
BowedSurfaceAlignmentDerivatives::dx
Definition: BowedSurfaceAlignmentDerivatives.h:28
BowedSurfaceAlignmentDerivatives::drotZ
Definition: BowedSurfaceAlignmentDerivatives.h:33
LocalTrajectoryParameters::mixedFormatVector
AlgebraicVector5 mixedFormatVector() const
Definition: LocalTrajectoryParameters.h:135
BowedSurfaceAlignmentDerivatives::dsagittaXY
Definition: BowedSurfaceAlignmentDerivatives.h:35
AlgebraicVector5
ROOT::Math::SVector< double, 5 > AlgebraicVector5
Definition: AlgebraicROOTObjects.h:14
AlgebraicMatrix
CLHEP::HepMatrix AlgebraicMatrix
Definition: AlgebraicObjects.h:14
BowedSurfaceAlignmentDerivatives::dslopeY
Definition: BowedSurfaceAlignmentDerivatives.h:32
mps_fire.result
result
Definition: mps_fire.py:303
BowedSurfaceAlignmentDerivatives::dy
Definition: BowedSurfaceAlignmentDerivatives.h:29
BowedSurfaceAlignmentDerivatives::dsagittaY
Definition: BowedSurfaceAlignmentDerivatives.h:36