Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Loading...
Searching...
No Matches
PhaseSpace.C File Reference

Detailed Description

View in nbviewer Open in SWAN
Example of use of TGenPhaseSpace

void PhaseSpace() {
TLorentzVector target(0.0, 0.0, 0.0, 0.938);
TLorentzVector beam(0.0, 0.0, .65, .65);
//(Momentum, Energy units are Gev/C, GeV)
Double_t masses[3] = { 0.938, 0.139, 0.139} ;
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);
h2->Fill(pPPip.M2() ,pPPim.M2() ,weight);
}
h2->Draw();
}
int Int_t
Definition RtypesCore.h:45
double Double_t
Definition RtypesCore.h:59
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
<div class="legacybox"><h2>Legacy Code</h2> TGenPhaseSpace is a legacy interface: there will be no bu...
Bool_t SetDecay(TLorentzVector &P, Int_t nt, const Double_t *mass, Option_t *opt="")
Input:
2-D histogram with a float per channel (see TH1 documentation)
Definition TH2.h:307
const Int_t n
Definition legend1.C:16
Author
Valerio Filippini

Definition in file PhaseSpace.C.