Belle II Software
development
TouschekReaderTURTLE.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
11
#include <framework/core/FrameworkExceptions.h>
12
#include <mdst/dataobjects/MCParticleGraph.h>
13
14
#include <TGeoMatrix.h>
15
16
#include <string>
17
#include <fstream>
18
19
namespace
Belle2
{
24
34
class
TouschekReaderTURTLE
{
35
36
public
:
37
38
//Define exceptions
40
BELLE2_DEFINE_EXCEPTION
(TouschekCouldNotOpenFileError,
"Could not open file %1% !"
);
42
BELLE2_DEFINE_EXCEPTION
(TouschekConvertFieldError,
"Line %1%: Could not convert field %2%: %3%"
);
43
49
TouschekReaderTURTLE
(TGeoHMatrix* transMatrix,
int
pdg);
50
54
~TouschekReaderTURTLE
();
55
60
void
open
(
const
std::string& filename);
61
71
int
getParticles
(
int
number,
MCParticleGraph
& graph);
72
73
74
protected
:
75
76
TGeoHMatrix*
m_transMatrix
;
77
int
m_pdg
;
78
std::ifstream
m_input
;
79
int
m_lineNum
;
80
};
81
83
}
84
Belle2::MCParticleGraph
Class to build, validate and sort a particle decay chain.
Definition
MCParticleGraph.h:37
Belle2::TouschekReaderTURTLE::TouschekReaderTURTLE
TouschekReaderTURTLE(TGeoHMatrix *transMatrix, int pdg)
Constructor of the TouschekReader class.
Definition
TouschekReaderTURTLE.cc:23
Belle2::TouschekReaderTURTLE::~TouschekReaderTURTLE
~TouschekReaderTURTLE()
Destructor.
Definition
TouschekReaderTURTLE.cc:29
Belle2::TouschekReaderTURTLE::m_lineNum
int m_lineNum
The line number in the ascii file of the last particle which was read.
Definition
TouschekReaderTURTLE.h:79
Belle2::TouschekReaderTURTLE::m_transMatrix
TGeoHMatrix * m_transMatrix
Transformation matrix from local Touschek to global geant4 space.
Definition
TouschekReaderTURTLE.h:76
Belle2::TouschekReaderTURTLE::m_pdg
int m_pdg
The pdg value of the type of particle that is read (e.g.
Definition
TouschekReaderTURTLE.h:77
Belle2::TouschekReaderTURTLE::open
void open(const std::string &filename)
Opens an ascii file and prepares it for reading.
Definition
TouschekReaderTURTLE.cc:35
Belle2::TouschekReaderTURTLE::m_input
std::ifstream m_input
The input stream of the ascii file.
Definition
TouschekReaderTURTLE.h:78
Belle2::TouschekReaderTURTLE::BELLE2_DEFINE_EXCEPTION
BELLE2_DEFINE_EXCEPTION(TouschekConvertFieldError, "Line %1%: Could not convert field %2%: %3%")
Exception is thrown if a field in the Touschek file could not be converted to a number.
Belle2::TouschekReaderTURTLE::getParticles
int getParticles(int number, MCParticleGraph &graph)
Reads the specified number of particles from the file and stores the result in the given MCParticle g...
Definition
TouschekReaderTURTLE.cc:43
Belle2::TouschekReaderTURTLE::BELLE2_DEFINE_EXCEPTION
BELLE2_DEFINE_EXCEPTION(TouschekCouldNotOpenFileError, "Could not open file %1% !")
Exception is thrown if the Touschek file could not be opened.
Belle2
Abstract base class for different kinds of events.
Definition
MillepedeAlgorithm.h:17
generators
touschek
include
TouschekReaderTURTLE.h
Generated on Mon Sep 1 2025 02:53:06 for Belle II Software by
1.13.2