#include "TApplication.h"
#include "TPythia6.h"
#include "TFile.h"
#include "TError.h"
#include "TTree.h"
#include "TClonesArray.h"
#include "TH1.h"
#include "TF1.h"
#include "TStyle.h"
#include "TLatex.h"
#include "TCanvas.h"
#include "Riostream.h"
#include <cstdlib>
Go to the source code of this file.
Defines | |
#define | FILENAME "pythia.root" |
#define | TREENAME "tree" |
#define | BRANCHNAME "particles" |
#define | HISTNAME "ptSpectra" |
#define | PDGNUMBER 211 |
Functions | |
void | loadLibraries () |
int | makeEventSample (Int_t nEvents) |
int | showEventSample () |
void | pythiaExample (Int_t n=1000) |
int | main (int argc, char **argv) |
#define BRANCHNAME "particles" |
#define FILENAME "pythia.root" |
Definition at line 80 of file pythiaExample.C.
Referenced by makeEventSample(), and showEventSample().
#define HISTNAME "ptSpectra" |
Definition at line 83 of file pythiaExample.C.
Referenced by makeEventSample(), and showEventSample().
#define PDGNUMBER 211 |
#define TREENAME "tree" |
Definition at line 81 of file pythiaExample.C.
Referenced by makeEventSample(), and showEventSample().
void loadLibraries | ( | ) |
Definition at line 88 of file pythiaExample.C.
References gSystem, and TSystem::Load().
Referenced by makeEventSample(), and showEventSample().
int main | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 224 of file pythiaExample.C.
References makeEventSample(), n, NULL, TApplication::Run(), showEventSample(), and strtol().
int makeEventSample | ( | Int_t | nEvents | ) |
Definition at line 100 of file pythiaExample.C.
References TTree::Branch(), BRANCHNAME, TFile::Close(), TTree::Draw(), Error, FILENAME, TTree::Fill(), func(), TPythia6::GenerateEvent(), TGenerator::GetListOfParticles(), hist, HISTNAME, i, TPythia6::Initialize(), TFile::IsOpen(), loadLibraries(), TFile::Open(), PDGNUMBER, TTree::Print(), sprintf(), TREENAME, and TFile::Write().
Referenced by main(), and pythiaExample().
void pythiaExample | ( | Int_t | n = 1000 |
) |
Definition at line 218 of file pythiaExample.C.
References makeEventSample(), n, and showEventSample().
int showEventSample | ( | ) |
Definition at line 172 of file pythiaExample.C.
References canvas, Error, FILENAME, func(), TDirectoryFile::Get(), gStyle, hist, HISTNAME, TFile::IsOpen(), latex(), loadLibraries(), TFile::Open(), TPad::SetLogy(), TStyle::SetOptStat(), sprintf(), TTree::StartViewer(), and TREENAME.
Referenced by main(), and pythiaExample().