Belle II Software development
AAFHInterface.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10#ifndef GENERATORS_AAFH_INTERFACE_H
11#define GENERATORS_AAFH_INTERFACE_H
12
13#include <vector>
14#include <mdst/dataobjects/MCParticleGraph.h>
15
16
17namespace Belle2 {
30 public:
32 enum EMode {
43 };
44
48 c_Once = 1,
52 };
53
55 AAFHInterface() = default;
57 void setMaxTries(int tries);
59 void setGeneratorWeights(const std::vector<double>& weights);
63 void setMaxWeights(double subgeneratorWeight, double finalWeight);
65 void setSupressionLimits(std::vector<double> limits);
67 void setMinimumMass(double minMass) { m_minMass = minMass; }
69 void setParticle(const std::string& particle)
70 {
71 m_particle = particle;
72 }
73
75 int getMaxTries() const;
77 std::vector<double> getGeneratorWeights() const;
79 double getMaxSubGeneratorWeight() const;
81 double getMaxFinalWeight() const;
83 std::vector<double> getSuppressionLimits() const;
85 double getMinimumMass() const { return m_minMass; }
87 std::string getParticle() const { return m_particle; }
89 double getTotalCrossSection() const;
91 double getTotalCrossSectionError() const;
92
94 void initialize(double beamEnergy, EMode mode, ERejection rejection);
98 void finish();
99 private:
106 void updateParticle(MCParticleGraph::GraphParticle& p, double* q, int pdg, bool isInitial = false);
108 double m_minMass {0};
110 std::string m_particle {"tau-"};
114 };
115
117} //Belle2 namespace
118#endif // GENERATORS_AAFH_INTERFACE_H
Class to inferface AAFH/DIAG36 Generator written in Fortran.
Definition: AAFHInterface.h:29
int m_particlePDG
pdg of the particle for modes c_MuonParticle and c_ElectronParticle, gets set in initialize()
AAFHInterface()=default
Default Constructor.
double m_minMass
minimum invariant mass
double getMaxSubGeneratorWeight() const
Get the maximum expected final weight for the rejection method.
ERejection
Rejection mode.
Definition: AAFHInterface.h:46
@ c_Twice
Apply rejection first for each sub generator and then for the final event.
Definition: AAFHInterface.h:51
@ c_Once
Apply rejection only once for the final event.
Definition: AAFHInterface.h:48
void setMinimumMass(double minMass)
Set the minimum invariant mass for the generated event.
Definition: AAFHInterface.h:67
void updateParticle(MCParticleGraph::GraphParticle &p, double *q, int pdg, bool isInitial=false)
update particle with generated values
double getTotalCrossSectionError() const
Return error on the total cross section.
double getTotalCrossSection() const
Return total cross section.
std::string m_particle
name of the particle for modes c_MuonParticle and c_ElectronParticle
void finish()
calculate total cross section
void generateEvent(MCParticleGraph &mpg)
generate one event and add it to the graph in CMS
void initialize(double beamEnergy, EMode mode, ERejection rejection)
initialize the generator
double getMinimumMass() const
Get the minimum invariant mass for the generated event.
Definition: AAFHInterface.h:85
EMode
Generation mode.
Definition: AAFHInterface.h:32
@ c_ElectonElectron
E+E- -> E+E-E+E-.
Definition: AAFHInterface.h:42
@ c_ElectonMuon
E+E- -> E+E-Mu+Mu-.
Definition: AAFHInterface.h:38
@ c_MuonParticle
E+E- -> Mu+Mu-L+L- where L can be anything, defaults to tau.
Definition: AAFHInterface.h:34
@ c_MuonMuon
E+E- -> Mu+Mu-Mu+Mu-.
Definition: AAFHInterface.h:36
@ c_ElectronParticle
E+E- -> E+E-L+L- where L can be anything, defaults to tau.
Definition: AAFHInterface.h:40
void setMaxWeights(double subgeneratorWeight, double finalWeight)
Set the maximum expected weights for the rejection method.
std::string getParticle() const
Get the particle type for modes c_MuonParticle and c_ElectronParticle.
Definition: AAFHInterface.h:87
void setMaxTries(int tries)
Set the maximum number of tries to generate an event.
std::vector< double > getSuppressionLimits() const
Get suppression limits.
void setSupressionLimits(std::vector< double > limits)
Set the suppression limits when calculation the matrix elements.
void setParticle(const std::string &particle)
Set the particle type for modes c_MuonParticle and c_ElectronParticle.
Definition: AAFHInterface.h:69
int getMaxTries() const
Get the maximum number of tries to generate an event.
void setGeneratorWeights(const std::vector< double > &weights)
Set the relative weights for the sub generators.
double getMaxFinalWeight() const
Get the maximum expected subgenerator weight for the rejection method.
std::vector< double > getGeneratorWeights() const
Get the relative weights for the sub generators.
Class to represent Particle data in graph.
Class to build, validate and sort a particle decay chain.
Abstract base class for different kinds of events.