This is the repository for the steering and controls software of the sPHENIX Time Projection Chamber (TPC) tracking detector's directed line laser calibration system.
The line laser system is used to generate particle tracks of known position and orientation in the working gas of the TPC, thus allowing identification of distortions generated by inhomogeneities in the applied electric and magnetic field. Correcting for these distortions will enable more accurate reconstruction of particle tracks.
Each laser (total of 8 benches) is steered with a set of piezomotors, motor controllers, and associated electronics. These are controlled via a PC connected to BNL's network. No local installation is required since the steering and controls software is already installed on this PC. For a technical summary of key scripts and use cases, see [Commands]{#Commands}
This software is designed to be run using a command-line interface, python3
- Describe any prerequisites, libraries, OS version, etc., needed before installing program.
- ex. Windows 10
Using a command-line interface, log into BNL SDCC then tunnel to the sPHENIX operations server. From there, navigate to the ~/laser/tpc_laser_steering/
directory. Programs to steer the laser are primarily found in the ./bin
directory and largely written as Shell or Python scripts. These are modified to be executable via the shell.
code blocks for commands
In the event that
- How/where to download your program
- Any modifications needed to be made to files/folders
git clone
Any questions or concerns with the line laser software can be directed to Seth Howell at [email protected] or Ross Corliss at [email protected].
- 2.0.0
- In progress...
- 1.1.0
- Added rudimentary diode search algorithms for "pre-alignment" using doglegs
- 1.0.0
- Initial release
The following commands are written in the order they are intended to be executed from the Shell. Ultimately, if a Line Laser GUI is ever implemented, this section will be replaced by a higher-level explanation of the back-end functioning of the GUI.
-
./executeXMS.sh
-- starts the XMS, which is automatic when the device is powered -
./stopXMS.sh
-- stops the XMS program, e.g. if in a broken loop. -
./killXCD2.sh
-- stops the XMS, kills movement on both axes, and disables -
./assignPorts_forDebugOnly.py egg
-- set up the default ports and UARTS for an egg (or 'doglegs' if doing those) -
./updatePorts.py
-- update the ttyUSB ports controller can communicate with -
./changeAxisDogleg.py DEBUG_PH (or _TH_S or _TH_L or _DL_A0 or _DL_A1)
-- changes given motor axis being talked to (also sets active port and axis) -
./clearDogleg.py
-- resets error states in the controller status (this works on all motors, not just the doglegs). 8=nack, 9=busy, 1=fail, 98=rebooted -
./homeDogleg.py
-- moves the current axis to home and keeps track of rotations. stops if |rotations|>3 -
./homeThetaS.py test
,./homeThetaL.py test
,./homePhi.py test
-- performs homing sequence for particular motors test can be any string -
./goto.py [axis] [position]
-- moves a given motor axis to a given position -
./gotoDogleg.py 3.1
-- moves the current axis to absolute position 3.1, with occasional backs to unbind. stops if |rotations|>3 -
./gotoDogleg.py L0_DL0_A0 1.7
-- moves axis A0 on DogLeg 0 to absolute position 1.7. If that axis is not what is currently being controlled, it saves the current axis data to a file, then loads the correct axis data from the named file before moving. -
./relativeDogleg.py -0.5
-- moves the current axis -0.5 from its current position , with occasional backs to unbind. stops if |rotations|>3
if needed:
./quickAssign.py XAXIS 1
-- switches the current axis to axis 1 (other data will not be updated). Use '0' to switch to zero.
./quickAssign.py V19 0
-- the first time the boards are powered up, this clears the 'boot' flag, which will result in an error if
./changeAxisDogleg.py L0_DL0_A0
-- switches the axis to axis 0 for dogleg 0 on laser 0, and loads the last known variables for that axis from file to the controller, if the file exists. Writes out the current file for the current axis as well.
then you can run homePhi on the phi motors, or homeThetaL or homeThetaS on those motors
./homePhi.py test
the 'test' can be any string, and checks against the kfdb to see if there is existing data. if it gets stuck in the loop you can go back and killXCD2 above.
The following set of commands was designed for use with the XCD evaluation kit, which was initially used to determine whether or not the particular piezomotors we obtained were Commands to control the Direct Laser controllers and the XCD Evaluation kit using USB
XCD Commands:
talkNano.py
--- readNano.py
- {assign, config, configRev, home, kill, move, pulse, report}Nano.py: individual motor command scripts
- cmdNano.py: high level command
- variableDictionary.py: dictionary of XCD variables, used in some commands
- commandDictionary.py: dictionary of XCD commands, used in cmdNano.py
- playNano.py
Other:
- SetupXCD.sh: sets serial port baud rate in bash
- Home{Right, Left}.sh: sends XCD home command in bash