You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// return the list of stable particles from the decay of a mother particle, looking at the full decay chain recursively. i is the mother index in the Particle block
211
226
std::vector<int> get_list_of_stable_particles_from_decay( int i, ROOT::VecOps::RVec<edm4hep::MCParticleData> in, ROOT::VecOps::RVec<int> ind) ;
212
227
228
+
/// return the list of stable particles from the decays of a mother particle, looking at the full decay chain recursively.
229
+
/// i is the list of mother indices to process in the Particle block.
230
+
/// Will return a vector of vectors - each vector is the set of children for one of the mothers in the input vector
231
+
ROOT::VecOps::RVec<ROOT::VecOps::RVec<int>> get_lists_of_stable_particles_from_decays( ROOT::VecOps::RVec<int> i, ROOT::VecOps::RVec<edm4hep::MCParticleData> in, ROOT::VecOps::RVec<int> ind) ;
232
+
213
233
/// return the list of particles from the decay of a mother particle. i is the mother index in the Particle block.
214
234
std::vector<int> get_list_of_particles_from_decay( int i,
/// select ReconstructedParticles matched to the MC particles whose indices are passed in a list
129
+
/// @param mcParticles_indices indices of the MC particles to look up
130
+
/// @param recind: reco index component of the MCRecoAssociations
131
+
/// @param mcind: mc index component of the MCRecoAssociations
132
+
/// @param reco: full reco particle list (ReconstructedParticles)
133
+
/// @param mc: full mc particle list (Particles)
134
+
/// @param require_stable: if set to true, will only match stable particles.
135
+
/// @return List of ReconstructedParticle candidates with length corresponding to the number of *stable* MC particles in the mcParticles_indices vector. In presence of unstable particles, no 1:1 correspondence. For non-reconstructed stable MC particles, a dummy particle will be inserted. If 1:1 length correspondence is required, set require_stable to false.
/// select indices of ReconstructedParticles matched to the MC particles whose indices are passed in a list
144
+
/// @param mcParticles_indices indices of the MC particles to look up
145
+
/// @param recind: reco index component of the MCRecoAssociations
146
+
/// @param mcind: mc index component of the MCRecoAssociations
147
+
/// @param mc: full mc particle list (Particles)
148
+
/// @param require_stable: if set to true, will only match stable particles.
149
+
/// @return List of ReconstructedParticle candidates with length corresponding to the number of *stable* MC particles in the mcParticles_indices vector. In presence of unstable particles, no 1:1 correspondence. For non-reconstructed stable MC particles, a "-1" entry will be inserted. If 1:1 length correspondence is required, set require_stable to false.
/// @brief Find (by index) a vertex that is made of reco particles from a passed list.
116
+
/// @param vertices: List of possible vertices to match
117
+
/// @param recoParticleIndices: Indices of the reco particles to find in the vertex
118
+
/// @param reco: list of all reco particles (ReconstructedParticles)
119
+
/// @param require_all: If set, require one vertex to contain all recoParticleIndices (no 'missed' tracks). Else only require that all tracks in the vertex come from the vector (but allow for unused tracks)
120
+
/// @return: Index within the list of the (first) vertex fulfilling the criteria. If none are found, return -1
@@ -540,6 +558,16 @@ std::vector<int> get_list_of_particles_from_decay(int i, ROOT::VecOps::RVec<edm4
540
558
return res;
541
559
}
542
560
561
+
ROOT::VecOps::RVec<ROOT::VecOps::RVec<int>> get_lists_of_stable_particles_from_decays(ROOT::VecOps::RVec<int> i, ROOT::VecOps::RVec<edm4hep::MCParticleData> in, ROOT::VecOps::RVec<int> ind) {
562
+
563
+
ROOT::VecOps::RVec<ROOT::VecOps::RVec<int>> ret;
564
+
ret.reserve(i.size());
565
+
for (int ix : i){
566
+
ret.push_back(get_list_of_stable_particles_from_decay(ix, in, ind));
0 commit comments