Belle II Software development
TOPBackSplashTimingModule.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#include <framework/core/Module.h>
11#include <framework/datastore/StoreArray.h>
12#include <mdst/dataobjects/ECLCluster.h>
13#include <mdst/dataobjects/Track.h>
14#include <top/dataobjects/TOPBackSplashFitResult.h>
15#include <top/dataobjects/TOPDigit.h>
16#include <top/dataobjects/TOPRecBunch.h>
17
18#include <RooAbsPdf.h>
19#include <RooRealVar.h>
20#include <RooDataSet.h>
21#include <RooFitResult.h>
22#include <RooWorkspace.h>
23
24namespace Belle2 {
35
36 public:
41
46 void initialize() override;
47
51 void event() override;
52
53 private:
57 void prepareFitModels();
58
64 static int getModuleFromPhi(double phi);
65
75 TOPBackSplashFitResult* fitTimingDigits(int moduleID, const std::vector<const TOPDigit*>& digitsPerSlot,
76 double clusterE, double clusterCosTheta, int nTracksPerSlot);
77
89 void makePlot(double cosTheta, double clusterE, int moduleID, RooAbsPdf* model,
90 RooRealVar* x, RooDataSet data, RooFitResult* res, int nTracksPerSlot);
91
92
94 bool m_saveFits = false;
95
97 double m_minClusterE = 0.5;
98
101
103 double m_minClusterNHits = 10.0;
104
107
110
111
114
117
120
123
125
127 std::array<std::array<double, 11>, 15> m_fitparams;
128
130 std::vector<RooWorkspace> m_wss;
131 };
132
134} //end namespace Belle2
Module()
Constructor.
Definition Module.cc:30
Accessor to arrays stored in the data store.
Definition StoreArray.h:113
Type-safe access to single objects in the data store.
Definition StoreObjPtr.h:96
Class to store the quantities determined in the TOPBackSplashTiming module and relate to correspondin...
TOPBackSplashFitResult * fitTimingDigits(int moduleID, const std::vector< const TOPDigit * > &digitsPerSlot, double clusterE, double clusterCosTheta, int nTracksPerSlot)
Perform fitting of TOP timing in nearby slot.
StoreObjPtr< TOPRecBunch > m_recBunch
reconstructed bunch
static int getModuleFromPhi(double phi)
Maps azimuthal angle to corresponding TOP slot no.
void initialize() override
Initialize the Module.
bool m_saveMoreFitParams
saves additional fit parameters (e.g.
void event() override
Event processor.
std::array< std::array< double, 11 >, 15 > m_fitparams
container of 11 TOP timing fit params per cosTheta
bool m_saveFits
plot and save fits of TOP timing
bool m_includeSlotsWithTracks
whether to fit neutral cluster TOP signal in slots with bkg tracks
void prepareFitModels()
Constructs RooFit objects for fitting.
std::vector< RooWorkspace > m_wss
container of RooWorkSpaces, containing fit funcs per cosTheta
StoreArray< Track > m_tracks
Store Array of Track.
StoreArray< TOPBackSplashFitResult > m_fitresult
StoreArray of TOPBackSplashFitResult.
StoreArray< ECLCluster > m_eclClusters
StoreArray of ECLCluster.
StoreArray< TOPDigit > m_digits
StoreArray of TOPDigit.
void makePlot(double cosTheta, double clusterE, int moduleID, RooAbsPdf *model, RooRealVar *x, RooDataSet data, RooFitResult *res, int nTracksPerSlot)
Creates RooPlots of fitted TOPtiming and save as png.
double m_minClusterE
minimum energy of ECL clusters to consider [GeV]
Abstract base class for different kinds of events.