Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrepancy in Vertex Displacement and Displaced Track Reconstruction After Key4hep Update #55

Closed
gaswk opened this issue Nov 4, 2024 · 2 comments

Comments

@gaswk
Copy link

gaswk commented Nov 4, 2024

After updating to the latest key4hep configuration, I observed a significant reduction in reconstructed displaced tracks. Previously, about 50% of tracks were reconstructed as displaced for my HNL files, but now only ~3k/100k tracks are reconstructed. This issue arose after I had to redo the simulation/reconstruction due to recent changes in key4hep, which rendered my older files (from May 2024) incompatible.

Also, there is a problem with the generated vertex displacment that is different, here is what I had before (first plot) for generated vertex displacement and what I have now (second plot):
Screenshot from 2024-11-04 09-14-14
Screenshot from 2024-11-04 09-17-35

I used the same hepmc files and changed MaxCellAngle as I did before as well in key4hep/CLDConfig#25.
I use the same function to get the vertex displacement:

ROOT::VecOps::RVec<float> gen_vertex_Lxyz(ROOT::VecOps::RVec<edm4hep::MCParticleData> in){
  ROOT::VecOps::RVec<float> result;
  for (auto & p: in) {
    float Lxyz = std::sqrt( p.vertex.x*p.vertex.x +  p.vertex.y*p.vertex.y +p.vertex.z*p.vertex.z );
    result.push_back(Lxyz);
  }
  return result;
}

and in fccanalysis script:

df = df.Define("gen_vertex_Lxyz", "FCCAnalyses::TTbarfunctions::gen_vertex_Lxyz(MC_electrons_status23)")
 results.append(df.Histo1D(("gen_Vertex_Lxyz_distrib_fromHNL", "",    *bins_vertex_Lxyz_all),    "gen_vertex_Lxyz"))
@andresailer
Copy link
Collaborator

Hi @gaswk ,

Could you add a link to the HepMC file you are using? And possible also to your SIM and REC files.

Thanks,
Andre

@gaswk
Copy link
Author

gaswk commented Nov 4, 2024

I just spotted the issue—turns out the HepMC file path was hard-coded in the job submission code, which caused the one provided in the command line to be ignored. My fault!

@gaswk gaswk closed this as completed Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants