Pluto v6.3.0
Loading...
Searching...
No Matches
PEtaPiPiGamma.cc
Go to the documentation of this file.
1
2//
3// Decay eta -> pi+ pi- gamma
4//
5// References:
6// [L1] Thimo Petri and Andreas Wirzba
7// Internal Report, Juelich
8//
9// Author: I. Froehlich
11
12
13using namespace std;
14#include <sstream>
15#include <iostream>
16#include <iomanip>
17
18#include "PEtaPiPiGamma.h"
19
20
25
26PEtaPiPiGamma::PEtaPiPiGamma(const Char_t *id, const Char_t *de, Int_t key) :
27 PChannelModel(id, de, key) {
28
29 if (is_channel < 0)
30 Warning("PEtaPiPiGamma", "This model should be bound to CHANNELS only");
31
32 weight_max = 0.0004;
33};
34
35PDistribution* PEtaPiPiGamma::Clone(const char *) const {
36 return new PEtaPiPiGamma((const PEtaPiPiGamma &)* this);
37};
38
39Bool_t PEtaPiPiGamma::Init(void) {
40 //Init function called once for each PChannel
41
42 //looking for parent. This is mandatory
43 parent = GetParticle("parent");
44 if (!parent) {
45 Warning("Init", "Parent not found");
46 return kFALSE;
47 }
48 pip = GetParticle("pi+");
49 if (!pip) {
50 Warning("Init", "Pi+ not found");
51 return kFALSE;
52 }
53 pim = GetParticle("pi-");
54 if (!pim) {
55 Warning("Init", "Pi- not found");
56 return kFALSE;
57 }
58 gamma = GetParticle("g");
59 if (!gamma) {
60 Warning("Init", "Gamma not found");
61 return kFALSE;
62 }
63
65 GetSecondaryModel("formfactor");
66
67 //Fold the 2 max values
69 Info("Init", "Found FF model");
70 Double_t ff_w_max = m_formfactor_model->GetWeightMax();
71 if (ff_w_max < 0) {
72 Warning("Init", "Max value of the FF model not initialized");
73 } else {
74 weight_max *= ff_w_max;
75 }
76 }
77
78 return kTRUE;
79}
80
81
83 //Returns the weight of ref [L1]
84
85 Double_t e_tilde = gamma->E();
86
87 TLorentzVector twopi = ((*(TLorentzVector*) pip)
88 + (*(TLorentzVector*) pim));
89
90 PParticle p_star(pip);
91 //rotate such that twopi points to z-axis:
92 Double_t Phi = twopi.Phi();
93 Double_t Theta = twopi.Theta();
94 twopi.RotateZ(-Phi);
95 twopi.RotateY(-Theta);
96 p_star.RotateZ(-Phi);
97 p_star.RotateY(-Theta);
98
99 p_star.Boost(-twopi.BoostVector());
100
101 Double_t theta_pi = TMath::Pi() - p_star.Theta();
102 Double_t p_star_value = p_star.P();
103 Double_t s_pipi = twopi.M(); //to be consistent I used the mass (not squared) - see SECONDARY_MODELS
104
105 Double_t weight = (
106 e_tilde*e_tilde * p_star_value*p_star_value
107 * pow(sin(theta_pi),2));
108
109 if (m_formfactor_model) {
110 weight *= m_formfactor_model->GetWeight(s_pipi);
111 }
112
113 return weight;
114
115}
116
118 //Use rejection mode...
119
120 if (GetVersionFlag() & VERSION_WEIGHTING) return kTRUE;
121 //...but not if weighting enabled.
122
123 Double_t weight = GetWeight();
124
125 if (weight > weight_max) {
126 weight_max = weight*1.1;
127 Warning("IsNotRejected", "Weight > max, new max is %lf", weight_max);
128 }
129
130 if ((weight/weight_max) > PUtils::sampleFlat())
131 return kTRUE; // sample now distribution
132
133 return kFALSE;
134}
135
#define VERSION_WEIGHTING
ClassImp(PEtaPiPiGamma) PEtaPiPiGamma
PChannelModel * GetSecondaryModel(const char *)
PParticle * GetParticle(const Char_t *pflag=NULL)
UInt_t GetVersionFlag(UInt_t f=0xffffffff) const
PParticle * parent
Bool_t IsNotRejected(void)
Double_t GetWeight(void)
PChannelModel * m_formfactor_model
PDistribution * Clone(const char *delme=NULL) const
PParticle * pip
Double_t weight_max
Bool_t Init(void)
PParticle * gamma
PParticle * pim
static Double_t sampleFlat()
Definition PUtils.h:121