Skip to content

Using cylindrical surfaces for track reconstruction in iLCSoft #50

@armin-ilg

Description

@armin-ilg
  • OS version: lxplus/almalinux9
  • Compiler version: gcc 11.4.1 of the 2024-08-14 key4hep stack
  • Package version: My DD4hep branch (see DD4hep PR) with my k4geo branch (see k4geo MR) using CLDConfig (CLD reconstruction, just changing collection names, and list of ResolutionU and ResolutionV to have four barrel layers)
  • Reproduced by:

cloning DD4hep

source /cvmfs/sw.hsf.org/key4hep/setup.sh -r 2024-04-12 # latest nightly not working due to problem in lumical constructor
git clone -b try_cylinderSegmentSurface https://github.com/armin-ilg/DD4hep.git
cd DD4hep

compile DD4hep:

mkdir build; cd build
cmake .. -DCMAKE_INSTALL_PREFIX=../InstallArea -DDD4HEP_USE_GEANT4=ON \
        -DBoost_NO_BOOST_CMAKE=ON \
        -DDD4HEP_USE_LCIO=ON \
        -DDD4HEP_USE_EDM4HEP=ON \
        -DDD4HEP_USE_TBB=OFF \
        -DDD4HEP_USE_HEPMC3=ON \
        -DDD4HEP_BUILD_DEBUG=OFF \
        -DBUILD_TESTING=ON \
        -DDD4HEP_DEBUG_CMAKE=ON \
        -DDD4HEP_USE_XERCESC=ON \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_CXX_FLAGS="-fdiagnostics-color=always"  \
        -DCMAKE_CXX_STANDARD=17
mkdir InstallArea
make -j4 install
cd ../InstallArea

source bin/thisdd4hep.sh

export CMAKE_PREFIX_PATH=$PWD/:$CMAKE_PREFIX_PATH
export PATH=$PWD/bin/:$PATH
export LD_LIBRARY_PATH=$PWD/lib:$PWD/lib64:$LD_LIBRARY_PATH
export PYTHONPATH=$PWD/python:$PYTHONPATH
export ROOT_INCLUDE_PATH=$PWD/include:$ROOT_INCLUDE_PATH
export DD4hep_DIR=$PWD

cd ../../

cloning and compiling k4geo:

git clone -b CLD_with_IDEAvertex_and_ultra-light https://github.com/armin-ilg/lcgeo.git
cd lcgeo

mkdir build                                                                                                                                                                                                                                                                                                                                                                                                               
cd build
source $DD4hep_DIR/bin/thisdd4hep.sh

cmake .. -DCMAKE_INSTALL_PREFIX=../InstallArea -DBoost_NO_BOOST_CMAKE=ON
make -j4 install
cd ../InstallArea
# source bin/thislcgeo.sh
source bin/thisk4geo.sh

export PYTHONPATH=${LCIO}/src/python:${ROOTSYS}/lib:$PYTHONPATH
cd ..
export k4geo_DIR=$(pwd)

export K4GEO=$(pwd)

Enabling the curved vertex by using this git patch:
use_ultra_light.patch

git apply use_ultra_light.patch

Cloning my CLDConfig repo:

cd ..
git clone https://github.com/armin-ilg/CLDConfig.git
cd CLDConfig/CLDConfig

Running SIM:

ddsim --compactFile $K4GEO/FCCee/CLD_IDEAvertex/compact/CLD_o2_v05_IDEAvertex/CLD_o2_v05_IDEAvertex.xml --outputFile sim.root --steeringFile cld_steer.py --random.seed 0123456789 --enableGun --gun.particle mu- --gun.energy 100*GeV --gun.distribution uniform --gun.thetaMin 89*deg --gun.thetaMax 89*deg --crossingAngleBoost 0 --numberOfEvents 1000

Running RECO:

k4run CLD_IDEAvertexCurvedReconstruction.py --inputFiles sim.root  --outputBasename reco.root --GeoSvc.detectors $K4GEO/FCCee/CLD_IDEAvertex/compact/CLD_o2_v05_IDEAvertex/CLD_o2_v05_IDEAvertex.xml --trackingOnly -n 1000
  • Input: No further input files needed

  • Output:
    dd4hep.log,
    k4geo.log,
    reco.log (reco.log is with TruthTracking - errors also persist with using the ConformalTracking chain)

  • Goal: I'm trying to use my ultra-light curved IDEA vertex in full simulation using CLD and replacing the IDEA vertex with this one. This has worked for the normal IDEA vertex detector (with ladders), but doesn't work yet with the curved variant, where the detector consists of curved silicon sensors, for which I adapted dd4hep::rec::VolSurface accordingly (see PR in DD4hep). I want to get d0 and z0 resolutions of particle gun tracks in the same way for the curved vertex as for the CLD/IDEA vertex detectors.

  • Problem: Using k4Marlin wrapper and the usual reco chain for the vertex (DDPlanarDigiProcessor + TruthTrackFinder/ConformalTracking+ClonesAndSplitTracksFinder) with adjusted ResolutionU und ResolutionV lets the reconstruction run, and the reco hits look reasonable (very close to the SIM hits as expected by the small resolution of 0.003 mm), but for every event I get the following error:

MyTruthTrackFinder DEBUG Retrieving LCIO Event for wrapped processor MyTruthTrackFinder
MyTruthTrackFinder DEBUG LCIO Event retrieved successfully
TDecompLU::Deco... ERROR matrix is singular
TDecompLU::Inve... ERROR matrix is singular, 0 diag elements < tolerance of 2.2251e-308
TDecompLU::Deco... ERROR matrix is singular
TDecompLU::Inve... ERROR matrix is singular, 0 diag elements < tolerance of 2.2251e-308
TDecompLU::Deco... ERROR matrix is singular
TDecompLU::Inve... ERROR matrix is singular, 0 diag elements < tolerance of 2.2251e-308
TDecompLU::Deco... ERROR matrix is singular
TDecompLU::Inve... ERROR matrix is singular, 0 diag elements < tolerance of 2.2251e-308
TDecompLU::Deco... ERROR matrix is singular
TDecompLU::Inve... ERROR matrix is singular, 0 diag elements < tolerance of 2.2251e-308

The resulting residuals of the tracks are way too large then in d0 and z0. The efficiencies and other track parameters look good however.

I think the problem arises from the MarlinTrk::createFinalisedLCIOTrack function, which is used both in the TruthTracking and the ConformalTracking.

Are cylindrical surfaces in general supported by iLCSoft reconstruction and are the changes I made in the DD4hep PR enough, what further needs to be changed to use a VolSurface instead of a plane surface? Since the reco hits look ok, I don't think the problem is in the DDPlanarDigitizer.

Thank you and kind regards,
Armin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions