  Temporal point processes (TPP) are a natural tool for modeling event-based
data. Among all TPP models, Hawkes processes have proven to be the most widely
used, mainly due to their adequate modeling for various applications,
particularly when considering exponential or non-parametric kernels. Although
non-parametric kernels are an option, such models require large datasets. While
exponential kernels are more data efficient and relevant for specific
applications where events immediately trigger more events, they are ill-suited
for applications where latencies need to be estimated, such as in neuroscience.
This work aims to offer an efficient solution to TPP inference using general
parametric kernels with finite support. The developed solution consists of a
fast $\ell_2$ gradient-based solver leveraging a discretized version of the
events. After theoretically supporting the use of discretization, the
statistical and computational efficiency of the novel approach is demonstrated
through various numerical experiments. Finally, the method's effectiveness is
evaluated by modeling the occurrence of stimuli-induced patterns from brain
signals recorded with magnetoencephalography (MEG). Given the use of general
parametric kernels, results show that the proposed approach leads to an
improved estimation of pattern latency than the state-of-the-art.
