21#ifndef TRGCDCT3DCONVERTER_H
22#define TRGCDCT3DCONVERTER_H
27#include <framework/datastore/StoreArray.h>
28#include <framework/core/Module.h>
29#include <framework/datastore/StoreObjPtr.h>
30#include "trg/cdc/dataobjects/TRGCDCT3DUnpackerStore.h"
31#include <trg/cdc/dataobjects/CDCTriggerSegmentHit.h>
32#include <trg/cdc/dataobjects/CDCTriggerTrack.h>
33#include <framework/dataobjects/BinnedEventT0.h>
34#include "boost/multi_array.hpp"
44 class TRGCDCJSignalData;
46 namespace TRGCDCT3DCONVERTERSPACE {
63 virtual void event()
override;
72 virtual void endRun()
override;
81 void filterTSData(boost::multi_array<double, 4>& tsfFirmwareInfo,
82 boost::multi_array<double, 3>& tsfInfo);
85 void addTSDatastore(boost::multi_array<double, 3>& tsfInfo,
int isSt = 1);
89 boost::multi_array<double, 4>& axTsfFirmwareInfo);
95 void filter2DData(boost::multi_array<double, 3>& t2DFirmwareInfo,
96 boost::multi_array<double, 4>& t2DTsfFirmwareInfo, boost::multi_array<double, 2>& t2DInfo,
97 boost::multi_array<double, 3>& t2DTsfInfo);
100 void add2DDatastore(boost::multi_array<double, 2>& t2DInfo, boost::multi_array<double, 3>& t2DTsfInfo);
112 void filter3DData(boost::multi_array<double, 3>& t3DFirmwareInfo, boost::multi_array<double, 2>& t3DInfo);
115 void add3DDatastore(boost::multi_array<double, 2>& t3DInfo,
bool doConvert = 1);
121 int toTSID(
int iSL,
int iWire);
Accessor to arrays stored in the data store.
Type-safe access to single objects in the data store.
A class to hold common data for JSignals.
A module of TRGCDCT3DConverter.
std::string m_EventTimeName
name of the event time StoreObjPtr
unsigned m_fit3DWithTSIM
Mode for fitting with TSIM.
StoreArray< CDCTriggerTrack > m_tracks2D
list of 2D input tracks
void debug3DFirmware()
Used for debugging 3D firmware.
void addTSDatastore(boost::multi_array< double, 3 > &tsfInfo, int isSt=1)
adds tsfInfo to TS data store
bool m_add2DFinderToDatastore
Flag for adding 2D finder to datastore.
void store3DFirmSimData(boost::multi_array< double, 3 > &t3DFirmwareInfo)
uses firm sim with debug
Belle2::TRGCDCJSignalData * m_commonData
TRGCDCJSignalData for VHDL generation (jbkim's class)
int toSigned(int value, int nBits)
converts to signed value
void store3DFastSimData(boost::multi_array< double, 3 > &t3DFirmwareInfo)
uses fast sim with debug
virtual void initialize() override
Initilizes TRGCDCT3DConverterModule.
virtual void event() override
Called event by event.
std::string m_outputCollectionName
Name of the StoreArray containing the resulting 3D tracks.
StoreArray< CDCTriggerSegmentHit > m_hits
list of track segment hits
void filterTSData(boost::multi_array< double, 4 > &tsfFirmwareInfo, boost::multi_array< double, 3 > &tsfInfo)
filters tsfFirmwareInfo to tsfInfo
virtual void endRun() override
Called when run ended.
std::map< std::string, TRGCDCJLUT * > m_mLutStorage
TRGCDCJLUT for VHDL generation (jbkim's class)
virtual void terminate() override
Called when processing ended.
void add3DDatastore(boost::multi_array< double, 2 > &t3DInfo, bool doConvert=1)
adds t3DInfo to track data store
std::map< std::string, TRGCDCJSignal > m_mSignalStorage
TRGCDCJSignal for VHDL generation (jbkim's class)
void store2DFirmwareData(boost::multi_array< double, 3 > &t2DFirmwareInfo, boost::multi_array< double, 4 > &axTsfFirmwareInfo)
converts firmwareResults of 2D to a vector
std::string m_inputCollectionName
Name of the StoreArray containing the input tracks from the 2D fitter.
unsigned m_isVerbose
Switch printing detail information.
void store3DFirmwareData(boost::multi_array< double, 3 > &t3DFirmwareInfo)
converts firmwareResults of 3D to a vector
virtual void beginRun() override
Called when new run started.
bool m_add3DToDatastore
Flag for adding 3D to datastore.
virtual ~TRGCDCT3DConverterModule()
Destructor.
void storeTSFirmwareData(boost::multi_array< double, 4 > &tsfInfo)
converts firmwareResults of TS to a vector
bool m_addTSToDatastore
Flag for adding TS to datastore.
TRGCDCT3DConverterModule()
Constructor.
bool m_addEventTimeToDatastore
Flag for adding event time to datastore.
StoreArray< CDCTriggerTrack > m_tracks3D
list of 3D output tracks
StoreObjPtr< BinnedEventT0 > m_eventTime
StoreObjPtr containing the event time.
void filter3DData(boost::multi_array< double, 3 > &t3DFirmwareInfo, boost::multi_array< double, 2 > &t3DInfo)
filters t3DFirmwareInfo to t3DInfo
std::string version() const
returns version of TRGCDCT3DConverterModule.
void filter2DData(boost::multi_array< double, 3 > &t2DFirmwareInfo, boost::multi_array< double, 4 > &t2DTsfFirmwareInfo, boost::multi_array< double, 2 > &t2DInfo, boost::multi_array< double, 3 > &t2DTsfInfo)
** filters t2DFirmwareInfo to t2DInfo*/
int toTSID(int iSL, int iWire)
converts sl, iWire to continuous TS ID [0,2335]
std::string m_hitCollectionName
Name of the StoreArray containing the input track segment hits.
std::string m_firmwareResultCollectionName
Name of the StoreArray containing the input firmware results.
void add2DDatastore(boost::multi_array< double, 2 > &t2DInfo, boost::multi_array< double, 3 > &t2DTsfInfo)
adds t2DInfo to track data store
int t2DPhiTot3DPhi(int phi, int rho)
converts to 2D rho to 3D rho value, obselete
StoreArray< TRGCDCT3DUnpackerStore > m_firmwareResults
list of firmware results
Abstract base class for different kinds of events.