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

#include <singleTopHatShape.h>

Inheritance diagram for singleTopHatShape:
ILineshape MINT::FitParDependent MINT::IFitParDependent MINT::IFitParRegister MINT::PolymorphVector< FitParRef > MINT::IFitParDependent

Public Member Functions

 singleTopHatShape (const AssociatedDecayTree &decay, double mini, double maxi, const std::string &namePrefix="")
 
 singleTopHatShape (const singleTopHatShape &other)
 
virtual std::complex< double > getVal (IDalitzEvent &evt)
 
virtual std::complex< double > getValue (IDalitzEvent &evt) const
 
virtual DalitzCoordinate getDalitzCoordinate (double nSigma=3) const
 
virtual void print (IDalitzEvent &evt, std::ostream &out=std::cout) const
 
virtual void print (std::ostream &out=std::cout) const
 
virtual std::string name () const
 
virtual MINT::counted_ptr< IGenFctgeneratingFunction () const
 
virtual ~singleTopHatShape ()
 
- Public Member Functions inherited from ILineshape
virtual ~ILineshape ()
 
- Public Member Functions inherited from MINT::FitParDependent
virtual unsigned int size () const
 
virtual const FitParRefoperator[] (unsigned int i) const
 
virtual FitParRefoperator[] (unsigned int i)
 
virtual bool changedSinceLastCall () const
 
virtual void rememberFitParValues ()
 
virtual bool registerFitParDependence (const IFitParDependent &fpd)
 
bool registerFitParDependence (const FitParRef &fpr)
 
void removeAllFitParDependencies ()
 
 FitParDependent (IFitParRegister *daddy=0)
 
 FitParDependent (const FitParDependent &other, IFitParRegister *newDaddy=0)
 
void listFitParDependencies (std::ostream &os=std::cout) const
 
- Public Member Functions inherited from MINT::PolymorphVector< FitParRef >
 PolymorphVector ()
 
 PolymorphVector (unsigned int N)
 
 PolymorphVector (unsigned int N, const FitParRef &c)
 
 PolymorphVector (const PolymorphVector &other)
 
 PolymorphVector (const typename std::vector< FitParRef > &other)
 
virtual ~PolymorphVector ()
 
std::vector< FitParRef > & theVector ()
 
const std::vector< FitParRef > & theVector () const
 
FitParRefoperator[] (unsigned int i)
 
const FitParRefoperator[] (unsigned int i) const
 
FitParRefat (unsigned int i)
 
const FitParRefat (unsigned int i) const
 
std::vector< FitParRef >::iterator begin ()
 
std::vector< FitParRef >::const_iterator begin () const
 
std::vector< FitParRef >::iterator end ()
 
std::vector< FitParRef >::const_iterator end () const
 
std::vector< FitParRef >::iterator find (const FitParRef &c)
 
std::vector< FitParRef >::const_iterator find (const FitParRef &c) const
 
FitParReffront ()
 
const FitParReffront () const
 
FitParRefback ()
 
const FitParRefback () const
 
unsigned int size () const
 
bool empty () const
 
void push_back (const FitParRef &c)
 
void pop_back ()
 
void erase (typename std::vector< FitParRef >::iterator pos)
 
void erase (typename std::vector< FitParRef >::iterator first, typename std::vector< FitParRef >::iterator last)
 
PolymorphVector< FitParRef > & operator= (const PolymorphVector< FitParRef > &other)
 
void clear ()
 
void resize (unsigned int N)
 
void resize (unsigned int N, const FitParRef &c)
 
 operator const typename std::vector< FitParRef > & () const
 
 operator typename std::vector< FitParRef > & ()
 
bool operator== (const MINT::PolymorphVector< FitParRef > &v2) const
 
bool operator!= (const MINT::PolymorphVector< FitParRef > &v2) const
 
bool operator< (const MINT::PolymorphVector< FitParRef > &v2) const
 
bool operator> (const MINT::PolymorphVector< FitParRef > &v2) const
 

Protected Member Functions

double min () const
 
double max () const
 
bool startOfDecayChain () const
 
double mumsRecoMass2 (IDalitzEvent &evt) const
 
const std::string & prefix () const
 

Protected Attributes

const AssociatedDecayTree_theDecay
 
double _min_sij
 
double _max_sij
 
std::string _prefix
 
- Protected Attributes inherited from MINT::PolymorphVector< FitParRef >
std::vector< FitParRef_vec
 

Private Member Functions

void makeGeneratingFunction () const
 

Private Attributes

MINT::counted_ptr< IGenFct_genFct
 

Detailed Description

Definition at line 20 of file singleTopHatShape.h.

Constructor & Destructor Documentation

◆ singleTopHatShape() [1/2]

singleTopHatShape::singleTopHatShape ( const AssociatedDecayTree decay,
double  mini,
double  maxi,
const std::string &  namePrefix = "" 
)

Definition at line 10 of file singleTopHatShape.cpp.

13  : _genFct(0)
14  , _theDecay(decay)
15  , _min_sij(mini)
16  , _max_sij(maxi)
17  , _prefix(namePrefix)
18 {
19  if(_theDecay.nDgtr() > 2 && ! (startOfDecayChain())){
20  std::cout << "WARNING: singleTopHatShape can only properly handle"
21  << "\n > two body decays."
22  << "\n > This: " << _theDecay.oneLiner()
23  << "\n > is a " << _theDecay.nDgtr() << " body decay."
24  << "\n > Please improve me."
25  << std::endl;
26  std::cout << " startOfDecayChain()? " << startOfDecayChain()
27  << std::endl;
28  }
29 }
const AssociatedDecayTree & _theDecay
MINT::counted_ptr< IGenFct > _genFct
int nDgtr() const
Definition: DDTree.h:96
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375
bool startOfDecayChain() const

◆ singleTopHatShape() [2/2]

singleTopHatShape::singleTopHatShape ( const singleTopHatShape other)

Definition at line 30 of file singleTopHatShape.cpp.

31  : ILineshape()
32  , FitParDependent(other)
33  , _genFct(other._genFct)
34  , _theDecay(other._theDecay)
35  , _min_sij(other._min_sij)
36  , _max_sij(other._max_sij)
37  , _prefix(other._prefix)
38 {
39 }
FitParDependent(IFitParRegister *daddy=0)
const AssociatedDecayTree & _theDecay
MINT::counted_ptr< IGenFct > _genFct

◆ ~singleTopHatShape()

virtual singleTopHatShape::~singleTopHatShape ( )
inlinevirtual

Definition at line 53 of file singleTopHatShape.h.

53 {};

Member Function Documentation

◆ generatingFunction()

counted_ptr< IGenFct > singleTopHatShape::generatingFunction ( ) const
virtual

Implements ILineshape.

Definition at line 80 of file singleTopHatShape.cpp.

80  {
81  if(! _genFct){
83  }
84  return _genFct;
85 }
void makeGeneratingFunction() const
MINT::counted_ptr< IGenFct > _genFct

◆ getDalitzCoordinate()

DalitzCoordinate singleTopHatShape::getDalitzCoordinate ( double  nSigma = 3) const
virtual

Implements ILineshape.

Definition at line 41 of file singleTopHatShape.cpp.

41  {
43  coord.setMinMax(_min_sij, _max_sij);
44  return coord;
45 }
const AssociatedDecayTree & _theDecay
const ValueType & getVal() const
Definition: DDTree.h:102
const std::vector< int > & asi() const
void setMinMax(double min, double max)

◆ getVal()

std::complex< double > singleTopHatShape::getVal ( IDalitzEvent evt)
virtual

Implements ILineshape.

Definition at line 65 of file singleTopHatShape.cpp.

65  {
66  return getValue(evt);
67 }
virtual std::complex< double > getValue(IDalitzEvent &evt) const

◆ getValue()

std::complex< double > singleTopHatShape::getValue ( IDalitzEvent evt) const
virtual

Definition at line 60 of file singleTopHatShape.cpp.

60  {
61  double m = mumsRecoMass2(evt);
62  if(m >= min() && m < max()) return 1;
63  else return 0;
64 }
double max() const
static const double m
double mumsRecoMass2(IDalitzEvent &evt) const
double min() const

◆ makeGeneratingFunction()

void singleTopHatShape::makeGeneratingFunction ( ) const
private

Definition at line 70 of file singleTopHatShape.cpp.

70  {
71  if(! _genFct){
73  fptr->setBoxLimits(min(), max());
74  fptr->setLimits(min(), max());
75 
77  }
78 }
virtual DalitzCoordinate getDalitzCoordinate(double nSigma=3) const
double max() const
MINT::counted_ptr< IGenFct > _genFct
double min() const

◆ max()

double singleTopHatShape::max ( ) const
inlineprotected

Definition at line 30 of file singleTopHatShape.h.

30 {return _max_sij;}

◆ min()

double singleTopHatShape::min ( ) const
inlineprotected

Definition at line 29 of file singleTopHatShape.h.

29 {return _min_sij;}

◆ mumsRecoMass2()

double singleTopHatShape::mumsRecoMass2 ( IDalitzEvent evt) const
protected

Definition at line 47 of file singleTopHatShape.cpp.

47  {
48  std::vector<int> asi = _theDecay.getVal().asi();
49  if(asi.size() < 2){
50  cout << "ERROR in singleTopHatShape::mumsRecoMass2() "
52  << ", " << _theDecay.getVal().name()
53  << " decays into " << asi.size() << " particles?\n"
54  << _theDecay
55  << endl;
56  }
57  double mumsRM = evt.sij(asi);
58  return mumsRM;
59 }
const AssociatedDecayTree & _theDecay
virtual double sij(const MINT::PolymorphVector< int > &indices) const =0
const ValueType & getVal() const
Definition: DDTree.h:102
std::string name() const
const std::vector< int > & asi() const

◆ name()

std::string singleTopHatShape::name ( ) const
virtual

Implements ILineshape.

Definition at line 87 of file singleTopHatShape.cpp.

87  {
88  std::stringstream strm;
89  strm << "singleTopHatShape["
90  << min() << "," << max() << "]("
91  << prefix()
92  << _theDecay.oneLiner() << ")";
93  std::string ing;
94  strm >> ing;
95  return ing;
96 }
const std::string & prefix() const
double max() const
const AssociatedDecayTree & _theDecay
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375
double min() const

◆ prefix()

const std::string& singleTopHatShape::prefix ( ) const
inlineprotected

Definition at line 36 of file singleTopHatShape.h.

36 {return _prefix;}

◆ print() [1/2]

void singleTopHatShape::print ( IDalitzEvent evt,
std::ostream &  out = std::cout 
) const
virtual

Definition at line 98 of file singleTopHatShape.cpp.

98  {
99  out << name()
100  << "\n\t> co-ordinate: " << getDalitzCoordinate()
101  << "\n\t> min, max sij: " << min() << ", " << max()
102  << "\n\t> sij: " << mumsRecoMass2(evt)
103  << "\n\t> This is the decay I'm looking at:"
104  << "\n" << prefix() << ", " << _theDecay
105  << " startOfDecayChain? " << startOfDecayChain()
106  << ", getValue " << getValue(evt);
107 }
const std::string & prefix() const
virtual DalitzCoordinate getDalitzCoordinate(double nSigma=3) const
double max() const
virtual std::string name() const
virtual std::complex< double > getValue(IDalitzEvent &evt) const
const AssociatedDecayTree & _theDecay
double mumsRecoMass2(IDalitzEvent &evt) const
bool startOfDecayChain() const
double min() const

◆ print() [2/2]

void singleTopHatShape::print ( std::ostream &  out = std::cout) const
virtual

Implements ILineshape.

Definition at line 108 of file singleTopHatShape.cpp.

108  {
109  out << name()
110  << "\n\t> co-ordinate: " << getDalitzCoordinate()
111  << "\n\t> min, max sij: " << min() << ", " << max()
112  << "\n\t> This is the decay I'm looking at:"
113  << "\n" << prefix() << ", "<< _theDecay
114  << " startOfDecayChain? " << startOfDecayChain();
115 }
const std::string & prefix() const
virtual DalitzCoordinate getDalitzCoordinate(double nSigma=3) const
double max() const
virtual std::string name() const
const AssociatedDecayTree & _theDecay
bool startOfDecayChain() const
double min() const

◆ startOfDecayChain()

bool singleTopHatShape::startOfDecayChain ( ) const
inlineprotected

Definition at line 32 of file singleTopHatShape.h.

32 {return !(_theDecay.hasParent());}
const AssociatedDecayTree & _theDecay
bool hasParent() const
Definition: DDTree.h:154

Member Data Documentation

◆ _genFct

MINT::counted_ptr<IGenFct> singleTopHatShape::_genFct
mutableprivate

Definition at line 22 of file singleTopHatShape.h.

◆ _max_sij

double singleTopHatShape::_max_sij
protected

Definition at line 27 of file singleTopHatShape.h.

◆ _min_sij

double singleTopHatShape::_min_sij
protected

Definition at line 27 of file singleTopHatShape.h.

◆ _prefix

std::string singleTopHatShape::_prefix
protected

Definition at line 35 of file singleTopHatShape.h.

◆ _theDecay

const AssociatedDecayTree& singleTopHatShape::_theDecay
protected

Definition at line 26 of file singleTopHatShape.h.


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