◆ TracksterP4FromEnergySum()
◆ calcP4()
Definition at line 64 of file TracksterP4FromEnergySumPlugin.cc.
68 std::array<double, 3> barycentre{{0., 0., 0.}};
74 auto fraction = n_vertices ? 1.f / n_vertices : 1.f;
77 barycentre[0] += calo_clusters[
idx].x() *
weight;
78 barycentre[1] += calo_clusters[
idx].y() *
weight;
79 barycentre[2] += calo_clusters[
idx].z() *
weight;
87 direction = direction.Unit();
95 return std::tuple(
p4, raw_energy);
References begin, end, HCALHighEnergyHPDFilter_cfi::energy, energy_from_regression_, HLT_2018_cff::fraction, training_settings::idx, p4, ticl::Trackster::regressed_energy(), HcalDetIdTransform::transform(), heppy_batch::val, bphysicsOniaDQM_cfi::vertex, ticl::Trackster::vertex_multiplicity(), ticl::Trackster::vertices(), and mps_merge::weight.
Referenced by setP4().
◆ setP4()
void ticl::TracksterP4FromEnergySum::setP4 |
( |
const std::vector< const Trackster * > & |
tracksters, |
|
|
std::vector< TICLCandidate > & |
ticl_cands, |
|
|
edm::Event & |
event |
|
) |
| const |
|
overridevirtual |
Implements ticl::TracksterMomentumPluginBase.
Definition at line 35 of file TracksterP4FromEnergySumPlugin.cc.
41 auto vertex_coll = *vertex_h;
43 if (!vertex_coll.empty()) {
44 const auto&
vertex = vertex_coll[0];
53 auto size =
std::min(tracksters.size(), ticl_cands.size());
54 for (
size_t i = 0;
i <
size; ++
i) {
55 const auto* trackster = tracksters[
i];
56 auto ret =
calcP4(*trackster, best_vertex, *layer_clusters_h);
58 auto& ticl_cand = ticl_cands[
i];
59 ticl_cand.setP4(std::get<0>(
ret));
60 ticl_cand.setRawEnergy(std::get<1>(
ret));
References calcP4(), mps_fire::i, layer_clusters_token_, min(), runTheMatrix::ret, findQualityFiles::size, bphysicsOniaDQM_cfi::vertex, and vertex_token_.
Referenced by Jet.Jet::setCorrP4().
◆ energy_from_regression_
bool ticl::TracksterP4FromEnergySum::energy_from_regression_ |
|
private |
◆ layer_clusters_token_
◆ vertex_token_