25 #include "CLHEP/Random/RandGauss.h" 76 unsigned int nComp = comp.size();
82 for (
unsigned int i = 0;
i < nComp; ++
i) {
87 int subdetlevel =
id.subdetId();
92 if (subdetlevel > 0) {
95 double value0 = CLHEP::RandGauss::shoot(0, value[0]);
96 double value1 = CLHEP::RandGauss::shoot(0, value[1]);
97 double value2 = CLHEP::RandGauss::shoot(0, value[2]);
98 double value3 = CLHEP::RandGauss::shoot(0, value[3]);
99 double value4 = CLHEP::RandGauss::shoot(0, value[4]);
100 double value5 = CLHEP::RandGauss::shoot(0, value[5]);
120 double value0 = CLHEP::RandGauss::shoot(0, constMis);
121 double value1 = CLHEP::RandGauss::shoot(0, constMis);
122 double value2 = CLHEP::RandGauss::shoot(0, constMis);
123 double value3 = CLHEP::RandGauss::shoot(0, dAngle);
124 double value4 = CLHEP::RandGauss::shoot(0, dAngle);
125 double value5 = CLHEP::RandGauss::shoot(0, dAngle);
141 unsigned int nComp = comp.size();
144 for (
unsigned int i = 0;
i < nComp; ++
i) {
149 int subdetlevel =
id.subdetId();
154 double error0 = error[0];
155 double error1 = error[1];
156 double error2 = error[2];
157 double error3 = error[3];
158 double error4 = error[4];
159 double error5 = error[5];
164 if ((level <= 2) && (subdetlevel == 3)) {
167 if ((level == 2) && (nComp == 2)) {
172 if ((level <= 2) && (subdetlevel == 4)) {
184 if ((level == 23) && (subdetlevel == 4)) {
192 if ((level == 22) && (subdetlevel == 4)) {
201 if ((level <= 2) && (subdetlevel == 5)) {
209 if ((level == 2) && (nComp == 2)) {
213 if ((level == 27) && (subdetlevel == 5)) {
222 if ((level <= 2) && (subdetlevel == 6)) {
225 if ((level == 2) && (nComp == 2)) {
229 if ((level == 34) && (subdetlevel == 6)) {
237 if ((level == 33) && (subdetlevel == 6)) {
245 if ((level == 32) && (subdetlevel == 6)) {
257 double* errorData = error_Matrix.Array();
258 errorData[0] = error0 * error0;
259 errorData[2] = error1 * error1;
260 errorData[5] = error2 * error2;
261 errorData[9] = error3 * error3;
262 errorData[14] = error4 * error4;
263 errorData[20] = error5 * error5;
295 if ((level == 37) && (subdetlevel == 1)) {
304 if ((level == 38) && (subdetlevel == 3)) {
313 if ((level == 39) && (subdetlevel == 1)) {
322 if ((level == 7) && (subdetlevel == 1)) {
330 if ((level == 6) && (subdetlevel == 1)) {
338 if ((level == 5) && (subdetlevel == 1)) {
346 if ((level == 4) && (subdetlevel == 1)) {
354 if ((level == 2) && (subdetlevel == 1)) {
362 if ((level == 1) && (subdetlevel == 1)) {
371 if ((level == 13) && (subdetlevel == 2)) {
379 if ((level == 12) && (subdetlevel == 2)) {
387 if ((level == 11) && (subdetlevel == 2)) {
395 if ((level == 10) && (subdetlevel == 2)) {
403 if ((level == 9) && (subdetlevel == 2)) {
411 if ((level == 2) && (subdetlevel == 2)) {
419 if ((level == 1) && (subdetlevel == 2)) {
428 if ((level == 20) && (subdetlevel == 3)) {
436 if ((level == 19) && (subdetlevel == 3)) {
444 if ((level == 18) && (subdetlevel == 3)) {
452 if ((level == 17) && (subdetlevel == 3)) {
460 if ((level == 16) && (subdetlevel == 3)) {
468 if ((level == 15) && (subdetlevel == 3)) {
476 if ((level == 2) && (subdetlevel == 3)) {
484 if ((level == 1) && (subdetlevel == 3)) {
493 if ((level == 25) && (subdetlevel == 4)) {
501 if ((level == 24) && (subdetlevel == 4)) {
509 if ((level == 23) && (subdetlevel == 4)) {
517 if ((level == 22) && (subdetlevel == 4)) {
525 if ((level == 2) && (subdetlevel == 4)) {
533 if ((level == 1) && (subdetlevel == 4)) {
542 if ((level == 30) && (subdetlevel == 5)) {
550 if ((level == 29) && (subdetlevel == 5)) {
558 if ((level == 28) && (subdetlevel == 5)) {
566 if ((level == 27) && (subdetlevel == 5)) {
574 if ((level == 2) && (subdetlevel == 5)) {
582 if ((level == 1) && (subdetlevel == 5)) {
591 if ((level == 36) && (subdetlevel == 6)) {
599 if ((level == 35) && (subdetlevel == 6)) {
607 if ((level == 34) && (subdetlevel == 6)) {
611 deltaRW(4) = 0.00005;
612 deltaRW(5) = 0.00005;
613 deltaRW(6) = 0.00005;
615 if ((level == 33) && (subdetlevel == 6)) {
623 if ((level == 32) && (subdetlevel == 6)) {
627 deltaRW(4) = 0.00015;
628 deltaRW(5) = 0.00015;
629 deltaRW(6) = 0.00015;
631 if ((level == 2) && (subdetlevel == 6)) {
639 if ((level == 1) && (subdetlevel == 6)) {
662 if ((level == 37) && (subdetlevel == 1)) {
671 if ((level == 38) && (subdetlevel == 3)) {
680 if ((level == 39) && (subdetlevel == 1)) {
689 if ((level == 7) && (subdetlevel == 1)) {
697 if ((level == 6) && (subdetlevel == 1)) {
705 if ((level == 5) && (subdetlevel == 1)) {
713 if ((level == 4) && (subdetlevel == 1)) {
717 deltaRW(4) = 0.00005;
718 deltaRW(5) = 0.00005;
719 deltaRW(6) = 0.00005;
721 if ((level == 2) && (subdetlevel == 1)) {
729 if ((level == 1) && (subdetlevel == 1)) {
738 if ((level == 13) && (subdetlevel == 2)) {
746 if ((level == 12) && (subdetlevel == 2)) {
750 deltaRW(4) = 0.00015;
751 deltaRW(5) = 0.00015;
752 deltaRW(6) = 0.00015;
754 if ((level == 11) && (subdetlevel == 2)) {
762 if ((level == 10) && (subdetlevel == 2)) {
770 if ((level == 9) && (subdetlevel == 2)) {
778 if ((level == 2) && (subdetlevel == 2)) {
786 if ((level == 1) && (subdetlevel == 2)) {
795 if ((level == 20) && (subdetlevel == 3)) {
803 if ((level == 19) && (subdetlevel == 3)) {
811 if ((level == 18) && (subdetlevel == 3)) {
819 if ((level == 17) && (subdetlevel == 3)) {
827 if ((level == 16) && (subdetlevel == 3)) {
835 if ((level == 15) && (subdetlevel == 3)) {
843 if ((level == 2) && (subdetlevel == 3)) {
851 if ((level == 1) && (subdetlevel == 3)) {
860 if ((level == 25) && (subdetlevel == 4)) {
868 if ((level == 24) && (subdetlevel == 4)) {
876 if ((level == 23) && (subdetlevel == 4)) {
880 deltaRW(4) = 0.00004;
881 deltaRW(5) = 0.00004;
882 deltaRW(6) = 0.00004;
884 if ((level == 22) && (subdetlevel == 4)) {
888 deltaRW(4) = 0.00004;
889 deltaRW(5) = 0.00004;
890 deltaRW(6) = 0.00004;
892 if ((level == 2) && (subdetlevel == 4)) {
900 if ((level == 1) && (subdetlevel == 4)) {
909 if ((level == 30) && (subdetlevel == 5)) {
913 deltaRW(4) = 0.00025;
914 deltaRW(5) = 0.00025;
915 deltaRW(6) = 0.00025;
917 if ((level == 29) && (subdetlevel == 5)) {
925 if ((level == 28) && (subdetlevel == 5)) {
933 if ((level == 27) && (subdetlevel == 5)) {
941 if ((level == 2) && (subdetlevel == 5)) {
949 if ((level == 1) && (subdetlevel == 5)) {
958 if ((level == 36) && (subdetlevel == 6)) {
966 if ((level == 35) && (subdetlevel == 6)) {
974 if ((level == 34) && (subdetlevel == 6)) {
978 deltaRW(4) = 0.00005;
979 deltaRW(5) = 0.00005;
980 deltaRW(6) = 0.00005;
982 if ((level == 33) && (subdetlevel == 6)) {
990 if ((level == 32) && (subdetlevel == 6)) {
994 deltaRW(4) = 0.00015;
995 deltaRW(5) = 0.00015;
996 deltaRW(6) = 0.00015;
998 if ((level == 2) && (subdetlevel == 6)) {
1002 deltaRW(4) = 0.0001;
1003 deltaRW(5) = 0.0001;
1004 deltaRW(6) = 0.0001;
1006 if ((level == 1) && (subdetlevel == 6)) {
1010 deltaRW(4) = 0.0001;
1011 deltaRW(5) = 0.0001;
1012 deltaRW(6) = 0.0001;
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
virtual void rotateAroundLocalZ(Scalar radians)
Rotation around local z-axis.
Class to update a given geometry with a set of alignments.
def setup(process, global_tag, zero_tesla=False)
GlobalVector diffR(const GlobalVectors ¤t, const GlobalVectors &nominal)
TrackerGeometry * build(const GeometricDet *gd, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
virtual const Alignables & components() const =0
Return vector of all direct components.
edm::ESHandle< Alignments > alignments
void setGeometry(Alignable *)
module which modifies the geometry
#define DEFINE_FWK_MODULE(type)
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
AlgebraicVector getStructureErrors(int, int)
default values for survey uncertainty
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
void applyAlignments(C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
CLHEP::HepVector AlgebraicVector
align::Scalar length() const
void setSurvey(const SurveyDet *)
Set survey info.
virtual void rotateAroundLocalY(Scalar radians)
Rotation around local y-axis.
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
T const * product() const
Alignable * mother() const
Return pointer to container alignable (if any)