17 double mass2 = runningMass2();
18 std::complex<double> invBW(mass2 - mumsRecoMass2(), - mumsMass() * GofM());
23 if(_runningMassHist==0)
return mumsMass()*mumsMass();
25 double d_m2 = _runningMassHist->Interpolate(mumsRecoMass2()/(
GeV*
GeV));
26 double d_m02 = _runningMassHist->Interpolate(mumsMass()*mumsMass()/(
GeV*
GeV));
28 return mumsMass()*mumsMass() + mumsWidth()*(d_m2 - d_m02);
33 if(_runningWidthHist==0)
return mumsWidth();
35 double ps_m = _runningWidthHist->Interpolate(mumsRecoMass2()/(
GeV*
GeV));
36 double ps_m0 = _runningWidthHist->Interpolate(mumsMass()*mumsMass()/(
GeV*
GeV));
39 if(ps_m0>0)ps_ratio= ps_m/ps_m0 ;
41 return mumsWidth() * ps_ratio;
47 h = (TH1D*) f->Get(hname.c_str());
49 cout <<
"Found running width histogram in file " << f->GetName() <<
"." << endl;
51 cout <<
"ERROR: Couldn't find running width histogram in file " << f->GetName() <<
". I'll return a constant width." << endl;
56 <<
". I'll produce it now assuming a flat 3 body phase space." << endl;
57 h= producePhaseSpaceHist();
58 if(0 == h) cout <<
"ERROR: Couldn't produce running width histogram, I'll return a constant width" << endl;
66 h = (TH1D*) f->Get(hname.c_str());
68 cout <<
"Found running mass histogram in file " << f->GetName() <<
"." << endl;
70 cout <<
"ERROR: Couldn't find running mass histogram in file " << f->GetName() <<
". I'll use a constant mass." << endl;
86 double ps_val = ps.
getVal(sqrt(x[0])*
GeV,par[1],par[2],par[3]);
87 double ps0_val = ps.
getVal(par[0],par[1],par[2],par[3]);
90 if(ps0_val>0)ps_ratio= ps_val/ps0_val;
93 return ps_ratio * par[0]/(sqrt(x[0])*
GeV);
98 std::vector<int> asi = _theDecay.getVal().asi();
100 double max = mumsMass()*mumsMass()/(
GeV*
GeV)*5.;
102 TFile* f=
new TFile((
"RunningWidth_"+ (
BW_BW::resonanceProperties()->nameFromPid(abs(mumsPID()))) +
".root").c_str(),
"RECREATE");
103 TH1D* h=
new TH1D(
"RunningWidth",
"RunningWidth",1000,min,max);
105 TF1 *ps =
new TF1(
"phaseSpace",
phaseSpace,0,max,4);
106 std::vector<const AssociatedDecayTreeItem*> adti = _theDecay.finalState();
108 ps->SetParameters(mumsMass(),adti[0]->mass(),adti[1]->mass(),adti[2]->mass());
110 for (
int i=1; i<= h->GetNbinsX(); i++) {
111 h->SetBinContent(i,ps->Eval(h->GetXaxis()->GetBinCenter(i)));
virtual std::complex< double > BreitWigner()
double getVal(const DalitzEventPattern &_pat)
TH1D * producePhaseSpaceHist()
TH1D * get_mass_histo(TFile *f, const std::string &hname)
const ResonanceProperties * resonanceProperties() const
static std::string nameFromPid(int pdg_id)
Double_t phaseSpace(Double_t *x, Double_t *par)
TH1D * get_width_histo(TFile *f, const std::string &hname)