CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
TwoBowedSurfacesAlignmentParameters Class Reference

#include <TwoBowedSurfacesAlignmentParameters.h>

Inheritance diagram for TwoBowedSurfacesAlignmentParameters:
AlignmentParameters

Public Types

enum  AlignmentParameterName {
  dx1 = BowedDerivs::dx, dy1 = BowedDerivs::dy, dz1 = BowedDerivs::dz, dslopeX1 = BowedDerivs::dslopeX,
  dslopeY1 = BowedDerivs::dslopeY, drotZ1 = BowedDerivs::drotZ, dsagittaX1 = BowedDerivs::dsagittaX, dsagittaXY1 = BowedDerivs::dsagittaXY,
  dsagittaY1 = BowedDerivs::dsagittaY, dx2 = BowedDerivs::dx + BowedDerivs::N_PARAM, dy2 = BowedDerivs::dy + BowedDerivs::N_PARAM, dz2 = BowedDerivs::dz + BowedDerivs::N_PARAM,
  dslopeX2 = BowedDerivs::dslopeX + BowedDerivs::N_PARAM, dslopeY2 = BowedDerivs::dslopeY + BowedDerivs::N_PARAM, drotZ2 = BowedDerivs::drotZ + BowedDerivs::N_PARAM, dsagittaX2 = BowedDerivs::dsagittaX + BowedDerivs::N_PARAM,
  dsagittaXY2 = BowedDerivs::dsagittaXY + BowedDerivs::N_PARAM, dsagittaY2 = BowedDerivs::dsagittaY + BowedDerivs::N_PARAM, N_PARAM = BowedDerivs::N_PARAM + BowedDerivs::N_PARAM
}
 
typedef
BowedSurfaceAlignmentDerivatives 
BowedDerivs
 Give parameters a name (do not change order, see derivatives(..)!) More...
 
- Public Types inherited from AlignmentParameters
typedef
AlignmentParametersData::DataContainer 
DataContainer
 

Public Member Functions

virtual void apply ()
 apply parameters to alignable More...
 
virtual
TwoBowedSurfacesAlignmentParameters
clone (const AlgebraicVector &parameters, const AlgebraicSymMatrix &covMatrix) const
 Clone all parameters (for update of parameters) More...
 
virtual
TwoBowedSurfacesAlignmentParameters
cloneFromSelected (const AlgebraicVector &parameters, const AlgebraicSymMatrix &covMatrix) const
 Clone selected parameters (for update of parameters) More...
 
virtual AlgebraicMatrix derivatives (const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &aliDet) const
 Get all derivatives. More...
 
virtual void print () const
 print parameters to screen More...
 
 TwoBowedSurfacesAlignmentParameters (Alignable *alignable)
 Constructor with empty parameters/covariance. More...
 
 TwoBowedSurfacesAlignmentParameters (Alignable *alignable, const AlgebraicVector &parameters, const AlgebraicSymMatrix &covMatrix)
 Constructor for full set of parameters. More...
 
 TwoBowedSurfacesAlignmentParameters (Alignable *alignable, const AlgebraicVector &parameters, const AlgebraicSymMatrix &covMatrix, const std::vector< bool > &selection)
 Constructor for selection. More...
 
virtual int type () const
 tell type (AlignmentParametersFactory::ParametersType - but no circular dependency) More...
 
double ySplit () const
 
virtual ~TwoBowedSurfacesAlignmentParameters ()
 Destructor. More...
 
- Public Member Functions inherited from AlignmentParameters
Alignablealignable (void) const
 Get pointer to corresponding alignable. More...
 
 AlignmentParameters ()
 Default constructor. More...
 
 AlignmentParameters (Alignable *object, const AlgebraicVector &par, const AlgebraicSymMatrix &cov)
 Constructor from given input. More...
 
 AlignmentParameters (Alignable *object, const AlgebraicVector &par, const AlgebraicSymMatrix &cov, const std::vector< bool > &sel)
 Constructor including selection of active parameters. More...
 
 AlignmentParameters (Alignable *object, const DataContainer &data)
 Constructor. More...
 
const AlgebraicSymMatrixcovariance (void) const
 Get parameter covariance matrix. More...
 
virtual unsigned int hierarchyLevel () const
 
bool isValid (void) const
 Get validity flag. More...
 
int numSelected (void) const
 Get number of selected parameters. More...
 
const AlgebraicVectorparameters (void) const
 Get alignment parameters. More...
 
AlgebraicSymMatrix selectedCovariance (void) const
 Get covariance matrix of selected parameters. More...
 
virtual AlgebraicMatrix selectedDerivatives (const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &alidet) const
 
AlgebraicVector selectedParameters (void) const
 Get selected parameters. More...
 
const std::vector< bool > & selector (void) const
 Get alignment parameter selector vector. More...
 
void setUserVariables (AlignmentUserVariables *auv)
 Set pointer to user variables. More...
 
void setValid (bool v)
 Set validity flag. More...
 
int size (void) const
 Get number of parameters. More...
 
AlignmentUserVariablesuserVariables (void) const
 Get pointer to user variables. More...
 
virtual ~AlignmentParameters ()
 Destructor. More...
 

Private Member Functions

double ySplitFromAlignable (const Alignable *ali) const
 

Private Attributes

double ySplit_
 

Additional Inherited Members

- Protected Member Functions inherited from AlignmentParameters
AlgebraicSymMatrix collapseSymMatrix (const AlgebraicSymMatrix &m, const std::vector< bool > &sel) const
 
AlgebraicVector collapseVector (const AlgebraicVector &m, const std::vector< bool > &sel) const
 
AlgebraicSymMatrix expandSymMatrix (const AlgebraicSymMatrix &m, const std::vector< bool > &sel) const
 
AlgebraicVector expandVector (const AlgebraicVector &m, const std::vector< bool > &sel) const
 
- Protected Attributes inherited from AlignmentParameters
bool bValid
 True if parameters are valid. More...
 
AlignabletheAlignable
 
DataContainer theData
 
AlignmentUserVariablestheUserVariables
 

Detailed Description

Concrete class for alignment parameters and associated quantities [derived from AlignmentParameters]. The alignable is assumed to have in fact two surfaces devided at a specific local ySplit. The number of parameters N_PARAM is 2x9, i.e. one set of

the half differences of the movements and rotations, to be taken into account, with positive/negative sign, for corrections for the surface at lower/higher y,

Definition at line 40 of file TwoBowedSurfacesAlignmentParameters.h.

Member Typedef Documentation

Give parameters a name (do not change order, see derivatives(..)!)

Definition at line 44 of file TwoBowedSurfacesAlignmentParameters.h.

Member Enumeration Documentation

Enumerator
dx1 
dy1 
dz1 
dslopeX1 
dslopeY1 
drotZ1 
dsagittaX1 
dsagittaXY1 
dsagittaY1 
dx2 
dy2 
dz2 
dslopeX2 
dslopeY2 
drotZ2 
dsagittaX2 
dsagittaXY2 
dsagittaY2 
N_PARAM 

Definition at line 45 of file TwoBowedSurfacesAlignmentParameters.h.

45  {
46  // 1st surface
50  dslopeX1 = BowedDerivs::dslopeX, // NOTE: slope(u) -> halfWidth*tan(beta),
51  dslopeY1 = BowedDerivs::dslopeY, // slope(v) -> halfLength*tan(alpha)
52  drotZ1 = BowedDerivs::drotZ, // rot(w) -> g-scale*gamma
56  // 2nd surface
60  dslopeX2 = BowedDerivs::dslopeX + BowedDerivs::N_PARAM, // NOTE: slope(u) -> k*tan(beta),
61  dslopeY2 = BowedDerivs::dslopeY + BowedDerivs::N_PARAM, // slope(v) -> k*tan(alpha)
62  drotZ2 = BowedDerivs::drotZ + BowedDerivs::N_PARAM, // rot(w) -> m*gamma
66  // number of parameters
67  N_PARAM = BowedDerivs::N_PARAM + BowedDerivs::N_PARAM
68  };

Constructor & Destructor Documentation

TwoBowedSurfacesAlignmentParameters::TwoBowedSurfacesAlignmentParameters ( Alignable alignable)

Constructor with empty parameters/covariance.

Definition at line 27 of file TwoBowedSurfacesAlignmentParameters.cc.

Referenced by clone().

TwoBowedSurfacesAlignmentParameters::TwoBowedSurfacesAlignmentParameters ( Alignable alignable,
const AlgebraicVector parameters,
const AlgebraicSymMatrix covMatrix 
)

Constructor for full set of parameters.

Definition at line 35 of file TwoBowedSurfacesAlignmentParameters.cc.

References edm::hlt::Exception.

37  :
38  AlignmentParameters(alignable, parameters, covMatrix),
39  ySplit_(this->ySplitFromAlignable(alignable))
40 {
41  if (parameters.num_row() != N_PARAM) {
42  throw cms::Exception("BadParameters") << "in TwoBowedSurfacesAlignmentParameters(): "
43  << parameters.num_row() << " instead of " << N_PARAM
44  << " parameters.";
45  }
46 }
const AlgebraicVector & parameters(void) const
Get alignment parameters.
double ySplitFromAlignable(const Alignable *ali) const
AlignmentParameters()
Default constructor.
TwoBowedSurfacesAlignmentParameters::TwoBowedSurfacesAlignmentParameters ( Alignable alignable,
const AlgebraicVector parameters,
const AlgebraicSymMatrix covMatrix,
const std::vector< bool > &  selection 
)

Constructor for selection.

Definition at line 50 of file TwoBowedSurfacesAlignmentParameters.cc.

References edm::hlt::Exception.

53  :
54  AlignmentParameters(alignable, parameters, covMatrix, selection),
55  ySplit_(this->ySplitFromAlignable(alignable))
56 {
57  if (parameters.num_row() != N_PARAM) {
58  throw cms::Exception("BadParameters") << "in TwoBowedSurfacesAlignmentParameters(): "
59  << parameters.num_row() << " instead of " << N_PARAM
60  << " parameters.";
61  }
62 }
selection
main part
Definition: corrVsCorr.py:98
const AlgebraicVector & parameters(void) const
Get alignment parameters.
double ySplitFromAlignable(const Alignable *ali) const
AlignmentParameters()
Default constructor.
virtual TwoBowedSurfacesAlignmentParameters::~TwoBowedSurfacesAlignmentParameters ( )
inlinevirtual

Destructor.

Definition at line 84 of file TwoBowedSurfacesAlignmentParameters.h.

84 {};

Member Function Documentation

void TwoBowedSurfacesAlignmentParameters::apply ( )
virtual

apply parameters to alignable

Implements AlignmentParameters.

Definition at line 129 of file TwoBowedSurfacesAlignmentParameters.cc.

References Alignable::addSurfaceDeformation(), AlignmentParameters::alignable(), drotZ1, drotZ2, dsagittaX1, dsagittaX2, dsagittaXY1, dsagittaXY2, dsagittaY1, dsagittaY2, dslopeX1, dslopeX2, dslopeY1, dslopeY2, dx1, dy1, dz1, edm::hlt::Exception, BowedSurfaceAlignmentDerivatives::gammaScale(), i, AlignableSurface::length(), Alignable::move(), BowedSurfaceAlignmentDerivatives::N_PARAM, align::rectify(), makeMuonMisalignmentScenario::rot, Alignable::rotateInGlobalFrame(), edm::shift, Alignable::surface(), AlignmentParameters::theData, AlignableSurface::toGlobal(), align::toMatrix(), AlignableSurface::width(), and ySplit_.

Referenced by electronTools.AddElectronUserIsolation::__call__(), photonTools.AddPhotonUserIsolation::__call__(), heavyIonTools.ConfigureHeavyIons::__call__(), metTools.AddTcMET::__call__(), muonTools.AddMuonUserIsolation::__call__(), editorTools.UserCodeTool::__call__(), coreTools.RestrictInputToAOD::__call__(), HiCoreTools.RestrictInputToAOD::__call__(), trackTools.MakeAODTrackCandidates::__call__(), cmsswVersionTools.Run52xOn51xTrigger::__call__(), heavyIonTools.ProductionDefaults::__call__(), editorTools.ChangeSource::__call__(), metTools.AddPfMET::__call__(), HiCoreTools.RemoveMCMatching::__call__(), coreTools.RunOnData::__call__(), trackTools.MakePATTrackCandidates::__call__(), trigTools.SwitchOnTrigger::__call__(), cmsswVersionTools.PickRelValInputFiles::__call__(), coreTools.RemoveMCMatching::__call__(), heavyIonTools.SelectionDefaults::__call__(), HiCoreTools.RemoveAllPATObjectsBut::__call__(), heavyIonTools.DisbaleMonteCarloDeps::__call__(), jetTools.RunBTagging::__call__(), HiCoreTools.RemoveSpecificPATObjects::__call__(), trigTools.SwitchOnTriggerStandAlone::__call__(), coreTools.RemoveAllPATObjectsBut::__call__(), trackTools.MakeTrackCandidates::__call__(), coreTools.RemoveSpecificPATObjects::__call__(), HiCoreTools.RemoveCleaning::__call__(), trigTools.SwitchOnTriggerMatching::__call__(), HiCoreTools.AddCleaning::__call__(), coreTools.RemoveCleaning::__call__(), tauTools.AddTauCollection::__call__(), trigTools.SwitchOnTriggerMatchingStandAlone::__call__(), coreTools.AddCleaning::__call__(), jetTools.AddJetCollection::__call__(), trigTools.SwitchOnTriggerMatchEmbedding::__call__(), trigTools.RemoveCleaningFromTriggerMatching::__call__(), jetTools.SwitchJetCollection::__call__(), jetTools.AddJetID::__call__(), metUncertaintyTools.RunMEtUncertainties::__call__(), jetTools.SetTagInfos::__call__(), and jetTools.SwitchJetCorrLevels::__call__().

130 {
131  Alignable *alignable = this->alignable();
132  if (!alignable) {
133  throw cms::Exception("BadParameters")
134  << "TwoBowedSurfacesAlignmentParameters::apply: parameters without alignable";
135  }
136 
137  // Some repeatedly needed variables
138  const AlignableSurface &surface = alignable->surface();
139  const double halfLength = surface.length() * 0.5; // full module
140  const double halfLength1 = (halfLength + ySplit_) * 0.5; // low-y surface
141  const double halfLength2 = (halfLength - ySplit_) * 0.5; // high-y surface
142 
143  // first copy the parameters into separate parts for the two surfaces
144  const AlgebraicVector &params = theData->parameters();
145  std::vector<double> rigidBowPar1(BowedDerivs::N_PARAM); // 1st surface (y < ySplit_)
146  std::vector<double> rigidBowPar2(BowedDerivs::N_PARAM); // 2nd surface (y >= ySplit_)
147  for (unsigned int i = 0; i < BowedDerivs::N_PARAM; ++i) {
148  rigidBowPar1[i] = params[i];
149  rigidBowPar2[i] = params[i + BowedDerivs::N_PARAM];
150  }
151  // Now adjust slopes to angles, note that dslopeX <-> -beta & dslopeY <-> alpha,
152  // see BowedSurfaceAlignmentParameters::rotation(): FIXME: use atan?
153  rigidBowPar1[3] = params[dslopeY1] / halfLength1; // alpha1
154  rigidBowPar2[3] = params[dslopeY2] / halfLength2; // alpha2
155  rigidBowPar1[4] = -params[dslopeX1] / (surface.width() * 0.5); // beta1
156  rigidBowPar2[4] = -params[dslopeX2] / (surface.width() * 0.5); // beta2
157  // gamma is simply scaled
158  const double gammaScale1 = BowedDerivs::gammaScale(surface.width(), 2.0*halfLength1);
159  rigidBowPar1[5] = params[drotZ1] / gammaScale1;
160 // const double gammaScale2 = std::sqrt(halfLength2 * halfLength2
161 // + surface.width() * surface.width()/4.);
162  const double gammaScale2 = BowedDerivs::gammaScale(surface.width(), 2.0*halfLength2);
163  rigidBowPar2[5] = params[drotZ2] / gammaScale2;
164 
165  // Get rigid body rotations of full module as mean of the two surfaces:
166  align::EulerAngles angles(3); // to become 'common' rotation in local frame
167  for (unsigned int i = 0; i < 3; ++i) {
168  angles[i] = (rigidBowPar1[i+3] + rigidBowPar2[i+3]) * 0.5;
169  }
170  // Module rotations are around other axes than the one we determined,
171  // so we have to correct that the surfaces are shifted by the rotation around
172  // the module axis - in linear approximation just an additional shift:
173  const double yMean1 = -halfLength + halfLength1;// y of alpha1 rotation axis in module frame
174  const double yMean2 = halfLength - halfLength2;// y of alpha2 rotation axis in module frame
175  rigidBowPar1[dz1] -= angles[0] * yMean1; // correct w1 for alpha
176  rigidBowPar2[dz1] -= angles[0] * yMean2; // correct w2 for alpha
177  // Nothing for beta1/2 since anyway both around the y-axis of the module.
178  rigidBowPar1[dx1] += angles[2] * yMean1; // correct x1 for gamma
179  rigidBowPar2[dx1] += angles[2] * yMean2; // correct x1 for gamma
180 
181  // Get rigid body shifts of full module as mean of the two surfaces:
182  const align::LocalVector shift((rigidBowPar1[dx1] + rigidBowPar2[dx1]) * 0.5, // dx1!
183  (rigidBowPar1[dy1] + rigidBowPar2[dy1]) * 0.5, // dy1!
184  (rigidBowPar1[dz1] + rigidBowPar2[dz1]) * 0.5);// dz1!
185  // Apply module shift and rotation:
186  alignable->move(surface.toGlobal(shift));
187  // original code:
188  // alignable->rotateInLocalFrame( align::toMatrix(angles) );
189  // correct for rounding errors:
192  alignable->rotateInGlobalFrame(rot);
193 
194  // Fill surface structures with mean bows and half differences for all parameters:
195  std::vector<align::Scalar> deformations; deformations.reserve(13);
196  // first part: average bows
197  deformations.push_back((params[dsagittaX1 ] + params[dsagittaX2 ]) * 0.5);
198  deformations.push_back((params[dsagittaXY1] + params[dsagittaXY2]) * 0.5);
199  deformations.push_back((params[dsagittaY1 ] + params[dsagittaY2 ]) * 0.5);
200  // second part: half difference of all corrections
201  for (unsigned int i = 0; i < BowedDerivs::N_PARAM; ++i) {
202  // sign means that we have to apply e.g.
203  // - sagittaX for sensor 1: deformations[0] + deformations[9]
204  // - sagittaX for sensor 2: deformations[0] - deformations[9]
205  // - additional dx for sensor 1: deformations[3]
206  // - additional dx for sensor 2: -deformations[3]
207  deformations.push_back((rigidBowPar1[i] - rigidBowPar2[i]) * 0.5);
208  }
209  // finally: keep track of where we have split the module
210  deformations.push_back(ySplit_); // index is 12
211 
212  // const SurfaceDeformation deform(SurfaceDeformation::kTwoBowedSurfaces, deformations);
213  const TwoBowedSurfacesDeformation deform(deformations);
214 
215  // FIXME: true to propagate down?
216  // Needed for hierarchy with common deformation parameter,
217  // but that is not possible now anyway.
218  alignable->addSurfaceDeformation(&deform, false);
219 }
align::Scalar width() const
int i
Definition: DBlmapReader.cc:9
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
void rectify(RotationType &)
Correct a rotation matrix for rounding errors.
Definition: Utilities.cc:196
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.
Definition: Alignable.h:126
CLHEP::HepVector AlgebraicVector
AlgebraicVector EulerAngles
Definition: Definitions.h:36
align::Scalar length() const
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
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.
Definition: Utilities.cc:40
static unsigned int const shift
TwoBowedSurfacesAlignmentParameters * TwoBowedSurfacesAlignmentParameters::clone ( const AlgebraicVector parameters,
const AlgebraicSymMatrix covMatrix 
) const
virtual

Clone all parameters (for update of parameters)

Implements AlignmentParameters.

Definition at line 66 of file TwoBowedSurfacesAlignmentParameters.cc.

References AlignmentParameters::alignable(), AlignmentParameters::isValid(), AlignmentParameters::selector(), AlignmentParameters::setUserVariables(), AlignmentParameters::setValid(), TwoBowedSurfacesAlignmentParameters(), and AlignmentParameters::userVariables().

Referenced by cloneFromSelected().

68 {
71 
72  if (this->userVariables()) rbap->setUserVariables(this->userVariables()->clone());
73  rbap->setValid(this->isValid());
74 
75  return rbap;
76 }
const std::vector< bool > & selector(void) const
Get alignment parameter selector vector.
const AlgebraicVector & parameters(void) const
Get alignment parameters.
AlignmentUserVariables * userVariables(void) const
Get pointer to user variables.
void setValid(bool v)
Set validity flag.
Alignable * alignable(void) const
Get pointer to corresponding alignable.
void setUserVariables(AlignmentUserVariables *auv)
Set pointer to user variables.
virtual TwoBowedSurfacesAlignmentParameters * clone(const AlgebraicVector &parameters, const AlgebraicSymMatrix &covMatrix) const
Clone all parameters (for update of parameters)
bool isValid(void) const
Get validity flag.
TwoBowedSurfacesAlignmentParameters(Alignable *alignable)
Constructor with empty parameters/covariance.
TwoBowedSurfacesAlignmentParameters * TwoBowedSurfacesAlignmentParameters::cloneFromSelected ( const AlgebraicVector parameters,
const AlgebraicSymMatrix covMatrix 
) const
virtual

Clone selected parameters (for update of parameters)

Implements AlignmentParameters.

Definition at line 80 of file TwoBowedSurfacesAlignmentParameters.cc.

References clone(), AlignmentParameters::expandSymMatrix(), AlignmentParameters::expandVector(), and AlignmentParameters::selector().

82 {
83  return this->clone(this->expandVector(parameters, this->selector()),
84  this->expandSymMatrix(covMatrix, this->selector()));
85 }
AlgebraicSymMatrix expandSymMatrix(const AlgebraicSymMatrix &m, const std::vector< bool > &sel) const
const std::vector< bool > & selector(void) const
Get alignment parameter selector vector.
const AlgebraicVector & parameters(void) const
Get alignment parameters.
AlgebraicVector expandVector(const AlgebraicVector &m, const std::vector< bool > &sel) const
virtual TwoBowedSurfacesAlignmentParameters * clone(const AlgebraicVector &parameters, const AlgebraicSymMatrix &covMatrix) const
Clone all parameters (for update of parameters)
AlgebraicMatrix TwoBowedSurfacesAlignmentParameters::derivatives ( const TrajectoryStateOnSurface tsos,
const AlignableDetOrUnitPtr aliDet 
) const
virtual

Get all derivatives.

Implements AlignmentParameters.

Definition at line 89 of file TwoBowedSurfacesAlignmentParameters.cc.

References AlignmentParameters::alignable(), BowedSurfaceAlignmentDerivatives::dx, dx2, edm::hlt::Exception, i, AlignableSurface::length(), TrajectoryStateOnSurface::localParameters(), LocalTrajectoryParameters::mixedFormatVector(), BowedSurfaceAlignmentDerivatives::N_PARAM, N_PARAM, query::result, Alignable::surface(), AlignableSurface::width(), and ySplit_.

91 {
92  const Alignable *ali = this->alignable(); // Alignable of these parameters
93  AlgebraicMatrix result(N_PARAM, 2); // initialised with zeros
94 
95  if (ali == alidet) {
96  const AlignableSurface &surf = ali->surface();
97 
98  // matrix of dimension BowedDerivs::N_PARAM x 2
99  const AlgebraicMatrix derivs(BowedDerivs()(tsos, surf.width(), surf.length(),
100  true, ySplit_)); // split at ySplit_!
101 
102  // Parameters belong to surface part with y < ySplit_ or y >= ySplit_?
103  const double localY = tsos.localParameters().mixedFormatVector()[4];
104  const unsigned int indexOffset = (localY < ySplit_ ? 0 : dx2);
105  // Copy derivatives to relevant part of result
106  for (unsigned int i = BowedDerivs::dx; i < BowedDerivs::N_PARAM; ++i) {
107  result[indexOffset + i][0] = derivs[i][0];
108  result[indexOffset + i][1] = derivs[i][1];
109  }
110  } else {
111  // The following is even more difficult for TwoBowedSurfacesAlignmentParameters
112  // than for BowedSurfaceAlignmentParameters where this text comes from:
113  //
114  // We could give this a meaning by applying frame-to-frame derivatives
115  // to the rigid body part of the parameters (be careful that alpha ~= dslopeY
116  // and beta ~= -dslopeX, but with changed scale!)
117  // and keep the surface structure parameters untouched in local meaning.
118  // In this way we could do higher level alignment and determine 'average'
119  // surface structures for the components.
120  throw cms::Exception("MisMatch")
121  << "TwoBowedSurfacesAlignmentParameters::derivatives: The hit alignable must match the "
122  << "aligned one (i.e. bowed surface parameters cannot be used for composed alignables)\n";
123  }
124 
125  return result;
126 }
align::Scalar width() const
int i
Definition: DBlmapReader.cc:9
const LocalTrajectoryParameters & localParameters() const
CLHEP::HepMatrix AlgebraicMatrix
tuple result
Definition: query.py:137
Alignable * alignable(void) const
Get pointer to corresponding alignable.
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:126
align::Scalar length() const
BowedSurfaceAlignmentDerivatives BowedDerivs
Give parameters a name (do not change order, see derivatives(..)!)
AlgebraicVector5 mixedFormatVector() const
void TwoBowedSurfacesAlignmentParameters::print ( void  ) const
virtual

print parameters to screen

Definition at line 228 of file TwoBowedSurfacesAlignmentParameters.cc.

References gather_cfg::cout, and AlignmentParameters::theData.

229 {
230 
231  std::cout << "Contents of TwoBowedSurfacesAlignmentParameters:"
232  << "\nParameters: " << theData->parameters()
233  << "\nCovariance: " << theData->covariance() << std::endl;
234 }
tuple cout
Definition: gather_cfg.py:121
int TwoBowedSurfacesAlignmentParameters::type ( ) const
virtual
double TwoBowedSurfacesAlignmentParameters::ySplit ( ) const
inline
double TwoBowedSurfacesAlignmentParameters::ySplitFromAlignable ( const Alignable ali) const
private

Definition at line 237 of file TwoBowedSurfacesAlignmentParameters.cc.

References Alignable::globalPosition(), pos, and alignCSCRings::r.

238 {
239  if (!ali) return 0.;
240 
241  const align::PositionType pos(ali->globalPosition());
242  const double r = pos.perp();
243 
244  // The returned numbers for TEC are calculated as stated below from
245  // what is found in CMS-NOTE 2003/20.
246  // Note that at that time it was planned to use ST sensors for the outer TEC
247  // while in the end there are only a few of them in the tracker - the others are HPK.
248  // No idea whether there are subtle changes in geometry.
249  // The numbers have been cross checked with y-residuals in data, see
250  // https://hypernews.cern.ch/HyperNews/CMS/get/recoTracking/1018/1/1/2/1/1/1/2/1.html.
251 
252  if (r < 58.) { // Pixel, TIB, TID or TEC ring 1-4
253  edm::LogError("Alignment") << "@SUB=TwoBowedSurfacesAlignmentParameters::ySplitFromAlignable"
254  << "There are no split modules for radii < 58, but r = " << r;
255  return 0.;
256  } else if (fabs(pos.z()) < 118.) { // TOB
257  return 0.;
258  } else if (r > 90.) { // TEC ring 7
259  // W7a Height active= 106.900mm (Tab. 2) (but 106.926 mm p. 40!?)
260  // W7a R min active = 888.400mm (Paragraph 5.5.7)
261  // W7a R max active = W7a R min active + W7a Height active =
262  // = 888.400mm + 106.900mm = 995.300mm
263  // W7b Height active= 94.900mm (Tab. 2) (but 94.876 mm p. 41!?)
264  // W7b R min active = 998.252mm (Paragraph 5.5.8)
265  // W7b R max active = 998.252mm + 94.900mm = 1093.152mm
266  // mean radius module = 0.5*(1093.152mm + 888.400mm) = 990.776mm
267  // mean radius gap = 0.5*(998.252mm + 995.300mm) = 996.776mm
268  // ySplit = (mean radius gap - mean radius module) // local y and r have same directions!
269  // = 996.776mm - 990.776mm = 6mm
270  return 0.6;
271  } else if (r > 75.) { // TEC ring 6
272  // W6a Height active= 96.100mm (Tab. 2) (but 96.136 mm p. 38!?)
273  // W6a R min active = 727.000mm (Paragraph 5.5.5)
274  // W6a R max active = W6a R min active + W6a Height active =
275  // = 727.000mm + 96.100mm = 823.100mm
276  // W6b Height active= 84.900mm (Tab. 2) (but 84.936 mm p. 39!?)
277  // W6b R min active = 826.060mm (Paragraph 5.5.6)
278  // W6b R max active = 826.060mm + 84.900mm = 910.960mm
279  // mean radius module = 0.5*(910.960mm + 727.000mm) = 818.980mm
280  // mean radius gap = 0.5*(826.060mm + 823.100mm) = 824.580mm
281  // -1: local y and r have opposite directions!
282  // ySplit = -1*(mean radius gap - mean radius module)
283  // = -1*(824.580mm - 818.980mm) = -5.6mm
284  return -0.56;
285  } else { // TEC ring 5 - smaller radii alreay excluded before
286  // W5a Height active= 81.200mm (Tab. 2) (but 81.169 mm p. 36!?)
287  // W5a R min active = 603.200mm (Paragraph 5.5.3)
288  // W5a R max active = W5a R min active + W5a Height active =
289  // = 603.200mm + 81.200mm = 684.400mm
290  // W5b Height active= 63.200mm (Tab. 2) (63.198 mm on p. 37)
291  // W5b R min active = 687.293mm (Abschnitt 5.5.4 der note)
292  // W5b R max active = 687.293mm + 63.200mm = 750.493mm
293  // mean radius module = 0.5*(750.493mm + 603.200mm) = 676.8465mm
294  // mean radius gap = 0.5*(687.293mm + 684.400mm) = 685.8465mm
295  // -1: local y and r have opposite directions!
296  // ySplit = -1*(mean radius gap - mean radius module)
297  // = -1*(685.8465mm - 676.8465mm) = -9mm
298  return -0.9;
299  }
300  // return 0.;
301 }
const PositionType & globalPosition() const
Return the global position of the object.
Definition: Alignable.h:129

Member Data Documentation

double TwoBowedSurfacesAlignmentParameters::ySplit_
private

Definition at line 109 of file TwoBowedSurfacesAlignmentParameters.h.

Referenced by apply(), derivatives(), and ySplit().