18 {
19 const char*
fname =
"test_cascade_weight.root";
20 const int nPairs = 100;
21 const double chicc = 2.0e-3;
22 {
23 TFile
f(fname,
"RECREATE");
24 TNtuple
nt(
"pythia6",
"synthetic cascade",
25 "id:px:py:pz:E:M:mid:mpx:mpy:mpz:mE:mM:k");
26 TH1F
h(
"2",
"nr signal per cascade depth", 50, 0.5, 50.5);
27 for (
int i = 0;
i < nPairs; ++
i) {
28 for (int sign : {1, -1}) {
29 nt.Fill(421 * sign, 0., 0., 50., 50.035, 1.865, 2212, 0., 0., 400.,
30 400.0011, 0.938272, 1);
32 }
33 }
35 }
38
40 std::cerr << "InitForCharmOrBeauty failed" << std::endl;
41 return 1;
42 }
43 const double expected = nPairs /
chicc;
45 std::remove(fname);
46 if (std::abs(pot / expected - 1.) > 1e-9) {
47 std::cerr <<
"p.o.t. equivalent " <<
pot <<
", expected " << expected
48 << std::endl;
49 return 1;
50 }
51 return 0;
52}
Bool_t InitForCharmOrBeauty(const TString &fInName, Int_t nev, Double_t npots=5E13, Int_t nStart=0)
Double_t GetPotForCharm()
void SetChicc(Double_t x)