Belle II Software development
TrackingMomentumScaleFactors.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
13#include <memory>
14#include <string>
15#include <vector>
16
17namespace Belle2 {
22 template<class T> class DBObjPtr;
23 class Particle;
25
30 public:
35
39 void initialize() override;
40
44 void beginRun() override;
45
49 void event() override;
50
51 private:
56 double getScalingFactor(Particle* particle);
57
62 double getSmearingFactor(Particle* particle);
63
65 std::vector<std::string> m_ParticleLists;
66
68 double m_scale;
69
71 std::string m_payloadName;
72
75
78
80 std::unique_ptr<DBObjPtr<ParticleWeightingLookUpTable>> m_ParticleWeightingLookUpTable;
84 void setMomentumScalingFactor(Particle* particle);
85
90
91 }; // TrackingMomentumScaleFactorsModule
92
94}; //namespace
95
Class for accessing objects in the database.
Definition DBObjPtr.h:21
Module()
Constructor.
Definition Module.cc:30
Class to store reconstructed particles.
Definition Particle.h:76
std::vector< std::string > m_ParticleLists
input particle lists
void initialize() override
Initializes the modules and checks the validity of the input parameters.
void event() override
Function to be executed at each event.
std::string m_scalingFactorName
Name of the scale factor from table.
std::unique_ptr< DBObjPtr< ParticleWeightingLookUpTable > > m_ParticleWeightingLookUpTable
Pointer to the table in DB.
void setMomentumScalingFactor(Particle *particle)
function to set momentum scaling factor
void beginRun() override
Function to be executed at each beginning of a run.
TrackingMomentumScaleFactorsModule()
Constructor: Sets the description, the properties and the parameters of the module.
double getSmearingFactor(Particle *particle)
Returns the needed smearing factor for particle based on payloadName and smearingFactorName.
std::string m_smearingFactorName
Name of the smear factor from table.
double getScalingFactor(Particle *particle)
Returns the needed scale factor for particle based on payloadName and scalingFactorName.
void setMomentumSmearingFactor(Particle *particle)
function to set momentum scaling factor
Abstract base class for different kinds of events.