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

#include <FlexiIntegCalculator.h>

Inheritance diagram for IntegCalculator:
IIntegrationCalculator IIntegrationCalculator

Public Member Functions

 IntegCalculator ()
 
 IntegCalculator (const IntegCalculator &other)
 
 IntegCalculator (const FitAmpPairList &wEff)
 
virtual MINT::counted_ptr< IIntegrationCalculatorclone_IIntegrationCalculator () const
 
const FitAmpPairListwithEff () const
 
const FitAmpPairListnoEff () const
 
void setEfficiency (MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > > eff)
 
void unsetEfficiency ()
 
double efficiency (IDalitzEvent *evtPtr)
 
virtual void addAmps (FitAmplitude *a1, FitAmplitude *a2)
 
virtual void addEvent (IDalitzEvent *evtPtr, double weight=1)
 
virtual void addEvent (MINT::counted_ptr< IDalitzEvent > evtPtr, double weight=1)
 
virtual void reAddEvent (IDalitzEvent *evtPtr, double weight=1)
 
virtual void reAddEvent (MINT::counted_ptr< IDalitzEvent > evtPtr, double weight=1)
 
virtual bool add (const IntegCalculator &other)
 
virtual bool add (const IntegCalculator *other)
 
virtual bool add (const MINT::const_counted_ptr< IntegCalculator > &other)
 
virtual bool append (const IntegCalculator &other)
 
virtual bool append (const IntegCalculator *other)
 
virtual bool append (const MINT::const_counted_ptr< IntegCalculator > &other)
 
virtual int numEvents () const
 
virtual double integral () const
 
virtual double variance () const
 
double sumOfFitFractions ()
 
double absSumOfInterferenceFractions ()
 
double absSumOfSqrtInterferenceFractions ()
 
double sumOfSqrtFitFractions ()
 
int numberOfFitFractionsLargerThanThreshold (double threshold)
 
virtual bool makeAndStoreFractions (MINT::Minimiser *mini=0)
 
virtual double getFractionChi2 () const
 
virtual DalitzHistoSet histoSet () const
 
virtual void saveEachAmpsHistograms (const std::string &prefix) const
 
virtual std::vector< DalitzHistoSetGetEachAmpsHistograms ()
 
virtual DalitzHistoSet interferenceHistoSet () const
 
virtual void saveInterferenceHistograms (const std::string &prefix) const
 
virtual std::vector< DalitzHistoSetGetInterferenceHistograms ()
 
virtual void doFinalStats (MINT::Minimiser *mini=0)
 
virtual bool save (const std::string &dirname) const
 
virtual bool retrieve (const std::string &commaSeparatedList)
 
virtual bool retrieveSingle (const std::string &dirname)
 
virtual FitFractionList getFractions () const
 
virtual void print (std::ostream &os=std::cout) const
 
bool needToReIntegrate () const
 
void startIntegration ()
 
void startReIntegration ()
 
void endIntegration ()
 
virtual ~IntegCalculator ()
 
 IntegCalculator ()
 
 IntegCalculator (const IntegCalculator &other)
 
 IntegCalculator (const FitAmpPairList &wEff)
 
virtual MINT::counted_ptr< IIntegrationCalculatorclone_IIntegrationCalculator () const
 
const FitAmpPairListwithEff () const
 
const FitAmpPairListnoEff () const
 
void setEfficiency (MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > > eff)
 
void unsetEfficiency ()
 
double efficiency (IDalitzEvent *evtPtr)
 
virtual void addAmps (FitAmplitude *a1, FitAmplitude *a2)
 
virtual void addEvent (IDalitzEvent *evtPtr, double weight=1)
 
virtual void addEvent (IDalitzEvent &evt, double weight=1)
 
virtual void addEvent (MINT::counted_ptr< IDalitzEvent > evtPtr, double weight=1)
 
virtual void reAddEvent (IDalitzEvent *evtPtr, double weight=1)
 
virtual void reAddEvent (IDalitzEvent &evt, double weight=1)
 
virtual void reAddEvent (MINT::counted_ptr< IDalitzEvent > evtPtr, double weight=1)
 
virtual bool add (const IntegCalculator &other)
 
virtual bool add (const IntegCalculator *other)
 
virtual bool add (const MINT::const_counted_ptr< IntegCalculator > &other)
 
virtual bool append (const IntegCalculator &other)
 
virtual bool append (const IntegCalculator *other)
 
virtual bool append (const MINT::const_counted_ptr< IntegCalculator > &other)
 
virtual int numEvents () const
 
virtual double integral () const
 
virtual double variance () const
 
virtual std::complex< double > ComplexSum () const
 
virtual void Gradient (MINT::MinuitParameterSet *mps, std::vector< double > &grad)
 
virtual void GradientForLasso (MINT::MinuitParameterSet *mps, std::vector< double > &grad)
 
double sumOfFitFractions ()
 
double absSumOfInterferenceFractions ()
 
double absSumOfSqrtInterferenceFractions ()
 
double sumOfSqrtFitFractions ()
 
int numberOfFitFractionsLargerThanThreshold (double threshold)
 
virtual bool makeAndStoreFractions (MINT::Minimiser *mini=0)
 
virtual double getFractionChi2 () const
 
virtual DalitzHistoSet histoSet () const
 
virtual DalitzHistoSet un_normalised_histoSetRe () const
 
virtual DalitzHistoSet un_normalised_histoSetIm () const
 
virtual void saveEachAmpsHistograms (const std::string &prefix) const
 
virtual std::vector< DalitzHistoSetGetEachAmpsHistograms ()
 
virtual DalitzHistoSet interferenceHistoSet () const
 
virtual void saveInterferenceHistograms (const std::string &prefix) const
 
virtual std::vector< DalitzHistoSetGetInterferenceHistograms ()
 
virtual void doFinalStats (MINT::Minimiser *mini=0)
 
virtual bool save (const std::string &dirname) const
 
virtual bool retrieve (const std::string &commaSeparatedList)
 
virtual bool retrieveSingle (const std::string &dirname)
 
virtual FitFractionList getFractions () const
 
virtual void print (std::ostream &os=std::cout) const
 
bool needToReIntegrate () const
 
void startIntegration ()
 
void startReIntegration ()
 
void endIntegration ()
 
virtual ~IntegCalculator ()
 
- Public Member Functions inherited from IIntegrationCalculator
virtual ~IIntegrationCalculator ()
 

Protected Member Functions

FitAmpPairListwithEff ()
 
FitAmpPairListnoEff ()
 
bool makeDirectories (const std::string &asSubdirOf=".") const
 
FitAmpPairListwithEff ()
 
FitAmpPairListnoEff ()
 
bool makeDirectories (const std::string &asSubdirOf=".") const
 

Static Protected Member Functions

static std::string dirNameWithEff ()
 
static std::string dirNameNoEff ()
 
static std::string dirNameWithEff ()
 
static std::string dirNameNoEff ()
 

Protected Attributes

FitAmpPairList _withEff
 
FitAmpPairList _noEff
 
bool _onlyOneFitAmpPairList
 

Detailed Description

Definition at line 17 of file FlexiIntegCalculator.h.

Constructor & Destructor Documentation

◆ IntegCalculator() [1/6]

IntegCalculator::IntegCalculator ( )

Definition at line 34 of file IntegCalculator.cpp.

36 {
37 }
FitAmpPairList _withEff
FitAmpPairList _noEff

◆ IntegCalculator() [2/6]

IntegCalculator::IntegCalculator ( const IntegCalculator other)

Definition at line 49 of file IntegCalculator.cpp.

◆ IntegCalculator() [3/6]

IntegCalculator::IntegCalculator ( const FitAmpPairList wEff)

Definition at line 38 of file IntegCalculator.cpp.

39  : _withEff(wEff), _noEff(wEff)
40 {
41  if(! wEff.haveEfficiency()){
43  }else{
44  _onlyOneFitAmpPairList = false;
46  }
47 }
bool haveEfficiency() const
FitAmpPairList _withEff
FitAmpPairList _noEff

◆ ~IntegCalculator() [1/2]

virtual IntegCalculator::~IntegCalculator ( )
inlinevirtual

Definition at line 108 of file FlexiIntegCalculator.h.

108 {}

◆ IntegCalculator() [4/6]

IntegCalculator::IntegCalculator ( )

◆ IntegCalculator() [5/6]

IntegCalculator::IntegCalculator ( const IntegCalculator other)

◆ IntegCalculator() [6/6]

IntegCalculator::IntegCalculator ( const FitAmpPairList wEff)

◆ ~IntegCalculator() [2/2]

virtual IntegCalculator::~IntegCalculator ( )
inlinevirtual

Definition at line 123 of file IntegCalculator.h.

123 {}

Member Function Documentation

◆ absSumOfInterferenceFractions() [1/2]

double IntegCalculator::absSumOfInterferenceFractions ( )
inline

Definition at line 66 of file FlexiIntegCalculator.h.

66  {
68  }
double absSumOfInterferenceFractions()
FitAmpPairList & withEff()

◆ absSumOfInterferenceFractions() [2/2]

double IntegCalculator::absSumOfInterferenceFractions ( )
inline

Definition at line 79 of file IntegCalculator.h.

79  {
81  }
double absSumOfInterferenceFractions()
FitAmpPairList & withEff()

◆ absSumOfSqrtInterferenceFractions() [1/2]

double IntegCalculator::absSumOfSqrtInterferenceFractions ( )
inline

Definition at line 70 of file FlexiIntegCalculator.h.

70  {
72  }
double absSumOfSqrtInterferenceFractions()
FitAmpPairList & withEff()

◆ absSumOfSqrtInterferenceFractions() [2/2]

double IntegCalculator::absSumOfSqrtInterferenceFractions ( )
inline

Definition at line 83 of file IntegCalculator.h.

83  {
85  }
double absSumOfSqrtInterferenceFractions()
FitAmpPairList & withEff()

◆ add() [1/6]

bool IntegCalculator::add ( const IntegCalculator other)
virtual

Definition at line 104 of file IntegCalculator.cpp.

104  {
105  bool sc=true;
106  sc |= withEff().add(other.withEff());
107  sc |= noEff().add(other.noEff());
108  return sc;
109 }
FitAmpPairList & noEff()
virtual bool add(const FitAmpPairList &otherList)
FitAmpPairList & withEff()

◆ add() [2/6]

bool IntegCalculator::add ( const IntegCalculator other)
virtual

Definition at line 110 of file IntegCalculator.cpp.

110  {
111  if(0 != other) return add(*other);
112  return true;
113 }
virtual bool add(const IntegCalculator &other)

◆ add() [3/6]

bool IntegCalculator::add ( const MINT::const_counted_ptr< IntegCalculator > &  other)
virtual

Definition at line 114 of file IntegCalculator.cpp.

114  {
115  if(0 != other) return add(*other);
116  return true;
117 }
virtual bool add(const IntegCalculator &other)

◆ add() [4/6]

virtual bool IntegCalculator::add ( const IntegCalculator other)
virtual

◆ add() [5/6]

virtual bool IntegCalculator::add ( const IntegCalculator other)
virtual

◆ add() [6/6]

virtual bool IntegCalculator::add ( const MINT::const_counted_ptr< IntegCalculator > &  other)
virtual

◆ addAmps() [1/2]

void IntegCalculator::addAmps ( FitAmplitude a1,
FitAmplitude a2 
)
virtual

Definition at line 73 of file IntegCalculator.cpp.

73  {
74  withEff().addAmps(a1, a2);
75  if(! _onlyOneFitAmpPairList) noEff().addAmps(a1, a2);
76 }
virtual void addAmps(FitAmplitude *a1, FitAmplitude *a2)
FitAmpPairList & noEff()
FitAmpPairList & withEff()

◆ addAmps() [2/2]

virtual void IntegCalculator::addAmps ( FitAmplitude a1,
FitAmplitude a2 
)
virtual

◆ addEvent() [1/5]

void IntegCalculator::addEvent ( IDalitzEvent evtPtr,
double  weight = 1 
)
virtual

Implements IIntegrationCalculator.

Definition at line 77 of file IntegCalculator.cpp.

77  {
78  if(0 == evtPtr) return;
79  addEvent(*evtPtr, weight);
80 }
virtual void addEvent(IDalitzEvent *evtPtr, double weight=1)

◆ addEvent() [2/5]

void IntegCalculator::addEvent ( MINT::counted_ptr< IDalitzEvent evtPtr,
double  weight = 1 
)
virtual

Implements IIntegrationCalculator.

Definition at line 85 of file IntegCalculator.cpp.

86  {
87  if(0 == evtPtr) return;
88  addEvent(*evtPtr, weight);
89 }
virtual void addEvent(IDalitzEvent *evtPtr, double weight=1)

◆ addEvent() [3/5]

virtual void IntegCalculator::addEvent ( IDalitzEvent evtPtr,
double  weight = 1 
)
virtual

◆ addEvent() [4/5]

void IntegCalculator::addEvent ( IDalitzEvent evt,
double  weight = 1 
)
virtual

Definition at line 81 of file IntegCalculator.cpp.

81  {
82  withEff().addEvent(evt, weight);
83  if(! _onlyOneFitAmpPairList) noEff().addEvent(evt, weight);
84 }
FitAmpPairList & noEff()
virtual void addEvent(IDalitzEvent *evtPtr, double weight=1)
FitAmpPairList & withEff()

◆ addEvent() [5/5]

virtual void IntegCalculator::addEvent ( MINT::counted_ptr< IDalitzEvent evtPtr,
double  weight = 1 
)
virtual

◆ append() [1/6]

bool IntegCalculator::append ( const IntegCalculator other)
virtual

Definition at line 119 of file IntegCalculator.cpp.

119  {
120  bool sc=true;
121  sc |= withEff().append(other.withEff());
122  sc |= noEff().append(other.noEff());
123  return sc;
124 }
virtual bool append(const FitAmpPairList &otherListPtr)
FitAmpPairList & noEff()
FitAmpPairList & withEff()

◆ append() [2/6]

bool IntegCalculator::append ( const IntegCalculator other)
virtual

Definition at line 125 of file IntegCalculator.cpp.

125  {
126  if(0 != other) return append(*other);
127  return true;
128 }
virtual bool append(const IntegCalculator &other)

◆ append() [3/6]

bool IntegCalculator::append ( const MINT::const_counted_ptr< IntegCalculator > &  other)
virtual

Definition at line 129 of file IntegCalculator.cpp.

129  {
130  if(0 != other) return append(*other);
131  return true;
132 }
virtual bool append(const IntegCalculator &other)

◆ append() [4/6]

virtual bool IntegCalculator::append ( const IntegCalculator other)
virtual

◆ append() [5/6]

virtual bool IntegCalculator::append ( const IntegCalculator other)
virtual

◆ append() [6/6]

virtual bool IntegCalculator::append ( const MINT::const_counted_ptr< IntegCalculator > &  other)
virtual

◆ clone_IIntegrationCalculator() [1/2]

counted_ptr< IIntegrationCalculator > IntegCalculator::clone_IIntegrationCalculator ( ) const
virtual

Implements IIntegrationCalculator.

Definition at line 57 of file IntegCalculator.cpp.

◆ clone_IIntegrationCalculator() [2/2]

virtual MINT::counted_ptr<IIntegrationCalculator> IntegCalculator::clone_IIntegrationCalculator ( ) const
virtual

◆ ComplexSum()

std::complex< double > IntegCalculator::ComplexSum ( ) const
virtual

Definition at line 155 of file IntegCalculator.cpp.

155  {
156  return withEff().ComplexSum();
157 }
virtual std::complex< double > ComplexSum() const
FitAmpPairList & withEff()

◆ dirNameNoEff() [1/2]

std::string IntegCalculator::dirNameNoEff ( )
staticprotected

Definition at line 21 of file IntegCalculator.cpp.

21  {
22  return "Without_EfficiencyEffects";
23 }

◆ dirNameNoEff() [2/2]

static std::string IntegCalculator::dirNameNoEff ( )
staticprotected

◆ dirNameWithEff() [1/2]

std::string IntegCalculator::dirNameWithEff ( )
staticprotected

Definition at line 18 of file IntegCalculator.cpp.

18  {
19  return "With_EfficiencyEffects";
20 }

◆ dirNameWithEff() [2/2]

static std::string IntegCalculator::dirNameWithEff ( )
staticprotected

◆ doFinalStats() [1/2]

void IntegCalculator::doFinalStats ( MINT::Minimiser mini = 0)
virtual

Implements IIntegrationCalculator.

Definition at line 206 of file IntegCalculator.cpp.

206  {
207  bool dbThis=false;
208  if(dbThis) cout << "IntegCalculator::doFinalStats called" << endl;
209  makeAndStoreFractions(mini);
210 }
virtual bool makeAndStoreFractions(MINT::Minimiser *mini=0)

◆ doFinalStats() [2/2]

virtual void IntegCalculator::doFinalStats ( MINT::Minimiser mini = 0)
virtual

◆ efficiency() [1/2]

double IntegCalculator::efficiency ( IDalitzEvent evtPtr)

◆ efficiency() [2/2]

double IntegCalculator::efficiency ( IDalitzEvent evtPtr)

◆ endIntegration() [1/2]

void IntegCalculator::endIntegration ( )

Definition at line 315 of file IntegCalculator.cpp.

315  {
318 }
FitAmpPairList & noEff()
FitAmpPairList & withEff()

◆ endIntegration() [2/2]

void IntegCalculator::endIntegration ( )

◆ GetEachAmpsHistograms() [1/2]

std::vector< DalitzHistoSet > IntegCalculator::GetEachAmpsHistograms ( )
virtual

Definition at line 188 of file IntegCalculator.cpp.

188  {
190  else return noEff().GetEachAmpsHistograms();
191 }
std::vector< DalitzHistoSet > GetEachAmpsHistograms()
FitAmpPairList & noEff()
FitAmpPairList & withEff()

◆ GetEachAmpsHistograms() [2/2]

virtual std::vector<DalitzHistoSet> IntegCalculator::GetEachAmpsHistograms ( )
virtual

◆ getFractionChi2() [1/2]

double IntegCalculator::getFractionChi2 ( ) const
virtual

Implements IIntegrationCalculator.

Definition at line 170 of file IntegCalculator.cpp.

170  {
171  return noEff().getFractionChi2();
172 }
virtual double getFractionChi2() const
FitAmpPairList & noEff()

◆ getFractionChi2() [2/2]

virtual double IntegCalculator::getFractionChi2 ( ) const
virtual

◆ getFractions() [1/2]

FitFractionList IntegCalculator::getFractions ( ) const
virtual

Implements IIntegrationCalculator.

Definition at line 292 of file IntegCalculator.cpp.

292  {
293  return withEff().getFractions();
294 }
FitFractionList getFractions() const
FitAmpPairList & withEff()

◆ getFractions() [2/2]

virtual FitFractionList IntegCalculator::getFractions ( ) const
virtual

◆ GetInterferenceHistograms() [1/2]

std::vector< DalitzHistoSet > IntegCalculator::GetInterferenceHistograms ( )
virtual

Definition at line 201 of file IntegCalculator.cpp.

201  {
203  else return noEff().GetInterferenceHistograms();
204 }
std::vector< DalitzHistoSet > GetInterferenceHistograms()
FitAmpPairList & noEff()
FitAmpPairList & withEff()

◆ GetInterferenceHistograms() [2/2]

virtual std::vector<DalitzHistoSet> IntegCalculator::GetInterferenceHistograms ( )
virtual

◆ Gradient()

virtual void IntegCalculator::Gradient ( MINT::MinuitParameterSet mps,
std::vector< double > &  grad 
)
inlinevirtual

Definition at line 68 of file IntegCalculator.h.

68  {
69  withEff().Gradient(mps,grad);
70  }
virtual void Gradient(MINT::MinuitParameterSet *mps, std::vector< double > &grad)
FitAmpPairList & withEff()

◆ GradientForLasso()

virtual void IntegCalculator::GradientForLasso ( MINT::MinuitParameterSet mps,
std::vector< double > &  grad 
)
inlinevirtual

Definition at line 71 of file IntegCalculator.h.

71  {
72  withEff().GradientForLasso(mps,grad);
73  }
virtual void GradientForLasso(MINT::MinuitParameterSet *mps, std::vector< double > &grad)
FitAmpPairList & withEff()

◆ histoSet() [1/2]

DalitzHistoSet IntegCalculator::histoSet ( ) const
virtual

Implements IIntegrationCalculator.

Definition at line 174 of file IntegCalculator.cpp.

174  {
175  return withEff().histoSet();
176 }
virtual DalitzHistoSet histoSet() const
FitAmpPairList & withEff()

◆ histoSet() [2/2]

virtual DalitzHistoSet IntegCalculator::histoSet ( ) const
virtual

◆ integral() [1/2]

double IntegCalculator::integral ( ) const
virtual

Implements IIntegrationCalculator.

Definition at line 148 of file IntegCalculator.cpp.

148  {
149  return withEff().integral();
150 }
virtual double integral() const
FitAmpPairList & withEff()

◆ integral() [2/2]

virtual double IntegCalculator::integral ( ) const
virtual

◆ interferenceHistoSet() [1/2]

DalitzHistoSet IntegCalculator::interferenceHistoSet ( ) const
virtual

Definition at line 193 of file IntegCalculator.cpp.

193  {
194  return withEff().interferenceHistoSet();
195 }
DalitzHistoSet interferenceHistoSet() const
FitAmpPairList & withEff()

◆ interferenceHistoSet() [2/2]

virtual DalitzHistoSet IntegCalculator::interferenceHistoSet ( ) const
virtual

◆ makeAndStoreFractions() [1/2]

bool IntegCalculator::makeAndStoreFractions ( MINT::Minimiser mini = 0)
virtual

Implements IIntegrationCalculator.

Definition at line 159 of file IntegCalculator.cpp.

159  {
160  bool dbThis=false;
161  if(dbThis){
162  cout << "Fractions WITH efficiency (for debug only)" << endl;
163  withEff().makeAndStoreFractions("wrongFractions_WithEff","fitFractions_wrong_WithEff.root",mini);
164  cout << "\n and now Fractions WITHOUT efficiency"
165  << " (i.e. what you really want):" << endl;
166  }
168  else return noEff().makeAndStoreFractions(mini);
169 }
FitAmpPairList & noEff()
virtual bool makeAndStoreFractions(MINT::Minimiser *mini=0)
FitAmpPairList & withEff()

◆ makeAndStoreFractions() [2/2]

virtual bool IntegCalculator::makeAndStoreFractions ( MINT::Minimiser mini = 0)
virtual

◆ makeDirectories() [1/2]

bool IntegCalculator::makeDirectories ( const std::string &  asSubdirOf = ".") const
protected

Definition at line 212 of file IntegCalculator.cpp.

212  {
213  /*
214  A mode is created from or'd permission bit masks defined
215  in <sys/stat.h>:
216  #define S_IRWXU 0000700 RWX mask for owner
217  #define S_IRUSR 0000400 R for owner
218  #define S_IWUSR 0000200 W for owner
219  #define S_IXUSR 0000100 X for owner
220 
221  #define S_IRWXG 0000070 RWX mask for group
222  #define S_IRGRP 0000040 R for group
223  #define S_IWGRP 0000020 W for group
224  #define S_IXGRP 0000010 X for group
225 
226  #define S_IRWXO 0000007 RWX mask for other
227  #define S_IROTH 0000004 R for other
228  #define S_IWOTH 0000002 W for other
229  #define S_IXOTH 0000001 X for other
230 
231  #define S_ISUID 0004000 set user id on execution
232  #define S_ISGID 0002000 set group id on execution
233  #define S_ISVTX 0001000 save swapped text even after use
234  */
235 
236  mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO
237  | S_ISUID | S_ISGID;
238  // see above for meaning. I want everybody to be allowed to read/write/exec.
239  // Not sure about the last two bits.
240 
241  int zeroForSuccess = 0;
242  zeroForSuccess |= mkdir( (asSubdirOf ).c_str(), mode );
243  zeroForSuccess |= mkdir( (asSubdirOf+"/"+dirNameWithEff() ).c_str(), mode );
244  zeroForSuccess |= mkdir( (asSubdirOf+"/"+dirNameNoEff() ).c_str(), mode );
245  return (0 == zeroForSuccess);
246 }
static std::string dirNameWithEff()
static std::string dirNameNoEff()

◆ makeDirectories() [2/2]

bool IntegCalculator::makeDirectories ( const std::string &  asSubdirOf = ".") const
protected

◆ needToReIntegrate() [1/2]

bool IntegCalculator::needToReIntegrate ( ) const

Definition at line 302 of file IntegCalculator.cpp.

302  {
303  bool needTo = withEff().needToReIntegrate();
304  if(! _onlyOneFitAmpPairList) needTo |= noEff().needToReIntegrate();
305  return needTo;
306 }
FitAmpPairList & noEff()
bool needToReIntegrate() const
FitAmpPairList & withEff()

◆ needToReIntegrate() [2/2]

bool IntegCalculator::needToReIntegrate ( ) const

◆ noEff() [1/4]

FitAmpPairList & IntegCalculator::noEff ( )
inlineprotected

Definition at line 22 of file FlexiIntegCalculator.h.

22 {return _noEff;}
FitAmpPairList _noEff

◆ noEff() [2/4]

FitAmpPairList& IntegCalculator::noEff ( )
protected

◆ noEff() [3/4]

const FitAmpPairList& IntegCalculator::noEff ( ) const
inline

Definition at line 35 of file FlexiIntegCalculator.h.

35 {return _noEff;}
FitAmpPairList _noEff

◆ noEff() [4/4]

const FitAmpPairList& IntegCalculator::noEff ( ) const
inline

Definition at line 37 of file IntegCalculator.h.

37 {return _noEff;}
FitAmpPairList _noEff

◆ numberOfFitFractionsLargerThanThreshold() [1/2]

int IntegCalculator::numberOfFitFractionsLargerThanThreshold ( double  threshold)
inline

Definition at line 78 of file FlexiIntegCalculator.h.

78  {
80  }
int numberOfFitFractionsLargerThanThreshold(double threshold)
FitAmpPairList & withEff()

◆ numberOfFitFractionsLargerThanThreshold() [2/2]

int IntegCalculator::numberOfFitFractionsLargerThanThreshold ( double  threshold)
inline

Definition at line 91 of file IntegCalculator.h.

91  {
93  }
int numberOfFitFractionsLargerThanThreshold(double threshold)
FitAmpPairList & withEff()

◆ numEvents() [1/2]

int IntegCalculator::numEvents ( ) const
virtual

Implements IIntegrationCalculator.

Definition at line 134 of file IntegCalculator.cpp.

134  {
135  int Nw = withEff().numEvents();
137  int Nn = noEff().numEvents();
138  if(Nw != Nn){
139  cout << "WARNING in IntegCalculator::numEvents()!"
140  << " number of events in FitAmpPairList with efficiency"
141  << " is not the same as without: "
142  << Nw << " != " << Nn << endl;
143  cout << "I'll return the one with efficiency, Nw = " << Nw << endl;
144  }
145  }
146  return Nw;
147 }
FitAmpPairList & noEff()
virtual int numEvents() const
FitAmpPairList & withEff()

◆ numEvents() [2/2]

virtual int IntegCalculator::numEvents ( ) const
virtual

◆ print() [1/2]

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

◆ print() [2/2]

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

◆ reAddEvent() [1/5]

void IntegCalculator::reAddEvent ( IDalitzEvent evtPtr,
double  weight = 1 
)
virtual

Definition at line 90 of file IntegCalculator.cpp.

90  {
91  if(0 == evtPtr) return;
92  reAddEvent(*evtPtr, weight);
93 }
virtual void reAddEvent(IDalitzEvent *evtPtr, double weight=1)

◆ reAddEvent() [2/5]

void IntegCalculator::reAddEvent ( MINT::counted_ptr< IDalitzEvent evtPtr,
double  weight = 1 
)
virtual

Definition at line 98 of file IntegCalculator.cpp.

99  {
100  if(0 == evtPtr) return;
101  reAddEvent(*evtPtr, weight);
102 }
virtual void reAddEvent(IDalitzEvent *evtPtr, double weight=1)

◆ reAddEvent() [3/5]

virtual void IntegCalculator::reAddEvent ( IDalitzEvent evtPtr,
double  weight = 1 
)
virtual

◆ reAddEvent() [4/5]

void IntegCalculator::reAddEvent ( IDalitzEvent evt,
double  weight = 1 
)
virtual

Definition at line 94 of file IntegCalculator.cpp.

94  {
95  withEff().reAddEvent(evt, weight);
96  if(! _onlyOneFitAmpPairList) noEff().reAddEvent(evt, weight);
97 }
virtual void reAddEvent(IDalitzEvent &evt, double weight=1)
FitAmpPairList & noEff()
FitAmpPairList & withEff()

◆ reAddEvent() [5/5]

virtual void IntegCalculator::reAddEvent ( MINT::counted_ptr< IDalitzEvent evtPtr,
double  weight = 1 
)
virtual

◆ retrieve() [1/2]

bool IntegCalculator::retrieve ( const std::string &  commaSeparatedList)
virtual

Implements IIntegrationCalculator.

Definition at line 260 of file IntegCalculator.cpp.

260  {
261  bool dbThis=false;
262  bool sc=true;
263  std::stringstream is(commaSeparatedList);
264  std::string dirname;
265  int counter=0;
266  while(getline(is, dirname, ',')){
267  dirname = ParsedParameterLine::removeLeadingAndTrailingBlanks(dirname);
268  if("" == dirname) continue;
269  if(dbThis){
270  cout << "IntegCalculator::retrieve: reading file: "
271  << dirname
272  << endl;
273  }
274  if(0 == counter){
275  this->retrieveSingle(dirname);
276  }else{
277  IntegCalculator n(*this);
278  sc &= n.retrieveSingle(dirname);
279  this->add(n);
280  }
281  counter++;
282  }
283  return sc;
284 }
virtual bool add(const IntegCalculator &other)
virtual bool retrieveSingle(const std::string &dirname)

◆ retrieve() [2/2]

virtual bool IntegCalculator::retrieve ( const std::string &  commaSeparatedList)
virtual

◆ retrieveSingle() [1/2]

bool IntegCalculator::retrieveSingle ( const std::string &  dirname)
virtual

Definition at line 285 of file IntegCalculator.cpp.

285  {
286  bool sc=true;
287  sc &= withEff().retrieve(dirname + "/" + dirNameWithEff());
288  sc &= noEff().retrieve(dirname + "/" + dirNameNoEff());
289  return true;
290 }
static std::string dirNameWithEff()
FitAmpPairList & noEff()
static std::string dirNameNoEff()
virtual bool retrieve(const std::string &asSubdirOf=".")
FitAmpPairList & withEff()

◆ retrieveSingle() [2/2]

virtual bool IntegCalculator::retrieveSingle ( const std::string &  dirname)
virtual

◆ save() [1/2]

bool IntegCalculator::save ( const std::string &  dirname) const
virtual

Implements IIntegrationCalculator.

Definition at line 249 of file IntegCalculator.cpp.

249  {
250  bool sc=true;
251  makeDirectories(dirname);
252  sc &= withEff().save(dirname + "/" + dirNameWithEff());
254  sc &= withEff().save(dirname + "/" + dirNameNoEff());
255  }else{
256  sc &= noEff().save(dirname + "/" + dirNameNoEff());
257  }
258  return sc;
259 }
static std::string dirNameWithEff()
FitAmpPairList & noEff()
virtual bool save(const std::string &asSubdirOf=".") const
bool makeDirectories(const std::string &asSubdirOf=".") const
static std::string dirNameNoEff()
FitAmpPairList & withEff()

◆ save() [2/2]

virtual bool IntegCalculator::save ( const std::string &  dirname) const
virtual

◆ saveEachAmpsHistograms() [1/2]

void IntegCalculator::saveEachAmpsHistograms ( const std::string &  prefix) const
virtual

Implements IIntegrationCalculator.

Definition at line 183 of file IntegCalculator.cpp.

183  {
185  else return noEff().saveEachAmpsHistograms(prefix);
186 }
void saveEachAmpsHistograms(const std::string &prefix) const
FitAmpPairList & noEff()
FitAmpPairList & withEff()

◆ saveEachAmpsHistograms() [2/2]

virtual void IntegCalculator::saveEachAmpsHistograms ( const std::string &  prefix) const
virtual

◆ saveInterferenceHistograms() [1/2]

void IntegCalculator::saveInterferenceHistograms ( const std::string &  prefix) const
virtual

Definition at line 196 of file IntegCalculator.cpp.

196  {
198  else return noEff().saveInterferenceHistograms(prefix);
199 }
FitAmpPairList & noEff()
void saveInterferenceHistograms(const std::string &prefix) const
FitAmpPairList & withEff()

◆ saveInterferenceHistograms() [2/2]

virtual void IntegCalculator::saveInterferenceHistograms ( const std::string &  prefix) const
virtual

◆ setEfficiency() [1/2]

void IntegCalculator::setEfficiency ( MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > >  eff)

Definition at line 64 of file IntegCalculator.cpp.

64  {
65  withEff().setEfficiency(eff);
66  _onlyOneFitAmpPairList = false;
67 }
void setEfficiency(MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > > eff)
FitAmpPairList & withEff()

◆ setEfficiency() [2/2]

void IntegCalculator::setEfficiency ( MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > >  eff)

◆ startIntegration() [1/2]

void IntegCalculator::startIntegration ( )

Definition at line 307 of file IntegCalculator.cpp.

307  {
310 }
FitAmpPairList & noEff()
FitAmpPairList & withEff()

◆ startIntegration() [2/2]

void IntegCalculator::startIntegration ( )

◆ startReIntegration() [1/2]

void IntegCalculator::startReIntegration ( )

Definition at line 311 of file IntegCalculator.cpp.

311  {
314 }
FitAmpPairList & noEff()
FitAmpPairList & withEff()

◆ startReIntegration() [2/2]

void IntegCalculator::startReIntegration ( )

◆ sumOfFitFractions() [1/2]

double IntegCalculator::sumOfFitFractions ( )
inline

Definition at line 62 of file FlexiIntegCalculator.h.

62  {
63  return withEff().sumOfFitFractions();
64  }
double sumOfFitFractions()
FitAmpPairList & withEff()

◆ sumOfFitFractions() [2/2]

double IntegCalculator::sumOfFitFractions ( )
inline

Definition at line 75 of file IntegCalculator.h.

75  {
76  return withEff().sumOfFitFractions();
77  }
double sumOfFitFractions()
FitAmpPairList & withEff()

◆ sumOfSqrtFitFractions() [1/2]

double IntegCalculator::sumOfSqrtFitFractions ( )
inline

Definition at line 74 of file FlexiIntegCalculator.h.

74  {
75  return withEff().sumOfSqrtFitFractions();
76  }
double sumOfSqrtFitFractions()
FitAmpPairList & withEff()

◆ sumOfSqrtFitFractions() [2/2]

double IntegCalculator::sumOfSqrtFitFractions ( )
inline

Definition at line 87 of file IntegCalculator.h.

87  {
88  return withEff().sumOfSqrtFitFractions();
89  }
double sumOfSqrtFitFractions()
FitAmpPairList & withEff()

◆ un_normalised_histoSetIm()

DalitzHistoSet IntegCalculator::un_normalised_histoSetIm ( ) const
virtual

Definition at line 180 of file IntegCalculator.cpp.

180  {
182 }
virtual DalitzHistoSet un_normalised_histoSetIm() const
FitAmpPairList & withEff()

◆ un_normalised_histoSetRe()

DalitzHistoSet IntegCalculator::un_normalised_histoSetRe ( ) const
virtual

Definition at line 177 of file IntegCalculator.cpp.

177  {
179 }
virtual DalitzHistoSet un_normalised_histoSetRe() const
FitAmpPairList & withEff()

◆ unsetEfficiency() [1/2]

void IntegCalculator::unsetEfficiency ( )

Definition at line 68 of file IntegCalculator.cpp.

68  {
71 }
FitAmpPairList & withEff()

◆ unsetEfficiency() [2/2]

void IntegCalculator::unsetEfficiency ( )

◆ variance() [1/2]

double IntegCalculator::variance ( ) const
virtual

Implements IIntegrationCalculator.

Definition at line 151 of file IntegCalculator.cpp.

151  {
152  return withEff().variance();
153 }
virtual double variance() const
FitAmpPairList & withEff()

◆ variance() [2/2]

virtual double IntegCalculator::variance ( ) const
virtual

◆ withEff() [1/4]

FitAmpPairList & IntegCalculator::withEff ( )
inlineprotected

Definition at line 21 of file FlexiIntegCalculator.h.

21 {return _withEff;}
FitAmpPairList _withEff

◆ withEff() [2/4]

FitAmpPairList& IntegCalculator::withEff ( )
protected

◆ withEff() [3/4]

const FitAmpPairList& IntegCalculator::withEff ( ) const
inline

Definition at line 34 of file FlexiIntegCalculator.h.

34 {return _withEff;}
FitAmpPairList _withEff

◆ withEff() [4/4]

const FitAmpPairList& IntegCalculator::withEff ( ) const
inline

Definition at line 36 of file IntegCalculator.h.

36 {return _withEff;}
FitAmpPairList _withEff

Member Data Documentation

◆ _noEff

FitAmpPairList IntegCalculator::_noEff
protected

Definition at line 19 of file FlexiIntegCalculator.h.

◆ _onlyOneFitAmpPairList

bool IntegCalculator::_onlyOneFitAmpPairList
protected

Definition at line 21 of file IntegCalculator.h.

◆ _withEff

FitAmpPairList IntegCalculator::_withEff
protected

Definition at line 19 of file FlexiIntegCalculator.h.


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