void PhaseSpace() { // example of use of TGenPhaseSpace //Author: Valerio Filippini if (!gROOT->GetClass("TGenPhaseSpace")) gSystem.Load("libPhysics"); TLorentzVector target(0.0, 0.0, 0.0, 0.938); TLorentzVector beam(0.0, 0.0, .65, .65); TLorentzVector W = beam + target; //(Momentum, Energy units are Gev/C, GeV) Double_t masses[3] = { 0.938, 0.139, 0.139} ; TGenPhaseSpace event; event.SetDecay(W, 3, masses); TH2F *h2 = new TH2F("h2","h2", 50,1.1,1.8, 50,1.1,1.8); for (Int_t n=0;n<100000;n++) { Double_t weight = event.Generate(); TLorentzVector *pProton = event.GetDecay(0); TLorentzVector *pPip = event.GetDecay(1); TLorentzVector *pPim = event.GetDecay(2); TLorentzVector pPPip = *pProton + *pPip; TLorentzVector pPPim = *pProton + *pPim; h2->Fill(pPPip.M2() ,pPPim.M2() ,weight); } h2->Draw(); } PhaseSpace.C:1 PhaseSpace.C:2 PhaseSpace.C:3 PhaseSpace.C:4 PhaseSpace.C:5 PhaseSpace.C:6 PhaseSpace.C:7 PhaseSpace.C:8 PhaseSpace.C:9 PhaseSpace.C:10 PhaseSpace.C:11 PhaseSpace.C:12 PhaseSpace.C:13 PhaseSpace.C:14 PhaseSpace.C:15 PhaseSpace.C:16 PhaseSpace.C:17 PhaseSpace.C:18 PhaseSpace.C:19 PhaseSpace.C:20 PhaseSpace.C:21 PhaseSpace.C:22 PhaseSpace.C:23 PhaseSpace.C:24 PhaseSpace.C:25 PhaseSpace.C:26 PhaseSpace.C:27 PhaseSpace.C:28 PhaseSpace.C:29 PhaseSpace.C:30 PhaseSpace.C:31 PhaseSpace.C:32 PhaseSpace.C:33 PhaseSpace.C:34 |
|