23 ,
const std::string& prefix
24 ,
const std::string& lineshapePrefix
25 ,
const std::string& opt
28 , _useAnalyticGradient(
"useAnalyticGradient",0)
40 ,
const std::string& prefix
41 ,
const std::string& lineshapePrefix
42 ,
const std::string& opt
45 , _useAnalyticGradient(
"useAnalyticGradient",0)
55 ,
const std::string& prefix
56 ,
const std::string& lineshapePrefix
57 ,
const std::string& opt
60 , _useAnalyticGradient(
"useAnalyticGradient",0)
74 ,
FitAmpList(other), _useAnalyticGradient(
"useAnalyticGradient",0)
88 ,
FitAmpList(other), _useAnalyticGradient(
"useAnalyticGradient",0)
104 if(dbThis) cout <<
"FitAmpSum::GetCloneSameFitParameters()" << endl;
123 if(dbThis) cout <<
"cloning FitAmpIncoherentSumEvtGen " << newList->
size() << endl;
128 if(&other ==
this)
return *
this;
133 if(&other ==
this)
return *
this;
143 if(0 == this->
size()){
148 for(
unsigned int i=0; i< this->
size(); i++){
150 cout <<
"FitAmpIncoherentSumEvtGen::getVal()" 156 sum += norm(this->
getAmpPtr(i)->getNewOnePermutationsVal(evt));
158 sum += norm(this->
getAmpPtr(i)->getNewOnePermutationsVal(evt));
161 if(dbthis) cout <<
"FitAmpIncoherentSumEvtGen::getVal(evt):" 162 <<
" returning this: " << sum
165 if(
false && sum > 200){
166 cout <<
"large FitAmpIncoherentSumEvtGen " << sum
167 <<
" the largest amplitude is: " 178 for (
unsigned int i=0; i<mps->
size(); i++) {
182 if(name_i.find(
"Inco")==std::string::npos)
continue;
183 if(name_i.find(
"_Re")!=std::string::npos){
189 name_i.replace(name_i.find(
"_Re"),3,
"");
190 for(
unsigned int j=0; j< this->
size(); j++){
192 if(i+1 >= grad.size()){
193 cout <<
"WARNING in FitAmpIncoherentSumEvtGen::Gradient" 194 <<
" have to increase size of grad to avoid memory issues" << endl;
197 double tmp = 2.*std::norm(this->
getAmpPtr(j)->getValWithoutFitParameters(evt));
207 std::cout <<
"FitAmpIncoherentSumEvtGen::Gradient() called. Sorry, I don't know how to calculate the derivative with respect to the fit parameter " << mps->
getParPtr(i)->
name() <<
" ! Please implement me or set useAnalytic Gradient to 0 in your options file. I'll crash now. " << std::endl;
222 for(
unsigned int i=0; i <
_fitAmps.size(); i++){
223 if(
_fitAmps[i]->canBeIgnored())
continue;
231 cout <<
"FitAmpIncoherentSumEvtGen: setting efficiency POINTER " 232 <<
" in integCalculator to " 235 cout <<
" (0 means no pointer, 100% efficiency).";
246 for(
unsigned int i=0; i <
_fitAmps.size(); i++){
247 if(
_fitAmps[i]->canBeIgnored())
continue;
255 cout <<
"FitAmpIncoherentSumEvtGen: setting efficiency POINTER " 256 <<
" in integCalculator to " 259 cout <<
" (0 means no pointer, 100% efficiency).";
268 os <<
"FitAmpIncoherentSumEvtGen::print\n====================";
270 for(
unsigned int i=0; i< this->
size(); i++){
276 os <<
"FitAmpSum::print\n====================";
278 for(
unsigned int i=0; i < this->
size(); i++){
std::complex< double > AmpPhase() const
FitAmpIncoherentSumEvtGen(const DalitzEventPattern &pat, const char *fname=0, MINT::MinuitParameterSet *pset=0, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")
virtual bool append(const IntegCalculator &other)
virtual bool append(const FitAmpPairList &otherListPtr)
virtual int add(const FitAmpListBase &other, double factor=1)
virtual FitAmplitude * getAmpPtr(unsigned int i)
static std::string IncPrefix()
virtual int iFixInit() const =0
void printLargestAmp(std::ostream &os=std::cout)
virtual std::complex< double > getVal(IDalitzEvent &evt)
virtual void setPermutationIndex(int i)=0
virtual void addAmps(FitAmplitude *a1, FitAmplitude *a2)
double getVal(IDalitzEvent &evt)
IMinuitParameter * getParPtr(unsigned int i)
virtual void print(std::ostream &os=std::cout) const
unsigned int size() const
DecayTree theBareDecay() const
virtual const std::string & name() const =0
virtual ~FitAmpIncoherentSumEvtGen()
MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > > _efficiency
virtual MINT::counted_ptr< FitAmpPairList > makeFitAmpPairList()
bool A_is_in_B(const std::string &a, const std::string &b)
std::vector< FitAmplitude * > _fitAmps
void setEfficiency(MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > > eff)
double efficiency(IDalitzEvent &evt)
FitAmpIncoherentSumEvtGen operator+(const FitAmpIncoherentSumEvtGen &other) const
virtual MINT::counted_ptr< IntegCalculator > makeIntegCalculator()
virtual void addAmps(FitAmplitude *a1, FitAmplitude *a2)
FitAmpIncoherentSumEvtGen operator *(double r, const FitAmpIncoherentSumEvtGen &rhs)
virtual bool hidden() const =0
FitAmpIncoherentSumEvtGen operator *(double r) const
FitAmpList(const DalitzEventPattern &pat, const char *fname=0, MINT::MinuitParameterSet *pset=0, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")
virtual const DalitzEventPattern & eventPattern() const =0
std::vector< MINT::counted_ptr< FitAmpListBase > > _fitAmpLists
virtual MINT::counted_ptr< FitAmpListBase > GetCloneSameFitParameters() const
FitAmpIncoherentSumEvtGen & operator *=(double r)
FitAmpIncoherentSumEvtGen & operator=(const FitAmpIncoherentSumEvtGen &other)
void oneLiner(std::stringstream &seam, int generation=0) const
FitAmpIncoherentSumEvtGen & operator+=(const FitAmpIncoherentSumEvtGen &other)
virtual void printNonZero(std::ostream &os=std::cout) const
virtual unsigned int size() const
virtual MINT::counted_ptr< IIntegrationCalculator > makeIntegrationCalculator()
void setEfficiency(MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > > eff)
virtual bool createAllAmps(const DalitzEventPattern &thePattern, const std::string &prefix="", const std::string &lineshapePrefix="")
virtual void Gradient(IDalitzEvent &evt, std::vector< double > &grad, MINT::MinuitParameterSet *mps)
virtual void multiply(double r)