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

          Line data    Source code
       1             : #include "EvtGenBase/EvtPatches.hh"
       2             :  //--------------------------------------------------------------------------
       3             : //
       4             : // Environment:
       5             : //      This software is part of the EvtGen package developed jointly
       6             : //      for the BaBar and CLEO collaborations.  If you use all or part
       7             : //      of it, please give an appropriate acknowledgement.
       8             : //
       9             : // Copyright Information: See EvtGen/COPYRIGHT
      10             : //      Copyright (C) 1998      Caltech, UCSB
      11             : //
      12             : // Module: EvtPartProp.cc
      13             : //
      14             : // Description: Store particle properties for one particle.
      15             : //
      16             : // Modification history:
      17             : //
      18             : //    RYD     April 4, 1997        Module created
      19             : //
      20             : //------------------------------------------------------------------------
      21             : //
      22             : #include <iostream>
      23             : #include <fstream>
      24             : #include <stdlib.h>
      25             : #include <ctype.h>
      26             : #include "EvtGenBase/EvtPartProp.hh"
      27             : #include "EvtGenBase/EvtAbsLineShape.hh"
      28             : #include "EvtGenBase/EvtFlatLineShape.hh"
      29             : #include "EvtGenBase/EvtManyDeltaFuncLineShape.hh"
      30             : #include "EvtGenBase/EvtRelBreitWignerBarrierFact.hh"
      31             : #include <string>
      32             : using std::fstream;
      33             : 
      34           0 : EvtPartProp::EvtPartProp():
      35           0 :   _id(-1,-1)
      36           0 :   ,_idchgconj(-1,-1)
      37           0 :   ,_chg3(0)
      38           0 :   ,_stdhep(0)
      39           0 :   ,_lundkc(0)
      40           0 : {
      41           0 :   _lineShape=0;
      42           0 :   _ctau=0.0;
      43           0 :   _name="*******";
      44           0 :   _spintype=EvtSpinType::SCALAR;
      45           0 : }
      46             : 
      47           0 : EvtPartProp::EvtPartProp(const EvtPartProp& x){
      48             : 
      49           0 :   if (0!=x._lineShape){
      50           0 :     _lineShape=x._lineShape->clone();
      51           0 :   }
      52             :   else{
      53           0 :     _lineShape=0;
      54             :   }
      55           0 :   _ctau=x._ctau;
      56           0 :   _name=x._name;
      57           0 :   _spintype=x._spintype;
      58           0 :   _id=x._id;
      59           0 :   _idchgconj=x._idchgconj;
      60           0 :   _chg3=x._chg3;
      61           0 :   _stdhep=x._stdhep;
      62           0 :   _lundkc=x._lundkc;
      63             : 
      64           0 : }
      65             : 
      66           0 : EvtPartProp::~EvtPartProp() {
      67           0 :   if ( _lineShape ) delete _lineShape;
      68           0 :   _lineShape=0;
      69           0 : }
      70             : 
      71             : 
      72             : void EvtPartProp::setName(std::string pname) {
      73             : 
      74           0 :   _name=pname;
      75             : 
      76           0 : }
      77             : 
      78             : 
      79             : EvtPartProp& EvtPartProp::operator=(const EvtPartProp& x){
      80             : 
      81           0 :   _lineShape=x._lineShape->clone();
      82             : 
      83           0 :   _ctau=x._ctau;
      84           0 :   _name=x._name;
      85           0 :   _chg3=x._chg3;
      86           0 :   _spintype=x._spintype;
      87           0 :   return *this;
      88             : }
      89             : 
      90             : void EvtPartProp::initLineShape(double mass, double width, double maxRange){
      91             : 
      92           0 :   _lineShape=new EvtRelBreitWignerBarrierFact(mass,width,maxRange,_spintype);
      93             : 
      94           0 : }
      95             : 
      96             : void EvtPartProp::newLineShape(std::string type){
      97             : 
      98           0 :   double m=_lineShape->getMass();
      99           0 :   double w=_lineShape->getWidth();
     100           0 :   double mR=_lineShape->getMaxRange();
     101           0 :   EvtSpinType::spintype  st=_lineShape->getSpinType();
     102           0 :   delete _lineShape;
     103           0 :   if ( type == "RELBW" ) {
     104           0 :     _lineShape=new EvtRelBreitWignerBarrierFact(m,w,mR,st);
     105           0 :   }
     106           0 :   if ( type == "NONRELBW" ) {
     107           0 :     _lineShape = new EvtAbsLineShape(m,w,mR,st);
     108           0 :   }
     109           0 :   if ( type == "FLAT" ) {
     110           0 :     _lineShape = new EvtFlatLineShape(m,w,mR,st);
     111           0 :   }
     112           0 :   if ( type == "MANYDELTAFUNC" ) {
     113           0 :     _lineShape = new EvtManyDeltaFuncLineShape(m,w,mR,st);
     114           0 :   }
     115           0 : }
     116             : 
     117             : 
     118             : void EvtPartProp::reSetMass(double mass) {
     119           0 :   if (!_lineShape) ::abort();
     120           0 :   _lineShape->reSetMass(mass);
     121           0 : }
     122             : void EvtPartProp::reSetWidth(double width){
     123           0 :   if (!_lineShape) ::abort();
     124           0 :   _lineShape->reSetWidth(width);
     125           0 : }
     126             : 
     127             : void EvtPartProp::setPWForDecay( int spin, EvtId d1, EvtId d2) { 
     128           0 :   if (!_lineShape) ::abort();
     129           0 :   _lineShape->setPWForDecay(spin,d1,d2);
     130           0 : }
     131             : 
     132             : void EvtPartProp::setPWForBirthL( int spin, EvtId par, EvtId othD) { 
     133           0 :   if (!_lineShape) ::abort();
     134           0 :   _lineShape->setPWForBirthL(spin,par,othD);
     135           0 : }
     136             : 
     137             : 
     138             : void EvtPartProp::reSetMassMin(double mass){
     139           0 :   if (!_lineShape) ::abort();
     140           0 :   _lineShape->reSetMassMin(mass);
     141           0 : }
     142             : void EvtPartProp::reSetMassMax(double mass){
     143           0 :   if (!_lineShape) ::abort();
     144           0 :   _lineShape->reSetMassMax(mass);
     145           0 : }
     146             : void EvtPartProp::reSetBlatt(double blatt){
     147           0 :   if (!_lineShape) ::abort();
     148           0 :   _lineShape->reSetBlatt(blatt);
     149           0 : }
     150             : void EvtPartProp::reSetBlattBirth(double blatt){
     151           0 :   if (!_lineShape) ::abort();
     152           0 :   _lineShape->reSetBlattBirth(blatt);
     153           0 : }
     154             : void EvtPartProp::includeBirthFactor(bool yesno){
     155           0 :   if (!_lineShape) ::abort();
     156           0 :   _lineShape->includeBirthFactor(yesno);
     157           0 : }
     158             : void EvtPartProp::includeDecayFactor(bool yesno){
     159           0 :   if (!_lineShape) ::abort();
     160           0 :   _lineShape->includeDecayFactor(yesno);
     161           0 : }
     162             : 
     163             : 
     164             : 
     165             : 
     166             : 
     167             : 

Generated by: LCOV version 1.11