LOGO

RestFrames  v1.0.1
RestFrames HEP Event Analysis Software Library
DecayGenFrame.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 DecayGenFrame_HH
31 #define DecayGenFrame_HH
32 
33 #include "RestFrames/DecayFrame.hh"
35 
36 namespace RestFrames {
37 
38  class ResonanceGenFrame;
39 
41  // DecayGenFrame class
43  class DecayGenFrame : public DecayFrame<GeneratorFrame> {
44  public:
45 
50  DecayGenFrame(const std::string& sname, const std::string& stitle);
51 
53  DecayGenFrame();
54  virtual ~DecayGenFrame();
55 
61  virtual void SetMass(double val);
62 
67  virtual void SetVariableMass(bool varymass = true);
68 
69  // For two-body decays
70 
76  virtual void SetCosDecayAngle(double val);
77 
81  virtual void SetDeltaPhiDecayPlane(double val);
82 
91 
93  virtual double GetProbMCMC(double mass = -1.) const;
94 
96  virtual void GenerateMassMCMC(double& mass, double& prob,
97  double max = -1.) const;
98 
100 
101  protected:
102  double m_CosDecayAngle;
103  double m_DeltaPhiDecayPlane;
104 
105  std::vector<int> m_ChildIndexMCMC;
106  std::vector<double> m_ChildMassMCMC;
107  std::vector<double> m_ChildProbMCMC;
108  std::vector<double> m_InterMassFracMCMC;
109 
110  virtual bool IsSoundBody() const;
111 
112  virtual void ResetGenFrame();
113  virtual bool GenerateFrame();
114 
115  void GenerateTwoBodyRecursive(const std::vector<double>& M_parent,
116  const std::vector<double>& M_child,
117  const TVector3& axis_par,
118  const TVector3& axis_perp,
119  std::vector<TLorentzVector>& P_child);
120 
121  virtual bool InitializeGenAnalysis();
122  virtual bool IterateMCMC();
123 
124  };
125 
126  int DoubleMax(const void *a, const void *b);
127 
128 }
129 
130 #endif
RestFrames::DecayGenFrame
Definition: DecayGenFrame.hh:43
RestFrames::DecayGenFrame::SetDeltaPhiDecayPlane
virtual void SetDeltaPhiDecayPlane(double val)
Sets azimuthal angle of decay plane.
Definition: DecayGenFrame.cc:86
RestFrames::DecayGenFrame::SetCosDecayAngle
virtual void SetCosDecayAngle(double val)
Sets cosine of decay angle.
Definition: DecayGenFrame.cc:75
RestFrames::DecayFrame
Definition: DecayFrame.hh:38
RestFrames::DecayGenFrame::DecayGenFrame
DecayGenFrame()
Empty constructor.
Definition: DecayGenFrame.cc:47
RestFrames::DecayGenFrame::GenerateMassMCMC
virtual void GenerateMassMCMC(double &mass, double &prob, double max=-1.) const
Generates mass for Markov Chain MonteCarlo event generation.
Definition: DecayGenFrame.cc:233
RestFrames::DecayGenFrame::SetVariableMass
virtual void SetVariableMass(bool varymass=true)
Determines who sets mass of current frame.
Definition: DecayGenFrame.cc:98
RestFrames::DecayGenFrame::SetMass
virtual void SetMass(double val)
Sets mass of current frame.
Definition: DecayGenFrame.cc:62
RestFrames::DecayGenFrame::GetProbMCMC
virtual double GetProbMCMC(double mass=-1.) const
Evaluates probability of the state is in right now or the probablility of a state it could go in.
Definition: DecayGenFrame.cc:205
GeneratorFrame.hh
DecayFrame.hh