LOGO

RestFrames  v1.0.1
RestFrames HEP Event Analysis Software Library
LabGenFrame.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 LabGenFrame_HH
31 #define LabGenFrame_HH
32 
33 #include "RestFrames/LabFrame.hh"
35 
36 namespace RestFrames {
37 
39  // LabGenFrame class
41  class LabGenFrame : public LabFrame<GeneratorFrame> {
42  public:
43 
48  LabGenFrame(const std::string& sname, const std::string& stitle);
49  virtual ~LabGenFrame();
50 
52  virtual void Clear();
53 
60  virtual bool InitializeAnalysis();
61 
67  virtual bool ClearEvent();
68 
74  virtual bool AnalyzeEvent();
75 
79  virtual void SetThreeVector(const TVector3& P);
80 
87  virtual void SetTransverseMomentum(double val);
88 
92  virtual void SetLongitudinalMomentum(double val);
93 
97  virtual void SetPhi(double val);
98 
106  virtual void SetPToverM(double val);
107 
111  void SetN_MCMCBurnIn(int N);
112 
119  void SetN_MCMCDiscard(int N);
120 
124  void SetFailTolerance(int N);
125 
126  protected:
127  double m_PT;
128  double m_PL;
129  double m_Phi;
130  double m_PToM;
131 
132  double m_MaxM;
133 
134  virtual bool InitializeGenAnalysis();
135 
136  virtual void ResetGenFrame();
137  virtual bool GenerateFrame();
138 
139  double m_ChildMassMCMC;
140  double m_ChildProbMCMC;
141 
142  virtual bool IterateMCMC();
143 
144  int m_NBurnInMCMC;
145  int m_NDiscardMCMC;
146 
147  int m_FailTolerance;
148 
149  long m_Ngenerated;
150  long m_Npassed;
151 
152  private:
153  void Init();
154 
155  };
156 
157 }
158 
159 #endif
LabFrame.hh
RestFrames::LabGenFrame::SetPToverM
virtual void SetPToverM(double val)
Sets transverse momentum over mass.
Definition: LabGenFrame.cc:66
RestFrames::LabGenFrame::AnalyzeEvent
virtual bool AnalyzeEvent()
Analyzes event.
Definition: LabGenFrame.cc:217
RestFrames::LabGenFrame::Clear
virtual void Clear()
Clears LabGenFrame from all connections to other objects
Definition: LabGenFrame.cc:56
RestFrames::LabGenFrame::SetPhi
virtual void SetPhi(double val)
Sets phi of this frame.
Definition: LabGenFrame.cc:94
RestFrames::LabGenFrame::SetFailTolerance
void SetFailTolerance(int N)
Sets tolerance number of fail events before stopping the generation.
Definition: LabGenFrame.cc:138
RestFrames::LabGenFrame::SetThreeVector
virtual void SetThreeVector(const TVector3 &P)
Sets momentum's three-vector of this frame.
Definition: LabGenFrame.cc:60
RestFrames::LabGenFrame::SetLongitudinalMomentum
virtual void SetLongitudinalMomentum(double val)
Sets longitudinal momentum of this frame.
Definition: LabGenFrame.cc:90
RestFrames::LabGenFrame::SetN_MCMCDiscard
void SetN_MCMCDiscard(int N)
Sets which Nth events to keep.
Definition: LabGenFrame.cc:133
RestFrames::LabGenFrame::ClearEvent
virtual bool ClearEvent()
Clears event.
Definition: LabGenFrame.cc:210
RestFrames::LabGenFrame::LabGenFrame
LabGenFrame(const std::string &sname, const std::string &stitle)
Standard constructor.
Definition: LabGenFrame.cc:37
RestFrames::LabGenFrame
Definition: LabGenFrame.hh:41
GeneratorFrame.hh
RestFrames::LabGenFrame::SetTransverseMomentum
virtual void SetTransverseMomentum(double val)
Sets transverse momentum of this frame.
Definition: LabGenFrame.cc:78
RestFrames::LabGenFrame::InitializeAnalysis
virtual bool InitializeAnalysis()
Initialize analysis capability of a tree to generate events.
Definition: LabGenFrame.cc:105
RestFrames::LabFrame
Definition: LabFrame.hh:41
RestFrames::LabGenFrame::SetN_MCMCBurnIn
void SetN_MCMCBurnIn(int N)
Sets number of events to be thrown away before keeping any.
Definition: LabGenFrame.cc:128