#include "IClusterState.hxx" #include "ICOMETLog.hxx" /////////////////////////////////////////////////////// ClassImp(COMET::IClusterState); COMET::IClusterState::IClusterState(): IMReconState(this) { std::copy(fLocalNames.begin(), fLocalNames.end(), std::back_inserter(fFieldNames)); Init(); } COMET::IClusterState::~IClusterState() {} COMET::IClusterState::IClusterState(const COMET::IClusterState& init) : IMReconState(this) { std::copy(fLocalNames.begin(), fLocalNames.end(), std::back_inserter(fFieldNames)); Init(); for (int i=0; i& proj) { ICorrValues values(IClusterState::GetSize()); values.SetType("EDeposit X Y Z T "); const IMEDepositState* eDepositState = dynamic_cast(GetPointer(proj)); int base = 0; if (eDepositState) { const int offset = eDepositState->GetEDepositIndex(); for (int i = 0; i < IMEDepositState::GetSize(); ++i) { values.SetValue(i+base, eDepositState-> GetThis().fValues.GetValue(i+offset)); for (int j = 0; j < IMEDepositState::GetSize(); ++j) { values.SetCovarianceValue( i+base, j+base, eDepositState-> GetThis().fValues.GetCovarianceValue(i+offset, j+offset)); } } } const IMPositionState* posState = dynamic_cast(GetPointer(proj)); base += IMEDepositState::GetSize(); if (posState) { const int offset = posState->GetPositionIndex(); for (int i = 0; i < IMPositionState::GetSize(); ++i) { values.SetValue(i+base, posState->GetThis().fValues.GetValue(i+offset)); for (int j = 0; j < IMPositionState::GetSize(); ++j) { values.SetCovarianceValue( i+base, j+base, posState->GetThis().fValues.GetCovarianceValue(i+offset, j+offset)); } } } return values; }