That class exists because of two things we don't get if we use
BaseCalorimeterHit:
1. BaseCalorimeterHit has a constructor that takes a raw and a corrected
energy, and a constructor that takes a corrected energy. You can't make a
BaseCalorimeterHit with only a raw energy. This is weird since
BaseCalorimeterHit can calculate a corrected energy from the raw energy,
but not the other way around.
2. BaseCalorimeterHit.getPosition() uses the IDDecoder to calculate the
crystal position. This always returns 0.0 because there was never an
IDDecoder written for the HPS ECal, and we instead use the generic GridXYZ
IDDecoder.
If these issues are addressed we could use BaseCalorimeterHit.
There is no problem with reading back SIOCalorimeterHits because the
energies and position are written explicitly to LCIO, so neither of the
above customizations are used. We did think about this!
On Tue, 25 Nov 2014, McCormick, Jeremy I. wrote:
> Hi,
>
> Can I remove this class? (I think you added it?)
>
> src/main/java/org/hps/recon/ecal/HPSCalorimeterHit.java
>
> It doesn't seem to be doing anything special, and I would like to merge it into the LCSim BaseCalorimeterHit class.
>
> I'll make sure everything still works properly of course with the changes.
>
> The problem in general with using "custom" classes that persist to LCIO is that when they are read back, LCSim will
> only see the CalorimeterHit collection. So any code that is written expecting HPSCalorimeterHit objects will then
> mysteriously fail.
>
> It would be preferable to do the same thing for clusters too but it is more complicated as there is added functionality
> not actually present in the LCSim class, so that requires some more thought.
>
> --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
>
########################################################################
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
|