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/dataobjects/WireID.h>
19#include <cdc/dbobjects/CDCCrossTalkLibrary.h>
20#include <cdc/dbobjects/CDCFEElectronics.h>
21
22//C++/C standard lib elements.
23#include <string>
24
25namespace Belle2 {
36
37 public:
40
42 void initialize() override;
43
45 void event() override;
46
48 void setFEElectronics();
49
51 void terminate() override
52 {
53 if (m_xTalkFromDB) delete m_xTalkFromDB;
55 };
56
57 private:
60 std::string m_inputCDCHitsName;
67 float m_lowEdgeOfTimeWindow[c_nBoards] = {0};
68 float m_uprEdgeOfTimeWindow[c_nBoards] = {0};
69 unsigned short m_widthOfTimeWindow [c_nBoards] = {0};
71 double m_invOfTDCBinWidth = 0;
79 struct XTalkInfo {
81 XTalkInfo(unsigned short tdc, unsigned short adc, unsigned short tot, unsigned short status) :
82 m_tdc(tdc), m_adc(adc), m_tot(tot), m_status(status) {}
83 unsigned short m_tdc;
84 unsigned short m_adc;
85 unsigned short m_tot;
86 unsigned short m_status;
87 };
88 };
89
91} // end of Belle2 namespace
The Class for overlaying signal-induced asic cross-talk.
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
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.
Structure for saving the x-talk information.
XTalkInfo(unsigned short tdc, unsigned short adc, unsigned short tot, unsigned short status)
Constructor that initializes all members.