]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TEvtGen/EvtGenModels/EvtISGW.cxx
AliDecayer realisation for the EvtGen code and EvtGen itself.
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenModels / EvtISGW.cxx
diff --git a/TEvtGen/EvtGenModels/EvtISGW.cxx b/TEvtGen/EvtGenModels/EvtISGW.cxx
new file mode 100644 (file)
index 0000000..be082cf
--- /dev/null
@@ -0,0 +1,90 @@
+//--------------------------------------------------------------------------
+//
+// Environment:
+//      This software is part of the EvtGen package developed jointly
+//      for the BaBar and CLEO collaborations.  If you use all or part
+//      of it, please give an appropriate acknowledgement.
+//
+// Copyright Information: See EvtGen/COPYRIGHT
+//      Copyright (C) 1998      Caltech, UCSB
+//
+// Module: EvtISGW.cc
+//
+// Description: Routine to implement semileptonic decays according
+//              to the model ISGW
+//
+// Modification history:
+//
+//    DJL/RYD     September 25, 1996         Module created
+//
+//------------------------------------------------------------------------
+// 
+#include "EvtGenBase/EvtPatches.hh"
+#include <stdlib.h>
+#include "EvtGenBase/EvtParticle.hh"
+#include "EvtGenBase/EvtGenKine.hh"
+#include "EvtGenBase/EvtPDL.hh"
+#include "EvtGenBase/EvtReport.hh"
+#include "EvtGenModels/EvtISGW.hh"
+#include <string>
+#include "EvtGenModels/EvtISGWFF.hh"
+#include "EvtGenBase/EvtSemiLeptonicScalarAmp.hh"
+#include "EvtGenBase/EvtSemiLeptonicVectorAmp.hh"
+#include "EvtGenBase/EvtSemiLeptonicTensorAmp.hh"
+
+EvtISGW::~EvtISGW() {}
+
+std::string EvtISGW::getName(){
+
+  return "ISGW";     
+
+}
+
+
+EvtDecayBase* EvtISGW::clone(){
+
+  return new EvtISGW;
+
+}
+
+void EvtISGW::decay( EvtParticle *p ){
+
+
+  p->initializePhaseSpace(getNDaug(),getDaugs());
+
+  calcamp->CalcAmp(p,_amp2,isgwffmodel);
+  return;
+
+}
+
+
+void EvtISGW::init(){
+
+  checkNArg(0);
+  checkNDaug(3);
+
+
+  //We expect the parent to be a scalar 
+  //and the daughters to be X lepton neutrino
+
+  EvtSpinType::spintype mesontype=EvtPDL::getSpinType(getDaug(0));
+
+  checkSpinParent(EvtSpinType::SCALAR);
+  checkSpinDaughter(1,EvtSpinType::DIRAC);
+  checkSpinDaughter(2,EvtSpinType::NEUTRINO);
+
+
+  isgwffmodel = new EvtISGWFF;
+  
+  if ( mesontype==EvtSpinType::SCALAR ) { 
+    calcamp = new EvtSemiLeptonicScalarAmp; 
+  }
+  if ( mesontype==EvtSpinType::VECTOR ) { 
+    calcamp = new EvtSemiLeptonicVectorAmp; 
+  }
+  if ( mesontype==EvtSpinType::TENSOR ) { 
+    calcamp = new EvtSemiLeptonicTensorAmp; 
+  }
+  
+}
+