#include <EDepSimRooTrackerKinematicsGenerator.hh>
Public Member Functions | |
RooTrackerKinematicsGenerator (const G4String &name, const G4String &fileName, const G4String &treeName, const G4String &order, int firstEvent) | |
virtual | ~RooTrackerKinematicsGenerator () |
virtual GeneratorStatus | GeneratePrimaryVertex (G4Event *evt, const G4LorentzVector &position) |
Add a primary vertex to the event. More... | |
virtual G4String | GetInputName () |
Get the name of the open kinematics file. More... | |
Public Member Functions inherited from EDepSim::VKinematicsGenerator | |
VKinematicsGenerator (const G4String &name) | |
virtual | ~VKinematicsGenerator () |
G4String | GetName () const |
Return the name of the generator. More... | |
Private Attributes | |
std::string | fFilename |
The static part of the file name field. More... | |
TFile * | fInput |
The RooTracker file to read. More... | |
TTree * | fTree |
The event tree that contains the output events. More... | |
unsigned int | fNextEntry |
std::vector< int > | fEntryVector |
TBits * | fEvtFlags |
The generator-specific event flags. More... | |
TObjString * | fEvtCode |
The generator-specific string with the 'event code'. More... | |
int | fEvtNum |
The sequence number of the event (the event number). More... | |
double | fEvtXSec |
The cross section for the event (1E-38 cm2) More... | |
double | fEvtDXSec |
double | fEvtWght |
The weight for the event. More... | |
double | fEvtProb |
double | fEvtVtx [4] |
int | fStdHepN |
The number of particles in the particle arrays to track. More... | |
int | fStdHepPdg [kNPmax] |
int | fStdHepStatus [kNPmax] |
double | fStdHepX4 [kNPmax][4] |
double | fStdHepP4 [kNPmax][4] |
The 4-momentum (px, py, pz, E) of the particle in the LAB frame (GeV) More... | |
double | fStdHepPolz [kNPmax][3] |
The particle polarization vector. More... | |
int | fStdHepFd [kNPmax] |
The index of the first daughter of the particle in the arrays. More... | |
int | fStdHepLd [kNPmax] |
The index last daughter of the particle in the arrays. More... | |
int | fStdHepFm [kNPmax] |
The index of the first mother of the particle in there arrays. More... | |
int | fStdHepLm [kNPmax] |
The index of the last mother of the particle in the arrays. More... | |
int | fNuParentPdg |
The PDG code of the particle which created the parent neutrino. More... | |
int | fNuParentDecMode |
double | fNuParentDecP4 [4] |
double | fNuParentDecX4 [4] |
double | fNuParentProP4 [4] |
double | fNuParentProX4 [4] |
int | fNuParentProNVtx |
The vertex ID of the parent particle vertex. More... | |
Static Private Attributes | |
static const int | kNPmax = 4000 |
The maximum number of particles that can be in the particle arrays. More... | |
Additional Inherited Members | |
Public Types inherited from EDepSim::VKinematicsGenerator | |
enum | GeneratorStatus { kFail = 0, kSuccess, kLastVertex, kEndEvent } |
A status value that can be returned by GeneratePrimaryVertex. More... | |
Definition at line 18 of file EDepSimRooTrackerKinematicsGenerator.hh.
EDepSim::RooTrackerKinematicsGenerator::RooTrackerKinematicsGenerator | ( | const G4String & | name, |
const G4String & | fileName, | ||
const G4String & | treeName, | ||
const G4String & | order, | ||
int | firstEvent | ||
) |
Construct a new generator. The name is the name of the generator (e.g. NEUT, GENIE, &c). The fileName is the name of the root file containing the tree of kinematic information. The treeName is the path of the rooTracker tree in the input file. The order is a string specifying the order that events in the input files should be used. The current legal values are "consecutive", "stride", or "random". The firstEvent is the first event to use in the file.
While NEUT and GENIE produce files with single interactions in each event, the individual events can be built into spill using another program (a so called overlay program). The divisions between the spills can be specified by adding in a fake event that has a single particle with a HepStatus value of -1. The fake event will be dropped from generation, so it should not contain a real particle.
Definition at line 35 of file EDepSimRooTrackerKinematicsGenerator.cc.
|
virtual |
Definition at line 144 of file EDepSimRooTrackerKinematicsGenerator.cc.
|
virtual |
Add a primary vertex to the event.
Check to see if the next event is there.
Implements EDepSim::VKinematicsGenerator.
Definition at line 152 of file EDepSimRooTrackerKinematicsGenerator.cc.
|
virtual |
Get the name of the open kinematics file.
Definition at line 146 of file EDepSimRooTrackerKinematicsGenerator.cc.
|
private |
A pre-filled vector of entry numbers to be used from input tree. This is used to allow the order of the input interactions to be randomized. Beam flux simulators typically over-sample pion decays in the beam pipe so that they can generate larger samples. This has the unfortunate effect that consecutive neutrino interactions will have correlated energies.
Definition at line 68 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The generator-specific string with the 'event code'.
Definition at line 79 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The differential cross section for the event kinematics (1E-38 cm2/{K^n})
Definition at line 89 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The generator-specific event flags.
Definition at line 76 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The sequence number of the event (the event number).
Definition at line 82 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The probability for the event (given the cross section, path lengths, etc.).
Definition at line 96 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The event vertex position in detector coord syst (in meters and seconds).
Definition at line 100 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The weight for the event.
Definition at line 92 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The cross section for the event (1E-38 cm2)
Definition at line 85 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The static part of the file name field.
Definition at line 50 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The RooTracker file to read.
Definition at line 53 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The next entry to read from the file. The entry to be used is fEntryVector[fNextEntry].
Definition at line 60 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The interaction mode at the vertex which created the parent neutrino. This is normally the decay mode of the parent particle.
Definition at line 177 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The 4 momentum of the particle at the vertex which created the parent neutrino. This is normally the momentum of the parent particle at the decay point.
Definition at line 182 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The position of the vertex at which the neutrino was created. This is passed directly from the beam (or other flux) generator, and is in the native units of the original generator.
Definition at line 187 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The PDG code of the particle which created the parent neutrino.
The following variables are copied more or less directly from the input flux generator.
Definition at line 173 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The vertex ID of the parent particle vertex.
Definition at line 199 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The momentum of the parent particle at it's production point. This is in the native energy units of the flux generator.
Definition at line 191 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The position of the parent particle at it's production point. This uses the target as the origin and is in the native units of the flux generator.
Definition at line 196 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The index of the first daughter of the particle in the arrays.
Definition at line 156 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The index of the first mother of the particle in there arrays.
Definition at line 162 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The index last daughter of the particle in the arrays.
Definition at line 159 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The index of the last mother of the particle in the arrays.
Definition at line 165 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The number of particles in the particle arrays to track.
Definition at line 103 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The 4-momentum (px, py, pz, E) of the particle in the LAB frame (GeV)
Definition at line 150 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The PDG codes for the particles to track. This may include generator specific codes for pseudo particles.
Definition at line 110 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The particle polarization vector.
Definition at line 153 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The a generator specific status for each particle. Particles with a status equal to 1 will be tracked.
The HEPEVT status values are as follows:
The GENIE generator approximately follows the HEPEVT status codes. As of July 2008, the status values found the GENIE source code are:
Definition at line 143 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The position (x, y, z, t) (fm, second) of the particle in the nuclear frame
Definition at line 147 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
private |
The event tree that contains the output events.
Definition at line 56 of file EDepSimRooTrackerKinematicsGenerator.hh.
|
staticprivate |
The maximum number of particles that can be in the particle arrays.
Definition at line 106 of file EDepSimRooTrackerKinematicsGenerator.hh.