#include "IShowerState.hxx" /////////////////////////////////////////////////////// ClassImp(COMET::IShowerState); COMET::IShowerState::IShowerState(): IMReconState(this) { std::copy(fLocalNames.begin(), fLocalNames.end(), std::back_inserter(fFieldNames)); Init(); } COMET::IShowerState::~IShowerState() {} COMET::IShowerState::IShowerState(const COMET::IShowerState& init) : IMReconState(this) { std::copy(fLocalNames.begin(), fLocalNames.end(), std::back_inserter(fFieldNames)); Init(); for (int i=0; i& proj) { ICorrValues values(IShowerState::GetSize()); values.SetType("EDeposit X Y Z T DX DY DZ C1 C2 "); 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)); } } } const IMDirectionState* dirState = dynamic_cast(GetPointer(proj)); base += IMPositionState::GetSize(); if (dirState) { const int offset = dirState->GetDirectionIndex(); for (int i = 0; i < IMDirectionState::GetSize(); ++i) { values.SetValue(i+base, dirState->GetThis().fValues.GetValue(i+offset)); for (int j = 0; j < IMDirectionState::GetSize(); ++j) { values.SetCovarianceValue( i+base, j+base, dirState->GetThis().fValues.GetCovarianceValue(i+offset, j+offset)); } } } const IMConeState* coneState = dynamic_cast(GetPointer(proj)); base += IMDirectionState::GetSize(); if (coneState) { const int offset = coneState->GetConeIndex(); for (int i = 0; i < IMConeState::GetSize(); ++i) { values.SetValue(i+base, coneState->GetThis().fValues.GetValue(i+offset)); for (int j = 0; j < IMConeState::GetSize(); ++j) { values.SetCovarianceValue( i+base, j+base, coneState->GetThis().fValues.GetCovarianceValue(i+offset, j+offset)); } } } return values; }