/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenBase/EvtManyDeltaFuncLineShape.cc

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 //
00003 // Environment:
00004 //      This software is part of the EvtGen package developed jointly
00005 //      for the BaBar and CLEO collaborations.  If you use all or part
00006 //      of it, please give an appropriate acknowledgement.
00007 //
00008 // Copyright Information: See EvtGen/COPYRIGHT
00009 //      Copyright (C) 1998      Caltech, UCSB
00010 //
00011 // Module: EvtLineShape.cc
00012 //
00013 // Description: Store particle properties for one particle.
00014 //
00015 // Modification history:
00016 //
00017 //    Lange      March 10, 2001        Module created
00018 //    Dvoretskii June  03, 2002        Reimplemented rollMass()
00019 //
00020 //------------------------------------------------------------------------
00021 #include "EvtGenBase/EvtPatches.hh"
00022 
00023 #include "EvtGenBase/EvtPatches.hh"
00024 #include "EvtGenBase/EvtManyDeltaFuncLineShape.hh"
00025 #include "EvtGenBase/EvtRandom.hh"
00026 #include "EvtGenBase/EvtTwoBodyVertex.hh"
00027 #include "EvtGenBase/EvtBlattWeisskopf.hh"
00028 #include "EvtGenBase/EvtPropBreitWignerRel.hh"
00029 #include "EvtGenBase/EvtPropBreitWigner.hh"
00030 #include "EvtGenBase/EvtPDL.hh"
00031 #include "EvtGenBase/EvtSpinType.hh"
00032 
00033 EvtManyDeltaFuncLineShape::EvtManyDeltaFuncLineShape() {
00034 
00035 }
00036 
00037 EvtManyDeltaFuncLineShape::~EvtManyDeltaFuncLineShape() {
00038 }
00039 
00040 EvtManyDeltaFuncLineShape::EvtManyDeltaFuncLineShape(double mass, double width, double maxRange, EvtSpinType::spintype sp) { 
00041 
00042   _mass=mass;
00043   _width=width;
00044   _spin=sp;
00045   _maxRange=maxRange;
00046 
00047   double maxdelta = width;
00048 
00049   _massMax=mass+maxdelta;
00050   _massMin=mass-maxdelta;
00051 
00052   if ( _massMin< 0. ) _massMin=0.;
00053 
00054 }
00055 
00056 EvtManyDeltaFuncLineShape::EvtManyDeltaFuncLineShape(const EvtManyDeltaFuncLineShape& x) {
00057   _mass=x._mass;
00058   _width=x._width;
00059   _spin=x._spin;
00060   _massMax=x._massMax;
00061   _massMin=x._massMin;
00062   _maxRange=x._maxRange;
00063 
00064 }
00065 
00066 EvtManyDeltaFuncLineShape& EvtManyDeltaFuncLineShape::operator=(const EvtManyDeltaFuncLineShape& x){
00067   _mass=x._mass;
00068   _massMax=x._massMax;
00069   _massMin=x._massMin;
00070   _width=x._width;
00071   _maxRange=x._maxRange;
00072   _spin=x._spin;
00073   return *this;
00074 
00075 }
00076 
00077 EvtAbsLineShape* EvtManyDeltaFuncLineShape::clone() {
00078 
00079   return new EvtManyDeltaFuncLineShape(*this);
00080 }
00081 
00082 
00083 double EvtManyDeltaFuncLineShape::getMassProb(double mass, double massPar,int nDaug, double *massDau) {
00084 
00085   
00086   double dTotMass=0.;
00087 
00088   int i;
00089   for (i=0; i<nDaug; i++) {
00090     dTotMass+=massDau[i];
00091   }
00092   if ( (mass<dTotMass) ) return 0.;
00093 
00094   if ( massPar>0.0000000001 ) {
00095     if ( mass > massPar) return 0.;
00096   }
00097 
00098   return 1.;
00099 }
00100 
00101 double EvtManyDeltaFuncLineShape::getRandMass(EvtId *parId,int nDaug, EvtId *dauId, EvtId *othDaugId, double maxMass, double *dauMasses) {
00102 
00103   int nDelta = int((_massMax - _massMin)/_width);
00104   nDelta++;
00105   double rand=EvtRandom::Flat(0.,float(nDelta));
00106   int randI=int(rand);
00107   return _massMin+randI*_width;
00108 }
00109 
00110 
00111 
00112 

Generated on Tue Nov 29 23:12:13 2016 for BOSS_7.0.2 by  doxygen 1.4.7