Belle II Software development
InvariantMassAlgorithm.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 <calibration/CalibrationAlgorithm.h>
12#include <tracking/calibration/InvariantMassMuMuStandAlone.h>
13#include <tracking/calibration/InvariantMassBhadStandAlone.h>
14#include <tracking/calibration/calibTools.h>
15
16namespace Belle2 {
25 public:
26
29
32
34 void setOuterLoss(const std::string& loss) { m_lossFunctionOuter = loss; }
35
37 void setInnerLoss(const std::string& loss) { m_lossFunctionInner = loss; }
38
40 void includeHadBcalib(bool state = true) {m_runHadB = state;}
41
43 void setMuMuEcmsSpread(double spread) {m_eCMSmumuSpread = spread;}
44
46 void setMuMuEcmsOffset(double shift) {m_eCMSmumuShift = shift;}
47
49 std::vector<InvariantMassMuMuCalib::Event> getDataMuMu(const std::vector<std::string>& files, bool is4S);
50
52 std::vector<InvariantMassBhadCalib::Event> getDataHadB(const std::vector<std::string>& files);
53
54 protected:
55
57 virtual EResult calibrate() override;
58
59 private:
60
62 std::vector<std::vector<CalibrationData>> adjustOffResonanceEnergy(std::vector<std::vector<CalibrationData>> CalResultsBlocks,
63 const std::vector<std::vector<InvariantMassMuMuCalib::Event>>& evtsMuMuBlocks);
64
65
67 TString m_lossFunctionOuter = "pow(0.000010e0*rawTime, 2) + 1./nEv";
68
70 TString m_lossFunctionInner = "pow(0.000120e0*rawTime, 2) + 1./nEv";
71
73 bool m_runHadB = true;
74
76 double m_eCMSmumuSpread = 5.2e-3;
77
79 double m_eCMSmumuShift = 10e-3;
80
81 };
83} // namespace Belle2
84
Base class for calibration algorithms.
EResult
The result of calibration.
Class implementing InvariantMass calibration algorithm.
bool m_runHadB
Run the calibration from had-B decays.
virtual ~InvariantMassAlgorithm()
Destructor.
void setMuMuEcmsSpread(double spread)
set the spread
void setMuMuEcmsOffset(double shift)
set the energy offset
TString m_lossFunctionOuter
Outer loss function (for calibration intervals with constant InvarinatMass spread)
void setInnerLoss(const std::string &loss)
Set inner loss function (for calibration subintervals)
InvariantMassAlgorithm()
Constructor set the prefix to BoostVectorCollector.
void setOuterLoss(const std::string &loss)
Set outer loss function (for calibration intervals)
std::vector< std::vector< CalibrationData > > adjustOffResonanceEnergy(std::vector< std::vector< CalibrationData > > CalResultsBlocks, const std::vector< std::vector< InvariantMassMuMuCalib::Event > > &evtsMuMuBlocks)
Adjust the energy of the off-resonance runs based on the energy offset between mumu and hadB method i...
double m_eCMSmumuShift
Shift between the energy from the mumu events and the real value.
std::vector< InvariantMassMuMuCalib::Event > getDataMuMu(const std::vector< std::string > &files, bool is4S)
Load the mumu data from files.
std::vector< InvariantMassBhadCalib::Event > getDataHadB(const std::vector< std::string > &files)
Load the hadB data from files.
void includeHadBcalib(bool state=true)
Include calibration based on Hadronic B decays.
virtual EResult calibrate() override
Run algo on data.
TString m_lossFunctionInner
Inner loss function (for calibration subintervals with constant InvariantMass)
double m_eCMSmumuSpread
Energy spread for mumu only run (m_runHadB == false)
Abstract base class for different kinds of events.