Patrick Gartung
University of California, Riverside
for the US CMS Tracker Project
At University of California Santa Barbara and Fermilab CAEN A1303 controllers are used in place of A303 controllers. The A303 controller is no longer commercially available. The only difference between the controllers is that the A303 is an ISA card and the A1303 is a PCI card. The corresponding device drivers are different because of the differences in bus architecture, but the commands that are sent to the CAEN SY127 high voltage crate are identical as are the responses from the crate. With this in mind, the Daq_CMS_Like software was modified as little as possible to use the A1303 in place of the A303. Below are detailed the changes made to do this.
1. Download the A1303 device driver for Linux using the following link:
http://hep.physics.ucsb.edu/people/gartung/A1303_mod/HSCAENETLib-1-4.tar.gz
2. Compile and install the device driver using the following script:
http://hep.physics.ucsb.edu/people/gartung/A1303_mod/install_a1303.bash
3. Make the following changes to the Daq_CMS_Like and Lt software:
Lt/Config/settings.xml
Add dtvset="5000" to SensorDescriptor
Note: This increases the default polling time for high voltage changes otherwise Lt will timeout and produce an error message.
Daq_Cms_Like/Acquisition/src/a303device.cxx
diff a303device.cxx.ucsb a303device.cxx.orig
9c9
< #include "HSCAENETLib.h"
---
>
15,20d14
< int a1303index = 0;
< ulong timeout = 100;
< int device = HSCAENETCardInit("A1303",&a1303index);
< HSCAENETCardReset(device);
< HSCAENETTimeout(device, timeout);
< HSCAENETCardEnd(device);
Note: These changes are needed to properly initialize the A1303 card.
Daq_Cms_Like/Acquisition/src/sy127process.cxx
diff sy127process.cxx.ucsb sy127process.cxx.orig
66c66
< a303 = new A303Device("a1303_0",fSY127Description->getAddress());
---
> a303 = new A303Device("A303",fSY127Description->getAddress());
Note: This change opens /dev/a1303_0 rather than /dev/A303 for communication with the SY127 crate.
Daq_Cms_Like/Acquisition/src/sy127process.cxx
diff sy127device.cxx.ucsb sy127device.cxx.orig
295,296c295,296
< /* float fv = (v / this->GetVCalibration(numchan));
< v = int(fv);*/
---
> float fv = (v / this->GetVCalibration(numchan));
> v = int(fv);
306,307c306,307
< /* float fv = (v / this->GetVCalibration(numchan));
< v = int(fv);*/
---
> float fv = (v / this->GetVCalibration(numchan));
> v = int(fv);
Note: This change may only be needed for SY127 crates with A132 HV modules. This code would set the voltage to half the requested value
Daq_Cms_Like/Acquisition/Makefile
diff Makefile Makefile.ucsb
23c23
<
---
> HSCAENETLIB=${HOME}/HSCAENETLib-1-4
521c521
< g++ $(CXXFLAGS) $(INCPATH) -c -I $(A303SRC) src/a303device.cxx
---
> g++ $(CXXFLAGS) $(INCPATH) -c -I $(A303SRC) -I $(HSCAENETLIB)/include
src/a303device.cxx
In emacs query replace -ldaq with -ldaq -lhscaenet
Note: The first change allows a303device.cxx to compile. The second change is needed because libdaq.a contains a303device.o which contains references from libhscaenet.so.
Daq_Cms_Like/Dim/src/dimsy127process.cxx
diff dimsy127process.cxx.ucsb dimsy127process.cxx.orig
34c34
< a303 = new A303Device("a1303_0",f->getAddress());
---
> a303 = new A303Device("A303",f->getAddress());
Note: This change opens /dev/a1303_0 rather than /dev/A303 for communication with the SY127 crate.
Daq_Cms_Like/Dim/Makefile
In emacs query replace -ldaq with -ldaq -lhscaenet
Note: This change is needed because libdaq.a contains a303device.o which contains references from libhscaenet.so.
The modified versions of the above files can be downloaded using the following link:
http://hep.physics.ucsb.edu/people/gartung/A1303_mod/a1303_mods.tar.gz