cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches

All useful information about a generated event. More...

#include <CepGenAddOns/ROOTWrapper/ROOTTreeInfo.h>

+ Collaboration diagram for CepGenEvent:

Public Member Functions

 CepGenEvent ()
 
void clear ()
 Reinitialise the event content.
 
TTree * tree ()
 Retrieve the ROOT tree.
 
void create ()
 Populate the tree and all associated branches.
 
void attach ()
 Attach the event tree reader to a tree.
 
void attach (TFile *f, const std::string &events_tree=TREE_NAME)
 Attach the event tree reader to a file Attach the event tree reader to a file.
 
void attach (const std::string &filename, const std::string &events_tree=TREE_NAME)
 
void fill (const cepgen::Event &, bool compress=false)
 Fill the tree with a new event.
 
bool next (cepgen::Event &)
 Read the next event in the file.
 

Static Public Member Functions

static CepGenEvent load (TFile *, const std::string &events_tree=TREE_NAME)
 
static CepGenEvent load (const std::string &, const std::string &events_tree=TREE_NAME)
 

Public Attributes

cepgen::Event::EventMetadata metadata
 
float gen_time {-1.}
 Event generation time.
 
float tot_time {-1.}
 Total event generation time.
 
float weight {-1.}
 Event weight.
 
int np {0}
 Number of particles in the event.
 
double pt [MAX_PART]
 Particles transverse momentum.
 
double eta [MAX_PART]
 Particles pseudo-rapidity.
 
double phi [MAX_PART]
 Particles azimuthal angle.
 
double rapidity [MAX_PART]
 Particles rapidity.
 
double E [MAX_PART]
 Particles energy, in GeV.
 
double m [MAX_PART]
 Particles mass, in GeV/c \({}^2\).
 
double charge [MAX_PART]
 Particles charges, in e.
 
int pdg_id [MAX_PART]
 Integer particles PDG id.
 
int parent1 [MAX_PART]
 First particles mother.
 
int parent2 [MAX_PART]
 Last particles mother.
 
int stable [MAX_PART]
 Whether the particle must decay or not.
 
int role [MAX_PART]
 Particles role in the event.
 
int status [MAX_PART]
 Integer status code.
 

Static Public Attributes

static constexpr size_t MAX_PART = 5000
 Maximal number of particles in event.
 
static constexpr const char * TREE_NAME = "events"
 Output tree name.
 

Detailed Description

Definition at line 60 of file ROOTTreeInfo.h.

Constructor & Destructor Documentation

◆ CepGenEvent()

Definition at line 62 of file ROOTTreeInfo.h.

Member Function Documentation

◆ attach() [1/3]

void attach ( )

Definition at line 135 of file ROOTTreeInfo.cpp.

◆ attach() [2/3]

void attach ( const std::string &  filename,
const std::string &  events_tree = TREE_NAME 
)

Definition at line 198 of file ROOTTreeInfo.cpp.

◆ attach() [3/3]

void attach ( TFile *  f,
const std::string &  events_tree = TREE_NAME 
)

Definition at line 192 of file ROOTTreeInfo.cpp.

◆ clear()

void clear ( )

Definition at line 102 of file ROOTTreeInfo.cpp.

◆ create()

void create ( )

Definition at line 111 of file ROOTTreeInfo.cpp.

◆ fill()

void fill ( const cepgen::Event ev,
bool  compress = false 
)

Definition at line 159 of file ROOTTreeInfo.cpp.

◆ load() [1/2]

CepGenEvent load ( const std::string &  filename,
const std::string &  events_tree = TREE_NAME 
)
static

Definition at line 96 of file ROOTTreeInfo.cpp.

◆ load() [2/2]

CepGenEvent load ( TFile *  file,
const std::string &  events_tree = TREE_NAME 
)
static

Definition at line 90 of file ROOTTreeInfo.cpp.

◆ next()

bool next ( cepgen::Event ev)

Definition at line 203 of file ROOTTreeInfo.cpp.

◆ tree()

TTree * tree ( )

Definition at line 91 of file ROOTTreeInfo.h.

Member Data Documentation

◆ charge

double charge[MAX_PART]

Definition at line 82 of file ROOTTreeInfo.h.

◆ E

double E[MAX_PART]

Definition at line 80 of file ROOTTreeInfo.h.

◆ eta

double eta[MAX_PART]

Definition at line 77 of file ROOTTreeInfo.h.

◆ gen_time

float gen_time {-1.}

Definition at line 72 of file ROOTTreeInfo.h.

◆ m

double m[MAX_PART]

Definition at line 81 of file ROOTTreeInfo.h.

◆ MAX_PART

constexpr size_t MAX_PART = 5000
staticconstexpr

Definition at line 65 of file ROOTTreeInfo.h.

◆ metadata

Definition at line 71 of file ROOTTreeInfo.h.

◆ np

int np {0}

Definition at line 75 of file ROOTTreeInfo.h.

◆ parent1

int parent1[MAX_PART]

Definition at line 84 of file ROOTTreeInfo.h.

◆ parent2

int parent2[MAX_PART]

Definition at line 85 of file ROOTTreeInfo.h.

◆ pdg_id

int pdg_id[MAX_PART]

Definition at line 83 of file ROOTTreeInfo.h.

◆ phi

double phi[MAX_PART]

Definition at line 78 of file ROOTTreeInfo.h.

◆ pt

double pt[MAX_PART]

Definition at line 76 of file ROOTTreeInfo.h.

◆ rapidity

double rapidity[MAX_PART]

Definition at line 79 of file ROOTTreeInfo.h.

◆ role

int role[MAX_PART]

Definition at line 87 of file ROOTTreeInfo.h.

◆ stable

int stable[MAX_PART]

Definition at line 86 of file ROOTTreeInfo.h.

◆ status

int status[MAX_PART]

Definition at line 88 of file ROOTTreeInfo.h.

◆ tot_time

float tot_time {-1.}

Definition at line 73 of file ROOTTreeInfo.h.

◆ TREE_NAME

constexpr const char* TREE_NAME = "events"
staticconstexpr

Definition at line 66 of file ROOTTreeInfo.h.

◆ weight

float weight {-1.}

Definition at line 74 of file ROOTTreeInfo.h.