57#define Debug_RooNonCPEigenDecay 1
80 _acp (
"acp",
"acp", this, acp ),
81 _avgC (
"C",
"C", this, C ),
82 _delC (
"delC",
"delC", this, delC ),
83 _avgS (
"S",
"S", this, S ),
84 _delS (
"delS",
"delS", this, delS ),
85 _avgW (
"avgW",
"Average mistag rate",this, avgW ),
86 _delW (
"delW",
"Shift mistag rate", this, delW ),
87 _t (
"t",
"time", this, t ),
88 _tau (
"tau",
"decay time", this, tau ),
89 _dm (
"dm",
"mixing frequency", this, dm ),
90 _tag (
"tag",
"CP state", this, tag ),
91 _rhoQ (
"rhoQ",
"Charge of the rho", this, rhoQ ),
92 _correctQ (
"correctQ",
"correction of rhoQ", this, correctQ ),
93 _wQ (
"wQ",
"mischarge", this, wQ ),
137 _acp (
"acp",
"acp", this, acp ),
138 _avgC (
"C",
"C", this, C ),
139 _delC (
"delC",
"delC", this, delC ),
140 _avgS (
"S",
"S", this, S ),
141 _delS (
"delS",
"delS", this, delS ),
142 _avgW (
"avgW",
"Average mistag rate",this, avgW ),
143 _delW (
"delW",
"Shift mistag rate", this, delW ),
144 _t (
"t",
"time", this, t ),
145 _tau (
"tau",
"decay time", this, tau ),
146 _dm (
"dm",
"mixing frequency", this, dm ),
147 _tag (
"tag",
"CP state", this, tag ),
148 _rhoQ (
"rhoQ",
"Charge of the rho", this, rhoQ ),
149 _correctQ (
"correctQ",
"correction of rhoQ", this, correctQ ),
150 _wQ (
"wQ",
"mischarge", this, *(new
RooRealVar(
"wQ",
"wQ", 0 )), true, false, true ),
152 _genRhoPlusFrac( 0 ),
179 _acp (
"acp", this, other._acp ),
180 _avgC (
"C", this, other._avgC ),
181 _delC (
"delC", this, other._delC ),
182 _avgS (
"S", this, other._avgS ),
183 _delS (
"delS", this, other._delS ),
184 _avgW (
"avgW", this, other._avgW ),
185 _delW (
"delW", this, other._delW ),
186 _t (
"t", this, other._t ),
187 _tau (
"tau", this, other._tau ),
188 _dm (
"dm", this, other._dm ),
189 _tag (
"tag", this, other._tag ),
190 _rhoQ (
"rhoQ", this, other._rhoQ ),
191 _correctQ (
"correctQ", this, other._correctQ ),
192 _wQ (
"wQ", this, other._wQ ),
193 _genB0Frac ( other._genB0Frac ),
194 _genRhoPlusFrac( other._genRhoPlusFrac ),
195 _type ( other._type ),
196 _basisExp ( other._basisExp ),
197 _basisSin ( other._basisSin ),
198 _basisCos ( other._basisCos )
219 assert( rhoQc == 1 || rhoQc == -1 );
227 if (rhoQc == -1 || rhoQc == +1)
239 else if (rhoQc == +1)
244 return -
_tag*((a_sin_p + a_sin_m)/2)*(1 - 2*
_avgW);
253 else if (rhoQc == +1)
258 return _tag*((a_cos_p + a_cos_m)/2)*(1 - 2*
_avgW);
269 RooArgSet& analVars,
const char* rangeName )
const
271 if (rangeName)
return 0 ;
284 Int_t code,
const char* )
const
334 RooArgSet& generateVars,
bool staticInitOK )
const
341 if (
matchArgs( directVars, generateVars,
_t ))
return 1;
349 if (code == 2 || code == 4) {
361 cout <<
" o RooNonCPEigenDecay::initgenerator: genB0Frac : "
363 <<
", tag dilution: " << (1 - 2*
_avgW)
367 if (code == 3 || code == 4) {
379 cout <<
" o RooNonCPEigenDecay::initgenerator: genRhoPlusFrac: "
409 double maxAcceptProb = (1.10 +
TMath::Abs(
_acp)) * (a1 > a2 ? a1 : a2);
418 tval = -
_tau*log(rand);
422 tval = +
_tau*log(rand);
426 tval = (rand<=0.5) ? -
_tau*log(2*rand) : +
_tau*log(2*(rand-0.5));
436 double acceptProb = expC + sinC*sin(
_dm*tval) + cosC*cos(
_dm*tval);
439 assert( acceptProb <= maxAcceptProb );
444 if (accept && tval<
_t.
max() && tval>
_t.
min()) {
#define Debug_RooNonCPEigenDecay
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
RooAbsAnaConvPdf is the base class for PDFs that represent a physics model that can be analytically c...
Int_t declareBasis(const char *expression, const RooArgList ¶ms)
Declare a basis function for use in this physics model.
A space to attach TBranches.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
bool matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Time-dependent RooAbsAnaConvPdf for CP violating decays to Non-CP eigenstates (eg,...
Int_t getCoefAnalyticalIntegral(Int_t coef, RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Default implementation of function advertising integration capabilities.
~RooNonCPEigenDecay(void) override
Destructor.
double coefAnalyticalIntegral(Int_t coef, Int_t code, const char *rangeName=nullptr) const override
correct for the right/wrong charge...
void generateEvent(Int_t code) override
Interface for generation of an event using the algorithm corresponding to the specified code.
double coefficient(Int_t basisIndex) const override
Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, bool staticInitOK=true) const override
Load generatedVars with the subset of directVars that we can generate events for, and return a code t...
void initGenerator(Int_t code) override
Interface for one-time initialization to setup the generator for the specified code.
RooRealProxy _wQ
dummy mischarge (must be set to zero!)
static double uniform(TRandom *generator=randomGenerator())
Return a number uniformly distributed from (0,1)
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
RooRealVar represents a variable that can be changed from the outside.
RooResolutionModel is the base class for PDFs that represent a resolution model that can be convolute...
double max(const char *rname=nullptr) const
Query upper limit of range. This requires the payload to be RooAbsRealLValue or derived.
const T & arg() const
Return reference to object held in proxy.
double min(const char *rname=nullptr) const
Query lower limit of range. This requires the payload to be RooAbsRealLValue or derived.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.