Belle II Software development
SADInputModule.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/Module.h>
12#include <framework/dataobjects/EventMetaData.h>
13#include <framework/datastore/StoreObjPtr.h>
14#include <generators/SAD/ReaderSAD.h>
15
16#include <string>
17
18namespace Belle2 {
24 class MCParticleGraph;
25
32 class SADInputModule : public Module {
33
34 public:
35
41
43 virtual ~SADInputModule() {};
44
49 virtual void initialize() override;
50
52 virtual void event() override;
53
54
55 protected:
56
58 TGeoHMatrix* m_PipePartMatrix;
63 std::string m_filename;
64 double m_range;
65 double m_pxRes;
66 double m_pyRes;
70 private:
71
76 void readSADParticle(ReaderSAD& reader, MCParticleGraph& mpg);
77
82 void readRealParticle(ReaderSAD& reader, MCParticleGraph& mpg);
83
85 };
86
88} // end namespace Belle2
89
Class to build, validate and sort a particle decay chain.
Base class for Modules.
Definition: Module.h:72
Class to read files that have been created by SAD and store their content in a MCParticle graph.
Definition: ReaderSAD.h:35
The SAD Input module.
double m_pyRes
The resolution for the y momentum component of the SAD real particle.
TGeoHMatrix * m_PipePartMatrix
Transformation matrix from SAD space into geant4 space.
virtual ~SADInputModule()
Destructor.
virtual void initialize() override
Checks the validity of the module parameters.
double m_range
All particles within the range around the IP are loaded.
virtual void event() override
Reads the data and stores it into the MCParticle collection.
int m_readMode
The read mode: 0 = one SAD particle per event, 1 = one real particle per event, 2 = all SAD particles...
void readRealParticle(ReaderSAD &reader, MCParticleGraph &mpg)
Reads one real particle per event into the MCParticle graph.
double m_rotateParticles
Rotate the SAD particles around the nominal beam axis (just for unphysical tests !...
int m_accRing
The accelerator ring: 0 = LER, 1 = HER.
SADInputModule()
Constructor.
std::string m_filename
The filename of the SAD file.
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
EventMetaData (for setting event weights).
double m_pxRes
The resolution for the x momentum component of the SAD real particle.
double m_readoutTime
The readout time of the detector [ns].
ReaderSAD m_reader
The SAD reader object for the SAD data.
void readSADParticle(ReaderSAD &reader, MCParticleGraph &mpg)
Reads one SAD particle per event into the MCParticle graph.
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.