// Cocoa Example #2 // // // A simple example of a compound object. // // In the CMS Endcap Alignment scheme, we are intersted in using COPS // sensors to determine the location of Cathode Strip Chambers (CSCs). // For this example, we suppose that 2 COPS fixed wrt to a common centerpoint // form a CSC. We wish to determine the location and orientation of the // CSC about this centerpoint by infering the location of an unknown Xlaser // signal passing through two Reference COPS sensors, whose position and orientation // are well known. // // Here is a rough (ascii) schematic of the setup. // // Xlaser COPS_Near_Reference CSC COPS_Far_Reference // ___________________________________ // / \ // | COPS_Near_CSC COPS_Far_CSC | // _____ | _____ _____ | _____ // | | | | | | | | | | // Xlaser--> | X | ---------> | -> | X | --------------> | X | -> | ---------> | X | --------> // | | | | | | | | | | // ----- | ----- ----- | ----- // | ^ | // | ^ | // | >0< | // \_________________^_________________/ // -0.5m 0.0m ^ +14m // ^ // ^ // The "O" above is the center of the CSC. // // The COPS on the CSC are considered to be 1 m to the right/left of the CSC center // and 0.5m above this center in the CSC local coordinate system. // // Coordinate system used // // (Z, -> ) // Z points to the right. (Along the Xlaser.) // // (X, ^ ) // X points up. // // (Y, . ) // Y points out of the page. // GLOBAL_OPTIONS report_verbose 2 save_matrices 0 debug_verbose 5 //cms_emu 0 // 0 calculates cal+unk values // 1 calculates only unk values calcul_type 1 //Set Script Units length_value_dimension 1 // mm length_error_dimension 2 // um angle_value_dimension 3 // deg angle_error_dimension 2 // urad //VRML, histogram Options (extra) // histograms 0 writeVRML 1 onlyVRML 0 // "onlyVRML" set to 1 stops cocoa from performing the fit. // It stops after writing a vrml file showing the defined // spacial relationships between the components optoNamesVRML 1 //VRMLscale 100. PARAMETERS // Parameters for the CSC layout CSC_Far_COPS_xpos 500. // The COPS farthest from the Xlaser is +0.5 m (x) // from the CSC center CSC_Far_COPS_ypos 0. // The COPS farthest from the Xlaser is +0.0 m (y) // from the CSC center // This value is the height of the COPS dowel // pin off of the center. CSC_Far_COPS_zpos 1000. // The COPS farthest from the Xlaser is -1 m (z) // from the CSC center CSC_Far_COPS_xang 0. // COPS default to pointing along the z-axisI CSC_Far_COPS_yang 0. // COPS default to pointing along the z-axisI CSC_Far_COPS_zang 0. // COPS default to pointing along the z-axisI CSC_Near_Far_pos_Err 50. // CSC position values are known within +/- 50 um of CSC center. CSC_Near_Far_ang_Err 10. // CSC position values are known within +/- 10 urad wrt CSC coordinate system. // Uncertainty in Placement of Reference COPS sensors prec_pos_ref 100 prec_ang_ref 100 // Xlaser (cross-hairlaser) properties prec_pos_las 200 // Uncertainty in package placement prec_ang_las 100 // Uncertainty in package orientation prec_ang_transfer_las 10 // Special Xlasers in Transfer Lines prec_pos_link_las 10 // Uncertainty in Secondary Link laser prec_ang_link_las 5 // Uncertainty in Secondary Link orientation assumedAngleBetweenAxis 90. // This is the assumed angleBetweenAxis for an Xlaser //COPS Calibration Dowel-Pixel Parameters (offset for 1st pixel positions) bi_cops_hCCDcal 57.579 // height above dowel bi_cops_vCCDcal -36.829 // dist to left of dowel bi_rightCCDX_disp -8.171 bi_leftCCDX2_disp -45 bi_upCCDY_disp 65.75 bi_downCCDY_disp 20.75 //DCOPS Calibration and CCD Resolution cal_error_XCCD 65 // Uncertainty of calibration cal_error_YCCD 65 // Uncertainty of calibration prec_CCD 14 // Precision of CCD measurements //CSC Chamber Parameters prec_chamber_pos_det 100 // global placement prec_chamber_ang_det 100 // global orientation // DCOPS Orientation Error on Chamber prec_dowel_ang 2 //---------- EXTRA ENTRIES shift_det 0 devi_det 0 //---------- Precision of Calculation prec_to_calc 100 SYSTEM_TREE_DESCRIPTION object system Xlaser 2 COPS CSC object CSC 2 COPS // CSC = cathode strip chamber SYSTEM_TREE_DATA system Example2 Xlaser myXLaser // This Xlaser is -0.5m z from the first COPS ENTRY { angle angleBetweenAxis assumedAngleBetweenAxis prec_ang_las unk } center X -22.5 prec_pos_las unk Y 43.3 prec_pos_las unk Z -500 prec_pos_las cal angles X 0 prec_ang_las unk Y 180 prec_ang_las unk Z 0 prec_ang_las unk // The COPS should have been calibrated and the parameters below known for each and every // COPS sensor in use. // For now, I will consider all calibration data for the COPS to be the identical settings // used below. (e.g. bi_cops_hCCDcal, et cetera) COPS COPS_Reference1 // This COPS is the first in front of the Xlaser // I am defining its dowel pin to be the zero point of the // global coordinate system. ENTRY { length rightCCDYtoDowel2 bi_cops_hCCDcal cal_error_YCCD cal length rightCCDXtoDowel2 bi_rightCCDX_disp cal_error_XCCD cal length leftCCDYtoDowel2 bi_cops_hCCDcal cal_error_YCCD cal length leftCCDXtoDowel2 bi_leftCCDX2_disp cal_error_XCCD cal length upCCDXtoDowel2 bi_cops_vCCDcal cal_error_XCCD cal length upCCDYtoDowel2 bi_upCCDY_disp cal_error_YCCD cal length downCCDXtoDowel2 bi_cops_vCCDcal cal_error_XCCD cal length downCCDYtoDowel2 bi_downCCDY_disp cal_error_YCCD cal } center X 0 prec_pos_ref cal Y 0 prec_pos_ref cal Z 0 prec_pos_ref cal angles X 0 prec_ang_ref cal Y 0 prec_ang_ref cal Z 0 prec_ang_ref cal // The COPS should have been calibrated and the parameters below known for each and every // COPS sensor in use. // For now, I will consider all calibration data for the COPS to be the identical settings // used below. (e.g. bi_cops_hCCDcal, et cetera) COPS COPS_Reference2 // This COPS is at the Far end of this Simple SLM. // I define its dowel pin to be +14m in the z direction. ENTRY { length rightCCDYtoDowel2 bi_cops_hCCDcal cal_error_YCCD cal length rightCCDXtoDowel2 bi_rightCCDX_disp cal_error_XCCD cal length leftCCDYtoDowel2 bi_cops_hCCDcal cal_error_YCCD cal length leftCCDXtoDowel2 bi_leftCCDX2_disp cal_error_XCCD cal length upCCDXtoDowel2 bi_cops_vCCDcal cal_error_XCCD cal length upCCDYtoDowel2 bi_upCCDY_disp cal_error_YCCD cal length downCCDXtoDowel2 bi_cops_vCCDcal cal_error_XCCD cal length downCCDYtoDowel2 bi_downCCDY_disp cal_error_YCCD cal } center X 0 prec_pos_ref cal Y 0 prec_pos_ref cal Z 14000 prec_pos_ref cal angles X 0 prec_ang_ref cal Y 0 prec_ang_ref cal Z 0 prec_ang_ref cal // The COPS should have been calibrated and the parameters below known for each and every // COPS sensor in use. // For now, I will consider all calibration data for the COPS to be the identical settings // used below. (e.g. bi_cops_hCCDcal, et cetera) // This is the CSC described at the top of this file. It is a cathode // strip chamber consisting of 2 inline COPS mounted on the chamber // relative to the CSC center. // The Xlaser light 'traverses' the CSC, which means that the Xlaser is // undeflected by the CSC. CSC CSC_Chamber center X -500. CSC_Near_Far_pos_Err unk Y 0. CSC_Near_Far_pos_Err unk Z 7000. CSC_Near_Far_pos_Err cal // cocoa can't fit this entry if it is type "unk" // since it is along the axis of the XLaser angles X 0. CSC_Near_Far_ang_Err unk Y 0. CSC_Near_Far_ang_Err unk Z 0. CSC_Near_Far_ang_Err unk COPS COPS_Sensor1 // This is the first sensor (Near) on the CSC panel. ENTRY { length rightCCDYtoDowel2 bi_cops_hCCDcal cal_error_YCCD cal length rightCCDXtoDowel2 bi_rightCCDX_disp cal_error_XCCD cal length leftCCDYtoDowel2 bi_cops_hCCDcal cal_error_YCCD cal length leftCCDXtoDowel2 bi_leftCCDX2_disp cal_error_XCCD cal length upCCDXtoDowel2 bi_cops_vCCDcal cal_error_XCCD cal length upCCDYtoDowel2 bi_upCCDY_disp cal_error_YCCD cal length downCCDXtoDowel2 bi_cops_vCCDcal cal_error_XCCD cal length downCCDYtoDowel2 bi_downCCDY_disp cal_error_YCCD cal } center X 500 CSC_Near_Far_pos_Err cal Y 0 CSC_Near_Far_pos_Err cal Z -1000 CSC_Near_Far_pos_Err cal angles X 0 CSC_Near_Far_ang_Err cal Y 0 CSC_Near_Far_ang_Err cal Z 0 CSC_Near_Far_ang_Err cal COPS COPS_Sensor2 // This is the last sensor (Far) on the CSC panel. ENTRY { length rightCCDYtoDowel2 bi_cops_hCCDcal cal_error_YCCD cal length rightCCDXtoDowel2 bi_rightCCDX_disp cal_error_XCCD cal length leftCCDYtoDowel2 bi_cops_hCCDcal cal_error_YCCD cal length leftCCDXtoDowel2 bi_leftCCDX2_disp cal_error_XCCD cal length upCCDXtoDowel2 bi_cops_vCCDcal cal_error_XCCD cal length upCCDYtoDowel2 bi_upCCDY_disp cal_error_YCCD cal length downCCDXtoDowel2 bi_cops_vCCDcal cal_error_XCCD cal length downCCDYtoDowel2 bi_downCCDY_disp cal_error_YCCD cal } center X CSC_Far_COPS_xpos CSC_Near_Far_pos_Err cal Y CSC_Far_COPS_ypos CSC_Near_Far_pos_Err cal Z CSC_Far_COPS_zpos CSC_Near_Far_pos_Err cal angles X CSC_Far_COPS_xang CSC_Near_Far_ang_Err cal Y CSC_Far_COPS_yang CSC_Near_Far_ang_Err cal Z CSC_Far_COPS_zang CSC_Near_Far_ang_Err cal MEASUREMENTS // simulated value = real measurement (mm) // flag for missed ccd = 0 COPS Example2/myXLaser & Example2/COPS_Reference1 U 14.329 prec_CCD D 14.329 prec_CCD L 14.329 prec_CCD R 14.329 prec_CCD COPS Example2/myXLaser & Example2/COPS_Reference2 U 14.329 prec_CCD D 14.329 prec_CCD L 14.329 prec_CCD R 14.329 prec_CCD COPS Example2/myXLaser & Example2/CSC_Chamber/COPS_Sensor1 // Lets pretend that the Upper CCD (U) on this COPS is broken or // not making measurements properly In this case, we simply weight the U CCD measurement as having a very large uncertainty // to effectively exclude it from the fit. U 14.329 1e9 D 14.329 prec_CCD L 14.329 prec_CCD R 14.329 prec_CCD COPS Example2/myXLaser & Example2/CSC_Chamber/COPS_Sensor2 U 14.329 prec_CCD D 14.329 prec_CCD L 14.329 prec_CCD R 14.329 prec_CCD // -== End of Example #2 Script ==- // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // ^^ Expected Results ^^ // // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // // Running this script (unchanged) in cocoa_v2.0.0 should // yield the following results in the report.out file for // the 'unk' entries : // // // Fit iteration 1 ... // 1 Fit quality is = 2.7098736e-22 // 1 Fit quality cut is = 6.7728922e-23 // GOOD QUALITY OF THE FIT FOR ITERATION 1 = 6.7728922e-23 < 0.1 // // FITTED ENTRY VALUES // NoEnt_unk Optical Object Parameter value (+-error) orig.val (+-error) quality // 0 Example2/myXLaser angleBetweenAxis 90 +- 375.23534 90 +- 100 Q2 DIFF= -2.0608515e-15 // 1 Example2/myXLaser centre_X -22.5 +- 10.259142 -22.5 +- 200 Q2 DIFF= 5.3776428e-16 // 2 Example2/myXLaser centre_Y 43.25 +- 10.346998 43.3 +- 200 Q2 DIFF= -0.05 // 3 Example2/myXLaser angles_X 2.1597772e-19 +- 1 0 +- 100 Q2 DIFF= 2.1597772e-19 // 4 Example2/myXLaser angles_Y 180 +- 1 180 +- 100 Q2 DIFF= 7.0221606e-15 // 5 Example2/myXLaser angles_Z -7.2996719e-16 +- 283.93738 0 +- 100 Q2 DIFF= -7.2996719e-16 // 6 Example2/CSC_Chamber centre_X -500 +- 17.770392 -500 +- 50 Q2 DIFF= -1.6930901e-15 // 7 Example2/CSC_Chamber centre_Y -1.6666676e-14 +- 180.44511 0 +- 50 Q2 DIFF= -1.6666676e-14 // 8 Example2/CSC_Chamber angles_X 2.6540619e-21 +- 7.0710678 0 +- 10 Q2 DIFF= 2.6540619e-21 // 9 Example2/CSC_Chamber angles_Y -5.0351971e-17 +- 9.529643 0 +- 10 Q2 DIFF= -5.0351971e-17 // 10 Example2/CSC_Chamber angles_Z 2.3593727e-15 +- 380.58269 0 +- 10 Q2 DIFF= 2.3593727e-15