16#include <Math/Vector3Dfwd.h>
18#include <RtypesCore.h>
28 auto min = std::min_element(
fHits.cbegin(),
31 { return a.GetPosition().Z() < b.GetPosition().Z(); });
32 if (min ==
fHits.end())
34 throw std::logic_error(
"R3BNeulandCluster::GetFirstHit(): Cluster has no Hits!");
41 auto min = std::min_element(
fHits.cbegin(),
44 if (min ==
fHits.end())
46 throw std::logic_error(
"R3BNeulandCluster::GetFirstHit(): Cluster has no Hits!");
53 auto max = std::max_element(
fHits.cbegin(),
56 if (max ==
fHits.end())
58 throw std::logic_error(
"R3BNeulandCluster::GetLastHit(): Cluster has no Hits!");
65 auto max = std::max_element(
fHits.cbegin(),
68 if (max ==
fHits.end())
70 throw std::logic_error(
"R3BNeulandCluster::GetLastHit(): Cluster has no Hits!");
77 return std::accumulate(
88 const auto centroid = std::accumulate(
fHits.cbegin(),
90 ROOT::Math::XYZVector(),
91 [](
const ROOT::Math::XYZVector& cluster,
const R3BNeulandHit& hit)
92 { return cluster + (hit.GetPosition() * hit.GetE()); });
93 return centroid * (1. /
GetE());
99 Double_t mom = std::accumulate(
fHits.cbegin(),
103 { return cluster + ((hit.GetPosition() - centroid).r() * hit.GetE()); });
117 os <<
"R3BNeulandCluster: NeuLAND Cluster with size " << cluster.
GetSize() << std::endl;
120 os <<
" Sum Energy: " << cluster.
GetE() << std::endl
ClassImp(R3B::Neuland::Cal2HitPar)
std::ostream & operator<<(std::ostream &os, const R3BNeulandCluster &cluster)
auto GetEToF() const -> double
void Print(const Option_t *) const override
auto GetForemostHit() const -> R3BNeulandHit
auto GetT() const -> double
auto GetBeta() const -> double
auto GetFirstHit() const -> R3BNeulandHit
std::vector< R3BNeulandHit > fHits
auto GetRECluster(double ekin) const -> double
auto GetSize() const -> std::size_t
auto GetEnergyCentroid() const -> ROOT::Math::XYZVector
auto GetMaxEnergyHit() const -> R3BNeulandHit
auto GetPosition() const -> ROOT::Math::XYZVector
auto GetLastHit() const -> R3BNeulandHit
auto GetRCluster(double beta) const -> double
auto GetE() const -> double
auto GetEnergyMoment() const -> double