Belle II Software  release-08-01-10
Collaboration diagram for trg:

Modules

 trg data objects
 
 trg modules
 

Classes

class  CDCTrigger2DConfig
 The payload class for delay of GDL input bit. More...
 
class  CDCTriggerDeadch
 The payload class for delay of GDL input bit. More...
 
class  CDCTriggerNeuroConfig
 The payload class for all CDC Neurotrigger information. More...
 
class  TRGCDCCell
 A class to represent a wire in CDC. More...
 
class  TRGCDCCellHit
 A class to represent a wire hit in CDC. More...
 
class  TRGCDCCircle
 A class to represent a circle. More...
 
class  TRGCDCCircleFitter
 A class to fit a TTrackBase object to a circle. More...
 
struct  clusterer_params
 
class  SimpleCluster
 Type for found clusters. More...
 
class  Clusterizend
 Clustering module. More...
 
class  TRGCDCEventTime
 A class of TRGCDC Event Time. More...
 
class  TRGCDCEventTimeFinder
 A class of TRGCDC Event Time Finder. More...
 
class  TRGCDCFitter
 A class to fit a TRGCDCTrackBase object. More...
 
class  TRGCDCFitter3D
 A class to fit tracks in 3D. More...
 
class  TRGCDCFrontEnd
 A class to represent a CDC front-end board. More...
 
class  TRGCDCHelix
 TRGCDCHelix parameter class. More...
 
class  TRGCDCHough3DFinder
 class of TRGCDCHough3DFinder More...
 
class  TRGCDCHoughFinder
 A class to find tracks using Hough algorithm. More...
 
class  TRGCDCHoughPlane
 A class to represent a Hough parameter plane. More...
 
class  TRGCDCHoughPlaneBase
 A class to represent a Hough parameter plane. More...
 
class  TRGCDCHoughPlaneBoolean
 A class to represent a Hough parameter plane. More...
 
class  TRGCDCHoughPlaneMulti
 A class to represent a Hough parameter plane. More...
 
class  TRGCDCHoughPlaneMulti2
 A class to represent a Hough parameter plane. More...
 
class  TRGCDCHoughTransformation
 An abstract class to represent a Hough transformation. More...
 
class  TRGCDCHoughTransformationCircle
 A class to represent circle Hough transformation. More...
 
class  TRGCDCJLUT
 A class to use LUTs for TRGCDC. More...
 
class  TRGCDCJSignal
 A class to use Signals for TRGCDC 3D tracker. More...
 
class  TRGCDCJSignalData
 A class to hold common data for JSignals. More...
 
class  TRGCDCLayer
 A class to represent a cell layer. More...
 
class  TRGCDCLink
 A class to relate TRGCDCCellHit and TRGCDCTrack objects. More...
 
class  TRGCDCLpar
 TRGCDCLpar class. More...
 
class  TRGCDCLpav
 TRGCDCLpav class. More...
 
class  TRGCDCLUT
 A class to use LUTs for TRGCDC. More...
 
class  TRGCDCMerger
 A class to represent a CDC merger board. More...
 
struct  cellweight
 
class  NDFinderTrack
 Store track parameters of found tracks. More...
 
class  NDFinder
 Class to represent the CDC NDFinder. More...
 
struct  ndbinning
 Default binning in a (7/32) phi-sector. More...
 
class  NeuroTrigger
 Class to represent the CDC Neurotrigger. More...
 
class  NNTParam< T >
 Class to represent a complete set to describe a Neurotrigger. More...
 
class  NeuroTriggerParameters
 
class  TRGOpticalLinkFrontEnd
 A class to represent a serial link between trigger modules. More...
 
class  TRGCDCPeakFinder
 A class to find peaks in Hough Plane. More...
 
class  TRGCDCPerfectFinder
 A class to find 2D tracks using MC information. More...
 
class  TRGCDCRelation
 A class to represent a wire in CDC. More...
 
class  TRGCDCSegment
 A class to represent a wire in CDC. More...
 
class  TRGCDCSegmentHit
 A class to represent a track segment hit in CDC. More...
 
class  TRGCDCSteppingAction
 A class to control a track in G4. More...
 
class  TRGCDCTrackBase
 A class to represent a track object in TRGCDC. More...
 
class  TRGCDCTracker2D
 A class to represent a CDC 2D tracker board. More...
 
class  TRGCDCTrackMC
 A class to represent a GEN_HEPEVT particle in tracking. More...
 
class  TRGCDCTrackSegmentFinder
 a class of TrackSegmentFinder in TRGCDC More...
 
class  TRGCDC
 The instance of TRGCDC is a singleton. More...
 
class  TRGCDCTrack
 A class to represent a reconstructed charged track in TRGCDC. More...
 
class  TRGCDCWire
 A class to represent a wire in CDC. More...
 
class  TRGCDCWireHit
 A class to represent a wire hit in CDC. More...
 
class  TRGCDCWireHitMC
 A class to represent a MC wire hit in CDC. More...
 
class  TRGECLBadRun
 Raw TC result nefor digitizing. More...
 
class  TrgEclDatabaseImporter
 Database importer of TRGECL. More...
 
class  TRGECLETMPara
 Raw TC result nefor digitizing. More...
 
class  TRGECLFAMPara
 Raw TC result nefor digitizing. More...
 
class  TRGECLTMMPara
 Raw TC result nefor digitizing. More...
 
class  TrgEclBeamBKG
 A Class of ECL Trigger clustering
More...
 
class  TrgEclBhabha
 A Class of ECL Trigger clustering
More...
 
class  TrgEclCluster
 A Class of ECL Trigger clustering
More...
 
class  TrgEclDataBase
 class TrgEclDataBase; More...
 
class  TrgEclDigitizer
 FAM module
More...
 
class  TrgEclFAMFit
 FAM module
More...
 
class  TrgEclMapping
 A class of TC Mapping. More...
 
class  TrgEclMaster
 ETM class. More...
 
class  TrgEclTiming
 A Class of ECL Trigger clustering
More...
 
class  TRGGDLDBAlgs
 The payload class for GDL algorithm. More...
 
class  TRGGDLDBDelay
 The payload class for delay of GDL input bit. More...
 
class  TRGGDLDBUnpacker
 The payload class for PXD cluster charge calibrations. More...
 
class  TrgBit
 A general interface to get a trigger response. More...
 
class  TRGGDL
 The instance of TRGGDL is a singleton. More...
 
class  GRLNeuro
 Class to represent the GRL Neuro. More...
 
class  TRGGRL
 a class for TRGGRL More...
 
class  TRGGRLMatch
 A class to represent a matching candidate in TRGGRL A matching candidate consists of a TRGCDCTrack and TRGECLCluster. More...
 
class  KLMTriggerParameters
 DBObject containing parameters used in KLMTrigger module. More...
 
class  TRGArea2D
 A class to represent an 2D area. More...
 
class  TRGBitStream
 A class to represent a bit stream. More...
 
class  TRGBoard
 A class to represent a trigger board. More...
 
class  TRGChannel
 A class to represent a serial link between trigger hardware modules. More...
 
class  TRGClock
 A class to represent a digitized signal. Unit is nano second. More...
 
class  TRGDebug
 A class for debugging of TSIM. More...
 
class  TRGOpticalLink
 A class to represent a serial link between trigger modules. More...
 
class  TRGPoint2D
 A class to represent a point in 2D. More...
 
class  TRGSignal
 A class to represent a digitized signal. Unit is nano second. More...
 
class  TRGSignalBundle
 A class to represent a bundle of SignalVectors. More...
 
class  TRGSignalVector
 A class to represent a bundle of digitized signals. More...
 
class  TRGState
 A class to represent a state of multi bits. More...
 
class  TRGTime
 A class to represent a signal timing in the trigger system. More...
 
class  TRGUtilities
 A class to provide TRG utility functions. More...
 

Macros

#define TRGCDCFitAlreadyFitted   1;
 parameter to identify fit result
 
#define TRGCDCFitErrorFewHits   -1;
 parameter to identify fit result
 
#define TRGCDCFitFailed   -2;
 parameter to identify fit result
 
#define TRGCDCFitUnavailable   -3;
 parameter to identify fit result
 
#define TFITTER_INLINE_DEFINE_HERE
 
#define N_LAYERS   6
 number of layers
 
#define WireInnerLeft   0
 type of the wire
 
#define WireInnerRight   1
 type of the wire
 
#define WireLeft   2
 type of the wire
 
#define WireRight   3
 type of the wire
 
#define WireOuterLeft   4
 type of the wire
 
#define WireOuterRight   5
 type of the wire
 
#define MaxNeighbors   6
 Max number of neighbors.
 

Typedefs

typedef HepGeom::Point3D< double > Point3D
 3D point
 
typedef HepGeom::Vector3D< double > Vector3D
 3D Vector
 
typedef unsigned short c5elem
 Store hit patterns in a 5D array (hitid, prio, omega, phi, theta)
 
typedef boost::multi_array< c5elem, 5 > c5array
 
typedef c5array::index c5index
 
typedef unsigned short c3elem
 The Hough space is a 3D array (omega, phi, theta)
 
typedef boost::multi_array< c3elem, 3 > c3array
 
typedef c3array::index c3index
 
typedef unsigned short c2elem
 TS-Id to 1/32 phi-sector mapping is stored in a 2D array.
 
typedef boost::multi_array< c2elem, 2 > c2array
 
typedef c2array::index c2index
 
typedef std::vector< c3index > cell_index
 
typedef unsigned short ushort
 

Functions

int intersect (const TRGCDCLpar &lp1, const TRGCDCLpar &lp2, CLHEP::HepVector &v1, CLHEP::HepVector &v2)
 intersection
 
std::ostream & operator<< (std::ostream &o, const TRGCDCLpar &s)
 ostream operator
 
float prob_ (float *, int *)
 prob function
 
static double err_dis_inv (double x, double y, double w, double a, double b)
 distance error
 
std::ostream & operator<< (std::ostream &o, const TRGCDCLpav &a)
 ostream operator
 
TRGCDCLpav operator+ (const TRGCDCLpav &la1, const TRGCDCLpav &la2)
 
bool rlrel (vector< unsigned > a, vector< unsigned > b)
 ...rlrel...
 
bool udrel (vector< unsigned > a, vector< unsigned > b)
 ...udrel...
 
bool mirel (vector< unsigned > a, vector< unsigned > b)
 ...mirel...
 
unsigned short FindCP1 (vector< unsigned > a)
 ...Find center Pattern1 from Pattern 2
 
unsigned FindP1C (vector< unsigned > a)
 ...Pattern1 Center...
 
void ftd_0_01 (bool *b, const bool *i)
 
int doprescale (int f)
 select one event in number of prescale factor events
 
std::ostream & operator<< (std::ostream &, const TRGPoint2D &)
 ostrream operator
 
const HepGeom::Point3D< double > ORIGIN (0, 0, 0)
 Origin 3D point.
 
unsigned id (void) const
 returns id.
 
unsigned localId (void) const
 returns local id in a layer.
 
unsigned layerId (void) const
 returns layer id.
 
unsigned superLayerId (void) const
 returns super layer id.
 
unsigned localLayerId (void) const
 returns local layer id in a super layer.
 
const TRGCDCLayerlayer (void) const
 returns a pointer to a layer.
 
unsigned state (void) const
 returns state.
 
unsigned state (unsigned newState)
 sets state.
 
bool axial (void) const
 returns true if this wire is in an axial layer.
 
bool stereo (void) const
 returns true if this wire is in a stereo layer.
 
unsigned axialStereoLayerId (void) const
 returns id of axial or stereo layer id.
 
unsigned axialStereoSuperLayerId (void) const
 returns id of axial or stereo super layer id.
 
bool innerPart (void) const
 returns true if this wire is in the inner part.
 
bool mainPart (void) const
 returns true if this wire is in the main part.
 
float cellSize (void) const
 calculates position and direction vector with sag correction. More...
 
virtual void clear (void)
 clears information.
 
const HepGeom::Point3D< double > & forwardPosition (void) const
 returns position in forward endplate.
 
const HepGeom::Point3D< double > & backwardPosition (void) const
 returns position in backward endplate.
 
double * backwardPosition (double p[3]) const
 position in backward endplate.
 
const HepGeom::Point3D< double > & xyPosition (void) const
 returns middle position of a wire. z componet is 0.
 
double * xyPosition (double p[3]) const
 middle position of a wire. z componet is 0.
 
const Vector3Ddirection (void) const
 returns direction vector of the wire.
 
const TRGCDCCellHithit (void) const
 returns a pointer to a TRGCDCCellHit.
 
const TRGCDCCellHithit (const TRGCDCCellHit *)
 sets a pointer to TRGCDCWireHit.
 
virtual bool hasMember (const std::string &a) const
 returns true this has member named a.
 
int mcLR (void) const
 returns mc left/right information
 
virtual const TRGCDCCellcell (void) const
 returns a pointer to a TRGCDCWire.
 
unsigned state (void) const
 returns state.
 
float drift (unsigned) const
 returns drift distance.
 
float dDrift (unsigned) const
 returns drift distance error.
 
float drift (void) const
 returns drift distance.
 
float dDrift (void) const
 returns drift distance error.
 
const HepGeom::Point3D< double > & xyPosition (void) const
 returns position in the middle of wire. z is always zero, however.
 
unsigned state (unsigned newState)
 sets state. Meaning of bits are written below.
 
unsigned state (unsigned newState) const
 sets state. Meaning of bits are written below. (tmp)
 
const void * track (void) const
 assigns a pointer to a TTrack.
 
const void * track (const void *)
 assigns a pointer to a TTrack.
 
const void * track (const void *) const
 assigns a pointer to a TTrack. (tmp)
 
unsigned sequence (void) const
 returns sequential Length in one segment : this parameter is used in TCurlFinder now.
 
unsigned sequence (unsigned) const
 sets sequential length in one segment : this parameter is used in TCurlFinder now.
 
void setDriftTime (double driftTime, unsigned i)
 Sets drift time.
 
unsigned iCDCHit (void) const
 returns an index to CDCHit.
 
unsigned iCDCSimHit (void) const
 returns an index to CDCSimHit.
 
unsigned iMCParticle (void) const
 returns an index to MCParticle.
 
double pt (void) const override
 returns Pt.
 
const TRGPoint2Dcenter (void) const
 returns the circle center.
 
double radius (void) const
 returns radius.
 
virtual unsigned objectType (void) const override
 returns type.
 
void property (double charge, double radius, HepGeom::Point3D< double > center)
 sets circle properties.
 
const std::string & name (void) const
 returns name.
 
const HepGeom::Point3D< double > & center (void) const
 returns position of helix center(z = 0.);
 
const HepGeom::Point3D< double > & pivot (void) const
 returns pivot position.
 
double radius (void) const
 returns radious of helix.
 
CLHEP::Hep3Vector direction (double dPhi=0.) const
 returns direction vector after rotating angle dPhi in phi direction.
 
double dr (void) const
 returns dr.
 
double phi0 (void) const
 returns phi0.
 
double kappa (void) const
 returns kappa.
 
double dz (void) const
 returns dz.
 
double tanl (void) const
 returns tanl.
 
double curv (void) const
 returns curvurture.
 
const CLHEP::HepVector & a (void) const
 returns helix parameters.
 
const CLHEP::HepSymMatrix & Ea (void) const
 returns error matrix.
 
const CLHEP::HepVector & a (const CLHEP::HepVector &newA)
 sets helix parameters.
 
const CLHEP::HepSymMatrix & Ea (const CLHEP::HepSymMatrix &newdA)
 sets helix paramters and error matrix.
 
double bFieldZ (double)
 sets and returns z componet of the magnetic field.
 
double bFieldZ (void) const
 returns z componet of the magnetic field.
 
double sinPhi0 (void) const
 returns sin(phi0).
 
double cosPhi0 (void) const
 return cos(phi0).
 
std::string name (void) const
 returns name.
 
unsigned setEntry (unsigned serialId, unsigned n) override
 Sets entry.
 
void clear (void) override
 clear all entries.
 
void clearCells (void)
 Clears entires only.
 
unsigned entry (unsigned id) const override
 returns entry in a cell.
 
unsigned entry (unsigned x, unsigned y) const override
 returns entry in a cell.
 
int maxEntry (void) const override
 returns max. entry in a plane.
 
virtual unsigned nActiveCellsInPattern (void) const
 returns # of active cells in the pattern.
 
void add (unsigned cellId, int weight) override
 Add to a cell.
 
float charge (void) const
 returns charge for this plane.
 
float charge (float charge)
 sets and returns charge for this plane.
 
std::string name (void) const
 returns name.
 
unsigned nX (void) const
 returns # of x bins.
 
float xMin (void) const
 returns min. of x.
 
float xMin (float newXMin)
 sets and returns min. of x.
 
float xMax (void) const
 returns max. of x.
 
float xMax (float newXMax)
 sets and returns max. of x.
 
float xSize (void) const
 returns size of x bin.
 
unsigned nY (void) const
 return # of y bins.
 
float yMin (void) const
 returns min. of y.
 
float yMin (float newYMin)
 sets and returns min. of y.
 
float yMax (void) const
 returns max. of y.
 
float yMax (float newYMax)
 sets and returns max. of y.
 
float ySize (void) const
 returns size of y bin.
 
unsigned serialId (unsigned x, unsigned y) const
 returns serial ID for position (x, y).
 
unsigned serialId (const TRGPoint2D &p) const
 returns serial ID for position p.
 
TRGPoint2D position (unsigned x, unsigned y) const
 returns position in Hough plain for a cell (x, y)..
 
std::vector< unsigned > neighbors (unsigned serialID, unsigned windowSize=1) const
 returns neighbors.
 
void setRegion (std::vector< unsigned > *)
 Sets region.
 
const std::vector< std::vector< unsigned > * > & regions (void) const
 returns regions.
 
unsigned neighbor (unsigned serialID, unsigned direction) const
 returns neighbor cell.
 
void id (unsigned serialId, unsigned &x, unsigned &y) const
 returns x and y for serialID.
 
void clearRegions (void)
 Clears regions.
 
virtual void clear (void)=0
 Clears all entries.
 
virtual void vote (float rx, float ry, int weight=1)
 Voring.
 
virtual void vote (float xOffset, int weight=1)
 Votes using a pattern.
 
const TRGCDCHoughTransformationtransformation (void) const
 returns Hough transformation object.
 
unsigned setEntry (unsigned serialId, unsigned n) override
 Sets entry.
 
void clear (void) override
 clear all entries.
 
void vote (float rx, float ry, int weight=1) override
 Votes.
 
unsigned entry (unsigned id) const override
 returns entry in a cell.
 
unsigned entry (unsigned x, unsigned y) const override
 returns count of a cell.
 
int maxEntry (void) const override
 returns max. count in a plane.
 
void add (unsigned cellId, int weight) override
 Add to a cell.
 
const std::vector< unsigned > & patternId (unsigned cellId) const
 returns pattern ID which activates specified cell.
 
void clear (void) override
 Clears all entries.
 
void registerPattern (unsigned id) override
 registers a pattern..
 
virtual unsigned nActiveCellsInPattern (unsigned layerId) const
 
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const override
 dump debug info
 
void clear (void) override
 Clears all entries and regions.
 
void clearCells (void)
 Clears entires only.
 
void clear (unsigned layerId)
 Clears only specified layer ID.
 
void vote (float rx, float ry, int charge, unsigned layerId, int weight=1)
 Voting.
 
void vote (float rx, float ry, unsigned layerId, int weight=1)
 Voting. More...
 
void dump (unsigned layerId) const
 Dumps debug information.
 
void vote (unsigned layerId, unsigned localId, int weight=1)
 Voting. More...
 
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const override
 Dumps debug information.
 
void registerPattern (unsigned layerId, unsigned id)
 registers a pattern..
 
const std::vector< unsigned > & patternId (unsigned layer, unsigned cellId) const
 returns pattern ID in a layer which activates specified cell.
 
void preparePatterns (unsigned layerId, unsigned nPatterns)
 allocate memory for patterns.
 
unsigned nLayers (void) const
 returns # of Hough Boolean layers.
 
unsigned setEntry (unsigned serialId, unsigned layerId, unsigned n)
 Sets entry.
 
std::string name (void) const
 returns name.
 
std::string name (void) const
 Operators. More...
 
unsigned id (void) const
 returns id.
 
unsigned superLayerId (void) const
 returns super layer id.
 
unsigned localLayerId (void) const
 returns local layer id in a super layer.
 
float offset (void) const
 returns offset.
 
int nShifts (void) const
 returns shifts. (non-zero for stereo layers)
 
unsigned nCells (void) const
 returns # of cells.
 
bool axial (void) const
 returns true if this is an axial layer.
 
bool stereo (void) const
 returns true if this is a stereo layer.
 
unsigned axialStereoLayerId (void) const
 returns id of axial or stereo id.
 
unsigned axialStereoSuperLayerId (void) const
 returns id of axial or stereo super layer id.
 
float cellSize (void) const
 returns cell size.
 
const std::string stereoType (void) const
 returns "A" or "U" or "V" depending on stereo type.
 
float innerRadius (void) const
 sets and returns inner radius.
 
float outerRadius (void) const
 sets and returns outer radius.
 
const std::string & name (void) const
 return name.
 
const TRGCDCCellHithit (void) const
 returns a pointer to a hit.
 
TRGCDCTracktrack (void) const
 returns a pointer to a track.
 
const TRGCDCCellHithit (const TRGCDCCellHit *)
 sets a pointer to a hit.
 
TRGCDCTracktrack (TRGCDCTrack *)
 sets a pointer to a track.
 
void update (const HepGeom::Point3D< double > &onTrack, const HepGeom::Point3D< double > &onWire, unsigned leftRight, double pull)
 sets results of fitting.
 
double pull (void) const
 returns pull.
 
double pull (double)
 sets pull.
 
const HepGeom::Point3D< double > & positionOnWire (void) const
 returns the closest point on wire to a track.
 
const HepGeom::Point3D< double > & positionOnTrack (void) const
 returns the closest point on track to wire.
 
const HepGeom::Point3D< double > & positionOnWire (const HepGeom::Point3D< double > &)
 sets and returns the closest point on wire to a track.
 
const HepGeom::Point3D< double > & positionOnWire (double p[3])
 sets and returns the closest point on wire to a track.
 
const HepGeom::Point3D< double > & positionOnTrack (const HepGeom::Point3D< double > &)
 sets and returns the closest point on track to wire.
 
const HepGeom::Point3D< double > & positionOnTrack (double p[3])
 sets and returns the closest point on track to wire.
 
unsigned leftRight (void) const
 returns left-right. 0:left, 1:right, 2:wire
 
unsigned leftRight (unsigned)
 sets left-right. 0:left, 1:right, 2:wire
 
double dPhi (void) const
 returns dPhi to the closest point.
 
double dPhi (double)
 sets and returns dPhi to the closest point.
 
const HepGeom::Point3D< double > & position (void) const
 returns position.
 
const HepGeom::Point3D< double > & position (const HepGeom::Point3D< double > &)
 sets and returns position.
 
const HepGeom::Point3D< double > & conf (const HepGeom::Point3D< double > &conf)
 conf 3D point
 
void neighbor (unsigned n, TRGCDCLink *neighbor)
 sets neighbor TRGCDCLink.
 
TRGCDCLinkneighbor (unsigned n) const
 returns neighbor TRGCDCLink.
 
TRGCDCLinklink (void) const
 returns a pointer to a TRGCDCLink.
 
TRGCDCLinklink (TRGCDCLink *)
 sets a pointer to a TRGCDCLink.
 
double distance (void) const
 returns distance between point on wire and on track.
 
const HepGeom::Point3D< double > & xyPosition (void) const
 returns middle position of a wire. z componet is 0.
 
float drift (unsigned) const
 returns drift distance of left or right.
 
float drift (float, unsigned)
 sets and returns drift distance of left or right.
 
float dDrift (unsigned) const
 returns drift distance error of left or right.
 
float dDrift (float, unsigned)
 sets and returns drift distance error of left or right.
 
float drift (void) const
 returns drift distance.
 
float dDrift (void) const
 returns drift distance error.
 
static void clearBufferSL (void)
 clear buffers
 
const TRGCDCCellcell (void) const
 returns a pointer to a cell.
 
 TRGCDCLpar ()
 Constructor.
 
 TRGCDCLpar (const TRGCDCLpar &)
 Constructors and destructor.
 
TRGCDCLparoperator= (const TRGCDCLpar &)
 assignment operator(s)
 
void rotate (double c, double s)
 private member functions
 
void move (double x, double y)
 private member functions
 
double check () const
 private const member functions
 
void neg ()
 member functions
 
double d0 (double x, double y) const
 private const member functions
 
double d (double x, double y) const
 const member functions
 
double dr (double x, double y) const
 const member functions
 
double r_max () const
 private const member functions
 
double arcfun (double xh, double yh) const
 private const member functions
 
int sd (double r, double x, double y, double limit, double &s, double &d) const
 const member functions
 
CLHEP::HepVector Hpar (const HepGeom::Point3D< double > &pivot) const
 const member functions
 
TRGCDCLpavoperator= (const TRGCDCLpav &)
 assignment operator(s) More...
 
 TRGCDCLpav (const TRGCDCLpav &)
 Constructors and destructor.
 
void clear ()
 member functions for clear
 
std::string name (void) const
 returns name.
 
std::string name (void) const
 returns name.
 
std::string name (void) const
 returns name.
 
const std::vector< int > & trackListMC (void) const
 returns MC track list which contributes to CDC hits.
 
const TRGCDCTrackBasetrack (void) const
 returns a track.
 
unsigned nContributors (void) const
 returns /# of contributors.
 
const std::vector< const TRGCDCWire * > & wires (void) const
 returns a vector containing pointers to a wire.
 
const TRGCDCWireoperator[] (unsigned id) const
 returns a wire.
 
const TRGSignalsignal (void) const override
 returns trigger output. Null will returned if no signal.
 
const TRGCDCSegmentHithit (const TRGCDCSegmentHit *)
 sets a pointer to a TRGCDCSegmentHit.
 
const TRGCDCSegmentHithit (void) const
 returns a pointer to a TRGCDCSegmentHit.
 
void addStoreHit (const CDCTriggerSegmentHit *)
 sets a pointer to a CDCTriggerSegmentHit.
 
const std::vector< const CDCTriggerSegmentHit * > storeHits (void) const
 returns a pointer to a CDCTriggerSegmentHit.
 
const TRGCDCLUTLUT (void) const
 returns LUT
 
const TRGCDCWirecenter (void) const
 returns a center wire.
 
const TRGSignalsignal (void) const
 returns trigger output. Null will returned if no signal.
 
std::string name (void) const
 returns name.
 
std::string name (const std::string &newName)
 sets and returns name.
 
int status (void) const
 returns status.
 
virtual const CLHEP::Hep3Vector & p (void) const
 returns momentum vector.
 
virtual const CLHEP::Hep3Vector & x (void) const
 returns position vector.
 
virtual double pt (void) const
 returns Pt.
 
bool fitted (void) const
 returns true if fitted.
 
void setFitted (bool fitted)
 set fit status
 
virtual unsigned objectType (void) const
 returns object type.
 
double charge (void) const
 returns charge.
 
double charge (double c)
 sets and returns charge.
 
const TRGCDCFitterfitter (void) const
 returns a pointer to a default fitter.
 
const TRGCDCFitterfitter (const TRGCDCFitter *)
 sets a default fitter.
 
void setTrackID (int trackID)
 set track ID.
 
int getTrackID ()
 get track ID.
 
static unsigned nTSF (void)
 returns # of TSF.
 
static unsigned nTSF (unsigned i)
 returns # of TSF in super layer i. (i=0 to 4)
 
unsigned id (void) const
 returns an id started from 0.
 
int status (void) const
 returns status.
 
int pType (void) const
 returns particle type.
 
const TRGCDCTrackMCmother (void) const
 returns a pointer to a mother.
 
const TRGCDCTrackMCchild (unsigned i) const
 returns a pointer to i'th child.
 
const CLHEP::HepLorentzVector & p (void) const
 returns momentum vector.
 
const CLHEP::Hep3Vector & v (void) const
 returns position vector.
 
std::string name (void) const
 returns name.
 
int debugLevel (void) const
 returns debug level.
 
int debugLevel (int) const
 sets and returns debug level.
 
unsigned nLocalLayers (unsigned superLayerId) const
 returns # of wire layers in a super layer. 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...
 
float fudgeFactor (void) const
 returns fudge factor for drift time error.
 
float fudgeFactor (float)
 sets and returns fudge factor for drift time error.
 
std::string versionCDC (void) const
 returns CDC version.
 
unsigned nWires (void) const
 return # of wires.
 
unsigned nSuperLayers (void) const
 returns # of super layers.
 
unsigned nStereoLayers (void) const
 returns # of stereo layers.
 
unsigned nAxialLayers (void) const
 return # of axial layers.
 
unsigned nAxialSuperLayers (void) const
 return # of axial super layers.
 
unsigned nStereoSuperLayers (void) const
 returns # of stereo super layers.
 
unsigned nLayers (void) const
 return # of 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.
 
const TRGCDCSegmentsegment (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 nSegments (void) const
 returns # of track segments.
 
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.
 
double systemOffsetMC (void) const
 returns the system offset in MC.
 
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...
 
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.
 
const TRGCDCLayersegmentLayer (unsigned id) const
 returns a pointer to a track segment layer. More...
 
unsigned nSegmentLayers (void) const
 returns # of track segment layers.
 
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.
 
void setReturnValue (int)
 sets return value for trg cdc module.
 
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 TRGCDCHelixhelix (void) const
 returns helix parameter.
 
void setHelix (const TRGCDCHelix &helix)
 Set helix parameter.
 
virtual const CLHEP::Hep3Vector & p (void) const override
 returns momentum vector.
 
virtual double pt (void) const override
 returns Pt.
 
virtual const CLHEP::Hep3Vector & x (void) const override
 returns position vector.
 
void set2DFitChi2 (double)
 Set 2D fit chi2.
 
double get2DFitChi2 (void) const
 Returns 2D fit chi2.
 
void set3DFitChi2 (double)
 Set 3D fit chi2.
 
double get3DFitChi2 (void) const
 Returns 3D fit chi2.
 
void setDebugValue (EDebugValueType const &moduleName, bool flag)
 Set debug value.
 
int getDebugValue (EDebugValueType const &moduleName) const
 Get debug value.
 
const TRGCDCWireHithit (const TRGCDCWireHit *)
 returns a pointer to a TRGCDCWireHit.
 
const TRGCDCWireHithit (void) const
 returns a pointer to a TRGCDCWireHit.
 
const TRGCDCWireHitMChit (TRGCDCWireHitMC *)
 appends a pointer to TRGCDCWireHitMC.
 
void addSignal (const TRGSignal &newSignal)
 set signal |= newSignal
 
bool consective (const TRGCDCWire &) const
 returns true if a given wire is consective in a layer.
 
bool adjacent (const TRGCDCWire &) const
 returns true if a given wire is adjacent.
 
int localIdForPlus (void) const
 returns localId but if maxLocalId, return -1.
 
int localIdForMinus (void) const
 returns localId but if 0, return maxLocalId + 1.
 
const TRGSignalsignal (void) const override
 returns an input to the trigger. This is sync'ed to 1GHz clock.
 
const TRGCDCWireHitMCmc (void) const
 This will be removed.
 
const TRGCDCWireHitMCmc (TRGCDCWireHitMC *)
 This will be removed.
 
unsigned iCDCSimHit (void) const
 return index of CDCSimHit
 
float distance (void) const
 returns drift distance.
 
const HepGeom::Point3D< double > & hitPosition (void) const
 returns hit position.
 
const HepGeom::Point3D< double > & entrance (void) const
 returns an entrance point.
 
const HepGeom::Vector3D< double > & direction (void) const
 returns vector from entrance to exit point.
 
int leftRight (void) const
 returns left or right.
 
const TRGCDCWirewire (void) const
 returns a pointer to a TRGCDCWire.
 
const TRGCDCTrackMChep (void) const
 returns a pointer to a GEN_HEPEVT.
 
const TRGCDCWireHithit (void) const
 returns a pointer to a TRGCDCWireHit.
 
const CLHEP::Hep3Vector & momentum (void) const
 returns momentum vector at the entrance.
 
 TRGCDCCell (unsigned id, unsigned localId, const TRGCDCLayer &layer, const HepGeom::Point3D< double > &forwardPosition, const HepGeom::Point3D< double > &backwardPosition)
 Constructor.
 
virtual ~TRGCDCCell ()
 Destructor.
 
virtual void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
 
int localIdDifference (const TRGCDCCell &) const
 returns local id difference.
 
 TRGCDCCellHit (const TRGCDCCell &, unsigned indexCDCHit=0, unsigned indexCDCSimHit=0, unsigned indexMCParticle=0, float driftLeft=0, float driftLeftError=0, float driftRight=0, float driftRightError=0, int mcLRflag=0, float fudgeFacgtor=1)
 Constructor.
 
virtual ~TRGCDCCellHit ()
 Destructor.
 
virtual void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
 
HepGeom::Point3D< double > position (unsigned) const
 returns left position. z is always zero.
 
static int sortById (const TRGCDCCellHit **a, const TRGCDCCellHit **b)
 Sort function.
 
const CDCHithit (void) const
 Access to CDCHit.
 
const CDCSimHitsimHit (void) const
 Access to CDCSimHit.
 
const MCParticlemcParticle (void) const
 Access to MCParticle.
 
 TRGCDCCircle (const std::vector< TRGCDCLink * > &links)
 Constructor with links.
 
 TRGCDCCircle (double r, double phi, double charge, const TRGCDCHoughPlane &plane)
 Constructor with a circle center, assuming the origin is on a circle.
 
virtual ~TRGCDCCircle ()
 Destructor.
 
virtual void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const override
 dumps debug information.
 
int approach2D (TRGCDCLink &) const override
 calculate closest approach. Error was happened if return value is not zero.
 
 TRGCDCCircleFitter (const std::string &name)
 Constructor.
 
virtual ~TRGCDCCircleFitter ()
 Destructor.
 
virtual int fit (TRGCDCTrackBase &) const override
 Fitter.
 
 TRGCDCEventTime (const TRGCDC &, bool makeRootFile)
 constructor of TRGCDCEventTime class
 
virtual ~TRGCDCEventTime ()
 destructor of TRGCDCEventTime class
 
void initialize (void)
 initialize the class
 
void doit (int ver, bool print)
 Calculate T0 based on ver.
 
void hitcount (void)
 hit count of TS
 
void hist (void)
 making hostogram
 
void oldVer (void)
 old version of calculation function
 
void printFirm (void)
 Print info in firmware level.
 
int getT0 (void) const
 Calculate T0.
 
void terminate (void)
 terminate function
 
 TRGCDCEventTimeFinder (const std::string &name, const TRGClock &systemClock, const TRGClock &dataClock, const TRGClock &userClockInput, const TRGClock &userClockOutput)
 Constructor.
 
 ~TRGCDCEventTimeFinder ()
 Destructor.
 
void push_back (const TRGCDCTrackSegmentFinder *)
 push back the TRGCDCTrackSegmentFinder pointer
 
void simulate (void)
 Firmware simulation. yi.
 
 TRGCDCFitter (const std::string &name)
 Constructor.
 
virtual ~TRGCDCFitter ()
 Destructor.
 
void fitDone (TRGCDCTrackBase &) const
 sets the fitted flag. (Bad implementation)
 
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dump debug info
 
 TRGCDCFitter3D (const std::string &name, const std::string &rootFitter3DFile, const TRGCDC &, const std::map< std::string, bool > &flags)
 Constructor.
 
virtual ~TRGCDCFitter3D ()
 Destructor.
 
void initialize ()
 Initialization.
 
int doit (std::vector< TRGCDCTrack * > &trackList)
 Does track fitting.
 
int doitComplex (std::vector< TRGCDCTrack * > &trackList)
 Does track fitting using JSignals.
 
static double calPhi (TRGCDCSegmentHit const *segmentHit, double eventTime)
 Utility functions.
 
void saveVhdlAndCoe ()
 Functions for saving. More...
 
void saveAllSignals ()
 Saves all signals for debugging.
 
void saveIoSignals ()
 Saves all I/O signals for debugging.
 
static void getMCValues (const TRGCDC &m_cdc_in, TRGCDCTrack *aTrack, const std::map< std::string, double > &m_mConstD_in, std::map< std::string, double > &m_mDouble_in, std::map< std::string, std::vector< double > > &m_mVector_in)
 Function for mc debugging.
 
bool isAxialTrackFull (const TRGCDCTrack &aTrack)
 Checks if axial track has 5 TSs. One per each superlayer.
 
bool isStereoTrackFull (const TRGCDCTrack &aTrack)
 Checks if stereo track has 4 TSs. One per each superlayer.
 
static void findHitAxialSuperlayers (const TRGCDCTrack &aTrack, std::vector< double > &useAxSL, bool printError)
 Finds which axial superlayers has TSs. useAxSL array indicating hit superlayers.
 
static void findHitStereoSuperlayers (const TRGCDCTrack &aTrack, std::vector< double > &useStSL, bool printError)
 Finds which stereo superlayers has TSs. useStSL array indicating hit superlayers.
 
void removeImpossibleStereoSuperlayers (std::vector< double > &useStSL)
 Removes TSs that are not possible with track Pt.
 
static void selectAxialTSs (const TRGCDCTrack &aTrack, std::vector< int > &bestTSIndex)
 Selects priority TSs when there are multiple candidate TSs for a superlayer.
 
static int do2DFit (TRGCDCTrack &aTrack, const std::map< std::string, bool > &m_mBool_in, const std::map< std::string, double > &m_mConstD_in, std::map< std::string, std::vector< double > > &m_mConstV_in, std::map< std::string, double > &m_mDouble_in, std::map< std::string, std::vector< double > > &m_mVector_in)
 Does 2D fit. Returns 0 if fit is done successfully. m_mBool should have fIsPrintError, fmcLR, fLRLUT, fmcLR, f2DFit, f2DFitDrift. m_mConstD should have Trg_PI. m_mConstV should have nWires, driftPhi2DError, wirePhi2DError, rr, rr2D.
 
void print3DInformation (int iTrack)
 Print's information for debugging 3D.
 
void terminate ()
 Termination.
 
std::string version (void) const
 Gets version of class.
 
std::string name (void) const
 Gets name of class.
 
static void getStereoGeometry (std::map< std::string, std::vector< double > > &stGeometry)
 Get stereo geometry.
 
static void getStereoXt (std::vector< double > const &stPriorityLayer, std::vector< std::vector< double > > &stXts, bool isSimple=0)
 Get stereo Xt.
 
static void getConstants (std::map< std::string, double > &mConstD, std::map< std::string, std::vector< double > > &mConstV, bool isXtSimple=0)
 Get constants for firmwareFit.
 
 TRGCDCFrontEnd (const std::string &name, boardType type, const TRGClock &systemClock, const TRGClock &dataClock, const TRGClock &userClock)
 Constructor.
 
virtual ~TRGCDCFrontEnd ()
 Destructor.
 
static std::string version (void)
 returns version.
 
boardType type (void) const
 returns type.
 
static int implementation (const boardType &type, std::ofstream &)
 make a VHDL component file. More...
 
static int implementationPort (const boardType &type, std::ofstream &)
 writes a port map.
 
void push_back (const TRGCDCWire *)
 push back TRGCDCWire for this Front-end
 
void dump (const std::string &message="", const std::string &pre="") const
 dumps contents. More...
 
void simulate (void)
 simulates firmware.
 
static TRGState packerInnerInside (const TRGState &input)
 Makes bit pattern using input bit pattern for the inner FE.
 
static TRGState packerInnerOutside (const TRGState &input)
 Makes bit pattern using input bit pattern for the outer FE.
 
static TRGState packerOuterInside (const TRGState &input)
 Makes bit pattern using input bit pattern for the inner FE.
 
static TRGState packerOuterOutside (const TRGState &input)
 Makes bit pattern using input bit pattern for the outer FE.
 
static void unpackerInnerInside (const TRGState &input, const TRGState &output)
 Unpacks TRGState.
 
static void unpackerInnerOutside (const TRGState &input, const TRGState &output)
 Unpacks TRGState.
 
static void unpackerOuterInside (const TRGState &input, const TRGState &output)
 Unpacks TRGState.
 
static void unpackerOuterOutside (const TRGState &input, const TRGState &output)
 Unpacks TRGState.
 
void dump_log (void) const
 Dump all the details of _mosb into a .log file, do it in the end of simulate()
 
void dump_log_innerInside (void) const
 Dump all the details of _mosb into a .log file, for innerInside FE.
 
void dump_log_innerOutside (void) const
 Dump all the details of _mosb into a .log file, for innerOutside FE.
 
void dump_log_outerInside (void) const
 Dump all the details of _mosb into a .log file, for outerInside FE.
 
void dump_log_outerOutside (void) const
 Dump all the details of _mosb into a .log file, for outerOutside FE.
 
static bool set_exception (bool)
 set to throw exception or not
 
static bool set_print (bool)
 set to print debug info or not
 
static void set_limits (const CLHEP::HepVector &a_min, const CLHEP::HepVector &a_max)
 set limits for helix parameters
 
 TRGCDCHelix (const HepGeom::Point3D< double > &pivot, const CLHEP::HepVector &a, const CLHEP::HepSymMatrix &Ea)
 Constructor with pivot, helix parameter a, and its error matrix.
 
 TRGCDCHelix (const HepGeom::Point3D< double > &pivot, const CLHEP::HepVector &a)
 Constructor without error matrix.
 
 TRGCDCHelix (const HepGeom::Point3D< double > &position, const CLHEP::Hep3Vector &momentum, double charge)
 Constructor with position, momentum, and charge.
 
virtual ~TRGCDCHelix ()
 Destructor.
 
HepGeom::Point3D< double > x (double dPhi=0.) const
 returns position after rotating angle dPhi in phi direction.
 
double * x (double dPhi, double p[3]) const
 returns position after rotating angle dPhi in phi direction.
 
HepGeom::Point3D< double > x (double dPhi, CLHEP::HepSymMatrix &Ex) const
 returns position and convariance matrix(Ex) after rotation.
 
CLHEP::Hep3Vector momentum (double dPhi=0.) const
 returns momentum vector after rotating angle dPhi in phi direction.
 
CLHEP::Hep3Vector momentum (double dPhi, CLHEP::HepSymMatrix &Em) const
 returns momentum vector after rotating angle dPhi in phi direction.
 
CLHEP::HepLorentzVector momentum (double dPhi, double mass) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
CLHEP::HepLorentzVector momentum (double dPhi, double mass, CLHEP::HepSymMatrix &Em) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
CLHEP::HepLorentzVector momentum (double dPhi, double mass, HepGeom::Point3D< double > &x, CLHEP::HepSymMatrix &Emx) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
const HepGeom::Point3D< double > & pivot (const HepGeom::Point3D< double > &newPivot)
 sets pivot position.
 
void set (const HepGeom::Point3D< double > &pivot, const CLHEP::HepVector &a, const CLHEP::HepSymMatrix &Ea)
 sets helix pivot position, parameters, and error matrix.
 
TRGCDCHelixoperator= (const TRGCDCHelix &)
 Copy operator.
 
void updateCache (void)
 update Caches
 
CLHEP::HepMatrix delApDelA (const CLHEP::HepVector &ap) const
 Mathmatical functions.
 
CLHEP::HepMatrix delXDelA (double phi) const
 Mathmatical functions.
 
CLHEP::HepMatrix delMDelA (double phi) const
 Mathmatical functions.
 
CLHEP::HepMatrix del4MDelA (double phi, double mass) const
 Mathmatical functions.
 
CLHEP::HepMatrix del4MXDelA (double phi, double mass) const
 Mathmatical functions.
 
void ignoreErrorMatrix (void)
 unsets error matrix. Error calculations will be ignored after this function call until an error matrix be set again. 0 matrix will be return as a return value for error matrix when you call functions which returns an error matrix.
 
void debugPrint (void) const
 print debug info
 
void checkValid (void)
 check validity
 
 TRGCDCHough3DFinder (const TRGCDC &, bool makeRootFile, int finderMode)
 Contructor.
 
 ~TRGCDCHough3DFinder ()
 Destructor.
 
void terminate (void)
 Termination method.
 
void doit (std::vector< TRGCDCTrack * > const &trackList2D, std::vector< TRGCDCTrack * > &trackList3D)
 Member functions. More...
 
void doit (std::vector< TRGCDCTrack * > &trackList)
 Finds tracks using tracklist. Has parameter to choose between perfect and original finder.
 
void doitFind (std::vector< TRGCDCTrack * > &trackList)
 Finds tracks using tracklist.
 
void perfectFinder (std::vector< TRGCDCTrack * > &trackList, unsigned j, std::vector< const TRGCDCSegmentHit * > &mcTSList)
 Perfect 3D finder for a track.
 
void doitPerfectly (std::vector< TRGCDCTrack * > &trackList)
 Perfect 3D finder for a tracklist.
 
void findNumberOfHitSuperlayersForMcParticles (std::vector< std::vector< const TRGCDCSegmentHit * > > &p_stTSs, std::map< unsigned, unsigned > &numberTSsForParticle)
 Finds number of hit superlayers for each mc particle.
 
std::string version (void) const
 returns version.
 
 TRGCDCHoughFinder (const std::string &name, const TRGCDC &, unsigned peakMin, const std::string &mappingFilePlus, const std::string &mappingFileMinus, unsigned doit)
 Contructor.
 
virtual ~TRGCDCHoughFinder ()
 Destructor.
 
int doFindingTrasan (std::vector< unsigned > peaks[], std::vector< TRGCDCTrack * > &trackList2D) const
 do track finding. (trasan version)
 
std::vector< TRGCDCLink * > selectBestHits (const std::vector< TRGCDCLink * > &links) const
 selects the best(fastest) hits in each super layer.
 
int doFittingTrasan (std::vector< unsigned > peaks[], std::vector< TRGCDCTrack * > &trackList2DFitted) const
 do track fitting. (old trasan version)
 
void terminate ()
 termination.
 
static double calPhi (TRGCDCSegmentHit const *segmentHit, double eventTime)
 Utility functions.
 
static void calCosPhi (std::map< std::string, Belle2::TRGCDCJSignal > &mSignalStorage, std::map< std::string, Belle2::TRGCDCJLUT * > &mLutStorage)
 Calculate Cos Sin ? More...
 
static void calSinPhi (std::map< std::string, Belle2::TRGCDCJSignal > &mSignalStorage, std::map< std::string, Belle2::TRGCDCJLUT * > &mLutStorage)
 Calculate Cos Sin ?
 
static void rPhi (std::map< std::string, Belle2::TRGCDCJSignal > &mSignalStorage, std::map< std::string, Belle2::TRGCDCJLUT * > &mLutStorage)
 Calculate r * phi ?
 
void mappingByFile (const std::string &mappingFilePlus, const std::string &mappingFileMinus)
 creates mappings by a file.
 
int FindAndFit (std::vector< TRGCDCTrack * > &trackList2D, std::vector< TRGCDCTrack * > &trackList2DFitted)
 do track finding and fitting (wrapper that can choose between different versions).
 
int doFindingAndFittingTrasan (std::vector< TRGCDCTrack * > &trackList2D, std::vector< TRGCDCTrack * > &trackList2DFitted)
 do track finding and fitting (Trasan version).
 
int doFindingAndFitting (std::vector< TRGCDCTrack * > &trackList2D, std::vector< TRGCDCTrack * > &trackList2DFitted)
 do track finding and fitting (Kaiyu version).
 
int doFinding (std::vector< std::vector< unsigned >> peaks[], std::vector< TRGCDCTrack * > &trackList2D)
 do track finding. (kaiyu version)
 
int doFitting (std::vector< TRGCDCTrack * > &trackList2D, std::vector< TRGCDCTrack * > &trackList2DFitted)
 do track fitting. (kaiyu original) More...
 
TRGCDCTrackmakeTrack (const unsigned serialID, const unsigned pm) const
 Make a track from serial ID in Hough plane. More...
 
 TRGCDCHoughPlane (const std::string &name, const TRGCDCHoughTransformation &transformation, unsigned nX, float xMin, float xMax, unsigned nY, float yMin, float yMax)
 Contructor.
 
virtual ~TRGCDCHoughPlane ()
 Destructor.
 
void registerPattern (unsigned id) override
 Registers a pattern on a Hough plane with (r, phi=0).
 
virtual void voteByPattern (float xOffset, int weight=1)
 Votes using a pattern.
 
 TRGCDCHoughPlaneBase (const std::string &name, const TRGCDCHoughTransformation &transformation, unsigned nX, float xMin, float xMax, unsigned nY, float yMin, float yMax)
 Contructor.
 
virtual ~TRGCDCHoughPlaneBase ()
 Destructor.
 
void locationInPlane (float x0, float y0, float x1, float y1, unsigned &nFound, unsigned &iX0, unsigned &iY0, unsigned &iX1, unsigned &iY1) const
 returns cell positions in the region.
 
int maxEntryInRegion (unsigned id) const
 returns max. count in region.
 
virtual void vote (float rx, float ry, int charge, int weight=1)
 Voring.
 
virtual void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
 
 TRGCDCHoughPlaneBoolean (const std::string &name, const TRGCDCHoughTransformation &transformation, unsigned nX, float xMin, float xMax, unsigned nY, float yMin, float yMax)
 Contructor.
 
virtual ~TRGCDCHoughPlaneBoolean ()
 Destructor.
 
void vote (float rx, float ry, float charge, int weight=1)
 Votes with charge decision.
 
void voteUsedInTrasan (float rx, float ry, float charge, int weight=1)
 Votes with charge decision.
 
void registerPattern (unsigned id) override
 registers a pattern..
 
void preparePatterns (unsigned nPatterns)
 allocate memory for patterns.
 
void vote (unsigned patternId, int weight)
 Votes using registered pattern.
 
 TRGCDCHoughPlaneMulti (const std::string &name, const TRGCDCHoughTransformation &transformation, unsigned nX, float xMin, float xMax, unsigned nY, float yMin, float yMax, unsigned nLayers)
 Contructor.
 
virtual ~TRGCDCHoughPlaneMulti ()
 Destructor.
 
void vote (float rx, float ry, float charge, const TRGCDCHoughTransformation &hough, unsigned weight, unsigned layerId)
 vote
 
void merge (void)
 merge function
 
void vote (float phi, unsigned layerId, int weight)
 vote
 
 TRGCDCHoughPlaneMulti2 (const std::string &name, const TRGCDCHoughTransformation &transformation, unsigned nX, float xMin, float xMax, unsigned nY, float yMin, float yMax, unsigned nLayers)
 Contructor.
 
virtual ~TRGCDCHoughPlaneMulti2 ()
 Destructor.
 
void merge (void)
 Merge layers into one.
 
void mergeOuters (void)
 Merge outer layers into one.
 
 TRGCDCHoughTransformation (const std::string &name)
 Contructor.
 
virtual ~TRGCDCHoughTransformation ()
 Destructor.
 
virtual TRGPoint2D convert (const TRGPoint2D &) const
 converts Point2D(r, phi) in real plane into Point2D(r, phi) in Hough plane.
 
 TRGCDCHoughTransformationCircle (const std::string &name)
 Contructor.
 
virtual ~TRGCDCHoughTransformationCircle ()
 Destructor.
 
virtual float y (float xReal, float yReal, float x) const override
 returns Y coordinate in a Hough parameter plane.
 
virtual TRGPoint2D circleCenter (const TRGPoint2D &) const
 returns Point2D(phi, r) of a circle in real plane.
 
virtual TRGPoint2D convert (const TRGPoint2D &) const override
 converts Point2D(phi, r) in real plane into Point2D(phi, r) in Hough plane.
 
virtual bool diverge (float xReal, float yReal, float x0, float x1) const override
 returns true if Y diverges in given region.
 
virtual bool positiveDiverge (float xReal, float yReal, float x0, float x1) const override
 returns true if Y diverges in given region.
 
virtual bool negativeDiverge (float xReal, float yReal, float x0, float x1) const override
 returns true if Y diverges in given region.
 
std::string version (void) const
 returns version.
 
 TRGCDCJLUT (const std::string &name="no_name")
 Contructor.
 
 TRGCDCJLUT (const TRGCDCJLUT &in)
 Copy constructor.
 
virtual ~TRGCDCJLUT ()
 Destructor.
 
void setData (int inputBitsize, int outputBitSize, const std::string &filename, bool twoscomplement=0)
 set LookUpTable(LUT) data.
 
void setFunction (std::function< int(int)> function)
 set LUT function directly using int values.
 
int setFloatFunction (std::function< double(double)> function, TRGCDCJSignal const &input, TRGCDCJSignal const &minInv, TRGCDCJSignal const &maxInv, double outputToReal, int lutInputBitwidth, int lutOutputBitwidth)
 set LUT function using JSignals.
 
void setBitsize (int inputBitsize, int outputBitsize)
 set input & output bitsize.
 
void setOutputFlag (int outputFlag)
 set output flag.
 
void setInputBitsize (int inputBitsize)
 set input bitsize.
 
void setOutputBitsize (int outputBitsize)
 set output bitsize.
 
std::string getFileName () const
 get LUT filename
 
int getInputBitsize () const
 get input bitsize
 
int getOutputBitsize () const
 get output bitsize
 
std::function< int(int)> getFunction ()
 get LUT function using int values.
 
std::function< double(double)> getFloatFunction ()
 get LUT function using float values.
 
int getOutputFlag () const
 get output type.
 
int getOutputType () const
 get output type.
 
int getOutput (int) const
 get output using int values.
 
double getFloatOutput (double) const
 get output using float values.
 
void dump ()
 Print variables for LUT.
 
void makeCOE (const std::string &fileName="")
 make COE file.
 
std::string operate (std::string out, std::string in, std::map< std::string, std::map< std::string, double > * > &m_intStorage)
 Operate on LUT. (Will be deprecated.)
 
TRGCDCJSignal const operate (const TRGCDCJSignal &in, TRGCDCJSignal &out)
 Returns LUT value. Out is LUT value + offset. (LUT value + offset do not obey addition bitsize rules.)
 
std::string const lutVhdlCode (std::string const &shiftOffsetInput) const
 Creates vhdlCode for lut.
 
 TRGCDCJSignal ()
 Constructor.
 
 TRGCDCJSignal (TRGCDCJSignalData *)
 Copy constructor.
 
 TRGCDCJSignal (int const &bitwidth, double const &value, double const &min, double const &max, int const &clock, TRGCDCJSignalData *)
 Actual to integer constructor with clock.
 
 TRGCDCJSignal (int const &bitwidth, double const &value, double const &min, double const &max, TRGCDCJSignalData *)
 Actual to integer constructor with clock set to 0.
 
 TRGCDCJSignal (signed long long const &intValue, double const &toReal, signed long long const &minInt, signed long long const &maxInt, double const &actual, double const &minActual, double const &maxActual, int const &finishClock, TRGCDCJSignalData *, bool b_slv=0)
 Integer constructor.
 
 TRGCDCJSignal (double const &value, double const &toReal, TRGCDCJSignalData *)
 Constant constructor.
 
 TRGCDCJSignal (std::vector< bool > const &slvValue, int const &finishClock, TRGCDCJSignalData *)
 Slv constructor.
 
TRGCDCJSignalassignTo (TRGCDCJSignal const &rhs, int targetClock, std::string &finalCode)
 Assign operator with setting target clock with outputing final code.
 
TRGCDCJSignalassignTo (TRGCDCJSignal const &rhs, int targetClock)
 Assign operator with setting target clock.
 
TRGCDCJSignaloperator<= (TRGCDCJSignal const &rhs)
 Assign operator.
 
TRGCDCJSignal const operator- () const
 Unary operator.
 
TRGCDCJSignal const operator+ (TRGCDCJSignal const &rhs) const
 Arithmetic add operator. More...
 
TRGCDCJSignal const operator- (TRGCDCJSignal const &rhs) const
 Arithmetic minus operator.
 
TRGCDCJSignal const operator* (TRGCDCJSignal const &rhs) const
 Arithmetic multiply operator.
 
void dump () const
 Methods.
 
TRGCDCJSignal const shift (int nBits, int operate=1) const
 Shift signal. Shift direction is right. operate=0 to change m_toReal(unit).
 
TRGCDCJSignal const offset (TRGCDCJSignal const &valueMin) const
 Outputs an offset signal which is an unsigned signal.
 
TRGCDCJSignal const invOffset (TRGCDCJSignal const &valueMin) const
 Outputs a signal that is not offset.
 
static void choose (TRGCDCJSignal &target, TRGCDCJSignal const &targetMin, TRGCDCJSignal const &targetMax, TRGCDCJSignal const &reference, std::vector< std::vector< TRGCDCJSignal > > data, int targetClock)
 Case method. More...
 
static void choose (TRGCDCJSignal &target, TRGCDCJSignal const &targetMin, TRGCDCJSignal const &targetMax, TRGCDCJSignal const &reference, const std::vector< std::vector< TRGCDCJSignal > > &data)
 Chooes method. Also has input for target min and target max signal.
 
static void choose (TRGCDCJSignal &target, TRGCDCJSignal const &reference, const std::vector< std::vector< TRGCDCJSignal > > &data, int targetClock)
 Choose with target clock.
 
static void choose (TRGCDCJSignal &target, TRGCDCJSignal const &reference, const std::vector< std::vector< TRGCDCJSignal > > &data)
 Choose method.
 
static void ifElse (std::vector< std::pair< TRGCDCJSignal, std::vector< std::pair< TRGCDCJSignal *, TRGCDCJSignal > > > > &data, int targetClock)
 If else implementation with target clock.
 
static void ifElse (std::vector< std::pair< TRGCDCJSignal, std::vector< std::pair< TRGCDCJSignal *, TRGCDCJSignal > > > > &data)
 If else implementation.
 
TRGCDCJSignal const limit (signed long long minInt, signed long long maxInt, double minActual, double maxActual) const
 Limits min and max values using specific integers. Use only for ifElse. Doesn't check overflow, underflow to be used in ifElse.
 
TRGCDCJSignal const limit (TRGCDCJSignal const &min, TRGCDCJSignal const &max) const
 Limits min and max values using JSignal. Use only for ifElse. Doesn't check overflow, underflow to be used in ifElse.
 
TRGCDCJSignal const resize (int bitwidth) const
 Resizes signal.
 
static TRGCDCJSignal const slvToSigned (TRGCDCJSignal const &in, double const &toReal, signed long long const &minInt, signed long long const &maxInt, double const &actual, double const &minActual, double const &maxActual, int const &finishClock)
 Change slv to signed with target clock.
 
static TRGCDCJSignal const slvToSigned (TRGCDCJSignal const &in)
 Change slv to signed.
 
static TRGCDCJSignal const slvToUnsigned (TRGCDCJSignal const &in, double const &toReal, signed long long const &minInt, signed long long const &maxInt, double const &actual, double const &minActual, double const &maxActual, int const &finishClock)
 Change slv to unsigned with target clock.
 
static TRGCDCJSignal const slvToUnsigned (TRGCDCJSignal const &in)
 Change slv to unsigned with target clock.
 
static TRGCDCJSignal const toSlv (TRGCDCJSignal const &in, int test)
 Change signal to std_logic_vector using vector<bool>. (Will be deprecated.)
 
static TRGCDCJSignal const toSlv (TRGCDCJSignal const &)
 Change singal to std_logic_vector.
 
static TRGCDCJSignal comp (TRGCDCJSignal const &lhs, const std::string &operate, TRGCDCJSignal const &rhs)
 Compare two signals.
 
void swap (TRGCDCJSignal &first, TRGCDCJSignal &second) const
 Swaps the TRGCDCJSignals.
 
void matchUnit (TRGCDCJSignal &first, TRGCDCJSignal &second) const
 Utilities. More...
 
void setName (const std::string &name)
 Setters, Getters Sets name of signal.
 
void setInt (signed long long value)
 Sets integer value of signal.
 
void setActual (double value)
 Sets float value of signal.
 
void setToReal (double value)
 Sets toReal factor of signal.
 
void setType (int type)
 Sets type of signal.
 
void setBitsize (int bitsize)
 Sets bitwidth of signal.
 
void setFinishClock (int finishClock)
 Sets finish clock of signal.
 
void setDebug (bool debug)
 Sets debug flag for signal.
 
void setPrintVhdl (bool printVhdl)
 Sets print flag for signal.
 
void setVhdlOutputFile (const std::string &filename)
 Sets ouptut VHDL filename.
 
void setCommonData (TRGCDCJSignalData *)
 Sets JSignalData to signal.
 
std::string getName () const
 Get name of signal.
 
int getType () const
 Get type of signal.
 
double getBitsize () const
 Get bitwidth of signal.
 
signed long long getInt () const
 Get integer value of signal.
 
signed long long getMinInt () const
 Get minimum integer value of signal.
 
signed long long getMaxInt () const
 Get maximum integer value of signal.
 
double getActual () const
 Get float value of signal.
 
double getMinActual () const
 Get minimum float value of signal.
 
double getMaxActual () const
 Get maximum float value of signal.
 
double getRealInt () const
 Get converted float value of integer.
 
double getRealMinInt () const
 Get converted float value of minimum integer.
 
double getRealMaxInt () const
 Get converted float value of maximum integer.
 
double getToReal () const
 Get toReal value of signal.
 
int getFinishClock () const
 Gets clock tick where signal is make.
 
std::vector< std::pair< std::string, std::vector< int > > > const getArgumentSignals () const
 Gets the signal names and values that made this signal.
 
TRGCDCJSignalDatagetCommonData () const
 Get the sharged JSignalData.
 
int calType () const
 Calculated what type the signal is.
 
int calType (double minValue) const
 Calculated the type using the argument.
 
int calBitwidth () const
 Calculates the bit width.
 
int calBitwidth (int type, signed long long minInt, signed long long maxInt)
 Calculates the bit width using the arguments.
 
int calFinishClock () const
 Claculates the clock tick where the signal is valid.
 
std::string getVhdlCode () const
 Gets the vhdl code for the signal.
 
bool getPrintVhdl () const
 Gets the print vhdl flag from common JSignalData class.
 
std::string getVhdlOutputFile () const
 Gets the vhdl output file name.
 
bool orderLargestBitsize (TRGCDCJSignal &large, TRGCDCJSignal &small) const
 Orders the TRGCDCJSignals by bitsize. Next priority is unsigned, signed, minus unsigned. 1: was swapped. 0: was not swapped.
 
signed long long calMaxInteger () const
 Calculate max value for a binary number.
 
signed long long calMinInteger () const
 Calculate min value for a binary number.
 
static TRGCDCJSignal const absolute (TRGCDCJSignal const &first)
 Absolute TRGCDCJSignal. Removes 1 bit if signed or minus unsigned.
 
static signed long long calInt (double value, TRGCDCJSignal const &mother)
 Calculates integer value with unit of a TRGCDCJSignal.
 
static void calVhdlTypeBitwidth (TRGCDCJSignal const &first, const std::string &operation, TRGCDCJSignal const &second, int &type, int &bitwidth)
 Calculates vhdl bitwidth and type for operation.
 
void initArgumentSignals ()
 Initializes the argument signals for the signal.
 
static void combineArguments (TRGCDCJSignal const &first, TRGCDCJSignal const &second, TRGCDCJSignal &result)
 Combines arguments of signals.
 
void initVhdlCode ()
 Initializes the vhdl code.
 
void toSignedVhdlCode ()
 Changes signal type to signed type in VHDL.
 
void toUnsignedVhdlCode ()
 Changes signal type to unsigned type in VHDL.
 
static void vhdlCode (TRGCDCJSignal const &first, const std::string &operation, TRGCDCJSignal const &second, TRGCDCJSignal const &result, std::string &targtVhdlCode)
 Writes vhdl code using two signals.
 
static void vhdlCode (const std::string &operation, TRGCDCJSignal const &first, TRGCDCJSignal const &result, std::string &targetVhdlCode)
 Writes vhdl code using one signal.
 
static std::string replaceWithSignalNames (std::string const &fromVhdlCode, std::vector< std::pair< std::string, std::vector< int > > > const &fromVhdlSignals, int const &finishClock, std::map< std::string, std::vector< int > > &buffers)
 Writes final vhdl code.
 
static std::string assignVhdlCode (TRGCDCJSignal const &target, TRGCDCJSignal const &from)
 Writes the assign vhdl code.
 
static std::string chooseVhdlCode (TRGCDCJSignal const &target, TRGCDCJSignal const &reference, std::vector< std::vector< TRGCDCJSignal > > const &data)
 Writes the choose vhdl code.
 
static std::string ifElseVhdlCode (std::vector< std::pair< TRGCDCJSignal, std::vector< std::pair< TRGCDCJSignal *, TRGCDCJSignal > > > > const &data)
 Writes the ifElse vhdl code.
 
void printVhdl (const std::string &vhdlCode) const
 Prints vhdl code.
 
void checkInt (const std::string &name) const
 Checks underflow or overflow for TRGCDCJSignal.
 
static bool isSameSignal (TRGCDCJSignal const &lhs, TRGCDCJSignal const &rhs)
 Checks if signal is same signal.
 
static void valuesToMapSignals (std::vector< std::tuple< std::string, double, int, double, double, int > > const &inValues, Belle2::TRGCDCJSignalData *inCommonData, std::map< std::string, Belle2::TRGCDCJSignal > &outMap)
 Values => [name, value, bitwidth, min, max, clock] Changes values to signals.
 
static void mapSignalsToValues (std::map< std::string, Belle2::TRGCDCJSignal >const &inMap, std::vector< std::pair< std::string, int > > const &inChoose, std::vector< std::tuple< std::string, double, int, double, double, int > > &outValues)
 Choose => [signalName, FpgaEffects(=1)/NoFpgaEffects(=0)] Values => [name, value, bitwidth, min, max, clock] Changes signals to values.
 
 TRGCDCJSignalData ()
 Constructor for class.
 
void setVhdlOutputFile (const std::string &)
 Sets the filename for VHDL output.
 
void setPrintVhdl (bool)
 Sets if to print VHDL output.
 
void setPrintedToFile (bool)
 Set to remember that file was printed.
 
void setVhdlInProcess (const std::string &)
 Set the VHDL code that are in a process statement.
 
void setVhdlOutProcess (const std::string &)
 Set the VHDL code that is outside a process statement.
 
std::string getVhdlOutputFile () const
 Get the VHDL output code.
 
bool getPrintVhdl () const
 Gets the status of m_printVhdl.
 
bool getPrintedToFile () const
 Gets the status of m_printedToFile.
 
std::string getVhdlInProcess () const
 Gets the VHDL code that are in a process statement.
 
std::string getVhdlOutProcess () const
 Gets the VHDL code that are outside a process statement.
 
std::string getVhdlDefine () const
 Gets the VHDL code for define statement.
 
std::map< std::string, std::vector< int > > const & getSignals () const
 Gets the signals that were saved for one line of VHDL.
 
void printToFile ()
 Utilities Function to print VHDL code.
 
void buffersVhdlCode ()
 Function to print buffer VHDL code.
 
void signalsVhdlCode ()
 Function to print definition of signal VHDL code.
 
void entryVhdlCode ()
 Function to print entry VHDL code.
 
 TRGCDCLayer (unsigned id, unsigned superLayerId, unsigned localLayerId, unsigned axialStereoLayerId, unsigned axialStereoSuperLayerId, float offset, int nShifts, float cellSize, unsigned nCells, float innerRadius, float outerRadius)
 Constructor.
 
 TRGCDCLayer (unsigned id, const TRGCDCCell &w)
 Constructor for track segments.
 
 TRGCDCLayer ()
 Empty constructor for reduced CDC.
 
virtual ~TRGCDCLayer ()
 Destructor.
 
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
 
const TRGCDCCellcell (int id) const
 returns a pointer to a cell. 'id' can be negative or 'id' can be greater than 'nCells()'.
 
 TRGCDCLink (TRGCDCTrack *track=0, const TRGCDCCellHit *hit=0, const HepGeom::Point3D< double > &position=Point3D())
 Constructor.
 
 TRGCDCLink (const TRGCDCLink &)
 Copy constructor.
 
virtual ~TRGCDCLink ()
 Destructor.
 
static unsigned nLayers (const std::vector< TRGCDCLink * > &links)
 returns # of layers.
 
static void nHits (const std::vector< TRGCDCLink * > &links, unsigned *nHits)
 returns # of hits per layer.
 
static void nHitsSuperLayer (const std::vector< TRGCDCLink * > &links, unsigned *nHits)
 returns # of hits per super layer.
 
void dump_base (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
 
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
 
static void dump (const std::vector< TRGCDCLink * > &links, const std::string &message=std::string(""), const std::string &prefix=std::string(""))
 dumps TRGCDCLinks.
 
static void dump (const std::vector< const TRGCDCLink * > &links, const std::string &message=std::string(""), const std::string &prefix=std::string(""))
 dumps TRGCDCLinks.
 
static void dump (const TRGCDCLink &link, const std::string &message=std::string(""), const std::string &prefix=std::string(""))
 dumps TRGCDCLinks.
 
static unsigned nStereoHits (const std::vector< TRGCDCLink * > &links)
 returns # of stereo hits.
 
static unsigned nAxialHits (const std::vector< TRGCDCLink * > &links)
 returns # of axial hits.
 
static std::vector< TRGCDCLink * > axialHits (const std::vector< TRGCDCLink * > &links)
 returns axial hits.
 
static std::vector< TRGCDCLink * > stereoHits (const std::vector< TRGCDCLink * > &links)
 returns stereo hits.
 
static TRGCDCLinkinnerMost (const std::vector< TRGCDCLink * > &links)
 returns the inner-most link.
 
static TRGCDCLinkouterMost (const std::vector< TRGCDCLink * > &links)
 returns the outer-most link.
 
static void separateCores (const std::vector< TRGCDCLink * > &input, std::vector< TRGCDCLink * > &cores, std::vector< TRGCDCLink * > &nonCores)
 separate cores and non-cores.
 
static std::vector< TRGCDCLink * > cores (const std::vector< TRGCDCLink * > &input)
 separate cores and non-cores.
 
static bool sortById (const TRGCDCLink *a, const TRGCDCLink *b)
 sorts by ID.
 
static int sortByX (const TRGCDCLink *a, const TRGCDCLink *b)
 sorts by X position.
 
static unsigned width (const std::vector< TRGCDCLink * > &)
 returns width(wire cell unit) of given std::vector<TRGCDCLink *>. More...
 
static std::vector< TRGCDCLink * > edges (const std::vector< TRGCDCLink * > &)
 returns links which are edges. More...
 
static std::vector< TRGCDCLink * > sameLayer (const std::vector< TRGCDCLink * > &list, const TRGCDCLink &a)
 returns links which are in the same layer as 'a' or 'id'.
 
static std::vector< TRGCDCLink * > sameSuperLayer (const std::vector< TRGCDCLink * > &list, const TRGCDCLink &a)
 returns links which are in the same super layer as 'a' or 'id'.
 
static std::vector< TRGCDCLink * > sameLayer (const std::vector< TRGCDCLink * > &list, unsigned id)
 returns links which are in the same layer as 'a' or 'id'.
 
static std::vector< TRGCDCLink * > sameSuperLayer (const std::vector< TRGCDCLink * > &list, unsigned id)
 returns links which are in the same super layer as 'a' or 'id'.
 
static std::vector< TRGCDCLink * > inOut (const std::vector< TRGCDCLink * > &)
 returns links which are in the inner most and outer most layer. More...
 
static unsigned superLayer (const std::vector< TRGCDCLink * > &list)
 returns super layer pattern.
 
static unsigned superLayer (const std::vector< TRGCDCLink * > &list, unsigned minNHits)
 returns super layer pattern.
 
static unsigned nSuperLayers (const std::vector< TRGCDCLink * > &links)
 returns # of layers.
 
static unsigned nSuperLayers (const std::vector< TRGCDCLink * > &links, unsigned minNHits)
 returns # of layers.
 
static unsigned nMissingAxialSuperLayers (const std::vector< TRGCDCLink * > &links)
 returns # of missing axial super layers. More...
 
static const TRGCDCTrackMClinks2HEP (const std::vector< TRGCDCLink * > &links)
 returns TRGCDCTrackMC
 
static void nHitsSuperLayer (const std::vector< TRGCDCLink * > &links, std::vector< TRGCDCLink * > *list)
 returns hits list per super layer.
 
static std::string layerUsage (const std::vector< TRGCDCLink * > &links)
 usage of each layer
 
static void remove (std::vector< TRGCDCLink * > &list, const std::vector< TRGCDCLink * > &links)
 removes links from list if wire is same
 
static void initializeBuffers (void)
 initialize the Buffers
 
static void separate (const std::vector< TRGCDCLink * > &links, unsigned nLayers, std::vector< TRGCDCLink * > *layers)
 separates into layers.
 
const TRGCDCWirewire (void) const
 returns a pointer to a wire.
 
static void removeAll (void)
 destructs all TRGCDCLink objects. (Called by TRGCDC)
 
static void * operator new (size_t)
 new operator.
 
static void operator delete (void *)
 delete operator.
 
 Cpar (const TRGCDCLpar &)
 constructor of Cpar class
 
virtual ~TRGCDCLpar ()
 Destructor.
 
void circle (double x1, double y1, double x2, double y2, double x3, double y3)
 circle
 
CLHEP::HepMatrix dldc () const
 private const member functions
 
bool xy (double, double &, double &, int dir=0) const
 private const member functions
 
double x (double r) const
 private const member functions
 
double y (double r) const
 private const member functions
 
double phi (double r, int dir=0) const
 const member functions
 
void xhyh (double x, double y, double &xh, double &yh) const
 private const member functions
 
double s (double x, double y) const
 const member functions
 
double s (double r, int dir=0) const
 const member functions
 
CLHEP::HepVector center () const
 const member functions
 
 TRGCDCLpav ()
 Constructor.
 
virtual ~TRGCDCLpav ()
 Destructor.
 
void calculate_average (double x, double y, double w=1)
 member functions for calculation
 
void calculate_average (void)
 member functions for calculation
 
void calculate_average_n (double xxav, double yyav, double xyav, double xrrav, double yrrav, double rrrrav)
 private member function calculate_average_n
 
void calculate_average3 (double x, double y, double w=1)
 member functions for calculation
 
void calculate_average3 (void)
 member functions for calculation
 
double solve_lambda (void)
 private member function solve_lambda
 
double solve_lambda3 (void)
 private member function solve_lambda3
 
double calculate_lpar (void)
 member functions for calculation
 
double calculate_lpar3 (void)
 member functions for calculation
 
double fit (double x, double y, double w=1)
 member functions for fit
 
double fit ()
 member functions for fit
 
CLHEP::HepSymMatrix cov (int=0) const
 const member function cov
 
CLHEP::HepSymMatrix cov_c (int=0) const
 const member function cov_c
 
int extrapolate (double, double &, double &) const
 const member function for extrapolation
 
double similarity (double, double) const
 const member function similarity
 
void add_point (double x, double y, double w=1)
 member functions to add point
 
void add_point_frac (double x, double y, double w, double f)
 member functions to add point
 
void sub (double x, double y, double w=1, double a=0, double b=0)
 private member functions More...
 
const TRGCDCLpavoperator+= (const TRGCDCLpav &)
 assignment operator(s)
 
double prob () const
 const member function prob
 
double chi_deg () const
 const member function chi_deg
 
double delta_chisq (double x, double y, double w=1) const
 const member function for delta chisq
 
std::string version (void) const
 returns version.
 
 TRGCDCLUT ()
 Contructor.
 
virtual ~TRGCDCLUT ()
 Destructor.
 
int getValue (unsigned) const
 get LUT Values
 
void setDataFile (const std::string &filename, int)
 set LUT data.
 
static TRGCDCLUTgetLUT (const std::string &filename, int)
 get LUT from dictionary, load new LUT if it doesn't exist
 
 TRGCDCMerger (const std::string &name, unitType type, const TRGClock &systemClock, const TRGClock &dataClock, const TRGClock &userClockInput, const TRGClock &userClockOutput)
 Constructor.
 
virtual ~TRGCDCMerger ()
 Destructor.
 
static std::string version (void)
 return version.
 
unitType type (void) const
 return type.
 
static int implementation (const unitType &type, std::ofstream &)
 make a VHDL component file. More...
 
static int implementationPort (const unitType &type, std::ofstream &)
 writes a port map.
 
void push_back (const TRGCDCFrontEnd *)
 push back TRGCDCFrontEnd of this Merger
 
void dump (const std::string &message="", const std::string &pre="") const
 dumps contents. "message" is to select information to dump. "pre" will be printed in head of each line.
 
void simulate (void)
 simulates firmware.
 
static TRGState packerInner (const TRGState &input)
 Make bit pattern using input information from inner FEs.
 
static TRGState packerOuter (const TRGState &input)
 Make bit pattern using input information from outer FEs.
 
static void unpackerInner (const TRGState &input, const TRGState &output)
 Unpack TRGState.
 
static void unpackerOuter (const TRGState &input, const TRGState &output)
 Unpack TRGState.
 
void dump_log (void) const
 Dump all the details of _mosb into a .log file, do it in the end of simulate()
 
void dump_log_inner (void) const
 dump_log for inner Merger
 
void dump_log_outer (void) const
 dump_log for outer Merger
 
std::string version (void) const
 returns version.
 
 TRGCDCPeakFinder (const std::string &name)
 Contructor.
 
virtual ~TRGCDCPeakFinder ()
 Destructor.
 
void regions (TRGCDCHoughPlane &hp, const unsigned threshold) const
 Makes regions.
 
void findPeaksTrasan (TRGCDCHoughPlaneMulti2 &hp, const unsigned threshold, const bool centerIsPeak, std::vector< unsigned > &peakSerialIds) const
 do peak finding. This is a copy from "trasan".
 
void findPeaks (const TRGCDCHoughPlaneMulti2 &hp, const unsigned threshold, std::vector< std::vector< unsigned >> &peaks) const
 do peak finding. Kaiyu's version using p1p2Methode.
 
void p1p2Methode (const TRGCDCHoughPlane &hp, const unsigned threshold, std::vector< std::vector< unsigned >> &peaks) const
 Kaiyu's logic. Finds peaks from nested patterns.
 
std::string version (void) const
 returns version.
 
 TRGCDCPerfectFinder (const std::string &name, const TRGCDC &)
 Contructor.
 
virtual ~TRGCDCPerfectFinder ()
 Destructor.
 
int doit (std::vector< TRGCDCTrack * > &trackListClone, std::vector< TRGCDCTrack * > &trackList)
 do track finding.
 
int doitPerfectly (std::vector< TRGCDCTrack * > &trackList)
 do perfect finding.
 
 TRGCDCRelation (const TRGCDCTrackBase &track, const std::map< unsigned, unsigned > &relation)
 Constructor.
 
virtual ~TRGCDCRelation ()
 Destructor.
 
unsigned contributor (unsigned i=0) const
 returns i'th contributor of MCParticle.
 
const MCParticlemcParticle (unsigned i=0) const
 returns i'th contributor.
 
float purity (unsigned i=0) const
 returns i'th purity.
 
float purity3D (unsigned trkID) const
 returns purity for 3D for trkID particle which should be from 2D.
 
float efficiency3D (unsigned trkID, std::map< unsigned, unsigned > &numTSsParticle) const
 returns efficiency of TS for 3D
 
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 Dumps debug information.
 
 TRGCDCSegment (unsigned id, const TRGCDCLayer &layer, const TRGCDCWire &w, const TRGClock &clock, const std::string &TSLUTFile, const std::vector< const TRGCDCWire * > &wires)
 Constructor.
 
virtual ~TRGCDCSegment ()
 Destructor.
 
void initialize (void)
 initilize variables.
 
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const override
 dumps debug information.
 
void clear (void) override
 clears information.
 
std::string name (void) const override
 returns name.
 
void simulate (bool clockSimulation, bool logicLUTFlag, const std::string &cdcCollectionName=std::string(""), const std::string &tsCollectionName=std::string(""))
 simulates TF hit using wire information.
 
void simulateWithoutClock (bool logicLUTFlag)
 simulates time-indegrated TF hit
 
void simulateWithClock (std::string cdcCollectionName, std::string tsCollectionName)
 simulates TF hit time-dependently
 
float fastestTime (void) const
 return fastest time in TSHit.
 
float fastestTime (int clk0) const
 fastest time in TSHit that is larger of equal to clk0.
 
float foundTime (void) const
 return found time in TSHit.
 
float priorityTime (void) const
 return priority time in TSHit.
 
int priorityPosition (void) const
 return priority cell position in TSHit. 0: no hit, 3: 1st priority, 1: 2nd right, 2: 2nd left
 
int priorityPosition (int clk0, int clk1) const
 return priority cell position in TSHit for given time window.
 
const TRGCDCWirepriority (void) const
 returns priority wire.
 
unsigned hitPattern (void) const
 returns hit pattern.
 
unsigned hitPattern (int clk0, int clk1) const
 returns hit pattern for hits in given time window.
 
unsigned lutPattern (void) const
 hit pattern containing bit for priority position
 
unsigned lutPattern (int clk0, int clk1) const
 hit pattern containing bit for priority position for hits in given time window.
 
virtual bool hasMember (const std::string &a) const override
 returns true this has member named a.
 
 TRGCDCSegmentHit (const TRGCDCSegment &)
 Constructor.
 
virtual ~TRGCDCSegmentHit ()
 Destructor.
 
static int sortById (const TRGCDCSegmentHit **a, const TRGCDCSegmentHit **b)
 Sorting funnction.
 
virtual void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const override
 dumps debug information.
 
const TRGCDCSegmentsegment (void) const
 returns a pointer to a track segment.
 
static void removeAll (void)
 destructs all TRGCDCCellHit objects. (Called by TRGCDC)
 
static void * operator new (size_t)
 new operator.
 
static void operator delete (void *)
 delete operator.
 
 TRGCDCSteppingAction ()
 Constructor.
 
virtual ~TRGCDCSteppingAction ()
 Destructor.
 
virtual void UserSteppingAction (const G4Step *)
 Stepping action to control a step in G4.
 
 TRGCDCTrackBase (const TRGCDCTrackBase &)
 Copy constructor.
 
 TRGCDCTrackBase (const std::string &name, double charge)
 Constructor.
 
virtual ~TRGCDCTrackBase ()
 Destructor.
 
virtual void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
 
virtual int fit (void)
 fits itself by a default fitter. Error was happened if return value is not zero.
 
void append (TRGCDCLink *)
 appends a link.
 
void append (const std::vector< TRGCDCLink * > &links)
 appends links.
 
const std::vector< TRGCDCLink * > & links (void) const
 returns a vector to track segments.
 
const std::vector< TRGCDCLink * > & links (unsigned layerId) const
 returns a vector to track segments.
 
virtual int approach2D (TRGCDCLink &) const
 calculate closest approach. Error was happened if return value is not zero.
 
const TRGCDCRelation relation (void) const
 returns MC information. More...
 
const TRGCDCRelation relation2D (void) const
 returns MC information for only axial layers.
 
const TRGCDCRelation relation3D (void) const
 returns MC information for only stereo layers.
 
 TRGCDCTracker2D (const std::string &name, const TRGClock &systemClock, const TRGClock &dataClock, const TRGClock &userClockInput, const TRGClock &userClockOutput)
 Constructor.
 
virtual ~TRGCDCTracker2D ()
 Destructor.
 
static std::string version (void)
 returns version.
 
void push_back (const TRGCDCTrackSegmentFinder *)
 Appends a TSF board.
 
void dump (const std::string &message="", const std::string &pre="") const
 dumps contents. More...
 
void simulate (void)
 simulates firmware.
 
static TRGState packer (const TRGState &input, TRGState &registers, bool &logicStillActive)
 Packer for 3D tracker.
 
static void unpacker (const TRGState &input, TRGState &output)
 Unpack TSF output.
 
static void hitInformation (const TRGState &registers)
 Gets TSF hit information for one certin clock from the registers.
 
void setConstants (void)
 Sets constants.
 
static void update (void)
 updates information.
 
 TRGCDCTrackMC ()
 Constructor.
 
virtual ~TRGCDCTrackMC ()
 Destructor.
 
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
 
static std::vector< const TRGCDCTrackMC * > list (void)
 returns a list of TRGCDCTrackMC's.
 
std::vector< const TRGCDCWireHitMC * > hits (void) const
 returns a list of TRGCDCWireHitMC.
 
 TRGCDCTrackSegmentFinder (const TRGCDC &, bool makeRootFile, bool logicLUTFlag)
 Constructor.
 
 TRGCDCTrackSegmentFinder (const TRGCDC &, const std::string &name, boardType type, const TRGClock &systemClock, const TRGClock &dataClock, const TRGClock &userClockInput, const TRGClock &userClockOutput, const std::vector< TRGCDCSegment * > &tsSL)
 Constructor.
 
 ~TRGCDCTrackSegmentFinder ()
 Destructor.
 
boardType type (void) const
 board type of TSF
 
void terminate (void)
 terminate
 
void doit (std::vector< TRGCDCSegment * > &tss, const bool trackSegmentClockSimulation, std::vector< TRGCDCSegmentHit * > &segmentHits, std::vector< TRGCDCSegmentHit * > *segmentHitsSL)
 Member functions of doing TSF.
 
vector< TRGSignalVector * > findTSHit (TRGSignalVector *eachInput, int)
 Use LUT for find TSHit. More...
 
TRGSignalVectorpackerOuterTracker (vector< TRGSignalVector * > &, vector< int > &, const unsigned)
 Packing output for tracker.
 
TRGSignalVectorpackerOuterEvt (vector< TRGSignalVector * >, vector< int >, int)
 Packing output for evtTime & Low pT.
 
double mkint (TRGState)
 tranformatoin into integer
 
vector< bool > mkbool (int, int)
 tranformatoin into bool
 
void saveTSInformation (std::vector< TRGCDCSegment * > &tss)
 save the TS info
 
void saveTSFResults (std::vector< TRGCDCSegmentHit * > *segmentHitsSL)
 save result of TSF
 
void saveNNTSInformation (std::vector< TRGCDCSegment * > &tss)
 Saves NNTS information. Only when ts is hit.
 
void push_back (const TRGCDCMerger *)
 push back the Mergers of this TSF
 
void simulateOuter (void)
 Firmware simulation for the outers. yi.
 
vector< TRGSignalVector * > simulateOuter (TRGSignalVector *in, unsigned id)
 Simulate TSF response for the inner. More...
 
void priorityTiming (unsigned tsfID, const unsigned nTSF, TRGSignalVector &s, const TRGSignal &center, const TRGSignal &right, const TRGSignal &left) const
 Make TRGSignals for the priority timing bits.
 
void fastestTimingOuter (unsigned tsfID, const unsigned nTSF, TRGSignalVector &s) const
 Make TRGSignals for the fastest timing bits.
 
void simulateInner (void)
 Firmware simulation for the outers. yi.
 
void fastestTimingInner (unsigned tsfID, const unsigned nTSF, TRGSignalVector &s) const
 Make TRGSignals for the fastest timing bits.
 
vector< TRGSignalVector * > simulateInner (const TRGSignalVector &in, unsigned id)
 Simulate TSF response for the inner.
 
static void addID (TRGSignalVector &s, unsigned id)
 Add TSF ID to timing signal vector for the output.
 
void simulate (void)
 Firmware simulation. yi.
 
void simulate2 (void)
 Firmware simulation. Unified version of inner and outer : yi.
 
void hitMapInner (void)
 Creates the hit maps for the inner.
 
void hitMapOuter (void)
 Creates the hit maps for the outer.
 
void inputInner (const unsigned id, const unsigned nTSF, TRGSignalVector *s)
 Creates input signals to TSF for the inner.
 
void inputOuter (const unsigned id, const unsigned nTSF, TRGSignalVector *s)
 Creates input signals to TSF for the outer.
 
TRGSignalVectorpackerForTracker (vector< TRGSignalVector * > &, vector< int > &, const unsigned)
 Output packer for tracker.
 
vector< TRGSignalVector * > simulateTSFOld (TRGSignalVector *in, unsigned id)
 Simulate TSF response (unified version) More...
 
vector< TRGSignalVector * > simulateTSF (TRGSignalVector *in, unsigned id)
 Simulate TSF response (unified version, 2016/07/12) More...
 
vector< TRGSignalVector * > simulateTSF2 (TRGSignalVector *in, unsigned id)
 Simulate TSF response (unified version, state machine)
 
std::string name (void) const
 simulates track segment decisions. More...
 
std::string version (void) const
 returns version.
 
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...
 
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).
 
 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.
 
void initialize (unsigned houghFinderPeakMin, const std::string &houghMappingFilePlus, const std::string &houghMappingFileMinus, unsigned houghDoit)
 initializes CDC geometry.
 
void terminate (void)
 terminates when run is finished
 
void dump (const std::string &message) const
 dumps debug information.
 
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...
 
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)
 
void classification (void)
 classify hits.
 
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 TRGCDCWireHit * > hits (void) const
 returns a list of TRGCDCWireHit. More...
 
std::vector< const TRGCDCWireHitMC * > hitsMC (void) const
 returns a list of TRGCDCWireHitMC. 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.
 
virtual ~TRGCDC ()
 Destructor.
 
bool neighbor (const TRGCDCWire &w0, const TRGCDCWire &w1) const
 returns true if w0 and w1 are neighbor.
 
void simulate (void)
 fast trigger simulation.
 
void fastSimulation (void)
 Fast 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 firmwareSimulation (void)
 Firmware simulation.
 
void configure (void)
 configures trigger modules for firmware simulation.
 
const TRGCDCSegmentsegment (unsigned lyrId, unsigned id) const
 returns a track segment.
 
int getEventTime (void) const
 returns bad hits(finding invalid hits). More...
 
void setReturnValue (EReturnValueType const &moduleName, bool flag)
 sets return value for trg cdc module.
 
int getReturnValue (EReturnValueType const &moduleName) const
 gets return value for a module in trg cdc module.
 
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.
 
unsigned nSegments (unsigned id) const
 returns # of track segments in a layer.
 
 TRGCDCTrack ()
 Constructor.
 
 TRGCDCTrack (const TRGCDCCircle &)
 Constructor from a Circle.
 
virtual ~TRGCDCTrack ()
 Destructor.
 
static std::vector< const TRGCDCTrack * > list (void)
 returns a list of TRGCDCTrack's.
 
int approach (TRGCDCLink &, bool sagCorrection=false) const
 calculates the closest approach to a wire in real space. Results are stored in TLink. Return value is negative if error happened.
 
std::vector< HepGeom::Point3D< double > > perfectPosition (void) const
 returns perfect position from GEANT.
 
 TRGCDCWire (unsigned id, unsigned localId, const TRGCDCLayer &, const HepGeom::Point3D< double > &forwardPosition, const HepGeom::Point3D< double > &backwardPosition, const TRGClock &clock)
 Constructor.
 
virtual ~TRGCDCWire ()
 Destructor.
 
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const override
 dumps debug information.
 
const TRGCDCWireneighbor (unsigned) const
 returns a pointer to a neighbor wire. This function is expensive.
 
void clear (void) override
 clears information.
 
std::string name (void) const override
 returns name.
 
 TRGCDCWireHit (const TRGCDCWire &, unsigned indexCDCHit=0, unsigned indexCDCSimHit=0, unsigned indexMCParticle=0, float driftLeft=0, float driftLeftError=0, float driftRight=0, float driftRightError=0, int mcLRflag=1, float fudgeFacgtor=1)
 Constructor.
 
virtual ~TRGCDCWireHit ()
 Destructor.
 
const TRGCDCWirewire (void) const
 returns a pointer to a TRGCDCWire.
 
static int sortByWireId (const TRGCDCWireHit **a, const TRGCDCWireHit **b)
 Sort function. This will be removed.
 
static void removeAll (void)
 destructs all TRGCDCCellHit objects. (Called by TRGCDC)
 
static void * operator new (size_t)
 new operator.
 
static void operator delete (void *)
 delete operator.
 
 TRGCDCWireHitMC (const TRGCDCWire *, const TRGCDCWireHit *)
 Constructor.
 
virtual ~TRGCDCWireHitMC ()
 Destructor.
 
 TrgEclDatabaseImporter ()
 TrgEclDatabaseImporter Constructor.
 
void importFAMParameter (std::string, std::string, std::string)
 Import FAM Parameters.
 
void importTMMParameter (std::string)
 Import TMM Parameters.
 
void importETMParameter (std::string)
 Import ETM Parameters.
 
void importBadRunNumber (std::string)
 Import Bad Run Number.
 
void printTCThreshold ()
 Print TC energy Threshold.
 
int debugLevel (void) const
 returns debug level.
 
int debugLevel (int) const
 sets and returns debug level.
 
const TRGClocksystemClock (void) const
 returns the system clock.
 
double systemOffsetMC (void) const
 returns the system offset in MC.
 
unsigned firmwareSimulationMode (void) const
 returns firmware simulation mode.
 
std::string configFile (void) const
 returns configuration file name.
 
std::string name (void) const
 returns name.
 
std::string version (void) const
 returns version.
 
static TRGGDLgetTRGGDL (const std::string &configFile, unsigned simulationMode=0, unsigned fastSimulationMode=0, unsigned firmwareSimulationMode=0, const std::string &Phase="Phase", bool algFromDB=true, const std::string &algFilePath="ftd.alg", int debugLevel=0, double timquality_threshold_sfin=0, double timquality_threshold_fine=0)
 returns TRGGDL object with specific configuration.
 
static TRGGDLgetTRGGDL (void)
 returns TRGGDL object. More...
 
 TRGGDL (const std::string &configFile, unsigned simulationMode, unsigned fastSimulationMode, unsigned firmwareSimulationMode, const std::string &Phase, bool algFromDB=true, const std::string &algFilePath="ftd.alg", int debugLevel=0, double timquality_threshold_sfin=0, double timquality_threshold_fine=0)
 Constructor.
 
void initialize (void)
 initializes GDL.
 
void terminate (void)
 terminates when run is finished
 
void dump (const std::string &message) const
 dumps debug information.
 
void clear (void)
 clears all TRGGDL information.
 
void fastClear (void)
 clears TRGGDL information.
 
void update (bool mcAnalysis=true)
 updates TRGGDL information.
 
virtual ~TRGGDL ()
 Destructor.
 
void simulate (void)
 fast trigger simulation.
 
void fastSimulation (void)
 Fast simulation.
 
void dataSimulation (void)
 Data simulation.
 
bool isFiredFTDL (std::vector< bool > input, std::string alg)
 
bool doprescale (int f)
 
void firmwareSimulation (void)
 Firmware simulation.
 
void configure (void)
 configures trigger modules for firmware simulation.
 
void getInput (std::ifstream &ifs)
 Read input data definition.
 
void getOutput (std::ifstream &ifs)
 Read output data definition.
 
void getAlgorithm (std::ifstream &ifs)
 Read algorithm data definition.
 
static TRGState decision (const TRGState &input)
 Makes bit pattern(state) using input bit pattern(state).
 
static TRGState timingDecision (const TRGState &input, TRGState &registers, bool &logicStillActive)
 Makes timing decision.
 
void accumulateInp (TH1I *)
 Accumulate bit info in histogram.
 
void accumulateFtd (TH1I *)
 Accumulate bit info in histogram.
 
void accumulatePsn (TH1I *)
 Accumulate bit info in histogram.
 
void checkDatabase () const
 Check the content of the DBObjects used by this class.
 
int debugLevel (void) const
 returns debug level.
 
int debugLevel (int) const
 sets and returns debug level.
 
const TRGClocksystemClock (void) const
 returns the system clock.
 
unsigned firmwareSimulationMode (void) const
 returns firmware simulation mode.
 
std::string configFile (void) const
 returns configuration file name.
 
std::string name (void) const
 matching function More...
 
std::string version (void) const
 returns version.
 
static TRGGRLgetTRGGRL (const std::string &configFile, unsigned simulationMode=0, unsigned fastSimulationMode=0, unsigned firmwareSimulationMode=0)
 returns TRGGRL object with specific configuration.
 
static TRGGRLgetTRGGRL (void)
 returns TRGGRL object. More...
 
 TRGGRL (const std::string &configFile, unsigned simulationMode, unsigned fastSimulationMode, unsigned firmwareSimulationMode)
 Constructor.
 
void initialize (void)
 initializes GRL.
 
void terminate (void)
 terminates when run is finished
 
void dump (const std::string &message) const
 dumps debug information.
 
void clear (void)
 clears all TRGGRL information.
 
void fastClear (void)
 clears TRGGRL information.
 
void update (bool mcAnalysis=true)
 updates TRGGRL information.
 
virtual ~TRGGRL ()
 Destructor.
 
void simulate (void)
 fast trigger simulation.
 
void fastSimulation (void)
 Fast simulation.
 
void firmwareSimulation (void)
 Firmware simulation.
 
void configure (void)
 configures trigger modules for firmware simulation.
 
 TRGGRLMatch (TRGCDCTrack *track, TRGECLCluster *cluster, int flag)
 public member functions of TRGGRLMatch class Private variables can be called by the corresponding get function More...
 
virtual ~TRGGRLMatch ()
 Destructor.
 
void calculate (void)
 a function to execute calculation of matching
 
void dump (void)
 Unpacker of the TRGGRLMatch.
 
bool inArea (const TRGPoint2D &x) const
 returns true if give point is in the area.
 
const std::string & name (void) const
 returns name.
 
const std::string & name (const std::string &newName)
 sets and returns name.
 
void clear (void)
 clears contents.
 
unsigned size (void) const
 returns size of stream in unit of bit.
 
void append (int)
 appends a bit to a stream.
 
void append (unsigned)
 appends a bit to a stream.
 
unsigned sizeInChar (void) const
 returns size in char's.
 
char c (unsigned positionInChar) const
 returns a pointer to char's.
 
bool bit (unsigned positionInBit) const
 returns true if given position is active.
 
const std::string & name (void) const
 returns name.
 
const TRGClockclockSystem (void) const
 returns system clock.
 
const TRGClockclockData (void) const
 returns data clock.
 
const TRGClockclockUserInput (void) const
 returns Aurora user clock for input.
 
const TRGClockclockUserOutput (void) const
 returns Aurora user clock for output.
 
void appendInput (const TRGChannel *)
 appends an input Aurora channel.
 
void appendOutput (TRGChannel *)
 appends an output Aurora channel.
 
const TRGChannelinput (unsigned i) const
 returns input channel i.
 
TRGChanneloutput (unsigned i) const
 returns output channel i.
 
unsigned nInput (void) const
 returns input channels.
 
unsigned nOutput (void) const
 returns output channels.
 
const std::string & name (void) const
 returns name.
 
TRGSignalBundlesignal (TRGSignalBundle *)
 sets input data.
 
TRGSignalBundlesignal (void) const
 returns signal.
 
const TRGBoardsender (void) const
 sender TRG board
 
double offset (void) const
 returns offset of the clock zero position in nano second.
 
const std::string & name (void) const
 returns name.
 
double minTiming (void) const
 returns min. timing.
 
double maxTiming (void) const
 returns max. timing.
 
int unit (double period) const
 returns min # of clocks to cover given time period.
 
double frequency (void) const
 returns frequency in MHz.
 
int min (void) const
 returns min. clock point.
 
int max (void) const
 returns max. clock point.
 
int positionInSourceClock (double timing) const
 returns clock position in the source clock.
 
const std::string & name (void) const
 returns name.
 
const TRGClockclock (void) const
 returns clock.
 
void appendHeader (const TRGSignal *)
 appends a signal to header data.
 
void appendTrailer (const TRGSignal *)
 appends a signal to trailer data.
 
void append (const TRGSignal *)
 appends a signal to data.
 
double x (void) const
 x of the point
 
double y (void) const
 y of the point
 
double x (double)
 x of the point
 
double y (double)
 y of the point
 
double mag (void) const
 magnitude of the point
 
double mag2 (void) const
 magnitude square of the point
 
double phi (void) const
 phi of the point
 
double dot (const TRGPoint2D &) const
 inner product
 
double cross (const TRGPoint2D &) const
 outer product
 
TRGPoint2D operator+ (const TRGPoint2D &) const
 
TRGPoint2D operator- (const TRGPoint2D &) const
 
TRGPoint2D operator- () const
 
bool operator== (const TRGPoint2D &) const
 equal operator
 
TRGPoint2D unit (void) const
 unit vector
 
const std::string & name (void) const
 returns name.
 
const std::string & name (const std::string &newName)
 sets and returns name.
 
TRGSignal operator& (const TRGTime &) const
 returns AND result.
 
TRGSignaloperator&= (const TRGTime &)
 returns AND result.
 
TRGSignal operator| (const TRGTime &) const
 returns OR result.
 
TRGSignaloperator|= (const TRGTime &)
 returns OR result.
 
unsigned nSignals (void) const
 returns # of signals.
 
unsigned nEdges (void) const
 returns # of edges.
 
void clear (void)
 clears contents.
 
bool active (void) const
 returns true if there is a signal.
 
bool state (int clockPosition) const
 returns true if signal is active in given clock position.
 
bool riseEdge (int clockPosition) const
 returns true if signal is active and rising edge in give clock position.
 
const TRGTimeoperator[] (unsigned i) const
 returns timing of i'th edge.
 
const TRGClockclock (void) const
 returns clock.
 
bool operator!= (const TRGSignal &) const
 returns true if two are the same.
 
bool active (int clk0, int clk1) const
 returns true if there is a signal.
 
const std::string & name (void) const
 returns name.
 
const std::string & name (const std::string &newName)
 sets and returns name.
 
const TRGClockclock (void) const
 returns clock.
 
const std::string & name (void) const
 returns name.
 
const std::string & name (const std::string &newName)
 sets and returns name.
 
const TRGClockclock (void) const
 returns clock.
 
bool operator!= (const TRGSignalVector &) const
 compare two TRGSignalVectors.
 
unsigned size (void) const
 returns bit size.
 
bool active (void) const
 returns true if there are active bits.
 
bool active (unsigned bitPosition) const
 returns true if there are active bits.
 
bool operator[] (unsigned i) const
 returns state of i'th bit.
 
 operator unsigned () const
 Conversion to unsigned.
 
 operator unsigned long long () const
 Conversion to unsigned long long.
 
 operator std::string () const
 Conversion to string.
 
void copy2bool (bool *array) const
 returns a filled array.
 
const TRGStateset (unsigned position, unsigned size, const bool *const array)
 sets state.
 
const TRGStateset (unsigned position, unsigned size, unsigned value)
 sets state.
 
const TRGStateset (unsigned position, bool state=true)
 sets state at bit i.
 
const TRGStateset (unsigned position, const TRGState &)
 sets state.
 
static unsigned toUnsigned (unsigned n, const bool *array)
 Coverts from bool array to unsigned.
 
TRGStateshift (unsigned i)
 shifts bits.
 
void clear (void)
 clears state.
 
const std::string & name (void) const
 returns name.
 
const std::string & name (const std::string &newName)
 sets and returns name.
 
TRGTimereverse (void)
 reverse edge.
 
const TRGClockclock (void) const
 returns clock.
 
bool edge (void) const
 returns edge information.
 
TRGTimeshift (int unit)
 delays by clock unit.
 
int time (void) const
 returns timing in clock position.
 
int time (int newTime)
 sets and returns timing in clock position.
 
bool operator== (const TRGTime &) const
 returns true if two are the same.
 
bool operator!= (const TRGTime &) const
 returns false if two are the same.
 
 TRGArea2D (const TRGPoint2D &leftBottom, const TRGPoint2D &rightUpper)
 Contructor.
 
virtual ~TRGArea2D ()
 Destructor.
 
void cross (const TRGPoint2D &x0, const TRGPoint2D &x1, unsigned &nFound, TRGPoint2D crossPoint[2]) const
 returns cross-points.
 
 TRGBitStream ()
 Default constructor.
 
 TRGBitStream (int size, const std::string &name="unknown")
 Constructor of fixed size.
 
 TRGBitStream (const TRGBitStream &)
 Copy constructor.
 
 TRGBitStream (const char *const, unsigned sizeInBit)
 Constructor with char stream.
 
virtual ~TRGBitStream ()
 Destructor.
 
void dump (const std::string &message="", const std::string &pre="") const
 dumps contents. "message" is to select information to dump. "pre" will be printed in head of each line.
 
void append (bool)
 appends a bit to a stream.
 
static std::vector< TRGSignalTRGBitStream2TRGSignal (const TRGClock &clock, int initialClockPosition, std::vector< TRGBitStream * > stream)
 Make trigger signals from bit stream.
 
 TRGBoard (const std::string &name, const TRGClock &systemClock, const TRGClock &dataClock, const TRGClock &userClockInput, const TRGClock &userClockOutput)
 Constructor.
 
virtual ~TRGBoard ()
 Destructor.
 
void dump (const std::string &message="", const std::string &pre="") const
 dumps contents. More...
 
 TRGChannel (const std::string &name, const TRGBoard &sender, const TRGBoard &receiver)
 Constructor.
 
virtual ~TRGChannel ()
 Destructor.
 
 TRGClock (const std::string &name, double offset, double frequency)
 Constructor. "offset" is in unit of ns. "frequency" is in unit of MHz.
 
 TRGClock (const std::string &name, const TRGClock &, unsigned multiplicationFactor, unsigned divisionFactor=1)
 Constructor with clock source.
 
virtual ~TRGClock ()
 Destructor.
 
void dump (const std::string &message="", const std::string &pre="") const
 dumps contents. More...
 
int position (double timing) const
 returns clock position.
 
double absoluteTime (int clockPosition) const
 returns absolute time of clock position
 
double overShoot (double timing) const
 returns over shoot.
 
TRGTime minTRGTime (bool edge) const
 returns min. TRGtime with clock.
 
TRGTime maxTRGTime (bool edge) const
 returns max. TRGtime with clock.
 
double phase (double timing) const
 returns phase of given timing in degree (0 to 360).
 
const TRGSignalVectorclockCounter (void) const
 returns the clock counter.
 
static void enterStage (const std::string &stageName)
 Declare that you enter new stage.
 
static void leaveStage (const std::string &stageName)
 Declare that you leave a stage.
 
static std::string tab (void)
 returns tab spaces.
 
static std::string tab (int extra)
 returns tab spaces with extra spaces
 
static int level (void)
 returns the debug level.
 
static int level (int newLevel, bool thisStageOnly=false)
 sets and returns the debug level.
 
 TRGOpticalLink (const std::string &name, const TRGClock &)
 Constructor.
 
virtual ~TRGOpticalLink ()
 Destructor.
 
 TRGPoint2D ()
 Constructor.
 
 TRGPoint2D (double, double)
 Constructor.
 
 TRGPoint2D (const HepGeom::Point3D< double > &)
 Constructor.
 
 TRGPoint2D (const Vector3D &)
 Constructor.
 
 TRGPoint2D (const CLHEP::Hep3Vector &)
 Constructor.
 
virtual ~TRGPoint2D ()
 Destructor.
 
 TRGSignal (const TRGClock &=Belle2_GDL::GDLSystemClock)
 Constructor.
 
 TRGSignal (const TRGTime &t0, const TRGTime &t1)
 Constructor with clock and timing(t0 leading, t1 trailing).
 
 TRGSignal (const TRGClock &c, int t0, int t1)
 Constructor with clock and timing(t0 leading, t1 trailing).
 
 TRGSignal (const TRGClock &c, double t0, double t1)
 Constructor with clock and timing(t0 leading, t1 trailing). More...
 
 TRGSignal (const std::string &name, const TRGClock &=Belle2_GDL::GDLSystemClock)
 Constructor with name.
 
 TRGSignal (const TRGSignal &)
 Copy constructor.
 
 TRGSignal (const TRGTime &)
 Constructor.
 
virtual ~TRGSignal ()
 Destructor.
 
void dump (const std::string &message="", const std::string &pre="") const
 dumps contents. More...
 
TRGSignal operator& (const TRGSignal &) const
 returns AND result.
 
TRGSignaloperator&= (const TRGSignal &)
 returns AND result.
 
TRGSignal operator| (const TRGSignal &) const
 returns OR result.
 
TRGSignaloperator|= (const TRGSignal &)
 returns OR result.
 
static std::vector< TRGTimeorOperation (const std::vector< TRGTime > &)
 Or operation.
 
TRGSignalwiden (unsigned width)
 returns widen signals. Signals wider than "width" will be untouched.
 
std::vector< int > stateChanges (void) const
 returns a list of clock position of state change.
 
const TRGClockclock (const TRGClock &)
 changes clock.
 
unsigned width (unsigned i=0) const
 returns width of i'th signal (i=0,1,2,...).
 
const TRGSignalset (int t0, int t1, bool state=true)
 makes a pulse with leading edge at clock t0 and with trailing edge at clock t1.
 
const TRGSignalunset (int t0, int t1)
 clear(or unset) with leading edge at clock t0 and with trailing edge at clock t1.
 
void sort (void)
 Sort operation.
 
bool consistencyCheck (void) const
 Self-consitency check. True is return if something wrong.
 
const TRGSignalinvert (void)
 makes signal inverted.
 
bool operator== (const TRGSignal &) const
 returns true if two are the same.
 
 TRGSignalBundle (const TRGClock &)
 Default constructor.
 
 TRGSignalBundle (const std::string &name, const TRGClock &)
 Constructor with name.
 
 TRGSignalBundle (const std::string &name, const TRGClock &clock, const TRGSignalBundle &input, const unsigned outputBitSize, TRGState(*packer)(const TRGState &))
 Constructor with a packer.
 
 TRGSignalBundle (const std::string &name, const TRGClock &clock, const TRGSignalBundle &input, const unsigned outputBitSize, const unsigned registerBitSize, TRGState(*packer)(const TRGState &in, TRGState &registers, bool &logicStillActive))
 Constructor with a packer which can handle multiple clock states.
 
virtual ~TRGSignalBundle ()
 Destructor.
 
void dump (const std::string &message="", const std::string &pre="") const
 dumps contents. More...
 
bool active (void) const
 returns true if there is a signal.
 
std::vector< int > stateChanges (void) const
 returns a list of clock position of state change.
 
TRGState state (int clockPosition) const
 returns state at given clock position.
 
const TRGClockclock (const TRGClock &)
 changes clock.
 
TRGSignal ored (void) const
 returns signal of all ORed.
 
void dumpCOE (const std::string &fileName="", int start=0, int stop=0) const
 makes coe output.
 
 TRGSignalVector (const std::string &name, const TRGClock &, unsigned size=0)
 Default constructor. More...
 
 TRGSignalVector (const TRGSignalVector &)
 Copy constructor.
 
 TRGSignalVector (const TRGSignal &)
 Constructor.
 
virtual ~TRGSignalVector ()
 Destructor.
 
void dump (const std::string &message="", const std::string &pre="") const
 dumps contents. More...
 
TRGSignalVectoroperator+= (const TRGSignal &)
 appends TRGSignal.
 
TRGSignalVectoroperator+= (const TRGSignalVector &)
 appends TRGSignalVector.
 
bool active (void) const
 returns true if there is a signal.
 
bool active (int clockPosition) const
 returns true if there is a signal at clock position.
 
std::vector< int > stateChanges (void) const
 returns a list of clock position of state change.
 
TRGState state (int clockPosition) const
 returns state at given clock position.
 
const TRGClockclock (const TRGClock &)
 changes clock.
 
const TRGSignalVectorset (const TRGState &, int clockPosition)
 sets state at given clock.
 
bool operator== (const TRGSignalVector &) const
 compare two TRGSignalVectors.
 
 TRGState (unsigned bitSize=0)
 Default constructor.
 
 TRGState (unsigned bitSize, unsigned value)
 Constructor with unsigned.
 
 TRGState (unsigned bitSize, const bool *const states)
 Constructor.
 
 TRGState (std::vector< bool > states)
 Constructor.
 
 TRGState (std::vector< unsigned > &states, unsigned order)
 Constructor. order: 0=>inVector[0] is lsb. 1=>inVector[0] is msb.
 
 TRGState (const char *, unsigned type)
 Constructor. type: 0-> binary, 1->hex.
 
virtual ~TRGState ()
 Destructor.
 
void dump (const std::string &message="", const std::string &pre="") const
 dumps contents. More...
 
TRGStateoperator+= (const TRGState &)
 appends TRGState (as MSB).
 
TRGState subset (unsigned i, unsigned n) const
 returns subset from i with n bits.
 
TRGStateoperator= (const TRGState &)
 Copy operator.
 
bool operator< (const TRGState &) const
 Copy operator.
 
 TRGTime (const TRGTime &)
 Copy constructor.
 
 TRGTime (double timing, bool edge, const TRGClock &clock, const std::string &name="signal")
 Constructor with clock. More...
 
 TRGTime (int clockPosition, bool edge, const TRGClock &clock, const std::string &name="signal")
 Constructor with clock. More...
 
virtual ~TRGTime ()
 Destructor.
 
TRGSignal operator& (const TRGTime &) const
 adding two TRGTime. A result is TRGSignal.
 
TRGSignal operator& (const TRGSignal &) const
 adding two TRGTime. A result is TRGSignal.
 
TRGSignal operator| (const TRGTime &) const
 oring two TRGTime. A result is TRGSignal.
 
TRGSignal operator| (const TRGSignal &) const
 oring two TRGTime. A result is TRGSignal.
 
void dump (const std::string &message="", const std::string &pre="") const
 dumps contents. More...
 
static bool sortByTime (const TRGTime &a, const TRGTime &b)
 returns true if a is older than b.
 
const TRGClockclock (const TRGClock &)
 changes clock.
 
static std::string dateString (void)
 returns date string.
 
static std::string dateStringF (void)
 returns date string for filename.
 
static std::string itostring (int i)
 converts int to string. (Use boost::lexical_cast)
 
static std::string dtostring (double d, unsigned int precision)
 converts double to string.
 
static std::string carstring (const std::string &s)
 CERNLIB car.
 
static std::string cdrstring (const std::string &s)
 CERNLIB cdr.
 
static void bitDisplay (unsigned)
 Dumps bit contents to cout.
 
static void bitDisplay (unsigned val, unsigned firstDigit, unsigned lastDigit)
 Dumps bit contents to cout.
 
static std::string streamDisplay (unsigned, unsigned firstDigit, unsigned lastDigit)
 Dumps bit stream in string.
 
static std::string streamDisplay (unsigned)
 Dumps bit stream in string.
 

Variables

const double M_PI2 = 2. * M_PI
 2*PI
 
const double M_PI4 = 4. * M_PI
 4*PI
 
const double M_PI8 = 8. * M_PI
 8*PI
 
const TRGCDCLayerTRGCDCUndefinedLayer
 TRGCDCUndefinedLayer declaration. More...
 
const int ntrgline = 18
 set the total number of trigger lines and prescalefactor
 
double scalef_phase2 [ntrgline] = {1, 1, 20, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 1, 1, 1, 1, 1}
 prescale factor for phase2
 
double scalef_phase3 [ntrgline] = {1, 1, 20, 2, 1, 1, 1, 1, 2, 1, 1, 20, 20, 1, 5, 1, 3, 5}
 prescale factor for phase3
 
const HepGeom::Point3D< double > ORIGIN
 Origin 3D point.
 
static const TRGCDCCircleFitter _fitter = TRGCDCCircleFitter("TRGCDCCircle Default Fitter")
 Default fitter.
 
static const double ConstantAlpha = 222.376063
 Constant alpha for uniform field.
 
static const std::string invalidhelix
 string of invalid helix
 
static CLHEP::HepVector ms_amin
 limits for helix parameters
 
static CLHEP::HepVector ms_amax
 limits for helix parameters
 
static bool ms_check_range
 range in checked or not
 
static bool ms_throw_exception
 throw exception or not
 
static bool ms_print_debug
 print debug info or not
 
static bool ms_smallcell
 ms_smallcell
 
static bool ms_superb
 ms_superb
 
static unsigned _nL = 56
 ...Buffers...
 
static unsigned _nSL = 9
 ...Buffers...
 
static unsigned _nSLA = 5
 ...Buffers...
 
static unsigned * _nHitsSL = 0
 ...Buffers...
 
static std::vector< TRGCDCLink * > _all
 Keeps all TRGCDCLinks created by new().
 
static const double BELLE_ALPHA
 belle alpha
 
static std::map< std::string, TRGCDCLUTdictionary
 list of LUTs, to avoid reading LUT data 2336 times
 
static std::vector< TRGCDCSegmentHit * > _all
 Keeps all TRGCDCSegmentHit created by new().
 
static unsigned _nTSF = 0
 # of TSFs.
 
static std::vector< unsigned > _n
 # of TSFs in super layer i.
 
static TRGState _ts
 Keeps TS hit info.
 
static TRGCDCTrackMC_undefined = new TRGCDCTrackMC()
 returns a pointer to gen_hepevt. More...
 
static std::vector< const TRGCDCTrackMC * > _list = std::vector<const TRGCDCTrackMC*>()
 vector of pointers to TRGCDCTrackMC
 
static TRGCDC_cdc = 0
 CDC trigger singleton.
 
static std::vector< const TRGCDCTrack * > _list = vector<const TRGCDCTrack*>()
 a vector to keep all TRGCDCTrack objects.
 
static std::vector< TRGCDCWireHit * > _all
 Keeps all TRGCDCWireHit created by new().
 
static TRGGDL_gdl = 0
 GDL singleton. More...
 
static void(* _ftd )(bool *out, const bool *in)
 Function to simulate final trigger decision.
 
static TRGGRL_grl = 0
 GRL singleton.
 
static std::vector< std::string > _stages
 Storage for stages.
 
static int _level = 0
 Debug level. 0:do nothing, 1:show you flow, 2:show you detail, 10:show you very detail.
 
static const unsigned _su = sizeof(unsigned)
 size of unsigned.
 
static const unsigned _bsu = 8 * sizeof(unsigned)
 bit size of unsigned.
 

Detailed Description

Function Documentation

◆ axialHits()

vector< const TCWHit * > axialHits ( void  ) const

returns a list of axial hits.

'update()' must be called before calling this function.

Definition at line 1679 of file TRGCDC.cc.

1680  {
1681  vector<const TCWHit*> t;
1682  t.assign(_axialHits.begin(), _axialHits.end());
1683  return t;
1684 
1685  // if (! mask) return _axialHits;
1686  // else if (mask == CellHitFindingValid) return _axialHits;
1687  // cout << "TRGCDC::axialHits !!! unsupported mask given" << endl;
1688  // return _axialHits;
1689  }
std::vector< TRGCDCWireHit * > _axialHits
CDC hits on axial wires.
Definition: TRGCDC.h:635

◆ axialSegmentHits()

std::vector< const TRGCDCSegmentHit * > axialSegmentHits ( unsigned  a) const
inline

returns a list of TRGCDCSegmentHit in a axial super layer N.

'simulate()' must be called before calling this function

Definition at line 1014 of file TRGCDC.h.

1015  {
1016  std::vector<const TRGCDCSegmentHit*> t;
1017  t.assign(_segmentHitsSL[a * 2].begin(), _segmentHitsSL[a * 2].end());
1018  return t;
1019  }
std::vector< TRGCDCSegmentHit * > _segmentHitsSL[9]
Track Segments with hits in each super layer.
Definition: TRGCDC.h:659

◆ calCosPhi()

void calCosPhi ( std::map< std::string, Belle2::TRGCDCJSignal > &  mSignalStorage,
std::map< std::string, Belle2::TRGCDCJLUT * > &  mLutStorage 
)
staticprivate

Calculate Cos Sin ?

Calculate phi

Definition at line 412 of file HoughFinder.cc.

414  {
415 
417  Belle2::TRGCDCJSignalData* commonData = mSignalStorage.begin()->second.getCommonData();
418  {
419  mSignalStorage["invPhiAxMin"] = Belle2::TRGCDCJSignal(M_PI, mSignalStorage["phi_4"].getToReal(), commonData);
420  mSignalStorage["invPhiAxMax"] = Belle2::TRGCDCJSignal(2 * M_PI, mSignalStorage["phi_4"].getToReal(), commonData);
421  }
422 
423  for (unsigned iSt = 0; iSt < 5; iSt++) {
424  string t_inputName = "phi_" + to_string(iSt);
425  string t_outputName = "cosPhi_" + to_string(iSt);
426 
427  if (!mLutStorage.count(t_outputName)) {
428  mLutStorage[t_outputName] = new Belle2::TRGCDCJLUT(t_outputName);
429  mLutStorage[t_outputName]->setFloatFunction(
430  [ = ](double aValue) -> double{return cos(aValue);},
431  mSignalStorage[t_inputName],
432  mSignalStorage["invPhiAxMin"], mSignalStorage["invPhiAxMax"], mSignalStorage[t_inputName].getToReal(),
433  12, 12);
434  };//if name
435 
436  mLutStorage[t_outputName]->operate(mSignalStorage[t_inputName], mSignalStorage[t_outputName]);
437  } // end for
438  }//calCosPhi
A class to use LUTs for TRGCDC.
Definition: JLUT.h:35
A class to hold common data for JSignals.
Definition: JSignalData.h:33
A class to use Signals for TRGCDC 3D tracker.
Definition: JSignal.h:35

◆ cellSize()

float cellSize ( void  ) const
inline

calculates position and direction vector with sag correction.

returns cell size in phi.

Definition at line 299 of file Cell.h.

300  {
301  return _layer.cellSize();
302  }
const TRGCDCLayer & _layer
Layer.
Definition: Cell.h:169
float cellSize(void) const
returns cell size.
Definition: Layer.h:231

◆ choose()

void choose ( TRGCDCJSignal target,
TRGCDCJSignal const &  targetMin,
TRGCDCJSignal const &  targetMax,
TRGCDCJSignal const &  reference,
std::vector< std::vector< TRGCDCJSignal > >  data,
int  targetClock 
)
static

Case method.

Reference is what is used to determine. Target is what is going to be assigned. Data is (Assignment, From, To)... (Assignment). Last is default. Choose with target clock. Also has input for target min and target max signal.

Definition at line 621 of file JSignal.cc.

623  {
624 
625  TRGCDCJSignal t_reference(reference);
626  if (t_reference.m_argumentSignals.size() == 0) t_reference.initArgumentSignals();
627 
628  // Handle input errors.
629  if (data.size() == 0 || data.size() == 1) {
630  cout << "[Error] TRGCDCJSignal::choose() => There is not enough data." << endl;
631  return;
632  }
633  if ((*(data.end() - 1)).size() != 1) {
634  cout << "[Error] TRGCDCJSignal::choose() => Last data doesn't contain 1 TRGCDCJSignal." << endl;
635  return;
636  }
637 
638  // Calculate result final clock.
639  int t_maxClock = t_reference.m_finishClock;
640  for (unsigned iCondition = 0; iCondition < data.size(); iCondition++) {
641  const TRGCDCJSignal* assign = &(data[iCondition][0]);
642  if (t_maxClock < assign->m_finishClock) t_maxClock = assign->m_finishClock;
643  }
644  // Save final clock.
645  if (targetClock == -3) target.m_finishClock = t_maxClock + 1;
646  else {
647  if (targetClock < t_maxClock) cout << "[Error] TRGCDCJSignal::choose() => targetClock is too small." << endl;
648  else target.m_finishClock = targetClock;
649  }
650 
651  // Change assignment black signal constructors to min and max.
652  // Change assignment min, max (int, actual).
653  signed long long t_minInt = targetMin.m_minInt;
654  signed long long t_maxInt = targetMax.m_maxInt;
655  double t_minActual = targetMin.m_minActual;
656  double t_maxActual = targetMax.m_maxActual;
657  for (unsigned iCondition = 0; iCondition < data.size(); iCondition++) {
658  TRGCDCJSignal* from = 0;
659  TRGCDCJSignal* to = 0;
660  TRGCDCJSignal* assign = &(data[iCondition][0]);
661 
662  // To keep properties.
663  TRGCDCJSignal t_assign(*assign);
664 
665  // To prevent target clock to become constant.
666  //if(assign->m_minInt==assign->m_maxInt) assign->m_finishClock= target.m_finishClock-1;
667  //else assign->m_finishClock= target.m_finishClock;
668  // Change finish clock to target clock.
669  // Init arguments.
670  if (assign->m_argumentSignals.size() == 0) assign->initArgumentSignals();
671  assign->m_finishClock = target.m_finishClock;
672 
673  // Change min, max (int, actual), type values.
674  assign->m_minInt = t_minInt;
675  assign->m_maxInt = t_maxInt;
676  assign->m_minActual = t_minActual;
677  assign->m_maxActual = t_maxActual;
678  assign->m_type = assign->calType();
679  assign->m_bitsize = assign->calBitwidth();
680  // Calculated vhdlCode due to above changes.
681  if (reference.getPrintVhdl() == 1) vhdlCode("none", t_assign, *assign, assign->m_vhdlCode);
682 
683  // For non-default
684  if (data[iCondition].size() != 1) {
685  // Change blank signal constructors to min and max.
686  from = &(data[iCondition][1]);
687  to = &(data[iCondition][2]);
688  if (from->m_bitsize == -1) {
689  (*from) = TRGCDCJSignal(t_reference.m_minInt, t_reference.m_toReal, t_reference.m_minInt, t_reference.m_minInt,
690  t_reference.m_minActual, t_reference.m_minActual, t_reference.m_minActual, -1, t_reference.m_commonData);
691  }
692  if (to->m_bitsize == -1) {
693  (*to) = TRGCDCJSignal(t_reference.m_maxInt, t_reference.m_toReal, t_reference.m_maxInt, t_reference.m_maxInt,
694  t_reference.m_maxActual, t_reference.m_maxActual, t_reference.m_maxActual, -1, t_reference.m_commonData);
695  }
696  }
697 
698  if (from) {
699  if (from->m_argumentSignals.size() == 0) from->initArgumentSignals();
700  }
701  if (to) {
702  if (to->m_argumentSignals.size() == 0) to->initArgumentSignals();
703  }
704  }
705  // For integer case.
706  for (unsigned iCondition = 0; iCondition < data.size(); iCondition++) {
707  TRGCDCJSignal const* assign = &(data[iCondition][0]);
708  // For default case.
709  if (data[iCondition].size() == 1) {
710  string t_string = "";
711  target.assignTo(*assign, target.m_finishClock, t_string);
712  // For non-default cases.
713  } else {
714  TRGCDCJSignal const* from = &(data[iCondition][1]);
715  TRGCDCJSignal const* to = &(data[iCondition][2]);
716  if (t_reference.m_int >= from->m_int && t_reference.m_int <= to->m_int) {
717  string t_string = "";
718  target.assignTo(*assign, target.m_finishClock, t_string);
719  break;
720  }
721  }
722  }
723  // For actual case.
724  for (unsigned iCondition = 0; iCondition < data.size(); iCondition++) {
725  TRGCDCJSignal const* assign = &(data[iCondition][0]);
726  // For default case.
727  if (data[iCondition].size() == 1) {
728  target.m_actual = (*assign).m_actual;
729  // For non-default case.
730  } else {
731  TRGCDCJSignal const* from = &(data[iCondition][1]);
732  TRGCDCJSignal const* to = &(data[iCondition][2]);
733  assign = &(data[iCondition][0]);
734  if (t_reference.m_actual >= from->m_actual && t_reference.m_actual <= to->m_actual) {
735  target.m_actual = (*assign).m_actual;
736  break;
737  }
738  }
739  }
740 
741  target.checkInt("TRGCDCJSignal::choose()");
742 
743  // Print Vhdl code.
744  if (reference.getPrintVhdl() == 1) {
745  string t_finalCode = chooseVhdlCode(target, t_reference, data);
746  target.m_commonData->m_vhdlInProcess += t_finalCode + "\n";
747  //target.printVhdl(t_finalCode);
748  }
749 
750  }
int m_finishClock
Holds the clock tick when the signal is valid.
Definition: JSignal.h:305
static void vhdlCode(TRGCDCJSignal const &first, const std::string &operation, TRGCDCJSignal const &second, TRGCDCJSignal const &result, std::string &targtVhdlCode)
Writes vhdl code using two signals.
Definition: JSignal.cc:1781
static std::string chooseVhdlCode(TRGCDCJSignal const &target, TRGCDCJSignal const &reference, std::vector< std::vector< TRGCDCJSignal > > const &data)
Writes the choose vhdl code.
Definition: JSignal.cc:2004
TRGCDCJSignal()
Constructor.
Definition: JSignal.cc:55

◆ doFitting()

int doFitting ( std::vector< TRGCDCTrack * > &  trackList2D,
std::vector< TRGCDCTrack * > &  trackList2DFitted 
)
private

do track fitting. (kaiyu original)

LUT values

Definition at line 857 of file HoughFinder.cc.

◆ doit()

void doit ( std::vector< TRGCDCTrack * > const &  trackList2D,
std::vector< TRGCDCTrack * > &  trackList3D 
)

Member functions.

Finds tracks using tracklist2D and outputs to trackList3D. Has parameter to choose between perfect and original finder.

Definition at line 220 of file Hough3DFinder.cc.

221  {
222  // Loop over trackList2D and copy to make a new trackList3D. Will delete it at TRGCDC.cc.
223  for (unsigned int iTrack = 0; iTrack < trackList2D.size(); iTrack++) {
224  TCTrack& aTrack = * new TCTrack(* trackList2D[iTrack]);
225  trackList3D.push_back(& aTrack);
226  }
227  doit(trackList3D);
228  }
void doit(std::vector< TRGCDCTrack * > const &trackList2D, std::vector< TRGCDCTrack * > &trackList3D)
Member functions.

◆ dump() [1/9]

void dump ( const std::string &  message = "",
const std::string &  pre = "" 
) const

dumps contents.

"message" is to select information to dump. "pre" will be printed in head of each line.

Definition at line 146 of file FrontEnd.cc.

147  {
148  TRGBoard::dump(message, pre);
149  }
void dump(const std::string &message="", const std::string &pre="") const
dumps contents.
Definition: Board.cc:42

◆ dump() [2/9]

void dump ( const std::string &  message = "",
const std::string &  pre = "" 
) const

dumps contents.

"message" is to select information to dump. "pre" will be printed in head of each line.

Definition at line 64 of file Tracker2D.cc.

65  {
66  TRGBoard::dump(message, pre);
67  }

◆ dump() [3/9]

void dump ( const std::string &  message = "",
const std::string &  pre = "" 
) const

dumps contents.

"message" is to select information to dump. "pre" will be printed in head of each line.

Definition at line 42 of file Board.cc.

43  {
44  cout << pre << _name;
45  const string tab = pre + " ";
46  if (msg.find("detail") != string::npos) {
47  cout << endl;
48  cout << pre << "System clock:" << _clockSystem->name() << endl;
49  cout << pre << "Data clock:" << _clockData->name() << endl;
50  cout << pre << "Input user clock:" << _clockUserInput->name() << endl;
51  cout << pre << "Output user clock:" << _clockUserOutput->name()
52  << endl;
53  cout << pre << "Input channels" << endl;
54  for (unsigned i = 0; i < _inputChannels.size(); i++) {
55  cout << tab << _inputChannels[i]->name() << endl;
56  }
57  cout << pre << "Output channels" << endl;
58  for (unsigned i = 0; i < _outputChannels.size(); i++) {
59  cout << tab << _outputChannels[i]->name() << endl;
60  }
61  }
62  cout << endl;
63  }
const TRGClock * _clockData
Data clock.
Definition: Board.h:90
const TRGClock * _clockUserInput
User clock.
Definition: Board.h:93
const std::string _name
Name of a board.
Definition: Board.h:84
std::vector< const TRGChannel * > _inputChannels
Input Aurora channel.
Definition: Board.h:99
const TRGClock * _clockSystem
System clock.
Definition: Board.h:87
std::vector< TRGChannel * > _outputChannels
Output Aurora channel.
Definition: Board.h:102
const TRGClock * _clockUserOutput
User clock.
Definition: Board.h:96
const std::string & name(void) const
returns name.
Definition: Clock.h:157

◆ dump() [4/9]

void dump ( const std::string &  message = "",
const std::string &  pre = "" 
) const

dumps contents.

"message" is to select information to dump. "pre" will be printed in head of each line.

Definition at line 88 of file Clock.cc.

90  {
91  cout << pre << _name;
92  if (_source) {
93  cout << ":sync'd to " << _source->name() << endl;
94  cout << pre << " multiplication factor=" << _multi << endl;
95  cout << pre << " division factor =" << _div << endl;
96  } else {
97  cout << endl;
98  }
99 
100  cout << pre << " offset :" << _offset << endl
101  << pre << " freq(MHz):" << _frequency << endl
102  << pre << " cycle(ns):" << _cycle << endl
103  << pre << " min pos :" << _min << endl
104  << pre << " max pos :" << _max << endl
105  << pre << " min(ns) :" << minTiming() << endl
106  << pre << " max(ns) :" << maxTiming() << endl;
107 
108  cout << pre << " numeric limit of int (min,max="
109  << numeric_limits<int>::min() << ","
110  << numeric_limits<int>::max() << ")" << endl;
111  }
const double _offset
Clock offset in nano second.
Definition: Clock.h:128
const unsigned _div
Division factor.
Definition: Clock.h:125
const std::string _name
Name.
Definition: Clock.h:116
const double _cycle
Clock cycle in nano second.
Definition: Clock.h:134
int _max
Clock max. count.
Definition: Clock.h:140
const double _frequency
Frequency in MHz.
Definition: Clock.h:131
int _min
Clock min. count.
Definition: Clock.h:137
const unsigned _multi
Multiplication factor.
Definition: Clock.h:122
const TRGClock * _source
Clock source.
Definition: Clock.h:119
double maxTiming(void) const
returns max. timing.
Definition: Clock.h:172
double minTiming(void) const
returns min. timing.
Definition: Clock.h:164

◆ dump() [5/9]

void dump ( const std::string &  message = "",
const std::string &  pre = "" 
) const

dumps contents.

"message" is to select information to dump. "pre" will be printed in head of each line.

Definition at line 139 of file Signal.cc.

141  {
142 
143  string tmp;
144  tmp.resize(_name.size());
145  transform(_name.cbegin(), _name.cend(), tmp.begin(), ::toupper);
146 
147  const bool ctr = tmp.find("CLOCKCOUNTER") != string::npos;
148 
149  cout << pre << _name << ":#signal=" << _history.size();
150 
151  if (msg.find("clock") != string::npos ||
152  msg.find("detail") != string::npos) {
153  cout << ":clock=" << _clock->name();
154  }
155 
156  cout << endl;
157 
158  if (_history.size() && (! ctr)) {
159  for (unsigned i = 0; i < _history.size(); i++)
160  _history[i].dump(msg, pre + " ");
161  }
162  }
const TRGClock * _clock
Clock.
Definition: Signal.h:178
std::vector< TRGTime > _history
Timing history.
Definition: Signal.h:181
std::string _name
Name.
Definition: Signal.h:175

◆ dump() [6/9]

void dump ( const std::string &  message = "",
const std::string &  pre = "" 
) const

dumps contents.

"message" is to select information to dump. "pre" will be printed in head of each line.

Definition at line 193 of file SignalBundle.cc.

195  {
196  cout << pre << _name << ":" << size() << " signal vector(s)" << endl;
197  for (unsigned i = 0; i < size(); i++)
198  (* this)[i]->dump(msg, " " + pre);
199  }
std::string _name
Name.
Definition: SignalBundle.h:103

◆ dump() [7/9]

void dump ( const std::string &  message = "",
const std::string &  pre = "" 
) const

dumps contents.

"message" is to select information to dump. "pre" will be printed in head of each line.

Definition at line 64 of file SignalVector.cc.

66  {
67 
68  cout << pre << _name << ":" << size() << " signal(s)" << endl;
69 
70  const bool det = msg.find("detail") != string::npos;
71  const bool clk = msg.find("clock") != string::npos;
72 
73  if (det || clk)
74  cout << pre << ":clock=" << _clock->name();
75 
76  if (det)
77  for (unsigned i = 0; i < size(); i++)
78  (* this)[i].dump(msg, " " + pre + "bit" +
79  TRGUtil::itostring(i) + ":");
80  else
81  for (unsigned i = 0; i < size(); i++)
82  if ((* this)[i].active())
83  (* this)[i].dump(msg, " " + pre + "bit" +
84  TRGUtil::itostring(i) + ":");
85  }
const TRGClock * _clock
Clock.
Definition: SignalVector.h:104
std::string _name
Name.
Definition: SignalVector.h:101

◆ dump() [8/9]

void dump ( const std::string &  message = "",
const std::string &  pre = "" 
) const

dumps contents.

"message" is to select information to dump. "pre" will be printed in head of each line.

Definition at line 199 of file State.cc.

201  {
202 
203 // bool bin = true;
204  bool large = (_size > 60) || msg.find("large") != string::npos;
205 
206  if (! large) {
207  cout << pre << "size=" << _size << ",";
208  for (unsigned i = 0; i < _size; i++) {
209  const unsigned j = _size - i - 1;
210  if ((j % 8) == 7)
211  cout << "_";
212  if ((* this)[j])
213  cout << "1";
214  else
215  cout << "0";
216  }
217  cout << dec << endl;
218  } else {
219  cout << pre << "size=" << _size << endl;
220 
221  const unsigned nPerLines = 64;
222  const unsigned lines = _size / nPerLines + 1;
223  const unsigned rem = _size % nPerLines;
224 
225  cout << "TRGState" <<
226  " +56 +48 +40 +32 +24 +16 +8"
227  << " +0" << endl;
228 
229  bool skipLast = false;
230  for (unsigned i = 0; i < lines; i++) {
231  const unsigned n0 = (i == 0) ? rem - 1 : nPerLines - 1;
232  const int n1 = 0;
233  const int os = (lines - i - 1) * nPerLines;
234 
235  const string b = TRGUtilities::itostring(os);
236 
237  TRGState s = subset(n1 + os, n0 - n1 + 1);
238 
239 // s.dump("", "*** ");
240 
241  bool skip = false;
242  if (! s.active())
243  skip = true;
244 
245  if (skip) {
246  if (!skipLast) {
247  cout << "... (all zero)" << endl;
248  }
249 
250  skipLast = true;
251  continue;
252  }
253 
254  skipLast = false;
255 
256  cout.width(5);
257  cout << b;
258  cout << " ";
259 
260  if (i == 0) {
261  unsigned n = nPerLines - rem + (nPerLines - rem) / 8;
262  if (rem % 8) ++n;
263  for (unsigned j = 0; j < n; j++)
264  cout << " ";
265  }
266 
267  for (int j = n0; j >= n1; --j) {
268  const unsigned v = (* this)[j + os];
269 
270  if ((j % 8) == 7)
271  cout << "_";
272  if (v)
273  cout << "1";
274  else
275  cout << "0";
276  }
277  cout << endl;
278  }
279  }
280 
281  // else {
282  // cout << pre << "size=" << _size << ",0x";
283  // bool first = true;
284  // for (unsigned i = 0; i < _n; i++) {
285  // const unsigned j = _n - i - 1;
286  // if (((j % 4) == 3) && (! first))
287  // cout << "_";
288  // cout << hex << _state[j];
289  // first = false;
290  // }
291  // cout << dec << endl;
292 
293  // cout << pre << "size=" << _size << ",0x";
294  // bool first = true;
295  // for (unsigned i = 0; i < _n; i++) {
296  // const unsigned j = _n - i - 1;
297  // if (! first)
298  // cout << "_";
299  // cout << hex << _state[j];
300  // cout << "(";
301  // for (unsigned k = 0; k < 4; k++) {
302  // unsigned c = ((_state[j] >> (4 - k + 1) * 8) & 0xff);
303  // if (c < 0x10)
304  // cout << ".";
305  // cout << c;
306  // }
307  // cout << ")";
308  // first = false;
309  // }
310  // cout << dec << endl;
311  // }
312  }
unsigned _size
bit size.
Definition: State.h:136
TRGState(unsigned bitSize=0)
Default constructor.
Definition: State.cc:30
TRGState subset(unsigned i, unsigned n) const
returns subset from i with n bits.
Definition: State.cc:356
static std::string itostring(int i)
converts int to string. (Use boost::lexical_cast)
Definition: Utilities.cc:50

◆ dump() [9/9]

void dump ( const std::string &  message = "",
const std::string &  pre = "" 
) const

dumps contents.

"message" is to select information to dump. "pre" will be printed in head of each line.

Definition at line 87 of file Time.cc.

89  {
90  cout << pre << "time(clock):";
91 
92  if (_edge)
93  cout << " o ";
94  else
95  cout << " . ";
96 
97  cout << _time;
98  cout << " abs=" << _clock->absoluteTime(_time);
99  if (msg.find("name") != string::npos ||
100  msg.find("detail") != string::npos) {
101  cout << " (" << _name << ")";
102  }
103  cout << endl;
104  }
const TRGClock * _clock
Clock.
Definition: Time.h:117
int _time
Time in clock unit.
Definition: Time.h:111
std::string _name
Name.
Definition: Time.h:120
bool _edge
Edge type. true : rising, false : falling.
Definition: Time.h:114
double absoluteTime(int clockPosition) const
returns absolute time of clock position
Definition: Clock.cc:128

◆ edges()

vector< TRGCDCLink * > edges ( const std::vector< TRGCDCLink * > &  list)
static

returns links which are edges.

This function assumes that all TRGCDCLink's are in the same super layer.

Definition at line 527 of file Link.cc.

528  {
529  vector<TRGCDCLink*> a;
530 
531  unsigned n = list.size();
532  if (n < 2) return a;
533  else if (n == 2) return list;
534 
535  const TCCell* w = list[0]->cell();
536  unsigned nWires = w->layer().nCells();
537  unsigned center = w->localId();
538 
539  unsigned left = 0;
540  unsigned right = 0;
541  TRGCDCLink* leftL = list[0];
542  TRGCDCLink* rightL = list[0];
543  for (unsigned i = 1; i < n; i++) {
544  w = list[i]->cell();
545  unsigned id = w->localId();
546 
547  unsigned distance0, distance1;
548  if (id > center) {
549  distance0 = id - center;
550  distance1 = nWires - distance0;
551  } else {
552  distance1 = center - id;
553  distance0 = nWires - distance1;
554  }
555 
556  if (distance0 < distance1) {
557  if (distance0 > right) {
558  right = distance0;
559  rightL = list[i];
560  }
561  } else {
562  if (distance1 > left) {
563  left = distance1;
564  leftL = list[i];
565  }
566  }
567  }
568 
569  a.push_back(leftL);
570  a.push_back(rightL);
571  return a;
572  }
TRGCDCLink(TRGCDCTrack *track=0, const TRGCDCCellHit *hit=0, const HepGeom::Point3D< double > &position=Point3D())
Constructor.
Definition: Link.cc:44

◆ findTSHit()

vector< TRGSignalVector * > findTSHit ( TRGSignalVector eachInput,
int  tsid 
)

Use LUT for find TSHit.

output for EvtTime & Low pT tracker module

output for Tracker & N.N

Definition at line 199 of file TrackSegmentFinder.cc.

200  {
201 
202  //variables for common
203  const string na = "TSCandidate" + TRGUtilities::itostring(
204  tsid) + " in " + name();
205  TCSegment* tsi = _tsSL[tsid];
206  vector <TRGSignalVector*> result;
207 
208  //variables for EvtTime & Low pT
209  vector<bool> fTimeVect;
210  // int tmpFTime = 0 ;
211 
212  //variables for Tracker & N.N
213  vector <bool> tmpOutBool;
214 
215  TRGSignalVector* resultT = new TRGSignalVector(na, eachInput->clock(), 22);
216  TRGSignalVector* resultE = new TRGSignalVector(na, eachInput->clock(), 10);
217  TRGSignalVector* Hitmap = new TRGSignalVector(na + "HitMap",
218  eachInput->clock(), 0);
219  TRGSignalVector pTime(na + "PriorityTime", eachInput->clock(), 0);
220  TRGSignalVector fTime(na + "FastestTime", eachInput->clock(), 0);
221  for (unsigned i = 0; i < 12; i++) {
222  Hitmap->push_back((*eachInput)[i]);
223  (*Hitmap)[i].widen(16);
224  }
225  for (unsigned i = 0; i < 4; i++) {
226  pTime.push_back((*eachInput)[i + 12]);
227  fTime.push_back((*eachInput)[i + 16]);
228  }
229  for (unsigned i = 0; i < 5; i++) {
230  pTime.push_back((*eachInput)[i + 20]);
231  fTime.push_back((*eachInput)[i + 20]);
232  }
233 
234  vector <int> changeTime = Hitmap->stateChanges();
235 
236  int* LUTValue = new int[changeTime.size()];
237  if (changeTime.size()) {
238  int hitPosition = 0;
239  bool fTimeBool[10];
240  int tmpPTime = 0 ;
241  int tmpCTime = 0 ;
242  int tmpOutInt;
243  fTime.state(changeTime[0]).copy2bool(fTimeBool);
244  fTimeBool[9] = true;
245  fTimeVect.insert(fTimeVect.begin(), fTimeBool, fTimeBool + 10);
246  //tmpFTime = mkint(fTime.state(changeTime[0]));
247  bool eOUT = true;
248  for (unsigned i = 0; i < changeTime.size(); i++) {
249  LUTValue[i] = tsi->LUT()->getValue(mkint(Hitmap->state(changeTime[i])));
250 
252  if ((LUTValue[i]) && (eOUT)) {
253  resultE->set(fTimeVect, changeTime[i]);
254  eOUT = false;
255  }
256 
257  bool priority1rise = (*Hitmap)[6].riseEdge(changeTime[i]);
258  bool priority2rise = ((*Hitmap)[7].riseEdge(changeTime[i]) or
259  (*Hitmap)[8].riseEdge(changeTime[i]));
260 
262  //ready for output
263  if (priority1rise) {
264  hitPosition = 3;
265  tmpPTime = mkint(pTime.state(changeTime[i]));
266  tmpCTime = changeTime[i];
267  } else if (priority2rise) {
268  if (!hitPosition) {
269  tmpPTime = mkint(pTime.state(changeTime[i]));
270  tmpCTime = changeTime[i];
271  if ((*Hitmap)[0].state(changeTime[i])) hitPosition = 2;
272  else hitPosition = 1;
273  }
274  }
275 
276  // output selection
277  if ((hitPosition) && (LUTValue[i]) && ((changeTime[i] - tmpCTime) < 16)) {
278  tmpOutInt = tsid * pow(2, 13) + tmpPTime * pow(2, 4) + LUTValue[i] * pow(2,
279  2) + hitPosition;
280  tmpOutBool = mkbool(tmpOutInt, 22);
281  if (hitPosition == 3) {
282  if (priority1rise) resultT->set(tmpOutBool, changeTime[i]);
283  else {
284  if ((LUTValue[i] == 1) | (LUTValue[i] == 2)) {
285  if (!((LUTValue[i - 1] == 1) |
286  (LUTValue[i - 1] == 2)))
287  resultT->set(tmpOutBool, changeTime[i]);
288  } else {
289  if (!(LUTValue[i - 1])) resultT->set(tmpOutBool, changeTime[i]);
290  }
291  }
292  } else {
293  if (priority2rise) resultT->set(tmpOutBool, changeTime[i]);
294  else {
295  if ((LUTValue[i] == 1) | (LUTValue[i] == 2)) {
296  if (!((LUTValue[i - 1] == 1) |
297  (LUTValue[i - 1] == 2)))
298  resultT->set(tmpOutBool, changeTime[i]);
299  } else {
300  if (!(LUTValue[i])) resultT->set(tmpOutBool, changeTime[i]);
301  }
302  }
303  }
304  }
305 
306  }
307 
308  }
309  result.push_back(resultT);
310  result.push_back(resultE);
311 
312  // cppcheck-suppress uninitdata
313  delete[] LUTValue;
314  delete Hitmap;
315 
316  return result;
317  }
std::vector< TCSegment * > _tsSL
list of TSF
double mkint(TRGState)
tranformatoin into integer
vector< bool > mkbool(int, int)
tranformatoin into bool

◆ getEventTime()

int getEventTime ( void  ) const

returns bad hits(finding invalid hits).

returns event time

Definition at line 2743 of file TRGCDC.cc.

◆ getTRGCDC()

TRGCDC * getTRGCDC ( void  )
static

returns TRGCDC object.

TRGCDC should be created with specific configuration before calling this function.

Definition at line 192 of file TRGCDC.cc.

◆ getTRGGDL()

TRGGDL * getTRGGDL ( void  )
static

returns TRGGDL object.

TRGGDL should be created with specific configuration before calling this function.

Definition at line 103 of file TRGGDL.cc.

104  {
105  if (! _gdl)
106  cout << "TRGGDL::getTRGGDL !!! TRGGDL is not created yet" << endl;
107  return _gdl;
108  }
static TRGGDL * _gdl
GDL singleton.
Definition: TRGGDL.h:209

◆ getTRGGRL()

TRGGRL * getTRGGRL ( void  )
static

returns TRGGRL object.

TRGGRL should be created with specific configuration before calling this function.

Definition at line 73 of file TRGGRL.cc.

74  {
75  if (! _grl)
76  B2WARNING("TRGGRL::getTRGGRL !!! TRGGRL is not created yet");
77  return _grl;
78  }
static TRGGRL * _grl
GRL singleton.
Definition: TRGGRL.h:141

◆ hits()

vector< const TCWHit * > hits ( void  ) const

returns a list of TRGCDCWireHit.

'update()' must be called before calling this function.

Definition at line 1705 of file TRGCDC.cc.

◆ hitsMC()

vector< const TCWHitMC * > hitsMC ( void  ) const

returns a list of TRGCDCWireHitMC.

'updateMC()' must be called before calling this function.

Definition at line 1751 of file TRGCDC.cc.

◆ implementation() [1/2]

int implementation ( const boardType type,
std::ofstream &  outfile 
)
static

make a VHDL component file.

Non-zero value will be returned if errors occured.

Definition at line 65 of file FrontEnd.cc.

◆ implementation() [2/2]

int implementation ( const unitType type,
std::ofstream &  outfile 
)
static

make a VHDL component file.

Non-zero value will be returned if errors occured.

Definition at line 66 of file Merger.cc.

68  {
69 
70  // string cname = "UNKNOWN";
71  // if (_type == innerType)
72  outfile << "-- inner type" << endl;
73  string cname = "TRGCDCMergerInner";
74  // }
75  // else {
76  // outfile << "-- outer type" << endl;
77  // cname = "TRGCDCMergerOuter";
78  // }
79 
80  outfile << "--" << endl;
81  outfile << endl;
82  outfile << " component " << cname << endl;
83  // int err = implementationPort(type, outfile);
84  outfile << " end component;" << endl;
85 
86  outfile << "--------------------------------------------------------------"
87  << endl;
88 
89  outfile << "entity " << cname << "is" << endl;
90  int err = implementationPort(type, outfile);
91  outfile << "end " << cname << ";" << endl;
92  outfile << endl;
93  outfile << "architecture Behavioral of " << cname << " is" << endl;
94  outfile << " -- local" << endl;
95  outfile << endl;
96  outfile << "begin" << endl;
97  outfile << "end Behavioral;" << endl;
98 
99  return err;
100  }
static int implementationPort(const unitType &type, std::ofstream &)
writes a port map.
Definition: Merger.cc:104
unitType type(void) const
return type.
Definition: Merger.cc:59

◆ inOut()

vector< TRGCDCLink * > inOut ( const std::vector< TRGCDCLink * > &  list)
static

returns links which are in the inner most and outer most layer.

This function assumes that all TRGCDCLink's are in the same super layer.

Definition at line 621 of file Link.cc.

◆ makeTrack()

TCTrack * makeTrack ( const unsigned  serialID,
const unsigned  pm 
) const
private

Make a track from serial ID in Hough plane.

(no fit, segment hit attached)

Definition at line 1110 of file HoughFinder.cc.

◆ matchUnit()

void matchUnit ( TRGCDCJSignal first,
TRGCDCJSignal second 
) const

Utilities.

Matches unit by shifting bits.

Definition at line 1260 of file JSignal.cc.

◆ nActiveCellsInPattern()

unsigned nActiveCellsInPattern ( unsigned  layerId) const
inlinevirtual

of active cells in the pattern.

Definition at line 111 of file HoughPlaneMulti.h.

112  {
113 // return _layers[id]->nActiveCellsInPattern();
114  return 999;
115  }

◆ name() [1/3]

std::string name ( void  ) const
inline

Operators.

returns name.

Definition at line 205 of file JLUT.h.

206  {
207  return m_name;
208  }
std::string m_name
Name.
Definition: JLUT.h:134

◆ name() [2/3]

string name ( void  ) const

simulates track segment decisions.

returns name.

Definition at line 92 of file TRGCDC.cc.

◆ name() [3/3]

string name ( void  ) const

matching function

returns name.

Definition at line 37 of file TRGGRL.cc.

◆ nLocalLayers()

unsigned nLocalLayers ( unsigned  superLayerId) const
inline

returns # of wire layers in a super layer.

0 will be returned if 'superLayerId' is invalid.

Definition at line 819 of file TRGCDC.h.

◆ nMissingAxialSuperLayers()

unsigned nMissingAxialSuperLayers ( const std::vector< TRGCDCLink * > &  links)
static

returns # of missing axial super layers.

Stereo super layers are not taken into accout.

Definition at line 699 of file Link.cc.

◆ operator+() [1/3]

TRGCDCLpav Belle2::operator+ ( const TRGCDCLpav la1,
const TRGCDCLpav la2 
)
  • operator

Definition at line 676 of file Lpav.cc.

679  {
680 #else
681  {
682  TRGCDCLpav la;
683 #endif
684  la.m_wsum = la1.m_wsum + la2.m_wsum;
685  la.m_xsum = la1.m_xsum + la2.m_xsum;
686  la.m_ysum = la1.m_ysum + la2.m_ysum;
687  la.m_xxsum = la1.m_xxsum + la2.m_xxsum;
688  la.m_yysum = la1.m_yysum + la2.m_yysum;
689  la.m_xysum = la1.m_xysum + la2.m_xysum;
690  la.m_xrrsum = la1.m_xrrsum + la2.m_xrrsum;
691  la.m_yrrsum = la1.m_yrrsum + la2.m_yrrsum;
692  la.m_rrrrsum = la1.m_rrrrsum + la2.m_rrrrsum;
693  la.m_nc = la1.m_nc + la2.m_nc;
694  return la;
695  }

◆ operator+() [2/3]

TRGPoint2D operator+ ( const TRGPoint2D a) const
inline
  • operator

Definition at line 158 of file Point2D.h.

159  {
160  return TRGPoint2D(_p[0] + a.x(), _p[1] + a.y());
161  }
double _p[2]
vector
Definition: Point2D.h:81
TRGPoint2D()
Constructor.
Definition: Point2D.cc:17

◆ operator+() [3/3]

TRGCDCJSignal const operator+ ( TRGCDCJSignal const &  rhs) const

Arithmetic add operator.

Arithmetic operator.

Definition at line 310 of file JSignal.cc.

◆ operator-() [1/2]

TRGPoint2D operator- ( ) const
inline
  • operator

Definition at line 172 of file Point2D.h.

◆ operator-() [2/2]

TRGPoint2D operator- ( const TRGPoint2D a) const
inline
  • operator

Definition at line 165 of file Point2D.h.

◆ operator=()

TRGCDCLpav & operator= ( const TRGCDCLpav lp)
inline

assignment operator(s)

inline function definitions

Definition at line 189 of file Lpav.h.

190  {
192  m_wsum = lp.m_wsum;
193  m_xsum = lp.m_xsum;
194  m_ysum = lp.m_ysum;
195  m_xxsum = lp.m_xxsum;
196  m_yysum = lp.m_yysum;
197  m_xysum = lp.m_xysum;
198  m_xrrsum = lp.m_xrrsum;
199  m_yrrsum = lp.m_yrrsum;
200  m_rrrrsum = lp.m_rrrrsum;
201 
202  m_wsum_temp = lp. m_wsum_temp;
203  m_xav = lp.m_xav;
204  m_yav = lp.m_yav;
205  m_xyavp = lp.m_xyavp;
206 
207  m_rscale = lp. m_rscale;
208  m_xxavp = lp.m_xxavp;
209  m_yyavp = lp.m_yyavp;
210  m_xrravp = lp.m_xrravp;
211  m_yrravp = lp.m_yrravp;
212  m_rrrravp = lp.m_rrrravp;
213  m_sinrot = lp.m_sinrot;
214  m_cosrot = lp.m_cosrot;
215 
216  m_nc = lp. m_nc;
217  m_chisq = lp.m_chisq;
218  return *this;
219  }
double m_xsum
data members
Definition: Lpav.h:137
double m_xyavp
data members
Definition: Lpav.h:160
double m_xav
data members
Definition: Lpav.h:156
double m_rrrravp
data members
Definition: Lpav.h:173
double m_xrravp
data members
Definition: Lpav.h:169
double m_rrrrsum
data members
Definition: Lpav.h:151
double m_chisq
data members
Definition: Lpav.h:182
double m_wsum
data members
Definition: Lpav.h:135
double m_sinrot
data members
Definition: Lpav.h:175
double m_cosrot
data members
Definition: Lpav.h:177
double m_nc
data members
Definition: Lpav.h:180
double m_xxsum
data members
Definition: Lpav.h:141
double m_ysum
data members
Definition: Lpav.h:139
double m_xrrsum
data members
Definition: Lpav.h:147
double m_yav
data members
Definition: Lpav.h:158
double m_rscale
data members
Definition: Lpav.h:163
double m_yysum
data members
Definition: Lpav.h:143
double m_yrravp
data members
Definition: Lpav.h:171
double m_xxavp
data members
Definition: Lpav.h:165
double m_xysum
data members
Definition: Lpav.h:145
double m_wsum_temp
data members
Definition: Lpav.h:154
double m_yrrsum
data members
Definition: Lpav.h:149
double m_yyavp
data members
Definition: Lpav.h:167
TRGCDCLpar & operator=(const TRGCDCLpar &)
assignment operator(s)
Definition: Lpar.h:211

◆ relation()

const TRGCDCRelation relation ( void  ) const

returns MC information.

False will be returned if no MC info. available.

Definition at line 142 of file TrackBase.cc.

143  {
144 
145  TRGDebug::enterStage("MCInfo");
146 
147  map<unsigned, unsigned> relations;
148  for (unsigned i = 0; i < _tsAll.size(); i++) {
149 
150  const TCCell& cell = * _tsAll[i]->cell();
151  const TCCHit& hit = * cell.hit();
152  const unsigned iMCParticle = hit.iMCParticle();
153 
154  map<unsigned, unsigned>::iterator it = relations.find(iMCParticle);
155  if (it != relations.end())
156  ++it->second;
157  else
158  relations[iMCParticle] = 1;
159 
160  if (TRGDebug::level()) {
161  cout << TRGDebug::tab() << cell.name() << ",MCParticle="
162  << iMCParticle << endl;
163  }
164  }
165 
166  if (TRGDebug::level()) {
167  map<unsigned, unsigned>::const_iterator it = relations.begin();
168  while (it != relations.end()) {
169  cout << TRGDebug::tab()
170  << it->first << ","
171  << it->second << endl;
172  ++it;
173  }
174  }
175 
176  TRGDebug::leaveStage("MCInfo");
177 
178  return TCRelation(* this, relations);
179  }
std::vector< TRGCDCLink * > _tsAll
Links for all super layers.
Definition: TrackBase.h:160
static std::string tab(void)
returns tab spaces.
Definition: Debug.cc:47
static void enterStage(const std::string &stageName)
Declare that you enter new stage.
Definition: Debug.cc:24
static int level(void)
returns the debug level.
Definition: Debug.cc:67
static void leaveStage(const std::string &stageName)
Declare that you leave a stage.
Definition: Debug.cc:34

◆ saveVhdlAndCoe()

void saveVhdlAndCoe ( )

Functions for saving.

Save VHDL and code files.

Definition at line 912 of file Fitter3D.cc.

913  {
914  // Print Vhdl
915  if (m_commonData->getPrintedToFile() == 0) {
916  if (m_commonData->getPrintVhdl() == 0) {
917  m_commonData->setVhdlOutputFile("Fitter3D.vhd");
919  } else {
925  // Print LUTs.
926  for (map<string, TRGCDCJLUT*>::iterator it = m_mLutStorage.begin(); it != m_mLutStorage.end(); ++it) {
927  //it->second->makeCOE("./VHDL/LutData/"+it->first+".coe");
928  it->second->makeCOE(it->first + ".coe");
929  }
930  }
931  }
932  }
std::map< std::string, TRGCDCJLUT * > m_mLutStorage
Map to hold JLuts.
Definition: Fitter3D.h:142
TRGCDCJSignalData * m_commonData
For VHDL code.
Definition: Fitter3D.h:144
void printToFile()
Utilities Function to print VHDL code.
Definition: JSignalData.cc:106
bool getPrintVhdl() const
Gets the status of m_printVhdl.
Definition: JSignalData.cc:75
bool getPrintedToFile() const
Gets the status of m_printedToFile.
Definition: JSignalData.cc:80
void entryVhdlCode()
Function to print entry VHDL code.
Definition: JSignalData.cc:195
void signalsVhdlCode()
Function to print definition of signal VHDL code.
Definition: JSignalData.cc:178
void setVhdlOutputFile(const std::string &)
Sets the filename for VHDL output.
Definition: JSignalData.cc:45
void buffersVhdlCode()
Function to print buffer VHDL code.
Definition: JSignalData.cc:150
void setPrintVhdl(bool)
Sets if to print VHDL output.
Definition: JSignalData.cc:50

◆ segmentHits() [1/2]

std::vector< const TRGCDCSegmentHit * > segmentHits ( unsigned  a) const
inline

returns a list of TRGCDCSegmentHit in a super layer N.

'simulate()' must be called before calling this function

Definition at line 1005 of file TRGCDC.h.

◆ segmentHits() [2/2]

std::vector< const TRGCDCSegmentHit * > segmentHits ( void  ) const
inline

returns a list of TRGCDCSegmentHit.

'simulate()' must be called before calling this function

Definition at line 996 of file TRGCDC.h.

◆ segmentLayer()

const TRGCDCLayer * segmentLayer ( unsigned  id) const
inline

returns a pointer to a track segment layer.

0 will be returned if 'id' is invalid.

Definition at line 1061 of file TRGCDC.h.

◆ simulateOuter()

vector< TRGSignalVector * > simulateOuter ( TRGSignalVector in,
unsigned  id 
)

Simulate TSF response for the inner.

output for EvtTime & Low pT tracker module

output for Tracker & N.N

Definition at line 1048 of file TrackSegmentFinder.cc.

◆ simulateTSF()

vector< TRGSignalVector * > simulateTSF ( TRGSignalVector in,
unsigned  id 
)

Simulate TSF response (unified version, 2016/07/12)

output for EvtTime & Low pT tracker module

output for Tracker & N.N

Definition at line 2587 of file TrackSegmentFinder.cc.

◆ simulateTSFOld()

vector< TRGSignalVector * > simulateTSFOld ( TRGSignalVector in,
unsigned  id 
)

Simulate TSF response (unified version)

output for EvtTime & Low pT tracker module

output for Tracker & N.N

Definition at line 2421 of file TrackSegmentFinder.cc.

◆ stereoHits()

vector< const TCWHit * > stereoHits ( void  ) const

returns a list of stereo hits.

'update()' must be called before calling this function.

Definition at line 1692 of file TRGCDC.cc.

◆ stereoSegmentHits()

std::vector< const TRGCDCSegmentHit * > stereoSegmentHits ( unsigned  a) const
inline

returns a list of TRGCDCSegmentHit in a stereo super layer N.

'simulate()' must be called before calling this function

Definition at line 1023 of file TRGCDC.h.

◆ storeSimulationResults()

void storeSimulationResults ( std::string  collection2Dfinder,
std::string  collection2Dfitter,
std::string  collection3Dfitter 
)
private

Save results of fast simulation to data store (segment hits & tracks).

Parameters
collection2Dfindername of the StoreArray for the 2D finder tracks
collection2Dfittername of the StoreArray for the 2D fitter tracks
collection3Dfittername of the StoreArray for the 3D fitter tracks

Definition at line 2248 of file TRGCDC.cc.

◆ sub()

void sub ( double  x,
double  y,
double  w = 1,
double  a = 0,
double  b = 0 
)
private

private member functions

private member function sub

Definition at line 641 of file Lpav.cc.

◆ superLayer()

const std::vector< TRGCDCLayer * > * superLayer ( unsigned  id) const
inline

returns a pointer to a super-layer.

0 will be returned if 'id' is invalid.

Definition at line 835 of file TRGCDC.h.

◆ systemClock()

const TRGClock & systemClock ( void  ) const
inline

calculates corrected drift time.

correctionFlag(bit 0:tof, 1:T0 offset, 2:propagation delay, 3:tan(lambda) correction) returns the system clock.

Definition at line 961 of file TRGCDC.h.

◆ TRGGRLMatch()

TRGGRLMatch ( TRGCDCTrack track,
TRGECLCluster cluster,
int  flag 
)

public member functions of TRGGRLMatch class Private variables can be called by the corresponding get function

Constructor

Definition at line 25 of file TRGGRLMatch.cc.

26  : _track(track),
27  _cluster(cluster),
28  _match3D(flag)
29  {
30  calculate();
31  }
int _match3D
flag tells 3D information is valid or not
Definition: TRGGRLMatch.h:99
TRGECLCluster * _cluster
a pointer to the TRGECLCluster of the matching candidate
Definition: TRGGRLMatch.h:96
TRGCDCTrack * _track
a pointer to the TRGCDCTrack of the matching candidate
Definition: TRGGRLMatch.h:87
void calculate(void)
a function to execute calculation of matching
Definition: TRGGRLMatch.cc:38

◆ TRGSignal()

TRGSignal ( const TRGClock c,
double  t0,
double  t1 
)

Constructor with clock and timing(t0 leading, t1 trailing).

t0 and t1 are in absolute time.

Definition at line 66 of file Signal.cc.

◆ TRGSignalVector()

TRGSignalVector ( const std::string &  name,
const TRGClock c,
unsigned  size = 0 
)

Default constructor.

Constructor with name.

Definition at line 29 of file SignalVector.cc.

◆ TRGTime() [1/2]

TRGTime ( double  timing,
bool  edge,
const TRGClock clock,
const std::string &  name = "signal" 
)

Constructor with clock.

For rising edge, edge must be true. Given timing is syncronized to clock.

Definition at line 30 of file Time.cc.

◆ TRGTime() [2/2]

TRGTime ( int  clockPosition,
bool  edge,
const TRGClock clock,
const std::string &  name = "signal" 
)

Constructor with clock.

For rising edge, edge must be true. Given timing is syncronized to clock.

Definition at line 41 of file Time.cc.

◆ vote() [1/2]

void vote ( float  rx,
float  ry,
unsigned  layerId,
int  weight = 1 
)
inline

Voting.

Voting.

Definition at line 187 of file HoughPlaneMulti2.h.

191  {
192  _usage[layerId] = true;
193  _layers[layerId]->vote(rx, ry, weight);
194  }
TRGCDCHoughPlaneBoolean * _layers[N_LAYERS]
Hough plane for each layer.
bool _usage[N_LAYERS]
Used or not.
void vote(float rx, float ry, int weight=1) override
Votes.

◆ vote() [2/2]

void vote ( unsigned  layerId,
unsigned  localId,
int  weight = 1 
)
inline

Voting.

Voting.

Definition at line 205 of file HoughPlaneMulti2.h.

◆ width()

unsigned width ( const std::vector< TRGCDCLink * > &  list)
static

returns width(wire cell unit) of given std::vector<TRGCDCLink *>.

This function assumes that all TRGCDCLink's are in the same super layer.

Definition at line 483 of file Link.cc.

◆ wire() [1/3]

const TCWire * wire ( float  r,
float  phi 
) const

returns a pointer to a wire.

returns a pointer to a wire.

Definition at line 915 of file TRGCDC.cc.

◆ wire() [2/3]

const TCWire * wire ( unsigned  layerId,
int  localId 
) const

returns a pointer to a wire.

'localId' can be negative. 0 will be returned if 'layerId' is invalid.

Definition at line 900 of file TRGCDC.cc.

◆ wire() [3/3]

const TCWire * wire ( unsigned  wireId) const

returns a pointer to a wire.

0 will be returned if 'wireId' is invalid.

Definition at line 892 of file TRGCDC.cc.

Variable Documentation

◆ _gdl

TRGGDL * _gdl = 0
staticprivate

GDL singleton.

do the final trigger decision

Definition at line 209 of file TRGGDL.h.

◆ _undefined

TRGCDCTrackMC * _undefined = new TRGCDCTrackMC()
static

returns a pointer to gen_hepevt.

Dummy particle.

Definition at line 88 of file TrackMC.h.

◆ TRGCDCUndefinedLayer

const TRGCDCLayer* TRGCDCUndefinedLayer
Initial value:
= new TRGCDCLayer(9999,
9999,
9999,
9999,
9999,
0,
0,
9999,
9999,
0,
0)

TRGCDCUndefinedLayer declaration.

Definition at line 29 of file Layer.cc.