40 LabFrame<T>::LabFrame(
const std::string& sname,
41 const std::string& stitle)
44 T::m_Type = kLabFrame;
48 LabFrame<T>::LabFrame() : T() {}
52 LabFrame<T>::~LabFrame() {}
55 bool LabFrame<T>::IsSoundBody()
const {
56 if(RFBase::IsSoundBody())
58 if(!T::IsSoundBody()){
59 return T::SetBody(
false);
61 int Nchild = T::GetNChildren();
63 T::m_Log << LogWarning <<
"Number of LabFrame children != 1: ";
64 T::m_Log << Nchild << LogEnd;
65 return T::SetBody(
false);
67 if(!T::GetParentFrame().IsEmpty()){
68 T::m_Log << LogWarning <<
"Parent frame of LabFrame is not empty: ";
69 T::m_Log << Log(T::GetParentFrame()) << LogEnd;
70 return T::SetBody(
false);
72 return T::SetBody(
true);;
76 void LabFrame<T>::SetChildFrame(RestFrame& frame){
77 T::AddChildFrame(frame);
81 bool LabFrame<T>::InitializeTree() {
82 T::m_Log << LogVerbose;
83 T::m_Log <<
"Initializing tree skeleton...";
86 std::vector<RFKey> keys;
87 if(T::IsCircularTree(keys)){
88 T::m_Log << LogWarning;
89 T::m_Log <<
" Tree is circular in construction";
94 if(!T::InitializeTreeRecursive()){
95 T::m_Log << LogWarning;
96 T::m_Log <<
" Problem with structure of tree";
101 T::m_Log << LogVerbose;
102 T::m_Log <<
"...Done";
109 TVector3 LabFrame<T>::GetInvisibleMomentum()
const {
110 return T::GetInvisibleFourVector().Vect();
113 template class LabFrame<ReconstructionFrame>;
114 template class LabFrame<GeneratorFrame>;