LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenModels - EvtFlatQ2.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 21 0.0 %
Date: 2016-06-14 17:26:59 Functions: 0 8 0.0 %

          Line data    Source code
       1             : //--------------------------------------------------------------------------
       2             : //
       3             : // Environment:
       4             : //      This software is part of the EvtGen package developed jointly
       5             : //      for the BaBar and CLEO collaborations.  If you use all or part
       6             : //      of it, please give an appropriate acknowledgement.
       7             : //
       8             : // Copyright Information: See EvtGen/COPYRIGHT
       9             : //      Copyright (C) 1998      Caltech, UCSB
      10             : //
      11             : // Module: EvtFlatQ2.cc
      12             : //
      13             : // Description: B->Xu l nu with flat q2 distribution
      14             : //
      15             : // Modification history:
      16             : //
      17             : //    David Cote, U. de Montreal, 11/02/2003    Module created
      18             : //
      19             : //------------------------------------------------------------------------
      20             : //
      21             : #include "EvtGenBase/EvtPatches.hh"
      22             : #include "EvtGenModels/EvtFlatQ2.hh"
      23             : 
      24             : #include <stdlib.h>
      25             : #include <fstream>
      26             : #include <stdio.h>
      27             : #include <string>
      28             : #include "EvtGenBase/EvtGenKine.hh"
      29             : #include "EvtGenBase/EvtParticle.hh"
      30             : #include "EvtGenBase/EvtPDL.hh"
      31             : #include "EvtGenBase/EvtReport.hh"
      32             : #include "EvtGenBase/EvtDiracSpinor.hh"
      33             : #include "EvtGenBase/EvtVector4C.hh"
      34             : #include "EvtGenBase/EvtTensor4C.hh"
      35             : using std::fstream;
      36             : 
      37           0 : EvtFlatQ2::~EvtFlatQ2() {}
      38             : 
      39             : std::string EvtFlatQ2::getName(){
      40             : 
      41           0 :     return "FLATQ2";
      42             : 
      43             : }
      44             : 
      45             : EvtDecayBase* EvtFlatQ2::clone(){
      46             : 
      47           0 :   return new EvtFlatQ2;
      48             : 
      49           0 : }
      50             : 
      51             : 
      52             : void EvtFlatQ2::initProbMax(){
      53             : 
      54           0 :   setProbMax(100);
      55             : 
      56           0 : }
      57             : 
      58             : 
      59             : void EvtFlatQ2::init(){
      60             : 
      61             :   // check that there are 0 arguments
      62           0 :   checkNArg(0);
      63           0 :   checkNDaug(3);
      64             : 
      65             :   //We expect B->X l nu events
      66           0 :   checkSpinParent(EvtSpinType::SCALAR);
      67           0 :   checkSpinDaughter(1,EvtSpinType::DIRAC);
      68           0 :   checkSpinDaughter(2,EvtSpinType::NEUTRINO);
      69             : 
      70           0 : }
      71             : 
      72             : 
      73             : void EvtFlatQ2::decay( EvtParticle *p){
      74             : 
      75           0 :   p->initializePhaseSpace(getNDaug(),getDaugs());
      76             : 
      77           0 :   EvtVector4R p4Xu = p->getDaug(0)->getP4();
      78           0 :   double pXu_x2=p4Xu.get(1)*p4Xu.get(1);
      79           0 :   double pXu_y2=p4Xu.get(2)*p4Xu.get(2);
      80           0 :   double pXu_z2=p4Xu.get(3)*p4Xu.get(3);
      81           0 :   double pXu = sqrt(pXu_x2+pXu_y2+pXu_z2);
      82           0 :   double prob=1/pXu;
      83             :   
      84           0 :   if(pXu>0.01) setProb(prob);
      85             : 
      86             :   return;
      87           0 : }
      88             : 
      89             : 

Generated by: LCOV version 1.11