1 Introduction

With increasing statistics collected by the LHC experiments the interests to explore final states with \(\tau \)-leptons gain importance. Because of the high mass and their decays, \(\tau \)-leptons may provide a sensitive window to physics beyond the Standard Model predictions. The TauSpinner algorithm, started with Ref. [1], provides a powerful tool to investigate characteristics of final states with \(\tau \)-leptons due to modifications in underlying physics models. This is obtained with the help of weights attributed to each event from collision data or Monte Carlo generated, and thus without repeating the detector response simulation with each variant of the physics model. An approach where physics assumption variation can be introduced with weights is useful for many modern data analysis techniques. The first version of TauSpinner re-weighting found its application in the domain of Standard Model measurements [2] but also for New Physics limits established for simple \(2 \rightarrow 2\) parton level processes [3]. Later, in [4, 5], TauSpinner was found useful for discussion of CP sensitive massively multi-dimensional observables in the frame of machine learning techniques [6]. In a recent paper [7] an extended version of TauSpinner 2.0.0 was presented which now includes hard processes featuring tree-level parton matrix elements for production of a \(\tau \)-lepton pair and two jets. It was prepared as a tool to be helpful for studying spin effects in processes of Standard Model and searches of New Physics, like in Refs. [9, 10]. It found also tempting applications in the domain of implementation and discussion of variants for Standard Model electroweak calculation schemes used in simulation programs ([7], see also [8]), and in experimental applications for Standard Model measurements [11,12,13,14].

Before discussing TauSpinner as a tool for studying observables of New Physics let us briefly recall some virtues of the TauSpinner algorithm. Since \(\tau \)-leptons cannot be observed directly due to their short life-time with more than 20 different decay channels, each with somewhat distinct signature, recalculating and reanalyzing observables involving \(\tau \) decays is time consuming. However, the \(\tau \)-lepton spin polarisation can be inferred from their decays, contrary to the case of electron or muon signatures. Spin effects can provide a better insight into the nature of the underlying physics. Therefore efforts to explore these phenomena are worth pursuing. TauSpinner allows one to greatly simplify the task of exploring the experiments’ sensitivity. Evaluation of measurements significance due to different New Physics models can be performed with the help of event weights. Technical aspects of the algorithm in the case of configurations with two jets accompanying a \(\tau \)-lepton pair have been covered in [7].

The purpose of the present paper is to document how the user can apply the TauSpinner algorithm to the physics model considered. To this end, we take as a case study a non-standard spin-2 object coupled to SM particles. We analyze its production in proton–proton collisions and decay to a \(\tau \)-lepton pair, addressing also the question to what extent \(\tau \) polarisation can be exploited to investigate its nature. We demonstrate how TauSpinner can facilitate such studies with the help of matrix elements for that model (or any other, provided by the user). Corresponding weight can be calculated and applied to each event of samples with full experiment simulation chains. As it is practically impossible to repeat simulations with detector response effects included for each new physics hypothesis, our procedure is beneficial and may be the only available option for the general use despite its limitations. TauSpinner algorithm can also be applied on measured data events, e.g. in the context of embedded \(\tau \) lepton techniques [15].

The paper is organised as follows: Sect. 2 and Appendix A provide details of TauSpinner which were not discussed in Ref. [7], or treated very briefly, but they are of importance for the case of New Physics models. Section 3 documents details of the tree-level matrix elements used for the calculation of spin-2 object exchange amplitudes which are later passed for weights calculation in \(pp \rightarrow \tau \tau \ jj\) events. The implemented functionality is based on automatically produced FORTRAN code from the MadGraph5 package [16] similarly to processes of the Drell–Yan type and to the Standard Model Higgs boson production in vector-boson-fusion processes (VBF). We explain details of the modification which we have introduced to the code of amplitudes generated with MadGraph5 (version MG5_aMC_v2.4.3). Section 4 and Appendix B are devoted to numerical results. First, tests for fixed kinematic configurations are recalled. Later, definitions of observables are given, and some distributions are presented. In Sect. 5 numerical results sensitive to \(\tau \) polarisation are presented taking the single-prong decay \(\tau ^\pm \rightarrow \pi ^\pm \nu \) channel as a spin analyser. Section 6 summarises and concludes the paper.

2 The TauSpinner weight \(wt_\mathrm{{prod}}^{A \rightarrow B}\)

TauSpinner does not provide methods to generate pp collision events. Therefore, the necessary input for TauSpinner consists of a series of events, which could be of a process different from the required one but with the same outgoing final states. The events must contain information on the four-momenta of (two) outgoing jets and \(\tau \)-leptons with their decay products, which is necessary for the calculation of the hard process matrix elements. Flavours of incoming/outgoing partons are determined by the algorithm – there is no need to read them from the generated events. The sum over all possible configurations, weighted with PDFs, is performed. On the other hand, the information on the decay products of \(\tau \)-leptons is needed for the evaluation of spin effects. Using this input, the value of the corresponding matrix elements can be calculated on the event by event basis and in particular the corresponding spin weight. As discussed in detail in Ref. [7], for each event

$$\begin{aligned} j_i(p_1) j_j(p_2)\rightarrow j_k(p_3) j_l(p_4) \tau ^+ \tau ^-, \end{aligned}$$
(1)

where j stands for a quark, antiquark or a gluon, the algorithm calculates the weight

$$\begin{aligned} wt_\mathrm{{prod}}^{A \rightarrow B} =&\frac{ \sum _{ijkl} \frac{1}{\varPhi ^{i.j}_\mathrm{{flux}}} f_i^B(x_1)f_j^B(x_2) |M^B_{ijkl}(\{p\})|^2 \mathrm{d}\varOmega (\{p\})}{ \sum _{ijkl} \frac{1}{\varPhi ^{i,j} _\mathrm{{flux}}} f_i^A(x_1)f_j^A(x_2) |M^A_{ijkl}(\{p\}))|^2 \mathrm{d}\varOmega (\{p\})} , \end{aligned}$$
(2)

which represents, for a given phase-space point \((\{p\})=(p_1,p_2,p_3,p_4,p_{\tau ^+},p_{\tau ^-})\), the ratio due to the matrix element used in the generation of the sample for process (A) and the matrix elements corresponding to a New Physics modelFootnote 1 (B). The evaluation of the weight in Eq. (2) requires the knowledge of contributions from all possible parton level configurations (ijkl) weighted with parton density functions \(f^{A/B}_{i/j}(x)\) and flux factors \(\varPhi ^{i,j}_\mathrm{{flux}}\). The sums run over both gluons and quark flavours alike. Note, however, that the flavour is passed to the user-provided matrix-element routine and flavour dependence can be introduced there. For the details and explanation of the notation used in Eq. (2) we refer to [7]. For the purpose of calculating \(wt_\mathrm{{prod}}^{A \rightarrow B}\) we sum over all possible helicity configurations of outgoing \(\tau \)-leptons. An event generated for the process (A), when weighted with \(wt_\mathrm{{prod}}^{A \rightarrow B}\) becomes an event of the process (B). Spin effects in \(\tau \) decays have to be introduced separately, with TauSpinner main spin weight WT, as explained in Appendix A.

The following details need to be stressed when selecting a suitable process (A) given the target process (B). For a narrow resonance, like the Higgs state, the values of the matrix elements vary greatly with the invariants built from the final-state four-momenta. Therefore the numerical stability needs to be kept in mind. The TauSpinner algorithm must reconstruct the invariant mass of the resonance with a precision better than 1–2 MeV from the four-momenta of final-state particles, whose energies may lie in the range of TeV. Double precision may be needed since otherwise some invariants may be inappropriately evaluated due to simple computer rounding errors. A user has to ensure that the re-weighting indeed works in the interesting regions of the phase space. In particular, that the phase space is populated for both processes (A) and (B) with not too massively distinct distributions, and that the distribution enhancements due to intermediate resonances or collinear or soft singularities have similar (matching) structure. The checks listed above require hard process information only.

3 New Physics model of (\(2 \rightarrow 4\)) process

As a case study we consider a simplified model of a massive gauge singlet spin-2 object X coupled to the SM gauge bosons. We use this model to demonstrate how to prepare and test external matrix element to be used by TauSpinner algorithm.

Scenarios with spin-2 objects have been already intensively studied in the literature in the context of LHC phenomenology [18,19,20], though none of the studies was dedicated to the analysis of X decays into \(\tau \) final states. Note, however, that, for a general study of a “Higgs”-like resonance and its parity in vector-boson-fusion processes with a \(\tau \) pair as a decay product, experimental results are becoming available [21, 22].

In Ref. [3] we studied a Drell–Yan-like production of \(\tau \)’s through a hypothetical spin-2 object X. Building on our previous work, we study now the X production in the VBF topology, followed by \(X \rightarrow \tau ^+ \tau ^-\) decay. We start by extending the Lagrangian of Ref. [3] by a set of gauge invariant dimension 5 operators, coupling the field X to gauge boson field strength tensors B, W and G as

$$\begin{aligned} \mathcal {L}&\ni \frac{1}{F} X_{\mu \nu } ( g_{X B B} ~ B^{\mu \rho } B_\rho ^{~\nu } + g_{X W W} W^{\mu \rho } W_\rho ^{~\nu } \nonumber \\&\quad + \, g_{Xg g } G^{\mu \rho } G_\rho ^{~ \nu }), \end{aligned}$$
(3)

where the group indices are implicitly summed over (where appropriate). The parameter F, set to 1 TeV, is introduced to keep the coupling constants dimensionless. Note that we are agnostic on the origin of the state X, in particular we do not claim it is connected to gravity. Hence we do not couple it to the entire energy momentum tensor and couplings \(g_X\) are kept as free parameters. This is in contrast to, for example Ref. [23], where the X field is coupled to the energy momentum tensor of quantised SM.

Fig. 1
figure 1

Topologies of Feynman diagrams for X production through its coupling to gauge bosons. Similar diagrams, with different combinations of \(W^\pm \)’s, Z’s, photons and quark flavours, also exist

After the electroweak symmetry breaking, operators in Eq. (3) generate vertices with couplings of X to photons, \(W^\pm \)’s, Z’s and gluons; the explicit formulas for those couplings can be found in [20]. Since in this work we focus on technical aspects of incorporating the couplings of X to the EW gauge bosons, for numerical tests of the correctness of the matrix element implementation, we set \(g_{XBB} = g_{Xgg} = 0\). Relevant diagram topologies are shown in Fig. 1: for the VBF process (Fig. 1a) and the X-strahlung process (Fig. 1b).

3.1 Generating matrix-element code using MadGraph5

The extension of the SM by spin-2 field coupled to the gauge fields as in Eq. (3), including also coupling of the X field to quarks and \(\tau \)-leptons from [3], is encoded into a FeynRules [24] model. The FeynRules model file, together with its UFO output [25], is available in supplementary materials of the arXiv version of this reference. The UFO model is used to generate squared matrix elements using MadGraph5, employing the spin-2 support of the HELAS library [26]. This is done with the following set of commands:

  1. (a)

    import model spin2_w_CKM_UFO

  2. (b)

    let “multiparticles” containers already include all massless partons

    (this is so by default)

  3. (c)

    generate spin 2 matrix elements

  4. (d)

    write the output to disk in MadGraph’s standalone mode using

    $$\begin{aligned} \texttt {output standalone ``directory name''} \end{aligned}$$

NPgg, NPqq and NPVV parameters control the maximum number of \(g_{Xgg}\), \(g_{Xq\bar{q}}\) and \(g_{XWW}\), \(g_{XBB}\) couplings, respectively. Limiting them by 99 effectively means that their number is not restricted. The model includes the CKM matrix in the Wolfenstein parametrisation. As was stated above, for numerical tests we restrict ourselves setting \(g_{XBB} = g_{Xgg} = 0\), though we stress again that the matrix element, coded as an example user process, contains all of them; see Appendix B for actual initialisation of coupling constants.

Table 1 List of implemented processes contributing to the spin-2 X particle production, grouped into categories which differ by flavours of incoming partons. For each category, the names of FORTRAN files calculating squared matrix elements, for given flavour configuration of incoming partons, are given in the second column. Examples of processes in each category are given in the last column

3.2 Integrating matrix-element code into TauSpinner example

The matrix-element code is based on automatically produced FORTRAN subroutines by MadGraph5 package, similarly as it has been done for processes of the Drell–Yan-type and of the Standard Model Higgs boson production in vector-boson-fusion (VBF)/Higgs-strahlung processes [7]. In the spin-2 case they have also been manually modified and adapted to avoid name clashes. This technical complication is a consequence of the fact that the C++ user function for the spin-2 matrix element calls FORTRAN code created by MadGraph5. We therefore cannot profit from the namespace functionality of C++ as a natural solution to this problem. Some name changes are necessary, as explained below. The corresponding code is stored in the directory TauSpinner/examples/example-VBF/SPIN2/ME.

The generated codes for the individual sub-processes are grouped together into subroutines, depending on the flavour of initial-state partons, and named accordingly. For example,

figure a

encompasses the X production processes initiated by the \(d{\bar{c}}\) partons. We follow our previous convention [7] where the symbol X in the subroutine or internal function name after the letter U,D,S or C means that the corresponding parton is an antiquark, i.e. UXCX corresponds to processes initiated by \({\bar{u}}{\bar{c}}\) partons, while GUX corresponds to processes initiatedFootnote 2 by \(g{\bar{u}}\). The S2 stands explicitly for the production of spin-2 X state. The input variables are a real matrix P(0:3,6) for four-momenta of incoming and outgoing particles, integers I3,I4 for the Particle Data Group (PDG) identifiers for final-state parton flavours and integers H1,H2 for the outgoing \(\tau \) helicity states. Before integrating these subroutines into the TauSpinner program, a number of modifications have been done for the following reasons:

  1. (a)

    Since MadGraph5 by default sums and averages over spins of incoming and outgoing particles, while we are interested in \(\tau \) spin states, the generated codes have to be modified to keep track of the \(\tau \) polarisation, i.e. indices/helicities H1 and H2.

  2. (b)

    Moreover, since the subroutines and internal functions generated by MadGraph5 have the same names for all sub-processes, namely SMATRIX(P,ANS), the names had to be changed to be unique. As an example, the subroutine name for the sub-process \(u{\bar{d}}\rightarrow c{\bar{d}} \, X,\, X\rightarrow \tau ^+\tau ^-\) was changed to UDX_CDX_S2(P,H1,H2,ANS). These subroutines will be called by the subroutine

  3. (c)

    For a pair of final-state parton flavours \(k \ne l\), the MadGraph5 generated codes have been obtained for a definite ordering (kl), but not for (lk), to reduce the number of generated configurations. When TauSpinner is invoked, the configuration of outgoing partons is unknown and it takes into account both possibilities: thus a compensating factor \(\frac{1+\delta _{l,k}}{2} \) has to be introduced due to the way of organizing the sum in Eq. (2) and in Ref. [7].

  4. (d)

    For the calculation of matrix elements MadGraph5 is using ALOHA functions [27] stored in FORTRAN subroutines. Since some of these functions have originally names identical to functions in the TauSpinner source code for the implementation of the Standard Model VBF/Higgs-strahlung production, names of those functions have to be modified also to avoid any name conflicts. Therefore ALOHA functions stored in TauSpinner/examples/example-VBF/SPIN2/ME/Spin2_functions.f are changed by adding the “_S” suffix to the original names of subroutines, for example FFV4_0 is changed to FFV4_0_S.

Table 1 summarises the naming convention for the files. At the parton level each of the incoming or outgoing partons can be one of the flavours: \({\bar{c}}\ {\bar{s}}\ {\bar{u}}\ {\bar{d}}\ g\ d\ u\ s\ c\), with Particle Data Group (PDG) identifiers: \(-\,4, -\,3, -\,2, -\,1, 21, 1, 2, 3, 4\), respectively. For processes with two incoming partons, two outgoing \(\tau \)-leptons and two outgoing partons, there are \(9^4\) possibilities, most of them evaluating to 0 or obtainable one from another, by relations following from CP symmetries and/or permutations of incoming and/or outgoing partons.

For each point in the parton level phase space, consisting of all incoming and outgoing four-momenta as well as their flavours, depending on the user choice, one of two variants of processes (i.e. pairs of matrix elements) may be used by TauSpinner executable. That is, the Drell–Yan variant (standard, and user-provided New Physics matrix elements) or Higgs-like variant (again standard, and user-provided one).Footnote 3

Certain limitations need to be kept in mind. In practice, it is simply impossible to obtain a statistically significant distribution of weighted events for the particular model under study in the region of phase space where the original sample is sparse or possibly no events are present at all. In particular, the mass and width of the Higgs-like resonance need to coincide with (or be close to) those of the Higgs. Also, the algorithm is expected to be used in regions of the phase space where the kinematic distributions of the original and New Physics models are not massively different.

4 Tests of implementation of external matrix elements

Once the user-provided external matrix elements are prepared, numerical tests are necessary if it indeed has been implemented properly into the TauSpinner environment. In the following we discuss such tests, using spin-2 matrix elements of Xjj production as an example. We start from the technical one and continue with more physics oriented ones. Finally we will demonstrate the limitations of the method.

4.1 Test of matrix elements using fixed kinematic configuration

For checking the consistency of the implemented codes generated with MadGraph5 and modified as explained in Sect. 3.2, we have chosen a single event with fixed kinematic configuration at the parton level. We have calculated the matrix elements squared for that event and for all possible helicity and parton flavour configurations, using the code implemented as user example. We compared results with the numerical values obtained directly from MadGraph5. The agreement of at least 6 significant digits has been confirmed.

4.2 Tests of matrix elements using series of generated events

As further tests of the internal consistency of external matrix-element implementation, we have explored the re-weighting procedure by comparing a number of kinematic distributions obtained directly or re-weighted with \(wt_\mathrm{{prod}}^{A \rightarrow B}\) from series of 10M events generated by MadGraph5 for X particle and Higgs boson. Samples were generated for pp collisions at 13 TeV using CTEQ6L1 PDFs. The mass of both X particle and Higgs boson was set to 125 GeV and the width to 5.75 MeV. The details of cuts and MadGraph5 initialisation used for the sample generation are given in Ref. [17]. On the generated events the following further selections were applied: \(m_{jj\tau \tau }\) < 1500 GeV, \(p_{T}^{\tau \tau }\) < 600 GeV and \( m_{jj} <800\) GeV (loose selection) to eliminate excessive weight regions of the phase space, or eliminating also \(Z\rightarrow jj\) or \(W\rightarrow jj\) resonance peaks \(100 < m_{jj}\) \(<800\) GeV (tight selection).

Fig. 2
figure 2

Weight distribution for H sample re-weighted to X (top panel) and for the X sample re-weighted to H (bottom panel). If the distribution featured a long tail extending to high weights, it would indicate a problem with re-weighting in regions of the phase space where the ratio of the matrix element (B) with respect to the one of the original sample (A) is too large in comparison with the typical event

Before commenting on the actual results let us point to the size of statistical errorsFootnote 4 which reflect comparability of the H (process A) and X (process B) samples. Errors are always larger than what could be expected from weight-one samples of similar size. This effect can be understood better with the weight distributions shown in Fig. 2. In both cases of re-weighting: from H to X (top panel) and X to H (bottom panel), one can observe a constant slope on this double logarithmic plot with clear sharp upper end. With such a spectrum of weights a statistically sensible calculation of the cross sections and distributions may still be possible. If a tail of events with ever higher weights would continue to form when increasing the size of the samples, statistical errors would never decrease. This happens, for example, if in some sub-dimensional-manifold of the phase space the matrix element has a zero. Then with increasing statistics, events closer and closer to this zero are generated, and feature larger and larger weights. Even though the contribution of such events to the weighted distribution is formally finite and integrable, the error estimate of the Monte Carlo generated distribution will not get reduced with the increasing statistical sample.

Fig. 3
figure 3

The H sample re-weighted to the X and compared with the X sample. The H and X widths are 5.75 MeV. Selection cuts: Invariant mass of outgoing particles \(m^{\tau \tau jj}<\) 1500 GeV, invariant mass of jets system \(100< m^{ jj}<\) 800 GeV and \(p_{T}^{\tau \tau }\) < 600 GeV. Variables on the x-axes as explained in Sect. 4.2

Fig. 4
figure 4

The X sample re-weighted to the H and compared with the H sample. The H and X widths are 5.75 MeV. Selection cuts: invariant mass of outgoing particles \(m^{\tau \tau jj}<\) 1500 GeV, invariant mass of jets system \(100 <m^{ jj}<\) 800 GeV and \(p_{T}^{\tau \tau }\) < 600 GeV. Note that statistical errors for the distributions obtained with re-weighting (red points) are much larger than for the case of Fig. 3. This is predominantly due to small acceptance of the X sample: 1.7% only. But the agreement with the reference distribution (black histogram) remains within statistical fluctuation (dominated by large weight events). Variables on the x-axes as explained in Sect. 4.2

The tests were performed on a set of kinematic distributions: the pseudorapidity of outgoing parton j, rapidity of \(\tau \tau \) and jj systems, invariant mass of \(\tau \tau \) system, pseudorapidity of \(\tau \tau \) system, opening angle between jets, opening angle between \(\tau \)’s, angle between incoming parton and outgoing parton in the rest frame of jets and angle between resonance and outgoing parton in the rest frame of jets.

Plots for all these variables can be found on the web page [17]. Here, in Figs. 3 and 4, we present only plots for the difference of the jet’s rapidities \(\varDelta \eta ^{jj}\), the invariant mass of the jet pair \(m^{jj}\), the transverse momentum of \(\tau \) pair \(p_T^{\tau \tau }\) and, finally, the invariant mass of the \(\tau \)-pair and jet-pair combined \(m^{\tau \tau jj}\). In each plot the distribution Ref, for the reference process, is shown as a black histogram while the red histogram is the original distribution of generated events which are re-weighted using the TauSpinner \(wt_\mathrm{{prod}}^{A \rightarrow B}\) weight to obtain the distribution represented by the red points with error bars. For the test to be successful, the red points should follow the black histogram; the ratio of Ref and re-weighted distributions is shown in the bottom panel of each figure.

In Figs. 3 and 4, the re-weighted distributions follow the Ref histograms. When re-weighting of X to H (see Fig. 4), the distributions feature larger statistical errors than in the case of H to X re-weighting (Fig. 3). This is simply because tight selection cuts leave only 1.7% of X events due to eliminating configurations with small \(m_{jj}\). For some bins the re-weighted distribution lies below the target (black) distribution, whereas the ones with big errors tend to lie above it. If a similar feature appears when the sample size is increased it points to the possibility that the original distribution had a zero along some hyperspace. Nevertheless, if in distributions normalised to the cross section the neighbouring bins have no deficit of content, then the re-weighting algorithm can still be used.

The tests validating the re-weighting algorithm are completed with the ones monitoring the overall normalisations (integrated cross sections). For our samples and initialisations, the resulting cross sections are shown in Table 2. Reasonable agreement between cross sections obtained from the MadGraph5 calculation and with re-weighting was obtained; see Table 2 where the first line in the \(H\rightarrow \tau \tau \) block should be compared with the second line in the \(X\rightarrow \tau \tau \) block and vice versa. Such a study has to be repeated for each new matrix element implemented and whenever selection cuts are changed sizeably.

4.3 On reliability of the TauSpinner re-weighting approach

The TauSpinner re-weighting method is atypical compared to methods used in other tools, like REPOLO [29] PHYTIA [30], SHERPA. [31] or MadGraph [32]. Let us explain what the advantages and disadvantages are behind such a choice.

The advantage of our method is that it does not assume any knowledge of the initial and outgoing partons and tau leptons beyond their four-momenta. Therefore it can be applied directly to the experimental data, e.g. of the embedded \(\tau \) samples. We have demonstrated that our re-weighting method is reliable for the hard process matrix elements convoluted with PDFs. The disadvantage is that it does not address the issue that both the parton shower and the hadronisation do depend on colour configuration as well as on flavours of partons. Once an event is re-weighted, the reshuffle between categories of different colour and/or flavour contents takes place, inevitably leading to biases.

Table 2 Cross sections for the generated H production process and after its re-weighting to the X production (\(H\rightarrow \tau \tau \) block), and for the generated X production and after its re-weighting to H production (\(X\rightarrow \tau \tau \) block); acceptances with no, loose or tight selections applied for generated and re-weighted event samples are also shown

In experimental simulation production files [33] colour information for the so-called truth entries is not stored. Even in the data formats prepared and agreed on by the community [34], such information, at best, consists of a connected tree, navigation inside of which retains information on the event history including the parents of unstable particles. There is an important caveat here: the event generators are modeling quantum processes, and the event record has the structure of a classical decay chain. It is inevitable that compromises must be made and difficulties can arise from an over-literal interpretation of the tree structure. For the colour it means that at best the so-called flow approximation is pre-imposed. Even for such partial information, there are no detailed commonly accepted rules for how it should be stored; see for example Sect. 2.3 in [35] or Sect. 4.4.1 in the HepMC manual [36] or [37].

In practice, in experiment production files of detector response simulated events, information on intermediate quantum states is generally not available. Usually only the 4-momenta of partons and their flavours are stored. We are not in a position to affect these experiment choices. A multitude of arguments have been raised for such choices, including the fact that distinct generators prepared by theorists, provide such information in a different manner, or that it makes data files unnecessary large. We can only address the question if any useful solution for re-weighting may be designedFootnote 5 and what kind of restrictions it implies have to be kept in mind.

There are two simulation steps which depend on hard process configurations of flavours and colours: parton shower and later hadronisation. It is well known that even mainstream Monte Carlo programs do not match in this respect sufficiently well the experimental data for all required phase-space regions [38]. This is a complex issue which we cannot exhaust.Footnote 6

The discussion of the resulting systematic errors of our method is out of scope of the present paper. It would require the evaluation of how mismatches of the colour and flavour input for parton shower and hadronisation translates into reconstructed jets from simulated detector responses. This in turn would require the use of experimental detector response codes, not available publicly. In general, the TauSpinner application domain is restricted to observables where details of the jets, resulting from parton flavours or colour are not of importance. This has to be kept in mind.

Let us point out that our study examples of the previous sections are for the cases where starting and target distributions are massively different. In practical applications we expect TauSpinner to be used in configurations where new contributions to matrix elements are at the edge of observability.

If required, it is possible to apply TauSpinner in the flavour savvy manner. Possible solution may follow the method described in Appendix A. Contributions from distinct flavour configurations can be treated separately only for cases when in experiment production files the flavour configurations are stored or can be unwinded.

5 Spin dependent characteristics

So far we were discussing observables relying on the kinematics of final states consisting of four-momenta of \(\tau \) leptons and accompanying two jets. Inclusion of \(\tau \) decay products increase the phase-space dimensionality substantially, making the analysis much more difficult, especially when dependence on selection cuts is taken into account (as observed in the previous sections).

In the following, we will present a few spin dependent results obtained for the H and X samples within the tight selection cuts. Using TAUOLA ++ [41] we supplement these samples with \(\tau \) decays in the simplest possible mode \(\tau ^\pm \rightarrow \pi ^\pm \nu \) with no spin effects included. Spin effects are introduced with the help of TauSpinner weights, which are calculated according to the production and decay kinematics (see Refs. [1, 42] for the spin weight definition).

Fig. 5
figure 5

Spin weight histograms, normalised to unity, obtained from X matrix elements for H sample (top plot) and X sample (bottom plot). In both cases samples are constrained with tight selection cuts. Red open circles are for when the effective Born (\(2\rightarrow 2\)) matrix elements are used and blue full circle points are for when our new (\(2\rightarrow 4\)) matrix elements are used

Figure 5 shows the spin weight histograms for the H and X samples. In both cases the spin weights are calculated first using the matrix element for X productions as described in Ref. [3], which is featuring effective Born \(2\rightarrow 2\) kinematics (open red circles), and they are compared with the new calculation in which amplitudes featuring two jet kinematics are taken into account (blue full circle points).Footnote 7 In both cases the same \(X-\tau \tau \) couplings were used. As expected (see Eq. (8) from Ref. [1]), for the \(2\rightarrow 2\) case the range of spin weights is limited to [0, 2], since in this process there are no couplings which could lead to individual \(\tau \) polarisation. In the \(2\rightarrow 4\) case the spin weight distribution exhibits a tail which extends beyond 2 and covers most of the allowed [0, 4] range. This is due to, e.g., the presence of the sub-process \(W^+W^-\rightarrow X\rightarrow \tau ^+\tau ^-\) in which Ws radiated off quarks are polarised, which has impact on \(\tau \) polarisation. The tail above 2, although not so much pronounced, will manifest itself in the distribution of \(\tau \) decay products.

Let us now turn to the standard spin sensitive distribution of the ratio \(E_\pi /E_\tau \) (a fraction of \(\tau \) energy carried by the decay pion) used in [42] for benchmarking \(\tau \) polarisation. In every case discussed below we will use again X production amplitudes to calculate \(\tau \) pair density matrix. We will do that also for the sample generated with H production amplitudes.Footnote 8

The \(\tau \) polarisation can originate from the X production via VBF process, which is asymmetric over the phase-space regions due to the asymmetry of valence u and d quark distributions in the proton. To exhibit the polarisation effects we have to sort out events according to the \(\tau \) polarisation; otherwise the effects will average out. Since in the proton there are more u-type quarks than d-type, the X particle produced in the VBF preferentially will follow the direction of the \(W^+\), which are right-handed and impart their polarisation on the X bosons. One can then expect that a \(\tau \) lepton from X decay will have polarisation dependent on \(\tau \) direction with respect to the X flight direction correlated with its spin polarisation. Thus it is suggestive of sorting events according to positive and negative values of \(C=Y_X \cdot ( p_z^{\tau ^-}- p_z^{\tau ^+})\), where \(Y_X\) denotes the \(\tau \) lepton pair rapidity and \(p_z^{\tau ^-}\), \(p_z^{\tau ^+}\) are the z components of \(\tau ^\pm \) four-momenta. In Fig. 6 events with positive and negative C are plotted separately (the first bin for \(C>0\) is lower exhibiting the pion mass \(m_\pi /m_\tau \) effect). We observe that spin weights, calculated with the X production amplitude, when applied to the H sample, lead to a larger spin effect than when applied to the X sample. In the second case the spin effect is barely visible.Footnote 9

Our results illustrate the complexity of multi-dimensional distributions. Even within a tight selection there is a sizeable difference between events of X and H production, which is reflected in \(\tau \) polarisation effects being greater for the H sample than for X sample, even though the same \(pp \rightarrow \tau \tau j j\) matrix elements featuring intermediate X are used in both cases.

One could argue that such a small spin effect present in Fig. 6 for the X case is a consequence of a substantial contribution from other than VBF channel in our samples, thus hinting that our cuts may need to be refined. However, because of the weight distribution, as seen in the lower plot of Fig. 5, such a refinement is unlikely to be found within our tight selection, since the tail of events with spin weight exceeding 2 is very small. It seems that a better discriminating power between the \(H\rightarrow \tau \tau \) and \(X\rightarrow \tau \tau \) hypotheses can be provided by a longitudinal \(\tau \)\(\tau \) spin correlation; the same as discussed already in Refs. [3, 42]. Nonetheless \(\tau \) polarisation may offer (minor) help in the exclusion of the X hypothesis, even in the case when \(X\tau \tau \) couplings are insensitive to parity.

Fig. 6
figure 6

Histograms of \(E_\pi /E_\tau \) spectra, normalised to unity, for the H sample (top figure) and for the X sample (bottom figure). In all cases \(2\rightarrow 4\) matrix elements of X exchange are used to implement spin effects. Red open circle points are for additional cuts \(Y_X \cdot ( p_Z^{\tau ^-}- p_Z^{\tau ^+})>0 \) and the blue, full circle points for \(Y_X \cdot ( p_Z^{\tau ^-}- p_Z^{\tau ^+})<0\). Note that because far less X events survive tight selection, statistical errors on the bottom plot are larger

6 Summary and outlook

The main purpose of the paper was to demonstrate how the new matrix elements for the production of \(\tau \)-lepton pair accompanied by two jets in pp collisions (that is, new with respect to the ones used for sample generation) can be used in TauSpinner environment to re-weight events. For that purpose, the New Physics matrix element for a spin-2 X particle was implemented as a user example.

We have provided numerical tests of the algorithm, demonstrating that starting from the H sample (or the X sample), the other one can be obtained by applying event-by-event weight calculated from the implemented matrix elements. We have also addressed possible technical difficulties and limitations in implementing the user code for matrix elements. Even though the TauSpinner algorithm in the case of its native and external matrix elements works similarly, technical aspects due to e.g. rounding errors and other numerical complications may differ; thus they require individual attention. The density of events to be re-weighted may differ from the target one significantly, resulting in a few events with weights massively larger than the ones from other regions of the phase space.

Limitations of the algorithm, discussed in Sect. 4.3, may be observed if for example colour or spin configurations for original and new process play an important role for the parton shower. Then re-weighting with the matrix element of a hard process only, see Eq. (2), may be too simplistic and factorisation properties may need to be addressed. An effort made in that direction can be found in Refs. [43, 44].

Let us stress that the TauSpinner re-weighting can be repeated several times on the same event to obtain multiple variants of weights, e.g. due to several variants of coupling constants, or even completely distinct X interaction forms. In our examples we have used rather small sets of non-zero couplings, see Appendix B, in part to simplify the differences in the distributions of X and H mediated processes. The re-weighting algorithm performed better when a reduced region of the phase space was used for comparisons.

To demonstrate effects sensitive to the \(\tau \) lepton polarisation we have chosen \(\tau ^\pm \rightarrow \pi ^\pm \nu \) decay mode as a spin analyser. Spin effects originate from the X production vertex and are embedded in the complexity of the multi-body phase space. They turn out to be rather small for our choice of the \(X\tau \tau \) couplings. Nevertheless, they may turn out to be useful in falsifying physics hypotheses alternative to Higgs production and decay processes.

This paper completes the description of TauSpinner functionality, initiated in [3] for the \(2 \rightarrow 2\) matrix elements of New Physics, now also with the vector-boson-fusion \(2 \rightarrow 4\) matrix elements. It supplements examples of TauSpinner applications for events with two jets accompanying \(\tau \)-lepton pair production in pp collisions, discussed in [7].