16 ,
const std::string& namePrefix
17 ,
const std::string& lineshapePrefix
19 ,
const std::string& lopt
20 ,
const std::vector<double>& numOpts
24 , _associatingDecayTree(decay)
27 , _lsPrefix(lineshapePrefix)
41 , _associatingDecayTree(ampInit.tree())
43 , _prefix(ampInit.prefix())
44 , _lsPrefix(ampInit.lsPrefix())
46 , _lopt(ampInit.lopt())
47 , _numOpts(ampInit.numOpts())
60 , _associatingDecayTree(other._associatingDecayTree)
62 , _prefix(other._prefix)
63 , _lsPrefix(other._lsPrefix)
66 , _numOpts(other._numOpts)
80 if(dbThis) cout <<
"Amplitude::deleteDependants()" << endl;
86 if(dbThis) cout <<
"Amplitude::deleteDependants() done" << endl;
92 cout <<
"Amplitude::createDependants, for " <<
name()
93 <<
". Calling SpinFactorMake with _spd = " <<
_spd 94 <<
" and _lopt = " <<
_lopt << endl;
98 if(dbThis) cout <<
"got this spin factor: " <<
_spinFactor->
name() << endl;
102 cout <<
"Amplitude::createDependants() after creating lineshape, I depend on these fitParameters:" 106 if(0 == cl)
return false;
113 cout <<
"ERROR: Amplitude::renew() failed" << endl;
149 if(0 == lsPtr)
return false;
168 cout <<
"Amplitude::createLineshapes: cannot create line-shapes" 169 <<
" unless _pat is set. Bailing out." 171 throw "no lineshapes without pattern";
178 if(treePtr->
nDgtr() >= 2){
182 cout <<
"Amplitude::createLineshapes: just added lineshape: ";
187 for(
int i=0; i< treePtr->
nDgtr(); i++){
194 if(dbThis) cout <<
"Amplitude::deleteLineshapes()" << endl;
195 for(std::vector<ILineshape*>::iterator it =
_LineshapeList.begin();
197 if(0 != *it)
delete (*it);
201 if(dbThis) cout <<
"Amplitude::deleteLineshapes() done" << endl;
226 std::complex<double> prod(1.,0.);
233 for(std::vector<ILineshape*>::iterator it =
_LineshapeList.begin();
236 if(0 != *it) prod *= (*it)->getVal(evt);
248 for(
unsigned int i=0; i < perms.
size(); i++){
259 cout <<
"making box for " << (*this) << endl;
261 double maxHeight = 1;
262 double maxHeight_2 = maxHeight;
264 maxHeight_2 *= exp(-0.5*(nSigma*nSigma*0.75));
266 std::vector<DalitzCoordinate> limits;
267 for(std::vector<ILineshape*>::iterator it =
_LineshapeList.begin();
270 if(coord.size() <= 3){
273 +
" limit: " + coord.name()
279 limits.push_back( coord );
284 cout <<
" just set box height, it's " << lastBox.
guessedHeight() << endl;
290 cout <<
"Amp " <<
name() <<
" made box with guessed height " 293 <<
"\n that's the one" << lastBox
307 for(
unsigned int i=0; i < perms.
size(); i++){
311 cout <<
"setting boxHeight to " << box.
height()
326 if(dbThis) cout <<
"making bw-box for " << (*this) << endl;
328 std::vector<counted_ptr<IGenFct> > limits;
329 for(std::vector<ILineshape*>::iterator it =
_LineshapeList.begin();
332 cout <<
"adding co-ordinate " 333 << (*it)->getDalitzCoordinate()
334 <<
" to box." << endl;
343 limits.push_back(fct);
397 if(0 == evt)
return 0;
398 return this->
getVal(*evt);
406 complex<double> sum=0;
447 return (std::string)
"(" 449 +
" wave) with opt " +
_lopt +
"; "
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
std::complex< double > getOnePermutationsVal(IDalitzEvent &evt)
virtual DalitzBoxSet MakeBox(const DalitzEventPattern &pat, const Permutation &perm, double nSigma=3)
void push_back(const T &c)
ISpinFactor * spinFactor()
virtual void setPermutationIndex(int i)=0
virtual DalitzBoxSet MakeBoxes(const DalitzEventPattern &pat, double nSigma=3)
void encloseInPhaseSpaceArea()
std::ostream & operator<<(std::ostream &out, const Amplitude &)
AssociatingDecayTree _associatingDecayTree
virtual std::string name() const =0
virtual int numPermutations() const =0
bool createLineshapes(const MINT::const_counted_ptr< AssociatedDecayTree > &counted_tree_ptr)
virtual void setCoordinate(const DalitzCoordinate &c)=0
const ValueType & getVal() const
void setGuessedHeight(double h)
std::vector< ILineshape * > _LineshapeList
const std::string & lsPrefix() const
bool CConjugateFinalState()
virtual std::complex< double > getVal(IDalitzEvent &evt)
virtual std::complex< double > ComplexVal(IDalitzEvent &evt)=0
ILineshape * LineshapeMaker(const AssociatedDecayTree *tree, const std::string &lineshapePrefix, const std::string &lopt, const std::vector< double > &numOptions=std::vector< double >())
virtual double boxFactor()
double guessedHeight() const
virtual bool registerFitParDependence(const IFitParDependent &fpd)
bool resetTree(const DecayTree &dt)
bool addLineshape(ILineshape *ls)
MINT::const_counted_ptr< DDTree< ValueType > > getDgtrTreePtr(int i) const
void add(const DalitzBox &box)
bool initialise(const DalitzEventPattern &pat)
Amplitude(const DecayTree &decay, const std::string &namePrefix="", const std::string &lineshapePrefix="", char SPD_Wave='?', const std::string &opt="", const std::vector< double > &numOpt=std::vector< double >(), IFitParRegister *daddy=0)
std::vector< double > _numOpts
virtual const DalitzEventPattern & eventPattern() const =0
const AssociatedDecayTree & theDecay(const DalitzEventPattern &pat) const
void setName(const std::string &name)
unsigned int size() const
std::string anythingToString(const T &anything)
void removeAllFitParDependencies()
virtual DalitzBWBox MakeBWBox(const DalitzEventPattern &pat, const Permutation &perm, TRandom *rnd=gRandom)
void print(std::ostream &out=std::cout) const
void setName(const std::string &name)
void oneLiner(std::stringstream &seam, int generation=0) const
DecayTree theBareDecay() const
ISpinFactor * _spinFactor
void CheckAndMatchPattern(const DalitzEventPattern &pat) const
ISpinFactor * SpinFactorMaker(const AssociatedDecayTree &thisDcy, char SPD_Wave='?', const std::string &lopt="")
std::complex< double > SpinFactorValue(IDalitzEvent &evt)
virtual DalitzBWBoxSet MakeBWBoxes(const DalitzEventPattern &pat, TRandom *rnd=gRandom)
void add(DalitzBWBox &box)
bool CConjugateInitialState()
std::complex< double > LineshapeProduct(IDalitzEvent &evt)
void listFitParDependencies(std::ostream &os=std::cout) const