Pluto v6.3.0
Loading...
Searching...
No Matches
PEtaDoubleDalitz.cc
Go to the documentation of this file.
1
2//Eta double Dalitz decay
3//
4//References: ???
5//
6// Author: I. Froehlich
7// Written: 17.9.2009
8//
10
11#include "PEtaDoubleDalitz.h"
12
13
15 //clone the object
16 return new PEtaDoubleDalitz((const PEtaDoubleDalitz &)* this);
17};
18
19PEtaDoubleDalitz::PEtaDoubleDalitz(const Char_t *id, const Char_t *de, Int_t key) : PChannelModel(id, de, key) {
20 //Constructor
21 gRand = new TRandom2();
22 dil1 = dil2 = parent = NULL;
23};
24
25Double_t PEtaDoubleDalitz::Gen2lepton1(Double_t m) {
26 Double_t MEl = PData::LMass("e+");
27 Double_t MEl2 = 2*MEl;
28 Double_t m2 = m*m;
29 Double_t ARAND[2];
30 Double_t WTD;
31 Double_t AM;
32 do {
33 gRand->RndmArray(2, ARAND);
34 AM = MEl2*TMath::Exp(TMath::Log(m/MEl2)*ARAND[0]);
35 Double_t AM2 = AM*AM;
36 Double_t RE = MEl2*MEl2/AM2;
37 WTD = TMath::Sqrt(1-RE)*(1+RE/2)*TMath::Power(1-AM2/m2,3);
38 } while(ARAND[1]>WTD); // ???????????? while(ARAND[1]>WTD)
39 return AM;
40}
41
42
44
45 parent = GetParticle("parent");
46 if (!parent) {
47 Warning("Init", "Parent not found");
48 return kFALSE;
49 }
50
51 dil1 = GetParticle("dilepton");
52 dil2 = GetParticle("dilepton");
53
54 if (!dil1 || !dil2) {
55 Warning("Init", "Dileptons not found");
56 return kFALSE;
57 }
58
59 formfactor_model =
60 GetSecondaryModel("formfactor");
61 if (formfactor_model)
62 ff_w_max = formfactor_model->GetWeightMax();
63 if (ff_w_max < 0) {
64 Warning("Init", "Max value of the FF model not initialized, FF disabled");
65 formfactor_model = NULL;
66 }
67 if (!formfactor_model) ff_w_max = 1.;
68
69 return kTRUE;
70}
71
73
74 Double_t MEta = parent->M();
75
76 Double_t weight = 1.;
77 Double_t mVV[2];
78 do {
79 mVV[0] = Gen2lepton1(MEta);//IM of the 1-st pair e+e-
80 mVV[1] = Gen2lepton1(MEta);//IM of the 2-nd pair e+e-
81
82 if (formfactor_model && formfactor_model->GetVersionFlag(VERSION_SAMPLING)) {
83 weight *= formfactor_model->GetWeight(mVV[0]);
84 weight *= formfactor_model->GetWeight(mVV[1]);
85 }
86
87 } while((mVV[0]+mVV[1]>MEta) || ((weight/ff_w_max) < PUtils::sampleFlat()) );
88
89
90 dil1->SetM(mVV[0]);
91 dil2->SetM(mVV[1]);
92
93 return kTRUE;
94};
95
ClassImp(PBeamLineSimulation) PBeamLineSimulation
#define VERSION_SAMPLING
PChannelModel * GetSecondaryModel(const char *)
static double LMass(const int &id)
Definition PData.h:32
PParticle * GetParticle(const Char_t *pflag=NULL)
PDistribution * Clone(const char *delme=NULL) const
PEtaDoubleDalitz(const Char_t *id, const Char_t *de, Int_t key)
Bool_t SampleMass(void)
static Double_t sampleFlat()
Definition PUtils.h:121