Belle II Software development
TOPDatabaseImporter.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 <Python.h>
12#include <string>
13#include <vector>
14
15namespace Belle2 {
27
28 public:
29
34 {}
35
36
41 {}
42
52 void importSampleTimeCalibration(std::string fileNames,
53 int firstExp = 0, int firstRun = 0,
54 int lastExp = -1, int lastRun = -1);
55
56
66 void importLocalT0Calibration(std::string fileNames,
67 int firstExp = 0, int firstRun = 0,
68 int lastExp = -1, int lastRun = -1);
69
70
79 void importChannelT0(std::string fileName,
80 int expNo, int firstRun, int lastRun);
81
82
93 void importAsicShifts_BS13d(double s0, double s1, double s2, double s3,
94 int expNo, int firstRun, int lastRun);
95
105 void importModuleT0Calibration(std::string fileName,
106 int firstExp = 0, int firstRun = 0,
107 int lastExp = -1, int lastRun = -1);
108
117 void importModuleT0(std::string fileName,
118 int expNo, int firstRun, int lastRun);
119
130 void importOfflineCommonT0Calibration(std::string fileName,
131 int firstExp = 0, int firstRun = 0,
132 int lastExp = -1, int lastRun = -1);
133
134
144 void importCommonT0(double value, double error,
145 int expNo, int firstRun, int lastRun,
146 bool roughlyCalibrated = false);
147
152
157
165 void importChannelMask(std::string fileName,
166 int expNo, int firstRun, int lastRun);
167
177 void generateFakeChannelMask(double fractionDead, double fractionHot,
178 int firstExp = 0, int firstRun = 0,
179 int lastExp = -1, int lastRun = -1);
180
190 void importPmtQEData(std::string fileName,
191 std::string treeName = "qePmtData",
192 int firstExp = 0, int firstRun = 0,
193 int lastExp = -1, int lastRun = -1);
194
204 void importPmtGainData(std::string fileName,
205 std::string treeName = "gainPmtData",
206 int firstExp = 0, int firstRun = 0,
207 int lastExp = -1, int lastRun = -1);
208
218 void importPmtInstallationData(std::string fileName,
219 std::string treeName = "installationPmtData",
220 int firstExp = 0, int firstRun = 0,
221 int lastExp = -1, int lastRun = -1);
222
232 void importPmtObsoleteData(std::string fileName,
233 std::string treeName = "obsPmtData",
234 int firstExp = 0, int firstRun = 0,
235 int lastExp = -1, int lastRun = -1);
236
246 void importPmtTTSPar(std::string fileName,
247 std::string treeName = "ttsPmtPar",
248 int firstExp = 0, int firstRun = 0,
249 int lastExp = -1, int lastRun = -1);
250
260 void importPmtTTSHisto(std::string fileName,
261 std::string treeName = "ttsPmtHisto",
262 int firstExp = 0, int firstRun = 0,
263 int lastExp = -1, int lastRun = -1);
264
273 void importPmtPulseHeightFitResult(std::string fileName,
274 int firstExp = 0, int firstRun = 0,
275 int lastExp = -1, int lastRun = -1);
276
281 void exportPmtTTSHisto(std::string outFileName = "RetrievedHistos.root");
282
293 void importFrontEndSettings(int lookback, int readoutWin, int extraWin, int offset,
294 int expNo, int firstRun, int lastRun);
295
303 void importDummyCalModuleAlignment(int firstExp = 0, int firstRun = 0,
304 int lastExp = -1, int lastRun = -1);
305
313 void importDummyCalModuleT0(int firstExp = 0, int firstRun = 0,
314 int lastExp = -1, int lastRun = -1);
322 void importDummyCalChannelT0(int firstExp = 0, int firstRun = 0,
323 int lastExp = -1, int lastRun = -1);
331 void importDummyCalTimebase(int firstExp = 0, int firstRun = 0,
332 int lastExp = -1, int lastRun = -1);
340 void importDummyCalChannelNoise(int firstExp = 0, int firstRun = 0,
341 int lastExp = -1, int lastRun = -1);
349 void importDummyCalChannelPulseHeight(int firstExp = 0, int firstRun = 0,
350 int lastExp = -1, int lastRun = -1);
358 void importDummyCalChannelRQE(int firstExp = 0, int firstRun = 0,
359 int lastExp = -1, int lastRun = -1);
367 void importDummyCalChannelThresholdEff(int firstExp = 0, int firstRun = 0,
368 int lastExp = -1, int lastRun = -1);
376 void importDummyCalChannelThreshold(int firstExp = 0, int firstRun = 0,
377 int lastExp = -1, int lastRun = -1);
385 void importDummyCalCommonT0(int firstExp = 0, int firstRun = 0,
386 int lastExp = -1, int lastRun = -1);
394 void importDummyCalIntegratedCharge(int firstExp = 0, int firstRun = 0,
395 int lastExp = -1, int lastRun = -1);
396
404 void importDummyCalAsicShift(int firstExp = 0, int firstRun = 0,
405 int lastExp = -1, int lastRun = -1);
406
412 void correctTOPPmtQE();
413
425 void importTimeWalk(PyObject* list, double a, double b,
426 int firstExp = 0, int firstRun = 0,
427 int lastExp = -1, int lastRun = -1);
431 void importTest(int runNumber, double syncTimeBase);
432
436 void importTest();
437
438
439 private:
440
441 };
442
444} // Belle2 namespace
TOP database importer.
virtual ~TOPDatabaseImporter()
Destructor.
TOPDatabaseImporter()
Default constructor.
void importDummyCalChannelNoise(int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
import a dummy payload of TOPCalChannelNoise DB objects
void importModuleT0(std::string fileName, int expNo, int firstRun, int lastRun)
Import module T0 calibration constants The input is a root file with 1D histogram (name is "moduleT0"...
void importDummyCalTimebase(int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
import a dummy payload of TOPCalTimebase DB objects
void importDummyCalChannelRQE(int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
import a dummy payload of TOPCalChannelRQE DB objects
void printSampleTimeCalibrationInfo()
Prints sample time calibration info about constants stored in database.
void importPmtQEData(std::string fileName, std::string treeName="qePmtData", int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
Import PMT Quantum Efficiency data to database.
void importModuleT0Calibration(std::string fileName, int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
Import module T0 calibration constants to database The input is the text file.
void importAsicShifts_BS13d(double s0, double s1, double s2, double s3, int expNo, int firstRun, int lastRun)
Import ASIC shifts of BS13d.
void importDummyCalChannelT0(int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
import a dummy payload of TOPCalChannelT0 DB objects
void importDummyCalChannelThreshold(int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
import a dummy payload of TOPCalChannelThreshold DB objects
void exportPmtTTSHisto(std::string outFileName="RetrievedHistos.root")
Example of exporting TTS histograms.
void importPmtTTSHisto(std::string fileName, std::string treeName="ttsPmtHisto", int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
Import histograms used for PMT TTS determination.
void importDummyCalModuleT0(int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
import a dummy payload of TOPCalCalModuleT0 DB objects
void importPmtPulseHeightFitResult(std::string fileName, int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
Import fit results of pulse height disribution for channel gain and threshold efficiency.
void importDummyCalCommonT0(int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
import a dummy payload of TOPCalCommonT0 DB objects
void importChannelT0(std::string fileName, int expNo, int firstRun, int lastRun)
Import channel T0 calibration constants The input is a root file with 1D histograms (one per slot,...
void importDummyCalAsicShift(int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
import a dummy payload of TOPCalAsicShift DB objects
void importDummyCalIntegratedCharge(int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
import a dummy payload of TOPCalIntegratedCharge DB objects
void importFrontEndSettings(int lookback, int readoutWin, int extraWin, int offset, int expNo, int firstRun, int lastRun)
Import front-end settings.
void importPmtObsoleteData(std::string fileName, std::string treeName="obsPmtData", int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
Import PMT specifications from Hamamatsu (not to be used!)
void importSampleTimeCalibration(std::string fileNames, int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
Import sample time calibration constants to database Output of TOPTimeBaseCalibrator (root files with...
void importDummyCalChannelThresholdEff(int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
import a dummy payload of TOPCalChannelThresholdEff DB objects
void correctTOPPmtQE()
correct QE values in database for the reflection on window surface be sure that you run the function ...
void printSampleTimeCalibration()
Print sample time calibration constants stored in database.
void importTest()
for testing purposes only! - will be removed ...
void importDummyCalModuleAlignment(int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
import a dummy payload of TOPCalModuleAlignment DB objects
void importPmtTTSPar(std::string fileName, std::string treeName="ttsPmtPar", int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
Import gaussians fitting the TTS distributions.
void importDummyCalChannelPulseHeight(int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
import a dummy payload of TOPCalChannelPulseHeight DB objects
void importCommonT0(double value, double error, int expNo, int firstRun, int lastRun, bool roughlyCalibrated=false)
Import common T0 calibration constants.
void importLocalT0Calibration(std::string fileNames, int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
Import channel-by-channel T0 calibration constants to database The input is the root file with ntuple...
void generateFakeChannelMask(double fractionDead, double fractionHot, int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
Generate and import a (random, fake) channel mask for testing.
void importPmtInstallationData(std::string fileName, std::string treeName="installationPmtData", int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
Import PMT installation data to database.
void importPmtGainData(std::string fileName, std::string treeName="gainPmtData", int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
Import PMT gain parameters data to database.
void importOfflineCommonT0Calibration(std::string fileName, int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
Import common T0 calibration constants derived form the offline data reprocessing to database The inp...
Abstract base class for different kinds of events.