MINT2
Functions
calculateHadronicParameters.cpp File Reference
#include <Mint/HadronicParameters.h>
#include <Mint/NamedParameter.h>
#include <Mint/NamedParameterBase.h>
#include <Mint/DalitzEvent.h>
#include <Mint/DalitzEventPattern.h>
#include <TRandom3.h>
#include <Mint/FitAmpSum.h>
#include <iostream>
#include <fstream>
#include <ctime>

Go to the source code of this file.

Functions

int calculateHadronicParameters (const string &config=string())
 
int main (int argc, char **argv)
 

Function Documentation

◆ calculateHadronicParameters()

int calculateHadronicParameters ( const string &  config = string())

Definition at line 15 of file calculateHadronicParameters.cpp.

15  {
16  if(config.size() > 0){
17  cout << "Using config file " << config << endl ;
19  }
20 
21  NamedParameter<int> EventPattern("Event Pattern", 421, -321, 211, 211, -211);
22  DalitzEventPattern pat(EventPattern.getVector());
23  DalitzEventPattern cpPat(pat) ;
24  cpPat[0].antiThis() ;
25 
26  HadronicParameters::ModelPtr model(new FitAmpSum(pat)) ;
27  HadronicParameters::ModelPtr cpmodel(new FitAmpSum(cpPat)) ;
28 
29  TRandom3 ranLux;
30  NamedParameter<int> RandomSeed("RandomSeed", 0);
31  ranLux.SetSeed((int)RandomSeed);
32  gRandom = &ranLux;
33 
34  NamedParameter<int> nBinsPhase("nBinsPhase", 8) ;
35 
36  NamedParameter<string> binningType("binning_type", string("model"), (char*)0) ;
38  if(string(binningType) == string("model3body"))
39  binning = HadronicParameters::BinningPtr(new HadronicParameters::ModelBinning3Body(model, cpmodel, nBinsPhase)) ;
40  else
41  binning = HadronicParameters::BinningPtr(new HadronicParameters::ModelPhaseBinning(model, cpmodel, nBinsPhase)) ;
42 
43  HadronicParameters pars(binning) ;
44 
45  NamedParameter<int> Nevents("Nevents", 10000);
46  cout << "Calculating parameters with random seed " << int(RandomSeed) << " for "
47  << int(Nevents) << " events." << endl ;
48  int startTime(time(0)) ;
49  pars.add(pat, ranLux, int(Nevents)) ;
50  int endTime(time(0)) ;
51  cout << "Finished calculating. Took " << (endTime - startTime) << " s, "
52  << float(endTime - startTime)/Nevents << " s/event." << endl ;
53 
54  pars.normalise() ;
55 
56  NamedParameter<string> parsName("parsName", string("hadronicPars"), (char*)0) ;
57  cout << "Calculated parameters:" << endl ;
58  pars.Print(string(parsName)) ;
59 
60  NamedParameter<string> outputFile("outputFile", string("hadronicParameters.txt"), (char*)0) ;
61  pars.write(parsName, outputFile) ;
62 
63  return 0 ;
64 }
Class for determining if an event lives in a +ve or -ve bin.
static bool setDefaultInputFile(const std::string &fname)
Phase binning class for 3-body decays using the line s13=s23 to determine favoured/suppressed.
MINT::counted_ptr< PhaseBinningBase > BinningPtr
Pointer to the binning scheme.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 66 of file calculateHadronicParameters.cpp.

66  {
67  if(argc > 1)
68  return calculateHadronicParameters(string(argv[1])) ;
70 }
int calculateHadronicParameters(const string &config=string())