Closed rahmans1 closed 1 year ago
@DraTeots Following up from discussion in ACTS meeting. Here's the detailed steps I followed for B0 Reconstruction:
Clone epic
git clone https://github.com/eic/epic
cd epic
git checkout 161-acts-tracking-for-B0
Create a file inside the configurations folder called tracking.yml containing
features:
fields:
marco:
tracking:
definitions:
vertex_barrel:
silicon_barrel:
mpgd_barrel:
mpgd_dirc:
silicon_disks:
support_service_assembly:
tof_barrel:
tof_endcap:
far_forward:
far_forward:
Create a steering file called proton.py containing
from DDSim.DD4hepSimulation import DD4hepSimulation
from g4units import mm, GeV, MeV, mrad
SIM = DD4hepSimulation()
SIM.enableGun = True
SIM.gun.thetaMin = 6*mrad
SIM.gun.thetaMax = 22*mrad
SIM.gun.momentumMin = 275*GeV
SIM.gun.momentumMax = 275*GeV
SIM.gun.distribution = 'cos(theta)'
SIM.gun.particle = 'proton'
SIM.outputFile = 'proton_275GeV_6mrad_22mrad_costheta.edm4hep.root'
Then build epic and set environment
cmake -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=install -S . -B build
cmake --build build -j 8
cmake --install build
source install/setup.sh
export DETECTOR_CONFIG=epic_tracking
export BEAMLINE_CONFIG=epic_tracking
Run sim
ddsim --steeringFile proton.py -G -N 100 --compactFile $DETECTOR_PATH/$DETECTOR_CONFIG.xml
Clone and build eicrecon:
git clone https://github.com/eic/EICrecon
cd EICrecon
git checkout 404-acts-tracking-with-B0-trackers
cmake -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=install -S . -B build
cmake --build build -j 8
cmake --install build
Set environment and run eicrecon
cd install/bin
export JANA_PLUGIN_PATH=../lib/EICrecon/plugins
sed -i 's%f"eicrecon"%f"./eicrecon"%g' run_eicrecon_reco_flags.py
python ./run_eicrecon_reco_flags.py ../../../epic/proton_275GeV_6mrad_22mrad_costheta.edm4hep.root rec_proton_275GeV_6mrad_22mrad_costheta_tracking_only -Pplugins=dump_flags -Pdump_flags:json=tracking_only_flags.json > log1.txt
log1.txt contains all warnings and rec_proton_275GeV_6mrad_22mrad_costheta_tracking_only.tree.edm4eic.root contains reconstructed output. Open reconstructed root file and try drawing momentum reconstructed. It is empty.
events->Draw("ReconstructedChargedParticles[0].momentum.z", "", "HIST")
However, the collection of hits passed to Tracker Source Linker shows B0 hits
events->Draw("CentralTrackingRecHits.position.x:CentralTrackingRecHits.position.z","","*")
Is your feature request related to a problem? Please describe. When running reconstruction, getting the following error
Describe the solution you'd like B0TrackerRecHits to be included in output collection and B0 hits be used in reconstruction
Describe alternatives you've considered N/A
Additional context N/A