Page MenuHomeHEPForge

No OneTemporary

diff --git a/inc/LauPolarGammaCPCoeffSet.hh b/inc/LauPolarGammaCPCoeffSet.hh
index 65048ad..fc88a36 100644
--- a/inc/LauPolarGammaCPCoeffSet.hh
+++ b/inc/LauPolarGammaCPCoeffSet.hh
@@ -1,185 +1,234 @@
// Copyright University of Warwick 2006 - 2013.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Authors:
// Thomas Latham
// John Back
// Paul Harrison
/*! \file LauPolarGammaCPCoeffSet.hh
\brief File containing declaration of LauPolarGammaCPCoeffSet class.
*/
/*! \class LauPolarGammaCPCoeffSet
- \brief Class for defining a complex coefficient using a Cartesian nonCP part multiplied by a CP part defined by a magnitude, and strong and weak phases.
+ \brief Class for defining a complex coefficient useful for extracting the CKM angle gamma from B -> D h h Dalitz plots.
Holds a set of real values that define the complex coefficient of an amplitude component.
- The amplitude has the form ( x + i * y ) * ( 1 + r * exp( i * delta +/- gamma ) ).
+ Depending on the type of the D decay, the amplitude has one of the following forms:
+ CP-odd eigenstate: ( x + i * y ) * ( 1 - rB * exp( i * ( deltaB +/- gamma ) ) )
+ CP-even eigenstate: ( x + i * y ) * ( 1 + rB * exp( i * ( deltaB +/- gamma ) ) )
+ ADS favoured state: ( x + i * y ) * ( 1 + rB * rD * exp( i * ( deltaB - deltaD +/- gamma ) ) )
+ ADS suppressed state: ( x + i * y ) * ( rD * exp( - i * deltaD ) + rB * exp( i * ( deltaB +/- gamma ) ) )
[Phys. Rev. D79, 051301 (2009)]
*/
#ifndef LAU_POLARGAMMACP_COEFF_SET
#define LAU_POLARGAMMACP_COEFF_SET
#include <iosfwd>
#include <vector>
#include "Rtypes.h"
#include "LauAbsCoeffSet.hh"
#include "LauComplex.hh"
#include "LauParameter.hh"
class LauPolarGammaCPCoeffSet : public LauAbsCoeffSet {
public:
+ //! The possible D decay modes
+ enum DecayType {
+ GLW_CPOdd, /*!< GLW CP-odd, e.g. D0 -> K0 pi0 */
+ GLW_CPEven, /*!< GLW CP-even, e.g. D0 -> K+ K- */
+ ADS_Favoured, /*!< ADS Favoured, e.g. D0 -> K- pi+ */
+ ADS_Suppressed, /*!< ADS Suppressed, e.g. D0 -> K+ pi- */
+ GLW_CPOdd_btouOnly, /*!< GLW CP-odd, e.g. D0 -> K0 pi0, where B decay only proceeds via b -> u transition */
+ GLW_CPEven_btouOnly, /*!< GLW CP-even, e.g. D0 -> K+ K-, where B decay only proceeds via b -> u transition */
+ ADS_Favoured_btouOnly, /*!< ADS Favoured, e.g. D0 -> K- pi+, where B decay only proceeds via b -> u transition */
+ ADS_Suppressed_btouOnly, /*!< ADS Suppressed, e.g. D0 -> K+ pi-, where B decay only proceeds via b -> u transition */
+ };
+
//! Constructor
/*!
\param [in] compName the name of the coefficient set
- \param [in] x the real nonCP part
- \param [in] y the imaginary nonCP part
- \param [in] r the magnitude of the CP term
- \param [in] delta the CP-conserving phase
- \param [in] gamma the CP-violating phase
+ \param [in] decayType the type of the D decay
+ \param [in] x the real part of the b -> c amplitude
+ \param [in] y the imaginary part of the b -> c amplitude
+ \param [in] rB the magnitude of the ratio of the b -> u and b -> c amplitudes
+ \param [in] deltaB the relative CP-conserving (strong) phase of the b -> u and b -> c amplitudes
+ \param [in] gamma the relative CP-violating (weak) phase of the b -> u and b -> c amplitudes
+ \param [in] rD the magnitude of the ratio of the favoured and suppressed D-decay amplitudes
+ \param [in] deltaD the relative strong phase of the favoured and suppressed D-decay amplitudes
\param [in] xFixed whether x is fixed
\param [in] yFixed whether y is fixed
- \param [in] rFixed whether r is fixed
- \param [in] deltaFixed whether delta is fixed
+ \param [in] rBFixed whether rB is fixed
+ \param [in] deltaBFixed whether deltaB is fixed
\param [in] gammaFixed whether gamma is fixed
- \param [in] rSecondStage whether r should be floated only in the second stage of the fit
- \param [in] deltaSecondStage whether delta should be floated only in the second stage of the fit
+ \param [in] rDFixed whether rD is fixed
+ \param [in] deltaDFixed whether deltaD is fixed
+ \param [in] rBSecondStage whether rB should be floated only in the second stage of the fit
+ \param [in] deltaBSecondStage whether deltaB should be floated only in the second stage of the fit
\param [in] gammaSecondStage whether gamma should be floated only in the second stage of the fit
+ \param [in] rDSecondStage whether rD should be floated only in the second stage of the fit
+ \param [in] deltaDSecondStage whether deltaD should be floated only in the second stage of the fit
\param [in] useGlobalGamma whether gamma should be shared with other resonances
*/
- LauPolarGammaCPCoeffSet(const TString& compName, const Double_t x, const Double_t y, const Double_t r, const Double_t delta, const Double_t gamma,
- const Bool_t xFixed, const Bool_t yFixed, const Bool_t rFixed, const Bool_t deltaFixed, const Bool_t gammaFixed,
- const Bool_t rSecondStage = kFALSE, const Bool_t deltaSecondStage = kFALSE, const Bool_t gammaSecondStage = kFALSE, const Bool_t useGlobalGamma = kFALSE);
+ LauPolarGammaCPCoeffSet(const TString& compName, const DecayType decayType,
+ const Double_t x, const Double_t y,
+ const Double_t rB, const Double_t deltaB, const Double_t gamma,
+ const Double_t rD, const Double_t deltaD,
+ const Bool_t xFixed, const Bool_t yFixed,
+ const Bool_t rBFixed, const Bool_t deltaBFixed, const Bool_t gammaFixed,
+ const Bool_t rDFixed, const Bool_t deltaDFixed,
+ const Bool_t rBSecondStage = kFALSE, const Bool_t deltaBSecondStage = kFALSE, const Bool_t gammaSecondStage = kFALSE,
+ const Bool_t rDSecondStage = kFALSE, const Bool_t deltaDSecondStage = kFALSE,
+ const Bool_t useGlobalGamma = kFALSE);
//! Destructor
virtual ~LauPolarGammaCPCoeffSet(){}
//! Retrieve the parameters of the coefficient, e.g. so that they can be loaded into a fit
/*!
\return the parameters of the coefficient
*/
virtual std::vector<LauParameter*> getParameters();
//! Print the current values of the parameters
virtual void printParValues() const;
//! Print the column headings for a results table
/*!
\param [out] stream the stream to print to
*/
virtual void printTableHeading(std::ostream& stream) const;
//! Print the parameters of the complex coefficient as a row in the results table
/*!
\param [out] stream the stream to print to
*/
virtual void printTableRow(std::ostream& stream) const;
//! Randomise the starting values of the parameters for a fit
virtual void randomiseInitValues();
//! Make sure values are in "standard" ranges, e.g. phases should be between -pi and pi
virtual void finaliseValues();
//! Retrieve the complex coefficient for a particle
/*!
\return the complex coefficient for a particle
*/
virtual const LauComplex& particleCoeff();
//! Retrieve the complex coefficient for an antiparticle
/*!
\return the complex coefficient for an antiparticle
*/
virtual const LauComplex& antiparticleCoeff();
//! Set the parameters based on the complex coefficients for particles and antiparticles
/*!
- This method is not supported by this class because there are more than four parameters so there is not a unique solution.
+ This method is not supported by this class because there are more than four parameters, hence there is not a unique solution.
+
\param [in] coeff the complex coefficient for a particle
\param [in] coeffBar the complex coefficient for an antiparticle
\param [in] init whether or not the initial and generated values should also be adjusted
*/
virtual void setCoeffValues( const LauComplex& coeff, const LauComplex& coeffBar, Bool_t init );
//! Calculate the CP asymmetry
/*!
\return the CP asymmetry
*/
virtual LauParameter acp();
//! Create a clone of the coefficient set
/*!
\param [in] newName the clone's name
\param [in] cloneOption special option for the cloning operation
\param [in] constFactor a constant factor to multiply the clone's parameters by
\return a clone of the coefficient set
*/
virtual LauAbsCoeffSet* createClone(const TString& newName, CloneOption cloneOption = All, Double_t constFactor = 1.0);
private:
//! Copy constructor
/*!
This creates cloned parameters, not copies.
\param [in] rhs the coefficient to clone
\param [in] cloneOption special option for the cloning operation
\param [in] constFactor a constant factor to multiply the clone's parameters by
*/
LauPolarGammaCPCoeffSet(const LauPolarGammaCPCoeffSet& rhs, CloneOption cloneOption = All, Double_t constFactor = 1.0);
//! Copy assignment operator (not implemented)
/*!
\param [in] rhs the coefficient to clone
*/
LauPolarGammaCPCoeffSet& operator=(const LauPolarGammaCPCoeffSet& rhs);
//! Prepend the base name and index to the name of a parameter
/*!
\param [out] par pointer to the parameter
*/
virtual void adjustName(LauParameter* par);
+ //! Update the amplitudes based on the new values of the parameters
+ void updateAmplitudes();
+
+ //! The type of the D decay
+ const DecayType decayType_;
+
// the actual fit parameters
// (need to be pointers so they can be cloned)
- //! The nonCP real part
+
+ //! The real part of the b -> c amplitude
LauParameter* x_;
- //! The nonCP imaginary part
+
+ //! The imaginary part of the b -> c amplitude
LauParameter* y_;
- //! The magnitude of the CP term
- LauParameter* r_;
- //! The CP-conserving phase
- LauParameter* delta_;
- //! The CP-violating phase
+
+ //! the magnitude of the ratio of the b -> u and b -> c amplitudes
+ LauParameter* rB_;
+
+ //! the relative CP-conserving (strong) phase of the b -> u and b -> c amplitudes
+ LauParameter* deltaB_;
+
+ //! the relative CP-violating (weak) phase of the b -> u and b -> c amplitudes
LauParameter* gamma_;
+
+ //! the magnitude of the ratio of the favoured and suppressed D-decay amplitudes
+ LauParameter* rD_;
+
+ //! the relative strong phase of the favoured and suppressed D-decay amplitudes
+ LauParameter* deltaD_;
+
//! The CP-violating phase (shared by multiple resonances)
static LauParameter* gammaGlobal_;
//! Whether the global gamma is used for this resonance
const Bool_t useGlobalGamma_;
- //! The nonCP part of the complex coefficient
+ //! The b -> c part of the complex coefficient
LauComplex nonCPPart_;
- //! The CP part of the complex coefficient for the particle
+ //! The b -> u part of the complex coefficient for the particle
LauComplex cpPart_;
- //! The CP part of the complex coefficient for the antiparticle
+ //! The b -> u part of the complex coefficient for the antiparticle
LauComplex cpAntiPart_;
//! The particle complex coefficient
LauComplex particleCoeff_;
//! The antiparticle complex coefficient
LauComplex antiparticleCoeff_;
//! The CP asymmetry
LauParameter acp_;
ClassDef(LauPolarGammaCPCoeffSet, 0)
};
#endif
diff --git a/src/LauPolarGammaCPCoeffSet.cc b/src/LauPolarGammaCPCoeffSet.cc
index 64137fc..8aac0b4 100644
--- a/src/LauPolarGammaCPCoeffSet.cc
+++ b/src/LauPolarGammaCPCoeffSet.cc
@@ -1,379 +1,728 @@
// Copyright University of Warwick 2006 - 2013.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Authors:
// Thomas Latham
// John Back
// Paul Harrison
/*! \file LauPolarGammaCPCoeffSet.cc
\brief File containing implementation of LauPolarGammaCPCoeffSet class.
*/
#include <iostream>
#include <fstream>
#include <vector>
#include "TMath.h"
#include "TRandom.h"
#include "LauPolarGammaCPCoeffSet.hh"
#include "LauComplex.hh"
#include "LauConstants.hh"
#include "LauParameter.hh"
#include "LauPrint.hh"
#include "LauRandom.hh"
LauParameter* LauPolarGammaCPCoeffSet::gammaGlobal_ = 0;
ClassImp(LauPolarGammaCPCoeffSet)
-LauPolarGammaCPCoeffSet::LauPolarGammaCPCoeffSet(const TString& compName, const Double_t x, const Double_t y, const Double_t r, const Double_t delta, const Double_t gamma,
- const Bool_t xFixed, const Bool_t yFixed, const Bool_t rFixed, const Bool_t deltaFixed, const Bool_t gammaFixed,
- const Bool_t rSecondStage, const Bool_t deltaSecondStage, const Bool_t gammaSecondStage, const Bool_t useGlobalGamma) :
+LauPolarGammaCPCoeffSet::LauPolarGammaCPCoeffSet(const TString& compName, const DecayType decayType,
+ const Double_t x, const Double_t y,
+ const Double_t rB, const Double_t deltaB, const Double_t gamma,
+ const Double_t rD, const Double_t deltaD,
+ const Bool_t xFixed, const Bool_t yFixed,
+ const Bool_t rBFixed, const Bool_t deltaBFixed, const Bool_t gammaFixed,
+ const Bool_t rDFixed, const Bool_t deltaDFixed,
+ const Bool_t rBSecondStage, const Bool_t deltaBSecondStage, const Bool_t gammaSecondStage,
+ const Bool_t rDSecondStage, const Bool_t deltaDSecondStage,
+ const Bool_t useGlobalGamma) :
LauAbsCoeffSet(compName),
- x_(new LauParameter("X", x, minRealImagPart_, maxRealImagPart_, xFixed)),
- y_(new LauParameter("Y", y, minRealImagPart_, maxRealImagPart_, yFixed)),
- r_(new LauParameter("r", r, minMagnitude_, maxMagnitude_, rFixed)),
- delta_(new LauParameter("delta", delta, minPhase_, maxPhase_, deltaFixed)),
- gamma_(useGlobalGamma?0:(new LauParameter("gamma", gamma, minPhase_, maxPhase_, gammaFixed))),
+ decayType_(decayType),
+ x_(0),
+ y_(0),
+ rB_(0),
+ deltaB_(0),
+ gamma_(0),
+ rD_(0),
+ deltaD_(0),
useGlobalGamma_(useGlobalGamma),
- nonCPPart_( x, y),
- cpPart_( 1+ r*TMath::Cos(delta+gamma), TMath::Sin(delta+gamma)),
- cpAntiPart_( 1+ r*TMath::Cos(delta-gamma), TMath::Sin(delta-gamma)),
- particleCoeff_( nonCPPart_ * cpPart_ ),
- antiparticleCoeff_( nonCPPart_ * cpAntiPart_ ),
- acp_("ACP", (antiparticleCoeff_.abs2()-particleCoeff_.abs2())/(antiparticleCoeff_.abs2()+particleCoeff_.abs2()), -1.0, 1.0, rFixed&&deltaFixed&&gammaFixed)
+ nonCPPart_(x,y),
+ cpPart_(0.0,0.0),
+ cpAntiPart_(0.0,0.0),
+ particleCoeff_(0.0,0.0),
+ antiparticleCoeff_(0.0,0.0),
+ acp_("ACP", 0.0, -1.0, 1.0)
{
- if (rSecondStage && !rFixed) {
- r_->secondStage(kTRUE);
- r_->initValue(0.0);
- }
- if (deltaSecondStage && !deltaFixed) {
- delta_->secondStage(kTRUE);
- delta_->initValue(0.0);
+ // All of the possible D decay types need these two parameters
+ x_ = new LauParameter("X", x, minRealImagPart_, maxRealImagPart_, xFixed);
+ y_ = new LauParameter("Y", y, minRealImagPart_, maxRealImagPart_, yFixed);
+
+ // if we're using a global gamma, create it if it doesn't already exist then set gamma_ to point to it
+ // otherwise create our individual copy of gamma
+ if (useGlobalGamma_) {
+ if (!gammaGlobal_) {
+ gammaGlobal_ = new LauParameter("gamma", gamma, minPhase_, maxPhase_, gammaFixed);
+ gamma_ = gammaGlobal_;
+ } else {
+ gamma_ = gammaGlobal_->createClone();
+ }
+ } else {
+ gamma_ = new LauParameter("gamma", gamma, minPhase_, maxPhase_, gammaFixed);
}
- if (!useGlobalGamma_ && gammaSecondStage && !gammaFixed) {
+ if (gammaSecondStage && !gammaFixed) {
gamma_->secondStage(kTRUE);
gamma_->initValue(0.0);
}
- //if we're using a global gamma, create it if it doesn't already exist then set gamma_ to point to it
- if(useGlobalGamma_) {
- if(!gammaGlobal_) {
- gammaGlobal_ = new LauParameter("gamma", gamma, minPhase_, maxPhase_, gammaFixed);
- gamma_ = gammaGlobal_;
- if(gammaSecondStage && !gammaFixed) {
- gamma_->secondStage(kTRUE);
- gamma_->initValue(0.0);
- }
- } else {
- gamma_ = gammaGlobal_->createClone();
+ // which of the other parameter we need depends on the D-decay type
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == GLW_CPOdd || decayType_ == GLW_CPEven ) {
+ rB_ = new LauParameter("rB", rB, minMagnitude_, maxMagnitude_, rBFixed);
+ deltaB_ = new LauParameter("deltaB", deltaB, minPhase_, maxPhase_, deltaBFixed);
+ if (rBSecondStage && !rBFixed) {
+ rB_->secondStage(kTRUE);
+ rB_->initValue(0.0);
+ }
+ if (deltaBSecondStage && !deltaBFixed) {
+ deltaB_->secondStage(kTRUE);
+ deltaB_->initValue(0.0);
+ }
+ }
+
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == ADS_Favoured_btouOnly ) {
+ rD_ = new LauParameter("rD", rD, minMagnitude_, maxMagnitude_, rDFixed);
+ deltaD_ = new LauParameter("deltaD", deltaD, minPhase_, maxPhase_, deltaDFixed);
+ if (rDSecondStage && !rDFixed) {
+ rD_->secondStage(kTRUE);
+ rD_->initValue(0.0);
+ }
+ if (deltaDSecondStage && !deltaDFixed) {
+ deltaD_->secondStage(kTRUE);
+ deltaD_->initValue(0.0);
}
}
}
LauPolarGammaCPCoeffSet::LauPolarGammaCPCoeffSet(const LauPolarGammaCPCoeffSet& rhs, CloneOption cloneOption, Double_t constFactor) : LauAbsCoeffSet(rhs.name()),
+ decayType_( rhs.decayType_ ),
x_(0),
y_(0),
- r_(0),
- delta_(0),
+ rB_(0),
+ deltaB_(0),
gamma_(0),
+ rD_(0),
+ deltaD_(0),
useGlobalGamma_( rhs.useGlobalGamma_ ),
nonCPPart_( rhs.nonCPPart_ ),
cpPart_( rhs.cpPart_ ),
cpAntiPart_( rhs.cpAntiPart_ ),
particleCoeff_( rhs.particleCoeff_ ),
antiparticleCoeff_( rhs.antiparticleCoeff_ ),
acp_( rhs.acp_ )
{
if ( cloneOption == All || cloneOption == TieRealPart ) {
x_ = rhs.x_->createClone(constFactor);
} else {
x_ = new LauParameter("X", rhs.x_->value(), minRealImagPart_, maxRealImagPart_, rhs.x_->fixed());
if ( rhs.x_->blind() ) {
const LauBlind* blinder = rhs.x_->blinder();
x_->blindParameter( blinder->blindingString(), blinder->blindingWidth() );
}
}
if ( cloneOption == All || cloneOption == TieImagPart ) {
y_ = rhs.y_->createClone(constFactor);
} else {
y_ = new LauParameter("Y", rhs.y_->value(), minRealImagPart_, maxRealImagPart_, rhs.y_->fixed());
if ( rhs.y_->blind() ) {
const LauBlind* blinder = rhs.y_->blinder();
y_->blindParameter( blinder->blindingString(), blinder->blindingWidth() );
}
}
if ( cloneOption == All || cloneOption == TieCPPars ) {
- r_ = rhs.r_->createClone(constFactor);
- delta_ = rhs.delta_->createClone(constFactor);
gamma_ = rhs.gamma_->createClone(constFactor);
- } else {
- r_ = new LauParameter("r", rhs.r_->value(), minMagnitude_, maxMagnitude_, rhs.r_->fixed());
- if ( rhs.r_->blind() ) {
- const LauBlind* blinder = rhs.r_->blinder();
- r_->blindParameter( blinder->blindingString(), blinder->blindingWidth() );
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == GLW_CPOdd || decayType_ == GLW_CPEven ) {
+ rB_ = rhs.rB_->createClone(constFactor);
+ deltaB_ = rhs.deltaB_->createClone(constFactor);
}
- delta_ = new LauParameter("delta", rhs.delta_->value(), minPhase_, maxPhase_, rhs.delta_->fixed());
- if ( rhs.delta_->blind() ) {
- const LauBlind* blinder = rhs.delta_->blinder();
- delta_->blindParameter( blinder->blindingString(), blinder->blindingWidth() );
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == ADS_Favoured_btouOnly ) {
+ rD_ = rhs.rD_->createClone(constFactor);
+ deltaD_ = rhs.deltaD_->createClone(constFactor);
}
+ } else {
if (useGlobalGamma_) {
gamma_ = gammaGlobal_->createClone();
} else {
gamma_ = new LauParameter("gamma", rhs.gamma_->value(), minPhase_, maxPhase_, rhs.gamma_->fixed());
if ( rhs.gamma_->blind() ) {
const LauBlind* blinder = rhs.gamma_->blinder();
gamma_->blindParameter( blinder->blindingString(), blinder->blindingWidth() );
}
+ if ( rhs.gamma_->secondStage() && !rhs.gamma_->fixed() ) {
+ gamma_->secondStage(kTRUE);
+ gamma_->initValue(0.0);
+ }
}
- if ( rhs.delta_->blind() ) {
- const LauBlind* blinder = rhs.delta_->blinder();
- delta_->blindParameter( blinder->blindingString(), blinder->blindingWidth() );
- }
- if ( rhs.r_->secondStage() && !rhs.r_->fixed() ) {
- r_->secondStage(kTRUE);
- r_->initValue(0.0);
- }
- if ( rhs.delta_->secondStage() && !rhs.delta_->fixed() ) {
- delta_->secondStage(kTRUE);
- delta_->initValue(0.0);
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == GLW_CPOdd || decayType_ == GLW_CPEven ) {
+ rB_ = new LauParameter("rB", rhs.rB_->value(), minMagnitude_, maxMagnitude_, rhs.rB_->fixed());
+ if ( rhs.rB_->blind() ) {
+ const LauBlind* blinder = rhs.rB_->blinder();
+ rB_->blindParameter( blinder->blindingString(), blinder->blindingWidth() );
+ }
+ deltaB_ = new LauParameter("deltaB", rhs.deltaB_->value(), minPhase_, maxPhase_, rhs.deltaB_->fixed());
+ if ( rhs.deltaB_->blind() ) {
+ const LauBlind* blinder = rhs.deltaB_->blinder();
+ deltaB_->blindParameter( blinder->blindingString(), blinder->blindingWidth() );
+ }
+ if ( rhs.rB_->secondStage() && !rhs.rB_->fixed() ) {
+ rB_->secondStage(kTRUE);
+ rB_->initValue(0.0);
+ }
+ if ( rhs.deltaB_->secondStage() && !rhs.deltaB_->fixed() ) {
+ deltaB_->secondStage(kTRUE);
+ deltaB_->initValue(0.0);
+ }
}
- if ( !useGlobalGamma_ && rhs.gamma_->secondStage() && !rhs.gamma_->fixed() ) {
- gamma_->secondStage(kTRUE);
- gamma_->initValue(0.0);
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == ADS_Favoured_btouOnly ) {
+ rD_ = new LauParameter("rD", rhs.rD_->value(), minMagnitude_, maxMagnitude_, rhs.rD_->fixed());
+ if ( rhs.rD_->blind() ) {
+ const LauBlind* blinder = rhs.rD_->blinder();
+ rD_->blindParameter( blinder->blindingString(), blinder->blindingWidth() );
+ }
+ deltaD_ = new LauParameter("deltaD", rhs.deltaD_->value(), minPhase_, maxPhase_, rhs.deltaD_->fixed());
+ if ( rhs.deltaD_->blind() ) {
+ const LauBlind* blinder = rhs.deltaD_->blinder();
+ deltaD_->blindParameter( blinder->blindingString(), blinder->blindingWidth() );
+ }
+ if ( rhs.rB_->secondStage() && !rhs.rB_->fixed() ) {
+ rB_->secondStage(kTRUE);
+ rB_->initValue(0.0);
+ }
+ if ( rhs.deltaB_->secondStage() && !rhs.deltaB_->fixed() ) {
+ deltaB_->secondStage(kTRUE);
+ deltaB_->initValue(0.0);
+ }
}
}
}
void LauPolarGammaCPCoeffSet::adjustName(LauParameter* par)
{
- if(!useGlobalGamma_ || par!=gamma_) LauAbsCoeffSet::adjustName(par);
+ if (!useGlobalGamma_ || par!=gamma_) {
+ LauAbsCoeffSet::adjustName(par);
+ }
}
std::vector<LauParameter*> LauPolarGammaCPCoeffSet::getParameters()
{
std::vector<LauParameter*> pars;
pars.push_back(x_);
pars.push_back(y_);
- if(!r_->fixed()) pars.push_back(r_);
- if(!delta_->fixed()) pars.push_back(delta_);
- if(!gamma_->fixed()) pars.push_back(gamma_);
+ if ( !gamma_->fixed() ) {
+ pars.push_back(gamma_);
+ }
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == GLW_CPOdd || decayType_ == GLW_CPEven ) {
+ if ( !rB_->fixed() ) {
+ pars.push_back(rB_);
+ }
+ if ( !deltaB_->fixed() ) {
+ pars.push_back(deltaB_);
+ }
+ }
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == ADS_Favoured_btouOnly ) {
+ if ( !rD_->fixed() ) {
+ pars.push_back(rD_);
+ }
+ if ( !deltaD_->fixed() ) {
+ pars.push_back(deltaD_);
+ }
+ }
return pars;
}
void LauPolarGammaCPCoeffSet::printParValues() const
{
std::cout<<"INFO in LauPolarGammaCPCoeffSet::printParValues : Component \""<<this->name()<<"\" has ";
std::cout<<"x = "<<x_->value()<<",\t";
std::cout<<"y = "<<y_->value()<<",\t";
- std::cout<<"r = "<<r_->value()<<",\t";
- std::cout<<"delta = "<<delta_->value()<<",\t";
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == GLW_CPOdd || decayType_ == GLW_CPEven ) {
+ std::cout<<"rB = "<<rB_->value()<<",\t";
+ std::cout<<"deltaB = "<<deltaB_->value()<<",\t";
+ }
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == ADS_Favoured_btouOnly ) {
+ std::cout<<"rD = "<<rD_->value()<<",\t";
+ std::cout<<"deltaD = "<<deltaD_->value()<<",\t";
+ }
std::cout<<"gamma = "<<gamma_->value()<<"."<<std::endl;
}
void LauPolarGammaCPCoeffSet::printTableHeading(std::ostream& stream) const
{
- stream<<"\\begin{tabular}{|l|c|c|c|c|c|}"<<std::endl;
- stream<<"\\hline"<<std::endl;
- stream<<"Component & Real Part & Imaginary Part & r & $\\delta$ & $\\gamma$ \\\\"<<std::endl;
+ switch ( decayType_ ) {
+ case GLW_CPOdd :
+ stream<<"\\begin{tabular}{|l|c|c|c|c|c|}"<<std::endl;
+ stream<<"\\hline"<<std::endl;
+ stream<<"Component & Real Part & Imaginary Part & $r_B$ & $\\delta_B$ & $\\gamma$ \\\\"<<std::endl;
+ break;
+ case GLW_CPEven :
+ stream<<"\\begin{tabular}{|l|c|c|c|c|c|}"<<std::endl;
+ stream<<"\\hline"<<std::endl;
+ stream<<"Component & Real Part & Imaginary Part & $r_B$ & $\\delta_B$ & $\\gamma$ \\\\"<<std::endl;
+ break;
+ case ADS_Favoured :
+ stream<<"\\begin{tabular}{|l|c|c|c|c|c|c|c|}"<<std::endl;
+ stream<<"\\hline"<<std::endl;
+ stream<<"Component & Real Part & Imaginary Part & $r_B$ & $\\delta_B$ & $r_D$ & $\\delta_D$ & $\\gamma$ \\\\"<<std::endl;
+ break;
+ case ADS_Suppressed :
+ stream<<"\\begin{tabular}{|l|c|c|c|c|c|c|c|}"<<std::endl;
+ stream<<"\\hline"<<std::endl;
+ stream<<"Component & Real Part & Imaginary Part & $r_B$ & $\\delta_B$ & $r_D$ & $\\delta_D$ & $\\gamma$ \\\\"<<std::endl;
+ break;
+ case GLW_CPOdd_btouOnly :
+ stream<<"\\begin{tabular}{|l|c|c|c|}"<<std::endl;
+ stream<<"\\hline"<<std::endl;
+ stream<<"Component & Real Part & Imaginary Part & $\\gamma$ \\\\"<<std::endl;
+ break;
+ case GLW_CPEven_btouOnly :
+ stream<<"\\begin{tabular}{|l|c|c|c|}"<<std::endl;
+ stream<<"\\hline"<<std::endl;
+ stream<<"Component & Real Part & Imaginary Part & $\\gamma$ \\\\"<<std::endl;
+ break;
+ case ADS_Favoured_btouOnly :
+ stream<<"\\begin{tabular}{|l|c|c|c|c|c|}"<<std::endl;
+ stream<<"\\hline"<<std::endl;
+ stream<<"Component & Real Part & Imaginary Part & $r_D$ & $\\delta_D$ & $\\gamma$ \\\\"<<std::endl;
+ break;
+ case ADS_Suppressed_btouOnly :
+ stream<<"\\begin{tabular}{|l|c|c|c|}"<<std::endl;
+ stream<<"\\hline"<<std::endl;
+ stream<<"Component & Real Part & Imaginary Part & $\\gamma$ \\\\"<<std::endl;
+ break;
+ }
stream<<"\\hline"<<std::endl;
}
void LauPolarGammaCPCoeffSet::printTableRow(std::ostream& stream) const
{
LauPrint print;
TString resName = this->name();
resName = resName.ReplaceAll("_", "\\_");
stream<<resName<<" & $";
print.printFormat(stream, x_->value());
stream<<" \\pm ";
print.printFormat(stream, x_->error());
stream<<"$ & $";
print.printFormat(stream, y_->value());
stream<<" \\pm ";
print.printFormat(stream, y_->error());
stream<<"$ & $";
- print.printFormat(stream, r_->value());
- stream<<" \\pm ";
- print.printFormat(stream, r_->error());
- stream<<"$ & $";
- print.printFormat(stream, delta_->value());
- stream<<" \\pm ";
- print.printFormat(stream, delta_->error());
- stream<<"$ & $";
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == GLW_CPOdd || decayType_ == GLW_CPEven ) {
+ print.printFormat(stream, rB_->value());
+ stream<<" \\pm ";
+ print.printFormat(stream, rB_->error());
+ stream<<"$ & $";
+ print.printFormat(stream, deltaB_->value());
+ stream<<" \\pm ";
+ print.printFormat(stream, deltaB_->error());
+ stream<<"$ & $";
+ }
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == ADS_Favoured_btouOnly ) {
+ print.printFormat(stream, rD_->value());
+ stream<<" \\pm ";
+ print.printFormat(stream, rD_->error());
+ stream<<"$ & $";
+ print.printFormat(stream, deltaD_->value());
+ stream<<" \\pm ";
+ print.printFormat(stream, deltaD_->error());
+ stream<<"$ & $";
+ }
print.printFormat(stream, gamma_->value());
stream<<" \\pm ";
print.printFormat(stream, gamma_->error());
stream<<"$ \\\\"<<std::endl;
}
void LauPolarGammaCPCoeffSet::randomiseInitValues()
{
if (x_->fixed() == kFALSE) {
// Choose a value for "X" between -3.0 and 3.0
Double_t value = LauRandom::zeroSeedRandom()->Rndm()*6.0 - 3.0;
x_->initValue(value); x_->value(value);
}
if (y_->fixed() == kFALSE) {
// Choose a value for "Y" between -3.0 and 3.0
Double_t value = LauRandom::zeroSeedRandom()->Rndm()*6.0 - 3.0;
y_->initValue(value); y_->value(value);
}
- if (r_->fixed() == kFALSE && r_->secondStage() == kFALSE) {
- // Choose a value for "r" between 0.0 and 2.0
- Double_t value = LauRandom::zeroSeedRandom()->Rndm()*2.0;
- r_->initValue(value); r_->value(value);
- }
- if (delta_->fixed() == kFALSE && delta_->secondStage() == kFALSE) {
- // Choose a value for "delta" between +- pi
- Double_t value = LauRandom::zeroSeedRandom()->Rndm()*LauConstants::twoPi - LauConstants::pi;
- delta_->initValue(value); delta_->value(value);
- }
if (gamma_->fixed() == kFALSE && gamma_->secondStage() == kFALSE) {
// Choose a value for "gamma" between +-pi
Double_t value = LauRandom::zeroSeedRandom()->Rndm()*LauConstants::twoPi - LauConstants::pi;
gamma_->initValue(value); gamma_->value(value);
}
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == GLW_CPOdd || decayType_ == GLW_CPEven ) {
+ if (rB_->fixed() == kFALSE && rB_->secondStage() == kFALSE) {
+ // Choose a value for "rB" between 0.0 and 2.0
+ Double_t value = LauRandom::zeroSeedRandom()->Rndm()*2.0;
+ rB_->initValue(value); rB_->value(value);
+ }
+ if (deltaB_->fixed() == kFALSE && deltaB_->secondStage() == kFALSE) {
+ // Choose a value for "deltaB" between +- pi
+ Double_t value = LauRandom::zeroSeedRandom()->Rndm()*LauConstants::twoPi - LauConstants::pi;
+ deltaB_->initValue(value); deltaB_->value(value);
+ }
+ }
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == ADS_Favoured_btouOnly ) {
+ if (rD_->fixed() == kFALSE && rD_->secondStage() == kFALSE) {
+ // Choose a value for "rD" between 0.0 and 2.0
+ Double_t value = LauRandom::zeroSeedRandom()->Rndm()*2.0;
+ rD_->initValue(value); rD_->value(value);
+ }
+ if (deltaD_->fixed() == kFALSE && deltaD_->secondStage() == kFALSE) {
+ // Choose a value for "deltaD" between +- pi
+ Double_t value = LauRandom::zeroSeedRandom()->Rndm()*LauConstants::twoPi - LauConstants::pi;
+ deltaD_->initValue(value); deltaD_->value(value);
+ }
+ }
}
void LauPolarGammaCPCoeffSet::finaliseValues()
{
// retrieve the current values from the parameters
- Double_t rVal = r_->value();
- Double_t deltaVal = delta_->value();
- Double_t gammaVal = gamma_->value();
- Double_t genDelta = delta_->genValue();
+ Double_t gammaVal = gamma_->value();
+ Double_t rBVal = 0.0;
+ Double_t deltaBVal = 0.0;
+ Double_t genDeltaB = 0.0;
+ Double_t rDVal = 0.0;
+ Double_t deltaDVal = 0.0;
+ Double_t genDeltaD = 0.0;
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == GLW_CPOdd || decayType_ == GLW_CPEven ) {
+ rBVal = rB_->value();
+ deltaBVal = deltaB_->value();
+ genDeltaB = deltaB_->genValue();
+ }
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == ADS_Favoured_btouOnly ) {
+ rDVal = rD_->value();
+ deltaDVal = deltaD_->value();
+ genDeltaD = deltaD_->genValue();
+ }
+
// Check whether we have a negative magnitude.
// If so make it positive and add pi to the phases.
- if (rVal < 0.0) {
- rVal *= -1.0;
- deltaVal += LauConstants::pi;
+ if (rBVal < 0.0) {
+ rBVal *= -1.0;
+ deltaBVal += LauConstants::pi;
+ }
+ if (rDVal < 0.0) {
+ rDVal *= -1.0;
+ deltaDVal += LauConstants::pi;
}
// Check now whether the phases lie in the right range (-pi to pi).
- Bool_t deltaWithinRange(kFALSE);
+ Bool_t deltaBWithinRange(kFALSE);
+ Bool_t deltaDWithinRange(kFALSE);
Bool_t gammaWithinRange(kFALSE);
- while (deltaWithinRange == kFALSE && gammaWithinRange == kFALSE) {
- if (deltaVal > -LauConstants::pi && deltaVal <= LauConstants::pi) {
- deltaWithinRange = kTRUE;
+ while ( deltaBWithinRange == kFALSE ) {
+ if (deltaBVal > -LauConstants::pi && deltaBVal <= LauConstants::pi) {
+ deltaBWithinRange = kTRUE;
+ } else {
+ // Not within the specified range
+ if (deltaBVal > LauConstants::pi) {
+ deltaBVal -= LauConstants::twoPi;
+ } else if (deltaBVal <= -LauConstants::pi) {
+ deltaBVal += LauConstants::twoPi;
+ }
+ }
+ }
+
+ while ( deltaDWithinRange == kFALSE ) {
+ if (deltaDVal > -LauConstants::pi && deltaDVal <= LauConstants::pi) {
+ deltaDWithinRange = kTRUE;
} else {
// Not within the specified range
- if (deltaVal > LauConstants::pi) {
- deltaVal -= LauConstants::twoPi;
- } else if (deltaVal <= -LauConstants::pi) {
- deltaVal += LauConstants::twoPi;
+ if (deltaDVal > LauConstants::pi) {
+ deltaDVal -= LauConstants::twoPi;
+ } else if (deltaDVal <= -LauConstants::pi) {
+ deltaDVal += LauConstants::twoPi;
}
}
+ }
+ while ( gammaWithinRange == kFALSE ) {
if (gammaVal > -LauConstants::pi && gammaVal <= LauConstants::pi) {
gammaWithinRange = kTRUE;
} else {
// Not within the specified range
if (gammaVal > LauConstants::pi) {
gammaVal -= LauConstants::twoPi;
} else if (gammaVal <= -LauConstants::pi) {
gammaVal += LauConstants::twoPi;
}
}
}
- // To resolve the two-fold ambiguity in gamma and delta we require gamma to be in the range 0-pi
- if(gammaVal < 0) {
- if(deltaVal <= 0) {
- gammaVal += LauConstants::pi;
- deltaVal += LauConstants::pi;
- } else {
- gammaVal += LauConstants::pi;
- deltaVal -= LauConstants::pi;
+ // To resolve the two-fold ambiguity in gamma and deltaB we require gamma to be in the range 0-pi
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == GLW_CPOdd || decayType_ == GLW_CPEven ) {
+ if (gammaVal < 0.0) {
+ if (deltaBVal <= 0.0) {
+ gammaVal += LauConstants::pi;
+ deltaBVal += LauConstants::pi;
+ } else {
+ gammaVal += LauConstants::pi;
+ deltaBVal -= LauConstants::pi;
+ }
}
}
// A further problem can occur when the generated phase is close to -pi or pi.
// The phase can wrap over to the other end of the scale -
// this leads to artificially large pulls so we wrap it back.
- Double_t diff = deltaVal - genDelta;
+ Double_t diff = deltaBVal - genDeltaB;
if (diff > LauConstants::pi) {
- deltaVal -= LauConstants::twoPi;
+ deltaBVal -= LauConstants::twoPi;
} else if (diff < -LauConstants::pi) {
- deltaVal += LauConstants::twoPi;
+ deltaBVal += LauConstants::twoPi;
+ }
+
+ diff = deltaDVal - genDeltaD;
+ if (diff > LauConstants::pi) {
+ deltaDVal -= LauConstants::twoPi;
+ } else if (diff < -LauConstants::pi) {
+ deltaDVal += LauConstants::twoPi;
}
// finally store the new values in the parameters
// and update the pulls
- r_->value(rVal); r_->updatePull();
- delta_->value(deltaVal); delta_->updatePull();
- gamma_->value(gammaVal); gamma_->updatePull();
+ gamma_->value(gammaVal);
+ gamma_->updatePull();
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == GLW_CPOdd || decayType_ == GLW_CPEven ) {
+ rB_->value(rBVal);
+ rB_->updatePull();
+ deltaB_->value(deltaBVal);
+ deltaB_->updatePull();
+ }
+ if ( decayType_ == ADS_Favoured || decayType_ == ADS_Suppressed || decayType_ == ADS_Favoured_btouOnly ) {
+ rD_->value(rDVal);
+ rD_->updatePull();
+ deltaD_->value(deltaDVal);
+ deltaD_->updatePull();
+ }
}
const LauComplex& LauPolarGammaCPCoeffSet::particleCoeff()
{
- nonCPPart_.setRealImagPart( x_->unblindValue(), y_->unblindValue() );
- cpPart_.setRealImagPart( 1.0 + r_->unblindValue()*TMath::Cos(delta_->unblindValue()+gamma_->unblindValue()), r_->unblindValue()*TMath::Sin(delta_->unblindValue()+gamma_->unblindValue()) );
- particleCoeff_ = nonCPPart_ * cpPart_;
+ this->updateAmplitudes();
return particleCoeff_;
}
const LauComplex& LauPolarGammaCPCoeffSet::antiparticleCoeff()
{
+ this->updateAmplitudes();
+ return antiparticleCoeff_;
+}
+
+void LauPolarGammaCPCoeffSet::updateAmplitudes()
+{
nonCPPart_.setRealImagPart( x_->unblindValue(), y_->unblindValue() );
- cpAntiPart_.setRealImagPart( 1.0 + r_->unblindValue()*TMath::Cos(delta_->unblindValue()-gamma_->unblindValue()), r_->unblindValue()*TMath::Sin(delta_->unblindValue()-gamma_->unblindValue()) );
+
+ const Double_t gammaVal = gamma_->unblindValue();
+
+ switch ( decayType_ ) {
+
+ case GLW_CPOdd :
+ {
+ const Double_t rBVal = rB_->unblindValue();
+ const Double_t deltaBVal = deltaB_->unblindValue();
+ cpPart_.setRealImagPart( 1.0 - rBVal*TMath::Cos(deltaBVal + gammaVal), -rBVal*TMath::Sin(deltaBVal + gammaVal) );
+ cpAntiPart_.setRealImagPart( 1.0 - rBVal*TMath::Cos(deltaBVal - gammaVal), -rBVal*TMath::Sin(deltaBVal - gammaVal) );
+ break;
+ }
+
+ case GLW_CPEven :
+ {
+ const Double_t rBVal = rB_->unblindValue();
+ const Double_t deltaBVal = deltaB_->unblindValue();
+ cpPart_.setRealImagPart( 1.0 + rBVal*TMath::Cos(deltaBVal + gammaVal), rBVal*TMath::Sin(deltaBVal + gammaVal) );
+ cpAntiPart_.setRealImagPart( 1.0 + rBVal*TMath::Cos(deltaBVal - gammaVal), rBVal*TMath::Sin(deltaBVal - gammaVal) );
+ break;
+ }
+
+ case ADS_Favoured :
+ {
+ const Double_t rBVal = rB_->unblindValue();
+ const Double_t deltaBVal = deltaB_->unblindValue();
+ const Double_t rDVal = rD_->unblindValue();
+ const Double_t deltaDVal = deltaD_->unblindValue();
+ cpPart_.setRealImagPart( 1.0 + rBVal*rDVal*TMath::Cos(deltaBVal - deltaDVal + gammaVal), rBVal*rDVal*TMath::Sin(deltaBVal - deltaDVal + gammaVal) );
+ cpAntiPart_.setRealImagPart( 1.0 + rBVal*rDVal*TMath::Cos(deltaBVal - deltaDVal - gammaVal), rBVal*rDVal*TMath::Sin(deltaBVal - deltaDVal - gammaVal) );
+ break;
+ }
+
+ case ADS_Suppressed :
+ {
+ const Double_t rBVal = rB_->unblindValue();
+ const Double_t deltaBVal = deltaB_->unblindValue();
+ const Double_t rDVal = rD_->unblindValue();
+ const Double_t deltaDVal = deltaD_->unblindValue();
+ cpPart_.setRealImagPart( rDVal*TMath::Cos(-deltaDVal) + rBVal*TMath::Cos(deltaBVal + gammaVal), rDVal*TMath::Sin(-deltaDVal) + rBVal*TMath::Sin(deltaBVal + gammaVal) );
+ cpAntiPart_.setRealImagPart( rDVal*TMath::Cos(-deltaDVal) + rBVal*TMath::Cos(deltaBVal - gammaVal), rDVal*TMath::Sin(-deltaDVal) + rBVal*TMath::Sin(deltaBVal - gammaVal) );
+ break;
+ }
+
+ case GLW_CPOdd_btouOnly :
+ nonCPPart_.rescale(-1.0);
+ cpPart_.setRealImagPart( 1.0 * TMath::Cos( gammaVal ), 1.0 * TMath::Sin( gammaVal ) );
+ cpAntiPart_.setRealImagPart( 1.0 * TMath::Cos( -gammaVal ), 1.0 * TMath::Sin( -gammaVal ) );
+ break;
+
+ case GLW_CPEven_btouOnly :
+ cpPart_.setRealImagPart( 1.0 * TMath::Cos( gammaVal ), 1.0 * TMath::Sin( gammaVal ) );
+ cpAntiPart_.setRealImagPart( 1.0 * TMath::Cos( -gammaVal ), 1.0 * TMath::Sin( -gammaVal ) );
+ break;
+
+ case ADS_Favoured_btouOnly :
+ {
+ const Double_t rDVal = rD_->unblindValue();
+ const Double_t deltaDVal = deltaD_->unblindValue();
+ cpPart_.setRealImagPart( rDVal * TMath::Cos( -deltaDVal + gammaVal ), rDVal * TMath::Sin( -deltaDVal + gammaVal ) );
+ cpAntiPart_.setRealImagPart( rDVal * TMath::Cos( -deltaDVal - gammaVal ), rDVal * TMath::Sin( -deltaDVal - gammaVal ) );
+ break;
+ }
+
+ case ADS_Suppressed_btouOnly :
+ cpPart_.setRealImagPart( 1.0 * TMath::Cos( gammaVal ), 1.0 * TMath::Sin( gammaVal ) );
+ cpAntiPart_.setRealImagPart( 1.0 * TMath::Cos( -gammaVal ), 1.0 * TMath::Sin( -gammaVal ) );
+ break;
+
+ }
+
+ particleCoeff_ = nonCPPart_ * cpPart_;
antiparticleCoeff_ = nonCPPart_ * cpAntiPart_;
- return antiparticleCoeff_;
}
void LauPolarGammaCPCoeffSet::setCoeffValues( const LauComplex&, const LauComplex&, Bool_t )
{
std::cerr << "ERROR in LauPolarGammaCPCoeffSet::setCoeffValues : Method not supported by this class - too many parameters" << std::endl;
}
LauParameter LauPolarGammaCPCoeffSet::acp()
{
// set the name
TString parName(this->baseName()); parName += "_ACP";
acp_.name(parName);
// work out the ACP value
- const LauComplex nonCPPart( x_->value(), y_->value() );
- const LauComplex cpPart( 1.0 + r_->value()*TMath::Cos(delta_->value()+gamma_->value()), r_->value()*TMath::Sin(delta_->value()+gamma_->value()) );
- const LauComplex cpAntiPart( 1.0 + r_->value()*TMath::Cos(delta_->value()-gamma_->value()), r_->value()*TMath::Sin(delta_->value()-gamma_->value()) );
+ LauComplex nonCPPart( x_->value(), y_->value() );
+ LauComplex cpPart;
+ LauComplex cpAntiPart;
+
+ const Double_t gammaVal = gamma_->value();
+
+ switch ( decayType_ ) {
+
+ case GLW_CPOdd :
+ {
+ const Double_t rBVal = rB_->value();
+ const Double_t deltaBVal = deltaB_->value();
+ cpPart.setRealImagPart( 1.0 - rBVal*TMath::Cos(deltaBVal + gammaVal), -rBVal*TMath::Sin(deltaBVal + gammaVal) );
+ cpAntiPart.setRealImagPart( 1.0 - rBVal*TMath::Cos(deltaBVal - gammaVal), -rBVal*TMath::Sin(deltaBVal - gammaVal) );
+ break;
+ }
+
+ case GLW_CPEven :
+ {
+ const Double_t rBVal = rB_->value();
+ const Double_t deltaBVal = deltaB_->value();
+ cpPart.setRealImagPart( 1.0 + rBVal*TMath::Cos(deltaBVal + gammaVal), rBVal*TMath::Sin(deltaBVal + gammaVal) );
+ cpAntiPart.setRealImagPart( 1.0 + rBVal*TMath::Cos(deltaBVal - gammaVal), rBVal*TMath::Sin(deltaBVal - gammaVal) );
+ break;
+ }
+
+ case ADS_Favoured :
+ {
+ const Double_t rBVal = rB_->value();
+ const Double_t deltaBVal = deltaB_->value();
+ const Double_t rDVal = rD_->value();
+ const Double_t deltaDVal = deltaD_->value();
+ cpPart.setRealImagPart( 1.0 + rBVal*rDVal*TMath::Cos(deltaBVal - deltaDVal + gammaVal), rBVal*rDVal*TMath::Sin(deltaBVal - deltaDVal + gammaVal) );
+ cpAntiPart.setRealImagPart( 1.0 + rBVal*rDVal*TMath::Cos(deltaBVal - deltaDVal - gammaVal), rBVal*rDVal*TMath::Sin(deltaBVal - deltaDVal - gammaVal) );
+ break;
+ }
+
+ case ADS_Suppressed :
+ {
+ const Double_t rBVal = rB_->value();
+ const Double_t deltaBVal = deltaB_->value();
+ const Double_t rDVal = rD_->value();
+ const Double_t deltaDVal = deltaD_->value();
+ cpPart.setRealImagPart( rDVal*TMath::Cos(-deltaDVal) + rBVal*TMath::Cos(deltaBVal + gammaVal), rDVal*TMath::Sin(-deltaDVal) + rBVal*TMath::Sin(deltaBVal + gammaVal) );
+ cpAntiPart.setRealImagPart( rDVal*TMath::Cos(-deltaDVal) + rBVal*TMath::Cos(deltaBVal - gammaVal), rDVal*TMath::Sin(-deltaDVal) + rBVal*TMath::Sin(deltaBVal - gammaVal) );
+ break;
+ }
+
+ case GLW_CPOdd_btouOnly :
+ nonCPPart.rescale(-1.0);
+ cpPart.setRealImagPart( 1.0 * TMath::Cos( gammaVal ), 1.0 * TMath::Sin( gammaVal ) );
+ cpAntiPart.setRealImagPart( 1.0 * TMath::Cos( -gammaVal ), 1.0 * TMath::Sin( -gammaVal ) );
+ break;
+
+ case GLW_CPEven_btouOnly :
+ cpPart.setRealImagPart( 1.0 * TMath::Cos( gammaVal ), 1.0 * TMath::Sin( gammaVal ) );
+ cpAntiPart.setRealImagPart( 1.0 * TMath::Cos( -gammaVal ), 1.0 * TMath::Sin( -gammaVal ) );
+ break;
+
+ case ADS_Favoured_btouOnly :
+ {
+ const Double_t rDVal = rD_->value();
+ const Double_t deltaDVal = deltaD_->value();
+ cpPart.setRealImagPart( rDVal * TMath::Cos( -deltaDVal + gammaVal ), rDVal * TMath::Sin( -deltaDVal + gammaVal ) );
+ cpAntiPart.setRealImagPart( rDVal * TMath::Cos( -deltaDVal - gammaVal ), rDVal * TMath::Sin( -deltaDVal - gammaVal ) );
+ break;
+ }
+
+ case ADS_Suppressed_btouOnly :
+ cpPart.setRealImagPart( 1.0 * TMath::Cos( gammaVal ), 1.0 * TMath::Sin( gammaVal ) );
+ cpAntiPart.setRealImagPart( 1.0 * TMath::Cos( -gammaVal ), 1.0 * TMath::Sin( -gammaVal ) );
+ break;
+
+
+ }
+
const LauComplex partCoeff = nonCPPart * cpPart;
const LauComplex antiCoeff = nonCPPart * cpAntiPart;
const Double_t numer = antiCoeff.abs2() - partCoeff.abs2();
const Double_t denom = antiCoeff.abs2() + partCoeff.abs2();
const Double_t value = numer/denom;
// is it fixed?
- const Bool_t fixed = r_->fixed() && delta_->fixed() && gamma_->fixed();
+ const Bool_t fixed = gamma_->fixed();
acp_.fixed(fixed);
// we can't work out the error without the covariance matrix
const Double_t error(0.0);
// set the value and error
acp_.valueAndErrors(value,error);
return acp_;
}
LauAbsCoeffSet* LauPolarGammaCPCoeffSet::createClone(const TString& newName, CloneOption cloneOption, Double_t constFactor)
{
LauAbsCoeffSet* clone(0);
if ( cloneOption == All || cloneOption == TieRealPart || cloneOption == TieImagPart || cloneOption == TieCPPars ) {
clone = new LauPolarGammaCPCoeffSet( *this, cloneOption, constFactor );
clone->name( newName );
} else {
std::cerr << "ERROR in LauPolarGammaCPCoeffSet::createClone : Invalid clone option" << std::endl;
}
return clone;
}

File Metadata

Mime Type
text/x-diff
Expires
Mon, Jan 20, 9:55 PM (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4232050
Default Alt Text
(44 KB)

Event Timeline