12 #include "cetlib_except/exception.h" 44 throw cet::exception(
"KHitGroup") <<
"Attempt to add null measurement.\n";
52 if(hit->getMeasPlane() < 0)
53 throw cet::exception(
"KHitGroup") << __func__ <<
": invalid hit plane " << hit->getMeasPlane() <<
"\n";
55 if(
fSurf.get() == 0) {
56 fSurf = hit->getMeasSurface();
57 fPlane = hit->getMeasPlane();
60 if(
fSurf.get() != hit->getMeasSurface().get())
61 throw cet::exception(
"KHitGroup") <<
"Attempt to add non-matching measurement.\n";
62 if(hit->getMeasPlane() !=
fPlane) {
63 throw cet::exception(
"KHitGroup") << __func__ <<
": hit plane mismatch, " 64 << hit->getMeasPlane() <<
" vs. " <<
fPlane <<
"\n";
111 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