gcowan / RapidSim

Phase space generation of b hadron decays
MIT License
18 stars 29 forks source link

Need some smearing function for secondary vertices #38

Open gcowan opened 6 years ago

gcowan commented 6 years ago

Currently we are using the PV smearing parameterisation for SVs. Clearly we need some better here. Is there a publicly available source of information for this? For this to work we also need some mods to the code so that we can distinguish RapidVertices as PVs or SVs. Argument or derived class?

particleist commented 6 years ago

I think the key difficulty here is the correlation with the opening angle, no? I am certain there is nothing public for this, although maybe it could be reverse engineered from some decay-time resolutions?

gcowan commented 6 years ago

https://arxiv.org/pdf/1405.7808.pdf has the decay length resolution for Bs → J/psi phi. Similarly https://arxiv.org/pdf/1412.6352.pdf . These might do for a start.

gcowan commented 6 years ago

Talking with Matt and Wouter, we are considering putting DTF into RapidSim. This would not only allow us to get SV resolutions, but also put in mass constraints and have errors on lifetimes. For this to work we would need to cook up some covariance matrix and the position of the "first hit" at a particular z for the track.

The LHCb implementation is here:

https://gitlab.cern.ch/lhcb/Phys/tree/master/Phys/DecayTreeFitter

According to Wouter it is not so hard to port: the classes that you would need to reimplement are the 'external' constraints, e.g. the track, the photon cluster, the beam spot etc. Then we need to change the 'LHCb::Particle' and references to the property svc to whatever we have in RapidSim.

Thoughts? Maybe this is too much (and potentially slows things down significantly). Maybe we can get away with a simpler vertexing?

particleist commented 6 years ago

I think the crucial thing is to get the first hit and some reasonable model of the multiple scattering right (perhaps the VELO material model can give us this). If we have those, the opening angle correlation ought to come more or less for free. I would implement a simple vertexing first, not only for performance reasons but to keep the code as lightweight as possible. We can evolve from there if needed/wanted no?

gcowan commented 6 years ago

Having looked a bit more at DTF, there is a lot to pull into RapidSim, so I am heading more towards some simple vertex fit (at least initially).

mick-mulder commented 6 years ago

Maybe not the right place, but has there been any subsequent investigation into implementing DTF-like variables to RapidSim? In full MC, if I implement a pseudoconstraint on the q2 of my decay by doing for example q2_Lb_constr = (Jps_M - Lb_M + 5.620)^2, it turns out Lb_M is inversely correlated to q2_Lb_constr. However, if I use DTF, it turns out Lb_M is positively correlated to q2_Lb_DTF_constr. It would therefore be nice to have DTF available within RapidSim in some way for the proper behaviour.

gcowan commented 6 years ago

I've not had any time to look at this. If you (or anyone else) has a smart idea and would like to make a contribution then it would be more than welcome!

mick-mulder commented 6 years ago

To be honest, I was just wondering if there had been anyone working on it 😅 Right now I would not have the time for it, but I will keep it in the back of my mind and hopefully come back to it when I do have time. Thanks!

adamdddave commented 6 years ago

I actually just started looking at this though it seems that the conversation went away from simple SV smearing more towards a full on DTF, then came back, so maybe this is the wrong place.

I think there are two solutions one could think of:

  1. You smear the vertex, no need to smear the IP of the daughters.
  2. You smear the IP of the daughters, no need to smear the vertex, vertex smearing should be accounted for by a vertex fit. The smearing could be multiple scattering, or otherwise. I think this takes care of @particleist's points.

Concerning 1, if I think about an individual vertex to smear, I think the easiest thing to do is to write a base class RapidVertexSmear, similar to RapidMomentumSmear, which can take and return a ROOT::Math::XYZPoint.

Concerning 2, RapidIPSmear could be updated, no?

For 1, I would envisage each decaying particle allowed to have a smearing of its own. This would only smear its own end vertex, implemented in a similar way to the IP smearing. It could in principle be different for each decaying particle. At this point, the SV and PV are separated, since you only change the SV. Once the base class RapidVertexSmear is implemented, one can have any other smearing class inherit from this, just as with the IP. Then RapidParticle can have smearVertex(RapidVertexSmear*), or the like.

I'm currently trying to make this work for histogram smearing of 1,2 and 3 dimensions.

As for a vertex fit, a simple Cholesky Decomposition would probably be fast enough to be used.

adamdddave commented 6 years ago

Some progress now in !43