16 #include "CLHEP/Random/RandGauss.h"
62 unsigned int nComp = comp.size();
68 for (
unsigned int i = 0;
i < nComp; ++
i) {
73 int subdetlevel =
id.subdetId();
78 if (subdetlevel > 0) {
81 double value0 = CLHEP::RandGauss::shoot(0, value[0]);
82 double value1 = CLHEP::RandGauss::shoot(0, value[1]);
83 double value2 = CLHEP::RandGauss::shoot(0, value[2]);
84 double value3 = CLHEP::RandGauss::shoot(0, value[3]);
85 double value4 = CLHEP::RandGauss::shoot(0, value[4]);
86 double value5 = CLHEP::RandGauss::shoot(0, value[5]);
106 double value0 = CLHEP::RandGauss::shoot(0, constMis);
107 double value1 = CLHEP::RandGauss::shoot(0, constMis);
108 double value2 = CLHEP::RandGauss::shoot(0, constMis);
109 double value3 = CLHEP::RandGauss::shoot(0, dAngle);
110 double value4 = CLHEP::RandGauss::shoot(0, dAngle);
111 double value5 = CLHEP::RandGauss::shoot(0, dAngle);
127 unsigned int nComp = comp.size();
130 for (
unsigned int i = 0;
i < nComp; ++
i) {
135 int subdetlevel =
id.subdetId();
140 double error0 = error[0];
141 double error1 = error[1];
142 double error2 = error[2];
143 double error3 = error[3];
144 double error4 = error[4];
145 double error5 = error[5];
150 if ((level <= 2) && (subdetlevel == 3)) {
153 if ((level == 2) && (nComp == 2)) {
158 if ((level <= 2) && (subdetlevel == 4)) {
170 if ((level == 23) && (subdetlevel == 4)) {
178 if ((level == 22) && (subdetlevel == 4)) {
187 if ((level <= 2) && (subdetlevel == 5)) {
195 if ((level == 2) && (nComp == 2)) {
199 if ((level == 27) && (subdetlevel == 5)) {
208 if ((level <= 2) && (subdetlevel == 6)) {
211 if ((level == 2) && (nComp == 2)) {
215 if ((level == 34) && (subdetlevel == 6)) {
223 if ((level == 33) && (subdetlevel == 6)) {
231 if ((level == 32) && (subdetlevel == 6)) {
243 double* errorData = error_Matrix.Array();
244 errorData[0] = error0 * error0;
245 errorData[2] = error1 * error1;
246 errorData[5] = error2 * error2;
247 errorData[9] = error3 * error3;
248 errorData[14] = error4 * error4;
249 errorData[20] = error5 * error5;
281 if ((level == 37) && (subdetlevel == 1)) {
290 if ((level == 38) && (subdetlevel == 3)) {
299 if ((level == 39) && (subdetlevel == 1)) {
308 if ((level == 7) && (subdetlevel == 1)) {
316 if ((level == 6) && (subdetlevel == 1)) {
324 if ((level == 5) && (subdetlevel == 1)) {
332 if ((level == 4) && (subdetlevel == 1)) {
340 if ((level == 2) && (subdetlevel == 1)) {
348 if ((level == 1) && (subdetlevel == 1)) {
357 if ((level == 13) && (subdetlevel == 2)) {
365 if ((level == 12) && (subdetlevel == 2)) {
373 if ((level == 11) && (subdetlevel == 2)) {
381 if ((level == 10) && (subdetlevel == 2)) {
389 if ((level == 9) && (subdetlevel == 2)) {
397 if ((level == 2) && (subdetlevel == 2)) {
405 if ((level == 1) && (subdetlevel == 2)) {
414 if ((level == 20) && (subdetlevel == 3)) {
422 if ((level == 19) && (subdetlevel == 3)) {
430 if ((level == 18) && (subdetlevel == 3)) {
438 if ((level == 17) && (subdetlevel == 3)) {
446 if ((level == 16) && (subdetlevel == 3)) {
454 if ((level == 15) && (subdetlevel == 3)) {
462 if ((level == 2) && (subdetlevel == 3)) {
470 if ((level == 1) && (subdetlevel == 3)) {
479 if ((level == 25) && (subdetlevel == 4)) {
487 if ((level == 24) && (subdetlevel == 4)) {
495 if ((level == 23) && (subdetlevel == 4)) {
503 if ((level == 22) && (subdetlevel == 4)) {
511 if ((level == 2) && (subdetlevel == 4)) {
519 if ((level == 1) && (subdetlevel == 4)) {
528 if ((level == 30) && (subdetlevel == 5)) {
536 if ((level == 29) && (subdetlevel == 5)) {
544 if ((level == 28) && (subdetlevel == 5)) {
552 if ((level == 27) && (subdetlevel == 5)) {
560 if ((level == 2) && (subdetlevel == 5)) {
568 if ((level == 1) && (subdetlevel == 5)) {
577 if ((level == 36) && (subdetlevel == 6)) {
585 if ((level == 35) && (subdetlevel == 6)) {
593 if ((level == 34) && (subdetlevel == 6)) {
597 deltaRW(4) = 0.00005;
598 deltaRW(5) = 0.00005;
599 deltaRW(6) = 0.00005;
601 if ((level == 33) && (subdetlevel == 6)) {
609 if ((level == 32) && (subdetlevel == 6)) {
613 deltaRW(4) = 0.00015;
614 deltaRW(5) = 0.00015;
615 deltaRW(6) = 0.00015;
617 if ((level == 2) && (subdetlevel == 6)) {
625 if ((level == 1) && (subdetlevel == 6)) {
648 if ((level == 37) && (subdetlevel == 1)) {
657 if ((level == 38) && (subdetlevel == 3)) {
666 if ((level == 39) && (subdetlevel == 1)) {
675 if ((level == 7) && (subdetlevel == 1)) {
683 if ((level == 6) && (subdetlevel == 1)) {
691 if ((level == 5) && (subdetlevel == 1)) {
699 if ((level == 4) && (subdetlevel == 1)) {
703 deltaRW(4) = 0.00005;
704 deltaRW(5) = 0.00005;
705 deltaRW(6) = 0.00005;
707 if ((level == 2) && (subdetlevel == 1)) {
715 if ((level == 1) && (subdetlevel == 1)) {
724 if ((level == 13) && (subdetlevel == 2)) {
732 if ((level == 12) && (subdetlevel == 2)) {
736 deltaRW(4) = 0.00015;
737 deltaRW(5) = 0.00015;
738 deltaRW(6) = 0.00015;
740 if ((level == 11) && (subdetlevel == 2)) {
748 if ((level == 10) && (subdetlevel == 2)) {
756 if ((level == 9) && (subdetlevel == 2)) {
764 if ((level == 2) && (subdetlevel == 2)) {
772 if ((level == 1) && (subdetlevel == 2)) {
781 if ((level == 20) && (subdetlevel == 3)) {
789 if ((level == 19) && (subdetlevel == 3)) {
797 if ((level == 18) && (subdetlevel == 3)) {
805 if ((level == 17) && (subdetlevel == 3)) {
813 if ((level == 16) && (subdetlevel == 3)) {
821 if ((level == 15) && (subdetlevel == 3)) {
829 if ((level == 2) && (subdetlevel == 3)) {
837 if ((level == 1) && (subdetlevel == 3)) {
846 if ((level == 25) && (subdetlevel == 4)) {
854 if ((level == 24) && (subdetlevel == 4)) {
862 if ((level == 23) && (subdetlevel == 4)) {
866 deltaRW(4) = 0.00004;
867 deltaRW(5) = 0.00004;
868 deltaRW(6) = 0.00004;
870 if ((level == 22) && (subdetlevel == 4)) {
874 deltaRW(4) = 0.00004;
875 deltaRW(5) = 0.00004;
876 deltaRW(6) = 0.00004;
878 if ((level == 2) && (subdetlevel == 4)) {
886 if ((level == 1) && (subdetlevel == 4)) {
895 if ((level == 30) && (subdetlevel == 5)) {
899 deltaRW(4) = 0.00025;
900 deltaRW(5) = 0.00025;
901 deltaRW(6) = 0.00025;
903 if ((level == 29) && (subdetlevel == 5)) {
911 if ((level == 28) && (subdetlevel == 5)) {
919 if ((level == 27) && (subdetlevel == 5)) {
927 if ((level == 2) && (subdetlevel == 5)) {
935 if ((level == 1) && (subdetlevel == 5)) {
944 if ((level == 36) && (subdetlevel == 6)) {
952 if ((level == 35) && (subdetlevel == 6)) {
960 if ((level == 34) && (subdetlevel == 6)) {
964 deltaRW(4) = 0.00005;
965 deltaRW(5) = 0.00005;
966 deltaRW(6) = 0.00005;
968 if ((level == 33) && (subdetlevel == 6)) {
976 if ((level == 32) && (subdetlevel == 6)) {
980 deltaRW(4) = 0.00015;
981 deltaRW(5) = 0.00015;
982 deltaRW(6) = 0.00015;
984 if ((level == 2) && (subdetlevel == 6)) {
992 if ((level == 1) && (subdetlevel == 6)) {
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
void setSurveyErrors(Alignable *)
module which creates/inserts the survey errors
void analyze(const edm::Event &, const edm::EventSetup &) override
Do nothing for each event.
align::ID id() const
Return the ID of Alignable, i.e. DetId of 'first' component GeomDet(Unit).
T getUntrackedParameter(std::string const &, T const &) const
uint16_t *__restrict__ id
virtual void rotateAroundLocalZ(Scalar radians)
Rotation around local z-axis.
Class to update a given geometry with a set of alignments.
#define DEFINE_FWK_MODULE(type)
TrackerGeometry * build(const GeometricDet *gd, const PTrackerAdditionalParametersPerDet *ptitp, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
GlobalVector diffR(const GlobalVectors ¤t, const GlobalVectors &nominal)
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
void applyAlignments(const C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
bool getData(T &iHolder) const
void setGeometry(Alignable *)
module which modifies the geometry
AlgebraicVector getStructureErrors(int, int)
default values for survey uncertainty
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
virtual const Alignables & components() const =0
Return vector of all direct components.
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomDetToken_
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
const edm::ESGetToken< Alignments, TrackerAlignmentRcd > aliToken_
CLHEP::HepVector AlgebraicVector
const edm::ESGetToken< PTrackerAdditionalParametersPerDet, PTrackerAdditionalParametersPerDetRcd > ptitpToken_
align::Scalar length() const
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
void setSurvey(const SurveyDet *)
Set survey info.
virtual void rotateAroundLocalY(Scalar radians)
Rotation around local y-axis.
const edm::ESGetToken< AlignmentErrorsExtended, TrackerAlignmentErrorExtendedRcd > aliErrToken_
std::vector< Alignable * > Alignables
CreateSurveyRcds(const edm::ParameterSet &)
virtual void rotateAroundLocalX(Scalar radians)
Rotation around local x-axis.
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
math::Error< 6 >::type ErrorMatrix
AlgebraicVector getStructurePlacements(int, int)
default values for assembly precision
Alignable * mother() const
Return pointer to container alignable (if any)