36 VisibleState::VisibleState(
const std::string& sname,
37 const std::string& stitle)
38 : State(sname, stitle)
40 m_Type = kVisibleState;
44 VisibleState::VisibleState() : State() {}
46 VisibleState::~VisibleState() {}
54 return VisibleState::m_Empty;
57 void VisibleState::AddFrame(
const RestFrame& frame){
61 if(!frame.IsVisibleFrame() || !frame.IsRecoFrame())
return;
62 m_FramePtr =
static_cast<const VisibleRecoFrame*
>(&frame);
67 bool VisibleState::IsFrame(
const RestFrame& frame)
const {
68 if(!frame)
return false;
69 if(!m_FramePtr)
return false;
70 return *m_FramePtr == frame;
73 bool VisibleState::IsFrames(
const ConstRestFrameList& frames)
const {
74 return IsFrame(frames[0]);
77 RestFrame
const& VisibleState::GetFrame()
const {
81 return RestFrame::Empty();
84 void VisibleState::SetLabFrameFourVector(){
85 if(!m_FramePtr)
return;
86 SetFourVector(m_FramePtr->GetLabFrameFourVector());
87 SetCharge(m_FramePtr->GetCharge());
90 void VisibleState::SetCharge(
const RFCharge& charge){
94 void VisibleState::SetCharge(
int charge){
98 void VisibleState::SetCharge(
int charge_num,
int charge_den){
99 m_Charge = RFCharge(charge_num, charge_den);
102 VisibleState VisibleState::m_Empty;
virtual void Clear()
Clears RFBase of all connections to other objects.
bool IsEmpty() const
Checks whether this is default (empty) instance of class.
virtual void Clear()
Clears RFBase of all connections to other objects.