MINT2
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
HadronicParameters::ModelPhaseBinning Class Reference

Class for determining if an event lives in a +ve or -ve bin. More...

#include <HadronicParameters.h>

Inheritance diagram for HadronicParameters::ModelPhaseBinning:
HadronicParameters::PhaseBinningBase HadronicParameters::ModelBinning3Body

Public Member Functions

 ModelPhaseBinning (ModelPtr, ModelPtr, unsigned)
 
virtual ~ModelPhaseBinning ()
 
virtual EventBinInfo binInfo (IDalitzEvent &) const override
 
virtual std::string type () const override
 
virtual void Print (const std::string &, std::ostream &os=std::cout) const override
 
- Public Member Functions inherited from HadronicParameters::PhaseBinningBase
 PhaseBinningBase (unsigned nBins)
 
virtual ~PhaseBinningBase ()
 
int binNumber (IDalitzEvent &) const
 
virtual bool operator== (const PhaseBinningBase &) const
 
bool operator!= (const PhaseBinningBase &) const
 

Static Public Member Functions

static MINT::counted_ptr< PhaseBinningBasefromConfig (const std::string &, const std::string &fname="")
 

Protected Member Functions

virtual bool isFavoured (const double, const double, IDalitzEvent &) const
 

Protected Attributes

ModelPtr m_model
 
ModelPtr m_cpmodel
 

Additional Inherited Members

- Public Attributes inherited from HadronicParameters::PhaseBinningBase
const unsigned nBins
 

Detailed Description

Class for determining if an event lives in a +ve or -ve bin.

Definition at line 50 of file HadronicParameters.h.

Constructor & Destructor Documentation

◆ ModelPhaseBinning()

HadronicParameters::ModelPhaseBinning::ModelPhaseBinning ( HadronicParameters::ModelPtr  model,
HadronicParameters::ModelPtr  cpmodel,
unsigned  nBins 
)

◆ ~ModelPhaseBinning()

virtual HadronicParameters::ModelPhaseBinning::~ModelPhaseBinning ( )
inlinevirtual

Definition at line 53 of file HadronicParameters.h.

53 {} ;

Member Function Documentation

◆ binInfo()

HadronicParameters::EventBinInfo HadronicParameters::ModelPhaseBinning::binInfo ( IDalitzEvent evt) const
overridevirtual

Implements HadronicParameters::PhaseBinningBase.

Definition at line 49 of file HadronicParameters.cpp.

49  {
50  EventBinInfo binNo ;
51  binNo.evt = &evt ;
52  binNo.amp = m_model->ComplexVal(evt) ;
53  binNo.ampBar = m_cpmodel->ComplexVal(evt) ;
54  binNo.F = norm(binNo.amp) ;
55  binNo.Fbar = norm(binNo.ampBar) ;
56  double phasediff = arg(binNo.amp/binNo.ampBar) ;
57  // Invert the phase difference in the suppressed region, effectively using the phase difference
58  // from the favoured CP-conjugate point to determine the bin. This assumes no direct CPV, ie, that
59  // arg(Fminus/Fbarplus) = -arg(Fplus/Fbarminus). Could use the CP-conjugate event to determine
60  // the phase difference if we need to allow for direct CPV.
61  if(!isFavoured(binNo.F, binNo.Fbar, evt))
62  phasediff *= -1 ;
63  if(phasediff < 0.)
64  phasediff += 2. * TMath::Pi() ;
65  binNo.binNumber = (int(phasediff * nBins/2./TMath::Pi() + 0.5) % nBins + 1) ;
66  // Possible issue if F == Fbar ?
67  if(binNo.Fbar > binNo.F)
68  binNo.binNumber *= -1 ;
69  return binNo ;
70 }
virtual std::complex< double > ComplexVal(IDalitzEvent &evt)
Definition: FitAmpSum.h:122
virtual bool isFavoured(const double, const double, IDalitzEvent &) const

◆ fromConfig()

HadronicParameters::BinningPtr HadronicParameters::ModelPhaseBinning::fromConfig ( const std::string &  ,
const std::string &  fname = "" 
)
static

Definition at line 86 of file HadronicParameters.cpp.

87  {
88  string name = _name + "_binning_" ;
89  if(string(NamedParameter<string>(name + "type", fname.c_str())) != "model")
90  return BinningPtr(0) ;
91  NamedParameter<int> nBins(name + "nBins", fname.c_str()) ;
92  NamedParameter<int> pat(name + "eventPattern", fname.c_str()) ;
93  NamedParameter<int> cpPat(name + "cpEventPattern", fname.c_str()) ;
94  ModelPtr model(new FitAmpSum(DalitzEventPattern(pat), fname.c_str())) ;
95  ModelPtr cpModel(new FitAmpSum(DalitzEventPattern(cpPat), fname.c_str())) ;
96  return BinningPtr(new ModelPhaseBinning(model, cpModel, nBins)) ;
97 }
ModelPhaseBinning(ModelPtr, ModelPtr, unsigned)
MINT::counted_ptr< FitAmpSum > ModelPtr
MINT::counted_ptr< PhaseBinningBase > BinningPtr
Pointer to the binning scheme.

◆ isFavoured()

bool HadronicParameters::ModelPhaseBinning::isFavoured ( const double  F,
const double  Fbar,
IDalitzEvent  
) const
protectedvirtual

Reimplemented in HadronicParameters::ModelBinning3Body.

Definition at line 45 of file HadronicParameters.cpp.

45  {
46  return F > Fbar ;
47 }

◆ Print()

void HadronicParameters::ModelPhaseBinning::Print ( const std::string &  _name,
std::ostream &  os = std::cout 
) const
overridevirtual

Implements HadronicParameters::PhaseBinningBase.

Definition at line 72 of file HadronicParameters.cpp.

72  {
73  string name = _name + "_binning_" ;
74  os << name << "type\t" << type() << endl ;
75  os << name << "nBins\t" << nBins << endl ;
76  os << name << "eventPattern" ;
77  for(const auto& ipat : m_model->getAmpPtr(0)->getTreePattern().getVectorOfInts())
78  os << "\t" << ipat ;
79  os << endl ;
80  os << name << "cpEventPattern" ;
81  for(const auto& ipat : m_cpmodel->getAmpPtr(0)->getTreePattern().getVectorOfInts())
82  os << "\t" << ipat ;
83  os << endl ;
84 }
DalitzEventPattern getTreePattern() const
Definition: FitAmplitude.h:169
virtual FitAmplitude * getAmpPtr(unsigned int i)
virtual std::string type() const override
std::vector< int > getVectorOfInts() const

◆ type()

string HadronicParameters::ModelPhaseBinning::type ( ) const
overridevirtual

Implements HadronicParameters::PhaseBinningBase.

Reimplemented in HadronicParameters::ModelBinning3Body.

Definition at line 41 of file HadronicParameters.cpp.

41  {
42  return "model" ;
43 }

Member Data Documentation

◆ m_cpmodel

ModelPtr HadronicParameters::ModelPhaseBinning::m_cpmodel
protected

Definition at line 64 of file HadronicParameters.h.

◆ m_model

ModelPtr HadronicParameters::ModelPhaseBinning::m_model
protected

Definition at line 63 of file HadronicParameters.h.


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