6 #include "Math/Vector4D.h"
7 using ROOT::Math::PxPyPzEVector;
9 #include "edm4hep/MCParticleCollection.h"
10 #include "eicd/ReconstructedParticleCollection.h"
14 template<
class collection>
16 const collection& parts,
17 const std::set<int32_t>& pdg) {
18 std::vector<decltype(parts[0])> c;
19 for (
const auto& p: parts) {
20 if (pdg.count(p.getPDG()) > 0) {
28 template<
class collection>
30 const collection& parts,
31 const std::set<int32_t>& status,
32 const std::set<int32_t>& pdg) {
33 std::vector<decltype(parts[0])> c;
34 for (
const auto& p: parts) {
35 if (status.count(p.getGeneratorStatus()) > 0 &&
36 pdg.count(p.getPDG()) > 0) {
63 const edm4hep::Vector3f& p_in,
65 const std::vector<float>& pz_set,
66 const float crossing_angle = 0.0) {
68 for (
const auto& pz : pz_set) {
69 if (fabs(p_in.z / pz - 1) < 0.1) {
74 p_out.SetPx(p_out.Pz() * sin(crossing_angle));
75 p_out.SetPz(p_out.Pz() * cos(crossing_angle));
76 p_out.SetE(std::hypot(p_out.Px(), p_out.Pz(), mass));