Belle II Software development
SVDDatabaseTestModule.cc
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#include <svd/modules/svdCalibration/SVDDatabaseTestModule.h>
10#include <framework/logging/Logger.h>
11
12//#include <svd/dbobjects/SVDPulseShapeCalibrations.h>
13//#include <svd/dbobjects/SVDLocalRunBadStrips.h>
14
15#include <vxd/dataobjects/VxdID.h>
16
17using namespace std;
18using namespace Belle2;
19using namespace Belle2::SVD;
20
21
22//-----------------------------------------------------------------
23// Register the Module
24//-----------------------------------------------------------------
25REG_MODULE(SVDDatabaseTest);
26
27//-----------------------------------------------------------------
28// Implementation
29//-----------------------------------------------------------------
30
32{
33 //Set module properties
34 setDescription("The SVD Test Module for the database interface");
35
36}
37
40{
41
46
50 VxdID sensorID(3, 1, 1);
51 /*
52 B2INFO("Noise L3_1_1 side V strip 0 = " << m_obj_noise.getNoise(sensorID, false, 0));
53 B2INFO("Noise L3_1_1 side U strip 0 = " << m_obj_noise.getNoise(sensorID , true, 0));
54 B2INFO("Test the retrieval of the noise in electrons:");
55 B2INFO("Noise L3_1_1 side V strip 0 [electrons]= " << m_obj_noise.getNoiseInElectrons(sensorID, false, 0));
56 B2INFO("Noise L3_1_1 side U strip 0 [electrons]= " << m_obj_noise.getNoiseInElectrons(sensorID , true, 0));
57
58 VxdID sensorID_L4(4, 1, 1);
59 B2INFO("Noise L4_1_1 side V strip 0 = " << m_obj_noise.getNoise(sensorID_L4, false, 0));
60 B2INFO("Noise L4_1_1 side U strip 0 = " << m_obj_noise.getNoise(sensorID_L4 , true, 0));
61 B2INFO("Test the retrieval of the noise in electrons:");
62 B2INFO("Noise L4_1_1 side V strip 0 [electrons]= " << m_obj_noise.getNoiseInElectrons(sensorID_L4, false, 0));
63 B2INFO("Noise L4_1_1 side U strip 0 [electrons]= " << m_obj_noise.getNoiseInElectrons(sensorID_L4 , true, 0));
64
65 B2INFO("~~~~~~~~~~~~~~\n");
66
67 B2INFO("Charge [e] L3_1_1 side V strip 0 = " << m_obj_pulseShape.getChargeFromADC(sensorID, false, 0, 60));
68 B2INFO("ADC counts [a.u.] L3_1_1 side V strip 0 = " << m_obj_pulseShape.getADCFromCharge(sensorID, false, 0, 22500.));
69 B2INFO("Peaking time [ns] L3_1_1 side V strip 0 = " << m_obj_pulseShape.getPeakTime(sensorID, false, 0));
70 B2INFO("Pulse width [ns] L3_1_1 side V strip 0 = " << m_obj_pulseShape.getWidth(sensorID, false, 0));
71 B2INFO("Time Correction [ns] L3_1_1 side V strip 0 = " << m_obj_pulseShape.getTimeShiftCorrection(sensorID, false, 0));
72 B2INFO("~~~~~~~~~~~~~~\n");
73
74 B2INFO("Charge [e] L3_1_1 side U strip 0 = " << m_obj_pulseShape.getChargeFromADC(sensorID, true, 0, 60));
75 B2INFO("ADC counts [a.u.] L3_1_1 side U strip 0 = " << m_obj_pulseShape.getADCFromCharge(sensorID, true, 0, 22500.));
76 B2INFO("Peaking time [ns] L3_1_1 side U strip 0 = " << m_obj_pulseShape.getPeakTime(sensorID, true, 0));
77 B2INFO("Pulse width [ns] L3_1_1 side U strip 0 = " << m_obj_pulseShape.getWidth(sensorID, true, 0));
78 B2INFO("Time Correction [ns] L3_1_1 side V strip 0 = " << m_obj_pulseShape.getTimeShiftCorrection(sensorID, true, 0));
79 B2INFO("~~~~~~~~~~~~~~\n");
80 */
81
82 float beta = m_obj_cog.getCorrectedTime(sensorID, true, 0, 0, 0); //t_RAW = 0
83 float alfa = m_obj_cog.getCorrectedTime(sensorID, true, 0, 1, 0) - beta; //t_RAW = 1 - beta
84 B2INFO("CoG, alfa = " << alfa << ", beta = " << beta);
85
86 /*
87 B2INFO("~~~~~~~~~~~~~~\n");
88 B2INFO("isBad = " << m_obj_badStrip->isBad(1, true, 1));
89 */
90
91
92}
void setDescription(const std::string &description)
Sets the description of the module.
Definition Module.cc:214
Module()
Constructor.
Definition Module.cc:30
virtual void event() override
Retrieve calibrations from database.
SVDCoGTimeCalibrations m_obj_cog
CoG calibrations payload.
Class to uniquely identify a any structure of the PXD and SVD.
Definition VxdID.h:32
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition Module.h:649
Namespace to encapsulate code needed for simulation and reconstrucion of the SVD.
Abstract base class for different kinds of events.
STL namespace.