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

#include <FitAmpIncoherentSum.h>

Inheritance diagram for FitAmpIncoherentSum:
MINT::IReturnRealForEvent< IDalitzEvent > IFastAmplitudeIntegrable ILookLikeFitAmpSum FitAmpList MINT::IReturnRealForEvent< IDalitzEvent > MINT::IReturnComplexForEvent< IDalitzEvent > IFastAmplitudeIntegrable MINT::IReturnRealForEvent< IDalitzEvent > FitAmpListBase MINT::IReturnRealForEvent< IDalitzEvent > MINT::IReturnComplexForEvent< IDalitzEvent >

Public Member Functions

 FitAmpIncoherentSum (const DalitzEventPattern &pat, const char *fname=0, MINT::MinuitParameterSet *pset=0, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")
 
 FitAmpIncoherentSum (const DalitzEventPattern &pat, MINT::MinuitParameterSet *pset, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")
 
 FitAmpIncoherentSum (const DalitzEventPattern &pat, const std::string &prefix, const std::string &lineshapePrefix="", const std::string &opt="")
 
 FitAmpIncoherentSum (const FitAmpIncoherentSum &other)
 
 FitAmpIncoherentSum (const FitAmpList &other)
 
virtual MINT::counted_ptr< FitAmpListBaseGetCloneSameFitParameters () const
 
virtual DalitzBoxSet makeBoxes (const DalitzEventPattern &pat, double nSigma=2)
 
virtual DalitzBWBoxSet makeBWBoxes (const DalitzEventPattern &pat, TRandom *rnd=gRandom)
 
double getVal (IDalitzEvent &evt)
 
double getVal (IDalitzEvent *evtPtr)
 
virtual void Gradient (IDalitzEvent &evt, std::vector< double > &grad, MINT::MinuitParameterSet *mps)
 
virtual bool useAnalyticGradient ()
 
virtual MINT::counted_ptr< IIntegrationCalculatormakeIntegrationCalculator ()
 
virtual MINT::counted_ptr< IntegCalculatormakeIntegCalculator ()
 
virtual MINT::counted_ptr< FitAmpPairListmakeFitAmpPairList ()
 
virtual double Prob (IDalitzEvent &evt)
 
virtual double RealVal (IDalitzEvent &evt)
 
virtual MINT::counted_ptr< MINT::IUnweightedEventGenerator< IDalitzEvent > > makeEventGenerator (const DalitzEventPattern &pat, TRandom *rnd=gRandom)
 
virtual ~FitAmpIncoherentSum ()
 
void printLargestAmp (std::ostream &os=std::cout)
 
virtual void printLargestAmp (IDalitzEvent &evt, std::ostream &os=std::cout)
 
virtual void print (std::ostream &os=std::cout) const
 
virtual void printNonZero (std::ostream &os=std::cout) const
 
FitAmpIncoherentSumoperator *= (double r)
 
FitAmpIncoherentSumoperator *= (const std::complex< double > &z)
 
FitAmpIncoherentSumoperator *= (const MINT::counted_ptr< MINT::IReturnComplex > &irc)
 
FitAmpIncoherentSum operator * (double r) const
 
FitAmpIncoherentSum operator * (const std::complex< double > &z) const
 
FitAmpIncoherentSum operator * (const MINT::counted_ptr< MINT::IReturnComplex > &irc) const
 
FitAmpIncoherentSumoperator= (const FitAmpIncoherentSum &other)
 
FitAmpIncoherentSumoperator= (const FitAmpList &other)
 
FitAmpIncoherentSumoperator+= (const FitAmpIncoherentSum &other)
 
FitAmpIncoherentSum operator+ (const FitAmpIncoherentSum &other) const
 
- Public Member Functions inherited from MINT::IReturnRealForEvent< IDalitzEvent >
virtual ~IReturnRealForEvent ()
 
- Public Member Functions inherited from IFastAmplitudeIntegrable
virtual std::complex< double > ComplexVal (IDalitzEvent &evt)
 
virtual ~IFastAmplitudeIntegrable ()
 
- Public Member Functions inherited from MINT::IReturnComplexForEvent< IDalitzEvent >
virtual ~IReturnComplexForEvent ()
 
- Public Member Functions inherited from ILookLikeFitAmpSum
virtual ~ILookLikeFitAmpSum ()
 
- Public Member Functions inherited from FitAmpList
 FitAmpList (const DalitzEventPattern &pat, const char *fname=0, MINT::MinuitParameterSet *pset=0, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")
 
 FitAmpList (const DalitzEventPattern &pat, MINT::MinuitParameterSet *pset, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")
 
 FitAmpList (const DalitzEventPattern &pat, const std::string &prefix, const std::string &lineshapePrefix="", const std::string &opt="")
 
 FitAmpList (const FitAmpList &other)
 
virtual MINT::MinuitParameterSetgetMPS ()
 
virtual MINT::counted_ptr< FitAmpListBaseGetCPConjugateSameFitParameters () const
 
virtual bool createAllAmps (const DalitzEventPattern &thePattern, const std::string &prefix="", const std::string &lineshapePrefix="")
 
virtual bool createAmpsFromFile ()
 
virtual ~FitAmpList ()
 
virtual void printAllAmps (std::ostream &os=std::cout) const
 
virtual void printAllAmps (IDalitzEvent &evt, std::ostream &os=std::cout)
 
virtual void printNonZeroWithValue (IDalitzEvent &evt, std::ostream &os=std::cout)
 
FitAmpListoperator *= (double r)
 
FitAmpListoperator *= (const std::complex< double > &z)
 
FitAmpListoperator *= (const MINT::counted_ptr< MINT::IReturnComplex > &irc)
 
FitAmpList operator * (double r) const
 
FitAmpList operator * (const std::complex< double > &z) const
 
FitAmpList operator * (const MINT::counted_ptr< MINT::IReturnComplex > &irc) const
 
FitAmpListoperator= (const FitAmpList &other)
 
FitAmpListoperator+= (const FitAmpList &other)
 
FitAmpList operator+ (const FitAmpList &other) const
 
- Public Member Functions inherited from FitAmpListBase
 FitAmpListBase ()
 
 FitAmpListBase (const FitAmpListBase &other)
 
 FitAmpListBase (const FitAmpListBase &other, std::string name)
 
virtual int addCopyWithSameFitParameters (const FitAmpListBase &other, double factor=1)
 
virtual int addCopyOfSubsetWithSameFitParameters (const FitAmpListBase &other, std::string name, double factor=1)
 
virtual bool addAmplitude (FitAmplitude *fa)
 
virtual int add (const FitAmpListBase &other, double factor=1)
 
virtual int addAsList (const FitAmpListBase &other, double factor=1)
 
virtual unsigned int size () const
 
virtual FitAmplitudegetAmpPtr (unsigned int i)
 
const FitAmplitudegetAmpPtr (unsigned int i) const
 
virtual bool CPConjugateSameFitParameters ()
 
virtual bool CConjugateFinalStateSameFitParameters ()
 
virtual MINT::counted_ptr< FitAmpListBaseGetCConjugateFinalStateSameFitParameters () const
 
virtual bool CConjugateInitialStateSameFitParameters ()
 
virtual MINT::counted_ptr< FitAmpListBaseGetCConjugateInitialStateSameFitParameters () const
 
virtual bool setLSameFitParameters (int L)
 
virtual MINT::counted_ptr< FitAmpListBaseGetDifferentLSameFitParameters (int L) const
 
virtual MINT::counted_ptr< FitAmpListBaseGetCloneOfSubsetSameFitParameters (std::string name) const
 
DalitzBoxSet makeBoxes (const DalitzEventPattern &pat, MINT::IReturnRealForEvent< IDalitzEvent > *pdf, double nSigma=2)
 
DalitzBWBoxSet makeBWBoxes (const DalitzEventPattern &pat, MINT::IReturnRealForEvent< IDalitzEvent > *pdf, TRandom *rnd=gRandom)
 
void setAllAmpsTo (const std::complex< double > z)
 
virtual ~FitAmpListBase ()
 
void setEfficiency (const MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > > &eff)
 
double efficiency (IDalitzEvent &evt)
 
virtual void multiply (double r)
 
virtual void multiply (const std::complex< double > &z)
 
virtual void multiply (const MINT::counted_ptr< MINT::IReturnComplex > irc)
 
virtual void multiply (MINT::counted_ptr< MINT::IReturnComplexForEvent< IDalitzEvent > > irc)
 
FitAmpListBaseoperator *= (double r)
 
FitAmpListBaseoperator *= (const std::complex< double > &z)
 
FitAmpListBaseoperator *= (const MINT::counted_ptr< MINT::IReturnComplex > &irc)
 
FitAmpListBase operator * (double r) const
 
FitAmpListBase operator * (const std::complex< double > &z) const
 
FitAmpListBase operator * (const MINT::counted_ptr< MINT::IReturnComplex > &irc) const
 
void normalizeAmps (DalitzEventList &evtList)
 
std::vector< double > normFactors (DalitzEventList &evtList)
 
void randomizeStartVals (int seed=0)
 
void randomizePhaseStartVals (int seed=0)
 
void setTag (int tag)
 
FitAmpListBaseoperator= (const FitAmpListBase &other)
 
FitAmpListBaseoperator+= (const FitAmpListBase &other)
 
FitAmpListBase operator+ (const FitAmpListBase &other) const
 

Static Protected Member Functions

static std::string IncPrefix ()
 

Protected Attributes

MINT::NamedParameter< int > _useAnalyticGradient
 
- Protected Attributes inherited from FitAmpList
DalitzEventPattern _pat
 
std::string _paraFName
 
MINT::MinuitParameterSet_minuitParaSet
 
std::string _opt
 
- Protected Attributes inherited from FitAmpListBase
std::vector< FitAmplitude * > _fitAmps
 
std::vector< MINT::counted_ptr< FitAmpListBase > > _fitAmpLists
 
MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > > _efficiency
 

Friends

class FitAmplitude
 

Additional Inherited Members

- Protected Member Functions inherited from MINT::IReturnRealForEvent< IDalitzEvent >
 IReturnRealForEvent ()
 
- Protected Member Functions inherited from MINT::IReturnComplexForEvent< IDalitzEvent >
 IReturnComplexForEvent ()
 
- Protected Member Functions inherited from FitAmpListBase
virtual void deleteAll ()
 

Detailed Description

Definition at line 24 of file FitAmpIncoherentSum.h.

Constructor & Destructor Documentation

◆ FitAmpIncoherentSum() [1/5]

FitAmpIncoherentSum::FitAmpIncoherentSum ( const DalitzEventPattern pat,
const char *  fname = 0,
MINT::MinuitParameterSet pset = 0,
const std::string &  prefix = "",
const std::string &  lineshapePrefix = "",
const std::string &  opt = "" 
)

Definition at line 21 of file FitAmpIncoherentSum.cpp.

28  : FitAmpList(pat, fname, pset, FitAmpIncoherentSum::IncPrefix()+ prefix, lineshapePrefix, opt)
29  , _useAnalyticGradient("useAnalyticGradient",0)
30 {
31  /*
32  //Important! Ensures everything is initialised
33  DalitzEventList eventTest;
34  eventTest.generatePhaseSpaceEvents(1,pat);
35  this->getVal(eventTest[0]);
36  */
37 }
static std::string IncPrefix()
FitAmpList(const DalitzEventPattern &pat, const char *fname=0, MINT::MinuitParameterSet *pset=0, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")
Definition: FitAmpList.cpp:19
MINT::NamedParameter< int > _useAnalyticGradient

◆ FitAmpIncoherentSum() [2/5]

FitAmpIncoherentSum::FitAmpIncoherentSum ( const DalitzEventPattern pat,
MINT::MinuitParameterSet pset,
const std::string &  prefix = "",
const std::string &  lineshapePrefix = "",
const std::string &  opt = "" 
)

Definition at line 39 of file FitAmpIncoherentSum.cpp.

45  : FitAmpList(pat, pset, FitAmpIncoherentSum::IncPrefix() + prefix, lineshapePrefix, opt)
46  , _useAnalyticGradient("useAnalyticGradient",0)
47 {
48  /*
49  //Important! Ensures everything is initialised
50  DalitzEventList eventTest;
51  eventTest.generatePhaseSpaceEvents(1,pat);
52  this->getVal(eventTest[0]);
53  */
54 }
static std::string IncPrefix()
FitAmpList(const DalitzEventPattern &pat, const char *fname=0, MINT::MinuitParameterSet *pset=0, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")
Definition: FitAmpList.cpp:19
MINT::NamedParameter< int > _useAnalyticGradient

◆ FitAmpIncoherentSum() [3/5]

FitAmpIncoherentSum::FitAmpIncoherentSum ( const DalitzEventPattern pat,
const std::string &  prefix,
const std::string &  lineshapePrefix = "",
const std::string &  opt = "" 
)

Definition at line 55 of file FitAmpIncoherentSum.cpp.

60  : FitAmpList(pat, FitAmpIncoherentSum::IncPrefix() + prefix, lineshapePrefix, opt)
61  , _useAnalyticGradient("useAnalyticGradient",0)
62 {
63  /*
64  //Important! Ensures everything is initialised
65  DalitzEventList eventTest;
66  eventTest.generatePhaseSpaceEvents(1,pat);
67  this->getVal(eventTest[0]);
68  */
69 }
static std::string IncPrefix()
FitAmpList(const DalitzEventPattern &pat, const char *fname=0, MINT::MinuitParameterSet *pset=0, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")
Definition: FitAmpList.cpp:19
MINT::NamedParameter< int > _useAnalyticGradient

◆ FitAmpIncoherentSum() [4/5]

FitAmpIncoherentSum::FitAmpIncoherentSum ( const FitAmpIncoherentSum other)

Definition at line 71 of file FitAmpIncoherentSum.cpp.

75  , FitAmpList(other), _useAnalyticGradient("useAnalyticGradient",0)
76 {
77  /*
78  //Important! Ensures everything is initialised
79  DalitzEventList eventTest;
80  eventTest.generatePhaseSpaceEvents(1,_pat);
81  this->getVal(eventTest[0]);
82  */
83 }
FitAmpList(const DalitzEventPattern &pat, const char *fname=0, MINT::MinuitParameterSet *pset=0, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")
Definition: FitAmpList.cpp:19
MINT::NamedParameter< int > _useAnalyticGradient

◆ FitAmpIncoherentSum() [5/5]

FitAmpIncoherentSum::FitAmpIncoherentSum ( const FitAmpList other)

Definition at line 85 of file FitAmpIncoherentSum.cpp.

89  , FitAmpList(other), _useAnalyticGradient("useAnalyticGradient",0)
90 {
91  /*
92  //Important! Ensures everything is initialised
93  DalitzEventList eventTest;
94  eventTest.generatePhaseSpaceEvents(1,_pat);
95  this->getVal(eventTest[0]);
96  */
97 }
FitAmpList(const DalitzEventPattern &pat, const char *fname=0, MINT::MinuitParameterSet *pset=0, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")
Definition: FitAmpList.cpp:19
MINT::NamedParameter< int > _useAnalyticGradient

◆ ~FitAmpIncoherentSum()

FitAmpIncoherentSum::~FitAmpIncoherentSum ( )
virtual

Definition at line 284 of file FitAmpIncoherentSum.cpp.

284  {
285  deleteAll();
286 }
virtual void deleteAll()

Member Function Documentation

◆ GetCloneSameFitParameters()

counted_ptr< FitAmpListBase > FitAmpIncoherentSum::GetCloneSameFitParameters ( ) const
virtual

Reimplemented from FitAmpList.

Definition at line 98 of file FitAmpIncoherentSum.cpp.

98  {
99 // need to reform these one day...
100 // ... it all relies on the copy-constructur/=operator in FitAmpitude
101 // not copying the fit parameters, but just their pointers
102 // which will need to be reviewed.
103 //
104  bool dbThis=false;
105  if(dbThis) cout << "FitAmpSum::GetCloneSameFitParameters()" << endl;
106  /*
107  There'll be 'physical' copies of all Amplitudes, but the
108  FitParameters remain the same (pointers to the same
109  FitParameter Object). This is useful for the CP-con coding
110  as it is now, but perhaps a bit counter-intuitive. needs to
111  be reviewed at some point. This behaviour is defined in the
112  copy constructor of the FitAmplitude class.
113  */
114 
115  /*
116  counted_ptr<FitAmpIncoherentSum>
117  newList(new FitAmpIncoherentSum((IDalitzEventList*) this->getEventRecord()
118  , _paraFName.c_str(), _minuitParaSet));
119  */
121  newList->deleteAll();
122 
123  newList->add(*this);
124  if(dbThis) cout << "cloning FitAmpIncoherentSum " << newList->size() << endl;
125  return newList;
126 }
FitAmpIncoherentSum(const DalitzEventPattern &pat, const char *fname=0, MINT::MinuitParameterSet *pset=0, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")

◆ getVal() [1/2]

double FitAmpIncoherentSum::getVal ( IDalitzEvent evt)

Definition at line 139 of file FitAmpIncoherentSum.cpp.

139  {
140  bool dbthis=false;
141 
142  double sum(0);
143 
144  if(0 == this->size()){
147  }
148 
149  for(unsigned int i=0; i< this->size(); i++){
150  if(dbthis){
151  cout << "FitAmpIncoherentSum::getVal()"
152  << "\n > for " << getAmpPtr(i)->theBareDecay().oneLiner()
153  << "\n > I get " << getAmpPtr(i)->getVal(evt)
154  << endl;
155  }
156  sum += norm(this->getAmpPtr(i)->getVal(evt));
157  }
158 
159  if(dbthis) cout << "FitAmpIncoherentSum::getVal(evt):"
160  << " returning this: " << sum
161  << endl;
162 
163  if(false && sum > 200){
164  cout << "large FitAmpIncoherentSum " << sum
165  << " the largest amplitude is: "
166  << endl;
167  printLargestAmp();
168  }
169 
170  return efficiency(evt)*sum;
171 
172 }
void printLargestAmp(std::ostream &os=std::cout)
virtual FitAmplitude * getAmpPtr(unsigned int i)
virtual std::complex< double > getVal(IDalitzEvent &evt)
static std::string IncPrefix()
DecayTree theBareDecay() const
Definition: FitAmplitude.h:166
double getVal(IDalitzEvent &evt)
double efficiency(IDalitzEvent &evt)
virtual const DalitzEventPattern & eventPattern() const =0
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375
virtual unsigned int size() const
virtual bool createAllAmps(const DalitzEventPattern &thePattern, const std::string &prefix="", const std::string &lineshapePrefix="")
Definition: FitAmpList.cpp:125

◆ getVal() [2/2]

double FitAmpIncoherentSum::getVal ( IDalitzEvent evtPtr)
inline

Definition at line 78 of file FitAmpIncoherentSum.h.

78  {
79  if(0 == evtPtr) return 0;
80  return getVal(*evtPtr);
81  }
double getVal(IDalitzEvent &evt)

◆ Gradient()

void FitAmpIncoherentSum::Gradient ( IDalitzEvent evt,
std::vector< double > &  grad,
MINT::MinuitParameterSet mps 
)
virtual

Reimplemented from IFastAmplitudeIntegrable.

Definition at line 174 of file FitAmpIncoherentSum.cpp.

174  {
175 
176  for (unsigned int i=0; i<mps->size(); i++) {
177  if(mps->getParPtr(i)->hidden())continue;
178 
179  string name_i= mps->getParPtr(i)->name();
180  if(name_i.find("Inco")==std::string::npos)continue;
181  if(name_i.find("_Re")!=std::string::npos){
182  if(mps->getParPtr(i)->iFixInit() && mps->getParPtr(i+1)->iFixInit()){
183  i++;
184  continue;
185  }
186  //name_i.replace(name_i.find("Inco_"),5,"");
187  name_i.replace(name_i.find("_Re"),3,"");
188  for(unsigned int j=0; j< this->size(); j++){
189  if(A_is_in_B(name_i, this->getAmpPtr(j)->name())){
190  if(i+1 >= grad.size()){
191  cout << "WARNING in FitAmpIncoherentSum::Gradient"
192  << " have to increase size of grad to avoid memory issues" << endl;
193  grad.resize(i+2);
194  }
195  double tmp = 2.*std::norm(this->getAmpPtr(j)->getValWithoutFitParameters(evt));
196  grad[i]= tmp * this->getAmpPtr(j)->AmpPhase().real();
197  grad[i+1]= tmp * this->getAmpPtr(j)->AmpPhase().imag();
198  i++;
199  break;
200  }
201  }
202  }
203  else if(mps->getParPtr(i)->iFixInit())continue;
204  else {
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;
206  throw "crash";
207  }
208 
209  }
210 
211 }
std::complex< double > AmpPhase() const
Definition: FitAmplitude.h:153
virtual FitAmplitude * getAmpPtr(unsigned int i)
virtual int iFixInit() const =0
IMinuitParameter * getParPtr(unsigned int i)
unsigned int size() const
virtual const std::string & name() const =0
bool A_is_in_B(const std::string &a, const std::string &b)
Definition: Utils.cpp:34
virtual bool hidden() const =0
virtual unsigned int size() const

◆ IncPrefix()

std::string FitAmpIncoherentSum::IncPrefix ( )
staticprotected

Definition at line 17 of file FitAmpIncoherentSum.cpp.

17  {
18  return "Inco_";
19 }

◆ makeBoxes()

virtual DalitzBoxSet FitAmpIncoherentSum::makeBoxes ( const DalitzEventPattern pat,
double  nSigma = 2 
)
inlinevirtual

Definition at line 68 of file FitAmpIncoherentSum.h.

69  {
70  return FitAmpList::makeBoxes(pat, this, nSigma);}
DalitzBoxSet makeBoxes(const DalitzEventPattern &pat, MINT::IReturnRealForEvent< IDalitzEvent > *pdf, double nSigma=2)

◆ makeBWBoxes()

virtual DalitzBWBoxSet FitAmpIncoherentSum::makeBWBoxes ( const DalitzEventPattern pat,
TRandom *  rnd = gRandom 
)
inlinevirtual

Implements ILookLikeFitAmpSum.

Definition at line 72 of file FitAmpIncoherentSum.h.

73  {
74  return FitAmpList::makeBWBoxes(pat, this, rnd);}
DalitzBWBoxSet makeBWBoxes(const DalitzEventPattern &pat, MINT::IReturnRealForEvent< IDalitzEvent > *pdf, TRandom *rnd=gRandom)

◆ makeEventGenerator()

virtual MINT::counted_ptr<MINT::IUnweightedEventGenerator<IDalitzEvent> > FitAmpIncoherentSum::makeEventGenerator ( const DalitzEventPattern pat,
TRandom *  rnd = gRandom 
)
inlinevirtual

Implements IFastAmplitudeIntegrable.

Definition at line 116 of file FitAmpIncoherentSum.h.

116  {
118  ptr(new DalitzBWBoxSet(makeBWBoxes(pat, rnd)));
119  return ptr;
120  }
virtual DalitzBWBoxSet makeBWBoxes(const DalitzEventPattern &pat, TRandom *rnd=gRandom)

◆ makeFitAmpPairList()

counted_ptr< FitAmpPairList > FitAmpIncoherentSum::makeFitAmpPairList ( )
virtual

Implements IFastAmplitudeIntegrable.

Definition at line 242 of file FitAmpIncoherentSum.cpp.

242  {
244  for(unsigned int i=0; i < _fitAmps.size(); i++){
245  if(_fitAmps[i]->canBeIgnored()) continue;
246  l->addAmps( (_fitAmps[i]), (_fitAmps[i]));
247  }
248 
249  for(unsigned int i=0; i < _fitAmpLists.size(); i++){
250  l->append(_fitAmpLists[i]->makeFitAmpPairList());
251  }
252 
253  cout << "FitAmpIncoherentSum: setting efficiency POINTER "
254  << " in integCalculator to "
255  << _efficiency.get();
256  if(0 == _efficiency.get()){
257  cout << " (0 means no pointer, 100% efficiency).";
258  }
259  cout << endl;
260 
261  l->setEfficiency(_efficiency);
262  return l;
263 }
MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > > _efficiency
std::vector< FitAmplitude * > _fitAmps
std::vector< MINT::counted_ptr< FitAmpListBase > > _fitAmpLists
virtual MINT::counted_ptr< FitAmpPairList > makeFitAmpPairList()
X * get() const
Definition: counted_ptr.h:123

◆ makeIntegCalculator()

counted_ptr< IntegCalculator > FitAmpIncoherentSum::makeIntegCalculator ( )
virtual

Implements IFastAmplitudeIntegrable.

Definition at line 218 of file FitAmpIncoherentSum.cpp.

218  {
220  for(unsigned int i=0; i < _fitAmps.size(); i++){
221  if(_fitAmps[i]->canBeIgnored()) continue;
222  l->addAmps( (_fitAmps[i]), (_fitAmps[i]));
223  }
224 
225  for(unsigned int i=0; i < _fitAmpLists.size(); i++){
226  l->append(_fitAmpLists[i]->makeIntegCalculator());
227  }
228 
229  cout << "FitAmpIncoherentSum: setting efficiency POINTER "
230  << " in integCalculator to "
231  << _efficiency.get();
232  if(0 == _efficiency.get()){
233  cout << " (0 means no pointer, 100% efficiency).";
234  }
235  cout << endl;
236 
237  l->setEfficiency(_efficiency);
238  return l;
239 }
MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > > _efficiency
std::vector< FitAmplitude * > _fitAmps
virtual MINT::counted_ptr< IntegCalculator > makeIntegCalculator()
std::vector< MINT::counted_ptr< FitAmpListBase > > _fitAmpLists
X * get() const
Definition: counted_ptr.h:123

◆ makeIntegrationCalculator()

counted_ptr< IIntegrationCalculator > FitAmpIncoherentSum::makeIntegrationCalculator ( )
virtual

Implements IFastAmplitudeIntegrable.

Definition at line 214 of file FitAmpIncoherentSum.cpp.

214  {
216 }
virtual MINT::counted_ptr< IntegCalculator > makeIntegCalculator()

◆ operator *() [1/3]

FitAmpIncoherentSum FitAmpIncoherentSum::operator * ( double  r) const

Definition at line 314 of file FitAmpIncoherentSum.cpp.

314  {
315  FitAmpIncoherentSum fas(*this);
316  fas.multiply(r);
317  return fas;
318 }

◆ operator *() [2/3]

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

◆ operator *() [3/3]

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

Definition at line 324 of file FitAmpIncoherentSum.cpp.

324  {
325  FitAmpIncoherentSum fas(*this);
326  fas.multiply(irc);
327  return fas;
328 }

◆ operator *=() [1/3]

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

Definition at line 301 of file FitAmpIncoherentSum.cpp.

301  {
302  multiply(r);
303  return *this;
304 }
virtual void multiply(double r)

◆ operator *=() [2/3]

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

◆ operator *=() [3/3]

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

Definition at line 309 of file FitAmpIncoherentSum.cpp.

309  {
310  multiply(irc);
311  return *this;
312 }
virtual void multiply(double r)

◆ operator+()

FitAmpIncoherentSum FitAmpIncoherentSum::operator+ ( const FitAmpIncoherentSum other) const

Definition at line 294 of file FitAmpIncoherentSum.cpp.

294  {
295  FitAmpIncoherentSum fas(*this);
296  fas.add(rhs);
297  return fas;
298 }

◆ operator+=()

FitAmpIncoherentSum & FitAmpIncoherentSum::operator+= ( const FitAmpIncoherentSum other)

Definition at line 289 of file FitAmpIncoherentSum.cpp.

289  {
290  add(other);
291  return *this;
292 }
virtual int add(const FitAmpListBase &other, double factor=1)

◆ operator=() [1/2]

FitAmpIncoherentSum & FitAmpIncoherentSum::operator= ( const FitAmpIncoherentSum other)

Definition at line 128 of file FitAmpIncoherentSum.cpp.

128  {
129  if(&other == this) return *this;
130  (FitAmpList)(*this) = (FitAmpList) (other);
131  return *this;
132 }
FitAmpList(const DalitzEventPattern &pat, const char *fname=0, MINT::MinuitParameterSet *pset=0, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")
Definition: FitAmpList.cpp:19

◆ operator=() [2/2]

FitAmpIncoherentSum & FitAmpIncoherentSum::operator= ( const FitAmpList other)

Definition at line 133 of file FitAmpIncoherentSum.cpp.

133  {
134  if(&other == this) return *this;
135  (FitAmpIncoherentSum)(*this) = other;
136  return *this;
137 }
FitAmpIncoherentSum(const DalitzEventPattern &pat, const char *fname=0, MINT::MinuitParameterSet *pset=0, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")

◆ print()

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

Implements IFastAmplitudeIntegrable.

Definition at line 265 of file FitAmpIncoherentSum.cpp.

265  {
266  os << "FitAmpIncoherentSum::print\n====================";
267 
268  for(unsigned int i=0; i< this->size(); i++){
269  os << "\n\t" << this->getAmpPtr(i)->theBareDecay().oneLiner()
270  << endl;
271  }
272 }
virtual FitAmplitude * getAmpPtr(unsigned int i)
DecayTree theBareDecay() const
Definition: FitAmplitude.h:166
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375
virtual unsigned int size() const

◆ printLargestAmp() [1/2]

void FitAmpIncoherentSum::printLargestAmp ( std::ostream &  os = std::cout)

◆ printLargestAmp() [2/2]

virtual void FitAmpIncoherentSum::printLargestAmp ( IDalitzEvent evt,
std::ostream &  os = std::cout 
)
inlinevirtual

Reimplemented from FitAmpList.

Definition at line 125 of file FitAmpIncoherentSum.h.

125  {
126  FitAmpList::printLargestAmp(evt, os);}
virtual void printLargestAmp(IDalitzEvent &evt, std::ostream &os=std::cout)
Definition: FitAmpList.cpp:231

◆ printNonZero()

void FitAmpIncoherentSum::printNonZero ( std::ostream &  os = std::cout) const
virtual

Reimplemented from FitAmpList.

Definition at line 273 of file FitAmpIncoherentSum.cpp.

273  {
274  os << "FitAmpSum::print\n====================";
275 
276  for(unsigned int i=0; i < this->size(); i++){
277  if(this->getAmpPtr(i)->isZero()) continue;
278  os << "\n\t" << this->getAmpPtr(i)->theBareDecay().oneLiner()
279  << endl;
280  }
281 }
bool isZero() const
Definition: FitAmplitude.h:98
virtual FitAmplitude * getAmpPtr(unsigned int i)
DecayTree theBareDecay() const
Definition: FitAmplitude.h:166
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375
virtual unsigned int size() const

◆ Prob()

virtual double FitAmpIncoherentSum::Prob ( IDalitzEvent evt)
inlinevirtual

Definition at line 95 of file FitAmpIncoherentSum.h.

95  {
96  return getVal(evt);
97  }
double getVal(IDalitzEvent &evt)

◆ RealVal()

virtual double FitAmpIncoherentSum::RealVal ( IDalitzEvent evt)
inlinevirtual

Implements ILookLikeFitAmpSum.

Definition at line 105 of file FitAmpIncoherentSum.h.

105  {
106  return Prob(evt);
107  }
virtual double Prob(IDalitzEvent &evt)

◆ useAnalyticGradient()

virtual bool FitAmpIncoherentSum::useAnalyticGradient ( )
inlinevirtual

Reimplemented from IFastAmplitudeIntegrable.

Definition at line 84 of file FitAmpIncoherentSum.h.

84 {return _useAnalyticGradient;}
MINT::NamedParameter< int > _useAnalyticGradient

Friends And Related Function Documentation

◆ FitAmplitude

friend class FitAmplitude
friend

Definition at line 131 of file FitAmpIncoherentSum.h.

Member Data Documentation

◆ _useAnalyticGradient

MINT::NamedParameter<int> FitAmpIncoherentSum::_useAnalyticGradient
protected

Definition at line 31 of file FitAmpIncoherentSum.h.


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