25 , _unWeighted(other._unWeighted)
26 , _evtList(other._evtList)
27 , _noPrintout(other._noPrintout)
29 , _mums_p(other._mums_p)
30 , _mums_cosTheta(other._mums_cosTheta)
31 , _mums_phi(other._mums_phi)
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);
76 ,
const std::string& opt){
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;
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;
154 _rnd->SetSeed(time(0)*3);
virtual bool Add(const EVENT_TYPE &evt)
MINT::counted_ptr< MINT::IReturnReal > _mums_p
MINT::counted_ptr< DiskResidentEventList > _evtList
virtual bool ensureFreshEvents()
MINT::counted_ptr< MINT::IReturnReal > _mums_cosTheta
void setSaveEvents(const std::string &fname="GeneratorEvents.root", const std::string &opt="RECREATE")
virtual bool Add(const DalitzEvent &evt)
bool mothers3MomentumIsSet() const
void setMothers3Momentum(MINT::counted_ptr< MINT::IReturnReal > p, MINT::counted_ptr< MINT::IReturnReal > cosTheta=(MINT::counted_ptr< MINT::IReturnReal >) 0, MINT::counted_ptr< MINT::IReturnReal > phi=(MINT::counted_ptr< MINT::IReturnReal >) 0)
virtual unsigned int size() const
MINT::counted_ptr< MINT::IReturnReal > _mums_phi
void unsetMothers3Momentum()
BaseGenerator(TRandom *rnd=gRandom)
virtual double RealVal()=0
virtual unsigned int size() const
TVector3 mothers3Momentum() const
DalitzEvent getEvent(unsigned int i) const
void FillEventList(DalitzEventList &evtList, int NEvents)
virtual MINT::counted_ptr< IDalitzEvent > newEvent()=0