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

#include <SpinFactors4Body_ScalarsAndVectors.h>

Inheritance diagram for SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1:
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_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1 (const AssociatedDecayTree &theDecay)
 
virtual ~SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1 ()
 
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< 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 300 of file SpinFactors4Body_ScalarsAndVectors.h.

Constructor & Destructor Documentation

◆ SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1()

SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1::SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1 ( const AssociatedDecayTree theDecay)
inline

Definition at line 309 of file SpinFactors4Body_ScalarsAndVectors.h.

310  : SpinFactor(theDecay, 4)
311  , V2(0)
312  {
313  }
SpinFactor(const AssociatedDecayTree &decay, int nFinal=3)
Definition: SpinFactor.h:74
MINT::const_counted_ptr< AssociatedDecayTree > V2
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50

◆ ~SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1()

virtual SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1::~SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1 ( )
inlinevirtual

Definition at line 315 of file SpinFactors4Body_ScalarsAndVectors.h.

315 {}

Member Function Documentation

◆ exampleDecay()

const DecayTree & SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1::exampleDecay ( )
virtual

Implements SpinFactor.

Definition at line 755 of file SpinFactors4Body_ScalarsAndVectors.cpp.

755  {
756  return getExampleDecay();
757 }

◆ getExampleDecay()

const DecayTree & SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1::getExampleDecay ( )
static

Definition at line 743 of file SpinFactors4Body_ScalarsAndVectors.cpp.

743  {
744  if(0==_exampleDecay){
745  _exampleDecay = new DecayTree(421);
746  // remark: addDgtr always returns a pointer to the
747  // last daughter that was added, thus allowing these
748  // chains:
749  _exampleDecay->addDgtr(-321, 321);
750  _exampleDecay->addDgtr( 113)->addDgtr( 211, -211);
751  }
752  return *_exampleDecay;
753 }
MINT::counted_ptr< DDTree< ValueType > > addDgtr(const DDTree< ValueType > *treePtr)
Definition: DDTree.h:211
DDTree< DecayTreeItem > DecayTree
Definition: DecayTree.h:35

◆ getVal()

double SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1::getVal ( IDalitzEvent evt)
virtual

Implements SpinFactor.

Definition at line 795 of file SpinFactors4Body_ScalarsAndVectors.cpp.

795  {
796  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.eventPattern());
797 
798  TLorentzVector pV1 = p(0, evt) + p(1, evt);
799  TLorentzVector qV1 = p(0, evt) - p(1, evt);
800  TLorentzVector pV2 = p(2, evt) + p(3, evt);
801  TLorentzVector qV2 = p(2, evt) - p(3, evt);
802 
803  double MV1 = pV1.M();
804  double MV2 = mRes(V2, evt);
805 
806  return (qV1.Dot(qV2)
807  - qV1.Dot(pV1) * pV1.Dot(qV2) / (MV1*MV1)
808  - qV1.Dot(pV2) * pV2.Dot(qV2) / (MV2*MV2)
809  + qV1.Dot(pV1) * pV1.Dot(pV2) * pV2.Dot(qV2)
810  / (MV1*MV1 * MV2*MV2)
811  )
812  /(GeV*GeV)
813  ;
814 
815 }
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
Definition: SpinFactor.h:30
virtual bool parseTree(const DalitzEventPattern &pat)
TLorentzVector p(int i, IDalitzEvent &evt)
Definition: SpinFactor.cpp:11
MINT::const_counted_ptr< AssociatedDecayTree > V2
virtual const DalitzEventPattern & eventPattern() const =0
double mRes(const AssociatedDecayTreeItem &adt, IDalitzEvent &evt)
Definition: SpinFactor.cpp:53
static const double GeV

◆ name()

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

Implements SpinFactor.

Definition at line 320 of file SpinFactors4Body_ScalarsAndVectors.h.

320  {
321  return "SpinFactor4:SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1("
322  + theDecay().oneLiner() + ")";
323  }
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375

◆ parseTree()

bool SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1::parseTree ( const DalitzEventPattern pat)
protectedvirtual

Definition at line 759 of file SpinFactors4Body_ScalarsAndVectors.cpp.

759  {
760  // bool debugThis=false;
761  if(fsPS.size() < 4) fsPS.reserve(4);
762  int P_index=0;
763  for(int i=0; i< theDecay(pat).nDgtr(); i++){
765  if(dgtr->getVal().SVPAT() == "V" && ! dgtr->isFinalState()) V2 = dgtr;
766  else if(dgtr->getVal().SVPAT() == "P" && dgtr->isFinalState()){
767  fsPS[P_index++] = dgtr;
768  }
769  }
770  if(0==V2){
771  cout << "ERROR in SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1::parseTree"
772  << " Didn't find V " << V2.get() << endl;
773  return false;
774  }
775  if(P_index != 2 || 0==(fsPS[0]) || 0==(fsPS[1]) ){
776  cout << "ERROR in SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1::parseTree"
777  << " Didn't find P1, P2 " << endl;
778  return false;
779  }
780  if(V2->nDgtr() != 2){
781  cout << "ERROR in SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1::parseTree"
782  << " V should have 2 daughters, but it says it has "
783  << V2->nDgtr() << "."
784  << endl;
785  return false;
786  }
787  fsPS[2] = V2->getDgtrTreePtr(0);
788  fsPS[3] = V2->getDgtrTreePtr(1);
789  // normalOrder(fsPS[2], fsPS[3]);
790 
791  // this->printYourself();
792  return true;
793 }
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
MINT::const_counted_ptr< AssociatedDecayTree > V2
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
int nDgtr() const
Definition: DDTree.h:96

◆ printYourself()

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

Implements SpinFactor.

Definition at line 816 of file SpinFactors4Body_ScalarsAndVectors.cpp.

816  {
817  // bool debugThis = false;
818  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) return;
819  os << "spin factor SF_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1"
820  << " - I recommend not to use this, use nonRes particles insted "
821  << " anyway, this is what I do:"
822  << "\n\t (qV1.Dot(qV2)"
823  << "\n\t - qV1.Dot(pV1) * pV1.Dot(qV2) / (MV1*MV1)"
824  << "\n\t - qV1.Dot(pV2) * pV2.Dot(qV2) / (MV2*MV2)"
825  << "\n\t + qV1.Dot(pV1) * pV1.Dot(pV2) * pV2.Dot(qV2) "
826  << "\n\t / (MV1*MV1 * MV2*MV2)"
827  << "\n\t )"
828  << "\n\t /(GeV*GeV)"
829  << "\n\t with: pV1 = p(0) + p(1), qV1 = p(0) - p(1), pV2 = p(2) + p(3) qV2 = p(2) - p(3);"
830  << "\n\t parsed tree " << theDecay().oneLiner()
831  << "\n like this:" << endl;
832  this->printParsing(os);
833 }
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_DtoV1V2_V1toP0P1_V1toP2P3_S_nonResV1::_exampleDecay =0
staticprotected

Definition at line 302 of file SpinFactors4Body_ScalarsAndVectors.h.

◆ V2

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

Definition at line 303 of file SpinFactors4Body_ScalarsAndVectors.h.


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