Belle II Software  release-08-01-10
TRGCDC Class Reference

The instance of TRGCDC is a singleton. More...

#include <TRGCDC.h>

Collaboration diagram for TRGCDC:

Public Types

enum  EReturnValueType {
  TSF = 1 << 0 ,
  ETF = 1 << 1 ,
  find2D = 1 << 2 ,
  fit2D = 1 << 3 ,
  find3D = 1 << 4 ,
  fit3D = 1 << 5 ,
  any = TSF | ETF | find2D | fit2D | find3D | fit3D
}
 Enum for returnValue types.
 

Public Member Functions

std::string name (void) const
 simulates track segment decisions. More...
 
std::string version (void) const
 returns version.
 
std::string versionCDC (void) const
 returns CDC version.
 
unsigned mode (void) const
 sets simulation mode.
 
unsigned mode (unsigned)
 sets simulation mode.
 
unsigned firmwareSimulationMode (void) const
 returns firmware simulation mode.
 
int getReturnValue (void) const
 gets return value for trg cdc module.
 
int getReturnValue (EReturnValueType const &moduleName) const
 gets return value for a module in trg cdc module.
 
void setReturnValue (EReturnValueType const &moduleName, bool flag)
 sets return value for trg cdc module.
 
void setReturnValue (int)
 sets return value for trg cdc module.
 
void dump (const std::string &message) const
 dumps debug information.
 
int debugLevel (void) const
 returns debug level.
 
int debugLevel (int) const
 sets and returns debug level.
 
float fudgeFactor (void) const
 returns fudge factor for drift time error.
 
float fudgeFactor (float)
 sets and returns fudge factor for drift time error.
 
std::vector< TRGCDCTrack * > getTrackList2D (void)
 returns 2D track list (no fit).
 
std::vector< TRGCDCTrack * > getTrackList2DFitted (void)
 returns 2D fitted track list.
 
std::vector< TRGCDCTrack * > getTrackList3D (void)
 returns 3D track list (fitted).
 
std::string getCDCHitCollectionName () const
 get name of the CDCHit DataStore array used as input
 
const TRGCDCWirewire (unsigned wireId) const
 returns a pointer to a wire. More...
 
const TRGCDCWirewire (unsigned layerId, int localId) const
 returns a pointer to a wire. More...
 
const TRGCDCWirewire (float r, float phi) const
 returns a pointer to a wire. More...
 
const TRGCDCLayerlayer (unsigned id) const
 returns a pointer to a layer. 0 will be returned if 'id' is invalid.
 
const std::vector< TRGCDCLayer * > * superLayer (unsigned id) const
 returns a pointer to a super-layer. More...
 
unsigned nLocalLayers (unsigned superLayerId) const
 returns # of wire layers in a super layer. More...
 
unsigned nWires (void) const
 return # of wires.
 
unsigned nSuperLayers (void) const
 returns # of super layers.
 
unsigned nLayers (void) const
 return # of layers.
 
unsigned nAxialLayers (void) const
 return # of axial layers.
 
unsigned nStereoLayers (void) const
 returns # of stereo layers.
 
unsigned nAxialSuperLayers (void) const
 return # of axial super layers.
 
unsigned nStereoSuperLayers (void) const
 returns # of stereo super layers.
 
float cellWidth (unsigned superLayerId) const
 returns cell width in unit of radian.
 
float superLayerR (unsigned superLayerId) const
 returns inner radius of super layer.
 
float superLayerR2 (unsigned superLayerId) const
 returns (inner radius)^2 of super layer.
 
unsigned nSegments (void) const
 returns # of track segments.
 
const TRGCDCSegmentsegment (unsigned id) const
 returns a track segment.
 
const TRGCDCSegmentsegment (unsigned lyrId, unsigned id) const
 returns a track segment.
 
const TRGCDCSegmentaxialSegment (unsigned lyrId, unsigned id) const
 returns a track segment in axial layers. (lyrId is axial #)
 
const TRGCDCSegmentstereoSegment (unsigned lyrId, unsigned id) const
 returns a track segment in stereo layers. (lyrId is stereo #)
 
unsigned nSegmentLayers (void) const
 returns # of track segment layers.
 
const TRGCDCLayersegmentLayer (unsigned id) const
 returns a pointer to a track segment layer. More...
 
unsigned nSegments (unsigned id) const
 returns # of track segments in a layer.
 
void clear (void)
 clears all TRGCDC hit information.
 
void fastClear (void)
 clears TRGCDC information.
 
void update ()
 updates TRGCDC wire information. clear() is called in this function.
 
void updateByData (int inputMode)
 updates TRGCDC wire information by Hardware data 0: From CDC FE ASCII file (Implementing) 1: From CDC FE-DAQ root file (Not implemented) 2: From TSIM root file (Not implemented)
 
std::vector< const TRGCDCWireHit * > hits (void) const
 returns a list of TRGCDCWireHit. More...
 
std::vector< const TRGCDCWireHit * > axialHits (void) const
 returns a list of axial hits. More...
 
std::vector< const TRGCDCWireHit * > stereoHits (void) const
 returns a list of stereo hits. More...
 
std::vector< const TRGCDCSegmentHit * > segmentHits (void) const
 returns a list of TRGCDCSegmentHit. More...
 
std::vector< const TRGCDCSegmentHit * > segmentHits (unsigned) const
 returns a list of TRGCDCSegmentHit in a super layer N. More...
 
std::vector< const TRGCDCSegmentHit * > axialSegmentHits (unsigned) const
 returns a list of TRGCDCSegmentHit in a axial super layer N. More...
 
std::vector< const TRGCDCSegmentHit * > stereoSegmentHits (unsigned) const
 returns a list of TRGCDCSegmentHit in a stereo super layer N. More...
 
std::vector< const TRGCDCWireHitMC * > hitsMC (void) const
 returns a list of TRGCDCWireHitMC. More...
 
int getEventTime (void) const
 returns bad hits(finding invalid hits). More...
 
std::string wireName (unsigned wireId) const
 returns wire name.
 
unsigned localId (unsigned wireId) const
 returns local ID in a layer. This function is expensive.
 
unsigned layerId (unsigned wireId) const
 returns layer ID. This function is expensive.
 
unsigned layerId (unsigned axialStereoSwitch, unsigned axialStereoLayerId) const
 returns layer ID from axialStereoLayerId. This function is expensive.
 
unsigned superLayerId (unsigned wireId) const
 returns super layer ID. This function is expensive.
 
unsigned localLayerId (unsigned wireId) const
 returns local layer ID in a super layer. This function is expensive.
 
unsigned axialStereoSuperLayerId (unsigned axialStereo, unsigned axialStereoLayerId) const
 returns axialStereo super layer ID. This function is expensive.
 
bool neighbor (const TRGCDCWire &w0, const TRGCDCWire &w1) const
 returns true if w0 and w1 are neighbor.
 
void perfect3DFinder (std::vector< TRGCDCTrack * > trackList) const
 fills stereo TSs to tracks using MC info.
 
const TRGClocksystemClock (void) const
 calculates corrected drift time. More...
 
const TRGClocksystemClockFE (void) const
 returns the system clock of the front-end
 
const TRGClockTDCClock (void) const
 returns the system clock of the trigger TDC after mergers (2 * front-end binwidth)
 
const TRGClockdataClock (void) const
 returns the data clock.
 
int firmwareSimulationStart (void) const
 returns start clock of the firmware simulation in FE clock.
 
int firmwareSimulationStop (void) const
 returns stop clock of the firmware simulation in FE clock.
 
int firmwareSimulationStartDataClock (void) const
 returns start clock of the firmware simulation in data clock.
 
int firmwareSimulationStopDataClock (void) const
 returns stop clock of the firmware simulation in data clock.
 
const TRGClockuserClock3125 (void) const
 returns the user clock for Aurora 3.125 Gbps.
 
double systemOffsetMC (void) const
 returns the system offset in MC.
 
const TRGCDCFrontEndfrontEnd (unsigned id) const
 returns a front-end board.
 
const TRGCDCMergermerger (unsigned id) const
 returns a merger board.
 
TRGCDCTrackSegmentFindertsfboard (unsigned id) const
 returns a TSF board.
 
const TRGCDCTracker2Dtracker2D (unsigned id) const
 returns a 2D tracker board.
 

Static Public Member Functions

static TRGCDCgetTRGCDC (const std::string &configFile, unsigned simulationMode=0, unsigned fastSimulationMode=0, unsigned firmwareSimulationMode=0, int firmwareSimulationStart=0, int firmwareSimulationStop=32 *32 - 1, bool _makeRootFile=0, bool perfect2DFinder=false, bool perfect3DFinder=false, const std::string &innerTSLUTFile="?", const std::string &outerTSLUTFile="?", const std::string &rootTRGCDCFile="?", const std::string &rootFitter3DFile="?", unsigned houghFinderPeakMin=5, const std::string &houghMappingFilePlus="?", const std::string &houghMappingFileMinus="?", unsigned houghDoit=2, bool fLogicLUTTSF=0, bool fLRLUT=1, bool fFitter3Dsmclr=0, bool fFitter3Ds2DFit=1, bool fFitter3Ds2DFitDrift=0, double inefficiency=0, bool fileTSF=0, bool fileETF=0, int fverETF=0, bool fprintFirmETF=0, bool fileHough3D=0, int finder3DMode=0, bool fileFitter3D=0, bool fXtSimpleFitter3D=0, double TdcBinWidth=1., int trgCDCDataInputMode=0, const std::string &cdchitCollectionName="")
 returns TRGCDC object with specific configuration.
 
static TRGCDCgetTRGCDC (void)
 returns TRGCDC object. More...
 

Public Attributes

CDC::CDCGeometryParm_cdcp
 returns a pointer to CDCGeometryPar
 

Private Member Functions

 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.
 
virtual ~TRGCDC ()
 Destructor.
 
void initialize (unsigned houghFinderPeakMin, const std::string &houghMappingFilePlus, const std::string &houghMappingFileMinus, unsigned houghDoit)
 initializes CDC geometry.
 
void configure (void)
 configures trigger modules for firmware simulation.
 
void simulate (void)
 fast trigger simulation.
 
void storeSimulationResults (std::string collection2Dfinder, std::string collection2Dfitter, std::string collection3Dfitter)
 Save results of fast simulation to data store (segment hits & tracks). More...
 
void terminate (void)
 terminates when run is finished
 
void classification (void)
 classify hits.
 
void updateMC (void)
 updates TRGCDC information for MC.
 
void fastSimulation (void)
 Fast simulation.
 
void firmwareSimulation (void)
 Firmware simulation.
 
void saveCDCHitInformation (std::vector< std::vector< unsigned > > &)
 Save functions for ROOT.
 
void saveTRGHitInformation (std::vector< std::vector< int > > &)
 Save functions for ROOT.
 
void saveTRGRawInformation (std::vector< std::string > &)
 Save functions for ROOT.
 

Private Attributes

int _debugLevel
 Debug level.
 
const std::string _cdcVersion
 CDC version.
 
std::string _configFilename
 CDC trigger configuration filename.
 
unsigned _simulationMode
 Simulation mode.
 
unsigned _fastSimulationMode
 Fast simulation mode.
 
unsigned _firmwareSimulationMode
 Firmware simulation mode. More...
 
int _firmwareSimulationStart
 Fimrware simulation start clock in FE.
 
int _firmwareSimulationStop
 Fimrware simulation stop clock in FE.
 
TRGSignal _firmwareSimulationWindow
 Firmware simulation time window in FE.
 
int _firmwareSimulationStartDataClock
 Firmware simulation start clock in CDCTRG data clock.
 
int _firmwareSimulationStopDataClock
 Firmware simulation stop clock in CDCTRG data clock.
 
int _returnValue
 Return value for trg cdc module;.
 
std::vector< TRGCDCTrack * > _trackList2D
 Track list by 2D finding.
 
std::vector< TRGCDCTrack * > _trackList2DFitted
 Track list for 2D fitted tracks.
 
std::vector< TRGCDCTrack * > _trackList3D
 Track list for 3D fitted tracks.
 
bool _makeRootFile
 Switch for TRGCDC.root file.
 
const bool _perfect2DFinder
 Switch to activate perfect 2D finder.
 
const bool _perfect3DFinder
 Switch to activate perfect 3D finder.
 
std::string _innerTSLUTFilename
 The filename of LUT for the inner-most track segments.
 
std::string _outerTSLUTFilename
 The filename of LUT for outer track segments.
 
std::string _rootTRGCDCFilename
 The filename of root file for TRGCDC.
 
std::string _rootFitter3DFilename
 The filename of root file for Fitter3D.
 
bool _fLogicLUTTSF
 Switch for logic or LUT TSF.
 
bool _fLRLUT
 Switch for the LR LUT in Fitter3D.
 
bool _fFitter3Dsmclr
 Switch for MC L/R information in Fitter3D.
 
bool _fFitter3Ds2DFit
 Switch to us 2D fit or Hough finder results.
 
bool _fFitter3Ds2DFitDrift
 Switch to us wire 2D fit or drift 2D fit.
 
double _inefficiency
 Hit inefficiency parameter.
 
bool _fileTSF
 Switch for TSF.root file.
 
bool _fileETF
 Switch for ETF.root file.
 
int _fverETF
 Switch for selecting ETF version.
 
bool _fprintFirmETF
 Switch for printing Firmware inputs for ETF.
 
bool _fileHough3D
 Switch for Hough3D.root file.
 
int _finder3DMode
 Sets mode of 3DFinder.
 
bool _fileFitter3D
 Switch for Fitter3D.root file.
 
bool _fXtSimpleFitter3D
 Switch for using simple x-t curve or non-linear x-t curve. 0: non-linear 1: simple.
 
std::vector< std::vector< TRGCDCLayer * > * > _superLayers
 Super layers.
 
std::vector< std::vector< TRGCDCLayer * > * > _axialSuperLayers
 Axial super layers.
 
std::vector< std::vector< TRGCDCLayer * > * > _stereoSuperLayers
 Stereo super layers.
 
std::vector< TRGCDCLayer * > _layers
 All layers.
 
std::vector< TRGCDCLayer * > _axialLayers
 Axial layers.
 
std::vector< TRGCDCLayer * > _stereoLayers
 Stereo layers.
 
std::vector< TRGCDCWire * > _wires
 All wires.
 
std::vector< TRGCDCWire * > _hitWires
 Wires with a hit.
 
std::vector< TRGCDCWireHit * > _hits
 CDC hits.
 
std::vector< TRGCDCWireHit * > _axialHits
 CDC hits on axial wires.
 
std::vector< TRGCDCWireHit * > _stereoHits
 CDC hits on stereo wires.
 
std::vector< TRGCDCWireHit * > _badHits
 Bad CDC hits.(not used now)
 
std::vector< TRGCDCWireHitMC * > _hitsMC
 MC info. of CDC hits.
 
std::vector< TRGCDCSegment * > _tss
 Track Segments.
 
std::vector< TRGCDCSegment * > _tsSL [9]
 Track Segments.
 
std::vector< TRGCDCLayer * > _tsLayers
 Track Segment layers.
 
std::vector< TRGCDCSegmentHit * > _segmentHits
 Track Segments with hits.
 
std::vector< TRGCDCSegmentHit * > _segmentHitsSL [9]
 Track Segments with hits in each super layer.
 
float _fudgeFactor
 Fudge factor for position error.
 
float * _width
 Cell width in radian.
 
float * _r
 R of cell.
 
float * _r2
 R^2 of cell.
 
const TRGClock _clock
 CDC trigger system clock.
 
const TRGClock _clockFE
 CDC front end clock. Resolution is CDC TdcBinWidth.
 
const TRGClock _clockTDC
 CDC trigger TDC clock. More...
 
const TRGClock _clockD
 CDC trigger data clock.
 
const TRGClock _clockUser3125
 CDC trigger user clock for Aurora 3.125 Gbps.
 
const TRGClock _clockUser6250
 CDC trigger user clock for Aurora 6.250 Gbps.
 
const double _offset
 Timing offset of CDC trigger.
 
std::vector< TRGLink * > _links
 All serial links.
 
std::vector< TRGCDCFrontEnd * > _fronts
 CDC front-end boards.
 
std::vector< TRGCDCMerger * > _mergers
 CDC trigger merger boards.
 
std::vector< TRGCDCTrackSegmentFinder * > _tsfboards
 CDC trigger tsf boards.
 
std::vector< TRGCDCTracker2D * > _tracker2Ds
 CDC 2D finder boards.
 
TRGCDCTrackSegmentFinder_tsFinder
 Track Segement Finder.
 
TRGCDCPerfectFinder_pFinder
 Perfect 2D finder.
 
TRGCDCPerfectFinder_p3DFinder
 Perfect 3D finder.
 
TRGCDCHoughFinder_hFinder
 Hough finder.
 
TRGCDCHough3DFinder_h3DFinder
 Hough 3D finder.
 
TRGCDCFitter3D_fitter3D
 3D fitter.
 
std::vector< TRGCDCEventTime * > _eventTime
 EventTime.
 
int m_eventNum
 Event number.
 
TFile * m_file
 root file
 
TTree * m_tree
 root tree for reconstructed 3D tracks
 
TTree * m_treeAllTracks
 root tree for MC tracks
 
TTree * _tree2D
 root tree for 2D tracks
 
TClonesArray * m_fitParameters
 3D fit
 
TClonesArray * m_mcParameters
 MC.
 
TClonesArray * m_mcTrack4Vector
 MC track.
 
TClonesArray * m_mcTrackVertexVector
 MC vertex.
 
TClonesArray * m_mcTrackStatus
 MC track status.
 
TClonesArray * m_evtTime
 Event time.
 
TClonesArray * _tracks2D
 2D track information
 
int _trgCDCDataInputMode
 Switch for TRG CDC input mode.
 
std::string _cdchitCollectionName
 name of the CDCHit DataStore array used as input
 
TTree * m_treeROOTInput
 Debugging members for firmware ROOT input. More...
 
TClonesArray * m_rootCDCHitInformation
 [0]: iLayer, [1]: iWire, [2]: CDCADC, [3]: CDCTDC, [4]: CDC FE TRG timing
 
TClonesArray * m_rootTRGHitInformation
 [0]: iLayer, [1]: iWire, [2]: window number, [3]: priority timing
 
TClonesArray * m_rootTRGRawInformation
 [0]: iLayer, [1]: iWire, [2]: Timing(CDC), [3]: MatchNumber MatchNumber: 1: Only CDC, 2: Only TRG, 3: Both CDC & TRG More...
 

Static Private Attributes

static TRGCDC_cdc = 0
 CDC trigger singleton.
 

Friends

class TRGCDCModule
 

Detailed Description

The instance of TRGCDC is a singleton.

'TRGCDC::getTRGCDC()' gives you a pointer to access the TRGCDC. Geometrical information is initialized automatically. Before accessing hit information, user has to call 'update()' to initialize hit information event by event.

Definition at line 69 of file TRGCDC.h.

Member Data Documentation

◆ _clockTDC

const TRGClock _clockTDC
private

CDC trigger TDC clock.

After mergers 1 bit of TDC count is dropped, so binwidth is 2 * CDC TdcBinWidth.

Definition at line 681 of file TRGCDC.h.

◆ _firmwareSimulationMode

unsigned _firmwareSimulationMode
private

Firmware simulation mode.

bit0 : dump COE from front-ends bit1 : dump COE from mergers bit2 : dump COE from TSFs bit3 : dump COE from 2D trackers bit4 : dump COE from 3D trackers bit5 : dump COE from Neuro-trackers bit6 : dump COE from ETF

Definition at line 515 of file TRGCDC.h.

◆ m_rootTRGRawInformation

TClonesArray* m_rootTRGRawInformation
private

[0]: iLayer, [1]: iWire, [2]: Timing(CDC), [3]: MatchNumber MatchNumber: 1: Only CDC, 2: Only TRG, 3: Both CDC & TRG

root tree for ROOT input, for TRG raw info

Definition at line 788 of file TRGCDC.h.

◆ m_treeROOTInput

TTree* m_treeROOTInput
private

Debugging members for firmware ROOT input.

root tree for ROOT input

Definition at line 779 of file TRGCDC.h.


The documentation for this class was generated from the following files: