lcfiplus / LCFIPlus

Flavor tagging code for ILC detectors
https://confluence.slac.stanford.edu/display/ilc/LCFIPlus
GNU General Public License v3.0
6 stars 19 forks source link

Fix Primary Vertex in LCFIPlusProcessor #57

Closed Laura-Buonincontri closed 2 years ago

Laura-Buonincontri commented 3 years ago

Dear LCFIPLus developers,

we are writing because we have some questions about LCFIPlusProcessor. By now we are running only the PrimaryVertexFinder and BuildUpVertex algorithms on μ + μ - → H ν ν̄ → bb ν ν̄ events.

We would like to know if there is a way to set the primary vertex "by hand" and fix its position and resolution instead of run PrimaryVertexFinder.

This implies that we want to skip the PrimaryVertexFinder step but also the further research of the primary that is done in BuildUpVertex. The latter is done at these lines https://github.com/lcfiplus/LCFIPlus/blob/278d7bb54e2602c2c0cd170c00f72fe302794bcf/src/process.cc#L195 and https://github.com/lcfiplus/LCFIPlus/blob/278d7bb54e2602c2c0cd170c00f72fe302794bcf/src/VertexFinderSuehara.cc#L1036

Thank you in advance,

Laura

tomohikosan commented 3 years ago

Skipping the PrimaryVertexFinder should be possible.

First, you need to implement your own processor which acts like a primary vertex finder. The basic procedure would be to create a Vertex and its associated ReconstructedParticle object, specify their parameters, and write them out as collections whose names are (as specified in the XML steering file) PrimaryVertex and PrimaryVertex_RP.

Second, in the LCFIPlus steering parameter containing the list of algorithms to run, remove the PrimaryVertexFinder from the list.

Then, run the custom primary vertex finder followed by LCFIPlus. In this way, LCFIPlus should be able to continue using the custom primary vertex, wherever needed.

Since this feature is not fully tested (though we believe it should work), you might encounter some technical issues. Please don't hesitate to open a new issue if that happens.

[Even if it works technically, there is a potential performance issue you might run into. The PrimaryVertexFinder has a list of associated tracks which are associated with it. These primary tracks are not used in the BuildUpVertex stage. So if the custom primary vertex has an empty list of associated particles, some difference in the performance is expected. This should be ideally tested.]

Laura-Buonincontri commented 2 years ago

We tried this solution and it worked without any further problems. Thank you for your help! Since we have no other questions, I think that the issue can be closed. Kind regards,

Laura