LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenBase - EvtStdHep.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 22 0.0 %
Date: 2016-06-14 17:26:59 Functions: 0 4 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: EvtStdHep.cc
      12             : //
      13             : // Description: Class produce the StdHep representation of the decay.
      14             : //
      15             : // Modification history:
      16             : //
      17             : //    RYD       March 11, 1998       Module created
      18             : //
      19             : //------------------------------------------------------------------------
      20             : #include "EvtGenBase/EvtPatches.hh"
      21             : 
      22             : #include <iostream>
      23             : #include <iomanip>
      24             : #include "EvtGenBase/EvtVector4R.hh"
      25             : #include "EvtGenBase/EvtStdHep.hh"
      26             : using namespace std;
      27             : 
      28             : 
      29             : void EvtStdHep::init(){
      30           0 :   _npart=0;
      31           0 : }
      32             :   
      33             : int EvtStdHep::getNPart(){
      34           0 :   return _npart;
      35             : }
      36             : 
      37             : void EvtStdHep::createParticle(EvtVector4R p4,EvtVector4R x,int prntfirst,
      38             :                                 int prntlast, int id){
      39             : 
      40           0 :   _p4[_npart]=p4;
      41           0 :   _x[_npart]=x;
      42           0 :   _prntfirst[_npart]=prntfirst;
      43           0 :   _prntlast[_npart]=prntlast;
      44           0 :   _daugfirst[_npart]=-1;
      45           0 :   _dauglast[_npart]=-1;
      46           0 :   _id[_npart]=id;
      47           0 :   _istat[_npart]=1;
      48             : 
      49             :   //we also need to fix up the parents pointer to the daughter!
      50             : 
      51           0 :   if (prntfirst>=0) {
      52             :     int i;
      53           0 :     for (i=prntfirst;i<=prntlast;i++){
      54           0 :       _istat[i]=2;
      55           0 :       if (_daugfirst[i]==-1) _daugfirst[i]=_npart;
      56           0 :       if (_dauglast[i]<_npart) _dauglast[i]=_npart;
      57             :     }
      58             :  
      59           0 :   }
      60             : 
      61           0 :   _npart++;
      62             : 
      63           0 : }
      64             : 
      65             : void EvtStdHep::translate(EvtVector4R d){
      66             : 
      67             :   int i;
      68           0 :   for(i=0;i<_npart;i++){
      69           0 :     _x[i]+=d;
      70             :   }
      71             : 
      72           0 : }
      73             : 
      74             :  
      75             : /*
      76             : ostream& operator<<(ostream& s, const EvtStdHep& stdhep){
      77             : 
      78             :   int w=s.width();
      79             :   int p=s.precision();
      80             :   std::ios::fmtflags f=s.flags();
      81             : 
      82             : 
      83             :   s <<endl;
      84             :   s << "  N      Id Ist   M1   M2   DF   DL      px      py      pz       E       t       x       y       z"<<endl;
      85             :   int i;
      86             :   for(i=0;i<stdhep._npart;i++){
      87             :     
      88             :     s.width(3);
      89             :     s<<i<<" ";
      90             :     s.width(7);
      91             :     s<<stdhep._id[i]<<" ";
      92             :     s.width(3);
      93             :     s<<stdhep._istat[i]<<" ";
      94             :     s.width(4);
      95             :     s<<stdhep._prntfirst[i]<<" ";
      96             :     s.width(4);
      97             :     s<<stdhep._prntlast[i]<<" ";
      98             :     s.width(4);
      99             :     s<<stdhep._daugfirst[i]<<" ";
     100             :     s.width(4);
     101             :     s<<stdhep._dauglast[i]<<" ";
     102             :     s.width(7);
     103             :     s.precision(4);
     104             :     s<<setiosflags( ios::right|ios::fixed );
     105             :     s<<stdhep._p4[i].get(1)<<" ";
     106             :     s.width(7);
     107             :     s.precision(4);
     108             :     s<<setiosflags( ios::right|ios::fixed );
     109             :     s<<stdhep._p4[i].get(2)<<" ";
     110             :     s.width(7);
     111             :     s.precision(4);
     112             :     s<<setiosflags( ios::right|ios::fixed );
     113             :     s<<stdhep._p4[i].get(3)<<" ";
     114             :     s.width(7);
     115             :     s.precision(4);
     116             :     s<<setiosflags( ios::right|ios::fixed );
     117             :     s<<stdhep._p4[i].get(0)<<" ";
     118             :     s.width(7);
     119             :     s.precision(4);
     120             :     s<<setiosflags( ios::right|ios::fixed );
     121             :     s<<stdhep._x[i].get(0)<<" ";
     122             :     s.width(7);
     123             :     s.precision(4);
     124             :     s<<setiosflags( ios::right|ios::fixed );
     125             :     s<<stdhep._x[i].get(1)<<" ";
     126             :     s.width(7);
     127             :     s.precision(4);
     128             :     s<<setiosflags( ios::right|ios::fixed );
     129             :     s<<stdhep._x[i].get(2)<<" ";
     130             :     s.width(7);
     131             :     s.precision(4);
     132             :     s<<setiosflags( ios::right|ios::fixed );
     133             :     s<<stdhep._x[i].get(3)<<endl;
     134             :     s.width(0);
     135             :   }
     136             :   
     137             :   s<<endl;
     138             : 
     139             :   s.width(w);
     140             :   s.precision(p);
     141             :   s.flags((std::ios::fmtflags)f);
     142             :   
     143             :   return s;
     144             : 
     145             : }  
     146             : 
     147             : */

Generated by: LCOV version 1.11