54#define Debug_RooNonCPEigenDecay 1
77 _acp (
"acp",
"acp", this, acp ),
78 _avgC (
"C",
"C", this, C ),
79 _delC (
"delC",
"delC", this, delC ),
80 _avgS (
"S",
"S", this, S ),
81 _delS (
"delS",
"delS", this, delS ),
82 _avgW (
"avgW",
"Average mistag rate",this, avgW ),
83 _delW (
"delW",
"Shift mistag rate", this, delW ),
84 _t (
"t",
"time", this, t ),
85 _tau (
"tau",
"decay time", this, tau ),
86 _dm (
"dm",
"mixing frequency", this, dm ),
87 _tag (
"tag",
"CP state", this, tag ),
88 _rhoQ (
"rhoQ",
"Charge of the rho", this, rhoQ ),
89 _correctQ (
"correctQ",
"correction of rhoQ", this, correctQ ),
90 _wQ (
"wQ",
"mischarge", this, wQ ),
134 _acp (
"acp",
"acp", this, acp ),
135 _avgC (
"C",
"C", this, C ),
136 _delC (
"delC",
"delC", this, delC ),
137 _avgS (
"S",
"S", this, S ),
138 _delS (
"delS",
"delS", this, delS ),
139 _avgW (
"avgW",
"Average mistag rate",this, avgW ),
140 _delW (
"delW",
"Shift mistag rate", this, delW ),
141 _t (
"t",
"time", this, t ),
142 _tau (
"tau",
"decay time", this, tau ),
143 _dm (
"dm",
"mixing frequency", this, dm ),
144 _tag (
"tag",
"CP state", this, tag ),
145 _rhoQ (
"rhoQ",
"Charge of the rho", this, rhoQ ),
146 _correctQ (
"correctQ",
"correction of rhoQ", this, correctQ ),
147 _wQ (
"wQ",
"mischarge", this, std::make_unique<
RooRealVar>(
"wQ",
"wQ", 0 ), true, false),
183 _t (
"t", this, other.
_t ),
185 _dm (
"dm", this, other.
_dm ),
189 _wQ (
"wQ", this, other.
_wQ ),
209 assert( rhoQc == 1 || rhoQc == -1 );
217 if (rhoQc == -1 || rhoQc == +1) {
230 }
else if (rhoQc == +1) {
235 return -
_tag * ((a_sin_p + a_sin_m) / 2) * (1 - 2 *
_avgW);
245 }
else if (rhoQc == +1) {
250 return _tag * ((a_cos_p + a_cos_m) / 2) * (1 - 2 *
_avgW);
262 RooArgSet& analVars,
const char* rangeName )
const
264 if (rangeName)
return 0 ;
277 Int_t code,
const char* )
const
329 RooArgSet& generateVars,
bool staticInitOK )
const
336 if (
matchArgs( directVars, generateVars,
_t ))
return 1;
344 if (code == 2 || code == 4) {
356 std::cout <<
" o RooNonCPEigenDecay::initgenerator: genB0Frac : " <<
_genB0Frac
357 <<
", tag dilution: " << (1 - 2 *
_avgW) << std::endl;
361 if (code == 3 || code == 4) {
373 std::cout <<
" o RooNonCPEigenDecay::initgenerator: genRhoPlusFrac: " <<
_genRhoPlusFrac << std::endl;
400 double a1 = 1 + sqrt(std::pow(a_cos_m, 2) + std::pow(a_sin_m, 2));
401 double a2 = 1 + sqrt(std::pow(a_cos_p, 2) + std::pow(a_sin_p, 2));
403 double maxAcceptProb = (1.10 + std::abs(
_acp)) * (a1 > a2 ? a1 : a2);
412 tval = -
_tau*log(rand);
416 tval = +
_tau*log(rand);
420 tval = (rand<=0.5) ? -
_tau*log(2*rand) : +
_tau*log(2*(rand-0.5));
430 double acceptProb = expC + sinC*sin(
_dm*tval) + cosC*cos(
_dm*tval);
433 assert( acceptProb <= maxAcceptProb );
438 if (accept && tval<
_t.max() && tval>
_t.min()) {
#define Debug_RooNonCPEigenDecay
int Int_t
Signed integer 4 bytes (int).
RooAbsAnaConvPdf()
Default constructor, required for persistence.
Int_t declareBasis(const char *expression, const RooArgList ¶ms)
Declare a basis function for use in this physics model.
friend class RooRealIntegral
A space to attach TBranches.
bool matchArgs(const RooArgSet &allDeps, RooArgSet &analDeps, const RooArgProxy &a, const Proxies &... proxies) const
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Int_t getCoefAnalyticalIntegral(Int_t coef, RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Default implementation of function advertising integration capabilities.
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).
Variable that can be changed from the outside.
RooResolutionModel is the base class for PDFs that represent a resolution model that can be convolute...