MINT2
Functions
LineshapeMaker.h File Reference
#include "Mint/ILineshape.h"
#include "Mint/AssociatedDecayTree.h"
#include <string>
#include <vector>

Go to the source code of this file.

Functions

ILineshapeLineshapeMaker (const AssociatedDecayTree *tree, const std::string &lineshapePrefix, const std::string &lopt, const std::vector< double > &numOptions=std::vector< double >())
 

Function Documentation

◆ LineshapeMaker()

ILineshape* LineshapeMaker ( const AssociatedDecayTree tree,
const std::string &  lineshapePrefix,
const std::string &  lopt,
const std::vector< double > &  numOptions = std::vector< double >() 
)

Definition at line 47 of file LineshapeMaker.cpp.

51  {
52  bool dbThis=true;
53 
54  cout << "in LineshapeMaker: lineshapePrefix = " << lineshapePrefix << endl;
55 
56 
57  if(0 == tree) return 0;
58 
59  if(dbThis){
60  cout << "LineshapeMaker called with "
61  << tree->getVal().pdg()
62  << " lopt = " << lopt << endl;
63  cout << "final state size = " << tree->finalState().size() << endl;
64  cout << tree->getVal().pdg() << ", "
65  << (abs(tree->getVal().pdg())%1000)
66  << endl;
67  }
68 
69  if(A_is_in_B("MI_"+anythingToString(abs(tree->getVal().pdg())), lopt)){
70  if(dbThis) cout << "LineshapeMaker returns Model independent line shape for PID="<< abs(tree->getVal().pdg())<< endl;
71  return new Model_independent(*tree, lineshapePrefix);
72  }
73 
74  NamedParameter<string> _default3bodyBW("Default3bodyBW", (std::string) "PhaseSpace");
75 
76  if(tree->finalState().size()==3){
77  if(A_is_in_B("SBW_", lopt)){
78  if(dbThis) cout << "LineshapeMaker returns SBW for PID="<< abs(tree->getVal().pdg())<< endl;
79  return new SBW(*tree, lineshapePrefix);
80  }
81  else if(A_is_in_B("FermiPS", lopt)){
82  if(dbThis) cout << "LineshapeMaker returns FermiPS_BW for PID="<< abs(tree->getVal().pdg())<< endl;
83  return new FermiPS_BW(*tree, lineshapePrefix);
84  }
85  else if(A_is_in_B("HistoPS", lopt)){
86  if(dbThis) cout << "LineshapeMaker returns Histo_BW for PID="<< abs(tree->getVal().pdg())<< endl;
87  return new Histo_BW(*tree, lineshapePrefix);
88  }
89  else if(A_is_in_B("SBW_", lopt)){
90  if(dbThis) cout << "LineshapeMaker returns SBW for PID="<< abs(tree->getVal().pdg())<< endl;
91  return new SBW(*tree, lineshapePrefix);
92  }
93  else if(tree->getVal().isNonResonant()){
94  if( A_is_in_B("NonRes", lopt) ){
95  cout << "LineshapeMaker: "
96  << "\n\t> returning Non-resonant lineshape"
97  << endl;
98  if( A_is_in_B("Exp", lopt) ) return new NonRes(*tree, "Exp", lineshapePrefix);
99  else if( A_is_in_B("Pow", lopt) ) return new NonRes(*tree, "Pow", lineshapePrefix);
100  else if( A_is_in_B("EvtGen", lopt) ) return new NonRes(*tree, "EvtGen", lineshapePrefix);
101  else return new NonRes(*tree, "", lineshapePrefix);
102  }
103  }
104  else if((std::string)_default3bodyBW == "PhaseSpace"){
105  if(dbThis) cout << "LineshapeMaker returns Histo_BW for PID="<< abs(tree->getVal().pdg())<< endl;
106  return new Histo_BW(*tree, lineshapePrefix);
107  }
108  else if((std::string)_default3bodyBW == "SBW"){
109  if(dbThis) cout << "LineshapeMaker returns SBW for PID="<< abs(tree->getVal().pdg())<< endl;
110  return new SBW(*tree, lineshapePrefix);
111  }
112  }
113 
114 
115  if(A_is_in_B("SBW_"+anythingToString(abs(tree->getVal().pdg())), lopt)){
116  if(dbThis) cout << "LineshapeMaker returns SBW for PID="<< abs(tree->getVal().pdg())<< endl;
117  return new SBW(*tree, lineshapePrefix);
118  }
119 
120  if(A_is_in_B("HistoPS_"+anythingToString(abs(tree->getVal().pdg())), lopt)){
121  if(dbThis) cout << "LineshapeMaker returns Histo_BW for PID="<< abs(tree->getVal().pdg())<< endl;
122  return new Histo_BW(*tree, lineshapePrefix);
123  }
124 
125  if(abs(tree->getVal().pdg()) == 9000221 || abs(tree->getVal().pdg()) == 999001 || abs(tree->getVal().pdg()) == 10321 || abs(tree->getVal().pdg()) == 10311 ){ // sigma or kappa
126  if(A_is_in_B("Bugg", lopt)){
127  if(dbThis) cout << "LineshapeMaker: " << "\n\t> returning Bugg lineshape" << endl;
128  return new Bugg_BW(*tree, lineshapePrefix);
129  }
130  }
131 
132  if(A_is_in_B("ALWAYS_BW", lopt)){
133  if(dbThis) cout << "LineshapeMaker returns BW_BW" << endl;
134  return new BW_BW(*tree, lineshapePrefix);
135  }
136 
137  if((abs(tree->getVal().pdg())%1000)==113){
138  if(abs(tree->getVal().pdg()) == 113 && A_is_in_B("RHO_OMEGA", lopt)){
139  if(dbThis)cout << "LineshapeMaker returning rho-omega lineshape"<< endl;
140  return new Rho0Omega(*tree, lineshapePrefix);
141  //return new CrystalBarrelFOCUS(*tree);
142  //return new BW_BW(*tree);
143  }else if(A_is_in_B("RhoOmegaGS", lopt)) return new RhoOmegaGS(*tree, lineshapePrefix);
144  else if((abs(tree->getVal().pdg())%1000)==113 && A_is_in_B("GS", lopt)){
145  if(dbThis) cout << "LineshapeMaker: return GS lineshape" << endl;
146  return new GounarisSakurai(*tree, lineshapePrefix);
147  }else{
148  if(dbThis)cout << "WARNING: LineshapeMaker:"
149  << " returning plain Breit-Wigner (BW_BW) for rho"
150  << endl;
151  return new BW_BW(*tree, lineshapePrefix);
152  }
153  }else if(abs(tree->getVal().pdg()) == 10321 || abs(tree->getVal().pdg()) == 10311 ){ // K0*(1430), charged or neutral
154  if(A_is_in_B("GLass", lopt)){
155  cout << "LineshapeMaker: "
156  << "\n\t> returning Lass lineshape"
157  << endl;
158  return new GLass(*tree, lineshapePrefix);
159  }else if(A_is_in_B("Lass", lopt)){
160  cout << "LineshapeMaker: "
161  << "\n\t> returning Lass lineshape"
162  << endl;
163  return new Lass(*tree, lineshapePrefix);
164  }else{
165  cout << "WARNING: LineshapeMaker:"
166  << " returning plain Breit-Wigner (BW_BW) for K0*(1430)"
167  << endl;
168  return new BW_BW(*tree, lineshapePrefix);
169  }
170  }else if(abs(tree->getVal().pdg()) == 9010221 ){ // f0(980)
171  if(A_is_in_B("FocusFlatte", lopt)){
172  cout << "LineshapeMaker: "
173  << "\n\t> returning Flatte lineshape"
174  << endl;
175  return new FocusFlatte(*tree, lineshapePrefix);
176  }else if(A_is_in_B("Flatte", lopt)){
177  cout << "LineshapeMaker: "
178  << "\n\t> returning Flatte lineshape"
179  << endl;
180  return new Flatte(*tree, lineshapePrefix);
181  }else{
182  cout << "WARNING: LineshapeMaker:"
183  << " returning plain Breit-Wigner (BW_BW) for f0(980)"
184  << endl;
185  return new BW_BW(*tree, lineshapePrefix);
186  }
187  }else if(tree->getVal().isNonResonant()){
188  if( A_is_in_B("NonRes", lopt) ){
189  cout << "LineshapeMaker: "<< "\n\t> returning Non-resonant lineshape"<< endl;
190  if( A_is_in_B("Exp", lopt) )return new NonRes(*tree, "Exp", lineshapePrefix);
191  else if( A_is_in_B("Pow", lopt) )return new NonRes(*tree, "Pow", lineshapePrefix);
192  else if( A_is_in_B("EvtGen", lopt) ) return new NonRes(*tree, "EvtGen", lineshapePrefix);
193  else return new NonRes(*tree, "", lineshapePrefix);
194  }else if(A_is_in_B("TopHats", lopt) && numOptions.size() >= 2){
195  return new singleTopHatShape(*tree, numOptions[0], numOptions[1], lineshapePrefix); // options[0]=from, options[1]=to
196  }else{
197  cout << "WARNING: LineshapeMaker:"
198  << " returning plain Breit-Wigner (BW_BW) for non-resonant"
199  << endl;
200  return new BW_BW(*tree, lineshapePrefix);
201  }
202  }else{
203  if(dbThis) cout << "LineshapeMaker returns BW_BW" << endl;
204  return new BW_BW(*tree, lineshapePrefix);
205  }
206 
207 }
Definition: GLass.h:23
Definition: NonRes.h:13
Definition: SBW.h:16
const ValueType & getVal() const
Definition: DDTree.h:102
Definition: BW_BW.h:30
bool A_is_in_B(const std::string &a, const std::string &b)
Definition: Utils.cpp:34
Definition: Flatte.h:19
Definition: Lass.h:28
std::string anythingToString(const T &anything)
Definition: Utils.h:62
std::vector< const ValueType * > finalState() const
Definition: DDTree.h:293
int pdg() const
bool isNonResonant() const