Demo using a histogram to change the Dalitz plot eta -> 3pi
{
makeDistributionManager()->Disable("eta_hadronic_decay");
PDalitzDistribution *decay =
new PDalitzDistribution("my_hadronic_decay",
"Eta matrix element for decay into charged pions");
decay->Add("eta, parent");
decay->Add("pi0, daughter, primary");
decay->Add("pi+, daughter, s1");
decay->Add("pi-, daughter, s2");
//N.B.: this demo uses the histogram generated by user_eta_3pi_decay.C
//But this is only a demo!
//One can exchange the histogram as well as the commands to use it:
TFile *f = new TFile("histo.root");
TH2F *hf1old = new TH2F(*hf1);
decay->SetMax(hf1old->GetMaximum());
decay->AddHistogram(hf1old, "_x = (_s2 + _primary)->M2(); _y = (_s1 + _primary)->M2(); _f = Eval();");
makeDistributionManager()->Add(decay);
TH2F *hf1new = new TH2F("hf1new", "", 100, 0.06, .2, 100, 0.06, .2);
PReaction my_reaction("2.2", "p", "p", "p p eta [pi+ pi- pi0]", NULL, 1, 0, 0, 0);
my_reaction.Do(hf1new, "_x = ([pi-] + [pi0])->M2() ; _y = ([pi+] + [pi0])->M2()");
my_reaction.Print();
my_reaction.Loop(100000);
hf1new->Draw("box");
}
user_eta_3pi_decay_histo.C:1 user_eta_3pi_decay_histo.C:2 user_eta_3pi_decay_histo.C:3 user_eta_3pi_decay_histo.C:4 user_eta_3pi_decay_histo.C:5 user_eta_3pi_decay_histo.C:6 user_eta_3pi_decay_histo.C:7 user_eta_3pi_decay_histo.C:8 user_eta_3pi_decay_histo.C:9 user_eta_3pi_decay_histo.C:10 user_eta_3pi_decay_histo.C:11 user_eta_3pi_decay_histo.C:12 user_eta_3pi_decay_histo.C:13 user_eta_3pi_decay_histo.C:14 user_eta_3pi_decay_histo.C:15 user_eta_3pi_decay_histo.C:16 user_eta_3pi_decay_histo.C:17 user_eta_3pi_decay_histo.C:18 user_eta_3pi_decay_histo.C:19 user_eta_3pi_decay_histo.C:20 user_eta_3pi_decay_histo.C:21 user_eta_3pi_decay_histo.C:22 user_eta_3pi_decay_histo.C:23 user_eta_3pi_decay_histo.C:24 user_eta_3pi_decay_histo.C:25 user_eta_3pi_decay_histo.C:26 user_eta_3pi_decay_histo.C:27 user_eta_3pi_decay_histo.C:28 user_eta_3pi_decay_histo.C:29 user_eta_3pi_decay_histo.C:30 user_eta_3pi_decay_histo.C:31 user_eta_3pi_decay_histo.C:32 user_eta_3pi_decay_histo.C:33 user_eta_3pi_decay_histo.C:34 user_eta_3pi_decay_histo.C:35