MINT2
SpinFactorMaker.cpp
Go to the documentation of this file.
1 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
2 // status: Mon 9 Feb 2009 19:18:13 GMT
3 
4 #include "Mint/SpinFactorMaker.h"
5 #include "Mint/Utils.h"
6 #include "Mint/DecayTree.h"
8 #include "Mint/ISpinFactor.h"
9 #include "Mint/SpinFactor.h"
10 #include "Mint/SpinFactors.h"
11 #include <iostream>
12 
13 using namespace std;
14 using namespace MINT;
15 
16 void PrintAllSpinFactors(std::ostream& out){
17 
18  out << " All known 4-body spin factors with example decays:\n"
19  << " (Not all examples are necessarily physical)\n"
20  << " -------------------- " << std::endl;
21 
22  out << " SF_BtoAV0_AtoVP1_VtoP2P3:\n"
24  << " -------------------- " << std::endl;
25 
26  out << " SF_BtoAV0_AtoVP1Dwave_VtoP2P3:\n"
28  << " -------------------- " << std::endl;
29 
30  out << " SF_BtoAV0_AtoVP1_VtoP2P3_P:\n"
32  << " -------------------- " << std::endl;
33 
34  out << " SF_BtoAV0_AtoVP1_VtoP2P3_D:\n"
36  << " -------------------- " << std::endl;
37 
38  out << " SF_BtoPseudoTV0_PseudoTtoVP1_VtoP2P3_P:\n"
40  << " -------------------- " << std::endl;
41 
42  out << " SF_BtoPseudoTV0_PseudoTtoVP1_VtoP2P3_D:\n"
44  << " -------------------- " << std::endl;
45 
46  out << " SF_BtoPseudoTV0_PseudoTtoSP1_StoP2P3_P:\n"
48  << " -------------------- " << std::endl;
49 
50  out << " SF_BtoTV0_TtoVP1_VtoP2P3_P:\n"
52  << " -------------------- " << std::endl;
53 
54  out << " SF_BtoPseudoTV0_PseudoTtoTP1_TtoP2P3_P:\n"
56  << " -------------------- " << std::endl;
57 
58  out << " SF_BtoVP1_VtoV0S_StoP2P3:\n"
60  << " -------------------- " << std::endl;
61 
62  out << " SF_BtoV1V0_V1toV2P1_V2toP2P3:\n"
64  << " -------------------- " << std::endl;
65 
66  out << " SF_BtoPV0_PtoP1V1_V1toP2P3:\n"
68  << " -------------------- " << std::endl;
69 
70  out << " SF_DtoPP0_PtoVP1_VtoP2P3:\n"
72  << " -------------------- " << std::endl;
73 
74  out << " SF_DtoAP0_AtoVP1_VtoP2P3:\n"
76  << " -------------------- " << std::endl;
77 
78  out << " SF_DtoAP0_AtoVP1Dwave_VtoP2P3:\n"
80  << " -------------------- " << std::endl;
81 
82  out << " SF_DtoAP0_AtoSP1_StoP2P3:\n"
84  << " -------------------- " << std::endl;
85 
86  out << " SF_DtoV1V2_V1toP0P1_V1toP2P3_S:\n"
88  << " (S-Wave)\n"
89  << " -------------------- " << std::endl;
90 
91  out << " SF_DtoV1V2_V1toP0P1_V1toP2P3_D:\n"
93  << " (D-Wave)\n"
94  << " -------------------- " << std::endl;
95 
96  out << " SF_DtoVT_VtoP0P1_TtoP2P3_P:\n"
98  << " (P-Wave)\n"
99  << " -------------------- " << std::endl;
100 
101  out << " SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1:\n"
103  << " (S-Wave)\n"
104  << " -------------------- " << std::endl;
105 
106  out << " SF_DtoVS_VtoP0P1_StoP2P3:\n"
108  << " -------------------- " << std::endl;
109 
110  out << " SF_DtoVS_VtoP0P1_StoP2P3_nonResV:\n"
112  << " -------------------- " << std::endl;
113 
114  out << " SF_DtoPP1P2_PtoP3P4 (\"artificial\" decay):\n"
116  << " -------------------- " << std::endl;
117 
118  out << " SF_DtoS1S2_S1toP1P2_S2toP3P4:\n"
120  << " -------------------- " << std::endl;
121 
122 }
123 
124 
126  , char SPD_Wave
127  , const std::string& lopt
128  ){
129  bool dbThis=true;
130 
131  ISpinFactor *sf;
132 
133  if(dbThis) cout << "SpinFactorMaker called with option " << lopt << endl;
134 
135  if(A_is_in_B("BgSpinZero", lopt)){
136  if(dbThis) cout << "returning flat" << endl;
137  return new SpinFactorTrivial;
138  }
139 
140  int nFinalStates = thisDcy.finalState().size();
141  if(nFinalStates < 3 || nFinalStates == thisDcy.nDgtr() ){
142  // either 2 or less bodies, or non-resonant.
143  sf = new SpinFactorTrivial;
144  }else if( 3 == nFinalStates){
145  if(A_is_in_B("GS", lopt)){
146  if(dbThis) cout << "... returning GS spin factor" << endl;
147  sf = new GSSpinFactor(thisDcy);
148  if(dbThis) cout << " .. with name: " << sf->name() << endl;
149  }else{
150  cout << " calling SpinFactorMaker3Body " << endl;
151  sf = SpinFactorMaker3Body(thisDcy, SPD_Wave,lopt); // new SpinFactor3(thisDcy);
152  }
153  }else if( 4 == nFinalStates){
154  sf = SpinFactorMaker4Body(thisDcy, SPD_Wave,lopt);
155  }else{
156  cout << " SpinFactorMaker: Don't know any spin"
157  << " factors for a final state with "
158  << nFinalStates << " particles." << endl;
159  return 0;
160  }
161 
162  if( 0 == sf ){
163  cout << "ERROR in SpinFactorMaker! Couldn't find spin factor"
164  << "\n I will crash now!" << endl;
165  throw "no spin factor";
166  }
167  return sf;
168 }
169 
170 
171 
172 
173 
174 ISpinFactor* SpinFactorMaker3Body(const AssociatedDecayTree& thisDcy, char SPD_Wave, const std::string& lopt){
175  bool dbThis=true;
176 
177  if(dbThis){
178  std::cout << "SpinFactorMaker3Body called for"
179  << thisDcy
180  << std::endl;
181  }
182 
184  if(dbThis){
185  std::cout << "found a spin factor for this decay:\n"
186  << thisDcy << std::endl;
187  }
188  return new SF_AtoVP1_VtoP2P3(thisDcy,-999);
189  }
190 
192  if(dbThis){
193  std::cout << "found a spin factor for this decay:\n"
194  << thisDcy << std::endl;
195  }
196  return new SF_AtoVP1_VtoP2P3_D(thisDcy,-999);
197  }
198 
200  if(dbThis){
201  std::cout << "found a spin factor for this decay:\n"
202  << thisDcy << std::endl;
203  }
204  return new SF_AtoSP1_StoP2P3(thisDcy,-999);
205  }
206 
208  if(dbThis){
209  std::cout << "found a spin factor for this decay:\n"
210  << thisDcy << std::endl;
211  }
212  return new SF_VtoV0P1_V0toP2P3(thisDcy,-999);
213  }
214 
216  if(dbThis){
217  std::cout << "found a spin factor for this decay:\n"
218  << thisDcy << std::endl;
219  }
220  return new SF_VtoSV0_StoP2P3(thisDcy,-999);
221  }
222 
224  if(dbThis){
225  std::cout << "found a spin factor for this decay:\n"
226  << thisDcy << std::endl;
227  }
228  return new SF_VtoAP1_AtoV0P2(thisDcy,-999);
229  }
230 
231  cout << "thisDcy.getVal().J() " << thisDcy.getVal().J() << endl;
232  if(thisDcy.getVal().J()=="0"){
233  cout << "calling SpinFactor3()" << endl;
234  return new SpinFactor3(thisDcy);
235  }else{
236  std::cout << "SpinFactorMaker 3 WARNING!!"
237  << " don't know spin factor of this decay:\n"
238  << thisDcy
239  << " (" << SPD_Wave << "-wave)" << std::endl;
240  return 0;
241  }
242  (void)lopt;
243 }
244 
245 
246 ISpinFactor* SpinFactorMaker4Body(const AssociatedDecayTree& thisDcy, char SPD_Wave, const std::string& lopt){
247  bool dbThis=false;
248 
249  if(dbThis){
250  std::cout << "SpinFactorMaker4Body called for"
251  << thisDcy
252  << std::endl;
253  }
254 
255  // final state vector
257  if(dbThis){
258  std::cout << "found a spin factor for this decay:\n"
259  << thisDcy << std::endl;
260  }
261  if(A_is_in_B("PLUS", lopt))return new SF_BtoAV0_AtoVP1_VtoP2P3(thisDcy,1);
262  else if(A_is_in_B("ZERO", lopt))return new SF_BtoAV0_AtoVP1_VtoP2P3(thisDcy,0);
263  else if(A_is_in_B("MINUS", lopt))return new SF_BtoAV0_AtoVP1_VtoP2P3(thisDcy,-1);
264  else return new SF_BtoAV0_AtoVP1_VtoP2P3(thisDcy,-999);
265  }
266 
268  if(dbThis){
269  std::cout << "found a spin factor for this decay:\n"
270  << thisDcy << std::endl;
271  }
272  if(A_is_in_B("PLUS", lopt))return new SF_BtoAV0_AtoVP1Dwave_VtoP2P3(thisDcy,1);
273  else if(A_is_in_B("ZERO", lopt))return new SF_BtoAV0_AtoVP1Dwave_VtoP2P3(thisDcy,0);
274  else if(A_is_in_B("MINUS", lopt))return new SF_BtoAV0_AtoVP1Dwave_VtoP2P3(thisDcy,-1);
275  else return new SF_BtoAV0_AtoVP1Dwave_VtoP2P3(thisDcy,-999);
276  }
277 
279  if(dbThis){
280  std::cout << "found a spin factor for this decay:\n"
281  << thisDcy << std::endl;
282  }
283  if(A_is_in_B("PLUS", lopt))return new SF_BtoAV0_AtoVP1_VtoP2P3_P(thisDcy,1);
284  else if(A_is_in_B("ZERO", lopt))return new SF_BtoAV0_AtoVP1_VtoP2P3_P(thisDcy,0);
285  else if(A_is_in_B("MINUS", lopt))return new SF_BtoAV0_AtoVP1_VtoP2P3_P(thisDcy,-1);
286  else return new SF_BtoAV0_AtoVP1_VtoP2P3_P(thisDcy,-999);
287  }
288 
290  if(dbThis){
291  std::cout << "found a spin factor for this decay:\n"
292  << thisDcy << std::endl;
293  }
294  if(A_is_in_B("PLUS", lopt))return new SF_BtoAV0_AtoVP1_VtoP2P3_D(thisDcy,1);
295  else if(A_is_in_B("ZERO", lopt))return new SF_BtoAV0_AtoVP1_VtoP2P3_D(thisDcy,0);
296  else if(A_is_in_B("MINUS", lopt))return new SF_BtoAV0_AtoVP1_VtoP2P3_D(thisDcy,-1);
297  else return new SF_BtoAV0_AtoVP1_VtoP2P3_D(thisDcy,-999);
298  }
299 
301  if(dbThis){
302  std::cout << "found a spin factor for this decay:\n"
303  << thisDcy << std::endl;
304  }
305  if(A_is_in_B("PLUS", lopt))return new SF_BtoPseudoTV0_PseudoTtoVP1_VtoP2P3_P(thisDcy,1);
306  else if(A_is_in_B("ZERO", lopt))return new SF_BtoPseudoTV0_PseudoTtoVP1_VtoP2P3_P(thisDcy,0);
307  else if(A_is_in_B("MINUS", lopt))return new SF_BtoPseudoTV0_PseudoTtoVP1_VtoP2P3_P(thisDcy,-1);
308  else return new SF_BtoPseudoTV0_PseudoTtoVP1_VtoP2P3_P(thisDcy,-999);
309  }
310 
312  if(dbThis){
313  std::cout << "found a spin factor for this decay:\n"
314  << thisDcy << std::endl;
315  }
316  if(A_is_in_B("PLUS", lopt))return new SF_BtoPseudoTV0_PseudoTtoVP1_VtoP2P3_D(thisDcy,1);
317  else if(A_is_in_B("ZERO", lopt))return new SF_BtoPseudoTV0_PseudoTtoVP1_VtoP2P3_D(thisDcy,0);
318  else if(A_is_in_B("MINUS", lopt))return new SF_BtoPseudoTV0_PseudoTtoVP1_VtoP2P3_D(thisDcy,-1);
319  else return new SF_BtoPseudoTV0_PseudoTtoVP1_VtoP2P3_D(thisDcy,-999);
320  }
321 
323  if(dbThis){
324  std::cout << "found a spin factor for this decay:\n"
325  << thisDcy << std::endl;
326  }
327  if(A_is_in_B("PLUS", lopt))return new SF_BtoPseudoTV0_PseudoTtoSP1_StoP2P3_P(thisDcy,1);
328  else if(A_is_in_B("ZERO", lopt))return new SF_BtoPseudoTV0_PseudoTtoSP1_StoP2P3_P(thisDcy,0);
329  else if(A_is_in_B("MINUS", lopt))return new SF_BtoPseudoTV0_PseudoTtoSP1_StoP2P3_P(thisDcy,-1);
330  else return new SF_BtoPseudoTV0_PseudoTtoSP1_StoP2P3_P(thisDcy,-999);
331  }
332 
334  if(dbThis){
335  std::cout << "found a spin factor for this decay:\n"
336  << thisDcy << std::endl;
337  }
338  if(A_is_in_B("PLUS", lopt))return new SF_BtoAV0_AtoSP1_StoP2P3(thisDcy,1);
339  else if(A_is_in_B("ZERO", lopt))return new SF_BtoAV0_AtoSP1_StoP2P3(thisDcy,0);
340  else if(A_is_in_B("MINUS", lopt))return new SF_BtoAV0_AtoSP1_StoP2P3(thisDcy,-1);
341  else return new SF_BtoAV0_AtoSP1_StoP2P3(thisDcy,-999);
342  }
343 
345  if(dbThis){
346  std::cout << "found a spin factor for this decay:\n"
347  << thisDcy << std::endl;
348  }
349  if(A_is_in_B("PLUS", lopt))return new SF_BtoTV0_TtoVP1_VtoP2P3_P(thisDcy,1);
350  else if(A_is_in_B("ZERO", lopt))return new SF_BtoTV0_TtoVP1_VtoP2P3_P(thisDcy,0);
351  else if(A_is_in_B("MINUS", lopt))return new SF_BtoTV0_TtoVP1_VtoP2P3_P(thisDcy,-1);
352  else return new SF_BtoTV0_TtoVP1_VtoP2P3_P(thisDcy,-999);
353  }
354 
355 
357  if(dbThis){
358  std::cout << "found a spin factor for this decay:\n"
359  << thisDcy << std::endl;
360  }
361  if(A_is_in_B("PLUS", lopt))return new SF_BtoPseudoTV0_PseudoTtoTP1_TtoP2P3_P(thisDcy,1);
362  else if(A_is_in_B("ZERO", lopt))return new SF_BtoPseudoTV0_PseudoTtoTP1_TtoP2P3_P(thisDcy,0);
363  else if(A_is_in_B("MINUS", lopt))return new SF_BtoPseudoTV0_PseudoTtoTP1_TtoP2P3_P(thisDcy,-1);
364  else return new SF_BtoPseudoTV0_PseudoTtoTP1_TtoP2P3_P(thisDcy,-999);
365  }
366 
368  if(dbThis){
369  std::cout << "found a spin factor for this decay:\n" << thisDcy << std::endl;
370  }
371  if(A_is_in_B("PLUS", lopt))return new SF_BtoVP1_VtoV0S_StoP2P3(thisDcy,1,false);
372  else if(A_is_in_B("ZERO", lopt))return new SF_BtoVP1_VtoV0S_StoP2P3(thisDcy,0,false);
373  else if(A_is_in_B("MINUS", lopt))return new SF_BtoVP1_VtoV0S_StoP2P3(thisDcy,-1,false);
374  else if(A_is_in_B("3Body", lopt)) return new SF_BtoVP1_VtoV0S_StoP2P3(thisDcy,-999,true);
375  else return new SF_BtoVP1_VtoV0S_StoP2P3(thisDcy,-999,false);
376  }
377 
379  if(dbThis){
380  std::cout << "found a spin factor for this decay:\n"
381  << thisDcy << std::endl;
382  }
383  if(A_is_in_B("PLUS", lopt))return new SF_BtoV1V0_V1toV2P1_V2toP2P3(thisDcy,1);
384  else if(A_is_in_B("ZERO", lopt))return new SF_BtoV1V0_V1toV2P1_V2toP2P3(thisDcy,0);
385  else if(A_is_in_B("MINUS", lopt))return new SF_BtoV1V0_V1toV2P1_V2toP2P3(thisDcy,-1);
386  else return new SF_BtoV1V0_V1toV2P1_V2toP2P3(thisDcy,-999);
387  }
388 
390  if(dbThis){
391  std::cout << "found a spin factor for this decay:\n"
392  << thisDcy << std::endl;
393  }
394  if(A_is_in_B("PLUS", lopt))return new SF_BtoV1V0_V1toV2P1_V2toP2P3_P(thisDcy,1);
395  else if(A_is_in_B("ZERO", lopt))return new SF_BtoV1V0_V1toV2P1_V2toP2P3_P(thisDcy,0);
396  else if(A_is_in_B("MINUS", lopt))return new SF_BtoV1V0_V1toV2P1_V2toP2P3_P(thisDcy,-1);
397  else return new SF_BtoV1V0_V1toV2P1_V2toP2P3_P(thisDcy,-999);
398  }
399 
401  if(dbThis){
402  std::cout << "found a spin factor for this decay:\n"
403  << thisDcy << std::endl;
404  }
405  if(A_is_in_B("PLUS", lopt))return new SF_BtoV1V0_V1toV2P1_V2toP2P3_D(thisDcy,1);
406  else if(A_is_in_B("ZERO", lopt))return new SF_BtoV1V0_V1toV2P1_V2toP2P3_D(thisDcy,0);
407  else if(A_is_in_B("MINUS", lopt))return new SF_BtoV1V0_V1toV2P1_V2toP2P3_D(thisDcy,-1);
408  else return new SF_BtoV1V0_V1toV2P1_V2toP2P3_D(thisDcy,-999);
409  }
410 
412  if(dbThis){
413  std::cout << "found a spin factor for this decay:\n" << thisDcy << std::endl;
414  }
415  if(A_is_in_B("PLUS", lopt))return new SF_BtoV1P1_V1toV2V0_V2toP2P3(thisDcy,1);
416  else if(A_is_in_B("ZERO", lopt))return new SF_BtoV1P1_V1toV2V0_V2toP2P3(thisDcy,0);
417  else if(A_is_in_B("MINUS", lopt))return new SF_BtoV1P1_V1toV2V0_V2toP2P3(thisDcy,-1);
418  else {
419  int LS_s = 0;
420  if(A_is_in_B("LS_11", lopt))LS_s=1;
421  if(A_is_in_B("LS_12", lopt))LS_s=2;
422  return new SF_BtoV1P1_V1toV2V0_V2toP2P3(thisDcy,-999,LS_s);
423  }
424  }
425 
427  if(dbThis){
428  std::cout << "found a spin factor for this decay:\n" << thisDcy << std::endl;
429  }
430  if(A_is_in_B("PLUS", lopt))return new SF_BtoAP1_AtoVV0_VtoP2P3(thisDcy,1,false);
431  else if(A_is_in_B("ZERO", lopt))return new SF_BtoAP1_AtoVV0_VtoP2P3(thisDcy,0,false);
432  else if(A_is_in_B("MINUS", lopt))return new SF_BtoAP1_AtoVV0_VtoP2P3(thisDcy,-1,false);
433  else if(A_is_in_B("3Body", lopt)) return new SF_BtoAP1_AtoVV0_VtoP2P3(thisDcy,-999,true);
434  else return new SF_BtoAP1_AtoVV0_VtoP2P3(thisDcy,-999,false);
435  }
436 
438  if(dbThis){
439  std::cout << "found a spin factor for this decay:\n" << thisDcy << std::endl;
440  }
441  if(A_is_in_B("PLUS", lopt))return new SF_BtoV1V2_V1toP1V0_V2toP2P3(thisDcy,1);
442  else if(A_is_in_B("ZERO", lopt))return new SF_BtoV1V2_V1toP1V0_V2toP2P3(thisDcy,0);
443  else if(A_is_in_B("MINUS", lopt))return new SF_BtoV1V2_V1toP1V0_V2toP2P3(thisDcy,-1);
444  else return new SF_BtoV1V2_V1toP1V0_V2toP2P3(thisDcy,-999);
445  }
446 
448  if(dbThis){
449  std::cout << "found a spin factor for this decay:\n" << thisDcy << std::endl;
450  }
451  if(A_is_in_B("PLUS", lopt))return new SF_BtoAV_AtoP1V0_VtoP2P3(thisDcy,1);
452  else if(A_is_in_B("ZERO", lopt))return new SF_BtoAV_AtoP1V0_VtoP2P3(thisDcy,0);
453  else if(A_is_in_B("MINUS", lopt))return new SF_BtoAV_AtoP1V0_VtoP2P3(thisDcy,-1);
454  else return new SF_BtoAV_AtoP1V0_VtoP2P3(thisDcy,-999);
455  }
456 
458  if(dbThis){
459  std::cout << "found a spin factor for this decay:\n" << thisDcy << std::endl;
460  }
461  if(A_is_in_B("PLUS", lopt))return new SF_BtoAV_AtoP1V0_VtoP2P3_D(thisDcy,1);
462  else if(A_is_in_B("ZERO", lopt))return new SF_BtoAV_AtoP1V0_VtoP2P3_D(thisDcy,0);
463  else if(A_is_in_B("MINUS", lopt))return new SF_BtoAV_AtoP1V0_VtoP2P3_D(thisDcy,-1);
464  else return new SF_BtoAV_AtoP1V0_VtoP2P3_D(thisDcy,-999);
465  }
466 
468  if(dbThis){
469  std::cout << "found a spin factor for this decay:\n" << thisDcy << std::endl;
470  }
471  if(A_is_in_B("PLUS", lopt))return new SF_BtoAV_AtoP1V0_VtoP2P3_P(thisDcy,1);
472  else if(A_is_in_B("ZERO", lopt))return new SF_BtoAV_AtoP1V0_VtoP2P3_P(thisDcy,0);
473  else if(A_is_in_B("MINUS", lopt))return new SF_BtoAV_AtoP1V0_VtoP2P3_P(thisDcy,-1);
474  else return new SF_BtoAV_AtoP1V0_VtoP2P3_P(thisDcy,-999);
475  }
476 
478  if(dbThis){
479  std::cout << "found a spin factor for this decay:\n" << thisDcy << std::endl;
480  }
481  if(A_is_in_B("PLUS", lopt))return new SF_BtoAS_AtoP1V0_StoP2P3(thisDcy,1);
482  else if(A_is_in_B("ZERO", lopt))return new SF_BtoAS_AtoP1V0_StoP2P3(thisDcy,0);
483  else if(A_is_in_B("MINUS", lopt))return new SF_BtoAS_AtoP1V0_StoP2P3(thisDcy,-1);
484  else return new SF_BtoAS_AtoP1V0_StoP2P3(thisDcy,-999);
485  }
486 
488  if(dbThis){
489  std::cout << "found a spin factor for this decay:\n" << thisDcy << std::endl;
490  }
491  if(A_is_in_B("PLUS", lopt))return new SF_BtoPS_PtoP1V0_StoP2P3(thisDcy,1);
492  else if(A_is_in_B("ZERO", lopt))return new SF_BtoPS_PtoP1V0_StoP2P3(thisDcy,0);
493  else if(A_is_in_B("MINUS", lopt))return new SF_BtoPS_PtoP1V0_StoP2P3(thisDcy,-1);
494  else return new SF_BtoPS_PtoP1V0_StoP2P3(thisDcy,-999);
495  }
496 
498  if(dbThis){
499  std::cout << "found a spin factor for this decay:\n" << thisDcy << std::endl;
500  }
501  if(A_is_in_B("PLUS", lopt))return new SF_BtoPV_PtoP1V0_VtoP2P3(thisDcy,1);
502  else if(A_is_in_B("ZERO", lopt))return new SF_BtoPV_PtoP1V0_VtoP2P3(thisDcy,0);
503  else if(A_is_in_B("MINUS", lopt))return new SF_BtoPV_PtoP1V0_VtoP2P3(thisDcy,-1);
504  else return new SF_BtoPV_PtoP1V0_VtoP2P3(thisDcy,-999);
505  }
506 
508  if(dbThis){
509  std::cout << "found a spin factor for this decay:\n" << thisDcy << std::endl;
510  }
511  if(A_is_in_B("PLUS", lopt))return new SF_BtoPV0_PtoS_StoP2P3(thisDcy,1);
512  else if(A_is_in_B("ZERO", lopt))return new SF_BtoPV0_PtoS_StoP2P3(thisDcy,0);
513  else if(A_is_in_B("MINUS", lopt))return new SF_BtoPV0_PtoS_StoP2P3(thisDcy,-1);
514  else return new SF_BtoPV0_PtoS_StoP2P3(thisDcy,-999);
515  }
516 
518  if(dbThis){
519  std::cout << "found a spin factor for this decay:\n" << thisDcy << std::endl;
520  }
521  if(A_is_in_B("PLUS", lopt))return new SF_BtoVP1_VtoSV0_StoP2P3(thisDcy,1);
522  else if(A_is_in_B("ZERO", lopt))return new SF_BtoVP1_VtoSV0_StoP2P3(thisDcy,0);
523  else if(A_is_in_B("MINUS", lopt))return new SF_BtoVP1_VtoSV0_StoP2P3(thisDcy,-1);
524  else return new SF_BtoVP1_VtoSV0_StoP2P3(thisDcy,-999);
525  }
526 
528  if(dbThis){
529  std::cout << "found a spin factor for this decay:\n" << thisDcy << std::endl;
530  }
531  if(A_is_in_B("PLUS", lopt))return new SF_BtoVP1_VtoAP2_AtoV0P3(thisDcy,1);
532  else if(A_is_in_B("ZERO", lopt))return new SF_BtoVP1_VtoAP2_AtoV0P3(thisDcy,0);
533  else if(A_is_in_B("MINUS", lopt))return new SF_BtoVP1_VtoAP2_AtoV0P3(thisDcy,-1);
534  else return new SF_BtoVP1_VtoAP2_AtoV0P3(thisDcy,-999);
535  }
536 
538  if(dbThis){
539  std::cout << "found a spin factor for this decay:\n" << thisDcy << std::endl;
540  }
541  if(A_is_in_B("PLUS", lopt))return new SF_BtoPV0_PtoP1V1_V1toP2P3(thisDcy,1);
542  else if(A_is_in_B("ZERO", lopt))return new SF_BtoPV0_PtoP1V1_V1toP2P3(thisDcy,0);
543  else if(A_is_in_B("MINUS", lopt))return new SF_BtoPV0_PtoP1V1_V1toP2P3(thisDcy,-1);
544  else return new SF_BtoPV0_PtoP1V1_V1toP2P3(thisDcy,-999);
545  }
546 
548  if(dbThis){
549  std::cout << "found a spin factor for this decay:\n"
550  << thisDcy << std::endl;
551  }
552  return new SF_BtoSP1_StoVV0_VtoP2P3(thisDcy,-999);
553  }
554 
556  if(dbThis){
557  std::cout << "found a spin factor for this decay:\n"
558  << thisDcy << std::endl;
559  }
560  return new SF_BtoPP1_PtoVV0_VtoP2P3(thisDcy,-999);
561  }
562 
564  if(dbThis){
565  std::cout << "found a spin factor for this decay:\n"
566  << thisDcy << std::endl;
567  }
568  return new SF_BtoVP1_VtoTV0_TtoP2P3(thisDcy,-999);
569  }
570 
572  if(dbThis){
573  std::cout << "found a spin factor for this decay:\n"
574  << thisDcy << std::endl;
575  }
576  return new SF_BtoAV0_AtoVP1Dwave_VtoP2P3_P(thisDcy,-999);
577  }
578 
580  if(dbThis){
581  std::cout << "found a spin factor for this decay:\n"
582  << thisDcy << std::endl;
583  }
584  return new SF_BtoAV0_AtoVP1Dwave_VtoP2P3_D(thisDcy,-999);
585  }
586 
588  if(dbThis){
589  std::cout << "found a spin factor for this decay:\n"
590  << thisDcy << std::endl;
591  }
592  return new SF_BtoAV0_AtoSP1_StoP2P3_P(thisDcy,-999);
593  }
594 
596  if(dbThis){
597  std::cout << "found a spin factor for this decay:\n"
598  << thisDcy << std::endl;
599  }
600  return new SF_BtoAV0_AtoSP1_StoP2P3_D(thisDcy,-999);
601  }
602 
603 
604  // final state pseudo scalars
606  , thisDcy) ){
607  if(dbThis){
608  std::cout << "found a spin factor for this decay:\n"
609  << thisDcy << std::endl;
610  }
611  return new SF_DtoPP0_PtoVP1_VtoP2P3(thisDcy);
612 
614  , thisDcy) ){
615  if(dbThis){
616  std::cout << "found a spin factor for this decay:\n"
617  << thisDcy << std::endl;
618  }
619  return new SF_DtoAP0_AtoVP1_VtoP2P3(thisDcy);
621  , thisDcy) ){
622  if(dbThis){
623  std::cout << "found a spin factor for this decay:\n"
624  << thisDcy << std::endl;
625  }
626  return new SF_DtoAP0_AtoVP1Dwave_VtoP2P3(thisDcy);
628  , thisDcy) ){
629  if(dbThis){
630  std::cout << "found a spin factor for this decay:\n"
631  << thisDcy << std::endl;
632  }
633  return new SF_DtoAP0_AtoSP1_StoP2P3(thisDcy);
635  , thisDcy)
636  ){//&& (SPD_Wave == 'S' || SPD_Wave == '?')){
637  if(dbThis){
638  std::cout << "found a spin factor for this decay as "
639  << "S-wave\n"
640  << thisDcy << std::endl;
641  }
642  return new SF_DtoV1V2_V1toP0P1_V1toP2P3_S(thisDcy);
644  , thisDcy)
645  ){// && (SPD_Wave == 'P')){
646  if(dbThis){
647  std::cout << "found a spin factor for this decay as "
648  << "P-wave\n"
649  << thisDcy << std::endl;
650  }
651  return new SF_DtoV1V2_V1toP0P1_V1toP2P3_P(thisDcy);
653  , thisDcy)
654  ){// && (SPD_Wave == 'D')){
655  if(dbThis){
656  std::cout << "found a spin factor for this decay as "
657  << "D-wave\n"
658  << thisDcy << std::endl;
659  }
660  return new SF_DtoV1V2_V1toP0P1_V1toP2P3_D(thisDcy);
662  , thisDcy)
663  ){//&& (SPD_Wave == 'S' || SPD_Wave == '?')){
664  if(dbThis){
665  std::cout << "found a spin factor for this decay as "
666  << "P-wave\n"
667  << thisDcy << std::endl;
668  }
669  return new SF_DtoVT_VtoP0P1_TtoP2P3_P(thisDcy);
671  , thisDcy)
672  ){//&& (SPD_Wave == 'S' || SPD_Wave == '?')){
673  if(dbThis){
674  std::cout << "found a spin factor for this decay as "
675  << "D-wave\n"
676  << thisDcy << std::endl;
677  }
678  return new SF_DtoVT_VtoP0P1_TtoP2P3_D(thisDcy);
680  , thisDcy)
681  ){//&& (SPD_Wave == 'S' || SPD_Wave == '?')){
682  if(dbThis){
683  std::cout << "found a spin factor for this decay."
684  << thisDcy << std::endl;
685  }
686  return new SF_DtoTS_TtoP0P1_StoP2P3(thisDcy);
688  , thisDcy)
689  ){// && (SPD_Wave == 'S' || SPD_Wave == '?')){
690  if(dbThis){
691  std::cout << "found a spin factor for this decay as "
692  << "S-wave\n"
693  << thisDcy << std::endl;
694  std::cout << "WARNING!! You didn't specify that this is supposed to be"
695  << " treated as S-Wave!!\n I just assume it is." << std::endl;
696  }
697  return new SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1(thisDcy);
699  , thisDcy)
700  ){// && (SPD_Wave == 'S' || SPD_Wave == '?')){
701  if(dbThis){
702  std::cout << "found a spin factor for this decay:\n"
703  << thisDcy << std::endl;
704  }
705  return new SF_DtoVS_VtoP0P1_StoP2P3(thisDcy);
707  , thisDcy)
708  ){//&& (SPD_Wave == 'S' || SPD_Wave == '?')){
709  if(dbThis){
710  std::cout << "found a spin factor for this decay:\n"
711  << thisDcy << std::endl;
712  }
713  return new SF_DtoVS_VtoP0P1_StoP2P3_nonResV(thisDcy);
715  //Lauren's wide Ks Spin
716  , thisDcy)
717  ){
718  return new SF_DtoPP1P2_PtoP3P4(thisDcy);
720  //Lauren's wide Ks Spin
721  , thisDcy)
722  ){
723  return new SF_DtoS1S2_S1toP1P2_S2toP3P4(thisDcy);
725  , thisDcy) ){
726  if(dbThis){
727  std::cout << "found a spin factor for this decay:\n"
728  << thisDcy << std::endl;
729  }
730  return new SF_DtoV1P0_V1toV2P1_V2toP2P3(thisDcy);
732  , thisDcy) ){
733  if(dbThis){
734  std::cout << "found a spin factor for this decay:\n"
735  << thisDcy << std::endl;
736  }
737  return new SF_DtoT1T2_T1toP0P1_T2toP2P3_S(thisDcy);
739  , thisDcy) ){
740  if(dbThis){
741  std::cout << "found a spin factor for this decay:\n"
742  << thisDcy << std::endl;
743  }
744  return new SF_DtoT1T2_T1toP0P1_T2toP2P3_P(thisDcy);
746  , thisDcy) ){
747  if(dbThis){
748  std::cout << "found a spin factor for this decay:\n"
749  << thisDcy << std::endl;
750  }
751  return new SF_DtoT1T2_T1toP0P1_T2toP2P3_D(thisDcy);
753  , thisDcy) ){
754  if(dbThis){
755  std::cout << "found a spin factor for this decay:\n"
756  << thisDcy << std::endl;
757  }
758  return new SF_DtoTP0_TtoVP1_VtoP2P3(thisDcy);
760  , thisDcy) ){
761  if(dbThis){
762  std::cout << "found a spin factor for this decay:\n"
763  << thisDcy << std::endl;
764  }
765  return new SF_DtoT1P0_T1toT2P1_T2toP2P3(thisDcy);
767  , thisDcy) ){
768  if(dbThis){
769  std::cout << "found a spin factor for this decay:\n"
770  << thisDcy << std::endl;
771  }
772  return new SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3(thisDcy);
774  , thisDcy) ){
775  if(dbThis){
776  std::cout << "found a spin factor for this decay:\n"
777  << thisDcy << std::endl;
778  }
779  return new SF_DtoPseudoTP0_PseudoTtoSP1_StoP2P3(thisDcy);
781  , thisDcy) ){
782  if(dbThis){
783  std::cout << "found a spin factor for this decay:\n"
784  << thisDcy << std::endl;
785  }
786  return new SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3(thisDcy);
788  , thisDcy) ){
789  if(dbThis){
790  std::cout << "found a spin factor for this decay:\n"
791  << thisDcy << std::endl;
792  }
793  return new SF_DtoPP0_PtoSP1_StoP3P4(thisDcy);
795  , thisDcy) ){
796  if(dbThis){
797  std::cout << "found a spin factor for this decay:\n"
798  << thisDcy << std::endl;
799  }
800  return new SF_DtoAP0_AtoTP1_TtoP2P3(thisDcy);
801  }else{
802  std::cout << "SpinFactorMaker WARNING!!"
803  << " don't know spin factor of this decay:\n"
804  << thisDcy
805  << " (" << SPD_Wave << "-wave)" << std::endl;
806  return 0;
807  }
808 
809 }
810 
811 //
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
ISpinFactor * SpinFactorMaker3Body(const AssociatedDecayTree &thisDcy, char SPD_Wave, const std::string &lopt)
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
void PrintAllSpinFactors(std::ostream &out)
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
ISpinFactor * SpinFactorMaker(const AssociatedDecayTree &thisDcy, char SPD_Wave, const std::string &lopt)
virtual std::string name() const =0
static const DecayTree & getExampleDecay()
const ValueType & getVal() const
Definition: DDTree.h:102
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
bool A_is_in_B(const std::string &a, const std::string &b)
Definition: Utils.cpp:34
ISpinFactor * SpinFactorMaker4Body(const AssociatedDecayTree &thisDcy, char SPD_Wave, const std::string &lopt)
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
Definition: DDTree.h:37
static const DecayTree & getExampleDecay()
bool equalBySVPAT_L(DecayTree A, DecayTree B)
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
bool equalBySVPAT(DecayTree A, DecayTree B)
static const DecayTree & getExampleDecay()
std::vector< const ValueType * > finalState() const
Definition: DDTree.h:293
static const DecayTree & getExampleDecay()
int nDgtr() const
Definition: DDTree.h:96
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()