Belle II Software development
CDCCrossTalkAdderModule.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//basf2 framework headers
12#include <framework/core/Module.h>
13#include <framework/datastore/StoreArray.h>
14
15//cdc package headers
16#include <cdc/geometry/CDCGeometryPar.h>
17#include <cdc/dataobjects/CDCHit.h>
18#include <cdc/dbobjects/CDCCrossTalkLibrary.h>
19#include <cdc/dbobjects/CDCFEElectronics.h>
20
21//C++/C standard lib elements.
22#include <string>
23
24namespace Belle2 {
29
35
36 public:
39
41 void initialize() override;
42
44 void event() override;
45
47 void setFEElectronics();
48
50 void terminate() override
51 {
52 if (m_xTalkFromDB) delete m_xTalkFromDB;
54 };
55
56 private:
58
59 std::string m_inputCDCHitsName;
60
62
64
66 float m_lowEdgeOfTimeWindow[c_nBoards] = {0};
67 float m_uprEdgeOfTimeWindow[c_nBoards] = {0};
68 unsigned short m_widthOfTimeWindow [c_nBoards] = {0};
69
70 double m_invOfTDCBinWidth = 0;
71
74
76
78 struct XTalkInfo {
80 XTalkInfo(unsigned short tdc, unsigned short adc, unsigned short tot, unsigned short status) :
81 m_tdc(tdc), m_adc(adc), m_tot(tot), m_status(status) {}
82 unsigned short m_tdc;
83 unsigned short m_adc;
84 unsigned short m_tot;
85 unsigned short m_status;
86 };
87 };
88
90} // end of Belle2 namespace
bool m_includeEarlyXTalks
Flag to switch on/off xtalks earlier than the hit.
unsigned short m_widthOfTimeWindow[c_nBoards]
Width of time window.
std::string m_inputCDCHitsName
Input array name.
DBObjPtr< CDCCrossTalkLibrary > * m_xTalkFromDB
Pointer to cross-talk from DB.
float m_uprEdgeOfTimeWindow[c_nBoards]
Upper edge of time-window.
void initialize() override
Initialize variables.
StoreArray< CDCHit > m_hits
CDCHit array.
void terminate() override
Terminate func.
bool m_issue2ndHitWarning
Flag to switch on/off a warning on the 2nd TDC hit.
float m_lowEdgeOfTimeWindow[c_nBoards]
Lower edge of time-window.
DBArray< CDCFEElectronics > * m_fEElectronicsFromDB
Pointer to FE electronics params.
CDC::CDCGeometryPar * m_cdcgp
Cached Pointer to CDCGeometryPar.
void setFEElectronics()
Set FEE parameters (from DB)
The Class for CDC Geometry Parameters.
Class for accessing arrays of objects in the database.
Definition DBArray.h:26
Class for accessing objects in the database.
Definition DBObjPtr.h:21
Module()
Constructor.
Definition Module.cc:30
Accessor to arrays stored in the data store.
Definition StoreArray.h:113
Abstract base class for different kinds of events.
XTalkInfo(unsigned short tdc, unsigned short adc, unsigned short tot, unsigned short status)
Constructor that initializes all members.