#include <BaseGenerator.h>
Definition at line 27 of file BaseGenerator.h.
◆ BaseGenerator() [1/2]
BaseGenerator::BaseGenerator |
( |
TRandom * |
rnd = gRandom | ) |
|
Definition at line 12 of file BaseGenerator.cpp.
MINT::counted_ptr< MINT::IReturnReal > _mums_p
MINT::counted_ptr< DiskResidentEventList > _evtList
MINT::counted_ptr< MINT::IReturnReal > _mums_cosTheta
MINT::counted_ptr< MINT::IReturnReal > _mums_phi
◆ BaseGenerator() [2/2]
Definition at line 23 of file BaseGenerator.cpp.
MINT::counted_ptr< MINT::IReturnReal > _mums_p
MINT::counted_ptr< DiskResidentEventList > _evtList
MINT::counted_ptr< MINT::IReturnReal > _mums_cosTheta
MINT::counted_ptr< MINT::IReturnReal > _mums_phi
◆ ~BaseGenerator()
BaseGenerator::~BaseGenerator |
( |
| ) |
|
|
virtual |
◆ dontSaveEvents()
void BaseGenerator::dontSaveEvents |
( |
| ) |
|
Definition at line 80 of file BaseGenerator.cpp.
MINT::counted_ptr< DiskResidentEventList > _evtList
◆ ensureFreshEvents()
bool BaseGenerator::ensureFreshEvents |
( |
| ) |
|
|
virtual |
◆ exhausted()
virtual bool BaseGenerator::exhausted |
( |
| ) |
const |
|
inlinevirtual |
◆ FillEventList() [1/2]
void BaseGenerator::FillEventList |
( |
DalitzEventList & |
evtList, |
|
|
int |
NEvents |
|
) |
| |
Definition at line 116 of file BaseGenerator.cpp.
118 if(dbThis) cout <<
"BaseGenerator::FillEventList (mr) called" << endl;
121 for(
int i=0; i < NEvents; i++){
123 int printEvery = 10000;
125 bool printout = ( i%printEvery == 0 || i < 1);
126 if(dbThis || printout){
127 cout <<
"BaseGenerator::FillEventList (memory resident)" << endl;
128 cout <<
" about to make event number " << i << endl;
129 cout <<
" current list size " << evtList.
size() << endl;
130 double dt = difftime(time(0), t0);
131 cout <<
" this took " << dt <<
"s" << endl;
132 if(dt > 0) cout <<
" or " << evtList.
size()/dt <<
"evt/s" << endl;
136 if(dbThis) cout <<
" got new event, now adding it" << endl;
142 cout <<
"BaseGenerator::FillEventList (memory resident)" <<endl;
143 cout <<
"After adding this event to the event list:\n " << evt << endl;
144 cout <<
".... the last event in the list is:\n " 145 << evtList[evtList.
size()-1] << endl;
146 cout <<
"are they the same?" << endl;
virtual bool Add(const EVENT_TYPE &evt)
virtual unsigned int size() const
virtual MINT::counted_ptr< IDalitzEvent > newEvent()=0
◆ FillEventList() [2/2]
Definition at line 85 of file BaseGenerator.cpp.
87 if(dbThis) cout <<
"BaseGenerator::FillEventList (dr) called" << endl;
89 for(
int i=0; i < NEvents; i++){
91 int printEvery = 10000;
93 bool printout = ( i%printEvery == 0 || i < 1);
94 if(dbThis || printout){
95 cout <<
"BaseGenerator::FillEventList (disk resident)" << endl;
96 cout <<
" about to make event number " << i << endl;
97 cout <<
" current list size " << evtList.
size() << endl;
98 double dt = difftime(time(0), t0);
99 cout <<
" this took " << dt <<
"s" << endl;
100 if(dt > 0) cout <<
" or " << evtList.
size()/dt <<
"evt/s" << endl;
107 cout <<
"BaseGenerator::FillEventList (disk resident)" <<endl;
108 cout <<
"After adding this event to the event list:\n " << evt << endl;
109 cout <<
".... the last event in the list is:\n " 111 cout <<
"are they the same?" << endl;
virtual bool Add(const DalitzEvent &evt)
virtual unsigned int size() const
DalitzEvent getEvent(unsigned int i) const
virtual MINT::counted_ptr< IDalitzEvent > newEvent()=0
◆ mothers3Momentum()
TVector3 BaseGenerator::mothers3Momentum |
( |
| ) |
const |
|
protected |
Definition at line 51 of file BaseGenerator.cpp.
57 else cT =
_rnd->Rndm()*2.0 - 1.0;
59 else phi =
_rnd->Rndm()*2.0*
pi;
61 double sT2 = 1.0 - cT*cT;
66 TVector3 v(p*cos(phi)*sT, p*sin(phi)*sT, p*cT);
MINT::counted_ptr< MINT::IReturnReal > _mums_p
MINT::counted_ptr< MINT::IReturnReal > _mums_cosTheta
bool mothers3MomentumIsSet() const
MINT::counted_ptr< MINT::IReturnReal > _mums_phi
virtual double RealVal()=0
◆ mothers3MomentumIsSet()
bool BaseGenerator::mothers3MomentumIsSet |
( |
| ) |
const |
Definition at line 47 of file BaseGenerator.cpp.
MINT::counted_ptr< MINT::IReturnReal > _mums_p
◆ newEvent()
◆ noPrintout()
void BaseGenerator::noPrintout |
( |
| ) |
|
|
inline |
◆ saveEvents()
bool BaseGenerator::saveEvents |
( |
| ) |
|
|
inlineprotected |
Definition at line 34 of file BaseGenerator.h.
MINT::counted_ptr< DiskResidentEventList > _evtList
◆ setMothers3Momentum()
Definition at line 35 of file BaseGenerator.cpp.
MINT::counted_ptr< MINT::IReturnReal > _mums_p
MINT::counted_ptr< MINT::IReturnReal > _mums_cosTheta
MINT::counted_ptr< MINT::IReturnReal > _mums_phi
◆ setSaveEvents()
void BaseGenerator::setSaveEvents |
( |
const std::string & |
fname = "GeneratorEvents.root" , |
|
|
const std::string & |
opt = "RECREATE" |
|
) |
| |
Definition at line 75 of file BaseGenerator.cpp.
MINT::counted_ptr< DiskResidentEventList > _evtList
◆ setUnweighted()
void BaseGenerator::setUnweighted |
( |
bool |
uw = true | ) |
|
|
inline |
◆ setWeighted()
void BaseGenerator::setWeighted |
( |
bool |
w = true | ) |
|
|
inline |
◆ unsetMothers3Momentum()
void BaseGenerator::unsetMothers3Momentum |
( |
| ) |
|
Definition at line 43 of file BaseGenerator.cpp.
MINT::counted_ptr< MINT::IReturnReal > _mums_p
MINT::counted_ptr< MINT::IReturnReal > _mums_cosTheta
MINT::counted_ptr< MINT::IReturnReal > _mums_phi
◆ _evtList
◆ _fname
std::string BaseGenerator::_fname |
|
protected |
◆ _mums_cosTheta
◆ _mums_p
◆ _mums_phi
◆ _noPrintout
bool BaseGenerator::_noPrintout |
|
protected |
◆ _rnd
TRandom* BaseGenerator::_rnd |
|
protected |
◆ _unWeighted
bool BaseGenerator::_unWeighted |
|
protected |
The documentation for this class was generated from the following files: