 |
Belle II Software
release-05-02-19
|
17 #define TRGCDC_UNDEFINED 999999
20 #include "trg/trg/Clock.h"
21 #include "trg/trg/Signal.h"
48 class TRGCDCWireHitMC;
50 class TRGCDCSegmentHit;
54 class TRGCDCTracker2D;
55 class TRGCDCTrackSegmentFinder;
56 class TRGCDCPerfectFinder;
57 class TRGCDCHoughFinder;
58 class TRGCDCHough3DFinder;
62 class TRGCDCEventTime;
81 any =
TSF | ETF | find2D | fit2D | find3D | fit3D
86 unsigned simulationMode = 0,
87 unsigned fastSimulationMode = 0,
92 bool perfect2DFinder =
false,
94 const std::string& innerTSLUTFile =
"?",
95 const std::string& outerTSLUTFile =
"?",
96 const std::string& rootTRGCDCFile =
"?",
97 const std::string& rootFitter3DFile =
"?",
98 unsigned houghFinderPeakMin = 5,
99 const std::string& houghMappingFilePlus =
"?",
100 const std::string& houghMappingFileMinus =
"?",
101 unsigned houghDoit = 2,
102 bool fLogicLUTTSF = 0,
104 bool fFitter3Dsmclr = 0,
105 bool fFitter3Ds2DFit = 1,
106 bool fFitter3Ds2DFitDrift = 0,
107 double inefficiency = 0,
111 bool fprintFirmETF = 0,
112 bool fileHough3D = 0,
113 int finder3DMode = 0,
114 bool fileFitter3D = 0,
115 bool fXtSimpleFitter3D = 0,
116 double TdcBinWidth = 1.,
117 int trgCDCDataInputMode = 0,
118 const std::string& cdchitCollectionName =
"");
127 TRGCDC(
const std::string& configFile,
128 unsigned simulationMode,
129 unsigned fastSimulationMode,
134 bool perfect2DFinder,
136 const std::string& innerTSLUTFile,
137 const std::string& outerTSLUTFile,
138 const std::string& rootTRGCDCFile,
139 const std::string& rootFitter3DFile,
140 unsigned houghFinderPeakMin,
141 const std::string& houghMappingFilePlus,
142 const std::string& houghMappingFileMinus,
147 bool fFitter3Ds2DFit,
148 bool fFitter3Ds2DFitDrift,
157 bool fXtSimpleFitter3D,
159 int trgCDCDataInputMode,
160 const std::string& cdchitCollectionName);
167 const std::string& houghMappingFilePlus,
168 const std::string& houghMappingFileMinus,
183 std::string collection2Dfitter,
184 std::string collection3Dfitter);
194 std::string
name(
void)
const;
197 std::string
version(
void)
const;
203 unsigned mode(
void)
const;
206 unsigned mode(
unsigned);
224 void dump(
const std::string& message)
const;
274 const std::vector<TRGCDCLayer*>*
superLayer(
unsigned id)
const;
281 unsigned nWires(
void)
const;
354 std::vector<const TRGCDCWireHit*>
hits(
void)
const;
358 std::vector<const TRGCDCWireHit*>
axialHits(
void)
const;
362 std::vector<const TRGCDCWireHit*>
stereoHits(
void)
const;
366 std::vector<const TRGCDCSegmentHit*>
segmentHits(
void)
const;
370 std::vector<const TRGCDCSegmentHit*>
segmentHits(
unsigned)
const;
382 std::vector<const TRGCDCWireHitMC*>
hitsMC(
void)
const;
393 std::string
wireName(
unsigned wireId)
const;
396 unsigned localId(
unsigned wireId)
const;
399 unsigned layerId(
unsigned wireId)
const;
402 unsigned layerId(
unsigned axialStereoSwitch,
403 unsigned axialStereoLayerId)
const;
413 unsigned axialStereoLayerId)
const;
648 std::vector<TRGCDCSegment*>
_tss;
651 std::vector<TRGCDCSegment*>
_tsSL[9];
835 const std::vector<TRGCDCLayer*>*
943 return *
_tsSL[a * 2][b];
950 return *
_tsSL[a * 2 + 1][b];
996 std::vector<const TRGCDCSegmentHit*>
999 std::vector<const TRGCDCSegmentHit*> t;
1005 std::vector<const TRGCDCSegmentHit*>
1008 std::vector<const TRGCDCSegmentHit*> t;
1014 std::vector<const TRGCDCSegmentHit*>
1017 std::vector<const TRGCDCSegmentHit*> t;
1023 std::vector<const TRGCDCSegmentHit*>
1026 std::vector<const TRGCDCSegmentHit*> t;
std::string _configFilename
CDC trigger configuration filename.
A class to find 2D tracks using MC information.
const TRGClock _clockUser6250
CDC trigger user clock for Aurora 6.250 Gbps.
unsigned localId(unsigned wireId) const
returns local ID in a layer. This function is expensive.
unsigned firmwareSimulationMode(void) const
returns firmware simulation mode.
std::vector< TRGCDCWire * > _wires
All wires.
A class to represent a digitized signal. Unit is nano second.
float * _width
Cell width in radian.
const TRGCDCFrontEnd * frontEnd(unsigned id) const
returns a front-end board.
std::vector< TRGCDCTrack * > getTrackList3D(void)
returns 3D track list (fitted).
const TRGCDCSegment & axialSegment(unsigned lyrId, unsigned id) const
returns a track segment in axial layers. (lyrId is axial #)
TTree * m_treeROOTInput
Debugging members for firmware ROOT input.
std::string _outerTSLUTFilename
The filename of LUT for outer track segments.
std::vector< const TRGCDCSegmentHit * > stereoSegmentHits(unsigned) const
returns a list of TRGCDCSegmentHit in a stereo super layer N.
std::vector< TRGCDCTrack * > getTrackList2DFitted(void)
returns 2D fitted track list.
TRGCDCHoughFinder * _hFinder
Hough finder.
std::vector< TRGCDCTrackSegmentFinder * > _tsfboards
CDC trigger tsf boards.
std::vector< const TRGCDCSegmentHit * > segmentHits(void) const
returns a list of TRGCDCSegmentHit.
std::vector< std::vector< TRGCDCLayer * > * > _axialSuperLayers
Axial super layers.
bool _fLogicLUTTSF
Switch for logic or LUT TSF.
TRGCDCFitter3D * _fitter3D
3D fitter.
void firmwareSimulation(void)
Firmware simulation.
float fudgeFactor(void) const
returns fudge factor for drift time error.
const TRGCDCSegment & stereoSegment(unsigned lyrId, unsigned id) const
returns a track segment in stereo layers. (lyrId is stereo #)
void storeSimulationResults(std::string collection2Dfinder, std::string collection2Dfitter, std::string collection3Dfitter)
Save results of fast simulation to data store (segment hits & tracks).
std::vector< TRGCDCTracker2D * > _tracker2Ds
CDC 2D finder boards.
double systemOffsetMC(void) const
returns the system offset in MC.
const TRGClock _clockD
CDC trigger data clock.
std::vector< TRGCDCLayer * > _tsLayers
Track Segment layers.
unsigned nAxialLayers(void) const
return # of axial layers.
std::string _rootFitter3DFilename
The filename of root file for Fitter3D.
unsigned _firmwareSimulationMode
Firmware simulation mode.
unsigned nLayers(void) const
return # of layers.
const TRGClock _clockUser3125
CDC trigger user clock for Aurora 3.125 Gbps.
unsigned nSegmentLayers(void) const
returns # of track segment layers.
static TRGCDC * _cdc
CDC trigger singleton.
TClonesArray * _tracks2D
2D track information
std::vector< TRGCDCSegmentHit * > _segmentHits
Track Segments with hits.
TTree * m_treeAllTracks
root tree for MC tracks
void dump(const std::string &message) const
dumps debug information.
bool _fLRLUT
Switch for the LR LUT in Fitter3D.
This class is the interface between TSim/Basf2 TSF module and the firmware simulation core of XSim/IS...
void simulate(void)
fast trigger simulation.
std::vector< TRGCDCEventTime * > _eventTime
EventTime.
std::vector< TRGCDCLayer * > _layers
All layers.
void fastClear(void)
clears TRGCDC information.
float _fudgeFactor
Fudge factor for position error.
std::vector< TRGCDCWireHit * > _hits
CDC hits.
const std::vector< TRGCDCLayer * > * superLayer(unsigned id) const
returns a pointer to a super-layer.
TClonesArray * m_mcTrackStatus
MC track status.
A class to represent a wire in CDC.
TRGSignal _firmwareSimulationWindow
Firmware simulation time window in FE.
std::string _innerTSLUTFilename
The filename of LUT for the inner-most track segments.
TRGCDCHough3DFinder * _h3DFinder
Hough 3D finder.
void updateByData(int inputMode)
updates TRGCDC wire information by Hardware data 0: From CDC FE ASCII file (Implementing) 1: From CDC...
bool _fileFitter3D
Switch for Fitter3D.root file.
TClonesArray * m_evtTime
Event time.
float superLayerR(unsigned superLayerId) const
returns inner radius of super layer.
TClonesArray * m_mcParameters
MC.
A class to represent a CDC front-end board.
std::string _cdchitCollectionName
name of the CDCHit DataStore array used as input
std::vector< const TRGCDCSegmentHit * > axialSegmentHits(unsigned) const
returns a list of TRGCDCSegmentHit in a axial super layer N.
std::string name(void) const
simulates track segment decisions.
TClonesArray * m_mcTrack4Vector
MC track.
std::vector< const TRGCDCWireHit * > axialHits(void) const
returns a list of axial hits.
bool _fprintFirmETF
Switch for printing Firmware inputs for ETF.
unsigned nWires(void) const
return # of wires.
std::vector< const TRGCDCWireHit * > stereoHits(void) const
returns a list of stereo hits.
const std::string _cdcVersion
CDC version.
A class to represent a CDC merger board.
const TRGClock & TDCClock(void) const
returns the system clock of the trigger TDC after mergers (2 * front-end binwidth)
A class to represent a CDC 2D tracker board.
const TRGClock & dataClock(void) const
returns the data clock.
const bool _perfect3DFinder
Switch to activate perfect 3D finder.
void updateMC(void)
updates TRGCDC information for MC.
const TRGCDCLayer * layer(unsigned id) const
returns a pointer to a layer. 0 will be returned if 'id' is invalid.
int _debugLevel
Debug level.
bool neighbor(const TRGCDCWire &w0, const TRGCDCWire &w1) const
returns true if w0 and w1 are neighbor.
A class to represent a cell layer.
std::vector< const TRGCDCWireHitMC * > hitsMC(void) const
returns a list of TRGCDCWireHitMC.
int _firmwareSimulationStartDataClock
Firmware simulation start clock in CDCTRG data clock.
int _finder3DMode
Sets mode of 3DFinder.
const TRGClock _clockFE
CDC front end clock. Resolution is CDC TdcBinWidth.
void initialize(unsigned houghFinderPeakMin, const std::string &houghMappingFilePlus, const std::string &houghMappingFileMinus, unsigned houghDoit)
initializes CDC geometry.
std::vector< TRGCDCWireHitMC * > _hitsMC
MC info. of CDC hits.
TRGCDCTrackSegmentFinder * _tsFinder
Track Segement Finder.
std::vector< TRGCDCTrack * > getTrackList2D(void)
returns 2D track list (no fit).
int debugLevel(void) const
returns debug level.
int _returnValue
Return value for trg cdc module;.
TClonesArray * m_fitParameters
3D fit
void classification(void)
classify hits.
unsigned _fastSimulationMode
Fast simulation mode.
unsigned superLayerId(unsigned wireId) const
returns super layer ID. This function is expensive.
unsigned nSuperLayers(void) const
returns # of super layers.
int firmwareSimulationStartDataClock(void) const
returns start clock of the firmware simulation in data clock.
TRGCDCPerfectFinder * _p3DFinder
Perfect 3D finder.
The Class for CDC Geometry Parameters.
float superLayerR2(unsigned superLayerId) const
returns (inner radius)^2 of super layer.
const double _offset
Timing offset of CDC trigger.
unsigned layerId(unsigned wireId) const
returns layer ID. This function is expensive.
const TRGClock _clock
CDC trigger system clock.
int getReturnValue(void) const
gets return value for trg cdc module.
int firmwareSimulationStopDataClock(void) const
returns stop clock of the firmware simulation in data clock.
int _trgCDCDataInputMode
Switch for TRG CDC input mode.
bool _fFitter3Ds2DFitDrift
Switch to us wire 2D fit or drift 2D fit.
class of TRGCDCHough3DFinder
std::vector< TRGCDCMerger * > _mergers
CDC trigger merger boards.
a class of TrackSegmentFinder in TRGCDC
std::string wireName(unsigned wireId) const
returns wire name.
const TRGCDCLayer * segmentLayer(unsigned id) const
returns a pointer to a track segment layer.
Abstract base class for different kinds of events.
const TRGClock & systemClock(void) const
calculates corrected drift time.
TClonesArray * m_rootCDCHitInformation
[0]: iLayer, [1]: iWire, [2]: CDCADC, [3]: CDCTDC, [4]: CDC FE TRG timing
bool _fileTSF
Switch for TSF.root file.
unsigned nLocalLayers(unsigned superLayerId) const
returns # of wire layers in a super layer.
EReturnValueType
Enum for returnValue types.
int _fverETF
Switch for selecting ETF version.
static TRGCDC * getTRGCDC(void)
returns TRGCDC object.
void perfect3DFinder(std::vector< TRGCDCTrack * > trackList) const
fills stereo TSs to tracks using MC info.
unsigned localLayerId(unsigned wireId) const
returns local layer ID in a super layer. This function is expensive.
std::vector< TRGCDCSegmentHit * > _segmentHitsSL[9]
Track Segments with hits in each super layer.
std::vector< TRGCDCFrontEnd * > _fronts
CDC front-end boards.
TRGCDCTrackSegmentFinder * tsfboard(unsigned id) const
returns a TSF board.
bool _fileHough3D
Switch for Hough3D.root file.
std::string getCDCHitCollectionName() const
get name of the CDCHit DataStore array used as input
std::vector< TRGCDCWireHit * > _axialHits
CDC hits on axial wires.
const TRGClock _clockTDC
CDC trigger TDC clock.
int getEventTime(void) const
returns bad hits(finding invalid hits).
std::vector< TRGCDCWire * > _hitWires
Wires with a hit.
std::vector< TRGCDCSegment * > _tsSL[9]
Track Segments.
TClonesArray * m_rootTRGHitInformation
[0]: iLayer, [1]: iWire, [2]: window number, [3]: priority timing
const TRGCDCSegment & segment(unsigned id) const
returns a track segment.
int _firmwareSimulationStop
Fimrware simulation stop clock in FE.
std::string version(void) const
returns version.
void setReturnValue(EReturnValueType const &moduleName, bool flag)
sets return value for trg cdc module.
TTree * _tree2D
root tree for 2D tracks
unsigned mode(void) const
sets simulation mode.
std::vector< std::vector< TRGCDCLayer * > * > _stereoSuperLayers
Stereo super layers.
The instance of TRGCDC is a singleton.
bool _fXtSimpleFitter3D
Switch for using simple x-t curve or non-linear x-t curve. 0: non-linear 1: simple.
float cellWidth(unsigned superLayerId) const
returns cell width in unit of radian.
CDC::CDCGeometryPar * m_cdcp
returns a pointer to CDCGeometryPar
unsigned nStereoLayers(void) const
returns # of stereo layers.
A module to simulate the CDC trigger.
A class to represent a wire in CDC.
bool _fFitter3Ds2DFit
Switch to us 2D fit or Hough finder results.
unsigned _simulationMode
Simulation mode.
const TRGClock & userClock3125(void) const
returns the user clock for Aurora 3.125 Gbps.
unsigned nStereoSuperLayers(void) const
returns # of stereo super layers.
void update()
updates TRGCDC wire information. clear() is called in this function.
TRGCDC(const std::string &configFile, unsigned simulationMode, unsigned fastSimulationMode, unsigned firmwareSimulationMode, int firmwareSimulationStart, int firmwareSimulationStop, bool makeRootFile, bool perfect2DFinder, bool perfect3DFinder, const std::string &innerTSLUTFile, const std::string &outerTSLUTFile, const std::string &rootTRGCDCFile, const std::string &rootFitter3DFile, unsigned houghFinderPeakMin, const std::string &houghMappingFilePlus, const std::string &houghMappingFileMinus, unsigned houghDoit, bool fLogicLUTTSF, bool fLRLUT, bool fFitter3Dsmclr, bool fFitter3Ds2DFit, bool fFitter3Ds2DFitDrift, double inefficiecny, bool fileTSF, bool fileETF, int fverETF, bool fprintFirmETF, bool fileHough3D, int finder3DMode, bool fileFitter3D, bool fXtSimpleFitter3D, double TdcBinWidth, int trgCDCDataInputMode, const std::string &cdchitCollectionName)
Constructor.
std::vector< TRGCDCWireHit * > _badHits
Bad CDC hits.(not used now)
void saveCDCHitInformation(std::vector< std::vector< unsigned > > &)
Save functions for ROOT.
int firmwareSimulationStart(void) const
returns start clock of the firmware simulation in FE clock.
TTree * m_tree
root tree for reconstructed 3D tracks
std::vector< TRGCDCWireHit * > _stereoHits
CDC hits on stereo wires.
std::vector< TRGLink * > _links
All serial links.
const bool _perfect2DFinder
Switch to activate perfect 2D finder.
const TRGClock & systemClockFE(void) const
returns the system clock of the front-end
int m_eventNum
Event number.
bool _makeRootFile
Switch for TRGCDC.root file.
std::string _rootTRGCDCFilename
The filename of root file for TRGCDC.
std::vector< const TRGCDCWireHit * > hits(void) const
returns a list of TRGCDCWireHit.
void clear(void)
clears all TRGCDC hit information.
void fastSimulation(void)
Fast simulation.
A class to find tracks using Hough algorithm.
std::vector< TRGCDCLayer * > _stereoLayers
Stereo layers.
void terminate(void)
terminates when run is finished
std::vector< TRGCDCTrack * > _trackList2DFitted
Track list for 2D fitted tracks.
unsigned nAxialSuperLayers(void) const
return # of axial super layers.
double _inefficiency
Hit inefficiency parameter.
std::vector< std::vector< TRGCDCLayer * > * > _superLayers
Super layers.
void saveTRGHitInformation(std::vector< std::vector< int > > &)
Save functions for ROOT.
int firmwareSimulationStop(void) const
returns stop clock of the firmware simulation in FE clock.
const TRGCDCMerger * merger(unsigned id) const
returns a merger board.
unsigned nSegments(void) const
returns # of track segments.
TClonesArray * m_rootTRGRawInformation
[0]: iLayer, [1]: iWire, [2]: Timing(CDC), [3]: MatchNumber MatchNumber: 1: Only CDC,...
void configure(void)
configures trigger modules for firmware simulation.
void saveTRGRawInformation(std::vector< std::string > &)
Save functions for ROOT.
unsigned axialStereoSuperLayerId(unsigned axialStereo, unsigned axialStereoLayerId) const
returns axialStereo super layer ID. This function is expensive.
std::vector< TRGCDCLayer * > _axialLayers
Axial layers.
const TRGCDCTracker2D * tracker2D(unsigned id) const
returns a 2D tracker board.
A class to fit tracks in 3D.
A class to represent a digitized signal. Unit is nano second.
std::string versionCDC(void) const
returns CDC version.
virtual ~TRGCDC()
Destructor.
std::vector< TRGCDCSegment * > _tss
Track Segments.
bool _fileETF
Switch for ETF.root file.
TClonesArray * m_mcTrackVertexVector
MC vertex.
int _firmwareSimulationStopDataClock
Firmware simulation stop clock in CDCTRG data clock.
bool _fFitter3Dsmclr
Switch for MC L/R information in Fitter3D.
int _firmwareSimulationStart
Fimrware simulation start clock in FE.
TRGCDCPerfectFinder * _pFinder
Perfect 2D finder.
std::vector< TRGCDCTrack * > _trackList3D
Track list for 3D fitted tracks.
const TRGCDCWire * wire(unsigned wireId) const
returns a pointer to a wire.
std::vector< TRGCDCTrack * > _trackList2D
Track list by 2D finding.