MINT2
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SF_DtoVS_VtoP0P1_StoP2P3_nonResV Class Reference

#include <SpinFactors4Body_ScalarsAndVectors.h>

Inheritance diagram for SF_DtoVS_VtoP0P1_StoP2P3_nonResV:
SpinFactor MINT::IReturnRealForEvent< IDalitzEvent > MINT::IReturnComplexForEvent< IDalitzEvent > CachedByEvent< std::complex< double > > MINT::FitParDependent ISpinFactor MINT::IFitParDependent MINT::IFitParRegister MINT::PolymorphVector< FitParRef > MINT::IReturnRealForEvent< IDalitzEvent > MINT::IReturnComplexForEvent< IDalitzEvent > MINT::IFitParDependent

Public Member Functions

virtual void printYourself (std::ostream &os=std::cout) const
 
 SF_DtoVS_VtoP0P1_StoP2P3_nonResV (const AssociatedDecayTree &theDecay)
 
virtual ~SF_DtoVS_VtoP0P1_StoP2P3_nonResV ()
 
virtual double getVal (IDalitzEvent &evt)
 
virtual const DecayTreeexampleDecay ()
 
virtual std::string name () const
 
- Public Member Functions inherited from SpinFactor
virtual double RealVal (IDalitzEvent &evt)
 
virtual std::complex< double > ComplexVal (IDalitzEvent &evt)
 
virtual std::complex< double > getNewVal (IDalitzEvent &evt)
 
double mRes (const AssociatedDecayTreeItem &adt, IDalitzEvent &evt)
 
double mRes (const MINT::const_counted_ptr< AssociatedDecayTree > &adt, IDalitzEvent &evt)
 
const AssociatedDecayTreetheDecay () const
 
const AssociatedDecayTreetheDecay (const DalitzEventPattern &) const
 
const AssociatedDecayTreetheDecay (IDalitzEvent &evt) const
 
 SpinFactor (const AssociatedDecayTree &decay, int nFinal=3)
 
 SpinFactor (const SpinFactor &other)
 
virtual void printParsing (std::ostream &os=std::cout) const
 
virtual ~SpinFactor ()
 
- Public Member Functions inherited from MINT::IReturnRealForEvent< IDalitzEvent >
virtual ~IReturnRealForEvent ()
 
- Public Member Functions inherited from MINT::IReturnComplexForEvent< IDalitzEvent >
virtual ~IReturnComplexForEvent ()
 
- Public Member Functions inherited from CachedByEvent< std::complex< double > >
 CachedByEvent ()
 
 CachedByEvent (const CachedByEvent &)
 
std::complex< double > getValWithCaching (IDalitzEvent &evt)
 
std::complex< double > getValWithCachingPermutation (IDalitzEvent &evt)
 
- Public Member Functions inherited from MINT::FitParDependent
virtual unsigned int size () const
 
virtual const FitParRefoperator[] (unsigned int i) const
 
virtual FitParRefoperator[] (unsigned int i)
 
virtual bool changedSinceLastCall () const
 
virtual void rememberFitParValues ()
 
virtual bool registerFitParDependence (const IFitParDependent &fpd)
 
bool registerFitParDependence (const FitParRef &fpr)
 
void removeAllFitParDependencies ()
 
 FitParDependent (IFitParRegister *daddy=0)
 
 FitParDependent (const FitParDependent &other, IFitParRegister *newDaddy=0)
 
void listFitParDependencies (std::ostream &os=std::cout) const
 
- Public Member Functions inherited from MINT::PolymorphVector< FitParRef >
 PolymorphVector ()
 
 PolymorphVector (unsigned int N)
 
 PolymorphVector (unsigned int N, const FitParRef &c)
 
 PolymorphVector (const PolymorphVector &other)
 
 PolymorphVector (const typename std::vector< FitParRef > &other)
 
virtual ~PolymorphVector ()
 
std::vector< FitParRef > & theVector ()
 
const std::vector< FitParRef > & theVector () const
 
FitParRefoperator[] (unsigned int i)
 
const FitParRefoperator[] (unsigned int i) const
 
FitParRefat (unsigned int i)
 
const FitParRefat (unsigned int i) const
 
std::vector< FitParRef >::iterator begin ()
 
std::vector< FitParRef >::const_iterator begin () const
 
std::vector< FitParRef >::iterator end ()
 
std::vector< FitParRef >::const_iterator end () const
 
std::vector< FitParRef >::iterator find (const FitParRef &c)
 
std::vector< FitParRef >::const_iterator find (const FitParRef &c) const
 
FitParReffront ()
 
const FitParReffront () const
 
FitParRefback ()
 
const FitParRefback () const
 
unsigned int size () const
 
bool empty () const
 
void push_back (const FitParRef &c)
 
void pop_back ()
 
void erase (typename std::vector< FitParRef >::iterator pos)
 
void erase (typename std::vector< FitParRef >::iterator first, typename std::vector< FitParRef >::iterator last)
 
PolymorphVector< FitParRef > & operator= (const PolymorphVector< FitParRef > &other)
 
void clear ()
 
void resize (unsigned int N)
 
void resize (unsigned int N, const FitParRef &c)
 
 operator const typename std::vector< FitParRef > & () const
 
 operator typename std::vector< FitParRef > & ()
 
bool operator== (const MINT::PolymorphVector< FitParRef > &v2) const
 
bool operator!= (const MINT::PolymorphVector< FitParRef > &v2) const
 
bool operator< (const MINT::PolymorphVector< FitParRef > &v2) const
 
bool operator> (const MINT::PolymorphVector< FitParRef > &v2) const
 
- Public Member Functions inherited from ISpinFactor
virtual ~ISpinFactor ()
 

Static Public Member Functions

static const DecayTreegetExampleDecay ()
 

Protected Member Functions

virtual bool parseTree (const DalitzEventPattern &pat)
 
- Protected Member Functions inherited from SpinFactor
TLorentzVector p (int i, IDalitzEvent &evt)
 
- Protected Member Functions inherited from MINT::IReturnRealForEvent< IDalitzEvent >
 IReturnRealForEvent ()
 
- Protected Member Functions inherited from MINT::IReturnComplexForEvent< IDalitzEvent >
 IReturnComplexForEvent ()
 
- Protected Member Functions inherited from CachedByEvent< std::complex< double > >
long int rememberNumber ()
 
long int rememberNumberPermutation (IDalitzEvent &evt)
 
long int configNumber ()
 
std::complex< double > recalculate (IDalitzEvent &evt)
 
std::complex< double > recalculatePermutation (IDalitzEvent &evt)
 
- Protected Member Functions inherited from ISpinFactor
 ISpinFactor ()
 

Protected Attributes

MINT::const_counted_ptr< AssociatedDecayTreeS
 
- Protected Attributes inherited from SpinFactor
const AssociatedDecayTree_theDecay
 
int _nFinal
 
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
 
MINT::NamedParameter< int > _useZemachTensors
 
- Protected Attributes inherited from CachedByEvent< std::complex< double > >
long int _rememberNumber
 
std::vector< long int > _rememberNumberPermutation
 
long int _configNumber
 
- Protected Attributes inherited from MINT::PolymorphVector< FitParRef >
std::vector< FitParRef_vec
 

Static Protected Attributes

static DecayTree_exampleDecay =0
 

Detailed Description

Definition at line 356 of file SpinFactors4Body_ScalarsAndVectors.h.

Constructor & Destructor Documentation

◆ SF_DtoVS_VtoP0P1_StoP2P3_nonResV()

SF_DtoVS_VtoP0P1_StoP2P3_nonResV::SF_DtoVS_VtoP0P1_StoP2P3_nonResV ( const AssociatedDecayTree theDecay)
inline

Definition at line 365 of file SpinFactors4Body_ScalarsAndVectors.h.

366  : SpinFactor(theDecay, 4)
367  , S(0)
368  {
369  }
SpinFactor(const AssociatedDecayTree &decay, int nFinal=3)
Definition: SpinFactor.h:74
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
MINT::const_counted_ptr< AssociatedDecayTree > S

◆ ~SF_DtoVS_VtoP0P1_StoP2P3_nonResV()

virtual SF_DtoVS_VtoP0P1_StoP2P3_nonResV::~SF_DtoVS_VtoP0P1_StoP2P3_nonResV ( )
inlinevirtual

Definition at line 371 of file SpinFactors4Body_ScalarsAndVectors.h.

371 {}

Member Function Documentation

◆ exampleDecay()

const DecayTree & SF_DtoVS_VtoP0P1_StoP2P3_nonResV::exampleDecay ( )
virtual

Implements SpinFactor.

Definition at line 938 of file SpinFactors4Body_ScalarsAndVectors.cpp.

938  {
939  return getExampleDecay();
940 }

◆ getExampleDecay()

const DecayTree & SF_DtoVS_VtoP0P1_StoP2P3_nonResV::getExampleDecay ( )
static

Definition at line 926 of file SpinFactors4Body_ScalarsAndVectors.cpp.

926  {
927  if(0==_exampleDecay){
928  _exampleDecay = new DecayTree(421);
929  // remark: addDgtr always returns a pointer to the
930  // last daughter that was added, thus allowing these
931  // chains:
932  _exampleDecay->addDgtr( 321, -321); // V (non res)
933  _exampleDecay->addDgtr(9010221)->addDgtr(-211, 211); // S
934  }
935  return *_exampleDecay; // this example is not necessarily physical.
936 }
MINT::counted_ptr< DDTree< ValueType > > addDgtr(const DDTree< ValueType > *treePtr)
Definition: DDTree.h:211
DDTree< DecayTreeItem > DecayTree
Definition: DecayTree.h:35

◆ getVal()

double SF_DtoVS_VtoP0P1_StoP2P3_nonResV::getVal ( IDalitzEvent evt)
virtual

Implements SpinFactor.

Definition at line 978 of file SpinFactors4Body_ScalarsAndVectors.cpp.

978  {
979  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.eventPattern());
980 
981  TLorentzVector pS = p(2, evt) + p(3, evt);
982  TLorentzVector pV = p(0, evt) + p(1, evt);
983  TLorentzVector qV = p(0, evt) - p(1, evt);
984 
985  double MassV = pV.M();
986 
987  return (pS.Dot(qV)
988  - pS.Dot(pV) * pV.Dot(qV) / (MassV*MassV)
989  )
990  /(GeV*GeV)
991  ;
992 }
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
Definition: SpinFactor.h:30
TLorentzVector p(int i, IDalitzEvent &evt)
Definition: SpinFactor.cpp:11
virtual const DalitzEventPattern & eventPattern() const =0
static const double GeV
virtual bool parseTree(const DalitzEventPattern &pat)

◆ name()

virtual std::string SF_DtoVS_VtoP0P1_StoP2P3_nonResV::name ( ) const
inlinevirtual

Implements SpinFactor.

Definition at line 376 of file SpinFactors4Body_ScalarsAndVectors.h.

376  {
377  return "SpinFactor4:SF_DtoVS_VtoP0P1_StoP2P3_nonResV("
378  + theDecay().oneLiner() + ")";
379  }
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375

◆ parseTree()

bool SF_DtoVS_VtoP0P1_StoP2P3_nonResV::parseTree ( const DalitzEventPattern pat)
protectedvirtual

Definition at line 942 of file SpinFactors4Body_ScalarsAndVectors.cpp.

942  {
943  // bool debugThis=false;
944  if(fsPS.size() < 4) fsPS.reserve(4);
945  int P_index=0;
946  for(int i=0; i< theDecay(pat).nDgtr(); i++){
948  if(dgtr->getVal().SVPAT() == "S" && ! dgtr->isFinalState()) S = dgtr;
949  else if(dgtr->getVal().SVPAT() == "P" && dgtr->isFinalState()){
950  fsPS[P_index++] = dgtr;
951  }
952  }
953  if(0==S){
954  cout << "ERROR in SF_DtoVS_VtoP0P1_StoP2P3_nonResV::parseTree"
955  << " Didn't find S " << S.get() << endl;
956  return false;
957  }
958  if(P_index != 2 || 0==(fsPS[0]) || 0==(fsPS[1]) ){
959  cout << "ERROR in SF_DtoVS_VtoP0P1_StoP2P3_nonResV::parseTree"
960  << " Didn't find P1, P2 " << endl;
961  return false;
962  }
963  if(S->nDgtr() != 2){
964  cout << "ERROR in SF_DtoVS_VtoP0P1_StoP2P3_nonResV::parseTree"
965  << " S should have 2 daughters, but it says it has "
966  << S->nDgtr() << "."
967  << endl;
968  return false;
969  }
970  fsPS[2] = S->getDgtrTreePtr(0);
971  fsPS[3] = S->getDgtrTreePtr(1);
972  // normalOrder(fsPS[2], fsPS[3]);
973 
974  // this->printYourself();
975  return true;
976 }
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
Definition: SpinFactor.h:30
std::string SVPAT() const
const ValueType & getVal() const
Definition: DDTree.h:102
bool isFinalState() const
Definition: DDTree.h:93
MINT::const_counted_ptr< DDTree< ValueType > > getDgtrTreePtr(int i) const
Definition: DDTree.h:114
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
int nDgtr() const
Definition: DDTree.h:96
MINT::const_counted_ptr< AssociatedDecayTree > S

◆ printYourself()

void SF_DtoVS_VtoP0P1_StoP2P3_nonResV::printYourself ( std::ostream &  os = std::cout) const
virtual

Implements SpinFactor.

Definition at line 993 of file SpinFactors4Body_ScalarsAndVectors.cpp.

993  {
994  // bool debugThis = false;
995  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) return;
996  os << "spin factor SF_DtoVS_VtoP0P1_StoP2P3_nonResV"
997  << " - recommend not to use this, use nonRes particles instead"
998  << "\n anyway, I return:"
999  << "\n\t (pS.Dot(qV) - pS.Dot(pV) * pV.Dot(qV) / (MassV*MassV) ) / (GeV*GeV)"
1000  << "\n\t with: pS = p(2) + p(3), pV = p(0) + p(1), qV = p(0) - p(1)"
1001  << "\n\t parsed tree " << theDecay().oneLiner()
1002  << "\n like this:" << endl;
1003  this->printParsing(os);
1004 }
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
Definition: SpinFactor.h:30
virtual void printParsing(std::ostream &os=std::cout) const
Definition: SpinFactor.cpp:57
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375

Member Data Documentation

◆ _exampleDecay

DecayTree * SF_DtoVS_VtoP0P1_StoP2P3_nonResV::_exampleDecay =0
staticprotected

Definition at line 358 of file SpinFactors4Body_ScalarsAndVectors.h.

◆ S

MINT::const_counted_ptr<AssociatedDecayTree> SF_DtoVS_VtoP0P1_StoP2P3_nonResV::S
protected

Definition at line 359 of file SpinFactors4Body_ScalarsAndVectors.h.


The documentation for this class was generated from the following files: