24 ,
const std::string& prefix
25 ,
const std::string& lineshapePrefix
26 ,
const std::string& opt
29 , _useAnalyticGradient(
"useAnalyticGradient",0)
41 ,
const std::string& prefix
42 ,
const std::string& lineshapePrefix
43 ,
const std::string& opt
46 , _useAnalyticGradient(
"useAnalyticGradient",0)
56 ,
const std::string& prefix
57 ,
const std::string& lineshapePrefix
58 ,
const std::string& opt
61 , _useAnalyticGradient(
"useAnalyticGradient",0)
75 ,
FitAmpList(other), _useAnalyticGradient(
"useAnalyticGradient",0)
89 ,
FitAmpList(other), _useAnalyticGradient(
"useAnalyticGradient",0)
105 if(dbThis) cout <<
"FitAmpSum::GetCloneSameFitParameters()" << endl;
124 if(dbThis) cout <<
"cloning FitAmpIncoherentSum " << newList->
size() << endl;
129 if(&other ==
this)
return *
this;
134 if(&other ==
this)
return *
this;
144 if(0 == this->
size()){
149 for(
unsigned int i=0; i< this->
size(); i++){
151 cout <<
"FitAmpIncoherentSum::getVal()" 159 if(dbthis) cout <<
"FitAmpIncoherentSum::getVal(evt):" 160 <<
" returning this: " << sum
163 if(
false && sum > 200){
164 cout <<
"large FitAmpIncoherentSum " << sum
165 <<
" the largest amplitude is: " 176 for (
unsigned int i=0; i<mps->
size(); i++) {
180 if(name_i.find(
"Inco")==std::string::npos)
continue;
181 if(name_i.find(
"_Re")!=std::string::npos){
187 name_i.replace(name_i.find(
"_Re"),3,
"");
188 for(
unsigned int j=0; j< this->
size(); j++){
190 if(i+1 >= grad.size()){
191 cout <<
"WARNING in FitAmpIncoherentSum::Gradient" 192 <<
" have to increase size of grad to avoid memory issues" << endl;
195 double tmp = 2.*std::norm(this->
getAmpPtr(j)->getValWithoutFitParameters(evt));
205 std::cout <<
"FitAmpIncoherentSum::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;
220 for(
unsigned int i=0; i <
_fitAmps.size(); i++){
221 if(
_fitAmps[i]->canBeIgnored())
continue;
229 cout <<
"FitAmpIncoherentSum: setting efficiency POINTER " 230 <<
" in integCalculator to " 233 cout <<
" (0 means no pointer, 100% efficiency).";
244 for(
unsigned int i=0; i <
_fitAmps.size(); i++){
245 if(
_fitAmps[i]->canBeIgnored())
continue;
253 cout <<
"FitAmpIncoherentSum: setting efficiency POINTER " 254 <<
" in integCalculator to " 257 cout <<
" (0 means no pointer, 100% efficiency).";
266 os <<
"FitAmpIncoherentSum::print\n====================";
268 for(
unsigned int i=0; i< this->
size(); i++){
274 os <<
"FitAmpSum::print\n====================";
276 for(
unsigned int i=0; i < this->
size(); i++){
std::complex< double > AmpPhase() const
virtual bool append(const IntegCalculator &other)
virtual MINT::counted_ptr< FitAmpListBase > GetCloneSameFitParameters() const
FitAmpIncoherentSum operator *(double r) const
virtual bool append(const FitAmpPairList &otherListPtr)
virtual int add(const FitAmpListBase &other, double factor=1)
void printLargestAmp(std::ostream &os=std::cout)
virtual MINT::counted_ptr< IIntegrationCalculator > makeIntegrationCalculator()
virtual FitAmplitude * getAmpPtr(unsigned int i)
FitAmpIncoherentSum & operator+=(const FitAmpIncoherentSum &other)
virtual int iFixInit() const =0
virtual std::complex< double > getVal(IDalitzEvent &evt)
virtual void addAmps(FitAmplitude *a1, FitAmplitude *a2)
IMinuitParameter * getParPtr(unsigned int i)
static std::string IncPrefix()
unsigned int size() const
DecayTree theBareDecay() const
virtual const std::string & name() const =0
virtual void printNonZero(std::ostream &os=std::cout) const
MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > > _efficiency
FitAmpIncoherentSum & operator *=(double r)
virtual ~FitAmpIncoherentSum()
bool A_is_in_B(const std::string &a, const std::string &b)
virtual void Gradient(IDalitzEvent &evt, std::vector< double > &grad, MINT::MinuitParameterSet *mps)
std::vector< FitAmplitude * > _fitAmps
FitAmpIncoherentSum operator *(double r, const FitAmpIncoherentSum &rhs)
double getVal(IDalitzEvent &evt)
void setEfficiency(MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > > eff)
double efficiency(IDalitzEvent &evt)
virtual void addAmps(FitAmplitude *a1, FitAmplitude *a2)
FitAmpIncoherentSum & operator=(const FitAmpIncoherentSum &other)
virtual bool hidden() const =0
virtual MINT::counted_ptr< IntegCalculator > makeIntegCalculator()
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
FitAmpIncoherentSum operator+(const FitAmpIncoherentSum &other) const
virtual MINT::counted_ptr< FitAmpPairList > makeFitAmpPairList()
virtual void print(std::ostream &os=std::cout) const
void oneLiner(std::stringstream &seam, int generation=0) const
FitAmpIncoherentSum(const DalitzEventPattern &pat, const char *fname=0, MINT::MinuitParameterSet *pset=0, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")
virtual unsigned int size() const
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 multiply(double r)