9 const unsigned int& seed )
11 , _nbody(_pat.numDaughters())
13 , _pdf(_pat, &_myOwnPSet)
16 _P.SetXYZM( 0.0, 0.0, 0.0,
_pat[0].mass() );
18 std::vector<double> masses(
_nbody);
19 for(
unsigned int i=0; i<
_nbody; i++ )
20 masses[i] =
_pat[i+1].mass();
22 gRandom->SetSeed(seed);
27 const unsigned int& NEvents )
38 for(
unsigned int i=0; i<NEvents; i++ ){
41 const double pdf_start =
_pdf.
Prob(candEvent_start);
43 const double pdf_next =
_pdf.
Prob(candEvent_next);
45 ratio = pdf_next/pdf_start;
47 candEvent_start = candEvent_next;
48 evtList.
Add(candEvent_next);
50 const double height = gRandom->Rndm();
52 candEvent_start = candEvent_next;
53 evtList.
Add(candEvent_next);
55 evtList.
Add(candEvent_start);
63 std::vector<TLorentzVector> p4_mumAndDgtr(
_nbody+1);
66 p4_mumAndDgtr[0] =
_P;
70 const double weight =
_event.Generate();
71 const double height = gRandom->Uniform(1.0/weight);
74 for(
unsigned int i=0; i<
_nbody; i++ )
75 p4_mumAndDgtr[i+1] = *(
_event.GetDecay(i));
virtual bool Add(const EVENT_TYPE &evt)
DalitzEvent GetFlatEvent()
virtual double Prob(IDalitzEvent &evt)
DalitzMCMC(const DalitzEventPattern &pat, const unsigned int &seed=0)
const DalitzEventPattern _pat
const unsigned int _nbody
void FillEventList(DalitzEventList &evtList, const unsigned int &NEvents)