 |
Belle II Software
release-05-02-19
|
13 #include <framework/core/Module.h>
18 #include <TRotation.h>
29 class BeamBkgGeneratorModule :
public Module {
58 virtual void event()
override;
64 virtual void endRun()
override;
int m_ring
ring number, 1-HER, 2-LER
double y
y at lost position [m]
std::string m_fileName
name of the SAD file converted to root
double px
px at lost position [GeV]
int generateEntry() const
Pick up particle randomly from the SAD file according to its rate.
double x
x at lost position [m]
double xraw
x at lost position [m] before matching G4 beam pipe inner surface
std::vector< double > m_rates
cumulative rates of SAD particles [Hz]
std::string m_treeName
name of the TTree in the SAD file
double ssraw
scattered position [m]
virtual void beginRun() override
Called when entering a new run.
double yraw
y at lost position [m] before matching G4 beam pipe inner surface
int nturn
number of turns from scattered to lost
double py
py at lost position [GeV]
double m_realTime
equivalent SuperKEKB running time in [ns]
SADTree m_sad
TTree entry data.
TRotation m_rotation
rotation from SAD to Belle II frame
virtual void event() override
Event processor.
virtual void endRun() override
End-of-run action.
Structure of the TTree in the SAD file.
TFile * m_file
root file pointer
std::vector< int > m_counters
counters: how many times SAD particles are used
int m_eventCounter
event counter
double sraw
s at lost position [m] before matching G4 beam pipe inner surface
Abstract base class for different kinds of events.
virtual void initialize() override
Initialize the Module.
BeamBkgGeneratorModule()
Constructor.
double rr
sqrt(xraw*xraw+yraw*yraw) [m]
double watt
loss wattage [W]
double s
lost position measured from IP along the ring [m]
double dp_over_p0
momentum deviation of the lost particle
virtual ~BeamBkgGeneratorModule()
Destructor.
double rate
lost rate [Hz]
TTree * m_tree
root tree pointer
double ss
scattered position (|s|<Ltot/2) [m]
int m_numEvents
number of events to generate
std::vector< int > m_sectionOrdering
superKEKB section ordering
std::string m_ringName
name of the superKEKB ring (LER or HER)
virtual void terminate() override
Termination action.
double r
sqrt(x*x+y*y) [m]