// ESAF : Euso Simulation and Analysis Framework
// $Id: EusoCluster.cc,v 1.9 2004/06/17 08:20:11 thea Exp $
// R. Pesce created Jan, 23 2004
#include <stdexcept>
#include "EusoCluster.hh"
ClassImp(EusoCluster)
// ctor
EusoCluster::EusoCluster() {
fNumPoints = 0;
fSlope = 0;
fOffset = 0;
fAbsoluteDeviation = 0;
fThetaMin = 0;
fThetaMax = 0;
fPhiMin = 0;
fPhiMax = 0;
fGtuMin = 0;
fGtuMax = 0;
fIsFitted = kFALSE;
fPixelId.clear();
}
// dtor
EusoCluster::~EusoCluster() {
fPixelId.clear();
}
// add a point
void EusoCluster::AddPoint( Int_t id ) {
fNumPoints++;
fPixelId.push_back(id);
}
// get id of pixel (reference to vector fPixelData in RecoEvent)
const Int_t EusoCluster::GetPixelId( Int_t i) {
if ( i>= 0 && i < fNumPoints ) {
return fPixelId[i];
} else {
throw runtime_error("EusoCluster::GetPixelId out of index");
}
}