LOGO

RestFrames  v1.0.0
RestFrames HEP Event Analysis Software Library
SelfAssemblingRecoFrame.hh
Go to the documentation of this file.
1 // RestFrames: particle physics event analysis library
3 // --------------------------------------------------------------------
4 // Copyright (c) 2014-2016, Christopher Rogan
14 // This file is part of RestFrames.
15 //
16 // RestFrames is free software; you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation; either version 2 of the License, or
19 // (at your option) any later version.
20 //
21 // RestFrames is distributed in the hope that it will be useful,
22 // but WITHOUT ANY WARRANTY; without even the implied warranty of
23 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 // GNU General Public License for more details.
25 //
26 // You should have received a copy of the GNU General Public License
27 // along with RestFrames. If not, see <http://www.gnu.org/licenses/>.
29 
30 #ifndef RSelfAssemblingFrame_HH
31 #define RSelfAssemblingFrame_HH
32 
34 #include "RestFrames/State.hh"
35 
36 namespace RestFrames {
37 
38  class VisibleRecoFrame;
39 
41  // SelfAssemblingRecoFrame class
44  public:
45  SelfAssemblingRecoFrame(const std::string& sname,
46  const std::string& stitle);
47  virtual ~SelfAssemblingRecoFrame();
48 
49  virtual void Clear();
50 
51  //virtual bool ClearEventRecursive();
52  //virtual bool AnalyzeEventRecursive();
53 
54  void RemoveChildFrame(RestFrame& frame);
55 
56  const RestFrame& GetFrame(const RFKey& key) const;
57 
58  protected:
59  virtual bool ResetRecoFrame();
60  virtual bool ReconstructFrame();
61 
62  private:
63  bool m_NewEvent;
64 
65  RestFrameList m_ChildFrames_UnAssembled;
66 
67  StateList m_VisibleStates;
70  int m_Nvisible;
71  int m_Ndecay;
72 
73  void ClearNewFrames();
74 
75  bool m_IsAssembled;
76  void Disassemble();
77  void Assemble();
78  void AssembleRecursive(RestFrame& frame,
79  std::vector<RestFrame*>& frames,
80  std::vector<TLorentzVector>& Ps);
81 
82  DecayRecoFrame& GetNewDecayFrame(const std::string& sname,
83  const std::string& stitle);
84 
85  VisibleRecoFrame& GetNewVisibleFrame(const std::string& sname,
86  const std::string& stitle);
87  };
88 
89 }
90 
91 #endif
virtual void Clear()
Clears ReconstructionFrame of all connections to other objects.
abstract base class for all Frame objects
void RemoveChildFrame(RestFrame &frame)
Remove a child of this frame.