Fixing the boole-FT test in DD4HEP
When fixing the boole-FT test, I have encountered quite a few issues pertaining to DD4HEP.
- entry() point is slightly different when dealing with the same MChits (~1mm difference);
- mat.toLocal() of a vector seems to be treated like a point, which leads to massive inconsistencies. Changing the logic from:
const Gaudi::XYZPoint localEntry = mat.toLocal( mchit->entry() );
const Gaudi::XYZVector localDispl = mat.toLocal( mchit->displacement() );
const Gaudi::XYZPoint localExit = localEntry + localDispl;
const Gaudi::XYZPoint localMid = localEntry + 0.5 * localDispl;
to
const Gaudi::XYZPoint globalExit = mchit->entry() + mchit->displacement();
const Gaudi::XYZPoint globalMid = mchit->entry() + 0.5*mchit->displacement();
const Gaudi::XYZPoint localEntry = mat.toLocal( mchit->entry() );
const Gaudi::XYZVector localDispl = mat.toLocal( mchit->displacement() );
const Gaudi::XYZPoint localExit = mat.toLocal(globalExit) ;//localEntry + localDispl;
const Gaudi::XYZPoint localMid = mat.toLocal(globalMid) ;//localEntry + 0.5 * localDispl;
helps recovering a better behaviour, but still not perfect (and does not take probably local geometry into account).
Implementing those hot fixes allow to recover similar (but not exactly the same) amounts of deposits, digits and clusters:
DD4HEP
LoH: Deposits: 52852
LoH: nDigits= 8257
LoH: Cluster candidates: 3775
LoH: ClusterCont 3066
vs
DetDesc
LoH: Deposits: 52932
LoH: nDigits= 8339
LoH: Cluster candidates: 3885
LoH: ClusterCont 3072
Then, due to some condition database issues, we cannot compare 1-to-1 the two outputs, but at least we got
DD4HEP
FTLiteClusterMo... INFO --------FT Lite clusters------------
FTLiteClusterMo... INFO Cluster efficiency = ( 95.1 +/- 0.0 )%
FTLiteClusterMo... INFO Cluster efficiency p>5GeV = ( 96.6 +/- 0.0 )%
FTLiteClusterMo... INFO -------------------------------
vs
DetDesc
FTLiteClusterMo... INFO --------FT Lite clusters------------
FTLiteClusterMo... INFO Cluster efficiency = ( 95.5 +/- 0.0 )%
FTLiteClusterMo... INFO Cluster efficiency p>5GeV = ( 95.6 +/- 0.0 )%
FTLiteClusterMo... INFO -------------------------------