RooParticle
Particle scattering simulator with ROOT
Loading...
Searching...
No Matches
experiment.cpp
Go to the documentation of this file.
1#include "experiment.hpp"
2#include "particle.hpp"
3#include "event.hpp"
4
5#include "TROOT.h"
6
7#include "cstdarg"
8
9void experiment::MakeEvent(Int_t ninparticle, ...){
10 eventOn = kTRUE;
12 Int_t i;
13 particle* p;
14 va_list argList;
15 va_start(argList, ninparticle);
16
17 for(i=0; i<ninparticle; i++){
18 p = va_arg(argList, particle* );
20 }
21 va_end(argList);
22
23 return;
24}
25
27 eventOn = kTRUE;
29 particle* p=p1;
30 va_list argList;
32 va_start(argList, p1);
33
34 Int_t i;
35 for(i=0; i<(ninparticle-1); i++){
36 p = va_arg(argList, particle* );
38 }
39 va_end(argList);
40
41 return;
42}
43
45 // Takes the template only; events are created by MakeEvent().
46 eventT = eventT_;
47 currentEvent = nullptr;
48}
One simulated system: particles, pairwise forces, inspectors and the time integration.
Definition event.hpp:93
particle * AddParticle(particle *particle_)
Add a particle to the event.
Definition event.hpp:168
void MakeEvent(particle *p1,...)
Create a new event from the template and add exactly GetNInParticle() particles.
Int_t ninparticle
particles per event
void MakeEvent(Int_t ninparticle_,...)
Create a new event as a copy of the template and add particles to it.
Definition experiment.cpp:9
event * eventT
template event, not owned
Bool_t eventOn
true after MakeEvent(), false after OffEvent()/DelEvent(); informational only
experiment()
Empty experiment; the template must be set with SetTemplate().
event * currentEvent
last created event (heap)
A point body with mass, position, velocity, step count, time and an optional recorded path.
Definition particle.hpp:36
Event factory that stamps out events from a template (experiment, experimentP).