I guess the best thing to do would be to check? Make two versions of the
compact.xml (one with "0.0 - -0.000625" and one with "0.000625"), convert
both to LCDD, do a diff?
But you could also change Pelle's code in BuildMillepedeCompact so it
doesn't use minus signs. The minus signs are coming from this code:
if (p.getType() == MilleParameter.Type.ROTATION.getType() && !flipRotationCorrection) {
newValue = oldValue + " - " + String.format("%.6f",correction);
System.out.println("NOFLIP");
} else {
newValue = oldValue + " + " + String.format("%.6f",correction);
System.out.println("FLIP");
}
and you could instead do String.format("%.6f",-1.0*correction). Should be
safe.
On Tue, 30 Aug 2016, Alessandra Filippi wrote:
> Hi Norman,
> I'm not quite sure as I haven't taken a closer look yet. This is the output
> of the procedure buildCompact.py which is supposed to read the output
> of millepede and add (namely, subtract) the offsets in the compact.xml of the
> starting geometry, to produce a different aligned geometry.
> I guess the relevant code is the BuildMillepedeCompact.java class, and the
> issue may be that these numbers have to be treated as text strings as it can
> happen that the offset must be subtracted from some parameters over which a
> correction by means of a formula is already applied in the compact.xml (as
> the constraints that were suggested by Sho).
> If you tell me that the "- -" sequence does not make sense, as I was
> supposing, I think I can spot the problem by myself and apply the necessary
> patch (whenever the offset it negative). In the meanwhile, I'm anyway
> correcting my new xml files by hand.
> Thanks, cheers
> Alessandra
>
>
>
>
>
>
>
> On Tue, 30 Aug 2016, Graf, Norman A. wrote:
>
>> Hello Alessandra,
>> That is, indeed, odd behavior. What code is producing this xml file?
>> Norman
>>
>> -----Original Message-----
>> From: [log in to unmask]
>> [mailto:[log in to unmask]] On Behalf Of Alessandra Filippi
>> Sent: Tuesday, August 30, 2016 5:49 AM
>> To: hps-software <[log in to unmask]>
>> Subject: xml behavior
>>
>> Hi all,
>> I have a stupid question about xml, that somebody with some more knowledge
>> of the language can answer very quickly I think. In the compact.xml file
>> that I'm producing (automatically) upon alignment I found some lines like,
>> for instance:
>>
>> <millepede_constant name="12304" value="0.0 - -0.000625" />
>>
>> I'm wondering how xml treats the two double - signs. I cannot see any
>> complain anywhere but I actually do not know how this string is converted
>> into a number.
>> Is this an acceptable syntax, to get as a result for value = 0.000625 ?
>> (I would anyhow be tempted for the moment to replace every "- -" string
>> with a "+", by hand).
>> Thanks, cheers
>> Alessandra
>>
>> ########################################################################
>> 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
>>
>> ########################################################################
>> 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
>>
>
> ########################################################################
> 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
>
########################################################################
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
|