//////////////////////////////////////////////////////////// // $Id: IHit.cxx,v 1.24 2012/07/11 16:31:20 mcgrew Exp $ // #include #include "HEPUnits.hxx" #include "IHit.hxx" #include "IOADatabase.hxx" #include "IGeomIdManager.hxx" #include "ICOMETLog.hxx" ClassImp(COMET::IHit); COMET::IHit::IHit() : fGeomID(0){ SetBit(kCanDelete,false); } COMET::IHit::IHit(const COMET::IHit& h) : fGeomID(h.fGeomID){ SetBit(kCanDelete,false); } COMET::IHit::~IHit() {} // Get the geometry identifier for this hit. COMET::IGeometryId COMET::IHit::GetGeomID(void) const { return IGeometryId(fGeomID); } // The center of the volume associated with this hit. const TVector3& COMET::IHit::GetPosition(void) const {throw;} // Return the calibrated "charge" for the hit. double COMET::IHit::GetCharge(void) const {throw;} bool COMET::IHit::HasValidCharge() const {return !TestBit(kInvalidCharge);} void COMET::IHit::SetChargeValidity(bool valid) { SetBit(kInvalidCharge, !valid); } // Return the calibrated "time" for the hit. double COMET::IHit::GetTime(void) const {throw;} bool COMET::IHit::HasValidTime() const {return !TestBit(kInvalidTime);} void COMET::IHit::SetTimeValidity(bool valid) { SetBit(kInvalidTime, !valid); } // Return the position spread. const TVector3& COMET::IHit::GetSpread(void) const {throw;} // Return the "uncertainty" of the hit position. This is the position // resolution of the hit. const TVector3& COMET::IHit::GetUncertainty(void) const {throw;} COMET::IChannelId COMET::IHit::GetChannelID(int i) const {throw;} int COMET::IHit::GetChannelIDCount() const {throw;} // Print the hit information. void COMET::IHit::ls(Option_t *opt) const { COMET::ls_header(this,opt); std::cout << " ID: " << GetGeomID().AsInt(); std::cout << " P: " << std::setprecision(0) << "(" << GetPosition().X()/unit::cm << " cm" << ", " << GetPosition().Y()/unit::cm << " cm" << ", " << GetPosition().Z()/unit::cm << " cm" << ", " << GetTime()/unit::ns << " ns)"; std::cout << " Q: " << std::setprecision(1) << GetCharge() << " pe" << std::endl; std::string option(opt); }