12 #include "cetlib_except/exception.h" 38 if (hit.get() == 0)
throw cet::exception(
"KHitGroup") <<
"Attempt to add null measurement.\n";
46 if (hit->getMeasPlane() < 0)
48 << __func__ <<
": invalid hit plane " << hit->getMeasPlane() <<
"\n";
50 if (
fSurf.get() == 0) {
51 fSurf = hit->getMeasSurface();
52 fPlane = hit->getMeasPlane();
55 if (
fSurf.get() != hit->getMeasSurface().get())
56 throw cet::exception(
"KHitGroup") <<
"Attempt to add non-matching measurement.\n";
57 if (hit->getMeasPlane() !=
fPlane) {
58 throw cet::exception(
"KHitGroup") << __func__ <<
": hit plane mismatch, " 59 << hit->getMeasPlane() <<
" vs. " <<
fPlane <<
"\n";
104 throw cet::exception(
"KHitGroup") <<
"Attempt to compare incomparable objects.\n";
bool operator<(const KHitGroup &obj) const
Less than operator.
KHitGroup(bool has_path=false, double path=0.)
Default constructor.
virtual ~KHitGroup()
Destructor.
std::shared_ptr< const Surface > fSurf
Common surface.
int fPlane
Plane index of measurements.
A collection of measurements on the same surface.
Detector simulation of raw signals on wires.
void addHit(const std::shared_ptr< const KHitBase > &hit)
Add a mesaurement into the colleciton.
std::vector< std::shared_ptr< const KHitBase > > fHits
Measuement collection.
bool operator==(const KHitGroup &obj) const
Equivalance operator.
double fPath
Estimated path distance.
cet::coded_exception< error, detail::translate > exception