Print

Print


Hi,

I have imported the beam conditions from the ECAL commissioning so that they are available now in HPS Java, which resolves this JIRA item.

https://jira.slac.stanford.edu/browse/HPSJAVA-312

This information includes

current (nA)
position X (mm)
positionY (mm)
energy (GeV)

You can test this by running 

cd conditions; mvn test -Dtest=BeamConditionsTest

which prints all beam conditions that were recorded.

These values do not represent averages but are a single measurement taken at some unspecified time by a shifter.

In your Java analysis code you can access this new information using a code snippet such as

BeamConditionsCollection beamCollection =
    DatabaseConditionsManager.getInstance().getConditionsData(BeamConditionsCollection.class, "beam");
BeamConditions beam = beamCollection.get(0);
Double current = beam.getCurrent();
Double positionX = beam.getPositionX();
Double positionY = beam.getPositionY();
Double energy = beam.getEnergy();

The energy is 1.92 GeV for every run, when beam was on and measured.

We follow the convention that these values are 0 if the beam was not on, and null if they were unmeasured.

One import thing to note is that when accessing these values in Java, you should not use the "double" primitive type but the "Double" class.

Attempting to use the primitive type when there are null values for the run will result in a NullPointerException, as converting Double to double does not work for null values.

Let me know if you have any questions or comments.

--Jeremy

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1