LOGO

RestFrames  v1.0.1
RestFrames HEP Event Analysis Software Library
VisibleState.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 VisibleState_HH
31 #define VisibleState_HH
32 
33 #include "RestFrames/State.hh"
34 
35 namespace RestFrames {
36 
37  class VisibleRecoFrame;
38 
39  class VisibleState : public State {
40 
41  public:
42 
47  VisibleState(const std::string& sname,
48  const std::string& stitle);
49 
51  VisibleState();
52  virtual ~VisibleState();
53 
55  virtual void Clear();
56 
60  static VisibleState& Empty();
61 
68  virtual void AddFrame(const RestFrame& frame);
69 
73  virtual RestFrame const& GetFrame() const;
74 
81  virtual bool IsFrame(const RestFrame& frame) const;
82 
88  virtual bool IsFrames(const ConstRestFrameList& frames) const;
89 
91  virtual void SetLabFrameFourVector();
92 
96  virtual void SetCharge(const RFCharge& charge);
97 
101  virtual void SetCharge(int charge = 0);
102 
107  virtual void SetCharge(int charge_num, int charge_den);
108 
109  protected:
110  const VisibleRecoFrame* m_FramePtr;
111 
112  private:
113  static VisibleState m_Empty;
114 
115  };
116 
117 }
118 
119 #endif
RestFrames::VisibleState::AddFrame
virtual void AddFrame(const RestFrame &frame)
Adds a frame (RestFrame) to this state.
Definition: VisibleState.cc:57
RestFrames::RFCharge
Definition: RFCharge.hh:40
RestFrames::VisibleState::VisibleState
VisibleState()
Empty constructor.
Definition: VisibleState.cc:44
RestFrames::VisibleState::SetLabFrameFourVector
virtual void SetLabFrameFourVector()
Sets four-vector of lab frame.
Definition: VisibleState.cc:84
RestFrames::RestFrame
abstract base class for all Frame objects
Definition: RestFrame.hh:45
RestFrames::RFList< const RestFrame >
RestFrames::VisibleRecoFrame
Definition: VisibleRecoFrame.hh:41
RestFrames::VisibleState::IsFrame
virtual bool IsFrame(const RestFrame &frame) const
Checks if frame of state corresponds to frame
Definition: VisibleState.cc:67
RestFrames::VisibleState::Empty
static VisibleState & Empty()
Returns empty VisibleState.
Definition: VisibleState.cc:53
RestFrames::VisibleState
Definition: VisibleState.hh:39
RestFrames::VisibleState::Clear
virtual void Clear()
Clears Visible State to all connections to other objects.
Definition: VisibleState.cc:48
State.hh
RestFrames::VisibleState::SetCharge
virtual void SetCharge(const RFCharge &charge)
Sets charge of this state.
Definition: VisibleState.cc:90
RestFrames::State
Abstract base class for all State objects.
Definition: State.hh:47
RestFrames::VisibleState::GetFrame
virtual RestFrame const & GetFrame() const
Returns frame (RestFrame) of this state.
Definition: VisibleState.cc:77
RestFrames::VisibleState::IsFrames
virtual bool IsFrames(const ConstRestFrameList &frames) const
Checks if frames lists of state corresponds frames
Definition: VisibleState.cc:73