MINT2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DalitzPhaseSpaceBox Class Reference

#include <DalitzPhaseSpaceBox.h>

Public Member Functions

double & height ()
 
const double & height () const
 
void setWeight (double w)
 
double weight () const
 
double & weight ()
 
 DalitzPhaseSpaceBox (TRandom *rnd=gRandom)
 
 DalitzPhaseSpaceBox (const DalitzEventPattern &pat, TRandom *rnd=gRandom)
 
 DalitzPhaseSpaceBox (const DalitzPhaseSpaceBox &other)
 
 ~DalitzPhaseSpaceBox ()
 
const DalitzEventPatternpattern () const
 
void setPattern (const DalitzEventPattern &pat)
 
void setName (const std::string &name)
 
const std::string & name () const
 
double volume () const
 
double genValue () const
 
double genValue (const DalitzEvent &evt) const
 
bool insideArea (const DalitzEvent &evt) const
 
MINT::counted_ptr< DalitzEventtryEventForOwner ()
 
MINT::counted_ptr< DalitzEventmakeEventForOwner ()
 
bool setRnd (TRandom *rnd=gRandom)
 
double phaseSpaceIntegral () const
 
double phaseSpaceIntegral ()
 
bool checkIntegration () const
 
void print (std::ostream &os=std::cout) const
 

Private Member Functions

double doPhaseSpaceIntegral ()
 
MINT::counted_ptr< DalitzEventtryNewEvent ()
 

Private Attributes

std::string _name
 
DalitzEventPattern _pat
 
TRandom * _rnd
 
double _height
 
double _weight
 
double _phaseSpaceIntegral
 

Detailed Description

Definition at line 19 of file DalitzPhaseSpaceBox.h.

Constructor & Destructor Documentation

◆ DalitzPhaseSpaceBox() [1/3]

DalitzPhaseSpaceBox::DalitzPhaseSpaceBox ( TRandom *  rnd = gRandom)

Definition at line 10 of file DalitzPhaseSpaceBox.cpp.

11  : _name("noName")
12  , _pat()
13  , _rnd(rnd)
14  , _height(1)
15  , _weight(1)
17 {}
DalitzEventPattern _pat

◆ DalitzPhaseSpaceBox() [2/3]

DalitzPhaseSpaceBox::DalitzPhaseSpaceBox ( const DalitzEventPattern pat,
TRandom *  rnd = gRandom 
)

Definition at line 20 of file DalitzPhaseSpaceBox.cpp.

22  : _name("noName")
23  , _pat(pat)
24  , _rnd(rnd)
25  , _height(1)
26  , _weight(1)
28 {
30 }
DalitzEventPattern _pat

◆ DalitzPhaseSpaceBox() [3/3]

DalitzPhaseSpaceBox::DalitzPhaseSpaceBox ( const DalitzPhaseSpaceBox other)

Definition at line 32 of file DalitzPhaseSpaceBox.cpp.

33  : _name(other._name)
34  , _pat(other._pat)
35  , _rnd(other._rnd)
36  , _height(other._height)
37  , _weight(other._weight)
39 {
40 }
DalitzEventPattern _pat

◆ ~DalitzPhaseSpaceBox()

DalitzPhaseSpaceBox::~DalitzPhaseSpaceBox ( )

Definition at line 42 of file DalitzPhaseSpaceBox.cpp.

42  {
43 }

Member Function Documentation

◆ checkIntegration()

bool DalitzPhaseSpaceBox::checkIntegration ( ) const

Definition at line 132 of file DalitzPhaseSpaceBox.cpp.

132  {
133  cout << "DalitzPhaseSpaceBox: can't check integration, yet - improve me!" << endl;
134  return true;
135 }

◆ doPhaseSpaceIntegral()

double DalitzPhaseSpaceBox::doPhaseSpaceIntegral ( )
private

Definition at line 49 of file DalitzPhaseSpaceBox.cpp.

49  {
51  return _phaseSpaceIntegral;
52 }
DalitzEventPattern _pat
double phaseSpaceIntegral_upTo4body(const DalitzEventPattern &pat)

◆ genValue() [1/2]

double DalitzPhaseSpaceBox::genValue ( ) const

Definition at line 75 of file DalitzPhaseSpaceBox.cpp.

75  {
76  bool dbThis=false;
77  if(dbThis) {
78  cout << "DalitzPhaseSpaceBox::genValue called " << endl;
79  }
80 
81  double returnVal = height() * weight();
82  if(dbThis) {
83  cout << "DalitzPhaseSpaceBox::genValue returning "
84  << weight() << " * " << height()
85  << " = "
86  << returnVal << endl;
87  }
88  return returnVal;
89 }

◆ genValue() [2/2]

double DalitzPhaseSpaceBox::genValue ( const DalitzEvent evt) const

Definition at line 71 of file DalitzPhaseSpaceBox.cpp.

71  {
72  // returns generator value w/o phase space - constant, here.
73  return genValue();
74 }

◆ height() [1/2]

double& DalitzPhaseSpaceBox::height ( )
inline

Definition at line 30 of file DalitzPhaseSpaceBox.h.

30 { return _height;}

◆ height() [2/2]

const double& DalitzPhaseSpaceBox::height ( ) const
inline

Definition at line 31 of file DalitzPhaseSpaceBox.h.

31 { return _height;}

◆ insideArea()

bool DalitzPhaseSpaceBox::insideArea ( const DalitzEvent evt) const

Definition at line 61 of file DalitzPhaseSpaceBox.cpp.

61  {
62 
63  return (evt.phaseSpace() > 0);
64 }
virtual double phaseSpace() const

◆ makeEventForOwner()

counted_ptr< DalitzEvent > DalitzPhaseSpaceBox::makeEventForOwner ( )

Definition at line 97 of file DalitzPhaseSpaceBox.cpp.

97  {
98  // bool dbThis=false;
99  if(_pat.numDaughters() < 2){
100  counted_ptr<DalitzEvent> zero(0);
101  return zero;
102  }
104  evtPtr->setWeight(weight());
105  // above constructor makes a phase space event, weight 1.
106  if(0 != evtPtr && _pat[0] < 0) evtPtr->P_conjugateYourself();
107  // the above ensures that, for the same random seed,
108  // identical but CP conjugate events are generated
109  // for D->f and Dbar->fbar.
110  // Note that this step of the event generation is
111  // completely P-even, and the event generation would
112  // still be correct without this P-conjugation. The
113  // crucial P-senstive step is the reweighting applied
114  // later, which will then take into account the full
115  // amplitude model. The P-conjugation here is just to keep the
116  // random numbers in sync between CP conjugate event generations.
117  return evtPtr;
118 }
DalitzEventPattern _pat

◆ name()

const std::string& DalitzPhaseSpaceBox::name ( ) const
inline

Definition at line 48 of file DalitzPhaseSpaceBox.h.

48 {return _name;}

◆ pattern()

const DalitzEventPattern& DalitzPhaseSpaceBox::pattern ( ) const
inline

Definition at line 44 of file DalitzPhaseSpaceBox.h.

44 {return _pat;}
DalitzEventPattern _pat

◆ phaseSpaceIntegral() [1/2]

double DalitzPhaseSpaceBox::phaseSpaceIntegral ( ) const

Definition at line 53 of file DalitzPhaseSpaceBox.cpp.

53  {
54  return _phaseSpaceIntegral;
55 }

◆ phaseSpaceIntegral() [2/2]

double DalitzPhaseSpaceBox::phaseSpaceIntegral ( )

Definition at line 56 of file DalitzPhaseSpaceBox.cpp.

56  {
58  return _phaseSpaceIntegral;
59 }

◆ print()

void DalitzPhaseSpaceBox::print ( std::ostream &  os = std::cout) const

Definition at line 128 of file DalitzPhaseSpaceBox.cpp.

128  {
129  os << "DalitzPhaseSpaceBox: " << name();
130 }
const std::string & name() const

◆ setName()

void DalitzPhaseSpaceBox::setName ( const std::string &  name)
inline

Definition at line 47 of file DalitzPhaseSpaceBox.h.

47 { _name = name;}
const std::string & name() const

◆ setPattern()

void DalitzPhaseSpaceBox::setPattern ( const DalitzEventPattern pat)

Definition at line 45 of file DalitzPhaseSpaceBox.cpp.

45  {
46  _pat = pat;
48 }
DalitzEventPattern _pat

◆ setRnd()

bool DalitzPhaseSpaceBox::setRnd ( TRandom *  rnd = gRandom)

Definition at line 124 of file DalitzPhaseSpaceBox.cpp.

124  {
125  _rnd = rnd;
126  return true;
127 }

◆ setWeight()

void DalitzPhaseSpaceBox::setWeight ( double  w)
inline

Definition at line 33 of file DalitzPhaseSpaceBox.h.

33 {_weight = w;} // every event gets the same.

◆ tryEventForOwner()

counted_ptr< DalitzEvent > DalitzPhaseSpaceBox::tryEventForOwner ( )

Definition at line 91 of file DalitzPhaseSpaceBox.cpp.

91  {
92 
94  return evt;
95 }
MINT::counted_ptr< DalitzEvent > tryNewEvent()

◆ tryNewEvent()

counted_ptr< DalitzEvent > DalitzPhaseSpaceBox::tryNewEvent ( )
private

Definition at line 120 of file DalitzPhaseSpaceBox.cpp.

120  {
121  return makeEventForOwner();
122 }
MINT::counted_ptr< DalitzEvent > makeEventForOwner()

◆ volume()

double DalitzPhaseSpaceBox::volume ( ) const

Definition at line 66 of file DalitzPhaseSpaceBox.cpp.

66  {
67  // bool dbThis = false;
68  return phaseSpaceIntegral() * height();
69 }
double phaseSpaceIntegral() const

◆ weight() [1/2]

double DalitzPhaseSpaceBox::weight ( ) const
inline

Definition at line 34 of file DalitzPhaseSpaceBox.h.

34 {return _weight;}

◆ weight() [2/2]

double& DalitzPhaseSpaceBox::weight ( )
inline

Definition at line 35 of file DalitzPhaseSpaceBox.h.

35 {return _weight;}

Member Data Documentation

◆ _height

double DalitzPhaseSpaceBox::_height
private

Definition at line 23 of file DalitzPhaseSpaceBox.h.

◆ _name

std::string DalitzPhaseSpaceBox::_name
private

Definition at line 20 of file DalitzPhaseSpaceBox.h.

◆ _pat

DalitzEventPattern DalitzPhaseSpaceBox::_pat
private

Definition at line 21 of file DalitzPhaseSpaceBox.h.

◆ _phaseSpaceIntegral

double DalitzPhaseSpaceBox::_phaseSpaceIntegral
private

Definition at line 25 of file DalitzPhaseSpaceBox.h.

◆ _rnd

TRandom* DalitzPhaseSpaceBox::_rnd
private

Definition at line 22 of file DalitzPhaseSpaceBox.h.

◆ _weight

double DalitzPhaseSpaceBox::_weight
private

Definition at line 24 of file DalitzPhaseSpaceBox.h.


The documentation for this class was generated from the following files: