MINT2
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
CoherenceFactorStoreAndEvaluate Class Reference

#include <CoherenceFactorStoreAndEvaluate.h>

Public Member Functions

 CoherenceFactorStoreAndEvaluate (FitAmpSum &A, FitAmpSum &Abar, double CSAbs=1, double CSPhase=0.0, MINT::IReturnRealForEvent< IDalitzEvent > *eff=0, double prec=1.e-3)
 
std::complex< double > var () const
 
std::complex< double > sigma () const
 
double varAbs () const
 
double sigmaAbs () const
 
double varAngle () const
 
double varAngleDeg () const
 
double sigmaAngle () const
 
double sigmaAngleDeg () const
 
void printLong (std::ostream &os=std::cout) const
 
void print (std::ostream &os=std::cout, const std::string &pref="") const
 
void setPrecision (double prec)
 
double estimatedPrecision () const
 
std::complex< double > getCVal ()
 
double absR () const
 
double phaseR () const
 
double phaseRdeg () const
 
bool addEvent (MINT::counted_ptr< IDalitzEvent > &evtPtr)
 
const DalitzHistoSetgetHistoA () const
 
const DalitzHistoSetgetHistoAbar () const
 
const DalitzHistoSetgetHistoBoth () const
 
bool saveHistos (const std::string &fname="CoherenceFactorHistos") const
 
bool drawHistos (const std::string &fname="CoherenceFactorHistos") const
 
bool drawHistosWith (const CoherenceFactorStoreAndEvaluate &other, const std::string &fname="CoherenceFactorHistosWith", double sf=1) const
 
bool drawHistoRatios (const CoherenceFactorStoreAndEvaluate &other, const std::string &fname="CoherenceFactorHistosWith", double sf=1) const
 
void scaleHistos (double sf=1)
 

Private Member Functions

MINT::IReturnComplexForEvent< IDalitzEvent > * A ()
 
MINT::IReturnComplexForEvent< IDalitzEvent > * Abar ()
 
std::complex< double > A_Value (IDalitzEvent &evt)
 
std::complex< double > A_Value (IDalitzEvent *evtPtr)
 
std::complex< double > Abar_Value (IDalitzEvent &evt)
 
std::complex< double > Abar_Value (IDalitzEvent *evtPtr)
 
std::complex< double > integAxAbarStar () const
 
double integA () const
 
double integAbar () const
 
double integASq () const
 
double integAbarSq () const
 
std::complex< double > complexVar (std::complex< double > s, std::complex< double > s_sq) const
 
double realAorAbarVar (double s, double sq) const
 
std::complex< double > cvarAxAbarStar () const
 
double varA () const
 
double varAbar () const
 
double varASq () const
 
double varAbarSq () const
 
std::complex< double > Rval () const
 
double getEff (IDalitzEvent &evt)
 
double getEff (MINT::counted_ptr< IDalitzEvent > evtPtr)
 

Private Attributes

FitAmpSum_A
 
FitAmpSum_Abar
 
double _CSAbs
 
double _CSPhase
 
FitAmpSum _A_plus_Abar
 
MINT::IReturnRealForEvent< IDalitzEvent > * _eff
 
double _precision
 
double _sumASq
 
double _sumASqSquared
 
double _sumAbarSq
 
double _sumAbarSqSquared
 
std::complex< double > _sumAxAbarStar
 
std::complex< double > _sumAxAbarStarSquared
 
DalitzHistoSet _histoA
 
DalitzHistoSet _histoAbar
 
DalitzHistoSet _histoBoth
 
long int _tries
 
long int _Nevents
 

Friends

class CoherenceFactorCalculator
 

Detailed Description

Definition at line 27 of file CoherenceFactorStoreAndEvaluate.h.

Constructor & Destructor Documentation

◆ CoherenceFactorStoreAndEvaluate()

CoherenceFactorStoreAndEvaluate::CoherenceFactorStoreAndEvaluate ( FitAmpSum A,
FitAmpSum Abar,
double  CSAbs = 1,
double  CSPhase = 0.0,
MINT::IReturnRealForEvent< IDalitzEvent > *  eff = 0,
double  prec = 1.e-3 
)

Definition at line 18 of file CoherenceFactorStoreAndEvaluate.cpp.

25  : _A(&A)
26  , _Abar(&Abar)
27  , _CSAbs(CSAbs)
28  , _CSPhase(CSPhase)
30  , _eff(eff)
31  , _precision(prec)
32  , _sumASq(0), _sumASqSquared(0)
35  , _histoA(), _histoAbar(), _histoBoth()
36  , _tries(0)
37  , _Nevents(0)
38 {
39 }
MINT::IReturnComplexForEvent< IDalitzEvent > * A()
MINT::IReturnRealForEvent< IDalitzEvent > * _eff
MINT::IReturnComplexForEvent< IDalitzEvent > * Abar()

Member Function Documentation

◆ A()

MINT::IReturnComplexForEvent<IDalitzEvent>* CoherenceFactorStoreAndEvaluate::A ( )
inlineprivate

◆ A_Value() [1/2]

complex< double > CoherenceFactorStoreAndEvaluate::A_Value ( IDalitzEvent evt)
private

Definition at line 231 of file CoherenceFactorStoreAndEvaluate.cpp.

231  {
232  return A()->ComplexVal(evt);
233 }
MINT::IReturnComplexForEvent< IDalitzEvent > * A()
virtual std::complex< double > ComplexVal(EVENT_TYPE &evt)=0

◆ A_Value() [2/2]

std::complex<double> CoherenceFactorStoreAndEvaluate::A_Value ( IDalitzEvent evtPtr)
inlineprivate

Definition at line 53 of file CoherenceFactorStoreAndEvaluate.h.

53  {
54  if(0 == evtPtr) return 0;
55  return A_Value(*evtPtr);
56  }
std::complex< double > A_Value(IDalitzEvent &evt)

◆ Abar()

MINT::IReturnComplexForEvent<IDalitzEvent>* CoherenceFactorStoreAndEvaluate::Abar ( )
inlineprivate

◆ Abar_Value() [1/2]

complex< double > CoherenceFactorStoreAndEvaluate::Abar_Value ( IDalitzEvent evt)
private

Definition at line 234 of file CoherenceFactorStoreAndEvaluate.cpp.

235  {
236  bool dbThis=false;
237  if(dbThis) cout << "CoherenceFactorStoreAndEvaluate::Abar_Value" << endl;
238  complex<double> val = Abar()->ComplexVal(evt);
239  if(dbThis) cout << "got value: " << val << endl;
240  return val;
241 }
virtual std::complex< double > ComplexVal(EVENT_TYPE &evt)=0
MINT::IReturnComplexForEvent< IDalitzEvent > * Abar()

◆ Abar_Value() [2/2]

std::complex<double> CoherenceFactorStoreAndEvaluate::Abar_Value ( IDalitzEvent evtPtr)
inlineprivate

Definition at line 58 of file CoherenceFactorStoreAndEvaluate.h.

58  {
59  if(0 == evtPtr) return 0;
60  return Abar_Value(*evtPtr);
61  }
std::complex< double > Abar_Value(IDalitzEvent &evt)

◆ absR()

double CoherenceFactorStoreAndEvaluate::absR ( ) const

Definition at line 222 of file CoherenceFactorStoreAndEvaluate.cpp.

222  {
223  return abs(Rval());
224 }

◆ addEvent()

bool CoherenceFactorStoreAndEvaluate::addEvent ( MINT::counted_ptr< IDalitzEvent > &  evtPtr)

Definition at line 243 of file CoherenceFactorStoreAndEvaluate.cpp.

244  {
245  bool dbThis=false;
246  if(dbThis) cout << "Hello from CoherenceFactorStoreAndEvaluate::getCVal()"
247  << endl;
248 
249  // int printEvery = 10000;
250 
251  _tries++;
252  bool printout = false;//_tries < 10 || (0 == _tries%printEvery);
253 
254  if(0 == evtPtr){
255  if(dbThis) cout << "WARNING in CoherenceFactorStoreAndEvaluate::getR()"
256  << " got evtPtr = " << evtPtr << endl;
257  return false;
258  }
259 
260  if(10 == _tries){
261  cout << "=======================\n";
262  cout << "all A amplitudes\n";
263  _A->printAllAmps();
264  cout << "all Abar ampltiudes\n";
265  _Abar->printAllAmps();
266  cout <<endl;
267  }
268  double w = evtPtr->getWeight()
270 
271  w*= getEff(evtPtr);
272 
273  w = sqrt(w); // sqrt because we apply the weight to the amplitudes,
274  // while the integrals (as one might expect) all
275  // contain terms |A|^2, |Abar|^2, or |A*Abar|.
276 
277  complex<double> c_a=
278  A_Value(evtPtr.get()) * w;
279 
280  complex<double> c_abar=
281  Abar_Value(evtPtr.get()) *w*polar(_CSAbs, _CSPhase);
282 
283  double d_a = norm(c_a);
284  double d_abar = norm(c_abar);
285 
286  _histoA.addEvent(*evtPtr, d_a);
287  _histoAbar.addEvent(*evtPtr, d_abar);
288  _histoBoth.addEvent(*evtPtr, norm(c_a + c_abar));
289 
290  _sumASq += d_a;
291  _sumASqSquared += d_a*d_a;
292 
293  _sumAbarSq += d_abar;
294  _sumAbarSqSquared += d_abar*d_abar;
295 
296  complex<double> c_prod = c_a * conj(c_abar);
297  _sumAxAbarStar += c_prod;
298  complex<double> c_prodSquared(c_prod.real() * c_prod.real()
299  , c_prod.imag() * c_prod.imag()
300  );
301  _sumAxAbarStarSquared += c_prodSquared;
302 
303  _Nevents++;
304 
305  if(printout){
306  cout << " DalitzEvent::EventCounter() "
308  << endl;
309  cout << "INFO from CoherenceFactorStoreAndEvaluate::getR()"
310  << "\n\t _tries: " << _tries << ", for " << _Nevents << " events."
311  << endl;
312  // << "\n\t c_a, c_abar: " << c_a << ", " << c_abar
313  // << "\n\t value: " << Rval()
314  // << " = " << abs(Rval()) << " * exp( i * " << arg(Rval()) << " )"
315  // << " +/- " << estimatedPrecision()
316  // << endl;
317  print();
318  cout << " --------------------------------- " << endl;
319  }
320  return true;
321 }
std::complex< double > Abar_Value(IDalitzEvent &evt)
virtual double getWeight() const =0
virtual void printAllAmps(std::ostream &os=std::cout) const
Definition: FitAmpList.h:93
static long int eventCounter()
Definition: DalitzEvent.h:125
void print(std::ostream &os=std::cout, const std::string &pref="") const
std::complex< double > A_Value(IDalitzEvent &evt)
virtual double getGeneratorPdfRelativeToPhaseSpace() const =0
void addEvent(const IDalitzEvent &evt, double weight=1)
X * get() const
Definition: counted_ptr.h:123

◆ complexVar()

complex< double > CoherenceFactorStoreAndEvaluate::complexVar ( std::complex< double >  s,
std::complex< double >  s_sq 
) const
private

Definition at line 110 of file CoherenceFactorStoreAndEvaluate.cpp.

112  {
113  if(_Nevents <=0) return 0;
114  complex<double> m = s / ((double) _Nevents);
115  complex<double> mos = s_sq / ((double) _Nevents);
116  complex<double> som(m.real()*m.real(), m.imag()*m.imag());
117  return (mos - som)/((double)_Nevents);
118 }
static const double s
static const double m

◆ cvarAxAbarStar()

complex< double > CoherenceFactorStoreAndEvaluate::cvarAxAbarStar ( ) const
private

Definition at line 75 of file CoherenceFactorStoreAndEvaluate.cpp.

75  {
77 }
std::complex< double > complexVar(std::complex< double > s, std::complex< double > s_sq) const

◆ drawHistoRatios()

bool CoherenceFactorStoreAndEvaluate::drawHistoRatios ( const CoherenceFactorStoreAndEvaluate other,
const std::string &  fname = "CoherenceFactorHistosWith",
double  sf = 1 
) const

Definition at line 360 of file CoherenceFactorStoreAndEvaluate.cpp.

363  {
364  bool s=true;
365  s &= (_histoA / (other._histoA * sf)).draw(fname + "_ARatio");
366  s &= (_histoAbar / (other._histoAbar * sf)).draw(fname + "_AbarRatio");
367  s &= (_histoBoth / (other._histoBoth * sf)).draw(fname + "_BothRatio");
368  return s;
369 }
static const double s

◆ drawHistos()

bool CoherenceFactorStoreAndEvaluate::drawHistos ( const std::string &  fname = "CoherenceFactorHistos") const

Definition at line 341 of file CoherenceFactorStoreAndEvaluate.cpp.

341  {
342  bool s=true;
343  s &= _histoA.draw(fname + "_A");
344  s &= _histoAbar.draw(fname + "_Abar");
345  s &= _histoBoth.draw(fname + "_Both");
346  return s;
347 }
static const double s
bool draw(const std::string &baseName="", const std::string &drawOpt="", const std::string &format="eps") const

◆ drawHistosWith()

bool CoherenceFactorStoreAndEvaluate::drawHistosWith ( const CoherenceFactorStoreAndEvaluate other,
const std::string &  fname = "CoherenceFactorHistosWith",
double  sf = 1 
) const

Definition at line 349 of file CoherenceFactorStoreAndEvaluate.cpp.

352  {
353  bool s=true;
354  s &= _histoA.drawWithFit(other._histoA * sf, fname + "_A");
355  s &= _histoAbar.drawWithFit(other._histoAbar * sf, fname + "_Abar");
356  s &= _histoBoth.drawWithFit(other._histoBoth * sf, fname + "_Both");
357  return s;
358 }
static const double s
bool drawWithFit(const DalitzHistoSet &fit, const std::string &baseName="", const std::string &format="eps", const std::string &fitDrawOpt="HIST C SAME") const

◆ estimatedPrecision()

double CoherenceFactorStoreAndEvaluate::estimatedPrecision ( ) const

Definition at line 45 of file CoherenceFactorStoreAndEvaluate.cpp.

45  {
46  if(_Nevents <= 0) return 9999;
47  double s = sigmaAbs();
48  if(s < 0) s *= -1;
49  return s;
50 }
static const double s

◆ getCVal()

std::complex<double> CoherenceFactorStoreAndEvaluate::getCVal ( )

◆ getEff() [1/2]

double CoherenceFactorStoreAndEvaluate::getEff ( IDalitzEvent evt)
private

Definition at line 41 of file CoherenceFactorStoreAndEvaluate.cpp.

41  {
42  if(0 == _eff) return 1.0;
43  return _eff->RealVal(evt);
44 }
virtual double RealVal(EVENT_TYPE &evt)=0
MINT::IReturnRealForEvent< IDalitzEvent > * _eff

◆ getEff() [2/2]

double CoherenceFactorStoreAndEvaluate::getEff ( MINT::counted_ptr< IDalitzEvent evtPtr)
inlineprivate

Definition at line 85 of file CoherenceFactorStoreAndEvaluate.h.

85  {
86  if(0 == evtPtr) return 0;
87  return getEff(*evtPtr);
88  }

◆ getHistoA()

const DalitzHistoSet & CoherenceFactorStoreAndEvaluate::getHistoA ( ) const

Definition at line 323 of file CoherenceFactorStoreAndEvaluate.cpp.

323  {
324  return _histoA;}

◆ getHistoAbar()

const DalitzHistoSet & CoherenceFactorStoreAndEvaluate::getHistoAbar ( ) const

Definition at line 325 of file CoherenceFactorStoreAndEvaluate.cpp.

325  {
326  return _histoAbar;}

◆ getHistoBoth()

const DalitzHistoSet & CoherenceFactorStoreAndEvaluate::getHistoBoth ( ) const

Definition at line 327 of file CoherenceFactorStoreAndEvaluate.cpp.

327  {
328  return _histoBoth;}

◆ integA()

double CoherenceFactorStoreAndEvaluate::integA ( ) const
private

Definition at line 56 of file CoherenceFactorStoreAndEvaluate.cpp.

56  {
57  if(_Nevents <=0) return 0;
58  if(_sumASq <=0) return -9999;
59  return sqrt(_sumASq / ((double) _Nevents));
60 }

◆ integAbar()

double CoherenceFactorStoreAndEvaluate::integAbar ( ) const
private

Definition at line 61 of file CoherenceFactorStoreAndEvaluate.cpp.

61  {
62  if(_Nevents <=0) return 0;
63  if(_sumAbarSq <=0) return -9999;
64  return sqrt(_sumAbarSq / ((double) _Nevents));
65 }

◆ integAbarSq()

double CoherenceFactorStoreAndEvaluate::integAbarSq ( ) const
private

Definition at line 70 of file CoherenceFactorStoreAndEvaluate.cpp.

70  {
71  if(_Nevents <=0) return 0;
72  return _sumAbarSq / ((double) _Nevents);
73 }

◆ integASq()

double CoherenceFactorStoreAndEvaluate::integASq ( ) const
private

Definition at line 66 of file CoherenceFactorStoreAndEvaluate.cpp.

66  {
67  if(_Nevents <=0) return 0;
68  return _sumASq / ((double) _Nevents);
69 }

◆ integAxAbarStar()

complex< double > CoherenceFactorStoreAndEvaluate::integAxAbarStar ( ) const
private

Definition at line 52 of file CoherenceFactorStoreAndEvaluate.cpp.

52  {
53  if(_Nevents <=0) return 0;
54  return _sumAxAbarStar / ((double) _Nevents);
55 }

◆ phaseR()

double CoherenceFactorStoreAndEvaluate::phaseR ( ) const

Definition at line 225 of file CoherenceFactorStoreAndEvaluate.cpp.

225  {
226  return arg(Rval());
227 }

◆ phaseRdeg()

double CoherenceFactorStoreAndEvaluate::phaseRdeg ( ) const

Definition at line 228 of file CoherenceFactorStoreAndEvaluate.cpp.

228  {
229  return arg(Rval())*180.0/pi;
230 }
static const double pi

◆ print()

void CoherenceFactorStoreAndEvaluate::print ( std::ostream &  os = std::cout,
const std::string &  pref = "" 
) const

Definition at line 212 of file CoherenceFactorStoreAndEvaluate.cpp.

213  {
214  os << pref << "\t int |A| = " << this->integA()
215  << "\t int |Abar| = " << this->integAbar()
216  << "\n" << pref << "\t int (A Abar*) = " << this->integAxAbarStar()
217  << '\n' << pref << "\tR exp(i xi) = " << abs(Rval())
218  << " * exp( i * " << arg(Rval())*180.0/pi << " deg )"
219  << "\n" << pref << "\t sig(R) = " << sigmaAbs()
220  << " sig(xi) = " << sigmaAngle()*180.0/pi << " deg";
221 }
static const double pi
std::complex< double > integAxAbarStar() const

◆ printLong()

void CoherenceFactorStoreAndEvaluate::printLong ( std::ostream &  os = std::cout) const

Definition at line 182 of file CoherenceFactorStoreAndEvaluate.cpp.

182  {
183  os << "Integrals from CoherenceFactorStoreAndEvaluate\n"
184  << "\t int |A|^2: " << integASq()
185  << ", int |Abar|^2 " << integAbarSq();
186  double rBSq = _CSAbs*_CSAbs;
187  if(rBSq > 0){
188  os << "\n\t int |Abar|^2/rB^2 " << integAbarSq()/rBSq;
189  }
190  if(integAbarSq() > 0){
191  os << "\n ratio int |A|^2 / int |Abar|^2 = " << integASq()/integAbarSq()
192  << ", ratio * rB^2 = " << rBSq*integASq()/integAbarSq();
193  }
194  os << "\n\n Coherence factor result (same result, different formats):"
195  << "\n\tR exp(i xi) = " << Rval() << " +/- " << sigma()
196  << "\n\tR exp(i xi) = " << abs(Rval())
197  << " * exp( i * " << arg(Rval()) << " )"
198  << "\n\t sig(R) = " << sigmaAbs()
199  << " sig(xi) = " << sigmaAngle()
200  << "\n\tR exp(i xi) = " << abs(Rval())
201  << " * exp( i * " << arg(Rval())*180.0/pi << " deg )"
202  << "\n\t sig(R) = " << sigmaAbs()
203  << " sig(xi) = " << sigmaAngle()*180.0/pi << " deg";
204  if(arg(Rval()) < 0){
205  cout << "\n\tR exp(i xi) = " << abs(Rval())
206  << " * exp( i * " << arg(Rval())*180.0/pi + 360. << " deg )"
207  << "\n\t sig(R) = " << sigmaAbs()
208  << " sig(xi) = " << sigmaAngle()*180.0/pi << " deg";
209  }
210  cout << endl;
211 }
static const double pi

◆ realAorAbarVar()

double CoherenceFactorStoreAndEvaluate::realAorAbarVar ( double  s,
double  sq 
) const
private

Definition at line 78 of file CoherenceFactorStoreAndEvaluate.cpp.

78  {
79  if(_Nevents <=0 ) return 0;
80  if(s == 0) return -9999;
81  double m = s/((double) _Nevents);
82  double msq = sq/((double) _Nevents);
83  double varAsq = (msq - m*m)/((double) _Nevents);
84 
85  return 0.5 * varAsq / fabs(s);
86 }
static const double s
static const double m

◆ Rval()

complex< double > CoherenceFactorStoreAndEvaluate::Rval ( ) const
private

Definition at line 177 of file CoherenceFactorStoreAndEvaluate.cpp.

177  {
178  if(_Nevents <= 0 || integA() <= 0 || integAbar() <= 0) return -9999;
179  return integAxAbarStar() / (integA() * integAbar());
180 }
std::complex< double > integAxAbarStar() const

◆ saveHistos()

bool CoherenceFactorStoreAndEvaluate::saveHistos ( const std::string &  fname = "CoherenceFactorHistos") const

Definition at line 332 of file CoherenceFactorStoreAndEvaluate.cpp.

332  {
333  bool s = true;
334  s &= _histoA.save(fname + "_A.root");
335  s &= _histoAbar.save(fname + "_Abar.root");
336  s &= _histoBoth.save(fname + "_Both.root");
337  return s;
338 }
static const double s
bool save(const std::string &filename="DalitzHistos.root") const

◆ scaleHistos()

void CoherenceFactorStoreAndEvaluate::scaleHistos ( double  sf = 1)

◆ setPrecision()

void CoherenceFactorStoreAndEvaluate::setPrecision ( double  prec)
inline

◆ sigma()

complex< double > CoherenceFactorStoreAndEvaluate::sigma ( ) const

Definition at line 143 of file CoherenceFactorStoreAndEvaluate.cpp.

143  {
144  return complex<double>(sqrt(fabs(var().real())), sqrt(fabs(var().imag())));
145 }

◆ sigmaAbs()

double CoherenceFactorStoreAndEvaluate::sigmaAbs ( ) const

Definition at line 151 of file CoherenceFactorStoreAndEvaluate.cpp.

151  {
152  double va = varAbs();
153  if(va < 0) return -9999;
154  return sqrt(va);
155 }

◆ sigmaAngle()

double CoherenceFactorStoreAndEvaluate::sigmaAngle ( ) const

Definition at line 167 of file CoherenceFactorStoreAndEvaluate.cpp.

167  {
168  double va = varAngle();
169  if(va < 0) return -9999;
170  return sqrt(va);
171 }

◆ sigmaAngleDeg()

double CoherenceFactorStoreAndEvaluate::sigmaAngleDeg ( ) const

Definition at line 172 of file CoherenceFactorStoreAndEvaluate.cpp.

172  {
173  double va = varAngleDeg();
174  if(va < 0) return -9999;
175  return sqrt(va);
176 }

◆ var()

complex< double > CoherenceFactorStoreAndEvaluate::var ( ) const

Definition at line 120 of file CoherenceFactorStoreAndEvaluate.cpp.

120  {
121  bool dbThis=false;
122 
123  complex<double> m = Rval();
124  complex<double> som(m.real()*m.real(), m.imag()*m.imag());
125 
126  double den = integA()*integA() * integAbar()*integAbar();
127  if(den <= 0) return complex<double>(-9999,-9999);
128 
129  double ar = cvarAxAbarStar().real() / den;
130  double ai = cvarAxAbarStar().imag() / den;
131  complex<double> a(ar, ai);
132  complex<double> b = varA()/(integA()*integA()) * som;
133  complex<double> c = varAbar()/(integAbar()*integAbar()) * som;
134 
135  if(dbThis){
136  cout << " cvarAxAbarStar() << " << cvarAxAbarStar() << endl;
137  cout << "var() = " << a << " + " << b << " + " << c
138  << " = " << a + b + c << endl;
139  }
140  return a + b + c;
141 }
std::complex< double > cvarAxAbarStar() const
static const double m

◆ varA()

double CoherenceFactorStoreAndEvaluate::varA ( ) const
private

◆ varAbar()

double CoherenceFactorStoreAndEvaluate::varAbar ( ) const
private

◆ varAbarSq()

double CoherenceFactorStoreAndEvaluate::varAbarSq ( ) const
private

Definition at line 102 of file CoherenceFactorStoreAndEvaluate.cpp.

102  {
103  if(_Nevents <=0) return -1;
104  double mean = _sumAbarSq/_Nevents;
105  double meanOfSq = _sumAbarSqSquared/_Nevents;
106  double v = meanOfSq - mean*mean;
107  return v/_Nevents;
108 }

◆ varAbs()

double CoherenceFactorStoreAndEvaluate::varAbs ( ) const

Definition at line 146 of file CoherenceFactorStoreAndEvaluate.cpp.

146  {
147  double a = var().real() * 2*fabs(Rval().real()/norm(Rval()));
148  double b = var().imag() * 2*fabs(Rval().imag()/norm(Rval()));
149  return a+b;
150 }

◆ varAngle()

double CoherenceFactorStoreAndEvaluate::varAngle ( ) const

Definition at line 156 of file CoherenceFactorStoreAndEvaluate.cpp.

156  {
157  double a= fabs(Rval().real());
158  double b= fabs(Rval().imag());
159  double den = a*a + b*b;
160  if(den <= 0)return -9999;
161 
162  return var().real()*b/den + var().imag()*a/den;
163 }

◆ varAngleDeg()

double CoherenceFactorStoreAndEvaluate::varAngleDeg ( ) const

Definition at line 164 of file CoherenceFactorStoreAndEvaluate.cpp.

164  {
165  return varAngle() * 180*180/(pi*pi);
166 }
static const double pi

◆ varASq()

double CoherenceFactorStoreAndEvaluate::varASq ( ) const
private

Definition at line 95 of file CoherenceFactorStoreAndEvaluate.cpp.

95  {
96  if(_Nevents <=0) return -1;
97  double mean = _sumASq/_Nevents;
98  double meanOfSq = _sumASqSquared/_Nevents;
99  double v = meanOfSq - mean*mean;
100  return v/_Nevents;
101 }

Friends And Related Function Documentation

◆ CoherenceFactorCalculator

friend class CoherenceFactorCalculator
friend

Definition at line 132 of file CoherenceFactorStoreAndEvaluate.h.

Member Data Documentation

◆ _A

FitAmpSum* CoherenceFactorStoreAndEvaluate::_A
private

Definition at line 31 of file CoherenceFactorStoreAndEvaluate.h.

◆ _A_plus_Abar

FitAmpSum CoherenceFactorStoreAndEvaluate::_A_plus_Abar
private

Definition at line 35 of file CoherenceFactorStoreAndEvaluate.h.

◆ _Abar

FitAmpSum * CoherenceFactorStoreAndEvaluate::_Abar
private

Definition at line 31 of file CoherenceFactorStoreAndEvaluate.h.

◆ _CSAbs

double CoherenceFactorStoreAndEvaluate::_CSAbs
private

Definition at line 32 of file CoherenceFactorStoreAndEvaluate.h.

◆ _CSPhase

double CoherenceFactorStoreAndEvaluate::_CSPhase
private

Definition at line 33 of file CoherenceFactorStoreAndEvaluate.h.

◆ _eff

MINT::IReturnRealForEvent<IDalitzEvent>* CoherenceFactorStoreAndEvaluate::_eff
private

Definition at line 36 of file CoherenceFactorStoreAndEvaluate.h.

◆ _histoA

DalitzHistoSet CoherenceFactorStoreAndEvaluate::_histoA
private

Definition at line 43 of file CoherenceFactorStoreAndEvaluate.h.

◆ _histoAbar

DalitzHistoSet CoherenceFactorStoreAndEvaluate::_histoAbar
private

Definition at line 43 of file CoherenceFactorStoreAndEvaluate.h.

◆ _histoBoth

DalitzHistoSet CoherenceFactorStoreAndEvaluate::_histoBoth
private

Definition at line 43 of file CoherenceFactorStoreAndEvaluate.h.

◆ _Nevents

long int CoherenceFactorStoreAndEvaluate::_Nevents
private

Definition at line 45 of file CoherenceFactorStoreAndEvaluate.h.

◆ _precision

double CoherenceFactorStoreAndEvaluate::_precision
private

Definition at line 37 of file CoherenceFactorStoreAndEvaluate.h.

◆ _sumAbarSq

double CoherenceFactorStoreAndEvaluate::_sumAbarSq
private

Definition at line 40 of file CoherenceFactorStoreAndEvaluate.h.

◆ _sumAbarSqSquared

double CoherenceFactorStoreAndEvaluate::_sumAbarSqSquared
private

Definition at line 40 of file CoherenceFactorStoreAndEvaluate.h.

◆ _sumASq

double CoherenceFactorStoreAndEvaluate::_sumASq
private

Definition at line 39 of file CoherenceFactorStoreAndEvaluate.h.

◆ _sumASqSquared

double CoherenceFactorStoreAndEvaluate::_sumASqSquared
private

Definition at line 39 of file CoherenceFactorStoreAndEvaluate.h.

◆ _sumAxAbarStar

std::complex<double> CoherenceFactorStoreAndEvaluate::_sumAxAbarStar
private

Definition at line 41 of file CoherenceFactorStoreAndEvaluate.h.

◆ _sumAxAbarStarSquared

std::complex<double> CoherenceFactorStoreAndEvaluate::_sumAxAbarStarSquared
private

Definition at line 41 of file CoherenceFactorStoreAndEvaluate.h.

◆ _tries

long int CoherenceFactorStoreAndEvaluate::_tries
private

Definition at line 44 of file CoherenceFactorStoreAndEvaluate.h.


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