26 ,
const std::string& name
28 : _A_plus_Abar(A+Abar)
29 , _myOwnGenAplusAbar(0)
51 if(dbThis) cout <<
"CoherenceFactorCalculator::getGenerator(): " 52 <<
"making generator" << endl;
57 if(dbThis) cout <<
"made generator." << endl;
67 if(
_cfList.size() < 2)
return 1;
68 double d =
_cfList[0]->integASq();
72 return _cfList[1]->integASq()/d;
76 if(
_cfList.size() < 2)
return 1;
77 double d =
_cfList[0]->integAbarSq();
81 return _cfList[1]->integAbarSq()/d;
86 double d =
_cfList[0]->integASq();
90 double vn =
_cfList[1]->varASq();
91 double vd =
_cfList[0]->varASq();
92 return vn/(d*d) +
effA()*
effA()*vd/(d*d);
96 double d =
_cfList[0]->integAbarSq();
100 double vn =
_cfList[1]->varAbarSq();
101 double vd =
_cfList[0]->varAbarSq();
119 os <<
"Efficiencies from CoherenceFactorCalculater\n";
123 os <<
"\n Coherence Factors";
124 for(
unsigned int i=0; i <
_cfList.size(); i++){
126 os <<
"\n * No efficiency effects " 127 <<
" - 100% efficient detector\n";
129 os <<
"\n * Including efficiency effects\n";
133 os <<
"\n ....difference..relative..to..no..efficiency..effects:....";
134 os <<
"\n diff R= " <<
_cfList[i]->absR() - R0
137 os <<
"\n relative diff R= " 139 <<
" +/- " << (sqrt(
_cfList[i]->varAbs() +
_cfList[0]->varAbs())/R0);
140 os <<
"\n diff phase= " 142 <<
" +/- " << sqrt(
_cfList[i]->varAngleDeg() +
_cfList[0]->varAngleDeg())
152 if(dbThis) cout <<
"Hello from CoherenceFactorCalculator::evaluate()" << endl;
154 long int rediculousNumber = 1000000000;
156 int printEvery = 10000;
157 int makeHistosEvery = 100000;
159 for(
int i=0; i < 1000; i++){
161 bool printout = tries < 10 || (0 == tries%printEvery);
162 bool makeHistos = (0 == tries%makeHistosEvery);
165 if(dbThis) cout <<
"WARNING in CoherenceFactor::getR()" 166 <<
" got evtPtr = " << evtPtr << endl;
170 for(
unsigned int i=0; i <
_cfList.size(); i++){
175 cout <<
" DalitzEvent::EventCounter() " 178 cout <<
"INFO from CoherenceFactor::getR()" 179 <<
"\n\t tries: " << tries
187 cout <<
" --------------------------------- " << endl;
210 for(
unsigned int i=0; i <
_cfList.size(); i++){
211 _cfList[i]->setPrecision(prec);
216 for(
unsigned int i=0; i <
_cfList.size(); i++){
217 double tp =
_cfList[i]->estimatedPrecision();
218 if(tp > prec) prec = tp;
MINT::counted_ptr< MINT::IEventGenerator< IDalitzEvent > > _myOwnGenAplusAbar
double effAbarVar() const
DalitzEventPattern getTreePattern() const
virtual FitAmplitude * getAmpPtr(unsigned int i)
MINT::counted_ptr< IDalitzEvent > newEvent()
std::vector< MINT::counted_ptr< CoherenceFactorStoreAndEvaluate > > _cfList
static long int eventCounter()
void setPrecision(double prec)
double effAbarSigma() const
void printResult(std::ostream &os=std::cout) const
virtual DalitzBWBoxSet makeBWBoxes(const DalitzEventPattern &pat, TRandom *rnd=gRandom)
virtual counted_ptr< RETURN_TYPE > newEvent()=0
double estimatedPrecision() const
std::string anythingToString(const T &anything)
virtual unsigned int size() const
CoherenceFactorCalculator(FitAmpSum &A, FitAmpSum &Abar, double CSAbs=1, double CSPhase=0.0, MINT::IReturnRealForEvent< IDalitzEvent > *eff=0, double prec=1.e-3, const std::string &name="coherenceFactorC")
MINT::counted_ptr< MINT::IEventGenerator< IDalitzEvent > > getGenerator()
std::complex< double > evaluate()