Belle II Software  release-05-02-19
SADInputModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010-2012 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Andreas Moll, Hiroyuki Nakayama *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/core/Module.h>
14 #include <framework/dataobjects/EventMetaData.h>
15 #include <framework/datastore/StoreObjPtr.h>
16 #include <generators/SAD/ReaderSAD.h>
17 
18 #include <string>
19 
20 namespace Belle2 {
26  class MCParticleGraph;
27 
34  class SADInputModule : public Module {
35 
36  public:
37 
43 
45  virtual ~SADInputModule() {};
46 
51  virtual void initialize() override;
52 
54  virtual void event() override;
55 
56 
57  protected:
58 
60  TGeoHMatrix* m_PipePartMatrix;
62  int m_accRing;
63  double m_readoutTime;
64  int m_readMode;
65  std::string m_filename;
66  double m_range;
67  double m_pxRes;
68  double m_pyRes;
69  double m_rotateParticles;
72  private:
73 
78  void readSADParticle(ReaderSAD& reader, MCParticleGraph& mpg);
79 
84  void readRealParticle(ReaderSAD& reader, MCParticleGraph& mpg);
85 
87  };
88 
90 } // end namespace Belle2
91 
Belle2::SADInputModule::m_readoutTime
double m_readoutTime
The readout time of the detector [ns].
Definition: SADInputModule.h:71
Belle2::SADInputModule::~SADInputModule
virtual ~SADInputModule()
Destructor.
Definition: SADInputModule.h:53
Belle2::SADInputModule::event
virtual void event() override
Reads the data and stores it into the MCParticle collection.
Definition: SADInputModule.cc:93
Belle2::SADInputModule::readRealParticle
void readRealParticle(ReaderSAD &reader, MCParticleGraph &mpg)
Reads one real particle per event into the MCParticle graph.
Definition: SADInputModule.cc:140
Belle2::SADInputModule::m_range
double m_range
All particles within the range around the IP are loaded.
Definition: SADInputModule.h:74
Belle2::MCParticleGraph
Class to build, validate and sort a particle decay chain.
Definition: MCParticleGraph.h:48
Belle2::SADInputModule::SADInputModule
SADInputModule()
Constructor.
Definition: SADInputModule.cc:36
Belle2::SADInputModule::m_rotateParticles
double m_rotateParticles
Rotate the SAD particles around the nominal beam axis (just for unphysical tests !...
Definition: SADInputModule.h:77
Belle2::SADInputModule::readSADParticle
void readSADParticle(ReaderSAD &reader, MCParticleGraph &mpg)
Reads one SAD particle per event into the MCParticle graph.
Definition: SADInputModule.cc:133
Belle2::SADInputModule::m_pxRes
double m_pxRes
The resolution for the x momentum component of the SAD real particle.
Definition: SADInputModule.h:75
Belle2::SADInputModule::m_filename
std::string m_filename
The filename of the SAD file.
Definition: SADInputModule.h:73
Belle2::SADInputModule::m_pyRes
double m_pyRes
The resolution for the y momentum component of the SAD real particle.
Definition: SADInputModule.h:76
Belle2::SADInputModule::m_accRing
int m_accRing
The accelerator ring: 0 = LER, 1 = HER.
Definition: SADInputModule.h:70
Belle2::SADInputModule::initialize
virtual void initialize() override
Checks the validity of the module parameters.
Definition: SADInputModule.cc:58
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::SADInputModule::m_PipePartMatrix
TGeoHMatrix * m_PipePartMatrix
Transformation matrix from SAD space into geant4 space.
Definition: SADInputModule.h:68
Belle2::ReaderSAD
Class to read files that have been created by SAD and store their content in a MCParticle graph.
Definition: ReaderSAD.h:45
Belle2::SADInputModule::m_readMode
int m_readMode
The read mode: 0 = one SAD particle per event, 1 = one real particle per event, 2 = all SAD particles...
Definition: SADInputModule.h:72
Belle2::SADInputModule::m_eventMetaDataPtr
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
EventMetaData (for setting event weights).
Definition: SADInputModule.h:94
Belle2::SADInputModule::m_reader
ReaderSAD m_reader
The SAD reader object for the SAD data.
Definition: SADInputModule.h:67