Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AmplBToQLepNuBase.cc
Go to the documentation of this file.
1 ///
2 /// @file AmplBToQLepNuBase.cc
3 /// @brief \f$ b -> c \tau\nu \f$ base amplitude
4 ///
5 
6 //**** This file is a part of the HAMMER library
7 //**** Copyright (C) 2016 - 2020 The HAMMER Collaboration
8 //**** HAMMER is licensed under version 3 of the GPL; see COPYING for details
9 //**** Please note the MCnet academic guidelines; see GUIDELINES for details
10 
11 // -*- C++ -*-
14 #include "Hammer/IndexLabels.hh"
15 
16 using namespace std;
17 
18 namespace Hammer {
19 
20  AmplBToQLepNuBase::AmplBToQLepNuBase() {
21  _perms = {6,9,5,4,7,3,2};
22  _flips = {1.,-1.,-1.,-1.,-1.,1.,1.,1.,1.,-1.,-1.};
23  }
24 
25  void AmplBToQLepNuBase::updateWilsonCeffLabelPrefix() {
26  _WCLabel = NONE;
27  _WCPrefix = "None";
28  _multiplicity = 1ul;
29  for(auto elem: getTensor().labels()) {
30 #pragma clang diagnostic push
31 #pragma clang diagnostic ignored "-Wswitch-enum"
32  switch(elem) {
33  case WILSON_BCTAUNU: {
34  _WCLabel = WILSON_BCTAUNU;
35  _WCPrefix = "BtoCTauNu";
36  break;
37  }
38  case WILSON_BCMUNU: {
39  _WCLabel = WILSON_BCMUNU;
40  _WCPrefix = "BtoCMuNu";
41  break;
42  }
43  case WILSON_BCENU: {
44  _WCLabel = WILSON_BCENU;
45  _WCPrefix = "BtoCENu";
46  break;
47  }
48  default:
49  break;
50  }
51 #pragma clang diagnostic pop
52  }
53  }
54 
55 
56 
57  void AmplBToQLepNuBase::defineSettings() {
58  //_WCNames = {"SM", "S_aRbL", "S_aRbR", "S_aLbL", "S_aLbR", "V_aRbL", "V_aRbR", "V_aLbL", "V_aLbR", "T_aRbL", "T_aLbR"};
59  _WCNames = {"SM", "S_qLlL", "S_qRlL", "V_qLlL", "V_qRlL", "T_qLlL", "S_qLlR", "S_qRlR", "V_qLlR", "V_qRlR", "T_qRlR"};
60  setPath(_WCPrefix);
61  addSetting<complex<double>>("SM", 1.0);
62  for (auto elem : _WCNames) {
63  if (elem != "SM") {
64  addSetting<complex<double>>(elem, 0.);
65  }
66  }
67  }
68 
69  void AmplBToQLepNuBase::preProcessWCValues(vector<complex<double>>& data) const {
70  //getWC order: conj( {"SM", "S_qLlL", "S_qRlL", "V_qLlL", "V_qRlL", "T_qLlL", "S_qLlR", "S_qRlR", "V_qLlR", "V_qRlR", "T_qRlR"} )
71  //order for amplitudes: {SM, aSR bSL, aSR bSR, aSL bSL, aSL bSR, aVR bVL, aVR bVR, aVL bVL, aVL bVR, aTR bTL, aTL bTR}
72  auto it = _perms.begin();
74  IndexType previous = *it;
75  ++it;
76  for (; it != _perms.end(); ++it) {
77  data[previous] = data[*it];
78  previous = *it;
79  }
80  data[previous] = tmp;
81  for(IndexType i=0; i < _flips.size(); ++i) {
82  data[i] = _flips[i]*conj(data[i]);
83  }
84  // auto temp = ext.data();
85  // ext.data() = {conj(temp[0]), -conj(temp[1]), -conj(temp[6]), -conj(temp[2]), -conj(temp[7]), conj(temp[4]),
86  // conj(temp[9]), conj(temp[3]), conj(temp[8]), -conj(temp[5]), -conj(temp[10])};
87  }
88 
89 } // namespace Hammer
base amplitude
Tensor indices label definitions.
std::complex< double > ElementType
Definition: IContainer.hh:34
uint16_t IndexType
Interface class for tensor container data structure.