@@ -567,25 +567,42 @@ function reco_state(cs::ClusterSequence, ranks; iteration = 0, ignore_beam_merge
567567end
568568
569569"""
570- constituents(j::PseudoJet , cs::ClusterSequence)
570+ constituents(jet::T , cs::ClusterSequence{T}) where T <: FourMomentum
571571
572572Get the constituents of a given jet in a cluster sequence.
573573
574574# Arguments
575- - `cs::ClusterSequence`: The cluster sequence object.
576- - `j::PseudoJet `: The jet for which to retrieve the constituents.
575+ - `cs::ClusterSequence{T} `: The cluster sequence object.
576+ - `jet::T `: The jet for which to retrieve the constituents.
577577
578578# Returns
579- An array of `PseudoJet` objects representing the constituents of the given jet.
580- (That is, the original clusters that were recombined to form this jet.)
579+ An array of jet objects (which are of the same type as the input jet)
580+ representing the constituents of the given jet,
581581
582582"""
583- function constituents (j:: PseudoJet , cs:: ClusterSequence )
584- constituent_indexes = get_all_ancestors (cs. history[j. _cluster_hist_index]. jetp_index,
585- cs)
586- constituents = Vector {PseudoJet} ()
587- for idx in constituent_indexes
583+ function constituents (jet:: T , cs:: ClusterSequence{T} ) where {T <: FourMomentum }
584+ constituent_idxs = constituent_indexes (jet, cs)
585+ constituents = Vector {T} ()
586+ for idx in constituent_idxs
588587 push! (constituents, cs. jets[idx])
589588 end
590589 constituents
591590end
591+
592+ """
593+ constituent_indexes(jet::T, cs::ClusterSequence{T}) where T <: FourMomentum
594+
595+ Return the indexes of the original particles which are the constituents of the
596+ given jet.
597+
598+ # Arguments
599+ - `jet::T`: The jet for which to retrieve the constituents.
600+ - `cs::ClusterSequence{T}`: The cluster sequence object.
601+
602+ # Returns
603+
604+ An vector of indices representing the original constituents of the given jet.
605+ """
606+ function constituent_indexes (jet:: T , cs:: ClusterSequence{T} ) where {T <: FourMomentum }
607+ get_all_ancestors (cs. history[jet. _cluster_hist_index]. jetp_index, cs)
608+ end
0 commit comments