LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenModels - EvtTVP.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 31 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: EvtTVP.cc
      12             : //
      13             : // Description: Routine to implement radiative decay chi_c2 -> psi gamma
      14             : //                      matrix element from [S.P Baranov et al, PRD 85, 014034 (2012)]
      15             : //
      16             : // Modification history:
      17             : //      AVL     6 July, 2012    Module created
      18             : //
      19             : //------------------------------------------------------------------------
      20             : // 
      21             : #include "EvtGenBase/EvtPatches.hh"
      22             : #include <stdlib.h>
      23             : #include "EvtGenBase/EvtParticle.hh"
      24             : #include "EvtGenBase/EvtTensorParticle.hh"
      25             : #include "EvtGenBase/EvtGenKine.hh"
      26             : #include "EvtGenBase/EvtPDL.hh"
      27             : #include "EvtGenBase/EvtReport.hh"
      28             : #include "EvtGenBase/EvtVector4C.hh"
      29             : #include "EvtGenBase/EvtTensor4C.hh"
      30             : 
      31             : 
      32             : #include "EvtGenModels/EvtTVP.hh"
      33             : 
      34             : 
      35             : #include <string>
      36             : #include <iostream>
      37             : 
      38             : using namespace std;
      39             : 
      40             : 
      41             : 
      42           0 : EvtTVP::~EvtTVP() {
      43             : //   cout<<"(* AVL EvtTVP::destructor getProbMax(-1) = "<<getProbMax(-1)<<" *)"<<endl;
      44             : //   cout<<"(* AVL EvtTVP::destructor "<<ncall<<" calls *)"<<endl;
      45           0 : }
      46             : 
      47             : std::string EvtTVP::getName(){
      48           0 :   return "TVP";     
      49             : }
      50             : 
      51             : 
      52             : EvtDecayBase* EvtTVP::clone(){
      53             : //   cout<<" (* AVL: === EvtTVP::clone() ============ *)"<<endl;
      54           0 :   return new EvtTVP;
      55             : 
      56           0 : }
      57             : 
      58             : void EvtTVP::decay( EvtParticle *root ){
      59           0 :   ncall++;
      60             : //   cout<<" (* AVL  EvtTVP::decay() ============ *)"<<endl;
      61             :   double amp2=0;
      62           0 :   root ->initializePhaseSpace(getNDaug(),getDaugs());
      63             :   
      64           0 :   EvtVector4R p = root->getDaug(1)->getP4(), // J/psi momentum
      65           0 :     k = root->getDaug(0)->getP4();           // Photon momentum
      66             : /*  
      67             :     cout<<"(* AVL *) p="<<p<<endl;
      68             :     cout<<"(* AVL *) k="<<k<<endl;*/
      69             :     
      70           0 :   for(int iPsi = 0; iPsi < 4; iPsi++) {
      71           0 :     for(int iGamma = 0; iGamma < 1; iGamma++) {
      72           0 :       for(int iChi = 0; iChi<4; iChi++) {
      73           0 :           EvtTensor4C epsChi = root->epsTensor(iChi);
      74           0 :           EvtVector4C epsPsi = root->getDaug(1)->epsParent(iPsi).conj();
      75           0 :           EvtVector4C epsGamma = root->getDaug(0)->epsParentPhoton(iGamma).conj();
      76             : 
      77             :           // [Baranov, (11)
      78             :           // matr = p^mu epsPsi^a epsChi_{a b} ( k_mu epsGamma_b  - k_b epsGamma_mu
      79             : 
      80             : 
      81           0 :           EvtVector4C eee = epsChi.cont1(epsPsi);
      82           0 :           EvtVector4C vvv = (p*k)*eee - (k*eee)*p;
      83             : //        cout <<" (* AVL: ginv "<<(vvv*k)<<"  *) "<<endl;
      84           0 :           EvtComplex amp = vvv*epsGamma;
      85             : 
      86             : //        cout << "(* AVL *) amp="<<amp<<endl;
      87           0 :           vertex(iChi, iGamma, iPsi, amp);
      88           0 :           amp2 = amp2 + abs2(amp);
      89           0 :       };
      90             :     };
      91             :   };
      92             : //   cout <<"(* AVL: amp2 = "<<amp2<<"*)"<<endl;
      93             :   
      94           0 : }
      95             : 
      96             : 
      97             : void EvtTVP::init(){
      98             : //   cout<<" (* AVL: ==== EvtTVP::init() ============ *)"<<endl;
      99             : 
     100           0 :     ncall = 0;
     101             :   
     102           0 :   checkNArg(0);
     103           0 :   checkNDaug(2);
     104             : 
     105             : 
     106           0 :   checkSpinParent(EvtSpinType::TENSOR);
     107             : 
     108           0 :   checkSpinDaughter(0,EvtSpinType::PHOTON);
     109           0 :   checkSpinDaughter(1,EvtSpinType::VECTOR);
     110             : 
     111           0 : }
     112             : 
     113             : void EvtTVP::initProbMax() {
     114           0 :   setProbMax(1.);
     115           0 : };
     116             : 

Generated by: LCOV version 1.11