MINT2
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
FitAmplitude Class Reference

#include <FitAmplitude.h>

Inheritance diagram for FitAmplitude:
MINT::IReturnRealForEvent< IDalitzEvent > MINT::IReturnComplexForEvent< IDalitzEvent > MINT::FitParDependent MINT::IFitParRegister MINT::PolymorphVector< FitParRef > MINT::IFitParDependent

Public Member Functions

 FitAmplitude (const std::string &yourOwnNameWithoutPrefix, const AmpInitialiser &treeWithOpts, const char *fname=0, MINT::MinuitParameterSet *pset=0)
 
 FitAmplitude (const std::string &yourOwnNameWithoutPrefix, const AmpInitialiser &treeWithOpts, MINT::MinuitParameterSet *pset)
 
 FitAmplitude (const AmpInitialiser &treeWithOpts, const char *fname=0, MINT::MinuitParameterSet *pset=0)
 
 FitAmplitude (const AmpInitialiser &treeWithOpts, MINT::MinuitParameterSet *pset)
 
 FitAmplitude (const std::string &StandardisedDecayTreeName, const std::string &prefix="", const std::string &linshapePrefix="", const char *fname=0, MINT::MinuitParameterSet *pset=0)
 
 FitAmplitude (const std::string &StandardisedDecayTreeName, const std::string &prefix, const std::string &linshapePrefix, MINT::MinuitParameterSet *pset)
 
bool isZero () const
 
bool isConstant () const
 
bool canBeIgnored () const
 
bool CPConjugateSameFitParameters ()
 
FitAmplitude GetCPConjugateSameFitParameters () const
 
bool CConjugateFinalStateSameFitParameters ()
 
FitAmplitude GetCConjugateFinalStateSameFitParameters () const
 
bool CConjugateInitialStateSameFitParameters ()
 
FitAmplitude GetCConjugateInitialStateSameFitParameters () const
 
bool setLSameFitParameters (int L)
 
FitAmplitude GetDifferentLSameFitParameters (int L) const
 
FitAmplitude GetCopySameFitParameters () const
 
void setFraction (double fr)
 
double getFraction () const
 
void setTag (int tag)
 
double getTag () const
 
std::complex< double > preFactors () const
 
const MINT::ComplexProductForEvent< IDalitzEvent > & eventDependentPrefactors () const
 
MINT::ComplexProductForEvent< IDalitzEvent > & eventDependentPrefactors ()
 
MINT::FitComplexFitAmpPhase ()
 
const MINT::FitComplexFitAmpPhase () const
 
std::complex< double > AmpPhase () const
 
Amplitudeamp ()
 
const Amplitudeamp () const
 
DecayTree theBareDecay () const
 
DalitzEventPattern getTreePattern () const
 
DalitzBoxSet MakeBoxes (const DalitzEventPattern &pat, double nSigma=3)
 
DalitzBWBoxSet MakeBWBoxes (const DalitzEventPattern &pat, TRandom *rnd=gRandom)
 
virtual double boxFactor ()
 
virtual std::complex< double > getVal (IDalitzEvent &evt)
 
virtual std::complex< double > getVal (IDalitzEvent *evt)
 
virtual std::complex< double > getValWithoutFitParameters (IDalitzEvent &evt)
 
virtual std::complex< double > getNewOnePermutationsVal (IDalitzEvent &evt)
 
double Prob (IDalitzEvent &evt)
 
virtual std::complex< double > ComplexVal (IDalitzEvent &evt)
 
virtual double RealVal (IDalitzEvent &evt)
 
std::string name () const
 
void multiply (double r)
 
void multiply (const std::complex< double > &z)
 
void multiply (const MINT::counted_ptr< MINT::IComplexFitParDependent > &irc)
 
void multiply (const MINT::counted_ptr< MINT::IReturnComplex > &irc)
 
void multiply (const MINT::counted_ptr< MINT::IReturnComplexForEvent< IDalitzEvent > > &irce)
 
void multiply (const MINT::counted_ptr< MINT::IComplexForEventFitParDependent< IDalitzEvent > > &irce)
 
FitAmplitudeoperator *= (double r)
 
FitAmplitudeoperator *= (const std::complex< double > &z)
 
FitAmplitudeoperator *= (const MINT::counted_ptr< MINT::IComplexFitParDependent > &irc)
 
FitAmplitudeoperator *= (const MINT::counted_ptr< MINT::IReturnComplex > &irc)
 
FitAmplitudeoperator *= (const MINT::counted_ptr< MINT::IReturnComplexForEvent< IDalitzEvent > > &irce)
 
FitAmplitudeoperator *= (const MINT::counted_ptr< MINT::IComplexForEventFitParDependent< IDalitzEvent > > &irce)
 
void print (std::ostream &os=std::cout) const
 
 ~FitAmplitude ()
 
- Public Member Functions inherited from MINT::IReturnRealForEvent< IDalitzEvent >
virtual ~IReturnRealForEvent ()
 
- Public Member Functions inherited from MINT::IReturnComplexForEvent< IDalitzEvent >
virtual ~IReturnComplexForEvent ()
 
- 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
 

Static Public Member Functions

static void AutogenerateFitFile (const std::string &fname="protoFitAmplitudeFile.txt", const DalitzEventPattern &pat=DalitzEventPattern::NoPattern)
 

Protected Member Functions

 FitAmplitude (const FitAmplitude &other, IFitParRegister *newDaddy=0)
 
- Protected Member Functions inherited from MINT::IReturnRealForEvent< IDalitzEvent >
 IReturnRealForEvent ()
 
- Protected Member Functions inherited from MINT::IReturnComplexForEvent< IDalitzEvent >
 IReturnComplexForEvent ()
 

Static Protected Member Functions

static std::string longestNameInList ()
 

Protected Attributes

Amplitude _amp
 
MINT::counted_ptr< MINT::FitComplex_FitAmpPhase
 
MINT::NamedParameter< double > _fitFraction
 
MINT::ComplexProduct _preFactors
 
MINT::ComplexProductForEvent< IDalitzEvent_evt_dep_preFactors
 
std::string _name
 
int _tag
 
- Protected Attributes inherited from MINT::PolymorphVector< FitParRef >
std::vector< FitParRef_vec
 

Friends

class FitAmpList
 
class FitAmpListBase
 

Detailed Description

Definition at line 29 of file FitAmplitude.h.

Constructor & Destructor Documentation

◆ FitAmplitude() [1/7]

FitAmplitude::FitAmplitude ( const FitAmplitude other,
IFitParRegister *  newDaddy = 0 
)
protected

◆ FitAmplitude() [2/7]

FitAmplitude::FitAmplitude ( const std::string &  yourOwnNameWithoutPrefix,
const AmpInitialiser treeWithOpts,
const char *  fname = 0,
MINT::MinuitParameterSet pset = 0 
)

Definition at line 89 of file FitAmplitude.cpp.

95  : _amp(treeWithOpts, this)
96  , _FitAmpPhase(FitComplexMaker(treeWithOpts.prefix() + yourOwnNameWithoutPrefix, fname, pset, this
97  , FitParameter::HIDE
98  , NamedParameterBase::QUIET
99  ))
100  , _fitFraction(treeWithOpts.prefix() + yourOwnNameWithoutPrefix + "_Frac", (double) 0, fname
101  , NamedParameterBase::QUIET)
102  , _preFactors(1)
103  , _name(treeWithOpts.prefix() + yourOwnNameWithoutPrefix)
104  , _tag(0)
105 {
106  // if(useStringAs == FitAmplitude::PREFIX){
107  // _name += treeWithOpts.uniqueName();
108  // }
109  //cout << "pset pointer in FitAmplitude " << pset << endl;
110 }
Amplitude _amp
Definition: FitAmplitude.h:38
MINT::counted_ptr< MINT::FitComplex > _FitAmpPhase
Definition: FitAmplitude.h:39
MINT::ComplexProduct _preFactors
Definition: FitAmplitude.h:41
std::string _name
Definition: FitAmplitude.h:44
MINT::NamedParameter< double > _fitFraction
Definition: FitAmplitude.h:40
counted_ptr< FitComplex > FitComplexMaker(const std::string &name, const char *fname=0, MinuitParameterSet *pset=0, MINT::IFitParRegister *daddy=0, FitParameter::FIX_OR_WHAT fow=FitParameter::FIX, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
Definition: FitComplex.cpp:17
const std::string & prefix() const

◆ FitAmplitude() [3/7]

FitAmplitude::FitAmplitude ( const std::string &  yourOwnNameWithoutPrefix,
const AmpInitialiser treeWithOpts,
MINT::MinuitParameterSet pset 
)

Definition at line 112 of file FitAmplitude.cpp.

117  : _amp(treeWithOpts, this)
118  , _FitAmpPhase(FitComplexMaker(treeWithOpts.prefix() + yourOwnNameWithoutPrefix, (char*) 0, pset, this
119  , FitParameter::HIDE
120  , NamedParameterBase::QUIET
121  ))
122  , _fitFraction(treeWithOpts.prefix() + yourOwnNameWithoutPrefix + "_Frac", (double) 0, (char*) 0
123  , NamedParameterBase::QUIET)
124  , _preFactors(1)
125  , _name(treeWithOpts.prefix() + yourOwnNameWithoutPrefix)
126  , _tag(0)
127 {
128  // if(useStringAs == FitAmplitude::PREFIX){
129  // _name += treeWithOpts.uniqueName();
130  //}
131 }
Amplitude _amp
Definition: FitAmplitude.h:38
MINT::counted_ptr< MINT::FitComplex > _FitAmpPhase
Definition: FitAmplitude.h:39
MINT::ComplexProduct _preFactors
Definition: FitAmplitude.h:41
std::string _name
Definition: FitAmplitude.h:44
MINT::NamedParameter< double > _fitFraction
Definition: FitAmplitude.h:40
counted_ptr< FitComplex > FitComplexMaker(const std::string &name, const char *fname=0, MinuitParameterSet *pset=0, MINT::IFitParRegister *daddy=0, FitParameter::FIX_OR_WHAT fow=FitParameter::FIX, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
Definition: FitComplex.cpp:17
const std::string & prefix() const

◆ FitAmplitude() [4/7]

FitAmplitude::FitAmplitude ( const AmpInitialiser treeWithOpts,
const char *  fname = 0,
MINT::MinuitParameterSet pset = 0 
)

Definition at line 133 of file FitAmplitude.cpp.

137  : _amp(treeWithOpts, this)
138  , _FitAmpPhase(FitComplexMaker(treeWithOpts.uniqueName(), fname, pset, this
139  , FitParameter::HIDE
140  , NamedParameterBase::QUIET
141  ))
142  , _fitFraction(treeWithOpts.uniqueName() + "_Frac", (double) 0, fname
143  , NamedParameterBase::QUIET)
144  , _preFactors(1)
145  , _name(treeWithOpts.uniqueName())
146  , _tag(0)
147 {
148 }
Amplitude _amp
Definition: FitAmplitude.h:38
std::string uniqueName() const
MINT::counted_ptr< MINT::FitComplex > _FitAmpPhase
Definition: FitAmplitude.h:39
MINT::ComplexProduct _preFactors
Definition: FitAmplitude.h:41
std::string _name
Definition: FitAmplitude.h:44
MINT::NamedParameter< double > _fitFraction
Definition: FitAmplitude.h:40
counted_ptr< FitComplex > FitComplexMaker(const std::string &name, const char *fname=0, MinuitParameterSet *pset=0, MINT::IFitParRegister *daddy=0, FitParameter::FIX_OR_WHAT fow=FitParameter::FIX, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
Definition: FitComplex.cpp:17

◆ FitAmplitude() [5/7]

FitAmplitude::FitAmplitude ( const AmpInitialiser treeWithOpts,
MINT::MinuitParameterSet pset 
)

Definition at line 150 of file FitAmplitude.cpp.

153  : _amp(treeWithOpts, this)
154  ,_FitAmpPhase(FitComplexMaker(treeWithOpts.uniqueName(), (char*) 0, pset, this
155  , FitParameter::HIDE
156  , NamedParameterBase::QUIET
157  ))
158  , _fitFraction(treeWithOpts.uniqueName() + "_Frac", (double) 0
159  , NamedParameterBase::QUIET)
160  , _preFactors(1)
161  , _name(treeWithOpts.uniqueName())
162  , _tag(0)
163 {
164 }
Amplitude _amp
Definition: FitAmplitude.h:38
std::string uniqueName() const
MINT::counted_ptr< MINT::FitComplex > _FitAmpPhase
Definition: FitAmplitude.h:39
MINT::ComplexProduct _preFactors
Definition: FitAmplitude.h:41
std::string _name
Definition: FitAmplitude.h:44
MINT::NamedParameter< double > _fitFraction
Definition: FitAmplitude.h:40
counted_ptr< FitComplex > FitComplexMaker(const std::string &name, const char *fname=0, MinuitParameterSet *pset=0, MINT::IFitParRegister *daddy=0, FitParameter::FIX_OR_WHAT fow=FitParameter::FIX, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
Definition: FitComplex.cpp:17

◆ FitAmplitude() [6/7]

FitAmplitude::FitAmplitude ( const std::string &  StandardisedDecayTreeName,
const std::string &  prefix = "",
const std::string &  linshapePrefix = "",
const char *  fname = 0,
MINT::MinuitParameterSet pset = 0 
)

Definition at line 166 of file FitAmplitude.cpp.

172  : _amp(AmpInitialiser(StandardisedDecayTreeName, prefix, lineshapePrefix), this)
173  , _FitAmpPhase(FitComplexMaker(prefix+StandardisedDecayTreeName, fname, pset, this
174  , FitParameter::HIDE
175  , NamedParameterBase::QUIET
176  ))
177  , _fitFraction(prefix+StandardisedDecayTreeName + "_Frac", (double) 0
178  , NamedParameterBase::QUIET)
179  , _preFactors(1)
180  , _name(prefix+StandardisedDecayTreeName)
181  , _tag(0)
182 {
183 
184 }
Amplitude _amp
Definition: FitAmplitude.h:38
MINT::counted_ptr< MINT::FitComplex > _FitAmpPhase
Definition: FitAmplitude.h:39
MINT::ComplexProduct _preFactors
Definition: FitAmplitude.h:41
std::string _name
Definition: FitAmplitude.h:44
MINT::NamedParameter< double > _fitFraction
Definition: FitAmplitude.h:40
counted_ptr< FitComplex > FitComplexMaker(const std::string &name, const char *fname=0, MinuitParameterSet *pset=0, MINT::IFitParRegister *daddy=0, FitParameter::FIX_OR_WHAT fow=FitParameter::FIX, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
Definition: FitComplex.cpp:17

◆ FitAmplitude() [7/7]

FitAmplitude::FitAmplitude ( const std::string &  StandardisedDecayTreeName,
const std::string &  prefix,
const std::string &  linshapePrefix,
MINT::MinuitParameterSet pset 
)

Definition at line 186 of file FitAmplitude.cpp.

191  : _amp(AmpInitialiser(StandardisedDecayTreeName, prefix, lineshapePrefix), this)
192  , _FitAmpPhase(FitComplexMaker(prefix+StandardisedDecayTreeName, (char*) 0, pset, this
193  , FitParameter::HIDE
194  , NamedParameterBase::QUIET
195  ))
196  , _fitFraction(prefix+StandardisedDecayTreeName + "_Frac", (double) 0
197  , NamedParameterBase::QUIET)
198  , _preFactors(1)
199  , _name(prefix+StandardisedDecayTreeName)
200  , _tag(0)
201 {
202 
203 }
Amplitude _amp
Definition: FitAmplitude.h:38
MINT::counted_ptr< MINT::FitComplex > _FitAmpPhase
Definition: FitAmplitude.h:39
MINT::ComplexProduct _preFactors
Definition: FitAmplitude.h:41
std::string _name
Definition: FitAmplitude.h:44
MINT::NamedParameter< double > _fitFraction
Definition: FitAmplitude.h:40
counted_ptr< FitComplex > FitComplexMaker(const std::string &name, const char *fname=0, MinuitParameterSet *pset=0, MINT::IFitParRegister *daddy=0, FitParameter::FIX_OR_WHAT fow=FitParameter::FIX, NamedParameterBase::VERBOSITY vb=NamedParameterBase::VERBOSE)
Definition: FitComplex.cpp:17

◆ ~FitAmplitude()

FitAmplitude::~FitAmplitude ( )

Definition at line 227 of file FitAmplitude.cpp.

227  {
228 
229 }

Member Function Documentation

◆ amp() [1/2]

Amplitude& FitAmplitude::amp ( )
inline

Definition at line 163 of file FitAmplitude.h.

163 {return _amp;}
Amplitude _amp
Definition: FitAmplitude.h:38

◆ amp() [2/2]

const Amplitude& FitAmplitude::amp ( ) const
inline

Definition at line 164 of file FitAmplitude.h.

164 {return _amp;}
Amplitude _amp
Definition: FitAmplitude.h:38

◆ AmpPhase()

std::complex<double> FitAmplitude::AmpPhase ( ) const
inline

Definition at line 153 of file FitAmplitude.h.

153  {
154  if(isZero()) return 0;
155  return FitAmpPhase() * preFactors();
156  }
bool isZero() const
Definition: FitAmplitude.h:98
MINT::FitComplex & FitAmpPhase()
Definition: FitAmplitude.h:147
std::complex< double > preFactors() const
Definition: FitAmplitude.h:137

◆ AutogenerateFitFile()

void FitAmplitude::AutogenerateFitFile ( const std::string &  fname = "protoFitAmplitudeFile.txt",
const DalitzEventPattern pat = DalitzEventPattern::NoPattern 
)
static

Definition at line 50 of file FitAmplitude.cpp.

50  {
51 
52  ofstream os(fname.c_str());
53  if(! os) return;
54 
56  int nameFieldWidth = longestNameInList().size() +3;
57 
58  FitParameter::printFormat(os, nameFieldWidth);
59 
60  AmpInitPairList printList;
61  for(AmpInitMap::const_iterator it= ndl->trees().begin();
62  it != ndl->trees().end();
63  it++){
64  if(compatiblePattern == DalitzEventPattern::NoPattern ||
65  compatiblePattern.compatibleWithFinalState(it->second))
66  printList.push_back(*it);
67  }
68  AmpInitPairLessThan printSorter;
69  sort(printList.begin(), printList.end(), printSorter);
70 
71  for(AmpInitPairList::const_iterator it= printList.begin();
72  it != printList.end();
73  it++){
74  std::string s;
75  os << "*" <<endl;
76 
77  s = "\"" + FitComplexPolar::makeAmpName(it->first) + "\"";
78  s.resize(nameFieldWidth, ' ');
79  os << s << "\t" << FitParameter::getInitString() << endl;
80 
81  s = "\"" + FitComplexPolar::makePhaseName(it->first) + "\"";
82  s.resize(nameFieldWidth, ' ');
83  os << s << "\t" << FitParameter::getInitString() << endl;
84  }
85  os << "*" << endl;
86  os.close();
87 }
bool compatibleWithFinalState(const AmpInitialiser &ampInitContainsTree) const
static const double s
std::vector< AmpInitPair > AmpInitPairList
static const DalitzEventPattern NoPattern
static NamedDecayTreeList * getMe(const std::string &printopt="printNever")
static std::string longestNameInList()
const AmpInitMap & trees(const std::string &opt="ALL") const

◆ boxFactor()

virtual double FitAmplitude::boxFactor ( )
inlinevirtual

Definition at line 185 of file FitAmplitude.h.

185  {
186 /* std::cout << "boxFacror in FitAmplitude " << this->theDecay().oneLiner() << " = " */
187 /* << "norm(" << AmpPhase() << ") * " << Amplitude::boxFactor() */
188 /* << " = " << norm(AmpPhase()) * Amplitude::boxFactor() << std::endl; */
189  return norm(AmpPhase()) * amp().boxFactor();
190  }
std::complex< double > AmpPhase() const
Definition: FitAmplitude.h:153
virtual double boxFactor()
Definition: Amplitude.h:68
Amplitude & amp()
Definition: FitAmplitude.h:163

◆ canBeIgnored()

bool FitAmplitude::canBeIgnored ( ) const

Definition at line 242 of file FitAmplitude.cpp.

242  {
243  return isZero() && isConstant();
244 }
bool isConstant() const
bool isZero() const
Definition: FitAmplitude.h:98

◆ CConjugateFinalStateSameFitParameters()

bool FitAmplitude::CConjugateFinalStateSameFitParameters ( )

Definition at line 256 of file FitAmplitude.cpp.

256  {
257  _name += "_CconFs";
258  MINT::NamedParameter<double> fitFrac(_name + "_Frac", (double) 0, NamedParameterBase::QUIET);
259  _fitFraction = fitFrac;
260  return amp().CConjugateFinalState();
261 }
bool CConjugateFinalState()
Definition: Amplitude.cpp:129
std::string _name
Definition: FitAmplitude.h:44
MINT::NamedParameter< double > _fitFraction
Definition: FitAmplitude.h:40
Amplitude & amp()
Definition: FitAmplitude.h:163

◆ CConjugateInitialStateSameFitParameters()

bool FitAmplitude::CConjugateInitialStateSameFitParameters ( )

Definition at line 269 of file FitAmplitude.cpp.

269  {
270  _name += "_CconIs";
271  MINT::NamedParameter<double> fitFrac(_name + "_Frac", (double) 0, NamedParameterBase::QUIET);
272  _fitFraction = fitFrac;
273  return amp().CConjugateInitialState();
274 }
std::string _name
Definition: FitAmplitude.h:44
MINT::NamedParameter< double > _fitFraction
Definition: FitAmplitude.h:40
Amplitude & amp()
Definition: FitAmplitude.h:163
bool CConjugateInitialState()
Definition: Amplitude.cpp:136

◆ ComplexVal()

virtual std::complex<double> FitAmplitude::ComplexVal ( IDalitzEvent evt)
inlinevirtual

Implements MINT::IReturnComplexForEvent< IDalitzEvent >.

Definition at line 209 of file FitAmplitude.h.

209 { return getVal(evt); }
virtual std::complex< double > getVal(IDalitzEvent &evt)

◆ CPConjugateSameFitParameters()

bool FitAmplitude::CPConjugateSameFitParameters ( )

Definition at line 245 of file FitAmplitude.cpp.

245  {
246  _name += "_CPcon";
247  return amp().CPConjugate();
248 }
bool CPConjugate()
Definition: Amplitude.cpp:123
std::string _name
Definition: FitAmplitude.h:44
Amplitude & amp()
Definition: FitAmplitude.h:163

◆ eventDependentPrefactors() [1/2]

const MINT::ComplexProductForEvent<IDalitzEvent>& FitAmplitude::eventDependentPrefactors ( ) const
inline

Definition at line 140 of file FitAmplitude.h.

140  {
141  return _evt_dep_preFactors;
142  }
MINT::ComplexProductForEvent< IDalitzEvent > _evt_dep_preFactors
Definition: FitAmplitude.h:42

◆ eventDependentPrefactors() [2/2]

MINT::ComplexProductForEvent<IDalitzEvent>& FitAmplitude::eventDependentPrefactors ( )
inline

Definition at line 143 of file FitAmplitude.h.

143  {
144  return _evt_dep_preFactors;
145  }
MINT::ComplexProductForEvent< IDalitzEvent > _evt_dep_preFactors
Definition: FitAmplitude.h:42

◆ FitAmpPhase() [1/2]

MINT::FitComplex& FitAmplitude::FitAmpPhase ( )
inline

Definition at line 147 of file FitAmplitude.h.

147  {
148  return *_FitAmpPhase;}
MINT::counted_ptr< MINT::FitComplex > _FitAmpPhase
Definition: FitAmplitude.h:39

◆ FitAmpPhase() [2/2]

const MINT::FitComplex& FitAmplitude::FitAmpPhase ( ) const
inline

Definition at line 149 of file FitAmplitude.h.

149  {
150  return *_FitAmpPhase;}
MINT::counted_ptr< MINT::FitComplex > _FitAmpPhase
Definition: FitAmplitude.h:39

◆ GetCConjugateFinalStateSameFitParameters()

FitAmplitude FitAmplitude::GetCConjugateFinalStateSameFitParameters ( ) const

Definition at line 263 of file FitAmplitude.cpp.

263  {
264  FitAmplitude cp(*this);
265  cp.CConjugateFinalStateSameFitParameters();
266  return cp;
267 }

◆ GetCConjugateInitialStateSameFitParameters()

FitAmplitude FitAmplitude::GetCConjugateInitialStateSameFitParameters ( ) const

Definition at line 276 of file FitAmplitude.cpp.

276  {
277  FitAmplitude cp(*this);
278  cp.CConjugateInitialStateSameFitParameters();
279  return cp;
280 }

◆ GetCopySameFitParameters()

FitAmplitude FitAmplitude::GetCopySameFitParameters ( ) const
inline

Definition at line 115 of file FitAmplitude.h.

115  {
116  // just the copy constructor, but with a name that
117  // explains the behaviour.
118  return FitAmplitude(*this);
119  }
FitAmplitude(const FitAmplitude &other, IFitParRegister *newDaddy=0)

◆ GetCPConjugateSameFitParameters()

FitAmplitude FitAmplitude::GetCPConjugateSameFitParameters ( ) const

Definition at line 250 of file FitAmplitude.cpp.

250  {
251  FitAmplitude cp(*this);
252  cp.CPConjugateSameFitParameters();
253  return cp;
254 }

◆ GetDifferentLSameFitParameters()

FitAmplitude FitAmplitude::GetDifferentLSameFitParameters ( int  L) const

Definition at line 289 of file FitAmplitude.cpp.

289  {
290  FitAmplitude cp(*this);
291  cp.setLSameFitParameters(L);
292  return cp;
293 }

◆ getFraction()

double FitAmplitude::getFraction ( ) const
inline

Definition at line 124 of file FitAmplitude.h.

124  {
125  return (double) _fitFraction;
126  }
MINT::NamedParameter< double > _fitFraction
Definition: FitAmplitude.h:40

◆ getNewOnePermutationsVal()

std::complex< double > FitAmplitude::getNewOnePermutationsVal ( IDalitzEvent evt)
virtual

Definition at line 329 of file FitAmplitude.cpp.

329  {
330  complex<double> ap(AmpPhase());
331  return ap * amp().getOnePermutationsVal(evt);
332 }
std::complex< double > AmpPhase() const
Definition: FitAmplitude.h:153
std::complex< double > getOnePermutationsVal(IDalitzEvent &evt)
Definition: Amplitude.cpp:366
Amplitude & amp()
Definition: FitAmplitude.h:163

◆ getTag()

double FitAmplitude::getTag ( ) const
inline

Definition at line 132 of file FitAmplitude.h.

132  {
133  return (double) _tag;
134  }

◆ getTreePattern()

DalitzEventPattern FitAmplitude::getTreePattern ( ) const
inline

Definition at line 169 of file FitAmplitude.h.

169  {
170  return amp().getTreePattern();
171  }
DalitzEventPattern getTreePattern() const
Definition: Amplitude.h:161
Amplitude & amp()
Definition: FitAmplitude.h:163

◆ getVal() [1/2]

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

Definition at line 300 of file FitAmplitude.cpp.

300  {
301  //bool dbThis=false;
302  //if(isZero()) return 0;
303  complex<double> ap(AmpPhase());
304  /*
305  if(0.0 == ap) return 0;
306  if(dbThis){
307  cout << "FitAmplitude::getVal(evt) with name:\n"
308  << this->name()
309  << "\n and evt = \n"
310  << evt
311  << endl;
312  cout << " returning " << ap << " * "
313  << endl;
314  cout << " " << getValWithoutFitParameters(evt)
315  << "\n ----------------- "
316  << endl;
317  }
318  */
319  return ap * getValWithoutFitParameters(evt);
320 }
std::complex< double > AmpPhase() const
Definition: FitAmplitude.h:153
virtual std::complex< double > getValWithoutFitParameters(IDalitzEvent &evt)
Definition: FitAmplitude.h:196

◆ getVal() [2/2]

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

Definition at line 295 of file FitAmplitude.cpp.

295  {
296  if(0 == evt) return 0;
297  return getVal(*evt);
298 }
virtual std::complex< double > getVal(IDalitzEvent &evt)

◆ getValWithoutFitParameters()

virtual std::complex<double> FitAmplitude::getValWithoutFitParameters ( IDalitzEvent evt)
inlinevirtual

Definition at line 196 of file FitAmplitude.h.

196  {
197  return amp().getVal(evt);
198  }
virtual std::complex< double > getVal(IDalitzEvent &evt)
Definition: Amplitude.h:122
Amplitude & amp()
Definition: FitAmplitude.h:163

◆ isConstant()

bool FitAmplitude::isConstant ( ) const

Definition at line 238 of file FitAmplitude.cpp.

238  {
239  if(0 == _FitAmpPhase) return false;
240  return _FitAmpPhase->isConstant();
241 }
bool isConstant() const
Definition: FitComplex.cpp:68
MINT::counted_ptr< MINT::FitComplex > _FitAmpPhase
Definition: FitAmplitude.h:39

◆ isZero()

bool FitAmplitude::isZero ( ) const
inline

Definition at line 98 of file FitAmplitude.h.

98 { return FitAmpPhase().isZero();}
MINT::FitComplex & FitAmpPhase()
Definition: FitAmplitude.h:147
virtual bool isZero() const
Definition: FitComplex.cpp:72

◆ longestNameInList()

std::string FitAmplitude::longestNameInList ( )
staticprotected

Definition at line 40 of file FitAmplitude.cpp.

40  {
42  std::string longestName = ndl->getLongestName();
43 
44  std::string longA = FitComplexPolar::makeAmpName(longestName);
45  std::string longP = FitComplexPolar::makePhaseName(longestName);
46 
47  return (longA.size() > longP.size() ? longA : longP);
48 }
static NamedDecayTreeList * getMe(const std::string &printopt="printNever")
std::string getLongestName() const

◆ MakeBoxes()

DalitzBoxSet FitAmplitude::MakeBoxes ( const DalitzEventPattern pat,
double  nSigma = 3 
)
inline

Definition at line 172 of file FitAmplitude.h.

173  {
174  return amp().MakeBoxes(pat, nSigma);
175  }
virtual DalitzBoxSet MakeBoxes(const DalitzEventPattern &pat, double nSigma=3)
Definition: Amplitude.cpp:242
Amplitude & amp()
Definition: FitAmplitude.h:163

◆ MakeBWBoxes()

DalitzBWBoxSet FitAmplitude::MakeBWBoxes ( const DalitzEventPattern pat,
TRandom *  rnd = gRandom 
)
inline

Definition at line 176 of file FitAmplitude.h.

178  {
179  return amp().MakeBWBoxes(pat, rnd);
180  }
Amplitude & amp()
Definition: FitAmplitude.h:163
virtual DalitzBWBoxSet MakeBWBoxes(const DalitzEventPattern &pat, TRandom *rnd=gRandom)
Definition: Amplitude.cpp:300

◆ multiply() [1/6]

void FitAmplitude::multiply ( double  r)

Definition at line 335 of file FitAmplitude.cpp.

335  { // by value
336  _preFactors.addTerm(r);
337 }
MINT::ComplexProduct _preFactors
Definition: FitAmplitude.h:41
void addTerm(double val)

◆ multiply() [2/6]

void FitAmplitude::multiply ( const std::complex< double > &  z)

Definition at line 338 of file FitAmplitude.cpp.

338  { // by value
339  _preFactors.addTerm(z);
340 }
MINT::ComplexProduct _preFactors
Definition: FitAmplitude.h:41
void addTerm(double val)

◆ multiply() [3/6]

void FitAmplitude::multiply ( const MINT::counted_ptr< MINT::IComplexFitParDependent > &  irc)

Definition at line 341 of file FitAmplitude.cpp.

341  { // by ref
342  _preFactors.addTerm(irc);
343 }
MINT::ComplexProduct _preFactors
Definition: FitAmplitude.h:41
void addTerm(double val)

◆ multiply() [4/6]

void FitAmplitude::multiply ( const MINT::counted_ptr< MINT::IReturnComplex > &  irc)

Definition at line 344 of file FitAmplitude.cpp.

344  { // by ref
345  _preFactors.addTerm(irc);
346 }
MINT::ComplexProduct _preFactors
Definition: FitAmplitude.h:41
void addTerm(double val)

◆ multiply() [5/6]

void FitAmplitude::multiply ( const MINT::counted_ptr< MINT::IReturnComplexForEvent< IDalitzEvent > > &  irce)

Definition at line 350 of file FitAmplitude.cpp.

350  { // by ref
352 }
MINT::ComplexProductForEvent< IDalitzEvent > _evt_dep_preFactors
Definition: FitAmplitude.h:42

◆ multiply() [6/6]

void FitAmplitude::multiply ( const MINT::counted_ptr< MINT::IComplexForEventFitParDependent< IDalitzEvent > > &  irce)

Definition at line 347 of file FitAmplitude.cpp.

347  { // by ref
349 }
MINT::ComplexProductForEvent< IDalitzEvent > _evt_dep_preFactors
Definition: FitAmplitude.h:42

◆ name()

std::string FitAmplitude::name ( ) const
inline

Definition at line 213 of file FitAmplitude.h.

213  {
214  return _name;
215  }
std::string _name
Definition: FitAmplitude.h:44

◆ operator *=() [1/6]

FitAmplitude & FitAmplitude::operator *= ( double  r)

Definition at line 360 of file FitAmplitude.cpp.

360  {
361  multiply(r);
362  return *this;
363 }
void multiply(double r)

◆ operator *=() [2/6]

FitAmplitude& FitAmplitude::operator *= ( const std::complex< double > &  z)

◆ operator *=() [3/6]

FitAmplitude & FitAmplitude::operator *= ( const MINT::counted_ptr< MINT::IComplexFitParDependent > &  irc)

Definition at line 368 of file FitAmplitude.cpp.

368  {
369  multiply(irc);
370  return *this;
371 }
void multiply(double r)

◆ operator *=() [4/6]

FitAmplitude & FitAmplitude::operator *= ( const MINT::counted_ptr< MINT::IReturnComplex > &  irc)

Definition at line 372 of file FitAmplitude.cpp.

372  {
373  multiply(irc);
374  return *this;
375 }
void multiply(double r)

◆ operator *=() [5/6]

FitAmplitude & FitAmplitude::operator *= ( const MINT::counted_ptr< MINT::IReturnComplexForEvent< IDalitzEvent > > &  irce)

Definition at line 380 of file FitAmplitude.cpp.

380  {
381  multiply(irce);
382  return *this;
383 }
void multiply(double r)

◆ operator *=() [6/6]

FitAmplitude & FitAmplitude::operator *= ( const MINT::counted_ptr< MINT::IComplexForEventFitParDependent< IDalitzEvent > > &  irce)

Definition at line 376 of file FitAmplitude.cpp.

376  {
377  multiply(irce);
378  return *this;
379 }
void multiply(double r)

◆ preFactors()

std::complex<double> FitAmplitude::preFactors ( ) const
inline

Definition at line 137 of file FitAmplitude.h.

137  {
138  return _preFactors.ComplexVal();
139  }
std::complex< double > ComplexVal()
MINT::ComplexProduct _preFactors
Definition: FitAmplitude.h:41

◆ print()

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

Definition at line 354 of file FitAmplitude.cpp.

354  {
355  // os << "**FitAmlitude: " << name()
356  os << _fitFraction << "\n"
357  << FitAmpPhase();
358 }
MINT::FitComplex & FitAmpPhase()
Definition: FitAmplitude.h:147
MINT::NamedParameter< double > _fitFraction
Definition: FitAmplitude.h:40

◆ Prob()

double FitAmplitude::Prob ( IDalitzEvent evt)
inline

Definition at line 204 of file FitAmplitude.h.

204  {
205  std::complex<double> z = getVal(evt);
206  return z.real()*z.real() + z.imag()*z.imag();
207  }
virtual std::complex< double > getVal(IDalitzEvent &evt)

◆ RealVal()

virtual double FitAmplitude::RealVal ( IDalitzEvent evt)
inlinevirtual

Implements MINT::IReturnRealForEvent< IDalitzEvent >.

Definition at line 210 of file FitAmplitude.h.

210 { return Prob(evt); }
double Prob(IDalitzEvent &evt)
Definition: FitAmplitude.h:204

◆ setFraction()

void FitAmplitude::setFraction ( double  fr)
inline

Definition at line 121 of file FitAmplitude.h.

121  {
122  _fitFraction = fr;
123  }
MINT::NamedParameter< double > _fitFraction
Definition: FitAmplitude.h:40

◆ setLSameFitParameters()

bool FitAmplitude::setLSameFitParameters ( int  L)

Definition at line 282 of file FitAmplitude.cpp.

282  {
283  _name += ("_L_"+anythingToString(L)).c_str();
284  MINT::NamedParameter<double> fitFrac(_name + "_Frac", (double) 0, NamedParameterBase::QUIET);
285  _fitFraction = fitFrac;
286  return amp().setL(L);
287 }
bool setL(int L)
Definition: Amplitude.cpp:142
std::string _name
Definition: FitAmplitude.h:44
MINT::NamedParameter< double > _fitFraction
Definition: FitAmplitude.h:40
Amplitude & amp()
Definition: FitAmplitude.h:163
std::string anythingToString(const T &anything)
Definition: Utils.h:62

◆ setTag()

void FitAmplitude::setTag ( int  tag)
inline

Definition at line 128 of file FitAmplitude.h.

128  {
129  _tag = tag;
130  }

◆ theBareDecay()

DecayTree FitAmplitude::theBareDecay ( ) const
inline

Definition at line 166 of file FitAmplitude.h.

166  {
167  return amp().theBareDecay();
168  }
Amplitude & amp()
Definition: FitAmplitude.h:163
DecayTree theBareDecay() const
Definition: Amplitude.h:157

Friends And Related Function Documentation

◆ FitAmpList

friend class FitAmpList
friend

Definition at line 237 of file FitAmplitude.h.

◆ FitAmpListBase

friend class FitAmpListBase
friend

Definition at line 238 of file FitAmplitude.h.

Member Data Documentation

◆ _amp

Amplitude FitAmplitude::_amp
protected

Definition at line 38 of file FitAmplitude.h.

◆ _evt_dep_preFactors

MINT::ComplexProductForEvent<IDalitzEvent> FitAmplitude::_evt_dep_preFactors
protected

Definition at line 42 of file FitAmplitude.h.

◆ _FitAmpPhase

MINT::counted_ptr<MINT::FitComplex> FitAmplitude::_FitAmpPhase
protected

Definition at line 39 of file FitAmplitude.h.

◆ _fitFraction

MINT::NamedParameter<double> FitAmplitude::_fitFraction
protected

Definition at line 40 of file FitAmplitude.h.

◆ _name

std::string FitAmplitude::_name
protected

Definition at line 44 of file FitAmplitude.h.

◆ _preFactors

MINT::ComplexProduct FitAmplitude::_preFactors
mutableprotected

Definition at line 41 of file FitAmplitude.h.

◆ _tag

int FitAmplitude::_tag
protected

Definition at line 47 of file FitAmplitude.h.


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