14 void setP4(
const std::vector<const Trackster*>& tracksters,
15 std::vector<TICLCandidate>& ticl_cands,
19 std::tuple<TracksterMomentumPluginBase::LorentzVector, float>
calcP4(
const ticl::Trackster& trackster)
const;
26 energy_from_regression_(ps.getParameter<
bool>(
"energyFromRegression")),
30 std::vector<TICLCandidate>& ticl_cands,
37 auto size =
std::min(tracksters.size(), ticl_cands.size());
38 for (
size_t i = 0;
i < size; ++
i) {
39 const auto* trackster = tracksters[
i];
41 if (trackster->seedIndex() != -1) {
42 assert(trackster->seedID() == trkId);
44 auto const& three_mom = tkRef.momentum();
48 auto& ticl_cand = ticl_cands[
i];
49 ticl_cand.setP4(trk_p4);
50 ticl_cand.setRawEnergy(
energy);
52 auto direction = trackster->eigenvectors(0).Unit();
56 auto& ticl_cand = ticl_cands[
i];
57 ticl_cand.setP4(cartesian);
58 ticl_cand.setRawEnergy(
energy);
std::tuple< TracksterMomentumPluginBase::LorentzVector, float > calcP4(const ticl::Trackster &trackster) const
T const * product() const
std::vector< Track > TrackCollection
collection of Tracks
void setP4(const std::vector< const Trackster *> &tracksters, std::vector< TICLCandidate > &ticl_cands, edm::Event &event) const override
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
edm::EDGetTokenT< reco::TrackCollection > tracks_token_
bool energy_from_regression_
#define DEFINE_EDM_PLUGIN(factory, type, name)
TracksterP4FromTrackAndPCA(const edm::ParameterSet &, edm::ConsumesCollector &&iC)