Pluto v6.3.0
Loading...
Searching...
No Matches
PEtaPiPiDilepton.cc
Go to the documentation of this file.
1
2//
3// Decay eta -> pi+ pi- dilepton
4// PiPi correlation including the angles after the dilepton sampling
5//
6// In total, the equation reads as follows:
7//
8//
9//
10// References:
11// [L1] Thimo Petri and Andreas Wirzba
12// Internal Report, Juelich
13//
14// Author: I. Froehlich
16
17
18using namespace std;
19#include <sstream>
20#include <iostream>
21#include <iomanip>
22
23#include "PEtaPiPiDilepton.h"
24
25
30
31PEtaPiPiDilepton::PEtaPiPiDilepton(const Char_t *id, const Char_t *de, Int_t key) :
32 PChannelModel(id, de, key) {
33
34 if (is_channel < 0)
35 Warning("PEtaPiPiDilepton", "This model should be bound to CHANNELS only");
36
40 mass_ee = 2.*mass_e;
41 weight_max = 0.00000001;
42};
43
45 return new PEtaPiPiDilepton((const PEtaPiPiDilepton &)* this);
46};
47
49 //Init function called once for each PChannel
50
51 //looking for parent. This is mandatory
52 parent = GetParticle("parent");
53 if (!parent) {
54 Warning("Init", "Parent not found");
55 return kFALSE;
56 }
57 pip = GetParticle("pi+");
58 if (!pip) {
59 Warning("Init", "Pi+ not found");
60 return kFALSE;
61 }
62 pim = GetParticle("pi-");
63 if (!pim) {
64 Warning("Init", "Pi- not found");
65 return kFALSE;
66 }
67 em = GetParticle("e-");
68 if (!em) {
69 Warning("Init", "e- not found");
70 return kFALSE;
71 }
72 ep = GetParticle("e+");
73 if (!ep) {
74 Warning("Init", "e+ not found");
75 return kFALSE;
76 }
77 return kTRUE;
78}
79
80
81Double_t PEtaPiPiDilepton::GetWeight(Double_t *mass, Int_t *) {
82 //Inputs: s_pipi, q, theta_pip, theta_e, phi
83 //This is the second part of eqn. 64 of Wirzba's report
84
85 Double_t s_pipi = mass[0]*mass[0];
86 Double_t q = mass[1];
87 Double_t q2 = q*q;
88 Double_t theta_pip = mass[2];
89 Double_t theta_ep = mass[4];
90 Double_t phi = mass[5];
91
92 Double_t sin_theta_pip = sin(theta_pip);
93 Double_t beta_pi2 = (1-((4*m_pi*m_pi)/s_pipi));
94 Double_t weight = (s_pipi*beta_pi2 *sin_theta_pip*sin_theta_pip);
95
96 //for the curly bracket only the first part is supported at the moment
97 Double_t beta_e2 = (1-((4*mass_e*mass_e)/q2));
98 Double_t weight_part2 = PKinematics::lambda(mass_eta*mass_eta,s_pipi,q2) *
99 (1+beta_e2*sin(theta_ep)*sin(theta_ep) * sin(phi)*sin(phi));
100
101 return weight * weight_part2;
102}
103
105 return kTRUE; //keep masses
106}
107
109 //Returns the weight of ref [L1]
110
111 TLorentzVector twopi = ((*(TLorentzVector*) pip)
112 + (*(TLorentzVector*) pim));
113 TLorentzVector dil = ((*(TLorentzVector*) ep)
114 + (*(TLorentzVector*) em));
115
116
117 PParticle p_star(pip);
118 //rotate such that twopi points to z-axis:
119 Double_t Phi = twopi.Phi();
120 Double_t Theta = twopi.Theta();
121 twopi.RotateZ(-Phi);
122 twopi.RotateY(-Theta);
123 p_star.RotateZ(-Phi);
124 p_star.RotateY(-Theta);
125 p_star.Boost(-twopi.BoostVector());
126
127 Double_t theta_pi = TMath::Pi() - p_star.Theta();
128
129 Double_t s_pipi = twopi.M();
130
131 PParticle ep_tmp(pip);
132 Phi = dil.Phi();
133 Theta = dil.Theta();
134 dil.RotateZ(-Phi);
135 dil.RotateY(-Theta);
136 ep_tmp.RotateZ(-Phi);
137 ep_tmp.RotateY(-Theta);
138 ep_tmp.Boost(-dil.BoostVector());
139
140 Double_t phi=p_star.Phi() - ep_tmp.Phi();
141
142 return GetWeight(s_pipi, dil.M(), theta_pi, ep_tmp.Theta(), phi);
143}
144
146 //Use rejection mode...
147
148 if (GetVersionFlag(VERSION_WEIGHTING)) return kTRUE;
149 //...but not if weighting enabled.
150
151 Double_t weight = GetWeight();
152
153 if (weight>weight_max) {
154 Warning("IsNotRejected", "Weight (%lf) > max (%lf)", weight, weight_max);
155 weight_max = weight*1.1;
156 }
157
158 if ((weight/weight_max)>PUtils::sampleFlat())
159 return kTRUE; // sample now distribution
160
161 return kFALSE;
162}
163
#define VERSION_WEIGHTING
ClassImp(PEtaPiPiDilepton) PEtaPiPiDilepton
PStaticData * makeStaticData()
PParticle * dil
PParticle * GetParticle(const Char_t *pflag=NULL)
UInt_t GetVersionFlag(UInt_t f=0xffffffff) const
Bool_t IsNotRejected(void)
Double_t GetWeight(void)
PDistribution * Clone(const char *delme=NULL) const
Bool_t SampleMass(void)
static double lambda(double M, double m1, double m2)
Definition PKinematics.h:14
double GetParticleMass(const int &id)
static Double_t sampleFlat()
Definition PUtils.h:121
PParticle q
Definition complete_eta.C:8
Double_t mass