|
RooParticle
Particle scattering simulator with ROOT
|
experiment with a fixed particle count: MakeEvent() takes no count. More...
#include <experiment.hpp>
Public Member Functions | |
| experimentP (Int_t ninparticle_) | |
Experiment that builds events of ninparticle_ particles. | |
| void | SetNInParticle (Int_t ninparticle_) |
| Change the number of particles per event. | |
| Int_t | GetNInParticle () |
| Number of particles per event. | |
| void | MakeEvent (particle *p1,...) |
| Create a new event from the template and add exactly GetNInParticle() particles. | |
Public Member Functions inherited from experiment | |
| experiment () | |
| Empty experiment; the template must be set with SetTemplate(). | |
| experiment (event *eventT_) | |
| Experiment with a template. | |
| void | SetTemplate (event *eventT_) |
| Set (or replace) the template event. | |
| void | MakeEvent (Int_t ninparticle_,...) |
| Create a new event as a copy of the template and add particles to it. | |
| void | OffEvent () |
| Mark the current event as off. The event itself is kept; only an internal flag changes (nothing else reads it). | |
| void | DelEvent () |
| Mark the current event as off and delete it (with its particles and inspectors). | |
| event * | GetEvent () |
| The event created by the last MakeEvent() (owned by the experiment's user: see DelEvent()). | |
Private Attributes | |
| Int_t | ninparticle =1 |
| particles per event | |
experiment with a fixed particle count: MakeEvent() takes no count.
Same template pattern and ownership as experiment. The number of particles per event is stored with the object (default 1), so the call is MakeEvent(p1, p2, ...) with exactly that many pointers.
Definition at line 79 of file experiment.hpp.
|
inline |
Experiment that builds events of ninparticle_ particles.
| ninparticle_ | number of particles per event |
Definition at line 83 of file experiment.hpp.
|
inline |
Number of particles per event.
Definition at line 88 of file experiment.hpp.
| void experimentP::MakeEvent | ( | particle * | p1, |
| ... | |||
| ) |
Create a new event from the template and add exactly GetNInParticle() particles.
The first particle is always added (even if the count is 0 or negative); the remaining count-1 are read from the variadic list. The number of pointers passed must equal GetNInParticle(): there is no check, a shortfall is undefined behaviour. This hides experiment::MakeEvent. The new event replaces the previous one (not deleted); the particles are owned by the new event.
| p1 | first particle (must be non-null) |
| ... | the remaining particle* arguments |
Definition at line 26 of file experiment.cpp.
|
inline |
Change the number of particles per event.
| ninparticle_ | number of particles per event |
Definition at line 86 of file experiment.hpp.
|
private |
particles per event
Definition at line 101 of file experiment.hpp.