MINT2
Public Member Functions | Friends | List of all members
MultiTopHat Class Reference

#include <MultiTopHat.h>

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

Public Member Functions

 MultiTopHat ()
 
 MultiTopHat (const MultiTopHat &other)
 
 MultiTopHat (const FitAmpListBase &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)
 
std::complex< double > getVal (IDalitzEvent &evt)
 
std::complex< double > getVal (IDalitzEvent *evtPtr)
 
virtual MINT::counted_ptr< IIntegrationCalculatormakeIntegrationCalculator ()
 
virtual MINT::counted_ptr< IntegCalculatormakeIntegCalculator ()
 
virtual MINT::counted_ptr< FitAmpPairListmakeFitAmpPairList ()
 
virtual double Prob (IDalitzEvent &evt)
 
virtual std::complex< double > ComplexVal (IDalitzEvent &evt)
 
virtual double RealVal (IDalitzEvent &evt)
 
virtual MINT::counted_ptr< MINT::IUnweightedEventGenerator< IDalitzEvent > > makeEventGenerator (const DalitzEventPattern &pat, TRandom *rnd=gRandom)
 
virtual void print (std::ostream &os=std::cout) const
 
virtual void printNonZero (std::ostream &os=std::cout) const
 
virtual ~MultiTopHat ()
 
MultiTopHatoperator *= (double r)
 
MultiTopHatoperator *= (const std::complex< double > &z)
 
MultiTopHatoperator *= (const MINT::counted_ptr< MINT::IReturnComplex > &irc)
 
MultiTopHat operator * (double r) const
 
MultiTopHat operator * (const std::complex< double > &z) const
 
MultiTopHat operator * (const MINT::counted_ptr< MINT::IReturnComplex > &irc) const
 
MultiTopHatoperator= (const MultiTopHat &other)
 
MultiTopHatoperator= (const FitAmpListBase &other)
 
MultiTopHatoperator+= (const MultiTopHat &other)
 
MultiTopHat operator+ (const MultiTopHat &other) const
 
- 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 IFastAmplitudeIntegrable
virtual void Gradient (IDalitzEvent &evt, std::vector< double > &grad, MINT::MinuitParameterSet *mps)
 
virtual bool useAnalyticGradient ()
 
virtual ~IFastAmplitudeIntegrable ()
 
- Public Member Functions inherited from ILookLikeFitAmpSum
virtual ~ILookLikeFitAmpSum ()
 
- 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 MINT::counted_ptr< FitAmpListBaseGetCPConjugateSameFitParameters () const
 
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 ()
 
virtual void printLargestAmp (IDalitzEvent &evt, std::ostream &os=std::cout)
 
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)
 
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
 

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 ()
 
- Protected Attributes inherited from FitAmpListBase
std::vector< FitAmplitude * > _fitAmps
 
std::vector< MINT::counted_ptr< FitAmpListBase > > _fitAmpLists
 
MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > > _efficiency
 

Detailed Description

Definition at line 23 of file MultiTopHat.h.

Constructor & Destructor Documentation

◆ MultiTopHat() [1/3]

MultiTopHat::MultiTopHat ( )

Definition at line 17 of file MultiTopHat.cpp.

18  : FitAmpListBase()
19 {
20 }

◆ MultiTopHat() [2/3]

MultiTopHat::MultiTopHat ( const MultiTopHat other)

◆ MultiTopHat() [3/3]

MultiTopHat::MultiTopHat ( const FitAmpListBase other)

◆ ~MultiTopHat()

MultiTopHat::~MultiTopHat ( )
virtual

Definition at line 157 of file MultiTopHat.cpp.

157  {
158  // deleteAll(); (done by base class)
159 }

Member Function Documentation

◆ ComplexVal()

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

Reimplemented from IFastAmplitudeIntegrable.

Definition at line 72 of file MultiTopHat.h.

72 {return getVal(evt);}
std::complex< double > getVal(IDalitzEvent &evt)
Definition: MultiTopHat.cpp:78

◆ GetCloneSameFitParameters()

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

Reimplemented from FitAmpListBase.

Definition at line 37 of file MultiTopHat.cpp.

37  {
38 // need to reform these one day...
39 // ... it all relies on the copy-constructur/=operator in FitAmpitude
40 // not copying the fit parameters, but just their pointers
41 // which will need to be reviewed.
42 //
43  bool dbThis=true;
44  if(dbThis) cout << "FitAmpSum::GetCloneSameFitParameters()" << endl;
45  /*
46  There'll be 'physical' copies of all Amplitudes, but the
47  FitParameters remain the same (pointers to the same
48  FitParameter Object). This is useful for the CP-con coding
49  as it is now, but perhaps a bit counter-intuitive. needs to
50  be reviewed at some point. This behaviour is defined in the
51  copy constructor of the FitAmplitude class.
52  */
53 
54  /*
55  counted_ptr<MultiTopHat>
56  newList(new MultiTopHat((IDalitzEventList*) this->getEventRecord()
57  , _paraFName.c_str(), _minuitParaSet));
58  */
59  counted_ptr<MultiTopHat> newList(new MultiTopHat(*this));
60  newList->deleteAll();
61 
62  newList->add(*this);
63  if(dbThis) cout << "cloning MultiTopHat " << newList->size() << endl;
64  return newList;
65 }

◆ getVal() [1/2]

std::complex< double > MultiTopHat::getVal ( IDalitzEvent evt)

Definition at line 78 of file MultiTopHat.cpp.

78  {
79  bool dbthis=false;
80 
81  complex<double> sum(0.0, 0.0);
82 
83  for(unsigned int i=0; i< this->size(); i++){
84  if(dbthis){
85  cout << "MultiTopHat::getVal()"
86  << "\n > for " << getAmpPtr(i)->theBareDecay().oneLiner()
87  << "\n > I get " << getAmpPtr(i)->getVal(evt)
88  << endl;
89  }
90  sum += this->getAmpPtr(i)->getVal(evt);
91  }
92 
93  if(dbthis) cout << "MultiTopHat::getVal(evt):"
94  << " returning this: " << sum
95  << endl;
96 
97  return efficiency(evt)*sum;
98 }
virtual FitAmplitude * getAmpPtr(unsigned int i)
virtual std::complex< double > getVal(IDalitzEvent &evt)
DecayTree theBareDecay() const
Definition: FitAmplitude.h:166
double efficiency(IDalitzEvent &evt)
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375
virtual unsigned int size() const

◆ getVal() [2/2]

std::complex<double> MultiTopHat::getVal ( IDalitzEvent evtPtr)
inline

Definition at line 57 of file MultiTopHat.h.

57  {
58  if(0 == evtPtr) return 0;
59  return getVal(*evtPtr);
60  }
std::complex< double > getVal(IDalitzEvent &evt)
Definition: MultiTopHat.cpp:78

◆ makeBoxes()

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

Definition at line 47 of file MultiTopHat.h.

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

◆ makeBWBoxes()

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

Implements ILookLikeFitAmpSum.

Definition at line 51 of file MultiTopHat.h.

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

◆ makeEventGenerator()

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

Implements IFastAmplitudeIntegrable.

Definition at line 85 of file MultiTopHat.h.

85  {
87  ptr(new DalitzBWBoxSet(makeBWBoxes(pat, rnd)));
88  return ptr;
89  }
virtual DalitzBWBoxSet makeBWBoxes(const DalitzEventPattern &pat, TRandom *rnd=gRandom)
Definition: MultiTopHat.h:51

◆ makeFitAmpPairList()

counted_ptr< FitAmpPairList > MultiTopHat::makeFitAmpPairList ( )
virtual

Reimplemented from FitAmpListBase.

Definition at line 132 of file MultiTopHat.cpp.

132  {
134  for(unsigned int i=0; i < _fitAmps.size(); i++){
135  if(_fitAmps[i]->canBeIgnored()) continue;
136  l->addAmps( (_fitAmps[i]), (_fitAmps[i]));
137  }
138 
139  for(unsigned int i=0; i < _fitAmpLists.size(); i++){
140  l->append(_fitAmpLists[i]->makeFitAmpPairList());
141  }
142 
143  cout << "MultiTopHat: setting efficiency POINTER "
144  << " in integCalculator to "
145  << _efficiency.get();
146  if(0 == _efficiency.get()){
147  cout << " (0 means no pointer, 100% efficiency).";
148  }
149  cout << endl;
150 
151  l->setEfficiency(_efficiency);
152 
153 
154  return l;
155 }
virtual MINT::counted_ptr< FitAmpPairList > makeFitAmpPairList()
MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > > _efficiency
std::vector< FitAmplitude * > _fitAmps
std::vector< MINT::counted_ptr< FitAmpListBase > > _fitAmpLists
X * get() const
Definition: counted_ptr.h:123

◆ makeIntegCalculator()

counted_ptr< IntegCalculator > MultiTopHat::makeIntegCalculator ( )
virtual

Reimplemented from FitAmpListBase.

Definition at line 105 of file MultiTopHat.cpp.

105  {
107  for(unsigned int i=0; i < _fitAmps.size(); i++){
108  if(_fitAmps[i]->canBeIgnored()) continue;
109  l->addAmps( (_fitAmps[i]), (_fitAmps[i]));
110  }
111 
112  for(unsigned int i=0; i < _fitAmpLists.size(); i++){
113  l->append(_fitAmpLists[i]->makeIntegCalculator());
114  }
115 
116  cout << "MultiTopHat: setting efficiency POINTER "
117  << " in integCalculator to "
118  << _efficiency.get();
119  if(0 == _efficiency.get()){
120  cout << " (0 means no pointer, 100% efficiency).";
121  }
122  cout << endl;
123 
124  l->setEfficiency(_efficiency);
125 
126  cout << "MultiTopHat::makeIntegCalculator(): returning " << endl;
127  l->print();
128  return l;
129 }
virtual MINT::counted_ptr< IntegCalculator > makeIntegCalculator()
MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > > _efficiency
std::vector< FitAmplitude * > _fitAmps
std::vector< MINT::counted_ptr< FitAmpListBase > > _fitAmpLists
X * get() const
Definition: counted_ptr.h:123

◆ makeIntegrationCalculator()

counted_ptr< IIntegrationCalculator > MultiTopHat::makeIntegrationCalculator ( )
virtual

Reimplemented from FitAmpListBase.

Definition at line 101 of file MultiTopHat.cpp.

101  {
103 }
virtual MINT::counted_ptr< IntegCalculator > makeIntegCalculator()

◆ operator *() [1/3]

MultiTopHat MultiTopHat::operator * ( double  r) const

Definition at line 187 of file MultiTopHat.cpp.

187  {
188  MultiTopHat fas(*this);
189  fas.multiply(r);
190  return fas;
191 }

◆ operator *() [2/3]

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

◆ operator *() [3/3]

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

Definition at line 197 of file MultiTopHat.cpp.

197  {
198  MultiTopHat fas(*this);
199  fas.multiply(irc);
200  return fas;
201 }

◆ operator *=() [1/3]

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

Definition at line 174 of file MultiTopHat.cpp.

174  {
175  multiply(r);
176  return *this;
177 }
virtual void multiply(double r)

◆ operator *=() [2/3]

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

◆ operator *=() [3/3]

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

Definition at line 182 of file MultiTopHat.cpp.

182  {
183  multiply(irc);
184  return *this;
185 }
virtual void multiply(double r)

◆ operator+()

MultiTopHat MultiTopHat::operator+ ( const MultiTopHat other) const

Definition at line 167 of file MultiTopHat.cpp.

167  {
168  MultiTopHat fas(*this);
169  fas.add(rhs);
170  return fas;
171 }

◆ operator+=()

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

Definition at line 162 of file MultiTopHat.cpp.

162  {
163  add(other);
164  return *this;
165 }
virtual int add(const FitAmpListBase &other, double factor=1)

◆ operator=() [1/2]

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

Definition at line 67 of file MultiTopHat.cpp.

67  {
68  if(&other == this) return *this;
69  (FitAmpListBase)(*this) = (FitAmpListBase) (other);
70  return *this;
71 }

◆ operator=() [2/2]

MultiTopHat & MultiTopHat::operator= ( const FitAmpListBase other)

Definition at line 72 of file MultiTopHat.cpp.

72  {
73  if(&other == this) return *this;
74  (MultiTopHat)(*this) = other;
75  return *this;
76 }

◆ print()

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

Reimplemented from FitAmpListBase.

Definition at line 91 of file MultiTopHat.h.

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

◆ printNonZero()

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

Reimplemented from FitAmpListBase.

Definition at line 93 of file MultiTopHat.h.

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

◆ Prob()

virtual double MultiTopHat::Prob ( IDalitzEvent evt)
inlinevirtual

Definition at line 67 of file MultiTopHat.h.

67  {
68  std::complex<double> res = getVal(evt);
69  return res.real()*res.real() + res.imag()*res.imag();
70  }
std::complex< double > getVal(IDalitzEvent &evt)
Definition: MultiTopHat.cpp:78

◆ RealVal()

virtual double MultiTopHat::RealVal ( IDalitzEvent evt)
inlinevirtual

Implements ILookLikeFitAmpSum.

Definition at line 74 of file MultiTopHat.h.

74  {
75  return Prob(evt);
76  }
virtual double Prob(IDalitzEvent &evt)
Definition: MultiTopHat.h:67

Friends And Related Function Documentation

◆ FitAmplitude

friend class FitAmplitude
friend

Definition at line 98 of file MultiTopHat.h.


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