Pluto v6.3.0
Loading...
Searching...
No Matches
PEtaPiPiDileptonMass.cc
Go to the documentation of this file.
1
2//
3// Decay eta -> pi+ pi- dilepton
4// Model to sample the dilepton mass
5//
6// References:
7// [L1] Thimo Petri and Andreas Wirzba
8// Internal Report, Juelich
9//
10// Author: I. Froehlich
12
13
14using namespace std;
15#include <sstream>
16#include <iostream>
17#include <iomanip>
18
20
21
26
27PEtaPiPiDileptonMass::PEtaPiPiDileptonMass(const Char_t *id, const Char_t *de, Int_t key) :
28 PChannelModel(id, de, key) {
29
30 if (is_channel < 0)
31 Warning("PEtaPiPiDileptonMass", "This model should be bound to CHANNELS only");
32
35 mass_ee = 2.*mass_e;
37
38 //it is important to avoid energy conservation violation, otherwise
39 //genbod will be much slower:
40 SetDynamicRange(mass_ee,makeStaticData()->GetParticleMass("eta")-2*m_pi);
41} ;
42
44 return new PEtaPiPiDileptonMass((const PEtaPiPiDileptonMass &)* this);
45};
46
48 //Init function called once for each PChannel
49
50 //looking for parent. This is mandatory
51 parent = GetParticle("parent");
52 if (!parent) {
53 Warning("Init", "Parent not found");
54 return kFALSE;
55 }
56 pip = GetParticle("pi+");
57 if (!pip) {
58 Warning("Init", "Pi+ not found");
59 return kFALSE;
60 }
61 pim = GetParticle("pi-");
62 if (!pim) {
63 Warning("Init", "Pi- not found");
64 return kFALSE;
65 }
66 ep = GetParticle("e+");
67 if (!ep) {
68 Warning("Init", "e+ not found");
69 return kFALSE;
70 }
71 em = GetParticle("e-");
72 if (!em) {
73 Warning("Init", "e- not found");
74 return kFALSE;
75 }
76
78 GetSecondaryModel("formfactor");
79
80 return kTRUE;
81}
82
83
84Double_t PEtaPiPiDileptonMass::GetWeight(Double_t *mass, Int_t *) {
85
86 //This is the mass-dependent part of eqn. 64 of Wirzba's report
87
88 return GetMassWeight(mass[0]);
89}
90
91Double_t PEtaPiPiDileptonMass::GetMassWeight(Double_t mass) const {
92
93 //Mass-dependent part of the eqn. 64
94
95 if (mass < mass_ee) return 0.;
96
97 Double_t weight = 1./(8*mass*mass);
98
100 weight *= vmd_formfactor_model->GetWeight(mass);
101 }
102
103 return weight;
104
105}
106
107Bool_t PEtaPiPiDileptonMass::SampleMass(Double_t *mass, Int_t *) {
108
109 mass[0] = this->GetRandom();
110 return kTRUE;
111}
112
113Double_t PEtaPiPiDileptonMass::Eval(Double_t x, Double_t, Double_t, Double_t) const {
114 //return mass of the dilepton for GetRandom sampling
115
116 return GetMassWeight(x);
117}
118
119// Double_t PEtaPiPiDileptonMass::GetWeight(void) {
120
121// return GetWeight(dilepton->M());
122// }
123
ClassImp(PEtaPiPiDileptonMass) PEtaPiPiDileptonMass
PStaticData * makeStaticData()
PChannelModel * GetSecondaryModel(const char *)
void SetDynamicRange(Double_t my_mmin, Double_t my_mmax)
PParticle * GetParticle(const Char_t *pflag=NULL)
PDistribution * Clone(const char *delme=NULL) const
Double_t GetMassWeight(Double_t mass) const
virtual Bool_t SampleMass(void)
virtual Double_t GetWeight(void)
PChannelModel * vmd_formfactor_model
Double_t Eval(Double_t x, Double_t y, Double_t z, Double_t t) const
double GetParticleMass(const int &id)
Double_t mass
rho GetRandom()