The high-granularity calorimeter (HGCAL) is an upgrade to the current CMS endcap calorimeters, designed to deal with the severe radiation dosage expected during the high-luminosity LHC. The talk describes our contributions to recent developments of the HGCAL simulation geometry in CMS software. It also goes through our efforts in developing an end-to-end machine learning-based reconstruction in the HGCAL detector. The network is based on a convolutional neural network called You Only Look Once, providing a novel approach with promising results. Finally, the talk provides the status of physics analysis on testing the lepton flavour universality in W-boson decays in the dileptonic tt̅ samples at CMS.