Hydra  4.0.1
A header-only templated C++ framework to perform data analysis on massively parallel platforms.
phsp_unweighting_functor_and_fit.inl File Reference
#include <iostream>
#include <assert.h>
#include <time.h>
#include <vector>
#include <array>
#include <chrono>
#include <tclap/CmdLine.h>
#include <hydra/device/System.h>
#include <hydra/host/System.h>
#include <hydra/Types.h>
#include <hydra/Vector4R.h>
#include <hydra/Decays.h>
#include <hydra/PhaseSpace.h>
#include <hydra/PhaseSpaceIntegrator.h>
#include <hydra/Function.h>
#include <hydra/FunctorArithmetic.h>
#include <hydra/Lambda.h>
#include <hydra/Tuple.h>
#include <hydra/Range.h>
#include <hydra/Random.h>
#include <hydra/LogLikelihoodFCN.h>
#include <hydra/Parameter.h>
#include <hydra/UserParameters.h>
#include <hydra/Pdf.h>
#include <hydra/Distance.h>
#include <hydra/functions/BreitWignerNR.h>
#include <hydra/DenseHistogram.h>
#include <hydra/SparseHistogram.h>
#include "Minuit2/FunctionMinimum.h"
#include "Minuit2/MnUserParameterState.h"
#include "Minuit2/MnPrint.h"
#include "Minuit2/MnMigrad.h"
#include "Minuit2/MnMinimize.h"
#include "Minuit2/MnMinos.h"
#include "Minuit2/MnContours.h"
#include "Minuit2/CombinedMinimizer.h"
#include "Minuit2/MnPlot.h"
#include "Minuit2/MinosError.h"
#include "Minuit2/ContoursError.h"
#include "Minuit2/VariableMetricMinimizer.h"
Include dependency graph for phsp_unweighting_functor_and_fit.inl:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PHSP_UNWEIGHTING_FUNCTOR_AND_FIT_INL_
 

Functions

cmd add (NArg)
 
hydra::Vector4R B0 (B0_mass, 0.0, 0.0, 0.0)
 
 catch (TCLAP::ArgException &e)
 
 declarg (P1, hydra::Vector4R) declarg(P2
 
hydra::Vector4R declarg (P3, hydra::Vector4R) int main(int argv
 
phsp Generate (B0, Events.begin(), Events.end())
 
TCLAP::ValueArg< size_t > NArg ("n", "nevents", "Number of events to generate. Default is [ 10e6 ].", true, 10e6, "unsigned long")
 
cmd parse (argv, argc)
 

Variables

hydra::Vector4R char ** argc
 
double B0_mass = 5.27955
 
auto breit_wigner
 
auto dalitz_calculator
 
std::chrono::duration< double, std::milli > elapsed = end - start
 
auto end = std::chrono::high_resolution_clock::now()
 
double Jpsi_mass = 3.0969
 
double K_mass = 0.493677
 
hydra::Parameter M0
 
auto model
 
 nentries = NArg.getValue()
 
hydra::PhaseSpace< 3 > phsp (B0_mass,{Jpsi_mass, K_mass, pi_mass })
 
double pi_mass = 0.13957061
 
auto start = std::chrono::high_resolution_clock::now()
 
 try
 
hydra::Parameter W0
 

Macro Definition Documentation

◆ PHSP_UNWEIGHTING_FUNCTOR_AND_FIT_INL_

#define PHSP_UNWEIGHTING_FUNCTOR_AND_FIT_INL_

Function Documentation

◆ add()

cmd add ( NArg  )

◆ B0()

hydra::Vector4R B0 ( B0_mass  ,
0.  0,
0.  0,
0.  0 
)

◆ catch()

catch ( TCLAP::ArgException &  e)

◆ declarg() [1/2]

declarg ( P1  ,
hydra::Vector4R   
)

◆ declarg() [2/2]

hydra::Vector4R declarg ( P3  ,
hydra::Vector4R   
)

◆ Generate()

phsp Generate ( B0  ,
Events.  begin(),
Events.  end() 
)

◆ NArg()

TCLAP::ValueArg<size_t> NArg ( "n"  ,
"nevents"  ,
"Number of events to generate. Default is ."  [10e6],
true  ,
10e6  ,
"unsigned long"   
)

◆ parse()

cmd parse ( argv  ,
argc   
)

Variable Documentation

◆ argc

hydra::Vector4R char** argc
Initial value:
{
size_t nentries = 0
nentries
Definition: phsp_unweighting_functor_and_fit.inl:155

◆ B0_mass

double B0_mass = 5.27955
Examples:
phsp_chain.inl.

◆ breit_wigner

auto breit_wigner
Initial value:
[] __hydra_dual__ (unsigned int npar, const hydra::Parameter* params, P1 p1, P2 p2, P3 p3 ){
double mass = params[0];
double width = params[1];
auto m = (p2+p3).mass();
double dmass2 = (m-mass)*(m-mass);
double width2 = width*width;
double denominator = dmass2 + width2/4.0;
return ((width2)/4.0)/denominator;
}, M0, W0 )
hydra::Parameter width
Definition: breit_wigner_plus_chebychev.inl:124
hydra::Parameter M0
Definition: phsp_unweighting_functor_and_fit.inl:214
auto mass
Definition: basic_distributions.inl:125
#define __hydra_dual__
Definition: Config.h:104
hydra::Lambda< LambdaType, 0 > wrap_lambda(LambdaType const &lambda)
Definition: Lambda.h:528
hydra::Parameter W0
Definition: phsp_unweighting_functor_and_fit.inl:217
,
Definition: Parameter.h:67
Examples:
phsp_reweighting.inl, and phsp_unweighting_functor.inl.

◆ dalitz_calculator

auto dalitz_calculator
Initial value:
= hydra::wrap_lambda( [] __hydra_dual__ ( P1 p1, P2 p2, P3 p3){
double MSq_12 = (p1+p2).mass2();
double MSq_13 = (p1+p3).mass2();
double MSq_23 = (p2+p3).mass2();
return hydra::make_tuple(MSq_12, MSq_13, MSq_23);
})
__hydra_host__ __hydra_device__ auto make_tuple(T &&... t) -> decltype(hydra::thrust::make_tuple(std::forward< T >(t)...))
This version of make_tuple creates a new tuple object from a list of objects.
Definition: Tuple.h:261
#define __hydra_dual__
Definition: Config.h:104
hydra::Lambda< LambdaType, 0 > wrap_lambda(LambdaType const &lambda)
Definition: Lambda.h:528
Examples:
dalitz_plot.C, dalitz_plot.inl, phsp_basic.inl, phsp_reweighting.inl, and phsp_unweighting_functor.inl.

◆ elapsed

std::chrono::duration<double, std::milli> elapsed = end - start

◆ end

auto end = std::chrono::high_resolution_clock::now()

◆ Jpsi_mass

double Jpsi_mass = 3.0969
Examples:
phsp_chain.inl.

◆ K_mass

double K_mass = 0.493677
Examples:
phsp_chain.inl.

◆ M0

Initial value:
.Name("mass" ).Value(0.8).Error(0.001).Limits(0.7, 0.9)
static __hydra_host__ Parameter Create()
Definition: Parameter.h:369
__hydra_host__ Parameter & Name(std::string const &name)
Definition: Parameter.h:382
__hydra_host__ Parameter & Error(GReal_t error)
Definition: Parameter.h:394
__hydra_host__ Parameter & Limits(GReal_t lowlim, GReal_t uplim)
Definition: Parameter.h:407
__hydra_host__ Parameter & Value(GReal_t value)
Definition: Parameter.h:401

◆ model

auto model
Initial value:
Pdf< FUNCTOR, INTEGRATOR > make_pdf(FUNCTOR const &functor, INTEGRATOR integrator)
Build a hydra::Pdf given a shape described by a functor and a integrator (algorithm or functor)...
Definition: Pdf.h:299
auto breit_wigner
Definition: phsp_unweighting_functor_and_fit.inl:222
double B0_mass
Definition: phsp_unweighting_functor_and_fit.inl:135
double K_mass
Definition: phsp_unweighting_functor_and_fit.inl:137
double pi_mass
Definition: phsp_unweighting_functor_and_fit.inl:138
Definition: PhaseSpaceIntegrator.h:48
double Jpsi_mass
Definition: phsp_unweighting_functor_and_fit.inl:136

◆ nentries

nentries = NArg.getValue()

◆ phsp

◆ pi_mass

double pi_mass = 0.13957061
Examples:
phsp_chain.inl.

◆ start

◆ try

try
Initial value:
{
TCLAP::CmdLine cmd("Command line arguments for PHSP B0 -> J/psi K pi", '=')

◆ W0

Initial value:
.Name("width").Value(0.05).Error(0.001).Limits(0.04, 0.06)
static __hydra_host__ Parameter Create()
Definition: Parameter.h:369
__hydra_host__ Parameter & Name(std::string const &name)
Definition: Parameter.h:382
__hydra_host__ Parameter & Error(GReal_t error)
Definition: Parameter.h:394
__hydra_host__ Parameter & Limits(GReal_t lowlim, GReal_t uplim)
Definition: Parameter.h:407
__hydra_host__ Parameter & Value(GReal_t value)
Definition: Parameter.h:401