Pluto v6.3.0
Loading...
Searching...
No Matches
test_weight.C
Go to the documentation of this file.
1{
2 gROOT->Reset();
5 pdm->SetVerbose(1); // comment out to skip details
6 pdm->SetDefault("pi0");
7 pdm->SetDefault("dilepton");
8 pdm->SetDefault("pi+");
9
10 PParticle *p = new PParticle("p", 2.62); // proton beam, Tlab (GeV)
11 PParticle *d = new PParticle("d"); // deuteron target
12 PParticle *s = new PParticle(*p + *d);
13 c = new PDecayChannel; // define the decay channel
14 c->AddChannel(0.9, "p", "d", "pi0"); // add decay mode with weight + products
15 c->AddChannel(0.1, "p", "d", "pi+"); // add decay mode with weight + products
16
17 pdm->InitReaction(s, c); // pi0 production in p + d
18 Int_t n = pdm->loop(1000, 1, "weight", 0, 0, 1, 0); // make events + vertices
19 cout << "Events processed: " << n << endl;
20}
21
22
23
PParticle * d
PChannel * c[]
PParticle * p
Definition dp_mult.C:24
PParticle * s
Definition dp_mult.C:25
PDecayManager * pdm
Definition dp_w_dalitz.C:5
Int_t n
Definition etap+omeg.C:21