testdockerwcsim / XTriggerApplication

Other
2 stars 3 forks source link

Add ability to move true tracks between WCSimRootTriggers #13

Closed tdealtry closed 5 years ago

tdealtry commented 5 years ago

Validation with muons complete. This time, I used a combination of complete_comparison.C and verification_HitsChargeTime.C

So the changes:

This requires an update of the WCSim in the docker. Hopefully it picks it up ok!

This solves #11

brichards64 commented 5 years ago

Hi Tom,

"Note there is still the small precision difference in digit times. Also small precision difference in SumQ (sum of digit charge) when the digits are added in a different order"

Does that mean that even with these changes we are not at 100% agreement?

tdealtry commented 5 years ago

Same case as I described in #6 for the digit times. WCSim applies a 950 ns offset to digit times. There's then a subtraction of the 950 ns we have to do in TriggerApplication. This induces the precision error. (Setting both to 0, everything is equal to <1E-6). I've altered WCSim to not apply the 950 ns offset when using the NoTrigger, and altered DataOut to do the calculation in the same order WCSim does. Now the vast majority of digit times agree, and those that don't disagree at 0.00012207 ns i.e. less than a pico second. Good enough I think. [We probably could go further and store these times as double rather than float, which will probably give exact agreeement, but this opens up questions over file size & storage amounts that I don't think are worth it]

For the sumq, since things are only different when the digits are added in a different order, it's just a precision issue. Everything is stored as float, but I've changed the temporary variable that does the sum to a double (in both WCSim & DataOut). This has fixed it.

So to summarise

brichards64 commented 5 years ago

Sounds good and checks all passed so an easy approved PR