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

#include <SpinFactors4Body_ScalarsAndVectors.h>

Inheritance diagram for SF_DtoV1P0_V1toV2P1_V2toP2P3:
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_DtoV1P0_V1toV2P1_V2toP2P3 (const AssociatedDecayTree &theDecay)
 
virtual ~SF_DtoV1P0_V1toV2P1_V2toP2P3 ()
 
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< AssociatedDecayTreeV1
 
MINT::const_counted_ptr< AssociatedDecayTreeV2
 
- 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 384 of file SpinFactors4Body_ScalarsAndVectors.h.

Constructor & Destructor Documentation

◆ SF_DtoV1P0_V1toV2P1_V2toP2P3()

SF_DtoV1P0_V1toV2P1_V2toP2P3::SF_DtoV1P0_V1toV2P1_V2toP2P3 ( const AssociatedDecayTree theDecay)
inline

Definition at line 394 of file SpinFactors4Body_ScalarsAndVectors.h.

395  : SpinFactor(theDecay, 4)
396  , V1(0), V2(0)
397  {
398  }
MINT::const_counted_ptr< AssociatedDecayTree > V1
SpinFactor(const AssociatedDecayTree &decay, int nFinal=3)
Definition: SpinFactor.h:74
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
MINT::const_counted_ptr< AssociatedDecayTree > V2

◆ ~SF_DtoV1P0_V1toV2P1_V2toP2P3()

virtual SF_DtoV1P0_V1toV2P1_V2toP2P3::~SF_DtoV1P0_V1toV2P1_V2toP2P3 ( )
inlinevirtual

Definition at line 400 of file SpinFactors4Body_ScalarsAndVectors.h.

400 {}

Member Function Documentation

◆ exampleDecay()

const DecayTree & SF_DtoV1P0_V1toV2P1_V2toP2P3::exampleDecay ( )
virtual

Implements SpinFactor.

Definition at line 1018 of file SpinFactors4Body_ScalarsAndVectors.cpp.

1018  {
1019  return getExampleDecay();
1020 }

◆ getExampleDecay()

const DecayTree & SF_DtoV1P0_V1toV2P1_V2toP2P3::getExampleDecay ( )
static

Definition at line 1008 of file SpinFactors4Body_ScalarsAndVectors.cpp.

1008  {
1009  if(0==_exampleDecay){
1010  _exampleDecay = new DecayTree(421);
1011  // remark: addDgtr always returns a pointer to the
1012  // last daughter that was added, thus allowing these
1013  // chains:
1014  _exampleDecay->addDgtr(310, 223)->addDgtr(111, 113)->addDgtr(211, -211);
1015  }
1016  return *_exampleDecay;
1017 }
MINT::counted_ptr< DDTree< ValueType > > addDgtr(const DDTree< ValueType > *treePtr)
Definition: DDTree.h:211
DDTree< DecayTreeItem > DecayTree
Definition: DecayTree.h:35

◆ getVal()

double SF_DtoV1P0_V1toV2P1_V2toP2P3::getVal ( IDalitzEvent evt)
virtual

Implements SpinFactor.

Definition at line 1063 of file SpinFactors4Body_ScalarsAndVectors.cpp.

1063  {
1064  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.eventPattern());
1065 
1066  TLorentzVector pV1 = p(1, evt) + p(2, evt) + p(3, evt);
1067  TLorentzVector pV2 = p(2, evt) + p(3, evt);
1068  TLorentzVector pP1 = p(0, evt);
1069 
1070  TLorentzVector qV1 = (p(2, evt) + p(3, evt)) - p(1, evt);
1071  TLorentzVector qV2 = p(2, evt) - p(3, evt);
1072 
1073  double units = GeV*GeV*GeV*GeV;
1074 
1075  if (_useZemachTensors) {
1076  double MV1 = mRes(V1, evt);
1077  double MV2 = mRes(V2, evt);
1078 
1079  TLorentzVector pD = pV1 + p(0, evt);
1080  TLorentzVector qD = pV1 - p(0, evt);
1081 
1082  ZTspin1 LD(qD,pD,pD.M());
1083  ZTspin1 LV1(qV1,pV1,MV1);
1084  ZTspin1 LV2(qV2,pV2,MV2);
1085  SpinSumV PV1(pV1,MV1);
1086 
1087  TLorentzVector tmp = PV1.Dot(LD);
1088 
1089  return LeviCivita(pV1,LV1,LV2).Dot(tmp)/units;
1090  }
1091 
1092 
1093  return LeviCivita(pV1, qV1, pP1, qV2)/units;
1094 }
MINT::const_counted_ptr< AssociatedDecayTree > V1
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
Definition: SpinFactor.h:30
MINT::NamedParameter< int > _useZemachTensors
Definition: SpinFactor.h:31
TLorentzVector p(int i, IDalitzEvent &evt)
Definition: SpinFactor.cpp:11
virtual bool parseTree(const DalitzEventPattern &pat)
virtual const DalitzEventPattern & eventPattern() const =0
double mRes(const AssociatedDecayTreeItem &adt, IDalitzEvent &evt)
Definition: SpinFactor.cpp:53
static const double GeV
Definition: ZTspin1.h:9
double LeviCivita(const TLorentzVector &p0, const TLorentzVector &p1, const TLorentzVector &p2, const TLorentzVector &p3)
Definition: LeviCivita.h:12
MINT::const_counted_ptr< AssociatedDecayTree > V2

◆ name()

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

Implements SpinFactor.

Definition at line 405 of file SpinFactors4Body_ScalarsAndVectors.h.

405  {
406  return "SpinFactor4:SF_DtoV1P0_V1toV2P1_V2toP2P3("
407  + theDecay().oneLiner() + ")";
408  }
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375

◆ parseTree()

bool SF_DtoV1P0_V1toV2P1_V2toP2P3::parseTree ( const DalitzEventPattern pat)
protectedvirtual

Definition at line 1023 of file SpinFactors4Body_ScalarsAndVectors.cpp.

1023  {
1024  // bool debugThis=false;
1025  if(fsPS.size() < 4) fsPS.reserve(4);
1026  for(int i=0; i< theDecay(pat).nDgtr(); i++){
1028  if (dgtr->getVal().SVPAT() == "P" && dgtr->isFinalState()) fsPS[0] = dgtr;
1029  else if(dgtr->getVal().SVPAT() == "V" && ! dgtr->isFinalState()) V1 = dgtr;
1030  }
1031  if(0==V1 || 0==fsPS[0]){
1032  cout << "ERROR in SF_DtoV1P0_V1toV2P1_V2toP2P3::parseTree"
1033  << " Didn't find V1 or P0 " << V1.get() << ", " << fsPS[0].get() << endl;
1034  return false;
1035  }
1036 
1037  for(int i=0; i< V1->nDgtr(); i++){
1038  const_counted_ptr<AssociatedDecayTree> dgtr= V1->getDgtrTreePtr(i);
1039  if (dgtr->getVal().SVPAT() == "V" && ! dgtr->isFinalState()) V2 = dgtr;
1040  else if(dgtr->getVal().SVPAT() == "P" && dgtr->isFinalState()) fsPS[1] = dgtr;
1041  }
1042  if(0==V2 || 0==fsPS[1]){
1043  cout << "ERROR in SF_DtoV1P0_V1toV2P1_V2toP2P3::parseTree"
1044  << " Didn't find V2 or P1 " << V2.get() << ", " << fsPS[1].get() << endl;
1045  return false;
1046  }
1047 
1048  if(V2->nDgtr() != 2){
1049  cout << "ERROR in SF_DtoV1P0_V1toV2P1_V2toP2P3::parseTree"
1050  << " V should have 2 daughters, but it says it has "
1051  << V2->nDgtr() << "."
1052  << endl;
1053  return false;
1054  }
1055  fsPS[2] = V2->getDgtrTreePtr(0);
1056  fsPS[3] = V2->getDgtrTreePtr(1);
1057  // normalOrder(fsPS[2], fsPS[3]);
1058 
1059  // this->printYourself();
1060  return true;
1061 }
MINT::const_counted_ptr< AssociatedDecayTree > V1
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 > V2

◆ printYourself()

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

Implements SpinFactor.

Definition at line 1096 of file SpinFactors4Body_ScalarsAndVectors.cpp.

1096  {
1097  // bool debugThis = false;
1098  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) return;
1099  os << "spin factor SF_DtoV1P0_V1toV2P1_V2toP2P3"
1100  << "\n\t return: LeviCivita(pV1, qV1, pP1, qV2)/ / GeV^4"
1101  << "\n\t with pV1 = p(1) + p(2) + p(3), pP1 = p(0)"
1102  << "\n\t and qV1 = (p(2) + p(3)) - p(1), qV2 = p(2) - p(3)"
1103  << "\n\t parsed tree " << theDecay().oneLiner()
1104  << "\n like this:" << endl;
1105  this->printParsing(os);
1106 }
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_DtoV1P0_V1toV2P1_V2toP2P3::_exampleDecay =0
staticprotected

Definition at line 387 of file SpinFactors4Body_ScalarsAndVectors.h.

◆ V1

MINT::const_counted_ptr<AssociatedDecayTree> SF_DtoV1P0_V1toV2P1_V2toP2P3::V1
protected

Definition at line 388 of file SpinFactors4Body_ScalarsAndVectors.h.

◆ V2

MINT::const_counted_ptr<AssociatedDecayTree> SF_DtoV1P0_V1toV2P1_V2toP2P3::V2
protected

Definition at line 388 of file SpinFactors4Body_ScalarsAndVectors.h.


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