Research > research.fit.edu | Florida Tech



March 19, 2007: Review of Marcus’ report.

________________________________________________________________________________

Comment and list important issues:

(1/17/2007)

Marcus includes shim info for ME2 from Dave Eartly (Verify!)

Subtract: 0 (Long Outer) , -4 mm (Long Inner), -5mm (Short Outer), -8 mm (Short Inner)

from dowel_***_zref 50.1 mm

B=0T (9 iterations) FQ=2342.5 “worsened”.

Chambers have large unphysical rotations!

(1/19/2007)

Shim included for 2 REF DCOPS on the TP.

Add 0.5 mm in Y_SLM=Y_TP direction.

B=0T (5 iterations) FQ=1257 “worsened” (Fit 4: FQ=417).

B=4T (6 iterations) FQ=0.012

(1/31/2007)

File structure on cmsuaf has changed.

Do I also need to change it?

Old: /afs/files/home/room1/hohlmann

New: /uscms/home/hohlmann

Marcus’ note: calcul_type 1 (use only unk values) => program crashed .

Strange! Might want to check.

Marcus sets chambers angles X, Z for me+21_14 to CAL. Verify if corresponding errors are correct!

B=4T (Number of iterations?) FQ=5.2

Large shifts in center_Y and Center_Z directions. (~4.3 mm, ~3.5 mm)

He sets chamber angles to CAL for all 4 chambers:

B=4T (2 iterations) FQ=0.029

B=0T (11 iterations) FQ=180 “cannot improve”

Try “simulated” without shims and with CAL set for chamber angles.

Simulation (NO shims) …1 fit… FQ=2.2E-12

Note GB: If chamber angles are set to CAL( see which object rotated the most (DCOPS, Laser, TP)? On some opposite CCD’s we actually see some laser positions that should provide rotations. If we restrict rotations of the chambers, than something else should rotate. Since we see this effect only on some of the DCOPS (verify how many!) that means that the probability to have the laser rotate is very small. If this is the case than it seems like that the DCOPS must be rotated relative to the CSC surface. We might want to verify this!

Marcus note from (2/16/07)

Now, I notice that the values for U (CCD1) and D (CCD3) jump from 8mm for DCOPS_MEp2_reference_2_IN to 20mm for the first DCOPS on a chamber: DCOPS_outer_MEp2_2_08_OUT.

Note that these DCOPS are very close together along the SLM (not more than 20cm or so). How can the laser beam be so skewed by 12mm and still thread almost all the DCOPS ??

This is what I’m saying!

Either there is something wrong with the DCOPS readout/fit or the DCOPS must be rotated relative to the CSC surface (?)…well, and/or the laser.

------------------

Chamber center definitions (Richard Breedon)

Chamber center defined at 34.9 mm from the narrow end of the frame.

GB: I think apin distances where defined from the center of the line connecting the 2 apins on each chamber (Verify this!)

Verify these values!

ME1/1 possibly 810.0 - 34.9 = 775.1 mm but this has to be checked

ME1/2 912.1 mm

ME1/3 861.6

ME2/1 988.1

ME3/1 888.1

ME4/1 788.6

ME 234/2 1655.1

Check if Marcus left the new values in the SDF!

For ME+2_1:

APIN apin_inner+21_14

centre

X 0 prec_apin_pos fix

Y 0 prec_apin_pos fix

Z -968.883 prec_apin_pos fix 988.1

APIN apin_outer+21_14

centre

X 0 prec_apin_pos fix

Y 0 prec_apin_pos fix

Z 988.187 prec_apin_pos fix

(2/1/2007)

Jim Bellinger’s DCOPS data file:

MTCC_DCOPS_centers_Oct10-Nov6_2006_from_Jim_debug.v6

Marcus names it:

MTCC_DCOPS_raw_data_ME+2_slm2-5_Oct-Nov2006_fromJim.txt

Use “truncate” in xemacs.

(2/3/2007)

Ask Marcus for FORTRAN code (makes correct data input format for COCOA).

Try g77 on cmsuaf.

(2/5/2007)

B=0T data (new data from Jim) …42 iterations…FQ=0.02

DCOPS with bad fits:

Laser beam cannot get all the way across the disk (DCOPS on the opposite side show bad fits with large errors).

Miss 3 DCOPS in each direction.

Marcus tries to take out 3 DCOPS on each side.

B=0T data (new data from Jim) …8 iterations…FQ=1.1E+08

Note (GB): Number of measurements should not be less then number of unknowns.

(2/14/2007)

Marcus changed the object names:

slm22 -> slm_p2_2

me+2 -> MEp2 in all names

las22 -> laser_MEp2_2 and similar replacements of 22->2_2 and 21->2_1

OCMS -> CMS (system name)

Note GB: GB used OCMS because this link was used in the geom file to run iguana (This makes the link between CMS and our directory structure). It does not matter what object names are used in the SDF file as long as you are consistent with definitions everywhere.

(2/16/2007)

Marcus tries with 8 DCOPS at Pt2.

COCOA crashes with:

"solve.c", line 91: singular matrix in function Usolve()

"lufactor.c", line 227: singular matrix in function m_inverse()

Note GB: this is a typical error message when there are more UNK values than measured values.

Marcus:

“The consequence of that is the direction for the U (CCD1) and D (CCD3) CCDs is flipped by 180 degrees.”

This is correct. See my updated drawing: [pic]

Flip by 180 deg =>moves the laser around like crazy; negative laser values (MARCUS)

Check this!

Marcus subtracted measured U & D values from full length of CCD (28.672mm -8.686mm)

& he cannot fit this!

GB: since I defined the ref sensor position and vectors correctly I don’t think we need to do this maneuver. U, D, R & L are defined relative to the Ref sensor reference dowel pin.

(2/21/07)

Marcus tries fitting with laser 5. =>crash

Try with 1 laser (pt5) & 1 Long chamber +>23 iterations (B=0T????) FQ=6.8

This is bad!

Marcus: sets the third chamber angle CAL (TP all pos fix & angles CAL???)

2 iterations FQ=0.00017

Try adding also 1 Short chamber => crash , “solve.c” etc problem

GB: this must be because of number of measured values is not consistent with nr of meas. values

He tries with 3 chambers=> seems to get something.

(2/25/2007)

Marcus tries the same for pt2.

GB: I need to look at the SDF file. There are too many modifications. I need to know what is the final SDF version. (get file from Marcus).

I have a problem with my cryptocard. I cannot login to my account….Grrr

March 20, 2007

I called the helpdesk at Fermilab regarding the login problem to cmsuaf. They told me that I should login to cmswn051 (the last number (1) can be replaced with a number between 1 and 255 /if I understood correctly/ I need to check this.)

/Note: Two month ago (in Jan 2007) I logged in to cmsuaf. /

Update this info in the CMSSW user guide by GB:



Use:

ssh –t username@cmswn051. This works with my cryptocard.

When I login I see the following directories:

afshome nobackup private work

This also changed. I should change dir to afshome to run muon_lpc_setup.csh

scramv1 list (to find new CMSSW version)

New version is: CMSSW_1_3_0_pre6 (Marcus used: CMSSW_0_7_2)

Install this new CMSSW…(as described in the CMSSW user guide by GB & MH daily log 1/15/2007)

_________________________________________________________

Check new data from Jim (formatted by Marcus):



Make plot with CCD1 (UP) laser positions (measurements with laser 2)

This is the RPhi plane (plane perpendicular on the CMS Z direction)

[pic]

|CCD1(UP) pos [mm] |laser pos on CCD1(UP) |error [mm] |

| |[mm] | |

|418 |20.109 |0.002 |

|3404 |18.674 |0.0015 |

|3923 |17.997 |0.0023 |

|5821 |16.898 |0.0032 |

|8817 |13.403 |0.0035 |

|10714 |13.549 |0.3464 |

|11233 |11.455 |0.4276 |

|14219 |9.958 |0.0528 |

|14638 |9.154 |0.0039 |

Marcus is correct regarding the readout on the ref sensor at PT2. One can get a readout of ~ 8.686 mm on CCD1 (UP) on the ref sensor at PT2 if the DCOPS is turned around by 180 deg (compared to the PT2 ref sensor setup on figure from page 4).

Number of pixels on a CCD is 2048.

1 Pixel= 14 (m

Length of CCD=2048*14 (m=28.672 mm

This is the readout value that we would expect if we rotate the DCOPS by 180 deg:

28.672 mm – 8.686 mm= 19.986 mm

Calculated value from extrapolation is 20.982 mm (using the other DCOPS measurements).

May be the DCOPS is set up in the wrong direction???? (I mean physically)...or the readout direction is incorrect… This is NOT a COCOA problem!

The COCOA setup is based on the drawing from page 4 (that should be correct).

The simulation (without shims) is also working ...almost perfect! We compared that also to PG.  

Set of data for Laser at PT5:



[pic]

|CCD1(UP) pos [mm] |laser pos on CCD1(UP) |error [mm] |

| |[mm] | |

|418 |9.741 |0.0546 |

|3404 |10.298 |0.0258 |

|3923 |9.896 |0.1008 |

|5821 |10.233 |0.0017 |

|8817 |9.61 |0.0019 |

|10714 |11.447 |0.0018 |

|11233 |10.341 |0.0017 |

|14219 |10.428 |0.0039 |

|14638 |9.041 |0.0026 |

One can get a readout of ~ 18.545 mm on CCD1 (UP) on the ref sensor at PT2 if the DCOPS is turned around by 180 deg (compared to the PT2 ref sensor setup on figure from page 4).

Number of pixels on a CCD is 2048.

1 Pixel= 14 (m

Length of CCD=2048*14 (m=28.672 mm

This is the readout value that we would expect if we rotate the DCOPS by 180 deg:

28.672 mm – 18.545 mm= 10.127 mm

Calculated value from extrapolation is 10.059 mm (using the other DCOPS measurements).

________________________________________________

Also check calibration setup:

Robert Lee’s calibration values in the COCOA SDF:

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

RL’s setup (picture from the COCOA documentation: )

[pic]

[pic]

Conclusion: Ask D. Eartly to check calib. values (one of the drawings must be wrong)

March 21, 2007

I installed the new CMSSW_1_3_0_pre6.

When I try to build cocoa I get the following error messages:

WARNING: Geometry/Vector/BuildFile in release area of current project does

 not export anything:

**** Geometry/Vector dependency dropped.

****ERROR: Plugin name should be same as the library name.

Please fix the "src/Alignment/LTDRootSource/BuildFile" file and replace

"OpticalAlignmentLTDRootSource" with "AlignmentLTDRootSource"

Please fix the above error otherwise library "AlignmentLTDRootSource"

will not be registered as plugin.

Seems like a file definition problem….

I sent an e-mail to Pedro Arce to help me out.

-------------------------

Changed “OpticalAlignmentLTDRootSource” in the Buildfile (suggested by Pedro) but other problems came up. Error message saying: remove plugin flag from another Buildfile. I checked old CMSSW versions and their BuildFiles contain the same info as this version. So I will not touch this for now.

I will just use an earlier CMSSW version (Marcus used the same): CMSSW_1_2_0

I had some warnings also in this COCOA installation but at least I could produce the executable. I hope these compilation warnings will not affect my work. I will just try to run cocoa and see what I get.

---------------------------

I put all the files from Marcus (SDF, data files, etc) in my …/work/cocoa/CMSSW_1_2_0/src/

Directory. Here I also created the Alignment and CondFormats directories (cvs co Alignment, cvs co CondFormats).

Tasks that I’m working on right now:

1) Understand present SDF structure

2) Check COCOA simulation results in the following case: use data that is off-center for CCD1 and CCD3, e.g. not 14mm dead in the center, but 20mm or 5mm, to destroy the left-right symmetry in the simulated data.

3) Make a similar drawing like the one from page 4 where also the CSC DCOPS are included (show ref sensor dowel pin and readout directions)

4) Take out transfer DCOPS from the transfer plate (this might help to solve the S:0 problem)

Also check what Pedro suggests:

“Did you look if the

measurements that do not move depend on any other:

debug_verbose 3

and check for 'DERI'

And why the simulated value is 0:

debug_verbose 5

and follow the "@@@@ Start calculation of simulated value of..”

E-mail From Celso:

“What is indeed strange is your Simulated value at 0 stable over

fits...it seems as if COCOA is not changing the position of

those two Dcops -or the change is acompanied exactly by he movement of

the laser, which is even stranger...-.”

-------------------------------------------

Note: regarding PT2 ref sensor CCD1 readout =8.686 mm for Laser 2 measurement (plot from page 6) & PT2 ref sensor CCD1 readout =18.545 mm for Laser 5 measurement (plot from page 7)

[pic]

If you want to compare this drawing to the page 4 drawing just flip it around an imaginary horizontal axes by 180 deg.

Same idea for the Laser 5 measurement…

March 22, 2007

Copied all files from /uscms/home/hohlmann/work/cocoa/CMSSW_1_2_0/Analysis

Verify if all COCOA related settings and modifications are included in the new version (I use a new CMSSW). See settings starting on page 49 in the Userguide by GB from webpage research.fit.edu/hep/documents/GB_COCOA_alignment_SLM25_summary_GB_Dec_20_06_final_v4

Some modifications seem to be included in this version.

I HAD TO INCLUDE

theGlobalOptions[ ALIstring("dumpOptOGlobalInReport") ] = 0;

in the file

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaUtilities/src/

Otherwise I get an error message that global option dumpOptOGlobalInReport 1

not found.

I need this option to get CMS coordinates in the cocoa output.

!!!!when I run cocoa I don't get the CMS coordinates!! (why??)

I also changed in /uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaFit/src/

//ALIdouble minCorrel = 1.E-6;

to

ALIdouble minCorrel = 1.;

to suppress the long list of correlation output.

---------------

I'm running cocoa on the SDF (by Marcus)

ME2_SLM25_WITH_SHIMS_AND_ROTATIONS_RESTRICTED_LAS2_7DCOPS_Official_names.txt

& data: slm25_b0t_data_ev21_03Nov06_00_01_laser2_only_7DCOPS.txt

(from Jim, formatted by Marcus)

I get

Fit iteration 49 ...

49 Fit quality is = 1.77711e+07

This is bad!

Marcus here is using only 1 chamber with two DCOPS + 1 ref sensor at PT2

DCOPS id: 35, 36, 37

Let's see what I get with 9 DCOPS.

Negative laser positions must be excluded or flagged with zero /Marcus left

the numbers negative...I think neg numbers cannot be used!)

Errors are +/-. Since length of CCD is 28.672 mm. I think the

error corresp. to a zero flag should be +/- 14.336 mm= 14.336 micrometer.

I will exclude the transfer sensors.

I will use the following objects: SLM line, 1 TP, 1 Ref sensors, 1 laser, 8 CSC DCOPS.

I set laser to (center: x cal,y cal,z fix; angle: x cal, y cal, z cal)

Marcus used unk for angle x and y.

Since the laser is on the TP and I set the TP to fix (center and angle) I

think the laser should be cal/fix.

With this setup I get:

Fit iteration 2 ...

2 Fit quality is = 5.28738e-06 (GOOD!!)

It would be a good idea to compare these chamber displacements to PG.

Where are the PG results? (ask Marcus)

Here is the report.out from iteration 2:

Fit iteration 2 ...

2 Fit quality is = 5.2873841e-06

GOOD QUALITY OF THE FIT FOR ITERATION 2 = 5.2873841e-06 < 0.1 | 61178606 < 1e-06

FITTED VALUES

nEnt_unk Optical Object Parameter value (+-error) orig.val (+-error) quality

%%%% Optical Object: CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2

CAL: 1 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 centre_X -22.5 +- 20 -22.5 +- 20 Q1

CAL: 2 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 centre_Y 43.25 +- 20 43.25 +- 20 Q1

CAL: 3 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 centre_Z 1.8983698e-12 +- 20 0 +- 20 Q1

CAL: 4 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_X 8.9854594e-05 +- 9.9913599 0 +- 10 Q1

CAL: 5 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_Y 0.00078338662 +- 9.9139703 0 +- 10 Q1

CAL: 6 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_Z -0.00010218063 +- 9.9994683 0 +- 10 Q1

UNK: 0 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angleBetweenAxis 89.767088 +- 1152.9967 90 +- 100 Q2

%%%% Optical Object: CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN

CAL: 15 CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN centre_X -3.0615159e-17 +- 20 0 +- 20 Q1

CAL: 16 CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN centre_Y 0.5 +- 20 0.5 +- 20 Q1

CAL: 17 CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN centre_Z -1.8745759e-33 +- 20 0 +- 20 Q1

CAL: 18 CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN angles_X 0 +- 10 0 +- 10 Q1

CAL: 19 CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN angles_Y 0 +- 10 0 +- 10 Q1

CAL: 20 CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN angles_Z 0 +- 10 0 +- 10 Q1

CAL: 7 CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN rightCCDYtoDowel2 57.579 +- 65 57.579 +- 65 Q1

CAL: 8 CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN leftCCDYtoDowel2 57.579 +- 65 57.579 +- 65 Q1

CAL: 9 CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN rightCCDXtoDowel2 -8.171 +- 65 -8.171 +- 65 Q1

CAL: 10 CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN leftCCDXtoDowel2 -45 +- 65 -45 +- 65 Q1

CAL: 11 CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN upCCDXtoDowel2 -36.829 +- 65 -36.829 +- 65 Q1

CAL: 12 CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN upCCDYtoDowel2 65.75 +- 65 65.75 +- 65 Q1

CAL: 13 CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN downCCDXtoDowel2 -36.829 +- 65 -36.829 +- 65 Q1

CAL: 14 CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN downCCDYtoDowel2 20.75 +- 65 20.75 +- 65 Q1

%%%% Optical Object: CMS/slm_p2_2/MEp2_tp2

FIX: -1 CMS/slm_p2_2/MEp2_tp2 centre_X -7175.829 +- 0 -7175.829 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_tp2 centre_Y -43.25 +- 0 -43.25 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_tp2 centre_Z 22.5 +- 0 22.5 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_tp2 angles_X 0 +- 0 0 +- 698 Q0

FIX: -1 CMS/slm_p2_2/MEp2_tp2 angles_Y -90 +- 0 -90 +- 698 Q0

FIX: -1 CMS/slm_p2_2/MEp2_tp2 angles_Z 0 +- 0 0 +- 698 Q0

%%%% Optical Object: CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN

CAL: 35 CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN centre_X 271.61262 +- 125.45919 272.081 +- 144 Q1

CAL: 36 CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN centre_Y 40.37662 +- 401.95432 45.1 +- 538 Q1

CAL: 37 CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN centre_Z 992.13403 +- 99.818259 992.094 +- 100 Q1

CAL: 38 CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN angles_X 0 +- 2 0 +- 2 Q1

CAL: 39 CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN angles_Y 190 +- 2 190 +- 2 Q1

CAL: 40 CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN angles_Z 0 +- 1.9999995 0 +- 2 Q1

CAL: 27 CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN rightCCDYtoDowel2 57.548185 +- 54.321128 57.579 +- 65 Q1

CAL: 28 CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN leftCCDYtoDowel2 57.540863 +- 54.269629 57.579 +- 65 Q1

CAL: 29 CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN rightCCDXtoDowel2 -8.1711236 +- 64.999842 -8.171 +- 65 Q1

CAL: 30 CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN leftCCDXtoDowel2 -45.000153 +- 64.999842 -45 +- 65 Q1

CAL: 31 CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN upCCDXtoDowel2 -36.832715 +- 63.920761 -36.829 +- 65 Q1

CAL: 32 CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN upCCDYtoDowel2 65.75 +- 65 65.75 +- 65 Q1

CAL: 33 CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN downCCDXtoDowel2 -36.728089 +- 62.338269 -36.829 +- 65 Q1

CAL: 34 CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN downCCDYtoDowel2 20.750005 +- 65 20.75 +- 65 Q1

%%%% Optical Object: CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN

CAL: 49 CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN centre_X -12.638623 +- 125.45919 -13.107 +- 144 Q1

CAL: 50 CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN centre_Y 46.823421 +- 401.95159 42.1 +- 538 Q1

CAL: 51 CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN centre_Z -884.37003 +- 99.818259 -884.33 +- 100 Q1

CAL: 52 CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN angles_X 0 +- 2 0 +- 2 Q1

CAL: 53 CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN angles_Y 10 +- 2 10 +- 2 Q1

CAL: 54 CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN angles_Z 2.9423373e-07 +- 1.9999985 0 +- 2 Q1

CAL: 41 CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN rightCCDYtoDowel2 57.922289 +- 50.586338 57.579 +- 65 Q1

CAL: 42 CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN leftCCDYtoDowel2 57.304665 +- 50.617684 57.579 +- 65 Q1

CAL: 43 CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN rightCCDXtoDowel2 -8.1723772 +- 64.999794 -8.171 +- 65 Q1

CAL: 44 CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN leftCCDXtoDowel2 -44.998899 +- 64.999794 -45 +- 65 Q1

CAL: 45 CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN upCCDXtoDowel2 -36.783955 +- 46.1619 -36.829 +- 65 Q1

CAL: 46 CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN upCCDYtoDowel2 65.749998 +- 65 65.75 +- 65 Q1

CAL: 47 CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN downCCDXtoDowel2 -36.776848 +- 46.237509 -36.829 +- 65 Q1

CAL: 48 CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN downCCDYtoDowel2 20.749997 +- 65 20.75 +- 65 Q1

%%%% Optical Object: CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14

FIX: -1 CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 centre_X 1.2911616e-14 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 centre_Y -1.1100303e-13 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 centre_Z -968.883 +- 0 -968.883 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 angles_X 0 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 angles_Y 0 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 angles_Z 0 +- 0 0 +- 100 Q0

%%%% Optical Object: CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14

FIX: -1 CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 centre_X -2.3186302e-14 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 centre_Y -3.1991974e-13 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 centre_Z 988.187 +- 0 988.187 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 angles_X 0 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 angles_Y 0 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 angles_Z 0 +- 0 0 +- 100 Q0

%%%% Optical Object: CMS/slm_p2_2/MEp2_1_14

CAL: 21 CMS/slm_p2_2/MEp2_1_14 centre_X 2371.279 +- 100 2371.279 +- 100 Q1

UNK: 22 CMS/slm_p2_2/MEp2_1_14 centre_Y -92.01332 +- 394.51974 -93.35 +- 100 Q2

UNK: 23 CMS/slm_p2_2/MEp2_1_14 centre_Z 117.99722 +- 145.47876 118.16258 +- 100 Q2

CAL: 24 CMS/slm_p2_2/MEp2_1_14 angles_X 0.017657947 +- 97.29719 0 +- 100 Q1

CAL: 25 CMS/slm_p2_2/MEp2_1_14 angles_Y 79.975062 +- 75.408243 80 +- 100 Q1

CAL: 26 CMS/slm_p2_2/MEp2_1_14 angles_Z -0.01774199 +- 97.213677 0 +- 100 Q1

%%%% Optical Object: CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT

CAL: 69 CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT centre_X 13.107 +- 144 13.107 +- 144 Q1

CAL: 70 CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT centre_Y 42.100001 +- 538 42.1 +- 538 Q1

CAL: 71 CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT centre_Z -884.33 +- 100 -884.33 +- 100 Q1

CAL: 72 CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT angles_X 0 +- 2 0 +- 2 Q1

CAL: 73 CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT angles_Y 170 +- 2 170 +- 2 Q1

CAL: 74 CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT angles_Z 1.8263322e-06 +- 1.999999 0 +- 2 Q1

CAL: 61 CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT rightCCDYtoDowel2 58.017287 +- 50.646175 57.579 +- 65 Q1

CAL: 62 CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT leftCCDYtoDowel2 57.140715 +- 50.646286 57.579 +- 65 Q1

CAL: 63 CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT rightCCDXtoDowel2 -8.1727829 +- 64.999789 -8.171 +- 65 Q1

CAL: 64 CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT leftCCDXtoDowel2 -44.998217 +- 64.999789 -45 +- 65 Q1

CAL: 65 CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT upCCDXtoDowel2 -35.710598 +- 55.003651 -36.829 +- 65 Q1

CAL: 66 CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT upCCDYtoDowel2 65.750005 +- 65 65.75 +- 65 Q1

CAL: 67 CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT downCCDXtoDowel2 -37.947402 +- 55.003651 -36.829 +- 65 Q1

CAL: 68 CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT downCCDYtoDowel2 20.749995 +- 65 20.75 +- 65 Q1

%%%% Optical Object: CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT

CAL: 83 CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT centre_X -272.081 +- 144 -272.081 +- 144 Q1

CAL: 84 CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT centre_Y 45.1 +- 538 45.1 +- 538 Q1

CAL: 85 CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT centre_Z 992.094 +- 100 992.094 +- 100 Q1

CAL: 86 CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT angles_X 0 +- 2 0 +- 2 Q1

CAL: 87 CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT angles_Y -10 +- 2 -10 +- 2 Q1

CAL: 88 CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT angles_Z 0 +- 2 0 +- 2 Q1

CAL: 75 CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT rightCCDYtoDowel2 57.579 +- 65 57.579 +- 65 Q1

CAL: 76 CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT leftCCDYtoDowel2 57.579 +- 65 57.579 +- 65 Q1

CAL: 77 CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT rightCCDXtoDowel2 -8.171 +- 65 -8.171 +- 65 Q1

CAL: 78 CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT leftCCDXtoDowel2 -45 +- 65 -45 +- 65 Q1

CAL: 79 CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT upCCDXtoDowel2 -36.829 +- 65 -36.829 +- 65 Q1

CAL: 80 CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT upCCDYtoDowel2 65.75 +- 65 65.75 +- 65 Q1

CAL: 81 CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT downCCDXtoDowel2 -36.829 +- 65 -36.829 +- 65 Q1

CAL: 82 CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT downCCDYtoDowel2 20.75 +- 65 20.75 +- 65 Q1

%%%% Optical Object: CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04

FIX: -1 CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 centre_X 3.4534793e-14 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 centre_Y -4.3996239e-13 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 centre_Z -968.883 +- 0 -968.883 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 angles_X 0 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 angles_Y 0 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 angles_Z 0 +- 0 0 +- 100 Q0

%%%% Optical Object: CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04

FIX: -1 CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 centre_X 8.1237707e-14 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 centre_Y -2.0485867e-13 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 centre_Z 988.187 +- 0 988.187 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 angles_X 0 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 angles_Y 0 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 angles_Z 0 +- 0 0 +- 100 Q0

%%%% Optical Object: CMS/slm_p2_2/MEp2_1_04

CAL: 55 CMS/slm_p2_2/MEp2_1_04 centre_X -2371.279 +- 100 -2371.279 +- 100 Q1

UNK: 56 CMS/slm_p2_2/MEp2_1_04 centre_Y -82.437205 +- 557.44461 -93.35 +- 100 Q2

UNK: 57 CMS/slm_p2_2/MEp2_1_04 centre_Z 121.76729 +- 186.11198 118.16258 +- 100 Q2

CAL: 58 CMS/slm_p2_2/MEp2_1_04 angles_X -0.00080435458 +- 99.99604 0 +- 100 Q1

CAL: 59 CMS/slm_p2_2/MEp2_1_04 angles_Y -79.999999 +- 100 -80 +- 100 Q1

CAL: 60 CMS/slm_p2_2/MEp2_1_04 angles_Z 1.4103099e-06 +- 100 0 +- 100 Q1

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN

CAL: 103 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN centre_X 279.8204 +- 132.87603 280.199 +- 144 Q1

CAL: 104 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN centre_Y 50.078541 +- 537.25489 50.1 +- 538 Q1

CAL: 105 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN centre_Z 1657.1671 +- 99.972227 1657.151 +- 100 Q1

CAL: 106 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN angles_X 0 +- 2 0 +- 2 Q1

CAL: 107 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN angles_Y 185 +- 2 185 +- 2 Q1

CAL: 108 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN angles_Z -8.0718793e-07 +- 1.9999993 0 +- 2 Q1

CAL: 95 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN rightCCDYtoDowel2 57.578841 +- 64.999335 57.579 +- 65 Q1

CAL: 96 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN leftCCDYtoDowel2 57.578844 +- 64.999335 57.579 +- 65 Q1

CAL: 97 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN rightCCDXtoDowel2 -8.1710006 +- 65 -8.171 +- 65 Q1

CAL: 98 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN leftCCDXtoDowel2 -45.000001 +- 65 -45 +- 65 Q1

CAL: 99 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN upCCDXtoDowel2 -37.196461 +- 51.348738 -36.829 +- 65 Q1

CAL: 100 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN upCCDYtoDowel2 65.750001 +- 65 65.75 +- 65 Q1

CAL: 101 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN downCCDXtoDowel2 -36.384098 +- 51.052965 -36.829 +- 65 Q1

CAL: 102 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN downCCDYtoDowel2 20.749999 +- 65 20.75 +- 65 Q1

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN

CAL: 117 CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN centre_X 20.300607 +- 132.87603 19.922 +- 144 Q1

CAL: 118 CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN centre_Y 46.121651 +- 537.24143 46.1 +- 538 Q1

CAL: 119 CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN centre_Z -1317.8491 +- 99.972227 -1317.833 +- 100 Q1

CAL: 120 CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN angles_X 0 +- 2 0 +- 2 Q1

CAL: 121 CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN angles_Y 185 +- 2 185 +- 2 Q1

CAL: 122 CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN angles_Z -6.8934747e-08 +- 1.9999999 0 +- 2 Q1

CAL: 109 CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN rightCCDYtoDowel2 57.57937 +- 64.99734 57.579 +- 65 Q1

CAL: 110 CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN leftCCDYtoDowel2 57.578946 +- 64.998677 57.579 +- 65 Q1

CAL: 111 CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN rightCCDXtoDowel2 -8.1709985 +- 65 -8.171 +- 65 Q1

CAL: 112 CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN leftCCDXtoDowel2 -45 +- 65 -45 +- 65 Q1

CAL: 113 CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN upCCDXtoDowel2 -36.821659 +- 64.279069 -36.829 +- 65 Q1

CAL: 114 CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN upCCDYtoDowel2 65.75 +- 65 65.75 +- 65 Q1

CAL: 115 CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN downCCDXtoDowel2 -36.913783 +- 63.317524 -36.829 +- 65 Q1

CAL: 116 CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN downCCDYtoDowel2 20.75 +- 65 20.75 +- 65 Q1

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_27/apin_inner_MEp2_2_27

FIX: -1 CMS/slm_p2_2/MEp2_2_27/apin_inner_MEp2_2_27 centre_X -6.2521401e-14 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_27/apin_inner_MEp2_2_27 centre_Y 3.4460997e-13 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_27/apin_inner_MEp2_2_27 centre_Z -1655.191 +- 0 -1655.191 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_27/apin_inner_MEp2_2_27 angles_X 0 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_27/apin_inner_MEp2_2_27 angles_Y 0 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_27/apin_inner_MEp2_2_27 angles_Z 0 +- 0 0 +- 100 Q0

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_27/apin_outer_MEp2_2_27

FIX: -1 CMS/slm_p2_2/MEp2_2_27/apin_outer_MEp2_2_27 centre_X -4.6820388e-14 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_27/apin_outer_MEp2_2_27 centre_Y -3.4461002e-13 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_27/apin_outer_MEp2_2_27 centre_Z 1655.191 +- 0 1655.191 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_27/apin_outer_MEp2_2_27 angles_X 0 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_27/apin_outer_MEp2_2_27 angles_Y 0 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_27/apin_outer_MEp2_2_27 angles_Z 0 +- 0 0 +- 100 Q0

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_27

CAL: 89 CMS/slm_p2_2/MEp2_2_27 centre_X 5225.848 +- 100 5225.848 +- 100 Q1

UNK: 90 CMS/slm_p2_2/MEp2_2_27 centre_Y -99.983829 +- 585.86805 -93.35 +- 100 Q2

UNK: 91 CMS/slm_p2_2/MEp2_2_27 centre_Z 160.69639 +- 167.39367 157.20274 +- 100 Q2

CAL: 92 CMS/slm_p2_2/MEp2_2_27 angles_X -6.0686273e-05 +- 99.956348 0 +- 100 Q1

CAL: 93 CMS/slm_p2_2/MEp2_2_27 angles_Y 84.968639 +- 59.686252 85 +- 100 Q1

CAL: 94 CMS/slm_p2_2/MEp2_2_27 angles_Z -0.00012821048 +- 99.957224 0 +- 100 Q1

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT

CAL: 137 CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT centre_X -19.655897 +- 132.62381 -19.922 +- 144 Q1

CAL: 138 CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT centre_Y 47.602501 +- 423.62731 46.1 +- 538 Q1

CAL: 139 CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT centre_Z -1317.8218 +- 99.972243 -1317.833 +- 100 Q1

CAL: 140 CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT angles_X 0 +- 2 0 +- 2 Q1

CAL: 141 CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT angles_Y -5 +- 2 -5 +- 2 Q1

CAL: 142 CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT angles_Z 1.0164775e-06 +- 1.9999985 0 +- 2 Q1

CAL: 129 CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT rightCCDYtoDowel2 57.888431 +- 50.587326 57.579 +- 65 Q1

CAL: 130 CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT leftCCDYtoDowel2 57.291501 +- 50.586631 57.579 +- 65 Q1

CAL: 131 CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT rightCCDXtoDowel2 -8.169746 +- 64.99979 -8.171 +- 65 Q1

CAL: 132 CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT leftCCDXtoDowel2 -45.001165 +- 64.99979 -45 +- 65 Q1

CAL: 133 CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT upCCDXtoDowel2 -37.0408 +- 45.62915 -36.829 +- 65 Q1

CAL: 134 CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT upCCDYtoDowel2 65.749998 +- 65 65.75 +- 65 Q1

CAL: 135 CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT downCCDXtoDowel2 -36.562866 +- 45.629865 -36.829 +- 65 Q1

CAL: 136 CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT downCCDYtoDowel2 20.750003 +- 65 20.75 +- 65 Q1

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT

CAL: 151 CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT centre_X -280.4651 +- 132.62381 -280.199 +- 144 Q1

CAL: 152 CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT centre_Y 48.597511 +- 423.6294 50.1 +- 538 Q1

CAL: 153 CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT centre_Z 1657.1398 +- 99.972243 1657.151 +- 100 Q1

CAL: 154 CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT angles_X 0 +- 2 0 +- 2 Q1

CAL: 155 CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT angles_Y -5 +- 2 -5 +- 2 Q1

CAL: 156 CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT angles_Z 7.7077579e-07 +- 1.9999985 0 +- 2 Q1

CAL: 143 CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT rightCCDYtoDowel2 57.999685 +- 50.775176 57.579 +- 65 Q1

CAL: 144 CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT leftCCDYtoDowel2 57.136384 +- 50.779747 57.579 +- 65 Q1

CAL: 145 CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT rightCCDXtoDowel2 -8.1692951 +- 64.999792 -8.171 +- 65 Q1

CAL: 146 CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT leftCCDXtoDowel2 -45.001794 +- 64.999792 -45 +- 65 Q1

CAL: 147 CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT upCCDXtoDowel2 -36.754555 +- 45.63296 -36.829 +- 65 Q1

CAL: 148 CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT upCCDYtoDowel2 65.750001 +- 65 65.75 +- 65 Q1

CAL: 149 CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT downCCDXtoDowel2 -36.95778 +- 45.633368 -36.829 +- 65 Q1

CAL: 150 CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT downCCDYtoDowel2 20.749999 +- 65 20.75 +- 65 Q1

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_08/apin_inner_MEp2_2_08

FIX: -1 CMS/slm_p2_2/MEp2_2_08/apin_inner_MEp2_2_08 centre_X 1.1633312e-13 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_08/apin_inner_MEp2_2_08 centre_Y -6.5031854e-14 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_08/apin_inner_MEp2_2_08 centre_Z -1655.191 +- 0 -1655.191 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_08/apin_inner_MEp2_2_08 angles_X 0 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_08/apin_inner_MEp2_2_08 angles_Y 0 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_08/apin_inner_MEp2_2_08 angles_Z 0 +- 0 0 +- 100 Q0

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_08/apin_outer_MEp2_2_08

FIX: -1 CMS/slm_p2_2/MEp2_2_08/apin_outer_MEp2_2_08 centre_X 9.2375794e-14 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_08/apin_outer_MEp2_2_08 centre_Y 6.5051972e-14 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_08/apin_outer_MEp2_2_08 centre_Z 1655.191 +- 0 1655.191 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_08/apin_outer_MEp2_2_08 angles_X 0 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_08/apin_outer_MEp2_2_08 angles_Y 0 +- 0 0 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_2_08/apin_outer_MEp2_2_08 angles_Z 0 +- 0 0 +- 100 Q0

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_08

CAL: 123 CMS/slm_p2_2/MEp2_2_08 centre_X -5225.848 +- 100 -5225.848 +- 100 Q1

UNK: 124 CMS/slm_p2_2/MEp2_2_08 centre_Y -86.965406 +- 383.52136 -93.35 +- 100 Q2

UNK: 125 CMS/slm_p2_2/MEp2_2_08 centre_Z 152.25338 +- 110.67156 157.20274 +- 100 Q2

CAL: 126 CMS/slm_p2_2/MEp2_2_08 angles_X 0.0084575886 +- 94.008949 0 +- 100 Q1

CAL: 127 CMS/slm_p2_2/MEp2_2_08 angles_Y -85.022042 +- 58.509254 -85 +- 100 Q1

CAL: 128 CMS/slm_p2_2/MEp2_2_08 angles_Z 0.008880606 +- 93.963797 0 +- 100 Q1

%%%% Optical Object: CMS/slm_p2_2

FIX: -1 CMS/slm_p2_2 centre_X 289.7777 +- 0 289.7777 +- 1 Q0

FIX: -1 CMS/slm_p2_2 centre_Y -77.6457 +- 0 -77.6457 +- 1 Q0

FIX: -1 CMS/slm_p2_2 centre_Z 7998 +- 0 7998 +- 1 Q0

FIX: -1 CMS/slm_p2_2 angles_X 270 +- 0 -90 +- 1 Q0

FIX: -1 CMS/slm_p2_2 angles_Y 0 +- 0 0 +- 1 Q0

FIX: -1 CMS/slm_p2_2 angles_Z 255 +- 0 255 +- 1 Q0

CORRELATION BETWEEN 'unk' ENTRIES: (>= 1 )

No_1 No_2 correlation 9

............ program ended OK

-------------------

Next step to take a look at Laser 5 with the same setup.

Make a plot with chamber center positions and try to compare to PG.

Check also the simulation.

I don't understand why we have S:0!

--------------------------

Laser 5 DCOPS measurements:

I exclude: TP2, ref sensor at PT2, transfer sensors at PT2& PT5

and the following DCOPS:

// file id: 35 --> ref sensor at PT2

// COPS id11

// U 18.545 26.613

// D 17.018 9.385

// L -2.680 569.965

// R 1.583 11176.774

// file id: 36 ---> outer DCOPS on Long chamber 08 (ME+2, SLM2-5)

// COPS id12

// U 9.741 54.656

// D 10.114 3.821

// L -51.579 29.741

// R -71.494 195.731

// L 0 14.336

// R 0 14.336

// file id: 37 ---> inner DCOPS on Long chamber 08 (ME+2, SLM2-5)

// COPS id13

// U 10.298 2.583

// D 2.814 11242.070

// L 6.747 201.487

// R 7.140 16.762

I remember I had trouble with these DCOPS from Lchamber 8 before…

I have the following directory structure in the COCOA SDF file:

object system slm_line

object slm_line transfer_plate 2 Schamber Lchamber27

object transfer_plate Xlaser COPS

object Schamber 2 COPS 2 APIN

object Lchamber27 2 COPS 2 APIN

Lchamber08 is not defined since both DCOPS are excluded.

If I set the transfer plate at TP5 fix (for all center and angle values)

I get:

Fit iteration 13 ...

13 Fit quality is = 303.04

13 Fit quality predicted improvement in distance to minimum is = 303.04

13 Fit quality derivative at 0 = -606.08

TIME:QUALITY_CHECKED: 9430000 0.05

!!! Fit quality has worsened: Fit Quality now = 303.04 before 23.1331 diff 279.907

ds!!!ERROR: not possible to get good fit quality even multiplying Da by 7.45058e-09

FIT STATUS COCOA_FitCannotImprove

(This is bad!)

If I set TP5 center (x, y, z) fix and angles (x, y, z) calibrated

I get:

Fit iteration 2 ...

2 Fit quality is = 0.0111794

2 Fit quality predicted improvement in distance to minimum is = 0.0111794

2 Fit quality derivative at 0 = -0.0223587

TIME:QUALITY_CHECKED: 940000 0.04

SRPARPOS Optical Object Parameter Fit.Value Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0x8cf3be0$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 960000 0.02

TIME:TOTAL PROGRAM : 960000 0.42

I can also set center & angles all calibrated FQ is still 0.019 (2 iterations).

I will try the same with the laser 2 side.

I set center (x, y, z) fix and angles (x, y, z) calibrated.

Fit iteration 2 ...

2 Fit quality is = 0.00296389

2 Fit quality predicted improvement in distance to minimum is = 0.00296389

2 Fit quality derivative at 0 = -0.00592777

TIME:QUALITY_CHECKED: 1380000 0.08

SRPARPOS Optical Object Parameter Fit.Value Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0x8dba3c8$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1390000 0.01

TIME:TOTAL PROGRAM : 1390000 0.76

When center+angle was all fix for TP on side 2

I got:

Fit iteration 2 ...

2 Fit quality is = 5.2873841e-06

GOOD QUALITY OF THE FIT FOR ITERATION 2 = 5.2873841e-06 < 0.1 | 61178606 < 1e-06

For now I will leave TP angles cal (for both TP2 and 5). I think this is more

realistic.

Summary:

1) On side 2

(I named the file: ME2_SLM25_las2.txt)

with system tree:

object system slm_line

object slm_line transfer_plate 2 Schamber 2 Lchamber

object transfer_plate Xlaser COPS

object Schamber 2 COPS 2 APIN

object Lchamber 2 COPS 2 APIN

with 9 DCOPS (out of 10)

excluding refernce DCOPS on TP5

TP at PT2

centre (x, y, z) fix

angles (x, y, z) cal

Xlaser at PT2

centre (x, y, z) cal

angles (x, y, z) cal

chambers (long & short)

centre x cal

y unk

z unk

angles (x, y, z) cal

Result:

Fit iteration 2 ...

2 Fit quality is = 0.0111794

2 Fit quality predicted improvement in distance to minimum is = 0.0111794

2 Fit quality derivative at 0 = -0.0223587

TIME:QUALITY_CHECKED: 940000 0.04

SRPARPOS Optical Object Parameter Fit.Value Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0x8cf3be0$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 960000 0.02

TIME:TOTAL PROGRAM : 960000 0.42

(This can be improved if I set TP2 angles fix)

2) On side 5

(I named the file: ME2_SLM25_las5.txt)

with system tree:

object system slm_line

object slm_line transfer_plate 2 Schamber 1 Lchamber

object transfer_plate Xlaser COPS

object Schamber 2 COPS 2 APIN

object Lchamber 2 COPS 2 APIN

Lchamber08 (with inner and outer DCOPS excluded)

Reference DCOPS at PT 2 excluded.

=> we have 7 DCOPS (out of 10)

TP at PT5

centre (x, y, z) fix

angles (x, y, z) cal

Xlaser at PT5

centre (x, y, z) cal

angles (x, y, z) cal

chambers (long & short)

centre x cal

y unk

z unk

angles (x, y, z) cal

Result:

Fit iteration 2 ...

2 Fit quality is = 0.0111794

2 Fit quality predicted improvement in distance to minimum is = 0.0111794

2 Fit quality derivative at 0 = -0.0223587

TIME:QUALITY_CHECKED: 1120000 0.04

SRPARPOS Optical Object Parameter Fit.Value Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0x8a64be0$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1130000 0.01

TIME:TOTAL PROGRAM : 1130000 0.42

--------------------

Analyze TP2 angle (make it fix or cal):

If set angle (x, y, z) fix --center also fix:

FITTED VALUES

nEnt_unk Optical Object Parameter value (+-error) orig.val (+-error) quality

%%%% Optical Object: CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2

CAL: 1 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 centre_X -22.5 +- 20 -22.5 +- 20 Q1

CAL: 2 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 centre_Y 43.25 +- 20 43.25 +- 20 Q1

CAL: 3 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 centre_Z 1.8983698e-12 +- 20 0 +- 20 Q1

CAL: 4 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_X 8.9854594e-05 +- 9.9913599 0 +- 10 Q1

CAL: 5 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_Y 0.00078338662 +- 9.9139703 0 +- 10 Q1

CAL: 6 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_Z -0.00010218063 +- 9.9994683 0 +- 10 Q1

UNK: 0 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angleBetweenAxis 89.767088 +- 1152.9967 90 +- 100 Q2

%%%% Optical Object: CMS/slm_p2_2/MEp2_tp2

FIX: -1 CMS/slm_p2_2/MEp2_tp2 centre_X -7175.829 +- 0 -7175.829 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_tp2 centre_Y -43.25 +- 0 -43.25 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_tp2 centre_Z 22.5 +- 0 22.5 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_tp2 angles_X 0 +- 0 0 +- 698 Q0

FIX: -1 CMS/slm_p2_2/MEp2_tp2 angles_Y -90 +- 0 -90 +- 698 Q0

FIX: -1 CMS/slm_p2_2/MEp2_tp2 angles_Z 0 +- 0 0 +- 698 Q0

If I set angle (x, y, z) cal--center fix:

%%%% Optical Object: CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2

CAL: 4 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 centre_X -22.5 +- 20 -22.5 +- 20 Q1

CAL: 5 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 centre_Y 43.25 +- 20 43.25 +- 20 Q1

CAL: 6 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 centre_Z 4.025671e-14 +- 20 0 +- 20 Q1

CAL: 7 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_X 5.046004e-06 +- 9.9995157 0 +- 10 Q1

CAL: 8 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_Y 9.2336771e-06 +- 9.9989858 0 +- 10 Q1

CAL: 9 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_Z -0.0001011591 +- 9.9994689 0 +- 10 Q1

UNK: 3 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angleBetweenAxis 89.768976 +- 1153.034 90 +- 100 Q2

%%%% Optical Object: CMS/slm_p2_2/MEp2_tp2

FIX: -1 CMS/slm_p2_2/MEp2_tp2 centre_X -7175.829 +- 0 -7175.829 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_tp2 centre_Y -43.25 +- 0 -43.25 +- 100 Q0

FIX: -1 CMS/slm_p2_2/MEp2_tp2 centre_Z 22.5 +- 0 22.5 +- 100 Q0

CAL: 0 CMS/slm_p2_2/MEp2_tp2 angles_X 0.024760202 +- 507.213 0 +- 698 Q1

CAL: 1 CMS/slm_p2_2/MEp2_tp2 angles_Y -89.954814 +- 75.946223 -90 +- 698 Q1

CAL: 2 CMS/slm_p2_2/MEp2_tp2 angles_Z 0.024384795 +- 507.18776 0 +- 698 Q1

Conclusion: I will leave angle (x, y, z) fix--center fix for TP2. Since we want to determine chamber movements from DCOPS readouts I think less dependence on other objects is better.

For TP5 I cannot set angles fix because COCOA has a hard time to make a fit.

--------------------------------

March 23, 2007

SIMULATION: Check COCOA simulation results in the following case: use data that is off-center for CCD1 and CCD3, e.g. not 14mm dead in the center, but ~23mm or ~5mm, to destroy the left-right symmetry in the simulated data.

(name it: ME2_SLM25_simu.txt)

=>shims not included, chamber rotations restricted (all chamber angles set to

calibrated); measurements from both lasers at PT2 and PT5.

Result:

Fit iteration 1 ...

1 Fit quality is = 3.47283e-13

1 Fit quality predicted improvement in distance to minimum is = 3.47283e-13

1 Fit quality derivative at 0 = -6.94567e-13

TIME:QUALITY_CHECKED: 1980000 0.37

SRPARPOS Optical Object Parameter Fit.Value Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0x8a7eb08$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1990000 0.01

TIME:TOTAL PROGRAM : 1990000 1.46

All DIFF values are 0 or very close to zero (0.000...)

I don't understand why we get this!

0x8a7eb08$$$$$$$$$$$$$$$ moreData Sets 1

1023.5 adding chi2meas 1.04755e+06 id1: 0 (mm)R: 14.329 S: 0 Diff= 14.329

1023.5 adding chi2meas 2.0951e+06 id1: 1 (mm)R: 14.329 S: 0 Diff= 14.329

1023.5 adding chi2meas 3.14266e+06 id1: 2 (mm)R: 14.329 S: 0 Diff= 14.329

1023.5 adding chi2meas 4.19021e+06 id1: 3 (mm)R: 14.329 S: 0 Diff= 14.329

1023.5 adding chi2meas 5.23776e+06 id2: 0 (mm)R: 14.329 S: 0 Diff= 14.329

1023.5 adding chi2meas 6.28531e+06 id2: 1 (mm)R: 14.329 S: 0 Diff= 14.329

1023.5 adding chi2meas 7.33287e+06 id2: 2 (mm)R: 14.329 S: 0 Diff= 14.329

1023.5 adding chi2meas 8.38042e+06 id2: 3 (mm)R: 14.329 S: 0 Diff= 14.329

id 1 is the ref sensor on PT2 and id2 is DCOPS_outer+22_08>out (outer DCOPS on

the 08 Long chamber).

------------

In the simu data file (named slm_simu_modif.txt) I modified the 14.329 mm

value (center of DCOPS pos) to 23.329 mm for the ref sensor at PT2 (for CCD

1(U) and CCD3(D)) and 5.329 mm for all the other DCOPS (for CCD

1(U) and CCD3(D)).

Here are some example lines from the file:

DATE: 00/00/00 00:00

COPS id1

U 23.329 14

D 23.329 14

L 14.329 14

R 14.329 14

COPS id2

U 5.329 14

D 5.329 14

L 14.329 14

R 14.329 14

COPS id3

U 5.329 14

D 5.329 14

L 14.329 14

R 14.329 14

...... etc

----------------

Here is what I observed:

Fit iteration 3 ...(this is the last one)

3 Fit quality is = 0.0042646571

3 Fit quality cut is = 0.0042646571

GOOD QUALITY OF THE FIT FOR ITERATION 3 = 0.0042646571 < 0.1 | 149179.47 < 1e-06

%%%% Optical Object: OCMS/slm22/me+21_14

CAL: 80 OCMS/slm22/me+21_14 centre_X 2371.2792 +- 99.999997 2371.279 +- 100 Q1 DIFF= 0.00023662589

UNK: 81 OCMS/slm22/me+21_14 centre_Y -93.350015 +- 216.89399 -93.35 +- 100 Q2 DIFF= -1.4973632e-05

UNK: 82 OCMS/slm22/me+21_14 centre_Z 118.19867 +- 118.92441 118.16258 +- 100 Q2 DIFF= 0.036091372

CAL: 83 OCMS/slm22/me+21_14 angles_X 3.4273446e-06 +- 90.446458 0 +- 100 Q1 DIFF= 3.4273446e-06

CAL: 84 OCMS/slm22/me+21_14 angles_Y 79.754228 +- 74.607026 80 +- 100 Q1 DIFF= -0.24577156

CAL: 85 OCMS/slm22/me+21_14 angles_Z -7.7612111e-07 +- 96.185985 0 +- 100 Q1 DIFF= -7.7612111e-07

%%%% Optical Object: OCMS/slm22/me+21_04

CAL: 114 OCMS/slm22/me+21_04 centre_X -2371.2784 +- 99.999998 -2371.279 +- 100 Q1 DIFF= 0.00056872529

UNK: 115 OCMS/slm22/me+21_04 centre_Y -93.350195 +- 365.68282 -93.35 +- 100 Q2 DIFF= -0.00019468235

UNK: 116 OCMS/slm22/me+21_04 centre_Z 117.37106 +- 110.92978 118.16258 +- 100 Q2 DIFF= -0.79152197

CAL: 117 OCMS/slm22/me+21_04 angles_X -2.8920677e-06 +- 96.089326 0 +- 100 Q1 DIFF= -2.8920676e-06

CAL: 118 OCMS/slm22/me+21_04 angles_Y -79.762942 +- 74.595187 -80 +- 100 Q1 DIFF= 0.23705812

CAL: 119 OCMS/slm22/me+21_04 angles_Z -3.8367377e-06 +- 95.222091 0 +- 100 Q1 DIFF= -3.836738e-06

%%%% Optical Object: OCMS/slm22/me+22_27

CAL: 148 OCMS/slm22/me+22_27 centre_X 5225.848 +- 99.999998 5225.848 +- 100 Q1 DIFF= 3.5744564e-05

UNK: 149 OCMS/slm22/me+22_27 centre_Y -93.350005 +- 388.58719 -93.35 +- 100 Q2 DIFF= -4.9739483e-06

UNK: 150 OCMS/slm22/me+22_27 centre_Z 167.05012 +- 92.144309 157.20274 +- 100 Q2 DIFF= 9.8473797

CAL: 151 OCMS/slm22/me+22_27 angles_X 0 +- 64.547293 0 +- 100 Q1 DIFF= 3.2370801e-07

CAL: 152 OCMS/slm22/me+22_27 angles_Y 84.993507 +- 8.4582744 85 +- 100 Q1 DIFF= -0.0064930771

CAL: 153 OCMS/slm22/me+22_27 angles_Z 2.7869148e-06 +- 84.916983 0 +- 100 Q1 DIFF= 2.7869148e-06

%%%% Optical Object: OCMS/slm22/me+22_08

CAL: 182 OCMS/slm22/me+22_08 centre_X -5225.8477 +- 99.999999 -5225.848 +- 100 Q1 DIFF= 0.00033479097

UNK: 183 OCMS/slm22/me+22_08 centre_Y -93.350292 +- 301.6594 -93.35 +- 100 Q2 DIFF= -0.00029203919

UNK: 184 OCMS/slm22/me+22_08 centre_Z 165.16133 +- 107.1522 157.20274 +- 100 Q2 DIFF= 7.9585862

CAL: 185 OCMS/slm22/me+22_08 angles_X -1.7720473e-06 +- 94.250291 0 +- 100 Q1 DIFF= -1.7720473e-06

CAL: 186 OCMS/slm22/me+22_08 angles_Y -85.008601 +- 57.53495 -85 +- 100 Q1 DIFF= -0.0086006569

CAL: 187 OCMS/slm22/me+22_08 angles_Z -1.6864234e-06 +- 94.340687 0 +- 100 Q1 DIFF= -1.6864234e-06

The only objects that had significant displacements are the long chambers:

me+22_27 (DIFF=9.8 mm) & me+22_08 (DIFF=7.9mm).

Both move in POSITIVE SLM_Z direction (CMS RPhi Plane).

----------

Let's try now 5.329 mm for the ref DCOPS at PT2 and 23.329 mm for all the other

DCOPS (CCD1(U), CCD3(D)).

Here is the result:

Fit iteration 2 ...(last iteration)

2 Fit quality is = 0.00793509

2 Fit quality predicted improvement in distance to minimum is = 0.00793509

2 Fit quality derivative at 0 = -0.0158702

TIME:QUALITY_CHECKED: 2890000 0.39

SRPARPOS Optical Object Parameter Fit.Value Orig.Value

%%%% Optical Object: OCMS/slm22/me+21_14

CAL: 80 OCMS/slm22/me+21_14 centre_X 2371.2792 +- 99.999997 2371.279 +- 100 Q1 DIFF= 0.00023669435

UNK: 81 OCMS/slm22/me+21_14 centre_Y -93.349471 +- 244.68406 -93.35 +- 100 Q2 DIFF= 0.00052910083

UNK: 82 OCMS/slm22/me+21_14 centre_Z 118.12542 +- 101.37009 118.16258 +- 100 Q2 DIFF= -0.037155829

CAL: 83 OCMS/slm22/me+21_14 angles_X 2.7482786e-06 +- 94.028436 0 +- 100 Q1 DIFF= 2.7482786e-06

CAL: 84 OCMS/slm22/me+21_14 angles_Y 80.245234 +- 69.965039 80 +- 100 Q1 DIFF= 0.24523351

CAL: 85 OCMS/slm22/me+21_14 angles_Z -9.7256086e-07 +- 92.681051 0 +- 100 Q1 DIFF= -9.7256088e-07

%%%% Optical Object: OCMS/slm22/me+21_04

CAL: 114 OCMS/slm22/me+21_04 centre_X -2371.2784 +- 99.999998 -2371.279 +- 100 Q1 DIFF= 0.00056873087

UNK: 115 OCMS/slm22/me+21_04 centre_Y -93.350133 +- 367.33534 -93.35 +- 100 Q2 DIFF= -0.00013314583

UNK: 116 OCMS/slm22/me+21_04 centre_Z 118.95264 +- 121.40772 118.16258 +- 100 Q2 DIFF= 0.7900607

CAL: 117 OCMS/slm22/me+21_04 angles_X -7.969512e-07 +- 93.603534 0 +- 100 Q1 DIFF= -7.9695121e-07

CAL: 118 OCMS/slm22/me+21_04 angles_Y -80.236512 +- 72.910884 -80 +- 100 Q1 DIFF= -0.23651229

CAL: 119 OCMS/slm22/me+21_04 angles_Z -9.0258872e-07 +- 94.052621 0 +- 100 Q1 DIFF= -9.0258874e-07

%%%% Optical Object: OCMS/slm22/me+22_27

CAL: 148 OCMS/slm22/me+22_27 centre_X 5225.848 +- 99.999998 5225.848 +- 100 Q1 DIFF= 3.5719513e-05

UNK: 149 OCMS/slm22/me+22_27 centre_Y -93.350186 +- 334.29497 -93.35 +- 100 Q2 DIFF= -0.00018646628

UNK: 150 OCMS/slm22/me+22_27 centre_Z 147.35548 +- 129.26815 157.20274 +- 100 Q2 DIFF= -9.8472576

CAL: 151 OCMS/slm22/me+22_27 angles_X 0 +- 93.292325 0 +- 100 Q1 DIFF= -7.2293766e-08

CAL: 152 OCMS/slm22/me+22_27 angles_Y 85.006504 +- 56.444031 85 +- 100 Q1 DIFF= 0.0065037305

CAL: 153 OCMS/slm22/me+22_27 angles_Z 2.3476436e-06 +- 87.499887 0 +- 100 Q1 DIFF= 2.3476437e-06

%%%% Optical Object: OCMS/slm22/me+22_08

CAL: 182 OCMS/slm22/me+22_08 centre_X -5225.8477 +- 99.999999 -5225.848 +- 100 Q1 DIFF= 0.00033483378

UNK: 183 OCMS/slm22/me+22_08 centre_Y -93.349793 +- 296.58442 -93.35 +- 100 Q2 DIFF= 0.00020711706

UNK: 184 OCMS/slm22/me+22_08 centre_Z 149.24433 +- 100.12724 157.20274 +- 100 Q2 DIFF= -7.9584136

CAL: 185 OCMS/slm22/me+22_08 angles_X -1.6171688e-06 +- 94.945826 0 +- 100 Q1 DIFF= -1.6171688e-06

CAL: 186 OCMS/slm22/me+22_08 angles_Y -84.99141 +- 55.628375 -85 +- 100 Q1 DIFF= 0.0085898181

CAL: 187 OCMS/slm22/me+22_08 angles_Z -1.6491763e-06 +- 94.906923 0 +- 100 Q1 DIFF= -1.6491763e-06

The only objects that had significant displacements are the long chambers:

me+22_27 (DIFF=-9.8 mm) & me+22_08 (DIFF=-7.9 mm).

Both seem to move in NEGATIVE SLM_Z direction (CMS RPhi Plane).

This makes sense: One has to move the DCOPS (CSC) up to get 5.329 mm at PT2 and 23.329 mm on all the other DCOPS (relative to the center position at 14.329 mm). Z_SLM points down so the movement of the DCOPS/chambers is in the negative direction. So DIFF=-9.8 mm and DIFF=-7.9 mm is correct.

________________________________________________

1) Make a plot with CSC centers (fitted+nominal values) *

2) Check laser x, y angle. Probably should set it to unk. *

3) Check orientation of laser and CSC centers. Make a plot.

4) Make plot with DCOPS readout directions (see report page 4).*

5) Make plot with simulation (what happens when CCD are moved from center

position) *

6) Check PG plots by Oleg. PG rotations of CSC centers might be *

included as calibrations errors in our cocoa analysis.

7) Use kumacs from Marcus to produce plots in CMS coordinates. For this I

should check why I cannot get CMS coordinates with the COCOA version in CMSSW_1_2_0. (?)

8) Find cause of S:0 problem *

Pedro: "Did you look if the

measurements that do not move depend on any other:

debug_verbose 3

and check for 'DERI'

And why the simulated value is 0:

debug_verbose 5

and follow the "@@@@ Start calculation of simulated value of.."

---------------------------------------------------------

login problem to FNAL...

neet to get new cryptocard

meanwhile review info from CMS week, reports etc.

May 26, 2006

contact Fermilab helpdesk (they issued a new cryptocard)

(for Marcus): create folder Gyongyi under CMSSW_1_2_0

and copy all my files to this folder.

COCOA modifications in:

.../CMSSW_1_2_0/src/Alignment/CocoaFit/src/

//ALIdouble minCorrel = 1.E-6;

ALIdouble minCorrel = 1.;=>changed it to 1.

then build cocoa in folder:

.../CMSSW_1_2_0/src/Alignment/CocoaApplication/bin

--------------

2):

On side 2 (ME2_SLM25_las2.txt) set:

-----------------------------------

Xlaser at PT2

centre (x, y, z) cal

angles (x, y) unk

z cal

FITTED VALUES

2128.4 adding chi2meas 4.53009e+06 id1: 0 (mm)R: 8.686 S: 0 Diff= 8.686

1989.02 adding chi2meas 8.48629e+06 id1: 1 (mm)R: 8.334 S: 0 Diff= 8.334

7619.44 adding chi2meas 6.65422e+07 id1: 2 (mm)R: 18.34 S: 0 Diff= 18.34

7491.76 adding chi2meas 1.22669e+08 id1: 3 (mm)R: 18.19 S: 0 Diff= 18.19

-0.0547377 adding chi2meas 1.22669e+08 id2: 0 (mm)R: 20.109 S: 20.1091 Diff= -0.000114019

0.0554475 adding chi2meas 1.22669e+08 id2: 1 (mm)R: 20.313 S: 20.3129 Diff= 0.000141447

-1.27849 adding chi2meas 1.22669e+08 id2: 2 (mm)R: 18.134 S: 18.1493 Diff= -0.0153189

0.179741 adding chi2meas 1.22669e+08 id2: 3 (mm)R: 19.162 S: 19.1617 Diff= 0.000329825

0.0936224 adding chi2meas 1.22669e+08 id3: 0 (mm)R: 18.674 S: 18.6739 Diff= 0.00014886

-0.143563 adding chi2meas 1.22669e+08 id3: 1 (mm)R: 18.196 S: 18.1964 Diff= -0.000379294

-0.177335 adding chi2meas 1.22669e+08 id3: 2 (mm)R: 18.213 S: 18.2135 Diff= -0.000473131

0.143477 adding chi2meas 1.22669e+08 id3: 3 (mm)R: 18.96 S: 18.9597 Diff= 0.000273755

761.842 adding chi2meas 1.23249e+08 id4: 0 (mm)R: 17.997 S: 0 Diff= 17.997

5925.49 adding chi2meas 1.58361e+08 id4: 1 (mm)R: 17.972 S: 0 Diff= 17.972

8159.44 adding chi2meas 2.24937e+08 id4: 2 (mm)R: 15.813 S: 0 Diff= 15.813

1785.29 adding chi2meas 2.28124e+08 id4: 3 (mm)R: 16.68 S: 0 Diff= 16.68

-0.856328 adding chi2meas 2.28124e+08 id5: 0 (mm)R: 16.898 S: 16.9008 Diff= -0.00277022

21.2084 adding chi2meas 2.28125e+08 id5: 1 (mm)R: 20.837 S: 19.1378 Diff= 1.69922

-0.29118 adding chi2meas 2.28125e+08 id5: 2 (mm)R: 16.888 S: 16.8888 Diff= -0.00082375

0.219077 adding chi2meas 2.28125e+08 id5: 3 (mm)R: 17.616 S: 17.6155 Diff= 0.000458309

-0.00476084 adding chi2meas 2.28125e+08 id6: 0 (mm)R: 13.403 S: 13.403 Diff= -1.66867e-05

-0.0644506 adding chi2meas 2.28125e+08 id6: 1 (mm)R: 13.39 S: 13.3911 Diff= -0.00111609

-0.193395 adding chi2meas 2.28125e+08 id6: 2 (mm)R: 12.729 S: 12.7296 Diff= -0.000565486

0.355739 adding chi2meas 2.28125e+08 id6: 3 (mm)R: 13.201 S: 13.1994 Diff= 0.00158553

0.508015 adding chi2meas 2.28125e+08 id7: 0 (mm)R: 13.549 S: 13.373 Diff= 0.176021

-0.0162678 adding chi2meas 2.28125e+08 id7: 1 (mm)R: 13.341 S: 13.341 Diff= -4.04254e-05

-0.0300699 adding chi2meas 2.28125e+08 id7: 2 (mm)R: 5.179 S: 5.17912 Diff= -0.000121422

-0.369358 adding chi2meas 2.28125e+08 id7: 3 (mm)R: 5.309 S: 5.33074 Diff= -0.0217422

-0.917195 adding chi2meas 2.28125e+08 id8: 0 (mm)R: 11.455 S: 11.8472 Diff= -0.392221

0.0656036 adding chi2meas 2.28125e+08 id8: 1 (mm)R: 11.872 S: 11.8708 Diff= 0.00124601

-0.129653 adding chi2meas 2.28125e+08 id8: 2 (mm)R: 2.3 S: 3.62103 Diff= -1.32103

0.0105393 adding chi2meas 2.28125e+08 id8: 3 (mm)R: 3.77 S: 3.76983 Diff= 0.000170378

4.94489 adding chi2meas 2.28125e+08 id9: 0 (mm)R: 9.958 S: 9.69643 Diff= 0.261575

-1.06059 adding chi2meas 2.28125e+08 id9: 1 (mm)R: 8.889 S: 8.90087 Diff= -0.011867

-0.341285 adding chi2meas 2.28125e+08 id9: 2 (mm)R: 0 S: 4.89266 Diff= -4.89266

-0.351643 adding chi2meas 2.28125e+08 id9: 3 (mm)R: 0 S: 5.04115 Diff= -5.04115

TIME:MAT_MEAS_FILLED: 1670000 0.09

TIME:MAT_CAL_FILLED : 1670000 0

TIME:BEFORE_INVERSE : 1690000 0.02

TIME:AFTER_INVERSE : 1710000 0.02

TIME:MAT_MULTIPLIED : 1710000 0

Fit iteration 3 ...

3 Fit quality is = 0.000133103

3 Fit quality predicted improvement in distance to minimum is = 0.000133103

3 Fit quality derivative at 0 = -0.000266206

TIME:QUALITY_CHECKED: 1780000 0.07

SRPARPOS Optical Object Parameter Fit.Value Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0x96033e8$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1800000 0.02

TIME:TOTAL PROGRAM : 1800000 0.92

--------------------------------------------------

+ Set TP center (x,y,z) to cal (before it was fix)

FITTED VALUES

2128.4 adding chi2meas 4.53009e+06 id1: 0 (mm)R: 8.686 S: 0 Diff= 8.686

1989.02 adding chi2meas 8.48629e+06 id1: 1 (mm)R: 8.334 S: 0 Diff= 8.334

7619.44 adding chi2meas 6.65422e+07 id1: 2 (mm)R: 18.34 S: 0 Diff= 18.34

7491.76 adding chi2meas 1.22669e+08 id1: 3 (mm)R: 18.19 S: 0 Diff= 18.19

7491.76 adding chi2meas 1.22669e+08 id1: 3 (mm)R: 18.19 S: 0 Diff= 18.19

-0.0547546 adding chi2meas 1.22669e+08 id2: 0 (mm)R: 20.109 S: 20.1091 Diff= -0.000114054

0.0554335 adding chi2meas 1.22669e+08 id2: 1 (mm)R: 20.313 S: 20.3129 Diff= 0.000141411

-1.27859 adding chi2meas 1.22669e+08 id2: 2 (mm)R: 18.134 S: 18.1493 Diff= -0.01532

0.179752 adding chi2meas 1.22669e+08 id2: 3 (mm)R: 19.162 S: 19.1617 Diff= 0.000329845

0.0936368 adding chi2meas 1.22669e+08 id3: 0 (mm)R: 18.674 S: 18.6739 Diff= 0.000148882

-0.143553 adding chi2meas 1.22669e+08 id3: 1 (mm)R: 18.196 S: 18.1964 Diff= -0.000379267

-0.177389 adding chi2meas 1.22669e+08 id3: 2 (mm)R: 18.213 S: 18.2135 Diff= -0.000473275

0.143471 adding chi2meas 1.22669e+08 id3: 3 (mm)R: 18.96 S: 18.9597 Diff= 0.000273743

761.842 adding chi2meas 1.23249e+08 id4: 0 (mm)R: 17.997 S: 0 Diff= 17.997

5925.49 adding chi2meas 1.58361e+08 id4: 1 (mm)R: 17.972 S: 0 Diff= 17.972

8159.44 adding chi2meas 2.24937e+08 id4: 2 (mm)R: 15.813 S: 0 Diff= 15.813

1785.29 adding chi2meas 2.28124e+08 id4: 3 (mm)R: 16.68 S: 0 Diff= 16.68

-0.856331 adding chi2meas 2.28124e+08 id5: 0 (mm)R: 16.898 S: 16.9008 Diff= -0.00277023

21.2084 adding chi2meas 2.28125e+08 id5: 1 (mm)R: 20.837 S: 19.1378 Diff= 1.69922

-0.293981 adding chi2meas 2.28125e+08 id5: 2 (mm)R: 16.888 S: 16.8888 Diff= -0.000831672

0.215343 adding chi2meas 2.28125e+08 id5: 3 (mm)R: 17.616 S: 17.6155 Diff= 0.000450497

-0.00475649 adding chi2meas 2.28125e+08 id6: 0 (mm)R: 13.403 S: 13.403 Diff= -1.66715e-05

-0.0644404 adding chi2meas 2.28125e+08 id6: 1 (mm)R: 13.39 S: 13.3911 Diff= -0.00111591

-0.19336 adding chi2meas 2.28125e+08 id6: 2 (mm)R: 12.729 S: 12.7296 Diff= -0.000565385

0.355728 adding chi2meas 2.28125e+08 id6: 3 (mm)R: 13.201 S: 13.1994 Diff= 0.00158548

0.508032 adding chi2meas 2.28125e+08 id7: 0 (mm)R: 13.549 S: 13.373 Diff= 0.176026

-0.0162652 adding chi2meas 2.28125e+08 id7: 1 (mm)R: 13.341 S: 13.341 Diff= -4.04189e-05

-0.0300033 adding chi2meas 2.28125e+08 id7: 2 (mm)R: 5.179 S: 5.17912 Diff= -0.000121153

-0.369043 adding chi2meas 2.28125e+08 id7: 3 (mm)R: 5.309 S: 5.33072 Diff= -0.0217237

-0.917217 adding chi2meas 2.28125e+08 id8: 0 (mm)R: 11.455 S: 11.8472 Diff= -0.39223

0.0655658 adding chi2meas 2.28125e+08 id8: 1 (mm)R: 11.872 S: 11.8708 Diff= 0.00124529

-0.129546 adding chi2meas 2.28125e+08 id8: 2 (mm)R: 2.3 S: 3.61994 Diff= -1.31994

0.0815971 adding chi2meas 2.28125e+08 id8: 3 (mm)R: 3.77 S: 3.76868 Diff= 0.0013191

4.94492 adding chi2meas 2.28125e+08 id9: 0 (mm)R: 9.958 S: 9.69642 Diff= 0.261576

-1.06058 adding chi2meas 2.28125e+08 id9: 1 (mm)R: 8.889 S: 8.90087 Diff= -0.0118669

-0.341071 adding chi2meas 2.28125e+08 id9: 2 (mm)R: 0 S: 4.88959 Diff= -4.88959

-0.351425 adding chi2meas 2.28125e+08 id9: 3 (mm)R: 0 S: 5.03802 Diff= -5.03802

TIME:MAT_MEAS_FILLED: 1170000 0.1

TIME:MAT_CAL_FILLED : 1170000 0

TIME:BEFORE_INVERSE : 1190000 0.02

TIME:AFTER_INVERSE : 1210000 0.02

TIME:MAT_MULTIPLIED : 1210000 0

Fit iteration 2 ...

2 Fit quality is = 0.00658381

2 Fit quality predicted improvement in distance to minimum is = 0.00656223

2 Fit quality derivative at 0 = -0.0131676

TIME:QUALITY_CHECKED: 1290000 0.08

SRPARPOS Optical Object Parameter Fit.Value Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0x8eea3e8$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1310000 0.02

TIME:TOTAL PROGRAM : 1310000 0.73

--------------------------------------------------------------------------------------------

Set Xlaser

center z fix:

Xlaser laser_MEp2_2

ENTRY {

angle angleBetweenAxis 90. prec_ang_las unk

}

center

X -22.500 prec_pos_tp cal

Y 43.25 prec_pos_tp cal

Z 0. prec_pos_tp fix

angles

X 0 prec_ang_tp unk

Y 0 prec_ang_tp unk

Z 0 prec_ang_tp cal

FITTED VALUES

2128.4 adding chi2meas 4.53009e+06 id1: 0 (mm)R: 8.686 S: 0 Diff= 8.686

1989.02 adding chi2meas 8.48629e+06 id1: 1 (mm)R: 8.334 S: 0 Diff= 8.334

7619.44 adding chi2meas 6.65422e+07 id1: 2 (mm)R: 18.34 S: 0 Diff= 18.34

7491.76 adding chi2meas 1.22669e+08 id1: 3 (mm)R: 18.19 S: 0 Diff= 18.19

7491.76 adding chi2meas 1.22669e+08 id1: 3 (mm)R: 18.19 S: 0 Diff= 18.19

-0.0547546 adding chi2meas 1.22669e+08 id2: 0 (mm)R: 20.109 S: 20.1091 Diff= -0.000114054

0.0554335 adding chi2meas 1.22669e+08 id2: 1 (mm)R: 20.313 S: 20.3129 Diff= 0.000141411

-1.27859 adding chi2meas 1.22669e+08 id2: 2 (mm)R: 18.134 S: 18.1493 Diff= -0.01532

0.179752 adding chi2meas 1.22669e+08 id2: 3 (mm)R: 19.162 S: 19.1617 Diff= 0.000329844

0.0936368 adding chi2meas 1.22669e+08 id3: 0 (mm)R: 18.674 S: 18.6739 Diff= 0.000148882

-0.143553 adding chi2meas 1.22669e+08 id3: 1 (mm)R: 18.196 S: 18.1964 Diff= -0.000379267

-0.17739 adding chi2meas 1.22669e+08 id3: 2 (mm)R: 18.213 S: 18.2135 Diff= -0.000473276

0.143471 adding chi2meas 1.22669e+08 id3: 3 (mm)R: 18.96 S: 18.9597 Diff= 0.000273743

761.842 adding chi2meas 1.23249e+08 id4: 0 (mm)R: 17.997 S: 0 Diff= 17.997

5925.49 adding chi2meas 1.58361e+08 id4: 1 (mm)R: 17.972 S: 0 Diff= 17.972

8159.44 adding chi2meas 2.24937e+08 id4: 2 (mm)R: 15.813 S: 0 Diff= 15.813

1785.29 adding chi2meas 2.28124e+08 id4: 3 (mm)R: 16.68 S: 0 Diff= 16.68

-0.856331 adding chi2meas 2.28124e+08 id5: 0 (mm)R: 16.898 S: 16.9008 Diff= -0.00277023

21.2084 adding chi2meas 2.28125e+08 id5: 1 (mm)R: 20.837 S: 19.1378 Diff= 1.69922

-0.293978 adding chi2meas 2.28125e+08 id5: 2 (mm)R: 16.888 S: 16.8888 Diff= -0.000831663

0.215345 adding chi2meas 2.28125e+08 id5: 3 (mm)R: 17.616 S: 17.6155 Diff= 0.000450501

-0.00475649 adding chi2meas 2.28125e+08 id6: 0 (mm)R: 13.403 S: 13.403 Diff= -1.66715e-05

-0.0644404 adding chi2meas 2.28125e+08 id6: 1 (mm)R: 13.39 S: 13.3911 Diff= -0.00111591

-0.193361 adding chi2meas 2.28125e+08 id6: 2 (mm)R: 12.729 S: 12.7296 Diff= -0.000565387

0.355728 adding chi2meas 2.28125e+08 id6: 3 (mm)R: 13.201 S: 13.1994 Diff= 0.00158548

0.508032 adding chi2meas 2.28125e+08 id7: 0 (mm)R: 13.549 S: 13.373 Diff= 0.176026

-0.0162652 adding chi2meas 2.28125e+08 id7: 1 (mm)R: 13.341 S: 13.341 Diff= -4.04189e-05

-0.0300045 adding chi2meas 2.28125e+08 id7: 2 (mm)R: 5.179 S: 5.17912 Diff= -0.000121158

-0.369043 adding chi2meas 2.28125e+08 id7: 3 (mm)R: 5.309 S: 5.33072 Diff= -0.0217237

-0.917217 adding chi2meas 2.28125e+08 id8: 0 (mm)R: 11.455 S: 11.8472 Diff= -0.39223

0.0655658 adding chi2meas 2.28125e+08 id8: 1 (mm)R: 11.872 S: 11.8708 Diff= 0.00124529

-0.129546 adding chi2meas 2.28125e+08 id8: 2 (mm)R: 2.3 S: 3.61993 Diff= -1.31993

0.0817087 adding chi2meas 2.28125e+08 id8: 3 (mm)R: 3.77 S: 3.76868 Diff= 0.0013209

4.94492 adding chi2meas 2.28125e+08 id9: 0 (mm)R: 9.958 S: 9.69642 Diff= 0.261576

-1.06058 adding chi2meas 2.28125e+08 id9: 1 (mm)R: 8.889 S: 8.90087 Diff= -0.0118669

-0.341071 adding chi2meas 2.28125e+08 id9: 2 (mm)R: 0 S: 4.88959 Diff= -4.88959

-0.351425 adding chi2meas 2.28125e+08 id9: 3 (mm)R: 0 S: 5.03802 Diff= -5.03802

TIME:MAT_MEAS_FILLED: 1090000 0.1

TIME:MAT_CAL_FILLED : 1090000 0

TIME:BEFORE_INVERSE : 1110000 0.02

TIME:AFTER_INVERSE : 1130000 0.02

TIME:MAT_MULTIPLIED : 1130000 0

Fit iteration 2 ...

2 Fit quality is = 0.00654915

2 Fit quality predicted improvement in distance to minimum is = 0.00654915

2 Fit quality derivative at 0 = -0.0130983

TIME:QUALITY_CHECKED: 1210000 0.08

SRPARPOS Optical Object Parameter Fit.Value Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0xa2b13e8$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1220000 0.01

TIME:TOTAL PROGRAM : 1220000 0.67

----------------------------------------------------------------------

+Set Xlaser center(x,y) fix (before:cal)

angle z fix (before:cal)

FITTED VALUES

2128.4 adding chi2meas 4.53009e+06 id1: 0 (mm)R: 8.686 S: 0 Diff= 8.686

1989.02 adding chi2meas 8.48629e+06 id1: 1 (mm)R: 8.334 S: 0 Diff= 8.334

7619.44 adding chi2meas 6.65422e+07 id1: 2 (mm)R: 18.34 S: 0 Diff= 18.34

7491.76 adding chi2meas 1.22669e+08 id1: 3 (mm)R: 18.19 S: 0 Diff= 18.19

-0.0547332 adding chi2meas 1.22669e+08 id2: 0 (mm)R: 20.109 S: 20.1091 Diff= -0.000114009

0.055412 adding chi2meas 1.22669e+08 id2: 1 (mm)R: 20.313 S: 20.3129 Diff= 0.000141356

-1.27856 adding chi2meas 1.22669e+08 id2: 2 (mm)R: 18.134 S: 18.1493 Diff= -0.0153198

0.179751 adding chi2meas 1.22669e+08 id2: 3 (mm)R: 19.162 S: 19.1617 Diff= 0.000329842

0.0936494 adding chi2meas 1.22669e+08 id3: 0 (mm)R: 18.674 S: 18.6739 Diff= 0.000148903

-0.14358 adding chi2meas 1.22669e+08 id3: 1 (mm)R: 18.196 S: 18.1964 Diff= -0.000379339

-0.17731 adding chi2meas 1.22669e+08 id3: 2 (mm)R: 18.213 S: 18.2135 Diff= -0.000473063

0.143578 adding chi2meas 1.22669e+08 id3: 3 (mm)R: 18.96 S: 18.9597 Diff= 0.000273946

761.842 adding chi2meas 1.23249e+08 id4: 0 (mm)R: 17.997 S: 0 Diff= 17.997

5925.49 adding chi2meas 1.58361e+08 id4: 1 (mm)R: 17.972 S: 0 Diff= 17.972

8159.44 adding chi2meas 2.24937e+08 id4: 2 (mm)R: 15.813 S: 0 Diff= 15.813

1785.29 adding chi2meas 2.28124e+08 id4: 3 (mm)R: 16.68 S: 0 Diff= 16.68

-0.856348 adding chi2meas 2.28124e+08 id5: 0 (mm)R: 16.898 S: 16.9008 Diff= -0.00277029

21.2089 adding chi2meas 2.28125e+08 id5: 1 (mm)R: 20.837 S: 19.1377 Diff= 1.69925

-0.29352 adding chi2meas 2.28125e+08 id5: 2 (mm)R: 16.888 S: 16.8888 Diff= -0.000830368

0.216076 adding chi2meas 2.28125e+08 id5: 3 (mm)R: 17.616 S: 17.6155 Diff= 0.000452031

-0.00479313 adding chi2meas 2.28125e+08 id6: 0 (mm)R: 13.403 S: 13.403 Diff= -1.67999e-05

-0.0643019 adding chi2meas 2.28125e+08 id6: 1 (mm)R: 13.39 S: 13.3911 Diff= -0.00111352

-0.193105 adding chi2meas 2.28125e+08 id6: 2 (mm)R: 12.729 S: 12.7296 Diff= -0.000564638

0.3559 adding chi2meas 2.28125e+08 id6: 3 (mm)R: 13.201 S: 13.1994 Diff= 0.00158625

0.508216 adding chi2meas 2.28125e+08 id7: 0 (mm)R: 13.549 S: 13.3729 Diff= 0.17609

-0.0162725 adding chi2meas 2.28125e+08 id7: 1 (mm)R: 13.341 S: 13.341 Diff= -4.04371e-05

-0.0297483 adding chi2meas 2.28125e+08 id7: 2 (mm)R: 5.179 S: 5.17912 Diff= -0.000120124

-0.369071 adding chi2meas 2.28125e+08 id7: 3 (mm)R: 5.309 S: 5.33073 Diff= -0.0217253

-0.917011 adding chi2meas 2.28125e+08 id8: 0 (mm)R: 11.455 S: 11.8471 Diff= -0.392143

0.0656068 adding chi2meas 2.28125e+08 id8: 1 (mm)R: 11.872 S: 11.8708 Diff= 0.00124607

-0.129678 adding chi2meas 2.28125e+08 id8: 2 (mm)R: 2.3 S: 3.62128 Diff= -1.32128

-0.00157331 adding chi2meas 2.28125e+08 id8: 3 (mm)R: 3.77 S: 3.77003 Diff= -2.54342e-05

4.94527 adding chi2meas 2.28125e+08 id9: 0 (mm)R: 9.958 S: 9.69641 Diff= 0.261595

-1.06067 adding chi2meas 2.28125e+08 id9: 1 (mm)R: 8.889 S: 8.90087 Diff= -0.0118678

-0.341299 adding chi2meas 2.28125e+08 id9: 2 (mm)R: 0 S: 4.89286 Diff= -4.89286

-0.351653 adding chi2meas 2.28125e+08 id9: 3 (mm)R: 0 S: 5.0413 Diff= -5.0413

TIME:MAT_MEAS_FILLED: 1120000 0.09

TIME:MAT_CAL_FILLED : 1120000 0

TIME:BEFORE_INVERSE : 1140000 0.02

TIME:AFTER_INVERSE : 1160000 0.02

TIME:MAT_MULTIPLIED : 1160000 0

Fit iteration 2 ...

2 Fit quality is = 0.000119393

2 Fit quality predicted improvement in distance to minimum is = 0.000119393

2 Fit quality derivative at 0 = -0.000238787

TIME:QUALITY_CHECKED: 1230000 0.07

SRPARPOS Optical Object Parameter Fit.Value Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0x88c33e8$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1250000 0.02

TIME:TOTAL PROGRAM : 1250000 0.68

------------------------------------------------------

Set Xlaser angle Z unk

(I have now:

Xlaser laser_MEp2_2

ENTRY {

angle angleBetweenAxis 90. prec_ang_las unk

}

center

X -22.500 prec_pos_tp fix

Y 43.25 prec_pos_tp fix

Z 0. prec_pos_tp fix

angles

X 0 prec_ang_tp unk //was cal

Y 0 prec_ang_tp unk //was cal

Z 0 prec_ang_tp unk

Laser moves together with the TP in x, y, z dir (so I can set it fix on the TP)

Rotation allowed in any directions

FITTED VALUES

2128.4 adding chi2meas 4.53009e+06 id1: 0 (mm)R: 8.686 S: 0 Diff= 8.686

1989.02 adding chi2meas 8.48629e+06 id1: 1 (mm)R: 8.334 S: 0 Diff= 8.334

7619.44 adding chi2meas 6.65422e+07 id1: 2 (mm)R: 18.34 S: 0 Diff= 18.34

7491.76 adding chi2meas 1.22669e+08 id1: 3 (mm)R: 18.19 S: 0 Diff= 18.19

7491.76 adding chi2meas 1.22669e+08 id1: 3 (mm)R: 18.19 S: 0 Diff= 18.19

-0.238164 adding chi2meas 1.22669e+08 id2: 0 (mm)R: 20.109 S: 20.1095 Diff= -0.000496095

0.281644 adding chi2meas 1.22669e+08 id2: 1 (mm)R: 20.313 S: 20.3123 Diff= 0.000718474

-1.27802 adding chi2meas 1.22669e+08 id2: 2 (mm)R: 18.134 S: 18.1493 Diff= -0.0153132

0.180449 adding chi2meas 1.22669e+08 id2: 3 (mm)R: 19.162 S: 19.1617 Diff= 0.000331123

-0.0472534 adding chi2meas 1.22669e+08 id3: 0 (mm)R: 18.674 S: 18.6741 Diff= -7.5133e-05

0.0892551 adding chi2meas 1.22669e+08 id3: 1 (mm)R: 18.196 S: 18.1958 Diff= 0.000235812

-0.176278 adding chi2meas 1.22669e+08 id3: 2 (mm)R: 18.213 S: 18.2135 Diff= -0.000470308

0.144921 adding chi2meas 1.22669e+08 id3: 3 (mm)R: 18.96 S: 18.9597 Diff= 0.000276509

761.842 adding chi2meas 1.23249e+08 id4: 0 (mm)R: 17.997 S: 0 Diff= 17.997

5925.49 adding chi2meas 1.58361e+08 id4: 1 (mm)R: 17.972 S: 0 Diff= 17.972

8159.44 adding chi2meas 2.24937e+08 id4: 2 (mm)R: 15.813 S: 0 Diff= 15.813

1785.29 adding chi2meas 2.28124e+08 id4: 3 (mm)R: 16.68 S: 0 Diff= 16.68

-0.693674 adding chi2meas 2.28124e+08 id5: 0 (mm)R: 16.898 S: 16.9002 Diff= -0.00224403

17.1792 adding chi2meas 2.28125e+08 id5: 1 (mm)R: 20.837 S: 19.4606 Diff= 1.3764

-0.295206 adding chi2meas 2.28125e+08 id5: 2 (mm)R: 16.888 S: 16.8888 Diff= -0.000835138

0.213873 adding chi2meas 2.28125e+08 id5: 3 (mm)R: 17.616 S: 17.6156 Diff= 0.000447423

0.303578 adding chi2meas 2.28125e+08 id6: 0 (mm)R: 13.403 S: 13.4019 Diff= 0.00106404

-1.49818 adding chi2meas 2.28125e+08 id6: 1 (mm)R: 13.39 S: 13.4159 Diff= -0.025944

-0.192563 adding chi2meas 2.28125e+08 id6: 2 (mm)R: 12.729 S: 12.7296 Diff= -0.000563056

0.356265 adding chi2meas 2.28125e+08 id6: 3 (mm)R: 13.201 S: 13.1994 Diff= 0.00158787

-1.44849 adding chi2meas 2.28125e+08 id7: 0 (mm)R: 13.549 S: 14.0509 Diff= -0.501884

0.0109471 adding chi2meas 2.28125e+08 id7: 1 (mm)R: 13.341 S: 13.341 Diff= 2.72036e-05

-0.0288784 adding chi2meas 2.28125e+08 id7: 2 (mm)R: 5.179 S: 5.17912 Diff= -0.000116611

-0.36839 adding chi2meas 2.28125e+08 id7: 3 (mm)R: 5.309 S: 5.33069 Diff= -0.0216853

-2.55784 adding chi2meas 2.28125e+08 id8: 0 (mm)R: 11.455 S: 12.5488 Diff= -1.09381

0.189906 adding chi2meas 2.28125e+08 id8: 1 (mm)R: 11.872 S: 11.8684 Diff= 0.00360688

-0.129656 adding chi2meas 2.28125e+08 id8: 2 (mm)R: 2.3 S: 3.62106 Diff= -1.32106

0.00343563 adding chi2meas 2.28125e+08 id8: 3 (mm)R: 3.77 S: 3.76994 Diff= 5.55405e-05

1.41177 adding chi2meas 2.28125e+08 id9: 0 (mm)R: 9.958 S: 9.88332 Diff= 0.0746799

-0.343297 adding chi2meas 2.28125e+08 id9: 1 (mm)R: 8.889 S: 8.89284 Diff= -0.00384115

-0.334647 adding chi2meas 2.28125e+08 id9: 2 (mm)R: 0 S: 4.7975 Diff= -4.7975

-0.345011 adding chi2meas 2.28125e+08 id9: 3 (mm)R: 0 S: 4.94608 Diff= -4.94608

TIME:MAT_MEAS_FILLED: 1160000 0.09

TIME:MAT_CAL_FILLED : 1160000 0

TIME:BEFORE_INVERSE : 1190000 0.03

TIME:AFTER_INVERSE : 1200000 0.01

TIME:MAT_MULTIPLIED : 1200000 0

Fit iteration 2 ...

2 Fit quality is = 0.000151306

2 Fit quality predicted improvement in distance to minimum is = 0.000151306

2 Fit quality derivative at 0 = -0.000302612

TIME:QUALITY_CHECKED: 1280000 0.08

SRPARPOS Optical Object Parameter Fit.Value Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0x93103e8$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1290000 0.01

TIME:TOTAL PROGRAM : 1290000 0.7

--------------------

For now I will use:

center z fix:

Xlaser laser_MEp2_2

ENTRY {

angle angleBetweenAxis 90. prec_ang_las unk

}

center

X -22.500 prec_pos_tp cal

Y 43.25 prec_pos_tp cal

Z 0. prec_pos_tp fix

angles

X 0 prec_ang_tp unk

Y 0 prec_ang_tp unk

Z 0 prec_ang_tp cal

& TP centre(x,y,z) cal

angle (x,y,z) cal

2 fits, FQ 0.0065

Need to find out prec_pos_tp & prec_ang_tp (we should rename these).

Right now use prec_pos_tp 20 & prec_ang_tp 10. (I included these for the laser on the TP).

Real uncertainties should be included.

----------------------------------

March 27, 2007

8):

Side 2: S:0 problem with id1 (ref sensor on side 2) and id4

set:

debug_verbose 3 (before: 0)

in the "las2_s0probl_dv3_output" file:

Let's take a look at id1:

-------------------------

@@@@ Start calculation of simulated value of COPS Measurement id1

@@@@ Start calculation of simulated value of COPS Measurement id2

@@@@ LR:OBJECT CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2

create laser lightray

LR: CREATE LIGHTRAY CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 OptO type is Xlaser

LightRay at creation

$$ LightRay point: (2.1470189,6.8536729,7.998)

$$ LightRay direction: (0.25881905,0.96592583,3.7491518e-33)

@@@@ LR:OBJECT CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT

dowel2(2.097651,6.5824951,8.04125)

dowel1(2.1411176,6.5708482,8.04125)

line_dowel21(-0.043466662,0.011646857,-0)

line_dowel21_perp(1.953515e-35,7.2906171e-35,0.045)

***** UP CCD *****

******************

%%%% CCD distances to Dowel2:

up ccd in local RF (-0.036829,0.06575,0)

up ccd in global RF (-0.035574082,0.0095320466,-0.06575)

***** DOWN CCD *****

...........etc

Now let's see id4:

------------------

@@@@ Start calculation of simulated value of COPS Measurement id4

@@@@ Start calculation of simulated value of COPS Measurement id5

@@@@ LR:OBJECT CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2

create laser lightray

LR: CREATE LIGHTRAY CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 OptO type is Xlaser

LightRay at creation

$$ LightRay point: (2.1470189,6.8536729,7.998)

$$ LightRay direction: (0.25881905,0.96592583,3.7491518e-33)

@@@@ LR:OBJECT CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT

dowel2(0.65579112,1.3752368,8.04925)

dowel1(0.61232446,1.3868836,8.04925)

line_dowel21(0.043466662,-0.011646857,-0)

line_dowel21_perp(-1.0381361e-34,-3.8743768e-34,0.045)

***** UP CCD *****

******************

%%%% CCD distances to Dowel2:

up ccd in local RF (-0.036829,0.06575,0)

up ccd in global RF (0.035574082,-0.0095320466,-0.06575)

***** DOWN CCD *****

********************

....etc

CONCLUSION: Simulated value is not calculated for id1 and id4.

Here is the short (debug_verbose 0) output for B=0T data (last iteration):

---------------------------------------------------------------------------------------------------------------------------------

FITTED VALUES

2128.4 adding chi2meas 4.53009e+06 id1: 0 (mm)R: 8.686 S: 0 Diff= 8.686

1989.02 adding chi2meas 8.48629e+06 id1: 1 (mm)R: 8.334 S: 0 Diff= 8.334

7619.44 adding chi2meas 6.65422e+07 id1: 2 (mm)R: 18.34 S: 0 Diff= 18.34

7491.76 adding chi2meas 1.22669e+08 id1: 3 (mm)R: 18.19 S: 0 Diff= 18.19

7491.76 adding chi2meas 1.22669e+08 id1: 3 (mm)R: 18.19 S: 0 Diff= 18.19

-0.0547546 adding chi2meas 1.22669e+08 id2: 0 (mm)R: 20.109 S: 20.1091 Diff=

-0.000114054

0.0554335 adding chi2meas 1.22669e+08 id2: 1 (mm)R: 20.313 S: 20.3129 Diff=

0.000141411

-1.27859 adding chi2meas 1.22669e+08 id2: 2 (mm)R: 18.134 S: 18.1493 Diff=

-0.01532

0.179752 adding chi2meas 1.22669e+08 id2: 3 (mm)R: 19.162 S: 19.1617 Diff=

0.000329844

0.0936368 adding chi2meas 1.22669e+08 id3: 0 (mm)R: 18.674 S: 18.6739 Diff=

0.000148882

-0.143553 adding chi2meas 1.22669e+08 id3: 1 (mm)R: 18.196 S: 18.1964 Diff=

-0.000379267

-0.17739 adding chi2meas 1.22669e+08 id3: 2 (mm)R: 18.213 S: 18.2135 Diff=

-0.000473276

0.143471 adding chi2meas 1.22669e+08 id3: 3 (mm)R: 18.96 S: 18.9597 Diff=

0.000273743

761.842 adding chi2meas 1.23249e+08 id4: 0 (mm)R: 17.997 S: 0 Diff= 17.997

5925.49 adding chi2meas 1.58361e+08 id4: 1 (mm)R: 17.972 S: 0 Diff= 17.972

8159.44 adding chi2meas 2.24937e+08 id4: 2 (mm)R: 15.813 S: 0 Diff= 15.813

1785.29 adding chi2meas 2.28124e+08 id4: 3 (mm)R: 16.68 S: 0 Diff= 16.68

-0.856331 adding chi2meas 2.28124e+08 id5: 0 (mm)R: 16.898 S: 16.9008 Diff=

-0.00277023

21.2084 adding chi2meas 2.28125e+08 id5: 1 (mm)R: 20.837 S: 19.1378 Diff=

1.69922

-0.293978 adding chi2meas 2.28125e+08 id5: 2 (mm)R: 16.888 S: 16.8888 Diff=

-0.000831663

0.215345 adding chi2meas 2.28125e+08 id5: 3 (mm)R: 17.616 S: 17.6155 Diff=

0.000450501

-0.00475649 adding chi2meas 2.28125e+08 id6: 0 (mm)R: 13.403 S: 13.403 Diff=

-1.66715e-05

-0.0644404 adding chi2meas 2.28125e+08 id6: 1 (mm)R: 13.39 S: 13.3911 Diff=

-0.00111591

-0.193361 adding chi2meas 2.28125e+08 id6: 2 (mm)R: 12.729 S: 12.7296 Diff=

-0.000565387

0.355728 adding chi2meas 2.28125e+08 id6: 3 (mm)R: 13.201 S: 13.1994 Diff=

0.00158548

0.508032 adding chi2meas 2.28125e+08 id7: 0 (mm)R: 13.549 S: 13.373 Diff=

0.176026

-0.0162652 adding chi2meas 2.28125e+08 id7: 1 (mm)R: 13.341 S: 13.341 Diff=

-4.04189e-05

-0.0300045 adding chi2meas 2.28125e+08 id7: 2 (mm)R: 5.179 S: 5.17912 Diff=

-0.000121158

-0.369043 adding chi2meas 2.28125e+08 id7: 3 (mm)R: 5.309 S: 5.33072 Diff=

-0.0217237

-0.917217 adding chi2meas 2.28125e+08 id8: 0 (mm)R: 11.455 S: 11.8472 Diff=

-0.39223

0.0655658 adding chi2meas 2.28125e+08 id8: 1 (mm)R: 11.872 S: 11.8708 Diff=

0.00124529

-0.129546 adding chi2meas 2.28125e+08 id8: 2 (mm)R: 2.3 S: 3.61993 Diff=

-1.31993

0.0817087 adding chi2meas 2.28125e+08 id8: 3 (mm)R: 3.77 S: 3.76868 Diff=

0.0013209

4.94492 adding chi2meas 2.28125e+08 id9: 0 (mm)R: 9.958 S: 9.69642 Diff=

0.261576

-1.06058 adding chi2meas 2.28125e+08 id9: 1 (mm)R: 8.889 S: 8.90087 Diff=

-0.0118669

-0.341071 adding chi2meas 2.28125e+08 id9: 2 (mm)R: 0 S: 4.88959 Diff=

-4.88959

-0.351425 adding chi2meas 2.28125e+08 id9: 3 (mm)R: 0 S: 5.03802 Diff=

-5.03802

TIME:MAT_MEAS_FILLED: 1090000 0.1

TIME:MAT_CAL_FILLED : 1090000 0

TIME:BEFORE_INVERSE : 1110000 0.02

TIME:AFTER_INVERSE : 1130000 0.02

TIME:MAT_MULTIPLIED : 1130000 0

Fit iteration 2 ...

2 Fit quality is = 0.00654915

2 Fit quality predicted improvement in distance to minimum is = 0.00654915

2 Fit quality derivative at 0 = -0.0130983

TIME:QUALITY_CHECKED: 1210000 0.08

SRPARPOS Optical Object Parameter Fit.Value Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0xa2b13e8$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1220000 0.01

TIME:TOTAL PROGRAM : 1220000 0.67

---------------------------------------------------------------------------------------------------------------------------------------

For the SIMULATION (measured values: laser at center of CCDs; shims not

included):

I get the same S:0 problem.

The chamber centers are aligned along one line, so everything seem to look

fine.

So this S:0 problem does not affect my chamber positions.

Email Pedro to find out why S:0 is not calculated.

--------------------------------------------------

--------------------------------------------------

6):

In the COCOA SDF the chamber center and angle uncertainties are: 100 (m & 100 (rad.(=0.1 mm and 0.1 mrad)

I looked at Oleg's presentation from the last CMS week



and on page 7 he shows Chamber tilt angles:

a) Are these angles for all the chambers?

At the top of the page he wrote: (ME+1 4 ME+4)

So this can be eather for ME+1, ME+4

or ME+1 &/- ME+4

b) On Oleg's drawing I see a wide range of angles: from -4.0 mrad to 4.0 mrad (except for the 3 center values -0.5, 0.0, 0.5 mrad the rotations are an order bigger then our uncertainty in the SDF)

Ask Oleg to send us the values from ME+2 !!!

This is an important problem. If the rotation uncertainties are large, there is more freedom for the chambers to move and displacements of the chamber centers can vary a lot. What we have now in the SDF is not realistic!

Are these values for all the angles (x, y, z)? Oleg did not mention that in the plot.

-----------

March 28, 2007

-Received ME+2 PG rotations from Oleg.

-Rotations are for all the chambers ME+1, ME+2, ME+3, ME+4.

-Rotations are analyzed only in the z direction.

-The latest version of photogrammetry data analysis you can find at:



----------------------------

Here I verify what I get if I include for the angle uncertainty the max. 4.0 mrad (4000 (rad) absolute value in the SDF.

For angle uncertainty 100 (rad:

See: report_CSCrot_100urad.out

%%%% Optical Object: CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2

CAL: 7 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 centre_X -22.5 +- 20 -22.5 +- 20 Q1

CAL: 8 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 centre_Y 43.25 +- 20 43.25 +- 20 Q1

FIX: -1 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 centre_Z 3.6606937e-13 +- 0 0 +- 20 Q0

UNK: 9 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_X 0.052910407 +- 1015.9062 0 +- 10 Q2

UNK: 10 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_Y 0.045782262 +- 702.09726 0 +- 10 Q2

CAL: 11 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_Z -0.00010114307 +- 9.9994689 0 +- 10 Q1

UNK: 6 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angleBetweenAxis 89.769107 +- 1153.0335 90 +- 100 Q2

.............

CAL: 0 CMS/slm_p2_2/MEp2_tp2 centre_X -7175.829 +- 100 -7175.829 +- 100 Q1

CAL: 1 CMS/slm_p2_2/MEp2_tp2 centre_Y -43.250004 +- 100 -43.25 +- 100 Q1

CAL: 2 CMS/slm_p2_2/MEp2_tp2 centre_Z 22.499992 +- 99.999999 22.5 +- 100 Q1

CAL: 3 CMS/slm_p2_2/MEp2_tp2 angles_X 0 +- 697.99634 0 +- 698 Q1

CAL: 4 CMS/slm_p2_2/MEp2_tp2 angles_Y -89.999949 +- 697.99974 -90 +- 698 Q1

CAL: 5 CMS/slm_p2_2/MEp2_tp2 angles_Z 0 +- 697.99405 0 +- 698 Q1

.............

%%%% Optical Object: CMS/slm_p2_2/MEp2_1_14

CAL: 26 CMS/slm_p2_2/MEp2_1_14 centre_X 2371.279 +- 100 2371.279 +- 100 Q1

UNK: 27 CMS/slm_p2_2/MEp2_1_14 centre_Y -83.298049 +- 2345.4737 -93.35 +- 100 Q2

UNK: 28 CMS/slm_p2_2/MEp2_1_14 centre_Z 110.49179 +- 739.85483 118.16258 +- 100 Q2

CAL: 29 CMS/slm_p2_2/MEp2_1_14 angles_X 0.014897679 +- 98.161506 0 +- 100 Q1

CAL: 30 CMS/slm_p2_2/MEp2_1_14 angles_Y 79.994537 +- 82.124116 80 +- 100 Q1

CAL: 31 CMS/slm_p2_2/MEp2_1_14 angles_Z -0.014884565 +- 98.107007 0 +- 100 Q1

.............

%%%% Optical Object: CMS/slm_p2_2/MEp2_1_04

CAL: 60 CMS/slm_p2_2/MEp2_1_04 centre_X -2371.279 +- 100 -2371.279 +- 100 Q1

UNK: 61 CMS/slm_p2_2/MEp2_1_04 centre_Y -77.290199 +- 1477.0959 -93.35 +- 100 Q2

UNK: 62 CMS/slm_p2_2/MEp2_1_04 centre_Z 117.31311 +- 475.82723 118.16258 +- 100 Q2

CAL: 63 CMS/slm_p2_2/MEp2_1_04 angles_X -0.00080846244 +- 99.996075 0 +- 100 Q1

CAL: 64 CMS/slm_p2_2/MEp2_1_04 angles_Y -80.000007 +- 100 -80 +- 100 Q1

CAL: 65 CMS/slm_p2_2/MEp2_1_04 angles_Z -2.2631255e-06 +- 100 0 +- 100 Q1

.............

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_27

CAL: 94 CMS/slm_p2_2/MEp2_2_27 centre_X 5225.848 +- 100 5225.848 +- 100 Q1

UNK: 95 CMS/slm_p2_2/MEp2_2_27 centre_Y -89.919865 +- 2766.7935 -93.35 +- 100 Q2

UNK: 96 CMS/slm_p2_2/MEp2_2_27 centre_Z 150.90198 +- 957.58216 157.20274 +- 100 Q2

CAL: 97 CMS/slm_p2_2/MEp2_2_27 angles_X -0.00012301272 +- 99.957123 0 +- 100 Q1

CAL: 98 CMS/slm_p2_2/MEp2_2_27 angles_Y 84.997758 +- 77.001592 85 +- 100 Q1

CAL: 99 CMS/slm_p2_2/MEp2_2_27 angles_Z -8.4039488e-05 +- 99.955838 0 +- 100 Q1

............

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_08

CAL: 128 CMS/slm_p2_2/MEp2_2_08 centre_X -5225.848 +- 100 -5225.848 +- 100 Q1

UNK: 129 CMS/slm_p2_2/MEp2_2_08 centre_Y -85.326099 +- 588.0951 -93.35 +- 100 Q2

UNK: 130 CMS/slm_p2_2/MEp2_2_08 centre_Z 150.77115 +- 205.80143 157.20274 +- 100 Q2

CAL: 131 CMS/slm_p2_2/MEp2_2_08 angles_X 0.014521963 +- 98.104495 0 +- 100 Q1

CAL: 132 CMS/slm_p2_2/MEp2_2_08 angles_Y -84.992289 +- 76.77407 -85 +- 100 Q1

CAL: 133 CMS/slm_p2_2/MEp2_2_08 angles_Z 0.014971783 +- 98.093282 0 +- 100 Q1

For angle uncertainty 4000 (rad all (x, y, z) dir. (note Oleg's calculation is only in Z dir; ask if he can do the analysis also for the other directions):

------------------------------------

See report_CSCrot_4000urad.out

%%%% Optical Object: CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2

CAL: 7 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 centre_X -22.5 +- 20 -22.5 +- 20 Q1

CAL: 8 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 centre_Y 43.25 +- 20 43.25 +- 20 Q1

FIX: -1 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 centre_Z -3.1095114e-13 +- 0 0 +- 20 Q0

UNK: 9 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_X -0.090771765 +- 3460.0148 0 +- 10 Q2

UNK: 10 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_Y 0.077295655 +- 2412.6197 0 +- 10 Q2

CAL: 11 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_Z -9.762428e-05 +- 9.9994945 0 +- 10 Q1

UNK: 6 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angleBetweenAxis 89.814378 +- 1179.8891 90 +- 100 Q2

............

%%%% Optical Object: CMS/slm_p2_2/MEp2_tp2

CAL: 0 CMS/slm_p2_2/MEp2_tp2 centre_X -7175.829 +- 100 -7175.829 +- 100 Q1

CAL: 1 CMS/slm_p2_2/MEp2_tp2 centre_Y -43.25 +- 100 -43.25 +- 100 Q1

CAL: 2 CMS/slm_p2_2/MEp2_tp2 centre_Z 22.5 +- 100 22.5 +- 100 Q1

CAL: 3 CMS/slm_p2_2/MEp2_tp2 angles_X 0 +- 697.99971 0 +- 698 Q1

CAL: 4 CMS/slm_p2_2/MEp2_tp2 angles_Y -89.999992 +- 697.99999 -90 +- 698 Q1

CAL: 5 CMS/slm_p2_2/MEp2_tp2 angles_Z 0 +- 697.99971 0 +- 698 Q1

..............

%%%% Optical Object: CMS/slm_p2_2/MEp2_1_14

CAL: 26 CMS/slm_p2_2/MEp2_1_14 centre_X 2371.279 +- 100 2371.279 +- 100 Q1

UNK: 27 CMS/slm_p2_2/MEp2_1_14 centre_Y -107.11421 +- 31695.654 -93.35 +- 100 Q2

UNK: 28 CMS/slm_p2_2/MEp2_1_14 centre_Z 105.14596 +- 22048.986 118.16258 +- 100 Q2

CAL: 29 CMS/slm_p2_2/MEp2_1_14 angles_X 0.36501954 +- 3094.8742 0 +- 4000 Q1

CAL: 30 CMS/slm_p2_2/MEp2_1_14 angles_Y 80.018123 +- 2310.3661 80 +- 4000 Q1

CAL: 31 CMS/slm_p2_2/MEp2_1_14 angles_Z -0.055615711 +- 3256.6307 0 +- 4000 Q1

...............

%%%% Optical Object: CMS/slm_p2_2/MEp2_1_04

CAL: 60 CMS/slm_p2_2/MEp2_1_04 centre_X -2371.279 +- 100 -2371.279 +- 100 Q1

UNK: 61 CMS/slm_p2_2/MEp2_1_04 centre_Y -73.56265 +- 19461.764 -93.35 +- 100 Q2

UNK: 62 CMS/slm_p2_2/MEp2_1_04 centre_Z 113.47926 +- 13574.081 118.16258 +- 100 Q2

CAL: 63 CMS/slm_p2_2/MEp2_1_04 angles_X -1.1557212 +- 3772.3447 0 +- 4000 Q1

CAL: 64 CMS/slm_p2_2/MEp2_1_04 angles_Y -80.065901 +- 3998.5039 -80 +- 4000 Q1

CAL: 65 CMS/slm_p2_2/MEp2_1_04 angles_Z -0.016344441 +- 3999.9877 0 +- 4000 Q1

..............

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_27

CAL: 94 CMS/slm_p2_2/MEp2_2_27 centre_X 5225.848 +- 100 5225.848 +- 100 Q1

UNK: 95 CMS/slm_p2_2/MEp2_2_27 centre_Y -119.79871 +- 40166.43 -93.35 +- 100 Q2

UNK: 96 CMS/slm_p2_2/MEp2_2_27 centre_Z 144.08008 +- 28641.734 157.20274 +- 100 Q2

CAL: 97 CMS/slm_p2_2/MEp2_2_27 angles_X -0.11927717 +- 3383.6661 0 +- 4000 Q1

CAL: 98 CMS/slm_p2_2/MEp2_2_27 angles_Y 85.028008 +- 2309.8917 85 +- 4000 Q1

CAL: 99 CMS/slm_p2_2/MEp2_2_27 angles_Z -0.2074195 +- 3402.4764 0 +- 4000 Q1

.............

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_08

CAL: 128 CMS/slm_p2_2/MEp2_2_08 centre_X -5225.848 +- 100 -5225.848 +- 100 Q1

UNK: 129 CMS/slm_p2_2/MEp2_2_08 centre_Y -89.845178 +- 6455.6494 -93.35 +- 100 Q2

UNK: 130 CMS/slm_p2_2/MEp2_2_08 centre_Z 149.73148 +- 4504.2483 157.20274 +- 100 Q2

CAL: 131 CMS/slm_p2_2/MEp2_2_08 angles_X -0.32072603 +- 3193.2516 0 +- 4000 Q1

CAL: 132 CMS/slm_p2_2/MEp2_2_08 angles_Y -84.956676 +- 2309.8581 -85 +- 4000 Q1

CAL: 133 CMS/slm_p2_2/MEp2_2_08 angles_Z 0.30161636 +- 3273.9624 0 +- 4000 Q1

Conclusion: I see a large difference in the displacements for angle uncertainties of 100 (rad and 4000 (rad all (x,y,z) dir.

TO DO: use values from Oleg for ME+2 in the Z dir.

The question is what to use for x,y directions.(?)

I also get the following output for 4000 (rad:

----------------

FITTED VALUES (last iteration)

2128.4 adding chi2meas 4.53009e+06 id1: 0 (mm)R: 8.686 S: 0 Diff= 8.686

1989.02 adding chi2meas 8.48629e+06 id1: 1 (mm)R: 8.334 S: 0 Diff= 8.334

7619.44 adding chi2meas 6.65422e+07 id1: 2 (mm)R: 18.34 S: 0 Diff= 18.34

7491.76 adding chi2meas 1.22669e+08 id1: 3 (mm)R: 18.19 S: 0 Diff= 18.19

-0.0597261 adding chi2meas 1.22669e+08 id2: 0 (mm)R: 20.109 S: 20.1091 Diff= -0.000124409

0.0617782 adding chi2meas 1.22669e+08 id2: 1 (mm)R: 20.313 S: 20.3128 Diff= 0.000157596

-1.24214 adding chi2meas 1.22669e+08 id2: 2 (mm)R: 18.134 S: 18.1489 Diff= -0.0148834

0.193388 adding chi2meas 1.22669e+08 id2: 3 (mm)R: 19.162 S: 19.1616 Diff= 0.000354866

0.0808118 adding chi2meas 1.22669e+08 id3: 0 (mm)R: 18.674 S: 18.6739 Diff= 0.000128491

-0.148281 adding chi2meas 1.22669e+08 id3: 1 (mm)R: 18.196 S: 18.1964 Diff= -0.000391759

-0.191371 adding chi2meas 1.22669e+08 id3: 2 (mm)R: 18.213 S: 18.2135 Diff= -0.000510577

0.141444 adding chi2meas 1.22669e+08 id3: 3 (mm)R: 18.96 S: 18.9597 Diff= 0.000269874

761.842 adding chi2meas 1.23249e+08 id4: 0 (mm)R: 17.997 S: 0 Diff= 17.997

5925.49 adding chi2meas 1.58361e+08 id4: 1 (mm)R: 17.972 S: 0 Diff= 17.972

8159.44 adding chi2meas 2.24937e+08 id4: 2 (mm)R: 15.813 S: 0 Diff= 15.813

1785.29 adding chi2meas 2.28124e+08 id4: 3 (mm)R: 16.68 S: 0 Diff= 16.68

-0.829083 adding chi2meas 2.28124e+08 id5: 0 (mm)R: 16.898 S: 16.9007 Diff= -0.00268208

20.3586 adding chi2meas 2.28125e+08 id5: 1 (mm)R: 20.837 S: 19.2059 Diff= 1.63113

-0.333086 adding chi2meas 2.28125e+08 id5: 2 (mm)R: 16.888 S: 16.8889 Diff= -0.000942301

0.236696 adding chi2meas 2.28125e+08 id5: 3 (mm)R: 17.616 S: 17.6155 Diff= 0.000495167

-0.0144218 adding chi2meas 2.28125e+08 id6: 0 (mm)R: 13.403 S: 13.4031 Diff= -5.05484e-05

0.0721038 adding chi2meas 2.28125e+08 id6: 1 (mm)R: 13.39 S: 13.3888 Diff= 0.00124862

-0.189289 adding chi2meas 2.28125e+08 id6: 2 (mm)R: 12.729 S: 12.7296 Diff= -0.000553482

0.288806 adding chi2meas 2.28125e+08 id6: 3 (mm)R: 13.201 S: 13.1997 Diff= 0.00128721

0.693761 adding chi2meas 2.28125e+08 id7: 0 (mm)R: 13.549 S: 13.3086 Diff= 0.240379

-0.00993708 adding chi2meas 2.28125e+08 id7: 1 (mm)R: 13.341 S: 13.341 Diff= -2.46936e-05

-0.0195572 adding chi2meas 2.28125e+08 id7: 2 (mm)R: 5.179 S: 5.17908 Diff= -7.89721e-05

0.25327 adding chi2meas 2.28125e+08 id7: 3 (mm)R: 5.309 S: 5.29409 Diff= 0.0149087

-0.948855 adding chi2meas 2.28125e+08 id8: 0 (mm)R: 11.455 S: 11.8608 Diff= -0.40576

0.0411957 adding chi2meas 2.28125e+08 id8: 1 (mm)R: 11.872 S: 11.8712 Diff= 0.00078243

-0.131881 adding chi2meas 2.28125e+08 id8: 2 (mm)R: 2.3 S: 3.64372 Diff= -1.34372

0.00275418 adding chi2meas 2.28125e+08 id8: 3 (mm)R: 3.77 S: 3.76996 Diff= 4.45241e-05

4.93363 adding chi2meas 2.28125e+08 id9: 0 (mm)R: 9.958 S: 9.69702 Diff= 0.260979

-1.04491 adding chi2meas 2.28125e+08 id9: 1 (mm)R: 8.889 S: 8.90069 Diff= -0.0116915

-0.538085 adding chi2meas 2.28125e+08 id9: 2 (mm)R: 0 S: 7.71399 Diff= -7.71399

-0.54686 adding chi2meas 2.28125e+08 id9: 3 (mm)R: 0 S: 7.83979 Diff= -7.83979

TIME:MAT_MEAS_FILLED: 1550000 0.11

TIME:MAT_CAL_FILLED : 1550000 0

TIME:BEFORE_INVERSE : 1580000 0.03

TIME:AFTER_INVERSE : 1600000 0.02

TIME:MAT_MULTIPLIED : 1600000 0

Fit iteration 3 ...

3 Fit quality is = 0.00430412

3 Fit quality predicted improvement in distance to minimum is = 0.00430412

3 Fit quality derivative at 0 = -0.00860824

TIME:QUALITY_CHECKED: 1680000 0.08

SRPARPOS Optical Object Parameter Fit.Value Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0x94ef3e8$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1700000 0.02

TIME:TOTAL PROGRAM : 1700000 1.05

Here is the plot with DCOPS CCD orientations:

[pic]

Answer from Pedro for the S:0 problem:

The problem is in the file . “There is an indirection of an

'end()' iterator, what may give random results. Just substitute the line

67 of Alignment/CocoaModel/src/

  while( (*vocite) !=  *(OptOList().end()) ) {

by

  while( vocite) != OptOList().end() ) {

 

March 28 –March 29, 2007

1) DCOPS orientations analysis

2) Find solution to “S:0 problem” (include Pedro’s changes and recompile cocoa)

3) Test simulation and laser 2 data and analyze output; plot results in CMS coord system (XY and XZ plane)

4) Analyze chamber rotations using O. Prokofiev analysis

Results see in presentation:



Title: cocoa_dcops_analysis_GyongyiBaksay_march28_2007

I will put this also on the Fl Tech hep website (small correction included on page 10)

To do:

The first priority would be to do an error analysis. We have to verify all the uncertainties included in the SDF (without that we will not get a realistic picture). We also need to understand the unk, cal, fix relation between cocoa objects!

Tasks that need to be done/verified from previous discussions with Marcus:

1) Include nominal values on the CSC center, a-pin, DCOPS plots (CMS coord system). Note: uncertainties are not on the plot, because I don’t get this in the COCOA output)

2) Check orientation of laser (see debug_verbose 3 output)

3) Compare results to PG!

4) Include z tilt uncertainty from Oleg for ME+2 in the SDF file and see what displacements I get

5) Do the same analysis for laser 5 data

To do: prepare a script in root that can read out cocoa output (ascii file) and make a plot with CSC center, DCOPS positions, Apins (position + uncertainties).

March 30, April 2 and 3,2007

+++++++++++++++++++++++++++++

ROOT Installation

----------------------

1) You can download binaries from

and click on the

"recommended" version (on March 3, 2007 this was:Pro, version 5.14/00)

On the next webpage you will find binaries for the different platforms

(Linux, Solaris,MAC,Windows). If you find your platform and gcc version on

the binaries list you are lucky:)! Download it.

You can check your gcc version with: gcc -v

2)Install ROOT from the source:

Getting the source (you can find this info here:

)

To install ROOT from source you first have to get the tar file containing

the source.

prompt% ftp root.cern.ch

User: anonymous

Password:

ftp> cd /root

ftp> bin

ftp> ls *source.tar.gz

ftp> get root-.source.tar.gz

ftp> bye

Unpack the distribution:

prompt% gzip -dc root-.source.tar.gz | tar -xf -

Check if you have libXpm.a (I searched the internet to see where is this

library for SUSE 10.) I can find it in: /usr/X11R6/lib

set ROOTSYS to the `root' directory:

sh family:

export ROOTSYS=/root --->(this one works also for bash)

csh family

setenv ROOTSYS /root

now type the build commands:

all shells:

./configure --help | more

(At the end of the file you will see a list with supported architectures.)

Since on my machine I have linux I use:

gbaksay@linux:~/root> ./configure linux

This is the output:

---------------

Configuring for linux

Checking for libX11 ... /usr/X11R6/lib

Checking for X11/Xlib.h ... /usr/include

Checking for X11/Xft/Xft.h ... /usr/include

Checking for libXpm ... /usr/X11R6/lib

Checking for libXft ... /usr/X11R6/lib

Checking whether to build included libfreetype6 ... yes

Checking whether to build included libpcre ... yes

Checking whether to build included zlib ... yes

Checking for GL/gl.h ... /usr/include

Checking for libGL, or libMesaGL ... /usr/lib

Checking for libGLU, or libMesaGLU ... /usr/lib

Checking for mysql_config ... not found

Checking for mysql.h ... no

Checking for libmysqlclient_r, libmysqlclient, or mysqlclient ... no

.......etc

Enabled support for asimage, astiff, builtin_afterimage, builtin_freetype,

builtin_pcre, builtin_zlib, cintex, exceptions, krb5, mathcore, opengl,

pch, python, reflex, shadowpw, shared, ssl, xft, xml, xrootd.

To build ROOT type:

make

make install

--------------end-----------------

Here are the next steps:

gmake [or, make -j2 for dual CPU machines]

{this takes about 38 minutes!}

gmake cintdlls [creates the CINT precompiled headers.

Do it once only when starting a new version]

gmake install [when run directory is not rootsys]

{since my run directory is ROOTSYS, I did not use this}

add $ROOTSYS/bin to PATH and $ROOTSYS/lib to LD_LIBRARY_PATH:

{it is probably better to link everything to the system bin directory, see

end of description}

---------------

sh family:

export PATH=$ROOTSYS/bin:$PATH

export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH

export DYLD_LIBRARY_PATH=$ROOTSYS/lib:$DYLD_LIBRARY_PATH (MacOS X

only)

csh family:

setenv PATH ${ROOTSYS}/bin:${PATH}

setenv LD_LIBRARY_PATH ${ROOTSYS}/lib:${LD_LIBRARY_PATH}

setenv DYLD_LIBRARY_PATH ${ROOTSYS}/lib:${DYLD_LIBRARY_PATH}

(MacOS X only)

rehash

------------

Since I have bash I included these settings in my .bashrc file:

-------------

export ROOTSYS=/home/gbaksay/root

PATH="$PATH:/home/gbaksay/cern/2002/bin:/home/gbaksay:/home/gbaksay/bin:/home/g$

export PATH

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib

I also included the help files ("man")

export MANPATH=$MANPATH:$ROOTSYS/man

--------------------->end

Now, try running root:

root

---------------------

If you want to install ROOT in a fixed location (like: /usr/local/bin or

/usr/bin), not depending on ROOTSYS:

1) get the sources of latest ROOT (see above)

2) now type the build commands:

all shells:

./configure --help

./configure --prefix=/usr/local [change arch appropriately]

gmake [or, make -j2, for dual CPU machines]

gmake install [su to root if --prefix points to a system

dir]

3) try running root:

sh family:

root

csh family:

rehash

root

-------------------

The readme files are in:

/home/gbaksay/root/README

It seems like you need to cd to the directory where you want to use

certain packages/programs.

Example:

cd root/tutorials

Run root with:

root

at the command promt each command is preceded by a "."(dot)

Example:

.x benchmarks.C {will run all tutorials nd will benchmark your machine}

or

.x demos.C {this is a tutorial}

provides you a toolbar where you can click on buttons (coresp. to

tutorials)

or

.q {to quit}

Compiling and running ROOT test programs

========================================

To run some ROOT test programs, go to the root/test directory and do

(after having selected the machine dependent flags in the Makefile):

$ make

$ ./Event

$ ./hsimple

$ ./minexam

$ ./tcollex

$ ./tstring

------------

Examples:

1)

root [13] float x=5;

root [14] float y=7;

root [15] for(int i=2;ithis creates histos

Comment: this is C++ combined with PAW, HBOOK commands....file structure:

some similarities with MATHLAB...this should be easy to learn.

README file from this dir. describes the directory structure and the test

files.

with gmake one can create the .so files

Some test files have complex programming structures ...I better read

chapter 2 now:)



(Getting started: topic-> how to use root interactively)

...ah, ok here is some more useful info:

Starts with settings in your .bashrc (.cshrc, etc) files

---->Some options (that I found useful...others info read in the doc):

root -b (run without graphics -useful if cannot set display)

root filename (execute a script(s) without entering root)

root -l (do not show the image logo)

root -q (exit after processing commnd line)

Example:

----------

Execute script without graphics and entering root:

root -b -q hsimple.C > hsimple.log

If you are more interested in compilation speed than interpreter speed:

root -b -q hsimple.so > hsimple.log

Just some C++ in root:

root [3] 1+sqrt(9)

(const double)4.00000000000000000e+00

root [4] int a

root [5] a=sqrt(9)

(const int)3

root [6] for (int i=0; i all objects can be drawn

--> to draw an object in the active canvas:

object. Draw()

-> if no canvas defined, a default one will be created (named: "cl")

Create a function and plot it:

root [12] TF1 f1("func","log(x)",0,10)

root [13] f1.Draw()

- f1=function

- TF1=class

- sin(x)/x=constructor function

- 0 and 10 are the limits

(just like paw, hbook)

-> in the canvas, at the top click on view to see editor, toolbar etc

This is an intercative graphical tool (cool!)

One can use X3D and OpenGL with ->view->view with (I assume for 3D

graphics)

Methods that can be applied to the object f1

object.method_name(parameter)

example:

f1.Eval(3)

f1.Derivative(3)

f1.Integral(0,3)

If the object is a pointer replace the "." with a arrow "->"

object_ptr->method_name(parameters) (must be used in the compiled code)

To plot one can use:

f1.Draw() or

TF1::Paint

(by default this set 100 equidistant point to draw)

This can be increased with:

f1.SetNpx(2000)

One can set the range with:

f1.SetRange(-10,10)

f1.Draw()

If save this with "save/Canvas.C" in the file menu=>generate a script

showing the options set in the current canvas.

If saved in .root format this will allow later modifications.

(can be also saved as ps, eps, gif etc)

Build more windows in one (multi-pod canvas):

root [26] TCanvas *MyC = new TCanvas("MyC","Test canvas",1)

root [27] MyC->Divide(2,2)

root [28] MyC->cd(1)

(class TVirtualPad*)0x8663010

root [29] f1.Draw()

(MyC can be any name)

Printing decribed in chapter 2, page 16

---->ROOT COMMAND LINE:

CINT commands start with "."

Load a file: ".L"

Load an executable ".x"

Shell commands start with: ".!" Example: ".!"

New Browser command: TBrowser *b=new TBrowser() {for some reason I could

not click in it}

Let's try a short program (using command prompt):

root [57] {

end with '}', '@':abort > Int_t j=0;

end with '}', '@':abort > for(Int_t i=0; i {

end with '}', '@':abort > j=j+i;

end with '}', '@':abort > coutGetListOfCanvases()->FindObject("c1")

This returns a pointer TObject:

(const class TObject*)0x0

--->GFILE:

gFile=pointer to the current open file in ROOT

--->GDIRECTORY

gDirectory=pointer to the current directory

--->GPAD

gPad=pointer to the active pad.

Why is this good?

Example: if you want to change the coclor of the active pad but you don't

know its name then you can use the pointer gPad:

gPad->SetFillColor(38)

In the view menu of the open canvas one can find the list of colors.

To see the color change type: f1.Draw()

--->GRANDOM

gRandom-> pointer to the current random number generator

(default:TRandom3)

Here is how to create your own random numbefr generator

root [23] delete gRandom

root [24] gRandom = new TRandom2(0) {seed is zero}

(class TRandom2*)0x85d3480

root [25]

--->GENV

gEnv=environment settings for current session

root [26] gEnv->Print()

{this shows the content of the .rootrc file}

Unix.*.Root.DynamicPath: .:/home/gbaksay/root/lib: [Global]

Unix.*.Root.MacroPath: .:/home/gbaksay/root/macros: [Global]

WinNT.*.Root.DynamicPath:

.;/home/gbaksay/root/bin;/home/gbaksay/bin:/usr/local/bin:/usr/bin:

/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:

/usr/lib/mit/bin:/usr/lib/mit/sbin:/home/gbaksay/cern/2002/bin:

/home/gbaksay:/home/gbaksay/bin:/home/gbaksay/anal:

/home/gbaksay/root/bin:/home/gbaksay/cern/2002/bin:/home/gbaksay:

/home/gbaksay/bin:/home/gbaksay/anal:/home/gbaksay/root/bin:

/home/gbaksay/cern/2002/bin:/home/gbaksay:/home/gbaksay/bin:

/home/gbaksay/anal:/home/gbaksay/root/bin;

[Global]

WinNT.*.Root.MacroPath: .;/home/gbaksay/root/macros; [Global]

Unix.*.Root.UseTTFonts: true [Global]

*.*.Root.TTFontPath: /home/gbaksay/root/fonts [Global]

...etc

--->LOGON AND LOGOFF scripts

The following command will open a VI editor:

root [1] edit("c1.C")

Note: you must be in the directory where you saved the c1 canvas.

Editors are set in .../root/tutorials/rootalias.C

(default is VI)

I changed in my .bashrc file to

export EDITOR=/usr/bin/emacs

This is my c1 file:

{

//=========Macro generated from canvas: c1/c1

//========= (Thu Apr 5 15:50:52 2007) by ROOT version5.15/04

TCanvas *c1 = new TCanvas("c1", "c1",12,32,699,501);

c1->Range(-12.4681,-0.44905,12.5106,1.23058);

c1->SetBorderSize(2);

c1->SetFrameFillColor(0);

TF1 *func1 = new TF1("func1","sin(x)/x",-10,10);

func1->SetNpx(2000);

func1->SetFillColor(19);

func1->SetFillStyle(0);

func1->SetLineWidth(3);

func1->Draw("");

TPaveText *pt = new TPaveText(0.01,0.940038,0.137325,0.995,"blNDC");

pt->SetName("title");

pt->SetBorderSize(2);

pt->SetFillColor(19);

TText *text = pt->AddText("sin(x)/x");

pt->Draw();

c1->Modified();

c1->cd();

c1->SetSelected(c1);

--->HISTORY FILE

History file is located in the home directory:

/home/gbaksay/.root_hist

CONVERTING FROM PAW to ROOT:

described in ch 2, page 22

========================

April 5, 2007

+++++++++++++

To DO list:

Verify apin-info.

-----------------

Chamber center is not in the center of the line connecting a-pins.

Marcus set apins at equal distance from center.

Modify this in the SDF.

Also verify why I get different Z_cms coord for the apins and CSC center.

They should be in the same CMS RPhi plane (equal Z_cms dist.)

Verify why are apins so close to the CSC center for one of the

chambers.

Tasks to do:

------------

Create a root script that produces direct graphical output for:

-CSC center positions (measured, nominal,PG) with uncertainties (show

chamber and draw a line through the center that shows the rotation relative to the SLM line)

-dowel pin positions (measured, fitted, calibrated?,PG) with uncertainties

(show CCD: first pixel, last pixel, center)

-draw laser line through th fitted values (check SDF output)

For this I need to learn:

-how to read and write out files in root

-create macros in root (CINT interpreter)

-create vectors in root

-graphics

Quick reading:

---------------

Chapters in the root user guide:

Ch3 Histograms

Ch4 Graphs *

Ch5 Fitting Histrograms

Ch6 A Little C++ *

Ch7 CINT the C++ Interpreter *

Ch8 Object Ownership

Ch9 Graphics and Graphical User Interface *

Ch10 Folders and Tasks

Ch11 Input/Output

Reviewed those with the "*"

March 30 & April 6, 2007

++++++++++++++++++++++++

'Alignment pin problem' can be related to the

'COCOA compilation problem???'

--------------------------

On March 31 I already reported this to Pedro:

I cannot compile cocoa properly in my directory.

I tried more CMSSW versions (CMSSW_1_2_0, CMSSW_1_3_0, CMSSW_1_2_3, etc)

When I use COCOA from my supervisor's (Marcus Hohlmann) directory it works

fine (his COCOA version was built in the same CMSSW directory as mine: CMSSW_1_2_0).

Marcus created CMSSW_1_2_0 on Jan 15, 2007!

I checked some files and these look different compared to Marcus' files.

As an example the

I copied this Global....file in my directory but I could not get rid of the

problem)

cocoa.cpp shows that we both have the same COCOA version: COCOA_3_2_4

1) When I'm running COCOA in my output I get:

- matrixes on the screen (I searched for this setting but I don't know

where to "turn this off")

-fit quality is different from the cocoa output using Marcus' version

- and I also get the wrong rotation matrix error....

-----------------------------------------------------------------

0 0 0 0 0

0 0 0 0 0 0

0 0 0 0 0 0

0 0 0 0 0 0

-2.7991e+07 -2.77437e+09 -1.8279e+10 4.40904e+09 -3.0606e+10

4.65081e+09 0 0 0 0

0 0 0 0 0 0

0 0 0 0 -2.46107e+09 -3.13313e+08

-9.16205e+06 -1.16639e+06 -1.50946e+10 7.38656e+06 -3.17551e+09

1.55394e+06 -1.82121e+10 -2.76543e+09 -1.57885e+09 689760

-69909.4 2.51089e+11

TIME:BEFORE_INVERSE : 2290000 0.2

norm1 AtWA 1.44082e+14

TIME:AFTER_INVERSE : 2310000 0.02

TIME:MAT_MULTIPLIED : 2310000 0

Fit iteration 3 ...

3 Fit quality is = 0.00430412

3 Fit quality predicted improvement in distance to minimum is = 0.00430412

3 Fit quality derivative at 0 = -0.00860824

TIME:QUALITY_CHECKED: 2390000 0.08

SRPARPOS Optical Object Parameter Fit.Value

Orig.Value

FITTED VALUES

EQUATION for xy() IS BAD 2.17033e-05 -0

EQUATION for yz() IS BAD 2.17033e-05 -0

wrong rotation matrix 0 -1.5708 0

matrix is xx=-1.32696e-07 xy=2.17033e-05 xz=-1

matrix is yx=1.43994e-12 yy=1 yz=2.17033e-05

matrix is zx=1 zy=1.44001e-12 zz=-1.32696e-07

FIT STATUS COCOA_FitOK

0x8e98338$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 2410000 0.02

TIME:TOTAL PROGRAM : 2410000 1.77

--------------------------------------------------------------------------------

2) Here is the output if I set eval `scramv1 run -csh` in Marcus'

directory but I run it on my files in my dir. (in my CMSSW dir):

..........................

-0.941691 adding chi2meas 490.312 id9: 2 (mm)R: 0 S: 13.5001 Diff=

-13.5001

-0.946874 adding chi2meas 491.208 id9: 3 (mm)R: 0 S: 13.5744 Diff=

-13.5744

TIME:MAT_MEAS_FILLED: 1510000 0.12

TIME:MAT_CAL_FILLED : 1510000 0

TIME:BEFORE_INVERSE : 1540000 0.03

TIME:AFTER_INVERSE : 1550000 0.01

TIME:MAT_MULTIPLIED : 1550000 0

Fit iteration 3 ...

3 Fit quality is = 0.00230916

3 Fit quality predicted improvement in distance to minimum is = 0.00230916

3 Fit quality derivative at 0 = -0.00461833

TIME:QUALITY_CHECKED: 1650000 0.1

SRPARPOS Optical Object Parameter Fit.Value

Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0x8b7a400$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1670000 0.02

TIME:TOTAL PROGRAM : 1670000 1.13

This output looks fine.

________________________________________________

3) Here is how I create CMSSW, Alignment, Condformats (I used this

procedure before and it always worked!):

scramv1 list

cd /uscmst1/prod/sw/cms/slc3_ia32_gcc323/cms/cmssw/CMSSW_1_2_0

eval `scramv1 run -csh`

cd /uscms/home/gbaksay/work/cocoa

scramv1 project CMSSW CMSSW_1_2_0

...

Installation procedure complete.

Developer area located at:

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0

cd /uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src

project CMSSW

cmscvsroot CMSSW

cvs login (pwd 98passwd)

cvs co Alignment

checks out a whole bunch of code (I get lots of warnings at the beginning)

cvs co CondFormats

ditto...

cd

/uscms/home/hohlmann/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaApplication/bin

eval `scramv1 run -csh`

scramv1 build

--------- end of Report to Pedro on March 31

4)I also checked Marcus' "muon_lpc_setup.csh" source file

He is using:

source /afs/files/code/cms/setup/cshrc uaf

I have:

source /uscmst1/prod/sw/cms/cshrc uaf

Can this explain the different cocoa compilation results (?).

----------------------------

I checked the cshrc file in:

/afs/files/code/cms/setup/cshrc

The following setting is the same in:

/uscmst1/prod/sw/cms/cshrc

case uaf:

if ( -e /uscmst1/prod/sw/cms/cmsset_default.csh ) then

setenv VO_CMS_SW_DIR /uscmst1/prod/sw/cms

source $VO_CMS_SW_DIR/cmsset_default.csh

else

echo "Sorry: uaf environment is not available ";

echo " on host `hostname`";

exit;

endif

breaksw

So,it seems like it does not matter if we use:

source /afs/files/code/cms/setup/cshrc uaf

or

source /uscmst1/prod/sw/cms/cshrc uaf

the cshrc file in both locations has the same "case uaf" info.

-----------------

5) The size of my cocoa.exe is 15524 (created on April 6)

Marcus's cocoa.exe is: 15524 (created on Jan 15)

..but I still get different results.

------------------

6) These are some warnings that I get when I compile cocoa using:

source /uscmst1/prod/sw/cms/cshrc uaf

At the beginning of the file I get lots of Warnings (may be I will need

to cvs co DataFormats???):

Parsing BuildFiles

...................................................................

WARNING: Unable to find package/tool called DataFormats/CLHEP

in current project area (declared at

src/Alignment/CSA06AlignmentAlgorithm/data)

WARNING: Unable to find package/tool called DataFormats/GeometrySurface

in current project area (declared at

src/Alignment/CSA06AlignmentAlgorithm/data)

WARNING: Unable to find package/tool called DataFormats/GeometryVector

in current project area (declared at

src/Alignment/CSA06AlignmentAlgorithm/data)

-----etc...

I also get this warning:

WARNING: Unable to find package/tool called

OpticalAlignment/OptAlignASCIISource

in current project area (declared at

src/Alignment/OptAlignASCIISource/test)

....

and some other header related warnings:

>> Compiling

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaUtilities/src/

In file included from

/uscmst1/prod/sw/cms/slc3_ia32_gcc323/external/gcc/3.2.3/include/c++/3.2.3/backward/strstream:51,

from

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaUtilities/src/:12:

/uscmst1/prod/sw/cms/slc3_ia32_gcc323/external/gcc/3.2.3/include/c++/3.2.3/backward/backward_warning.h:32:2:

warning:

#warning This file includes at least one deprecated or antiquated header.

Please consider using one of the 32 headers

found in section 17.4.1.2 of the C++ standard. Examples include

substituting the header for the header for

C++ includes, or instead of the deprecated header .

To disable this warning use

-Wno-deprecated.

>> Compiling

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaUtilities/src/

In file included from

/uscmst1/prod/sw/cms/slc3_ia32_gcc323/external/gcc/3.2.3/include/c++/3.2.3/backward/strstream:51,

from

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaUtilities/src/:11:

/uscmst1/prod/sw/cms/slc3_ia32_gcc323/external/gcc/3.2.3/include/c++/3.2.3/backward/backward_warning.h:32:2:

warning:

#warning This file includes at least one deprecated or antiquated header.

Please consider using one of the 32 headers

found in section 17.4.1.2 of the C++ standard. Examples include

substituting the header for the header for

C++ includes, or instead of the deprecated header .

To disable this warning use

-Wno-deprecated.

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaUtilities/src/:

In static member function

`static ALIFileOut& ALIFileOut::getInstance(const ALIstring&)':

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaUtilities/src/:39:

warning: control

reaches end of non-void function

>> Compiling

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaUtilities/src/

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaUtilities/src/:

In function `static bool

ALIUtils::eq2ang(double, double)':

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaUtilities/src/:761:

warning: `bool beq'

might be used uninitialized in this function

...after this some lines OK...and then warnings again:

>> Compiling

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/:

In static member function `static

void Model::copyMeasurements(const std::vector&)':

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/:1477:

warning: comparison between

signed and unsigned integer expressions

>> Compiling

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/:

In member function `void

OpticalObject::transformGlobal2Local()':

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/:343:

warning: unused

variable `ALIuint ii'

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/:344:

warning: unused

variable `ALIuint siz'

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/:345:

warning: unused

variable `ALIdouble newcoor[3]'

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/:

In member function `virtual

void OpticalObject::constructMaterial()':

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/:2142:

warning: passing

`double' for argument 4 of

`CocoaMaterialElementary::CocoaMaterialElementary(std::basic_string, float,

std::basic_string, int, int)'

>> Compiling

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/

>> Compiling

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/

>> Compiling

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/:

In member function `ALIdouble*

OptOCOPS::convertPointToLocalCoordinates(const CLHEP::Hep3Vector&)':

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/:349:

warning: address of local

variable `interslc' returned

...and some more:

Leaving library rule at Alignment/CocoaToDDL

>> Compiling

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaApplication/bin/cocoa.cpp

In file included from

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaFit/interface/MatrixMeschach.h:19,

from

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaFit/interface/Fit.h:16,

from

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaApplication/bin/cocoa.cpp:5:

/uscmst1/prod/sw/cms/slc3_ia32_gcc323/external/meschach/1.2/include/matrix.h:203: warning: ISO C++ forbids

declaration of `m_free' with no type

/uscmst1/prod/sw/cms/slc3_ia32_gcc323/external/meschach/1.2/include/matrix.h:203: warning: ISO C++ forbids

declaration of `v_free' with no type

/uscmst1/prod/sw/cms/slc3_ia32_gcc323/external/meschach/1.2/include/matrix.h:203: warning: ISO C++ forbids

declaration of `px_free' with no type

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaApplication/bin/cocoa.cpp:

In function `int main(int, char**)':

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaApplication/bin/cocoa.cpp:61:

warning: comparison

between signed and unsigned integer expressions

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaApplication/bin/cocoa.cpp:46:

warning: unused variable

`Model&model'

-----end of output

-------------------------

7) I installed a new CMSSW version CMSSW_1_3_0

but I get the same warnings as in the CMSSW_1_2_0 version.

I will try now to cvs co DataFormats and recompile cocoa again.

[gbaksay@cmswn051 bin]$ scramv1 build

Parsing BuildFiles

...............................................................................................................................................................

Creating links ...

WARNING: Geometry/Vector/BuildFile in release area of current project does not export anything:

**** Geometry/Vector dependency dropped.

WARNING: Geometry/Vector/BuildFile in release area of current project does not export anything:

**** Geometry/Vector dependency dropped.

WARNING: Geometry/Vector/BuildFile in release area of current project does not

export anything:

**** Geometry/Vector dependency dropped.

---------- etc

WARNING: Geometry/Vector/BuildFile in release area of current project does not export anything:

**** Geometry/Vector dependency dropped.

****ERROR: Plugin name should be same as the library name. Please fix the "src/Alignment/LTDRootSource/BuildFile" file and replace "OpticalAlignmentLTDRootSource" with "AlignmentLTDRootSource"

Please fix the above error otherwise library "AlignmentLTDRootSource" will not be registered as plugin.

-----END of output

If I "cvs co Geometry" I get some other warnings related to some plugin

name...

cocoa.exe file is created and continues to provide some strange results (see

above "1)" )

===============================================================================

Patrick Gartung suggested:

"Try checking out the cocoa source with the right version tag, eg.

cvs co -r CMSSW_1_2_0 Alignment

If you checkout without a ta you will get the head version which probably

corresponds to CMSSW_1_4_0_pre2."

This works!!! I don't have compilation problems anymore.

------------------------------------

Now let's look at the cocoa output:

Output of my cocoa version:

.........

TIME:MAT_MEAS_FILLED: 1660000 0.13

TIME:MAT_CAL_FILLED : 1660000 0

TIME:BEFORE_INVERSE : 1690000 0.03

TIME:AFTER_INVERSE : 1710000 0.02

TIME:MAT_MULTIPLIED : 1710000 0

Fit iteration 3 ...

3 Fit quality is = 0.00230916

3 Fit quality predicted improvement in distance to minimum is = 0.00230916

3 Fit quality derivative at 0 = -0.00461833

TIME:QUALITY_CHECKED: 1820000 0.11

SRPARPOS Optical Object Parameter Fit.Value Orig.Value

FITTED VALUES

EQUATION for xy() IS BAD 3.18508e-05 -0

EQUATION for yz() IS BAD 3.18508e-05 -0

wrong rotation matrix 0 4.71238 0

matrix is xx=-1.03637e-05 xy=3.18508e-05 xz=-1

matrix is yx=1.6462e-10 yy=1 yz=3.18508e-05

matrix is zx=1 zy=1.65471e-10 zz=-1.03637e-05

FIT STATUS COCOA_FitOK

0x9716c48$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1840000 0.02

TIME:TOTAL PROGRAM : 1840000 1.22

--------------------------------------------------------

Output of Marcus' COCOA version:

TIME:MAT_MEAS_FILLED: 1680000 0.13

TIME:MAT_CAL_FILLED : 1680000 0

TIME:BEFORE_INVERSE : 1710000 0.03

TIME:AFTER_INVERSE : 1720000 0.01

TIME:MAT_MULTIPLIED : 1720000 0

Fit iteration 3 ...

3 Fit quality is = 0.00230916

3 Fit quality predicted improvement in distance to minimum is = 0.00230916

3 Fit quality derivative at 0 = -0.00461833

TIME:QUALITY_CHECKED: 1860000 0.14

SRPARPOS Optical Object Parameter Fit.Value Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0xa32c3e8$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1880000 0.02

TIME:TOTAL PROGRAM : 1880000 1.27

----------------------------------

I run cocoa (from Marcus dir) and cocoa (from Gyongy dir) on the same file

ME2_SLM25_las2.txt

Is that possible that Marcus's compiled cocoa version has a problem?

He aslo used "cvs co Alignment" instead of "cvs co -r CMSSW_1_2_0 Alignment".

It is interesting to see that:

- we both get the same fit quality.

- in my output I have a wrong rotation matrix error

I just don't understand why I get :Fit status COCOA_fit OK??????

-------------------------------------------------------------------------------

April 9, 2007

++++++++++++++

I found a very good root tutorial with examples:



Here you can find everything: how to read and write out files, create

histos and graphs, etc.

-----

To open a browser use:

root [] TBrowser "name" ("name" is just any name...put there abc)

In the browser you can see all the root folders and root file structure.

In the tutorials there are very useful examples (macros).

Since I want to make graphics I found

/home/gbaksay/tutorials/graphics/gerrors.C very useful.

In the browser if you click on the filename you will see the macro (text

file).

At the root prompt if you write:

.x gerrors.C

you will see the plot.

The plot shows data points with errors.

This is what I would also like to implement in my script.

Here is how I create a .C script (quite complicated...there must be also

other way to do it):

start root from the directory:

/home/gbaksay/tutorials/graphics/gerrors.C

in the graphics directory I create another directory for my files:

-at the root propmt type: TBrowser abc

-in the browser File menu, click on Open

-in the "Open" window create a new directory (I called this dir.

"user")

at the root comman prompt type:

TCanvas *mymacro = new TCanvas("mymacro","Test canvas",1)

This will open a new canvas (and create an "empty"canvas file called

mymacro)

A canvas window will pop up.

In the File menu click on Save as..

Now you can save your canvas as ROOT macros (*.C) in the previously

created user directory.

Note: you can also save this file as .ps,.eps,.pdf,.gif, .root, .xml etc

The result of this long procedure:) is a script that you can modify.

Make shure that you save your changes otherwise the file will be reset to

the default values (to save: click in the browser window where you see the

text; if you click on the right side mouse button a menu comes up that

provides the save option).

I copied the text from a previously created code (gerrors.C) into my file.

Once I saved mymacro.C and clicked in the browser on the filename a grapf window

poped up that shows data point with errors.

I will try to modify this file:

reseting axes size, input my values, errors etc

I included DCOPS X_CMS coordinates and Y_CMS coordinates.

I set errors to zero.

...and got a nice plot.

I will plot now X_SLM, Z_CMS.

------------------------------

In the ME2_SLM25_las2.txt correct those A-pins where Marcus set the 2

A-pins at equal distance from center:

Now I have:

Outer pin Lchamber: +1655.191 mm

Inner pin Lchamber: -1635.887 mm

Outer pin Schamber: +998.187 mm

Inner pin Schamber: -968.883 mm

-----------------

I'm trying to fix now the wrong rotation matrix problem...

If I set all laser angles to "cal" I get rid of the wrong rotation matrix

message.

Here is the output:

_______________________________________________

FITTED VALUES

-3.89393 adding chi2meas 15.1627 id1: 0 (mm)R: 8.686 S: 8.70189 Diff= -0.0158911

-4.34517 adding chi2meas 34.0433 id1: 1 (mm)R: 8.334 S: 8.35221 Diff= -0.0182063

1.48625 adding chi2meas 36.2522 id1: 2 (mm)R: 18.34 S: 18.3364 Diff= 0.0035774

1.36676 adding chi2meas 38.1202 id1: 3 (mm)R: 18.19 S: 18.1867 Diff= 0.00331849

-0.0555003 adding chi2meas 38.1233 id2: 0 (mm)R: 20.109 S: 20.1091 Diff= -0.000115607

0.0678969 adding chi2meas 38.1279 id2: 1 (mm)R: 20.313 S: 20.3128 Diff= 0.000173205

-1.29617 adding chi2meas 39.808 id2: 2 (mm)R: 18.134 S: 18.1495 Diff= -0.0155307

0.198008 adding chi2meas 39.8472 id2: 3 (mm)R: 19.162 S: 19.1616 Diff= 0.000363344

0.0857498 adding chi2meas 39.8545 id3: 0 (mm)R: 18.674 S: 18.6739 Diff= 0.000136342

-0.142718 adding chi2meas 39.8749 id3: 1 (mm)R: 18.196 S: 18.1964 Diff= -0.00037706

-0.204472 adding chi2meas 39.9167 id3: 2 (mm)R: 18.213 S: 18.2135 Diff= -0.00054553

0.146141 adding chi2meas 39.9381 id3: 3 (mm)R: 18.96 S: 18.9597 Diff= 0.000278836

-0.20797 adding chi2meas 39.9813 id4: 0 (mm)R: 17.997 S: 18.0019 Diff= -0.00491287

0.0272881 adding chi2meas 39.982 id4: 1 (mm)R: 17.972 S: 17.9719 Diff= 8.27648e-05

-0.159241 adding chi2meas 40.0074 id4: 2 (mm)R: 15.813 S: 15.8133 Diff= -0.000308609

0.762819 adding chi2meas 40.5893 id4: 3 (mm)R: 16.68 S: 16.6729 Diff= 0.00712702

-0.833022 adding chi2meas 41.2832 id5: 0 (mm)R: 16.898 S: 16.9007 Diff= -0.00269482

20.6475 adding chi2meas 467.603 id5: 1 (mm)R: 20.837 S: 19.1827 Diff= 1.65428

-0.298981 adding chi2meas 467.692 id5: 2 (mm)R: 16.888 S: 16.8888 Diff= -0.000845817

0.221388 adding chi2meas 467.741 id5: 3 (mm)R: 17.616 S: 17.6155 Diff= 0.000463145

-0.0127318 adding chi2meas 467.742 id6: 0 (mm)R: 13.403 S: 13.403 Diff= -4.46251e-05

0.0627787 adding chi2meas 467.746 id6: 1 (mm)R: 13.39 S: 13.3889 Diff= 0.00108714

-0.17802 adding chi2meas 467.777 id6: 2 (mm)R: 12.729 S: 12.7295 Diff= -0.000520531

0.271403 adding chi2meas 467.851 id6: 3 (mm)R: 13.201 S: 13.1998 Diff= 0.00120964

0.681493 adding chi2meas 468.315 id7: 0 (mm)R: 13.549 S: 13.3129 Diff= 0.236129

-0.00499225 adding chi2meas 468.315 id7: 1 (mm)R: 13.341 S: 13.341 Diff= -1.24057e-05

-0.0292283 adding chi2meas 468.316 id7: 2 (mm)R: 5.179 S: 5.17912 Diff= -0.000118024

0.422677 adding chi2meas 468.495 id7: 3 (mm)R: 5.309 S: 5.28412 Diff= 0.0248809

-0.950932 adding chi2meas 469.399 id8: 0 (mm)R: 11.455 S: 11.8616 Diff= -0.406648

0.0424057 adding chi2meas 469.401 id8: 1 (mm)R: 11.872 S: 11.8712 Diff= 0.000805411

-0.135526 adding chi2meas 469.419 id8: 2 (mm)R: 2.3 S: 3.68086 Diff= -1.38086

0.0012312 adding chi2meas 469.419 id8: 3 (mm)R: 3.77 S: 3.76998 Diff= 1.99036e-05

4.92858 adding chi2meas 493.71 id9: 0 (mm)R: 9.958 S: 9.69729 Diff= 0.260712

-1.04261 adding chi2meas 494.797 id9: 1 (mm)R: 8.889 S: 8.90067 Diff= -0.0116658

-0.505318 adding chi2meas 495.053 id9: 2 (mm)R: 0 S: 7.24424 Diff= -7.24424

-0.511505 adding chi2meas 495.314 id9: 3 (mm)R: 0 S: 7.33294 Diff= -7.33294

TIME:MAT_MEAS_FILLED: 1510000 0.11

TIME:MAT_CAL_FILLED : 1520000 0.01

TIME:BEFORE_INVERSE : 1540000 0.02

TIME:AFTER_INVERSE : 1560000 0.02

TIME:MAT_MULTIPLIED : 1560000 0

Fit iteration 3 ...

3 Fit quality is = 0.000391232

3 Fit quality predicted improvement in distance to minimum is =

0.000391232

3 Fit quality derivative at 0 = -0.000782463

TIME:QUALITY_CHECKED: 1660000 0.1

SRPARPOS Optical Object Parameter Fit.Value

Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0x9781c48$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1680000 0.02

TIME:TOTAL PROGRAM : 1680000 1.11

____________________________________________________________________

Output when laser angles x & y are set to unk (z is cal).

____________________________________________________________

FITTED VALUES

EQUATION for xy() IS BAD 4.36123e-05 -0

EQUATION for yz() IS BAD 4.36123e-05 -0

wrong rotation matrix 0 4.71238 0

matrix is xx=-8.44768e-06 xy=4.36123e-05 xz=-1

matrix is yx=1.84102e-10 yy=1 yz=4.36123e-05

matrix is zx=1 zy=1.8432e-10 zz=-8.44768e-06

-3.89372 adding chi2meas 15.1611 id1: 0 (mm)R: 8.686 S: 8.70189 Diff= -0.0158903

-4.34591 adding chi2meas 34.048 id1: 1 (mm)R: 8.334 S: 8.35221 Diff= -0.0182094

1.48486 adding chi2meas 36.2528 id1: 2 (mm)R: 18.34 S: 18.3364 Diff= 0.00357405

1.36809 adding chi2meas 38.1245 id1: 3 (mm)R: 18.19 S: 18.1867 Diff= 0.00332173

-0.0653165 adding chi2meas 38.1288 id2: 0 (mm)R: 20.109 S: 20.1091 Diff= -0.000136054

0.0666001 adding chi2meas 38.1332 id2: 1 (mm)R: 20.313 S: 20.3128 Diff= 0.000169897

-1.28589 adding chi2meas 39.7867 id2: 2 (mm)R: 18.134 S: 18.1494 Diff= -0.0154076

0.193424 adding chi2meas 39.8241 id2: 3 (mm)R: 19.162 S: 19.1616 Diff= 0.000354934

0.0744038 adding chi2meas 39.8297 id3: 0 (mm)R: 18.674 S: 18.6739 Diff= 0.000118302

-0.143921 adding chi2meas 39.8504 id3: 1 (mm)R: 18.196 S: 18.1964 Diff= -0.000380238

-0.205061 adding chi2meas 39.8924 id3: 2 (mm)R: 18.213 S: 18.2135 Diff= -0.000547102

0.141374 adding chi2meas 39.9124 id3: 3 (mm)R: 18.96 S: 18.9597 Diff= 0.000269741

-0.280389 adding chi2meas 39.991 id4: 0 (mm)R: 17.997 S: 18.0036 Diff= -0.00662363

0.0335222 adding chi2meas 39.9922 id4: 1 (mm)R: 17.972 S: 17.9719 Diff= 0.000101673

-0.161387 adding chi2meas 40.0182 id4: 2 (mm)R: 15.813 S: 15.8133 Diff= -0.000312768

0.743198 adding chi2meas 40.5706 id4: 3 (mm)R: 16.68 S: 16.6731 Diff= 0.0069437

-0.82498 adding chi2meas 41.2512 id5: 0 (mm)R: 16.898 S: 16.9007 Diff= -0.00266881

20.4993 adding chi2meas 461.473 id5: 1 (mm)R: 20.837 S: 19.1946 Diff= 1.6424

-0.307377 adding chi2meas 461.567 id5: 2 (mm)R: 16.888 S: 16.8889 Diff= -0.000869571

0.221582 adding chi2meas 461.616 id5: 3 (mm)R: 17.616 S: 17.6155 Diff= 0.00046355

-0.02064 adding chi2meas 461.617 id6: 0 (mm)R: 13.403 S: 13.4031 Diff= -7.23433e-05

0.116145 adding chi2meas 461.63 id6: 1 (mm)R: 13.39 S: 13.388 Diff= 0.00201128

-0.171451 adding chi2meas 461.659 id6: 2 (mm)R: 12.729 S: 12.7295 Diff= -0.000501323

0.255932 adding chi2meas 461.725 id6: 3 (mm)R: 13.201 S: 13.1999 Diff= 0.00114069

0.753536 adding chi2meas 462.293 id7: 0 (mm)R: 13.549 S: 13.2879 Diff= 0.26109

-0.00924511 adding chi2meas 462.293 id7: 1 (mm)R: 13.341 S: 13.341 Diff= -2.29741e-05

-0.0408468 adding chi2meas 462.295 id7: 2 (mm)R: 5.179 S: 5.17916 Diff= -0.000164939

0.550243 adding chi2meas 462.597 id7: 3 (mm)R: 5.309 S: 5.27661 Diff= 0.03239

-0.92496 adding chi2meas 463.453 id8: 0 (mm)R: 11.455 S: 11.8505 Diff= -0.395542

0.0400649 adding chi2meas 463.454 id8: 1 (mm)R: 11.872 S: 11.8712 Diff= 0.000760953

-0.136915 adding chi2meas 463.473 id8: 2 (mm)R: 2.3 S: 3.69502 Diff= -1.39502

0.000961978 adding chi2meas 463.473 id8: 3 (mm)R: 3.77 S: 3.76998 Diff= 1.55513e-05

4.98384 adding chi2meas 488.312 id9: 0 (mm)R: 9.958 S: 9.69436 Diff= 0.263635

-1.05507 adding chi2meas 489.425 id9: 1 (mm)R: 8.889 S: 8.90081 Diff= -0.0118051

-0.941691 adding chi2meas 490.312 id9: 2 (mm)R: 0 S: 13.5001 Diff= -13.5001

-0.946874 adding chi2meas 491.208 id9: 3 (mm)R: 0 S: 13.5744 Diff= -13.5744

TIME:MAT_MEAS_FILLED: 1640000 0.12

TIME:MAT_CAL_FILLED : 1640000 0

TIME:BEFORE_INVERSE : 1660000 0.02

TIME:AFTER_INVERSE : 1680000 0.02

TIME:MAT_MULTIPLIED : 1680000 0

Fit iteration 3 ...

3 Fit quality is = 0.00230916

3 Fit quality predicted improvement in distance to minimum is = 0.00230916

3 Fit quality derivative at 0 = -0.00461833

TIME:QUALITY_CHECKED: 1780000 0.1

SRPARPOS Optical Object Parameter Fit.Value

Orig.Value

FITTED VALUES

EQUATION for xy() IS BAD 3.18508e-05 -0

EQUATION for yz() IS BAD 3.18508e-05 -0

wrong rotation matrix 0 4.71238 0

matrix is xx=-1.03637e-05 xy=3.18508e-05 xz=-1

matrix is yx=1.6462e-10 yy=1 yz=3.18508e-05

matrix is zx=1 zy=1.65471e-10 zz=-1.03637e-05

FIT STATUS COCOA_FitOK

0xa34cc48$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1790000 0.01

TIME:TOTAL PROGRAM : 1790000 1.14

_________________________________________________________________-

Fit quality is 0.0007 after 3 iterations for all angles set to cal!

I think we should keep it like this.

--------------

I don't like the large errors on the X & Y angles when we set these to

unk:

UNK: 9 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_X -0.35400302 +-

2957.9854 0 +- 10 Q2

UNK: 10 CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 angles_Y 0.091018492 +-

2118.8401 0 +- 10 Q2

Initially I put the laser on the TP and assumed that the laser does not move on the TP (set it with the same uncertainties as the TP).

Position and angle uncertainties for the laser defined on the TP:

prec_pos_tp 20 (um)

prec_ang_tp 10 (urad)

These uncertainties are very small and are probably not realistic.

-----------

Robert Lee defined the laser relative to the SLM center. His uncertainties from the cocoa SDF are:

prec_pos_las 200 (um)

prec_ang_las 100 (urad)

I will consider these uncertainties for the laser pos. and ang. coordinates (laser defined on the TP) and see what I get.

Here is the output (I consider all laser angles cal):

--------------------------------------------------------

FITTED VALUES

-0.113054 adding chi2meas 0.0127811 id1: 0 (mm)R: 8.686 S: 8.68646 Diff= -0.000461372

-0.455721 adding chi2meas 0.220463 id1: 1 (mm)R: 8.334 S: 8.33591 Diff= -0.00190947

0.194155 adding chi2meas 0.258159 id1: 2 (mm)R: 18.34 S: 18.3395 Diff= 0.000467332

2.95201e-06 adding chi2meas 0.258159 id1: 3 (mm)R: 18.19 S: 18.19 Diff= 7.16747e-09

-0.0567861 adding chi2meas 0.261384 id2: 0 (mm)R: 20.109 S: 20.1091 Diff= -0.000118285

0.069508 adding chi2meas 0.266215 id2: 1 (mm)R: 20.313 S: 20.3128 Diff= 0.000177315

-1.14563 adding chi2meas 1.57868 id2: 2 (mm)R: 18.134 S: 18.1477 Diff= -0.0137269

0.175359 adding chi2meas 1.60943 id2: 3 (mm)R: 19.162 S: 19.1617 Diff= 0.000321784

0.0847815 adding chi2meas 1.61662 id3: 0 (mm)R: 18.674 S: 18.6739 Diff= 0.000134803

-0.141042 adding chi2meas 1.63651 id3: 1 (mm)R: 18.196 S: 18.1964 Diff= -0.000372634

-0.170221 adding chi2meas 1.66549 id3: 2 (mm)R: 18.213 S: 18.2135 Diff= -0.000454149

0.122189 adding chi2meas 1.68042 id3: 3 (mm)R: 18.96 S: 18.9598 Diff= 0.000233136

-0.204563 adding chi2meas 1.72226 id4: 0 (mm)R: 17.997 S: 18.0018 Diff= -0.00483239

0.0268267 adding chi2meas 1.72298 id4: 1 (mm)R: 17.972 S: 17.9719 Diff= 8.13653e-05

-0.135945 adding chi2meas 1.74146 id4: 2 (mm)R: 15.813 S: 15.8133 Diff= -0.000263462

0.650918 adding chi2meas 2.16516 id4: 3 (mm)R: 16.68 S: 16.6739 Diff= 0.00608152

-0.833351 adding chi2meas 2.85963 id5: 0 (mm)R: 16.898 S: 16.9007 Diff= -0.00269589

20.6545 adding chi2meas 429.469 id5: 1 (mm)R: 20.837 S: 19.1822 Diff= 1.65484

-0.333043 adding chi2meas 429.579 id5: 2 (mm)R: 16.888 S: 16.8889 Diff= -0.000942178

0.247044 adding chi2meas 429.641 id5: 3 (mm)R: 17.616 S: 17.6155 Diff= 0.000516816

-0.012882 adding chi2meas 429.641 id6: 0 (mm)R: 13.403 S: 13.403 Diff= -4.51513e-05

0.0634509 adding chi2meas 429.645 id6: 1 (mm)R: 13.39 S: 13.3889 Diff= 0.00109878

-0.213703 adding chi2meas 429.69 id6: 2 (mm)R: 12.729 S: 12.7296 Diff= -0.000624867

0.325602 adding chi2meas 429.796 id6: 3 (mm)R: 13.201 S: 13.1995 Diff= 0.00145121

0.682417 adding chi2meas 430.262 id7: 0 (mm)R: 13.549 S: 13.3126 Diff= 0.236448

-0.00495839 adding chi2meas 430.262 id7: 1 (mm)R: 13.341 S: 13.341 Diff= -1.23216e-05

0.0058972 adding chi2meas 430.262 id7: 2 (mm)R: 5.179 S: 5.17898 Diff= 2.38129e-05

-0.0861452 adding chi2meas 430.27 id7: 3 (mm)R: 5.309 S: 5.31407 Diff= -0.00507094

-0.968755 adding chi2meas 431.208 id8: 0 (mm)R: 11.455 S: 11.8693 Diff= -0.41427

0.0432116 adding chi2meas 431.21 id8: 1 (mm)R: 11.872 S: 11.8712 Diff= 0.000820718

-0.124721 adding chi2meas 431.225 id8: 2 (mm)R: 2.3 S: 3.57078 Diff= -1.27078

0.00129771 adding chi2meas 431.225 id8: 3 (mm)R: 3.77 S: 3.76998 Diff= 2.09788e-05

4.8914 adding chi2meas 455.151 id9: 0 (mm)R: 9.958 S: 9.69925 Diff= 0.258745

-1.03475 adding chi2meas 456.222 id9: 1 (mm)R: 8.889 S: 8.90058 Diff= -0.0115778

-0.496005 adding chi2meas 456.468 id9: 2 (mm)R: 0 S: 7.11073 Diff= -7.11073

-0.509872 adding chi2meas 456.728 id9: 3 (mm)R: 0 S: 7.30952 Diff= -7.30952

TIME:MAT_MEAS_FILLED: 1540000 0.11

TIME:MAT_CAL_FILLED : 1540000 0

TIME:BEFORE_INVERSE : 1570000 0.03

TIME:AFTER_INVERSE : 1580000 0.01

TIME:MAT_MULTIPLIED : 1580000 0

Fit iteration 3 ...

3 Fit quality is = 3.15975e-05

3 Fit quality predicted improvement in distance to minimum is =

3.15975e-05

3 Fit quality derivative at 0 = -6.3195e-05

TIME:QUALITY_CHECKED: 1690000 0.11

SRPARPOS Optical Object Parameter Fit.Value

Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0x8804c48$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1700000 0.01

TIME:TOTAL PROGRAM : 1700000 1.1

Fit quality of 0.0000315

All the Chi2's look reasonable now.

It might be also useful to see what happens if I exclude the id9 bad

CCD's.

For now I will leave it like this.

------------------------

I will do the same settings now for:ME2_SLM25_las5.txt

change the x and y angles to cal and the uncertainties to prec_pos_las and

prec_ang_las.

Here is the output:

______________________________

FITTED VALUES

-8.91358 adding chi2meas 79.452 id14: 0 (mm)R: 9.896 S: 10.7952 Diff= -0.899211

-2.23874 adding chi2meas 84.4639 id14: 1 (mm)R: 10.544 S: 11.1344 Diff= -0.590381

-0.430042 adding chi2meas 84.6489 id14: 2 (mm)R: 6.032 S: 6.03466 Diff= -0.00265766

0.104262 adding chi2meas 84.6597 id14: 3 (mm)R: 6.552 S: 6.5518 Diff= 0.000202477

0.201745 adding chi2meas 84.7004 id15: 0 (mm)R: 10.233 S: 10.2326 Diff= 0.000350835

-0.312046 adding chi2meas 84.7978 id15: 1 (mm)R: 8.841 S: 8.84146 Diff= -0.000457459

-0.0582363 adding chi2meas 84.8012 id15: 2 (mm)R: 13.326 S: 13.3261 Diff= -9.65559e-05

0.0923007 adding chi2meas 84.8097 id15: 3 (mm)R: 13.691 S: 13.6908 Diff= 0.00016928

-0.262516 adding chi2meas 84.8786 id16: 0 (mm)R: 9.61 S: 9.61051 Diff= -0.000506918

0.113434 adding chi2meas 84.8915 id16: 1 (mm)R: 10.36 S: 10.3597 Diff= 0.000310468

-0.716345 adding chi2meas 85.4047 id16: 2 (mm)R: 18.81 S: 18.8368 Diff= -0.0267505

0.0511224 adding chi2meas 85.4073 id16: 3 (mm)R: 19.032 S: 19.0319 Diff= 9.94842e-05

-0.047961 adding chi2meas 85.4096 id17: 0 (mm)R: 11.447 S: 11.4471 Diff= -8.66175e-05

-0.196072 adding chi2meas 85.448 id17: 1 (mm)R: 11.272 S: 11.2726 Diff= -0.000565865

-0.00767988 adding chi2meas 85.4481 id17: 2 (mm)R: 17.142 S: 17.142 Diff= -1.98678e-05

-0.0168864 adding chi2meas 85.4484 id17: 3 (mm)R: 17.134 S: 17.1341 Diff= -6.82717e-05

0.0115163 adding chi2meas 85.4485 id18: 0 (mm)R: 10.341 S: 10.341 Diff= 2.00844e-05

-0.00928524 adding chi2meas 85.4486 id18: 1 (mm)R: 10.291 S: 10.291 Diff= -1.65277e-05

-0.0663906 adding chi2meas 85.453 id18: 2 (mm)R: 17.038 S: 17.0381 Diff= -0.00013391

0.0754693 adding chi2meas 85.4587 id18: 3 (mm)R: 17.337 S: 17.3369 Diff= 0.000148297

-0.203634 adding chi2meas 85.5002 id19: 0 (mm)R: 10.428 S: 10.4288 Diff= -0.000796005

0.206231 adding chi2meas 85.5427 id19: 1 (mm)R: 10.864 S: 10.8632 Diff= 0.000838536

-0.121767 adding chi2meas 85.5575 id19: 2 (mm)R: 16.628 S: 16.6284 Diff= -0.000369808

0.14643 adding chi2meas 85.579 id19: 3 (mm)R: 16.942 S: 16.9414 Diff= 0.000619837

-0.52415 adding chi2meas 85.8537 id20: 0 (mm)R: 9.041 S: 9.04237 Diff= -0.00137013

0.412206 adding chi2meas 86.0236 id20: 1 (mm)R: 10.275 S: 10.2731 Diff= 0.00187513

-0.136216 adding chi2meas 86.0422 id20: 2 (mm)R: 17.769 S: 17.7696 Diff= -0.000610791

0.410296 adding chi2meas 86.2105 id20: 3 (mm)R: 18.351 S: 18.3494 Diff= 0.00158251

TIME:MAT_MEAS_FILLED: 1160000 0.09

TIME:MAT_CAL_FILLED : 1160000 0

TIME:BEFORE_INVERSE : 1180000 0.02

TIME:AFTER_INVERSE : 1190000 0.01

TIME:MAT_MULTIPLIED : 1190000 0

Fit iteration 2 ...

2 Fit quality is = 3.32796e-05

2 Fit quality predicted improvement in distance to minimum is =

3.32796e-05

2 Fit quality derivative at 0 = -6.65591e-05

TIME:QUALITY_CHECKED: 1250000 0.06

SRPARPOS Optical Object Parameter Fit.Value

Orig.Value

FITTED VALUES

FIT STATUS COCOA_FitOK

0x85dd840$$$$$$$$$$$$$$$ moreData Sets 0

............ program ended OK

TIME:PROGRAM ENDED : 1260000 0.01

TIME:TOTAL PROGRAM : 1260000 0.58

_________________________________________________________________

Fit quality again on the order of 10^-5.

-------------------

It would be interesting to see what happens if I set the chamber rotation

angles (x, z) back to unk.

The y angle is cal.

I do this for laser 5.

I tried this and I get very large uncertainties on the angles (~8000

um)...this is a bad sign.

I also had 18 iterations.

I will change chamber angle setting back to cal.

--------

In the ME2_SLM25_las5.txt correct those A-pins where Marcus set the 2

A-pins at equal distance from center:

Now I have:

Outer pin Lchamber: +1655.191 mm

Inner pin Lchamber: -1635.887 mm

Outer pin Schamber: +998.187 mm

Inner pin Schamber: -968.883 mm

_________________________

-->set eval `scramv1 run -csh` in Marcus' dir:

/uscms/home/hohlmann/work/cocoa/CMSSW_1_2_0/

[gbaksay@cmswn051 Gyongyi]$ which cocoa

/uscms/home/hohlmann/work/cocoa/CMSSW_1_2_0/bin/slc3_ia32_gcc323/cocoa

->go back to my dir:

[gbaksay@cmswn051 Gyongyi]$ cd /uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/Gyongyi

and run Marcus' cocoa version on my files:

ME2_SLM25_las2.txt, ME2_SLM25_las5.txt

I get the same output as I have with cocoa from my dir.

My only complaint is:

-------------------------

with my cocoa version I don't get the CMS coordinates in the

report.out file

I will work with Marcus' cocoa version until I find a solution for this

problem.

-----------------------------

Here is the output for laser 5 (CMS coordinates):

OBJECT X_CMS Y_CMS Z_CMS

laser_MEp2_2 2.1417222 6.8550608 8.0012256

DCOPS_MEp2_reference_2_IN 2.168805 6.8478348 8.0407177

MEp2_tp2 2.1687522 6.8478494 8.04125

DCOPS_outer_MEp2_1_14_IN -0.57427706 -3.3618138 8.0634239

DCOPS_inner_MEp2_1_14_IN -0.12808549 -1.5170562 8.0539072

apin_inner_MEp2_1_14 -0.13381701 -1.431409 8.09544

apin_outer_MEp2_1_14 -0.30285082 -3.3811217 8.1085049

MEp2_1_14 -0.21750026 -2.3966496 8.101908

DCOPS_inner_MEp2_1_04_OUT 0.65271092 1.375583 8.0469415

DCOPS_outer_MEp2_1_04_OUT 1.1806393 3.1986573 8.0459859

apin_inner_MEp2_1_04 0.60542894 1.3042572 8.0891537

apin_outer_MEp2_1_04 1.4260897 3.0809501 8.0903321

MEp2_1_04 1.0117119 2.1838413 8.0897371

DCOPS_outer_MEp2_2_27_IN -1.4784076 -6.7485613 8.0647129

DCOPS_inner_MEp2_2_27_IN -0.70726238 -3.8634922 8.0654552

apin_inner_MEp2_2_27 -0.63258251 -3.5536381 8.1112339

apin_outer_MEp2_2_27 -1.2020727 -6.7950673 8.1147071

MEp2_2_27 -0.91565742 -5.1648463 8.1129603

DCOPS_inner_MEp2_2_08_OUT 1.314713 3.7005564 8.0432035

DCOPS_outer_MEp2_2_08_OUT 2.086626 6.5854189 8.0403429

apin_inner_MEp2_2_08 1.2247733 3.3948173 8.0892224

apin_outer_MEp2_2_08 2.3493064 6.4878124 8.0902877

MEp2_2_08 1.7837418 4.9322438 8.0897519

slm_p2_2 0.2897777 -0.0776457 7.998

---------------------------------------------------------------------------

This time the A-PIN Z_CMS coordinates look good!

Here are chamber centers in SLM coordinates for laser 5:

-----------------------------------------

%%%% Optical Object: CMS/slm_p2_2/MEp2_1_14

CAL: 26 CMS/slm_p2_2/MEp2_1_14 centre_X 2371.279 +- 100 2371.279 +- 100 Q1

UNK: 27 CMS/slm_p2_2/MEp2_1_14 centre_Y -103.90801 +- 8950.4241 -93.35 +- 100 Q2

UNK: 28 CMS/slm_p2_2/MEp2_1_14 centre_Z 110.2095 +- 6350.9317 118.16258 +- 100 Q2

CAL: 29 CMS/slm_p2_2/MEp2_1_14 angles_X 0.39035406 +- 2741.7686 0 +- 4000 Q1

CAL: 30 CMS/slm_p2_2/MEp2_1_14 angles_Y 79.95496 +- 674.28635 80 +- 4000 Q1

CAL: 31 CMS/slm_p2_2/MEp2_1_14 angles_Z 0.0079836096 +- 2723.0358 0 +- 4000 Q1

%%%% Optical Object: CMS/slm_p2_2/MEp2_1_04

CAL: 60 CMS/slm_p2_2/MEp2_1_04 centre_X -2371.279 +- 100 -2371.279 +- 100 Q1

UNK: 61 CMS/slm_p2_2/MEp2_1_04 centre_Y -91.737094 +- 4504.6375 -93.35 +- 100 Q2

UNK: 62 CMS/slm_p2_2/MEp2_1_04 centre_Z 112.01901 +- 3198.3285 118.16258 +- 100 Q2

CAL: 63 CMS/slm_p2_2/MEp2_1_04 angles_X -0.71930887 +- 2710.0191 0 +- 4000 Q1

CAL: 64 CMS/slm_p2_2/MEp2_1_04 angles_Y -80.20684 +- 674.05431 -80 +- 4000 Q1

CAL: 65 CMS/slm_p2_2/MEp2_1_04 angles_Z 0.76495551 +- 2694.6665 0 +- 4000 Q1

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_27

CAL: 94 CMS/slm_p2_2/MEp2_2_27 centre_X 5225.848 +- 100 5225.848 +- 100 Q1

UNK: 95 CMS/slm_p2_2/MEp2_2_27 centre_Y -114.96031 +- 11918.727 -93.35 +- 100 Q2

UNK: 96 CMS/slm_p2_2/MEp2_2_27 centre_Z 152.30348 +- 8248.9809 157.20274 +- 100 Q2

CAL: 97 CMS/slm_p2_2/MEp2_2_27 angles_X -0.13313048 +- 3182.2496 0 +- 4000 Q1

CAL: 98 CMS/slm_p2_2/MEp2_2_27 angles_Y 84.96465 +- 668.87948 85 +- 4000 Q1

CAL: 99 CMS/slm_p2_2/MEp2_2_27 angles_Z -0.19434575 +- 3190.484 0 +- 4000 Q1

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_08

CAL: 128 CMS/slm_p2_2/MEp2_2_08 centre_X -5225.848 +- 100 -5225.848 +- 100 Q1

UNK: 129 CMS/slm_p2_2/MEp2_2_08 centre_Y -91.751939 +- 1861.9008 -93.35 +- 100 Q2

UNK: 130 CMS/slm_p2_2/MEp2_2_08 centre_Z 146.40372 +- 1305.7765 157.20274 +- 100 Q2

CAL: 131 CMS/slm_p2_2/MEp2_2_08 angles_X -0.27208438 +- 2814.3963 0 +- 4000 Q1

CAL: 132 CMS/slm_p2_2/MEp2_2_08 angles_Y -85.019986 +- 668.64019 -85 +- 4000 Q1

CAL: 133 CMS/slm_p2_2/MEp2_2_08 angles_Z 0.2917328 +- 2810.9719 0 +- 4000 Q1

Include also other SLM coord....

----------------------

April 10, 2007

++++++++++++++

The userguide, turned out to be very useful:



Finally, I found what I wanted (see page 183 in user guide): description

of how to read an ascii file,write a "tree" and access variables.

Note: the user guide mentions two example file in:

in /home/gbaksay/root/tutorials/tree

these are:

staff.C and staff.dat ---> these are mainly used to create a "tree"

I'm not intrested in such a complicated program. I want to read out numbers and then plot them.

I also found:

basic.C and basic.dat that seem to be very useful.

basic.dat is an ascii file with 3 columns of real numbers.

basic. C is the macro that reads the data from the ascii file, creates a

root file with a histogram and a TTree.

Another macro is basic2.C

This will read out an ascii file and create an ntuple.

--------

I create a user directory in the "tree" dir.

Here I will create my basic.C and basic2.C

files.

When you want to copy a file do the following:

-right click the file

-click copy

-window comes up that shows (cons char*) to

-write the dir name where you want to copy your file (I wrote "user") and

the file was copied to the user dir.

I copied 3 files in the user dir: basic.C, basic2.C and basic.dat

If I click on basic.C a root file will be created.

-this contains: other root files

-each of these has histograms & ntuples

-Ntuples has more leaves (each of these correspond to histograms...well in

my case)

Note: one can use an editor outside root to modify files and then run the program in the TBrowser.

------------------

This is the basic.C file (I put a star "*" next to the lines that I think I can use)

#include "Riostream.h"

void basic() {

// example of macro to read data from an ascii file and

// create a root file with an histogram and an ntuple.

// see a variant of this macro in basic2.C

//Author: Rene Brun

// read file $ROOTSYS/tutorials/tree/basic.dat

// this file has 3 columns of float data

* TString dir = gSystem->UnixPathName(TCint::GetCurrentMacroName());

* dir.ReplaceAll("basic.C","");

* dir.ReplaceAll("/./","/");

* ifstream in;

* in.open(Form("%sbasic.dat",dir.Data()));

* Float_t x,y,z;

* Int_t nlines = 0;

* TFile *f = new TFile("basic.root","RECREATE");

TH1F *h1 = new TH1F("h1","x distribution",100,-4,4);

TNtuple *ntuple = new TNtuple("ntuple","data from ascii file","x:y:z");

* while (1) {

* in >> x >> y >> z;

* if (!in.good()) break;

if (nlines < 5) printf("x=%8f, y=%8f, z=%8f\n",x,y,z);

h1->Fill(x);

ntuple->Fill(x,y,z);

* nlines++;

* }

printf(" found %d points\n",nlines);

* in.close();

f->Write();

}

-----------------

...and this is the "mymacro" file (created on April 9)

(I will put star "*" next to the lines that I want to use in my script)

void mymacro() {

//Draw a graph with error bars

// To see the output of this macro, click begin_html here. end_html

//Author: Rene Brun

* TCanvas *c1 = new TCanvas("c1","A Simple Graph with error bars",200,10,700,500);

* c1->SetFillColor(42);

* c1->SetGrid();

* c1->GetFrame()->SetFillColor(21);

* c1->GetFrame()->SetBorderSize(12);

--------these lines are useful for creating graphs (since I want to read out an ascii file, I will not use it)

const Int_t n = 9;

Float_t x[n] = {-1478.,-707.,-524.,-128.,652.,1180.,1314.,2086.,2168.};

Float_t z[n] = {8065.,8065.,8063.,8053.,8046.,8045.,8043.,8040.,8040.};

Float_t ex[n] = {.05,.1,.07,.07,.04,.05,.06,.07,.08};

Float_t ez[n] = {.8,.7,.6,.5,.4,.4,.5,.6,.7};

TGraphErrors *gr = new TGraphErrors(n,x,z,ex,ez);

* gr->SetTitle("TGraphErrors Example");

* gr->SetMarkerColor(4);

* gr->SetMarkerStyle(21);

* gr->Draw("ALP");

c1->Update();

}

--------------------------------------

I also found another useful program in:

/home/gbaksay/root/tutorials/graphs

These are:

motorcycle.dat and motorcycle.C

motrocycle.dat has two columns of data.

This is the motorcycle.C file (I will put a star "*" next to the lines that might be useful for my program):

-----------------------

#include "TString.h"

#include "TCint.h"

#include

#include "TH1.h"

#include "TGraphSmooth.h"

#include "TCanvas.h"

#include "TSystem.h"

TCanvas *vC1;

TGraph *grin, *grout;

void DrawSmooth(Int_t pad, const char *title, const char *xt, const char *yt)

{

vC1->cd(pad);

TH1F *vFrame = vC1->DrawFrame(0,-130,60,70);

vFrame->SetTitle(title);

vFrame->SetTitleSize(0.2);

vFrame->SetXTitle(xt);

vFrame->SetYTitle(yt);

grin->Draw("P");

// grout->SetMarkerColor(kRed);

// grout->SetMarkerStyle(21);

// grout->SetMarkerSize(0.5);

// grout->DrawClone("P");

grout->DrawClone("LPX");

}

void motorcycle()

{

/******************************************************************************

* Author: Christian Stratowa, Vienna, Austria. *

* Created: 26 Aug 2001 Last modified: 29 Sep 2001 *

******************************************************************************/

// Macro to test scatterplot smoothers: ksmooth, lowess, supsmu

// as described in:

// Modern Applied Statistics with S-Plus, 3rd Edition

// W.N. Venables and B.D. Ripley

// Chapter 9: Smooth Regression, Figure 9.1

//

// Example is a set of data on 133 observations of acceleration against time

// for a simulated motorcycle accident, taken from Silverman (1985).

// data taken from R library MASS: mcycle.txt

* TString dir = gSystem->UnixPathName(TCint::GetCurrentMacroName());

* dir.ReplaceAll("motorcycle.C","");

* dir.ReplaceAll("/./","/");

// read file and add to fit object

* Double_t *x = new Double_t[133];

* Double_t *y = new Double_t[133];

* Double_t vX, vY;

* Int_t vNData = 0;

* ifstream vInput;

* vInput.open(Form("%smotorcycle.dat",dir.Data()));

* while (1) {

* vInput >> vX >> vY;

* if (!vInput.good()) break;

* x[vNData] = vX;

* y[vNData] = vY;

* vNData++;

* }//while

* vInput.close();

* grin = new TGraph(vNData,x,y);

// draw graph

* vC1 = new TCanvas("vC1","Smooth Regression",200,10,900,700);

vC1->Divide(2,3);

// Kernel Smoother

// create new kernel smoother and smooth data with bandwidth = 2.0

TGraphSmooth *gs = new TGraphSmooth("normal");

grout = gs->SmoothKern(grin,"normal",2.0);

DrawSmooth(1,"Kernel Smoother: bandwidth = 2.0","times","accel");

// redraw ksmooth with bandwidth = 5.0

grout = gs->SmoothKern(grin,"normal",5.0);

DrawSmooth(2,"Kernel Smoother: bandwidth = 5.0","","");

// Lowess Smoother

// create new lowess smoother and smooth data with fraction f = 2/3

grout = gs->SmoothLowess(grin,"",0.67);

DrawSmooth(3,"Lowess: f = 2/3","","");

// redraw lowess with fraction f = 0.2

grout = gs->SmoothLowess(grin,"",0.2);

DrawSmooth(4,"Lowess: f = 0.2","","");

// Super Smoother

// create new super smoother and smooth data with default bass = 0 and span = 0

grout = gs->SmoothSuper(grin,"",0,0);

DrawSmooth(5,"Super Smoother: bass = 0","","");

// redraw supsmu with bass = 3 (smoother curve)

grout = gs->SmoothSuper(grin,"",3);

DrawSmooth(6,"Super Smoother: bass = 3","","");

// cleanup

delete [] x;

delete [] y;

delete gs;

}

------------------------------------

Now here is my basic script that reads out a dat file and creates a graph:

void motorcycle()

{

TString dir = gSystem->UnixPathName(TCint::GetCurrentMacroName());

dir.ReplaceAll("motorcycle.C","");

dir.ReplaceAll("/./","/");

// read file and add to fit object

// DCOPS in readout order:

//DCOPS_MEp2_reference_2_IN

//DCOPS_outer_MEp2_1_14_IN

//DCOPS_inner_MEp2_1_14_IN

//DCOPS_inner_MEp2_1_04_OUT

//DCOPS_outer_MEp2_1_04_OUT

//DCOPS_outer_MEp2_2_27_IN

//DCOPS_inner_MEp2_2_27_IN

//DCOPS_inner_MEp2_2_08_OUT

//DCOPS_outer_MEp2_2_08_OUT

Double_t *x = new Double_t[9];

Double_t *y = new Double_t[9];

Double_t vX, vY;

Int_t vNData = 0;

ifstream vInput;

vInput.open(Form("%smotorcycle.dat",dir.Data()));

while (1) {

vInput >> vX >> vY;

if (!vInput.good()) break;

x[vNData] = vX;

y[vNData] = vY;

vNData++;

}

vInput.close();

TGraph *gr = new TGraph(vNData,x,y);

TCanvas *c1 = new TCanvas("c1","Graph",200,10,600,400);

gr->SetMarkerStyle(21);

c1->cd(4);

gr->Draw("APL");

delete [] x;

delete [] y;

}

----------

Next step is to plot CSC center Z_cms vs X_slm coordinates.

Include pozition + errors.

DCOPS positions are determined relative to the CSC center.

I can plot them only in CMS coord system (x_cms,y_cms, z_cms).

A-pins I can plot in both CMS coord system and Z_cms vs X_slm.

A-pins are defined relative to the CSC center.

For Z_cms vs x_slm I need to calculate the position relative to SLM center:

add and subtract apin distance from CSC center position in SLM coord.

April 11 & 12, 2007

+++++++++++++++++++

We need a certain format for the output otherwise I always need to rewrite the

script or cut and paste numbers in the dat file.

I gave up with trying to read out the present COCOA output (report.out file),

which is very complicated. I would need to read out lots of info that is not

useful for us. I'm not sure how to read out files with root to skip words,

read out "(",and "," instead of space, etc (I read about this on the internet,

that some programs might be able to do that...but I did not find anything about

this in root).

We also have the longFittedEntries.out file that has the DCOPS center

positions (fitted values) and the laser angle between axes.

But this is not enough info.

The format is not what I would need: would need to remove +/- signs in front

of uncertainties, words (object names) make it shorter and equal length if it

is possible.

-----------------

1) Here is what we want:

Create a root script that produces direct graphical output for:

-CSC center positions (fitted, nominal,PG) with uncertainties (show

chamber and draw a line through the center that shows the rotation relative to the SLM line)

-dowel pin positions (measured,fitted, calibrated?,PG) with uncertainties

(show CCD: first pixel, last pixel, center)

-draw laser line through th fitted values (check SDF output)

2) Pedro does not know about our definitions (DCOPS, alignment pins, etc). He can only think in terms of unk, cal, fix; or nominal, calibrated, fitted values

(& measured).

3) Here are the COCOA output parameters:

DCOPS (cal) have calibrated and fitted values

Transfer plate(cal) have nominal and fitted values

Alignment pins (fix) have nominal and fitted values

Chamber (unk) centers have nominal and fitted values

Laser (mixed) has nominal and fitted values

/coord z is fix, other coordinates are cal, angle between axes is unk./

I would need 6 (or at least 2) separate output files that has the following

info in it:

1) SLM coordinates, nominal/calibrated ->DCOPS, TP, Laser, SLM line

2) SLM coordinates, fitted --> DCOPS, APINS, CSC centers, Laser

3) SLM coordinates, measured ->DCOPS

4) CMS coordinates, nominal/calibrated

5) CMS coordinates, fitted

6) CMS coordinates, measured

These should have the following format:

Note: CENTER (X,Y,Z); ANGLE(x,y,z)

SLM coordinates

--------------------------------

nominal/calib values

Object_name X err Y err Z err x err y err z err

Object_name X err Y err Z err x err y err z err

......

Object_name X err Y err Z err x err y err z err

fitted values

Object_name X err Y err Z err x err y err z err

Object_name X err Y err Z err x err y err z err

......

Object_name X err Y err Z err x err y err z err

measured values

Object_name X err Y err Z err x err y err z err

Object_name X err Y err Z err x err y err z err

......

Object_name X err Y err Z err x err y err z err

CMS coordinates

--------------------------------

nominal/calib values

Object_name X err Y err Z err x err y err z err

Object_name X err Y err Z err x err y err z err

......

Object_name X err Y err Z err x err y err z err

fitted values

Object_name X err Y err Z err x err y err z err

Object_name X err Y err Z err x err y err z err

......

Object_name X err Y err Z err x err y err z err

measured values

Object_name X err Y err Z err x err y err z err

Object_name X err Y err Z err x err y err z err

......

Object_name X err Y err Z err x err y err z err

-----------------------------

I created a dat file with this format. This one contains the APIN and CSC

center fitted center (x, y, x),angle(x, y, z) and uncertainty values in SLM

coordinate system.

Name of the file: CSC_slm_fit.dat

----------------

apin_inner_MEp2_1_14 2.7088597e-14 0 6.7081473e-13 0 -968.883 0 0 0 0 0 0 0

apin_outer_MEp2_1_14 -2.5802816e-14 0 3.3917179e-13 0 988.187 0 0 0 0 0 0 0

MEp2_1_14_XXXXXXXXXX 2371.279 100 -86.504 1050.148 120.918 415.569 0.0072 97.920 79.897 82.794 -0.0077 97.864

apin_inner_MEp2_1_04 -9.025731e-14 0 -7.6302057e-13 0 -968.883 0 0 0 0 0 0 0

apin_outer_MEp2_1_04 1.1804778e-13 0 -4.3671521e-13 0 988.187 0 0 0 0 0 0 0

MEp2_1_04_XXXXXXXXXX -2371.279 100 -94.968 2013.157 120.042 785.759 0.0177 97.923 -79.895 84.096 0.017 97.863

apin_inner_MEp2_2_27 3.0128762e-14 0 -8.0199049e-13 0 -1635.887 0 0 0 0 0 0 0

apin_outer_MEp2_2_27 9.3058407e-14 0 7.7334637e-13 0 1655.191 0 0 0 0 0 0 0

MEp2_2_27_XXXXXXXXXX 5225.848 100 -91.802 544.447 165.132 217.491 0.0093

97.008 84.998 79.118 -0.0094 96.987

-------------

I used the "XXXXXXXXX" extention to have words of same length.

I would need to find out how to read out words that change their lenth from

one line to another.

For now let's keep it like this...I will think about the problem later...

Here is the script:

---------------------

void motorcycle()

{

TString dir = gSystem->UnixPathName(TCint::GetCurrentMacroName());

dir.ReplaceAll("motorcycle.C","");

dir.ReplaceAll("/./","/");

// Read file:

// The number in the paranthesis [] is the number of

// lines from the dat file; check it!!!

//center position [mm]

Double_t *x_c = new Double_t[9];

Double_t *y_c = new Double_t[9];

Double_t *z_c = new Double_t[9];

//cent position uncertainty [um]

Double_t *x_ce = new Double_t[9];

Double_t *y_ce = new Double_t[9];

Double_t *z_ce = new Double_t[9];

//angle [mrad]

Double_t *x_a = new Double_t[9];

Double_t *y_a = new Double_t[9];

Double_t *z_a = new Double_t[9];

//angle uncertainty [urad]

Double_t *x_ae = new Double_t[9];

Double_t *y_ae = new Double_t[9];

Double_t *z_ae = new Double_t[9];

Double_t vX_c, vY_c, vZ_c;

Double_t vX_ce, vY_ce, vZ_ce;

Double_t vX_a, vY_a, vZ_a;

Double_t vX_ae, vY_ae, vZ_ae;

Int_t vNData = 0;

Char_t *w=new Char_t[9];

//vW is declared to read out the cocoa object name;

//here the length is 20; check it!!!

Char_t vW[20];

ifstream vInput;

//here you open the dat file

vInput.open(Form("%sCSC_slm_fit.dat",dir.Data()));

while (1) {

vInput >> vW >> vX_c >> vX_ce >> vY_c >> vY_ce >> vZ_c >> vZ_ce >> vX_a >> vX_ae >> vY_a >>vY_ae >> vZ_a >> vZ_ae;

if (!vInput.good()) break;

w[vNData] = vW;

x_c[vNData] = vX_c;

x_ce[vNData] = vX_ce;

y_c[vNData] = vY_c;

y_ce[vNData] = vY_ce;

z_c[vNData] = vZ_c;

z_ce[vNData] = vZ_ce;

x_a[vNData] = vX_a;

x_ae[vNData] = vX_ae;

y_a[vNData] = vY_a;

y_ae[vNData] = vY_ae;

z_a[vNData] = vZ_a;

z_ae[vNData] = vZ_ae;

printf("vW=%20s,X=%4f,X_e=%4f,Y=%4f,Y_e=%4f,Z=%4f,Z_e=%4f,X=%4f,X_e=%4f,Y=%4f,Y_e=%4f,Z=%4f,Z_e=%4f\n",vW,vX_c,vX_ce,vY_c,vY_ce,vZ_c,vZ_ce,vX_a,vX_ae,vY_a,vY_ae,vZ_a,vZ_ae);

vNData++;

}

vInput.close();

//TGraphErrors *gr = new TGraphErrors(vNData,x_c,y_c,x_ce,y_ce);

TGraph *gr = new TGraph(vNData,x_c,y_c);

TCanvas *c1 = new TCanvas("c1","ME+2 SLM25 DCOPS dowel pin position in SLM X-Y plane",200,10,600,400);

c1->SetFillColor(42);

c1->SetGrid();

c1->GetFrame()->SetFillColor(1);

c1->GetFrame()->SetBorderSize(12);

gr->SetMarkerStyle(21);

gr->SetMarkerColor(4);

gr->SetTitle("ME+2 SLM25 DCOPS dowel pin position in CMS X-Y plane");

gr->Draw("AP");

// delete [] x;

// delete [] y;

}

For some reason I have one more bug probably related to the readout format.

This is the message that I get:

-------------------------------

First I read back the values (need to change the format for the numbers)

root [1] vW=apin_inner_MEp2_1_14,X=0.000000,X_e=0.000000,Y=0.000000,Y_e=0.000000

,Z=-968.883000,Z_e=0.000000,X=0.000000,X_e=0.000000,Y=0.000000,Y_e=0.000000,Z=0.

000000,Z_e=0.000000

vW=apin_outer_MEp2_1_14,X=-0.000000,X_e=0.000000,Y=0.000000,Y_e=0.000000,Z=988.1

87000,Z_e=0.000000,X=0.000000,X_e=0.000000,Y=0.000000,Y_e=0.000000,Z=0.000000,Z_

e=0.000000

vW=MEp2_1_14_XXXXXXXXXX,X=2371.279000,X_e=100.000000,Y=-86.504000,Y_e=1050.14800

0,Z=120.918000,Z_e=415.569000,X=0.007200,X_e=97.920000,Y=79.897000,Y_e=82.794000

,Z=-0.007700,Z_e=97.864000

vW=apin_inner_MEp2_1_04,X=-0.000000,X_e=0.000000,Y=-0.000000,Y_e=0.000000,Z=-968

.883000,Z_e=0.000000,X=0.000000,X_e=0.000000,Y=0.000000,Y_e=0.000000,Z=0.000000,

Z_e=0.000000

vW=apin_outer_MEp2_1_04,X=0.000000,X_e=0.000000,Y=-0.000000,Y_e=0.000000,Z=988.1

87000,Z_e=0.000000,X=0.000000,X_e=0.000000,Y=0.000000,Y_e=0.000000,Z=0.000000,Z_

e=0.000000

vW=MEp2_1_04_XXXXXXXXXX,X=-2371.279000,X_e=100.000000,Y=-94.968000,Y_e=2013.1570

00,Z=120.042000,Z_e=785.759000,X=0.017700,X_e=97.923000,Y=-79.895000,Y_e=84.0960

00,Z=0.017000,Z_e=97.863000

vW=apin_inner_MEp2_2_27,X=0.000000,X_e=0.000000,Y=-0.000000,Y_e=0.000000,Z=-1635

.887000,Z_e=0.000000,X=0.000000,X_e=0.000000,Y=0.000000,Y_e=0.000000,Z=0.000000,

Z_e=0.000000

vW=apin_outer_MEp2_2_27,X=0.000000,X_e=0.000000,Y=0.000000,Y_e=0.000000,Z=1655.1

91000,Z_e=0.000000,X=0.000000,X_e=0.000000,Y=0.000000,Y_e=0.000000,Z=0.000000,Z_

e=0.000000

*** glibc detected *** free(): invalid next size (fast): 0x087dd340 ***

I think the last error message might be related to the number of lines or

readout values...need to fix this.

I compared it to my previous script that is working and I did not find other

differences than the number of variables.

Note: this script (once it's working) will produce chamber center and a-pin

center positions in SLM coordinates with corresponding error bars.

Here is the short script (with this I get a graphical output):

void testfile()

{

TString dir = gSystem->UnixPathName(TCint::GetCurrentMacroName());

dir.ReplaceAll("testfile.C","");

dir.ReplaceAll("/./","/");

// read file and add to fit object

Double_t *x = new Double_t[9];

Double_t *y = new Double_t[9];

Double_t vX, vY;

Int_t vNData = 0;

Char_t *w=new Char_t[9];

Char_t vW[25];

ifstream vInput;

vInput.open(Form("%smotorcycle.dat",dir.Data()));

while (1) {

vInput >> vW >> vX >> vY;

if (!vInput.good()) break;

w[vNData] = vW;

x[vNData] = vX;

y[vNData] = vY;

printf("vW=%25s, X=%8f, Y=%8f\n",vW, vX,vY);

vNData++;

}

vInput.close();

TGraph *gr = new TGraph(vNData,x,y);

TCanvas *c1 = new TCanvas("c1","ME+2 SLM25 DCOPS dowel pin position in CMS X-Y plane",200,10,600,400);

c1->SetFillColor(42);

c1->SetGrid();

c1->GetFrame()->SetFillColor(1);

c1->GetFrame()->SetBorderSize(12);

gr->SetMarkerStyle(21);

gr->SetMarkerColor(4);

gr->SetTitle("ME+2 SLM25 DCOPS dowel pin position in CMS X-Y plane");

gr->Draw("AP");

delete [] x;

delete [] y;

}

This is the graph that I get (since in the CMS coord system we don’t get uncertainties in the output I could not include them on the plot):

[pic]

Once I make this work, I will produce a second .dat file that has the

APIN and CSC center coordinates in CMS coordinate system.

I will read out both files with the same method (see above) and

plot Z_cms vs X_slm coordinates.

The next step is to make a file with nominal values.

There are to ways to do this:

1) include nominal values in the same file where I have the fitted values or

make a separate file.

I'm not sure if Pedro will be able to output values in the following sequence:

fitted

nominal

calibrated

We will need to ask him about this.

If I put these values in separate files the script will become very robust.

This is a problem that we need to think about...

Conclusion: Keep in mind that the script should work for any input variables APINS, DCOPS, CSC that can be fitted, nominal, calibrated, measured, PG etc. If these are in the same format, we can easily plot anything!

Therefore the readout format is the most important part that we should concentrate on right now.

April 13, 2007

++++++++++++++

I figured out how to get the correct format to read back the .dat file info.

I modified the Char_t[20] definition to Chart['']

...and replaced Double_t[9] with Double_t['']

With this setting I can read out any number of lines and the word lenght is

also optional.

I also changed the %4f to %1.2f (see printf). This means that I define a two

decimal precision for the print out.

Here is the output:

w=apin_inner_MEp2_1_14,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=-968.88,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

w=apin_outer_MEp2_1_14,X=-0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=988.19,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

w=MEp2_1_14,X=2371.28,X_e=100.00,Y=-86.50,Y_e=1050.15,Z=120.92,Z_e=415.57,X=0.01,X_e=97.92,Y=79.90,Y_e=82.79,Z=-0.01,Z_e=97.86

w=apin_inner_MEp2_1_04,X=-0.00,X_e=0.00,Y=-0.00,Y_e=0.00,Z=-968.88,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

w=apin_outer_MEp2_1_04,X=0.00,X_e=0.00,Y=-0.00,Y_e=0.00,Z=988.19,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

w=MEp2_1_04,X=-2371.28,X_e=100.00,Y=-94.97,Y_e=2013.16,Z=120.04,Z_e=785.76,X=0.02,X_e=97.92,Y=-79.89,Y_e=84.10,Z=0.02,Z_e=97.86

w=apin_inner_MEp2_2_27,X=0.00,X_e=0.00,Y=-0.00,Y_e=0.00,Z=-1635.89,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

w=apin_outer_MEp2_2_27,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=1655.19,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

Oops! I don't see the last line.

The while loop is repeated until we get to the end of the last line of data.

For each line I read out 1 word and 12 numbers. If I have a break at the

end of the line I jump to the next line...if there is info in the next line:

STOP.

OK, let's check the .dat file, may be there is no break..or there is some

formatting error.

!!!!! There was no break at the end of the last line!!!!!!!!!!!!!!!!

I corrected this and now I get:

Line number:1

apin_outer_MEp2_1_14,X=-0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=988.19,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

Line number:2

MEp2_1_14,X=2371.28,X_e=100.00,Y=-86.50,Y_e=1050.15,Z=120.92,Z_e=415.57,X=0.01,X_e=97.92,Y=79.90,Y_e=82.79,Z=-0.01,Z_e=97.86

Line number:3

apin_inner_MEp2_1_04,X=-0.00,X_e=0.00,Y=-0.00,Y_e=0.00,Z=-968.88,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

Line number:4

apin_outer_MEp2_1_04,X=0.00,X_e=0.00,Y=-0.00,Y_e=0.00,Z=988.19,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

Line number:5

MEp2_1_04,X=-2371.28,X_e=100.00,Y=-94.97,Y_e=2013.16,Z=120.04,Z_e=785.76,X=0.02,X_e=97.92,Y=-79.89,Y_e=84.10,Z=0.02,Z_e=97.86

Line number:6

apin_inner_MEp2_2_27,X=0.00,X_e=0.00,Y=-0.00,Y_e=0.00,Z=-1635.89,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

Line number:7

apin_outer_MEp2_2_27,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=1655.19,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

Line number:8

MEp2_2_27,X=5225.85,X_e=100.00,Y=-91.80,Y_e=544.45,Z=165.13,Z_e=217.49,X=0.01,X_e=97.01,Y=85.00,Y_e=79.12,Z=-0.01,Z_e=96.99

This looks fine now.

Let's define a tree:

Before the while(1) loop I include:

TFile *f = new TFile("basic.root","RECREATE");

TNtuple *ntuple = new TNtuple("ntuple","data from ascii file","x_c:x_ce:y_c:y_ce:z_c:z_ce:x_a:x_ae:y_a:y_ae:z_a:z_ae");

and after the while loop I write to the file:

f->Write();

Problem with the plot: CSC centers are in SLM

coordinates and the a-pins are in CSC coordinates.

I will have to transform CSC coordinates to SLM using the variables that I read

out from the .dat file.

I created a tree and an ntuple. The leaves are the:x_c, x_ce, y_c... etc.

I don't understand yet how to make plot using variables from the tree.

For now I will use graph.

Regarding the format in the .dat file:

-apins shell be in SLM coordinates

-list objects in order (not mixed): first all the apins, then all the CSC

centers etc.

- have errors and positions in the same units [mm] [mrad]

I included these modifications in the .dat file.

Here is the program:

----------------------

void motorcycle()

{

TString dir = gSystem->UnixPathName(TCint::GetCurrentMacroName());

dir.ReplaceAll("motorcycle.C","");

dir.ReplaceAll("/./","/");

// Read file:

//center position [mm]

Float_t *x_c = new Float_t[''];

Float_t*y_c = new Float_t[''];

Float_t*z_c = new Float_t[''];

//cent position uncertainty [mm]

Float_t*x_ce = new Float_t[''];

Float_t*y_ce = new Float_t[''];

Float_t*z_ce = new Float_t[''];

//angle [mrad]

Float_t*x_a = new Float_t[''];

Float_t*y_a = new Float_t[''];

Float_t*z_a = new Float_t[''];

//angle uncertainty [mrad]

Float_t*x_ae = new Float_t[''];

Float_t*y_ae = new Float_t[''];

Float_t*z_ae = new Float_t[''];

Float_t vX_c, vY_c, vZ_c;

Float_t vX_ce, vY_ce, vZ_ce;

Float_t vX_a, vY_a, vZ_a;

Float_t vX_ae, vY_ae, vZ_ae;

Int_t vNData = 0;

Char_t *w=new Char_t[''];

Char_t vW[''];

ifstream vInput;

//here you open the dat file

vInput.open(Form("%sCSC_slm_fit.dat",dir.Data()));

TFile *f = new TFile("motorcycle.root","RECREATE");

// TNtuple *ntuple = new TNtuple("ntuple","data from ascii file","x_c:x_ce:y_c:y_ce:z_c:z_ce:x_a:x_ae:y_a:y_ae:z_a:z_ae");

TTree *T = new TTree("T","My first tree");

T->Branch("x_c",&x_c,"x_c/F");

T->Branch("x_ce",&x_ce,"x_ce/F");

T->Branch("y_c",&y_c,"y_c/F");

T->Branch("y_ce",&y_ce,"y_ce/F");

T->Branch("z_c",&z_c,"z_c/F");

T->Branch("z_ce",&z_ce,"z_ce/F");

T->Branch("x_a",&x_a,"x_a/F");

T->Branch("x_ae",&x_ae,"x_ae/F");

T->Branch("y_a",&y_a,"y_a/F");

T->Branch("y_ae",&y_ae,"y_ae/F");

T->Branch("z_a",&z_a,"z_a/F");

T->Branch("z_ae",&z_ae,"z_ae/F");

// while(1) creates an infinite loop

while (1) {

vInput >> vW >> vX_c >> vX_ce >> vY_c >> vY_ce >> vZ_c >> vZ_ce >> vX_a >> vX_ae >> vY_a >>vY_ae >> vZ_a >> vZ_ae;

if (!vInput.good()) break;

w[vNData] = vW;

x_c[vNData] = vX_c;

x_ce[vNData] = vX_ce;

y_c[vNData] = vY_c;

y_ce[vNData] = vY_ce;

z_c[vNData] = vZ_c;

z_ce[vNData] = vZ_ce;

x_a[vNData] = vX_a;

x_ae[vNData] = vX_ae;

y_a[vNData] = vY_a;

y_ae[vNData] = vY_ae;

z_a[vNData] = vZ_a;

z_ae[vNData] = vZ_ae;

T->Fill();

cout Branch("slmz_a1",&slmz_a[1],"slmz_a1/F");

T1->Branch("slmz_ae1",&slmz_ae[1],"slmz_ae1/F");

// T1->Branch("slmw2", &slmw[2],"slmw2/C");

T1->Branch("slmx_c2", &slmx_c[2],"slmx_c2/F");

T1->Branch("slmx_ce2",&slmx_ce[2],"slmx_ce2/F");

T1->Branch("slmy_c2",&slmy_c[2],"slmy_c2/F");

T1->Branch("slmy_ce2",&slmy_ce[2],"slmy_ce2/F");

T1->Branch("slmz_c2",&slmz_c[2],"slmz_c2/F");

T1->Branch("slmz_ce2",&slmz_ce[2],"slmz_ce2/F");

T1->Branch("slmx_a2",&slmx_a[2],"slmx_a2/F");

T1->Branch("slmx_ae2",&slmx_ae[2],"slmx_ae2/F");

T1->Branch("slmy_a2",&slmy_a[2],"slmy_a2/F");

T1->Branch("slmy_ae2",&slmy_ae[2],"slmy_ae2/F");

T1->Branch("slmz_a2",&slmz_a[2],"slmz_a2/F");

T1->Branch("slmz_ae2",&slmz_ae[2],"slmz_ae2/F");

TTree *T2 = new TTree("T2","CMS coord tree");

// T2->Branch("cmsw0", &cmsw[0],"cmsw0/C");

T2->Branch("cmsx_c0", &cmsx_c[0],"cmsx_c0/F");

T2->Branch("cmsx_ce0",&cmsx_ce[0],"cmsx_ce0/F");

T2->Branch("cmsy_c0",&cmsy_c[0],"cmsy_c0/F");

T2->Branch("cmsy_ce0",&cmsy_ce[0],"cmsy_ce0/F");

T2->Branch("cmsz_c0",&cmsz_c[0],"cmsz_c0/F");

T2->Branch("cmsz_ce0",&cmsz_ce[0],"cmsz_ce0/F");

T2->Branch("cmsx_a0",&cmsx_a[0],"cmsx_a0/F");

T2->Branch("cmsx_ae0",&cmsx_ae[0],"cmsx_ae0/F");

T2->Branch("cmsy_a0",&cmsy_a[0],"cmsy_a0/F");

T2->Branch("cmsy_ae0",&cmsy_ae[0],"cmsy_ae0/F");

T2->Branch("cmsz_a0",&cmsz_a[0],"cmsz_a0/F");

T2->Branch("cmsz_ae0",&cmsz_ae[0],"cmsz_ae0/F");

// T2->Branch("cmsw1", &cmsw[1],"cmsw1/C");

T2->Branch("cmsx_c1", &cmsx_c[1],"cmsx_c1/F");

T2->Branch("cmsx_ce1",&cmsx_ce[1],"cmsx_ce1/F");

T2->Branch("cmsy_c1",&cmsy_c[1],"cmsy_c1/F");

T2->Branch("cmsy_ce1",&cmsy_ce[1],"cmsy_ce1/F");

T2->Branch("cmsz_c1",&cmsz_c[1],"cmsz_c1/F");

T2->Branch("cmsz_ce1",&cmsz_ce[1],"cmsz_ce1/F");

T2->Branch("cmsx_a1",&cmsx_a[1],"cmsx_a1/F");

T2->Branch("cmsx_ae1",&cmsx_ae[1],"cmsx_ae1/F");

T2->Branch("cmsy_a1",&cmsy_a[1],"cmsy_a1/F");

T2->Branch("cmsy_ae1",&cmsy_ae[1],"cmsy_ae1/F");

T2->Branch("cmsz_a1",&cmsz_a[1],"cmsz_a1/F");

T2->Branch("cmsz_ae1",&cmsz_ae[1],"cmsz_ae1/F");

// T2->Branch("cmsw2", &cmsw[2],"cmsw2/C");

T2->Branch("cmsx_c2", &cmsx_c[2],"cmsx_c2/F");

T2->Branch("cmsx_ce2",&cmsx_ce[2],"cmsx_ce2/F");

T2->Branch("cmsy_c2",&cmsy_c[2],"cmsy_c2/F");

T2->Branch("cmsy_ce2",&cmsy_ce[2],"cmsy_ce2/F");

T2->Branch("cmsz_c2",&cmsz_c[2],"cmsz_c2/F");

T2->Branch("cmsz_ce2",&cmsz_ce[2],"cmsz_ce2/F");

T2->Branch("cmsx_a2",&cmsx_a[2],"cmsx_a2/F");

T2->Branch("cmsx_ae2",&cmsx_ae[2],"cmsx_ae2/F");

T2->Branch("cmsy_a2",&cmsy_a[2],"cmsy_a2/F");

T2->Branch("cmsy_ae2",&cmsy_ae[2],"cmsy_ae2/F");

T2->Branch("cmsz_a2",&cmsz_a[2],"cmsz_a2/F");

T2->Branch("cmsz_ae2",&cmsz_ae[2],"cmsz_ae2/F");

// TTree *T = new TTree("T","My first tree");

// T->Branch("slmx_c[0]", &slmx_c[0],"slmx_c[0]/F:slmx_c[0]:slmx_c[1]:slmx_c[2]");

// T->Branch("slmx_ce[0]",&slmx_ce[0],"slmx_ce[0]/F:slmx_ce[1]:slmx_ce[2]");

// T->Branch("slmy_c[0]",&slmy_c[0],"slmy_c[0]/F:slmy_c[1]:slmy_c[2]");

// T->Branch("slmy_ce[0]",&slmy_ce[0],"slmy_ce[0]/F:slmy_ce[1]:slmy_ce[2]");

// T->Branch("slmz_c[0]",&slmz_c[0],"slmz_c[0]/F:slmz_c[1]:slmz_c[2]");

// T->Branch("slmz_ce[0]",&slmz_ce[0],"slmz_ce[0]/F:slmz_ce[1]:slmz_ce[2]");

// T->Branch("slmx_a[0]",&slmx_a[0],"slmx_a[0]/F:slmx_a[1]:slmx_a[2]");

// T->Branch("slmx_ae[0]",&slmx_ae[0],"slmx_ae[0]/F:slmx_ae[1]:slmx_ae[2]");

// T->Branch("slmy_a[0]",&slmy_a[0],"slmy_a[0]/F:slmy_a[1]:slmy_a[2]");

// T->Branch("slmy_ae[0]",&slmy_ae[0],"slmy_ae[0]/F:slmy_ae[1]:slmy_ae[2]");

// T->Branch("slmz_a[0]",&slmz_a[0],"slmz_a[0]/F:slmz_a[1]:slmz_a[2]");

// T->Branch("slmz_ae[0]",&slmz_ae[0],"slmz_ae[0]/F:slmz_ae[1]:slmz_ae[2]");

// while(1) creates an infinite loop

while (1) {

slmInput >> slmW >> slmX_c >> slmX_ce >> slmY_c >> slmY_ce >> slmZ_c >> slmZ_ce >> slmX_a >> slmX_ae >> slmY_a >>slmY_ae >> slmZ_a >> slmZ_ae;

if (!slmInput.good()) break;

slmw[slmNData] = slmW;

slmx_c[slmNData] = slmX_c;

slmx_ce[slmNData] = slmX_ce;

slmy_c[slmNData] = slmY_c;

slmy_ce[slmNData] = slmY_ce;

slmz_c[slmNData] = slmZ_c;

slmz_ce[slmNData] = slmZ_ce;

slmx_a[slmNData] = slmX_a;

slmx_ae[slmNData] = slmX_ae;

slmy_a[slmNData] = slmY_a;

slmy_ae[slmNData] = slmY_ae;

slmz_a[slmNData] = slmZ_a;

slmz_ae[slmNData] = slmZ_ae;

cout > cmsW >> cmsX_c >> cmsX_ce >> cmsY_c >> cmsY_ce >> cmsZ_c >> cmsZ_ce >> cmsX_a >> cmsX_ae >> cmsY_a >>cmsY_ae >> cmsZ_a >> cmsZ_ae;

if (!cmsInput.good()) break;

cmsw[cmsNData] = cmsW;

cmsx_c[cmsNData] = cmsX_c;

cmsx_ce[cmsNData] = cmsX_ce;

cmsy_c[cmsNData] = cmsY_c;

cmsy_ce[cmsNData] = cmsY_ce;

cmsz_c[cmsNData] = cmsZ_c;

cmsz_ce[cmsNData] = cmsZ_ce;

cmsx_a[cmsNData] = cmsX_a;

cmsx_ae[cmsNData] = cmsX_ae;

cmsy_a[cmsNData] = cmsY_a;

cmsy_ae[cmsNData] = cmsY_ae;

cmsz_a[cmsNData] = cmsZ_a;

cmsz_ae[cmsNData] = cmsZ_ae;

cout Branch("slmx_c0", &slmx_c[0],"slmx_c0/F:slmx_ce[0]:slmy_c[0]:slmy_ce[0].....etc");

but the problem with this is the following:

I need to read out object_name[#] but I cannot put that in the leaf definition

part "slmx_c0/F:slmx_ce[0]:slmy_c[0]:slmy_ce[0].....etc" because the

paranthesis [] defines the lenght of the word. If I include it I get a wrong

format...incorrect numbers.

I had difficulties with reading in two files and put variables from each in

the same tree. The slm coordinates look fine, but the cms coordinates seem to

be double booked. Anyway I get some strange numbers.

Right now I defined two trees (tree T1 and tree T2).

Note: One can look at the content of the tree with

T1->Show(); but you will get zeros for all the variables. I don't know why.

When I do T-> Scan("variable1:variable2"), this shows the values for these

variables. If I go back to T1-> Show(); The numbers corresponding to these two

variables appear on the list.

I tried to plot variables from the tree.

Example: if I plot

T2->Draw("cmsz_c0:cmsx_0") I can plot only one point. (the axes scale is always

changing with the variables).

I would need to plot variables on the same Canvas using one axes scale. I will

need to figure this out.

I tried to put two trees together to be able to plot cms_z vs slm_x (but I

cannot get a drawing). May be I should have 2 separate root files (?).

root [9] TChain ch1("T1");

root [10] TChain ch2("T2");

root [11] ch1.AddFriend("T2")

(class TFriendElement*)0x897fb60

root [12] ch1.Draw("T2.cmsz_c0:T1.slmx_c0")

Error in : Bad numerical expression

: "T2.cmsx_c0"

root [13]

root [13] ch1.Draw("T2.&cmsz_c[0]:T1.&slmx_c[0]")

(see page: 223 and 224 in the userguide)

Readout format

---------------

I got some files from Pedro that might be able to read out the current

report.out file. I have difficulties with running the script in root.

Here are the files:

readFile.C (this will call GetWordsInLine.C)

------------

#if !defined(__CINT__) || defined(__MAKECINT__)

//#include "/afs/ciemat.es/user/a/arce/utils/rootana/plot4utils.C"

#endif

#include "TFile.h"

#include "TKey.h"

#include "TH1F.h"

#include "TPad.h"

#include "TCanvas.h"

#include

#include

#include "TMarker.h"

#include "TLine.h"

#include "TText.h"

#include "TVector3.h"

#include

#include

#include

#include

#include

#include

#include "GetWordsInLine.C"

TCanvas * theCanvas;

const char* XName = "log10(Energy) (MeV)";

const char* YName = "log10(Cross section) (barn)";

struct entryData{

std::string type;

float val;

float sig;

};

//------------------------------------------------------------------------

void readFile(const char* fname )

{

theCanvas = new TCanvas("dd");

theCanvas->cd();

std::ifstream* fin = new std::ifstream( fname );

if( !fin ) {

std::cerr GetFrame()->SetFillColor(0);

c1->GetFrame()->SetBorderSize(12);

c1->SetBorderMode(0); //this corresponds to "No Border"

Error bars (read page 54, 55 in the user guide):

-----------------------------------------------

To control the size of the lines at the end of the error bars use:

gr->Draw("z") or

gStyle->SetEndErrorSize(np);

by default np =1 (np=number of pixels)

There are several other options >, |>,... (see user guide)

Set Colors

-------------

In the Browser window (you get this with the "TBrowser n" command) on the

right side you can see all the folders. Click on the folder root..then on the

folder Colors. You get a long list (files) of colors on the right side of the

window. Right click on the file you want to choose and select inspect from the

menu. In the Object Inspector window you will get the value for the selected color.

Add errors for DCOPS

---------------------------

Here are all the settings:

//Define DCOPS coordinates and errors

//DCOPS: 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out ref

//This is the dcops approx. slmx_c coordinate

Float_t x_dcops[7] ={-3400.,-1500.,1500.,3400.,3900.,7000.,7200.}; //[mm]

//This is the dcops cmsz_c coordinate

Float_t y_dcops[7] ={8053.0506,8045.7633,8040.1054,8041.7368,8041.6766,8041.8421,8040.7196}; //[mm]

//Errors are not known

Float_t ex_dcops[7] ={0.,0.,0.,0.,0.,0.,0.};

//For now I will set the error for the DCOPS dowel Z_CMS pos. equal to the error for the Y_CSC pos

Float_t ey_dcops[7] = {0.437,0.437,0.437,0.437,0.483,0.483,0.019};

//Graph DCOPS ref dowel pin coordinates and errors

TGraphErrors *gr_dcops =new TGraphErrors(7,x_dcops,y_dcops,ex_dcops,ey_dcops);

//Set marker to plot ref dowel pin positions

gr_dcops->SetMarkerStyle(4); //empty circle

gr_dcops->SetMarkerSize(0.7);

gr_dcops->SetMarkerColor(6);//pink

gr_dcops->Draw("P");

Laser settings:

----------------

//This is laser 5 approx. slmx_c coordinate

Float_t x_las5[1] ={7175.883}; //[mm]

//This is laser 5 cmsz_c coordinate

Float_t y_las5[1] ={8001.0396}; //[mm]

Float_t ex_las5[1] ={0.};

Float_t ey_las5[1] = {0.048};

//Graph laser position and error

TGraphErrors *gr_las5 =new TGraphErrors(1,x_las5,y_las5,ex_las5,ey_las5);

//Set marker to plot laser position

gr_las5->SetMarkerStyle(21);//square

gr_las5->SetMarkerSize(0.9);

gr_las5->SetMarkerColor(2); //red

gr_las5->Draw("P");

-----------------------------------------

Next I want to plot the distance of the DCOPS dowel pin to the first pixel of CCD2

(R).

These are the fitted values

//DCOPS are in the folowing order: 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out ref

rightCCDYtoDowel2 57.79271 +- 49.166404

rightCCDYtoDowel2 57.806227 +- 49.23018

rightCCDYtoDowel2 57.690247 +- 51.31576

rightCCDYtoDowel2 57.561353 +- 49.198707

rightCCDYtoDowel2 57.741275 +- 49.190727

rightCCDYtoDowel2 57.725151 +- 49.225575

rightCCDYtoDowel2 58.028424 +- 48.19797

In the plot I will use the value from COCOA: 57.579 [mm]

CCD2 pixel 1 position along Z_CMS = Fitted dowel pin position value - 57.579

[mm]

Measured CCD2(R) values:

------------------------

// file id: 38, DCOPS_outer+21_04>OUT

COPS id14

R 6.552 1.942

// file id: 39, DCOPS_inner+21_04>OUT

COPS id15

R 13.691 1.834

// file id: 40, DCOPS_inner+21_14>IN

COPS id16

R 19.032 1.946

// file id: 41, DCOPS_outer+21_14>IN

COPS id17

R 17.134 4.043

// file id: 42, DCOPS_inner+22_27>IN

COPS id18

R 17.337 1.965

// file id: 43, DCOPS_outer+22_27>IN

COPS id19

R 16.942 4.233

// file id: 44, ME+2_reference2>IN

COPS id20

R 18.351 3.857

May 3, 2007

++++++++++++

Plot measured CCD readout values:

//Define DCOPS_meas coordinates and errors

//DCOPS: 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out ref

//This is the dcops_meas approx. slmx_c coordinate

Float_t x_dcops_meas[7] ={-3400.,-1500.,1500.,3400.,3900.,7000.,7200.}; //[mm]

//This is the dcops_meas cmsz_c coordinate (CCD2 pixel 1 position+ measured distance to the first CCD2 pixel)

Float_t y_dcops_meas[7] ={8002.024,8001.875,8001.558,8001.291,8001.434,8001.205,8001.4916};//[mm]

//Measured distance to the first CCD2 pixel={6.552, 13.691,19.032,17.134,17.337,16.942,18.351}; //[mm]

//y_CCD2pixel1={ 7995.472, 7988.184, 7982.526, 7984.157,7984.0976,7984.263,7983.1406}; //[mm]

//Errors in slm_x direction are not known

Float_t ex_dcops_meas[7] ={0.,0.,0.,0.,0.,0.,0.};

//the error for the DCOPS_meas dowel Z_CMS pos. are from the measurement file

Float_t ey_dcops_meas[7] = {1.942,1.834,1.946,4.043,1.965,4.233,3.857};

Laser position settings

______________________

//This is laser 5 approx. slmx_c coordinate

//Marcus used the value: 7175.883 [mm]

//I will move this to 7400 so it does not overlap with the ref sensor measurement

Float_t x_las5[1] ={7400}; //[mm]

//This is laser 5 cmsz_c coordinate

Float_t y_las5[1] ={8001.0396}; //[mm]

Float_t ex_las5[1] ={0.};

Float_t ey_las5[1] = {0.048};

//Graph laser position and error

TGraphErrors *gr_las5 =new TGraphErrors(1,x_las5,y_las5,ex_las5,ey_las5);

//Set marker to plot laser position

gr_las5->SetMarkerStyle(21);//square

gr_las5->SetMarkerSize(0.7);

gr_las5->SetMarkerColor(2); //red

gr_las5->Draw("P");

Note: I changed all the x, y, ex, ey notations to x_slm, z_cms, ex_slm, ez_cms

I can also fit it in the editor using the fitpanel. First fit all the points

with a polinomial (pol1). Right click on the line and from the menu select

SetRange (here input x_slm_min and x_slm_max).Right click again on the line and from the

menu select SetMaximum and SetMinimum (here you input the Z_cms coordinates).

I don't know yet how to make this part of the script.

For now I used TLine:

// Connect the alignment pins with a line

//Take the first two apin points (x1,y1,x2,y2)

TLine *l1 = new TLine(-3371.,8093.5639,-1371.,8092.383);

l1->SetLineColor(5);

l1->Draw();

//Connect the next two apins

TLine *l2 = new TLine(1371.,8084.2522,3371., 8084.2522);

l2->SetLineColor(5);

l2->Draw();

//..and the next two

TLine *l3 =new TLine(3600.,8089.2665,6800.,8090.3432);

l3->SetLineColor(5);

l3->Draw();

Set alignment pin errors:

------------------------

//Errors are not known, but I will set the error for the Z_cms coord equal

//to the CSC Z_cms error (that is equal to the CSC Y_slm coord err)

Float_t ex_slm_apin[6] ={0.,0.,0.,0.,0.,0.};

Float_t ez_cms_apin[6] = {2.0134,2.0134,1.0501,1.0501,0.5444,0.5444};

Include PG apin coordinates

----------------------------

//Define PG coordinates and errors

//This is the apin approx. slmx_c coordinate (I just used the same coordinates from the

//fitted values

Float_t x_slm_apin_PG[5] ={-1371.,1371.,3371.,3600.,6800.}; //[mm]

//This is the apin cmsz_c coordinate (these are the PG Z_cms coordinates)

//Note: 1_04_out is not measured (that's the reason why we have 5 values instead of 6)

Float_t z_cms_apin_PG[5] ={8037.05,7971.81,8031.59,8282.00,8282.53}; //[mm]

//I will include errors only for the Z_cms coordinates (I remember 0.3 [mm]; this has to be verified)

Float_t ex_slm_apin_PG[5] ={0.,0.,0.,0.,0.};

Float_t ez_cms_apin_PG[5] = {0.3,0.3,0.3,0.3,0.3};

//Graph apin coordinates and errors

TGraphErrors *gr_apin =new TGraphErrors(5,x_slm_apin_PG,z_cms_apin_PG,ex_slm_apin_PG,ez_cms_apin_PG);

//Set marker to plot apin positions

gr_apin->SetMarkerStyle(23);//triangle

gr_apin->SetMarkerSize(0.8);

gr_apin->SetMarkerColor(7); //light blue

gr_apin->Draw("P");

May 4, 2007

+++++++++++

Draw CCD2:

//Draw a 28.672 [mm] (lenght of CCD) line from the CCD2 pixel 1.

//Add 28.672 [mm] to z_cms_CCD2pixel1

//z_cms_CCD2pixel1 ={ 7995.472, 7988.184, 7982.526, 7984.157,7984.0976,7984.263,7983.1406}

//endpoint_CCD2= {8024.144,8016.856,8011.198,8012.829,8012.7696,8012.935,8011.8126}

//x_slm_CCD2pixel1 ={-3400.,-1500.,1500.,3400.,3900.,7000.,7200.}; //[mm]

TLine *lccd1=new TLine(-3400.,8024.144, -3400.,7995.472);

lccd1->SetLineColor(5);

lccd1->SetLineWidth(3.);

lccd1->Draw();

TLine *lccd2=new TLine(-1500.,8016.856, -1500.,7988.184);

lccd2->SetLineColor(5);

lccd2->SetLineWidth(3.);

lccd2->Draw();

TLine *lccd3=new TLine(1500.,8011.198, 1500.,7982.526);

lccd3->SetLineColor(5);

lccd3->SetLineWidth(3.);

lccd3->Draw();

TLine *lccd4=new TLine(3400.,8012.829, 3400.,7984.157);

lccd4->SetLineColor(5);

lccd4->SetLineWidth(3.);

lccd4->Draw();

TLine *lccd5=new TLine(3900.,8012.7696, 3900.,7984.0976);

lccd5->SetLineColor(5);

lccd5->SetLineWidth(3.);

lccd5->Draw();

TLine *lccd6=new TLine(7000.,8012.935, 7000.,7984.263);

lccd6->SetLineColor(5);

lccd6->SetLineWidth(3.);

lccd6->Draw();

TLine *lccd7=new TLine(7200.,8011.8126, 7200.,7983.1406);

lccd7->SetLineColor(5);

lccd7->SetLineWidth(3.);

lccd7->Draw();

[pic]

May 7 & 8, 2007

+++++++++++++++

We noticed problem with DCOPS Dowel pin - CCD pixel 1 distance.

Ask J. Bellinger and D. Eartly.

[pic]

Regarding plotting the laser line, I found this intristing note from Pedro ():

RECOMMENDATIONS;

A few recommendations for a first user of COCOA.

As for most of the software it is strongly recommended that you start building a simple example (for example a subsystem of the system you have in mind) and play with it. Playing with it we mean that you start setting almost every entry except one or two to fix , and the measurements to simulated_value and observe how these entries influence the final result. Then set one or two measurements to a value close to the simulated one and also observe how the results change.

This will also be very useful to understand your system: if you have free only a few parameters, you can esaily foresee which will the final result be and this way you can check that your understanding is correct. Or, quite likely, if the results are unexpected, it can serve you to find some stupid mistakes you made when writing the system description file.

Another trick that can serve you to make sure that you did not make any mistake in your system description file is to check the light path for each measurement. To do it, do the following:

Set in your input file the global option debug_verbose 3

Redirect the output of your program to a file, for example: cocoa filename >&! zz

Edit this file and go to a line that reads 'Fit::Calculate Original Simulated Values for every Measurement'. Then you can check for each measurement one object after the object that take part in the measurement (they all start by '@@@@ LR:OBJECT') and how the light behaves at each object.

A last thing that can help you to understand the behaviour of your system is looking at the derivatives. We mean by the derivatives how much the variation of an entry value affects the value of one measurement. It you look into the file to which you redirected the output, write the command

'grep DERIVATIVE zz | more'

(assuming the file name is 'zz').

You will get lines like the following ones:

SENSOR2D:s/sens6: s/laser angles X 0### DERIVATIVE: 0

SENSOR2D:s/sens6: s/laser angles X 1### DERIVATIVE: 9.2934737

They mean in this case that when you rotate the laser 's/laser' around the X axis by one radian (or microradian if you prefer), the value of the measurement in the 2D sensor 's/sens6' will change 9.29234737 meters (or micrometers). You can actually see two derivatives; as you imagined, one is for one dimension (the '0' or 'X') and the other for the other one (the '1' or 'Y').

Or you can get lines like these:

SENSOR2D:s/sens6: s/sens6 centre X 0### DERIVATIVE: -1

SENSOR2D:s/sens6: s/sens6 centre X 1### DERIVATIVE: 0

that do not need further explanation.

(it's not a priority, but need to use it later)

--------------

Ckeck numbers corresponding to COCOA optical object names in the output of:

root -b -p -q .x readFile.C++\(\"report.out\"\)

Take one example:

OPTO: CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN 280.171 137.646 48.5021 483.379 1657.15 99.9841 0 2 185 2 2.06955e-07 2 280.171 137.646 48.5058 483.421 1657.15 99.9841 0 2 185 2 1.94221e-07 2 280.171 137.646 48.5058 483.421 1657.15 99.9841 0 2 185 2 1.9423e-07 2

DCOPS_outer_MEp2_2_27_IN from each iteration in the report.out file:

Iteration 0:

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN

CAL: 108 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN centre_X 280.17076 +- 137.64575 280.199 +- 144 Q1

CAL: 109 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN centre_Y 48.502108 +- 483.37913 50.1 +- 538 Q1

CAL: 110 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN centre_Z 1657.1522 +- 99.98407 1657.151 +- 100 Q1

CAL: 111 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN angles_X 0 +- 2 0 +- 2 Q1

CAL: 112 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN angles_Y 185 +- 2 185 +- 2 Q1

CAL: 113 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN angles_Z 2.0695541e-07 +- 1.9999985 0 +- 2 Q1

Iteration 1:

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN

CAL: 108 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN centre_X 280.17072 +- 137.64571 280.199 +- 144 Q1

CAL: 109 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN centre_Y 48.505794 +- 483.42111 50.1 +- 538 Q1

CAL: 110 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN centre_Z 1657.1522 +- 99.984118 1657.151 +- 100 Q1

CAL: 111 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN angles_X 0 +- 2 0 +- 2 Q1

CAL: 112 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN angles_Y 185 +- 2 185 +- 2 Q1

CAL: 113 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN angles_Z 1.942209e-07 +- 1.9999985 0 +- 2 Q1

Iteration 2:

%%%% Optical Object: CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN

CAL: 108 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN centre_X 280.1707 +- 137.64571 280.199 +- 144 Q1

CAL: 109 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN centre_Y 48.505798 +- 483.42148 50.1 +- 538 Q1

CAL: 110 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN centre_Z 1657.1522 +- 99.984118 1657.151 +- 100 Q1

CAL: 111 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN angles_X 0 +- 2 0 +- 2 Q1

CAL: 112 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN angles_Y 185 +- 2 185 +- 2 Q1

CAL: 113 CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN angles_Z 1.9423022e-07 +- 1.9999985 0 +- 2 Q1

Therefore the readout order is the following:

OPTO: CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN

(centre_X centre_X_err centre_Y centre_Y_err centre_Z centre_Z_err angles_X angles_X_err angles_Y angles_Y_err angles_Z angles_Z_err)

(centre_X centre_X_err centre_Y centre_Y_err centre_Z centre_Z_err angles_X angles_X_err angles_Y angles_Y_err angles_Z angles_Z_err)

(centre_X centre_X_err centre_Y centre_Y_err centre_Z centre_Z_err angles_X angles_X_err angles_Y angles_Y_err angles_Z angles_Z_err)

In the first paranthesis I put values from iteration zero, the second parathesis are values from iteration 1, and the third paranthesis cooresponds to iteration 3.

I would like to get numbers only for the iteration where I get a message like:

Chi2= 3176.586 / 21 dof From measurements= 86.210499 from calibrated

parameters= 3090.3755

Fit iteration 2 ...

2 Fit quality is = 3.3279553e-05

GOOD QUALITY OF THE FIT FOR ITERATION 2 = 3.3279553e-05 < 0.1

So basically I would need an output with only 12 numbers (centre, angle and

uncertainty values for the iteration where we get a good fit quality)

Only for ONE ITERATION!

+ I would also need 2 more values, the Chi2 and the Fit quality values (so 12+

2 = 14 values in the same row)

I would also need to read out CMS coordinates ! (I sent an e-mail to Pedro to

help me with this)

-------------

Instead of :

OPTO: CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN

I need only:

DCOPS_inner_MEp2_1_14_IN

In the ReadFile.C file I changed the line (Pedro's rec.):

theOptOEntries.insert( std::multimap< std::string, entryData>::value_type( wl[2], data) );

by

theOptOEntries.insert( std::multimap< std::string, entryData>::value_type( wl[2].substr( wl[2].rfind("/")+1, wl[2].length() ) , data) );

It does not work, ...I get some error messages:

In file included from /tmp/file1qaWtD_rootcint.h:3,

from /tmp/DsGWKy_cint.cxx:1:

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/Gyongyi/readFile.C:65:7: invalid preprocessing directive #theOptOEntries

Error: external preprocessing failed. :0:

!!!Removing /uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/Gyongyi/./fileXFSlpA.cxx /uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/Gyongyi/./fileXFSlpA.h !!!

Error: rootcint: error loading headers...

Error in : Dictionary generation failed!

Info in : Invoking compiler to check macro's validity

In file included from /usr/include/c++/3.2.3/backward/strstream:51,

from /uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/Gyongyi/GetWordsInLine.C:2,

from /uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/Gyongyi/readFile.C:22:

/usr/include/c++/3.2.3/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated.

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/Gyongyi/readFile.C:65:7: invalid preprocessing directive #theOptOEntries

Error: Function readFile("report.out") is not defined in current scope :0:

*** Interpreter error recovered ***

I remove the word "OPTO:" so I get only the directory name:

std::cout centreGlobal()/ALIUtils::OutputLengthValueDimensionFactor(), (name + " CENTRE GLOBAL: ").c_str(), out );

NOTE: OpticalObjectMgr is in the following directory:

CMSSW_..../src/Alignment/CocoaModel/src

after scramv1 build (in cocoa bin dirtectory) I got the following error

message:

...............

>> Compiling /uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/:76:6: invalid preprocessing directive #ALIUtils

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/: In member function `void OpticalObjectMgr::dumpOptOs(std::ostream&) const':

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaModel/src/:77: no matching function for call to `ALIUtils::dump3v(CLHEP::Hep3Vector, const char*, std::basic_ostream&)'

/uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/src/Alignment/CocoaUtilities/interface/ALIUtils.h:30: candidates are: static void ALIUtils::dump3v(const CLHEP::Hep3Vector&, const std::string&)

gmake: *** [tmp/slc3_ia32_gcc323/src/Alignment/CocoaModel/src/OpticalObjectMgr.o] Error 1

I removed ",out" from the end of the row:

ALIUtils::dump3v( (*vocite)->centreGlobal()/ALIUtils::OutputLengthValueDimensionFactor(), (name + " CENTRE GLOBAL: ").c_str(), out );

and I don't get the error message anymore.

These are my setting snow in ME2_SLM25_las5.txt (I did the same settings for ME2_SLM25_las2.txt)

//Set Script Units

length_value_dimension 1 // mm

length_error_dimension 2 // um

angle_value_dimension 3 // deg

angle_error_dimension 2 // urad

//Set output units

output_length_value_dimension 1//mm

output_length_error_dimension 1//mm

output_angle_value_dimension 3//deg

output_angle_error_dimension 3//deg

Ok, now run

cocoa ME2_SLM25_las5.txt

then

root -b -p -q .x readFile.C++\(\"report.out\"\)

Here is theoutput again with the following units:

center+/- err [mm]+/-[mm]

angle+/-err [deg]+/-[deg]

CMS/slm_p2_2 289.778 0 -77.6457 0 7998 0 270 0 0 0 255 0 289.778 0 -77.6457 0 7998 0 270 0 0 0 255 0 289.778 0 -77.6457 0 7998 0 270 0 0 0 255 0

CMS/slm_p2_2/MEp2_1_04 -2371.28 0.1 -95.0118 2.01229 120.043 0.785738 0.0178775 0.00560976 -79.8948 0.00481832 0.01727 0.0056066 -2371.28 0.1 -94.9678 2.01318 120.042 0.78576 0.0176801 0.00561058 -79.8947 0.00481834 0.0171586 0.00560716 -2371.28 0.1 -94.9677 2.01316 120.042 0.785759 0.0176799 0.00561058 -79.8947 0.00481834 0.0171584 0.00560716

CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT 11.13 0.131699 46.6666 0.437128 -884.498 0.0998773 0 0.000114592 170 0.000114592 -1.00157e-06 0.000114591 11.1301 0.131704 46.67 0.437073 -884.5 0.0998745 0 0.000114592 170 0.000114592 -9.85069e-07 0.000114591 11.1301 0.131704 46.67 0.437073 -884.5 0.0998745 0 0.000114592 170 0.000114592 -9.8507e-07 0.000114591

CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT -270.104 0.131699 40.5334 0.437128 992.262 0.0998773 0 0.000114592 -10 0.000114592 -7.60922e-07 0.000114592 -270.104 0.131704 40.53 0.437074 992.264 0.0998745 0 0.000114592 -10 0.000114592 -7.4324e-07 0.000114592 -270.104 0.131704 40.53 0.437075 992.264 0.0998745 0 0.000114592 -10 0.000114592 -7.43232e-07 0.000114592

CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 7.60369e-14 0 1.71742e-13 0 -968.883 0 0 0 0 0 0 0 9.27863e-14 0 3.44455e-13 0 -968.883 0 0 0 0 0 0 0 -9.02573e-14 0 -7.63021e-13 0 -968.883 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 -8.05198e-14 0 -6.38043e-13 0 988.187 0 0 0 0 0 0 0 5.6939e-14 0 8.53612e-13 0 988.187 0 0 0 0 0 0 0 1.18048e-13 0 -4.36715e-13 0 988.187 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_1_14 2371.28 0.1 -86.5259 1.04989 120.919 0.41558 0.00722608 0.00561122 79.8973 0.00474369 -0.00774932 0.00560723 2371.28 0.1 -86.5041 1.05015 120.918 0.41557 0.00723294 0.00561041 79.8973 0.00474373 -0.00777539 0.0056072 2371.28 0.1 -86.504 1.05015 120.918 0.415569 0.00723293 0.00561041 79.8973 0.00474373 -0.00777549 0.0056072

CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN -11.1777 0.130739 44.1634 0.437074 -884.494 0.0998682 0 0.000114592 10 0.000114592 -1.66273e-06 0.000114591 -11.1777 0.130743 44.1685 0.437112 -884.496 0.0998657 0 0.000114592 10 0.000114592 -1.67687e-06 0.000114591 -11.1777 0.130743 44.1685 0.437112 -884.496 0.0998657 0 0.000114592 10 0.000114592 -1.67688e-06 0.000114591

CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN 270.152 0.130739 43.0363 0.437074 992.258 0.0998682 0 0.000114592 190 0.000114592 6.90454e-07 0.000114591 270.152 0.130743 43.0315 0.437113 992.26 0.0998657 0 0.000114592 190 0.000114592 6.74239e-07 0.000114591 270.152 0.130743 43.0315 0.437111 992.26 0.0998657 0 0.000114592 190 0.000114592 6.7425e-07 0.000114591

CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 -5.26824e-16 0 6.01471e-13 0 -968.883 0 0 0 0 0 0 0 2.62438e-14 0 -6.40465e-14 0 -968.883 0 0 0 0 0 0 0 2.70886e-14 0 6.70815e-13 0 -968.883 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 5.25224e-14 0 8.2547e-13 0 988.187 0 0 0 0 0 0 0 -5.66993e-14 0 5.43352e-13 0 988.187 0 0 0 0 0 0 0 -2.58028e-14 0 3.39172e-13 0 988.187 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_2_27 5225.85 0.1 -91.81 0.544262 165.133 0.217492 0.00923481 0.00555717 84.9977 0.00453313 -0.0091532 0.00555902 5225.85 0.1 -91.8017 0.544447 165.132 0.217491 0.0093564 0.00555816 84.9977 0.00453316 -0.00942404 0.00555697 5225.85 0.1 -91.8017 0.544447 165.132 0.217491 0.00935686 0.00555816 84.9977 0.00453316 -0.00942458 0.00555697

CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN 19.9502 0.137646 47.6979 0.483379 -1317.83 0.0999841 0 0.000114592 185 0.000114592 -3.23705e-07 0.000114591 19.9503 0.137646 47.6942 0.483421 -1317.83 0.0999841 0 0.000114592 185 0.000114592 -3.40606e-07 0.000114591 19.9503 0.137646 47.6942 0.483421 -1317.83 0.0999841 0 0.000114592 185 0.000114592 -3.40616e-07 0.000114591

CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN 280.171 0.137646 48.5021 0.483379 1657.15 0.0999841 0 0.000114592 185 0.000114592 2.06955e-07 0.000114591 280.171 0.137646 48.5058 0.483421 1657.15 0.0999841 0 0.000114592 185 0.000114592 1.94221e-07 0.000114591 280.171 0.137646 48.5058 0.483421 1657.15 0.0999841 0 0.000114592 185 0.000114592 1.9423e-07 0.000114591

CMS/slm_p2_2/MEp2_2_27/apin_inner_MEp2_2_27 2.95413e-15 0 -6.61011e-13 0 -1635.89 0 0 0 0 0 0 0 -7.81124e-14 0 1.60483e-13 0 -1635.89 0 0 0 0 0 0 0 3.01288e-14 0 -8.0199e-13 0 -1635.89 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_2_27/apin_outer_MEp2_2_27 -1.55386e-13 0 4.93974e-13 0 1655.19 0 0 0 0 0 0 0 6.88897e-14 0 4.95262e-13 0 1655.19 0 0 0 0 0 0 0 9.30584e-14 0 7.73346e-13 0 1655.19 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_tp5 7175.83 0.1 -43.25 0.1 -22.5 0.1 -0.00217732 0.0290115 89.9903 0.00727182 0.0021776 0.0290115 7175.83 0.1 -43.25 0.1 -22.5 0.1 -0.00205426 0.0290118 89.9903 0.00727186 0.00200949 0.0290121 7175.83 0.1 -43.25 0.1 -22.5 0.1 -0.00203922 0.0290119 89.9903 0.00727186 0.0020212 0.029012

CMS/slm_p2_2/MEp2_tp5/DCOPS_MEp2_reference_5_IN 0.0439514 0.0199057 0.53038 0.0199057 9.94048e-14 0.02 0 0.000572958 0 0.000572958 -6.14902e-05 0.000572945 0.0439502 0.0199057 0.530395 0.0199057 1.2885e-07 0.02 0 0.000572958 0 0.000572958 -6.1906e-05 0.000572945 0.0439522 0.0199057 0.530397 0.0199057 1.3056e-07 0.02 0 0.000572958 0 0.000572958 -6.1906e-05 0.000572945

CMS/slm_p2_2/MEp2_tp5/laser_MEp2_5 -26.8951 0.0486854 40.212 0.0488383 1.20128e-13 0 -4.42278e-05 0.00570165 -0.000198563 0.00567244 -0.000154173 0.00568816 -26.895 0.0486865 40.2105 0.0487025 7.43054e-14 0 -4.09543e-05 0.00570165 -0.0001985 0.00567244 0.000848055 0.00568824 -26.8951 0.0486865 40.2105 0.048703 3.90818e-13 0 -4.33113e-05 0.00570165 -0.000198316 0.00567244 0.000848525 0.00568824

NOTE: These are numbers from all the iterations: 0, 1, 2

---------------

May 10 & 11 2007

++++++++++++++++

create a new file slm_cms_readoutcocoa_all.C

this file reads out slm_fitc.dat (I kept a version of slm_cms_readout_all.C)

For now I remove the tree part from slm_cms_readoutcocoa_all.C

--------------------

Here is the output:

(NOTE: I can read out only 9 lines because the graph is set for

certain number of vectors..and the loop stops at 9.

This might couse a problem if I have predefined

vectors like slmx_c!!!!!!!!!!!!!!!!! )

gbaksay@linux:~/root/tutorials/graphs/user> root -l

root [0] .x slm_cms_readoutcocoa_all.C

Line number:0

CMS/slm_p2_2,X=289.78,X_e=0.00,Y=-77.65,Y_e=0.00,Z=7998.00,Z_e=0.00,X=270.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=255.00,Z_e=0.00

Line number:1

CMS/slm_p2_2/MEp2_1_04,X=-2371.28,X_e=0.10,Y=-94.97,Y_e=2.01,Z=120.04,Z_e=0.79,X=0.02,X_e=0.01,Y=-79.89,Y_e=0.00,Z=0.02,Z_e=0.01

Line number:2

CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT,X=11.13,X_e=0.13,Y=46.67,Y_e=0.44,Z=-884.50,Z_e=0.10,X=0.00,X_e=0.00,Y=170.00,Y_e=0.00,Z=-0.00,Z_e=0.00

Line number:3

CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT,X=-270.10,X_e=0.13,Y=40.53,Y_e=0.44,Z=992.26,Z_e=0.10,X=0.00,X_e=0.00,Y=-10.00,Y_e=0.00,Z=-0.00,Z_e=0.00

Line number:4

CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04,X=-0.00,X_e=0.00,Y=-0.00,Y_e=0.00,Z=-968.88,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

Line number:5

CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04,X=0.00,X_e=0.00,Y=-0.00,Y_e=0.00,Z=988.19,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

Line number:6

CMS/slm_p2_2/MEp2_1_14,X=2371.28,X_e=0.10,Y=-86.50,Y_e=1.05,Z=120.92,Z_e=0.42,X=0.01,X_e=0.01,Y=79.90,Y_e=0.00,Z=-0.01,Z_e=0.01

Line number:7

CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN,X=-11.18,X_e=0.13,Y=44.17,Y_e=0.44,Z=-884.50,Z_e=0.10,X=0.00,X_e=0.00,Y=10.00,Y_e=0.00,Z=-0.00,Z_e=0.00

Line number:8

CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN,X=270.15,X_e=0.13,Y=43.03,Y_e=0.44,Z=992.26,Z_e=0.10,X=0.00,X_e=0.00,Y=190.00,Y_e=0.00,Z=0.00,Z_e=0.00

Line number:9

CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=-968.88,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

Line number:0

MEp2_1_14,X=-207.16,X_e=0.00,Y=-2399.42,Y_e=0.00,Z=8084.50,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

Line number:1

MEp2_1_04,X=1019.46,X_e=0.00,Y=2181.76,Y_e=0.00,Z=8092.97,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

Line number:2

MEp2_2_27,X=-903.27,X_e=0.00,Y=-5168.17,Y_e=0.00,Z=8089.80,Z_e=0.00,X=0.00,X_e=0.00,Y=0.00,Y_e=0.00,Z=0.00,Z_e=0.00

Info in : GIF file ME2_SLM25_LAS5.gif has been created

*** glibc detected *** free(): invalid next size (fast): 0x0824b640 ***

gbaksay@linux:~/root/tutorials/graphs/user>

First I need to create cms_fitc.dat with the same variables as in slm_fitc.dat

This is what I get in the report.out file:

OPTICALOBJECT list size 20

CMS/slm_p2_2/MEp2_tp5/laser_MEp2_5 CENTRE GLOBAL: (-1.5632173,-7.0100985,8.0010396)

CMS/slm_p2_2/MEp2_tp5/laser_MEp2_5 ROT_MATRIX GLOBAL: xx=-0.96597044 xy=3.2837177e-05 xz=-0.2586525

CMS/slm_p2_2/MEp2_tp5/laser_MEp2_5 ROT_MATRIX GLOBAL: yx=0.2586525 yy=6.5354006e-05 yz=-0.96597043

CMS/slm_p2_2/MEp2_tp5/laser_MEp2_5 ROT_MATRIX GLOBAL: zx=-1.4815765e-05 zy=-1 zz=-7.1623456e-05

CMS/slm_p2_2/MEp2_tp5/DCOPS_MEp2_reference_5_IN CENTRE GLOBAL: (-1.5892403,-7.0031333,8.0407196)

CMS/slm_p2_2/MEp2_tp5/DCOPS_MEp2_reference_5_IN ROT_MATRIX GLOBAL: xx=-0.96596954 xy=1.7292571e-05 xz=-0.25865584

CMS/slm_p2_2/MEp2_tp5/DCOPS_MEp2_reference_5_IN ROT_MATRIX GLOBAL: yx=0.25865584 yy=6.8734581e-05 yz=-0.96596954

CMS/slm_p2_2/MEp2_tp5/DCOPS_MEp2_reference_5_IN ROT_MATRIX GLOBAL: zx=1.0745037e-06 zy=-1 zz=-7.0868336e-05

CMS/slm_p2_2/MEp2_tp5 CENTRE GLOBAL: (-1.5891979,-7.0031447,8.04125)

CMS/slm_p2_2/MEp2_tp5 ROT_MATRIX GLOBAL: xx=-0.96596954 xy=1.8336072e-05 xz=-0.25865584

CMS/slm_p2_2/MEp2_tp5 ROT_MATRIX GLOBAL: yx=0.25865584 yy=6.8454385e-05 yz=-0.96596954

CMS/slm_p2_2/MEp2_tp5 ROT_MATRIX GLOBAL: zx=-5.9602487e-09 zy=-1 zz=-7.0867583e-05

CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN CENTRE GLOBAL: (-0.56103273,-3.3650068,8.0417368)

CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN ROT_MATRIX GLOBAL: xx=0.96638829 xy=-4.5888979e-05 xz=0.25708688

CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN ROT_MATRIX GLOBAL: yx=-0.25708689 yy=-0.00025686228 yz=0.96638826

CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN ROT_MATRIX GLOBAL: zx=2.1689352e-05 zy=-0.99999997 zz=-0.00026002615

CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN CENTRE GLOBAL: (-0.12051256,-1.5191202,8.0401054)

CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN ROT_MATRIX GLOBAL: xx=-0.96638829 xy=-4.5929853e-05 xz=-0.25708688

CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN ROT_MATRIX GLOBAL: yx=0.25708689 yy=-0.00025685873 yz=-0.96638826

CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN ROT_MATRIX GLOBAL: zx=-2.164894e-05 zy=-0.99999997 zz=0.00026003323

CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 CENTRE GLOBAL: (-0.12444332,-1.4340753,8.0842522)

CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 ROT_MATRIX GLOBAL: xx=-0.99634935 xy=-4.5900698e-05 xz=-0.085369591

CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 ROT_MATRIX GLOBAL: yx=0.0853696 yy=-0.00025686125 yz=-0.99634932

CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 ROT_MATRIX GLOBAL: zx=2.3804989e-05 zy=-0.99999997 zz=0.00025984206

CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 CENTRE GLOBAL: (-0.29151759,-3.3840007,8.0847608)

CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 ROT_MATRIX GLOBAL: xx=-0.99634935 xy=-4.5900698e-05 xz=-0.085369591

CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 ROT_MATRIX GLOBAL: yx=0.0853696 yy=-0.00025686125 yz=-0.99634932

CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 ROT_MATRIX GLOBAL: zx=2.3804989e-05 zy=-0.99999997 zz=0.00025984206

CMS/slm_p2_2/MEp2_1_14 CENTRE GLOBAL: (-0.20715647,-2.3994213,8.084504)

CMS/slm_p2_2/MEp2_1_14 ROT_MATRIX GLOBAL: xx=-0.99634935 xy=-4.5900698e-05 xz=-0.085369591

CMS/slm_p2_2/MEp2_1_14 ROT_MATRIX GLOBAL: yx=0.0853696 yy=-0.00025686125 yz=-0.99634932

CMS/slm_p2_2/MEp2_1_14 ROT_MATRIX GLOBAL: zx=2.3804989e-05 zy=-0.99999997 zz=0.00025984206

CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT CENTRE GLOBAL: (0.65427161,1.3761279,8.0457633)

CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT ROT_MATRIX GLOBAL: xx=-0.9654487 xy=0.00020844586 xz=-0.26059309

CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT ROT_MATRIX GLOBAL: yx=0.26059316 yy=0.00056868006 yz=-0.96544854

CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT ROT_MATRIX GLOBAL: zx=-5.304966e-05 zy=-0.99999982 zz=-0.000603351

CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT CENTRE GLOBAL: (1.1958826,3.194913,8.0530506)

CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT ROT_MATRIX GLOBAL: xx=0.9654487 xy=0.00020844205 xz=0.26059309

CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT ROT_MATRIX GLOBAL: yx=-0.26059316 yy=0.0005686819 yz=0.96544854

CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT ROT_MATRIX GLOBAL: zx=5.3045503e-05 zy=-0.99999982 zz=0.00060335178

CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 CENTRE GLOBAL: (0.60838105,1.3044126,8.092383)

CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 ROT_MATRIX GLOBAL: xx=0.90552985 xy=0.0002084303 xz=0.4242825

CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 ROT_MATRIX GLOBAL: yx=-0.42428255 yy=0.00056868738 yz=0.90552968

CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 ROT_MATRIX GLOBAL: zx=-5.2544281e-05 zy=-0.99999982 zz=0.00060339674

CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 CENTRE GLOBAL: (1.4387316,3.0765975,8.0935639)

CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 ROT_MATRIX GLOBAL: xx=0.90552985 xy=0.0002084303 xz=0.4242825

CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 ROT_MATRIX GLOBAL: yx=-0.42428255 yy=0.00056868738 yz=0.90552968

CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 ROT_MATRIX GLOBAL: zx=-5.2544281e-05 zy=-0.99999982 zz=0.00060339674

CMS/slm_p2_2/MEp2_1_04 CENTRE GLOBAL: (1.0194612,2.1817649,8.0929677)

CMS/slm_p2_2/MEp2_1_04 ROT_MATRIX GLOBAL: xx=0.90552985 xy=0.0002084303 xz=0.4242825

CMS/slm_p2_2/MEp2_1_04 ROT_MATRIX GLOBAL: yx=-0.42428255 yy=0.00056868738 yz=0.90552968

CMS/slm_p2_2/MEp2_1_04 ROT_MATRIX GLOBAL: zx=-5.2544281e-05 zy=-0.99999982 zz=0.00060339674

CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN CENTRE GLOBAL: (-1.4668801,-6.7515303,8.0418421)

CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN ROT_MATRIX GLOBAL: xx=0.96593641 xy=-7.0921334e-05 xz=0.25877952

CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN ROT_MATRIX GLOBAL: yx=-0.25877953 yy=-0.00031971374 yz=0.96593636

CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN ROT_MATRIX GLOBAL: zx=1.4229874e-05 zy=-0.99999995 zz=-0.00032717614

CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN CENTRE GLOBAL: (-0.69413007,-3.8668957,8.0416766)

CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN ROT_MATRIX GLOBAL: xx=0.96593641 xy=-7.0930528e-05 xz=0.25877952

CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN ROT_MATRIX GLOBAL: yx=-0.25877953 yy=-0.00031971213 yz=0.96593636

CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN ROT_MATRIX GLOBAL: zx=1.4220575e-05 zy=-0.99999995 zz=-0.00032717695

CMS/slm_p2_2/MEp2_2_27/apin_inner_MEp2_2_27 CENTRE GLOBAL: (-0.61926286,-3.5571209,8.0892665)

CMS/slm_p2_2/MEp2_2_27/apin_inner_MEp2_2_27 ROT_MATRIX GLOBAL: xx=-0.98481485 xy=-7.0924673e-05 xz=-0.17360788

CMS/slm_p2_2/MEp2_2_27/apin_inner_MEp2_2_27 ROT_MATRIX GLOBAL: yx=0.1736079 yy=-0.00031971316 yz=-0.9848148

CMS/slm_p2_2/MEp2_2_27/apin_inner_MEp2_2_27 ROT_MATRIX GLOBAL: zx=1.4342944e-05 zy=-0.99999995 zz=0.00032717135

CMS/slm_p2_2/MEp2_2_27/apin_outer_MEp2_2_27 CENTRE GLOBAL: (-1.1906199,-6.7982232,8.0903432)

CMS/slm_p2_2/MEp2_2_27/apin_outer_MEp2_2_27 ROT_MATRIX GLOBAL: xx=-0.98481485 xy=-7.0924673e-05 xz=-0.17360788

CMS/slm_p2_2/MEp2_2_27/apin_outer_MEp2_2_27 ROT_MATRIX GLOBAL: yx=0.1736079 yy=-0.00031971316 yz=-0.9848148

CMS/slm_p2_2/MEp2_2_27/apin_outer_MEp2_2_27 ROT_MATRIX GLOBAL: zx=1.4342944e-05 zy=-0.99999995 zz=0.00032717135

CMS/slm_p2_2/MEp2_2_27 CENTRE GLOBAL: (-0.90326574,-5.1681666,8.0898017)

CMS/slm_p2_2/MEp2_2_27 ROT_MATRIX GLOBAL: xx=-0.98481485 xy=-7.0924673e-05 xz=-0.17360788

CMS/slm_p2_2/MEp2_2_27 ROT_MATRIX GLOBAL: yx=0.1736079 yy=-0.00031971316 yz=-0.9848148

CMS/slm_p2_2/MEp2_2_27 ROT_MATRIX GLOBAL: zx=1.4342944e-05 zy=-0.99999995 zz=0.00032717135

CMS/slm_p2_2 CENTRE GLOBAL: (0.2897777,-0.0776457,7.998)

CMS/slm_p2_2 ROT_MATRIX GLOBAL: xx=-0.25881905 xy=5.9143945e-17 xz=0.96592583

CMS/slm_p2_2 ROT_MATRIX GLOBAL: yx=-0.96592583 yy=-1.5847572e-17 yz=-0.25881905

CMS/slm_p2_2 ROT_MATRIX GLOBAL: zx=0 zy=-1 zz=6.1230318e-17

CMS CENTRE GLOBAL: (0,0,0)

CMS ROT_MATRIX GLOBAL: xx=1 xy=0 xz=0

CMS ROT_MATRIX GLOBAL: yx=0 yy=1 yz=0

CMS ROT_MATRIX GLOBAL: zx=0 zy=0 zz=1

............ program ended OK

First of all I would need the same optical objects in SLM and CMS coordinates.

I don't need the ROT_MATRIX part.

...and many other format problems.

The ReadFile.C file output does not have the same order for the opto objects as the

report.out file !

In the report.out file opto objects with slm coord have the same order as the cms coord.

We need the same order for optical objects with cms coordinates and slm

coordinates in the ReadFile.C output!

Sent e-mail to Pedro to get the CMS output from ReadFile.C and the correct

format:

center_x err_x center_y err_y ......(12 variables: for center, angle and error)

Another problem is that CMS center coordinates are in [m] and we need [mm]!!!

I run Marcus' cocoa version (set eval in his CMSSW environment) to get

the CMS coord output (with my cocoa version I cannot get it!). In his version

the file settings are not modified yet to get a different

dimension...so I get the default [m] and not [mm]

For now I will just correct [m] to [mm] in cms_fitc.dat. I also put OPTO

objects in order and use the same format as in slm_itc.dat

This is the cms_fitc.dat file:

CMS/slm_p2_2 289.7777 0. -77.6457 0. 7998. 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_1_04 1019.4612 0. 2181.7649 0. 8092.9677 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT 654.27161 0. 1376.1279 0. 8045.7633 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT 1195.8826 0. 3194.913 0. 8053.0506 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 608.38105 1304.4126 8092.383

CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 1438.7316 0. 3076.5975 0. 8093.5639 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_1_14 -207.15647 0. -2399.4213 0. 8084.504 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN -561.03273 0. -3365.0068 0. 8041.7368 0. 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN -120.51256 0. -1519.1202 0. 8040.1054 0. 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 -124.44332 0. -1434.0753 0. 8084.2522 0. 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 -291.51759 0. -3384.0007 0. 8084.7608 0. 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_2_27 -903.26574 0. -5168.1666 0. 8089.8017 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN -1466.8801 0. -6751.5303 0. 8041.8421 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN -694.13007 0. -3866.8957 0. 8041.6766 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_2_27/apin_inner_MEp2_2_27 -619.26286 0. -3557.1209 0. 8089.2665 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_2_27/apin_outer_MEp2_2_27 -1190.6199 0. -6798.2232 0. 8090.3432 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_tp5 -1589.1979 0. -7003.1447 0. 8041.25 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_tp5/DCOPS_MEp2_reference_5_IN -1589.2403 0. -7003.1333 0. 8040.7196 0. 0. 0. 0. 0. 0. 0.

CMS/slm_p2_2/MEp2_tp5/laser_MEp2_5 -1563.2173 0. -7010.0985 0. 8001.0396 0. 0. 0. 0. 0. 0. 0.

In the slm_cms_readoutcocoa_all.C

modify cms_fit.dat to cms_fitc.dat (these are different files)

cmsInput.open(Form("%scms_fitc.dat",dir.Data()));

I can only partially read out the lines from slm_fitc.dat (9 lines) and

cms_fitc.dat (2 lines) ....need to debug.

May 14 -17

++++++++++

At this point these are the steps that you need to do to get the graphical output:

1. root -b -p -q .x readFile.C++\(\"report.out\"\)

Note that readFile.C is using the script:GetWordsInLine.C

You will get an output like this:

Processing readFile.C++("report.out")...

Info in : creating shared library /uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/Gyongyi/./readFile_C.so

In file included from /usr/include/c++/3.2.3/backward/strstream:51,

from /uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/Gyongyi/GetWordsInLine.C:2,

from /uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/Gyongyi/readFile.C:22,

from /uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/Gyongyi/fileCtOVvY.h:32,

from /uscms/home/gbaksay/work/cocoa/CMSSW_1_2_0/Gyongyi/fileCtOVvY.cxx:16:

/usr/include/c++/3.2.3/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated.

val of object 7 = -26.8951

val of object 8 = 40.212

val of object -1 = 1.20128e-13

val of object 9 = -4.42278e-05

val of object 10 = -0.000198563

val of object 11 = -0.000154173

val of object 6 = 90.0241

val of object 20 = 0.0439514

val of object 21 = 0.53038

val of object 22 = 9.94048e-14

........etc

CMS/slm_p2_2 289.778 0 -77.6457 0 7998 0 -90 0 0 0 75 0 289.778 0 -77.6457 0 7998 0 -90 0 0 0 75 0 289.778 0 -77.6457 0 7998 0 -90 0 0 0 75 0

CMS/slm_p2_2/MEp2_1_04 -2371.28 0.1 -95.0118 2.01229 120.043 0.785738 0.0178775 0.00560976 -79.8948 0.00481832 0.01727 0.0056066 -2371.28 0.1 -94.9678 2.01318 120.042 0.78576 0.0176801 0.00561058 -79.8947 0.00481834 0.0171586 0.00560716 -2371.28 0.1 -94.9677 2.01316 120.042 0.785759 0.0176799 0.00561058 -79.8947 0.00481834 0.0171584 0.00560716

CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT 11.13 0.131699 46.6666 0.437128 -884.498 0.0998773 0 0.000114592 10 0.000114592 -1.00157e-06 0.000114591 11.1301 0.131704 46.67 0.437073 -884.5 0.0998745 0 0.000114592 10 0.000114592 -9.85069e-07 0.000114591 11.1301 0.131704 46.67 0.437073 -884.5 0.0998745 0 0.000114592 10 0.000114592 -9.8507e-07 0.000114591

............etc

2) create the .dat files: slm_fitc.dat & cms_fitc.dat

slm_fitc.dat has all the slm coordinates and errors from the previous output.

I deleted:

-all lines "val of object 3 = #"

-the first iteration coordinates and errors next to the optical object names.

-directory names and left only the optical object name

This is the format for slm_fitc.dat

-----------------------------------

slm_p2_2 289.778 0. -77.6457 0. 7998. 0. 270. 0. 0. 0. 255. 0.

MEp2_1_04 -2371.28 0.1 -94.9677 2.01316 120.042 0.785759 0.0176799 0.00561058 -79.8947 0.00481834 0.0171584 0.00560716

DCOPS_inner_MEp2_1_04_OUT 11.1301 0.131704 46.67 0.437073 -884.5 0.0998745 0. 0.000114592 170. 0.000114592 -9.8507e-07 0.000114591

DCOPS_outer_MEp2_1_04_OUT -270.104 0.131704 40.53 0.437075 992.264 0.0998745 0. 0.000114592 -10. 0.000114592 -7.43232e-07 0.000114592

apin_inner_MEp2_1_04 -9.02573e-14 0. -7.63021e-13 0. -968.883 0. 0. 0. 0. 0. 0. 0.

apin_outer_MEp2_1_04 1.18048e-13 0. -4.36715e-13 0. 988.187 0. 0. 0. 0. 0. 0. 0.

MEp2_1_14 2371.28 0.1 -86.504 1.05015 120.918 0.415569 0.00723293 0.00561041 79.8973 0.00474373 -0.00777549 0.0056072

DCOPS_inner_MEp2_1_14_IN -11.1777 0.130743 44.1685 0.437112 -884.496 0.0998657 0. 0.000114592 10. 0.000114592 -1.67688e-06 0.000114591

DCOPS_outer_MEp2_1_14_IN 270.152 0.130743 43.0315 0.437111 992.26 0.0998657 0. 0.000114592 190. 0.000114592 6.7425e-07 0.000114591

apin_inner_MEp2_1_14 2.70886e-14 0. 6.70815e-13 0. -968.883 0. 0. 0. 0. 0. 0. 0.

apin_outer_MEp2_1_14 -2.58028e-14 0. 3.39172e-13 0. 988.187 0. 0 0 0 0 0 0

MEp2_2_27 5225.85 0.1 -91.8017 0.544447 165.132 0.217491 0.00935686 0.00555816 84.9977 0.00453316 -0.00942458 0.00555697

DCOPS_inner_MEp2_2_27_IN 19.9503 0.137646 47.6942 0.483421 -1317.83 0.0999841 0 0.000114592 185 0.000114592 -3.40616e-07 0.000114591

DCOPS_outer_MEp2_2_27_IN 280.171 0.137646 48.5058 0.483421 1657.15 0.0999841 0 0.000114592 185 0.000114592 1.9423e-07 0.000114591

apin_inner_MEp2_2_27 3.01288e-14 0 -8.0199e-13 0 -1635.89 0 0 0 0 0 0 0

apin_outer_MEp2_2_27 9.30584e-14 0 7.73346e-13 0 1655.19 0 0 0 0 0 0 0

MEp2_tp5 7175.83 0.1 -43.25 0.1 -22.5 0.1 -0.00203922 0.0290119 89.9903 0.00727186 0.0020212 0.029012

DCOPS_MEp2_reference_5_IN 0.0439522 0.0199057 0.530397 0.0199057 1.3056e-07 0.02 0 0.000572958 0 0.000572958 -6.1906e-05 0.000572945

laser_MEp2_5 -26.8951 0.0486865 40.2105 0.048703 3.90818e-13 0 -4.33113e-05 0.00570165 -0.000198316 0.00567244 0.000848525 0.00568824

3) Since readFile.C does not create an output for CMS coordinates, I created

the cms_fit.dat with cms coordinates myself (later this should be created

by readFile.C)

This is the format for cms_fitc.dat:

___________________________________

slm_p2_2 289.7777 0. -77.6457 0. 7998. 0. 0. 0. 0. 0. 0. 0.

MEp2_1_04 1019.4612 0. 2181.7649 0. 8092.9677 0. 0. 0. 0. 0. 0. 0.

DCOPS_inner_MEp2_1_04_OUT 654.27161 0. 1376.1279 0. 8045.7633 0. 0. 0. 0. 0. 0. 0.

DCOPS_outer_MEp2_1_04_OUT 1195.8826 0. 3194.913 0. 8053.0506 0. 0. 0. 0. 0. 0. 0.

apin_inner_MEp2_1_04 608.38105 0. 1304.4126 0. 8092.383 0. 0. 0. 0. 0. 0. 0.

apin_outer_MEp2_1_04 1438.7316 0. 3076.5975 0. 8093.5639 0. 0. 0. 0. 0. 0. 0.

MEp2_1_14 -207.15647 0. -2399.4213 0. 8084.504 0. 0. 0. 0. 0. 0. 0.

DCOPS_outer_MEp2_1_14_IN -561.03273 0. -3365.0068 0. 8041.7368 0. 0. 0. 0. 0. 0. 0.

DCOPS_inner_MEp2_1_14_IN -120.51256 0. -1519.1202 0. 8040.1054 0. 0. 0. 0. 0. 0. 0.

apin_inner_MEp2_1_14 -124.44332 0. -1434.0753 0. 8084.2522 0. 0. 0. 0. 0. 0. 0.

apin_outer_MEp2_1_14 -291.51759 0. -3384.0007 0. 8084.7608 0. 0. 0. 0. 0. 0. 0.

MEp2_2_27 -903.26574 0. -5168.1666 0. 8089.8017 0. 0. 0. 0. 0. 0. 0.

DCOPS_outer_MEp2_2_27_IN -1466.8801 0. -6751.5303 0. 8041.8421 0. 0. 0. 0. 0. 0. 0.

DCOPS_inner_MEp2_2_27_IN -694.13007 0. -3866.8957 0. 8041.6766 0. 0. 0. 0. 0. 0. 0.

apin_inner_MEp2_2_27 -619.26286 0. -3557.1209 0. 8089.2665 0. 0. 0. 0. 0. 0. 0.

apin_outer_MEp2_2_27 -1190.6199 0. -6798.2232 0. 8090.3432 0. 0. 0. 0. 0. 0. 0.

MEp2_tp5 -1589.1979 0. -7003.1447 0. 8041.25 0. 0. 0. 0. 0. 0. 0.

DCOPS_MEp2_reference_5_IN -1589.2403 0. -7003.1333 0. 8040.7196 0. 0. 0. 0. 0. 0. 0.

laser_MEp2_5 -1563.2173 0. -7010.0985 0. 8001.0396 0. 0. 0. 0. 0. 0. 0.

Note: optical objects are placed in the same order as in slm_fitc.dat

readFile.C will have to be able to create the same format!

4) run the script slm_cms_readcocoaout.C

This script reads out all the values from the two .dat files.

The way I analysed data is here:

--------------------------------

void slm_cms_readcocoaout()

{

gROOT->Reset();

TString dir = gSystem->UnixPathName(TCint::GetCurrentMacroName());

dir.ReplaceAll("slm_cms_readcocoaout.C","");

dir.ReplaceAll("/./","/");

//SLM coordinates:

//center position [mm]

Float_t *slmx_c = new Float_t[''];

Float_t*slmy_c = new Float_t[''];

Float_t*slmz_c = new Float_t[''];

//cent position uncertainty [mm]

Float_t*slmx_ce = new Float_t[''];

Float_t*slmy_ce = new Float_t[''];

Float_t*slmz_ce = new Float_t[''];

//angle [mrad]

Float_t*slmx_a = new Float_t[''];

Float_t*slmy_a = new Float_t[''];

Float_t*slmz_a = new Float_t[''];

//angle uncertainty [mrad]

Float_t*slmx_ae = new Float_t[''];

Float_t*slmy_ae = new Float_t[''];

Float_t*slmz_ae = new Float_t[''];

Float_t slmX_c, slmY_c, slmZ_c;

Float_t slmX_ce, slmY_ce, slmZ_ce;

Float_t slmX_a, slmY_a, slmZ_a;

Float_t slmX_ae, slmY_ae, slmZ_ae;

Int_t slmNData = 0;

Char_t *slmw=new Char_t[''];

Char_t slmW[''];

ifstream slmInput;

//CMS coordinates:

//center position [mm]

Float_t *cmsx_c = new Float_t[''];

Float_t*cmsy_c = new Float_t[''];

Float_t*cmsz_c = new Float_t[''];

//cent position uncertainty [mm]

Float_t*cmsx_ce = new Float_t[''];

Float_t*cmsy_ce = new Float_t[''];

Float_t*cmsz_ce = new Float_t[''];

//angle [mrad]

Float_t*cmsx_a = new Float_t[''];

Float_t*cmsy_a = new Float_t[''];

Float_t*cmsz_a = new Float_t[''];

//angle uncertainty [mrad]

Float_t*cmsx_ae = new Float_t[''];

Float_t*cmsy_ae = new Float_t[''];

Float_t*cmsz_ae = new Float_t[''];

Float_t cmsX_c, cmsY_c, cmsZ_c;

Float_t cmsX_ce, cmsY_ce, cmsZ_ce;

Float_t cmsX_a, cmsY_a, cmsZ_a;

Float_t cmsX_ae, cmsY_ae, cmsZ_ae;

Int_t cmsNData = 0;

Char_t *cmsw=new Char_t[''];

Char_t cmsW[''];

ifstream cmsInput;

//here you open the .dat files

slmInput.open(Form("%sslm_fitc.dat",dir.Data()));

cmsInput.open(Form("%scms_fitc.dat",dir.Data()));

// while(1) creates an infinite loop

while (1) {

slmInput >> slmW >> slmX_c >> slmX_ce >> slmY_c >> slmY_ce >> slmZ_c >> slmZ_ce >> slmX_a >> slmX_ae >> slmY_a >>slmY_ae >> slmZ_a >> slmZ_ae;

if (!slmInput.good()) break;

slmw[slmNData] = slmW;

slmx_c[slmNData] = slmX_c;

slmx_ce[slmNData] = slmX_ce;

slmy_c[slmNData] = slmY_c;

slmy_ce[slmNData] = slmY_ce;

slmz_c[slmNData] = slmZ_c;

slmz_ce[slmNData] = slmZ_ce;

slmx_a[slmNData] = slmX_a;

slmx_ae[slmNData] = slmX_ae;

slmy_a[slmNData] = slmY_a;

slmy_ae[slmNData] = slmY_ae;

slmz_a[slmNData] = slmZ_a;

slmz_ae[slmNData] = slmZ_ae;

cout > cmsX_ce >> cmsY_c >> cmsY_ce >> cmsZ_c >> cmsZ_ce >> cmsX_a >> cmsX_ae >> cmsY_a >>cmsY_ae >> cmsZ_a >> cmsZ_ae;

if (!cmsInput.good()) break;

cmsw[cmsNData] = cmsW;

cmsx_c[cmsNData] = cmsX_c;

cmsx_ce[cmsNData] = cmsX_ce;

cmsy_c[cmsNData] = cmsY_c;

cmsy_ce[cmsNData] = cmsY_ce;

cmsz_c[cmsNData] = cmsZ_c;

cmsz_ce[cmsNData] = cmsZ_ce;

cmsx_a[cmsNData] = cmsX_a;

cmsx_ae[cmsNData] = cmsX_ae;

cmsy_a[cmsNData] = cmsY_a;

cmsy_ae[cmsNData] = cmsY_ae;

cmsz_a[cmsNData] = cmsZ_a;

cmsz_ae[cmsNData] = cmsZ_ae;

cout SetGrid();

c1->GetFrame()->SetBorderSize(12);

c1->SetBorderMode(0);

//Axis settings

hpx->GetXaxis()->SetTitle("X_{SLM} [mm]");

hpx->GetYaxis()->SetTitle("Z_{CMS} [mm]");

hpx->GetXaxis()->CenterTitle();

hpx->GetXaxis()->SetNdivisions(50310);

hpx->GetYaxis()->CenterTitle();

hpx->GetXaxis()->SetTitleOffset(1.03);

hpx->GetYaxis()->SetTitleOffset(1.3);

hpx->GetYaxis()->SetNdivisions(50312);

//Graph CSC center coordinates and errors (get values from the dat file)

//MEp2_1_04 (line 1)

Float_t slmx_c1[1]={slmx_c[1]};

Float_t cmsz_c1[1]={cmsz_c[1]};

Float_t slmx_ce1[1]={slmx_ce[1]};

Float_t slmy_ce1[1]={slmy_ce[1]};

//MEp2_1_14 (line 6)

Float_t slmx_c6[1]={slmx_c[6]};

Float_t cmsz_c6[1]={cmsz_c[6]};

Float_t slmx_ce6[1]={slmx_ce[6]};

Float_t slmy_ce6[1]={slmy_ce[6]};

//MEp2_2_27 (line 11)

Float_t slmx_c11[1]={slmx_c[11]};

Float_t cmsz_c11[1]={cmsz_c[11]};

Float_t slmx_ce11[1]={slmx_ce[11]};

Float_t slmy_ce11[1]={slmy_ce[11]};

//Graph CSC center coordinates

TGraphErrors *gr1 = new TGraphErrors(1,slmx_c1,cmsz_c1,slmx_ce1,slmy_ce1);

TGraphErrors *gr6 = new TGraphErrors(6,slmx_c6,cmsz_c6,slmx_ce6,slmy_ce6);

TGraphErrors *gr11 = new TGraphErrors(11,slmx_c11,cmsz_c11,slmx_ce11,slmy_ce11);

gStyle->SetEndErrorSize(0.01);

//Set marker to plot CSC centers

gr1->SetMarkerStyle(7); // dot

gr1->SetMarkerSize(0.9);

gr1->SetMarkerColor(3); //light green

gr1->Draw("P");

gr6->SetMarkerStyle(7); // dot

gr6->SetMarkerSize(0.9);

gr6->SetMarkerColor(3); //light green

gr6->Draw("P");

gr11->SetMarkerStyle(7); // dot

gr11->SetMarkerSize(0.9);

gr11->SetMarkerColor(3); //light green

gr11->Draw("P");

//Define apin coordinates and errors

//This is the apin approx. slmx_c coordinate

//apin_outer_MEp2_1_04 (line 5)

Float_t x_slm_apin5[1] ={-3371.};

//apin_inner_MEp2_1_04 (line 4)

Float_t x_slm_apin4[1] ={-1371.};

//apin_inner_MEp2_1_14 (line 9)

Float_t x_slm_apin9[1] ={1371.};

//apin_outer_MEp2_1_14 (line 10)

Float_t x_slm_apin10[1] ={3371.};

//apin_inner_MEp2_2_27 (line 14)

Float_t x_slm_apin14[1] ={3600.};

//apin_outer_MEp2_2_27 (line 15)

Float_t x_slm_apin15[1] ={6800.};

//This is the apin cmsz_c coordinate

Float_t z_cms_apin5[1] ={cmsz_c[5]};

Float_t z_cms_apin4[1] ={cmsz_c[4]};

Float_t z_cms_apin9[1] ={cmsz_c[9]};

Float_t z_cms_apin10[1] ={cmsz_c[10]};

Float_t z_cms_apin14[1] ={cmsz_c[14]};

Float_t z_cms_apin15[1] ={cmsz_c[15]};

//Errors are not known, but I will set the error for the Z_cms coord equal

//to the CSC Z_cms error (that is equal to the CSC Y_slm coord err)

Float_t ex_slm_apin5[1] ={0.};

Float_t ex_slm_apin4[1] ={0.};

Float_t ex_slm_apin9[1] ={0.};

Float_t ex_slm_apin10[1] ={0.};

Float_t ex_slm_apin14[1] ={0.};

Float_t ex_slm_apin15[1] ={0.};

Float_t ez_cms_apin5[1]={slmy_ce[1]};

Float_t ez_cms_apin4[1]={slmy_ce[1]};

Float_t ez_cms_apin9[1]={slmy_ce[6]};

Float_t ez_cms_apin10[1]={slmy_ce[6]};

Float_t ez_cms_apin14[1]={slmy_ce[11]};

Float_t ez_cms_apin15[1]={slmy_ce[11]};

//Graph apin coordinates and errors

TGraphErrors *gr_apin5 =new TGraphErrors(1,x_slm_apin5,z_cms_apin5,ex_slm_apin5,ez_cms_apin5);

TGraphErrors *gr_apin4 =new TGraphErrors(1,x_slm_apin4,z_cms_apin4,ex_slm_apin4,ez_cms_apin4);

TGraphErrors *gr_apin9 =new TGraphErrors(1,x_slm_apin9,z_cms_apin9,ex_slm_apin9,ez_cms_apin9);

TGraphErrors *gr_apin10 =new TGraphErrors(1,x_slm_apin10,z_cms_apin10,ex_slm_apin10,ez_cms_apin10);

TGraphErrors *gr_apin14 =new TGraphErrors(1,x_slm_apin14,z_cms_apin14,ex_slm_apin14,ez_cms_apin14);

TGraphErrors *gr_apin15 =new TGraphErrors(1,x_slm_apin15,z_cms_apin15,ex_slm_apin15,ez_cms_apin15);

//Set marker to plot apin positions

gr_apin5->SetMarkerStyle(22);//triangle

gr_apin5->SetMarkerSize(0.8);

gr_apin5->SetMarkerColor(4); //blue

gr_apin5->Draw("P");

gr_apin4->SetMarkerStyle(22);//triangle

gr_apin4->SetMarkerSize(0.8);

gr_apin4->SetMarkerColor(4); //blue

gr_apin4->Draw("P");

gr_apin9->SetMarkerStyle(22);//triangle

gr_apin9->SetMarkerSize(0.8);

gr_apin9->SetMarkerColor(4); //blue

gr_apin9->Draw("P");

gr_apin10->SetMarkerStyle(22);//triangle

gr_apin10->SetMarkerSize(0.8);

gr_apin10->SetMarkerColor(4); //blue

gr_apin10->Draw("P");

gr_apin14->SetMarkerStyle(22);//triangle

gr_apin14->SetMarkerSize(0.8);

gr_apin14->SetMarkerColor(4); //blue

gr_apin14->Draw("P");

gr_apin15->SetMarkerStyle(22);//triangle

gr_apin15->SetMarkerSize(0.8);

gr_apin15->SetMarkerColor(4); //blue

gr_apin15->Draw("P");

// Connect the alignment pins with a line

//Take the first two apin points (x1,y1,x2,y2)

TLine *l1 = new TLine(-3371.,cmsz_c[5],-1371.,cmsz_c[4]);

l1->SetLineColor(808);//orange

l1->SetLineWidth(1.);

l1->Draw();

//Connect the next two apins

TLine *l2 = new TLine(1371.,cmsz_c[9],3371., cmsz_c[10]);

l2->SetLineColor(808);//orange

l2->SetLineWidth(1.);

l2->Draw();

//..and the next two

TLine *l3 =new TLine(3600.,cmsz_c[14],6800.,cmsz_c[15]);

l3->SetLineColor(808);//orange

l3->SetLineWidth(1.);

l3->Draw();

//Define fitted DCOPS coordinates and errors

//DCOPS: 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out ref

//These are the dcops approx. slmx_c coordinates

//DCOPS_outer_MEp2_1_04_OUT (line 3)

Float_t x_slm_dcops3[1]={-3400.};

//DCOPS_inner_MEp2_1_04_OUT (line 2)

Float_t x_slm_dcops2[1]={-1500.};

//DCOPS_inner_MEp2_1_14_IN (line 7)

Float_t x_slm_dcops7[1]={1500.};

//DCOPS_outer_MEp2_1_14_IN (line 8)

Float_t x_slm_dcops8[1]={3400.};

//DCOPS_inner_MEp2_2_27_IN (line 12)

Float_t x_slm_dcops12[1]={3900.};

//DCOPS_outer_MEp2_2_27_IN (line 13)

Float_t x_slm_dcops13[1]={7000.};

//DCOPS_MEp2_reference_5_IN (line 17)

Float_t x_slm_dcops17[1]={7200.};

//These are the dcops cmsz_c coordinates

Float_t z_cms_dcops3[1]={cmsz_c[3]};

Float_t z_cms_dcops2[1]={cmsz_c[2]};

Float_t z_cms_dcops7[1]={cmsz_c[7]};

Float_t z_cms_dcops8[1]={cmsz_c[8]};

Float_t z_cms_dcops12[1]={cmsz_c[12]};

Float_t z_cms_dcops13[1]={cmsz_c[13]};

Float_t z_cms_dcops17[1]={cmsz_c[17]};

//These errors are not known (set them to zero)

Float_t ex_slm_dcops3[1]={0.};

Float_t ex_slm_dcops2[1]={0.};

Float_t ex_slm_dcops7[1]={0.};

Float_t ex_slm_dcops8[1]={0.};

Float_t ex_slm_dcops12[1]={0.};

Float_t ex_slm_dcops13[1]={0.};

Float_t ex_slm_dcops17[1]={0.};

//For now I will set the error for the DCOPS dowel Z_CMS pos. equal to the error for the DCOPS slmy position

Float_t ez_cms_dcops3[1] = {slmy_ce[3]};

Float_t ez_cms_dcops2[1] = {slmy_ce[2]};

Float_t ez_cms_dcops7[1] = {slmy_ce[7]};

Float_t ez_cms_dcops8[1] = {slmy_ce[8]};

Float_t ez_cms_dcops12[1] = {slmy_ce[12]};

Float_t ez_cms_dcops13[1] = {slmy_ce[13]};

Float_t ez_cms_dcops17[1] = {slmy_ce[17]};

//Graph fitted DCOPS ref dowel pin coordinates and errors

TGraphErrors *gr_dcops2 =new TGraphErrors(1,x_slm_dcops2,z_cms_dcops2,ex_slm_dcops2,ez_cms_dcops2);

TGraphErrors *gr_dcops3 =new TGraphErrors(1,x_slm_dcops3,z_cms_dcops3,ex_slm_dcops3,ez_cms_dcops3);

TGraphErrors *gr_dcops7 =new TGraphErrors(1,x_slm_dcops7,z_cms_dcops7,ex_slm_dcops7,ez_cms_dcops7);

TGraphErrors *gr_dcops8 =new TGraphErrors(1,x_slm_dcops8,z_cms_dcops8,ex_slm_dcops8,ez_cms_dcops8);

TGraphErrors *gr_dcops12 =new TGraphErrors(1,x_slm_dcops12,z_cms_dcops12,ex_slm_dcops12,ez_cms_dcops12);

TGraphErrors *gr_dcops13 =new TGraphErrors(1,x_slm_dcops13,z_cms_dcops13,ex_slm_dcops13,ez_cms_dcops13);

TGraphErrors *gr_dcops17 =new TGraphErrors(1,x_slm_dcops17,z_cms_dcops17,ex_slm_dcops17,ez_cms_dcops17);

//Set marker to plot ref dowel pin positions

gr_dcops2->SetMarkerStyle(4); //empty circle

gr_dcops2->SetMarkerSize(0.6);

gr_dcops2->SetMarkerColor(6);//pink

gr_dcops2->Draw("P");

gr_dcops3->SetMarkerStyle(4); //empty circle

gr_dcops3->SetMarkerSize(0.6);

gr_dcops3->SetMarkerColor(6);//pink

gr_dcops3->Draw("P");

gr_dcops7->SetMarkerStyle(4); //empty circle

gr_dcops7->SetMarkerSize(0.6);

gr_dcops7->SetMarkerColor(6);//pink

gr_dcops7->Draw("P");

gr_dcops8->SetMarkerStyle(4); //empty circle

gr_dcops8->SetMarkerSize(0.6);

gr_dcops8->SetMarkerColor(6);//pink

gr_dcops8->Draw("P");

gr_dcops12->SetMarkerStyle(4); //empty circle

gr_dcops12->SetMarkerSize(0.6);

gr_dcops12->SetMarkerColor(6);//pink

gr_dcops12->Draw("P");

gr_dcops13->SetMarkerStyle(4); //empty circle

gr_dcops13->SetMarkerSize(0.6);

gr_dcops13->SetMarkerColor(6);//pink

gr_dcops13->Draw("P");

gr_dcops17->SetMarkerStyle(4); //empty circle

gr_dcops17->SetMarkerSize(0.6);

gr_dcops17->SetMarkerColor(6);//pink

gr_dcops17->Draw("P");

//Define CCD2 pixel 1 coordinates and errors

//DCOPS: 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out ref

//These are the CCD2 pixel 1 approx. slmx_c coordinates

//DCOPS_outer_MEp2_1_04_OUT (line 3)

Float_t x_slm_CCD2pixel1_3[1]={-3400.};

//DCOPS_inner_MEp2_1_04_OUT (line 2)

Float_t x_slm_CCD2pixel1_2[1]={-1500.};

//DCOPS_inner_MEp2_1_14_IN (line 7)

Float_t x_slm_CCD2pixel1_7[1]={1500.};

//DCOPS_outer_MEp2_1_14_IN (line 8)

Float_t x_slm_CCD2pixel1_8[1]={3400.};

//DCOPS_inner_MEp2_2_27_IN (line 12)

Float_t x_slm_CCD2pixel1_12[1]={3900.};

//DCOPS_outer_MEp2_2_27_IN (line 13)

Float_t x_slm_CCD2pixel1_13[1]={7000.};

//DCOPS_MEp2_reference_5_IN (line 17)

Float_t x_slm_CCD2pixel1_17[1]={7200.};

//These are the dcops cmsz_c coordinates (fitted value-57.579 [mm])

Float_t D=57.579; //distance from the DCOPS ref dowel pin to the first CCD pixel

Float_t z_cms_CCD2pixel1_3[1]={cmsz_c[3]-D};

Float_t z_cms_CCD2pixel1_2[1]={cmsz_c[2]-D};

Float_t z_cms_CCD2pixel1_7[1]={cmsz_c[7]-D};

Float_t z_cms_CCD2pixel1_8[1]={cmsz_c[8]-D};

Float_t z_cms_CCD2pixel1_12[1]={cmsz_c[12]-D};

Float_t z_cms_CCD2pixel1_13[1]={cmsz_c[13]-D};

Float_t z_cms_CCD2pixel1_17[1]={cmsz_c[17]-D};

//Errors are not known

Float_t ex_slm_CCD2pixel1_3[1] ={0.};

Float_t ex_slm_CCD2pixel1_2[1] ={0.};

Float_t ex_slm_CCD2pixel1_7[1] ={0.};

Float_t ex_slm_CCD2pixel1_8[1] ={0.};

Float_t ex_slm_CCD2pixel1_12[1] ={0.};

Float_t ex_slm_CCD2pixel1_13[1] ={0.};

Float_t ex_slm_CCD2pixel1_17[1] ={0.};

//For now I will set the error for the DCOPS dowel Z_CMS pos. equal to the error for the DCOPS slmy position

Float_t ez_cms_CCD2pixel1_3[1] = {slmy_ce[3]};

Float_t ez_cms_CCD2pixel1_2[1] = {slmy_ce[2]};

Float_t ez_cms_CCD2pixel1_7[1] = {slmy_ce[7]};

Float_t ez_cms_CCD2pixel1_8[1] = {slmy_ce[8]};

Float_t ez_cms_CCD2pixel1_12[1] = {slmy_ce[12]};

Float_t ez_cms_CCD2pixel1_13[1] = {slmy_ce[13]};

Float_t ez_cms_CCD2pixel1_17[1] = {slmy_ce[17]};

//Graph CCD2 pixel 1 coordinates and errors

TGraphErrors *gr_CCD2pixel1_3 =new TGraphErrors(1,x_slm_CCD2pixel1_3,z_cms_CCD2pixel1_3,ex_slm_CCD2pixel1_3,ez_cms_CCD2pixel1_3);

TGraphErrors *gr_CCD2pixel1_2 =new TGraphErrors(1,x_slm_CCD2pixel1_2,z_cms_CCD2pixel1_2,ex_slm_CCD2pixel1_2,ez_cms_CCD2pixel1_2);

TGraphErrors *gr_CCD2pixel1_7 =new TGraphErrors(1,x_slm_CCD2pixel1_7,z_cms_CCD2pixel1_7,ex_slm_CCD2pixel1_7,ez_cms_CCD2pixel1_7);

TGraphErrors *gr_CCD2pixel1_8 =new TGraphErrors(1,x_slm_CCD2pixel1_8,z_cms_CCD2pixel1_8,ex_slm_CCD2pixel1_8,ez_cms_CCD2pixel1_8);

TGraphErrors *gr_CCD2pixel1_12 =new TGraphErrors(1,x_slm_CCD2pixel1_12,z_cms_CCD2pixel1_12,ex_slm_CCD2pixel1_2,ez_cms_CCD2pixel1_12);

TGraphErrors *gr_CCD2pixel1_13 =new TGraphErrors(1,x_slm_CCD2pixel1_13,z_cms_CCD2pixel1_13,ex_slm_CCD2pixel1_7,ez_cms_CCD2pixel1_13);

TGraphErrors *gr_CCD2pixel1_17 =new TGraphErrors(1,x_slm_CCD2pixel1_17,z_cms_CCD2pixel1_17,ex_slm_CCD2pixel1_8,ez_cms_CCD2pixel1_17);

//Set marker to plot CCD2 pixel1 positions

gr_CCD2pixel1_3->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_3->SetMarkerSize(0.6);

gr_CCD2pixel1_3->SetMarkerColor(12);//gray

gr_CCD2pixel1_3->Draw("P");

gr_CCD2pixel1_2->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_2->SetMarkerSize(0.6);

gr_CCD2pixel1_2->SetMarkerColor(12);//gray

gr_CCD2pixel1_2->Draw("P");

gr_CCD2pixel1_7->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_7->SetMarkerSize(0.6);

gr_CCD2pixel1_7->SetMarkerColor(12);//gray

gr_CCD2pixel1_7->Draw("P");

gr_CCD2pixel1_8->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_8->SetMarkerSize(0.6);

gr_CCD2pixel1_8->SetMarkerColor(12);//gray

gr_CCD2pixel1_8->Draw("P");

gr_CCD2pixel1_12->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_12->SetMarkerSize(0.6);

gr_CCD2pixel1_12->SetMarkerColor(12);//gray

gr_CCD2pixel1_12->Draw("P");

gr_CCD2pixel1_13->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_13->SetMarkerSize(0.6);

gr_CCD2pixel1_13->SetMarkerColor(12);//gray

gr_CCD2pixel1_13->Draw("P");

gr_CCD2pixel1_17->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_17->SetMarkerSize(0.6);

gr_CCD2pixel1_17->SetMarkerColor(12);//gray

gr_CCD2pixel1_17->Draw("P");

//Draw a 28.672 [mm] (lenght of CCD) line from the CCD2 pixel 1.

//Add 28.672 [mm] to z_cms_CCD2pixel1_#

Float_t L=28.672;

TLine *lccd1=new TLine(-3400.,cmsz_c[3]-D+L, -3400.,cmsz_c[3]-D);

lccd1->SetLineColor(808);

lccd1->SetLineWidth(3.);

lccd1->Draw();

TLine *lccd2=new TLine(-1500.,cmsz_c[2]-D+L, -1500.,cmsz_c[2]-D);

lccd2->SetLineColor(808);

lccd2->SetLineWidth(3.);

lccd2->Draw();

TLine *lccd3=new TLine(1500.,cmsz_c[7]-D+L, 1500.,cmsz_c[7]-D);

lccd3->SetLineColor(808);

lccd3->SetLineWidth(3.);

lccd3->Draw();

TLine *lccd4=new TLine(3400.,cmsz_c[8]-D+L, 3400.,cmsz_c[8]-D);

lccd4->SetLineColor(808);

lccd4->SetLineWidth(3.);

lccd4->Draw();

TLine *lccd5=new TLine(3900.,cmsz_c[12]-D+L, 3900.,cmsz_c[12]-D);

lccd5->SetLineColor(808);

lccd5->SetLineWidth(3.);

lccd5->Draw();

TLine *lccd6=new TLine(7000.,cmsz_c[13]-D+L, 7000.,cmsz_c[13]-D);

lccd6->SetLineColor(808);

lccd6->SetLineWidth(3.);

lccd6->Draw();

TLine *lccd7=new TLine(7200.,cmsz_c[17]-D+L, 7200.,cmsz_c[17]-D);

lccd7->SetLineColor(808);

lccd7->SetLineWidth(3.);

lccd7->Draw();

//Define CCD2(R)_meas coordinates and errors

//DCOPS: 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out ref

//This is the CCD2_meas approx. slmx_c coordinate

//Move these coordinates to the left by 100 [mm] so we can distinguish the CCD2 and CCD4 measured values

//Float_t x_slm_CCD2_meas[7] ={-3400.,-1500.,1500.,3400.,3900.,7000.,7200.}; //[mm]

Float_t x_slm_CCD2_meas[7] ={-3500.,-1600.,1400.,3300.,3800.,6900.,7100.}; //[mm]

//This is the dcops_meas cmsz_c coordinate (CCD2 pixel 1 position+ measured distance to the first CCD2 pixel)

Float_t z_cms_CCD2_meas[7] ={8002.024,8001.875,8001.558,8001.291,8001.434,8001.205,8001.4916};//[mm]

//Measured distance to the first CCD2 pixel={6.552, 13.691,19.032,17.134,17.337,16.942,18.351}; //[mm]

//z_cms_CCD2pixel1={ 7995.472, 7988.184, 7982.526, 7984.157,7984.0976,7984.263,7983.1406}; //[mm]

//Errors in slm_x direction are not known

Float_t ex_slm_CCD2_meas[7] ={0.,0.,0.,0.,0.,0.,0.};

//the error for the DCOPS_meas dowel Z_CMS pos. are from the measurement file

Float_t ez_cms_CCD2_meas[7] = {0.01942,0.01834,0.01946,0.04043,0.01965,0.04233,0.03857}; //[mm]

//Graph DCOPS_meas ref dowel pin coordinates and errors

TGraphErrors *gr_CCD2_meas =new TGraphErrors(7,x_slm_CCD2_meas,z_cms_CCD2_meas,ex_slm_CCD2_meas,ez_cms_CCD2_meas);

//Set marker to plot meas ref dowel pin positions

gr_CCD2_meas->SetMarkerStyle(4); //empty circle

gr_CCD2_meas->SetMarkerSize(0.6);

gr_CCD2_meas->SetMarkerColor(4);//blue

gr_CCD2_meas->Draw("P");

//Define CCD4(L)_meas coordinates and errors

//DCOPS: 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out ref

//This is the CCD4_meas approx. slmx_c coordinate

//Move these coordinates to the right by 100 [mm] so we can distinguish the CCD2 and CCD4 measured values

//Float_t x_slm_CCD4_meas[7] ={-3400.,-1500.,1500.,3400.,3900.,7000.,7200.}; //[mm]

Float_t x_slm_CCD4_meas[7] ={-3300.,-1400.,1600.,3500.,4000.,7100.,7300.}; //[mm]

//This is the dcops_meas cmsz_c coordinate (CCD4 pixel 1 position+ measured distance to the first CCD2 pixel)

Float_t z_cms_CCD4_meas[7] ={8001.504,8001.504,8001.336,8001.299,8001.135,8000.891,8000.909};//[mm]

//Measured distance to the first CCD4 pixel={6.032,13.32,18.810,17.142, 17.038, 16.628,17.769}; //[mm]

//z_cms_CCD4pixel1={7995.472, 7988.184, 7982.526, 7984.157,7984.0976,7984.263,7983.1406}; //[mm]

//Errors in slm_x direction are not known

Float_t ex_slm_CCD4_meas[7] ={0.,0.,0.,0.,0.,0.,0.};

//the error for the DCOPS_meas dowel Z_CMS pos. are from the measurement file

Float_t ez_cms_CCD4_meas[7] = {0.06180,0.01658,0.037343,0.02587,0.02017,0.03037,0.04484}; //[mm]

//Graph DCOPS_meas ref dowel pin coordinates and errors

TGraphErrors *gr_CCD4_meas =new TGraphErrors(7,x_slm_CCD4_meas,z_cms_CCD4_meas,ex_slm_CCD4_meas,ez_cms_CCD4_meas);

//Set marker to plot meas ref dowel pin positions

gr_CCD4_meas->SetMarkerStyle(4); //empty circle

gr_CCD4_meas->SetMarkerSize(0.6);

gr_CCD4_meas->SetMarkerColor(1);//black

gr_CCD4_meas->Draw("P");

//This is laser 5 approx. slmx_c coordinate

//Marcus used the value: 7175.883 [mm]

//I will move this to 7600 so it does not overlap with the ref sensor measurement

Float_t x_slm_las5[1] ={7600.}; //[mm]

//This is laser 5 cmsz_c coordinate

Float_t z_cms_las5[1] ={cmsz_c[18]}; //[mm]

Float_t ex_slm_las5[1] ={0.};

Float_t ez_cms_las5[1] = {0.048};

//Graph laser position and error

TGraphErrors *gr_las5 =new TGraphErrors(1,x_slm_las5,z_cms_las5,ex_slm_las5,ez_cms_las5);

//Set marker to plot laser position

gr_las5->SetMarkerStyle(21);//square

gr_las5->SetMarkerSize(1.2);

gr_las5->SetMarkerColor(2); //red

gr_las5->Draw("P");

//Define PG coordinates and errors

//This is the apin approx. slmx_c coordinate (I just used the same coordinates from the

//fitted values

//Float_t x_slm_apin_PG[5] ={-1371.,1371.,3371.,3600.,6800.}; //[mm]

//This is the apin cmsz_c coordinate (these are the PG Z_cms coordinates)

//Note: 1_04_out is not measured (that's the reason why we have 5 values instead of 6)

//Float_t z_cms_apin_PG[5] ={8037.05,7971.81,8031.59,8082.00,8082.53}; //[mm]

//I will include errors only for the Z_cms coordinates (I remember 0.3 [mm]; this has to be verified)

//Float_t ex_slm_apin_PG[5] ={0.,0.,0.,0.,0.};

//Float_t ez_cms_apin_PG[5] = {0.3,0.3,0.3,0.3,0.3};

//Graph apin coordinates and errors

//TGraphErrors *gr_apin =new TGraphErrors(5,x_slm_apin_PG,z_cms_apin_PG,ex_slm_apin_PG,ez_cms_apin_PG);

//Set marker to plot apin positions(PG)

//gr_apin->SetMarkerStyle(23);//triangle

//gr_apin->SetMarkerSize(0.8);

//gr_apin->SetMarkerColor(7); //light blue

//gr_apin->Draw("P");

TLegend *leg = new TLegend(0.75,0.8,0.98,0.98);

leg->AddEntry(gr1,"CSC center (fitted)","P");

leg->AddEntry(gr_apin5,"alignment pin (fitted)","P");

leg->AddEntry(gr_dcops2,"DCOPS dowel (fitted)","P");

leg->AddEntry(gr_CCD2_meas,"CCD2/Right (measured)","P");

//leg->AddEntry(gr_CCD4_meas,"CCD4/Left (measured)","P");

leg->AddEntry(gr_CCD2pixel1_3,"CCD2/Right pixel 1","P");

leg->AddEntry(gr_las5,"laser 5","P");

leg->Draw();

TPaveText *pt=new TPaveText(9383.55,8065.89,13278.1,8083.12);

TText *t1=pt->AddText("FQ=6.66X10^{-5}");

TText *t2=pt->AddText("#chi^{2}=86.21");

t1->SetTextSize(0.03);

t1->SetTextFont(42);

t1->SetTextColor(1);

t2->SetTextSize(0.03);

t2->SetTextFont(42);

t2->SetTextColor(1);

pt->Draw();

//produce a .gif file; for other formats see page 134.

c1->Print("ME2_SLM25_LAS5.gif");

}

May 17, 21, 22

++++++++++++++

Want to plot laser line.

Set debug verbose mode to 5 in ME2_SLM25_las5.txt

I will try to interpret the output:

example:

-----------

@@@@ Start calculation of simulated value of COPS Measurement id14

OptOList size2

@@@@ LR:OBJECT CMS/slm_p2_2/MEp2_tp5/laser_MEp2_5

create laser lightray

LR: CREATE LIGHTRAY CMS/slm_p2_2/MEp2_tp5/laser_MEp2_5 OptO type is Xlaser

LightRay at creation

$$ LightRay point: (-1.5674645,-7.0089681,7.99675)

$$ LightRay direction: (-0.25881905,-0.96592583,3.7491518e-33)

----------

I assume light ray point is the point at the intersection of the x and y axes

of the laser.

This is the description of the DCOPS measurement with cocoa ():

Makes a Measurement (: / :M) :

Position dowel1 w.r.t. dowel2 with the parameter 'dowel1X' and 'dowel1Y' (it they don't exist, they will be set to 0.03 and 0. respectively.

Draw a line joining dowel1 and dowel2 and a line perpendicualr to this one and to the cops Z axis. These two line will define the reference frame (D12rf) so that all X and Y distances from CCD will be taken in that reference frame, as shown in the figure (look at upCCDtoDowel2X)

Define upCCD as a line starting at dowel2+('upCCDtoDowel2X', 'upCCDtoDowel2Y') (in D12rf) and going along line dowel1-dowel2.

The same as above for downCCD, using ('downCCDtoDowel2X', 'downCCDtoDowel2Y')

Similar as above for leftCCD, using ('leftCCDtoDowel2X', 'leftCCDtoDowel2Y') and the line is parallel to the normal of the line dowel1-dowel2

Same as above for rightCCD, using ('rightCCDtoDowel2X', 'rightCCDtoDowel2Y')

Then intersect the light ray with the cops plane

Get the Y axis of the X-hair laser and project it onto the cops surface

Get the X axis of the X-hair laser as the axis forming an angle of 90 with the laser Z axis and 'angleBetweenAxis' with the laser Y axis, and project it onto the cops surface

Get the four measurements as the intersection of the Y axis projection wiht the upCCD and downCCD and the X axis projection with leftCCD and rightCCD

Extra entries: dowel1X, dowel1Y, upCCDtoDowel2X, upCCDtoDowel2Y, downCCDtoDowel2X, downCCDtoDowel2Y, leftCCDtoDowel2X, leftCCDtoDowel2Y, rightCCDtoDowel2X, rightCCDtoDowel2Y

-------------------

This is what I understand from this description and the previous example output:

1)the light ray point is projected on the surface of the CCDs.

2) the laser x-axis is projected on the CCD2 and CCD4 surface.

Does that mean that the line that connects the "light ray point" (intersection

of x and y of laser) and the intersection of x axis with CCD2 is the distance

that we measure.

If that's the case COCOA has to calculate:

a) the distance from the first CCD pixel to the projecton of the light ray point on the CCD surface.

b) the distance from the first CCD pixel to the intersection of the laser x

axes with the CCD surface.

I think that b) is sufficient info for me to plot laser line crossing all

CCD2s.

part of output:

----------------

%%% Intersecting x-hair laser with COPS:

Created ALIplane: point(1.1903341,3.1963801,8.04625)

Created ALIPlane: normal(0.25881905,0.96592583,5.5663889e-33)

% LR INTERSECT WITH OPTO

Created ALIplane: point(1.1903341,3.1963801,8.04625)

Created ALIPlane: normal(0.25881905,0.96592583,5.5663889e-33)

% LR INTERSECT WITH PLANE

plane point(1.1903341,3.1963801,8.04625)

plane normal(0.25881905,0.96592583,5.5663889e-33)

n_r = point - point_plane(2.7577986,10.205348,0.04825)

lightray* plate normal-1

n_r*plate normal-10.57138

n_r scaled(2.7360745,10.211169,-0.00020647227)

INTERSECTION point (1.16861,3.2022011,7.9977935)

Intersection of x-hair laser with COPS (1.16861,3.2022011,7.9977935)

1. Get the OptO x-hair laser from the measurement list of OptOs

%%%% Projecting x-hair laser on COPS:

Y direction of laser (-5.0550595e-06,-1.8865739e-05,-1)

Y line of laser projected on COPS ALILine point (1.16861,3.2022011,7.9977935)

ALILine direc (5.9147275e-17,-1.5847523e-17,-1)

3. Get the X of the laser (correct it if cross is not 90o) and project it on the COPS

OpticalObject::findExtraEntryValue: angleBetweenAxis = 1.5707963

angleBetweenAxis = 1.5707963

X direction of laser (0.96592583,-0.25881905,-8.442838e-22)

X line of laser projected on COPS ALILine point (1.16861,3.2022011,7.9977935)

ALILine direc (0.96592583,-0.25881905,-8.442838e-22)

------------------

From here I need X line of laser projected on COPS (these must be global coordinates)

CCD2 is Right CCD.

Here is part of the output:

--------------------------

***** RIGHT CCD *****

*********************

OpticalObject::findExtraEntryValue: rightCCDXtoDowel2 = -0.008171

OpticalObject::findExtraEntryValue: rightCCDYtoDowel2 = 0.057579

right ccd in local RF (-0.008171,0.057579,0)

right ccd in global RF (-0.0078925799,0.0021148104,-0.057579)

------------

Right ccd in local RF must be the distance from the first CCD to the ref dowel

pin in SLM frame (global is CMS ref frame).

OK, now I would need to find the intersection of the X axes for all the DCOPS

for the last iteration.

Searched for "fit iteration"

After the last fit iteration (number 2) I search for intersections of x axis

with CCD2s.

Here is the output for COPS id14 (dcops_outer+21_04>out)

--------------------------------------------------------

@@@@ Start calculation of simulated value of COPS Measurement id14

OptOList size2

@@@@ LR:OBJECT CMS/slm_p2_2/MEp2_tp5/laser_MEp2_5

create laser lightray

LR: CREATE LIGHTRAY CMS/slm_p2_2/MEp2_tp5/laser_MEp2_5 OptO type is Xlaser

LightRay at creation

$$ LightRay point: (-1.5632173,-7.0100985,8.0010396)

$$ LightRay direction: (-0.2586525,-0.96597043,-7.1623456e-05)

laser Rotation matrix xx=-0.96597044 xy=3.2837177e-05 xz=-0.2586525

laser Rotation matrix yx=0.2586525 yy=6.5354006e-05 yz=-0.96597043

laser Rotation matrix zx=-1.4815765e-05 zy=-1 zz=-7.1623456e-05

@@@@ LR:OBJECT CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT

***** OptOCOPS::defaultBehaviour

***** OptOCOPS::makeMeasurement(lightray, meas)

OpticalObject::findExtraEntryValue: dowel1X = 0

OpticalObject::findExtraEntryValue: dowel1Y = 0

dowel2(1.1958826,3.194913,8.0530506)

dowel1(1.2393277,3.1831863,8.053053)

line_dowel21(-0.043445192,0.011726692,-2.3870476e-06)

line_dowel21_perp(-9.3798923e-06,-2.5590686e-05,0.044999992)

OpticalObject::findExtraEntryValue: CCDlength = 0

***** UP CCD *****

******************

OpticalObject::findExtraEntryValue: upCCDXtoDowel2 = -0.036455715

OpticalObject::findExtraEntryValue: upCCDYtoDowel2 = 0.065750014

%%%% CCD distances to Dowel2:

up ccd in local RF (-0.036455715,0.065750014,0)

up ccd in global RF (-0.035182418,0.009537501,-0.065751936)

***** DOWN CCD *****

********************

OpticalObject::findExtraEntryValue: downCCDXtoDowel2 = -0.036793137

OpticalObject::findExtraEntryValue: downCCDYtoDowel2 = 0.020750001

down ccd in local RF (-0.036793137,0.020750001,0)

down ccd in global RF (-0.035517562,0.0095998402,-0.020751949)

***** LEFT CCD *****

********************

OpticalObject::findExtraEntryValue: leftCCDXtoDowel2 = -0.044999968

OpticalObject::findExtraEntryValue: leftCCDYtoDowel2 = 0.057285049

left ccd in local RF (-0.044999968,0.057285049,0)

left ccd in global RF (-0.04343322,0.011759261,-0.057287425)

***** RIGHT CCD *****

*********************

OpticalObject::findExtraEntryValue: rightCCDXtoDowel2 = -0.0081710249

OpticalObject::findExtraEntryValue: rightCCDYtoDowel2 = 0.057806227

right ccd in local RF (-0.0081710249,0.057806227,0)

right ccd in global RF (-0.0078766562,0.0021621866,-0.05780665)

%%% Positions of CCDs in global RF:

upCCD: ALILine point (1.1607001,3.2044505,7.9872986)

ALILine direc (0.9654487,-0.26059316,5.3045503e-05)

downCCD: ALILine point (1.160365,3.2045129,8.0322986)

ALILine direc (0.9654487,-0.26059316,5.3045503e-05)

leftCCD: ALILine point (1.1524493,3.2066723,7.9957632)

ALILine direc (-0.00020844205,-0.0005686819,0.99999982)

rightCCD: ALILine point (1.1880059,3.1970752,7.9952439)

ALILine direc (-0.00020844205,-0.0005686819,0.99999982)

%%% Intersecting x-hair laser with COPS:

Created ALIplane: point(1.1958826,3.194913,8.0530506)

Created ALIPlane: normal(0.26059309,0.96544854,0.00060335178)

% LR INTERSECT WITH OPTO

Created ALIplane: point(1.1958826,3.194913,8.0530506)

Created ALIPlane: normal(0.26059309,0.96544854,0.00060335178)

% LR INTERSECT WITH PLANE

plane point(1.1958826,3.194913,8.0530506)

plane normal(0.26059309,0.96544854,0.00060335178)

n_r = point - point_plane(2.7590999,10.205012,0.052011029)

lightray* plate normal-0.99999784

n_r*plate normal-10.57147

n_r scaled(2.7343371,10.211728,0.00075716522)

INTERSECTION point (1.1711198,3.201629,8.0017967)

Intersection of x-hair laser with COPS (1.1711198,3.201629,8.0017967)

1. Get the OptO x-hair laser from the measurement list of OptOs

%%%% Projecting x-hair laser on COPS:

Y direction of laser (3.2837177e-05,6.5354006e-05,-1)

Y line of laser projected on COPS ALILine point (1.1711198,3.201629,8.0017967)

ALILine direc (0.00017139421,0.00057868183,-0.99999982)

3. Get the X of the laser (correct it if cross is not 90o) and project it on the COPS

OpticalObject::findExtraEntryValue: angleBetweenAxis = 1.5707261

angleBetweenAxis = 1.5707261

X direction of laser (0.96597044,-0.25865249,-5.5393242e-05)

X line of laser projected on COPS ALILine point (1.1711198,3.201629,8.0017967) ---------->THIS IS WHAT I NEED!!!!!!!!

ALILine direc (0.96544872,-0.2605931,-5.66058e-05)

Getting measurements as intersection with four CCDs:

intersecting with upCCD

$@S@ measv[0][0] upccd

***** OptOCOPS::getMeasFromInters

***** ALILine::intersect (constructor) two lines:

line1: ALILine point (1.1711198,3.201629,8.0017967)

ALILine direc (0.00017139421,0.00057868183,-0.99999982)

line2: ALILine point (1.1607001,3.2044505,7.9872986)

ALILine direc (0.9654487,-0.26059316,5.3045503e-05)

Determination of acosvec = vec().dot(l2.vec()) / vec().mag() / l2.vec().mag()

l2.vec() = (0.9654487,-0.26059316,5.3045503e-05)

vec().mag() = 1

l2.vec().mag() = 1

acosvec = -3.8373706e-05

*** START CALC OF FACT ***

==================

*** Determination of fact -> fact = (-6.513273e-06/-0.00060335178) = 0.01079515

*!* Standard calculation - things are fine

----> fact = ( -6.513273e-06 / -0.00060335178 ) = 0.01079515

Determination of intersection = l2.pt() + fact * l2.vec()

--> l2.pt() = (1.1607001,3.2044505,7.9872986)

--> fact = 0.01079515

--> l2.vec() = (0.9654487,-0.26059316,5.3045503e-05)

*** --> ALILine::intersection at: (1.1711223,3.2016374,7.9872992)

$@$@ measv[0][1] upccd

***** OptOCOPS::getMeasFromInters

***** ALILine::intersect (constructor) two lines:

line1: ALILine point (1.1711198,3.201629,8.0017967)

ALILine direc (0.96544872,-0.2605931,-5.66058e-05)

line2: ALILine point (1.1607001,3.2044505,7.9872986)

ALILine direc (0.9654487,-0.26059316,5.3045503e-05)

Determination of acosvec = vec().dot(l2.vec()) / vec().mag() / l2.vec().mag()

l2.vec() = (0.9654487,-0.26059316,5.3045503e-05)

vec().mag() = 1

l2.vec().mag() = 1

acosvec = 0.99999999

!!! ALILine::intersect: two lines are parallel (no errors)

intersecting with downCCD

***** OptOCOPS::getMeasFromInters

***** ALILine::intersect (constructor) two lines:

line1: ALILine point (1.1711198,3.201629,8.0017967)

ALILine direc (0.00017139421,0.00057868183,-0.99999982)

line2: ALILine point (1.160365,3.2045129,8.0322986)

ALILine direc (0.9654487,-0.26059316,5.3045503e-05)

Determination of acosvec = vec().dot(l2.vec()) / vec().mag() / l2.vec().mag()

l2.vec() = (0.9654487,-0.26059316,5.3045503e-05)

vec().mag() = 1

l2.vec().mag() = 1

acosvec = -3.8373706e-05

etc....(this is calculated for all the CCDs)

----------------------------

OK, from here I have the info:

CCD2 (Right), COPS id14 (dcops_outer+21_04>out):

"X line of laser projected on COPS ALILine point (1.1711198,3.201629,8.0017967)"

I do this the same way for all the other DCOPS:

DCOPS id15 (dcops_inner+21_04>out):

X line of laser projected on COPS ALILine point (0.68043224,1.3690943,8.0016608)

DCOPS id16 (dcops_inner+21_14>in):

X line of laser projected on COPS ALILine point (-0.094765597,-1.52598,8.0014462)

DCOPS id17 (dcops_outer+21_14>in):

X line of laser projected on COPS ALILine point (-0.58545475,-3.3585207,8.0013103)

DCOPS id18 (dcops_inner+22_27>in):

X line of laser projected on COPS ALILine point (-0.7197456,-3.8600469,8.0012731)

DCOPS id19 (dcops_outer+22_27>in):

X line of laser projected on COPS ALILine point (-1.4921714,-6.7447685,8.0010592)

DCOPS id20 (me+2_reference5>in):

X line of laser projected on COPS ALILine point (-1.5632173,-7.0100985,8.0010396)

Distances are in global CMS frame , unit [m]

From here I need only the Z coordinate.

In my script I create a vector:

//DCOPS: 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out ref

Float_t CCD_las_int[7]={8001.796,8001.660,8001.446,8001.310, 8001.273,8001.059,8001.039};

Here is the code:

//Here I define the intersection of the x laser axes with each CCD2

//DCOPS: 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out ref

//I can't read this part from the cocoa output (I get this info only from the debug 5 mode)

Float_t CCD_las_int[7]={8001.796,8001.660,8001.446,8001.310, 8001.273,8001.059,8001.039};

//This is the CCD X coord

Float_t x_slm_CCD2[7] ={-3400.,-1500.,1500.,3400.,3900.,7000.,7200.}; //[mm]

TGraph *gr_lasline =new TGraph(7,x_slm_CCD2,CCD_las_int);

//Set marker to plot laser position

gr_lasline->SetMarkerStyle(21);//square

gr_lasline->SetMarkerSize(0.3);

gr_lasline->SetMarkerColor(1); //black

gr_lasline->Draw("P");

//I don't know yet how to fit the CCD_las_int points with a line in the script

//so for now I plot the intersection points (see above) and draw a line from the first point

//to the last point

//I checked with the poly 1 fit in the editor and the line fit and the TLine look the same

TLine *las = new TLine(-3400.,8001.796,7200.,8001.039);

las->SetLineColor(2);//red

las->SetLineWidth(1.);

las->SetLineStyle(3);//...

Create the script for laser 2.

-------------------------------

-create report.out for laser 2.

-run: root -b -p -q .x readFile.C++\(\"report.out\"\)

Here is the output:

CMS/slm_p2_2 289.778 0 -77.6457 0 7998 0 -90 0 0 0 75 0 289.778 0 -77.6457 0 7998 0 -90 0 0 0 75 0 289.778 0 -77.6457 0 7998 0 -90 0 0 0 75 0 289.778 0 -77.6457 0 7998 0 -90 0 0 0 75 0

CMS/slm_p2_2/MEp2_1_04 -2371.28 0.1 -90.5039 4.49875 112.367 3.19914 -0.760613 0.152586 -80.2123 0.0386206 0.824437 0.152153 -2371.28 0.1 -91.7379 4.50463 111.845 3.19817 -0.718781 0.155283 -80.2048 0.0386196 0.764423 0.154403 -2371.28 0.1 -91.7352 4.50464 112.02 3.19833 -0.719399 0.155269 -80.2068 0.0386205 0.765069 0.154389 -2371.28 0.1 -91.7371 4.50464 112.019 3.19833 -0.719309 0.155273 -80.2068 0.0386205 0.764956 0.154393

CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT 13.0995 0.143976 42.2102 0.537262 -884.331 0.0999997 0 0.000114592 10 0.000114592 1.71969e-06 0.000114592 13.111 0.143975 42.2335 0.537257 -884.33 0.0999998 0 0.000114592 10 0.000114592 1.63737e-06 0.000114592 13.1109 0.143976 42.2334 0.537257 -884.33 0.0999998 0 0.000114592 10 0.000114592 1.63773e-06 0.000114592 13.1109 0.143976 42.2334 0.537257 -884.33 0.0999998 0 0.000114592 10 0.000114592 1.63778e-06 0.000114592

CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT -272.073 0.143976 44.9897 0.537262 992.095 0.0999997 0 0.000114592 -10 0.000114592 5.56429e-07 0.000114591 -272.085 0.143975 44.9665 0.537257 992.094 0.0999998 0 0.000114592 -10 0.000114592 4.97362e-07 0.000114591 -272.085 0.143976 44.9666 0.537257 992.094 0.0999998 0 0.000114592 -10 0.000114592 4.97236e-07 0.000114591 -272.085 0.143976 44.9666 0.537257 992.094 0.0999998 0 0.000114592 -10 0.000114592 4.97267e-07 0.000114591

CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 4.6611e-15 0 -6.218e-13 0 -968.883 0 0 0 0 0 0 0 6.60292e-14 0 5.30142e-13 0 -968.883 0 0 0 0 0 0 0 -2.47207e-14 0 -5.70455e-14 0 -968.883 0 0 0 0 0 0 0 4.51939e-14 0 1.04639e-13 0 -968.883 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 -9.35309e-14 0 8.51499e-14 0 988.187 0 0 0 0 0 0 0 -1.20721e-13 0 -7.60224e-13 0 988.187 0 0 0 0 0 0 0 8.87595e-14 0 -4.62249e-13 0 988.187 0 0 0 0 0 0 0 -3.04312e-14 0 7.07528e-13 0 988.187 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_1_14 2371.28 0.1 -101.551 8.94117 110.883 6.35113 0.31545 0.159181 79.9513 0.0386326 -0.051207 0.157079 2371.28 0.1 -103.909 8.95041 109.864 6.35077 0.390401 0.157086 79.957 0.0386317 0.00802326 0.156014 2371.28 0.1 -103.904 8.95042 110.211 6.35093 0.390301 0.157095 79.9549 0.0386338 0.00795285 0.156021 2371.28 0.1 -103.908 8.95042 110.21 6.35093 0.390354 0.157092 79.955 0.0386338 0.00798361 0.156018

CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN -13.1083 0.143976 42.1798 0.537267 -884.33 0.0999997 0 0.000114592 10 0.000114592 4.85393e-07 0.000114591 -13.1067 0.143976 42.0985 0.537275 -884.33 0.0999997 0 0.000114592 10 0.000114592 5.69745e-07 0.000114591 -13.1067 0.143976 42.0985 0.537275 -884.33 0.0999997 0 0.000114592 10 0.000114592 5.698e-07 0.000114591 -13.1067 0.143976 42.0985 0.537275 -884.33 0.0999997 0 0.000114592 10 0.000114592 5.69779e-07 0.000114591

CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN 272.079 0.143976 45.088 0.537267 992.094 0.0999997 0 0.000114592 -10 0.000114592 -7.74813e-08 0.000114592 272.081 0.143976 45.1015 0.537275 992.094 0.0999997 0 0.000114592 -10 0.000114592 0 0.000114592 272.081 0.143976 45.1015 0.537275 992.094 0.0999997 0 0.000114592 -10 0.000114592 0 0.000114592 272.081 0.143976 45.1015 0.537275 992.094 0.0999997 0 0.000114592 -10 0.000114592 0 0.000114592

CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 -3.01609e-15 0 -4.92299e-13 0 -968.883 0 0 0 0 0 0 0 1.15255e-14 0 4.38508e-13 0 -968.883 0 0 0 0 0 0 0 -2.72218e-14 0 -6.62166e-13 0 -968.883 0 0 0 0 0 0 0 -4.94247e-14 0 -6.93389e-13 0 -968.883 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 -2.38231e-14 0 5.62979e-13 0 988.187 0 0 0 0 0 0 0 -4.30736e-14 0 -2.08315e-13 0 988.187 0 0 0 0 0 0 0 4.56541e-14 0 6.26914e-13 0 988.187 0 0 0 0 0 0 0 4.70672e-14 0 8.47029e-14 0 988.187 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_2_08 -5225.85 0.1 -91.0409 1.86659 146.618 1.30604 -0.845072 0.112159 -85.0239 0.0383105 0.871691 0.114195 -5225.85 0.1 -91.7523 1.8619 146.334 1.30516 -0.27134 0.161262 -85.0181 0.0383135 0.290979 0.161064 -5225.85 0.1 -91.7514 1.86191 146.404 1.30577 -0.27121 0.161258 -85.02 0.0383103 0.290886 0.161061 -5225.85 0.1 -91.7519 1.8619 146.404 1.30578 -0.272084 0.161253 -85.02 0.0383103 0.291733 0.161057

CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT -19.9218 0.14399 46.1248 0.537707 -1317.83 0.1 0 0.000114592 -5 0.000114592 1.13761e-06 0.000114591 -19.9211 0.14399 46.1307 0.537724 -1317.83 0.1 0 0.000114592 -5 0.000114592 1.08437e-06 0.000114591 -19.9216 0.14399 46.1306 0.537724 -1317.83 0.1 0 0.000114592 -5 0.000114592 1.08471e-06 0.000114591 -19.9216 0.14399 46.1307 0.537724 -1317.83 0.1 0 0.000114592 -5 0.000114592 1.08458e-06 0.000114591

CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT -280.199 0.14399 50.0752 0.537707 1657.15 0.1 0 0.000114592 -5 0.000114592 0 0.000114592 -280.2 0.14399 50.0693 0.537724 1657.15 0.1 0 0.000114592 -5 0.000114592 5.24616e-07 0.000114591 -280.199 0.14399 50.0694 0.537724 1657.15 0.1 0 0.000114592 -5 0.000114592 5.24498e-07 0.000114591 -280.199 0.14399 50.0693 0.537724 1657.15 0.1 0 0.000114592 -5 0.000114592 5.24381e-07 0.000114591

CMS/slm_p2_2/MEp2_2_08/apin_inner_MEp2_2_08 -1.41522e-13 0 1.86653e-13 0 -1635.89 0 0 0 0 0 0 0 -1.01782e-13 0 -6.96038e-13 0 -1635.89 0 0 0 0 0 0 0 8.14958e-14 0 2.90372e-14 0 -1635.89 0 0 0 0 0 0 0 1.46485e-13 0 -3.32708e-13 0 -1635.89 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_2_08/apin_outer_MEp2_2_08 2.53801e-13 0 6.70306e-13 0 1655.19 0 0 0 0 0 0 0 2.48437e-13 0 2.08261e-13 0 1655.19 0 0 0 0 0 0 0 -1.39155e-13 0 2.63789e-13 0 1655.19 0 0 0 0 0 0 0 9.62314e-14 0 -1.59839e-14 0 1655.19 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_2_27 5225.85 0.1 -112.025 11.9075 153.158 8.24904 -0.134421 0.181229 84.9607 0.0383239 -0.187658 0.183356 5225.85 0.1 -114.964 11.9188 151.855 8.24872 -0.133221 0.182329 84.9667 0.0383228 -0.19451 0.1828 5225.85 0.1 -114.955 11.9188 152.305 8.24898 -0.13309 0.18233 84.9646 0.038324 -0.194253 0.182801 5225.85 0.1 -114.96 11.9187 152.303 8.24898 -0.13313 0.182329 84.9647 0.038324 -0.194346 0.182801

CMS/slm_p2_2/MEp2_2_27/DCOPS_inner_MEp2_2_27_IN 19.9223 0.14399 46.1198 0.537804 -1317.83 0.1 0 0.000114592 -5 0.000114592 0 0.000114592 19.9222 0.14399 46.1203 0.537802 -1317.83 0.1 0 0.000114592 -5 0.000114592 0 0.000114592 19.9222 0.14399 46.1203 0.537802 -1317.83 0.1 0 0.000114592 -5 0.000114592 0 0.000114592 19.9222 0.14399 46.1203 0.537802 -1317.83 0.1 0 0.000114592 -5 0.000114592 0 0.000114592

CMS/slm_p2_2/MEp2_2_27/DCOPS_outer_MEp2_2_27_IN 280.199 0.14399 50.0802 0.537804 1657.15 0.1 0 0.000114592 -5 0.000114592 -9.50365e-07 0.000114592 280.199 0.14399 50.0797 0.537802 1657.15 0.1 0 0.000114592 -5 0.000114592 -9.50406e-07 0.000114592 280.199 0.14399 50.0797 0.537802 1657.15 0.1 0 0.000114592 -5 0.000114592 -9.50407e-07 0.000114592 280.199 0.14399 50.0797 0.537802 1657.15 0.1 0 0.000114592 -5 0.000114592 -9.50405e-07 0.000114592

CMS/slm_p2_2/MEp2_2_27/apin_inner_MEp2_2_27 2.88858e-14 0 -6.32201e-13 0 -1635.89 0 0 0 0 0 0 0 2.15483e-14 0 8.31332e-13 0 -1635.89 0 0 0 0 0 0 0 1.79518e-14 0 -2.82203e-13 0 -1635.89 0 0 0 0 0 0 0 6.76338e-14 0 -8.66282e-13 0 -1635.89 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_2_27/apin_outer_MEp2_2_27 -1.26674e-13 0 4.32367e-13 0 1655.19 0 0 0 0 0 0 0 -1.27927e-13 0 -2.26125e-13 0 1655.19 0 0 0 0 0 0 0 -8.62907e-14 0 5.22236e-13 0 1655.19 0 0 0 0 0 0 0 2.31779e-15 0 -7.12665e-13 0 1655.19 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_tp2 -7175.83 0.1 -43.25 0.1 22.5 0.1 -0.0193391 0.0388644 -89.9902 0.0377652 -0.0193411 0.0388644 -7175.83 0.1 -43.25 0.1 22.5 0.1 -0.0263853 0.0388807 -89.9843 0.0377632 -0.026472 0.0388806 -7175.83 0.1 -43.25 0.1 22.5 0.1 -0.0263446 0.0388807 -89.9863 0.0377643 -0.0264829 0.0388806 -7175.83 0.1 -43.25 0.1 22.5 0.1 -0.0263645 0.0388807 -89.9863 0.0377643 -0.0264848 0.0388806

CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN 0.0547403 0.0199057 0.532409 0.0199057 2.37416e-13 0.02 0 0.000572958 0 0.000572958 -4.15158e-05 0.000572945 0.0547494 0.0199057 0.532256 0.0199057 -4.17003e-07 0.02 0 0.000572958 0 0.000572958 -4.42569e-05 0.000572945 0.0547541 0.0199057 0.532256 0.0199057 -6.16859e-07 0.02 0 0.000572958 0 0.000572958 -4.4255e-05 0.000572945 0.0547541 0.0199057 0.532256 0.0199057 -5.7752e-07 0.02 0 0.000572958 0 0.000572958 -4.42551e-05 0.000572945

CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 -27.974 0.0487006 40.009 0.0488112

4.14915e-13 0 -0.000396962 0.00572631 0.000202477 0.00572321 -0.0102619

0.0056882 -27.9749 0.0487018 40.0244 0.0486669 -2.58728e-13 0 -0.000541574

0.00572635 0.000326387 0.0057232 -0.0103126 0.00568833 -27.9754 0.0487018

40.0244 0.0486677 3.35066e-15 0 -0.000540694 0.00572635 0.000285735 0.0057232

-0.0103152 0.00568833 -27.9754 0.0487018 40.0244 0.0486678 3.56293e-13 0

-0.000541112 0.00572635 0.000285896 0.0057232 -0.0103149 0.00568833

I did not include "val of object" values.

I had to rename all the files to distinguish between las2 and las5.

.dat files:

slm_fitc_las5.dat

cms_fitc_las5.dat

script:

slm_cms_readcocoaout_las5

Create: slm_fitc_las2.dat

Follow the same procedure as for las2.

Since there are 3 iterations (0,1,2,3) I deleted numbers corresp. to

iterations 0, 1 & 2

This is slm_fitc_las2.dat:

slm_p2_2 289.778 0 -77.6457 0 7998 0 -90 0 0 0 75 0

MEp2_1_04 -2371.28 0.1 -91.7371 4.50464 112.019 3.19833 -0.719309 0.155273 -80.2068 0.0386205 0.764956 0.154393

DCOPS_inner_MEp2_1_04_OUT 13.1109 0.143976 42.2334 0.537257 -884.33 0.0999998 0 0.000114592 10 0.000114592 1.63778e-06 0.000114592

DCOPS_outer_MEp2_1_04_OUT -272.085 0.143976 44.9666 0.537257 992.094 0.0999998 0 0.000114592 -10 0.000114592 4.97267e-07 0.000114591

apin_inner_MEp2_1_04 4.51939e-14 0 1.04639e-13 0 -968.883 0 0 0 0 0 0 0

apin_outer_MEp2_1_04 -3.04312e-14 0 7.07528e-13 0 988.187 0 0 0 0 0 0 0

MEp2_1_14 2371.28 0.1 -103.908 8.95042 110.21 6.35093 0.390354 0.157092 79.955 0.0386338 0.00798361 0.15601

DCOPS_inner_MEp2_1_14_IN -13.1067 0.143976 42.0985 0.537275 -884.33 0.0999997 0 0.000114592 10 0.000114592 5.69779e-07 0.000114591

DCOPS_outer_MEp2_1_14_IN 272.081 0.143976 45.1015 0.537275 992.094 0.0999997 0 0.000114592 -10 0.000114592 0 0.000114592

apin_inner_MEp2_1_14 -4.94247e-14 0 -6.93389e-13 0 -968.883 0 0 0 0 0 0 0

apin_outer_MEp2_1_14 4.70672e-14 0 8.47029e-14 0 988.187 0 0 0 0 0 0 0

MEp2_2_08 -5225.85 0.1 -91.7519 1.8619 146.404 1.30578 -0.272084 0.161253 -85.02 0.0383103 0.291733 0.161057

DCOPS_inner_MEp2_2_08_OUT -19.9216 0.14399 46.1307 0.537724 -1317.83 0.1 0 0.000114592 -5 0.000114592 1.08458e-06 0.000114591

DCOPS_outer_MEp2_2_08_OUT -280.199 0.14399 50.0693 0.537724 1657.15 0.1 0 0.000114592 -5 0.000114592 5.24381e-07 0.000114591

apin_inner_MEp2_2_08 1.46485e-13 0 -3.32708e-13 0 -1635.89 0 0 0 0 0 0 0

apin_outer_MEp2_2_08 9.62314e-14 0 -1.59839e-14 0 1655.19 0 0 0 0 0 0 0

MEp2_2_27 5225.85 0.1 -114.96 11.9187 152.303 8.24898 -0.13313 0.182329 84.9647 0.038324 -0.194346 0.182801

DCOPS_inner_MEp2_2_27_IN 19.9222 0.14399 46.1203 0.537802 -1317.83 0.1 0 0.000114592 -5 0.000114592 0 0.000114592

DCOPS_outer_MEp2_2_27_IN 280.199 0.14399 50.0797 0.537802 1657.15 0.1 0 0.000114592 -5 0.000114592 -9.50405e-07 0.000114592

apin_inner_MEp2_2_27 6.76338e-14 0 -8.66282e-13 0 -1635.89 0 0 0 0 0 0 0

apin_outer_MEp2_2_27 2.31779e-15 0 -7.12665e-13 0 1655.19 0 0 0 0 0 0 0

MEp2_tp2 -7175.83 0.1 -43.25 0.1 22.5 0.1 -0.0263645 0.0388807 -89.9863 0.0377643 -0.0264848 0.0388806

DCOPS_MEp2_reference_2_IN 0.0547541 0.0199057 0.532256 0.0199057 -5.7752e-07 0.02 0 0.000572958 0 0.000572958 -4.42551e-05 0.000572945

laser_MEp2_2 -27.9754 0.0487018 40.0244 0.0486678 3.56293e-13 0 -0.000541112 0.00572635 0.000285896 0.0057232 -0.0103149 0.00568833

..and cms_fitc_las2.dat

slm_p2_2 289.7777 0. -77.6457 0. 7998. 0. 0. 0. 0. 0. 0. 0.

MEp2_1_04 1011.7119 0. 2183.8413 0. 8089.7371 0. 0. 0. 0. 0. 0. 0.

DCOPS_inner_MEp2_1_04_OUT 652.71092 0. 1375.583 0. 8046.9415 0. 0. 0. 0. 0. 0. 0.

DCOPS_outer_MEp2_1_04_OUT 1180.6393 0. 3198.6573 0. 8045.9859 0. 0. 0. 0. 0. 0. 0.

apin_inner_MEp2_1_04 605.42894 0. 1304.2572 0. 8089.1537 0. 0. 0. 0. 0. 0. 0.

apin_outer_MEp2_1_04 1426.0897 0. 3080.9501 0. 8090.3321 0. 0. 0. 0. 0. 0. 0.

MEp2_1_14 -217.50026 0. -2396.6496 0. 8101.908 0. 0. 0. 0. 0. 0. 0.

DCOPS_inner_MEp2_1_14_IN -128.08549 0. -1517.0562 0. 8053.9072 0. 0. 0. 0. 0. 0. 0.

DCOPS_outer_MEp2_1_14_IN -574.27706 0. -3361.8138 0. 8063.4239 0. 0. 0. 0. 0. 0. 0.

apin_inner_MEp2_1_14 -133.81701 0. -1431.409 0. 8095.44 0. 0. 0. 0. 0. 0. 0.

apin_outer_MEp2_1_14 -302.85082 0. -3381.1217 0. 8108.5049 0. 0. 0. 0. 0. 0. 0.

MEp2_2_08 1783.7418 0. 4932.2438 0. 8089.7519 0. 0. 0. 0. 0. 0. 0.

DCOPS_inner_MEp2_2_08_OUT 1314.713 0. 3700.5564 0. 8043.2035 0. 0. 0. 0. 0. 0. 0.

DCOPS_outer_MEp2_2_08_OUT 2086.626 0. 6585.4189 0. 8040.3429 0. 0. 0. 0. 0. 0. 0.

apin_inner_MEp2_2_08 1224.7733 0. 3394.8173 0. 8089.2224 0. 0. 0. 0. 0. 0. 0.

apin_outer_MEp2_2_08 2349.3064 0. 6487.8124 0. 8090.2877 0. 0. 0. 0. 0. 0. 0.

MEp2_2_27 -915.65742 0. -5164.8463 0. 8112.9603 0. 0. 0. 0. 0. 0. 0.

DCOPS_inner_MEp2_2_27_IN -707.26238 0. -3863.4922 0. 8065.4552 0. 0. 0. 0. 0. 0. 0.

DCOPS_outer_MEp2_2_27_IN -1478.4076 0. -6748.5613 0. 8064.7129 0. 0. 0. 0. 0. 0. 0.

apin_inner_MEp2_2_27 -632.58251 0. -3553.6381 0. 8111.2339 0. 0. 0. 0. 0. 0. 0.

apin_outer_MEp2_2_27 -1202.0727 0. -6795.0673 0. 8114.7071 0. 0. 0. 0. 0. 0. 0.

MEp2_tp2 2168.7522 0. 6847.8494 0. 8041.25 0. 0. 0. 0. 0. 0. 0.

DCOPS_MEp2_reference_2_IN 2168.805 0. 6847.8348 0. 8040.7177 0. 0. 0. 0. 0. 0. 0.

laser_MEp2_2 2141.7222 0. 6855.0608 0. 8001.2256 0. 0. 0. 0. 0. 0. 0.

(careful with units and order of lines!!!)

The script for laser 2 is: slm_cms_readcocoaout_las2.C

I made some modifications regarding file names (change everything that is las5

to las2)

What is the slmx coordinate for chamber 08?

Logically I concluded the following:

(need to ckeck with Marcus; see Jim B's plot)

DCOPS:

2_08_out 2_08_in 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out ref

-7000 -3900 -3400 -1500 1500 3400 3900 7000 7100

Alignment pins

2_08_out 2_08_in 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out

-6800 -3600 -3371 -1371 1371 3371 3600 6800

Here is the script:

---------------------

void slm_cms_readcocoaout_las2()

{

gROOT->Reset();

TString dir = gSystem->UnixPathName(TCint::GetCurrentMacroName());

dir.ReplaceAll("slm_cms_readcocoaout_las2.C","");

dir.ReplaceAll("/./","/");

//SLM coordinates:

//center position [mm]

Float_t *slmx_c = new Float_t[''];

Float_t*slmy_c = new Float_t[''];

Float_t*slmz_c = new Float_t[''];

//cent position uncertainty [mm]

Float_t*slmx_ce = new Float_t[''];

Float_t*slmy_ce = new Float_t[''];

Float_t*slmz_ce = new Float_t[''];

//angle [mrad]

Float_t*slmx_a = new Float_t[''];

Float_t*slmy_a = new Float_t[''];

Float_t*slmz_a = new Float_t[''];

//angle uncertainty [mrad]

Float_t*slmx_ae = new Float_t[''];

Float_t*slmy_ae = new Float_t[''];

Float_t*slmz_ae = new Float_t[''];

Float_t slmX_c, slmY_c, slmZ_c;

Float_t slmX_ce, slmY_ce, slmZ_ce;

Float_t slmX_a, slmY_a, slmZ_a;

Float_t slmX_ae, slmY_ae, slmZ_ae;

Int_t slmNData = 0;

Char_t *slmw=new Char_t[''];

Char_t slmW[''];

ifstream slmInput;

//CMS coordinates:

//center position [mm]

Float_t *cmsx_c = new Float_t[''];

Float_t*cmsy_c = new Float_t[''];

Float_t*cmsz_c = new Float_t[''];

//cent position uncertainty [mm]

Float_t*cmsx_ce = new Float_t[''];

Float_t*cmsy_ce = new Float_t[''];

Float_t*cmsz_ce = new Float_t[''];

//angle [mrad]

Float_t*cmsx_a = new Float_t[''];

Float_t*cmsy_a = new Float_t[''];

Float_t*cmsz_a = new Float_t[''];

//angle uncertainty [mrad]

Float_t*cmsx_ae = new Float_t[''];

Float_t*cmsy_ae = new Float_t[''];

Float_t*cmsz_ae = new Float_t[''];

Float_t cmsX_c, cmsY_c, cmsZ_c;

Float_t cmsX_ce, cmsY_ce, cmsZ_ce;

Float_t cmsX_a, cmsY_a, cmsZ_a;

Float_t cmsX_ae, cmsY_ae, cmsZ_ae;

Int_t cmsNData = 0;

Char_t *cmsw=new Char_t[''];

Char_t cmsW[''];

ifstream cmsInput;

//here you open the .dat files

slmInput.open(Form("%sslm_fitc_las2.dat",dir.Data()));

cmsInput.open(Form("%scms_fitc_las2.dat",dir.Data()));

// while(1) creates an infinite loop

while (1) {

slmInput >> slmW >> slmX_c >> slmX_ce >> slmY_c >> slmY_ce >> slmZ_c >> slmZ_ce >> slmX_a >> slmX_ae >> slmY_a >>slmY_ae >> slmZ_a >> slmZ_ae;

if (!slmInput.good()) break;

slmw[slmNData] = slmW;

slmx_c[slmNData] = slmX_c;

slmx_ce[slmNData] = slmX_ce;

slmy_c[slmNData] = slmY_c;

slmy_ce[slmNData] = slmY_ce;

slmz_c[slmNData] = slmZ_c;

slmz_ce[slmNData] = slmZ_ce;

slmx_a[slmNData] = slmX_a;

slmx_ae[slmNData] = slmX_ae;

slmy_a[slmNData] = slmY_a;

slmy_ae[slmNData] = slmY_ae;

slmz_a[slmNData] = slmZ_a;

slmz_ae[slmNData] = slmZ_ae;

cout > cmsX_ce >> cmsY_c >> cmsY_ce >> cmsZ_c >> cmsZ_ce >> cmsX_a >> cmsX_ae >> cmsY_a >>cmsY_ae >> cmsZ_a >> cmsZ_ae;

if (!cmsInput.good()) break;

cmsw[cmsNData] = cmsW;

cmsx_c[cmsNData] = cmsX_c;

cmsx_ce[cmsNData] = cmsX_ce;

cmsy_c[cmsNData] = cmsY_c;

cmsy_ce[cmsNData] = cmsY_ce;

cmsz_c[cmsNData] = cmsZ_c;

cmsz_ce[cmsNData] = cmsZ_ce;

cmsx_a[cmsNData] = cmsX_a;

cmsx_ae[cmsNData] = cmsX_ae;

cmsy_a[cmsNData] = cmsY_a;

cmsy_ae[cmsNData] = cmsY_ae;

cmsz_a[cmsNData] = cmsZ_a;

cmsz_ae[cmsNData] = cmsZ_ae;

cout SetGrid();

c1->GetFrame()->SetBorderSize(12);

c1->SetBorderMode(0);

//Axis settings

hpx->GetXaxis()->SetTitle("X_{SLM} [mm]");

hpx->GetYaxis()->SetTitle("Z_{CMS} [mm]");

hpx->GetXaxis()->CenterTitle();

hpx->GetXaxis()->SetNdivisions(50310);

hpx->GetYaxis()->CenterTitle();

hpx->GetXaxis()->SetTitleOffset(1.03);

hpx->GetYaxis()->SetTitleOffset(1.3);

hpx->GetYaxis()->SetNdivisions(50312);

//Graph CSC center coordinates and errors (get values from the dat file)

coutSetMarkerColor(4); //blue

gr_apin20->Draw("P");

// Connect the alignment pins with a line

//Take the first two apin points (x1,y1,x2,y2)

TLine *l1 = new TLine(-3371.,cmsz_c[5],-1371.,cmsz_c[4]);

l1->SetLineColor(808);//orange

l1->SetLineWidth(1.);

l1->Draw();

//Connect the next two apins

TLine *l2 = new TLine(1371.,cmsz_c[9],3371., cmsz_c[10]);

l2->SetLineColor(808);//orange

l2->SetLineWidth(1.);

l2->Draw();

//..and the next two

TLine *l3 =new TLine(-6800.,cmsz_c[15],-3600.,cmsz_c[14]);

l3->SetLineColor(808);//orange

l3->SetLineWidth(1.);

l3->Draw();

//..and the next two

TLine *l3 =new TLine(3600.,cmsz_c[19],6800.,cmsz_c[20]);

l3->SetLineColor(808);//orange

l3->SetLineWidth(1.);

l3->Draw();

//Define fitted DCOPS coordinates and errors

//DCOPS:

//ref 2_08_out 2_08_in 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out

//-7100 -7000 -3900 -3400 -1500 1500 3400 3900 7000

//These are the dcops approx. slmx_c coordinates

//Note: ref senosr is at -7100 mm, but moved it to -7200 mm to not overlap with

//the other DCOPS

//DCOPS_outer_MEp2_1_04_OUT (line 3)

Float_t x_slm_dcops3[1]={-3400.};

//DCOPS_inner_MEp2_1_04_OUT (line 2)

Float_t x_slm_dcops2[1]={-1500.};

//DCOPS_inner_MEp2_1_14_IN (line 7)

Float_t x_slm_dcops7[1]={1500.};

//DCOPS_outer_MEp2_1_14_IN (line 8)

Float_t x_slm_dcops8[1]={3400.};

//DCOPS_outer_MEp2_2_08_OUT (line 13)

Float_t x_slm_dcops13[1]={-7000.};

//DCOPS_inner_MEp2_2_08_OUT (line 12)

Float_t x_slm_dcops12[1]={-3900.};

//DCOPS_inner_MEp2_2_27_IN (line 17)

Float_t x_slm_dcops17[1]={3900.};

//DCOPS_outer_MEp2_2_27_IN (line 18)

Float_t x_slm_dcops18[1]={7000.};

//DCOPS_MEp2_reference_5_IN (line 22)

Float_t x_slm_dcops22[1]={-7200.};

//These are the dcops cmsz_c coordinates

Float_t z_cms_dcops3[1]={cmsz_c[3]};

Float_t z_cms_dcops2[1]={cmsz_c[2]};

Float_t z_cms_dcops7[1]={cmsz_c[7]};

Float_t z_cms_dcops8[1]={cmsz_c[8]};

Float_t z_cms_dcops13[1]={cmsz_c[13]};

Float_t z_cms_dcops12[1]={cmsz_c[12]};

Float_t z_cms_dcops17[1]={cmsz_c[17]};

Float_t z_cms_dcops18[1]={cmsz_c[18]};

Float_t z_cms_dcops22[1]={cmsz_c[22]};

//These errors are not known (set them to zero)

Float_t ex_slm_dcops3[1]={0.};

Float_t ex_slm_dcops2[1]={0.};

Float_t ex_slm_dcops7[1]={0.};

Float_t ex_slm_dcops8[1]={0.};

Float_t ex_slm_dcops13[1]={0.};

Float_t ex_slm_dcops12[1]={0.};

Float_t ex_slm_dcops17[1]={0.};

Float_t ex_slm_dcops18[1]={0.};

Float_t ex_slm_dcops22[1]={0.};

//For now I will set the error for the DCOPS dowel Z_CMS pos. equal to the error for the DCOPS slmy position

Float_t ez_cms_dcops3[1] = {slmy_ce[3]};

Float_t ez_cms_dcops2[1] = {slmy_ce[2]};

Float_t ez_cms_dcops7[1] = {slmy_ce[7]};

Float_t ez_cms_dcops8[1] = {slmy_ce[8]};

Float_t ez_cms_dcops13[1] = {slmy_ce[12]};

Float_t ez_cms_dcops12[1] = {slmy_ce[13]};

Float_t ez_cms_dcops17[1] = {slmy_ce[17]};

Float_t ez_cms_dcops18[1] = {slmy_ce[18]};

Float_t ez_cms_dcops22[1] = {slmy_ce[22]};

//Graph fitted DCOPS ref dowel pin coordinates and errors

TGraphErrors *gr_dcops2 =new TGraphErrors(1,x_slm_dcops2,z_cms_dcops2,ex_slm_dcops2,ez_cms_dcops2);

TGraphErrors *gr_dcops3 =new TGraphErrors(1,x_slm_dcops3,z_cms_dcops3,ex_slm_dcops3,ez_cms_dcops3);

TGraphErrors *gr_dcops7 =new TGraphErrors(1,x_slm_dcops7,z_cms_dcops7,ex_slm_dcops7,ez_cms_dcops7);

TGraphErrors *gr_dcops8 =new TGraphErrors(1,x_slm_dcops8,z_cms_dcops8,ex_slm_dcops8,ez_cms_dcops8);

TGraphErrors *gr_dcops13 =new TGraphErrors(1,x_slm_dcops13,z_cms_dcops13,ex_slm_dcops13,ez_cms_dcops13);

TGraphErrors *gr_dcops12 =new TGraphErrors(1,x_slm_dcops12,z_cms_dcops12,ex_slm_dcops12,ez_cms_dcops12);

TGraphErrors *gr_dcops17 =new TGraphErrors(1,x_slm_dcops17,z_cms_dcops17,ex_slm_dcops17,ez_cms_dcops17);

TGraphErrors *gr_dcops18 =new TGraphErrors(1,x_slm_dcops18,z_cms_dcops18,ex_slm_dcops18,ez_cms_dcops18);

TGraphErrors *gr_dcops22 =new TGraphErrors(1,x_slm_dcops22,z_cms_dcops22,ex_slm_dcops22,ez_cms_dcops22);

//Set marker to plot ref dowel pin positions

gr_dcops2->SetMarkerStyle(4); //empty circle

gr_dcops2->SetMarkerSize(0.6);

gr_dcops2->SetMarkerColor(6);//pink

gr_dcops2->Draw("P");

gr_dcops3->SetMarkerStyle(4); //empty circle

gr_dcops3->SetMarkerSize(0.6);

gr_dcops3->SetMarkerColor(6);//pink

gr_dcops3->Draw("P");

gr_dcops7->SetMarkerStyle(4); //empty circle

gr_dcops7->SetMarkerSize(0.6);

gr_dcops7->SetMarkerColor(6);//pink

gr_dcops7->Draw("P");

gr_dcops8->SetMarkerStyle(4); //empty circle

gr_dcops8->SetMarkerSize(0.6);

gr_dcops8->SetMarkerColor(6);//pink

gr_dcops8->Draw("P");

gr_dcops13->SetMarkerStyle(4); //empty circle

gr_dcops13->SetMarkerSize(0.6);

gr_dcops13->SetMarkerColor(6);//pink

gr_dcops13->Draw("P");

gr_dcops12->SetMarkerStyle(4); //empty circle

gr_dcops12->SetMarkerSize(0.6);

gr_dcops12->SetMarkerColor(6);//pink

gr_dcops12->Draw("P");

gr_dcops17->SetMarkerStyle(4); //empty circle

gr_dcops17->SetMarkerSize(0.6);

gr_dcops17->SetMarkerColor(6);//pink

gr_dcops17->Draw("P");

gr_dcops18->SetMarkerStyle(4); //empty circle

gr_dcops18->SetMarkerSize(0.6);

gr_dcops18->SetMarkerColor(6);//pink

gr_dcops18->Draw("P");

gr_dcops22->SetMarkerStyle(4); //empty circle

gr_dcops22->SetMarkerSize(0.6);

gr_dcops22->SetMarkerColor(6);//pink

gr_dcops22->Draw("P");

//Define CCD2 pixel 1 coordinates and errors

//These are the CCD2 pixel 1 approx. slmx_c coordinates

//Note: ref senosr is at -7100 mm, but moved it to -7200 mm to not overlap with

//the other DCOPS

//DCOPS_outer_MEp2_1_04_OUT (line 3)

Float_t x_slm_CCD2pixel1_3[1]={-3400.};

//DCOPS_inner_MEp2_1_04_OUT (line 2)

Float_t x_slm_CCD2pixel1_2[1]={-1500.};

//DCOPS_inner_MEp2_1_14_IN (line 7)

Float_t x_slm_CCD2pixel1_7[1]={1500.};

//DCOPS_outer_MEp2_1_14_IN (line 8)

Float_t x_slm_CCD2pixel1_8[1]={3400.};

//DCOPS_outer_MEp2_2_08_IN (line 13)

Float_t x_slm_CCD2pixel1_13[1]={-7000.};

//DCOPS_inner_MEp2_2_08_IN (line 12)

Float_t x_slm_CCD2pixel1_12[1]={-3900.};

//DCOPS_inner_MEp2_2_27_IN (line 17)

Float_t x_slm_CCD2pixel1_17[1]={3900.};

//DCOPS_outer_MEp2_2_27_IN (line 18)

Float_t x_slm_CCD2pixel1_18[1]={7000.};

//DCOPS_MEp2_reference_5_IN (line 22)

Float_t x_slm_CCD2pixel1_22[1]={-7200.};

//These are the dcops cmsz_c coordinates (fitted value-57.579 [mm])

Float_t D=57.579; //distance from the DCOPS ref dowel pin to the first CCD pixel

Float_t z_cms_CCD2pixel1_3[1]={cmsz_c[3]-D};

Float_t z_cms_CCD2pixel1_2[1]={cmsz_c[2]-D};

Float_t z_cms_CCD2pixel1_7[1]={cmsz_c[7]-D};

Float_t z_cms_CCD2pixel1_8[1]={cmsz_c[8]-D};

Float_t z_cms_CCD2pixel1_13[1]={cmsz_c[13]-D};

Float_t z_cms_CCD2pixel1_12[1]={cmsz_c[12]-D};

Float_t z_cms_CCD2pixel1_17[1]={cmsz_c[17]-D};

Float_t z_cms_CCD2pixel1_18[1]={cmsz_c[18]-D};

Float_t z_cms_CCD2pixel1_22[1]={cmsz_c[22]-D};

//Errors are not known

Float_t ex_slm_CCD2pixel1_3[1] ={0.};

Float_t ex_slm_CCD2pixel1_2[1] ={0.};

Float_t ex_slm_CCD2pixel1_7[1] ={0.};

Float_t ex_slm_CCD2pixel1_8[1] ={0.};

Float_t ex_slm_CCD2pixel1_13[1] ={0.};

Float_t ex_slm_CCD2pixel1_12[1] ={0.};

Float_t ex_slm_CCD2pixel1_17[1] ={0.};

Float_t ex_slm_CCD2pixel1_18[1] ={0.};

Float_t ex_slm_CCD2pixel1_22[1] ={0.};

//For now I will set the error for the DCOPS dowel Z_CMS pos. equal to the error for the DCOPS slmy position

Float_t ez_cms_CCD2pixel1_3[1] = {slmy_ce[3]};

Float_t ez_cms_CCD2pixel1_2[1] = {slmy_ce[2]};

Float_t ez_cms_CCD2pixel1_7[1] = {slmy_ce[7]};

Float_t ez_cms_CCD2pixel1_8[1] = {slmy_ce[8]};

Float_t ez_cms_CCD2pixel1_13[1] = {slmy_ce[13]};

Float_t ez_cms_CCD2pixel1_12[1] = {slmy_ce[12]};

Float_t ez_cms_CCD2pixel1_17[1] = {slmy_ce[17]};

Float_t ez_cms_CCD2pixel1_18[1] = {slmy_ce[18]};

Float_t ez_cms_CCD2pixel1_22[1] = {slmy_ce[22]};

//Graph CCD2 pixel 1 coordinates and errors

TGraphErrors *gr_CCD2pixel1_3 =new TGraphErrors(1,x_slm_CCD2pixel1_3,z_cms_CCD2pixel1_3,ex_slm_CCD2pixel1_3,ez_cms_CCD2pixel1_3);

TGraphErrors *gr_CCD2pixel1_2 =new TGraphErrors(1,x_slm_CCD2pixel1_2,z_cms_CCD2pixel1_2,ex_slm_CCD2pixel1_2,ez_cms_CCD2pixel1_2);

TGraphErrors *gr_CCD2pixel1_7 =new TGraphErrors(1,x_slm_CCD2pixel1_7,z_cms_CCD2pixel1_7,ex_slm_CCD2pixel1_7,ez_cms_CCD2pixel1_7);

TGraphErrors *gr_CCD2pixel1_8 =new TGraphErrors(1,x_slm_CCD2pixel1_8,z_cms_CCD2pixel1_8,ex_slm_CCD2pixel1_8,ez_cms_CCD2pixel1_8);

TGraphErrors *gr_CCD2pixel1_13 =new TGraphErrors(1,x_slm_CCD2pixel1_13,z_cms_CCD2pixel1_13,ex_slm_CCD2pixel1_13,ez_cms_CCD2pixel1_13);

TGraphErrors *gr_CCD2pixel1_12 =new TGraphErrors(1,x_slm_CCD2pixel1_12,z_cms_CCD2pixel1_12,ex_slm_CCD2pixel1_12,ez_cms_CCD2pixel1_12);

TGraphErrors *gr_CCD2pixel1_17 =new TGraphErrors(1,x_slm_CCD2pixel1_17,z_cms_CCD2pixel1_17,ex_slm_CCD2pixel1_17,ez_cms_CCD2pixel1_17);

TGraphErrors *gr_CCD2pixel1_18 =new TGraphErrors(1,x_slm_CCD2pixel1_18,z_cms_CCD2pixel1_18,ex_slm_CCD2pixel1_18,ez_cms_CCD2pixel1_18);

TGraphErrors *gr_CCD2pixel1_22 =new TGraphErrors(1,x_slm_CCD2pixel1_22,z_cms_CCD2pixel1_22,ex_slm_CCD2pixel1_22,ez_cms_CCD2pixel1_22);

//Set marker to plot CCD2 pixel1 positions

gr_CCD2pixel1_3->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_3->SetMarkerSize(0.6);

gr_CCD2pixel1_3->SetMarkerColor(12);//gray

gr_CCD2pixel1_3->Draw("P");

gr_CCD2pixel1_2->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_2->SetMarkerSize(0.6);

gr_CCD2pixel1_2->SetMarkerColor(12);//gray

gr_CCD2pixel1_2->Draw("P");

gr_CCD2pixel1_7->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_7->SetMarkerSize(0.6);

gr_CCD2pixel1_7->SetMarkerColor(12);//gray

gr_CCD2pixel1_7->Draw("P");

gr_CCD2pixel1_8->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_8->SetMarkerSize(0.6);

gr_CCD2pixel1_8->SetMarkerColor(12);//gray

gr_CCD2pixel1_8->Draw("P");

gr_CCD2pixel1_13->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_13->SetMarkerSize(0.6);

gr_CCD2pixel1_13->SetMarkerColor(12);//gray

gr_CCD2pixel1_13->Draw("P");

gr_CCD2pixel1_12->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_12->SetMarkerSize(0.6);

gr_CCD2pixel1_12->SetMarkerColor(12);//gray

gr_CCD2pixel1_12->Draw("P");

gr_CCD2pixel1_17->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_17->SetMarkerSize(0.6);

gr_CCD2pixel1_17->SetMarkerColor(12);//gray

gr_CCD2pixel1_17->Draw("P");

gr_CCD2pixel1_18->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_18->SetMarkerSize(0.6);

gr_CCD2pixel1_18->SetMarkerColor(12);//gray

gr_CCD2pixel1_18->Draw("P");

gr_CCD2pixel1_22->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_22->SetMarkerSize(0.6);

gr_CCD2pixel1_22->SetMarkerColor(12);//gray

gr_CCD2pixel1_22->Draw("P");

//Draw a 28.672 [mm] (lenght of CCD) line from the CCD2 pixel 1.

//Add 28.672 [mm] to z_cms_CCD2pixel1_#

Float_t L=28.672;

TLine *lccd1=new TLine(-3400.,cmsz_c[3]-D+L, -3400.,cmsz_c[3]-D);

lccd1->SetLineColor(808);

lccd1->SetLineWidth(3.);

lccd1->Draw();

TLine *lccd2=new TLine(-1500.,cmsz_c[2]-D+L, -1500.,cmsz_c[2]-D);

lccd2->SetLineColor(808);

lccd2->SetLineWidth(3.);

lccd2->Draw();

TLine *lccd3=new TLine(1500.,cmsz_c[7]-D+L, 1500.,cmsz_c[7]-D);

lccd3->SetLineColor(808);

lccd3->SetLineWidth(3.);

lccd3->Draw();

TLine *lccd4=new TLine(3400.,cmsz_c[8]-D+L, 3400.,cmsz_c[8]-D);

lccd4->SetLineColor(808);

lccd4->SetLineWidth(3.);

lccd4->Draw();

TLine *lccd5=new TLine(-7000.,cmsz_c[13]-D+L, -7000.,cmsz_c[13]-D);

lccd5->SetLineColor(808);

lccd5->SetLineWidth(3.);

lccd5->Draw();

TLine *lccd6=new TLine(-3900.,cmsz_c[12]-D+L, -3900.,cmsz_c[12]-D);

lccd6->SetLineColor(808);

lccd6->SetLineWidth(3.);

lccd6->Draw();

TLine *lccd7=new TLine(3900.,cmsz_c[17]-D+L, 3900.,cmsz_c[17]-D);

lccd7->SetLineColor(808);

lccd7->SetLineWidth(3.);

lccd7->Draw();

TLine *lccd8=new TLine(7000.,cmsz_c[18]-D+L, 7000.,cmsz_c[18]-D);

lccd8->SetLineColor(808);

lccd8->SetLineWidth(3.);

lccd8->Draw();

TLine *lccd9=new TLine(-7200.,cmsz_c[22]-D+L, -7200.,cmsz_c[22]-D);

lccd9->SetLineColor(808);

lccd9->SetLineWidth(3.);

lccd9->Draw();

//Define CCD2(R)_meas coordinates and errors

//DCOPS:

//ref 2_08_out 2_08_in 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out

//-7100 -7000 -3900 -3400 -1500 1500 3400 3900 7000

//This is the CCD2_meas approx. slmx_c coordinate

//Move these coordinates to the left by 100 [mm] so we can distinguish the CCD2 and CCD4 measured values

//Float_t x_slm_CCD2_meas[9] ={-7200.,-7100.,-4000.,-3500.,-1600.,1400.,3300.,3800.,6900.}; //[mm]

Float_t x_slm_CCD2_meas[9] ={-7200.,-7100.,-4000.,-3500.,-1600.,1400.,3300.,3800.,6900.};

//This is the dcops_meas cmsz_c coordinate (CCD2 pixel 1 position+ measured distance to the first CCD2 pixel)

Float_t z_cms_CCD2_meas[7] ={8002.024,8001.875,8001.558,8001.291,8001.434,8001.205,8001.4916};//[mm]

//Measured distance to the first CCD2 pixel={6.552, 13.691,19.032,17.134,17.337,16.942,18.351}; //[mm]

//z_cms_CCD2pixel1={ 7995.472, 7988.184, 7982.526, 7984.157,7984.0976,7984.263,7983.1406}; //[mm]

TLegend *leg = new TLegend(0.75,0.8,0.98,0.98);

leg->AddEntry(gr1,"CSC center (fitted)","P");

leg->AddEntry(gr_apin5,"alignment pin (fitted)","P");

leg->AddEntry(gr_dcops2,"DCOPS dowel (fitted)","P");

//leg->AddEntry(gr_CCD2_meas,"CCD2/Right (measured)","P");

//leg->AddEntry(gr_CCD4_meas,"CCD4/Left (measured)","P");

leg->AddEntry(gr_CCD2pixel1_3,"CCD2/Right pixel 1","P");

//leg->AddEntry(gr_las5,"laser 5","P");

leg->Draw();

TPaveText *pt=new TPaveText(9358,8085,13270,8102);

TText *t1=pt->AddText("FQ=3.16X10^{-5}");

TText *t2=pt->AddText("#chi^{2}=456.728");

t1->SetTextSize(0.03);

t1->SetTextFont(42);

t1->SetTextColor(1);

t2->SetTextSize(0.03);

t2->SetTextFont(42);

t2->SetTextColor(1);

pt->Draw();

//produce a .gif file; for other formats see page 134.

c1->Print("ME2_SLM25_LAS2.gif");

}

--------------------

To do:

1) CCD2 and CCD4 measured

2) laser position and laser line

3) check apin pos relative to DCOPS pos

4) plot start point for laser

5) laser line not straight; check manual

6) zoom on DCOPS for both las 2 and las 5

7) interpretation

See pictures on the next page (these are not finalized yet).

[pic]

[pic]

May 29 -31, April 1

+++++++++++++++++++

Measured values for laser 2:

CCD2 (RIGHT=R)

===================================

// file id: 35, ME+2_reference2>in

COPS id1

R 18.190 2.428

// file id: 36, DCOPS_outer+22_08>out

COPS id2

R 19.162 1.835

// file id: 37, DOPS_inner+22_08>out

COPS id3

R 18.960 1.908

// file id: 38, DCOPS_outer+21_04>OUT

COPS id4

R 16.680 9.343

// file id: 39,DCOPS_inner+21_04>OUT

COPS id5

R 17.616 2.092

// file id: 40,DCOPS_inner+21_14>IN

COPS id6

R 13.201 4.457

// file id: 41, DCOPS_outer+21_14>IN

COPS id7

R 5.309 58.865

// file id: 42, DCOPS_inner+22_27>IN

COPS id8

R 3.770 16.166

// file id: 43, DCOPS_outer+22_27>IN

COPS id9

R 0 14336.

//ref 2_08_out 2_08_in 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out

//-7100 -7000 -3900 -3400 -1500 1500 3400 3900 7000

--------------------------------

CCD4 (LEFT=L)

==================================

// file id: 35, ME+2_reference2>in

COPS id1

L 18.340 2.407

// file id: 36

COPS id2, DCOPS_outer+22_08>out

L 18.134 11.982

// file id: 37, DOPS_inner+22_08>out

COPS id3

L 18.213 2.668

// file id: 38, DCOPS_outer+21_04>OUT

COPS id4

L 15.813 1.938

// file id: 39,DCOPS_inner+21_04>OUT

COPS id5

L 16.888 2.829

// file id: 40,DCOPS_inner+21_14>IN

COPS id6

L 12.729 2.924

// file id: 41, DCOPS_outer+21_14>IN

COPS id7

L 5.179 4.038

// file id: 42, DCOPS_inner+22_27>IN

COPS id8

L 2.300 10188.947

// file id: 43, DCOPS_outer+22_27>IN

COPS id9

L 0 14336.

// file id: 44, ME+2_reference2>IN

// COPS id10

// L 1.898 9537.024

====================================

Measurement part of the graphical script:

//Define CCD2(R)_meas coordinates and errors

//DCOPS:

//ref 2_08_out 2_08_in 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out

//-7100 -7000 -3900 -3400 -1500 1500 3400 3900 7000

//This is the CCD2_meas approx. slmx_c coordinate

//Move these coordinates to the left by 100 [mm] so we can distinguish the CCD2 and CCD4 measured values

Float_t x_slm_CCD2_meas1[1]={-7200.};

Float_t x_slm_CCD2_meas2[1]={-7100.};

Float_t x_slm_CCD2_meas3[1]={-4000.};

Float_t x_slm_CCD2_meas4[1]={-3500.};

Float_t x_slm_CCD2_meas5[1]={-1600.};

Float_t x_slm_CCD2_meas6[1]={1400.};

Float_t x_slm_CCD2_meas7[1]={3300.};

Float_t x_slm_CCD2_meas8[1]={3800.};

Float_t x_slm_CCD2_meas9[1]={6900.};

//This is the dcops_meas cmsz_c coordinate (CCD2 pixel 1 position+ measured distance to the first CCD2 pixel)

Float_t D=57.579; //distance from the DCOPS ref dowel pin to the first CCD pixel

Float_t z_cms_CCD2_meas1[1]={cmsz_c[22]-D+18.190};

Float_t z_cms_CCD2_meas2[1]={cmsz_c[13]-D+19.162};

Float_t z_cms_CCD2_meas3[1]={cmsz_c[12]-D+18.960};

Float_t z_cms_CCD2_meas4[1]={cmsz_c[3]-D+16.680};

Float_t z_cms_CCD2_meas5[1]={cmsz_c[2]-D+17.616};

Float_t z_cms_CCD2_meas6[1]={cmsz_c[7]-D+13.201};

Float_t z_cms_CCD2_meas7[1]={cmsz_c[8]-D+5.309};

Float_t z_cms_CCD2_meas8[1]={cmsz_c[17]-D+3.770};

Float_t z_cms_CCD2_meas9[1]={cmsz_c[18]-D+0.};

//Errors in slm_x direction are not known

Float_t ex_slm_CCD2_meas1[1] ={0.};

Float_t ex_slm_CCD2_meas2[1] ={0.};

Float_t ex_slm_CCD2_meas3[1] ={0.};

Float_t ex_slm_CCD2_meas4[1] ={0.};

Float_t ex_slm_CCD2_meas5[1] ={0.};

Float_t ex_slm_CCD2_meas6[1] ={0.};

Float_t ex_slm_CCD2_meas7[1] ={0.};

Float_t ex_slm_CCD2_meas8[1] ={0.};

Float_t ex_slm_CCD2_meas9[1] ={0.};

//the error for the DCOPS_meas dowel Z_CMS pos. are from the measurement file

//in the measurement file error units are in [um] {2.428,1.835,1.908,9.343,2.092,4.457,58.865,16.166,14336.}

Float_t ez_cms_CCD2_meas1[1] = {0.002428}; //[mm]

Float_t ez_cms_CCD2_meas2[1] = {0.001835};

Float_t ez_cms_CCD2_meas3[1] = {0.001908};

Float_t ez_cms_CCD2_meas4[1] = {0.009343};

Float_t ez_cms_CCD2_meas5[1] = {0.002092};

Float_t ez_cms_CCD2_meas6[1] = {0.004457};

Float_t ez_cms_CCD2_meas7[1] = {0.058865};

Float_t ez_cms_CCD2_meas8[1] = {0.016166};

Float_t ez_cms_CCD2_meas9[1] = {14.336};

//Graph DCOPS_meas ref dowel pin coordinates and errors

TGraphErrors *gr_CCD2_meas1 =new TGraphErrors(1,x_slm_CCD2_meas1,z_cms_CCD2_meas1,ex_slm_CCD2_meas1,ez_cms_CCD2_meas1);

TGraphErrors *gr_CCD2_meas2 =new TGraphErrors(1,x_slm_CCD2_meas2,z_cms_CCD2_meas2,ex_slm_CCD2_meas2,ez_cms_CCD2_meas2);

TGraphErrors *gr_CCD2_meas3 =new TGraphErrors(1,x_slm_CCD2_meas3,z_cms_CCD2_meas3,ex_slm_CCD2_meas3,ez_cms_CCD2_meas3);

TGraphErrors *gr_CCD2_meas4 =new TGraphErrors(1,x_slm_CCD2_meas4,z_cms_CCD2_meas4,ex_slm_CCD2_meas4,ez_cms_CCD2_meas4);

TGraphErrors *gr_CCD2_meas5 =new TGraphErrors(1,x_slm_CCD2_meas5,z_cms_CCD2_meas5,ex_slm_CCD2_meas5,ez_cms_CCD2_meas5);

TGraphErrors *gr_CCD2_meas6 =new TGraphErrors(1,x_slm_CCD2_meas6,z_cms_CCD2_meas6,ex_slm_CCD2_meas6,ez_cms_CCD2_meas6);

TGraphErrors *gr_CCD2_meas7 =new TGraphErrors(1,x_slm_CCD2_meas7,z_cms_CCD2_meas7,ex_slm_CCD2_meas7,ez_cms_CCD2_meas7);

TGraphErrors *gr_CCD2_meas8 =new TGraphErrors(1,x_slm_CCD2_meas8,z_cms_CCD2_meas8,ex_slm_CCD2_meas8,ez_cms_CCD2_meas8);

TGraphErrors *gr_CCD2_meas9 =new TGraphErrors(1,x_slm_CCD2_meas9,z_cms_CCD2_meas9,ex_slm_CCD2_meas9,ez_cms_CCD2_meas9);

//Set marker to plot meas ref dowel pin positions

gr_CCD2_meas1->SetMarkerStyle(4); //empty circle

gr_CCD2_meas1->SetMarkerSize(0.6);

gr_CCD2_meas1->SetMarkerColor(4);//blue

gr_CCD2_meas1->Draw("P");

gr_CCD2_meas2->SetMarkerStyle(4); //empty circle

gr_CCD2_meas2->SetMarkerSize(0.6);

gr_CCD2_meas2->SetMarkerColor(4);//blue

gr_CCD2_meas2->Draw("P");

gr_CCD2_meas3->SetMarkerStyle(4); //empty circle

gr_CCD2_meas3->SetMarkerSize(0.6);

gr_CCD2_meas3->SetMarkerColor(4);//blue

gr_CCD2_meas3->Draw("P");

gr_CCD2_meas4->SetMarkerStyle(4); //empty circle

gr_CCD2_meas4->SetMarkerSize(0.6);

gr_CCD2_meas4->SetMarkerColor(4);//blue

gr_CCD2_meas4->Draw("P");

gr_CCD2_meas5->SetMarkerStyle(4); //empty circle

gr_CCD2_meas5->SetMarkerSize(0.6);

gr_CCD2_meas5->SetMarkerColor(4);//blue

gr_CCD2_meas5->Draw("P");

gr_CCD2_meas6->SetMarkerStyle(4); //empty circle

gr_CCD2_meas6->SetMarkerSize(0.6);

gr_CCD2_meas6->SetMarkerColor(4);//blue

gr_CCD2_meas6->Draw("P");

gr_CCD2_meas7->SetMarkerStyle(4); //empty circle

gr_CCD2_meas7->SetMarkerSize(0.6);

gr_CCD2_meas7->SetMarkerColor(4);//blue

gr_CCD2_meas7->Draw("P");

gr_CCD2_meas8->SetMarkerStyle(4); //empty circle

gr_CCD2_meas8->SetMarkerSize(0.6);

gr_CCD2_meas8->SetMarkerColor(4);//blue

gr_CCD2_meas8->Draw("P");

gr_CCD2_meas9->SetMarkerStyle(4); //empty circle

gr_CCD2_meas9->SetMarkerSize(0.6);

gr_CCD2_meas9->SetMarkerColor(4);//blue

gr_CCD2_meas9->Draw("P");

//Define CCD4(R)_meas coordinates and errors

//DCOPS:

//ref 2_08_out 2_08_in 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out

//-7100 -7000 -3900 -3400 -1500 1500 3400 3900 7000

//This is the CCD4_meas approx. slmx_c coordinate

//Move these coordinates to the right by 100 [mm] so we can distinguish the CCD2 and CCD4 measured values

Float_t x_slm_CCD4_meas1[1]={-7000.};

Float_t x_slm_CCD4_meas2[1]={-6900.};

Float_t x_slm_CCD4_meas3[1]={-3800.};

Float_t x_slm_CCD4_meas4[1]={-3300.};

Float_t x_slm_CCD4_meas5[1]={-1400.};

Float_t x_slm_CCD4_meas6[1]={1600.};

Float_t x_slm_CCD4_meas7[1]={3500.};

Float_t x_slm_CCD4_meas8[1]={4000.};

Float_t x_slm_CCD4_meas9[1]={7100.};

coutSetMarkerSize(0.6);

gr_CCD4_meas2->SetMarkerColor(1);//black

gr_CCD4_meas2->Draw("P");

gr_CCD4_meas3->SetMarkerStyle(4); //empty circle

gr_CCD4_meas3->SetMarkerSize(0.6);

gr_CCD4_meas3->SetMarkerColor(1);//black

gr_CCD4_meas3->Draw("P");

gr_CCD4_meas4->SetMarkerStyle(4); //empty circle

gr_CCD4_meas4->SetMarkerSize(0.6);

gr_CCD4_meas4->SetMarkerColor(1);//black

gr_CCD4_meas4->Draw("P");

gr_CCD4_meas5->SetMarkerStyle(4); //empty circle

gr_CCD4_meas5->SetMarkerSize(0.6);

gr_CCD4_meas5->SetMarkerColor(1);//black

gr_CCD4_meas5->Draw("P");

gr_CCD4_meas6->SetMarkerStyle(4); //empty circle

gr_CCD4_meas6->SetMarkerSize(0.6);

gr_CCD4_meas6->SetMarkerColor(1);//black

gr_CCD4_meas6->Draw("P");

gr_CCD4_meas7->SetMarkerStyle(4); //empty circle

gr_CCD4_meas7->SetMarkerSize(0.6);

gr_CCD4_meas7->SetMarkerColor(1);//black

gr_CCD4_meas7->Draw("P");

gr_CCD4_meas8->SetMarkerStyle(4); //empty circle

gr_CCD4_meas8->SetMarkerSize(0.6);

gr_CCD4_meas8->SetMarkerColor(1);//black

gr_CCD4_meas8->Draw("P");

gr_CCD4_meas9->SetMarkerStyle(4); //empty circle

gr_CCD4_meas9->SetMarkerSize(0.6);

gr_CCD4_meas9->SetMarkerColor(1);//black

gr_CCD4_meas9->Draw("P");

//This is laser 2 approx. slmx_c coordinate

//Marcus used the value: -7175.883 [mm]

//I will move this to -7600 so it does not overlap with the ref sensor measurement

Float_t x_slm_las2[1] ={-7600.}; //[mm]

//This is laser 2 cmsz_c coordinate

Float_t z_cms_las2[1] ={cmsz_c[23]}; //[mm]

Float_t ex_slm_las2[1] ={0.};

Float_t ez_cms_las2[1] = {0.05};

//Graph laser position and error

TGraphErrors *gr_las2 =new TGraphErrors(1,x_slm_las2,z_cms_las2,ex_slm_las2,ez_cms_las2);

//Set marker to plot laser position

gr_las2->SetMarkerStyle(21);//square

gr_las2->SetMarkerSize(1.2);

gr_las2->SetMarkerColor(2); //red

gr_las2->Draw("P");

TLegend *leg = new TLegend(0.75,0.8,0.98,0.98);

leg->AddEntry(gr1,"CSC center (fitted)","P");

leg->AddEntry(gr_apin5,"alignment pin (fitted)","P");

leg->AddEntry(gr_dcops2,"DCOPS dowel (fitted)","P");

leg->AddEntry(gr_CCD2_meas1,"CCD2/Right (measured)","P");

leg->AddEntry(gr_CCD4_meas1,"CCD4/Left (measured)","P");

leg->AddEntry(gr_CCD2pixel1_3,"CCD2/Right pixel 1","P");

leg->AddEntry(gr_las2,"laser 2","P");

leg->Draw();

-------------------------------------------------

Due to the large uncertainty on CCD2 and CCD4 for 2_27_in 2_27_out on

Lchamber27, I remove this CSC.=> Make a new fit with COCOA.

rename ME2_SLM25_las2.txt ME2_SLM25_las2_7DCOPS.txt

with 9DCOPS, call it: ME2_SLM25_las2_9DCOPS.txt

measurement files for

7DCOPS:slm25_b0t_data_ev21_03Nov06_00_01_laser2_only_7DCOPS.txt

9DCOPS:slm25_b0t_data_ev21_03Nov06_00_01_laser2_only_9DCOPS.txt

run cocoa on ME2_SLM25_las2_7DCOPS.txt

&

root -b -p -q .x readFile.C++\(\"report.out\"\)

Result (use this for the slm .dat file):

CMS/slm_p2_2 289.778 0 -77.6457 0 7998 0 -90 0 0 0 75 0 289.778 0 -77.6457 0 7998 0 -90 0 0 0 75 0 289.778 0 -77.6457 0 7998 0 -90 0 0 0 75 0 289.778 0 -77.6457 0 7998 0 -90 0 0 0 75 0

CMS/slm_p2_2/MEp2_1_04 -2371.28 0.1 -91.381 4.54402 112.461 3.24416 -0.765893 0.152622 -80.2127 0.0391503 0.819209 0.152216 -2371.28 0.1 -92.6517 4.55075 111.896 3.24318 -0.724528 0.155322 -80.2053 0.0391492 0.75921 0.154466 -2371.28 0.1 -92.646 4.55076 112.078 3.24334 -0.725213 0.155307 -80.2075 0.0391502 0.759958 0.154452 -2371.28 0.1 -92.6456 4.55077 112.076 3.24335 -0.724989 0.155312 -80.2075 0.0391502 0.759741 0.154457

CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT 13.1095 0.143976 42.2093 0.537262 -884.33 0.0999997 0 0.000114592 10 0.000114592 1.71402e-06 0.000114592 13.111 0.143976 42.2326 0.537258 -884.33 0.0999998 0 0.000114592 10 0.000114592 1.63768e-06 0.000114592 13.111 0.143976 42.2326 0.537258 -884.33 0.0999998 0 0.000114592 10 0.000114592 1.63801e-06 0.000114592 13.111 0.143976 42.2326 0.537258 -884.33 0.0999998 0 0.000114592 10 0.000114592 1.63808e-06 0.000114592

CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT -272.083 0.143976 44.9907 0.537262 992.094 0.0999997 0 0.000114592 -10 0.000114592 5.62139e-07 0.000114591 -272.085 0.143976 44.9674 0.537258 992.094 0.0999998 0 0.000114592 -10 0.000114592 4.98153e-07 0.000114591 -272.085 0.143976 44.9674 0.537258 992.094 0.0999998 0 0.000114592 -10 0.000114592 4.98006e-07 0.000114591 -272.085 0.143976 44.9674 0.537258 992.094 0.0999998 0 0.000114592 -10 0.000114592 4.98052e-07 0.000114591

CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 2.9963e-14 0 -6.76864e-13 0 -968.883 0 0 0 0 0 0 0 -3.25835e-14 0 8.05261e-13 0 -968.883 0 0 0 0 0 0 0 7.50865e-14 0 3.37001e-13 0 -968.883 0 0 0 0 0 0 0 2.04598e-14 0 -5.77371e-13 0 -968.883 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 1.34468e-13 0 -4.84311e-13 0 988.187 0 0 0 0 0 0 0 -6.8729e-14 0 7.46134e-13 0 988.187 0 0 0 0 0 0 0 -2.05833e-13 0 4.36343e-13 0 988.187 0 0 0 0 0 0 0 -1.55951e-14 0 -4.48104e-13 0 988.187 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_1_14 2371.28 0.1 -103.25 9.03168 111.071 6.44068 0.319652 0.159217 79.9502 0.0391621 -0.0603106 0.157137 2371.28 0.1 -105.731 9.04259 109.961 6.44032 0.394386 0.157119 79.9564 0.039161 0.00108964 0.156075 2371.28 0.1 -105.72 9.04263 110.323 6.44049 0.394268 0.157129 79.9542 0.0391632 0.00103558 0.156082 2371.28 0.1 -105.719 9.04263 110.319 6.44049 0.394316 0.157126 79.9543 0.0391632 0.00109062 0.156079

CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN -13.1064 0.143976 42.0882 0.537268 -884.33 0.0999997 0 0.000114592 10 0.000114592 4.8112e-07 0.000114591 -13.1067 0.143976 42.0997 0.537275 -884.33 0.0999997 0 0.000114592 10 0.000114592 5.66316e-07 0.000114591 -13.1067 0.143976 42.0997 0.537275 -884.33 0.0999997 0 0.000114592 10 0.000114592 5.66386e-07 0.000114591 -13.1067 0.143976 42.0997 0.537275 -884.33 0.0999997 0 0.000114592 10 0.000114592 5.66383e-07 0.000114591

CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN 272.08 0.143976 45.0864 0.537268 992.094 0.0999997 0 0.000114592 -10 0.000114592 -7.87819e-08 0.000114592 272.081 0.143976 45.1003 0.537275 992.094 0.0999997 0 0.000114592 -10 0.000114592 0 0.000114592 272.081 0.143976 45.1003 0.537275 992.094 0.0999997 0 0.000114592 -10 0.000114592 0 0.000114592 272.081 0.143976 45.1003 0.537275 992.094 0.0999997 0 0.000114592 -10 0.000114592 0 0.000114592

CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 2.22292e-14 0 -1.44841e-13 0 -968.883 0 0 0 0 0 0 0 8.86682e-15 0 8.67584e-13 0 -968.883 0 0 0 0 0 0 0 3.13821e-14 0 7.94756e-13 0 -968.883 0 0 0 0 0 0 0 -5.22744e-14 0 7.3225e-13 0 -968.883 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 -1.09888e-14 0 -3.73537e-13 0 988.187 0 0 0 0 0 0 0 -2.40233e-14 0 3.55661e-14 0 988.187 0 0 0 0 0 0 0 2.47237e-15 0 3.8359e-13 0 988.187 0 0 0 0 0 0 0 1.19667e-14 0 -5.61028e-14 0 988.187 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_2_08 -5225.85 0.1 -91.3976 1.88465 146.656 1.32421 -0.849558 0.112198 -85.025 0.0388449 0.865736 0.11429 -5225.85 0.1 -92.1227 1.88022 146.354 1.32332 -0.276637 0.161312 -85.0187 0.0388479 0.285355 0.161121 -5225.85 0.1 -92.1204 1.88024 146.428 1.32394 -0.277365 0.1613 -85.0207 0.0388447 0.286154 0.16111 -5225.85 0.1 -92.1202 1.88022 146.427 1.32394 -0.277522 0.161301 -85.0206 0.0388447 0.286317 0.161109

CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT -19.9218 0.14399 46.1243 0.537708 -1317.83 0.1 0 0.000114592 -5 0.000114592 1.13992e-06 0.000114591 -19.9211 0.14399 46.1302 0.537724 -1317.83 0.1 0 0.000114592 -5 0.000114592 1.08599e-06 0.000114591 -19.9216 0.14399 46.13 0.537724 -1317.83 0.1 0 0.000114592 -5 0.000114592 1.0863e-06 0.000114591 -19.9216 0.14399 46.13 0.537724 -1317.83 0.1 0 0.000114592 -5 0.000114592 1.08624e-06 0.000114591

CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT -280.199 0.14399 50.0757 0.537708 1657.15 0.1 0 0.000114592 -5 0.000114592 0 0.000114592 -280.2 0.14399 50.0698 0.537724 1657.15 0.1 0 0.000114592 -5 0.000114592 5.26244e-07 0.000114591 -280.199 0.14399 50.07 0.537724 1657.15 0.1 0 0.000114592 -5 0.000114592 5.26074e-07 0.000114591 -280.199 0.14399 50.07 0.537724 1657.15 0.1 0 0.000114592 -5 0.000114592 5.26044e-07 0.000114591

CMS/slm_p2_2/MEp2_2_08/apin_inner_MEp2_2_08 1.79964e-13 0 7.57957e-14 0 -1635.89 0 0 0 0 0 0 0 -1.25205e-13 0 6.27483e-13 0 -1635.89 0 0 0 0 0 0 0 -1.59336e-13 0 4.47988e-13 0 -1635.89 0 0 0 0 0 0 0 -6.35415e-15 0 1.43124e-13 0 -1635.89 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_2_08/apin_outer_MEp2_2_08 5.17354e-15 0 3.02796e-13 0 1655.19 0 0 0 0 0 0 0 3.0158e-14 0 -6.92086e-13 0 1655.19 0 0 0 0 0 0 0 1.14306e-13 0 -5.72451e-13 0 1655.19 0 0 0 0 0 0 0 -8.5129e-14 0 7.15253e-13 0 1655.19 0 0 0 0 0 0 0

CMS/slm_p2_2/MEp2_tp2 -7175.83 0.1 -43.25 0.1 22.5 0.1 -0.0245303 0.0390483 -89.9912 0.0382861 -0.0245302 0.0390483 -7175.83 0.1 -43.25 0.1 22.5 0.1 -0.0318041 0.039068 -89.9848 0.038284 -0.0318637 0.0390679 -7175.83 0.1 -43.25 0.1 22.5 0.1 -0.03175 0.0390681 -89.987 0.0382852 -0.0318533 0.039068 -7175.83 0.1 -43.25 0.1 22.5 0.1 -0.0317537 0.0390681 -89.9869 0.0382852 -0.0318428 0.0390679

CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN 0.0547401 0.0199057 0.532409 0.0199057 1.21017e-13 0.02 0 0.000572958 0 0.000572958 -4.1456e-05 0.000572945 0.0547478 0.0199057 0.532256 0.0199057 -4.55283e-07 0.02 0 0.000572958 0 0.000572958 -4.41953e-05 0.000572945 0.0547528 0.0199057 0.532256 0.0199057 -6.68243e-07 0.02 0 0.000572958 0 0.000572958 -4.41937e-05 0.000572945 0.0547527 0.0199057 0.532256 0.0199057 -6.26741e-07 0.02 0 0.000572958 0 0.000572958 -4.41942e-05 0.000572945

CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 -27.974 0.0487006 40.0091 0.0488112 -3.89976e-13 0 -0.00050349 0.00572683 0.000179774 0.00572467 -0.00796298 0.00569342 -27.9748 0.0487018 40.0244 0.048667 -4.13401e-13 0 -0.000652795 0.00572689 0.00031464 0.00572466 -0.0080134 0.00569356 -27.9753 0.0487018 40.0244 0.0486678 -2.09461e-13 0 -0.000651647 0.00572689 0.000271883 0.00572466 -0.00801562 0.00569356 -27.9753 0.0487018 40.0244 0.0486678 8.92649e-14 0 -0.000651735 0.00572689 0.000272315 0.00572466 -0.00801566 0.00569356

The report.out file (only cms coord):

CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 CENTRE GLOBAL: (2.1417203,6.8550532,8.0012256)

CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 ROT_MATRIX GLOBAL: xx=0.96586562 xy=-0.00015522512 xz=0.25904357

CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 ROT_MATRIX GLOBAL: yx=-0.25904358 yy=-0.0011193405 yz=0.96586499

CMS/slm_p2_2/MEp2_tp2/laser_MEp2_2 ROT_MATRIX GLOBAL: zx=0.00014003146 zy=-0.99999936 zz=-0.0011213426

CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN CENTRE GLOBAL: (2.168805,6.8478347,8.0407177)

CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN ROT_MATRIX GLOBAL: xx=0.96586682 xy=-0.00028665813 xz=0.25903898

CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN ROT_MATRIX GLOBAL: yx=-0.25903914 yy=-0.001072315 yz=0.96586623

CMS/slm_p2_2/MEp2_tp2/DCOPS_MEp2_reference_2_IN ROT_MATRIX GLOBAL: zx=8.9797442e-07 zy=-0.99999938 zz=-0.0011099691

CMS/slm_p2_2/MEp2_tp2 CENTRE GLOBAL: (2.1687522,6.8478494,8.04125)

CMS/slm_p2_2/MEp2_tp2 ROT_MATRIX GLOBAL: xx=0.96586682 xy=-0.00028740293 xz=0.25903898

CMS/slm_p2_2/MEp2_tp2 ROT_MATRIX GLOBAL: yx=-0.25903914 yy=-0.0010721144 yz=0.96586623

CMS/slm_p2_2/MEp2_tp2 ROT_MATRIX GLOBAL: zx=1.2664008e-07 zy=-0.99999938 zz=-0.0011099683

CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN CENTRE GLOBAL: (-0.57416042,-3.3618538,8.0654277)

CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN ROT_MATRIX GLOBAL: xx=0.96613252 xy=-0.00058941093 xz=0.25804575

CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN ROT_MATRIX GLOBAL: yx=-0.25804365 yy=-0.0068379673 yz=0.96610906

CMS/slm_p2_2/MEp2_1_14/DCOPS_outer_MEp2_1_14_IN ROT_MATRIX GLOBAL: zx=0.0011950732 zy=-0.99997645 zz=-0.0067584763

CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN CENTRE GLOBAL: (-0.127992,-1.5170925,8.0555508)

CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN ROT_MATRIX GLOBAL: xx=-0.96613252 xy=-0.00058940094 xz=-0.25804575

CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN ROT_MATRIX GLOBAL: yx=0.25804365 yy=-0.0068379682 yz=-0.96610906

CMS/slm_p2_2/MEp2_1_14/DCOPS_inner_MEp2_1_14_IN ROT_MATRIX GLOBAL: zx=-0.001195083 zy=-0.99997645 zz=0.0067584746

CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 CENTRE GLOBAL: (-0.13372303,-1.4314376,8.0970691)

CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 ROT_MATRIX GLOBAL: xx=-0.99626397 xy=-0.00058941078 xz=-0.086358302

CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 ROT_MATRIX GLOBAL: yx=0.086360314 yy=-0.0068379673 yz=-0.9962405

CMS/slm_p2_2/MEp2_1_14/apin_inner_MEp2_1_14 ROT_MATRIX GLOBAL: zx=-3.320357e-06 zy=-0.99997645 zz=0.0068633222

CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 CENTRE GLOBAL: (-0.30273227,-3.38115,8.1105011)

CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 ROT_MATRIX GLOBAL: xx=-0.99626397 xy=-0.00058941078 xz=-0.086358302

CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 ROT_MATRIX GLOBAL: yx=0.086360314 yy=-0.0068379673 yz=-0.9962405

CMS/slm_p2_2/MEp2_1_14/apin_outer_MEp2_1_14 ROT_MATRIX GLOBAL: zx=-3.320357e-06 zy=-0.99997645 zz=0.0068633222

CMS/slm_p2_2/MEp2_1_14 CENTRE GLOBAL: (-0.21739412,-2.3966781,8.1037188)

CMS/slm_p2_2/MEp2_1_14 ROT_MATRIX GLOBAL: xx=-0.99626397 xy=-0.00058941078 xz=-0.086358302

CMS/slm_p2_2/MEp2_1_14 ROT_MATRIX GLOBAL: yx=0.086360314 yy=-0.0068379673 yz=-0.9962405

CMS/slm_p2_2/MEp2_1_14 ROT_MATRIX GLOBAL: zx=-3.320357e-06 zy=-0.99997645 zz=0.0068633222

CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT CENTRE GLOBAL: (0.65277219,1.3755567,8.048018)

CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT ROT_MATRIX GLOBAL: xx=-0.96685834 xy=-0.0018740538 xz=-0.25530654

CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT ROT_MATRIX GLOBAL: yx=0.25530437 yy=0.0013209321 yz=-0.96685983

CMS/slm_p2_2/MEp2_1_04/DCOPS_inner_MEp2_1_04_OUT ROT_MATRIX GLOBAL: zx=0.0021491899 zy=-0.99999737 zz=-0.00079870007

CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT CENTRE GLOBAL: (1.1806797,3.1986367,8.046702)

CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT ROT_MATRIX GLOBAL: xx=0.96685834 xy=-0.0018740357 xz=0.25530654

CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT ROT_MATRIX GLOBAL: yx=-0.25530437 yy=0.0013209238 yz=0.96685983

CMS/slm_p2_2/MEp2_1_04/DCOPS_outer_MEp2_1_04_OUT ROT_MATRIX GLOBAL: zx=-0.0021491703 zy=-0.99999737 zz=0.00079869673

CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 CENTRE GLOBAL: (0.60549374,1.3042378,8.0902451)

CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 ROT_MATRIX GLOBAL: xx=0.90783608 xy=-0.0018740278 xz=0.41932105

CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 ROT_MATRIX GLOBAL: yx=-0.41931917 yy=0.0013209202 yz=0.90783792

CMS/slm_p2_2/MEp2_1_04/apin_inner_MEp2_1_04 ROT_MATRIX GLOBAL: zx=-0.0022552031 zy=-0.99999737 zz=0.00041336318

CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 CENTRE GLOBAL: (1.4261344,3.0809402,8.0910541)

CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 ROT_MATRIX GLOBAL: xx=0.90783608 xy=-0.0018740278 xz=0.41932105

CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 ROT_MATRIX GLOBAL: yx=-0.41931917 yy=0.0013209202 yz=0.90783792

CMS/slm_p2_2/MEp2_1_04/apin_outer_MEp2_1_04 ROT_MATRIX GLOBAL: zx=-0.0022552031 zy=-0.99999737 zz=0.00041336318

CMS/slm_p2_2/MEp2_1_04 CENTRE GLOBAL: (1.0117668,2.1838266,8.0906456)

CMS/slm_p2_2/MEp2_1_04 ROT_MATRIX GLOBAL: xx=0.90783608 xy=-0.0018740278 xz=0.41932105

CMS/slm_p2_2/MEp2_1_04 ROT_MATRIX GLOBAL: yx=-0.41931917 yy=0.0013209202 yz=0.90783792

CMS/slm_p2_2/MEp2_1_04 ROT_MATRIX GLOBAL: zx=-0.0022552031 zy=-0.99999737 zz=0.00041336318

CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT CENTRE GLOBAL: (1.314747,3.7005366,8.0438213)

CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT ROT_MATRIX GLOBAL: xx=0.96601921 xy=-0.00036164259 xz=0.25847003

CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT ROT_MATRIX GLOBAL: yx=-0.25846995 yy=0.00027475602 yz=0.96601926

CMS/slm_p2_2/MEp2_2_08/DCOPS_inner_MEp2_2_08_OUT ROT_MATRIX GLOBAL: zx=-0.0004203699 zy=-0.9999999 zz=0.00017194585

CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT CENTRE GLOBAL: (2.0866266,6.5854074,8.0403949)

CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT ROT_MATRIX GLOBAL: xx=0.96601921 xy=-0.0003616334 xz=0.25847003

CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT ROT_MATRIX GLOBAL: yx=-0.25846995 yy=0.00027475268 yz=0.96601926

CMS/slm_p2_2/MEp2_2_08/DCOPS_outer_MEp2_2_08_OUT ROT_MATRIX GLOBAL: zx=-0.00042036016 zy=-0.9999999 zz=0.000171945

CMS/slm_p2_2/MEp2_2_08/apin_inner_MEp2_2_08 CENTRE GLOBAL: (1.2248134,3.3948048,8.0898999)

CMS/slm_p2_2/MEp2_2_08/apin_inner_MEp2_2_08 ROT_MATRIX GLOBAL: xx=0.93981607 xy=-0.00036162477 xz=0.3416806

CMS/slm_p2_2/MEp2_2_08/apin_inner_MEp2_2_08 ROT_MATRIX GLOBAL: yx=-0.34168052 yy=0.00027474954 yz=0.93981613

CMS/slm_p2_2/MEp2_2_08/apin_inner_MEp2_2_08 ROT_MATRIX GLOBAL: zx=-0.00043373738 zy=-0.9999999 zz=0.00013465389

CMS/slm_p2_2/MEp2_2_08/apin_outer_MEp2_2_08 CENTRE GLOBAL: (2.3493109,6.487813,8.090343)

CMS/slm_p2_2/MEp2_2_08/apin_outer_MEp2_2_08 ROT_MATRIX GLOBAL: xx=0.93981607 xy=-0.00036162477 xz=0.3416806

CMS/slm_p2_2/MEp2_2_08/apin_outer_MEp2_2_08 ROT_MATRIX GLOBAL: yx=-0.34168052 yy=0.00027474954 yz=0.93981613

CMS/slm_p2_2/MEp2_2_08/apin_outer_MEp2_2_08 ROT_MATRIX GLOBAL: zx=-0.00043373738 zy=-0.9999999 zz=0.00013465389

CMS/slm_p2_2/MEp2_2_08 CENTRE GLOBAL: (1.7837642,4.9322378,8.0901202)

CMS/slm_p2_2/MEp2_2_08 ROT_MATRIX GLOBAL: xx=0.93981607 xy=-0.00036162477 xz=0.3416806

CMS/slm_p2_2/MEp2_2_08 ROT_MATRIX GLOBAL: yx=-0.34168052 yy=0.00027474954 yz=0.93981613

CMS/slm_p2_2/MEp2_2_08 ROT_MATRIX GLOBAL: zx=-0.00043373738 zy=-0.9999999 zz=0.00013465389

CMS/slm_p2_2 CENTRE GLOBAL: (0.2897777,-0.0776457,7.998)

CMS/slm_p2_2 ROT_MATRIX GLOBAL: xx=-0.25881905 xy=5.9143945e-17 xz=0.96592583

CMS/slm_p2_2 ROT_MATRIX GLOBAL: yx=-0.96592583 yy=-1.5847572e-17 yz=-0.25881905

CMS/slm_p2_2 ROT_MATRIX GLOBAL: zx=0 zy=-1 zz=6.1230318e-17

Name the .dat file with slm coordinates: slm_fitc_las2_7DCOPS.dat

and the file with cms coordinates: cms_fitc_las2_7DCOPS.dat

Name the script slm_cms_readcocoaout_las2_7DCOPS.C

Rename the .dat file names and .C file in the script.

This is the slm_fitc_las2_7DCOPS.dat file (after formatting):

slm_p2_2 289.778 0 -77.6457 0 7998 0 -90 0 0 0 75 0

MEp2_1_04 -2371.28 0.1 -92.6456 4.55077 112.076 3.24335 -0.724989 0.155312 -80.2075 0.0391502 0.759741 0.154457

DCOPS_inner_MEp2_1_04_OUT 13.111 0.143976 42.2326 0.537258 -884.33 0.0999998 0 0.000114592 10 0.000114592 1.63808e-06 0.000114592

DCOPS_outer_MEp2_1_04_OUT -272.085 0.143976 44.9674 0.537258 992.094 0.0999998 0 0.000114592 -10 0.000114592 4.98052e-07 0.000114591

apin_inner_MEp2_1_04 2.04598e-14 0 -5.77371e-13 0 -968.883 0 0 0 0 0 0 0

apin_outer_MEp2_1_04 -1.55951e-14 0 -4.48104e-13 0 988.187 0 0 0 0 0 0 0

MEp2_1_14 2371.28 0.1 -105.719 9.04263 110.319 6.44049 0.394316 0.157126 79.9543 0.0391632 0.00109062 0.156079

DCOPS_inner_MEp2_1_14_IN -13.1067 0.143976 42.0997 0.537275 -884.33 0.0999997 0 0.000114592 10 0.000114592 5.66383e-07 0.000114591

DCOPS_outer_MEp2_1_14_IN 272.081 0.143976 45.1003 0.537275 992.094 0.0999997 0 0.000114592 -10 0.000114592 0 0.000114592

apin_inner_MEp2_1_14 -5.22744e-14 0 7.3225e-13 0 -968.883 0 0 0 0 0 0 0

apin_outer_MEp2_1_14 1.19667e-14 0 -5.61028e-14 0 988.187 0 0 0 0 0 0 0

MEp2_2_08 -5225.85 0.1 -92.1202 1.88022 146.427 1.32394 -0.277522 0.161301 -85.0206 0.0388447 0.286317 0.161109

DCOPS_inner_MEp2_2_08_OUT -19.9216 0.14399 46.13 0.537724 -1317.83 0.1 0 0.000114592 -5 0.000114592 1.08624e-06 0.000114591

DCOPS_outer_MEp2_2_08_OUT -280.199 0.14399 50.07 0.537724 1657.15 0.1 0 0.000114592 -5 0.000114592 5.26044e-07 0.00011459

apin_inner_MEp2_2_08 -6.35415e-15 0 1.43124e-13 0 -1635.89 0 0 0 0 0 0 0

apin_outer_MEp2_2_08 -8.5129e-14 0 7.15253e-13 0 1655.19 0 0 0 0 0 0 0

MEp2_tp2 -7175.83 0.1 -43.25 0.1 22.5 0.1 -0.0317537 0.0390681 -89.9869 0.0382852 -0.0318428 0.0390679

DCOPS_MEp2_reference_2_IN 0.0547527 0.0199057 0.532256 0.0199057 -6.26741e-07 0.02 0 0.000572958 0 0.000572958 -4.41942e-05 0.000572945

laser_MEp2_2 -27.9753 0.0487018 40.0244 0.0486678 8.92649e-14 0 -0.000651735 0.00572689 0.000272315 0.00572466 -0.00801566 0.00569356

This is the cms_fitc_las2_7DCOPS.dat file (after formatting):

----------------------------------------------------------------

slm_p2_2 289.7777 0. -77.6457 0. 7998. 0. 0. 0. 0. 0. 0. 0.

MEp2_1_04 1011.7668 0. 2183.8266 0. 8090.6456 0. 0. 0. 0. 0. 0. 0.

DCOPS_inner_MEp2_1_04_OUT 652.77219 0. 1375.5567 0. 8048.018 0. 0. 0. 0. 0. 0. 0.

DCOPS_outer_MEp2_1_04_OUT 1180.6797 0. 3198.6367 0. 8046.702 0. 0. 0. 0. 0. 0. 0.

apin_inner_MEp2_1_04 605.49374 0. 1304.2378 0. 8090.2451 0. 0. 0. 0. 0. 0. 0.

apin_outer_MEp2_1_04 1426.1344 0. 3080.9402 0. 8091.0541 0. 0. 0. 0. 0. 0. 0.

MEp2_1_14 -217.39412 0. -2396.6781 0. 8103.7188 0. 0. 0. 0. 0. 0. 0.

DCOPS_inner_MEp2_1_14_IN -127.992 0. -1517.0925 0. 8055.5508 0. 0. 0. 0. 0. 0. 0.

DCOPS_outer_MEp2_1_14_IN -574.16042 0. -3361.8538 0. 8065.4277 0. 0. 0. 0. 0. 0. 0.

apin_inner_MEp2_1_14 -133.72303 0. -1431.4376 0. 8097.0691 0. 0. 0. 0. 0. 0. 0.

apin_outer_MEp2_1_14 -302.73227 0. -3381.15 0. 8110.5011 0. 0. 0. 0. 0. 0. 0.

MEp2_2_08 1783.7642 0. 4932.2378 0. 8090.1202 0. 0. 0. 0. 0. 0. 0.

DCOPS_inner_MEp2_2_08_OUT 1314.747 0. 3700.5366 0. 8043.8213 0. 0. 0. 0. 0. 0. 0.

DCOPS_outer_MEp2_2_08_OUT 2086.6266 0. 6585.4074 0. 8040.3949 0. 0. 0. 0. 0. 0. 0.

apin_inner_MEp2_2_08 1224.8134 0. 3394.8048 0. 8089.8999 0. 0. 0. 0. 0. 0. 0.

apin_outer_MEp2_2_08 2349.3109 0. 6487.813 0. 8090.343 0. 0. 0. 0. 0. 0. 0.

MEp2_tp2 2168.7522 0. 6847.8494 0. 8041.25 0. 0. 0. 0. 0. 0. 0.

DCOPS_MEp2_reference_2_IN 2168.805 0. 6847.8347 0. 8040.7177 0. 0. 0. 0. 0. 0. 0.

laser_MEp2_2 2141.7203 0. 6855.0532 0. 8001.2256 0. 0. 0. 0. 0. 0. 0.

I noticed that in cms_fitc_las2.dat (with 9 DCOPS) and cms_fitc_las5.dat (with

7 DCOPS) some of the DCOPS are in different order compared to the slm .dat

file. It's corrected now.

To be consistent with notations I rename cms_fitc_las5.dat (with 7 DCOPS) to

cms_fitc_las5_7DCOPS.dat & cms_fitc_las2.dat (with 9 DCOPS) to

cms_fitc_las2_9DCOPS.dat

I also changed the corresponding .dat file names.

In the script slm_cms_readcocoaout_las2_9DCOPS.C I removed everything

related to chamber 27 and created the file slm_cms_readcocoaout_las2_7DCOPS.C

-------------------------

Find laser line intersection with CCD2:

Set debug verbose mode in ME2_SLM25_las2_7DCOPS.txt to 5

Run cocoa:

cocoa ME2_SLM25_las2_7DCOPS.txt>ME2_SLM25_las2_7DCOPS.out

Search for "X line of laser projected on COPS ALILine point" after last

iteration (fit iteration 2)

COPS id1 (ME+2_reference2>in):

X line of laser projected on COPS ALILine point (2.1417203,6.8550532,8.0012256)

COPS id2 (DCOPS_outer+22_08>out):

X line of laser projected on COPS ALILine point (2.0705568,6.5897139,8.0015337)

COPS id3 (DCOPS_inner+22_08>out):

X line of laser projected on COPS ALILine point (1.2969629,3.7053018,8.0048828)

COPS id4 (DCOPS_outer+21_04>OUT):

X line of laser projected on COPS ALILine point (1.1623813,3.2035025,8.0054654)

COPS id5 (DCOPS_inner+21_04>OUT):

X line of laser projected on COPS ALILine point (0.67085773,1.3708144,8.0075933)

COPS id6 (DCOPS_outer+21_14>IN):

X line of laser projected on COPS ALILine point (-0.10537721,-1.5234449,8.0109538)

COPS id7 (DCOPS_inner+21_14>IN):

X line of laser projected on COPS ALILine point (-0.59690403,-3.3561453,8.0130818)

=> The unit is [m]

cms z coordinate in [mm]:

8001.2256,8001.5337,8004.8828,8005.4654,8007.5933,8010.9538,8013.0818

---------------------------

-included chamber names in slm_cms_readcocoaout_las2_7DCOPS.C

& slm_cms_readcocoaout_las5_7DCOPS.C

See page 116. (how to display text in a canvas)

---------------------------------------------------------------------------------------------------------------

Here is the full script for laser 2 with 7 DCOPS:

-------------------------------------------------

void slm_cms_readcocoaout_las2_7DCOPS()

{

gROOT->Reset();

TString dir = gSystem->UnixPathName(TCint::GetCurrentMacroName());

dir.ReplaceAll("slm_cms_readcocoaout_las2_7DCOPS.C","");

dir.ReplaceAll("/./","/");

//SLM coordinates:

//center position [mm]

Float_t *slmx_c = new Float_t[''];

Float_t*slmy_c = new Float_t[''];

Float_t*slmz_c = new Float_t[''];

//cent position uncertainty [mm]

Float_t*slmx_ce = new Float_t[''];

Float_t*slmy_ce = new Float_t[''];

Float_t*slmz_ce = new Float_t[''];

//angle [mrad]

Float_t*slmx_a = new Float_t[''];

Float_t*slmy_a = new Float_t[''];

Float_t*slmz_a = new Float_t[''];

//angle uncertainty [mrad]

Float_t*slmx_ae = new Float_t[''];

Float_t*slmy_ae = new Float_t[''];

Float_t*slmz_ae = new Float_t[''];

Float_t slmX_c, slmY_c, slmZ_c;

Float_t slmX_ce, slmY_ce, slmZ_ce;

Float_t slmX_a, slmY_a, slmZ_a;

Float_t slmX_ae, slmY_ae, slmZ_ae;

Int_t slmNData = 0;

Char_t *slmw=new Char_t[''];

Char_t slmW[''];

ifstream slmInput;

//CMS coordinates:

//center position [mm]

Float_t *cmsx_c = new Float_t[''];

Float_t*cmsy_c = new Float_t[''];

Float_t*cmsz_c = new Float_t[''];

//cent position uncertainty [mm]

Float_t*cmsx_ce = new Float_t[''];

Float_t*cmsy_ce = new Float_t[''];

Float_t*cmsz_ce = new Float_t[''];

//angle [mrad]

Float_t*cmsx_a = new Float_t[''];

Float_t*cmsy_a = new Float_t[''];

Float_t*cmsz_a = new Float_t[''];

//angle uncertainty [mrad]

Float_t*cmsx_ae = new Float_t[''];

Float_t*cmsy_ae = new Float_t[''];

Float_t*cmsz_ae = new Float_t[''];

Float_t cmsX_c, cmsY_c, cmsZ_c;

Float_t cmsX_ce, cmsY_ce, cmsZ_ce;

Float_t cmsX_a, cmsY_a, cmsZ_a;

Float_t cmsX_ae, cmsY_ae, cmsZ_ae;

Int_t cmsNData = 0;

Char_t *cmsw=new Char_t[''];

Char_t cmsW[''];

ifstream cmsInput;

//here you open the .dat files

slmInput.open(Form("%sslm_fitc_las2_7DCOPS.dat",dir.Data()));

cmsInput.open(Form("%scms_fitc_las2_7DCOPS.dat",dir.Data()));

// while(1) creates an infinite loop

while (1) {

slmInput >> slmW >> slmX_c >> slmX_ce >> slmY_c >> slmY_ce >> slmZ_c >> slmZ_ce >> slmX_a >> slmX_ae >> slmY_a >>slmY_ae >> slmZ_a >> slmZ_ae;

if (!slmInput.good()) break;

slmw[slmNData] = slmW;

slmx_c[slmNData] = slmX_c;

slmx_ce[slmNData] = slmX_ce;

slmy_c[slmNData] = slmY_c;

slmy_ce[slmNData] = slmY_ce;

slmz_c[slmNData] = slmZ_c;

slmz_ce[slmNData] = slmZ_ce;

slmx_a[slmNData] = slmX_a;

slmx_ae[slmNData] = slmX_ae;

slmy_a[slmNData] = slmY_a;

slmy_ae[slmNData] = slmY_ae;

slmz_a[slmNData] = slmZ_a;

slmz_ae[slmNData] = slmZ_ae;

cout > cmsX_ce >> cmsY_c >> cmsY_ce >> cmsZ_c >> cmsZ_ce >> cmsX_a >> cmsX_ae >> cmsY_a >>cmsY_ae >> cmsZ_a >> cmsZ_ae;

if (!cmsInput.good()) break;

cmsw[cmsNData] = cmsW;

cmsx_c[cmsNData] = cmsX_c;

cmsx_ce[cmsNData] = cmsX_ce;

cmsy_c[cmsNData] = cmsY_c;

cmsy_ce[cmsNData] = cmsY_ce;

cmsz_c[cmsNData] = cmsZ_c;

cmsz_ce[cmsNData] = cmsZ_ce;

cmsx_a[cmsNData] = cmsX_a;

cmsx_ae[cmsNData] = cmsX_ae;

cmsy_a[cmsNData] = cmsY_a;

cmsy_ae[cmsNData] = cmsY_ae;

cmsz_a[cmsNData] = cmsZ_a;

cmsz_ae[cmsNData] = cmsZ_ae;

cout SetGrid();

c1->GetFrame()->SetBorderSize(12);

c1->SetBorderMode(0);

//Axis settings

hpx->GetXaxis()->SetTitle("X_{SLM} [mm]");

hpx->GetYaxis()->SetTitle("Z_{CMS} [mm]");

hpx->GetXaxis()->CenterTitle();

hpx->GetXaxis()->SetNdivisions(50310);

hpx->GetYaxis()->CenterTitle();

hpx->GetXaxis()->SetTitleOffset(1.03);

hpx->GetYaxis()->SetTitleOffset(1.3);

hpx->GetYaxis()->SetNdivisions(50312);

//Graph CSC center coordinates and errors (get values from the dat file)

coutSetLineWidth(1.);

//l3->Draw();

//Define fitted DCOPS coordinates and errors

//DCOPS:

//ref 2_08_out 2_08_in 1_04_out 1_04_in 1_14_in 1_14_out

//-7100 -7000 -3900 -3400 -1500 1500 3400

//These are the dcops approx. slmx_c coordinates

//Note: ref senosr is at -7100 mm, but moved it to -7200 mm to not overlap with

//the other DCOPS

//DCOPS_outer_MEp2_1_04_OUT (line 3)

Float_t x_slm_dcops3[1]={-3400.};

//DCOPS_inner_MEp2_1_04_OUT (line 2)

Float_t x_slm_dcops2[1]={-1500.};

//DCOPS_inner_MEp2_1_14_IN (line 7)

Float_t x_slm_dcops7[1]={1500.};

//DCOPS_outer_MEp2_1_14_IN (line 8)

Float_t x_slm_dcops8[1]={3400.};

//DCOPS_outer_MEp2_2_08_OUT (line 13)

Float_t x_slm_dcops13[1]={-7000.};

//DCOPS_inner_MEp2_2_08_OUT (line 12)

Float_t x_slm_dcops12[1]={-3900.};

//DCOPS_inner_MEp2_2_27_IN (line 17)

// Float_t x_slm_dcops17[1]={3900.};

//DCOPS_outer_MEp2_2_27_IN (line 18)

// Float_t x_slm_dcops18[1]={7000.};

//DCOPS_MEp2_reference_5_IN (line 17)

Float_t x_slm_dcops17[1]={-7200.};

//These are the dcops cmsz_c coordinates

//DCOPS_outer_MEp2_1_04_OUT (line 3)

Float_t z_cms_dcops3[1]={cmsz_c[3]};

//DCOPS_inner_MEp2_1_04_OUT (line 2)

Float_t z_cms_dcops2[1]={cmsz_c[2]};

//DCOPS_inner_MEp2_1_14_IN (line 7)

Float_t z_cms_dcops7[1]={cmsz_c[7]};

//DCOPS_outer_MEp2_1_14_IN (line 8)

Float_t z_cms_dcops8[1]={cmsz_c[8]};

//DCOPS_outer_MEp2_2_08_OUT (line 13)

Float_t z_cms_dcops13[1]={cmsz_c[13]};

//DCOPS_inner_MEp2_2_08_OUT (line 12)

Float_t z_cms_dcops12[1]={cmsz_c[12]};

//DCOPS_inner_MEp2_2_27_IN (line 17)

//Float_t z_cms_dcops17[1]={cmsz_c[17]};

//DCOPS_outer_MEp2_2_27_IN (line 18)

//Float_t z_cms_dcops18[1]={cmsz_c[18]};

//DCOPS_MEp2_reference_5_IN (line 17)

Float_t z_cms_dcops17[1]={cmsz_c[17]};

//These errors are not known (set them to zero)

Float_t ex_slm_dcops3[1]={0.};

Float_t ex_slm_dcops2[1]={0.};

Float_t ex_slm_dcops7[1]={0.};

Float_t ex_slm_dcops8[1]={0.};

Float_t ex_slm_dcops13[1]={0.};

Float_t ex_slm_dcops12[1]={0.};

// Float_t ex_slm_dcops17[1]={0.};

// Float_t ex_slm_dcops18[1]={0.};

Float_t ex_slm_dcops17[1]={0.};

//For now I will set the error for the DCOPS dowel Z_CMS pos. equal to the error for the DCOPS slmy position

Float_t ez_cms_dcops3[1] = {slmy_ce[3]};

Float_t ez_cms_dcops2[1] = {slmy_ce[2]};

Float_t ez_cms_dcops7[1] = {slmy_ce[7]};

Float_t ez_cms_dcops8[1] = {slmy_ce[8]};

Float_t ez_cms_dcops13[1] = {slmy_ce[12]};

Float_t ez_cms_dcops12[1] = {slmy_ce[13]};

// Float_t ez_cms_dcops17[1] = {slmy_ce[17]};

// Float_t ez_cms_dcops18[1] = {slmy_ce[18]};

Float_t ez_cms_dcops17[1] = {slmy_ce[17]};

//Graph fitted DCOPS ref dowel pin coordinates and errors

TGraphErrors *gr_dcops2 =new TGraphErrors(1,x_slm_dcops2,z_cms_dcops2,ex_slm_dcops2,ez_cms_dcops2);

TGraphErrors *gr_dcops3 =new TGraphErrors(1,x_slm_dcops3,z_cms_dcops3,ex_slm_dcops3,ez_cms_dcops3);

TGraphErrors *gr_dcops7 =new TGraphErrors(1,x_slm_dcops7,z_cms_dcops7,ex_slm_dcops7,ez_cms_dcops7);

TGraphErrors *gr_dcops8 =new TGraphErrors(1,x_slm_dcops8,z_cms_dcops8,ex_slm_dcops8,ez_cms_dcops8);

TGraphErrors *gr_dcops13 =new TGraphErrors(1,x_slm_dcops13,z_cms_dcops13,ex_slm_dcops13,ez_cms_dcops13);

TGraphErrors *gr_dcops12 =new TGraphErrors(1,x_slm_dcops12,z_cms_dcops12,ex_slm_dcops12,ez_cms_dcops12);

//TGraphErrors *gr_dcops17 =new TGraphErrors(1,x_slm_dcops17,z_cms_dcops17,ex_slm_dcops17,ez_cms_dcops17);

//TGraphErrors *gr_dcops18 =new TGraphErrors(1,x_slm_dcops18,z_cms_dcops18,ex_slm_dcops18,ez_cms_dcops18);

TGraphErrors *gr_dcops17 =new TGraphErrors(1,x_slm_dcops17,z_cms_dcops17,ex_slm_dcops17,ez_cms_dcops17);

//Set marker to plot ref dowel pin positions

gr_dcops2->SetMarkerStyle(4); //empty circle

gr_dcops2->SetMarkerSize(0.6);

gr_dcops2->SetMarkerColor(6);//pink

gr_dcops2->Draw("P");

gr_dcops3->SetMarkerStyle(4); //empty circle

gr_dcops3->SetMarkerSize(0.6);

gr_dcops3->SetMarkerColor(6);//pink

gr_dcops3->Draw("P");

gr_dcops7->SetMarkerStyle(4); //empty circle

gr_dcops7->SetMarkerSize(0.6);

gr_dcops7->SetMarkerColor(6);//pink

gr_dcops7->Draw("P");

gr_dcops8->SetMarkerStyle(4); //empty circle

gr_dcops8->SetMarkerSize(0.6);

gr_dcops8->SetMarkerColor(6);//pink

gr_dcops8->Draw("P");

gr_dcops13->SetMarkerStyle(4); //empty circle

gr_dcops13->SetMarkerSize(0.6);

gr_dcops13->SetMarkerColor(6);//pink

gr_dcops13->Draw("P");

gr_dcops12->SetMarkerStyle(4); //empty circle

gr_dcops12->SetMarkerSize(0.6);

gr_dcops12->SetMarkerColor(6);//pink

gr_dcops12->Draw("P");

//gr_dcops17->SetMarkerStyle(4); //empty circle

//gr_dcops17->SetMarkerSize(0.6);

//gr_dcops17->SetMarkerColor(6);//pink

//gr_dcops17->Draw("P");

//gr_dcops18->SetMarkerStyle(4); //empty circle

//gr_dcops18->SetMarkerSize(0.6);

//gr_dcops18->SetMarkerColor(6);//pink

//gr_dcops18->Draw("P");

gr_dcops17->SetMarkerStyle(4); //empty circle

gr_dcops17->SetMarkerSize(0.6);

gr_dcops17->SetMarkerColor(6);//pink

gr_dcops17->Draw("P");

//Define CCD2 pixel 1 coordinates and errors

//These are the CCD2 pixel 1 approx. slmx_c coordinates

//Note: ref sensor is at -7100 mm, but moved it to -7200 mm to not overlap with

//the other DCOPS

//DCOPS_outer_MEp2_1_04_OUT (line 3)

Float_t x_slm_CCD2pixel1_3[1]={-3400.};

//DCOPS_inner_MEp2_1_04_OUT (line 2)

Float_t x_slm_CCD2pixel1_2[1]={-1500.};

//DCOPS_inner_MEp2_1_14_IN (line 7)

Float_t x_slm_CCD2pixel1_7[1]={1500.};

//DCOPS_outer_MEp2_1_14_IN (line 8)

Float_t x_slm_CCD2pixel1_8[1]={3400.};

//DCOPS_outer_MEp2_2_08_IN (line 13)

Float_t x_slm_CCD2pixel1_13[1]={-7000.};

//DCOPS_inner_MEp2_2_08_IN (line 12)

Float_t x_slm_CCD2pixel1_12[1]={-3900.};

//DCOPS_inner_MEp2_2_27_IN (line 17)

// Float_t x_slm_CCD2pixel1_17[1]={3900.};

//DCOPS_outer_MEp2_2_27_IN (line 18)

// Float_t x_slm_CCD2pixel1_18[1]={7000.};

//DCOPS_MEp2_reference_5_IN (line 22)

Float_t x_slm_CCD2pixel1_17[1]={-7200.};

//These are the dcops cmsz_c coordinates (fitted value-57.579 [mm])

Float_t D=57.579; //distance from the DCOPS ref dowel pin to the first CCD pixel

Float_t z_cms_CCD2pixel1_3[1]={cmsz_c[3]-D};

Float_t z_cms_CCD2pixel1_2[1]={cmsz_c[2]-D};

Float_t z_cms_CCD2pixel1_7[1]={cmsz_c[7]-D};

Float_t z_cms_CCD2pixel1_8[1]={cmsz_c[8]-D};

Float_t z_cms_CCD2pixel1_13[1]={cmsz_c[13]-D};

Float_t z_cms_CCD2pixel1_12[1]={cmsz_c[12]-D};

//Float_t z_cms_CCD2pixel1_17[1]={cmsz_c[17]-D};

//Float_t z_cms_CCD2pixel1_18[1]={cmsz_c[18]-D};

Float_t z_cms_CCD2pixel1_17[1]={cmsz_c[17]-D};

//Errors are not known

Float_t ex_slm_CCD2pixel1_3[1] ={0.};

Float_t ex_slm_CCD2pixel1_2[1] ={0.};

Float_t ex_slm_CCD2pixel1_7[1] ={0.};

Float_t ex_slm_CCD2pixel1_8[1] ={0.};

Float_t ex_slm_CCD2pixel1_13[1] ={0.};

Float_t ex_slm_CCD2pixel1_12[1] ={0.};

//Float_t ex_slm_CCD2pixel1_17[1] ={0.};

//Float_t ex_slm_CCD2pixel1_18[1] ={0.};

Float_t ex_slm_CCD2pixel1_17[1] ={0.};

//For now I will set the error for the DCOPS dowel Z_CMS pos. equal to the error for the DCOPS slmy position

Float_t ez_cms_CCD2pixel1_3[1] = {slmy_ce[3]};

Float_t ez_cms_CCD2pixel1_2[1] = {slmy_ce[2]};

Float_t ez_cms_CCD2pixel1_7[1] = {slmy_ce[7]};

Float_t ez_cms_CCD2pixel1_8[1] = {slmy_ce[8]};

Float_t ez_cms_CCD2pixel1_13[1] = {slmy_ce[13]};

Float_t ez_cms_CCD2pixel1_12[1] = {slmy_ce[12]};

//Float_t ez_cms_CCD2pixel1_17[1] = {slmy_ce[17]};

//Float_t ez_cms_CCD2pixel1_18[1] = {slmy_ce[18]};

Float_t ez_cms_CCD2pixel1_17[1] = {slmy_ce[17]};

//Graph CCD2 pixel 1 coordinates and errors

TGraphErrors *gr_CCD2pixel1_3 =new TGraphErrors(1,x_slm_CCD2pixel1_3,z_cms_CCD2pixel1_3,ex_slm_CCD2pixel1_3,ez_cms_CCD2pixel1_3);

TGraphErrors *gr_CCD2pixel1_2 =new TGraphErrors(1,x_slm_CCD2pixel1_2,z_cms_CCD2pixel1_2,ex_slm_CCD2pixel1_2,ez_cms_CCD2pixel1_2);

TGraphErrors *gr_CCD2pixel1_7 =new TGraphErrors(1,x_slm_CCD2pixel1_7,z_cms_CCD2pixel1_7,ex_slm_CCD2pixel1_7,ez_cms_CCD2pixel1_7);

TGraphErrors *gr_CCD2pixel1_8 =new TGraphErrors(1,x_slm_CCD2pixel1_8,z_cms_CCD2pixel1_8,ex_slm_CCD2pixel1_8,ez_cms_CCD2pixel1_8);

TGraphErrors *gr_CCD2pixel1_13 =new TGraphErrors(1,x_slm_CCD2pixel1_13,z_cms_CCD2pixel1_13,ex_slm_CCD2pixel1_13,ez_cms_CCD2pixel1_13);

TGraphErrors *gr_CCD2pixel1_12 =new TGraphErrors(1,x_slm_CCD2pixel1_12,z_cms_CCD2pixel1_12,ex_slm_CCD2pixel1_12,ez_cms_CCD2pixel1_12);

//TGraphErrors *gr_CCD2pixel1_17 =new TGraphErrors(1,x_slm_CCD2pixel1_17,z_cms_CCD2pixel1_17,ex_slm_CCD2pixel1_17,ez_cms_CCD2pixel1_17);

//TGraphErrors *gr_CCD2pixel1_18 =new TGraphErrors(1,x_slm_CCD2pixel1_18,z_cms_CCD2pixel1_18,ex_slm_CCD2pixel1_18,ez_cms_CCD2pixel1_18);

TGraphErrors *gr_CCD2pixel1_17 =new TGraphErrors(1,x_slm_CCD2pixel1_17,z_cms_CCD2pixel1_17,ex_slm_CCD2pixel1_17,ez_cms_CCD2pixel1_17);

//Set marker to plot CCD2 pixel1 positions

gr_CCD2pixel1_3->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_3->SetMarkerSize(0.6);

gr_CCD2pixel1_3->SetMarkerColor(12);//gray

gr_CCD2pixel1_3->Draw("P");

gr_CCD2pixel1_2->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_2->SetMarkerSize(0.6);

gr_CCD2pixel1_2->SetMarkerColor(12);//gray

gr_CCD2pixel1_2->Draw("P");

gr_CCD2pixel1_7->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_7->SetMarkerSize(0.6);

gr_CCD2pixel1_7->SetMarkerColor(12);//gray

gr_CCD2pixel1_7->Draw("P");

gr_CCD2pixel1_8->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_8->SetMarkerSize(0.6);

gr_CCD2pixel1_8->SetMarkerColor(12);//gray

gr_CCD2pixel1_8->Draw("P");

gr_CCD2pixel1_13->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_13->SetMarkerSize(0.6);

gr_CCD2pixel1_13->SetMarkerColor(12);//gray

gr_CCD2pixel1_13->Draw("P");

gr_CCD2pixel1_12->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_12->SetMarkerSize(0.6);

gr_CCD2pixel1_12->SetMarkerColor(12);//gray

gr_CCD2pixel1_12->Draw("P");

//gr_CCD2pixel1_17->SetMarkerStyle(20); //* filled circle

//gr_CCD2pixel1_17->SetMarkerSize(0.6);

//gr_CCD2pixel1_17->SetMarkerColor(12);//gray

//gr_CCD2pixel1_17->Draw("P");

//gr_CCD2pixel1_18->SetMarkerStyle(20); //* filled circle

//gr_CCD2pixel1_18->SetMarkerSize(0.6);

//gr_CCD2pixel1_18->SetMarkerColor(12);//gray

//gr_CCD2pixel1_18->Draw("P");

gr_CCD2pixel1_17->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_17->SetMarkerSize(0.6);

gr_CCD2pixel1_17->SetMarkerColor(12);//gray

gr_CCD2pixel1_17->Draw("P");

//Draw a 28.672 [mm] (lenght of CCD) line from the CCD2 pixel 1.

//Add 28.672 [mm] to z_cms_CCD2pixel1_#

Float_t L=28.672;

TLine *lccd1=new TLine(-3400.,cmsz_c[3]-D+L, -3400.,cmsz_c[3]-D);

lccd1->SetLineColor(806); //orange

lccd1->SetLineWidth(3.);

lccd1->Draw();

TLine *lccd2=new TLine(-1500.,cmsz_c[2]-D+L, -1500.,cmsz_c[2]-D);

lccd2->SetLineColor(806); //orange

lccd2->SetLineWidth(3.);

lccd2->Draw();

TLine *lccd3=new TLine(1500.,cmsz_c[7]-D+L, 1500.,cmsz_c[7]-D);

lccd3->SetLineColor(806); //orange

lccd3->SetLineWidth(3.);

lccd3->Draw();

TLine *lccd4=new TLine(3400.,cmsz_c[8]-D+L, 3400.,cmsz_c[8]-D);

lccd4->SetLineColor(806); //orange

lccd4->SetLineWidth(3.);

lccd4->Draw();

TLine *lccd5=new TLine(-7000.,cmsz_c[13]-D+L, -7000.,cmsz_c[13]-D);

lccd5->SetLineColor(806); //orange

lccd5->SetLineWidth(3.);

lccd5->Draw();

TLine *lccd6=new TLine(-3900.,cmsz_c[12]-D+L, -3900.,cmsz_c[12]-D);

lccd6->SetLineColor(806); //orange

lccd6->SetLineWidth(3.);

lccd6->Draw();

// TLine *lccd7=new TLine(3900.,cmsz_c[17]-D+L, 3900.,cmsz_c[17]-D);

// lccd7->SetLineColor(806);

// lccd7->SetLineWidth(3.);

// lccd7->Draw();

// TLine *lccd8=new TLine(7000.,cmsz_c[18]-D+L, 7000.,cmsz_c[18]-D);

// lccd8->SetLineColor(806);

// lccd8->SetLineWidth(3.);

// lccd8->Draw();

TLine *lccd9=new TLine(-7200.,cmsz_c[17]-D+L, -7200.,cmsz_c[17]-D);

lccd9->SetLineColor(806);

lccd9->SetLineWidth(3.);

lccd9->Draw();

//Define CCD2(R)_meas coordinates and errors

//DCOPS:

//ref 2_08_out 2_08_in 1_04_out 1_04_in 1_14_in 1_14_out

//-7100 -7000 -3900 -3400 -1500 1500 3400

//Note I moved the ref sensor to -7200 mm (see above at CCD2 pixel 1 coord)

//This is the CCD2_meas approx. slmx_c coordinate

//Move these coordinates to the left by 100 [mm] so we can distinguish the CCD2 and CCD4 measured values

Float_t x_slm_CCD2_meas1[1]={-7300.};

Float_t x_slm_CCD2_meas2[1]={-7100.};

Float_t x_slm_CCD2_meas3[1]={-4000.};

Float_t x_slm_CCD2_meas4[1]={-3500.};

Float_t x_slm_CCD2_meas5[1]={-1600.};

Float_t x_slm_CCD2_meas6[1]={1400.};

Float_t x_slm_CCD2_meas7[1]={3300.};

//Float_t x_slm_CCD2_meas8[1]={3800.};

//Float_t x_slm_CCD2_meas9[1]={6900.};

//This is the dcops_meas cmsz_c coordinate (CCD2 pixel 1 position+ measured distance to the first CCD2 pixel)

Float_t D=57.579; //distance from the DCOPS ref dowel pin to the first CCD pixel

Float_t z_cms_CCD2_meas1[1]={cmsz_c[17]-D+18.190};

Float_t z_cms_CCD2_meas2[1]={cmsz_c[13]-D+19.162};

Float_t z_cms_CCD2_meas3[1]={cmsz_c[12]-D+18.960};

Float_t z_cms_CCD2_meas4[1]={cmsz_c[3]-D+16.680};

Float_t z_cms_CCD2_meas5[1]={cmsz_c[2]-D+17.616};

Float_t z_cms_CCD2_meas6[1]={cmsz_c[7]-D+13.201};

Float_t z_cms_CCD2_meas7[1]={cmsz_c[8]-D+5.309};

// Float_t z_cms_CCD2_meas8[1]={cmsz_c[17]-D+3.770};

// Float_t z_cms_CCD2_meas9[1]={cmsz_c[18]-D+0.};

//Errors in slm_x direction are not known

Float_t ex_slm_CCD2_meas1[1] ={0.};

Float_t ex_slm_CCD2_meas2[1] ={0.};

Float_t ex_slm_CCD2_meas3[1] ={0.};

Float_t ex_slm_CCD2_meas4[1] ={0.};

Float_t ex_slm_CCD2_meas5[1] ={0.};

Float_t ex_slm_CCD2_meas6[1] ={0.};

Float_t ex_slm_CCD2_meas7[1] ={0.};

//Float_t ex_slm_CCD2_meas8[1] ={0.};

//Float_t ex_slm_CCD2_meas9[1] ={0.};

//the error for the DCOPS_meas dowel Z_CMS pos. are from the measurement file

//in the measurement file error units are in [um] {2.428,1.835,1.908,9.343,2.092,4.457,58.865,16.166,14336.}

Float_t ez_cms_CCD2_meas1[1] = {0.002428}; //[mm]

Float_t ez_cms_CCD2_meas2[1] = {0.001835};

Float_t ez_cms_CCD2_meas3[1] = {0.001908};

Float_t ez_cms_CCD2_meas4[1] = {0.009343};

Float_t ez_cms_CCD2_meas5[1] = {0.002092};

Float_t ez_cms_CCD2_meas6[1] = {0.004457};

Float_t ez_cms_CCD2_meas7[1] = {0.058865};

//Float_t ez_cms_CCD2_meas8[1] = {0.016166};

//Float_t ez_cms_CCD2_meas9[1] = {14.336};

//Graph DCOPS_meas ref dowel pin coordinates and errors

TGraphErrors *gr_CCD2_meas1 =new TGraphErrors(1,x_slm_CCD2_meas1,z_cms_CCD2_meas1,ex_slm_CCD2_meas1,ez_cms_CCD2_meas1);

TGraphErrors *gr_CCD2_meas2 =new TGraphErrors(1,x_slm_CCD2_meas2,z_cms_CCD2_meas2,ex_slm_CCD2_meas2,ez_cms_CCD2_meas2);

TGraphErrors *gr_CCD2_meas3 =new TGraphErrors(1,x_slm_CCD2_meas3,z_cms_CCD2_meas3,ex_slm_CCD2_meas3,ez_cms_CCD2_meas3);

TGraphErrors *gr_CCD2_meas4 =new TGraphErrors(1,x_slm_CCD2_meas4,z_cms_CCD2_meas4,ex_slm_CCD2_meas4,ez_cms_CCD2_meas4);

TGraphErrors *gr_CCD2_meas5 =new TGraphErrors(1,x_slm_CCD2_meas5,z_cms_CCD2_meas5,ex_slm_CCD2_meas5,ez_cms_CCD2_meas5);

TGraphErrors *gr_CCD2_meas6 =new TGraphErrors(1,x_slm_CCD2_meas6,z_cms_CCD2_meas6,ex_slm_CCD2_meas6,ez_cms_CCD2_meas6);

TGraphErrors *gr_CCD2_meas7 =new TGraphErrors(1,x_slm_CCD2_meas7,z_cms_CCD2_meas7,ex_slm_CCD2_meas7,ez_cms_CCD2_meas7);

//TGraphErrors *gr_CCD2_meas8 =new TGraphErrors(1,x_slm_CCD2_meas8,z_cms_CCD2_meas8,ex_slm_CCD2_meas8,ez_cms_CCD2_meas8);

//TGraphErrors *gr_CCD2_meas9 =new TGraphErrors(1,x_slm_CCD2_meas9,z_cms_CCD2_meas9,ex_slm_CCD2_meas9,ez_cms_CCD2_meas9);

//Set marker to plot meas ref dowel pin positions

gr_CCD2_meas1->SetMarkerStyle(4); //empty circle

gr_CCD2_meas1->SetMarkerSize(0.6);

gr_CCD2_meas1->SetMarkerColor(4);//blue

gr_CCD2_meas1->Draw("P");

gr_CCD2_meas2->SetMarkerStyle(4); //empty circle

gr_CCD2_meas2->SetMarkerSize(0.6);

gr_CCD2_meas2->SetMarkerColor(4);//blue

gr_CCD2_meas2->Draw("P");

gr_CCD2_meas3->SetMarkerStyle(4); //empty circle

gr_CCD2_meas3->SetMarkerSize(0.6);

gr_CCD2_meas3->SetMarkerColor(4);//blue

gr_CCD2_meas3->Draw("P");

gr_CCD2_meas4->SetMarkerStyle(4); //empty circle

gr_CCD2_meas4->SetMarkerSize(0.6);

gr_CCD2_meas4->SetMarkerColor(4);//blue

gr_CCD2_meas4->Draw("P");

gr_CCD2_meas5->SetMarkerStyle(4); //empty circle

gr_CCD2_meas5->SetMarkerSize(0.6);

gr_CCD2_meas5->SetMarkerColor(4);//blue

gr_CCD2_meas5->Draw("P");

gr_CCD2_meas6->SetMarkerStyle(4); //empty circle

gr_CCD2_meas6->SetMarkerSize(0.6);

gr_CCD2_meas6->SetMarkerColor(4);//blue

gr_CCD2_meas6->Draw("P");

gr_CCD2_meas7->SetMarkerStyle(4); //empty circle

gr_CCD2_meas7->SetMarkerSize(0.6);

gr_CCD2_meas7->SetMarkerColor(4);//blue

gr_CCD2_meas7->Draw("P");

//gr_CCD2_meas8->SetMarkerStyle(4); //empty circle

//gr_CCD2_meas8->SetMarkerSize(0.6);

//gr_CCD2_meas8->SetMarkerColor(4);//blue

//gr_CCD2_meas8->Draw("P");

//gr_CCD2_meas9->SetMarkerStyle(4); //empty circle

//gr_CCD2_meas9->SetMarkerSize(0.6);

//gr_CCD2_meas9->SetMarkerColor(4);//blue

//gr_CCD2_meas9->Draw("P");

//Define CCD4(R)_meas coordinates and errors

//DCOPS:

//ref 2_08_out 2_08_in 1_04_out 1_04_in 1_14_in 1_14_out

//-7100 -7000 -3900 -3400 -1500 1500 3400

//Note I moved the ref sensor to -7200 mm (see above at CCD2 pixel 1 coord)

//This is the CCD4_meas approx. slmx_c coordinate

//Move these coordinates to the right by 100 [mm] so we can distinguish the CCD2 and CCD4 measured values

Float_t x_slm_CCD4_meas1[1]={-7100.};

Float_t x_slm_CCD4_meas2[1]={-6900.};

Float_t x_slm_CCD4_meas3[1]={-3800.};

Float_t x_slm_CCD4_meas4[1]={-3300.};

Float_t x_slm_CCD4_meas5[1]={-1400.};

Float_t x_slm_CCD4_meas6[1]={1600.};

Float_t x_slm_CCD4_meas7[1]={3500.};

//Float_t x_slm_CCD4_meas8[1]={4000.};

//Float_t x_slm_CCD4_meas9[1]={7100.};

//This is the dcops_meas cmsz_c coordinate (CCD4 pixel 1 position+ measured distance to the first CCD4 pixel)

Float_t D=57.579; //distance from the DCOPS ref dowel pin to the first CCD pixel

Float_t z_cms_CCD4_meas1[1]={cmsz_c[17]-D+18.340};

Float_t z_cms_CCD4_meas2[1]={cmsz_c[13]-D+18.134};

Float_t z_cms_CCD4_meas3[1]={cmsz_c[12]-D+18.213};

Float_t z_cms_CCD4_meas4[1]={cmsz_c[3]-D+15.813};

Float_t z_cms_CCD4_meas5[1]={cmsz_c[2]-D+16.888};

Float_t z_cms_CCD4_meas6[1]={cmsz_c[7]-D+12.729};

Float_t z_cms_CCD4_meas7[1]={cmsz_c[8]-D+5.179};

//Float_t z_cms_CCD4_meas8[1]={cmsz_c[17]-D+2.300};

//Float_t z_cms_CCD4_meas9[1]={cmsz_c[18]-D+0.};

//Errors in slm_x direction are not known

Float_t ex_slm_CCD4_meas1[1] ={0.};

Float_t ex_slm_CCD4_meas2[1] ={0.};

Float_t ex_slm_CCD4_meas3[1] ={0.};

Float_t ex_slm_CCD4_meas4[1] ={0.};

Float_t ex_slm_CCD4_meas5[1] ={0.};

Float_t ex_slm_CCD4_meas6[1] ={0.};

Float_t ex_slm_CCD4_meas7[1] ={0.};

//Float_t ex_slm_CCD4_meas8[1] ={0.};

//Float_t ex_slm_CCD4_meas9[1] ={0.};

//the error for the DCOPS_meas dowel Z_CMS pos. are from the measurement file

//in the measurement file error units are in [um]

Float_t ez_cms_CCD4_meas1[1] = {0.002407}; //[mm]

Float_t ez_cms_CCD4_meas2[1] = {0.011982};

Float_t ez_cms_CCD4_meas3[1] = {0.002668};

Float_t ez_cms_CCD4_meas4[1] = {0.001938};

Float_t ez_cms_CCD4_meas5[1] = {0.002829};

Float_t ez_cms_CCD4_meas6[1] = {0.002924};

Float_t ez_cms_CCD4_meas7[1] = {0.004038};

//Float_t ez_cms_CCD4_meas8[1] = {10.189};

//Float_t ez_cms_CCD4_meas9[1] = {14.336};

//Graph DCOPS_meas ref dowel pin coordinates and errors

TGraphErrors *gr_CCD4_meas1 =new TGraphErrors(1,x_slm_CCD4_meas1,z_cms_CCD4_meas1,ex_slm_CCD4_meas1,ez_cms_CCD4_meas1);

TGraphErrors *gr_CCD4_meas2 =new TGraphErrors(1,x_slm_CCD4_meas2,z_cms_CCD4_meas2,ex_slm_CCD4_meas2,ez_cms_CCD4_meas2);

TGraphErrors *gr_CCD4_meas3 =new TGraphErrors(1,x_slm_CCD4_meas3,z_cms_CCD4_meas3,ex_slm_CCD4_meas3,ez_cms_CCD4_meas3);

TGraphErrors *gr_CCD4_meas4 =new TGraphErrors(1,x_slm_CCD4_meas4,z_cms_CCD4_meas4,ex_slm_CCD4_meas4,ez_cms_CCD4_meas4);

TGraphErrors *gr_CCD4_meas5 =new TGraphErrors(1,x_slm_CCD4_meas5,z_cms_CCD4_meas5,ex_slm_CCD4_meas5,ez_cms_CCD4_meas5);

TGraphErrors *gr_CCD4_meas6 =new TGraphErrors(1,x_slm_CCD4_meas6,z_cms_CCD4_meas6,ex_slm_CCD4_meas6,ez_cms_CCD4_meas6);

TGraphErrors *gr_CCD4_meas7 =new TGraphErrors(1,x_slm_CCD4_meas7,z_cms_CCD4_meas7,ex_slm_CCD4_meas7,ez_cms_CCD4_meas7);

//TGraphErrors *gr_CCD4_meas8 =new TGraphErrors(1,x_slm_CCD4_meas8,z_cms_CCD4_meas8,ex_slm_CCD4_meas8,ez_cms_CCD4_meas8);

//TGraphErrors *gr_CCD4_meas9 =new TGraphErrors(1,x_slm_CCD4_meas9,z_cms_CCD4_meas9,ex_slm_CCD4_meas9,ez_cms_CCD4_meas9);

//Set marker to plot meas ref dowel pin positions

gr_CCD4_meas1->SetMarkerStyle(4); //empty circle

gr_CCD4_meas1->SetMarkerSize(0.6);

gr_CCD4_meas1->SetMarkerColor(1);//black

gr_CCD4_meas1->Draw("P");

gr_CCD4_meas2->SetMarkerStyle(4); //empty circle

gr_CCD4_meas2->SetMarkerSize(0.6);

gr_CCD4_meas2->SetMarkerColor(1);//black

gr_CCD4_meas2->Draw("P");

gr_CCD4_meas3->SetMarkerStyle(4); //empty circle

gr_CCD4_meas3->SetMarkerSize(0.6);

gr_CCD4_meas3->SetMarkerColor(1);//black

gr_CCD4_meas3->Draw("P");

gr_CCD4_meas4->SetMarkerStyle(4); //empty circle

gr_CCD4_meas4->SetMarkerSize(0.6);

gr_CCD4_meas4->SetMarkerColor(1);//black

gr_CCD4_meas4->Draw("P");

gr_CCD4_meas5->SetMarkerStyle(4); //empty circle

gr_CCD4_meas5->SetMarkerSize(0.6);

gr_CCD4_meas5->SetMarkerColor(1);//black

gr_CCD4_meas5->Draw("P");

gr_CCD4_meas6->SetMarkerStyle(4); //empty circle

gr_CCD4_meas6->SetMarkerSize(0.6);

gr_CCD4_meas6->SetMarkerColor(1);//black

gr_CCD4_meas6->Draw("P");

gr_CCD4_meas7->SetMarkerStyle(4); //empty circle

gr_CCD4_meas7->SetMarkerSize(0.6);

gr_CCD4_meas7->SetMarkerColor(1);//black

gr_CCD4_meas7->Draw("P");

//gr_CCD4_meas8->SetMarkerStyle(4); //empty circle

//gr_CCD4_meas8->SetMarkerSize(0.6);

//gr_CCD4_meas8->SetMarkerColor(1);//black

//gr_CCD4_meas8->Draw("P");

//gr_CCD4_meas9->SetMarkerStyle(4); //empty circle

//gr_CCD4_meas9->SetMarkerSize(0.6);

//gr_CCD4_meas9->SetMarkerColor(1);//black

//gr_CCD4_meas9->Draw("P");

//This is laser 2 approx. slmx_c coordinate

//Marcus used the value: -7175.883 [mm]

//I will move this to -7600 so it does not overlap with the ref sensor measurement

Float_t x_slm_las2[1] ={-7600.}; //[mm]

//This is laser 2 cmsz_c coordinate

Float_t z_cms_las2[1] ={cmsz_c[18]}; //[mm]

Float_t ex_slm_las2[1] ={0.};

Float_t ez_cms_las2[1] = {slmy_ce[18]};

//Graph laser position and error

TGraphErrors *gr_las2 =new TGraphErrors(1,x_slm_las2,z_cms_las2,ex_slm_las2,ez_cms_las2);

//Set marker to plot laser position

gr_las2->SetMarkerStyle(21);//square

gr_las2->SetMarkerSize(1.2);

gr_las2->SetMarkerColor(2); //red

gr_las2->Draw("P");

//Here I define the intersection of the x laser axes with each CCD2

//DCOPS: 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out ref

//I can't read this part from the cocoa output (I get this info only from the debug 5 mode)

Float_t CCD_las_int[7]={8001.2256,8001.5337,8004.8828,8005.4654,8007.5933,8010.9538,8013.0818};

//This is the CCD X coord

Float_t x_slm_CCD2[7] ={-7200.,-7000.,-3900.,-3400.,-1500.,1500.,3400.}; //[mm]

TGraph *gr_lasline =new TGraph(7,x_slm_CCD2,CCD_las_int);

//Set marker to plot laser position

gr_lasline->SetMarkerStyle(21);//square

gr_lasline->SetMarkerSize(0.3);

gr_lasline->SetMarkerColor(1); //black

gr_lasline->Draw("P");

//I don't know yet how to fit the CCD_las_int points with a line in the script

//so for now I plot the intersection points (see above) and draw a line from the first point

//to the last point

//I checked with the poly 1 fit in the editor and the line fit and the TLine look the same

TLine *las = new TLine(-7000.,8001.481,3500.,8013.03);

las->SetLineColor(2);//red

las->SetLineWidth(0.01);

las->SetLineStyle(1);//...

las->Draw();

TLegend *leg = new TLegend(0.75,0.8,0.98,0.98);

leg->AddEntry(gr1,"CSC center (fitted)","P");

leg->AddEntry(gr_apin5,"alignment pin (fitted)","P");

leg->AddEntry(gr_dcops2,"DCOPS dowel (fitted)","P");

leg->AddEntry(gr_CCD2_meas1,"CCD2/Right (measured)","P");

leg->AddEntry(gr_CCD4_meas1,"CCD4/Left (measured)","P");

leg->AddEntry(gr_CCD2pixel1_3,"CCD2/Right pixel 1","P");

leg->AddEntry(gr_las2,"laser 2","P");

leg->Draw();

TPaveText *pt=new TPaveText(5482,8086,9386,8103);

TText *t1=pt->AddText("FQ=3.33X10^{-5}");

TText *t2=pt->AddText("#chi^{2}=86.21");

t1->SetTextSize(0.03);

t1->SetTextFont(42);

t1->SetTextColor(1);

t2->SetTextSize(0.03);

t2->SetTextFont(42);

t2->SetTextColor(1);

pt->Draw();

//produce a .gif file; for other formats see page 134.

c1->Print("ME2_SLM25_LAS2_7DCOPS.ps");

}

Here is the full script for laser 5 with 7 DCOPS:

-------------------------------------------------

void slm_cms_readcocoaout_las5_7DCOPS()

{

gROOT->Reset();

TString dir = gSystem->UnixPathName(TCint::GetCurrentMacroName());

dir.ReplaceAll("slm_cms_readcocoaout_las5_7DCOPS.C","");

dir.ReplaceAll("/./","/");

//SLM coordinates:

//center position [mm]

Float_t *slmx_c = new Float_t[''];

Float_t*slmy_c = new Float_t[''];

Float_t*slmz_c = new Float_t[''];

//cent position uncertainty [mm]

Float_t*slmx_ce = new Float_t[''];

Float_t*slmy_ce = new Float_t[''];

Float_t*slmz_ce = new Float_t[''];

//angle [mrad]

Float_t*slmx_a = new Float_t[''];

Float_t*slmy_a = new Float_t[''];

Float_t*slmz_a = new Float_t[''];

//angle uncertainty [mrad]

Float_t*slmx_ae = new Float_t[''];

Float_t*slmy_ae = new Float_t[''];

Float_t*slmz_ae = new Float_t[''];

Float_t slmX_c, slmY_c, slmZ_c;

Float_t slmX_ce, slmY_ce, slmZ_ce;

Float_t slmX_a, slmY_a, slmZ_a;

Float_t slmX_ae, slmY_ae, slmZ_ae;

Int_t slmNData = 0;

Char_t *slmw=new Char_t[''];

Char_t slmW[''];

ifstream slmInput;

//CMS coordinates:

//center position [mm]

Float_t *cmsx_c = new Float_t[''];

Float_t*cmsy_c = new Float_t[''];

Float_t*cmsz_c = new Float_t[''];

//cent position uncertainty [mm]

Float_t*cmsx_ce = new Float_t[''];

Float_t*cmsy_ce = new Float_t[''];

Float_t*cmsz_ce = new Float_t[''];

//angle [mrad]

Float_t*cmsx_a = new Float_t[''];

Float_t*cmsy_a = new Float_t[''];

Float_t*cmsz_a = new Float_t[''];

//angle uncertainty [mrad]

Float_t*cmsx_ae = new Float_t[''];

Float_t*cmsy_ae = new Float_t[''];

Float_t*cmsz_ae = new Float_t[''];

Float_t cmsX_c, cmsY_c, cmsZ_c;

Float_t cmsX_ce, cmsY_ce, cmsZ_ce;

Float_t cmsX_a, cmsY_a, cmsZ_a;

Float_t cmsX_ae, cmsY_ae, cmsZ_ae;

Int_t cmsNData = 0;

Char_t *cmsw=new Char_t[''];

Char_t cmsW[''];

ifstream cmsInput;

//here you open the .dat files

slmInput.open(Form("%sslm_fitc_las5_7DCOPS.dat",dir.Data()));

cmsInput.open(Form("%scms_fitc_las5_7DCOPS.dat",dir.Data()));

// while(1) creates an infinite loop

while (1) {

slmInput >> slmW >> slmX_c >> slmX_ce >> slmY_c >> slmY_ce >> slmZ_c >> slmZ_ce >> slmX_a >> slmX_ae >> slmY_a >>slmY_ae >> slmZ_a >> slmZ_ae;

if (!slmInput.good()) break;

slmw[slmNData] = slmW;

slmx_c[slmNData] = slmX_c;

slmx_ce[slmNData] = slmX_ce;

slmy_c[slmNData] = slmY_c;

slmy_ce[slmNData] = slmY_ce;

slmz_c[slmNData] = slmZ_c;

slmz_ce[slmNData] = slmZ_ce;

slmx_a[slmNData] = slmX_a;

slmx_ae[slmNData] = slmX_ae;

slmy_a[slmNData] = slmY_a;

slmy_ae[slmNData] = slmY_ae;

slmz_a[slmNData] = slmZ_a;

slmz_ae[slmNData] = slmZ_ae;

cout > cmsX_ce >> cmsY_c >> cmsY_ce >> cmsZ_c >> cmsZ_ce >> cmsX_a >> cmsX_ae >> cmsY_a >>cmsY_ae >> cmsZ_a >> cmsZ_ae;

if (!cmsInput.good()) break;

cmsw[cmsNData] = cmsW;

cmsx_c[cmsNData] = cmsX_c;

cmsx_ce[cmsNData] = cmsX_ce;

cmsy_c[cmsNData] = cmsY_c;

cmsy_ce[cmsNData] = cmsY_ce;

cmsz_c[cmsNData] = cmsZ_c;

cmsz_ce[cmsNData] = cmsZ_ce;

cmsx_a[cmsNData] = cmsX_a;

cmsx_ae[cmsNData] = cmsX_ae;

cmsy_a[cmsNData] = cmsY_a;

cmsy_ae[cmsNData] = cmsY_ae;

cmsz_a[cmsNData] = cmsZ_a;

cmsz_ae[cmsNData] = cmsZ_ae;

cout SetGrid();

c1->GetFrame()->SetBorderSize(12);

c1->SetBorderMode(0);

//Axis settings

hpx->GetXaxis()->SetTitle("X_{SLM} [mm]");

hpx->GetYaxis()->SetTitle("Z_{CMS} [mm]");

hpx->GetXaxis()->CenterTitle();

hpx->GetXaxis()->SetNdivisions(50310);

hpx->GetYaxis()->CenterTitle();

hpx->GetXaxis()->SetTitleOffset(1.03);

hpx->GetYaxis()->SetTitleOffset(1.3);

hpx->GetYaxis()->SetNdivisions(50312);

//Graph CSC center coordinates and errors (get values from the dat file)

//MEp2_1_04 (line 1)

Float_t slmx_c1[1]={slmx_c[1]};

Float_t cmsz_c1[1]={cmsz_c[1]};

Float_t slmx_ce1[1]={slmx_ce[1]};

Float_t slmy_ce1[1]={slmy_ce[1]};

//MEp2_1_14 (line 6)

Float_t slmx_c6[1]={slmx_c[6]};

Float_t cmsz_c6[1]={cmsz_c[6]};

Float_t slmx_ce6[1]={slmx_ce[6]};

Float_t slmy_ce6[1]={slmy_ce[6]};

//MEp2_2_27 (line 11)

Float_t slmx_c11[1]={slmx_c[11]};

Float_t cmsz_c11[1]={cmsz_c[11]};

Float_t slmx_ce11[1]={slmx_ce[11]};

Float_t slmy_ce11[1]={slmy_ce[11]};

//Graph CSC center coordinates

TGraphErrors *gr1 = new TGraphErrors(1,slmx_c1,cmsz_c1,slmx_ce1,slmy_ce1);

TGraphErrors *gr6 = new TGraphErrors(1,slmx_c6,cmsz_c6,slmx_ce6,slmy_ce6);

TGraphErrors *gr11 = new TGraphErrors(1,slmx_c11,cmsz_c11,slmx_ce11,slmy_ce11);

gStyle->SetEndErrorSize(0.01);

//Set marker to plot CSC centers

gr1->SetMarkerStyle(7); // dot

gr1->SetMarkerSize(0.9);

gr1->SetMarkerColor(3); //light green

gr1->Draw("P");

gr6->SetMarkerStyle(7); // dot

gr6->SetMarkerSize(0.9);

gr6->SetMarkerColor(3); //light green

gr6->Draw("P");

gr11->SetMarkerStyle(7); // dot

gr11->SetMarkerSize(0.9);

gr11->SetMarkerColor(3); //light green

gr11->Draw("P");

TLatex l;

l->SetTextAlign(23);

l->SetTextSize(0.02);

l->DrawLatex(-2371.,8099.,"MEp2_1_04");

l->DrawLatex(2371.,8091.,"MEp2_1_14");

l->DrawLatex(5225.,8096.,"MEp2_2_27");

//Define apin coordinates and errors

//This is the apin approx. slmx_c coordinate

//apin_outer_MEp2_1_04 (line 5)

Float_t x_slm_apin5[1] ={-3371.};

//apin_inner_MEp2_1_04 (line 4)

Float_t x_slm_apin4[1] ={-1371.};

//apin_inner_MEp2_1_14 (line 9)

Float_t x_slm_apin9[1] ={1371.};

//apin_outer_MEp2_1_14 (line 10)

Float_t x_slm_apin10[1] ={3371.};

//apin_inner_MEp2_2_27 (line 14)

Float_t x_slm_apin14[1] ={3600.};

//apin_outer_MEp2_2_27 (line 15)

Float_t x_slm_apin15[1] ={6800.};

//This is the apin cmsz_c coordinate

Float_t z_cms_apin5[1] ={cmsz_c[5]};

Float_t z_cms_apin4[1] ={cmsz_c[4]};

Float_t z_cms_apin9[1] ={cmsz_c[9]};

Float_t z_cms_apin10[1] ={cmsz_c[10]};

Float_t z_cms_apin14[1] ={cmsz_c[14]};

Float_t z_cms_apin15[1] ={cmsz_c[15]};

//Errors are not known, but I will set the error for the Z_cms coord equal

//to the CSC Z_cms error (that is equal to the CSC Y_slm coord err)

Float_t ex_slm_apin5[1] ={0.};

Float_t ex_slm_apin4[1] ={0.};

Float_t ex_slm_apin9[1] ={0.};

Float_t ex_slm_apin10[1] ={0.};

Float_t ex_slm_apin14[1] ={0.};

Float_t ex_slm_apin15[1] ={0.};

Float_t ez_cms_apin5[1]={slmy_ce[1]};

Float_t ez_cms_apin4[1]={slmy_ce[1]};

Float_t ez_cms_apin9[1]={slmy_ce[6]};

Float_t ez_cms_apin10[1]={slmy_ce[6]};

Float_t ez_cms_apin14[1]={slmy_ce[11]};

Float_t ez_cms_apin15[1]={slmy_ce[11]};

//Graph apin coordinates and errors

TGraphErrors *gr_apin5 =new TGraphErrors(1,x_slm_apin5,z_cms_apin5,ex_slm_apin5,ez_cms_apin5);

TGraphErrors *gr_apin4 =new TGraphErrors(1,x_slm_apin4,z_cms_apin4,ex_slm_apin4,ez_cms_apin4);

TGraphErrors *gr_apin9 =new TGraphErrors(1,x_slm_apin9,z_cms_apin9,ex_slm_apin9,ez_cms_apin9);

TGraphErrors *gr_apin10 =new TGraphErrors(1,x_slm_apin10,z_cms_apin10,ex_slm_apin10,ez_cms_apin10);

TGraphErrors *gr_apin14 =new TGraphErrors(1,x_slm_apin14,z_cms_apin14,ex_slm_apin14,ez_cms_apin14);

TGraphErrors *gr_apin15 =new TGraphErrors(1,x_slm_apin15,z_cms_apin15,ex_slm_apin15,ez_cms_apin15);

//Set marker to plot apin positions

gr_apin5->SetMarkerStyle(22);//triangle

gr_apin5->SetMarkerSize(0.8);

gr_apin5->SetMarkerColor(4); //blue

gr_apin5->Draw("P");

gr_apin4->SetMarkerStyle(22);//triangle

gr_apin4->SetMarkerSize(0.8);

gr_apin4->SetMarkerColor(4); //blue

gr_apin4->Draw("P");

gr_apin9->SetMarkerStyle(22);//triangle

gr_apin9->SetMarkerSize(0.8);

gr_apin9->SetMarkerColor(4); //blue

gr_apin9->Draw("P");

gr_apin10->SetMarkerStyle(22);//triangle

gr_apin10->SetMarkerSize(0.8);

gr_apin10->SetMarkerColor(4); //blue

gr_apin10->Draw("P");

gr_apin14->SetMarkerStyle(22);//triangle

gr_apin14->SetMarkerSize(0.8);

gr_apin14->SetMarkerColor(4); //blue

gr_apin14->Draw("P");

gr_apin15->SetMarkerStyle(22);//triangle

gr_apin15->SetMarkerSize(0.8);

gr_apin15->SetMarkerColor(4); //blue

gr_apin15->Draw("P");

// Connect the alignment pins with a line

//Take the first two apin points (x1,y1,x2,y2)

TLine *l1 = new TLine(-3371.,cmsz_c[5],-1371.,cmsz_c[4]);

l1->SetLineColor(808);//orange

l1->SetLineWidth(1.);

l1->Draw();

//Connect the next two apins

TLine *l2 = new TLine(1371.,cmsz_c[9],3371., cmsz_c[10]);

l2->SetLineColor(808);//orange

l2->SetLineWidth(1.);

l2->Draw();

//..and the next two

TLine *l3 =new TLine(3600.,cmsz_c[14],6800.,cmsz_c[15]);

l3->SetLineColor(808);//orange

l3->SetLineWidth(1.);

l3->Draw();

//Define fitted DCOPS coordinates and errors

//DCOPS: 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out ref

//These are the dcops approx. slmx_c coordinates

//DCOPS_outer_MEp2_1_04_OUT (line 3)

Float_t x_slm_dcops3[1]={-3400.};

//DCOPS_inner_MEp2_1_04_OUT (line 2)

Float_t x_slm_dcops2[1]={-1500.};

//DCOPS_inner_MEp2_1_14_IN (line 7)

Float_t x_slm_dcops7[1]={1500.};

//DCOPS_outer_MEp2_1_14_IN (line 8)

Float_t x_slm_dcops8[1]={3400.};

//DCOPS_inner_MEp2_2_27_IN (line 12)

Float_t x_slm_dcops12[1]={3900.};

//DCOPS_outer_MEp2_2_27_IN (line 13)

Float_t x_slm_dcops13[1]={7000.};

//DCOPS_MEp2_reference_5_IN (line 17)

Float_t x_slm_dcops17[1]={7200.};

//These are the dcops cmsz_c coordinates

Float_t z_cms_dcops3[1]={cmsz_c[3]};

Float_t z_cms_dcops2[1]={cmsz_c[2]};

Float_t z_cms_dcops7[1]={cmsz_c[7]};

Float_t z_cms_dcops8[1]={cmsz_c[8]};

Float_t z_cms_dcops12[1]={cmsz_c[12]};

Float_t z_cms_dcops13[1]={cmsz_c[13]};

Float_t z_cms_dcops17[1]={cmsz_c[17]};

//These errors are not known (set them to zero)

Float_t ex_slm_dcops3[1]={0.};

Float_t ex_slm_dcops2[1]={0.};

Float_t ex_slm_dcops7[1]={0.};

Float_t ex_slm_dcops8[1]={0.};

Float_t ex_slm_dcops12[1]={0.};

Float_t ex_slm_dcops13[1]={0.};

Float_t ex_slm_dcops17[1]={0.};

//For now I will set the error for the DCOPS dowel Z_CMS pos. equal to the error for the DCOPS slmy position

Float_t ez_cms_dcops3[1] = {slmy_ce[3]};

Float_t ez_cms_dcops2[1] = {slmy_ce[2]};

Float_t ez_cms_dcops7[1] = {slmy_ce[7]};

Float_t ez_cms_dcops8[1] = {slmy_ce[8]};

Float_t ez_cms_dcops12[1] = {slmy_ce[12]};

Float_t ez_cms_dcops13[1] = {slmy_ce[13]};

Float_t ez_cms_dcops17[1] = {slmy_ce[17]};

//Graph fitted DCOPS ref dowel pin coordinates and errors

TGraphErrors *gr_dcops2 =new TGraphErrors(1,x_slm_dcops2,z_cms_dcops2,ex_slm_dcops2,ez_cms_dcops2);

TGraphErrors *gr_dcops3 =new TGraphErrors(1,x_slm_dcops3,z_cms_dcops3,ex_slm_dcops3,ez_cms_dcops3);

TGraphErrors *gr_dcops7 =new TGraphErrors(1,x_slm_dcops7,z_cms_dcops7,ex_slm_dcops7,ez_cms_dcops7);

TGraphErrors *gr_dcops8 =new TGraphErrors(1,x_slm_dcops8,z_cms_dcops8,ex_slm_dcops8,ez_cms_dcops8);

TGraphErrors *gr_dcops12 =new TGraphErrors(1,x_slm_dcops12,z_cms_dcops12,ex_slm_dcops12,ez_cms_dcops12);

TGraphErrors *gr_dcops13 =new TGraphErrors(1,x_slm_dcops13,z_cms_dcops13,ex_slm_dcops13,ez_cms_dcops13);

TGraphErrors *gr_dcops17 =new TGraphErrors(1,x_slm_dcops17,z_cms_dcops17,ex_slm_dcops17,ez_cms_dcops17);

//Set marker to plot ref dowel pin positions

gr_dcops2->SetMarkerStyle(4); //empty circle

gr_dcops2->SetMarkerSize(0.6);

gr_dcops2->SetMarkerColor(6);//pink

gr_dcops2->Draw("P");

gr_dcops3->SetMarkerStyle(4); //empty circle

gr_dcops3->SetMarkerSize(0.6);

gr_dcops3->SetMarkerColor(6);//pink

gr_dcops3->Draw("P");

gr_dcops7->SetMarkerStyle(4); //empty circle

gr_dcops7->SetMarkerSize(0.6);

gr_dcops7->SetMarkerColor(6);//pink

gr_dcops7->Draw("P");

gr_dcops8->SetMarkerStyle(4); //empty circle

gr_dcops8->SetMarkerSize(0.6);

gr_dcops8->SetMarkerColor(6);//pink

gr_dcops8->Draw("P");

gr_dcops12->SetMarkerStyle(4); //empty circle

gr_dcops12->SetMarkerSize(0.6);

gr_dcops12->SetMarkerColor(6);//pink

gr_dcops12->Draw("P");

gr_dcops13->SetMarkerStyle(4); //empty circle

gr_dcops13->SetMarkerSize(0.6);

gr_dcops13->SetMarkerColor(6);//pink

gr_dcops13->Draw("P");

gr_dcops17->SetMarkerStyle(4); //empty circle

gr_dcops17->SetMarkerSize(0.6);

gr_dcops17->SetMarkerColor(6);//pink

gr_dcops17->Draw("P");

//Define CCD2 pixel 1 coordinates and errors

//DCOPS: 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out ref

//These are the CCD2 pixel 1 approx. slmx_c coordinates

//Note: ref sensor is at 7100 mm, but moved it to 7200 mm to not overlap with

//the other DCOPS

//DCOPS_outer_MEp2_1_04_OUT (line 3)

Float_t x_slm_CCD2pixel1_3[1]={-3400.};

//DCOPS_inner_MEp2_1_04_OUT (line 2)

Float_t x_slm_CCD2pixel1_2[1]={-1500.};

//DCOPS_inner_MEp2_1_14_IN (line 7)

Float_t x_slm_CCD2pixel1_7[1]={1500.};

//DCOPS_outer_MEp2_1_14_IN (line 8)

Float_t x_slm_CCD2pixel1_8[1]={3400.};

//DCOPS_inner_MEp2_2_27_IN (line 12)

Float_t x_slm_CCD2pixel1_12[1]={3900.};

//DCOPS_outer_MEp2_2_27_IN (line 13)

Float_t x_slm_CCD2pixel1_13[1]={7000.};

//DCOPS_MEp2_reference_5_IN (line 17)

Float_t x_slm_CCD2pixel1_17[1]={7200.};

//These are the dcops cmsz_c coordinates (fitted value-57.579 [mm])

Float_t D=57.579; //distance from the DCOPS ref dowel pin to the first CCD pixel

Float_t z_cms_CCD2pixel1_3[1]={cmsz_c[3]-D};

Float_t z_cms_CCD2pixel1_2[1]={cmsz_c[2]-D};

Float_t z_cms_CCD2pixel1_7[1]={cmsz_c[7]-D};

Float_t z_cms_CCD2pixel1_8[1]={cmsz_c[8]-D};

Float_t z_cms_CCD2pixel1_12[1]={cmsz_c[12]-D};

Float_t z_cms_CCD2pixel1_13[1]={cmsz_c[13]-D};

Float_t z_cms_CCD2pixel1_17[1]={cmsz_c[17]-D};

//Errors are not known

Float_t ex_slm_CCD2pixel1_3[1] ={0.};

Float_t ex_slm_CCD2pixel1_2[1] ={0.};

Float_t ex_slm_CCD2pixel1_7[1] ={0.};

Float_t ex_slm_CCD2pixel1_8[1] ={0.};

Float_t ex_slm_CCD2pixel1_12[1] ={0.};

Float_t ex_slm_CCD2pixel1_13[1] ={0.};

Float_t ex_slm_CCD2pixel1_17[1] ={0.};

//For now I will set the error for the DCOPS dowel Z_CMS pos. equal to the error for the DCOPS slmy position

Float_t ez_cms_CCD2pixel1_3[1] = {slmy_ce[3]};

Float_t ez_cms_CCD2pixel1_2[1] = {slmy_ce[2]};

Float_t ez_cms_CCD2pixel1_7[1] = {slmy_ce[7]};

Float_t ez_cms_CCD2pixel1_8[1] = {slmy_ce[8]};

Float_t ez_cms_CCD2pixel1_12[1] = {slmy_ce[12]};

Float_t ez_cms_CCD2pixel1_13[1] = {slmy_ce[13]};

Float_t ez_cms_CCD2pixel1_17[1] = {slmy_ce[17]};

//Graph CCD2 pixel 1 coordinates and errors

TGraphErrors *gr_CCD2pixel1_3 =new TGraphErrors(1,x_slm_CCD2pixel1_3,z_cms_CCD2pixel1_3,ex_slm_CCD2pixel1_3,ez_cms_CCD2pixel1_3);

TGraphErrors *gr_CCD2pixel1_2 =new TGraphErrors(1,x_slm_CCD2pixel1_2,z_cms_CCD2pixel1_2,ex_slm_CCD2pixel1_2,ez_cms_CCD2pixel1_2);

TGraphErrors *gr_CCD2pixel1_7 =new TGraphErrors(1,x_slm_CCD2pixel1_7,z_cms_CCD2pixel1_7,ex_slm_CCD2pixel1_7,ez_cms_CCD2pixel1_7);

TGraphErrors *gr_CCD2pixel1_8 =new TGraphErrors(1,x_slm_CCD2pixel1_8,z_cms_CCD2pixel1_8,ex_slm_CCD2pixel1_8,ez_cms_CCD2pixel1_8);

TGraphErrors *gr_CCD2pixel1_12 =new TGraphErrors(1,x_slm_CCD2pixel1_12,z_cms_CCD2pixel1_12,ex_slm_CCD2pixel1_12,ez_cms_CCD2pixel1_12);

TGraphErrors *gr_CCD2pixel1_13 =new TGraphErrors(1,x_slm_CCD2pixel1_13,z_cms_CCD2pixel1_13,ex_slm_CCD2pixel1_13,ez_cms_CCD2pixel1_13);

TGraphErrors *gr_CCD2pixel1_17 =new TGraphErrors(1,x_slm_CCD2pixel1_17,z_cms_CCD2pixel1_17,ex_slm_CCD2pixel1_17,ez_cms_CCD2pixel1_17);

//Set marker to plot CCD2 pixel1 positions

gr_CCD2pixel1_3->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_3->SetMarkerSize(0.6);

gr_CCD2pixel1_3->SetMarkerColor(12);//gray

gr_CCD2pixel1_3->Draw("P");

gr_CCD2pixel1_2->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_2->SetMarkerSize(0.6);

gr_CCD2pixel1_2->SetMarkerColor(12);//gray

gr_CCD2pixel1_2->Draw("P");

gr_CCD2pixel1_7->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_7->SetMarkerSize(0.6);

gr_CCD2pixel1_7->SetMarkerColor(12);//gray

gr_CCD2pixel1_7->Draw("P");

gr_CCD2pixel1_8->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_8->SetMarkerSize(0.6);

gr_CCD2pixel1_8->SetMarkerColor(12);//gray

gr_CCD2pixel1_8->Draw("P");

gr_CCD2pixel1_12->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_12->SetMarkerSize(0.6);

gr_CCD2pixel1_12->SetMarkerColor(12);//gray

gr_CCD2pixel1_12->Draw("P");

gr_CCD2pixel1_13->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_13->SetMarkerSize(0.6);

gr_CCD2pixel1_13->SetMarkerColor(12);//gray

gr_CCD2pixel1_13->Draw("P");

gr_CCD2pixel1_17->SetMarkerStyle(20); //* filled circle

gr_CCD2pixel1_17->SetMarkerSize(0.6);

gr_CCD2pixel1_17->SetMarkerColor(12);//gray

gr_CCD2pixel1_17->Draw("P");

//Draw a 28.672 [mm] (lenght of CCD) line from the CCD2 pixel 1.

//Add 28.672 [mm] to z_cms_CCD2pixel1_#

Float_t L=28.672;

TLine *lccd1=new TLine(-3400.,cmsz_c[3]-D+L, -3400.,cmsz_c[3]-D);

lccd1->SetLineColor(806); //orange

lccd1->SetLineWidth(3.);

lccd1->Draw();

TLine *lccd2=new TLine(-1500.,cmsz_c[2]-D+L, -1500.,cmsz_c[2]-D);

lccd2->SetLineColor(806); //orange

lccd2->SetLineWidth(3.);

lccd2->Draw();

TLine *lccd3=new TLine(1500.,cmsz_c[7]-D+L, 1500.,cmsz_c[7]-D);

lccd3->SetLineColor(806); //orange

lccd3->SetLineWidth(3.);

lccd3->Draw();

TLine *lccd4=new TLine(3400.,cmsz_c[8]-D+L, 3400.,cmsz_c[8]-D);

lccd4->SetLineColor(806); //orange

lccd4->SetLineWidth(3.);

lccd4->Draw();

TLine *lccd5=new TLine(3900.,cmsz_c[12]-D+L, 3900.,cmsz_c[12]-D);

lccd5->SetLineColor(806); //orange

lccd5->SetLineWidth(3.);

lccd5->Draw();

TLine *lccd6=new TLine(7000.,cmsz_c[13]-D+L, 7000.,cmsz_c[13]-D);

lccd6->SetLineColor(806); //orange

lccd6->SetLineWidth(3.);

lccd6->Draw();

TLine *lccd7=new TLine(7200.,cmsz_c[17]-D+L, 7200.,cmsz_c[17]-D);

lccd7->SetLineColor(806); //orange

lccd7->SetLineWidth(3.);

lccd7->Draw();

//Define CCD2(R)_meas coordinates and errors

//DCOPS: 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out ref

//This is the CCD2_meas approx. slmx_c coordinate

//Move these coordinates to the left by 100 [mm] so we can distinguish the CCD2 and CCD4 measured values

//Float_t x_slm_CCD2_meas[7] ={-3400.,-1500.,1500.,3400.,3900.,7000.,7200.}; //[mm]

Float_t x_slm_CCD2_meas[7] ={-3500.,-1600.,1400.,3300.,3800.,6900.,7100.}; //[mm]

//This is the dcops_meas cmsz_c coordinate (CCD2 pixel 1 position+ measured distance to the first CCD2 pixel)

Float_t z_cms_CCD2_meas[7] ={8002.024,8001.875,8001.558,8001.291,8001.434,8001.205,8001.4916};//[mm]

//Measured distance to the first CCD2 pixel={6.552, 13.691,19.032,17.134,17.337,16.942,18.351}; //[mm]

//z_cms_CCD2pixel1={ 7995.472, 7988.184, 7982.526, 7984.157,7984.0976,7984.263,7983.1406}; //[mm]

//Errors in slm_x direction are not known

Float_t ex_slm_CCD2_meas[7] ={0.,0.,0.,0.,0.,0.,0.};

//the error for the DCOPS_meas dowel Z_CMS pos. are from the measurement file

Float_t ez_cms_CCD2_meas[7] = {0.001942,0.001834,0.001946,0.004043,0.001965,0.004233,0.003857}; //[mm]

//Graph DCOPS_meas ref dowel pin coordinates and errors

TGraphErrors *gr_CCD2_meas =new TGraphErrors(7,x_slm_CCD2_meas,z_cms_CCD2_meas,ex_slm_CCD2_meas,ez_cms_CCD2_meas);

//Set marker to plot meas ref dowel pin positions

gr_CCD2_meas->SetMarkerStyle(4); //empty circle

gr_CCD2_meas->SetMarkerSize(0.6);

gr_CCD2_meas->SetMarkerColor(4);//blue

gr_CCD2_meas->Draw("P");

//Define CCD4(L)_meas coordinates and errors

//DCOPS: 1_04_out 1_04_in 1_14_in 1_14_out 2_27_in 2_27_out ref

//This is the CCD4_meas approx. slmx_c coordinate

//Move these coordinates to the right by 100 [mm] so we can distinguish the CCD2 and CCD4 measured values

//Float_t x_slm_CCD4_meas[7] ={-3400.,-1500.,1500.,3400.,3900.,7000.,7200.}; //[mm]

Float_t x_slm_CCD4_meas[7] ={-3300.,-1400.,1600.,3500.,4000.,7100.,7300.}; //[mm]

//This is the dcops_meas cmsz_c coordinate (CCD4 pixel 1 position+ measured distance to the first CCD2 pixel)

Float_t z_cms_CCD4_meas[7] ={8001.504,8001.504,8001.336,8001.299,8001.135,8000.891,8000.909};//[mm]

//Measured distance to the first CCD4 pixel={6.032,13.32,18.810,17.142, 17.038, 16.628,17.769}; //[mm]

//z_cms_CCD4pixel1={7995.472, 7988.184, 7982.526, 7984.157,7984.0976,7984.263,7983.1406}; //[mm]

//Errors in slm_x direction are not known

Float_t ex_slm_CCD4_meas[7] ={0.,0.,0.,0.,0.,0.,0.};

//the error for the DCOPS_meas dowel Z_CMS pos. are from the measurement file

Float_t ez_cms_CCD4_meas[7] = {0.006180,0.001658,0.0037343,0.002587,0.002017,0.003037,0.004484}; //[mm]

//Graph DCOPS_meas ref dowel pin coordinates and errors

TGraphErrors *gr_CCD4_meas =new TGraphErrors(7,x_slm_CCD4_meas,z_cms_CCD4_meas,ex_slm_CCD4_meas,ez_cms_CCD4_meas);

//Set marker to plot meas ref dowel pin positions

gr_CCD4_meas->SetMarkerStyle(4); //empty circle

gr_CCD4_meas->SetMarkerSize(0.6);

gr_CCD4_meas->SetMarkerColor(1);//black

gr_CCD4_meas->Draw("P");

//This is laser 5 approx. slmx_c coordinate

//Marcus used the value: 7175.883 [mm]

//I will move this to 7600 so it does not overlap with the ref sensor measurement

Float_t x_slm_las5[1] ={7600.}; //[mm]

//This is laser 5 cmsz_c coordinate

Float_t z_cms_las5[1] ={cmsz_c[18]}; //[mm]

Float_t ex_slm_las5[1] ={0.};

Float_t ez_cms_las5[1] = {slmy_ce[18]};

coutSetLineColor(2);//red

las->SetLineWidth(0.01);

las->SetLineStyle(1);//...

las->Draw();

//Define PG coordinates and errors

//This is the apin approx. slmx_c coordinate (I just used the same coordinates from the

//fitted values

//Float_t x_slm_apin_PG[5] ={-1371.,1371.,3371.,3600.,6800.}; //[mm]

//This is the apin cmsz_c coordinate (these are the PG Z_cms coordinates)

//Note: 1_04_out is not measured (that's the reason why we have 5 values instead of 6)

//Float_t z_cms_apin_PG[5] ={8037.05,7971.81,8031.59,8082.00,8082.53}; //[mm]

//I will include errors only for the Z_cms coordinates (I remember 0.3 [mm]; this has to be verified)

//Float_t ex_slm_apin_PG[5] ={0.,0.,0.,0.,0.};

//Float_t ez_cms_apin_PG[5] = {0.3,0.3,0.3,0.3,0.3};

//Graph apin coordinates and errors

//TGraphErrors *gr_apin =new TGraphErrors(5,x_slm_apin_PG,z_cms_apin_PG,ex_slm_apin_PG,ez_cms_apin_PG);

//Set marker to plot apin positions(PG)

//gr_apin->SetMarkerStyle(23);//triangle

//gr_apin->SetMarkerSize(0.8);

//gr_apin->SetMarkerColor(7); //light blue

//gr_apin->Draw("P");

TLegend *leg = new TLegend(0.75,0.8,0.98,0.98);

leg->AddEntry(gr1,"CSC center (fitted)","P");

leg->AddEntry(gr_apin5,"alignment pin (fitted)","P");

leg->AddEntry(gr_dcops2,"DCOPS dowel (fitted)","P");

leg->AddEntry(gr_CCD2_meas,"CCD2/Right (measured)","P");

//leg->AddEntry(gr_CCD4_meas,"CCD4/Left (measured)","P");

leg->AddEntry(gr_CCD2pixel1_3,"CCD2/Right pixel 1","P");

leg->AddEntry(gr_las5,"laser 5","P");

leg->Draw();

TPaveText *pt=new TPaveText(9383.55,8065.89,13278.1,8083.12);

TText *t1=pt->AddText("FQ=6.66X10^{-5}");

TText *t2=pt->AddText("#chi^{2}=86.21");

t1->SetTextSize(0.03);

t1->SetTextFont(42);

t1->SetTextColor(1);

t2->SetTextSize(0.03);

t2->SetTextFont(42);

t2->SetTextColor(1);

pt->Draw();

//produce a .gif file; for other formats see page 134.

c1->Print("ME2_SLM25_LAS5_7DCOPS.ps");

}

---------------------------------------------

- created a file that shows only the measurement part:

slm_cms_readcocoaout_las2_7DCOPS_onlymeas.C

Laser 2 and Laser 5 measurement plots are shown on the next page.

[pic]

[pic]

Zoomed plot of Laser 2 mesurement (without COCOA fitted CSC center, a-pin and DCOPS dowel pins):

(I will need to remove these from the legend).

[pic]

-----------------------

PT 5

PT 2

Ref sensor at PT5

Laser position for ref. sensor at PT2 expected around 20.982 mm and not 8.686 mm (not shown on the plot)

= bi_rightCCDX_disp= -8.171 (negative because it is measured from the dowel pin to the first pixel of the down CCD => negative x direction)

On the CAD dwg

= bi_rightCCDX_disp=

+ 8.171??

(Can this be a positive number???)

We might want to check the calib values!

Laser position for ref. sensor at PT2 expected around 10.059 mm and not 18.545 mm (not shown on the plot)

Readout direction

Readout direction

PT5

PT2

First pixel for ref sensor at PT2. The 8.686 mm readout is correct!

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download