Belle II Software development
tracking

Modules

 tracking data objects
 
 tracking modules
 

Namespaces

namespace  Belle2::CDC
 
namespace  Belle2::TestHelpers
 Some utilities to help with writing unit tests.
 
namespace  Belle2::AnalyzingAlgorithmHelper
 INFO This file contains all the algorithms retrieving infos from Clusters.
 
namespace  Belle2::SecMapHelper
 namespace for SectorMapHelper-related stuff
 
namespace  Belle2::DNN
 namespace for DirectedNodeNetwork-related stuff
 

Classes

class  CDCCKFState
 Define states for CKF algorithm, which can be seed track or CDC wire hit. More...
 
class  ArcLengthBasedCDCfromEclPathPairFilter
 For the two paths with the same number of hits prefers one with shortest arcLength ("densest path") More...
 
class  ArcLengthBasedCDCPathPairFilter
 For the two paths with the same number of hits prefers one with shortest arcLength ("densest path") More...
 
class  CDCPathPairFilterFactory
 Factory that can create appropriate cluster filters from associated names. More...
 
class  Chi2BasedCDCPathPairFilter
 Prefers path with smallest sum dist^2 / length of path. More...
 
class  DistanceBasedCDCPathPairFilter
 For the two paths with the same number of hits prefers one with smallest sum dist^2. More...
 
class  DuplicateCDCPathPairFilter
 Simple filter to distinguish between photon conversion and Bremsstrahlung. More...
 
class  HitDistanceBasedCDCPathPairFilter
 Prefers path with smallest sum dist^2 / length of path. More...
 
class  MCTruthCDCPathPairFilter
 For the two paths select the one with the most of MC matched hits. More...
 
class  CDCfromEclPathTruthVarNames
 Vehicle class to transport the variable names. More...
 
class  CDCfromEclPathTruthVarSet
 Var set to store basic quantities related to CDC CKF (using truth information) More...
 
class  CDCPathBasicVarNames
 Vehicle class to transport the variable names. More...
 
class  CDCPathBasicVarSet
 Var set to store basic quantities related to CDC CKF. More...
 
class  CDCPathFilterFactory
 Factory that can create appropriate cluster filters from associated names. More...
 
class  CDCPathTruthVarNames
 Vehicle class to transport the variable names. More...
 
class  CDCPathTruthVarSet
 Var set to store basic quantities related to CDC CKF (using truth information) More...
 
class  SeedChargeCDCPathFilter
 Check if charge of fitted path corresponds to charge of seed. More...
 
class  SizeCDCPathFilter
 Return the size of the path. More...
 
class  CDCfromEclStateTruthVarNames
 Vehicle class to transport the variable names. More...
 
class  CDCfromEclStateTruthVarSet
 Var set to store basic quantities related to CDC CKF (using truth information) More...
 
class  CDCStateBasicVarNames
 Vehicle class to transport the variable names. More...
 
class  CDCStateBasicVarSet
 Var set to store basic quantities related to CDC CKF. More...
 
class  CDCStateFilterFactory
 Factory that can create appropriate cluster filters from associated names. More...
 
class  CDCStateTruthVarNames
 Vehicle class to transport the variable names. More...
 
class  CDCStateTruthVarSet
 Var set to store basic quantities related to CDC CKF (using truth information) More...
 
class  DistanceCDCStateFilter
 Give a weight based on the distance from the hit to the path. More...
 
class  ExtrapolateAndUpdateCDCStateFilter
 An extrapolateAndUpdate filter for all CDC states. More...
 
class  MCTruthCDCStateFilter
 Give a weight based on the mc truth information (1 or NAN) More...
 
class  MCTruthEclSeedFilter
 Give a weight based on the mc truth information (1 or NAN) More...
 
class  RoughCDCfromEclStateFilter
 A very rough filter for all CDC states. More...
 
class  RoughCDCStateFilter
 A very rough filter for all CDC states. More...
 
class  CDCCKFDuplicateRemover
 Remove duplicate paths created from ECLShowers These typically come from the seeding with two charge assumptions and Bremsstrahlung. More...
 
class  CDCCKFEclSeedCreator
 Findlet for. More...
 
class  CDCCKFPathMerger
 Merge similar paths. More...
 
class  CDCCKFPathSelector
 Select the m_maximalCandidatesInFlight paths for further processing. More...
 
class  CDCCKFResultFinalizer
 Findlet to finalize CKF Paths in terms of final result. More...
 
class  CDCCKFResultStorer
 Store resulting tracks and relations on the dataStore. More...
 
class  CDCCKFSeedCreator
 Create a CKF seed based on RecoTrack (presumably from VXDTF2) More...
 
class  CDCCKFStateCreator
 Create CKF states, based on the current path. Perform some basic selection at this stage (based on phi, max. jump of layers) More...
 
class  CDCCKFStateFilter
 A stack of pre-, helix-extrapolation- , Kalman-extrapolation- and Kalman-update-filters. More...
 
class  CKFToCDCFindlet
 Main findlet of the ToCDCCKF module. More...
 
class  CKFToCDCFromEclFindlet
 Main findlet of the ToCDCCKF module. More...
 
class  StackTreeSearcher
 CKF tree searcher which traces several best paths. More...
 
class  CKFResult< ASeed, AHit >
 Object for temporary storage of a CKF tree search result. More...
 
class  CKFState< ASeed, AHit >
 State object to store one step in the CKF algorithm together with its parent (the state before), the hit (e.g. More...
 
class  AdvanceFilter< AState, AnAdvancer >
 Filter which can be used on a pair of path (vector of states) and states, which will call the extrapolate function of the given advancer class, to extrapolate the last path state to the plane of the new state and store the mSoP in the new state. More...
 
class  KalmanFilter< AState, AKalmanStepper >
 Filter which can be used on a pair of path (vector of states) and states, which will call the kalmanStep function of the given stepper class, to update the mSoP of the new state with a klaman update. More...
 
class  NonIPCrossingStateFilter< AllStateFilter >
 Reusable filter for checking the direction of a new state if it is in the correct orientation (forwards or backwards) by their arc length. More...
 
class  CKFRelationCreator< AState, ASeedRelationFilter, AHitRelationFilter >
 Findlet for applying filters for creating hit-hit and hit-seed relations. More...
 
class  LayerToggledApplier< AState, AFindlet >
 A special findlet, which is chooseable based on a given findlet for layers higher than N, N and for the rest. More...
 
class  LimitedOnStateApplier< AState, AFilter >
 Specialisation of the OnStateApplier, which (a) uses a filter for the () operator, which is configurable (b) does only allow for the best N candidates in the child states. More...
 
class  OnStateApplier< AState >
 Helper findlet which applies its () operator to all pairs of path and state with all states in the given child state list. More...
 
class  OverlapResolver< AFilter >
 Simple findlet for searching the best candidate for a given seed applying the given filter. More...
 
class  ResultStorer< AResult >
 This findlet does also handle the storing of the results. More...
 
class  SpacePointTagger< AResult, ACluster >
 Findlet for tagging all space points in the results vector as used. More...
 
class  StateCreator< AnObject, AState >
 Create new states and add them to a vector from a given object vector. More...
 
class  StateCreatorWithReversal< AState >
 An adaption of the normal state creator introducing another parameter to reverse the seed. More...
 
class  StateRejecter< AState, AFilter >
 Reject some (or all) states from a given list of child states using 5 filters. More...
 
class  TrackFitterAndDeleter
 Findlet to fit tracks and remove all non fitted ones. More...
 
class  TrackLoader
 Findlet for loading the seeds from the data store. More...
 
class  TreeSearcher< AState, AStateRejecter, AResult >
 Findlet for constructing result paths out of a list of states, which are connected with weighted relations. More...
 
class  Advancer
 Helper findlet for performing an extrapolation of a mSoP of one plane to another plane using the representation stored in the mSoP. More...
 
struct  SeedGetter
 Helper Functor to get the Seed of a given result. More...
 
struct  NumberOfHitsGetter
 Helper Functor to get the Number of hits of a given result. More...
 
struct  GetArcLength
 Helper Functor to get the arc length of a given result. More...
 
class  KalmanStepper< Dimension >
 Class to bundle all algorithms needed for the kalman update procedure. More...
 
class  CKFToPXDResult
 Specialized CKF Result for extrapolating into the PXD. More...
 
class  CKFToPXDState
 Specialized CKF State for extrapolating into the PXD. More...
 
class  AngularDistancePXDPairFilter
 Base filter for CKF PXD states. More...
 
class  CylinderDistancePXDPairFilter
 Base filter for CKF PXD states. More...
 
class  InterceptDistancePXDPairFilter
 Base filter for CKF PXD states. More...
 
class  LayerPXDRelationFilter< AFilter, APrefilter >
 Base filter for CKF PXD states. More...
 
class  LoosePXDPairFilter
 Base filter for CKF PXD states. More...
 
class  PXDPairFilterFactory
 Factory that can create appropriate cluster filters from associated names. More...
 
class  SensorPXDPairFilter
 Base filter for CKF PXD states. More...
 
class  PXDResultFilterFactory
 Factory that can create appropriate cluster filters from associated names. More...
 
class  PXDResultTruthVarNames
 Vehicle class to transport the variable names. More...
 
class  PXDResultTruthVarSet
 Var set used in the CKF for calculating the probability of a correct result, which knows the truth information if two tracks belong together or not. More...
 
class  PXDResultVarNames
 Vehicle class to transport the variable names. More...
 
class  PXDResultVarSet
 Var set used in the VXD-CDC-Merger for calculating the probability of a VXD-CDC-track match, which knows the truth information if two tracks belong together or not. More...
 
class  SizePXDResultFilter
 Base filter for CKF PXD results (on overlap check) More...
 
class  AllPXDStateFilter
 A very simple filter for all space points. More...
 
class  PXDStateBasicVarNames
 Vehicle class to transport the variable names. More...
 
class  PXDStateBasicVarSet
 Var set used in the VXD-CDC-Merger for calculating the probability of a VXD-CDC-track match. More...
 
class  PXDStateFilterFactory
 Factory that can create appropriate cluster filters from associated names. More...
 
class  PXDStateTruthVarNames
 Vehicle class to transport the variable names. More...
 
class  PXDStateTruthVarSet
 Var set used in the VXD-CDC-Merger for calculating the probability of a VXD-CDC-track match, which knows the truth information if two tracks belong together or not. More...
 
class  SimplePXDStateFilter
 A very simple filter for all space points. More...
 
class  CKFToPXDFindlet
 Combinatorial Kalman Filter to extrapolate CDC Reco Tracks into the VXD (PXD) and collect space points. More...
 
class  PXDKalmanStepper
 Kalman stepper implementation for the PXD CKF. More...
 
class  MCUtil
 Class bundling all helper functions for the MC information used in the PXD CKF. More...
 
class  CKFToSVDResult
 Specialized CKF Result for extrapolating into the SVD. More...
 
class  CKFToSVDState
 Specialized CKF State for extrapolating into the SVD. More...
 
class  DistanceSVDPairFilter
 Base filter for CKF SVD states. More...
 
class  LayerSVDRelationFilter< AFilter, APrefilter >
 Base filter for CKF SVD states. More...
 
class  LooseSVDPairFilter
 Base filter for CKF SVD states. More...
 
class  SectorMapBasedSVDPairFilter
 Filter for relations between CKF SVD states based on SectorMaps. More...
 
class  SensorSVDPairFilter
 Base filter for CKF SVD states. More...
 
class  SVDPairFilterFactory
 Factory that can create appropriate cluster filters from associated names. More...
 
class  RelationSVDResultVarNames
 Vehicle class to transport the variable names. More...
 
class  RelationSVDResultVarSet
 Var set used in the VXD-CDC-Merger for calculating the probability of a VXD-CDC-track match, which knows the truth information if two tracks belong together or not. More...
 
class  SizeSVDResultFilter
 Base filter for CKF SVD results (on overlap check) More...
 
class  SVDResultFilterFactory
 Factory that can create appropriate cluster filters from associated names. More...
 
class  SVDResultTruthVarNames
 Vehicle class to transport the variable names. More...
 
class  SVDResultTruthVarSet
 Var set used in the CKF for calculating the probability of a correct result, which knows the truth information if two tracks belong together or not. More...
 
class  SVDResultVarNames
 Vehicle class to transport the variable names. More...
 
class  SVDResultVarSet
 Var set used in the VXD-CDC-Merger for calculating the probability of a VXD-CDC-track match, which knows the truth information if two tracks belong together or not. More...
 
class  WeightSVDResultFilter
 Base filter for CKF SVD results (on overlap check) More...
 
class  AllSVDStateFilter
 A very simple filter for all space points. More...
 
class  ResidualSVDStateFilter
 A very simple filter for all space points. More...
 
class  SimpleSVDStateFilter
 A very simple filter for all space points. More...
 
class  SVDStateBasicVarNames
 Vehicle class to transport the variable names. More...
 
class  SVDStateBasicVarSet
 Var set used in the VXD-CDC-Merger for calculating the probability of a VXD-CDC-track match. More...
 
class  SVDStateFilterFactory
 Factory that can create appropriate cluster filters from associated names. More...
 
class  SVDStateTruthVarNames
 Vehicle class to transport the variable names. More...
 
class  SVDStateTruthVarSet
 Var set used in the VXD-CDC-Merger for calculating the probability of a VXD-CDC-track match, which knows the truth information if two tracks belong together or not. More...
 
class  SVDStateVarNames
 Vehicle class to transport the variable names. More...
 
class  SVDStateVarSet
 Var set used in the VXD-CDC-Merger for calculating the probability of a VXD-CDC-track match. More...
 
class  CKFToSVDFindlet
 Combinatorial Kalman Filter to extrapolate CDC Reco Tracks into the VXD (SVD) and collect space points. More...
 
class  CKFToSVDSeedFindlet
 Findlet for combining CDC tracks with SVD tracks. More...
 
class  RecoTrackRelator
 The results of the CKF ar in the form (seed -> vector of hits). More...
 
class  RelationApplier
 Relate the SVD and CDC tracks in the given relations also in the store array. More...
 
class  RelationFromSVDTracksCreator
 Simplified relation creator only creating relations between states of CDC Reco Track seeds and states with SpacePoints, that: (a) for the seed states: connect every seed with every lst hit of the SVD Reco Tracks (b) for the hit states: are in the same SVD Reco Track and follow each other directly. More...
 
class  SpacePointLoader
 Load the space points from the store array to the given vector. More...
 
class  SVDKalmanStepper
 Kalman stepper implementation for the SVD CKF. More...
 
struct  DATCONSVDClusterCandidate
 struct containing a cluster candidate for easier handling More...
 
class  DATCONSVDDigit
 The DATCONSVDDigit class. More...
 
class  DATCONFPGAFindlet
 Findlet for performing the DATCON ROI calculation close to the implementation on FPGA. More...
 
class  DATCONSVDClusterizer
 Findlet for clustering DATCONSVDDigits and creating SVDClusters that are used for tracking in DATCON. More...
 
class  DATCONSVDClusterLoaderAndPreparer
 Findlet for loading SVDClusters that were created by the DATCONSVDClusterizer findlet and prepare them for usage in the FastInterceptFinder2D by calculating the conformal transformed x,y coordinates and the creating pairs of coordinates for finding track candidates in r-phi and r-z. More...
 
class  FastInterceptFinder2DFPGA
 Findlet for finging intersections of sinosoidal curves in the 2D Hough space by iteratively calling fastInterceptFinder2d. More...
 
class  ROICalculator
 Findlet to calculate ROI on the PXD sensors based on input hits. More...
 
class  SVDShaperDigitConverter
 Findlet for converting SVDShaperDigits into DATCONSVDDigits. More...
 
class  ToPXDExtrapolator
 Findlet to extrapolate found tracks to the PXD sensors and calculate intercepts. More...
 
class  CKFParameters
 The payload containing all parameters for the PXD and SVD CKF. More...
 
class  CkfToPXDFiltersSetting
 The payload containing. More...
 
class  DAFparameters
 The payload containing the DAF parameters. More...
 
class  KinkFinderParameters
 The payload containing the parameters for the kinkFinder. More...
 
class  ROICalculationParameters
 The payload containing all PXD ROI parameters. More...
 
class  SVDEventT0Configuration
 This class store the configuration of the selections applied on the tracks used to compute the SVD EventT0. More...
 
class  TrackFitMomentumRange
 The payload containing the momentum threshold to disable the particle hypothesis in the track fit. More...
 
class  TrackFlippingCuts
 The payload containing the cuts for 2 mva based filters to decide whether a RecoTrack should be flipped or not. More...
 
class  TrackingMVAFilterParameters
 Class for the MVA filter payloads. More...
 
class  DQMEventProcessorBase
 The purpose of this class is to process one event() in DQMHistoModuleBase, which is a base for TrackDQMModule and AlignDQMModule. More...
 
class  DQMHistoModuleBase
 This class serves as a base for the TrackDQMModule and AlignDQMModule (and possibly other DQM histogram modules). More...
 
class  BaseEventTimeExtractor< AIOTypes >
 Class to extract the event t0. More...
 
class  BaseEventTimeExtractorModuleFindlet< AFindlet >
 Base class for most of the time extraction modules doing a track selection beforehand. More...
 
class  Chi2BasedEventTimeExtractor
 Event time extraction based on the principle of arXiv:0810.2241. More...
 
class  DriftLengthBasedEventTimeExtractor
 Event time extraction based on the principle of the CDC drift time calculation. More...
 
class  FullGridChi2TrackTimeExtractor
 Class to extract the event t0 using the chi-squared approach. More...
 
class  FullGridDriftLengthTrackTimeExtractor
 Class to extract the event t0 using the drift-length approach. More...
 
class  GridEventTimeExtractor< AFindlet >
 Generic findlet applying a certain time extractor multiple times. More...
 
class  HitBasedT0Extractor
 Findlet to extract the T0 time of an event only using CDC Hits. More...
 
class  IterativeChi2BasedEventTimeExtractor
 Class to iteratively extract the event t0 using the chi-squared approach. More...
 
class  IterativeDriftLengthBasedEventTimeExtractor
 Class to iteratively extract the event t0 using the drift-length approach. More...
 
class  IterativeEventTimeExtractor< AFindlet >
 Generic findlet applying a certain time extractor multiple times. More...
 
class  TrackSelector
 Select the tracks for the event time extraction. More...
 
class  TimeExtractionUtils
 Helper class to perform all kind of track extrapolations using the methods from arXiv:0810.2241. More...
 
class  KinkFitter
 KinkFitter class to create Kink mdst's objects from reconstructed tracks. More...
 
class  TrackMatchLookUp
 Class to provide convenient methods to look up matching information between pattern recognition and Monte Carlo tracks. More...
 
class  ROIDetPlane
 ROIDetPlane describes the plane containing a sensor. More...
 
class  ROIGeometry
 This class appends the VXDIntercept infos of a track to the list of intercepts. More...
 
class  ROIToUnitTranslator< aIntercept >
 Translator for ROI-geometry-information into a list of pixels or strips. More...
 
class  VXDInterceptor< aIntercept >
 This Class implements the interceptor of the SVD tracks on the PXD layers. More...
 
class  MCVXDPurityInfo
 The MC VXD Purity info container class. More...
 
class  SpacePoint
 SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters. More...
 
class  SpacePointTrackCand
 Storage for (VXD) SpacePoint-based track candidates. More...
 
class  MapHelperFunctionsTest
 function object that implements cosecans(x) == 1/cos(x) by tan(x) / sin(x). More...
 
class  SpacePointTest
 Set up a few arrays and objects in the datastore. More...
 
class  SpacePointTrackCandTest
 Test class for the SpacePointTrackCand class. More...
 
class  RecoTrackTest
 Test class for the RecoTrack object. More...
 
class  CollectorTFInfoTest
 Set up a few arrays and objects in the datastore. More...
 
class  FilterIDTest
 Set up a few arrays and objects in the datastore. More...
 
class  FullSecIDTest
 Testing everything from FullSecID. More...
 
class  VerbosityClass< Verbosity >
 should behave differently for different verbosity-levels given - class More...
 
class  SandBox4TestingTest
 Testing autoAssignment of vectors for functions. More...
 
class  SectorTest
 Set up a few arrays and objects in the datastore. More...
 
class  ThreeHitFiltersTest
 Set up a few arrays and objects in the datastore. More...
 
class  TwoHitFiltersTest
 Set up a few arrays and objects in the datastore. More...
 
struct  ExtState
 Data structure to define extrapolation state. More...
 
struct  Intersection
 intersection of muid-extrapolated track with a KLM layer More...
 
class  TrackExtrapolateG4e
 geant4e-based track extrapolation. More...
 
struct  CALogger
 simple logger for CA algorithm More...
 
struct  CAValidator< CellType >
 validation tool for CA algorithm More...
 
class  CellularAutomaton< ContainerType, ValidatorType >
 The CellularAutomaton class This class serves as a functor for the algorithm itself. More...
 
struct  NodeCompatibilityCheckerBase< NodeType >
 most trivial node compatibility checker, says always true More...
 
struct  NodeCompatibilityCheckerCA< NodeType >
 simple NodeCompatibilityChecker, which checks for compatible Neighboring states of passed nodes (does no extended validation check) More...
 
struct  NodeCompatibilityCheckerPathCollector< NodeType >
 simple NodeCompatibilityChecker, which checks for compatible Neighboring states of passed nodes (does no extended validation check) More...
 
class  NodeFamilyDefiner< ContainerType, NodeType, NeighbourContainerType >
 This class assigns a common family identifier to all CACells in the network that are connected. More...
 
class  PathCollectorRecursive< ContainerType, NodeType, NeighbourContainerType, NodeCompatibilityCheckerType >
 Path finder for generic ContainerType. More...
 
class  SPTCSelectorXBestPerFamily
 Algorithm to collect the x best TrackCandidates per family based on a VXD Quality estimator method output. More...
 
class  StandaloneCosmicsCollector
 Track finding algorithm class for linear tracks produced by cosmics in the VXD without magnetic field. More...
 
class  TrackerAlgorithmBase< ContainerType, ValidatorType >
 base class for TrackerAlgorithms. shall allow a common base for algorithms like the cellular automaton More...
 
class  AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType >
 Base class for storing an algorithm determining the data one wants to have. More...
 
class  AnalyzingAlgorithmLostUClusters< DataType, TCInfoType, VectorType >
 Class for storing an algorithm to find out how many u-type-clusters the testTC lost compared to the refTC. More...
 
class  AnalyzingAlgorithmLostVClusters< DataType, TCInfoType, VectorType >
 Class for storing an algorithm to find out how many v-type-clusters the testTC lost compared to the refTC. More...
 
class  AnalyzingAlgorithmLostUEDep< DataType, TCInfoType, VectorType >
 Class for storing an algorithm to find out the energy deposit of u-type-clusters the testTC lost compared to the refTC. More...
 
class  AnalyzingAlgorithmLostVEDep< DataType, TCInfoType, VectorType >
 Class for storing an algorithm to find out the energy deposit of v-type-clusters the testTC lost compared to the refTC. More...
 
class  AnalyzingAlgorithmTotalUClusters< DataType, TCInfoType, VectorType >
 Class for storing an algorithm to find out how many u-type-clusters the given TC had. More...
 
class  AnalyzingAlgorithmTotalVClusters< DataType, TCInfoType, VectorType >
 Class for storing an algorithm to find out how many v-type-clusters the given TC had. More...
 
class  AnalyzingAlgorithmTotalUEDep< DataType, TCInfoType, VectorType >
 Class for storing an algorithm to find out the energy deposit of u-type-clusters the given TC had. More...
 
class  AnalyzingAlgorithmTotalVEDep< DataType, TCInfoType, VectorType >
 Class for storing an algorithm to find out the energy deposit of v-type-clusters the given TC had. More...
 
class  AnalyzingAlgorithmResidualPX< DataType, TCInfoType, VectorType >
 INFO This file contains all the algorithms calculating residuals of something. More...
 
class  AnalyzingAlgorithmResidualPY< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the residual (ref-test) of momentum in Y. More...
 
class  AnalyzingAlgorithmResidualPZ< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the residual (ref-test) of momentum in Z. More...
 
class  AnalyzingAlgorithmResidualPT< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the residual (ref-test) of momentum in pT. More...
 
class  AnalyzingAlgorithmResidualP< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the residual (ref-test) of momentum in |p|. More...
 
class  AnalyzingAlgorithmResidualPTheta< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the residual (ref-test) of momentum in theta (in degrees) More...
 
class  AnalyzingAlgorithmResidualPPhi< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the residual (ref-test) of momentum in phi (in degrees) More...
 
class  AnalyzingAlgorithmResidualPAngle< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the residual (ref-test) of momentum in its angle (direction residual in degrees) More...
 
class  AnalyzingAlgorithmResidualPTAngle< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the residual (ref-test) of pT in angle (transverse direction residual in degrees) More...
 
class  AnalyzingAlgorithmResidualPosition< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the residual (ref-test) of the seed position in 3D. More...
 
class  AnalyzingAlgorithmResidualPositionXY< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the residual (ref-test) of the seed position in XY (=r) More...
 
class  AnalyzingAlgorithmValuePX< DataType, TCInfoType, VectorType >
 INFO This file contains all the algorithms calculating a certain value of something. More...
 
class  AnalyzingAlgorithmValuePY< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the momentum in Y. More...
 
class  AnalyzingAlgorithmValuePZ< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the momentum in Z. More...
 
class  AnalyzingAlgorithmValuePT< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the momentum in pT. More...
 
class  AnalyzingAlgorithmValueP< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the momentum in |p|. More...
 
class  AnalyzingAlgorithmValuePTheta< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the momentum in theta (in degrees) More...
 
class  AnalyzingAlgorithmValuePPhi< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the momentum in phi (in degrees) More...
 
class  AnalyzingAlgorithmValueDistSeed2IP< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the the distance seedHit to IP in 3D. More...
 
class  AnalyzingAlgorithmValueDistSeed2IPXY< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the distance seedHit to IP in XY (=r) More...
 
class  AnalyzingAlgorithmValueDistSeed2IPZ< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the distance seedHit to IP in XY (=r) More...
 
class  AnalyzingAlgorithmValueQI< DataType, TCInfoType, VectorType >
 Class for storing an algorithm determining the quality indicator of the TC. More...
 
class  AlgoritmType
 Small class for classifying types of analyzing algorithms. More...
 
class  AnalizerTCInfo
 simple class storing infos relevant for a TC for analyzing it. More...
 
class  KeyValBox< KeyType, ValueType >
 Minimal container storing a pair of < KeyType, ValueType> More...
 
class  RootParameterTracker
 Production notes for RootParameterTracker: More...
 
class  TCType
 Small class for classifying types of reconstructed track candidates. More...
 
class  VXDTFFilters< point_t >
 Class that contains all the static sectors to which the filters are attached. More...
 
class  ClosedLowerBoundedSet< MinType >
 Represents a closed lower bounded set of arithmetic types. More...
 
class  ClosedRange< MinType, MaxType >
 Represents a closed set of arithmetic types. More...
 
class  ClosedUpperBoundedSet< MaxType >
 Represents an upper bounded set of arithmetic types. More...
 
class  Filter< typePack >
 This class is used to select pairs, triplets... of objects. More...
 
struct  all_same< types >
 The all_same struct is meant to check that all the types in a template pack are of the same type. More...
 
struct  all_same< T >
 The all_same struct is meant to check that all the types in a template pack are of the same type. More...
 
struct  all_same< >
 The all_same struct is meant to check that all the types in a template pack are of the same type. More...
 
struct  all_same< T, T, types ... >
 The all_same struct is meant to check that all the types in a template pack are of the same type. More...
 
class  Filter< Variable, RangeType, Observer >
 Basic Filter ///. More...
 
class  Filter< Variable, RangeType, Belle2::BypassableFilter, Observer >
 Bypassable Filter ///. More...
 
class  Filter< Variable, RangeType, Belle2::ActivatableFilter, Observer >
 Activatable Filter /// TODO: Remove, as it is no longer used...? More...
 
class  Filter< Belle2::OperatorNot, someFilter, templateObserverType >
 Realization of a NOT operator for the Filter classes. More...
 
class  Filter< Belle2::OperatorAnd, FilterA, FilterB, templateObserverType >
 Realization of the AND operator between two objects of the Filter class. More...
 
class  Filter< Belle2::OperatorOr, FilterA, FilterB, templateObserverType >
 Realization of the OR operator between two objects of the Filter class. More...
 
class  LowerBoundedSet< InfType >
 Represents a lower bounded set of arithmetic types. More...
 
class  Observer
 Observer base class which can be used to evaluate the VXDTF2's Filters. More...
 
class  Range< InfType, SupType >
 Represents a range of arithmetic types. More...
 
class  SelectionVariable< templateArgumentType, Nargs, templateReturnType >
 Base class of the selection variable objects used for pair filtering. More...
 
class  SingleElementSet< Type >
 Represents a set containing a single element;. More...
 
class  UpperBoundedSet< SupType >
 Represents an upper bounded set of arithmetic types. More...
 
class  VoidObserver
 The most CPU efficient Observer for the VXDTF filter tools (even if useless). More...
 
class  DELTACIRCLERADIUS_NAME< PointType >
 calculates delta-circleRadius-value (difference in circle radii of 2 subsets of the hits), returning unit: cm. More...
 
class  DELTADISTCIRCLECENTER_NAME< PointType >
 calculates the distance between the estimated circle centers (using 2 subsets of given hits) in the xy-plane, returning unit: cm. More...
 
class  DELTAPT_NAME< PointType >
 calculates dpt-value (dpt= difference in transverse momentum of 2 subsets of the hits), returning unit: GeV/c. More...
 
class  CompactSecIDs
 This class provides a computer convenient numbering scheme for the sectors in the sector map and for the N sectors combinations. More...
 
class  FiltersContainer< point_t >
 This class contains everything needed by the VXDTF that is not going to change during a RUN, i.e. More...
 
class  SectorsOnSensor< sectorID >
 This class associates to an ordered pairs of normalized local coordinates a compact sector id. More...
 
class  ANGLE3DFULL_NAME< PointType >
 calculates the angle between the hits/vectors (3D), returning unit: angle in degrees. More...
 
class  ANGLE3DSIMPLE_NAME< PointType >
 calculates the angle between the hits/vectors (3D), returning unit: none (calculation for degrees is incomplete, if you want readable numbers, use Angle3DFull instead). More...
 
class  ANGLERZFULL_NAME< PointType >
 calculates the angle between the hits/vectors (RZ), returning unit: angle in degrees. More...
 
class  ANGLERZSIMPLE_NAME< PointType >
 calculates the angle between the hits/vectors (RZ), returning unit: none (calculation for degrees is incomplete, if you want readable numbers, use AngleRZFull instead). More...
 
class  ANGLEXYFULL_NAME< PointType >
 calculates the angle between the hits/vectors (XY), returning unit: angle in degrees. More...
 
class  CIRCLECENTERXY_NAME< PointType >
 calculates the center of the circle for 3 hits in the XY plane and returns a B2Vector3 with the result (z=0). More...
 
class  CIRCLEDIST2IP_NAME< PointType >
 calculates the distance of the point of closest approach of circle to the IP, returning unit: cm More...
 
class  CIRCLERADIUS_NAME< PointType >
 calculates the estimation of the circle radius of the 3-hit-tracklet, returning unit: cm. More...
 
class  COSANGLEXY_NAME< PointType >
 calculates the angle between the hits/vectors (XY), returning unit: none (calculation for degrees is incomplete, if you want readable numbers, use AngleXYFull instead): More...
 
class  DELTASLOPERZ_NAME< PointType >
 calculates deviations in the slope of the inner segment and the outer segment, returning unit: none More...
 
class  DELTASLOPEZOVERS_NAME< PointType >
 compares the "slopes" z over arc length. More...
 
class  DELTASOVERZ_NAME< PointType >
 calculates the helixparameter describing the deviation in arc length per unit in z. More...
 
class  DISTANCEINTIME< PointType >
 This variable returns the difference among the V and U side clusters of th ecenter space point. More...
 
class  HELIXPARAMETERFIT_NAME< PointType >
 calculates the helixparameter describing the deviation in z per unit angle, returning unit: none. More...
 
class  MLHANDOVER_NAME< PointType, Ndims >
 SelectionVariable that is used for the Machine Learning (ML) based filters. More...
 
class  PT_NAME< PointType >
 calculates the estimation of the transverse momentum of the 3-hit-tracklet, returning unit: GeV/c. More...
 
class  SIGNCURVATUREXY_NAME< PointType >
 calculates the sign of the curvature for three hits More...
 
class  SIGNCURVATUREXYERROR_NAME< PointType >
 calculates the sign of the curvature for three hits More...
 
class  ZIGGZAGGRZ_NAME< PointType, PointContainerType >
 checks whether chain of segments are zigg-zagging (changing sign of curvature of neighbouring segments) in the R-Z-plane, returns number of charge-signs found (if != 1, then the given hitContainer is ziggZagging). More...
 
class  ZIGGZAGGXY_NAME< PointType, PointContainerType >
 checks whether chain of segments are zigg-zagging (changing sign of curvature of neighbouring segments) in the X-Y-plane, returns number of charge-signs found (if != 1, then the given hitContainer is ziggZagging). More...
 
class  ZIGGZAGGXYWITHSIGMA_NAME< PointType, PointContainerType >
 checks whether chain of segments are zigg-zagging (changing sign of curvature of neighbouring segments) in the X-Y-plane, returns number of charge-signs found (if != 1, then the given hitContainer is ziggZagging). More...
 
class  VariablesTTree< filterLeaves >
 Dump on a TTree the values of all the variables in a filter. More...
 
class  VariablesTTree<>
 Defines the interface using an empty template pack. More...
 
class  VariablesTTree< Filter< Variable, other ... > >
 Specialization for a simple filter
More...
 
class  VariablesTTree< Filter< unaryOperator, Filter< args ... >, other ... > >
 Specialization for unary operators acting on a filter
More...
 
class  VariablesTTree< Filter< binaryOperator, Filter< argsA ... >, Filter< argsB ... >, other ... > >
 Specialization for binary operators acting on a filter
More...
 
class  VariableTBranch< Variable >
 This class contains. More...
 
class  VariablesOnTTree
 Test for VariablesTTree. More...
 
class  COSDIRECTIONXY_NAME< PointType >
 This is a specialization returning floats, where value calculates the cos of the angle of the segment of two hits in the XY plane. More...
 
class  DISTANCE1DZ_NAME< PointType >
 This is the specialization for SpacePoints with returning floats, where value calculates the distance between two hits in 1D on the Z-axis. More...
 
class  DISTANCE1DZSQUARED_NAME< PointType >
 This is the specialization for SpacePoints with returning floats, where value calculates the squared distance between two hits in 1D on the Z-axis. More...
 
class  DISTANCE2DXYSQUARED_NAME< PointType >
 This is the specialization for SpacePoints with returning floats, where value calculates the squared distance between two hits in 2D on the X-Y-plane. More...
 
class  DISTANCE3DNORMED_NAME< PointType >
 This is the specialization for SpacePoints with returning floats, where value calculates the normed distance between two hits in 3D. More...
 
class  DISTANCE3DSQUARED_NAME< PointType >
 This is the specialization for SpacePoints with returning floats, where value calculates the squared distance between two hits in 3D. More...
 
class  DISTANCEINTIME_U_NAME< PointType >
 This variable returns the time difference among the U side clusters of the two space points. More...
 
class  DISTANCEINTIME_V_NAME< PointType >
 This variable returns the time difference among the V side clusters of the two space points. More...
 
class  SLOPERZ_NAME< PointType >
 This is the specialization for SpacePoints with returning floats, where value calculates the slope in R-Z for a given pair of hits. More...
 
class  DecorrelationMatrix< Ndims >
 Class holding a Matrix that can be used to decorrelate input data to Machine Learning classifiers. More...
 
class  FBDTClassifier< Ndims >
 FastBDT as RelationsObject to make it storable and accessible on/via the DataStore. More...
 
struct  FBDTTrainSample< Ndims >
 bundle together the classifier input and the target value into one struct for easier passing around. More...
 
class  MLRange< ClassifierType, Ndims, CutType >
 Range used for the Machine Learning assisted TrackFinding approach. More...
 
class  Observer3HitPrintResults
 this observer does simply print the name of the SelectionVariable and the result of its value-function as a Warning(if failed) or as an Info (if succeeded) More...
 
class  ObserverCheckFilters
 this observer searches logs the response for each of SelectionVariables used in the filters If the pointer to the StoreArray is set the results will be put into the datastore More...
 
class  ObserverCheckMCPurity
 this observer searches for mcParticles attached to the hits given and stores the information found to be retrieved later. More...
 
class  ObserverPrintResults
 this observer does simply print the name of the SelectionVariable and the result of its value-function as a Warning(if failed) or as an Info (if succeeded) More...
 
class  SelectionVariableFactory< PointType >
 The factory,as the name implies, does not implement at all the factory paradigm. More...
 
struct  SelVarHelper< PointType, DataType >
 contains a collection of functions and related stuff needed for SelectionVariables implementing 2-, 3- and 4-hitfilters. More...
 
class  MVAExpert
 Class to interact with the MVA package, based on class with same name in CDC package. More...
 
class  ActivatedSector
 ActivatedSector is carrying the dynamic part of a Sector. More...
 
struct  BranchInterface< ValueType >
 simple struct for interfacing the Branch. More...
 
class  FilterMill< PointType >
 Small class which stores the filters/selectionVariables to be used for a secMap and has an interface for applying them. More...
 
class  SecIDPair
 allows to set outer and inner secID. More...
 
class  SecIDTriplet
 allows to set outer, center and inner secID. More...
 
class  SecIDQuadruplet
 allows to set outer, outerCenter, innerCenter and inner secID. More...
 
class  FilterValueDataSet< SecIDSetType >
 contains the relevant information needed for filling a TTree containing train-data for the secMap. More...
 
class  MinMax
 small class for storing min and max. More...
 
class  MinMaxCollector< DataType >
 A container for collecting data, where min- and max-quantiles near q(0) and q(1) are to be found. More...
 
class  NoKickCuts
 This class is an auxiliary class that implement methods to access to a single cut, used in NoKickRTSel class. More...
 
class  NoKickRTSel
 This class implement some methods useful for the application of cuts evaluated in NoKickCutsEval module. More...
 
class  RawDataCollectedMinMax
 takes care of collecting raw data and staying below RAM-threshold. More...
 
class  RawSecMapRootInterface
 To be used as an interface to root-stuff. More...
 
class  SecMapTrainer< FilterFactoryType >
 This class contains all relevant tools for training a VXDTFFilters. More...
 
class  SecMapTrainerHit
 simple Hit class used for sectorMap-training. More...
 
class  SecMapTrainerTC
 simple Hit class used for sectorMap-training. More...
 
class  Sector
 Sector is a central part of storing information for VXD trackFinders. More...
 
class  SectorFriendship
 SectorFriendship is carrying the link between parent sector and a connected sector (socalled Friendsector). More...
 
class  SectorGraph< FilterType >
 contains all subgraphs. More...
 
class  SectorMapComparer
 A root tool that compares two Sectormaps (local root files) and produces some statistics output. More...
 
class  SubGraph< FilterType >
 contains all relevant stuff needed for dealing with a subGraph. More...
 
class  SubGraphID
 stores the ID of a subgraph, which is basically a chain of FullSecID coded as unsigned ints. More...
 
class  ActiveSector< StaticSectorType, HitType >
 The ActiveSector Class. More...
 
class  CACell
 The CACell class This Class stores all relevant information one wants to have stored in a cell for a Cellular automaton. More...
 
class  DirectedNode< EntryType, MetaInfoType >
 The Node-Class. More...
 
class  DirectedNodeNetwork< EntryType, MetaInfoType >
 Network of directed nodes of the type EntryType. More...
 
class  DirectedNodeNetworkContainer
 The Container stores the output produced by the SegmentNetworkProducerModule. More...
 
class  Segment< HitType >
 The Segment class This class represents segments of track candidates needed for TrackFinderVXD-Modules. More...
 
class  StaticSector< HitType, Filter2sp, Filter3sp, Filter4sp >
 class to describe a static sector of the sector map. More...
 
struct  TrackNode
 Minimal class to store combination of sector and spacePoint, since SpacePoint can not carry sectorConnection. More...
 
class  VoidMetaInfo
 The most CPU efficient MetaInfo for the DirectedNode-requirements (even if useless). More...
 
struct  SpacePointTrackCandCreator< SPTCContainerType >
 small class to take simple vectors of SpacePoints and convert them to real SpacePointTrackCands More...
 
struct  QualityEstimationResults
 Container for complete fit/estimation results. More...
 
class  QualityEstimatorBase
 BaseClass for QualityEstimators. More...
 
class  QualityEstimatorCircleFit
 Class containing the algorithm to perform the simple circle fit. More...
 
class  QualityEstimatorLineFit3D
 Testbeam: Coords: Sensors: ^ . More...
 
class  QualityEstimatorMC
 Class implementing the algorithm used for the MC based quality estimation. More...
 
class  QualityEstimatorRandom
 Class implementing a random quality estimation. More...
 
class  QualityEstimatorRiemannHelixFit
 Based on R. More...
 
class  QualityEstimatorTripletFit
 does a tripletFit of the given hits The filter is based on the paper 'A New Three-Dimensional Track Fit with Multiple Scattering' by Andre Schoening et al. More...
 
class  AlwaysYesFilter
 AlwaysYesFilter is a simple filter saying always yes, which is meant for testing purposes. More...
 
class  FilterBase
 FilterBase is the baseClass for filters applied on (chains of) spacepoints. More...
 
class  HopfieldNetwork
 Hopfield Algorithm with number based inputs. More...
 
class  OverlapMatrixCreator
 Creates a vector of vectors, that knows which track is conflicting with which other. More...
 
class  OverlapNetwork
 Hold information about overlap of SpacePointTrackCand. More...
 
struct  OverlapResolverNodeInfo
 Struct for holding information needed by overlap resolving algorithms for one node. More...
 
class  Scrooge
 Executes greedy algorithm for vector of QITrackOverlap structs. More...
 
class  Named< T >
 A mixin class to attach a name to an object. Based on class with same name in CDC package. More...
 
class  ClusterInfoExtractor
 class to extract info from individual clusters and combine for SPTC More...
 
class  QEResultsExtractor
 class to extract results from qualityEstimation More...
 
class  SimpleVariableRecorder
 Class to write collected variables into a root file, Used by VXDQETrainingDataCollectorModule. More...
 
class  VariableExtractor
 class to extract individual variables More...
 
class  TrackFitter
 Algorithm class to handle the fitting of RecoTrack objects. More...
 
class  MeasurementAdder
 Algorithm class to translate the added detector hits (e.g. More...
 
class  BaseMeasurementCreator
 Base class for all measurement creators. More...
 
class  BaseMeasurementCreatorFromCoordinateMeasurement< HitType, detector >
 Baseclass to create measurement track points based on the coordinate measurements. More...
 
class  BaseMeasurementCreatorFromHit< HitType, detector >
 Base Class to create measurements based on a given hit related to the RecoTrack. More...
 
class  CoordinateMeasurementCreator< HitType, detector >
 A measurement creator for normal coordinate measurements out of cdc/svd/pxd hits. More...
 
class  VXDMomentumEstimationMeasurementCreator< HitType, detector >
 Creator for VXDMeasurements with momentum estimation based on the dEdX information. More...
 
class  AdditionalMeasurementCreatorFactory
 Add measurement creators that do not rely on a specific hit type, but rather add measurements without corresponding hit. More...
 
class  BKLMMeasurementCreatorFactory
 Add all measurement creators related to BKLM hits. More...
 
class  CDCMeasurementCreatorFactory
 Add all measurement creators related to CDC hits. More...
 
class  EKLMMeasurementCreatorFactory
 Add all measurement creators related to EKLM hits. More...
 
class  MeasurementCreatorFactory< BaseMeasurementCreatorType >
 This is the base class for all MeasurementCreatorFactories used in the MeasurementCreatorModule. More...
 
class  PXDMeasurementCreatorFactory
 Add all measurement creators related to PXD hits. More...
 
class  SVDMeasurementCreatorFactory
 Add all measurement creators related to SVD hits. More...
 
class  HMatrixQP
 AbsHMatrix implementation for one-dimensional MeasurementOnPlane and RKTrackRep parameterization. More...
 
class  PlanarMomentumMeasurement
 Measurement class implementing a planar hit geometry (1 or 2D) with only a momentum measurement. More...
 
class  PlanarVXDMomentumMeasurement< HitType >
 Measurement class implementing a planar hit geometry (1 or 2D) with a momentum measurement based on the VXD dEdX information with setable parameters (see VXDMomentumEstimationMeasurementCreator). More...
 
class  TrackBuilder
 TrackBuilder class to create the Track/TrackFitResult mdst output from the RecoTrack. More...
 
class  EventInfoExtractor
 class to extract results from qualityEstimation More...
 
class  FlipRecoTrackExtractor2nd
 class to extract results from qualityEstimation More...
 
class  FlipRecoTrackExtractor
 class to extract results from qualityEstimation More...
 
class  HitInfoExtractor
 class to extract info from individual clusters and combine for SPTC More...
 
class  RecoTrackExtractor
 class to extract results from qualityEstimation More...
 
class  SubRecoTrackExtractor
 class to extract results from qualityEstimation More...
 
class  NewV0Fitter
 Improved V0 fitter class. More...
 
class  V0Fitter
 V0Fitter class to create V0 mdst's from reconstructed tracks. More...
 
class  V0FitterTest
 Set up a few arrays and objects in the datastore. More...
 
class  ExporterEventInfo
 Bundles information for a single event to be stored by NonRootDataExportModule. More...
 
class  ExporterHitInfo
 Bundles information for a single hit to be stored by EventInfo (needed for HitExporter, which is needed by NonRootDataExportModule) More...
 
class  ExporterTcInfo
 Bundles information for a single track candidate to be stored by EventInfo (needed for HitExporter, which is needed by NonRootDataExportModule) More...
 
class  FilterExceptions
 Exception which are thrown by members of the FilterClasses. More...
 
class  FourHitFilters
 The class 'FourHitFilters' bundles filter methods using 4 hits which are stored in B2Vector3Ds. More...
 
class  GlobalNames
 Bundles filter methods using 2 hits. More...
 
class  ThreeHitFilters
 The class 'ThreeHitFilters' bundles filter methods using 3 hits which are stored in B2Vector3Ds. More...
 
class  TwoHitFilters
 The class 'TwoHitFilters' bundles filter methods using 2 hits which are stored in B2Vector3Ds. More...
 
class  XHitFilterFactory< PointType >
 The factory serves as an interface between all x-hit-filters and a user only knowing their name (in string), but not their type. More...
 
class  VXDMomentumEstimation< ClusterType >
 Class doing the momentum estimation from dEdX for SVDClusters and PXDClusters. More...
 
class  VXDMomentumEstimationTools< ClusterType >
 Tools needed for the VXD momentum estimation to, e.g. More...
 

Macros

#define SELECTION_VARIABLE(variableName, nArgs, argumentType, implementation)
 Template to define a selection-variable class.
 

Typedefs

using CDCCKFPath = std::vector< CDCCKFState >
 Shortcut for the collection of CDC CKF-algorithm states.
 
using CDCCKFResult = CDCCKFPath
 Alias for the collection of CDC CKF-algorithm states.
 
using BaseCDCPathPairFilter = TrackFindingCDC::Filter< std::pair< const CDCCKFPath *, const CDCCKFPath * > >
 Base filter for CKF CDC paths.
 
using BaseCDCPathFilter = TrackFindingCDC::Filter< CDCCKFPath >
 Base filter for CKF CDC paths.
 
using BaseCDCStateFilter = TrackFindingCDC::Filter< std::pair< const CDCCKFPath *, CDCCKFState * > >
 Base filter for CKF CDC states.
 
using BasePXDPairFilter = TrackFindingCDC::Filter< std::pair< const CKFToPXDState *, const CKFToPXDState * > >
 Base filter for CKF PXD states.
 
using ChooseablePXDRelationFilter = LayerPXDRelationFilter< TrackFindingCDC::ChooseableFilter< PXDPairFilterFactory > >
 A chooseable filter for picking out the relations between states.
 
using BasePXDResultFilter = TrackFindingCDC::Filter< CKFToPXDResult >
 Base filter for CKF PXD results (on overlap check)
 
using ChooseablePXDResultFilter = TrackFindingCDC::ChooseableFilter< PXDResultFilterFactory >
 Alias for filter to weight the PXD clusters.
 
using BasePXDStateFilter = TrackFindingCDC::Filter< std::pair< const std::vector< TrackFindingCDC::WithWeight< const CKFToPXDState * > >, CKFToPXDState * > >
 Base filter for CKF PXD states.
 
using ChooseableOnPXDStateApplier = LayerToggledApplier< CKFToPXDState, LimitedOnStateApplier< CKFToPXDState, TrackFindingCDC::ChooseableFilter< PXDStateFilterFactory > > >
 Alias to apply the () operator to all items filtered by CKF PXD layer states.
 
using NonIPCrossingPXDStateFilter = NonIPCrossingStateFilter< AllPXDStateFilter >
 Alias for filter to check direction of a new CKF PXD state.
 
using PXDStateRejecter = StateRejecter< CKFToPXDState, ChooseableOnPXDStateApplier >
 Rejecter findlet for CKF PXD states.
 
using PXDAdvancer = Advancer
 The PXD advancer is just a synonym of the normal advancer (but may change in the future).
 
using BaseSVDPairFilter = TrackFindingCDC::Filter< std::pair< const CKFToSVDState *, const CKFToSVDState * > >
 Base filter for CKF SVD states.
 
using ChooseableSVDRelationFilter = LayerSVDRelationFilter< TrackFindingCDC::ChooseableFilter< SVDPairFilterFactory > >
 A chooseable filter for picking out the relations between states.
 
using BaseSVDResultFilter = TrackFindingCDC::Filter< CKFToSVDResult >
 Base filter for CKF SVD results (on overlap check)
 
using ChooseableSVDResultFilter = TrackFindingCDC::ChooseableFilter< SVDResultFilterFactory >
 Alias for filter to weight the SVD clusters.
 
using BaseSVDStateFilter = TrackFindingCDC::Filter< std::pair< const std::vector< TrackFindingCDC::WithWeight< const CKFToSVDState * > >, CKFToSVDState * > >
 Base filter for CKF SVD states.
 
using ChooseableOnSVDStateApplier = LayerToggledApplier< CKFToSVDState, LimitedOnStateApplier< CKFToSVDState, TrackFindingCDC::ChooseableFilter< SVDStateFilterFactory > > >
 Alias to apply the () operator to all items filtered by CKF SVD layer states.
 
using NonIPCrossingSVDStateFilter = NonIPCrossingStateFilter< AllSVDStateFilter >
 Alias for filter to check direction of a new CKF SVD state.
 
using SVDStateRejecter = StateRejecter< CKFToSVDState, ChooseableOnSVDStateApplier >
 Rejecter findlet for CKF SVD states.
 
using SVDAdvancer = Advancer
 The PXD advancer is just a synonym of the normal advancer (but may change in the future).
 
template<class AFindlet >
using EventTimeExtractorModule = TrackFindingCDC::FindletModule< TrackFindingCDC::FindletStoreArrayInput< BaseEventTimeExtractorModuleFindlet< AFindlet > > >
 Alias for the event time extraction module.
 
typedef std::unordered_multimap< int, double > i2dMultiMap
 typedef for less writing effort
 
typedef std::unordered_map< int, double > i2dMap
 typedef for less writing effort
 
using CDCBaseMeasurementCreator = BaseMeasurementCreatorFromHit< RecoHitInformation::UsedCDCHit, Const::CDC >
 Needed for templating.
 
using SVDBaseMeasurementCreator = BaseMeasurementCreatorFromHit< RecoHitInformation::UsedSVDHit, Const::SVD >
 Standard base class for SVD measurement creators.
 
using PXDBaseMeasurementCreator = BaseMeasurementCreatorFromHit< RecoHitInformation::UsedPXDHit, Const::PXD >
 Standard base class for PXD measurement creators.
 
using BKLMBaseMeasurementCreator = BaseMeasurementCreatorFromHit< RecoHitInformation::UsedBKLMHit, Const::BKLM >
 Standard base class for BKLM measurement creators.
 
using EKLMBaseMeasurementCreator = BaseMeasurementCreatorFromHit< RecoHitInformation::UsedEKLMHit, Const::EKLM >
 Standard base class for EKLM measurement creators.
 
using CDCCoordinateMeasurementCreator = CoordinateMeasurementCreator< RecoHitInformation::UsedCDCHit, Const::CDC >
 Needed for templating.
 
using SVDCoordinateMeasurementCreator = CoordinateMeasurementCreator< RecoHitInformation::UsedSVDHit, Const::SVD >
 Hit to reco hit measurement creator for the SVD.
 
using PXDCoordinateMeasurementCreator = CoordinateMeasurementCreator< RecoHitInformation::UsedPXDHit, Const::PXD >
 Hit to reco hit measurement creator for the PXD.
 
using BKLMCoordinateMeasurementCreator = CoordinateMeasurementCreator< RecoHitInformation::UsedBKLMHit, Const::BKLM >
 Hit to reco hit measurement creator for the BKLM.
 
using EKLMCoordinateMeasurementCreator = CoordinateMeasurementCreator< RecoHitInformation::UsedEKLMHit, Const::EKLM >
 Hit to reco hit measurement creator for the EKLM.
 
using SVDMomentumMeasurementCreator = VXDMomentumEstimationMeasurementCreator< RecoHitInformation::UsedSVDHit, Const::SVD >
 Momentum measurement creator for the SVD.
 
using PXDMomentumMeasurementCreator = VXDMomentumEstimationMeasurementCreator< RecoHitInformation::UsedPXDHit, Const::PXD >
 Momentum measurement creator for the PXD.
 

Enumerations

enum  VolTypes {
  VOLTYPE_CDC ,
  VOLTYPE_TOP1 ,
  VOLTYPE_TOP2 ,
  VOLTYPE_TOP3 ,
  VOLTYPE_ARICH1 ,
  VOLTYPE_ARICH2 ,
  VOLTYPE_ARICH3 ,
  VOLTYPE_ECL ,
  VOLTYPE_BKLM1 ,
  VOLTYPE_BKLM2 ,
  VOLTYPE_EKLM
}
 Enumeration for G4VPhysicalVolume sensitive-volume categories. More...
 

Functions

std::ostream & operator<< (std::ostream &output, const CDCCKFPath &path)
 Output operator for the collection of CDC CKF-algorithm states.
 
std::ostream & operator<< (std::ostream &output, const CDCCKFState &state)
 print state info
 
std::string getClassMnemomicParameterName (const RecoTrack *dispatchTag)
 Returns a short name for class RecoTrack to be used in names of parameters.
 
std::string getClassMnemomicParameterDescription (const RecoTrack *dispatchTag)
 Returns a short description for class RecoTrack to be used in descriptions of parameters.
 
std::string getClassMnemomicParameterName (const SpacePoint *dispatchTag)
 Returns a short name for class SpacePoint to be used in names of parameters.
 
std::string getClassMnemomicParameterDescription (const SpacePoint *dispatchTag)
 Returns a short description for class SpacePoint to be used in descriptions of parameters.
 
template<unsigned int NRows, unsigned int NCols, class AMatrix >
Eigen::Matrix< double, NRows, NCols, Eigen::RowMajor > convertToEigen (const AMatrix &matrix)
 Convert a ROOT matrix to Eigen. Checks for the correct row and column number.
 
template<unsigned int NRows>
Eigen::Matrix< double, NRows, 1 > convertToEigen (const TVectorD &matrix)
 Convert a ROOT matrix to Eigen - TVector specialisation. Checks for the correct row number.
 
template<class T >
void checkResizeClear (std::vector< T > &vectorToCheck, uint limit)
 Check capacity of a vector and create a fresh one if capacity too large If the capacity of a std::vector is very large without being used, it just allocates RAM for no reason, increasing the RAM usage unnecessarily.
 
constexpr bool arcLengthInRightDirection (double arcLength2D, TrackFindingCDC::EForwardBackward forwardBackward)
 Given the calculated arc length between a start point and an end point, checks if the travelled path is along the given direction or not.
 
TrackFindingCDC::EForwardBackward fromString (const std::string &directionString)
 Helper function to turn a direction string into a valid forward backward information.
 
long convertFloatToInt (double value, int power)
 Convert float or double to long int for more similarity to the FPGA implementation.
 
template<typename MapType >
std::vector< typename MapType::key_type > getUniqueKeys (const MapType &aMap)
 get the unique keys of a map (i.e.
 
template<typename MapType >
unsigned int getUniqueSize (const MapType &aMap)
 get the number of unique keys inside the map NOTE: for non-multimap this is the same as .size()
 
template<typename MapType >
std::vector< std::pair< typename MapType::key_type, unsigned int > > getNValuesPerKey (const MapType &aMap)
 get the unique keys of a map together with the number of values associated to each key.
 
template<typename MapType >
std::vector< typename MapType::mapped_type > getValuesToKey (const MapType &aMap, typename MapType::key_type aKey)
 get all values stored in the map for a given key
 
template<typename MapType >
std::vector< std::tuple< typename MapType::key_type, typename MapType::mapped_type, unsigned int > > getSortedKeyValueTuples (const MapType &aMap)
 get the (key, value, number of values) tuples stored in the map, sorted after the following scheme (descending order) 1) the number of associated values to one key 2) the sum of the associated values to that key NOTE: for a non-multimap this returns the content of the map ordered by valued CAUTION: if one of the values to a key is NaN this key will be the first (of the ones with the same number of associated values)
 
template<typename MapType >
std::vector< typename MapType::mapped_type > getAllValues (const MapType &aMap)
 get all values in the map (i.e.
 
template<typename MapType >
std::string printMap (const MapType &aMap)
 get the contents of the map as string.
 
static bool findWeightInVector (std::vector< std::pair< int, double > > &vec, double weight)
 find the given weight in the given vector of pair<int,double> NOTE: the criteria for finding are rather loose (i.e.
 
template<typename TrueHitType >
static std::vector< std::pair< int, double > > getMCParticles (const Belle2::SpacePoint *spacePoint)
 get the related MCParticles to the TrueHit.
 
static void increaseClusterCounters (const Belle2::SpacePoint *spacePoint, std::array< unsigned, 3 > &clusterCtr)
 increase the appropriate Cluster counter by asking the SpacePoint which type he has and which Clusters are assigned
 
static std::vector< size_t > getAccessorsFromWeight (double weight)
 convert the relation weight (SpacePoint <-> TrueHit) to a type that can be used to access arrays
 
static std::vector< Belle2::MCVXDPurityInfocreatePurityInfosVec (const std::vector< const Belle2::SpacePoint * > &spacePoints)
 create a vector of MCVXDPurityInfos objects for a std::vector<Belle2::SpacePoints>.
 
template<typename SPContainer >
static std::vector< Belle2::MCVXDPurityInfocreatePurityInfos (const SPContainer *container)
 create a vector of MCVXDPurityInfos objects for any given container holding SpacePoints and providing a getHits() method each MCParticle that is in the container gets its own object NOTE: negative MCParticleIds are possible und used as follows:
 
template<typename SPContainer >
static std::vector< Belle2::MCVXDPurityInfocreatePurityInfos (const SPContainer &container)
 
template<typename Functor >
i2dMultiMap createMultiMap (int nEntries, Functor funct)
 create a multimap with
 
template<typename Functor >
i2dMap createMap (int nEntries, Functor funct)
 create a multimap with
 
 TEST_F (MapHelperFunctionsTest, testCreatorFunctions)
 test the methods that are use to create the maps for the later tests
 
 TEST_F (MapHelperFunctionsTest, testGetUniqueKeys)
 test if the 'getUniqueKeys' method returns the right values
 
 TEST_F (MapHelperFunctionsTest, testGetValuesToKey)
 test if the 'getValuesToKey' method returns the right values to a given key
 
 TEST_F (MapHelperFunctionsTest, testGetNValuesPerKey)
 test the 'getNValuesPerKey' method
 
 TEST_F (MapHelperFunctionsTest, testGetSortedKeyValueTuples)
 test if the 'getSortedKeyValuePairs' method actually works as advertised
 
 TEST_F (MapHelperFunctionsTest, testGetAllValues)
 test the getAllValues() function actually returns all values that are stored in the map
 
 TEST_F (SpacePointTest, testConstructorPXD)
 Test constructor for PXDClsuters tests the constructor importing a PXDCluster and tests results by using the getters of the spacePoint...
 
 TEST_F (SpacePointTest, testConstructorSVD)
 Test constructor for SVDClsuters tests the constructor importing a SVDCluster and tests results by using the getters of the spacePoint...
 
 TEST_F (SpacePointTest, testRootIOPXDCluster)
 Test if cluster writing in and reading from root files work.
 
 TEST_F (SpacePointTest, testRootIOB2Vector3)
 Test if B2Vector3 writing in and reading from root files work.
 
 TEST_F (SpacePointTest, testRootIOSP)
 Test if spacePoints writing in and reading from root files work.
 
 TEST_F (SpacePointTest, testConvertLocalToNormalizedCoordinates)
 Testing member of spacePoint: convertToNormalizedCoordinates.
 
 TEST_F (SpacePointTest, testConvertNormalizedToLocalCoordinates)
 Testing member of spacePoint: convertToLocalCoordinates.
 
 TEST_F (SpacePointTest, testGetNClustersAssigned)
 Test if the number of assigned Clusters is obtained correctly NOTE: using the same constructors as in previous tests!
 
 TEST_F (SpacePointTrackCandTest, testConstructorFromVector)
 Test the Constructor, that takes a vector of SpacePoint* as argument.
 
 TEST_F (SpacePointTrackCandTest, testEqualityOperator)
 Test operator == of SpacePointTrackCand.
 
 TEST_F (SpacePointTrackCandTest, testSetPdgCode)
 Test setPdgCode method, by comparing its results with the expected values for the according particles.
 
 TEST_F (SpacePointTrackCandTest, testGetHitsInRange)
 Test the get hits in range method.
 
 TEST_F (SpacePointTrackCandTest, testRefereeStatus)
 Test the setRefereeStatus and getRefereeStatus methods.
 
 TEST_F (SpacePointTrackCandTest, testRemoveSpacePoints)
 Test the removeSpacePoint method.
 
 TEST_F (SpacePointTrackCandTest, testGetSortedHits)
 Test setPdgCode method, by comparing its results with the expected values for the according particles.
 
 TEST_F (RecoTrackTest, cdcHit)
 Test simple Setters and Getters.
 
 TEST_F (RecoTrackTest, cdcHitMCFinderCategory)
 Test simple Correct handling of the MCFinder hit classification.
 
 TEST_F (RecoTrackTest, testGenfitConversionOne)
 Test conversion to genfit track cands.
 
 TEST_F (RecoTrackTest, testGenfitConversionTwo)
 Test conversion from genfit track cands.
 
 TEST_F (RecoTrackTest, copyRecoTrack)
 Test copying a RecoTrack.
 
 TEST_F (RecoTrackTest, recoHitInformations)
 Test the getRecoHitInformations() function.
 
 TEST_F (RecoTrackTest, trackTime)
 Test getOutgoingArmTime() and getIngoingArmTime() functions.
 
 TEST_F (CollectorTFInfoTest, testAllInformationLoop)
 dummy comment: testAllInformationLoop
 
 TEST_F (FilterIDTest, simpleTest)
 Test simple Setters and Getters.
 
 TEST_F (FullSecIDTest, constructorAndGetterTests)
 Test simple Setters and Getters.
 
 TEST_F (FullSecIDTest, overloadedOperatorTests)
 testing the overloaded operators of the FullSecID-class
 
 TEST_F (FullSecIDTest, bufferOverflowTest)
 Unfinished test - shall test bufferOverflows...
 
 TEST_F (SandBox4TestingTest, testingVerbosityViaTemplates)
 test function call with auto-assigned value
 
 TEST_F (SandBox4TestingTest, JustSomePlayingAroundWithfunction)
 test function call with auto-assigned value
 
 TEST_F (SandBox4TestingTest, TestIsNanAndIsInfBehavior)
 shall show when to get nan and when to get inf (and that inf != nan)
 
 TEST_F (SectorTest, testConstructorSettersAndGetters)
 Test Constructor, Setters and Getters.
 
 TEST_F (ThreeHitFiltersTest, simpleTest)
 Test simple Setters and Getters.
 
 TEST_F (ThreeHitFiltersTest, TestMagneticField)
 the correctness of the magneticField-values (important for pT-related calculations)
 
 TEST_F (ThreeHitFiltersTest, TestAngles)
 the correctness of the angle calculators
 
 TEST_F (ThreeHitFiltersTest, TestSignAndOtherFilters)
 test sign, helixFit and calcDeltaSlopeRZ filters
 
 TEST_F (ThreeHitFiltersTest, TestDeltaSOverZ)
 test DeltaSOverZ
 
 TEST_F (ThreeHitFiltersTest, TestCalcPt)
 test cramer method in calcPt
 
 TEST_F (TwoHitFiltersTest, TestEmptyFilter)
 Test simple Setters and Getters by filling zeroes.
 
 TEST_F (TwoHitFiltersTest, TestFilledFilter)
 Test simple Setters and Getters by filling non-zero-values.
 
 TEST_F (TwoHitFiltersTest, testLargeFilter)
 Test simple Setters and Getters by filling extreme values.
 
B2Vector3D outerHit (0, 0, 0)
 testing out of range behavior
 
 TEST_F (TwoHitFiltersTest, TestOutOfRangeNormedDistFilter)
 And now possibly the only case where TwoHitFilters produces wrong results.
 
template<class NetworkPath >
SpacePointTrackCand convertNetworkPath (NetworkPath networkPath)
 Create new SPTC from network path.
 
void insertSpacePoint (std::vector< const SpacePoint * > &target, TrackNode source)
 Convert TrackNode to SpaePoint an add to a SpacePoint path.
 
void insertSpacePoints (std::vector< const SpacePoint * > &target, const Segment< TrackNode > &source)
 Insert of inner and outer TrackNodes of a Segment as SpacePoints into path of SpacePoints.
 
template<class DataType , class TCInfoType , class VectorType >
bool operator== (const AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > &a, const std::string &b)
 non-memberfunction Comparison for equality with a std::string
 
template<class DataType , class TCInfoType , class VectorType >
bool operator== (const std::string &a, const AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > &b)
 non-memberfunction Comparison for equality with a std::string
 
template<class DataType , class TCInfoType , class VectorType >
bool operator== (const AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > &a, const AlgoritmType::Type &b)
 non-memberfunction Comparison for equality with a AlgoritmType::Type
 
template<class DataType , class TCInfoType , class VectorType >
bool operator== (const AlgoritmType::Type &a, const AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > &b)
 non-memberfunction Comparison for equality with a AlgoritmType::Type
 
template<class DataType , class TCInfoType , class VectorType >
AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > * AnalyzingAlgorithmFactoryDouble (AlgoritmType::Type algorithmID)
 the analyzingAlgorithm factory for algorithms returning one double for each TC passed:
 
template<class DataType , class TCInfoType , class VectorType >
AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > * AnalyzingAlgorithmFactoryInt (AlgoritmType::Type algorithmID)
 the analyzingAlgorithm factory for algorithms returning one int for each TC passed:
 
template<class DataType , class TCInfoType , class VectorType >
AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > * AnalyzingAlgorithmFactoryVecDouble (AlgoritmType::Type algorithmID)
 the analyzingAlgorithm factory for algorithms returning one vector< double> for each TC passed:
 
template<typename ... types>
Filter< OperatorNot, Filter< types... >, VoidObserveroperator! (const Filter< types... > &filter)
 Definition of the NOT operator ! for the Filter class.
 
template<typename ... types1, typename ... types2>
Filter< Belle2::OperatorAnd, Belle2::Filter< types1... >, Belle2::Filter< types2... >, Belle2::VoidObserveroperator&& (const Filter< types1... > &filter1, const Filter< types2... > &filter2)
 Definition of the boolean AND operator && of the Filter class.
 
template<typename ... types1, typename ... types2>
Filter< Belle2::OperatorOr, Belle2::Filter< types1... >, Belle2::Filter< types2... >, Belle2::VoidObserveroperator|| (const Filter< types1... > &filter1, const Filter< types2... > &filter2)
 Definition of the boolean OR operator || of the Filter class.
 
template<class booleanBinaryOperator , typename ... types1, typename ... types2, class observer , typename ... argsTypes>
bool initializeObservers (const Filter< booleanBinaryOperator, Belle2::Filter< types1... >, Belle2::Filter< types2... >, observer > &, argsTypes ... args)
 Observer Stuff ///.
 
template<class booleanUnaryOperator , typename ... types1, class observer , typename ... argsTypes>
bool initializeObservers (const Filter< booleanUnaryOperator, Belle2::Filter< types1... >, observer > &, argsTypes ... args)
 Recursive function to initialize all the observers in a unary boolean Filter.
 
template<class Variable , class RangeType , class observer , typename ... argsTypes>
bool initializeObservers (const Belle2::Filter< Variable, RangeType, observer > &filter, argsTypes ... args)
 Initialize the observer of a RangeType Filter.
 
template<class Variable , class Range , class ... Options>
std::unordered_map< std::string, typename Variable::functionType > SelectionVariableNamesToFunctions (Belle2::Filter< Variable, Range, Options... >)
 Return a map from the SelectionVariable name to the SelectionVariable function of the Variable used in the filter that is the template argument parameter.
 
template<class someFilter , class ... options>
std::unordered_map< std::string, typename someFilter::functionType > SelectionVariableNamesToFunctions (Belle2::Filter< Belle2::OperatorNot, someFilter, options... >)
 Wrapper for filters with NOT Operator tag.
 
template<class FilterA , class FilterB , class ... options>
std::unordered_map< std::string, typename FilterA::functionType > SelectionVariableNamesToFunctions (Belle2::Filter< Belle2::OperatorAnd, FilterA, FilterB, options... >)
 Wrapper for filters with AND Operator tag.
 
template<class FilterA , class FilterB , class ... options>
std::unordered_map< std::string, typename FilterA::functionType > SelectionVariableNamesToFunctions (Belle2::Filter< Belle2::OperatorOr, FilterA, FilterB, options... >)
 Wrapper for filters with OR Operator tag.
 
template<class Var , class Arithmetic , typename ... types>
std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< Arithmetic >::value, Filter< Var, UpperBoundedSet< Arithmetic >, VoidObserver > >::type operator< (const Var &, Arithmetic upperBound)
 Creates a Filters with an upper bound < on the provided variable Var < lowerBound.
 
template<class Var , class Arithmetic , typename ... types>
std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< Arithmetic >::value, Filter< Var, ClosedUpperBoundedSet< Arithmetic >, VoidObserver > >::type operator<= (const Var &, Arithmetic upperBound)
 Creates a Filters with a closed upper bound <= on the provided variable Var <= lowerBound.
 
template<class Var , class Arithmetic >
std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< Arithmetic >::value, Filter< Var, LowerBoundedSet< Arithmetic >, VoidObserver > >::type operator> (const Var &, Arithmetic lowerBound)
 Creates a Filters with an lower bound > on the provided variable Var > lowerBound.
 
template<class Var , class Arithmetic >
std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< Arithmetic >::value, Filter< Var, ClosedLowerBoundedSet< Arithmetic >, VoidObserver > >::type operator>= (const Var &, Arithmetic lowerBound)
 Creates a Filters with a closed lower bound >= on the provided variable Var >= lowerBound.
 
template<class Var , class Arithmetic >
std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< Arithmetic >::value, Filter< Var, UpperBoundedSet< Arithmetic >, VoidObserver > >::type operator> (Arithmetic upperBound, const Var &)
 Creates a Filters with an upper bound < on the provided variable upperBound > Var.
 
template<class Var , class Arithmetic >
std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< Arithmetic >::value, Filter< Var, ClosedUpperBoundedSet< Arithmetic >, VoidObserver > >::type operator>= (Arithmetic upperBound, const Var &)
 Creates a Filters with a closed upper bound <= on the provided variable upperBound >= Var.
 
template<class Var , class Arithmetic >
std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< Arithmetic >::value, Filter< Var, LowerBoundedSet< Arithmetic >, VoidObserver > >::type operator< (Arithmetic lowerBound, const Var &)
 Creates a Filters with an lower bound > on the provided variable lowerBound < Var.
 
template<class Var , class Arithmetic >
std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< Arithmetic >::value, Filter< Var, ClosedLowerBoundedSet< Arithmetic >, VoidObserver > >::type operator<= (Arithmetic lowerBound, const Var &)
 Creates a Filters with a closed lower bound >= on the provided variable lowerBound <= Var.
 
template<class Var , class Val >
std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value, Filter< Var, SingleElementSet< Val >, VoidObserver > >::type operator== (const Var &, Val v)
 Creates a Filters to compare a variable against a given value Var == Val;.
 
template<class Var , class Val >
std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value, Filter< Var, SingleElementSet< Val >, VoidObserver > >::type operator== (Val val, const Var &var)
 Creates a Filters to compare a variable against a given value Val == Var;.
 
template<class Var , class ArithmeticLower , class ArithmeticUpper , class Observer >
std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< ArithmeticLower >::value &&std::is_arithmetic< ArithmeticUpper >::value, Filter< Var, Range< ArithmeticLower, ArithmeticUpper >, Observer > >::type operator< (const Filter< Var, LowerBoundedSet< ArithmeticLower >, Observer > &filter, ArithmeticUpper upperBound)
 Adding upper bound to filter with lower bound to create a filter with an allowed range between lower and upper bound.
 
template<class Var , class ArithmeticLower , class ArithmeticUpper , class Observer >
std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< ArithmeticLower >::value &&std::is_arithmetic< ArithmeticUpper >::value, Filter< Var, Range< ArithmeticLower, ArithmeticUpper >, Observer > >::type operator> (const Filter< Var, UpperBoundedSet< ArithmeticUpper >, Observer > &filter, ArithmeticLower lowerBound)
 Adding lower bound to filter with upper bound to create a filter with an allowed range between lower and upper bound.
 
template<class Var , class ArithmeticLower , class ArithmeticUpper , class Observer >
std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< ArithmeticLower >::value &&std::is_arithmetic< ArithmeticUpper >::value, Filter< Var, ClosedRange< ArithmeticLower, ArithmeticUpper >, Observer > >::type operator<= (const Filter< Var, ClosedLowerBoundedSet< ArithmeticLower >, Observer > &filter, ArithmeticUpper upperBound)
 Adding closed upper bound to filter with closed lower bound to create a filter with an allowed closed range between lower and upper bound.
 
template<class Var , class ArithmeticLower , class ArithmeticUpper , class Observer >
std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< ArithmeticLower >::value &&std::is_arithmetic< ArithmeticUpper >::value, Filter< Var, ClosedRange< ArithmeticLower, ArithmeticUpper >, Observer > >::type operator>= (const Filter< Var, ClosedUpperBoundedSet< ArithmeticUpper >, Observer > &filter, ArithmeticLower lowerBound)
 Adding closed lower bound to filter with closed upper bound to create a filter with an allowed closed range between lower and upper bound.
 
char TBranchLeafType (const char *)
 Overloading TBranchLeafType to be able to get identifier 'C' for type char*.
 
char TBranchLeafType (const Char_t &)
 Overloading TBranchLeafType to be able to get identifier 'B' for type Char_t.
 
char TBranchLeafType (const unsigned char &)
 Overloading TBranchLeafType to be able to get identifier 'b' for type unsigned char.
 
char TBranchLeafType (const short &)
 Overloading TBranchLeafType to be able to get identifier 'S' for type short.
 
char TBranchLeafType (const unsigned short &)
 Overloading TBranchLeafType to be able to get identifier 's' for type unsigned short.
 
char TBranchLeafType (const Int_t &)
 Overloading TBranchLeafType to be able to get identifier 'I' for type Int_t.
 
char TBranchLeafType (const UInt_t &)
 Overloading TBranchLeafType to be able to get identifier 'i' for type UInt_t.
 
char TBranchLeafType (const Float_t &)
 Overloading TBranchLeafType to be able to get identifier 'F' for type Float_t.
 
char TBranchLeafType (const Double_t &)
 Overloading TBranchLeafType to be able to get identifier 'D' for type Double_t.
 
char TBranchLeafType (const long int &)
 Overloading TBranchLeafType to be able to get identifier 'L' for type long int.
 
char TBranchLeafType (const unsigned long int &)
 Overloading TBranchLeafType to be able to get identifier 'l' for type unsigned long int.
 
char TBranchLeafType (const bool &)
 Overloading TBranchLeafType to be able to get identifier 'O' for type bool.
 
 SELECTION_VARIABLE (Difference, 2, double, static double value(const double &t1, const double &t2) { return t1 - t2;};)
 Quick definition of a selection variable implementing the difference of 2 doubles.
 
 SELECTION_VARIABLE (Sum, 2, double, static double value(const double &t1, const double &t2) { return t1+t2;};)
 Quick definition of a selection variable implementing the sum of 2 doubles.
 
 TEST_F (VariablesOnTTree, basic_test)
 Basic test of the class.
 
template<size_t Ndims>
const Eigen::Matrix< double, Ndims, Ndims, Eigen::RowMajor > calculateCovMatrix (std::array< std::vector< double >, Ndims > inputData)
 calculates the empirical covariance matrix from the inputData.
 
template<size_t Ndims>
static void readSamplesFromStream (std::istream &is, std::vector< FBDTTrainSample< Ndims > > &samples)
 read samples from stream and append them to samples
 
template<size_t Ndims>
static void writeSamplesToStream (std::ostream &os, const std::vector< FBDTTrainSample< Ndims > > &samples)
 write all samples to stream
 
template<class EntryType , class MetaInfoType >
bool operator== (const EntryType &a, const DirectedNode< EntryType, MetaInfoType > &b)
 ************************* NON-MEMBER FUNCTIONS *************************
 
short calcCurvatureSignum (std::vector< SpacePoint const * > const &measurements)
 Calculate curvature based on triplets of measurements.
 
 TEST_F (V0FitterTest, GetTrackHypotheses)
 Test getter for track hypotheses.
 
 TEST_F (V0FitterTest, InitializeCuts)
 Test initialization of cuts.
 
TrackFindingCDC::Weight operator() (const Object &pair) final
 Main function testing the object for the direction.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override
 Expose the direction parameter.
 
void initialize () final
 Copy the string direction parameter to the enum.
 
 ~CKFRelationCreator ()
 Default destructor.
 
 CKFRelationCreator ()
 Construct this findlet and add the subfindlet as listener.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final
 Expose the parameters of the subfindlet.
 
void apply (std::vector< AState > &seedStates, std::vector< AState > &states, std::vector< TrackFindingCDC::WeightedRelation< AState > > &relations) override
 Apply both filters for creating state-hit and hit-hit relations.
 
 LayerToggledApplier ()
 Add the subfilters as listeners.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final
 Expose parameters of the subfilters and the layer to change.
 
void apply (const std::vector< TrackFindingCDC::WithWeight< const AState * > > &currentPath, std::vector< TrackFindingCDC::WithWeight< AState * > > &childStates) override
 The weight is calculated using the subfilter based on the geometrical layer of the state.
 
 LimitedOnStateApplier ()
 Constructor adding the findlet as a listener.
 
void apply (const std::vector< TrackFindingCDC::WithWeight< const AState * > > &currentPath, std::vector< TrackFindingCDC::WithWeight< AState * > > &childStates) override
 Apply the filter to each pair of states and current path and let only pass the best N states.
 
TrackFindingCDC::Weight operator() (const Object &object) override
 Copy the filter operator to this method.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override
 Expose the parameters of the subfindlet.
 
void apply (const std::vector< TrackFindingCDC::WithWeight< const AState * > > &currentPath, std::vector< TrackFindingCDC::WithWeight< AState * > > &childStates) override
 Apply the () operator to all pairs of state and current path.
 
virtual TrackFindingCDC::Weight operator() (const Object &object)
 The filter operator for this class.
 
 OverlapResolver ()
 Construct this findlet and add the subfindlet as listener.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final
 Expose the parameters of the subfindlet.
 
void apply (std::vector< Object > &results, std::vector< Object > &filteredResult) override
 For each seed, search for the best candidate and return it.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override
 Expose the parameters of the sub findlets.
 
void initialize () override
 Create the store arrays.
 
void apply (std::vector< AResult > &results) override
 Load in the reco tracks and the hits.
 
void beginEvent () override
 Clear the used clusters.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override
 Expose the parameters of the findlet.
 
void apply (const std::vector< AResult > &results, const std::vector< const SpacePoint * > &spacePoints) override
 Mark all space points as used, that they share clusters if the given kind with the results.
 
void apply (const std::vector< AnObject * > &objects, std::vector< AState > &states) override
 Add new states to the list of states using all given objects.
 
void apply (const std::vector< RecoTrack * > &objects, std::vector< AState > &states) final
 Create states from the space points, including a reverse flag or not.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final
 Expose the parameters.
 
 StateRejecter ()
 Construct this findlet and add the subfindlet as listener.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final
 Expose the parameters of the subfindlet.
 
void apply (const std::vector< TrackFindingCDC::WithWeight< const AState * > > &currentPath, std::vector< TrackFindingCDC::WithWeight< AState * > > &childStates) final
 Apply all five filters to the child states.
 
 TreeSearcher ()
 Construct this findlet and add the subfindlet as listener.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final
 Expose the parameters of the subfindlet.
 
void apply (const std::vector< AState > &seededStates, std::vector< AState > &hitStates, const std::vector< TrackFindingCDC::WeightedRelation< AState > > &relations, std::vector< AResult > &results) final
 Main function of this findlet: traverse a tree starting from a given seed states.
 
void traverseTree (std::vector< TrackFindingCDC::WithWeight< const AState * > > &path, const std::vector< TrackFindingCDC::WeightedRelation< AState > > &relations, std::vector< AResult > &results)
 Implementation of the traverseTree function.
 
 LayerPXDRelationFilter ()
 Add the filter as listener.
 
 ~LayerPXDRelationFilter ()
 Default destructor.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override
 Expose the parameters of the filter.
 
void initialize () override
 Receive signal before the start of the event processing.
 
void beginRun () override
 Receive signal for the beginning of a new run.
 
std::vector< CKFToPXDState * > getPossibleTos (CKFToPXDState *from, const std::vector< CKFToPXDState * > &states) const override
 Return all states the given state is possible related to.
 
TrackFindingCDC::Weight operator() (const CKFToPXDState &from, const CKFToPXDState &to) override
 Give a final weight to the possibilities by asking the filter.
 
 LayerSVDRelationFilter ()
 Add the filter as listener.
 
void beginRun () final
 Initialize the maximal ladder cache.
 
 ~LayerSVDRelationFilter ()
 Default destructor.
 
std::vector< CKFToSVDState * > getPossibleTos (CKFToSVDState *from, const std::vector< CKFToSVDState * > &states) const final
 Return all states the given state is possible related to.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final
 Expose the parameters of the filter.
 
TrackFindingCDC::Weight operator() (const CKFToSVDState &from, const CKFToSVDState &to) final
 Give a final weight to the possibilities by asking the filter.
 
void beginRun () final
 Initialize the sector map.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final
 Expose the parameters of the filter.
 
TrackFindingCDC::Weight operator() (const std::pair< const CKFToSVDState *, const CKFToSVDState * > &relation) override
 Give a final weight to the possibilities by asking the filter.
 
bool wasSuccessful () const
 Returns true if the last run t0 extraction was successful.
 
virtual void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override
 Expose our parameters to the super module.
 
virtual void initialize () override
 Initialize the event t0 store obj ptr.
 
virtual void beginEvent () override
 Create the event t0 store obj ptr.
 
void resetEventT0 () const
 Reset the t0 value to cached value if it exists or clear it otherwise.
 
 BaseEventTimeExtractorModuleFindlet ()
 Add the subfindlet as listener.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override final
 Expose our parameters to the super module.
 
void apply (std::vector< RecoTrack * > &recoTracks) override final
 Apply the findlets.
 
 GridEventTimeExtractor ()
 Add the subfindlet as listener.
 
void apply (std::vector< RecoTrack * > &recoTracks) override final
 Timing extraction for this findlet.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override final
 Expose the parameters.
 
 IterativeEventTimeExtractor ()
 Add the subfindlet as listener.
 
void apply (std::vector< RecoTrack * > &recoTracks) override final
 Timing extraction for this findlet.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override
 Expose the parameters.
 
 ROIToUnitTranslator (const ROIinfo *theROIinfo)
 Constructor.
 
 ROIToUnitTranslator (double sigmaSystU, double sigmaSystV, double numSigmaTotU, double numSigmaTotV, double maxWidthU, double maxWidthV)
 Second Constructor.
 
void fillRoiIDList (StoreArray< aIntercept > *listOfIntercepts, StoreArray< ROIid > *ROIidList)
 Append the ROIid to the list listToBeFilled.
 
void fillInterceptList (StoreArray< aIntercept > *listToBeFilled, const StoreArray< RecoTrack > &trackList, RelationArray *recoTrackToIntercepts)
 Fill the list of PXD intecepts corresponding to the list of track candidates.
 
void appendIntercepts (StoreArray< aIntercept > *interceptList, std::list< ROIDetPlane > planeList, genfit::MeasuredStateOnPlane state, int recoTrackIndex, RelationArray *recoTrackToIntercepts)
 Append the Intercept infos related to the track theTrack to the listToBeFilled.
 
void import_sectors_standard ()
 dummy comment: import_sectors_standard
 
void import_clusters_standard ()
 dummy comment: import_clusters_standard
 
void import_sectors_loop ()
 Documentation Comment Jakob Lettenbichler: this was written by a student and will be removed after finishing redesign of VXDTF.
 
void import_clusters_loop ()
 dummy comment: import_clusters_loop
 
void import_hit_standard ()
 dummy comment: import_hit_standard
 
void import_hit_loop ()
 dummy comment: import_hit_loop
 
void import_cell_standard ()
 dummy comment: import_cell_standard
 
void import_cell_loop ()
 dummy comment: import_cell_loop
 
void import_tfc_standard ()
 dummy comment: import_tfc_standard
 
void import_tfc_loop ()
 dummy comment: import_tfc_loop
 
void getAllCells ()
 Output of all interesting Information of Cells.
 
void getAllHits ()
 Output of all interesting Information of Hits.
 
void getAllClusters ()
 Output of all interesting Information of Clusters.
 
void getAllTC ()
 Output of all interesting Information of TC.
 
void getAllSectors ()
 Output of all interesting Information of Sectors.
 
 VariableTBranch (TTree *tree)
 Add to the TTree.
 
void calculateDecorrMatrix (std::array< std::vector< double >, Ndims > inputData, bool normalise=true)
 calculate the transformation matrix that when applied to the input data yields linearly uncorrelated data.
 
std::vector< double > decorrelate (const std::vector< double > &inputVec) const
 "decorrelate" one measurement (i.e.
 
std::vector< double > decorrelate (const std::array< double, Ndims > &inputs) const
 "decorrelate" one measurement (i.e.
 
std::array< std::vector< double >, Ndims > decorrelate (const std::array< std::vector< double >, Ndims > &inputMat) const
 decorrelate M measurements (i.e.
 
std::string print () const
 print the matrix to a string.
 
bool readFromStream (std::istream &is)
 read from stream.
 
double analyze (const std::array< double, Ndims > &hits) const
 calculate the output of the FastBDT.
 
virtual std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane (const genfit::StateOnPlane &state) const override
 Construct the measurement on the plane set in the parent element.
 
const TMatrixD & getMatrix () const override
 Return the underlying matrix.
 
TVectorD Hv (const TVectorD &v) const override
 Calculate H * v = v_0.
 
TMatrixD MHt (const TMatrixDSym &M) const override
 Calculate M * H^T = first column of M.
 
TMatrixD MHt (const TMatrixD &M) const override
 Calculate M * H^T = first column of M.
 
void HMHt (TMatrixDSym &M) const override
 Calculate H * M * H^T = M_00.
 
virtual void Print (const Option_t *="") const override
 Print a symbol for the matrix for debugging.
 

Variables

static constexpr char const *const cdcfromEclPathTruthVarNames []
 Names of the variables to be generated.
 
static constexpr char const *const cdcPathBasicVarNames []
 Names of the variables to be generated.
 
static constexpr char const *const cdcPathTruthVarNames []
 Names of the variables to be generated.
 
static constexpr char const *const cdcfromEclStateTruthVarNames []
 Names of the variables to be generated.
 
static constexpr char const *const cdcStateBasicVarNames []
 Names of the variables to be generated.
 
static constexpr char const *const cdcStateTruthVarNames []
 Names of the variables to be generated.
 
static constexpr char const *const pxdResultTruthNames []
 Names of the variables to be generated.
 
static constexpr char const *const pxdResultVarNames []
 Names of the variables to be generated.
 
static constexpr char const *const pxdStateBasicVarNames []
 Names of the variables to be generated.
 
static constexpr char const *const pxdStateTruthVarNames []
 Names of the variables to be generated.
 
static constexpr char const *const relationSVDResultVarNames []
 Names of the variables to be generated.
 
static constexpr char const *const svdResultTruthNames []
 Names of the variables to be generated.
 
static constexpr char const *const svdResultVarNames []
 Names of the variables to be generated.
 
static constexpr char const *const svdStateBasicVarNames []
 Names of the variables to be generated.
 
static constexpr char const *const svdStateTruthVarNames []
 Names of the variables to be generated.
 
static constexpr char const *const svdStateVarNames []
 Names of the variables to be generated.
 
static VectorType s_origin = VectorType(0, 0, 0)
 stores the origin used for some calculations, can be set here
 
static bool m_storeRefTCDataForTestTC = false
 if true, for testTC the values of attached refTC will be stored instead of own values.
 
static DataType s_MagneticFieldFactor
 is factor containing speed of light (c), the magnetic field (b) and the scaling factor s for conversion of meter in cm : c*b/100 = c*b*s.
 

Detailed Description

Macro Definition Documentation

◆ SELECTION_VARIABLE

#define SELECTION_VARIABLE (   variableName,
  nArgs,
  argumentType,
  implementation 
)
Value:
class variableName: \
public SelectionVariable< argumentType , nArgs, double > \
{ \
public: \
static const std::string name(void) {return #variableName; }; \
implementation \
}; \

Template to define a selection-variable class.

Definition at line 111 of file SelectionVariable.h.

Typedef Documentation

◆ BaseCDCPathFilter

Base filter for CKF CDC paths.

Definition at line 19 of file BaseCDCPathFilter.h.

◆ BaseCDCPathPairFilter

Base filter for CKF CDC paths.

Definition at line 21 of file BaseCDCPathPairFilter.h.

◆ BaseCDCStateFilter

Base filter for CKF CDC states.

Definition at line 20 of file BaseCDCStateFilter.h.

◆ BasePXDPairFilter

Base filter for CKF PXD states.

Definition at line 19 of file BasePXDPairFilter.h.

◆ BasePXDResultFilter

Base filter for CKF PXD results (on overlap check)

Definition at line 19 of file BasePXDResultFilter.h.

◆ BasePXDStateFilter

Base filter for CKF PXD states.

Definition at line 20 of file BasePXDStateFilter.h.

◆ BaseSVDPairFilter

Base filter for CKF SVD states.

Definition at line 19 of file BaseSVDPairFilter.h.

◆ BaseSVDResultFilter

Base filter for CKF SVD results (on overlap check)

Definition at line 19 of file BaseSVDResultFilter.h.

◆ BaseSVDStateFilter

Base filter for CKF SVD states.

Definition at line 21 of file BaseSVDStateFilter.h.

◆ BKLMBaseMeasurementCreator

Standard base class for BKLM measurement creators.

Definition at line 89 of file BaseMeasurementCreatorFromHit.h.

◆ BKLMCoordinateMeasurementCreator

Hit to reco hit measurement creator for the BKLM.

Definition at line 42 of file CoordinateMeasurementCreator.h.

◆ CDCBaseMeasurementCreator

Needed for templating.

Standard base class for CDC measurement creators.

Definition at line 83 of file BaseMeasurementCreatorFromHit.h.

◆ CDCCKFPath

using CDCCKFPath = std::vector<CDCCKFState>

Shortcut for the collection of CDC CKF-algorithm states.

Definition at line 19 of file CDCCKFPath.h.

◆ CDCCKFResult

Alias for the collection of CDC CKF-algorithm states.

Definition at line 18 of file CDCCKFResult.h.

◆ CDCCoordinateMeasurementCreator

Needed for templating.

Hit to reco hit measurement creator for the CDC.

Definition at line 36 of file CoordinateMeasurementCreator.h.

◆ ChooseableOnPXDStateApplier

Alias to apply the () operator to all items filtered by CKF PXD layer states.

Definition at line 24 of file ChooseableOnPXDStateApplier.h.

◆ ChooseableOnSVDStateApplier

Alias to apply the () operator to all items filtered by CKF SVD layer states.

Definition at line 25 of file ChooseableOnSVDStateApplier.h.

◆ ChooseablePXDRelationFilter

A chooseable filter for picking out the relations between states.

Definition at line 22 of file ChooseablePXDRelationFilter.h.

◆ ChooseablePXDResultFilter

Alias for filter to weight the PXD clusters.

Definition at line 24 of file ChooseablePXDResultFilter.h.

◆ ChooseableSVDRelationFilter

A chooseable filter for picking out the relations between states.

Definition at line 20 of file ChooseableSVDRelationFilter.h.

◆ ChooseableSVDResultFilter

Alias for filter to weight the SVD clusters.

Definition at line 19 of file ChooseableSVDResultFilter.h.

◆ EKLMBaseMeasurementCreator

Standard base class for EKLM measurement creators.

Definition at line 91 of file BaseMeasurementCreatorFromHit.h.

◆ EKLMCoordinateMeasurementCreator

Hit to reco hit measurement creator for the EKLM.

Definition at line 44 of file CoordinateMeasurementCreator.h.

◆ EventTimeExtractorModule

◆ i2dMap

typedef std::unordered_map<int, double> i2dMap

typedef for less writing effort

Definition at line 29 of file mapHelperFunctions.cc.

◆ i2dMultiMap

typedef std::unordered_multimap<int, double> i2dMultiMap

typedef for less writing effort

Definition at line 28 of file mapHelperFunctions.cc.

◆ NonIPCrossingPXDStateFilter

Alias for filter to check direction of a new CKF PXD state.

Definition at line 20 of file NonIPCrossingPXDStateFilter.h.

◆ NonIPCrossingSVDStateFilter

Alias for filter to check direction of a new CKF SVD state.

Definition at line 20 of file NonIPCrossingSVDStateFilter.h.

◆ PXDAdvancer

The PXD advancer is just a synonym of the normal advancer (but may change in the future).

Definition at line 18 of file PXDAdvancer.h.

◆ PXDBaseMeasurementCreator

Standard base class for PXD measurement creators.

Definition at line 87 of file BaseMeasurementCreatorFromHit.h.

◆ PXDCoordinateMeasurementCreator

Hit to reco hit measurement creator for the PXD.

Definition at line 40 of file CoordinateMeasurementCreator.h.

◆ PXDMomentumMeasurementCreator

◆ PXDStateRejecter

Rejecter findlet for CKF PXD states.

Definition at line 22 of file PXDStateRejecter.h.

◆ SVDAdvancer

The PXD advancer is just a synonym of the normal advancer (but may change in the future).

Definition at line 18 of file SVDAdvancer.h.

◆ SVDBaseMeasurementCreator

Standard base class for SVD measurement creators.

Definition at line 85 of file BaseMeasurementCreatorFromHit.h.

◆ SVDCoordinateMeasurementCreator

Hit to reco hit measurement creator for the SVD.

Definition at line 38 of file CoordinateMeasurementCreator.h.

◆ SVDMomentumMeasurementCreator

◆ SVDStateRejecter

Rejecter findlet for CKF SVD states.

Definition at line 24 of file SVDStateRejecter.h.

Enumeration Type Documentation

◆ VolTypes

enum VolTypes

Enumeration for G4VPhysicalVolume sensitive-volume categories.

Enumerator
VOLTYPE_CDC 

CDC.

VOLTYPE_TOP1 

TOP container.

VOLTYPE_TOP2 

TOP quartz.

VOLTYPE_TOP3 

TOP glue.

VOLTYPE_ARICH1 

ARICH aerogel.

VOLTYPE_ARICH2 

ARICH Img plate.

VOLTYPE_ARICH3 

ARICH HAPD window.

VOLTYPE_ECL 

ECL.

VOLTYPE_BKLM1 

BKLM RPC.

VOLTYPE_BKLM2 

BKLM scintillator.

VOLTYPE_EKLM 

EKLM.

Definition at line 65 of file TrackExtrapolateG4e.h.

65 {
67 VOLTYPE_CDC,
69 VOLTYPE_TOP1,
71 VOLTYPE_TOP2,
73 VOLTYPE_TOP3,
75 VOLTYPE_ARICH1,
77 VOLTYPE_ARICH2,
79 VOLTYPE_ARICH3,
81 VOLTYPE_ECL,
83 VOLTYPE_BKLM1,
85 VOLTYPE_BKLM2,
87 VOLTYPE_EKLM
88 };

Function Documentation

◆ analyze()

double analyze ( const std::array< double, Ndims > &  hits) const

calculate the output of the FastBDT.

At the moment fixed to 3 hits

Definition at line 96 of file FBDTClassifier.h.

97 {
98 std::vector<double> positions = m_decorrMat.decorrelate(hits);
99
100 std::vector<unsigned> bins(Ndims);
101 for (size_t i = 0; i < Ndims; ++i) {
102 bins[i] = m_featBins[i].ValueToBin(positions[i]);
103 }
104
105 return m_forest.Analyse(bins);
106 }
FBDTForest m_forest
the forest used for classification
std::vector< FastBDT::FeatureBinning< double > > m_featBins
the feature binnings corresponding to the BDT
Belle2::DecorrelationMatrix< Ndims > m_decorrMat
the decorrelation matrix used in this classifier

◆ AnalyzingAlgorithmFactoryDouble()

AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > * AnalyzingAlgorithmFactoryDouble ( AlgoritmType::Type  algorithmID)

the analyzingAlgorithm factory for algorithms returning one double for each TC passed:

returns the algorithm matching the given ID.

residuals

values of single entries

Definition at line 34 of file AnalyzingAlgorithmFactory.h.

35 {
37 if (algorithmID == AnalyzingAlgorithmBase<DataType, TCInfoType, VectorType>())
38 { return new AnalyzingAlgorithmBase<DataType, TCInfoType, VectorType>(); }
39
40 if (algorithmID == AnalyzingAlgorithmResidualPX<DataType, TCInfoType, VectorType>())
41 { return new AnalyzingAlgorithmResidualPX<DataType, TCInfoType, VectorType>(); }
42
43 if (algorithmID == AnalyzingAlgorithmResidualPY<DataType, TCInfoType, VectorType>())
44 { return new AnalyzingAlgorithmResidualPY<DataType, TCInfoType, VectorType>(); }
45
46 if (algorithmID == AnalyzingAlgorithmResidualPZ<DataType, TCInfoType, VectorType>())
47 { return new AnalyzingAlgorithmResidualPZ<DataType, TCInfoType, VectorType>(); }
48
49 if (algorithmID == AnalyzingAlgorithmResidualPT<DataType, TCInfoType, VectorType>())
50 { return new AnalyzingAlgorithmResidualPT<DataType, TCInfoType, VectorType>(); }
51
52 if (algorithmID == AnalyzingAlgorithmResidualP<DataType, TCInfoType, VectorType>())
53 { return new AnalyzingAlgorithmResidualP<DataType, TCInfoType, VectorType>(); }
54
55 if (algorithmID == AnalyzingAlgorithmResidualPTheta<DataType, TCInfoType, VectorType>())
56 { return new AnalyzingAlgorithmResidualPTheta<DataType, TCInfoType, VectorType>(); }
57
58 if (algorithmID == AnalyzingAlgorithmResidualPPhi<DataType, TCInfoType, VectorType>())
59 { return new AnalyzingAlgorithmResidualPPhi<DataType, TCInfoType, VectorType>(); }
60
61 if (algorithmID == AnalyzingAlgorithmResidualPAngle<DataType, TCInfoType, VectorType>())
62 { return new AnalyzingAlgorithmResidualPAngle<DataType, TCInfoType, VectorType>(); }
63
64 if (algorithmID == AnalyzingAlgorithmResidualPTAngle<DataType, TCInfoType, VectorType>())
65 { return new AnalyzingAlgorithmResidualPTAngle<DataType, TCInfoType, VectorType>(); }
66
67 if (algorithmID == AnalyzingAlgorithmResidualPosition<DataType, TCInfoType, VectorType>())
68 { return new AnalyzingAlgorithmResidualPosition<DataType, TCInfoType, VectorType>(); }
69
70 if (algorithmID == AnalyzingAlgorithmResidualPositionXY<DataType, TCInfoType, VectorType>())
71 { return new AnalyzingAlgorithmResidualPositionXY<DataType, TCInfoType, VectorType>(); }
72
73
75 if (algorithmID == AnalyzingAlgorithmValuePX<DataType, TCInfoType, VectorType>())
76 { return new AnalyzingAlgorithmValuePX<DataType, TCInfoType, VectorType>(); }
77
78 if (algorithmID == AnalyzingAlgorithmValuePY<DataType, TCInfoType, VectorType>())
79 { return new AnalyzingAlgorithmValuePY<DataType, TCInfoType, VectorType>(); }
80
81 if (algorithmID == AnalyzingAlgorithmValuePZ<DataType, TCInfoType, VectorType>())
82 { return new AnalyzingAlgorithmValuePZ<DataType, TCInfoType, VectorType>(); }
83
84 if (algorithmID == AnalyzingAlgorithmValuePT<DataType, TCInfoType, VectorType>())
85 { return new AnalyzingAlgorithmValuePT<DataType, TCInfoType, VectorType>(); }
86
87 if (algorithmID == AnalyzingAlgorithmValueP<DataType, TCInfoType, VectorType>())
88 { return new AnalyzingAlgorithmValueP<DataType, TCInfoType, VectorType>(); }
89
90 if (algorithmID == AnalyzingAlgorithmValuePTheta<DataType, TCInfoType, VectorType>())
91 { return new AnalyzingAlgorithmValuePTheta<DataType, TCInfoType, VectorType>(); }
92
93 if (algorithmID == AnalyzingAlgorithmValuePPhi<DataType, TCInfoType, VectorType>())
94 { return new AnalyzingAlgorithmValuePPhi<DataType, TCInfoType, VectorType>(); }
95
96 if (algorithmID == AnalyzingAlgorithmValueDistSeed2IP<DataType, TCInfoType, VectorType>())
97 { return new AnalyzingAlgorithmValueDistSeed2IP<DataType, TCInfoType, VectorType>(); }
98
99 if (algorithmID == AnalyzingAlgorithmValueDistSeed2IPXY<DataType, TCInfoType, VectorType>())
100 { return new AnalyzingAlgorithmValueDistSeed2IPXY<DataType, TCInfoType, VectorType>(); }
101
102 if (algorithmID == AnalyzingAlgorithmValueDistSeed2IPZ<DataType, TCInfoType, VectorType>())
103 { return new AnalyzingAlgorithmValueDistSeed2IPZ<DataType, TCInfoType, VectorType>(); }
104
105 if (algorithmID == AnalyzingAlgorithmValueQI<DataType, TCInfoType, VectorType>())
106 { return new AnalyzingAlgorithmValueQI<DataType, TCInfoType, VectorType>(); }
107
108 if (!AlgoritmType::isValueDoubleType(algorithmID)
109 and !AlgoritmType::isResidualDoubleType(algorithmID)
110 and (AlgoritmType::isHitValueVecDoubleType(algorithmID)
111 or AlgoritmType::isHitValueIntType(algorithmID))) {
112 B2WARNING(" AnalyzingAlgorithmFactoryDouble: given algorithmID " << AlgoritmType::getTypeName(algorithmID) <<
113 " is no algorithm of double type but of another (valid) category. Please use the correct factory for your purpose. Returning non-functioning base-class instead!");
114 } else {
115 B2ERROR(" AnalyzingAlgorithmFactoryDouble: given algorithmID " << AlgoritmType::getTypeName(algorithmID) <<
116 " is not known, returning non-functioning base-class instead!");
117 }
118
119 return new AnalyzingAlgorithmBase<DataType, TCInfoType, VectorType>();
120 }

◆ AnalyzingAlgorithmFactoryInt()

AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > * AnalyzingAlgorithmFactoryInt ( AlgoritmType::Type  algorithmID)

the analyzingAlgorithm factory for algorithms returning one int for each TC passed:

returns the algorithm matching the given ID.

residuals

Definition at line 129 of file AnalyzingAlgorithmFactory.h.

130 {
132 if (algorithmID == AnalyzingAlgorithmBase<DataType, TCInfoType, VectorType>())
133 { return new AnalyzingAlgorithmBase<DataType, TCInfoType, VectorType>(); }
134
135 if (algorithmID == AnalyzingAlgorithmLostUClusters<DataType, TCInfoType, VectorType>())
136 { return new AnalyzingAlgorithmLostUClusters<DataType, TCInfoType, VectorType>(); }
137
138 if (algorithmID == AnalyzingAlgorithmLostVClusters<DataType, TCInfoType, VectorType>())
139 { return new AnalyzingAlgorithmLostVClusters<DataType, TCInfoType, VectorType>(); }
140
141 if (algorithmID == AnalyzingAlgorithmTotalUClusters<DataType, TCInfoType, VectorType>())
142 { return new AnalyzingAlgorithmTotalUClusters<DataType, TCInfoType, VectorType>(); }
143
144 if (algorithmID == AnalyzingAlgorithmTotalVClusters<DataType, TCInfoType, VectorType>())
145 { return new AnalyzingAlgorithmTotalVClusters<DataType, TCInfoType, VectorType>(); }
146
147 if (!AlgoritmType::isHitValueIntType(algorithmID)
148 and (AlgoritmType::isValueDoubleType(algorithmID)
149 or AlgoritmType::isResidualDoubleType(algorithmID)
150 or AlgoritmType::isHitValueVecDoubleType(algorithmID))) {
151 B2WARNING(" AnalyzingAlgorithmInt: given algorithmID " << AlgoritmType::getTypeName(algorithmID) <<
152 " is no algorithm of int type but of another (valid) category. Please use the correct factory for your purpose. Returning non-functioning base-class instead!");
153 } else {
154 B2ERROR(" AnalyzingAlgorithmInt: given algorithmID " << AlgoritmType::getTypeName(algorithmID) <<
155 " is not known, returning non-functioning base-class instead!");
156 }
157
158 return new AnalyzingAlgorithmBase<DataType, TCInfoType, VectorType>();
159 }

◆ AnalyzingAlgorithmFactoryVecDouble()

AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > * AnalyzingAlgorithmFactoryVecDouble ( AlgoritmType::Type  algorithmID)

the analyzingAlgorithm factory for algorithms returning one vector< double> for each TC passed:

returns the algorithm matching the given ID.

residuals

Definition at line 168 of file AnalyzingAlgorithmFactory.h.

169 {
171 if (algorithmID == AnalyzingAlgorithmBase<DataType, TCInfoType, VectorType>())
172 { return new AnalyzingAlgorithmBase<DataType, TCInfoType, VectorType>(); }
173
174 if (algorithmID == AnalyzingAlgorithmLostUEDep<DataType, TCInfoType, VectorType>())
175 { return new AnalyzingAlgorithmLostUEDep<DataType, TCInfoType, VectorType>(); }
176
177 if (algorithmID == AnalyzingAlgorithmLostVEDep<DataType, TCInfoType, VectorType>())
178 { return new AnalyzingAlgorithmLostVEDep<DataType, TCInfoType, VectorType>(); }
179
180 if (algorithmID == AnalyzingAlgorithmTotalUEDep<DataType, TCInfoType, VectorType>())
181 { return new AnalyzingAlgorithmTotalUEDep<DataType, TCInfoType, VectorType>(); }
182
183 if (algorithmID == AnalyzingAlgorithmTotalVEDep<DataType, TCInfoType, VectorType>())
184 { return new AnalyzingAlgorithmTotalVEDep<DataType, TCInfoType, VectorType>(); }
185
186
187 if (!AlgoritmType::isHitValueVecDoubleType(algorithmID)
188 and (AlgoritmType::isValueDoubleType(algorithmID)
189 or AlgoritmType::isResidualDoubleType(algorithmID)
190 or AlgoritmType::isHitValueIntType(algorithmID))) {
191 B2WARNING(" AnalyzingAlgorithmVecDouble: given algorithmID " << AlgoritmType::getTypeName(algorithmID) <<
192 " is no algorithm of vector<double> type but of another (valid) category. Please use the correct factory for your purpose. Returning non-functioning base-class instead!");
193 } else {
194 B2ERROR(" AnalyzingAlgorithmVecDouble: given algorithmID " << AlgoritmType::getTypeName(algorithmID) <<
195 " is not known, returning non-functioning base-class instead!");
196 }
197
198 return new AnalyzingAlgorithmBase<DataType, TCInfoType, VectorType>();
199 }

◆ appendIntercepts()

void appendIntercepts ( StoreArray< aIntercept > *  interceptList,
std::list< ROIDetPlane planeList,
genfit::MeasuredStateOnPlane  state,
int  recoTrackIndex,
RelationArray recoTrackToIntercepts 
)
private

Append the Intercept infos related to the track theTrack to the listToBeFilled.

Definition at line 87 of file VXDInterceptor.templateDetails.h.

92 {
93 aIntercept tmpIntercept;
94
95 B2DEBUG(20, " ...-appendIntercepts, checking " << planeList.size() << " planes");
96
97 double lambda = 0;
98
99 std::list<ROIDetPlane>::iterator itPlanes = planeList.begin();
100 while (itPlanes != planeList.end()) {
101 B2DEBUG(20, " searching in appendIntercepts : " << (itPlanes->getVxdID()));
102
103 try {
104 lambda = state.extrapolateToPlane(itPlanes->getSharedPlanePtr());
105 } catch (...) {
106 B2DEBUG(20, " ...-extrapolation to plane failed");
107 ++itPlanes;
108 continue;
109 }
110
111 const TVectorD& predictedIntersect = state.getState();
112 const TMatrixDSym& covMatrix = state.getCov();
113
114 tmpIntercept.setCoorU(predictedIntersect[3]);
115 tmpIntercept.setCoorV(predictedIntersect[4]);
116 tmpIntercept.setSigmaU(sqrt(covMatrix(3, 3)));
117 tmpIntercept.setSigmaV(sqrt(covMatrix(4, 4)));
118 tmpIntercept.setSigmaUprime(sqrt(covMatrix(1, 1)));
119 tmpIntercept.setSigmaVprime(sqrt(covMatrix(2, 2)));
120 tmpIntercept.setLambda(lambda);
121 tmpIntercept.setVxdID(itPlanes->getVxdID());
122 tmpIntercept.setUprime(predictedIntersect[1]);
123 tmpIntercept.setVprime(predictedIntersect[2]);
124
125 B2DEBUG(20, "extrapolate to plane!!! >>> coordinates with getPos = " << state.getPos().X()
126 << ", " << state.getPos().Y()
127 << ", " << state.getPos().Z());
128 B2DEBUG(20, "coordinates with predInter = " << predictedIntersect[3]
129 << ", " << predictedIntersect[4]);
130 B2DEBUG(20, "momentum with getMom = " << state.getMom().X()
131 << ", " << state.getMom().Y()
132 << ", " << state.getMom().Z());
133 B2DEBUG(20, "U/V prime momentum with getMom = " << state.getMom().Z() / state.getMom().X()
134 << ", " << state.getMom().Z() / state.getMom().Y());
135 B2DEBUG(20, "U/V prime momentum with predInter = " << predictedIntersect[1]
136 << ", " << predictedIntersect[2]);
137
138 interceptList->appendNew(tmpIntercept);
139
140 recoTrackToIntercepts->add(recoTrackIndex, interceptList->getEntries() - 1);
141
142 ++itPlanes;
143
144 }
145
146 }
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28

◆ apply() [1/14]

void apply ( const std::vector< AnObject * > &  objects,
std::vector< AState > &  states 
)
override

Add new states to the list of states using all given objects.

Findlet for tagging all space points in the results vector as used.

Definition at line 19 of file StateCreator.icc.h.

21 {
22 states.reserve(states.size() + objects.size());
23
24 for (AnObject* object : objects) {
25 states.emplace_back(object);
26 }
27 }

◆ apply() [2/14]

void apply ( const std::vector< AResult > &  results,
const std::vector< const SpacePoint * > &  spacePoints 
)
override

Mark all space points as used, that they share clusters if the given kind with the results.

Definition at line 52 of file SpacePointTagger.icc.h.

54 {
56 return;
57 }
58
59 for (const AResult& result : results) {
60 const std::vector<const SpacePoint*>& hits = result.getHits();
61 for (const SpacePoint* spacePoint : hits) {
62 m_usedSpacePoints.insert(spacePoint);
63
65 continue;
66 }
67
68 const auto& relatedClusters = spacePoint->getRelationsTo<ACluster>();
69 for (const ACluster& relatedCluster : relatedClusters) {
70 m_usedClusters.insert(&relatedCluster);
71 }
72 }
73 }
74
75 for (const SpacePoint* spacePoint : spacePoints) {
76 if (TrackFindingCDC::is_in(spacePoint, m_usedSpacePoints)) {
77 spacePoint->setAssignmentState(true);
78 continue;
79 }
80
82 continue;
83 }
84
85 const auto& relatedClusters = spacePoint->getRelationsTo<ACluster>();
86 for (const ACluster& relatedCluster : relatedClusters) {
87 if (TrackFindingCDC::is_in(&relatedCluster, m_usedClusters)) {
88 spacePoint->setAssignmentState(true);
89 break;
90 }
91 }
92 }
93 }
bool m_param_markUsedSpacePoints
Parameter: Mark used space points as assigned.
bool m_param_singleClusterLevel
Parameter: Mark SP as used, if the share a single cluster with the results, or if they share a whole ...
std::set< const ACluster * > m_usedClusters
Store the used clusters in the results.
std::set< const SpacePoint * > m_usedSpacePoints
Store the used space points in the results.

◆ apply() [3/14]

void apply ( const std::vector< AState > &  seededStates,
std::vector< AState > &  hitStates,
const std::vector< TrackFindingCDC::WeightedRelation< AState > > &  relations,
std::vector< AResult > &  results 
)
final

Main function of this findlet: traverse a tree starting from a given seed states.

ATTENTION: As described above, the states themselves can be altered during the tree traversal.

Definition at line 42 of file TreeSearcher.icc.h.

46 {
47 B2ASSERT("Expected relation to be sorted",
48 std::is_sorted(relations.begin(), relations.end()));
49
50 // TODO: May be better to just do this for each seed separately
51 const std::vector<AState*>& statePointers = TrackFindingCDC::as_pointers<AState>(hitStates);
52 m_automaton.applyTo(statePointers, relations);
53
54 std::vector<TrackFindingCDC::WithWeight<const AState*>> path;
55 for (const AState& state : seededStates) {
56 B2DEBUG(29, "Starting with new seed...");
57
58 path.emplace_back(&state, 0);
59 traverseTree(path, relations, results);
60 path.pop_back();
61 B2ASSERT("Something went wrong during the path traversal", path.empty());
62
63 B2DEBUG(29, "... finished with seed");
64 }
65 }
ACellHolder * applyTo(const std::vector< ACellHolder * > &cellHolders, const std::vector< WeightedRelation< ACellHolder > > &cellHolderRelations) const
Applies the cellular automaton to the collection of cells and its neighborhood.
TrackFindingCDC::CellularAutomaton< AState > m_automaton
Findlet for adding a recursion cell state to the states.
void traverseTree(std::vector< TrackFindingCDC::WithWeight< const AState * > > &path, const std::vector< TrackFindingCDC::WeightedRelation< AState > > &relations, std::vector< AResult > &results)
Implementation of the traverseTree function.

◆ apply() [4/14]

void apply ( const std::vector< RecoTrack * > &  objects,
std::vector< AState > &  states 
)
final

Create states from the space points, including a reverse flag or not.

Definition at line 20 of file StateCreatorWithReversal.icc.h.

21 {
22 for (const RecoTrack* object : objects) {
23 states.emplace_back(object, m_param_reverseSeed);
24 }
25 }

◆ apply() [5/14]

void apply ( const std::vector< TrackFindingCDC::WithWeight< const AState * > > &  currentPath,
std::vector< TrackFindingCDC::WithWeight< AState * > > &  childStates 
)
final

Apply all five filters to the child states.

Definition at line 42 of file StateRejecter.icc.h.

44 {
45 B2DEBUG(29, "Starting with " << childStates.size() << " states.");
46 m_firstFilter.apply(currentPath, childStates);
47 B2DEBUG(29, "After first filter " << childStates.size() << " states.");
48 // Nothing to do anymore
49 if (childStates.size() == 0) {
50 return;
51 }
52 m_advanceFilter.apply(currentPath, childStates);
53 B2DEBUG(29, "After advance filter " << childStates.size() << " states.");
54 // Nothing to do anymore
55 if (childStates.size() == 0) {
56 return;
57 }
58 m_secondFilter.apply(currentPath, childStates);
59 B2DEBUG(29, "After second filter " << childStates.size() << " states.");
60 // Nothing to do anymore
61 if (childStates.size() == 0) {
62 return;
63 }
64 m_updateFilter.apply(currentPath, childStates);
65 B2DEBUG(29, "After update filter " << childStates.size() << " states.");
66 // Nothing to do anymore
67 if (childStates.size() == 0) {
68 return;
69 }
70 m_thirdFilter.apply(currentPath, childStates);
71 B2DEBUG(29, "After third filter " << childStates.size() << " states.");
72 };
AFilter m_updateFilter
State filter to kalman update all states.
AFilter m_secondFilter
State filter to decide which available continuations should be traversed next.
AFilter m_advanceFilter
State filter to advance all states.
AFilter m_thirdFilter
State filter to decide which available continuations should be traversed next.
AFilter m_firstFilter
State filter to decide which available continuations should be traversed next.

◆ apply() [6/14]

void apply ( const std::vector< TrackFindingCDC::WithWeight< const AState * > > &  currentPath,
std::vector< TrackFindingCDC::WithWeight< AState * > > &  childStates 
)
override

The weight is calculated using the subfilter based on the geometrical layer of the state.

Definition at line 45 of file LayerToggledApplier.icc.h.

47 {
48 const AState* previousState = currentPath.back();
49 const int layer = previousState->getGeometricalLayer();
50
51 if (layer > m_param_toggleOnLayer) {
52 m_highLayerFindlet.apply(currentPath, childStates);
53 } else if (layer == m_param_toggleOnLayer) {
54 m_equalLayerFindlet.apply(currentPath, childStates);
55 } else {
56 m_lowLayerFindlet.apply(currentPath, childStates);
57 }
58 }
AFindlet m_lowLayerFindlet
Findlet used for layers < N.
AFindlet m_highLayerFindlet
Findlet used for layers > N.
AFindlet m_equalLayerFindlet
Findlet used for layers == N.
int m_param_toggleOnLayer
On which N to toggle the layers.

◆ apply() [7/14]

void apply ( const std::vector< TrackFindingCDC::WithWeight< const AState * > > &  currentPath,
std::vector< TrackFindingCDC::WithWeight< AState * > > &  childStates 
)
override

Apply the filter to each pair of states and current path and let only pass the best N states.

Definition at line 30 of file LimitedOnStateApplier.icc.h.

32 {
33 Super::apply(currentPath, childStates);
34
35 if (m_param_useNStates > 0 and childStates.size() > static_cast<unsigned int>(m_param_useNStates)) {
36 std::sort(childStates.begin(), childStates.end(), TrackFindingCDC::LessOf<TrackFindingCDC::GetWeight>());
37 childStates.erase(childStates.begin() + m_param_useNStates, childStates.end());
38 }
39 };
int m_param_useNStates
Parameter how many objects should pass maximal.
void apply(const std::vector< TrackFindingCDC::WithWeight< const AState * > > &currentPath, std::vector< TrackFindingCDC::WithWeight< AState * > > &childStates) override
Apply the () operator to all pairs of state and current path.

◆ apply() [8/14]

void apply ( const std::vector< TrackFindingCDC::WithWeight< const AState * > > &  currentPath,
std::vector< TrackFindingCDC::WithWeight< AState * > > &  childStates 
)
override

Apply the () operator to all pairs of state and current path.

Definition at line 20 of file OnStateApplier.icc.h.

22 {
23 if (childStates.empty()) {
24 return;
25 }
26
27 for (TrackFindingCDC::WithWeight<AState*>& stateWithWeight : childStates) {
28 AState& state = *stateWithWeight;
29 const TrackFindingCDC::Weight& weight = this->operator()({currentPath, &state});
30 stateWithWeight.setWeight(weight);
31 }
32
33 TrackFindingCDC::erase_remove_if(childStates, TrackFindingCDC::HasNaNWeight());
34 };
virtual TrackFindingCDC::Weight operator()(const Object &object)
The filter operator for this class.

◆ apply() [9/14]

void apply ( std::vector< AResult > &  results)
override

Load in the reco tracks and the hits.

Store the reco tracks and the relations.

Definition at line 64 of file ResultStorer.icc.h.

65 {
66 if (not m_param_exportTracks) {
67 return;
68 }
69
70 for (const auto& result : results) {
71
72 const ROOT::Math::XYZVector& trackPosition = result.getPosition();
73 const ROOT::Math::XYZVector& trackMomentum = result.getMomentum();
74 const short& trackCharge = result.getCharge();
75
76 RecoTrack* newRecoTrack = m_outputRecoTracks.appendNew(trackPosition, trackMomentum, trackCharge);
77 result.addToRecoTrack(*newRecoTrack);
78
79 const RecoTrack* seed = result.getSeed();
80 if (not seed) {
81 continue;
82 }
83 seed->addRelationTo(newRecoTrack, m_param_writeOutDirection);
84 }
85 }
StoreArray< RecoTrack > m_outputRecoTracks
Output Reco Tracks Store Array.
bool m_param_exportTracks
Export the tracks or not.
TrackFindingCDC::EForwardBackward m_param_writeOutDirection
Direction parameter converted from the string parameters.
T * appendNew()
Construct a new T object at the end of the array.
Definition: StoreArray.h:246

◆ apply() [10/14]

void apply ( std::vector< AState > &  seedStates,
std::vector< AState > &  states,
std::vector< TrackFindingCDC::WeightedRelation< AState > > &  relations 
)
override

Apply both filters for creating state-hit and hit-hit relations.

Definition at line 57 of file CKFRelationCreator.icc.h.

60 {
61 const std::vector<AState*> seedStatePointers = TrackFindingCDC::as_pointers<AState>(seedStates);
62 const std::vector<AState*> statePointers = TrackFindingCDC::as_pointers<AState>(states);
63
64 // Just some arbitrary number...
65 relations.reserve(10000);
66
67 // relations += seed states -> states
68 TrackFindingCDC::RelationFilterUtil::appendUsing(m_seedFilter, seedStatePointers, statePointers, relations, 1000000);
69
70 // relations += states -> states
72 // only use subset of hit states for inter hit state relation creation
73 std::vector<AState*> selectedStatePointers;
74 selectedStatePointers.reserve(relations.size());
75
76 for (const auto& relation : relations) {
77 // hit state pointers are the "To"s in the relation, only take those
78 const auto it = std::find(selectedStatePointers.begin(), selectedStatePointers.end(), relation.getTo());
79 if (it == selectedStatePointers.end()) {
80 selectedStatePointers.push_back(relation.getTo());
81 }
82 }
83
85 // Reduce combinatorics a lot by only combining selectedStatePointers with other selectedStatePointers
86 TrackFindingCDC::RelationFilterUtil::appendUsing(m_hitFilter, selectedStatePointers, selectedStatePointers, relations, 1000000);
87 } else {
88 // Reduce combinatorics a bit less by only combining selectedStatePointers essentially all statePointers
89 TrackFindingCDC::RelationFilterUtil::appendUsing(m_hitFilter, selectedStatePointers, statePointers, relations, 1000000);
90 }
91 } else {
92 // use all of hit states for inter hit state relation creation
93 TrackFindingCDC::RelationFilterUtil::appendUsing(m_hitFilter, statePointers, statePointers, relations, 1000000);
94 }
95 }
bool m_onlyUseHitStatesRelatedToSeeds
Only use subset of hits already related to the seeds to reduce combinatorics as the "FromState".
ASeedRelationFilter m_seedFilter
Subfindlet for the relation checking between seed and hits.
AHitRelationFilter m_hitFilter
Subfindlet for the relation checking between hits and hits.
bool m_onlyCombineRelatedHitStates
Only use subset of hits already related to the seeds to reduce combinatorics as "FromState" and as "T...
static void appendUsing(ARelationFilter &relationFilter, const std::vector< AObject * > &froms, const std::vector< AObject * > &tos, std::vector< WeightedRelation< AObject > > &weightedRelations, unsigned int maximumNumberOfRelations=std::numeric_limits< unsigned int >::max())
Appends relations between elements in the given AItems using the ARelationFilter.

◆ apply() [11/14]

void apply ( std::vector< Object > &  results,
std::vector< Object > &  filteredResult 
)
override

For each seed, search for the best candidate and return it.

Definition at line 51 of file OverlapResolver.icc.h.

53 {
54 if (not m_param_enableOverlapResolving or results.empty()) {
55 std::swap(results, filteredResults);
56 return;
57 }
58
59 // Sort results by seed, as it makes the next operations faster
60 std::sort(results.begin(), results.end(), TrackFindingCDC::LessOf<SeedGetter>());
61
62 // resolve overlaps in each seed separately
63 const auto& groupedBySeed = TrackFindingCDC::adjacent_groupby(results.begin(), results.end(), SeedGetter());
64 for (const TrackFindingCDC::VectorRange<Object>& resultsWithSameSeed : groupedBySeed) {
65
66 m_resultsWithWeight.clear();
67 for (Object& result : resultsWithSameSeed) {
68 TrackFindingCDC::Weight weight = m_filter(result);
69 if (std::isnan(weight)) {
70 continue;
71 }
72 m_resultsWithWeight.emplace_back(&result, weight);
73 }
74
75 if (not m_resultsWithWeight.empty()) {
76 // sort results so that 'std::max' below picks path with highest weight if multiple paths have same size
77 std::sort(m_resultsWithWeight.begin(), m_resultsWithWeight.end(), TrackFindingCDC::GreaterWeight());
78
79 const unsigned int useBestNResults = std::min(m_resultsWithWeight.size(), m_param_useBestNInSeed);
80 const auto& lastItemToUse = std::next(m_resultsWithWeight.begin(), useBestNResults);
81 const auto& longestElement = *(std::max_element(m_resultsWithWeight.begin(), lastItemToUse,
82 TrackFindingCDC::LessOf<NumberOfHitsGetter>()));
83 filteredResults.push_back(*(longestElement));
84 }
85 }
86 }
std::vector< TrackFindingCDC::WithWeight< Object * > > m_resultsWithWeight
temporary results vector with weights, out of which the overlaps will be build.
typename AFilter::Object Object
The object to filter.
unsigned long m_param_useBestNInSeed
Parameter: In seed mode, use only the best seeds.
bool m_param_enableOverlapResolving
Parameter: Enable overlap.
AFilter m_filter
Subfindlet for filtering.

◆ apply() [12/14]

void apply ( std::vector< RecoTrack * > &  recoTracks)
finaloverride

Apply the findlets.

Definition at line 33 of file BaseEventTimeExtractorModule.icc.h.

34 {
35 std::vector<RecoTrack*> copiedRecoTracks = recoTracks;
36 m_trackSelector.apply(copiedRecoTracks);
37 m_findlet.apply(copiedRecoTracks);
38
39 for (RecoTrack* recoTrack : recoTracks) {
40 recoTrack->setDirtyFlag();
41 }
42 }
TrackSelector m_trackSelector
Select the tracks before applying the extraction.
AFindlet m_findlet
The findlet for the extraction.

◆ apply() [13/14]

void apply ( std::vector< RecoTrack * > &  recoTracks)
finaloverride

Timing extraction for this findlet.

Definition at line 29 of file GridEventTimeExtractor.icc.h.

30 {
31 m_wasSuccessful = false;
32
34
36
37 const double eventT0Delta = (m_param_maximalT0Value - m_param_minimalT0Value) / static_cast<double>(m_param_gridSteps);
38
39 for (unsigned int gridIndex = 0; gridIndex <= m_param_gridSteps; gridIndex++) {
40 const double eventT0Hypothesis = eventT0Delta * static_cast<double>(gridIndex) + m_param_minimalT0Value;
41
42 m_eventT0->setEventT0(EventT0::EventT0Component(eventT0Hypothesis, NAN, Const::CDC, "grid"));
44
45 for (unsigned int iteration = 0; iteration < m_param_iterations; iteration++) {
46 // The findlet will set the final event t0, but will probably not add any temporary event t0s, which is fine as we will do so.
47 m_findlet.apply(recoTracks);
48
49 if (m_findlet.wasSuccessful()) {
52 B2DEBUG(25, "Aborting because time extraction was not successful.");
53 break;
54 }
55 }
56 }
57
58 if (not m_eventT0WithQuality.empty()) {
59 m_wasSuccessful = true;
60 // Look for the best event t0 (with the smallest chi2)
61 const auto& bestChi2 = std::max_element(m_eventT0WithQuality.begin(), m_eventT0WithQuality.end(),
62 [](const auto & lhs, const auto & rhs) {
63 return lhs.quality < rhs.quality;
64 });
65 m_eventT0->setEventT0(*bestChi2);
66 } else {
67 // We have changes the event t0, so lets switch it back
69 }
70 }
StoreObjPtr< EventT0 > m_eventT0
Pointer to the storage of the eventwise T0 estimation in the data store.
bool m_wasSuccessful
Variable to show that the execution was successful.
bool m_param_abortOnUnsuccessfulStep
Parameter: abort if a single iteration is not working.
unsigned int m_param_iterations
Parameter: how many iterations should be done?
unsigned int m_param_gridSteps
Parameter: Number of grid points.
double m_param_maximalT0Value
Parameter: Maximal T0 value.
std::vector< EventT0::EventT0Component > m_eventT0WithQuality
Pool for the event t0s with chi2.
double m_param_minimalT0Value
Parameter: Minimal T0 value.
static void addEventT0WithQuality(const std::vector< RecoTrack * > &recoTracks, StoreObjPtr< EventT0 > &eventT0, std::vector< EventT0::EventT0Component > &eventT0WithQualityIndex)
Append an event-t0 value with quality information.
void resetEventT0() const
Reset the t0 value to cached value if it exists or clear it otherwise.

◆ apply() [14/14]

void apply ( std::vector< RecoTrack * > &  recoTracks)
finaloverride

Timing extraction for this findlet.

Definition at line 29 of file IterativeEventTimeExtractor.icc.h.

30 {
31 m_wasSuccessful = false;
32
34
36
37 unsigned int iteration = 0;
38 for (; iteration < m_param_maxIterations; iteration++) {
39 // The findlet will set the final event t0, but will probably not add any temporary event t0s, which is fine as we will do so.
40 m_findlet.apply(recoTracks);
41
42 bool breakLoop = false;
43 if (m_findlet.wasSuccessful()) {
44
45 if (not m_eventT0WithQuality.empty()) {
46 const double deltaT0 = std::abs(m_eventT0->getEventT0() - m_eventT0WithQuality.back().eventT0);
47 if (deltaT0 < m_param_minimalDeltaT0 and iteration >= m_param_minIterations) {
48 breakLoop = true;
49 }
50 }
53 B2DEBUG(25, "Aborting because time extraction was not successful.");
54 breakLoop = true;
55 }
56
57 if (breakLoop) {
58 break;
59 }
60 }
61
62 if (not m_eventT0WithQuality.empty() and iteration != m_param_maxIterations) {
64 m_eventT0->addTemporaryEventT0(m_eventT0WithQuality.back());
65 m_eventT0->setEventT0(m_eventT0WithQuality.back());
66 } else {
67 // Look for the best event t0 (with the smallest chi2)
68 const auto& bestEventT0 = std::max_element(m_eventT0WithQuality.begin(), m_eventT0WithQuality.end(),
69 [](const auto & lhs, const auto & rhs) {
70 return lhs.quality < rhs.quality;
71 });
72 m_eventT0->setEventT0(*bestEventT0);
73 }
74 m_wasSuccessful = true;
75 }
76 }
unsigned int m_param_maxIterations
Parameter: how many iterations should be done maximally?
bool m_param_useLastEventT0
Parameter: use the last event t0 instead of the best one.
bool m_param_abortOnUnsuccessfulStep
Parameter: abort if a single iteration is not working.
unsigned int m_param_minIterations
Parameter: how many iterations should be done minimally?
std::vector< EventT0::EventT0Component > m_eventT0WithQuality
Pool for the event t0s with chi2.

◆ arcLengthInRightDirection()

constexpr bool arcLengthInRightDirection ( double  arcLength2D,
TrackFindingCDC::EForwardBackward  forwardBackward 
)
inlineconstexpr

Given the calculated arc length between a start point and an end point, checks if the travelled path is along the given direction or not.

If the arc length distance is negative, the end point has a higher arc length value than the start point meaning it is farther away -> the travelled distance is forward. If the arc length distance is positive, it is backward.

If it is 0 or the direction is unknown, true is always returned.

Definition at line 30 of file SearchDirection.h.

31 {
32 return static_cast<double>(forwardBackward) * arcLength2D >= 0;
33 }

◆ BaseEventTimeExtractorModuleFindlet()

Add the subfindlet as listener.

Definition at line 19 of file BaseEventTimeExtractorModule.icc.h.

20 {
23 }
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.

◆ beginEvent() [1/2]

void beginEvent
overridevirtual

Clear the used clusters.

Reimplemented from ProcessingSignalListener.

Definition at line 26 of file SpacePointTagger.icc.h.

27 {
29
30 m_usedClusters.clear();
31 m_usedSpacePoints.clear();
32 }
void beginEvent() override
Receive and dispatch signal for the start of a new event.

◆ beginEvent() [2/2]

void beginEvent
overridevirtual

Create the event t0 store obj ptr.

Reimplemented from ProcessingSignalListener.

Definition at line 45 of file BaseEventTimeExtractor.icc.h.

46 {
48
49 m_wasSuccessful = false;
50
51 if (not m_eventT0.isValid()) {
52 m_eventT0.create();
53 }
54
55 m_eventT0Before = m_eventT0->getEventT0Component();
56 }
std::optional< EventT0::EventT0Component > m_eventT0Before
Storage for the event t0 before this module ran.

◆ beginRun() [1/3]

void beginRun
finalvirtual

Initialize the maximal ladder cache.

Reimplemented from ProcessingSignalListener.

Definition at line 33 of file LayerSVDRelationFilter.icc.h.

34 {
36
37 // Fill maximum number cache
38 auto& geoCache = VXD::GeoCache::getInstance();
39 const auto& layers = geoCache.getLayers(VXD::SensorInfoBase::SensorType::SVD);
40 for (const auto& layerVXDID : layers) {
41 m_maximalLadderCache[layerVXDID.getLayerNumber()] = geoCache.getLadders(layerVXDID).size();
42 }
43 }
std::map< short, unsigned long > m_maximalLadderCache
Cached number of ladders per layer.
void beginRun() override
Receive and dispatch signal for the beginning of a new run.
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214

◆ beginRun() [2/3]

void beginRun ( )
finalvirtual

Initialize the sector map.

Reimplemented from ProcessingSignalListener.

Definition at line 22 of file SectorMapBasedSVDPairFilter.cc.

23 {
25
27 if (not m_vxdtfFilters) {
28 B2FATAL("Requested secMapName '" << m_param_sectorMapName << "' does not exist!");
29 }
30 }
VXDTFFilters< point_t > * getFilters(const std::string &setupName)
Gives access to the sector map and filters of a given setup.
SectorMapFilter * m_vxdtfFilters
The sector map filter, will be set in begin run.
std::string m_param_sectorMapName
Name of the sector map to use.
FilterContainer & m_filtersContainer
The filter container to use.

◆ beginRun() [3/3]

void beginRun
overridevirtual

Receive signal for the beginning of a new run.

Reimplemented from ProcessingSignalListener.

Definition at line 61 of file LayerPXDRelationFilter.icc.h.

62 {
64
65 // use values from payload if parameter is set to -1
66 if (m_param_hitJumping == -1) {
67 if (m_ckfParameters->isValid()) {
68 m_layerJumpPtThreshold = (*m_ckfParameters)->getLayerJumpPtThreshold();
69 m_layerJumpLowPt = (*m_ckfParameters)->getLayerJumpLowPt();
70 m_layerJumpHighPt = (*m_ckfParameters)->getLayerJumpHighPt();
71 if (m_prefix == "hit" && m_layerJumpPtThreshold > 0.) {
72 // if we want to have this, some major restructure of the whole CKF code is necessary
73 // (CKF states from hits don't know anything about the seed track, i.e. you cannot access its momentum)
74 B2FATAL("pt dependence of layerJump parameter currently not implemented for hit->hit extrapolation.");
75 }
76 } else {
77 B2FATAL("Trying to read layerJump parameter from DB but payload '" << m_ckfParameters->getName() << "' not found.");
78 }
79 // we don't need all this if simple value from python config is to be used
80 } else {
84 }
85 }
double m_layerJumpPtThreshold
This are values that are actually used ('m_param_hitJumping==-1' means parameter is read from DB).
std::string m_prefix
Used to get correct payload.
int m_layerJumpLowPt
This are values that are actually used ('m_param_hitJumping==-1' means parameter is read from DB).
int m_layerJumpHighPt
This are values that are actually used ('m_param_hitJumping==-1' means parameter is read from DB).
int m_param_hitJumping
Parameter: Make it possible to jump over N layers (if set to -1, read from DB).
std::unique_ptr< DBObjPtr< CKFParameters > > m_ckfParameters
LayerJump parameter can be read from DB (use pointer as payload name contains 'prefix')

◆ calcCurvatureSignum()

short calcCurvatureSignum ( std::vector< SpacePoint const * > const &  measurements)
inline

Calculate curvature based on triplets of measurements.

Ignores uncertainties. Returns -1,0,1 depending on the sum of all triplets.

Definition at line 22 of file CalcCurvatureSignum.h.

23 {
24 if (measurements.size() < 3) return 0;
25 float sumOfCurvature = 0.;
26 for (unsigned int i = 0; i < measurements.size() - 2; ++i) {
27 B2Vector3D ab = measurements.at(i + 1)->getPosition() - measurements.at(i)->getPosition();
28 ab.SetZ(0.);
29 B2Vector3D bc = measurements.at(i + 2)->getPosition() - measurements.at(i + 1)->getPosition();
30 bc.SetZ(0.);
31 sumOfCurvature += bc.Orthogonal() * ab; //normal vector of m_vecBC times segment of ba
32 }
33 // signum
34 return (0 < sumOfCurvature) - (sumOfCurvature < 0);
35 }
DataType at(unsigned i) const
safe member access (with boundary check!)
Definition: B2Vector3.h:751

◆ calculateCovMatrix()

const Eigen::Matrix< double, Ndims, Ndims, Eigen::RowMajor > calculateCovMatrix ( std::array< std::vector< double >, Ndims >  inputData)

calculates the empirical covariance matrix from the inputData.

Parameters
inputDatadata "matrix", where each vector represents a column in the n x Ndims matrix, where n is the number of samples in the input data.

NOTE: if the input does not consist of an array of same-length vectors an error message is issued and the Ndims x Ndims identity matrix is returned.

Implements the calculation of the empirical covariance matrix: $\frac{1}{n} \sum_{i=1}^n (y_i - \bar{y})^T(y_i - \bar{y})$, where $ \bar{y}_i = \sum_{j=1}^n x_{ij}$ is the mean (row) vector containing the mean value of every "feature" in the data. Every (random) vector $y_i$ is a row vector containing one measurement.

Definition at line 37 of file DecorrelationMatrixHelper.h.

38 {
39 // typedefs used in function
40 using RVector = Eigen::Matrix<double, 1, Ndims, Eigen::RowMajor>; // typedef for row vector type of one measurement
41 using DMatrix = Eigen::Matrix<double, Eigen::Dynamic, Ndims, Eigen::ColMajor>; // typedef for dataMatrix type
42 using DVector = Eigen::Matrix<double, Eigen::Dynamic, 1>; // typedef for column vector in dataMatrix
43
44 // check if the inputData represent a "full" data matrix
45 size_t nSamples = inputData[0].size();
46 for (size_t i = 1; i < Ndims; ++i) {
47 if (inputData[i].size() != nSamples) {
48 B2ERROR("The input data is no MxN matrix, cannot calculate covariance matrix! Returning identity");
49 return Eigen::Matrix<double, Ndims, Ndims, Eigen::RowMajor>::Identity();
50 }
51 }
52
53 // calculate the mean of every column and store them in a row vector
54 RVector meanVector{};
55 for (size_t i = 0; i < Ndims; ++i) {
56 meanVector(i) = std::accumulate(inputData[i].begin(), inputData[i].end(), 0.0) / inputData[i].size();
57 }
58
59 // map the data to a more easily accessible Eigen::Matrix where each row is one measurement (consisting of Ndims values)
60 DMatrix dataMatrix(nSamples, Ndims);
61 for (size_t i = 0; i < Ndims; ++i) {
62 dataMatrix.col(i) = Eigen::Map<const DVector>(inputData[i].data(), inputData[i].size());
63 }
64
65 // define a matrix where each row holds the mean vector to be able to subtract the mean value from each column directly
66 DMatrix meanMatrix(nSamples, Ndims);
67 for (size_t i = 0; i < Ndims; ++i) {
68 meanMatrix.col(i) = DVector::Ones(nSamples) * meanVector(i);
69 }
70
71 // calculate the cov matrix as product of dataMatrix reduced by meanValues in order to (hopefully) utilize Eigens optimizations
72 // COULDDO: test if this can be accelerated by splitting the process in smaller matrices
73 return (dataMatrix - meanMatrix).transpose() * (dataMatrix - meanMatrix) / (nSamples);
74 }

◆ calculateDecorrMatrix()

void calculateDecorrMatrix ( std::array< std::vector< double >, Ndims >  inputData,
bool  normalise = true 
)

calculate the transformation matrix that when applied to the input data yields linearly uncorrelated data.

Parameters
inputDatainput data, where each vector represents a column in the MxNdims matrix, where M is the number of samples in in the input data
normaliseif set to true the covariance matrix of the transformed data will be identity, else it will only be diagonal

Definition at line 98 of file DecorrelationMatrix.h.

99 {
100 calculateDecorrMatrix(calculateCovMatrix(inputData), normalise);
101 }
const Eigen::Matrix< double, Ndims, Ndims, Eigen::RowMajor > calculateCovMatrix(std::array< std::vector< double >, Ndims > inputData)
calculates the empirical covariance matrix from the inputData.
void calculateDecorrMatrix(std::array< std::vector< double >, Ndims > inputData, bool normalise=true)
calculate the transformation matrix that when applied to the input data yields linearly uncorrelated ...

◆ checkResizeClear()

void checkResizeClear ( std::vector< T > &  vectorToCheck,
uint  limit 
)

Check capacity of a vector and create a fresh one if capacity too large If the capacity of a std::vector is very large without being used, it just allocates RAM for no reason, increasing the RAM usage unnecessarily.

In this case, start with a fresh one. Since std::vector.shrink() or std::vector.shrink_to_fit() not necessarily reduce the capacity in the desired way, create a temporary vector of the same type, swap them to use the vector at the new location afterwards, and clear the tempoary vector.

Definition at line 23 of file Helpers.h.

24 {
25
26 if (vectorToCheck.capacity() > limit) {
27 B2DEBUG(29, "Capacity of vector too large, create fresh vector and swap.");
28 std::vector<T> tmp;
29 std::swap(vectorToCheck, tmp);
30 tmp.clear();
31 }
32 vectorToCheck.clear();
33 vectorToCheck.reserve(limit / 4);
34 }

◆ CKFRelationCreator()

Construct this findlet and add the subfindlet as listener.

Definition at line 27 of file CKFRelationCreator.icc.h.

27 : Super()
28 {
31 }
TrackFindingCDC::Findlet< AState, AState, TrackFindingCDC::WeightedRelation< AState > > Super
The parent class.

◆ constructMeasurementsOnPlane()

std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane ( const genfit::StateOnPlane &  state) const
overridevirtual

Construct the measurement on the plane set in the parent element.

Do the job: construct a measurement based on the estimator chosen by the parameters.

TODO: Implement better error handling and a smarter cut.

Definition at line 122 of file PlanarVXDMomentumMeasurement.h.

124 {
125 const VXDMomentumEstimation<HitType>& momentumEstimator = VXDMomentumEstimation<HitType>::getInstance();
126 const VXDMomentumEstimationTools<HitType>& momentumEstimationTools = VXDMomentumEstimationTools<HitType>::getInstance();
127
128 TVectorD rawHitCoordinates(1);
129 TMatrixDSym rawHitCovariance(1);
130
131 // Copy the information from the current state
132 const B2Vector3D& statePosition(state.getPos());
133 const B2Vector3D& stateMomentum(state.getMom());
134 short stateCharge = state.getCharge();
135
136
137 // Copy the information from the reco track.
138 const B2Vector3D& trackPosition(m_recoTrack->getPositionSeed());
139 const B2Vector3D& trackMomentum(m_recoTrack->getMomentumSeed());
140 short trackCharge = m_recoTrack->getChargeSeed();
141
142 // Copy the information from the mc particle (if there is one)
143 MCParticle* relatedMCParticle = m_hit->template getRelated<MCParticle>("MCParticles");
144
145 ROOT::Math::XYZVector mcMomentum;
146 ROOT::Math::XYZVector mcPosition;
147 short mcCharge;
148
149 if (relatedMCParticle == nullptr) {
150 mcMomentum = ROOT::Math::XYZVector(trackMomentum);
151 mcPosition = ROOT::Math::XYZVector(trackPosition);
152 mcCharge = trackCharge;
153 } else {
154 mcMomentum = relatedMCParticle->getMomentum();
155 mcPosition = relatedMCParticle->getProductionVertex();
156 mcCharge = relatedMCParticle->getCharge();
157 }
158
159 // Copy information from the mc hit
160 const ROOT::Math::XYZVector& hitMCMomentum = momentumEstimationTools.getEntryMomentumOfMCParticle(*m_hit);
161 const ROOT::Math::XYZVector& hitMCPosition = momentumEstimationTools.getEntryPositionOfMCParticle(*m_hit);
162
163
164 if (m_useThickness) {
165 rawHitCoordinates(0) = momentumEstimator.estimateQOverPWithThickness(*m_hit, stateCharge, m_fitParameters,
167 } else {
168 if (m_useTrackingSeeds) {
169 if (m_useMCInformation) {
170 rawHitCoordinates(0) = momentumEstimator.estimateQOverP(*m_hit, mcMomentum, mcPosition, mcCharge,
173
174 } else {
175 rawHitCoordinates(0) = momentumEstimator.estimateQOverP(*m_hit, ROOT::Math::XYZVector(trackMomentum),
176 ROOT::Math::XYZVector(trackPosition), trackCharge,
179 }
180 } else {
181 if (m_useMCInformation) {
182 rawHitCoordinates(0) = momentumEstimator.estimateQOverP(*m_hit, hitMCMomentum, hitMCPosition, stateCharge,
185 } else {
186 rawHitCoordinates(0) = momentumEstimator.estimateQOverP(*m_hit, ROOT::Math::XYZVector(stateMomentum),
187 ROOT::Math::XYZVector(statePosition), stateCharge,
190 }
191 }
192 }
193
194 rawHitCovariance(0, 0) = m_sigma;
195
196 genfit::MeasurementOnPlane* mop = new genfit::MeasurementOnPlane(rawHitCoordinates, rawHitCovariance,
197 state.getPlane(), state.getRep(), constructHMatrix(state.getRep()));
198 return {mop};
199 }
virtual const genfit::AbsHMatrix * constructHMatrix(const genfit::AbsTrackRep *rep) const override
Construct the QP matrix.
VXDMomentumEstimation< HitType >::CorrectionFitParameters m_correctionFitParameters
Parameters for the correction function.
bool m_useMCInformation
Use the seeds of the track finder or the seeds of the MC particles.
const RecoTrack * m_recoTrack
RecoTrack for which the hit is created.
bool m_useTrackingSeeds
Use the tracking seeds in the origin for calculating the path length rather than the current state.
VXDMomentumEstimation< HitType >::FitParameters m_fitParameters
Parameters for the main function.
double m_sigma
Value of the measurement sigma.
bool m_useThickness
Use the thickness of the clusters of the path length for estimating dX.
ROOT::Math::XYZVector getPositionSeed() const
Return the position seed stored in the reco track. ATTENTION: This is not the fitted position.
Definition: RecoTrack.h:480
short int getChargeSeed() const
Return the charge seed stored in the reco track. ATTENTION: This is not the fitted charge.
Definition: RecoTrack.h:508
ROOT::Math::XYZVector getMomentumSeed() const
Return the momentum seed stored in the reco track. ATTENTION: This is not the fitted momentum.
Definition: RecoTrack.h:487
static const VXDMomentumEstimationTools & getInstance()
Use this class as singleton.
static const VXDMomentumEstimation & getInstance()
Use this class as a singleton.
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:516

◆ convertFloatToInt()

long convertFloatToInt ( double  value,
int  power 
)
inline

Convert float or double to long int for more similarity to the FPGA implementation.

Parameters
valueto be converted
powermultiply value by 10^power

Definition at line 21 of file DATCONHelpers.h.

22 {
23 long factor = (long)pow(10, power);
24 return round(factor * value);
25 }

◆ convertNetworkPath()

SpacePointTrackCand convertNetworkPath ( NetworkPath  networkPath)
inline

Create new SPTC from network path.

Definition at line 24 of file NetworkPathConversion.h.

25 {
26 std::vector <const SpacePoint*> spVector;
27 spVector.reserve(networkPath.size());
28 if (networkPath.empty()) {
29 return SpacePointTrackCand();
30 }
31
32 auto family = networkPath[0]->getFamily();
33 for (auto aNodeIt = networkPath.rbegin(); aNodeIt != networkPath.rend(); ++aNodeIt) {
34 insertSpacePoints(spVector, (*aNodeIt)->getEntry());
35 }
36
37 auto sptc = SpacePointTrackCand(spVector);
38 sptc.setFamily(family);
39 return sptc;
40 }

◆ convertToEigen() [1/2]

Eigen::Matrix< double, NRows, NCols, Eigen::RowMajor > convertToEigen ( const AMatrix &  matrix)

Convert a ROOT matrix to Eigen. Checks for the correct row and column number.

Definition at line 21 of file EigenHelper.h.

22 {
23 B2ASSERT("Matrix should be in the form " << NRows << "x" << NCols << ", not " << matrix.GetNrows() << "x" << matrix.GetNcols(),
24 matrix.GetNcols() == NCols and matrix.GetNrows() == NRows);
25 return Eigen::Matrix<double, NRows, NCols, Eigen::RowMajor>(matrix.GetMatrixArray());
26 };

◆ convertToEigen() [2/2]

Eigen::Matrix< double, NRows, 1 > convertToEigen ( const TVectorD &  matrix)

Convert a ROOT matrix to Eigen - TVector specialisation. Checks for the correct row number.

Definition at line 30 of file EigenHelper.h.

31 {
32 B2ASSERT("Matrix should be in the form " << NRows << "x" << 1 << ", not " << matrix.GetNrows() << "x" << 1,
33 matrix.GetNrows() == NRows);
34 return Eigen::Matrix<double, NRows, 1>(matrix.GetMatrixArray());
35 };

◆ createMap()

i2dMap createMap ( int  nEntries,
Functor  funct 
)

create a multimap with

Parameters
nEntriesentries.
functFunction object which values are used to determine the keys by the return value of funct.operator() NOTE: funct.operator has to take an int and return a double

Definition at line 52 of file mapHelperFunctions.cc.

53 {
54 i2dMap map;
55 for (int i = 0; i < nEntries; ++i) {
56 map.insert(std::make_pair(i, funct.operator()(i)));
57 }
58 return map;
59 }

◆ createMultiMap()

i2dMultiMap createMultiMap ( int  nEntries,
Functor  funct 
)

create a multimap with

Parameters
nEntriesentries.
functFunction object which values are used to determine the keys by the return value of funct.operator() NOTE: funct.operator has to take an int and return a double

Definition at line 37 of file mapHelperFunctions.cc.

38 {
39 i2dMultiMap map;
40 for (int i = 0; i < nEntries; ++i) {
41 map.insert(std::make_pair((i % 6), funct.operator()(i)));
42 }
43 return map;
44 }

◆ createPurityInfos() [1/2]

static std::vector< Belle2::MCVXDPurityInfo > createPurityInfos ( const SPContainer &  container)
static
  • create a vector of MCVXDPurityInfos objects for any given container holding SpacePoints and providing a getHits() method each MCParticle that is in the container gets its own object NOTE: negative MCParticleIds are possible und used as follows:
  • -1 -> there was a TrueHit (i.e. Cluster) related to a SpacePoint in the container that did not have relation to a MCParticle
  • -2 -> there was a SpacePoint with a Cluster that was not related to a TrueHit (noise Cluster)
    Returns
    sorted vector of MCVXDPurityInfo (sorted by overall purity)
    wrapper taking a const reference instead of a const pointer for use in e.g. C++11 for loops

Definition at line 218 of file PurityCalculatorTools.h.

219 {
220 return createPurityInfos(&container);
221 }

◆ createPurityInfos() [2/2]

static std::vector< Belle2::MCVXDPurityInfo > createPurityInfos ( const SPContainer *  container)
static

create a vector of MCVXDPurityInfos objects for any given container holding SpacePoints and providing a getHits() method each MCParticle that is in the container gets its own object NOTE: negative MCParticleIds are possible und used as follows:

Definition at line 202 of file PurityCalculatorTools.h.

203 {
204 return createPurityInfosVec(container->getHits());
205 }

◆ createPurityInfosVec()

static std::vector< Belle2::MCVXDPurityInfo > createPurityInfosVec ( const std::vector< const Belle2::SpacePoint * > &  spacePoints)
static

create a vector of MCVXDPurityInfos objects for a std::vector<Belle2::SpacePoints>.

each MCParticle that is in the vector gets its own object NOTE: negative MCParticleIds are possible and used as follows:

Definition at line 149 of file PurityCalculatorTools.h.

150 {
151 std::array<unsigned, 3> totalClusters = { {0, 0, 0 } };
152 // WARNING: relying on the fact here that all array entries will be initialized to 0
153 std::unordered_map<int, std::array<unsigned, 3> > mcClusters;
154
155 unsigned nClusters = 0; // NOTE: only needed for DEBUG output -> remove?
156
157 for (const Belle2::SpacePoint* spacePoint : spacePoints) {
158 B2DEBUG(29, "Now processing SpacePoint " << spacePoint->getArrayIndex() << " from Array " << spacePoint->getArrayName());
159 increaseClusterCounters(spacePoint, totalClusters);
160
161 nClusters += spacePoint->getNClustersAssigned();
162
163 std::vector<std::pair<int, double> > mcParticles;
164 if (spacePoint->getType() == VXD::SensorInfoBase::PXD) mcParticles = getMCParticles<PXDTrueHit>(spacePoint);
165 else if (spacePoint->getType() == VXD::SensorInfoBase::SVD) mcParticles = getMCParticles<SVDTrueHit>(spacePoint);
166 else if (spacePoint->getType() == VXD::SensorInfoBase::VXD) {B2DEBUG(25, "found generic spacePoint, treating it as virtualIP");}
167 else B2FATAL("Unknown DetectorType (" << spacePoint->getType() << ") in createPurityInfos! Skipping this SpacePoint " <<
168 spacePoint->getArrayIndex() << " from Array " << spacePoint->getArrayName());
169
170 for (const std::pair<int, double>& particle : mcParticles) {
171 std::vector<size_t> accessors = getAccessorsFromWeight(particle.second);
172 for (size_t acc : accessors) {
173 mcClusters[particle.first][acc]++;
174 }
175 }
176 }
177 B2DEBUG(29, "container contained " << spacePoints.size() << " SpacePoint with " << nClusters << " Clusters");
178
179 // create MCVXDPurityInfos and add them to the return vector
180 std::vector<Belle2::MCVXDPurityInfo> purityInfos;
181 for (int mcId : getUniqueKeys(mcClusters)) {
182 // cppcheck-suppress useStlAlgorithm
183 purityInfos.push_back(MCVXDPurityInfo(mcId, totalClusters, mcClusters[mcId]));
184 }
185
186 // sort in descending order before return
187 std::sort(purityInfos.begin(), purityInfos.end(),
188 [](const MCVXDPurityInfo & left, const MCVXDPurityInfo & right) { return left > right; }
189 );
190 return purityInfos;
191 }
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Definition: SpacePoint.h:42
std::vector< typename MapType::key_type > getUniqueKeys(const MapType &aMap)
get the unique keys of a map (i.e.
static std::vector< size_t > getAccessorsFromWeight(double weight)
convert the relation weight (SpacePoint <-> TrueHit) to a type that can be used to access arrays
static void increaseClusterCounters(const Belle2::SpacePoint *spacePoint, std::array< unsigned, 3 > &clusterCtr)
increase the appropriate Cluster counter by asking the SpacePoint which type he has and which Cluster...

◆ decorrelate() [1/3]

std::vector< double > decorrelate ( const std::array< double, Ndims > &  inputs) const

"decorrelate" one measurement (i.e.

apply the transformation that has previously been determined).

Definition at line 136 of file DecorrelationMatrix.h.

137 {
138 return decorrelate(std::vector<double>(input.begin(), input.end()));
139 }
std::vector< double > decorrelate(const std::vector< double > &inputVec) const
"decorrelate" one measurement (i.e.

◆ decorrelate() [2/3]

std::array< std::vector< double >, Ndims > decorrelate ( const std::array< std::vector< double >, Ndims > &  inputMat) const

decorrelate M measurements (i.e.

apply the transformation that has previously been determined). NOTE: the transformation has to be calculated prior to the call of this function!

Definition at line 143 of file DecorrelationMatrix.h.

144 {
145 using DVector = Eigen::Matrix<double, Eigen::Dynamic, 1, Eigen::ColMajor>;
146 using DMatrix = Eigen::Matrix<double, Eigen::Dynamic, Ndims, Eigen::ColMajor>;
147
148 size_t nSamples = inputMat[0].size();
149 DMatrix dataMatrix(nSamples, Ndims);
150 for (size_t i = 0; i < Ndims; ++i) {
151 dataMatrix.col(i) = Eigen::Map<const DVector>(inputMat[i].data(), inputMat[i].size());
152 }
153
154 DMatrix transform = dataMatrix * m_matrix;
155
156 std::array<std::vector<double>, Ndims> output;
157 for (size_t i = 0; i < Ndims; ++i) {
158 output[i] = std::vector<double>(transform.col(i).data(), transform.col(i).data() + transform.col(i).size());
159 }
160
161 return output;
162 }
MatrixT m_matrix
internal matrix holding the data

◆ decorrelate() [3/3]

std::vector< double > decorrelate ( const std::vector< double > &  inputVec) const

"decorrelate" one measurement (i.e.

apply the transformation that has previously been determined).

Definition at line 125 of file DecorrelationMatrix.h.

126 {
127 using RVector = Eigen::Matrix<double, 1, Ndims, Eigen::RowMajor>;
128 Eigen::Map<const RVector> input(inputVec.data(), Ndims);
129
130 const RVector transform = input * m_matrix;
131
132 return std::vector<double>(transform.data(), transform.data() + transform.size());
133 }

◆ exposeParameters() [1/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
finalvirtual

Expose the parameters of the subfindlet.

Reimplemented from Findlet< AState, AState, TrackFindingCDC::WeightedRelation< AState > >.

Definition at line 34 of file CKFRelationCreator.icc.h.

36 {
37 m_seedFilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("seed", prefix));
38 m_hitFilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("hit", prefix));
39
40 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "onlyUseHitStatesRelatedToSeeds"),
42 "Only use hit states related to seed states to build the inter hit relations to reduce combinatorics. "\
43 "By default, only the \"FromStates\" will be the ones related to seeds. If also the \"ToStates\" should be "\
44 "related to the seeds, also m_onlyCombineRelatedHitStates (name in Python: " + \
45 TrackFindingCDC::prefixed(prefix, "onlyCombineRelatedHitStates") + ") should be set to true.",
47 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "onlyCombineRelatedHitStates"),
49 "Only use hit states related to seed states to build the inter hit relations to reduce combinatorics. "\
50 "If true, both \"FromStates\" and \"ToStates\" will be those that are already related to seeds. "\
51 "Only works if also m_onlyUseHitStatesRelatedToSeeds (name in Python: " + \
52 TrackFindingCDC::prefixed(prefix, "onlyUseHitStatesRelatedToSeeds") + ") is set to true.",
54 }

◆ exposeParameters() [2/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
finalvirtual

Expose parameters of the subfilters and the layer to change.

Reimplemented from Findlet< const TrackFindingCDC::WithWeight< const AState * >, TrackFindingCDC::WithWeight< AState * > >.

Definition at line 31 of file LayerToggledApplier.icc.h.

33 {
34 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "toggleOnLayer"),
35 m_param_toggleOnLayer, "Where to toggle between low, equal and high filter",
37
38 m_highLayerFindlet.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(prefix, "high"));
39 m_equalLayerFindlet.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(prefix, "equal"));
40 m_lowLayerFindlet.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(prefix, "low"));
41 }

◆ exposeParameters() [3/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
finalvirtual

Expose the parameters of the subfindlet.

Reimplemented from Findlet< AFilter::Object, AFilter::Object >.

Definition at line 36 of file OverlapResolver.icc.h.

37 {
38 m_filter.exposeParameters(moduleParamList, prefix);
39
40 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "enableOverlapResolving"),
42 "Enable the overlap resolving.",
44 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "useBestNInSeed"),
46 "In seed mode, use only the best seeds.",
48 }

◆ exposeParameters() [4/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
finalvirtual

Expose the parameters.

Reimplemented from Findlet< AIOTypes >.

Definition at line 28 of file StateCreatorWithReversal.icc.h.

29 {
30 moduleParamList->addParameter("reverseSeed",
32 "Reverse the seed.");
33 }

◆ exposeParameters() [5/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
finalvirtual

Expose the parameters of the subfindlet.

Reimplemented from Findlet< const TrackFindingCDC::WithWeight< const AState * >, TrackFindingCDC::WithWeight< AState * > >.

Definition at line 32 of file StateRejecter.icc.h.

33 {
34 m_firstFilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("first", prefix));
35 m_advanceFilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("advance", prefix));
36 m_secondFilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("second", prefix));
37 m_updateFilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("update", prefix));
38 m_thirdFilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("third", prefix));
39 };

◆ exposeParameters() [6/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
finalvirtual

Expose the parameters of the subfindlet.

Reimplemented from Findlet< const AState, AState, const TrackFindingCDC::WeightedRelation< AState >, AResult >.

Definition at line 32 of file TreeSearcher.icc.h.

33 {
34 m_stateRejecter.exposeParameters(moduleParamList, prefix);
35
36 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "endEarly"), m_param_endEarly,
37 "Make it possible to have all subresults in the end result vector.",
39 }
AStateRejecter m_stateRejecter
State rejecter to decide which available continuations should be traversed next.
bool m_param_endEarly
Parameter: Make it possible to have all subresults in the end results vector.

◆ exposeParameters() [7/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
finalvirtual

Expose the parameters of the filter.

Reimplemented from Filter< AObject >.

Definition at line 122 of file LayerSVDRelationFilter.icc.h.

123 {
124 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "hitJumping"), m_param_hitJumping,
125 "Make it possible to jump over N layers.", m_param_hitJumping);
126
127 m_filter.exposeParameters(moduleParamList, prefix);
128 m_prefilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("pre", prefix));
129 }
int m_param_hitJumping
Parameter: Make it possible to jump over N layers.
APrefilter m_prefilter
Loose pre-filter to reject possibleTos.
AFilter m_filter
Filter for rejecting the states.

◆ exposeParameters() [8/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
finalvirtual

Expose the parameters of the filter.

Reimplemented from Filter< AObject >.

Definition at line 32 of file SectorMapBasedSVDPairFilter.cc.

33 {
34 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "sectorMapName"), m_param_sectorMapName,
35 "Name of the sector map to use.", m_param_sectorMapName);
36 }

◆ exposeParameters() [9/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
override

Expose the direction parameter.

Definition at line 71 of file NonIPCrossingStateFilter.icc.h.

72 {
73 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "direction"), m_param_directionAsString,
74 "The direction where the extrapolation will happen.");
75 }
std::string m_param_directionAsString
Parameter for the distance given to the framework (can not handle EForwardBackward directly)

◆ exposeParameters() [10/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
overridevirtual

Expose the parameters of the subfindlet.

Reimplemented from Findlet< const TrackFindingCDC::WithWeight< const AState * >, TrackFindingCDC::WithWeight< AState * > >.

Definition at line 48 of file LimitedOnStateApplier.icc.h.

49 {
50 m_filter.exposeParameters(moduleParamList, prefix);
51
52 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "useNStates"), m_param_useNStates, "Only use the best N states",
54 };
AFilter m_filter
Filter to decide on the states.

◆ exposeParameters() [11/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
overridevirtual

Expose the parameters of the sub findlets.

Reimplemented from Findlet< AResult >.

Definition at line 25 of file ResultStorer.icc.h.

26 {
27 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "exportTracks"), m_param_exportTracks,
28 "Export the result tracks into a StoreArray.",
30
31 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "outputRecoTrackStoreArrayName"),
33 "StoreArray name of the output Track Store Array.");
34 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "outputRelationRecoTrackStoreArrayName"),
36 "StoreArray name of the tracks, the output reco tracks should be related to.");
37
38 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "writeOutDirection"),
40 "Write out the relations with the direction of the VXD part as weight");
41 }
std::string m_param_outputRelationRecoTrackStoreArrayName
StoreArray name of the tracks, the output reco tracks should be related to.
std::string m_param_writeOutDirectionAsString
Parameter for the distance given to the framework (can not handle EForwardBackward directly)
std::string m_param_outputRecoTrackStoreArrayName
StoreArray name of the output Track Store Array.

◆ exposeParameters() [12/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
overridevirtual

Expose the parameters of the findlet.

Reimplemented from Findlet< AIOTypes >.

Definition at line 36 of file SpacePointTagger.icc.h.

38 {
39 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "singleClusterLevel"),
41 "Mark SP as used, if the share a single cluster with the results, or if they "
42 "share a whole SP.",
44 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "markUsedSpacePoints"),
46 "Mark used space points as assigned.",
48 }

◆ exposeParameters() [13/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
overridevirtual

Expose the parameters of the filter.

Reimplemented from Filter< AObject >.

Definition at line 34 of file LayerPXDRelationFilter.icc.h.

35 {
36 // use value from DB if parameter is set to -1
37 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "hitJumping"), m_param_hitJumping,
38 "Make it possible to jump over N layers.", m_param_hitJumping);
39
40 m_filter.exposeParameters(moduleParamList, prefix);
41 m_prefilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("pre", prefix));
42
43 m_prefix = prefix;
44 }
APrefilter m_prefilter
Loose pre-filter to reject possibleTos.
AFilter m_filter
Filter for rejecting the states.

◆ exposeParameters() [14/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
overridevirtual

Expose our parameters to the super module.

Reimplemented from Findlet< AIOTypes... >.

Reimplemented in IterativeEventTimeExtractor< AFindlet >, IterativeEventTimeExtractor< Chi2BasedEventTimeExtractor >, IterativeEventTimeExtractor< DriftLengthBasedEventTimeExtractor >, Chi2BasedEventTimeExtractor, FullGridChi2TrackTimeExtractor, FullGridDriftLengthTrackTimeExtractor, GridEventTimeExtractor< AFindlet >, GridEventTimeExtractor< Belle2::Chi2BasedEventTimeExtractor >, GridEventTimeExtractor< Belle2::DriftLengthBasedEventTimeExtractor >, HitBasedT0Extractor, IterativeChi2BasedEventTimeExtractor, and IterativeDriftLengthBasedEventTimeExtractor.

Definition at line 27 of file BaseEventTimeExtractor.icc.h.

28 {
29 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "overwriteExistingEstimation"),
31 "Is it fine to overwrite the current EventT0?",
33
34 Super::exposeParameters(moduleParamList, prefix);
35 }
bool m_param_overwriteExistingEstimation
Parameter if it is fine to overwrite the current EventT0.
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Forward prefixed parameters of this findlet to the module parameter list.
Definition: Findlet.h:69

◆ exposeParameters() [15/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
overridevirtual

Expose the parameters.

Reimplemented from BaseEventTimeExtractor< RecoTrack * >.

Definition at line 79 of file IterativeEventTimeExtractor.icc.h.

80 {
81 Super::exposeParameters(moduleParamList, prefix);
82
83 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "maxIterations"),
85 "How many iterations should be done maximally?",
87 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "minIterations"),
89 "How many iterations should be done minimally?",
91 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "minimalDeltaT0"),
93 "What is the final precision?",
95 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "useLastEventT0"),
97 "Use the last event t0 instead of the best one.",
99 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "abortOnUnsuccessfulStep"),
101 "Abort on a single unsuccessful step. Otherwise, the success is defined by the last step",
103
104 m_findlet.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("sub", prefix));
105 }
double m_param_minimalDeltaT0
Parameter: What is the final precision?
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose our parameters to the super module.

◆ exposeParameters() [16/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
finaloverridevirtual

Expose our parameters to the super module.

Reimplemented from Findlet< RecoTrack * >.

Definition at line 26 of file BaseEventTimeExtractorModule.icc.h.

27 {
28 m_trackSelector.exposeParameters(moduleParamList, prefix);
29 m_findlet.exposeParameters(moduleParamList, prefix);
30 }

◆ exposeParameters() [17/17]

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
finaloverridevirtual

Expose the parameters.

Reimplemented from BaseEventTimeExtractor< RecoTrack * >.

Definition at line 73 of file GridEventTimeExtractor.icc.h.

74 {
75 Super::exposeParameters(moduleParamList, prefix);
76
77 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "iterations"),
79 "How many iterations should be done?",
81 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "abortOnUnsuccessfulStep"),
83 "Abort on a single unsuccessful step. Otherwise, the success is defined by the last step",
85 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "maximalT0Value"),
87 "Maximal Grid Value of the T0 extraction",
89 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "minimalT0Value"),
91 "Maximal Grid Value of the T0 extraction",
93 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "gridSteps"),
95 "Number of steps in the grid",
97
98 m_findlet.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("sub", prefix));
99 }

◆ fillInterceptList()

void fillInterceptList ( StoreArray< aIntercept > *  listToBeFilled,
const StoreArray< RecoTrack > &  trackList,
RelationArray recoTrackToIntercepts 
)

Fill the list of PXD intecepts corresponding to the list of track candidates.

Definition at line 26 of file VXDInterceptor.templateDetails.h.

29 {
30 for (int i = 0; i < trackList.getEntries(); ++i) { //loop over all tracks
31
32 B2DEBUG(20, " %%%%% track candidate Nr. : " << i + 1);
33
34 if (! trackList[i] ->wasFitSuccessful()) {
35 B2DEBUG(20, "%%%%% Fit not successful! discard this RecoTrack");
36 continue;
37 }
38
39 // extrapolate track to cylinders (VXD layers)
40 for (unsigned int layer = 0; layer < m_layerRadii.size(); layer++) {
41 const unsigned int layerOffset = (m_detector == VXD::SensorInfoBase::SVD ? 3 : 1);
42
43 B2DEBUG(20, " .fill intercept List, Layer: " << layer + layerOffset);
44 // if this ROI / intercept finding is for DQM, only extrapolate backwards, starting from first hit
45 // if it's for actual ROI finding (or any other case), extrapolate in both directions, once starting
46 // from the first hit extrapolating backwards, and once starting from the last hit extrapolating forwards
47 for (short direction : (m_ForDQM ? c_backwards : c_both)) {
48 std::list<ROIDetPlane> selectedPlanes;
49 genfit::MeasuredStateOnPlane gfTrackState;
50 switch (direction) {
51 case -1:
52 gfTrackState = trackList[i]->getMeasuredStateOnPlaneFromFirstHit();
53 break;
54 case 1:
55 gfTrackState = trackList[i]->getMeasuredStateOnPlaneFromLastHit();
56 gfTrackState.setPosMom(gfTrackState.getPos(), -gfTrackState.getMom());
57 gfTrackState.setChargeSign(-gfTrackState.getCharge());
58 break;
59 default:
60 break;
61 }
62
63 try {
64 gfTrackState.extrapolateToCylinder(m_layerRadii[layer]);
65 } catch (...) {
66 B2DEBUG(20, " .-extrapolation to cylinder failed");
67 continue;
68 }
69
70 B2DEBUG(20, " ..append selected planes, position " << gfTrackState.getPos().X() << ", " << gfTrackState.getPos().Y() << ", " <<
71 gfTrackState.getPos().Z());
72
73 m_theROIGeometry.appendSelectedPlanes(&selectedPlanes, ROOT::Math::XYZVector(gfTrackState.getPos()), layer + layerOffset);
74 B2DEBUG(20, " ...append intercepts for track " << i << "\n"\
75 " ...the size of the selectedPlanes : " << selectedPlanes.size() << "\n"\
76 " ...extrapolating in direction " << direction << " (-1 for backwards from first hit, +1 for forwards from last hit)");
77 appendIntercepts(interceptList, selectedPlanes, gfTrackState, i, recoTrackToIntercepts);
78 }
79
80 } //loop on layers
81 } //loop on the track list
82
83 } //fillInterceptList
void appendSelectedPlanes(std::list< ROIDetPlane > *selectedPlanes, ROOT::Math::XYZVector recoTrackPosition, int layer)
Append to selectedPlanes those in the internal list for which a sensor is near the RecoTrack position...
Definition: ROIGeometry.cc:72
int getEntries() const
Get the number of objects in the array.
Definition: StoreArray.h:216
ROIGeometry m_theROIGeometry
the geometry of the Region Of Interest
std::vector< float > m_layerRadii
Vector containing the radii of the layer, filled in the constructor.
const std::vector< short > c_both
vector for both backward and forward extrapolation
const std::vector< short > c_backwards
define two arrays for directions of extrapolation with -1 for backwards and +1 for forwards vector fo...
bool m_ForDQM
ROI finding for DQM or for data reduction.
VXD::SensorInfoBase::SensorType m_detector
The detector we are creating intercepts for.
void appendIntercepts(StoreArray< aIntercept > *interceptList, std::list< ROIDetPlane > planeList, genfit::MeasuredStateOnPlane state, int recoTrackIndex, RelationArray *recoTrackToIntercepts)
Append the Intercept infos related to the track theTrack to the listToBeFilled.

◆ fillRoiIDList()

void fillRoiIDList ( StoreArray< aIntercept > *  listOfIntercepts,
StoreArray< ROIid > *  ROIidList 
)

Append the ROIid to the list listToBeFilled.

Definition at line 45 of file ROIToUnitTranslator.templateDetails.h.

46 {
47
48 const VXD::GeoCache& aGeometry = VXD::GeoCache::getInstance();
49
50 for (int i = 0; i < listOfIntercepts->getEntries(); i++) {
51
52 B2DEBUG(21, " --->> a NEW INTERCEPT!");
53
54
55 const VXD::SensorInfoBase& aSensorInfo = aGeometry.getSensorInfo((*listOfIntercepts)[i]->getSensorID());
56
57 double widthTotU = std::min(m_maxWidthU,
58 sqrt((*listOfIntercepts)[i]->getSigmaU() * (*listOfIntercepts)[i]->getSigmaU() + m_sigmaSystU * m_sigmaSystU) * m_numSigmaTotU);
59 double widthTotV = std::min(m_maxWidthV,
60 sqrt((*listOfIntercepts)[i]->getSigmaV() * (*listOfIntercepts)[i]->getSigmaV() + m_sigmaSystV * m_sigmaSystV) * m_numSigmaTotV);
61
62 double minU = (*listOfIntercepts)[i]->getCoorU() - widthTotU / 2 ;
63 double maxU = (*listOfIntercepts)[i]->getCoorU() + widthTotU / 2 ;
64 const int nUnitsU = aSensorInfo.getUCells() - 1;
65
66 double minV = (*listOfIntercepts)[i]->getCoorV() - widthTotV / 2;
67 double maxV = (*listOfIntercepts)[i]->getCoorV() + widthTotV / 2;
68 const int nUnitsV = aSensorInfo.getVCells() - 1;
69
70 const int firstPixelID = 0;
71
72 double bottomLeft_uID = aSensorInfo.getUCellID(minU, minV, false);
73 double bottomLeft_vID = aSensorInfo.getVCellID(minV, false);
74 double topRight_uID = aSensorInfo.getUCellID(maxU, maxV, false);
75 double topRight_vID = aSensorInfo.getVCellID(maxV, false);
76
77 B2DEBUG(21, " LAYER = " << VxdID((*listOfIntercepts)[i]->getSensorID()).getLayerNumber()
78 << " LADDER = " << VxdID((*listOfIntercepts)[i]->getSensorID()).getLadderNumber()
79 << " SENSOR = " << VxdID((*listOfIntercepts)[i]->getSensorID()).getSensorNumber()
80 );
81
82 B2DEBUG(21, " number of units (pixel or strip) (U,V) = (" << nUnitsU << "," << nUnitsV << ")");
83
84 B2DEBUG(21, " widthU = " << maxU - minU
85 << " minU = " << minU
86 << " maxU = " << maxU
87 << " lengthU = " << aSensorInfo.getUSize((*listOfIntercepts)[i]->getCoorV())
88 );
89
90 B2DEBUG(21, " widthV = " << maxV - minV
91 << " minV = " << minV
92 << " maxV = " << maxV
93 << " lengthV = " << aSensorInfo.getVSize());
94
95 B2DEBUG(21, " bottom left unit (pixel or strip) (U,V) = (" << bottomLeft_uID << "," << bottomLeft_vID << ")");
96 B2DEBUG(21, " top right unit (pixel or strip) (U,V) = (" << topRight_uID << "," << topRight_vID << ")");
97
98
99 //check that the pixel belong to the sensor
100 bool inside = true;
101 if (bottomLeft_uID > nUnitsU || topRight_uID < firstPixelID || bottomLeft_vID > nUnitsV || topRight_vID < firstPixelID) {
102 B2DEBUG(21, " OOOPS: this unit (pixel or strip) does NOT belong to the sensor");
103 inside = false;
104 }
105
106 ROIid tmpROIid;
107
108 if (inside) {
109 tmpROIid.setMinUid(aSensorInfo.getUCellID(minU, minV, true));
110 tmpROIid.setMinVid(aSensorInfo.getVCellID(minV, true));
111 tmpROIid.setMaxUid(aSensorInfo.getUCellID(maxU, maxV, true));
112 tmpROIid.setMaxVid(aSensorInfo.getVCellID(maxV, true));
113 tmpROIid.setSensorID((*listOfIntercepts)[i]->getSensorID()) ;
114
115 ROIidList->appendNew(tmpROIid);
116
117 // this is the pointer to the transient copy of tmpROIid
118 ROIid* transientROIid = (*ROIidList)[ROIidList->getEntries() - 1];
119
120 (*listOfIntercepts)[i]->addRelationTo(transientROIid);
121 }
122 }
123 }
double m_maxWidthV
ROI maximum width allowed in the V direction.
double m_maxWidthU
ROI maximum width allowed in the U direction.
double m_sigmaSystV
systematic error along the V coordinate
double m_numSigmaTotV
number of standard deviations to be taken to define a ROI along V
double m_sigmaSystU
systematic error along the U coordinate
double m_numSigmaTotU
number of standard deviations to be taken to define a ROI along U

◆ findWeightInVector()

static bool findWeightInVector ( std::vector< std::pair< int, double > > &  vec,
double  weight 
)
static

find the given weight in the given vector of pair<int,double> NOTE: the criteria for finding are rather loose (i.e.

actual value and desired value must not differ by more than 1e-4) as the values that are encountered lie rather far apart!

Definition at line 39 of file PurityCalculatorTools.h.

40 {
41 const double epsilon = 1e-4; // no real need for accuracy here since weights are rather far apart!
42 return (std::find_if(vec.begin(), vec.end(),
43 [&epsilon, &weight](const std::pair<int, double>& p)
44 { return fabs(p.second - weight) <= epsilon; })
45 != vec.end());
46 }

◆ fromString()

TrackFindingCDC::EForwardBackward fromString ( const std::string &  directionString)
inline

Helper function to turn a direction string into a valid forward backward information.

Definition at line 36 of file SearchDirection.h.

37 {
38 if (directionString == "forward" or directionString == "above" or directionString == "after") {
39 return TrackFindingCDC::EForwardBackward::c_Forward;
40 } else if (directionString == "backward" or directionString == "below" or directionString == "before") {
41 return TrackFindingCDC::EForwardBackward::c_Backward;
42 } else if (directionString == "both" or directionString == "unknown") {
43 return TrackFindingCDC::EForwardBackward::c_Unknown;
44 } else if (directionString == "none" or directionString == "invalid") {
45 return TrackFindingCDC::EForwardBackward::c_Invalid;
46 } else {
47 B2FATAL("Do not understand direction " << directionString << ". Valid names are " <<
48 "forward/above/after, backward/below/before, both/unknown, none/invalid");
49 }
50 }

◆ getAccessorsFromWeight()

static std::vector< size_t > getAccessorsFromWeight ( double  weight)
static

convert the relation weight (SpacePoint <-> TrueHit) to a type that can be used to access arrays

Definition at line 132 of file PurityCalculatorTools.h.

133 {
134 if (weight < 1.5 && weight > 0) return {0}; // weight 1 -> PXD
135 if (weight < 2.5 && weight > 0) return { 1, 2 }; // weight 2 -> both Clusters with relation to MCParticle
136 if (weight < 20 && weight > 0) return {1}; // weight 11 -> only U-Cluster related to MCParticle
137 if (weight > 20 && weight < 30) return {2}; // weight 21 -> only V-Cluster related to MCParticle
138
139 return std::vector<size_t>(); // empty vector else
140 }

◆ getAllCells()

void getAllCells ( )

Output of all interesting Information of Cells.

Definition at line 374 of file collectortfinfo.h.

375 {
376 for (uint i = 0; i < m_collector.m_cellTF.size(); i++) {
377 B2INFO("* Cell ID: " << i << "; active: " << m_collector.m_cellTF[i].getActive() << ", died_at: " <<
378 m_collector.m_cellTF[i].getDiedAt() << "; m_assigned_hits_ids - size: " << m_collector.m_cellTF[i].getAssignedHits().size() <<
379 "; Neighbours - size: " << m_collector.m_cellTF[i].getNeighbours().size() << "; State: " << m_collector.m_cellTF[i].getState() <<
380 "; use counter: " << m_collector.m_cellTF[i].getUseCounter());
381 }
382 }
CollectorTFInfo m_collector
cached ref to CollectorTFInfo()

◆ getAllClusters()

void getAllClusters ( )

Output of all interesting Information of Clusters.

Definition at line 397 of file collectortfinfo.h.

398 {
399 for (uint i = 0; i < m_collector.m_clustersTF.size(); i++) {
400 B2INFO("* Cluster ID: " << i << "; active: " << m_collector.m_clustersTF[i].getActive() << ", died_at: " <<
401 m_collector.m_clustersTF[i].getDiedAt() << "; Real Cluster ID: " <<
402 m_collector.m_clustersTF[i].getRealClusterID() << "; Detector Type: "
403 << m_collector.m_clustersTF[i].getDetectorType() << "; use counter: " << m_collector.m_clustersTF[i].getUseCounter());
404 }
405 }

◆ getAllHits()

void getAllHits ( )

Output of all interesting Information of Hits.

Definition at line 386 of file collectortfinfo.h.

387 {
388 for (uint i = 0; i < m_collector.m_hitTF.size(); i++) {
389 B2INFO("* Hit ID: " << i << "; active: " << m_collector.m_hitTF[i].getActive() << ", died_at: " <<
390 m_collector.m_hitTF[i].getDiedAt() << "; m_assigned_cluster - size: " << m_collector.m_hitTF[i].getAssignedCluster().size() <<
391 "; UseTC IDs - size: " << m_collector.m_hitTF[i].getUseCounterTCIDs().size() <<
392 "; use counter: " << m_collector.m_hitTF[i].getUseCounter() << "; SectorID: " << m_collector.m_hitTF[i].getSectorID());
393 }
394 }

◆ getAllSectors()

void getAllSectors ( )

Output of all interesting Information of Sectors.

Definition at line 421 of file collectortfinfo.h.

422 {
423 for (auto& akt_sector : m_collector.m_sectorTF) {
424 B2INFO("* Sector ID: " << akt_sector.second.getSectorID() << "; active: " << akt_sector.second.getActive() << ", died_at: " <<
425 akt_sector.second.getDiedAt() << "; is only friend: " <<
426 akt_sector.second.getIsOnlyFriend() << "; Friends - size: "
427 << akt_sector.second.getFriends().size() << "; use counter: " << akt_sector.second.getUseCounter());
428 }
429 }

◆ getAllTC()

void getAllTC ( )

Output of all interesting Information of TC.

Definition at line 409 of file collectortfinfo.h.

410 {
411 for (uint i = 0; i < m_collector.m_tfCandTF.size(); i++) {
412 B2INFO("* TC ID: " << i << "; active: " << m_collector.m_tfCandTF[i].getActive() << ", died_at: " <<
413 m_collector.m_tfCandTF[i].getDiedAt() << "; Own ID: " <<
414 m_collector.m_tfCandTF[i].getOwnID() << "; AssignedCells - size: " <<
415 m_collector.m_tfCandTF[i].getAssignedCell().size());
416 }
417 }

◆ getAllValues()

std::vector< typename MapType::mapped_type > getAllValues ( const MapType &  aMap)

get all values in the map (i.e.

dump out all values that are stored in the map). The connection to the keys is lost! TODO: write test for this!!!!

Definition at line 133 of file MapHelperFunctions.h.

134 {
135 typedef typename MapType::key_type keyT;
136 std::vector<keyT> allKeys = getUniqueKeys(aMap);
137
138 typedef typename MapType::mapped_type valueT;
139 std::vector<valueT> allValues;
140 for (const keyT& key : allKeys) {
141 std::vector<valueT> keyValues = getValuesToKey(aMap, key);
142 for (const valueT& value : keyValues) {
143 allValues.push_back(value);
144 }
145 }
146
147 return allValues;
148 }

◆ getClassMnemomicParameterDescription() [1/2]

std::string getClassMnemomicParameterDescription ( const RecoTrack dispatchTag)
inline

Returns a short description for class RecoTrack to be used in descriptions of parameters.

Definition at line 31 of file ClassMnemomics.h.

32 {
33 return "Reco Track";
34 }

◆ getClassMnemomicParameterDescription() [2/2]

std::string getClassMnemomicParameterDescription ( const SpacePoint dispatchTag)
inline

Returns a short description for class SpacePoint to be used in descriptions of parameters.

Definition at line 43 of file ClassMnemomics.h.

44 {
45 return "Space Point";
46 }

◆ getClassMnemomicParameterName() [1/2]

std::string getClassMnemomicParameterName ( const RecoTrack dispatchTag)
inline

Returns a short name for class RecoTrack to be used in names of parameters.

Definition at line 25 of file ClassMnemomics.h.

26 {
27 return "recoTrack";
28 }

◆ getClassMnemomicParameterName() [2/2]

std::string getClassMnemomicParameterName ( const SpacePoint dispatchTag)
inline

Returns a short name for class SpacePoint to be used in names of parameters.

Definition at line 37 of file ClassMnemomics.h.

38 {
39 return "spacePoint";
40 }

◆ getMatrix()

const TMatrixD & getMatrix ( ) const
override

Return the underlying matrix.

Definition at line 23 of file HMatrixQP.cc.

24 {
25 static const double HMatrixContent[5] = {1, 0, 0, 0, 0};
26
27 static const TMatrixD HMatrix(1, 5, HMatrixContent);
28
29 return HMatrix;
30 }

◆ getMCParticles()

static std::vector< std::pair< int, double > > getMCParticles ( const Belle2::SpacePoint spacePoint)
static

get the related MCParticles to the TrueHit.

Returns
vector of pairs, where .first is the MCParticleId, which is -1 if there was no MCParticle related to a TrueHit and -2 if there is a Cluster without a relation to a TrueHit (probably a noise Cluster then) .second is the relation weight between SpacePoint and TrueHit (encodes additional information that is needed afterwards)

Definition at line 55 of file PurityCalculatorTools.h.

56 {
57 // CAUTION: getting all TrueHits here (i.e. from all StoreArrays)
58 Belle2::RelationVector<TrueHitType> trueHits = spacePoint->getRelationsTo<TrueHitType>("ALL");
59 std::vector<std::pair<int, double> > mcParticles;
60 B2DEBUG(29, "Found " << trueHits.size() << " TrueHits related to SpacePoint " << spacePoint->getArrayIndex());
61
62 for (size_t iTH = 0; iTH < trueHits.size(); ++iTH) {
63 B2DEBUG(29, "Trying to get MCParticles from TrueHit " << trueHits[iTH]->getArrayIndex() <<
64 " from Array " << trueHits[iTH]->getArrayName());
65 Belle2::MCParticle* mcPart = trueHits[iTH]->template getRelatedFrom<Belle2::MCParticle>("ALL");
66
67 int mcPartId = -1; // default value for MCPartId (not found)
68 if (mcPart != nullptr) {
69 mcPartId = mcPart->getArrayIndex();
70 B2DEBUG(29, "TrueHit is related to MCParticle " << mcPartId);
71 } else {
72 B2DEBUG(20, "Found no MCParticle related to TrueHit " << trueHits[iTH]->getArrayIndex() <<
73 " from Array " << trueHits[iTH]->getArrayName());
74 }
75 mcParticles.push_back(std::make_pair(mcPartId, trueHits.weight(iTH)));
76 }
77
78 // sort & unique to filter out double MCIds (if the relations are set correct, this only happens if more than one TrueHits point to the same MCParticle)
79 std::sort(mcParticles.begin(), mcParticles.end());
80 auto newEnd = std::unique(mcParticles.begin(), mcParticles.end(),
81 [](const std::pair<int, double>& a, const std::pair<int, double>& b) { return a.first == b.first; }
82 );
83 if (newEnd != mcParticles.end()) B2DEBUG(20,
84 "More than one TrueHits (related to one SpacePoint) are related to the same MCParticle!");
85 mcParticles.resize(std::distance(mcParticles.begin(), newEnd));
86
87 // check if there were noise Clusters in the SpacePoint
88 // only case left for PXD is missing TrueHit for underlying Cluster, everything else is covered!
89 if (spacePoint->getType() == VXD::SensorInfoBase::PXD) {
90 if (mcParticles.empty()) mcParticles.push_back(std::make_pair(-2, 1)); // if no Id in vector there is no relation to TrueHit
91 } else if (spacePoint->getType() == VXD::SensorInfoBase::SVD) { // for SVD some more tests are needed!
92 // check if there is one MCParticle that is related to both Clusters of the SpacePoint
93 if (!findWeightInVector(mcParticles, 2)) { // if not both related check which ones should have a relation and act accordingly
94 const std::pair<bool, bool>& clusters = spacePoint->getIfClustersAssigned();
95 bool uGood = clusters.first && findWeightInVector(mcParticles, 11);
96 bool vGood = clusters.second && findWeightInVector(mcParticles, 21);
97 if (!uGood && !vGood) mcParticles.push_back(std::make_pair(-2, 2)); // if both Clusters are not related -> weight is 2
98 else if (uGood && !vGood) mcParticles.push_back(std::make_pair(-2, 21)); // if only V-Cluster is not related -> weight is 21
99 else if (!uGood && vGood) mcParticles.push_back(std::make_pair(-2, 11)); // if only U-Cluster is not related -> weight is 11
100 }
101 } else {
102 B2ERROR("Unknown DetectorType in getMCParticles! This is just a notification! Needs to be handled!"); // should not happen
103 }
104
105 return mcParticles;
106 }
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:32
int getArrayIndex() const
Get 0-based index of the particle in the corresponding MCParticle list.
Definition: MCParticle.h:244
Class for type safe access to objects that are referred to in relations.
size_t size() const
Get number of relations.
float weight(int index) const
Get weight with index.
int getArrayIndex() const
Returns this object's array index (in StoreArray), or -1 if not found.
RelationVector< TO > getRelationsTo(const std::string &name="", const std::string &namedRelation="") const
Get the relations that point from this object to another store array.
std::pair< bool, bool > getIfClustersAssigned() const
Returns, if u(v)-coordinate is based on cluster information.
Definition: SpacePoint.h:162
Belle2::VXD::SensorInfoBase::SensorType getType() const
Return SensorType (PXD, SVD, ...) on which the SpacePoint lives.
Definition: SpacePoint.h:145
static bool findWeightInVector(std::vector< std::pair< int, double > > &vec, double weight)
find the given weight in the given vector of pair<int,double> NOTE: the criteria for finding are rath...

◆ getNValuesPerKey()

std::vector< std::pair< typename MapType::key_type, unsigned int > > getNValuesPerKey ( const MapType &  aMap)

get the unique keys of a map together with the number of values associated to each key.

first elements are keys, second are number of values NOTE: for a non-multimap this returns all keys with a .second of 1!

Definition at line 58 of file MapHelperFunctions.h.

59 {
60 typedef typename MapType::key_type keyT;
61 typedef typename MapType::const_iterator mapIter;
62
63 std::vector<std::pair<keyT, unsigned int> > valuesPerKey;
64 if (aMap.empty()) return valuesPerKey; // return empty vector if map is empty
65
66 std::vector<keyT> uniqueKeys = getUniqueKeys<MapType>(aMap);
67
68 for (keyT key : uniqueKeys) {
69 std::pair<mapIter, mapIter> keyRange = aMap.equal_range(key);
70 valuesPerKey.push_back(std::make_pair(key, std::distance(keyRange.first, keyRange.second)));
71 }
72 return valuesPerKey;
73 }

◆ getPossibleTos() [1/2]

std::vector< CKFToPXDState * > getPossibleTos ( CKFToPXDState from,
const std::vector< CKFToPXDState * > &  states 
) const
override

Return all states the given state is possible related to.

Definition at line 89 of file LayerPXDRelationFilter.icc.h.

91 {
92 std::vector<CKFToPXDState*> possibleNextStates;
93
94 const CKFToPXDState::stateCache& currentStateCache = currentState->getStateCache();
95 const unsigned int& currentLayer = currentStateCache.geoLayer;
96
97 // this is the parameter value set in the python config
98 int m_hitJump = m_param_hitJumping;
99 // if it is set to -1 we want to use the values in the payload
100 if (m_hitJump == -1) {
101 m_hitJump = currentStateCache.ptSeed < m_layerJumpPtThreshold ? m_layerJumpLowPt : m_layerJumpHighPt;
102 }
103
104 const unsigned int& nextPossibleLayer = std::max(static_cast<int>(currentLayer) - 1 - m_hitJump, 0);
105
106 // Patch for the PXD layer 2 overlap inefficiency fix
107 // previous implementation of maximumLadderNumber was calculated using GeoCache gave incorrect value for exp1003
108 // Geometrically, PXD layer 1 has 8 ladders, pxd layer 2 has 12 ladder
109 int numberOfLaddersForLayer[2] = {8, 12};
110
111 for (CKFToPXDState* nextState : states) {
112 const CKFToPXDState::stateCache& nextStateCache = nextState->getStateCache();
113 const unsigned int nextLayer = nextStateCache.geoLayer;
114 if (nextLayer < std::min(currentLayer, nextPossibleLayer) or std::max(currentLayer, nextPossibleLayer) < nextLayer) {
115 continue;
116 }
117
118 if (currentLayer == nextLayer) {
119 // next layer is an overlap one, so lets return all hits from the same layer, that are on a
120 // ladder which is below the last added hit.
121 const unsigned int fromLadderNumber = currentStateCache.ladder;
122 const unsigned int maximumLadderNumber = numberOfLaddersForLayer[currentLayer - 1];
123
124 // the reason for this strange formula is the numbering scheme in the VXD.
125 // we first subtract 1 from the ladder number to have a ladder counting from 0 to N - 1,
126 // then we add (PXD)/subtract(PXD) one to get to the next (overlapping) ladder and do a % N to also cope for the
127 // highest number. Then we add 1 again, to go from the counting from 0 .. N-1 to 1 .. N.
128 // The + maximumLadderNumber in between makes sure, we are not ending with negative numbers
129 const int direction = 1;
130 const unsigned int overlappingLadder =
131 ((fromLadderNumber + maximumLadderNumber - 1) + direction) % maximumLadderNumber + 1;
132
133 if (nextStateCache.ladder != overlappingLadder) {
134 continue;
135 }
136
137 // Next we make sure to not have any cycles in our graph: we do this by defining only the halves of the
138 // sensor as overlapping. So if the first hit is coming from sensor 1 and the second from sensor 2,
139 // they are only related if the one from sensor 1 is on the half, that is pointing towards sensor 2
140 // and the one on sensor 2 is on the half that is pointing towards sensor 1.
141 //
142 // X X X
143 // ----|---- ----|---- ----|----
144 // This is fine: X This not: X This not: X
145 // ----|---- ----|---- ----|----
146
147 // for PXD its the other way round!
148 if (currentStateCache.localNormalizedu <= 0.8f) {
149 continue;
150 }
151
152 if (nextStateCache.localNormalizedu > 0.2f) {
153 continue;
154 }
155 }
156
157 // Some loose prefiltering of possible states
158 TrackFindingCDC::Weight weight = m_prefilter(std::make_pair(currentState, nextState));
159 if (std::isnan(weight)) {
160 continue;
161 }
162
163 possibleNextStates.push_back(nextState);
164 }
165
166 return possibleNextStates;
167 }

◆ getPossibleTos() [2/2]

std::vector< CKFToSVDState * > getPossibleTos ( CKFToSVDState from,
const std::vector< CKFToSVDState * > &  states 
) const
final

Return all states the given state is possible related to.

Definition at line 50 of file LayerSVDRelationFilter.icc.h.

52 {
53 std::vector<CKFToSVDState*> possibleNextStates;
54 possibleNextStates.reserve(states.size());
55
56 const CKFToSVDState::stateCache& currentStateCache = currentState->getStateCache();
57 const unsigned int currentLayer = currentStateCache.geoLayer;
58 const unsigned int nextPossibleLayer = std::max(static_cast<int>(currentLayer) - 1 - m_param_hitJumping, 0);
59
60 for (CKFToSVDState* nextState : states) {
61 if (currentState == nextState) {
62 continue;
63 }
64
65 const CKFToSVDState::stateCache& nextStateCache = nextState->getStateCache();
66 const unsigned int nextLayer = nextStateCache.geoLayer;
67
68 if (std::max(currentLayer, nextPossibleLayer) >= nextLayer and nextLayer >= std::min(currentLayer, nextPossibleLayer)) {
69
70 if (currentLayer == nextLayer) {
71 // next layer is an overlap one, so lets return all hits from the same layer, that are on a
72 // ladder which is below the last added hit.
73 const unsigned int fromLadderNumber = currentStateCache.ladder;
74 const unsigned int maximumLadderNumber = m_maximalLadderCache.find(currentLayer)->second;
75
76 // the reason for this strange formula is the numbering scheme in the VXD.
77 // we first subtract 1 from the ladder number to have a ladder counting from 0 to N - 1,
78 // then we add (PXD)/subtract(SVD) one to get to the next (overlapping) ladder and do a % N to also cope for the
79 // highest number. Then we add 1 again, to go from the counting from 0 .. N-1 to 1 .. N.
80 // The + maximumLadderNumber in between makes sure, we are not ending with negative numbers
81 const int direction = -1;
82 const unsigned int overlappingLadder =
83 ((fromLadderNumber + maximumLadderNumber - 1) + direction) % maximumLadderNumber + 1;
84
85 if (nextStateCache.ladder != overlappingLadder) {
86 continue;
87 }
88
89 // Next we make sure to not have any cycles in our graph: we do this by defining only the halves of the
90 // sensor as overlapping. So if the first hit is coming from sensor 1 and the second from sensor 2,
91 // they are only related if the one from sensor 1 is on the half, that is pointing towards sensor 2
92 // and the one on sensor 2 is on the half that is pointing towards sensor 1.
93 //
94 // X X X
95 // ----|---- ----|---- ----|----
96 // This is fine: X This not: X This not: X
97 // ----|---- ----|---- ----|----
98 if (currentStateCache.localNormalizedu > 0.2f) {
99 continue;
100 }
101
102 if (nextStateCache.localNormalizedu <= 0.8f) {
103 continue;
104 }
105 }
106
107 // Some loose prefiltering of possible states
108 TrackFindingCDC::Weight weight = m_prefilter(std::make_pair(currentState, nextState));
109 if (std::isnan(weight)) {
110 continue;
111 }
112
113
114 possibleNextStates.push_back(nextState);
115 }
116 }
117
118 return possibleNextStates;
119 }

◆ getSortedKeyValueTuples()

std::vector< std::tuple< typename MapType::key_type, typename MapType::mapped_type, unsigned int > > getSortedKeyValueTuples ( const MapType &  aMap)

get the (key, value, number of values) tuples stored in the map, sorted after the following scheme (descending order) 1) the number of associated values to one key 2) the sum of the associated values to that key NOTE: for a non-multimap this returns the content of the map ordered by valued CAUTION: if one of the values to a key is NaN this key will be the first (of the ones with the same number of associated values)

Returns
a vector of tuples where get<0> is the key, get<1> is the sum of the values to the key and get<2> is the number of values to the key

Definition at line 102 of file MapHelperFunctions.h.

103 {
104 typedef typename MapType::key_type keyT;
105 typedef typename MapType::mapped_type mapT;
106
107 std::vector<std::tuple<keyT, mapT, unsigned int> > keyValuePairs;
108 if (aMap.empty()) return keyValuePairs; // return empty vector if nothing is stored in map
109
110 std::vector<std::pair<keyT, unsigned int> > nValuesPerKey = getNValuesPerKey(aMap);
111
112 for (std::pair<keyT, unsigned int> keyValues : nValuesPerKey) {
113 std::vector<mapT> valuesToKey = getValuesToKey(aMap, keyValues.first);
114
115 mapT valueSum = std::accumulate(valuesToKey.begin(), valuesToKey.end(), 0.0);
116 keyValuePairs.push_back(std::make_tuple(keyValues.first, valueSum, keyValues.second));
117 }
118
119 // sort using a lambda function (using std::tie as std::tuple has a defined operator < that ensures strict weak ordering)
120 std::sort(keyValuePairs.begin(), keyValuePairs.end(),
121 [](const std::tuple<keyT, mapT, unsigned int>& lTuple, const std::tuple<keyT, mapT, unsigned int>& rTuple)
122 { return std::tie(std::get<2>(rTuple), std::get<1>(rTuple)) < std::tie(std::get<2>(lTuple), std::get<1>(lTuple)); }
123 );
124
125 return keyValuePairs;
126 }

◆ getUniqueKeys()

std::vector< typename MapType::key_type > getUniqueKeys ( const MapType &  aMap)

get the unique keys of a map (i.e.

if no multimap is passed all keys are returned) NOTE: for this to work the keys have to have a defined operator < () as std::sort is used! NOTE: as a side effect the keys are returned sorted!

Definition at line 32 of file MapHelperFunctions.h.

33 {
34 std::vector<typename MapType::key_type> allKeys; // collect all keys of the map -> then sort & unique (+resize)
35 if (aMap.empty()) { return allKeys; }
36
37 typedef typename MapType::const_iterator mapIter;
38 for (mapIter it = aMap.begin(); it != aMap.end(); ++it) { allKeys.push_back(it->first); }
39 std::sort(allKeys.begin(), allKeys.end());
40 auto newEnd = std::unique(allKeys.begin(), allKeys.end());
41 allKeys.resize(std::distance(allKeys.begin(), newEnd));
42
43 return allKeys;
44 }

◆ getUniqueSize()

unsigned int getUniqueSize ( const MapType &  aMap)

get the number of unique keys inside the map NOTE: for non-multimap this is the same as .size()

Definition at line 51 of file MapHelperFunctions.h.

51{ return getUniqueKeys<MapType>(aMap).size(); }

◆ getValuesToKey()

std::vector< typename MapType::mapped_type > getValuesToKey ( const MapType &  aMap,
typename MapType::key_type  aKey 
)

get all values stored in the map for a given key

Definition at line 79 of file MapHelperFunctions.h.

80 {
81 typedef typename MapType::const_iterator mapIter;
82
83 std::vector<typename MapType::mapped_type> values;
84 if (aMap.empty()) return values;
85
86 std::pair<mapIter, mapIter> keyRange = aMap.equal_range(aKey);
87 for (mapIter it = keyRange.first; it != keyRange.second; ++it) { values.push_back(it->second); }
88
89 return values;
90 }

◆ GridEventTimeExtractor()

Add the subfindlet as listener.

Definition at line 23 of file GridEventTimeExtractor.icc.h.

◆ HMHt()

void HMHt ( TMatrixDSym &  M) const
override

Calculate H * M * H^T = M_00.

Definition at line 73 of file HMatrixQP.cc.

74 {
75 assert(M.GetNrows() == 5);
76 // Just use the 0,0 entry
77 M.ResizeTo(1, 1);
78 }

◆ Hv()

TVectorD Hv ( const TVectorD &  v) const
override

Calculate H * v = v_0.

Definition at line 33 of file HMatrixQP.cc.

34 {
35 assert(v.GetNrows() == 5);
36
37 TVectorD returnValue(1);
38
39 returnValue(0) = v(0);
40
41 return returnValue;
42 }

◆ import_cell_loop()

void import_cell_loop ( )

dummy comment: import_cell_loop

Definition at line 313 of file collectortfinfo.h.

314 {
315 uint anz_cell = 10;
316 std::vector<int> hits = {1, 2, 3};
317
318 for (uint index = 0; index < pass_sector_ids.size(); index++) {
319 for (uint i = 0; i < anz_cell; i++) {
320 // virtual int importCell (int pass_index, std::string died_at, std::vector<int> accepted,
321 // std::vector<int> rejected, std::vector<int> assigned_Hit_IDs); // Cell Import
322 /*int akt_id =*/ m_collector.importCell(index, "", -1, std::vector<int>(), std::vector<int>(), hits);
323 }
324 }
325 }
std::vector< int > pass_sector_ids
fixed vector of pass indices (values are never used)

◆ import_cell_standard()

void import_cell_standard ( )

dummy comment: import_cell_standard

Definition at line 291 of file collectortfinfo.h.

292 {
293 // ID 0 - 9
294 // Allowed Overlap => Cellid 2, 3 (same hit)
295 // Not allowed overlap => Cellid 7, 8 (other hit)
296
297 // Cellid 1 => overlapped Sector
298 m_collector.importCell(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>({1, 2}));
299 m_collector.importCell(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>({4, 5}));
300 m_collector.importCell(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>({11, 9}));
301 m_collector.importCell(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>({9, 10}));
302 m_collector.importCell(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>());
303 m_collector.importCell(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>());
304 m_collector.importCell(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>());
305 m_collector.importCell(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>({15, 16}));
306 m_collector.importCell(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>({16, 17}));
307 m_collector.importCell(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>());
308
309 // virtual int importCell (int pass_index, std::string died_at, std::vector<int> accepted, std::vector<int> rejected, std::vector<int> assigned_Hit_IDs); // Cell Import
310 }
int pass_sector_id_single
fixed index for beginning pass

◆ import_clusters_loop()

void import_clusters_loop ( )

dummy comment: import_clusters_loop

Definition at line 189 of file collectortfinfo.h.

190 {
191 uint anz_clusters_svd = 10;
192 uint anz_clusters_pxd = 10;
193
194 for (uint index = 0; index < pass_sector_ids.size(); index++) {
195 for (uint i = 0; i < anz_clusters_svd; i++) {
196 // importCluster (int pass_index, std::string died_at, int accepted, int rejected, int detector_type)
197 /*int akt_id =*/
198 m_collector.importCluster(index, "", -1, std::vector<int>(), std::vector<int>(), Const::SVD, i);
199 }
200 for (uint i = 0; i < anz_clusters_pxd; i++) {
201 // importCluster (int pass_index, std::string died_at, int accepted, int rejected, int detector_type)
202 /*int akt_id =*/
203 m_collector.importCluster(index, "", -1, std::vector<int>(), std::vector<int>(), Const::PXD, i);
204 }
205 }
206 }

◆ import_clusters_standard()

void import_clusters_standard ( )

dummy comment: import_clusters_standard

Definition at line 130 of file collectortfinfo.h.

131 {
132
133 uint anz_clusters_svd = 15;
134 uint anz_clusters_pxd = 15;
135
136
137 for (uint i = 0; i < anz_clusters_svd; i++) {
138 // importCluster (int pass_index, std::string died_at, int accepted, int rejected, int detector_type)
139 /*int akt_id =*/ m_collector.importCluster(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), Const::SVD, i);
140
141// B2INFO ("AKT ID SVD: " << akt_id);
142
143 }
144
145 for (uint i = 0; i < anz_clusters_pxd; i++) {
146 // importCluster (int pass_index, std::string died_at, int accepted, int rejected, int detector_type)
147 /*int akt_id = */m_collector.importCluster(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), Const::PXD, i);
148
149// B2INFO ("AKT ID PXD: " << akt_id);
150 }
151 }

◆ import_hit_loop()

void import_hit_loop ( )

dummy comment: import_hit_loop

Definition at line 273 of file collectortfinfo.h.

274 {
275 uint anz_hits = 10;
276
277 // std::vector<int> clusters = {7, 8, 9};
278 for (uint index = 0; index < pass_sector_ids.size(); index++) {
279 for (uint i = 0; i < anz_hits; i++) {
280 // virtual int importHit (int pass_index, std::string died_at, std::vector<int> accepted,
281 // std::vector<int> rejected, std::vector<int> assigned_Cluster_IDs,
282 // int sec_id, B2Vector3D hit_position); // Hit import_clusters
283
284 /*int akt_id =*/ m_collector.importHit(index, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>(), 1, B2Vector3D(),
285 B2Vector3D());
286 }
287 }
288 }

◆ import_hit_standard()

void import_hit_standard ( )

dummy comment: import_hit_standard

Definition at line 208 of file collectortfinfo.h.

209 {
210 // virtual int importHit (int pass_index, std::string died_at, std::vector<int> accepted,
211 // std::vector<int> rejected, std::vector<int> assigned_Cluster_IDs,
212 // int sec_id, B2Vector3D hit_position); // Hit import_clusters
213
214 // ID 0 - 4
215 // Sector Overlap => Hitid 3,4
216 // Cluster Overlap => Hitid 7,8
217 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>({1, 2, 3}), 0,
218 B2Vector3D(),
219 B2Vector3D());
220 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>({4}), 2, B2Vector3D(),
221 B2Vector3D());
222 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>({7}), 4, B2Vector3D(),
223 B2Vector3D());
224 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>({9}), 5, B2Vector3D(),
225 B2Vector3D());
226 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>({10}), 5,
227 B2Vector3D(),
228 B2Vector3D());
229
230 // ID 5 - 9
231 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>({11, 12, 13}), 6,
232 B2Vector3D(),
233 B2Vector3D());
234 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>({14, 15}), 7,
235 B2Vector3D(),
236 B2Vector3D());
237 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>({17}), 8,
238 B2Vector3D(),
239 B2Vector3D());
240 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>({17}), 9,
241 B2Vector3D(),
242 B2Vector3D());
243 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>({18}), 1,
244 B2Vector3D(),
245 B2Vector3D());
246
247 // ID 10 - 14
248 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>(), -1, B2Vector3D(),
249 B2Vector3D());
250 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>(), -1, B2Vector3D(),
251 B2Vector3D());
252 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>(), -1, B2Vector3D(),
253 B2Vector3D());
254 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>(), -1, B2Vector3D(),
255 B2Vector3D());
256 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>(), -1, B2Vector3D(),
257 B2Vector3D());
258
259 // ID 15 - 19
260 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>(), 19, B2Vector3D(),
261 B2Vector3D());
262 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>(), 20, B2Vector3D(),
263 B2Vector3D());
264 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>(), 21, B2Vector3D(),
265 B2Vector3D());
266 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>(), 22, B2Vector3D(),
267 B2Vector3D());
268 m_collector.importHit(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), std::vector<int>(), 23, B2Vector3D(),
269 B2Vector3D());
270 }

◆ import_sectors_loop()

void import_sectors_loop ( )

Documentation Comment Jakob Lettenbichler: this was written by a student and will be removed after finishing redesign of VXDTF.

Therefore some documentation-entries are not very useful - all of them are marked with "dummy comment". dummy comment: import_sectors_loop

Definition at line 154 of file collectortfinfo.h.

155 {
156 // Create Test Sector
157 std::map<unsigned int, std::vector<int>> sector_map;
158 uint size_of_sectors = 10;
159
160 for (uint i = 0; i < size_of_sectors; i++) {
161 sector_map.insert(std::make_pair(i, std::vector<int>()));
162 }
163
164 // 1. Sectors init
165 //KeySectors doesn't function => so pair Int int
166 std::map<std::pair<unsigned int, unsigned int>, std::vector<int>> sectors_display_all_pass;
167 std::vector<int> sectors_display_friends;
168
169 for (uint i = 0; i < pass_sector_ids.size(); i++) {
170
171 B2DEBUG(1, "PassNr. " << i << "Size of Sector Map: " << sector_map.size());
172
173 for (auto& akt_sector : sector_map) {
174 sectors_display_friends.clear();
175
176 // Friends read and store in second vector
177 for (auto& akt_friend : akt_sector.second) {
178 sectors_display_friends.push_back(akt_friend);
179 }
180 sectors_display_all_pass.insert(std::make_pair(std::make_pair(i, akt_sector.first), sectors_display_friends));
181 }
182 }
183 m_collector.initPersistent();
184 m_collector.intEvent();
185 // m_collector.initSectors (sectors_display_all_pass, std::vector<double>(), std::vector<double>());
186 }

◆ import_sectors_standard()

void import_sectors_standard ( )

dummy comment: import_sectors_standard

Definition at line 91 of file collectortfinfo.h.

92 {
93
94
95 uint sector_map_size = 40;
96
97 // Create Test Sector
98 std::map<std::pair<unsigned int, unsigned int>, std::vector<int>> sectors_display_all_pass;
99 std::vector<int> sectors_display_friends;
100
101// B2INFO ("PassNr. " << pass_sector_id_single << "Size of Sector Map: " << sector_map_size );
102
103 sectors_display_friends.clear();
104 sectors_display_all_pass.insert(std::make_pair(std::make_pair(pass_sector_id_single, 0), sectors_display_friends));
105
106 sectors_display_friends.clear();
107 sectors_display_friends.push_back(0);
108 sectors_display_all_pass.insert(std::make_pair(std::make_pair(pass_sector_id_single, 1), sectors_display_friends));
109
110 sectors_display_friends.clear();
111 sectors_display_friends.push_back(1);
112 sectors_display_all_pass.insert(std::make_pair(std::make_pair(pass_sector_id_single, 2), sectors_display_friends));
113
114 // Sector 3 - 40
115 sectors_display_friends.clear();
116 for (uint u = 3; u < sector_map_size; u++) {
117 sectors_display_all_pass.insert(std::make_pair(std::make_pair(pass_sector_id_single, u), sectors_display_friends));
118 }
119
120
121
122
123 m_collector.initPersistent();
124 m_collector.intEvent();
125 // m_collector.initSectors (sectors_display_all_pass, std::vector<double>(), std::vector<double>());
126
127 }

◆ import_tfc_loop()

void import_tfc_loop ( )

dummy comment: import_tfc_loop

Definition at line 357 of file collectortfinfo.h.

358 {
359 uint anz_tfc = 10;
360 std::vector<std::pair<int, unsigned int>> cells = {std::make_pair(1, 1), std::make_pair(2, 2), std::make_pair(3, 3)};
361
362 for (uint index = 0; index < pass_sector_ids.size(); index++) {
363 for (uint i = 0; i < anz_tfc; i++) {
364 // int passIndex, std::string diedAt, int diedId, std::vector<int> accepted, std::vector<int> rejected,
365 // const std::vector<std::pair<int, unsigned int>> assignedCellIDs
366 // TC Import
367 /*int akt_id =*/ m_collector.importTC(index, "", -1, std::vector<int>(), std::vector<int>(), cells);
368 }
369 }
370 }

◆ import_tfc_standard()

void import_tfc_standard ( )

dummy comment: import_tfc_standard

Definition at line 327 of file collectortfinfo.h.

328 {
329 std::vector<std::pair<int, unsigned int>> cells0 = {std::make_pair(0, 0)};
330 std::vector<std::pair<int, unsigned int>> cells1 = {std::make_pair(1, 1)};
331 std::vector<std::pair<int, unsigned int>> cells23 = {std::make_pair(2, 2), std::make_pair(3, 3)};
332 std::vector<std::pair<int, unsigned int>> cells79 = {std::make_pair(7, 7), std::make_pair(9, 9)};
333 std::vector<std::pair<int, unsigned int>> cells8 = {std::make_pair(8, 8)};
334
335 // ID 1 = Sector overlapped
336 // ID 2 = allowed overlapping (Cells)
337 // ID 3, 4 = not allowed overlapping (Cells)
338 m_collector.importTC(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), cells0);
339 m_collector.importTC(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), cells1);
340 m_collector.importTC(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), cells23);
341 m_collector.importTC(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), cells79);
342 m_collector.importTC(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(), cells8);
343
344 m_collector.importTC(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(),
345 std::vector<std::pair<int, unsigned int>>({}));
346 m_collector.importTC(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(),
347 std::vector<std::pair<int, unsigned int>>({}));
348 m_collector.importTC(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(),
349 std::vector<std::pair<int, unsigned int>>({}));
350 m_collector.importTC(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(),
351 std::vector<std::pair<int, unsigned int>>({}));
352 m_collector.importTC(pass_sector_id_single, "", -1, std::vector<int>(), std::vector<int>(),
353 std::vector<std::pair<int, unsigned int>>({}));
354 }

◆ increaseClusterCounters()

static void increaseClusterCounters ( const Belle2::SpacePoint spacePoint,
std::array< unsigned, 3 > &  clusterCtr 
)
static

increase the appropriate Cluster counter by asking the SpacePoint which type he has and which Clusters are assigned

Definition at line 111 of file PurityCalculatorTools.h.

112 {
113 if (spacePoint->getType() == Belle2::VXD::SensorInfoBase::PXD) {
114 clusterCtr[0]++;
115 B2DEBUG(29, "SpacePoint contains PXDCluster");
116 } else {
117 std::pair<bool, bool> setClusters = spacePoint->getIfClustersAssigned();
118 if (setClusters.first) {
119 clusterCtr[1]++;
120 B2DEBUG(29, "SpacePoint contains U SVDCluster");
121 }
122 if (setClusters.second) {
123 clusterCtr[2]++;
124 B2DEBUG(29, "SpacePoint contains V SVDCluster");
125 }
126 }
127 }

◆ initialize() [1/4]

void initialize
final

Copy the string direction parameter to the enum.

Definition at line 78 of file NonIPCrossingStateFilter.icc.h.

79 {
80 Super::initialize();
82 }
TrackFindingCDC::EForwardBackward m_param_direction
Direction parameter converted from the string parameters.
TrackFindingCDC::EForwardBackward fromString(const std::string &directionString)
Helper function to turn a direction string into a valid forward backward information.

◆ initialize() [2/4]

void initialize
overridevirtual

Create the store arrays.

Reimplemented from ProcessingSignalListener.

Definition at line 45 of file ResultStorer.icc.h.

46 {
48
49 if (not m_param_exportTracks) {
50 return;
51 }
52
55
56 StoreArray<RecoTrack> relationRecoTracks(m_param_outputRelationRecoTrackStoreArrayName);
57 relationRecoTracks.registerRelationTo(m_outputRecoTracks);
58
60 }
static void registerRequiredRelations(StoreArray< RecoTrack > &recoTracks, std::string const &pxdHitsStoreArrayName="", std::string const &svdHitsStoreArrayName="", std::string const &cdcHitsStoreArrayName="", std::string const &bklmHitsStoreArrayName="", std::string const &eklmHitsStoreArrayName="", std::string const &recoHitInformationStoreArrayName="")
Convenience method which registers all relations required to fully use a RecoTrack.
Definition: RecoTrack.cc:53
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
void initialize() override
Receive and dispatch signal before the start of the event processing.

◆ initialize() [3/4]

void initialize
overridevirtual

Receive signal before the start of the event processing.

Reimplemented from ProcessingSignalListener.

Definition at line 47 of file LayerPXDRelationFilter.icc.h.

48 {
50
51 if (m_prefix == "seed") {
52 m_ckfParameters = std::make_unique<OptionalDBObjPtr<CKFParameters>>("PXDCKFSeedHitParameters");
53 } else if (m_prefix == "hit") {
54 m_ckfParameters = std::make_unique<OptionalDBObjPtr<CKFParameters>>("PXDCKFHitHitParameters");
55 } else {
56 B2ERROR("Unknown prefix. Apparently, some non-trivial changes to code were done.");
57 }
58 }

◆ initialize() [4/4]

void initialize
overridevirtual

Initialize the event t0 store obj ptr.

Reimplemented from ProcessingSignalListener.

Reimplemented in HitBasedT0Extractor.

Definition at line 38 of file BaseEventTimeExtractor.icc.h.

39 {
41 m_eventT0.registerInDataStore();
42 }

◆ initializeObservers() [1/3]

bool initializeObservers ( const Belle2::Filter< Variable, RangeType, observer > &  filter,
argsTypes ...  args 
)

Initialize the observer of a RangeType Filter.

Template Parameters
Variable: Filter variable type
RangeType: range type
observer: observer type to be used
argsTypes: argument types of the filter
Parameters
filter: Filter for which the observer shall be initialized
args: arguments of the filter
Returns
boolean to indicate if the observer has been initialized

Definition at line 985 of file Filter.h.

986 {
987 return observer::initialize(Variable(), filter.getRange(), args ...);
988 }

◆ initializeObservers() [2/3]

bool initializeObservers ( const Filter< booleanBinaryOperator, Belle2::Filter< types1... >, Belle2::Filter< types2... >, observer > &  ,
argsTypes ...  args 
)

Observer Stuff ///.

Recursive function to initialize all the observers in a binary boolean Filter.

Template Parameters
booleanBinaryOperator: Tag Class to identify the Filter operator
types1: template pack of a filter
types2: template pack of another filter
observer: observer type to be used
argsTypes: argument types of the filter
Parameters
args: arguments of the filter
Returns
boolean to indicate if the observer has been initialized

Definition at line 947 of file Filter.h.

950 {
951 return observer::initialize(args ...)
952 && initializeObservers(Belle2::Filter<types1...>(), args...)
953 && initializeObservers(Belle2::Filter<types2...>(), args ...);
954 }
This class is used to select pairs, triplets... of objects.
Definition: Filter.h:34

◆ initializeObservers() [3/3]

bool initializeObservers ( const Filter< booleanUnaryOperator, Belle2::Filter< types1... >, observer > &  ,
argsTypes ...  args 
)

Recursive function to initialize all the observers in a unary boolean Filter.

Template Parameters
booleanUnaryOperator: Tag Class to identify the Filter operator
types1: template pack of the filter
observer: observer type to be used
argsTypes: argument types of the filter
Parameters
args: arguments of the filter
Returns
boolean to indicate if the observer has been initialized

Definition at line 969 of file Filter.h.

970 {
971 return observer::initialize(args ...) && initializeObservers(Belle2::Filter<types1...>(), args...);
972 }

◆ insertSpacePoint()

void insertSpacePoint ( std::vector< const SpacePoint * > &  target,
TrackNode  source 
)
inline

Convert TrackNode to SpaePoint an add to a SpacePoint path.

Definition at line 44 of file NetworkPathConversion.h.

45 {
46 target.push_back(source.m_spacePoint);
47 }

◆ insertSpacePoints()

void insertSpacePoints ( std::vector< const SpacePoint * > &  target,
const Segment< TrackNode > &  source 
)
inline

Insert of inner and outer TrackNodes of a Segment as SpacePoints into path of SpacePoints.

Definition at line 51 of file NetworkPathConversion.h.

52 {
53 if (target.empty()) {
54 insertSpacePoint(target, *(source.getInnerHit()));
55 insertSpacePoint(target, *(source.getOuterHit()));
56 } else {
57 insertSpacePoint(target, *(source.getOuterHit()));
58 }
59 }

◆ IterativeEventTimeExtractor()

Add the subfindlet as listener.

Definition at line 23 of file IterativeEventTimeExtractor.icc.h.

◆ LayerPXDRelationFilter()

Add the filter as listener.

Definition at line 24 of file LayerPXDRelationFilter.icc.h.

24 : Super()
25 {
28 }
TrackFindingCDC::RelationFilter< CKFToPXDState > Super
The parent class.

◆ LayerSVDRelationFilter()

Add the filter as listener.

Definition at line 26 of file LayerSVDRelationFilter.icc.h.

26 : Super()
27 {
30 }
TrackFindingCDC::RelationFilter< CKFToSVDState > Super
The parent class.

◆ LayerToggledApplier()

◆ LimitedOnStateApplier()

Constructor adding the findlet as a listener.

Definition at line 24 of file LimitedOnStateApplier.icc.h.

25 {
27 };

◆ MHt() [1/2]

TMatrixD MHt ( const TMatrixD &  M) const
override

Calculate M * H^T = first column of M.

Definition at line 59 of file HMatrixQP.cc.

60 {
61 assert(M.GetNcols() == 5);
62
63 TMatrixD returnMatrix(M.GetNrows(), 1);
64
65 for (int i = 0; i < M.GetNrows(); ++i) {
66 returnMatrix(i, 0) = M(0, i);
67 }
68
69 return returnMatrix;
70 }

◆ MHt() [2/2]

TMatrixD MHt ( const TMatrixDSym &  M) const
override

Calculate M * H^T = first column of M.

Definition at line 45 of file HMatrixQP.cc.

46 {
47 assert(M.GetNcols() == 5);
48
49 TMatrixD returnVector(5, 1);
50
51 for (unsigned int i = 0; i < 5; ++i) {
52 returnVector(i, 0) = M(0, i);
53 }
54
55 return returnVector;
56 }

◆ operator!()

Filter< OperatorNot, Filter< types... >, VoidObserver > operator! ( const Filter< types... > &  filter)

Definition of the NOT operator ! for the Filter class.

Template Parameters
types: template pack defining the filter
Parameters
filter: filter to which the NOT operator shall be added
Returns
!filter, so a filter with NOT operator attached

Definition at line 583 of file Filter.h.

584 {
585 return Filter<OperatorNot, Filter<types...>, VoidObserver>(filter);
586 }

◆ operator&&()

Filter< Belle2::OperatorAnd, Belle2::Filter< types1... >, Belle2::Filter< types2... >, Belle2::VoidObserver > operator&& ( const Filter< types1... > &  filter1,
const Filter< types2... > &  filter2 
)

Definition of the boolean AND operator && of the Filter class.

Template Parameters
types1: template pack of filter A
types2: template pack of filter B
Parameters
filter1: filter A
filter2: filter B
Returns
Boolean AND combination of the two filters

Definition at line 753 of file Filter.h.

754 {
755 return Filter<OperatorAnd, Filter<types1...>, Filter<types2...>, VoidObserver> (filter1, filter2);
756 }

◆ operator()() [1/6]

TrackFindingCDC::Weight operator() ( const CKFToPXDState from,
const CKFToPXDState to 
)
override

Give a final weight to the possibilities by asking the filter.

Definition at line 170 of file LayerPXDRelationFilter.icc.h.

171 {
172 return m_filter(std::make_pair(&from, &to));
173 }

◆ operator()() [2/6]

TrackFindingCDC::Weight operator() ( const CKFToSVDState from,
const CKFToSVDState to 
)
final

Give a final weight to the possibilities by asking the filter.

Definition at line 132 of file LayerSVDRelationFilter.icc.h.

133 {
134 return m_filter(std::make_pair(&from, &to));
135 }

◆ operator()() [3/6]

TrackFindingCDC::Weight operator() ( const Object object)
virtual

The filter operator for this class.

Reimplemented in LimitedOnStateApplier< AState, AFilter >.

Definition at line 37 of file OnStateApplier.icc.h.

38 {
39 return NAN;
40 };

◆ operator()() [4/6]

TrackFindingCDC::Weight operator() ( const Object object)
overridevirtual

Copy the filter operator to this method.

Reimplemented from OnStateApplier< AState >.

Definition at line 42 of file LimitedOnStateApplier.icc.h.

43 {
44 return m_filter(object);
45 };

◆ operator()() [5/6]

TrackFindingCDC::Weight operator() ( const Object pair)
final

Main function testing the object for the direction.

Definition at line 27 of file NonIPCrossingStateFilter.icc.h.

28 {
29 if (std::isnan(AllStateFilter::operator()(pair))) {
30 return NAN;
31 }
32
33 const auto& previousStates = pair.first;
34 auto* state = pair.second;
35
36 const RecoTrack* cdcTrack = previousStates.front()->getSeed();
37 B2ASSERT("Path without seed?", cdcTrack);
38
39 const SpacePoint* spacePoint = state->getHit();
40 B2ASSERT("Path without hit?", spacePoint);
41
42 const genfit::MeasuredStateOnPlane& firstMeasurement = [&state, &previousStates]() {
43 if (state->mSoPSet()) {
44 return state->getMeasuredStateOnPlane();
45 } else {
46 B2ASSERT("Previous state was not fitted?", previousStates.back()->mSoPSet());
47 return previousStates.back()->getMeasuredStateOnPlane();
48 }
49 }();
50
51 const TrackFindingCDC::Vector3D& position = static_cast<TrackFindingCDC::Vector3D>(firstMeasurement.getPos());
52 const TrackFindingCDC::Vector3D& momentum = static_cast<TrackFindingCDC::Vector3D>(firstMeasurement.getMom());
53
54 const TrackFindingCDC::CDCTrajectory2D trajectory2D(position.xy(), 0, momentum.xy(), cdcTrack->getChargeSeed());
55
56 const TrackFindingCDC::Vector3D& hitPosition = static_cast<TrackFindingCDC::Vector3D>(spacePoint->getPosition());
57 const TrackFindingCDC::Vector2D origin(0, 0);
58
59 const double deltaArcLengthHitOrigin = trajectory2D.calcArcLength2DBetween(hitPosition.xy(), origin);
60 const double deltaArcLengthTrackHit = trajectory2D.calcArcLength2D(hitPosition.xy());
61
62 if (not arcLengthInRightDirection(deltaArcLengthTrackHit, m_param_direction) or
63 not arcLengthInRightDirection(deltaArcLengthHitOrigin, m_param_direction)) {
64 return NAN;
65 }
66
67 return 1.0;
68 }
constexpr bool arcLengthInRightDirection(double arcLength2D, TrackFindingCDC::EForwardBackward forwardBackward)
Given the calculated arc length between a start point and an end point, checks if the travelled path ...

◆ operator()() [6/6]

TrackFindingCDC::Weight operator() ( const std::pair< const CKFToSVDState *, const CKFToSVDState * > &  relation)
override

Give a final weight to the possibilities by asking the filter.

Definition at line 38 of file SectorMapBasedSVDPairFilter.cc.

40 {
41 const CKFToSVDState* fromState = relation.first;
42 const CKFToSVDState* toState = relation.second;
43
44 B2ASSERT("From and to state must be set", fromState and toState);
45
46 const CKFToSVDState::stateCache& outerStateCache = fromState->getStateCache();
47 const CKFToSVDState::stateCache& innerStateCache = toState->getStateCache();
48
49 B2ASSERT("Both hits must be present!", outerStateCache.isHitState and innerStateCache.isHitState);
50
51 // TODO maybe it would be better to look for the full IDs first; maybe not
52 B2ASSERT("Outer hit is invalid",
53 m_vxdtfFilters->areCoordinatesValid(outerStateCache.sensorID, outerStateCache.localNormalizedu, outerStateCache.localNormalizedv));
54 B2ASSERT("Inner hit is invalid",
55 m_vxdtfFilters->areCoordinatesValid(innerStateCache.sensorID, innerStateCache.localNormalizedu, innerStateCache.localNormalizedv));
56
57 FullSecID outerSecID = m_vxdtfFilters->getFullID(outerStateCache.sensorID, outerStateCache.localNormalizedu,
58 outerStateCache.localNormalizedv);
59 FullSecID innerSecID = m_vxdtfFilters->getFullID(innerStateCache.sensorID, innerStateCache.localNormalizedu,
60 innerStateCache.localNormalizedv);
61
62 const auto* outerStaticSector = m_vxdtfFilters->getStaticSector(outerSecID);
63
64 const auto* filter = outerStaticSector->getFilter2sp(innerSecID);
65 if (not filter) {
66 return NAN;
67 }
68
69 const SpacePoint* outerHit = fromState->getHit();
70 const SpacePoint* innerHit = toState->getHit();
71
72 if (not filter->accept(*outerHit, *innerHit)) {
73 return NAN;
74 }
75
76 B2INFO(outerSecID.getVxdID() << " -> " << innerSecID.getVxdID());
77 return 1;
78 }
FullSecID getFullID(VxdID aSensorID, double normalizedU, double normalizedV) const
returns fullSecID for given sensorID and local coordinates.
Definition: VXDTFFilters.h:259
bool areCoordinatesValid(VxdID aSensorID, double normalizedU, double normalizedV) const
check if using getFullID() would be safe (true if it is safe):
Definition: VXDTFFilters.h:248
const staticSector_t * getStaticSector(const FullSecID secID) const
returns pointer to static sector for given fullSecID.
Definition: VXDTFFilters.h:220
std::map< ExpRun, std::pair< double, double > > filter(const std::map< ExpRun, std::pair< double, double > > &runs, double cut, std::map< ExpRun, std::pair< double, double > > &runsRemoved)
filter events to remove runs shorter than cut, it stores removed runs in runsRemoved
Definition: Splitter.cc:38
B2Vector3D outerHit(0, 0, 0)
testing out of range behavior

◆ operator<() [1/3]

std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< Arithmetic >::value, Filter< Var, LowerBoundedSet< Arithmetic >, VoidObserver > >::type operator< ( Arithmetic  lowerBound,
const Var &   
)

Creates a Filters with an lower bound > on the provided variable lowerBound < Var.

Template Parameters
Var: variable type to use for the filter
Arithmetic: type of the return value of the variable function
Parameters
lowerBound: lower bound value to be checked by the filter
Returns
the created filter

Definition at line 171 of file Shortcuts.h.

173 {
174 return Filter<Var, LowerBoundedSet<Arithmetic>, VoidObserver>(LowerBoundedSet<Arithmetic> (lowerBound));
175 }

◆ operator<() [2/3]

std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< ArithmeticLower >::value &&std::is_arithmetic< ArithmeticUpper >::value, Filter< Var, Range< ArithmeticLower, ArithmeticUpper >, Observer > >::type operator< ( const Filter< Var, LowerBoundedSet< ArithmeticLower >, Observer > &  filter,
ArithmeticUpper  upperBound 
)

Adding upper bound to filter with lower bound to create a filter with an allowed range between lower and upper bound.

(Var with lowerBound) < upperBound

Template Parameters
Var: variable type to be used for the filter
ArithmeticLower: type of lower bound
ArithmeticUpper: type of upper bound
Observer: observer type
Parameters
filter: filter with lower bound to which the upper bound shall be added
upperBound: value of upper bound
Returns
filter with range allowing values between lower and upper bound

Definition at line 255 of file Shortcuts.h.

257 {
258 return Filter<Var, Range<ArithmeticLower, ArithmeticUpper>, Observer>
259 (Range<ArithmeticLower, ArithmeticUpper> (filter.getRange().getInf(), upperBound));
260 }

◆ operator<() [3/3]

std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< Arithmetic >::value, Filter< Var, UpperBoundedSet< Arithmetic >, VoidObserver > >::type operator< ( const Var &  ,
Arithmetic  upperBound 
)

Creates a Filters with an upper bound < on the provided variable Var < lowerBound.

Template Parameters
Var: variable type to use for the filter
Arithmetic: type of the return value of the variable function
types: other types
Parameters
upperBound: upper bound value to be checked by the filter
Returns
the created filter

Definition at line 48 of file Shortcuts.h.

50 {
51 return Filter<Var, UpperBoundedSet<Arithmetic>, VoidObserver>(UpperBoundedSet<Arithmetic> (upperBound));
52 }

◆ operator<<() [1/2]

std::ostream & operator<< ( std::ostream &  output,
const CDCCKFPath path 
)

Output operator for the collection of CDC CKF-algorithm states.

Definition at line 15 of file CDCCKFPath.cc.

16 {
17 output << "[";
18 for (const auto& state : path) {
19 output << state << ", ";
20 }
21 output << "]";
22 return output;
23 }

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream &  output,
const CDCCKFState state 
)

print state info

Definition at line 15 of file CDCCKFState.cc.

16 {
17 if (state.isSeed()) {
18 output << "seed";
19 } else {
20 const auto* wireHit = state.getWireHit();
21 const auto& wire = wireHit->getWire();
22 output << wire.getICLayer() << " " << wire.getIWire();
23 }
24 return output;
25 }

◆ operator<=() [1/3]

std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< Arithmetic >::value, Filter< Var, ClosedLowerBoundedSet< Arithmetic >, VoidObserver > >::type operator<= ( Arithmetic  lowerBound,
const Var &   
)

Creates a Filters with a closed lower bound >= on the provided variable lowerBound <= Var.

Template Parameters
Var: variable type to use for the filter
Arithmetic: type of the return value of the variable function
Parameters
lowerBound: lower bound value to be checked by the filter
Returns
the created filter

Definition at line 191 of file Shortcuts.h.

193 {
194 return Filter<Var, ClosedLowerBoundedSet<Arithmetic>, VoidObserver>(ClosedLowerBoundedSet<Arithmetic> (lowerBound));
195 }

◆ operator<=() [2/3]

std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< ArithmeticLower >::value &&std::is_arithmetic< ArithmeticUpper >::value, Filter< Var, ClosedRange< ArithmeticLower, ArithmeticUpper >, Observer > >::type operator<= ( const Filter< Var, ClosedLowerBoundedSet< ArithmeticLower >, Observer > &  filter,
ArithmeticUpper  upperBound 
)

Adding closed upper bound to filter with closed lower bound to create a filter with an allowed closed range between lower and upper bound.

(Var with closed lowerBound) <= upperBound

Template Parameters
Var: variable type to be used for the filter
ArithmeticLower: type of lower bound
ArithmeticUpper: type of upper bound
Observer: observer type
Parameters
filter: filter with lower bound to which the upper bound shall be added
upperBound: value of upper bound
Returns
filter with closed range allowing values between lower and upper bound

Definition at line 307 of file Shortcuts.h.

309 {
310 return Filter<Var, ClosedRange<ArithmeticLower, ArithmeticUpper>, Observer>
311 (ClosedRange<ArithmeticLower, ArithmeticUpper> (filter.getRange().getInf(), upperBound));
312 }

◆ operator<=() [3/3]

std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< Arithmetic >::value, Filter< Var, ClosedUpperBoundedSet< Arithmetic >, VoidObserver > >::type operator<= ( const Var &  ,
Arithmetic  upperBound 
)

Creates a Filters with a closed upper bound <= on the provided variable Var <= lowerBound.

Template Parameters
Var: variable type to use for the filter
Arithmetic: type of the return value of the variable function
types: other types
Parameters
upperBound: upper bound value to be checked by the filter
Returns
the created filter

Definition at line 71 of file Shortcuts.h.

73 {
74 return Filter<Var, ClosedUpperBoundedSet<Arithmetic>, VoidObserver>(ClosedUpperBoundedSet<Arithmetic> (upperBound));
75 }

◆ operator==() [1/7]

bool operator== ( const AlgoritmType::Type a,
const AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > &  b 
)
inline

non-memberfunction Comparison for equality with a AlgoritmType::Type

Definition at line 191 of file AnalyzingAlgorithmBase.h.

192 { return (a == b.getID()); }

◆ operator==() [2/7]

bool operator== ( const AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > &  a,
const AlgoritmType::Type b 
)
inline

non-memberfunction Comparison for equality with a AlgoritmType::Type

Definition at line 185 of file AnalyzingAlgorithmBase.h.

186 { return (a.getID() == b); }

◆ operator==() [3/7]

bool operator== ( const AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > &  a,
const std::string &  b 
)
inline

non-memberfunction Comparison for equality with a std::string

Definition at line 173 of file AnalyzingAlgorithmBase.h.

174 { return (a.getIDName() == b); }

◆ operator==() [4/7]

bool operator== ( const EntryType &  a,
const DirectedNode< EntryType, MetaInfoType > &  b 
)

************************* NON-MEMBER FUNCTIONS *************************

Non-memberfunction Comparison for equality with EntryType <-> DirectedNode< EntryType >

Definition at line 131 of file DirectedNode.h.

132 {
133 return (a == b.getConstEntry());
134 }

◆ operator==() [5/7]

bool operator== ( const std::string &  a,
const AnalyzingAlgorithmBase< DataType, TCInfoType, VectorType > &  b 
)
inline

non-memberfunction Comparison for equality with a std::string

Definition at line 179 of file AnalyzingAlgorithmBase.h.

180 { return (a == b.getIDName()); }

◆ operator==() [6/7]

std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value, Filter< Var, SingleElementSet< Val >, VoidObserver > >::type operator== ( const Var &  ,
Val  v 
)

Creates a Filters to compare a variable against a given value Var == Val;.

Template Parameters
Var: variable type to use for the filter
Val: value type to compare variable against
Parameters
v: value to compare variable against
Returns
the created filter

Definition at line 211 of file Shortcuts.h.

212 {
213 return Filter<Var, SingleElementSet<Val>, VoidObserver>(SingleElementSet<Val> (v));
214 }

◆ operator==() [7/7]

std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value, Filter< Var, SingleElementSet< Val >, VoidObserver > >::type operator== ( Val  val,
const Var &  var 
)

Creates a Filters to compare a variable against a given value Val == Var;.

Template Parameters
Var: variable type to be used for the filter
Val: value type to compare variable against
Parameters
val: value to compare variable against
var: variable
Returns
the created filter

Definition at line 231 of file Shortcuts.h.

232 {
233 return var == val;
234 }

◆ operator>() [1/3]

std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< Arithmetic >::value, Filter< Var, UpperBoundedSet< Arithmetic >, VoidObserver > >::type operator> ( Arithmetic  upperBound,
const Var &   
)

Creates a Filters with an upper bound < on the provided variable upperBound > Var.

Template Parameters
Var: variable type to use for the filter
Arithmetic: type of the return value of the variable function
Parameters
upperBound: upper bound value to be checked by the filter
Returns
the created filter

Definition at line 132 of file Shortcuts.h.

133 {
134 return Filter<Var, UpperBoundedSet<Arithmetic>, VoidObserver>(UpperBoundedSet<Arithmetic> (upperBound));
135 }

◆ operator>() [2/3]

std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< ArithmeticLower >::value &&std::is_arithmetic< ArithmeticUpper >::value, Filter< Var, Range< ArithmeticLower, ArithmeticUpper >, Observer > >::type operator> ( const Filter< Var, UpperBoundedSet< ArithmeticUpper >, Observer > &  filter,
ArithmeticLower  lowerBound 
)

Adding lower bound to filter with upper bound to create a filter with an allowed range between lower and upper bound.

(Var with upperBound) > lowerBound

Template Parameters
Var: variable type to be used for the filter
ArithmeticLower: type of lower bound
ArithmeticUpper: type of upper bound
Observer: observer type
Parameters
filter: filter with lower bound to which the upper bound shall be added
lowerBound: value of lower bound
Returns
filter with range allowing values between lower and upper bound

Definition at line 282 of file Shortcuts.h.

283 {
284 return Filter<Var, Range<ArithmeticLower, ArithmeticUpper>, Observer>
285 (Range<ArithmeticLower, ArithmeticUpper> (lowerBound, filter.getRange().getSup()));
286 }

◆ operator>() [3/3]

std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< Arithmetic >::value, Filter< Var, LowerBoundedSet< Arithmetic >, VoidObserver > >::type operator> ( const Var &  ,
Arithmetic  lowerBound 
)

Creates a Filters with an lower bound > on the provided variable Var > lowerBound.

Template Parameters
Var: variable type to use for the filter
Arithmetic: type of the return value of the variable function
Parameters
lowerBound: lower bound value to be checked by the filter
Returns
the created filter

Definition at line 92 of file Shortcuts.h.

93 {
94 return Filter<Var, LowerBoundedSet<Arithmetic>, VoidObserver >(LowerBoundedSet<Arithmetic> (lowerBound));
95 }

◆ operator>=() [1/3]

std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< Arithmetic >::value, Filter< Var, ClosedUpperBoundedSet< Arithmetic >, VoidObserver > >::type operator>= ( Arithmetic  upperBound,
const Var &   
)

Creates a Filters with a closed upper bound <= on the provided variable upperBound >= Var.

Template Parameters
Var: variable type to use for the filter
Arithmetic: type of the return value of the variable function
Parameters
upperBound: upper bound value to be checked by the filter
Returns
the created filter

Definition at line 152 of file Shortcuts.h.

153 {
154 return Filter<Var, ClosedUpperBoundedSet<Arithmetic>, VoidObserver>(ClosedUpperBoundedSet<Arithmetic> (upperBound));
155 }

◆ operator>=() [2/3]

std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< ArithmeticLower >::value &&std::is_arithmetic< ArithmeticUpper >::value, Filter< Var, ClosedRange< ArithmeticLower, ArithmeticUpper >, Observer > >::type operator>= ( const Filter< Var, ClosedUpperBoundedSet< ArithmeticUpper >, Observer > &  filter,
ArithmeticLower  lowerBound 
)

Adding closed lower bound to filter with closed upper bound to create a filter with an allowed closed range between lower and upper bound.

(Var with closed upperBound) >= lowerBound

Template Parameters
Var: variable type to be used for the filter
ArithmeticLower: type of lower bound
ArithmeticUpper: type of upper bound
Observer: observer type
Parameters
filter: filter with lower bound to which the upper bound shall be added
lowerBound: value of lower bound
Returns
filter with closed range allowing values between lower and upper bound

Definition at line 334 of file Shortcuts.h.

335 {
336 return Filter<Var, ClosedRange<ArithmeticLower, ArithmeticUpper>, Observer>
337 (ClosedRange<ArithmeticLower, ArithmeticUpper> (lowerBound, filter.getRange().getSup()));
338 }

◆ operator>=() [3/3]

std::enable_if< std::is_base_of< SelectionVariable< typenameVar::argumentType, Var::c_Nargs, typenameVar::variableType >, Var >::value &&std::is_arithmetic< Arithmetic >::value, Filter< Var, ClosedLowerBoundedSet< Arithmetic >, VoidObserver > >::type operator>= ( const Var &  ,
Arithmetic  lowerBound 
)

Creates a Filters with a closed lower bound >= on the provided variable Var >= lowerBound.

Template Parameters
Var: variable type to use for the filter
Arithmetic: type of the return value of the variable function
Parameters
lowerBound: lower bound value to be checked by the filter
Returns
the created filter

Definition at line 112 of file Shortcuts.h.

113 {
114 return Filter<Var, ClosedLowerBoundedSet<Arithmetic>, VoidObserver >(ClosedLowerBoundedSet<Arithmetic> (lowerBound));
115 }

◆ operator||()

Filter< Belle2::OperatorOr, Belle2::Filter< types1... >, Belle2::Filter< types2... >, Belle2::VoidObserver > operator|| ( const Filter< types1... > &  filter1,
const Filter< types2... > &  filter2 
)

Definition of the boolean OR operator || of the Filter class.

Template Parameters
types1: template pack of filter A
types2: template pack of filter B
Parameters
filter1: filter A
filter2: filter B
Returns
Boolean OR combination of the two filters

Definition at line 925 of file Filter.h.

926 {
927 return Filter<OperatorOr, Filter<types1...>, Filter<types2...>, VoidObserver> (filter1, filter2);
928 }

◆ OverlapResolver()

Construct this findlet and add the subfindlet as listener.

Definition at line 29 of file OverlapResolver.icc.h.

29 : Super()
30 {
32 }
TrackFindingCDC::Findlet< typename AFilter::Object, typename AFilter::Object > Super
The parent class.

◆ print()

std::string print

print the matrix to a string.

Format: a row, a line, elements of rows delimited by a space. No trailing newline after last row!

Definition at line 165 of file DecorrelationMatrix.h.

166 {
167 std::stringstream sstr{};
168 sstr << std::setprecision(std::numeric_limits<double>::digits10 + 1) << m_matrix; // ensure precision at write-out
169 return sstr.str();
170 }

◆ Print()

void Print ( const Option_t *  = "") const
overridevirtual

Print a symbol for the matrix for debugging.

Definition at line 81 of file HMatrixQP.cc.

82 {
83 std::cout << "V" << std::endl;
84 }

◆ printMap()

std::string printMap ( const MapType &  aMap)

get the contents of the map as string.

NOTE: should compile without warning for any map (e.g. map, multimap, unordered_map,...) with key and values of a type that have a defined stream insertion operator (only tested for multimap and unordered_multimap!)

Definition at line 154 of file MapHelperFunctions.h.

155 {
156 if (aMap.empty()) return std::string("passed map is empty!");
157
158 typedef typename MapType::key_type keyT;
159 typedef typename MapType::mapped_type mapT;
160
161 std::stringstream mapContent;
162 mapContent << "content of map:\n";
163 for (keyT key : getUniqueKeys(aMap)) {
164 mapContent << "key: " << key << " -> value(s):";
165 for (mapT value : getValuesToKey(aMap, key)) { mapContent << " " << value; }
166 mapContent << "\n";
167 }
168
169 return mapContent.str() + "\n"; // terminate with endline
170 }

◆ readFromStream()

bool readFromStream ( std::istream &  is)

read from stream.

Expected format: a row per line, elements of rows delimited by a space. returns true if operation was successful, false otherwise

NOTE: it is only checked if enough elements are present in each row and column. However, any superfluous values are ignored.

Definition at line 173 of file DecorrelationMatrix.h.

174 {
175 MatrixT inMat{};
176 using RVector = Eigen::Matrix<double, 1, Ndims, Eigen::RowMajor>; // typedef for row vector
177
178 size_t iRow = 0;
179 while (iRow < Ndims) { // read only as many lines as needed
180 std::string line{};
181 if (is.eof()) return false;
182 std::getline(is, line);
183 if (line.empty()) continue; // skip empty lines
184 std::stringstream lstr(line);
185 std::array<double, Ndims> linevalues;
186 for (double& value : linevalues) { // read only as many values in the line as needed
187 if (lstr.eof()) return false;
188 lstr >> value;
189 }
190 inMat.row(iRow) = Eigen::Map<const RVector>(linevalues.data(), linevalues.size());
191 ++iRow;
192 }
193
194 m_matrix = inMat;
195 return true;
196 }
Eigen::Matrix< double, Ndims, Ndims, Eigen::RowMajor > MatrixT
typedef for consistent type across class

◆ readSamplesFromStream()

static void readSamplesFromStream ( std::istream &  is,
std::vector< FBDTTrainSample< Ndims > > &  samples 
)
static

read samples from stream and append them to samples

Definition at line 42 of file FBDTClassifierHelper.h.

43 {
44 size_t nSamplesBefore = samples.size();
45 std::string line;
46 while (!is.eof()) {
47 getline(is, line);
48 if (line.empty()) continue; // ignore empty lines
49 std::stringstream ss(line);
50 std::array<double, 9> coords;
51 for (double& c : coords) ss >> c;
52 bool sig; ss >> sig;
53
54 samples.push_back(FBDTTrainSample<9>(coords, sig));
55 }
56
57 B2INFO("Read in " << (samples.size() - nSamplesBefore) << " samples.");
58 }

◆ resetEventT0()

void resetEventT0
protected

Reset the t0 value to cached value if it exists or clear it otherwise.

Definition at line 59 of file BaseEventTimeExtractor.icc.h.

60 {
61 if (m_eventT0Before) {
62 m_eventT0->setEventT0(*m_eventT0Before);
63 } else {
64 m_eventT0->clearEventT0();
65 }
66 }

◆ ROIToUnitTranslator() [1/2]

ROIToUnitTranslator ( const ROIinfo theROIinfo)
explicit

Constructor.

Definition at line 23 of file ROIToUnitTranslator.templateDetails.h.

24 : m_sigmaSystU(theROIinfo->sigmaSystU)
25 , m_sigmaSystV(theROIinfo->sigmaSystV)
26 , m_numSigmaTotU(theROIinfo->numSigmaTotU)
27 , m_numSigmaTotV(theROIinfo->numSigmaTotV)
28 , m_maxWidthU(theROIinfo->maxWidthU)
29 , m_maxWidthV(theROIinfo->maxWidthV)
30 {};
double sigmaSystV
fixed width to add in quadrature to the extrapolation error and obtain the ROI V width
Definition: ROIinfo.h:17
double numSigmaTotU
number of sigma (stat+syst) determining the U width of the ROI
Definition: ROIinfo.h:18
double maxWidthU
maximum U width of the ROI
Definition: ROIinfo.h:20
double sigmaSystU
fixed width to add in quadrature to the extrapolation error and obtain the ROI U width
Definition: ROIinfo.h:16
double numSigmaTotV
number of sigma (stat+syst) determining the U width of the ROI
Definition: ROIinfo.h:19
double maxWidthV
maximum U width of the ROI
Definition: ROIinfo.h:21

◆ ROIToUnitTranslator() [2/2]

ROIToUnitTranslator ( double  sigmaSystU,
double  sigmaSystV,
double  numSigmaTotU,
double  numSigmaTotV,
double  maxWidthU,
double  maxWidthV 
)

Second Constructor.

Definition at line 33 of file ROIToUnitTranslator.templateDetails.h.

36 : m_sigmaSystU(sigmaSystU)
37 , m_sigmaSystV(sigmaSystV)
38 , m_numSigmaTotU(numSigmaTotU)
39 , m_numSigmaTotV(numSigmaTotV)
40 , m_maxWidthU(maxWidthU)
41 , m_maxWidthV(maxWidthV)
42 {};

◆ SelectionVariableNamesToFunctions() [1/4]

std::unordered_map< std::string, typename FilterA::functionType > SelectionVariableNamesToFunctions ( Belle2::Filter< Belle2::OperatorAnd, FilterA, FilterB, options... >  )

Wrapper for filters with AND Operator tag.

Template Parameters
FilterA: a Filter variable type
FilterB: another Filter variable type
options: optional types
Returns
unordered map relating strings to the filter variable functions

Definition at line 71 of file SelectionVariableNamesToFunctions.h.

73 {
74 auto result = SelectionVariableNamesToFunctions(FilterA());
75 auto resultB = SelectionVariableNamesToFunctions(FilterB());
76 result.insert(resultB.begin(), resultB.end());
77 return result;
78 }

◆ SelectionVariableNamesToFunctions() [2/4]

std::unordered_map< std::string, typename someFilter::functionType > SelectionVariableNamesToFunctions ( Belle2::Filter< Belle2::OperatorNot, someFilter, options... >  )

Wrapper for filters with NOT Operator tag.

Template Parameters
someFilter: Filter variable type
options: optional types
Returns
unordered map relating strings to the filter variable functions

Definition at line 52 of file SelectionVariableNamesToFunctions.h.

54 {
55 return SelectionVariableNamesToFunctions(someFilter());
56 }

◆ SelectionVariableNamesToFunctions() [3/4]

std::unordered_map< std::string, typename FilterA::functionType > SelectionVariableNamesToFunctions ( Belle2::Filter< Belle2::OperatorOr, FilterA, FilterB, options... >  )

Wrapper for filters with OR Operator tag.

Template Parameters
FilterA: a Filter variable type
FilterB: another Filter variable type
options: optional types
Returns
unordered map relating strings to the filter variable functions

Definition at line 93 of file SelectionVariableNamesToFunctions.h.

95 {
96 auto result = SelectionVariableNamesToFunctions(FilterA());
97 auto resultB = SelectionVariableNamesToFunctions(FilterB());
98 result.insert(resultB.begin(), resultB.end());
99 return result;
100 }

◆ SelectionVariableNamesToFunctions() [4/4]

std::unordered_map< std::string, typename Variable::functionType > SelectionVariableNamesToFunctions ( Belle2::Filter< Variable, Range, Options... >  )

Return a map from the SelectionVariable name to the SelectionVariable function of the Variable used in the filter that is the template argument parameter.

This is the basic building block we will exploit later

Template Parameters
Variable: Filter variable type
Range: range type
Options: optional types
Returns
unordered map relating strings to the filter variable functions

Definition at line 35 of file SelectionVariableNamesToFunctions.h.

36 {
37 // Note: Variable::value is the pointer to the function that return the values
38 return std::unordered_map< std::string, typename Variable::functionType>
39 ({ {Variable::name(), Variable::value } });
40 };

◆ StateRejecter()

Construct this findlet and add the subfindlet as listener.

Definition at line 21 of file StateRejecter.icc.h.

21 : Super()
22 {
28 };
TrackFindingCDC::Findlet< const TrackFindingCDC::WithWeight< const AState * >, TrackFindingCDC::WithWeight< AState * > > Super
Parent class.

◆ TBranchLeafType() [1/12]

char TBranchLeafType ( const bool &  )
inline

Overloading TBranchLeafType to be able to get identifier 'O' for type bool.

Definition at line 52 of file TBranchLeafType.h.

52{ return 'O'; };

◆ TBranchLeafType() [2/12]

char TBranchLeafType ( const char *  )
inline

Overloading TBranchLeafType to be able to get identifier 'C' for type char*.

Definition at line 19 of file TBranchLeafType.h.

19{ return 'C'; };

◆ TBranchLeafType() [3/12]

char TBranchLeafType ( const Char_t &  )
inline

Overloading TBranchLeafType to be able to get identifier 'B' for type Char_t.

Definition at line 22 of file TBranchLeafType.h.

22{ return 'B'; };

◆ TBranchLeafType() [4/12]

char TBranchLeafType ( const Double_t &  )
inline

Overloading TBranchLeafType to be able to get identifier 'D' for type Double_t.

Definition at line 43 of file TBranchLeafType.h.

43{ return 'D'; };

◆ TBranchLeafType() [5/12]

char TBranchLeafType ( const Float_t &  )
inline

Overloading TBranchLeafType to be able to get identifier 'F' for type Float_t.

Definition at line 40 of file TBranchLeafType.h.

40{ return 'F'; };

◆ TBranchLeafType() [6/12]

char TBranchLeafType ( const Int_t &  )
inline

Overloading TBranchLeafType to be able to get identifier 'I' for type Int_t.

Definition at line 34 of file TBranchLeafType.h.

34{ return 'I'; };

◆ TBranchLeafType() [7/12]

char TBranchLeafType ( const long int &  )
inline

Overloading TBranchLeafType to be able to get identifier 'L' for type long int.

Definition at line 46 of file TBranchLeafType.h.

46{ return 'L'; };

◆ TBranchLeafType() [8/12]

char TBranchLeafType ( const short &  )
inline

Overloading TBranchLeafType to be able to get identifier 'S' for type short.

Definition at line 28 of file TBranchLeafType.h.

28{ return 'S'; };

◆ TBranchLeafType() [9/12]

char TBranchLeafType ( const UInt_t &  )
inline

Overloading TBranchLeafType to be able to get identifier 'i' for type UInt_t.

Definition at line 37 of file TBranchLeafType.h.

37{ return 'i'; };

◆ TBranchLeafType() [10/12]

char TBranchLeafType ( const unsigned char &  )
inline

Overloading TBranchLeafType to be able to get identifier 'b' for type unsigned char.

Definition at line 25 of file TBranchLeafType.h.

25{ return 'b'; };

◆ TBranchLeafType() [11/12]

char TBranchLeafType ( const unsigned long int &  )
inline

Overloading TBranchLeafType to be able to get identifier 'l' for type unsigned long int.

Definition at line 49 of file TBranchLeafType.h.

49{ return 'l'; };

◆ TBranchLeafType() [12/12]

char TBranchLeafType ( const unsigned short &  )
inline

Overloading TBranchLeafType to be able to get identifier 's' for type unsigned short.

Definition at line 31 of file TBranchLeafType.h.

31{ return 's'; };

◆ TEST_F() [1/50]

TEST_F ( CollectorTFInfoTest  ,
testAllInformationLoop   
)

dummy comment: testAllInformationLoop

Definition at line 579 of file collectortfinfo.h.

580 {
581 bool false_item = false;
582 bool true_item = true;
583
584 import_sectors_loop();
585
586 import_clusters_loop();
587
588 m_collector.updateSectors(4, 1, "geloescht", 0, std::vector<int>(), std::vector<int>(), 0);
589
590 m_collector.updateClusters(3, "geloescht", 0, std::vector<int>(), std::vector<int>(), 0);
591
592 ASSERT_EQ("geloescht", m_collector.m_clustersTF[3].getDiedAt());
593 ASSERT_EQ(false_item, m_collector.m_clustersTF[3].getActive());
594
595 import_hit_loop();
596
597 m_collector.updateHit(1, "geloescht", 0, std::vector<int>(), std::vector<int>(), -1, -1, std::vector<int>());
598
599 ASSERT_EQ("geloescht", m_collector.m_hitTF[1].getDiedAt());
600 ASSERT_EQ(false_item, m_collector.m_hitTF[1].getActive());
601 ASSERT_EQ(true_item, m_collector.m_hitTF[2].getActive());
602
603 import_cell_loop();
604 m_collector.updateCell(3, "geloescht", 2, std::vector<int>(), std::vector<int>(), -1, -1, 0, std::vector<int>());
605
606 ASSERT_EQ("geloescht", m_collector.m_cellTF[3].getDiedAt());
607 ASSERT_EQ(false_item, m_collector.m_cellTF[3].getActive());
608 ASSERT_EQ(true_item, m_collector.m_cellTF[1].getActive());
609
610 import_tfc_loop();
611
612 m_collector.updateTC(2, "geloescht", 4, std::vector<int>(), std::vector<int>());
613
614 ASSERT_EQ("geloescht", m_collector.m_tfCandTF[2].getDiedAt());
615 ASSERT_EQ(false_item, m_collector.m_tfCandTF[2].getActive());
616 ASSERT_EQ(true_item, m_collector.m_tfCandTF[1].getActive());
617 }

◆ TEST_F() [2/50]

TEST_F ( FilterIDTest  ,
simpleTest   
)

Test simple Setters and Getters.

Definition at line 25 of file filterID.h.

26 {
27 // provides a useful filterType
28 Belle2::FilterID aFilterIDTranslator;
30 EXPECT_EQ(Belle2::FilterID::nameHelixParameterFit, aFilterIDTranslator.getFilterString(aFilterType));
31
32 EXPECT_EQ(aFilterType, aFilterIDTranslator.getFilterType(Belle2::FilterID::nameHelixParameterFit));
33
34 }
Class to identify a filter type used by sectorFriends.
Definition: FilterID.h:28
static filterTypes getFilterType(const std::string &filterString)
converts existing string with name of filter type into suitable enum value.
Definition: FilterID.cc:287
static const std::string nameHelixParameterFit
string name of filter helix Parameter Fit
Definition: FilterID.h:149
filterTypes
filterTyoes contains enums assigning unique values for each filter type allowing fast filter type rec...
Definition: FilterID.h:31
static std::string getFilterString(filterTypes filterType)
converts existing enum value into suitable string with name of filter type.
Definition: FilterID.h:231

◆ TEST_F() [3/50]

TEST_F ( FullSecIDTest  ,
bufferOverflowTest   
)

Unfinished test - shall test bufferOverflows...

Definition at line 176 of file fullSecID.h.

177 {
178 B2WARNING("TODO: FullSecIDTest:bufferOverflowTest should catch cases of bad user input");
179 // WARNING TODO should catch cases of bad user input
180 }

◆ TEST_F() [4/50]

TEST_F ( FullSecIDTest  ,
constructorAndGetterTests   
)

Test simple Setters and Getters.

Definition at line 26 of file fullSecID.h.

27 {
28 // first, we need a useful vxdID:
29 VxdID vxdID = VxdID(34624); // this should be a sensor on layer 4
30 int vxdIDInt = vxdID;
31
32 EXPECT_EQ(4, vxdID.getLayerNumber());
33
34 // now we are using the constructor with a VxdID, a subLayerID and a sectorID
35 bool subLayerID = true;
36 unsigned short sectorID = 15;
37 FullSecID aFullSecID = FullSecID(vxdID, subLayerID, sectorID);
38
39 EXPECT_EQ(4, aFullSecID.getLayerID());
40
41 EXPECT_EQ(subLayerID, aFullSecID.getSubLayerID());
42
43 EXPECT_EQ(vxdID, aFullSecID.getVxdID());
44
45 EXPECT_EQ(vxdIDInt, aFullSecID.getUniID());
46
47 EXPECT_EQ(sectorID, aFullSecID.getSecID());
48
49 // now we are using the second constructor using an encoded fullSecID (int) as input:
50
51 FullSecID anotherFullSecID = FullSecID(aFullSecID.getFullSecID());
52
53 EXPECT_EQ(4, anotherFullSecID.getLayerID());
54
55 EXPECT_EQ(subLayerID, anotherFullSecID.getSubLayerID());
56
57 EXPECT_EQ(vxdID, anotherFullSecID.getVxdID());
58
59 EXPECT_EQ(vxdIDInt, anotherFullSecID.getUniID());
60
61 EXPECT_EQ(aFullSecID.getSecID(), anotherFullSecID.getSecID());
62
63 EXPECT_EQ(aFullSecID.getFullSecID(), anotherFullSecID.getFullSecID());
64
65 // now we are using the third constructor using an encoded fullSecID (string) as input:
66 std::stringstream aSecIDString;
67 aSecIDString << aFullSecID.getLayerID() << aFullSecID.getSubLayerID() << "_" << int(aFullSecID.getVxdID()) << "_" <<
68 aFullSecID.getSecID();
69
70 FullSecID aThirdFullSecID = FullSecID(aSecIDString.str());
71
72 EXPECT_EQ(4, aThirdFullSecID.getLayerID());
73
74 EXPECT_EQ(subLayerID, aThirdFullSecID.getSubLayerID());
75
76 EXPECT_EQ(vxdID, aThirdFullSecID.getVxdID());
77
78 EXPECT_EQ(vxdIDInt, aThirdFullSecID.getUniID());
79
80 EXPECT_EQ(aFullSecID.getSecID(), aThirdFullSecID.getSecID());
81
82 EXPECT_EQ(aFullSecID.getFullSecID(), aThirdFullSecID.getFullSecID());
83
84 EXPECT_EQ(aSecIDString.str(), aThirdFullSecID.getFullSecString());
85
86 // now we are using the third constructor again using an encoded short fullSecID (string, used by filterCalculator) as input:
87 std::stringstream aSecIDString2;
88 aSecIDString2 << aFullSecID.getLayerID() << "_" << int(aFullSecID.getVxdID()) << "_" << aFullSecID.getSecID();
89
90 FullSecID aFourthFullSecID = FullSecID(aSecIDString2.str());
91
92 EXPECT_EQ(4, aFourthFullSecID.getLayerID());
93
94 EXPECT_FALSE(aFourthFullSecID.getSubLayerID());
95
96 EXPECT_EQ(vxdID, aFourthFullSecID.getVxdID());
97
98 EXPECT_EQ(vxdIDInt, aFourthFullSecID.getUniID());
99
100 EXPECT_EQ(FullSecID(vxdID, false, sectorID).getSecID(), aFourthFullSecID.getSecID());
101
102 EXPECT_NE(aSecIDString2.str(), aFourthFullSecID.getFullSecString()); // they should not be the same any more...
103
104
105 // testing copy constructor (and C++11 range based for-loops):
106 std::vector<FullSecID> testVector;
107 for (int i = 0; i < 5; ++i) {
108 testVector.push_back(aFullSecID);
109 }
110 for (auto aSecID : testVector) {
111 EXPECT_EQ(aFullSecID, aSecID);
112 }
113 }

◆ TEST_F() [5/50]

TEST_F ( FullSecIDTest  ,
overloadedOperatorTests   
)

testing the overloaded operators of the FullSecID-class

Definition at line 117 of file fullSecID.h.

118 {
119 //preparing stuff (procedures copied from constructorAndGetterTest):
120 VxdID vxdID = VxdID(34624); // this should be a sensor on layer 4
121 bool subLayerID = true;
122 unsigned short sectorID = 15;
123 FullSecID aFullSecID = FullSecID(vxdID, subLayerID, sectorID);
124 std::stringstream aSecIDString;
125 aSecIDString << aFullSecID.getLayerID() << aFullSecID.getSubLayerID() << "_" << int(aFullSecID.getVxdID()) << "_" <<
126 aFullSecID.getSecID();
127
128 FullSecID aFullSecID2 = FullSecID(aSecIDString.str());
129
130 // now the checks:
131 EXPECT_EQ(static_cast<unsigned int>(aFullSecID), aFullSecID2); // directly comparing to an int
132
133 EXPECT_EQ(aSecIDString.str(), std::string(aFullSecID2)); // directly comparing to an string - testing string cast
134
135 EXPECT_EQ(aFullSecID, aFullSecID2); // direct comparison
136
137
138 std::stringstream aSecIDStream, aSecIDStream2;
139 aSecIDStream << aFullSecID2;
140 aSecIDStream2 << aSecIDString.str();
141
142 EXPECT_EQ(aSecIDString.str(), aSecIDStream.str()); // testing stream operator overloading after string-conversion
143
144 FullSecID aFullSecID3 = FullSecID(vxdID, false, sectorID); // same ID as above but now, the sublayerID is false instead of true
145
146 EXPECT_GT(aFullSecID2, aFullSecID3); // aFullSecID2 > aFullSecID3
147
148 for (int l1 = 7; l1 != 0; --l1) { // testing layerIDs
149 int l2 = l1;
150 l2--;
151 FullSecID biggerOne = FullSecID(l1, false, 0, 0);
152 FullSecID smallerOne = FullSecID(l2, false, 0, 0);
153 EXPECT_GT(biggerOne, smallerOne);
154 }
155 for (int s1 = 255; s1 != 0; --s1) { // testing sectorIDs
156 int s2 = s1;
157 s2--;
158 FullSecID biggerOne = FullSecID(6, false, 0, s1);
159 FullSecID smallerOne = FullSecID(6, false, 0, s2);
160 EXPECT_GT(biggerOne, smallerOne); // aFullSecID2 > aFullSecID3
161 int equalOne = smallerOne;
162 equalOne++;
163 EXPECT_EQ(int(biggerOne), equalOne);
164 }
165
166 EXPECT_GT(int(aFullSecID2), int(aFullSecID3));
167
168
169 FullSecID aFullSecID4 = aFullSecID;
170
171 EXPECT_EQ(aFullSecID4, aFullSecID); // testing assignment operator;
172 }

◆ TEST_F() [6/50]

TEST_F ( MapHelperFunctionsTest  ,
testCreatorFunctions   
)

test the methods that are use to create the maps for the later tests

Definition at line 111 of file mapHelperFunctions.cc.

112 {
113 unsigned int N = _nEntries; // same number as in setup
114 EXPECT_EQ(N, _nanMultiMap.size()); // test if creation worked (very basically by comparing the size of the returned _nanMap)
115 EXPECT_EQ(N, _nanMap.size());
116 EXPECT_EQ(N, _multimap.size());
117 EXPECT_EQ(N, _map.size());
118
119 ASSERT_TRUE(std::isnan(secans.operator()(0))) << "For the following tests to work properly this is expected to return a NaN (-nan)";
120
121// std::cout << printMap(_nanMap) << std::endl;
122// std::cout << printMap(_nanMultiMap) << std::endl;
123// std::cout << printMap(_multimap) << std::endl;
124// std::cout << printMap(_map) << std::endl;
125
126 // do some hard-coded queries to see if the _nanMaps were filled according to specified method
127 std::vector<int> possibleKeys = { 0, 1, 2, 3, 4, 5 };
128 for (int key : possibleKeys) {
129 std::vector<double> nanPossibleValues, possibleValues;
130 for (int arg = key; arg < _nEntries; arg += 6) {
131 nanPossibleValues.push_back(secans.operator()(arg));
132 possibleValues.push_back(sinHalf.operator()(arg));
133 }
134 // test the multimap with nan first
135 auto keyRange = _nanMultiMap.equal_range(key);
136 // check the numbers of stored values and of possible values
137 EXPECT_EQ(nanPossibleValues.size(), std::distance(keyRange.first, keyRange.second));
138 i2dMultiMap::iterator multiMapIt = keyRange.first;
139 for (int i = 0; i < std::distance(keyRange.first, keyRange.second); ++i) {
140 if (!std::isnan(multiMapIt->second)) { // cannot find nan value with std::find (NaN == NaN is always false)
141 auto findIt = std::find(nanPossibleValues.begin(), nanPossibleValues.end(), multiMapIt->second);
142 EXPECT_FALSE(findIt == nanPossibleValues.end()); // all stored values have to be possible
143 } else { // check if there is at least on NaN value in the possible Values
144 EXPECT_TRUE(std::count_if(nanPossibleValues.begin(), nanPossibleValues.end(),
145 [](const double & val) { return std::isnan(val); }) > 0);
146 }
147 ++multiMapIt;
148 }
149 keyRange = _multimap.equal_range(key);
150 EXPECT_EQ(possibleValues.size(), std::distance(keyRange.first, keyRange.second));
151 multiMapIt = keyRange.first;
152 for (int i = 0; i < std::distance(keyRange.first, keyRange.second); ++i) {
153 auto findIt = std::find(possibleValues.begin(), possibleValues.end(), multiMapIt->second);
154 EXPECT_FALSE(findIt == possibleValues.end());
155 ++multiMapIt;
156 }
157 }
158
159 for (unsigned int i = 0; i < N; ++i) {
160 auto range = _nanMap.equal_range(i);
161 i2dMap::iterator mapIt = range.first;
162 for (int j = 0; j < std::distance(range.first, range.second); ++j) {
163 if (std::isnan(mapIt->second)) {
164 B2INFO("Not Comparing value to key " << i << " because value is NaN, checking if the functor returns NaN for this key");
165 EXPECT_TRUE(std::isnan(secans.operator()(i))); // expect a NaN value from the operator
166 continue; // do not compare NaNs! (will always fail due to their nature)
167 }
168 EXPECT_DOUBLE_EQ(mapIt->second, secans.operator()(i));
169 ++mapIt;
170 }
171
172 range = _map.equal_range(i);
173 mapIt = range.first;
174 for (int j = 0; j < std::distance(range.first, range.second); ++j) {
175 EXPECT_DOUBLE_EQ(mapIt->second, sinHalf.operator()(i));
176 }
177 }
178 }

◆ TEST_F() [7/50]

TEST_F ( MapHelperFunctionsTest  ,
testGetAllValues   
)

test the getAllValues() function actually returns all values that are stored in the map

Definition at line 323 of file mapHelperFunctions.cc.

324 {
325 // set up vectors with all values there are in the maps
326 std::vector<double> possibleValues, nanPossibleValues;
327 for (int i = 0; i < _nEntries; ++i) {
328 possibleValues.push_back(sinHalf.operator()(i));
329 nanPossibleValues.push_back(secans.operator()(i));
330 }
331 // sort vectors to be able to simply loop over them for comparison since the order is unimportant for this function
332 std::sort(possibleValues.begin(), possibleValues.end());
333 std::sort(nanPossibleValues.begin(), nanPossibleValues.end());
334
335 // test normal map first
336 std::vector<double> allValues = getAllValues(_map);
337 EXPECT_EQ(allValues.size(), _nEntries);
338 std::sort(allValues.begin(), allValues.end());
339 for (int i = 0; i < _nEntries; ++i) {
340 EXPECT_DOUBLE_EQ(allValues[i], possibleValues[i]);
341 }
342
343 // test multimap with non NaN entries
344 allValues = getAllValues(_multimap);
345 EXPECT_EQ(allValues.size(), _nEntries);
346 std::sort(allValues.begin(), allValues.end());
347 for (int i = 0; i < _nEntries; ++i) {
348 EXPECT_DOUBLE_EQ(allValues[i], possibleValues[i]);
349 }
350
351 // TODO: does not work at the moment, FIX THIS!!
352 // test the nan maps
353 // allValues = getAllValues(_nanMap);
354 // EXPECT_EQ(allValues.size(), _nEntries);
355 // std::sort(allValues.begin(), allValues.end());
356 // for(int i = 0; i < _nEntries; ++i) {
357 // EXPECT_DOUBLE_EQ(allValues[i], possibleValues[i]);
358 // }
359
360 // allValues = getAllValues(_nanMultiMap);
361 // EXPECT_EQ(allValues.size(), _nEntries);
362 // std::sort(allValues.begin(), allValues.end());
363 // for(int i = 0; i < _nEntries; ++i) {
364 // EXPECT_DOUBLE_EQ(allValues[i], possibleValues[i]);
365 // }
366
367
368 }
std::vector< typename MapType::mapped_type > getAllValues(const MapType &aMap)
get all values in the map (i.e.

◆ TEST_F() [8/50]

TEST_F ( MapHelperFunctionsTest  ,
testGetNValuesPerKey   
)

test the 'getNValuesPerKey' method

Definition at line 250 of file mapHelperFunctions.cc.

251 {
252 std::vector<std::pair<int, unsigned int> > mapKeys = getNValuesPerKey(_map);
253 unsigned int oneKey2Value = std::count_if(mapKeys.begin(), mapKeys.end(),
254 [](const std::pair<int, unsigned int>& pair) { return pair.second == 1; });
255 EXPECT_EQ(_map.size(), oneKey2Value); // all keys should only be there once in a map!
256
257 mapKeys = getNValuesPerKey(_nanMap);
258 oneKey2Value = std::count_if(mapKeys.begin(), mapKeys.end(),
259 [](const std::pair<int, unsigned int>& pair) { return pair.second == 1; });
260 EXPECT_EQ(_nanMap.size(), oneKey2Value);
261
262 // multimaps (NOTE: hardcoded expectations because of knowledge how the maps should be filled!)
263 mapKeys = getNValuesPerKey(_nanMultiMap);
264 EXPECT_EQ(mapKeys.size(), 6);
265 for (const auto& key : mapKeys) {
266 EXPECT_EQ(key.second, key.first < 2 ? 4 : 3);
267 }
268
269 mapKeys = getNValuesPerKey(_multimap);
270 EXPECT_EQ(mapKeys.size(), 6);
271 for (const auto& key : mapKeys) {
272 EXPECT_EQ(key.second, key.first < 2 ? 4 : 3);
273 }
274 }

◆ TEST_F() [9/50]

TEST_F ( MapHelperFunctionsTest  ,
testGetSortedKeyValueTuples   
)

test if the 'getSortedKeyValuePairs' method actually works as advertised

Definition at line 277 of file mapHelperFunctions.cc.

278 {
279 // multimap without nans first
280 std::vector<int> possibleKeys = { 0, 1, 2, 3, 4, 5 };
281 std::vector<double> summedValues;
282 std::vector<double> summedNanValues;
283 for (int key : possibleKeys) {
284 std::vector<double> possibleValues;
285 std::vector<double> possibleNanValues;
286 for (int arg = key; arg < _nEntries; arg += 6) {
287 possibleValues.push_back(sinHalf.operator()(arg));
288 possibleNanValues.push_back(secans.operator()(arg));
289 }
290 summedNanValues.push_back(std::accumulate(possibleNanValues.begin(), possibleNanValues.end(), 0.0));
291 summedValues.push_back(std::accumulate(possibleValues.begin(), possibleValues.end(), 0.0));
292 }
293
294 std::vector<std::tuple<int, double, unsigned int> > keyValPairs = getSortedKeyValueTuples(_nanMultiMap);
295
296 EXPECT_EQ(keyValPairs.size(), 6);
297 // hardcoded checking here (only sampling here! not checking the whole thing!)
298 EXPECT_EQ(get<0>(keyValPairs[0]), 0);
299 EXPECT_TRUE(std::isnan(get<1>(keyValPairs[0])));
300 EXPECT_EQ(get<2>(keyValPairs[0]), 4);
301
302 // all the other checks with multimap without NaNs
303 keyValPairs = getSortedKeyValueTuples(_multimap);
304 EXPECT_EQ(keyValPairs.size(), 6);
305
306 EXPECT_EQ(get<0>(keyValPairs[0]), 0);
307 EXPECT_DOUBLE_EQ(get<1>(keyValPairs[0]), summedValues[0]);
308 EXPECT_EQ(get<2>(keyValPairs[0]), 4);
309
310 EXPECT_EQ(get<0>(keyValPairs[2]), 3);
311 EXPECT_DOUBLE_EQ(get<1>(keyValPairs[2]), summedValues[3]);
312 EXPECT_EQ(get<2>(keyValPairs[2]), 3);
313
314 keyValPairs = getSortedKeyValueTuples(_map);
315 EXPECT_EQ(get<0>(keyValPairs[0]), 3); // sin(x/2) has its maximum at x = n*pi, 3 is the value that comes closest to this
316 EXPECT_DOUBLE_EQ(get<1>(keyValPairs[0]), sinHalf.operator()(3));
317
318 EXPECT_EQ(get<0>(keyValPairs[19]), 9);
319 EXPECT_DOUBLE_EQ(get<1>(keyValPairs[19]), sinHalf.operator()(9));
320 }
std::vector< std::tuple< typename MapType::key_type, typename MapType::mapped_type, unsigned int > > getSortedKeyValueTuples(const MapType &aMap)
get the (key, value, number of values) tuples stored in the map, sorted after the following scheme (d...

◆ TEST_F() [10/50]

TEST_F ( MapHelperFunctionsTest  ,
testGetUniqueKeys   
)

test if the 'getUniqueKeys' method returns the right values

Definition at line 181 of file mapHelperFunctions.cc.

182 {
183 // get the unique keys for the map (assuming that the key_type is int!)
184 std::vector<int> uniqueKeys = getUniqueKeys(_map);
185 EXPECT_EQ(uniqueKeys.size(), _map.size()); // for the map the number of uniqueKeys has to be the same as the size!
186 for (size_t i = 0; i < uniqueKeys.size(); ++i) {
187 // using std::find because in this way there is no assumption on the order of the keys!
188 auto findIt = std::find(uniqueKeys.begin(), uniqueKeys.end(), i);
189 EXPECT_FALSE(findIt == uniqueKeys.end());
190 }
191
192 // get the unique keys for the multimap
193 std::vector<int> uniqueMultiKeys = getUniqueKeys(_multimap);
194 unsigned int expectedSize = _multimap.size() > 6 ? 6 : _multimap.size(); // (creation of the map is % 6 -> only 6 keys possible)
195 EXPECT_EQ(expectedSize, uniqueMultiKeys.size());
196 for (size_t i = 0; i < uniqueMultiKeys.size(); ++i) {
197 // using std::find because in this way there is no assumption on the order of the keys!
198 auto findIt = std::find(uniqueMultiKeys.begin(), uniqueMultiKeys.end(), i);
199 EXPECT_FALSE(findIt == uniqueMultiKeys.end());
200 }
201 }

◆ TEST_F() [11/50]

TEST_F ( MapHelperFunctionsTest  ,
testGetValuesToKey   
)

test if the 'getValuesToKey' method returns the right values to a given key

Definition at line 204 of file mapHelperFunctions.cc.

205 {
206 // multimap
207 std::vector<int> possibleKeys = { 0, 1, 2, 3, 4, 5 };
208 for (int key : possibleKeys) {
209 std::vector<double> expectedValues;
210 for (int arg = key; arg < _nEntries; arg += 6) { expectedValues.push_back(sinHalf.operator()(arg)); }
211 std::vector<double> actualValues = getValuesToKey(_multimap, key);
212 EXPECT_EQ(expectedValues.size(), actualValues.size());
213
214 // check if all values are present
215 for (const double& d : actualValues) {
216 EXPECT_FALSE(std::find(expectedValues.begin(), expectedValues.end(), d) == expectedValues.end());
217 }
218 expectedValues.clear();
219 for (int arg = key; arg < _nEntries; arg += 6) {
220 expectedValues.push_back(secans.operator()(arg));
221 }
222 actualValues = getValuesToKey(_nanMultiMap, key);
223 EXPECT_EQ(expectedValues.size(), actualValues.size());
224
225 // check if all values are present
226 for (const double& d : actualValues) {
227 if (std::isnan(d)) {
228 B2INFO("Not comparing NaN value!");
229 continue;
230 }
231 EXPECT_FALSE(std::find(expectedValues.begin(), expectedValues.end(), d) == expectedValues.end());
232 }
233 }
234
235 // map
236 for (int i = 0; i < _nEntries; ++i) {
237 std::vector<double> values = getValuesToKey(_map, i);
238 EXPECT_EQ(values.size(), 1);
239 EXPECT_DOUBLE_EQ(values[0], sinHalf.operator()(i));
240
241 values = getValuesToKey(_nanMap, i);
242 EXPECT_EQ(values.size(), 1);
243 if (!std::isnan(values[0])) { // not checking here (already checked, that the functor leads to this above)
244 EXPECT_DOUBLE_EQ(values[0], secans.operator()(i));
245 }
246 }
247 }
std::vector< typename MapType::mapped_type > getValuesToKey(const MapType &aMap, typename MapType::key_type aKey)
get all values stored in the map for a given key

◆ TEST_F() [12/50]

TEST_F ( RecoTrackTest  ,
cdcHit   
)

Test simple Setters and Getters.

Definition at line 105 of file recoTrack.cc.

106 {
107 StoreArray<CDCHit> cdcHits(m_storeArrayNameOfCDCHits);
108
109 EXPECT_FALSE(m_recoTrack->hasCDCHits());
110
111 // Add three cdc hits to the track
112 m_recoTrack->addCDCHit(cdcHits[0], 1);
113 m_recoTrack->addCDCHit(cdcHits[1], 0, RecoHitInformation::RightLeftInformation::c_right);
114 m_recoTrack->addCDCHit(cdcHits[2], 2);
115
116 EXPECT_TRUE(m_recoTrack->hasCDCHits());
117
118 EXPECT_TRUE(m_recoTrack->hasHit(cdcHits[0]));
119 EXPECT_TRUE(m_recoTrack->hasHit(cdcHits[1]));
120 EXPECT_TRUE(m_recoTrack->hasHit(cdcHits[2]));
121
122 EXPECT_FALSE(m_recoTrack->hasHit(cdcHits[4]));
123
124 ASSERT_EQ(m_recoTrack->getNumberOfCDCHits(), 3);
125 const std::vector<CDCHit*> addedCDCHits = m_recoTrack->getCDCHitList();
126 ASSERT_EQ(addedCDCHits.size(), 3);
127 EXPECT_EQ(addedCDCHits[0], cdcHits[0]);
128 EXPECT_EQ(addedCDCHits[1], cdcHits[1]);
129 EXPECT_EQ(addedCDCHits[2], cdcHits[2]);
130
131 const std::vector<CDCHit*> sortedCDCHits = m_recoTrack->getSortedCDCHitList();
132 ASSERT_EQ(sortedCDCHits.size(), 3);
133 EXPECT_EQ(sortedCDCHits[0], cdcHits[1]);
134 EXPECT_EQ(sortedCDCHits[1], cdcHits[0]);
135 EXPECT_EQ(sortedCDCHits[2], cdcHits[2]);
136
137 // Individual hit information
138 CDCHit* cdcHit = cdcHits[0];
139
140 RecoHitInformation* recoHitInformation = m_recoTrack->getRecoHitInformation(cdcHit);
141 EXPECT_NE(recoHitInformation, nullptr);
142 EXPECT_EQ(recoHitInformation->getTrackingDetector(), RecoHitInformation::RecoHitDetector::c_CDC);
143 EXPECT_EQ(recoHitInformation->getRightLeftInformation(), RecoHitInformation::RightLeftInformation::c_undefinedRightLeftInformation);
144 EXPECT_EQ(recoHitInformation->getFoundByTrackFinder(), RecoHitInformation::OriginTrackFinder::c_undefinedTrackFinder);
145 EXPECT_EQ(recoHitInformation->getSortingParameter(), 1);
146
147 cdcHit = cdcHits[1];
148 recoHitInformation = m_recoTrack->getRecoHitInformation(cdcHit);
149 EXPECT_NE(recoHitInformation, nullptr);
150 EXPECT_EQ(recoHitInformation->getRightLeftInformation(), RecoHitInformation::RightLeftInformation::c_right);
151
152
153
154 // Setter and getter for the reco hit information
155 // with added hits
156 cdcHit = cdcHits[0];
157
158 EXPECT_EQ(m_recoTrack->getTrackingDetector(cdcHit), RecoHitInformation::RecoHitDetector::c_CDC);
159 EXPECT_EQ(m_recoTrack->getRightLeftInformation(cdcHit), RecoHitInformation::RightLeftInformation::c_undefinedRightLeftInformation);
160 EXPECT_EQ(m_recoTrack->getFoundByTrackFinder(cdcHit), RecoHitInformation::OriginTrackFinder::c_undefinedTrackFinder);
161 EXPECT_EQ(m_recoTrack->getSortingParameter(cdcHit), 1);
162
163 EXPECT_NO_THROW(m_recoTrack->setFoundByTrackFinder(cdcHit, RecoHitInformation::OriginTrackFinder::c_SegmentTrackCombiner));
164 EXPECT_NO_THROW(m_recoTrack->setRightLeftInformation(cdcHit, RecoHitInformation::RightLeftInformation::c_left));
165 EXPECT_NO_THROW(m_recoTrack->setSortingParameter(cdcHit, 3));
166
167 EXPECT_EQ(m_recoTrack->getFoundByTrackFinder(cdcHit), RecoHitInformation::OriginTrackFinder::c_SegmentTrackCombiner);
168 EXPECT_EQ(m_recoTrack->getRightLeftInformation(cdcHit), RecoHitInformation::RightLeftInformation::c_left);
169 EXPECT_EQ(m_recoTrack->getSortingParameter(cdcHit), 3);
170
171 // with not added hits
172 cdcHit = cdcHits[4];
173
174 EXPECT_B2FATAL(m_recoTrack->getTrackingDetector(cdcHit));
175 EXPECT_B2FATAL(m_recoTrack->getRightLeftInformation(cdcHit));
176 EXPECT_B2FATAL(m_recoTrack->getFoundByTrackFinder(cdcHit));
177 EXPECT_B2FATAL(m_recoTrack->getSortingParameter(cdcHit));
178
179 EXPECT_B2FATAL(m_recoTrack->setFoundByTrackFinder(cdcHit, RecoHitInformation::OriginTrackFinder::c_SegmentTrackCombiner));
180 EXPECT_B2FATAL(m_recoTrack->setRightLeftInformation(cdcHit, RecoHitInformation::RightLeftInformation::c_left));
181 }

◆ TEST_F() [13/50]

TEST_F ( RecoTrackTest  ,
cdcHitMCFinderCategory   
)

Test simple Correct handling of the MCFinder hit classification.

Definition at line 184 of file recoTrack.cc.

185 {
186 StoreArray<CDCHit> cdcHits(m_storeArrayNameOfCDCHits);
187
188 EXPECT_FALSE(m_recoTrack->hasCDCHits());
189
190 // Add three cdc hits to the track
191 m_recoTrack->addCDCHit(cdcHits[0], 1, RecoHitInformation::RightLeftInformation::c_right,
192 RecoHitInformation::OriginTrackFinder::c_MCTrackFinderPriorityHit);
193 m_recoTrack->addCDCHit(cdcHits[1], 0, RecoHitInformation::RightLeftInformation::c_right,
194 RecoHitInformation::OriginTrackFinder::c_MCTrackFinderAuxiliaryHit);
195 // the mcfinder prorperty of this hit is not provided explicitly and therefore should be set to undefined
196 m_recoTrack->addCDCHit(cdcHits[2], 2);
197
198 // get the RecoHitInfo and check their category
199 EXPECT_EQ(m_recoTrack->getRecoHitInformation(cdcHits[0])->getFoundByTrackFinder(),
200 RecoHitInformation::OriginTrackFinder::c_MCTrackFinderPriorityHit);
201 EXPECT_EQ(m_recoTrack->getRecoHitInformation(cdcHits[1])->getFoundByTrackFinder(),
202 RecoHitInformation::OriginTrackFinder::c_MCTrackFinderAuxiliaryHit);
203 EXPECT_EQ(m_recoTrack->getRecoHitInformation(cdcHits[2])->getFoundByTrackFinder(),
204 RecoHitInformation::OriginTrackFinder::c_undefinedTrackFinder);
205 }

◆ TEST_F() [14/50]

TEST_F ( RecoTrackTest  ,
copyRecoTrack   
)

Test copying a RecoTrack.

Definition at line 278 of file recoTrack.cc.

279 {
280 StoreArray<CDCHit> cdcHits(m_storeArrayNameOfCDCHits);
281
282 // Add three cdc hits to the track
283 m_recoTrack->addCDCHit(cdcHits[0], 1);
284 m_recoTrack->addCDCHit(cdcHits[1], 0, RecoHitInformation::RightLeftInformation::c_right);
285 m_recoTrack->addCDCHit(cdcHits[2], 2);
286
287 // create a second RecoTrack
288 StoreArray<RecoTrack> recoTracks(m_storeArrayNameOfRecoTracks);
289
290 auto recoTrack = recoTracks.appendNew(m_recoTrack->getPositionSeed(), m_recoTrack->getMomentumSeed(), m_recoTrack->getChargeSeed(),
291 m_storeArrayNameOfPXDHits, m_storeArrayNameOfSVDHits, m_storeArrayNameOfCDCHits,
292 m_storeArrayNameOfBKLMHits, m_storeArrayNameOfEKLMHits,
293 m_storeArrayNameOfHitInformation);
294 EXPECT_FALSE(recoTrack->hasCDCHits());
295
296 // check if the offset computation of the hit order works as expected
297 size_t offset = 3;
298 recoTrack->addHitsFromRecoTrack(m_recoTrack, offset);
299 ASSERT_EQ(recoTrack->getNumberOfCDCHits(), 3);
300
301 size_t this_i = offset;
302 for (auto pHit : recoTrack->getSortedCDCHitList()) {
303 auto sortParam = recoTrack->getSortingParameter(pHit);
304 ASSERT_EQ(this_i, sortParam);
305 this_i++;
306 }
307 }

◆ TEST_F() [15/50]

TEST_F ( RecoTrackTest  ,
recoHitInformations   
)

Test the getRecoHitInformations() function.

Definition at line 310 of file recoTrack.cc.

311 {
312 StoreArray<CDCHit> cdcHits(m_storeArrayNameOfCDCHits);
313
314 m_recoTrack->addCDCHit(cdcHits[0], 1);
315
316 // create a second RecoTrack
317 StoreArray<RecoTrack> recoTracks(m_storeArrayNameOfRecoTracks);
318
319 RecoTrack* recoTrack2 = recoTracks.appendNew(m_recoTrack->getPositionSeed(), m_recoTrack->getMomentumSeed(),
320 m_recoTrack->getChargeSeed(),
321 m_storeArrayNameOfPXDHits, m_storeArrayNameOfSVDHits, m_storeArrayNameOfCDCHits,
322 m_storeArrayNameOfBKLMHits, m_storeArrayNameOfEKLMHits,
323 m_storeArrayNameOfHitInformation);
324 recoTrack2->addCDCHit(cdcHits[1], 2);
325
326 ASSERT_EQ(m_recoTrack->getRecoHitInformations().size(), 1);
327 ASSERT_EQ(m_recoTrack->getRecoHitInformations()[0]->getSortingParameter(), 1);
328 ASSERT_EQ(recoTrack2->getRecoHitInformations().size(), 1);
329 ASSERT_EQ(recoTrack2->getRecoHitInformations()[0]->getSortingParameter(), 2);
330 }

◆ TEST_F() [16/50]

TEST_F ( RecoTrackTest  ,
testGenfitConversionOne   
)

Test conversion to genfit track cands.

Definition at line 208 of file recoTrack.cc.

209 {
210 // Create a genfit track cand
211 genfit::TrackCand newCreatedTrackCand;
212 ROOT::Math::XYZVector position(4, 23, 5.6);
213 ROOT::Math::XYZVector momentum(4, 23, 5.6);
214 short int charge = 1;
215 // We can not add these parameters immediately - we have to convert them to the perigee parameters
216 newCreatedTrackCand.setPosMomSeed(XYZToTVector(position), XYZToTVector(momentum), charge);
217 newCreatedTrackCand.addHit(new genfit::WireTrackCandHit(Const::CDC, 0, -1, 0, 0));
218 newCreatedTrackCand.addHit(new genfit::WireTrackCandHit(Const::CDC, 1, -1, 1, 0));
219 newCreatedTrackCand.addHit(new genfit::WireTrackCandHit(Const::CDC, 2, -1, 2, 0));
220
221 // convert it to a RecoTrack
222 RecoTrack* recoTrackFromGenfit = RecoTrack::createFromTrackCand(newCreatedTrackCand, m_storeArrayNameOfRecoTracks,
223 m_storeArrayNameOfPXDHits, m_storeArrayNameOfSVDHits, m_storeArrayNameOfCDCHits,
224 m_storeArrayNameOfBKLMHits, m_storeArrayNameOfEKLMHits,
225 m_storeArrayNameOfHitInformation);
226
227 // convert it back
228
229 const genfit::TrackCand& exportedTrackCand = recoTrackFromGenfit->createGenfitTrackCand();
230
231 // Expect equal
232 ASSERT_EQ(exportedTrackCand.getNHits(), newCreatedTrackCand.getNHits());
233 EXPECT_NEAR(exportedTrackCand.getPosSeed().X(), newCreatedTrackCand.getPosSeed().X(), 1E-10);
234 EXPECT_NEAR(exportedTrackCand.getPosSeed().Y(), newCreatedTrackCand.getPosSeed().Y(), 1E-10);
235 EXPECT_NEAR(exportedTrackCand.getPosSeed().Z(), newCreatedTrackCand.getPosSeed().Z(), 1E-10);
236 EXPECT_NEAR(exportedTrackCand.getMomSeed().X(), newCreatedTrackCand.getMomSeed().X(), 1E-10);
237 EXPECT_NEAR(exportedTrackCand.getMomSeed().Y(), newCreatedTrackCand.getMomSeed().Y(), 1E-10);
238 EXPECT_NEAR(exportedTrackCand.getMomSeed().Z(), newCreatedTrackCand.getMomSeed().Z(), 1E-10);
239 EXPECT_EQ(exportedTrackCand.getChargeSeed(), newCreatedTrackCand.getChargeSeed());
240 EXPECT_EQ(exportedTrackCand.getHit(0)->getHitId(), newCreatedTrackCand.getHit(0)->getHitId());
241 EXPECT_EQ(exportedTrackCand.getHit(1)->getSortingParameter(), newCreatedTrackCand.getHit(1)->getSortingParameter());
242 EXPECT_EQ(exportedTrackCand.getHit(2)->getHitId(), newCreatedTrackCand.getHit(2)->getHitId());
243 }
R E
internal precision of FFTW codelets

◆ TEST_F() [17/50]

TEST_F ( RecoTrackTest  ,
testGenfitConversionTwo   
)

Test conversion from genfit track cands.

Definition at line 246 of file recoTrack.cc.

247 {
248 EXPECT_FALSE(m_recoTrack->hasCDCHits());
249 StoreArray<CDCHit> cdcHits(m_storeArrayNameOfCDCHits);
250
251 // Add three cdc hits to the track
252 m_recoTrack->addCDCHit(cdcHits[0], 1);
253 m_recoTrack->addCDCHit(cdcHits[1], 0, RecoHitInformation::RightLeftInformation::c_right);
254 m_recoTrack->addCDCHit(cdcHits[2], 2);
255
256 EXPECT_TRUE(m_recoTrack->hasCDCHits());
257
258 const genfit::TrackCand& exportedTrackCand = m_recoTrack->createGenfitTrackCand();
259
260 ASSERT_EQ(exportedTrackCand.getNHits(), m_recoTrack->getNumberOfTotalHits());
261 ASSERT_EQ(m_recoTrack->getNumberOfTotalHits(), 3);
262
263 RecoTrack* recoTrackFromGenfit = RecoTrack::createFromTrackCand(exportedTrackCand, m_storeArrayNameOfRecoTracks,
264 m_storeArrayNameOfPXDHits, m_storeArrayNameOfSVDHits, m_storeArrayNameOfCDCHits,
265 m_storeArrayNameOfBKLMHits, m_storeArrayNameOfEKLMHits,
266 m_storeArrayNameOfHitInformation);
267
268 B2INFO("kjh");
269
270 ASSERT_EQ(recoTrackFromGenfit->getNumberOfCDCHits(), m_recoTrack->getNumberOfCDCHits());
271 const auto& cdcHitListOne = recoTrackFromGenfit->getCDCHitList();
272 const auto& cdcHitListTwo = m_recoTrack->getCDCHitList();
273 ASSERT_EQ(cdcHitListOne.size(), 3);
274 ASSERT_EQ(cdcHitListTwo.size(), 3);
275 }

◆ TEST_F() [18/50]

TEST_F ( RecoTrackTest  ,
trackTime   
)

Test getOutgoingArmTime() and getIngoingArmTime() functions.

Definition at line 333 of file recoTrack.cc.

334 {
335 StoreArray<SVDCluster> svdHits(m_storeArrayNameOfSVDHits);
336 StoreArray<CDCHit> cdcHits(m_storeArrayNameOfCDCHits);
337
338 //"SVDCluster(VxdID, isU, position, positionErr, clsTime, clsTimeErr, clsCharge, seedCharge, clsSize, clsSNR, clsChi2, FF)"
339 svdHits.appendNew(Belle2::VxdID("3.1.2"), true, 1.0, 0.01, 0.1, 0.1, 5.0e4, 5.0e4, 1, 50.0, 0.1, 0);
340 svdHits.appendNew(Belle2::VxdID("4.1.2"), true, 1.0, 0.01, 0.2, 0.1, 5.0e4, 5.0e4, 1, 50.0, 0.1, 0);
341 svdHits.appendNew(Belle2::VxdID("5.1.3"), true, 1.0, 0.01, 0.3, 0.1, 5.0e4, 5.0e4, 1, 50.0, 0.1, 0);
342 svdHits.appendNew(Belle2::VxdID("6.1.3"), true, 1.0, 0.01, 0.4, 0.1, 5.0e4, 5.0e4, 1, 50.0, 0.1, 0);
343 svdHits.appendNew(Belle2::VxdID("6.7.7"), true, 1.0, 0.01, 1.0, 0.1, 5.0e4, 5.0e4, 1, 50.0, 0.1, 0);
344 svdHits.appendNew(Belle2::VxdID("5.7.4"), true, 1.0, 0.01, 1.1, 0.1, 5.0e4, 5.0e4, 1, 50.0, 0.1, 0);
345
346 ROOT::Math::XYZVector momentum(0.25, 0.25, 0.05);
347
348 StoreArray<RecoTrack> recoTracks(m_storeArrayNameOfRecoTracks);
349 RecoTrack* recoTrack = recoTracks.appendNew(m_recoTrack->getPositionSeed(), momentum,
350 m_recoTrack->getChargeSeed(),
351 m_storeArrayNameOfPXDHits, m_storeArrayNameOfSVDHits, m_storeArrayNameOfCDCHits,
352 m_storeArrayNameOfBKLMHits, m_storeArrayNameOfEKLMHits,
353 m_storeArrayNameOfHitInformation);
354
355 // SVD Hits
356 recoTrack->addSVDHit(svdHits[0], 0);
357 recoTrack->addSVDHit(svdHits[1], 1);
358 recoTrack->addSVDHit(svdHits[2], 2);
359 recoTrack->addSVDHit(svdHits[3], 3);
360
361 // CDC Hits
362 recoTrack->addCDCHit(cdcHits[0], 4);
363 recoTrack->addCDCHit(cdcHits[1], 5);
364
365 // SVD Hits
366 recoTrack->addSVDHit(svdHits[4], 6);
367 recoTrack->addSVDHit(svdHits[5], 7);
368
369 EXPECT_TRUE(recoTrack->hasSVDHits());
370
371 EXPECT_FALSE(recoTrack->hasOutgoingArmTime());
372 EXPECT_FALSE(recoTrack->hasIngoingArmTime());
373
374 B2INFO("outgoing arm time: " << recoTrack->getOutgoingArmTime());
375 B2INFO("ingoing arm time: " << recoTrack->getIngoingArmTime());
376 B2INFO("difference: " << recoTrack->getInOutArmTimeDifference());
377 EXPECT_NEAR(recoTrack->getIngoingArmTime(), recoTrack->getOutgoingArmTime(), 0.8);
378 EXPECT_NEAR(recoTrack->getIngoingArmTime(), 1.05, 1E-5);
379
380 EXPECT_TRUE(recoTrack->hasOutgoingArmTime());
381 EXPECT_TRUE(recoTrack->hasIngoingArmTime());
382 }
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33

◆ TEST_F() [19/50]

TEST_F ( SandBox4TestingTest  ,
JustSomePlayingAroundWithfunction   
)

test function call with auto-assigned value

Definition at line 63 of file sandBox4Testing.h.

64 {
65 EXPECT_TRUE(doStuffHere());
66 EXPECT_FALSE(doStuffHere({23}));
67
68 if (doStuffHere() == false) {
69 B2WARNING("it didn't work!");
70 } else {
71 B2WARNING("yay, it worked!");
72 }
73 }

◆ TEST_F() [20/50]

TEST_F ( SandBox4TestingTest  ,
testingVerbosityViaTemplates   
)

test function call with auto-assigned value

Definition at line 53 of file sandBox4Testing.h.

54 {
55 VerbosityClass<4> class4;
56 VerbosityClass<1> class1;
57
58 class4.SomeCleverMethod();
59 class1.SomeCleverMethod();
60 }

◆ TEST_F() [21/50]

TEST_F ( SandBox4TestingTest  ,
TestIsNanAndIsInfBehavior   
)

shall show when to get nan and when to get inf (and that inf != nan)

Definition at line 77 of file sandBox4Testing.h.

78 {
79 EXPECT_TRUE(std::isinf(1. / 0.));
80 EXPECT_FALSE(std::isnan(1. / 0.));
81 EXPECT_TRUE(std::isnan(std::sqrt(-1)));
82 EXPECT_FALSE(std::isinf(std::sqrt(-1)));
83 EXPECT_TRUE(std::isnan(0. / 0.));
84 EXPECT_FALSE(std::isinf(0. / 0.));
85
86// EXPECT_FALSE(std::isnan(std::pow(0.,0.))); // this should be nan, but actually it is implementation dependent, therefore here we get for 0^0 = 1, which is mathematically not correct
87 EXPECT_FALSE(std::isinf(std::pow(0., 0.)));
88 }

◆ TEST_F() [22/50]

TEST_F ( SectorTest  ,
testConstructorSettersAndGetters   
)

Test Constructor, Setters and Getters.

Definition at line 25 of file sector.h.

26 {
27 VxdID vxdID = VxdID(34624); // this should be a sensor on layer 4
28 bool subLayerID = true;
29 unsigned short sectorID = 15;
30
31
32 B2INFO("creating FullSecIDs: ");
33 FullSecID aFullSecID = FullSecID(vxdID, subLayerID, sectorID);
34 unsigned int aFullSecInt = static_cast<unsigned int>(aFullSecID);
35
36 FullSecID aFullSecID2 = FullSecID(vxdID, false, sectorID);
37 unsigned int aFullSecInt2 = static_cast<unsigned int>(aFullSecID2);
38
39 FullSecID aFullSecID3 = FullSecID(vxdID, subLayerID, 7);
40 unsigned int aFullSecInt3 = static_cast<unsigned int>(aFullSecID3);
41
42 FullSecID aFullSecID4;
43 unsigned int aFullSecInt4 = static_cast<unsigned int>(aFullSecID4);
44
45
46 // producing sectors which can be sorted by secID:
47 Sector aSector(aFullSecInt);
48 Sector aSector2(aFullSecInt2);
49 Sector aSector3(aFullSecInt3);
50 Sector aSector4(aFullSecInt4);
51
52 EXPECT_EQ(aFullSecInt, aSector.getSecID());
53 EXPECT_EQ(aFullSecInt2, aSector2.getSecID());
54 EXPECT_EQ(aFullSecInt3, aSector3.getSecID());
55 EXPECT_EQ(aFullSecInt4, aSector4.getSecID());
56 EXPECT_EQ(0, aSector.getDistance());
57 EXPECT_EQ(0, aSector2.getDistance());
58 EXPECT_EQ(0, aSector3.getDistance());
59 EXPECT_EQ(0, aSector4.getDistance());
60
61
62 // producing sectors which can be sorted by secID:
63 Sector dSector(aFullSecInt, 3.5);
64 Sector dSector2(aFullSecInt2, 3.3, true);
65 Sector dSector3(aFullSecInt3, 3.4);
66 Sector dSector4(aFullSecInt4, 0, true);
67 }

◆ TEST_F() [23/50]

TEST_F ( SpacePointTest  ,
testConstructorPXD   
)

Test constructor for PXDClsuters tests the constructor importing a PXDCluster and tests results by using the getters of the spacePoint...

Definition at line 58 of file spacePoint.cc.

59 {
60 VxdID aVxdID = VxdID(1, 1, 1);
61 VXD::SensorInfoBase sensorInfoBase = createSensorInfo(aVxdID, 2.3, 4.2);
62
63 // create new PXDCluster and fill it with Info getting a Hit which is not at the origin (here, first layer)
64
65 PXDCluster aCluster = PXDCluster(aVxdID, 0., 0., 0.1, 0.1, 0, 0, 1, 1, 1, 1, 1, 1);
66 SpacePoint testPoint = SpacePoint(&aCluster, &sensorInfoBase);
67
68 EXPECT_DOUBLE_EQ(aVxdID, testPoint.getVxdID());
69
70 // needing globalized position and error:
71 ROOT::Math::XYZVector aPosition = sensorInfoBase.pointToGlobal(ROOT::Math::XYZVector(aCluster.getU(), aCluster.getV(), 0), true);
72 ROOT::Math::XYZVector globalizedVariances = sensorInfoBase.vectorToGlobal(
73 ROOT::Math::XYZVector(
74 aCluster.getUSigma() * aCluster.getUSigma(),
75 aCluster.getVSigma() * aCluster.getVSigma(),
76 0
77 ),
78 true
79 );
80
81 ROOT::Math::XYZVector globalError;
82 globalError.SetX(sqrt(abs(globalizedVariances.X())));
83 globalError.SetY(sqrt(abs(globalizedVariances.Y())));
84 globalError.SetZ(sqrt(abs(globalizedVariances.Z())));
85
86 EXPECT_DOUBLE_EQ(aPosition.X(), testPoint.getPosition().X());
87 EXPECT_DOUBLE_EQ(aPosition.Y(), testPoint.getPosition().Y());
88 EXPECT_DOUBLE_EQ(aPosition.Z(), testPoint.getPosition().Z());
89 EXPECT_FLOAT_EQ(globalError.X(), testPoint.getPositionError().X());
90 EXPECT_FLOAT_EQ(globalError.Y(), testPoint.getPositionError().Y());
91 EXPECT_FLOAT_EQ(globalError.Z(), testPoint.getPositionError().Z());
92 // normalized coordinates, center of Plane should be at 0.5:
93 EXPECT_DOUBLE_EQ(0.5, testPoint.getNormalizedLocalU());
94 EXPECT_DOUBLE_EQ(0.5, testPoint.getNormalizedLocalV());
95
96 }

◆ TEST_F() [24/50]

TEST_F ( SpacePointTest  ,
testConstructorSVD   
)

Test constructor for SVDClsuters tests the constructor importing a SVDCluster and tests results by using the getters of the spacePoint...

Definition at line 104 of file spacePoint.cc.

105 {
106 VxdID aVxdID = VxdID(3, 3, 3), anotherVxdID = VxdID(1, 1, 1);
107 VXD::SensorInfoBase sensorInfoBase = createSensorInfo(aVxdID, 2.3, 4.2);
108 VXD::SensorInfoBase anotherSensorInfoBase = createSensorInfo(anotherVxdID, 2.3, 4.2);
109
110 // create new SVDClusters and fill it with Info getting a Hit which is not at the origin
111 // SVDCluster (VxdID sensorID, bool isU, float position, float positionSigma, double clsTime, double clsTimeSigma, float seedCharge, float clsCharge, unsigned short clsSize, double clsSNR)
112 SVDCluster clusterU1 = SVDCluster(aVxdID, true, -0.23, 0.1, 0.01, 0.001, 1, 1, 1, 1);
113 SVDCluster clusterV1 = SVDCluster(aVxdID, false, 0.42, 0.1, 0.01, 0.001, 1, 1, 1, 1);
114 SVDCluster clusterU2 = SVDCluster(aVxdID, true, 0.23, 0.1, 0.01, 0.001, 1, 1, 1, 1);
115 SVDCluster clusterU3 = SVDCluster(anotherVxdID, true, 0.23, 0.1, 0.01, 0.001, 1, 1, 1, 1);
116
117
118 // normal u+v = 2D Cluster (order of input irrelevant):
119 std::vector<const SVDCluster*> good2D = { &clusterU1, &clusterV1 };
120 SpacePoint testPoint2D = SpacePoint(good2D, &sensorInfoBase);
121
122 // normal u-only = 1D Cluster, sensorInfoBase is normally not needed, since constructor can create it on its own, but here the geometry is not set up, therefore we have to pass the infoBase:
123 std::vector<const SVDCluster*> good1D = { &clusterU3 };
124 SpacePoint testPoint1D = SpacePoint(good1D, &anotherSensorInfoBase);
125
126
127 // should throw, since no clusters given:
128 std::vector<const SVDCluster*> badNoClusters;
129 EXPECT_B2FATAL(SpacePoint(badNoClusters, &sensorInfoBase));
130
131 // should throw, since too many clusters (of same sensor) given:
132 std::vector<const SVDCluster*> bad3Clusters = { &clusterU1, &clusterV1, &clusterU2 };
133 EXPECT_B2FATAL(SpacePoint(bad3Clusters, &sensorInfoBase));
134
135 // should throw, since two clusters of same type (but on same sensor) given:
136 std::vector<const SVDCluster*> badSameType = { &clusterU1, &clusterU2 };
137 EXPECT_B2FATAL(SpacePoint(badSameType, &sensorInfoBase));
138
139 // should throw, since two clusters of different sensors given:
140 std::vector<const SVDCluster*> badDifferentSensors = { &clusterV1, &clusterU3 };
141 EXPECT_B2FATAL(SpacePoint(badDifferentSensors, &sensorInfoBase));
142
143
144 // check results for full 2D cluster-combi:
145 ROOT::Math::XYZVector aPositionFor2D = sensorInfoBase.pointToGlobal(ROOT::Math::XYZVector(clusterU1.getPosition(),
146 clusterV1.getPosition(), 0), true);
147 ROOT::Math::XYZVector globalizedVariancesFor2D = sensorInfoBase.vectorToGlobal(
148 ROOT::Math::XYZVector(
149 clusterU1.getPositionSigma() * clusterU1.getPositionSigma(),
150 clusterV1.getPositionSigma() * clusterV1.getPositionSigma(),
151 0
152 ),
153 true
154 );
155 ROOT::Math::XYZVector globalErrorFor2D;
156 globalErrorFor2D.SetX(sqrt(abs(globalizedVariancesFor2D.X())));
157 globalErrorFor2D.SetY(sqrt(abs(globalizedVariancesFor2D.Y())));
158 globalErrorFor2D.SetZ(sqrt(abs(globalizedVariancesFor2D.Z())));
159
160 // vxdID:
161 EXPECT_EQ(aVxdID, testPoint2D.getVxdID());
162 // global position:
163 EXPECT_FLOAT_EQ(aPositionFor2D.X(), testPoint2D.getPosition().X());
164 EXPECT_FLOAT_EQ(aPositionFor2D.Y(), testPoint2D.getPosition().Y());
165 EXPECT_FLOAT_EQ(aPositionFor2D.Z(), testPoint2D.getPosition().Z());
166 //global error:
167 EXPECT_FLOAT_EQ(globalErrorFor2D.X(), testPoint2D.getPositionError().X());
168 EXPECT_FLOAT_EQ(globalErrorFor2D.Y(), testPoint2D.getPositionError().Y());
169 EXPECT_FLOAT_EQ(globalErrorFor2D.Z(), testPoint2D.getPositionError().Z());
170 //local normalized position:
171 EXPECT_FLOAT_EQ(0.4, testPoint2D.getNormalizedLocalU());
172 EXPECT_FLOAT_EQ(0.6, testPoint2D.getNormalizedLocalV());
173
174
175 // check results for single-cluster-only-case:
176 ROOT::Math::XYZVector aPositionFor1D = anotherSensorInfoBase.pointToGlobal(ROOT::Math::XYZVector(clusterU3.getPosition(), 0, 0),
177 true);
178 ROOT::Math::XYZVector globalizedVariancesFor1D = anotherSensorInfoBase.vectorToGlobal(
179 ROOT::Math::XYZVector(
180 clusterU3.getPositionSigma() * clusterU3.getPositionSigma(),
181 anotherSensorInfoBase.getVSize() * anotherSensorInfoBase.getVSize() / 12.,
182 0
183 ),
184 true
185 );
186 ROOT::Math::XYZVector globalErrorFor1D;
187 globalErrorFor1D.SetX(sqrt(abs(globalizedVariancesFor1D.X())));
188 globalErrorFor1D.SetY(sqrt(abs(globalizedVariancesFor1D.Y())));
189 globalErrorFor1D.SetZ(sqrt(abs(globalizedVariancesFor1D.Z())));
190
191
192 // vxdID:
193 EXPECT_EQ(anotherVxdID, testPoint1D.getVxdID());
194 // global position:
195 EXPECT_FLOAT_EQ(aPositionFor1D.X(), testPoint1D.getPosition().X());
196 EXPECT_FLOAT_EQ(aPositionFor1D.Y(), testPoint1D.getPosition().Y());
197 EXPECT_FLOAT_EQ(aPositionFor1D.Z(), testPoint1D.getPosition().Z());
198 //global error:
199 EXPECT_FLOAT_EQ(globalErrorFor1D.X(), testPoint1D.getPositionError().X());
200 EXPECT_FLOAT_EQ(globalErrorFor1D.Y(), testPoint1D.getPositionError().Y());
201 EXPECT_FLOAT_EQ(globalErrorFor1D.Z(), testPoint1D.getPositionError().Z());
202 //local normalized position:
203 EXPECT_FLOAT_EQ(0.6, testPoint1D.getNormalizedLocalU());
204 EXPECT_FLOAT_EQ(0.5, testPoint1D.getNormalizedLocalV()); // center of sensor since v-cluster was not given
205 }

◆ TEST_F() [25/50]

TEST_F ( SpacePointTest  ,
testConvertLocalToNormalizedCoordinates   
)

Testing member of spacePoint: convertToNormalizedCoordinates.

convertToNormalizedCoordinates converts a local hit into sensor-independent relative coordinates defined between 0 and 1.

Definition at line 369 of file spacePoint.cc.

370 {
371 VxdID aVxdID = VxdID(1, 1, 1);
372 VXD::SensorInfoBase sensorInfoBase = createSensorInfo(aVxdID, 2.3, 4.2);
373
374 pair<float, float> sensorCenter = {1.15, 2.1};
375
376 pair<float, float> hitLocal05 = {0, 0}; // sensorCenter is at 0, 0 in local coordinates
377 pair<float, float> resultNormalized05 = {0.5, 0.5};
378
379 pair<float, float> hitLocal001 = {0.023, 0.042};
380 hitLocal001.first -= sensorCenter.first;
381 hitLocal001.second -= sensorCenter.second;
382 pair<float, float> resultNormalized001 = {0.01, 0.01};
383
384 pair<float, float> hitLocal088 = {2.024, 3.696};
385 hitLocal088.first -= sensorCenter.first;
386 hitLocal088.second -= sensorCenter.second;
387 pair<float, float> resultNormalized088 = {0.88, 0.88};
388
389 pair<float, float> hitLocal001088 = {0.023, 3.696};// asymmetric example verifying that values are not accidentally switched
390 hitLocal001088.first -= sensorCenter.first;
391 hitLocal001088.second -= sensorCenter.second;
392 pair<float, float> resultNormalized001088 = {0.01, 0.88};
393
394 pair<float, float> hitLocalMinMax = { -1.16, 500}; // hit lies way beyond sensor edges (first is below lower threshold, second above higher one)
395 pair<float, float> resultNormalizedMinMax = {0., 1.};
396
397 pair<float, float> hitNormalized05 = SpacePoint::convertLocalToNormalizedCoordinates(hitLocal05, aVxdID, &sensorInfoBase);
398 EXPECT_FLOAT_EQ(resultNormalized05.first, hitNormalized05.first);
399 EXPECT_FLOAT_EQ(resultNormalized05.second, hitNormalized05.second);
400
401 pair<float, float> hitNormalized001 = SpacePoint::convertLocalToNormalizedCoordinates(hitLocal001, aVxdID, &sensorInfoBase);
402 EXPECT_FLOAT_EQ(resultNormalized001.first, hitNormalized001.first);
403 EXPECT_NEAR(resultNormalized001.second, hitNormalized001.second, 1. / 100000.); // resolution of better than 1 nm.
404
405 pair<float, float> hitNormalized088 = SpacePoint::convertLocalToNormalizedCoordinates(hitLocal088, aVxdID, &sensorInfoBase);
406 EXPECT_FLOAT_EQ(resultNormalized088.first, hitNormalized088.first);
407 EXPECT_FLOAT_EQ(resultNormalized088.second, hitNormalized088.second);
408
409 pair<float, float> hitNormalized001088 = SpacePoint::convertLocalToNormalizedCoordinates(hitLocal001088, aVxdID, &sensorInfoBase);
410 EXPECT_FLOAT_EQ(resultNormalized001088.first, hitNormalized001088.first);
411 EXPECT_FLOAT_EQ(resultNormalized001088.second, hitNormalized001088.second);
412
413 pair<float, float> hitNormalizedMinMax = SpacePoint::convertLocalToNormalizedCoordinates(hitLocalMinMax, aVxdID, &sensorInfoBase);
414 EXPECT_FLOAT_EQ(resultNormalizedMinMax.first, hitNormalizedMinMax.first);
415 EXPECT_FLOAT_EQ(resultNormalizedMinMax.second, hitNormalizedMinMax.second);
416 }

◆ TEST_F() [26/50]

TEST_F ( SpacePointTest  ,
testConvertNormalizedToLocalCoordinates   
)

Testing member of spacePoint: convertToLocalCoordinates.

convertToLocalCoordinates converts a hit in sensor-independent relative (def. 0-1) coordinates into local coordinate of given sensor

Definition at line 424 of file spacePoint.cc.

425 {
426 VxdID aVxdID = VxdID(1, 1, 1);
427 VXD::SensorInfoBase sensorInfoBase = createSensorInfo(aVxdID, 2.3, 4.2);
428
429 pair<float, float> sensorCenter = {1.15, 2.1};
430
431 pair<float, float> hitNormalized05 = {0.5, 0.5};
432 pair<float, float> resultLocal05 = {0, 0}; // sensorCenter is at 0, 0 in local coordinates
433
434 pair<float, float> hitNormalized001 = {0.01, 0.01};
435 pair<float, float> resultLocal001 = {0.023, 0.042};
436 resultLocal001.first -= sensorCenter.first;
437 resultLocal001.second -= sensorCenter.second;
438
439 pair<float, float> hitNormalized088 = {0.88, 0.88};
440 pair<float, float> resultLocal088 = {2.024, 3.696};
441 resultLocal088.first -= sensorCenter.first;
442 resultLocal088.second -= sensorCenter.second;
443
444 pair<float, float> hitNormalized001088 = {0.01, 0.88};
445 pair<float, float> resultLocal001088 = {0.023, 3.696};// asymmetric example verifying that values are not accidentally switched
446 resultLocal001088.first -= sensorCenter.first;
447 resultLocal001088.second -= sensorCenter.second;
448
449 pair<float, float> hitNormalizedMinMax = { -0.1, 4.2}; // hit lies way beyond sensor edges (first is below lower threshold, second above higher one)
450 pair<float, float> resultLocalMinMax = { -1.15, 2.1}; // reduced to sensor borders
451
452 pair<float, float> hitLocal05 = SpacePoint::convertNormalizedToLocalCoordinates(hitNormalized05, aVxdID, &sensorInfoBase);
453 EXPECT_FLOAT_EQ(resultLocal05.first, hitLocal05.first);
454 EXPECT_FLOAT_EQ(resultLocal05.second, hitLocal05.second);
455
456 pair<float, float> hitLocal001 = SpacePoint::convertNormalizedToLocalCoordinates(hitNormalized001, aVxdID, &sensorInfoBase);
457 EXPECT_FLOAT_EQ(resultLocal001.first, hitLocal001.first);
458 EXPECT_FLOAT_EQ(resultLocal001.second, hitLocal001.second);
459
460 pair<float, float> hitLocal088 = SpacePoint::convertNormalizedToLocalCoordinates(hitNormalized088, aVxdID, &sensorInfoBase);
461 EXPECT_FLOAT_EQ(resultLocal088.first, hitLocal088.first);
462 EXPECT_FLOAT_EQ(resultLocal088.second, hitLocal088.second);
463
464 pair<float, float> hitLocal001088 = SpacePoint::convertNormalizedToLocalCoordinates(hitNormalized001088, aVxdID, &sensorInfoBase);
465 EXPECT_FLOAT_EQ(resultLocal001088.first, hitLocal001088.first);
466 EXPECT_FLOAT_EQ(resultLocal001088.second, hitLocal001088.second);
467
468 pair<float, float> hitLocalMinMax = SpacePoint::convertNormalizedToLocalCoordinates(hitNormalizedMinMax, aVxdID, &sensorInfoBase);
469 EXPECT_FLOAT_EQ(resultLocalMinMax.first, hitLocalMinMax.first);
470 EXPECT_FLOAT_EQ(resultLocalMinMax.second, hitLocalMinMax.second);
471 }

◆ TEST_F() [27/50]

TEST_F ( SpacePointTest  ,
testGetNClustersAssigned   
)

Test if the number of assigned Clusters is obtained correctly NOTE: using the same constructors as in previous tests!

Definition at line 479 of file spacePoint.cc.

480 {
481 // create a PXD SpacePoint and check if there is one Cluster assigned to it
482 VxdID aVxdID = VxdID(1, 1, 1);
483 VXD::SensorInfoBase sensorInfoBase = createSensorInfo(aVxdID, 2.3, 4.2);
484 PXDCluster aCluster = PXDCluster(aVxdID, 0., 0., 0.1, 0.1, 0, 0, 1, 1, 1, 1, 1, 1);
485 SpacePoint testPoint = SpacePoint(&aCluster, &sensorInfoBase);
486
487 EXPECT_EQ(testPoint.getNClustersAssigned(), 1);
488
489 // create different SVD SpacePoints and check if the number of assigned Clusters is correct
490 aVxdID = VxdID(3, 1, 2);
491 sensorInfoBase = createSensorInfo(aVxdID, 2.3, 4.2, -1, VXD::SensorInfoBase::SVD);
492
493 // create new SVDClusters and fill it with Info getting a Hit which is not at the origin
494 // SVDCluster (VxdID sensorID, bool isU, float position, float positionSigma, double clsTime, double clsTimeSigma, float seedCharge, float clsCharge, unsigned short clsSize)
495 SVDCluster clusterU1 = SVDCluster(aVxdID, true, -0.23, 0.1, 0.01, 0.001, 1, 1, 1, 1);
496 SVDCluster clusterV1 = SVDCluster(aVxdID, false, 0.42, 0.1, 0.01, 0.001, 1, 1, 1, 1);
497
498 vector<const SVDCluster*> clusters2d = { &clusterU1, &clusterV1 };
499 SpacePoint testPoint2D = SpacePoint(clusters2d, &sensorInfoBase);
500 EXPECT_EQ(testPoint2D.getNClustersAssigned(), 2);
501
502 vector<const SVDCluster*> clustersU = { &clusterU1 };
503 SpacePoint testPoint1DU = SpacePoint(clustersU, &sensorInfoBase);
504 EXPECT_EQ(testPoint1DU.getNClustersAssigned(), 1);
505
506 vector<const SVDCluster*> clustersV = { &clusterV1 };
507 SpacePoint testPoint1DV = SpacePoint(clustersV, &sensorInfoBase);
508 EXPECT_EQ(testPoint1DV.getNClustersAssigned(), 1);
509 }

◆ TEST_F() [28/50]

TEST_F ( SpacePointTest  ,
testRootIOB2Vector3   
)

Test if B2Vector3 writing in and reading from root files work.

create sample to be written in a root file:

test whole procedure with B2Vector3:

reopen file, read entries and check them

retrieve the B2Vector3 from file:

cleanup

Definition at line 260 of file spacePoint.cc.

261 {
262 string fNameVec = "demoB2Vector3s.root";
263
265 B2Vector3F aVec(1.23, 2.34, 3.45);
266
267
269 B2INFO("open root file: " << fNameVec);
270 TFile f(fNameVec.c_str(), "recreate");
271 f.cd();
272 f.WriteObject(&aVec, "myVec3");
273 f.Close();
274
276 TFile f2(fNameVec.c_str());
277 if (f2.IsZombie()) { B2ERROR("file could not be reopened!"); }
278 else {
279
281 B2Vector3F* retrievedVector;
282 f2.GetObject("myVec3", retrievedVector);
283 f2.Close();
284
285 EXPECT_DOUBLE_EQ(aVec.X(), retrievedVector->X());
286 EXPECT_DOUBLE_EQ(aVec.Y(), retrievedVector->Y());
287 EXPECT_DOUBLE_EQ(aVec.Z(), retrievedVector->Z());
288
289 }
291 if (remove(fNameVec.c_str()) != 0)
292 { B2ERROR("could not delete file " << fNameVec << "!"); }
293 else
294 { B2INFO(fNameVec << " successfully deleted"); }
295 }

◆ TEST_F() [29/50]

TEST_F ( SpacePointTest  ,
testRootIOPXDCluster   
)

Test if cluster writing in and reading from root files work.

create samples to be written in a root file:

test whole procedure first with PXDCluster:

reopen file, read entries and check them

cleanup

Definition at line 209 of file spacePoint.cc.

210 {
211 string fNameCluster = "demoClusters.root";
212 VxdID aVxdID = VxdID(1, 2, 3);
213 VXD::SensorInfoBase sensorInfoBase = createSensorInfo(aVxdID, 2.3, 4.2);
214
215
217 PXDCluster aCluster = PXDCluster(aVxdID, 0., 0., 0.1, 0.1, 0, 0, 1, 1, 1, 1, 1, 1);
218 EXPECT_EQ(aVxdID, aCluster.getSensorID());
219
221 B2INFO("open root file: " << fNameCluster);
222 TFile f(fNameCluster.c_str(), "recreate");
223 f.cd();
224 aCluster.Write();
225 f.Close();
226
228 TFile f2(fNameCluster.c_str());
229 if (f2.IsZombie()) { B2ERROR("file could not be reopened!"); }
230 else {
231 PXDCluster* retrievedCluster;
232 f2.GetListOfKeys()->Print();
233
234 TIter next(f2.GetListOfKeys());
235 TKey* key;
236 while ((key = (TKey*)next())) {
237
238 try {
239 retrievedCluster = static_cast<PXDCluster*>(key->ReadObj());
240 } catch (exception& e) {
241 B2WARNING("Key was not a PXDCluster, therefore error message: " << e.what() << "\n Skipping this key...");
242 continue;
243 }
244
245 EXPECT_EQ(retrievedCluster->getSensorID(), aCluster.getSensorID());
246 }
247 f2.Close();
248 }
250 if (remove(fNameCluster.c_str()) != 0)
251 { B2ERROR("could not delete file " << fNameCluster << "!"); }
252 else
253 { B2INFO(fNameCluster << " successfully deleted"); }
254 }

◆ TEST_F() [30/50]

TEST_F ( SpacePointTest  ,
testRootIOSP   
)

Test if spacePoints writing in and reading from root files work.

does not work - TODO solve!

create samples to be written in a root file:

create root file, fill spacePoint into file, store it, close

reopen file, read entries and check them

delete file from disk, cleanup}

Definition at line 301 of file spacePoint.cc.

302 {
304 string fNameSP = "demoSPs.root";
305 VxdID aVxdID = VxdID(1, 2, 3);
306 VXD::SensorInfoBase sensorInfoBase = createSensorInfo(aVxdID, 2.3, 4.2);
307
308
310 PXDCluster aCluster = PXDCluster(aVxdID, 0., 0., 0.1, 0.1, 0, 0, 1, 1, 1, 1, 1, 1);
311 EXPECT_EQ(aVxdID, aCluster.getSensorID());
312
313 SpacePoint testPoint = SpacePoint(&aCluster, &sensorInfoBase);
314 EXPECT_EQ(aVxdID, testPoint.getVxdID());
315
316
318 B2INFO("open root file:" << fNameSP);
319 TFile f3(fNameSP.c_str(), "recreate");
320 f3.cd();
321 testPoint.Write();
322 B2INFO("closing file:");
323 f3.Close();
324
326 TFile f4(fNameSP.c_str());
327 if (f4.IsZombie()) { B2ERROR("file could not be reopened!"); }
328 else {
329 SpacePoint* retrievedSpacePoint;
330 f4.GetListOfKeys()->Print();
331
332 TIter next(f4.GetListOfKeys());
333 TKey* key;
334 while ((key = (TKey*)next())) {
335
336 try {
337 retrievedSpacePoint = static_cast<SpacePoint*>(key->ReadObj());
338 } catch (exception& e) {
339 B2WARNING("Key was not a SpacePoint, therefore error message: " << e.what() << "\n Skipping this key...");
340 continue;
341 }
342
343 EXPECT_EQ(retrievedSpacePoint->getVxdID(), testPoint.getVxdID());
344 EXPECT_DOUBLE_EQ(retrievedSpacePoint->getPosition().X(), testPoint.getPosition().X());
345 EXPECT_DOUBLE_EQ(retrievedSpacePoint->getPosition().Y(), testPoint.getPosition().Y());
346 EXPECT_DOUBLE_EQ(retrievedSpacePoint->getPosition().Z(), testPoint.getPosition().Z());
347 EXPECT_FLOAT_EQ(retrievedSpacePoint->getPositionError().X(), testPoint.getPositionError().X());
348 EXPECT_FLOAT_EQ(retrievedSpacePoint->getPositionError().Y(), testPoint.getPositionError().Y());
349 EXPECT_FLOAT_EQ(retrievedSpacePoint->getPositionError().Z(), testPoint.getPositionError().Z());
350 EXPECT_DOUBLE_EQ(retrievedSpacePoint->getNormalizedLocalU(), testPoint.getNormalizedLocalU());
351 EXPECT_DOUBLE_EQ(retrievedSpacePoint->getNormalizedLocalV(), testPoint.getNormalizedLocalV());
352 }
353 f4.Close();
354 }
356 if (remove(fNameSP.c_str()) != 0)
357 { B2ERROR("could not delete file " << fNameSP << "!"); }
358 else
359 { B2INFO(fNameSP << " successfully deleted"); }
360 }

◆ TEST_F() [31/50]

TEST_F ( SpacePointTrackCandTest  ,
testConstructorFromVector   
)

Test the Constructor, that takes a vector of SpacePoint* as argument.

Definition at line 53 of file spacePointTrackCand.cc.

54 {
55 // set up some SpacePoints and group them to a vector
56 VxdID aVxdID = VxdID(1, 1, 1);
57 VXD::SensorInfoBase aSensorInfoBase = createSensorInfo(aVxdID, 2.3, 4.2);
58 PXDCluster aCluster = PXDCluster(aVxdID, 0., 0., 0.1, 0.1, 0, 0, 1, 1, 1, 1, 1, 1);
59 const SpacePoint aPXDSpacePoint = SpacePoint(&aCluster, &aSensorInfoBase);
60
61 VxdID anotherVxdID = VxdID(3, 3, 3);
62 VXD::SensorInfoBase anotherSensorInfoBase = createSensorInfo(anotherVxdID, 2.3, 4.2);
63 SVDCluster aUCluster = SVDCluster(anotherVxdID, true, -0.23, 0.1, 0.01, 0.001, 1, 1, 1, 1.0);
64 SVDCluster aVCluster = SVDCluster(anotherVxdID, false, 0.42, 0.1, 0.01, 0.001, 1, 1, 1, 1.0);
65 std::vector<const SVDCluster*> a2HitCluster = { &aUCluster, &aVCluster };
66 const SpacePoint aSVDSpacePoint = SpacePoint(a2HitCluster, &anotherSensorInfoBase);
67
68 SVDCluster anotherUCluster = SVDCluster(anotherVxdID, true, 0.23, 0.1, 0.01, 0.001, 1, 1, 1, 1.0);
69 std::vector<const SVDCluster*> a1HitCluster = { &anotherUCluster };
70 const SpacePoint anotherSVDSpacePoint = SpacePoint(a1HitCluster, &anotherSensorInfoBase);
71
72 const std::vector<const Belle2::SpacePoint*> aSpacePointVec = { &aPXDSpacePoint, &aSVDSpacePoint, &anotherSVDSpacePoint };
73
74
75 // construct SpacePointTrackCand with (more or less arbitrary) values for pdg code, charge and MC-TrackID
76 SpacePointTrackCand aSpacePointTC = SpacePointTrackCand(aSpacePointVec, 11, -1, 23);
77
78 // do some checks
79 // check if all SpacePoints are actually in the TrackCand
80 EXPECT_EQ(aSpacePointTC.getNHits(), aSpacePointVec.size());
81 // check pdg, charge, etc...
82 EXPECT_EQ(aSpacePointTC.getPdgCode(), Const::electron.getPDGCode());
83 EXPECT_DOUBLE_EQ(aSpacePointTC.getChargeSeed(), -1);
84 EXPECT_EQ(aSpacePointTC.getMcTrackID(), 23);
85
86 // get SpacePoints and compare them with the original vector
87 const std::vector<const SpacePoint*> returnSPVector = aSpacePointTC.getHits();
88 for (unsigned int i = 0; i < aSpacePointTC.getNHits(); i++) {
89 EXPECT_TRUE(returnSPVector[i] == aSpacePointVec[i]);
90 }
91 }

◆ TEST_F() [32/50]

TEST_F ( SpacePointTrackCandTest  ,
testEqualityOperator   
)

Test operator == of SpacePointTrackCand.

Definition at line 96 of file spacePointTrackCand.cc.

97 {
98 // set up some set up some space points and add them to SpacePointTrackCands
99 // many parts copied from spacePoint.cc (tracking/tests/)
100
101 VxdID aVxdID = VxdID(1, 1, 1);
102 VXD::SensorInfoBase sensorInfoBase = createSensorInfo(aVxdID, 2.3, 4.2);
103 PXDCluster aCluster = PXDCluster(aVxdID, 0., 0., 0.1, 0.1, 0, 0, 1, 1, 1, 1, 1, 1);
104 const SpacePoint aPXDSpacePoint = SpacePoint(&aCluster, &sensorInfoBase);
105
106 VxdID anotherVxdID = VxdID(3, 3, 3);
107 VXD::SensorInfoBase anotherSensorInfoBase = createSensorInfo(anotherVxdID, 2.3, 4.2);
108 SVDCluster aUCluster = SVDCluster(anotherVxdID, true, -0.23, 0.1, 0.01, 0.001, 1, 1, 1, 1.0);
109 SVDCluster aVCluster = SVDCluster(anotherVxdID, false, 0.42, 0.1, 0.01, 0.001, 1, 1, 1, 1.0);
110 std::vector<const SVDCluster*> a2HitCluster = { &aUCluster, &aVCluster };
111 const SpacePoint aSVDSpacePoint = SpacePoint(a2HitCluster, &anotherSensorInfoBase);
112
113 SVDCluster anotherUCluster = SVDCluster(anotherVxdID, true, 0.23, 0.1, 0.01, 0.001, 1, 1, 1, 1.0);
114 std::vector<const SVDCluster*> a1HitCluster = { &anotherUCluster };
115 const SpacePoint anotherSVDSpacePoint = SpacePoint(a1HitCluster, &anotherSensorInfoBase);
116
117 const std::vector<const Belle2::SpacePoint*> aSpacePointVec = { &aPXDSpacePoint, &aSVDSpacePoint };
118 const std::vector<const Belle2::SpacePoint*> sameSpacePointVec = { &aPXDSpacePoint, &aSVDSpacePoint };
119 const std::vector<const Belle2::SpacePoint*> anotherSpacePointVec = { &aPXDSpacePoint, &anotherSVDSpacePoint };
120
121 // set up two SpacePointTrackCands from the SpacePoint* vectors above
122 Belle2::SpacePointTrackCand aSpacePointTC = SpacePointTrackCand(aSpacePointVec, 1);
123 Belle2::SpacePointTrackCand anotherSpacePointTC = SpacePointTrackCand(sameSpacePointVec);
124
125 // getting undefined reference here!
126 EXPECT_TRUE(aSpacePointTC == anotherSpacePointTC);
127
128 // change pdg code and compare again (should not have any influence)
129 anotherSpacePointTC.setPdgCode(-Const::electron.getPDGCode());
130 EXPECT_TRUE(aSpacePointTC == anotherSpacePointTC);
131
132 // add a space point with arbitrary sorting parameter and compare again, should now give false
133 anotherSpacePointTC.addSpacePoint(&anotherSVDSpacePoint, 1.0);
134
135 EXPECT_FALSE(aSpacePointTC == anotherSpacePointTC);
136
137 // create another TC with different SVD SpacePoint and compare again with the previously created TCs.
138 Belle2::SpacePointTrackCand changedSVDSpacePointTC = SpacePointTrackCand(anotherSpacePointVec, 2, 3, 4);
139
140 EXPECT_FALSE(aSpacePointTC == changedSVDSpacePointTC);
141 EXPECT_FALSE(changedSVDSpacePointTC == anotherSpacePointTC);
142
143 // create an empty TC and add SpacePoints by hand and compare again with the other TCs
144 Belle2::SpacePointTrackCand newSpacePointTC;
145 newSpacePointTC.addSpacePoint(&aPXDSpacePoint, 1.0);
146 newSpacePointTC.addSpacePoint(&aSVDSpacePoint, 1.1);
147
148 EXPECT_TRUE(newSpacePointTC == aSpacePointTC);
149
150 newSpacePointTC.addSpacePoint(&anotherSVDSpacePoint, 1.2);
151
152 EXPECT_TRUE(newSpacePointTC == anotherSpacePointTC);
153
154 }
Storage for (VXD) SpacePoint-based track candidates.
void addSpacePoint(const SpacePoint *newSP, double sortParam)
add a new SpacePoint and its according sorting parameter to the track candidate
void setPdgCode(int pdgCode)
set a hypothesis for the particle by setting a pdgcode (will also set the appropriate charge)

◆ TEST_F() [33/50]

TEST_F ( SpacePointTrackCandTest  ,
testGetHitsInRange   
)

Test the get hits in range method.

Definition at line 178 of file spacePointTrackCand.cc.

179 {
180 SpacePointTrackCand fullTrackCand;
181
182 // set up some SpacePoints and add them to a SpacePointTrackCand
183 VxdID aVxdID1 = VxdID(1, 1, 1);
184 VXD::SensorInfoBase sensorInfoBase1 = createSensorInfo(aVxdID1, 2.3, 4.2);
185 PXDCluster aCluster = PXDCluster(aVxdID1, 0., 0., 0.1, 0.1, 0, 0, 1, 1, 1, 1, 1, 1);
186 const SpacePoint aPXDSpacePoint = SpacePoint(&aCluster, &sensorInfoBase1);
187 fullTrackCand.addSpacePoint(&aPXDSpacePoint, 1.23); // add a SpacePoint with an arbitrary sorting parameter
188
189 VxdID aVxdID2 = VxdID(2, 2, 2);
190 VXD::SensorInfoBase sensorInfoBase2 = createSensorInfo(aVxdID2, 2.3, 4.2);
191 SVDCluster aUCluster = SVDCluster(aVxdID2, true, -0.23, 0.1, 0.01, 0.001, 1, 1, 1, 1.0);
192 SVDCluster aVCluster = SVDCluster(aVxdID2, false, 0.42, 0.1, 0.01, 0.001, 1, 1, 1, 1.0);
193 std::vector<const SVDCluster*> UVClusterVec1 = { &aUCluster, &aVCluster };
194 std::vector<const SVDCluster*> VClusterVec = { &aVCluster };
195 std::vector<const SVDCluster*> UClusterVec = { &aUCluster };
196 const SpacePoint SVDSpacePoint1 = SpacePoint(UVClusterVec1, &sensorInfoBase2);
197 const SpacePoint SVDSpacePoint2 = SpacePoint(VClusterVec, &sensorInfoBase2);
198 const SpacePoint SVDSpacePoint3 = SpacePoint(UClusterVec, &sensorInfoBase2);
199 fullTrackCand.addSpacePoint(&SVDSpacePoint1, 2.34);
200 fullTrackCand.addSpacePoint(&SVDSpacePoint2, 3.45);
201 fullTrackCand.addSpacePoint(&SVDSpacePoint3, 4.56);
202
203 VxdID aVxdId3 = VxdID(3, 3, 3);
204 VXD::SensorInfoBase sensorInfoBase3 = createSensorInfo(aVxdId3, 2.3, 4.2);
205 SVDCluster aUCluster2 = SVDCluster(aVxdId3, true, -0.23, 0.1, 0.01, 0.001, 1, 1, 1, 1.0);
206 SVDCluster aVCluster2 = SVDCluster(aVxdId3, false, 0.42, 0.1, 0.01, 0.001, 1, 1, 1, 1.0);
207 std::vector<const SVDCluster*> UVClusterVec2 = { &aUCluster2, &aVCluster2 };
208 std::vector<const SVDCluster*> VClusterVec2 = { &aVCluster2 };
209 std::vector<const SVDCluster*> UClusterVec2 = { &aUCluster2 };
210 const SpacePoint SVDSpacePoint4 = SpacePoint(UVClusterVec2, &sensorInfoBase3);
211 const SpacePoint SVDSpacePoint5 = SpacePoint(VClusterVec2, &sensorInfoBase3);
212 const SpacePoint SVDSpacePoint6 = SpacePoint(UClusterVec2, &sensorInfoBase3);
213 fullTrackCand.addSpacePoint(&SVDSpacePoint4, 5.67);
214 fullTrackCand.addSpacePoint(&SVDSpacePoint5, 6.78);
215 fullTrackCand.addSpacePoint(&SVDSpacePoint6, 7.89);
216
217 // set up some 'shorter' SpacePointTrackCands
218 SpacePointTrackCand shortTC1;
219 shortTC1.addSpacePoint(&aPXDSpacePoint, 1.23);
220 shortTC1.addSpacePoint(&SVDSpacePoint1, 2.34);
221 shortTC1.addSpacePoint(&SVDSpacePoint2, 3.45);
222
223 SpacePointTrackCand shortTC2;
224 shortTC2.addSpacePoint(&SVDSpacePoint2, 3.45);
225 shortTC2.addSpacePoint(&SVDSpacePoint3, 4.56);
226 shortTC2.addSpacePoint(&SVDSpacePoint4, 5.67);
227 shortTC2.addSpacePoint(&SVDSpacePoint5, 6.78);
228
229 SpacePointTrackCand subTrackCand1 = SpacePointTrackCand(fullTrackCand.getHitsInRange(0, 3));
230 EXPECT_TRUE(subTrackCand1 == shortTC1);
231 std::vector<double> sortParams1 = { 1.23, 2.34, 3.45 };
232 std::vector<double> sortParamsTC1 = fullTrackCand.getSortingParametersInRange(0, 3);
233 EXPECT_EQ(sortParams1.size(), sortParamsTC1.size());
234 for (unsigned int i = 0; i < sortParamsTC1.size(); ++i) { EXPECT_DOUBLE_EQ(sortParams1.at(i), sortParamsTC1.at(i)); }
235
236 SpacePointTrackCand subTrackCand2 = SpacePointTrackCand(fullTrackCand.getHitsInRange(2, 6));
237 EXPECT_TRUE(subTrackCand2 == shortTC2);
238 std::vector<double> sortParams2 = { 3.45, 4.56, 5.67, 6.78 };
239 std::vector<double> sortParamsTC2 = fullTrackCand.getSortingParametersInRange(2, 6);
240 EXPECT_EQ(sortParams2.size(), sortParamsTC2.size());
241 for (unsigned int i = 0; i < sortParamsTC2.size(); ++i) { EXPECT_DOUBLE_EQ(sortParams2.at(i), sortParamsTC2.at(i)); }
242
243 // test throwing of exceptions
244 unsigned int nHits = fullTrackCand.getNHits();
245 ASSERT_THROW(fullTrackCand.getHitsInRange(0, nHits + 1),
246 SpacePointTrackCand::SPTCIndexOutOfBounds); // throw due to too high final index
247 ASSERT_NO_THROW(fullTrackCand.getHitsInRange(nHits - 2, nHits));
248 ASSERT_THROW(fullTrackCand.getHitsInRange(-1, 3),
249 SpacePointTrackCand::SPTCIndexOutOfBounds); // throw due to negative starting index
250 ASSERT_THROW(fullTrackCand.getHitsInRange(0, 10), SpacePointTrackCand::SPTCIndexOutOfBounds); // throw due to too high final index
251 ASSERT_THROW(fullTrackCand.getHitsInRange(10, 0),
252 SpacePointTrackCand::SPTCIndexOutOfBounds); // throw due to too high starting index
253 ASSERT_THROW(fullTrackCand.getHitsInRange(2, -1), SpacePointTrackCand::SPTCIndexOutOfBounds); // throw due to too low final index
254 ASSERT_THROW(fullTrackCand.getSortingParametersInRange(-1, 2),
255 SpacePointTrackCand::SPTCIndexOutOfBounds); // throw due to negative starting index
256 ASSERT_THROW(fullTrackCand.getSortingParametersInRange(0, nHits + 1),
257 SpacePointTrackCand::SPTCIndexOutOfBounds); // throw due to too high final index
258 ASSERT_THROW(fullTrackCand.getSortingParametersInRange(12, 3),
259 SpacePointTrackCand::SPTCIndexOutOfBounds); // throw due to too high starting index
260 ASSERT_THROW(fullTrackCand.getSortingParametersInRange(2, -2),
261 SpacePointTrackCand::SPTCIndexOutOfBounds); // throw due to too low final index
262 ASSERT_NO_THROW(fullTrackCand.getSortingParametersInRange(0, nHits));
263 }

◆ TEST_F() [34/50]

TEST_F ( SpacePointTrackCandTest  ,
testGetSortedHits   
)

Test setPdgCode method, by comparing its results with the expected values for the according particles.

Definition at line 415 of file spacePointTrackCand.cc.

416 {
417 // set up some SpacePoints and add them to a SpacePointTrackCand
418 VxdID aVxdID1 = VxdID(1, 1, 1);
419 VXD::SensorInfoBase sensorInfoBase1 = createSensorInfo(aVxdID1, 2.3, 4.2);
420 PXDCluster aCluster = PXDCluster(aVxdID1, 0., 0., 0.1, 0.1, 0, 0, 1, 1, 1, 1, 1, 1);
421 const SpacePoint aPXDSpacePoint = SpacePoint(&aCluster, &sensorInfoBase1);
422
423 VxdID aVxdID2 = VxdID(2, 2, 2);
424 VXD::SensorInfoBase sensorInfoBase2 = createSensorInfo(aVxdID2, 2.3, 4.2);
425 SVDCluster aUCluster = SVDCluster(aVxdID2, true, -0.23, 0.1, 0.01, 0.001, 1, 1, 1, 1.0);
426 SVDCluster aVCluster = SVDCluster(aVxdID2, false, 0.42, 0.1, 0.01, 0.001, 1, 1, 1, 1.0);
427 std::vector<const SVDCluster*> UVClusterVec1 = { &aUCluster, &aVCluster };
428 std::vector<const SVDCluster*> VClusterVec = { &aVCluster };
429 std::vector<const SVDCluster*> UClusterVec = { &aUCluster };
430 const SpacePoint SVDSpacePoint1 = SpacePoint(UVClusterVec1, &sensorInfoBase2);
431 const SpacePoint SVDSpacePoint2 = SpacePoint(VClusterVec, &sensorInfoBase2);
432 const SpacePoint SVDSpacePoint3 = SpacePoint(UClusterVec, &sensorInfoBase2);
433
434 VxdID aVxdId3 = VxdID(3, 3, 3);
435 VXD::SensorInfoBase sensorInfoBase3 = createSensorInfo(aVxdId3, 2.3, 4.2);
436 SVDCluster aUCluster2 = SVDCluster(aVxdId3, true, -0.23, 0.1, 0.01, 0.001, 1, 1, 1, 1.0);
437 SVDCluster aVCluster2 = SVDCluster(aVxdId3, false, 0.42, 0.1, 0.01, 0.001, 1, 1, 1, 1.0);
438 std::vector<const SVDCluster*> UVClusterVec2 = { &aUCluster2, &aVCluster2 };
439 std::vector<const SVDCluster*> VClusterVec2 = { &aVCluster2 };
440 std::vector<const SVDCluster*> UClusterVec2 = { &aUCluster2 };
441 const SpacePoint SVDSpacePoint4 = SpacePoint(UVClusterVec2, &sensorInfoBase3);
442 const SpacePoint SVDSpacePoint5 = SpacePoint(VClusterVec2, &sensorInfoBase3);
443 const SpacePoint SVDSpacePoint6 = SpacePoint(UClusterVec2, &sensorInfoBase3);
444
445
446 SpacePointTrackCand unsortedConstructed;
447 // add a SpacePoint with sorting parameter
448 unsortedConstructed.addSpacePoint(&aPXDSpacePoint, 1.0);
449 // add some SVD SpacePoints in logical order
450 unsortedConstructed.addSpacePoint(&SVDSpacePoint1, 2.34);
451 unsortedConstructed.addSpacePoint(&SVDSpacePoint2, 3.45);
452 unsortedConstructed.addSpacePoint(&SVDSpacePoint3, 4.56);
453 // add some SpacePoints in 'wrong' order
454 unsortedConstructed.addSpacePoint(&SVDSpacePoint4, 5.67);
455 unsortedConstructed.addSpacePoint(&SVDSpacePoint6, 7.89);
456 unsortedConstructed.addSpacePoint(&SVDSpacePoint5, 6.78);
457
458 // set up a SpacePointTrackCands already properly sorted
459 SpacePointTrackCand sortedConstructed;
460 sortedConstructed.addSpacePoint(&aPXDSpacePoint, 1.23);
461 sortedConstructed.addSpacePoint(&SVDSpacePoint1, 2.34);
462 sortedConstructed.addSpacePoint(&SVDSpacePoint2, 3.45);
463 sortedConstructed.addSpacePoint(&SVDSpacePoint3, 4.56);
464 sortedConstructed.addSpacePoint(&SVDSpacePoint4, 5.67);
465 sortedConstructed.addSpacePoint(&SVDSpacePoint5, 6.78);
466 sortedConstructed.addSpacePoint(&SVDSpacePoint6, 7.89);
467
468 // test sorting
469 SpacePointTrackCand sorted = SpacePointTrackCand(unsortedConstructed.getSortedHits());
470 // == compares the spacepoints
471 EXPECT_TRUE(sorted == sortedConstructed);
472
473 SpacePointTrackCand nothingChanged = SpacePointTrackCand(sortedConstructed.getSortedHits());
474 EXPECT_TRUE(nothingChanged == sortedConstructed);
475
476
477 std::vector<double> sortParams1 = { 1.0, 2.0, 3.0, 4.0, 5.0, 7.0, 6.0};
478 sortedConstructed.setSortingParameters(sortParams1);
479
480 // verify that sorting changed according to new sortParams
481 SpacePointTrackCand unsorted = SpacePointTrackCand(sortedConstructed.getSortedHits());
482 EXPECT_TRUE(unsorted == unsortedConstructed);
483 }

◆ TEST_F() [35/50]

TEST_F ( SpacePointTrackCandTest  ,
testRefereeStatus   
)

Test the setRefereeStatus and getRefereeStatus methods.

Definition at line 268 of file spacePointTrackCand.cc.

269 {
270 SpacePointTrackCand trackCand; // default constructor -> should initialize the referee status to c_initialState
271
272 // currently c_isActive is the initialState:
273 EXPECT_EQ(trackCand.getRefereeStatus(), SpacePointTrackCand::c_isActive);
274 EXPECT_EQ(SpacePointTrackCand::c_initialState, SpacePointTrackCand::c_isActive);
275
276 unsigned short int initialStatus = trackCand.getRefereeStatus();
277 EXPECT_EQ(initialStatus, SpacePointTrackCand::c_initialState);
278
279 // design an arbitrary status and set it, then test if the returned status is the set status
280 unsigned short int newStatus = 0;
281 newStatus += SpacePointTrackCand::c_checkedByReferee;
282 newStatus += SpacePointTrackCand::c_checkedTrueHits;
283 trackCand.setRefereeStatus(newStatus);
284 EXPECT_EQ(trackCand.getRefereeStatus(), newStatus);
285
286 // clear the status and test if its 0
287 trackCand.clearRefereeStatus();
288 EXPECT_EQ(trackCand.getRefereeStatus(), 0);
289
290 // reset the status and test if it's the initial state
291 trackCand.resetRefereeStatus();
292 EXPECT_EQ(trackCand.getRefereeStatus(), SpacePointTrackCand::c_initialState);
293
294
295 trackCand.clearRefereeStatus(); // enforce empty refereeStatus
296 // add several statuses one by one and test if the overall status is as expected (once with 'overall status' and once with status one by one)
297 trackCand.addRefereeStatus(SpacePointTrackCand::c_checkedClean);
298 EXPECT_TRUE(trackCand.hasRefereeStatus(SpacePointTrackCand::c_checkedClean));
299 trackCand.addRefereeStatus(SpacePointTrackCand::c_hitsOnSameSensor);
300 EXPECT_TRUE(trackCand.hasRefereeStatus(SpacePointTrackCand::c_hitsOnSameSensor));
301 EXPECT_FALSE(trackCand.hasRefereeStatus(SpacePointTrackCand::c_hitsLowDistance));
302
303 trackCand.addRefereeStatus(SpacePointTrackCand::c_checkedByReferee);
304 unsigned short int expectedStatus = SpacePointTrackCand::c_checkedClean + SpacePointTrackCand::c_hitsOnSameSensor +
305 SpacePointTrackCand::c_checkedByReferee;
306 EXPECT_EQ(trackCand.getRefereeStatus(), expectedStatus);
307
308
309 // remove one status and test if it actually gets removed
310 trackCand.removeRefereeStatus(SpacePointTrackCand::c_checkedClean);
311 expectedStatus -= SpacePointTrackCand::c_checkedClean;
312 EXPECT_EQ(trackCand.getRefereeStatus(), expectedStatus);
313 EXPECT_FALSE(trackCand.hasRefereeStatus(SpacePointTrackCand::c_checkedClean));
314 trackCand.removeRefereeStatus(SpacePointTrackCand::c_checkedClean); // remove again and check if nothing changes
315 EXPECT_EQ(trackCand.getRefereeStatus(), expectedStatus);
316
317 EXPECT_TRUE(trackCand.hasRefereeStatus(expectedStatus));
318
319 // test if the status that remains is still set
320 EXPECT_TRUE(trackCand.hasRefereeStatus(SpacePointTrackCand::c_hitsOnSameSensor));
321 EXPECT_TRUE(trackCand.hasHitsOnSameSensor()); // echeck the wrapper function
322
323
324 // check if adding of the same status twice works
325 trackCand.clearRefereeStatus();
326 trackCand.addRefereeStatus(SpacePointTrackCand::c_checkedSameSensors);
327 trackCand.addRefereeStatus(SpacePointTrackCand::c_checkedSameSensors);
328 EXPECT_TRUE(trackCand.hasRefereeStatus(SpacePointTrackCand::c_checkedSameSensors));
329 EXPECT_TRUE(trackCand.checkedSameSensors());
330
331 trackCand.addRefereeStatus(SpacePointTrackCand::c_curlingTrack);
332 EXPECT_TRUE(trackCand.isCurling());
333
334
335 trackCand.clearRefereeStatus();
336 // test that at least n bits are present for storing stuff in the m_refereeStatus (update this test if you add a new flag to the RefereeStatusBit)
337 // WARNING: hardcoded -> make sure to keep this thing up to date!
338 int n = 13;
339 int maxUsedStatus = pow(2, n);
340 trackCand.addRefereeStatus(maxUsedStatus);
341 EXPECT_TRUE(trackCand.hasRefereeStatus(maxUsedStatus));
342
343 int maxN = 15; // unsigned short int has 2 bytes (-> 16 bits) to store information
344 int maxPossibleStatus = pow(2, maxN); // maximum possible status to store
345 trackCand.addRefereeStatus(maxPossibleStatus);
346 EXPECT_TRUE(trackCand.hasRefereeStatus(maxPossibleStatus));
347
348 int impossibleStatus = maxPossibleStatus * 2; // create an integer that is too big to be stored in a unsigned short integer
349 trackCand.clearRefereeStatus();
350 trackCand.setRefereeStatus(impossibleStatus); // this should lead to an overflow in SpacePointTrackCand::m_refereeStatus
351 EXPECT_NE(trackCand.getRefereeStatus(), impossibleStatus); // -> overflow leads this test to fail
352
353 trackCand.clearRefereeStatus();
354 int wrongStatus = 7; // set a wrong status, that causes some of the checks to be true although they shouldn't
355 trackCand.addRefereeStatus(wrongStatus);
356 EXPECT_TRUE(trackCand.hasRefereeStatus(1));
357 EXPECT_TRUE(trackCand.hasRefereeStatus(2));
358 EXPECT_TRUE(trackCand.hasRefereeStatus(4));
359 wrongStatus = 15;
360 trackCand.addRefereeStatus(wrongStatus);
361 EXPECT_TRUE(trackCand.hasRefereeStatus(8));
362 }

◆ TEST_F() [36/50]

TEST_F ( SpacePointTrackCandTest  ,
testRemoveSpacePoints   
)

Test the removeSpacePoint method.

Definition at line 367 of file spacePointTrackCand.cc.

368 {
369 // set up SpacePointTrackCand
370 SpacePointTrackCand fullTrackCand;
371
372 // set up some SpacePoints and add them to a SpacePointTrackCand
373 VxdID aVxdID1 = VxdID(1, 1, 1);
374 VXD::SensorInfoBase sensorInfoBase1 = createSensorInfo(aVxdID1, 2.3, 4.2);
375 PXDCluster aCluster = PXDCluster(aVxdID1, 0., 0., 0.1, 0.1, 0, 0, 1, 1, 1, 1, 1, 1);
376 const SpacePoint aPXDSpacePoint = SpacePoint(&aCluster, &sensorInfoBase1);
377 fullTrackCand.addSpacePoint(&aPXDSpacePoint, 1.23); // add a SpacePoint with an arbitrary sorting parameter
378
379 VxdID aVxdID2 = VxdID(2, 2, 2);
380 VXD::SensorInfoBase sensorInfoBase2 = createSensorInfo(aVxdID2, 2.3, 4.2);
381 SVDCluster aUCluster = SVDCluster(aVxdID2, true, -0.23, 0.1, 0.01, 0.001, 1, 1, 1, 1.0);
382 SVDCluster aVCluster = SVDCluster(aVxdID2, false, 0.42, 0.1, 0.01, 0.001, 1, 1, 1, 1.0);
383 std::vector<const SVDCluster*> UVClusterVec1 = { &aUCluster, &aVCluster };
384 std::vector<const SVDCluster*> VClusterVec = { &aVCluster };
385 std::vector<const SVDCluster*> UClusterVec = { &aUCluster };
386 const SpacePoint SVDSpacePoint1 = SpacePoint(UVClusterVec1, &sensorInfoBase2);
387 const SpacePoint SVDSpacePoint2 = SpacePoint(VClusterVec, &sensorInfoBase2);
388 const SpacePoint SVDSpacePoint3 = SpacePoint(UClusterVec, &sensorInfoBase2);
389 fullTrackCand.addSpacePoint(&SVDSpacePoint1, 2.34);
390 fullTrackCand.addSpacePoint(&SVDSpacePoint2, 3.45);
391 fullTrackCand.addSpacePoint(&SVDSpacePoint3, 4.56);
392
393 // set up a second TC, but omit one SpacePoint
394 SpacePointTrackCand expectedTC;
395 expectedTC.addSpacePoint(&aPXDSpacePoint, 1.23);
396 expectedTC.addSpacePoint(&SVDSpacePoint2, 3.45);
397 expectedTC.addSpacePoint(&SVDSpacePoint3, 4.56);
398
399 // remove SpcePoint from first TrackCand amd compare it with the expected TrackCand
400 fullTrackCand.removeSpacePoint(1);
401 EXPECT_TRUE(expectedTC == fullTrackCand);
402
403 std::vector<double> expectedSortParams = { 1.23, 3.45, 4.56 };
404 std::vector<double> sortParams = fullTrackCand.getSortingParameters();
405 EXPECT_EQ(expectedSortParams.size(), sortParams.size());
406 for (unsigned int i = 0; i < sortParams.size(); ++i) { EXPECT_DOUBLE_EQ(sortParams.at(i), expectedSortParams.at(i)); }
407
408 // try to remove a SpacePoint that is out of bounds
409 ASSERT_THROW(fullTrackCand.removeSpacePoint(fullTrackCand.getNHits()), SpacePointTrackCand::SPTCIndexOutOfBounds);
410 }

◆ TEST_F() [37/50]

TEST_F ( SpacePointTrackCandTest  ,
testSetPdgCode   
)

Test setPdgCode method, by comparing its results with the expected values for the according particles.

Definition at line 159 of file spacePointTrackCand.cc.

160 {
161 SpacePointTrackCand aSpacePointTC;
162
163 // electron
164 aSpacePointTC.setPdgCode(Const::electron.getPDGCode());
165 EXPECT_DOUBLE_EQ(aSpacePointTC.getChargeSeed(), -1);
166 // positron
167 aSpacePointTC.setPdgCode(-Const::electron.getPDGCode());
168 EXPECT_DOUBLE_EQ(aSpacePointTC.getChargeSeed(), 1);
169
170 // B+ Meson
171 aSpacePointTC.setPdgCode(521);
172 EXPECT_DOUBLE_EQ(aSpacePointTC.getChargeSeed(), 1);
173 }

◆ TEST_F() [38/50]

TEST_F ( ThreeHitFiltersTest  ,
simpleTest   
)

Test simple Setters and Getters.

Definition at line 24 of file threehitfilters.h.

25 {
26 // testing deltaPt-calculator:
27 B2Vector3D innerHit(1., 1., 0.), centerHit(3., 3., 0.), outerHitEvil(6., 3., 0.), outerHitSimple(6., 4., 0.);
28
29 ThreeHitFilters aFilter = ThreeHitFilters(outerHitSimple, centerHit, innerHit);
30
31// B2INFO("now comparing values of calcCircleDist2IP using simple outerHit: \n calcPt: " << aFilter.calcCircleDist2IP())
32// aFilter.resetValues(outerHitSimple,centerHit,innerHit);
33 EXPECT_FLOAT_EQ(0.44499173338941, aFilter.calcCircleDist2IP());
34
35 aFilter.resetValues(outerHitEvil, centerHit, innerHit);
36// B2INFO("now comparing values of calcCircleDist2IP using evil outerHit: \n calcPt: " << aFilter.calcPt())
37// aFilter.resetValues(outerHitEvil,centerHit,innerHit);
38 EXPECT_FLOAT_EQ(0.719806016136754, aFilter.calcCircleDist2IP());
39
40// B2INFO("now tests with 0.976T (and reset between each step): \n")
41 aFilter.resetMagneticField(0.976);
42 aFilter.resetValues(outerHitSimple, centerHit, innerHit);
43// B2INFO("now comparing values of calcCircleDist2IP using simple outerHit: \n calcPt: " << aFilter.calcCircleDist2IP() )
44// aFilter.resetValues(outerHitSimple,centerHit,innerHit);
45 EXPECT_FLOAT_EQ(0.44499173338941, aFilter.calcCircleDist2IP());
46
47 aFilter.resetValues(outerHitEvil, centerHit, innerHit);
48// B2INFO("now comparing values of calcCircleDist2IP using evil outerHit: \n calcPt: " << aFilter.calcPt() )
49// aFilter.resetValues(outerHitEvil,centerHit,innerHit);
50 EXPECT_FLOAT_EQ(0.719806016136754, aFilter.calcCircleDist2IP());
51 }

◆ TEST_F() [39/50]

TEST_F ( ThreeHitFiltersTest  ,
TestAngles   
)

the correctness of the angle calculators

Definition at line 71 of file threehitfilters.h.

72 {
73 B2Vector3D innerHit(1., 1., 0.), centerHit(3., 3., 0.), outerHit(6., 4., 1.);
74 B2Vector3D cent_inner = centerHit - innerHit, outer_center = outerHit - centerHit;
75
76// B2INFO("now tests with 1T \n")
77 ThreeHitFilters aFilter = ThreeHitFilters(outerHit, centerHit, innerHit);
78
79 EXPECT_DOUBLE_EQ(31.4821541052938556040832384555411729852856, aFilter.fullAngle3D()); //angle in degrees
80 EXPECT_DOUBLE_EQ(0.090909090909090909091, aFilter.calcAngle3D());
81
82 EXPECT_DOUBLE_EQ(26.5650511770779893515721937204532946712042, aFilter.fullAngleXY()); //angle in degrees
83 EXPECT_DOUBLE_EQ(.1, aFilter.calcAngleXY());
84
85 EXPECT_FLOAT_EQ(17.54840061379229806435203716652846677620, aFilter.fullAngleRZ());
86 EXPECT_FLOAT_EQ(cos(17.54840061379229806435203716652846677620 * M_PI / 180.), aFilter.calcAngleRZ());
87
88 EXPECT_DOUBLE_EQ(0.4636476090008061162142562314612144020285, aFilter.fullAngle2D(outer_center, cent_inner)); //angle in radians
89 EXPECT_DOUBLE_EQ(0.89442719099991586, aFilter.calcAngle2D(outer_center, cent_inner));
90 }

◆ TEST_F() [40/50]

TEST_F ( ThreeHitFiltersTest  ,
TestCalcPt   
)

test cramer method in calcPt

Definition at line 141 of file threehitfilters.h.

142 {
143 // calcCircleCenterV2 had problems when x_1==x_2 or y_1==y_2
144 B2Vector3D innerHit(1., 2., 0.), centerHit(3., 2., 1.), outerHit(3., 4., 3.);
145 B2Vector3D cent_inner = centerHit - innerHit, outer_center = outerHit - centerHit;
146 ThreeHitFilters aFilter = ThreeHitFilters();
147 B2Vector3D innerHit2(1., 1., 0.), centerHit2(3., 3., 0.), outerHitEvil(6., 3., 0.);
148
149 double pt = 0, ptTrue = 0;
150
151 aFilter.resetValues(outerHit, centerHit, innerHit);
152 ptTrue = aFilter.calcPt(1.414213562373095048801688724209698078570);
153 aFilter.resetValues(outerHit, centerHit, innerHit);
154 pt = aFilter.calcPt();
155 EXPECT_DOUBLE_EQ(ptTrue, pt);
156
157 ptTrue = 0.017118925181688543;
158 aFilter.resetValues(outerHitEvil, centerHit2, innerHit2);
159 pt = aFilter.calcPt();
160 EXPECT_DOUBLE_EQ(ptTrue, pt);
161
162 aFilter.resetValues(outerHit, outerHit, innerHit);
163 //B2WARNING("MUST produce errors: 2 hits are the same: " << ptTrue << ", Pt: " << pt );
164 ptTrue = aFilter.calcPt(1.414213562373095048801688724209698078570);
165 aFilter.resetValues(outerHit, outerHit, innerHit);
166 EXPECT_ANY_THROW(aFilter.calcPt());
167 }

◆ TEST_F() [41/50]

TEST_F ( ThreeHitFiltersTest  ,
TestDeltaSOverZ   
)

test DeltaSOverZ

Definition at line 123 of file threehitfilters.h.

124 {
125 B2Vector3D innerHit(1., 1., 0.), centerHit(3., 3., 1.), outerHit(6., 4., 3.);
126 B2Vector3D cent_inner = centerHit - innerHit, outer_center = outerHit - centerHit;
127 ThreeHitFilters aFilter = ThreeHitFilters(outerHit, centerHit, innerHit);
128
129 EXPECT_FLOAT_EQ(0.31823963, aFilter.calcDeltaSlopeZOverS());
130
131 outerHit.RotateZ(.4);
132 centerHit.RotateZ(.4);
133 innerHit.RotateZ(.4);
134 aFilter.resetValues(outerHit, centerHit, innerHit); //calcDeltaSOverZV2 is invariant under rotations in the r-z plane
135
136 EXPECT_FLOAT_EQ(0.31823963, aFilter.calcDeltaSlopeZOverS());
137 }
void RotateZ(DataType angle)
Rotates the B2Vector3 around the z-axis.
Definition: B2Vector3.h:359

◆ TEST_F() [42/50]

TEST_F ( ThreeHitFiltersTest  ,
TestMagneticField   
)

the correctness of the magneticField-values (important for pT-related calculations)

Definition at line 55 of file threehitfilters.h.

56 {
57 B2Vector3D innerHit(1., 1., 0.), centerHit(3., 3., 0.), outerHitEvil(6., 3., 0.), outerHitSimple(6., 4., 0.);
58
59 ThreeHitFilters aFilter = ThreeHitFilters(outerHitSimple, centerHit, innerHit);
60
61 EXPECT_DOUBLE_EQ(1.5, aFilter.getMagneticField()); // standard case
62
63 aFilter.resetMagneticField(1);
64 EXPECT_DOUBLE_EQ(1., aFilter.getMagneticField());
65
66 EXPECT_DOUBLE_EQ(26.5650511770779893515721937204532946712042, aFilter.fullAngle3D()); //angle in degrees
67 }

◆ TEST_F() [43/50]

TEST_F ( ThreeHitFiltersTest  ,
TestSignAndOtherFilters   
)

test sign, helixFit and calcDeltaSlopeRZ filters

Definition at line 94 of file threehitfilters.h.

95 {
96 B2Vector3D innerHit(1., 1., 0.), centerHit(3., 3., 0.), outerHit(6., 4., 1.), sigma(.01, .01, .01), unrealsigma(2, 2, 2),
97 outerhighHit(4., 6., 1.);
98
99 ThreeHitFilters aFilter = ThreeHitFilters(outerHit, centerHit, innerHit);
100
101 EXPECT_DOUBLE_EQ(0.30627736916966945608, aFilter.calcDeltaSlopeRZ());
102
103 EXPECT_DOUBLE_EQ(0., aFilter.calcHelixFit());
104
105 EXPECT_DOUBLE_EQ(1., aFilter.calcSign(outerHit, centerHit, innerHit, sigma, sigma, sigma));
106 EXPECT_DOUBLE_EQ(-1., aFilter.calcSign(outerhighHit, centerHit, innerHit, sigma, sigma, sigma));
107 EXPECT_DOUBLE_EQ(-1., aFilter.calcSign(innerHit, centerHit, outerHit, sigma, sigma, sigma));
108 EXPECT_DOUBLE_EQ(0., aFilter.calcSign(outerHit, centerHit, innerHit, unrealsigma, unrealsigma,
109 unrealsigma)); //for very large sigma, this track is approximately straight.
110
111 EXPECT_LT(0., aFilter.calcSign(outerHit, centerHit, innerHit));
112 EXPECT_GT(0., aFilter.calcSign(outerhighHit, centerHit, innerHit));
113 EXPECT_GT(0., aFilter.calcSign(innerHit, centerHit, outerHit));
114 EXPECT_LT(0., aFilter.calcSign(outerHit, centerHit, innerHit));
115
116 EXPECT_DOUBLE_EQ(1., aFilter.calcSign(outerHit, centerHit, innerHit));
117 EXPECT_DOUBLE_EQ(-1., aFilter.calcSign(outerhighHit, centerHit, innerHit));
118 EXPECT_DOUBLE_EQ(-1., aFilter.calcSign(innerHit, centerHit, outerHit));
119 }

◆ TEST_F() [44/50]

TEST_F ( TwoHitFiltersTest  ,
TestEmptyFilter   
)

Test simple Setters and Getters by filling zeroes.

Definition at line 23 of file twohitfilters.h.

24 {
25 TwoHitFilters aFilter = TwoHitFilters();
26
27 EXPECT_DOUBLE_EQ(0., aFilter.calcDist3D());
28
29 EXPECT_DOUBLE_EQ(0., aFilter.fullDist3D());
30
31 EXPECT_DOUBLE_EQ(0., aFilter.calcDistXY());
32
33 EXPECT_DOUBLE_EQ(0., aFilter.fullDistXY());
34
35 EXPECT_DOUBLE_EQ(0., aFilter.calcDistZ());
36
37 EXPECT_DOUBLE_EQ(0., aFilter.calcSlopeRZ());
38
39 EXPECT_DOUBLE_EQ(0., aFilter.calcNormedDist3D());
40
41 EXPECT_DOUBLE_EQ(42., aFilter.filterNan(42.));
42
43 EXPECT_DOUBLE_EQ(42, aFilter.filterNan(42));
44
45 EXPECT_DOUBLE_EQ(42., aFilter.filterNan(42));
46
47 EXPECT_DOUBLE_EQ(0., aFilter.filterNan(1. / 0.));
48
49 }

◆ TEST_F() [45/50]

TEST_F ( TwoHitFiltersTest  ,
TestFilledFilter   
)

Test simple Setters and Getters by filling non-zero-values.

Definition at line 52 of file twohitfilters.h.

53 {
54 B2Vector3D innerHit(1, 2, 3);
55 B2Vector3D outerHit(2, 3, 4);
56
57 TwoHitFilters aFilter = TwoHitFilters(outerHit, innerHit); // correct order
58
59 EXPECT_DOUBLE_EQ(3., aFilter.calcDist3D()); // does calc dist (outer - innerHit)^2!
60
61 EXPECT_DOUBLE_EQ(sqrt(3.), aFilter.fullDist3D()); // does calc dist (outer - innerHit)
62
63 EXPECT_DOUBLE_EQ(2., aFilter.calcDistXY()); // does calc dist (outer - innerHit)^2!
64
65 EXPECT_DOUBLE_EQ(sqrt(2.), aFilter.fullDistXY()); // does calc dist (outer - innerHit)calcDistXY
66
67 EXPECT_DOUBLE_EQ(1., aFilter.calcDistZ());
68
69 EXPECT_DOUBLE_EQ(atan(sqrt(2.)),
70 aFilter.calcSlopeRZ()); // normal slope is fullDistXY/calcDistZ = sqrt(2), here atan of slope is calculated
71
72 EXPECT_DOUBLE_EQ(2. / 3., aFilter.calcNormedDist3D());
73
74
75 TwoHitFilters bFilter =
76 TwoHitFilters(); // initialising an empty filter first to check whether the resetting function is doing its job...
77
78 bFilter.resetValues(innerHit, outerHit); // wrong order
79
80 EXPECT_DOUBLE_EQ(aFilter.calcDist3D(), bFilter.calcDist3D()); // does calc dist (outer - innerHit)^2!
81
82 EXPECT_DOUBLE_EQ(aFilter.fullDist3D(), bFilter.fullDist3D()); // does calc dist (outer - innerHit)
83
84 EXPECT_DOUBLE_EQ(aFilter.calcDistXY(), bFilter.calcDistXY()); // does calc dist (outer - innerHit)^2!
85
86 EXPECT_DOUBLE_EQ(aFilter.fullDistXY(), bFilter.fullDistXY()); // does calc dist (outer - innerHit)
87
88 EXPECT_DOUBLE_EQ(-aFilter.calcDistZ(), bFilter.calcDistZ());
89
90 EXPECT_DOUBLE_EQ(-aFilter.calcSlopeRZ(), bFilter.calcSlopeRZ());
91
92 EXPECT_DOUBLE_EQ(aFilter.calcNormedDist3D(), bFilter.calcNormedDist3D());
93 }

◆ TEST_F() [46/50]

TEST_F ( TwoHitFiltersTest  ,
testLargeFilter   
)

Test simple Setters and Getters by filling extreme values.

Definition at line 98 of file twohitfilters.h.

99 {
100 B2Vector3D innerHit(1e150, 0, 0);
101 B2Vector3D outerHit(0, 0, 0);
102 B2Vector3D innerHit2(1, 2, 3);
103 B2Vector3D outerHit2(2, 3, 4);
104
105 TwoHitFilters aFilter = TwoHitFilters(outerHit, innerHit); // correct order
106
107 EXPECT_DOUBLE_EQ(1e300, aFilter.calcDist3D()); // does calc dist (outer - innerHit)^2!
108
109 aFilter.resetValues(innerHit2, outerHit2);
110
111 // does currently give an error at the clang-build:
112 // EXPECT_DOUBLE_EQ(-atan(sqrt(2.)), aFilter.calcSlopeRZ());
113 }

◆ TEST_F() [47/50]

TEST_F ( TwoHitFiltersTest  ,
TestOutOfRangeNormedDistFilter   
)

And now possibly the only case where TwoHitFilters produces wrong results.

However, (1e300, 0, 1e300) will never happen.

Definition at line 132 of file twohitfilters.h.

134 {
135 B2Vector3D innerHit(1e300, 0, 1e300);
136 B2Vector3D outerHit(0, 0, 0);
137 double correctResult = 1. / 2.; // this should be the result which is analytically correct
138 double wrongResult = 0.; // this is the result because of out of range of double precision
139
140 TwoHitFilters aFilter = TwoHitFilters(outerHit, innerHit); // correct order
141
142 // however, the values exceed the range of double, therefore the result is NOT EQUAL to the correct value:
143 EXPECT_NE(correctResult, aFilter.calcNormedDist3D());
144 EXPECT_DOUBLE_EQ(wrongResult, aFilter.calcNormedDist3D());
145 }

◆ TEST_F() [48/50]

TEST_F ( V0FitterTest  ,
GetTrackHypotheses   
)

Test getter for track hypotheses.

Definition at line 34 of file v0fitter.cc.

35 {
36 genfit::MaterialEffects::getInstance()->init(new genfit::TGeoMaterialInterface());
37 genfit::FieldManager::getInstance()->init(new genfit::ConstField(0., 0., 1.5));
38 V0Fitter v0Fitter;
39 const auto kShortTracks = v0Fitter.getTrackHypotheses(Const::Kshort);
40 const auto photonTracks = v0Fitter.getTrackHypotheses(Const::photon);
41 const auto lambdaTracks = v0Fitter.getTrackHypotheses(Const::Lambda);
42 const auto antiLambdaTracks = v0Fitter.getTrackHypotheses(Const::antiLambda);
43
44 EXPECT_EQ(Const::pion, kShortTracks.first);
45 EXPECT_EQ(Const::pion, kShortTracks.second);
46
47 EXPECT_EQ(Const::electron, photonTracks.first);
48 EXPECT_EQ(Const::electron, photonTracks.second);
49
50 EXPECT_EQ(Const::proton, lambdaTracks.first);
51 EXPECT_EQ(Const::pion, lambdaTracks.second);
52
53 EXPECT_EQ(Const::pion, antiLambdaTracks.first);
54 EXPECT_EQ(Const::proton, antiLambdaTracks.second);
55 }

◆ TEST_F() [49/50]

TEST_F ( V0FitterTest  ,
InitializeCuts   
)

Test initialization of cuts.

Definition at line 58 of file v0fitter.cc.

59 {
60 genfit::MaterialEffects::getInstance()->init(new genfit::TGeoMaterialInterface());
61 genfit::FieldManager::getInstance()->init(new genfit::ConstField(0., 0., 1.5));
62 V0Fitter v0Fitter;
63 v0Fitter.initializeCuts(1.0, 10000., {0.425, 0.575}, {1.09, 1.14}, {0, 0.1});
64 EXPECT_EQ(1.0, v0Fitter.m_beamPipeRadius);
65 EXPECT_EQ(10000., v0Fitter.m_vertexChi2CutOutside);
66 EXPECT_EQ(std::make_tuple(0.425, 0.575), v0Fitter.m_invMassRangeKshort);
67 EXPECT_EQ(std::make_tuple(1.09, 1.14), v0Fitter.m_invMassRangeLambda);
68 EXPECT_EQ(std::make_tuple(0, 0.1), v0Fitter.m_invMassRangePhoton);
69 }

◆ TEST_F() [50/50]

TEST_F ( VariablesOnTTree  ,
basic_test   
)

Basic test of the class.

Definition at line 61 of file variablesOnTTree.cc.

62 {
63 auto filter1 = 0 < Difference() < 1 && 0 < Sum() < 1;
64 auto variables1 = VariablesTTree<>::build(filter1, tree1);
65
66 auto filter2 = 0 < Difference() < 1 && 0 < Sum() < 1;
67 auto variables2 = VariablesTTree<>::build(filter2, tree2);
68
69 double a(0.), b(1.0);
70 variables1.evaluateOn(a, b);
71 tree1->Fill();
72
73 double c(1.), d(0.0);
74 variables2.evaluateOn(c, d);
75 tree2->Fill();
76
77 tree1->Scan();
78 tree2->Scan();
79 }

◆ traverseTree()

void traverseTree ( std::vector< TrackFindingCDC::WithWeight< const AState * > > &  path,
const std::vector< TrackFindingCDC::WeightedRelation< AState > > &  relations,
std::vector< AResult > &  results 
)
private

Implementation of the traverseTree function.

Definition at line 68 of file TreeSearcher.icc.h.

71 {
72 if (m_param_endEarly) {
73 // Make it possible to end earlier (with less hits)
74 results.emplace_back(path);
75 }
76
77 // Implement only graph traversal logic and leave the extrapolation and selection to the
78 // rejecter.
79 const AState* currentState = path.back();
80 auto continuations =
81 TrackFindingCDC::asRange(std::equal_range(relations.begin(), relations.end(), currentState));
82
83 std::vector<TrackFindingCDC::WithWeight<AState*>> childStates;
84 for (const TrackFindingCDC::WeightedRelation<AState>& continuation : continuations) {
85 AState* childState = continuation.getTo();
86 TrackFindingCDC::Weight weight = continuation.getWeight();
87 // the state may still include information from an other round of processing, so lets set it back
88
89 if (std::count(path.begin(), path.end(), childState)) {
90 // Cycle detected -- is this the best handling?
91 // Other options: Raise an exception and bail out of this seed
92 B2FATAL("Cycle detected!");
93 }
94
95 childState->reset();
96 childStates.emplace_back(childState, weight);
97 }
98
99 if (childStates.empty()) {
100 B2DEBUG(29, "Terminating this route, as there are no possible child states.");
101 if (not m_param_endEarly) {
102 results.emplace_back(path);
103 }
104 return;
105 }
106
107 // Do everything with child states, linking, extrapolation, teaching, discarding, what have
108 // you.
109 const std::vector<TrackFindingCDC::WithWeight<const AState*>>& constPath = path;
110 m_stateRejecter.apply(constPath, childStates);
111
112 if (childStates.empty()) {
113 B2DEBUG(29, "Terminating this route, as there are no possible child states.");
114 if (not m_param_endEarly) {
115 results.emplace_back(path);
116 }
117 return;
118 }
119
120 // Traverse the tree from each new state on
121 const auto stateLess = [](const auto & lhs, const auto & rhs) {
122 return lhs->getAutomatonCell().getCellState() < rhs->getAutomatonCell().getCellState();
123 };
124 std::sort(childStates.begin(), childStates.end(), stateLess);
125
126 B2DEBUG(29, "Having found " << childStates.size() << " child states.");
127 for (const TrackFindingCDC::WithWeight<AState*>& childState : childStates) {
128 path.emplace_back(childState, childState.getWeight());
129 traverseTree(path, relations, results);
130 path.pop_back();
131 }
132 }

◆ TreeSearcher()

Construct this findlet and add the subfindlet as listener.

Definition at line 26 of file TreeSearcher.icc.h.

26 : Super()
27 {
29 };
TrackFindingCDC::Findlet< const AState, AState, const TrackFindingCDC::WeightedRelation< AState >, AResult > Super
Parent class.

◆ VariableTBranch()

VariableTBranch ( TTree *  tree)
explicit

Add to the TTree.

Constructor specialized for arithmetic types.

Parameters
treea branch whose name and type are inferred from parameter var

Definition at line 53 of file VariableTBranch.h.

54 {
55 if (tree != nullptr && tree -> GetBranch(Variable::name().c_str()) == nullptr)
56 m_branch = tree->Branch(Variable::name().c_str(), & m_storedValue,
58 }
TBranch * m_branch
Member for the pointer to the TBranch.
Variable::variableType m_storedValue
The value to be stored in the branch.
char TBranchLeafType(const char *)
Overloading TBranchLeafType to be able to get identifier 'C' for type char*.

◆ wasSuccessful()

bool wasSuccessful

Returns true if the last run t0 extraction was successful.

Definition at line 21 of file BaseEventTimeExtractor.icc.h.

22 {
23 return m_wasSuccessful;
24 }

◆ writeSamplesToStream()

static void writeSamplesToStream ( std::ostream &  os,
const std::vector< FBDTTrainSample< Ndims > > &  samples 
)
static

write all samples to stream

Definition at line 62 of file FBDTClassifierHelper.h.

63 {
64 for (const auto& event : samples) {
65 for (const auto& val : event.hits) {
66 os << val << " ";
67 }
68 os << event.signal << std::endl;
69 }
70 B2INFO("Wrote out " << samples.size() << " samples.");
71 }

Variable Documentation

◆ cdcfromEclPathTruthVarNames

constexpr char const* const cdcfromEclPathTruthVarNames[]
staticconstexpr
Initial value:
= {
"matched",
"daughters",
"PDG",
"mcTrackHits",
"seed_p_truth",
"seed_theta_truth",
"seed_pt_truth",
"seed_pz_truth",
"seed_px_truth",
"seed_py_truth"
}

Names of the variables to be generated.

Definition at line 22 of file CDCfromEclPathTruthVarSet.h.

◆ cdcfromEclStateTruthVarNames

constexpr char const* const cdcfromEclStateTruthVarNames[]
staticconstexpr
Initial value:
= {
"match",
"PDG",
"seed_p_truth",
"seed_theta_truth",
"seed_pt_truth",
"seed_pz_truth",
"seed_px_truth",
"seed_py_truth"
}

Names of the variables to be generated.

Definition at line 22 of file CDCfromEclStateTruthVarSet.h.

◆ cdcPathBasicVarNames

constexpr char const* const cdcPathBasicVarNames[]
staticconstexpr

Names of the variables to be generated.

Definition at line 25 of file CDCPathBasicVarSet.h.

◆ cdcPathTruthVarNames

constexpr char const* const cdcPathTruthVarNames[]
staticconstexpr
Initial value:
= {
"mcTrackHits",
"daughters",
"PDG",
"seed_p_truth",
"seed_theta_truth",
"seed_pt_truth",
"seed_pz_truth",
"seed_px_truth",
"seed_py_truth"
}

Names of the variables to be generated.

Definition at line 22 of file CDCPathTruthVarSet.h.

◆ cdcStateBasicVarNames

constexpr char const* const cdcStateBasicVarNames[]
staticconstexpr

Names of the variables to be generated.

Definition at line 25 of file CDCStateBasicVarSet.h.

◆ cdcStateTruthVarNames

constexpr char const* const cdcStateTruthVarNames[]
staticconstexpr
Initial value:
= {
"match",
"PDG"
}

Names of the variables to be generated.

Definition at line 22 of file CDCStateTruthVarSet.h.

◆ m_storeRefTCDataForTestTC

bool m_storeRefTCDataForTestTC = false
staticprotected

if true, for testTC the values of attached refTC will be stored instead of own values.

setting the static storeRefTCDataForTestTC to a standard value

  • why are there values of the mcTC stored? we want to know the real data, not the guesses of the reconstructed data. Deviations of reference values to guesses of the reconstructed data will be stored in resiudals anyway.

Definition at line 64 of file AnalyzingAlgorithmBase.h.

◆ pxdResultTruthNames

constexpr char const* const pxdResultTruthNames[]
staticconstexpr
Initial value:
= {
"truth",
"truth_number_of_correct_hits",
"truth_number_of_mc_pxd_hits",
"truth_number_of_mc_svd_hits",
"truth_number_of_mc_cdc_hits",
"truth_event_number",
"truth_seed_number",
}

Names of the variables to be generated.

Definition at line 27 of file PXDResultTruthVarSet.h.

◆ pxdResultVarNames

constexpr char const* const pxdResultVarNames[]
staticconstexpr
Initial value:
= {
"chi2_vxd_max",
"chi2_vxd_min",
"chi2_seed",
"chi2",
"number_of_hits",
"pt",
"theta",
"number_of_holes",
"last_hit_layer",
"first_hit_layer",
"weight_sum",
"has_missing_layer_1",
"has_missing_layer_2",
"has_missing_layer_3",
"has_missing_layer_4",
"has_missing_layer_5",
"has_missing_layer_6",
"number_of_overlap_hits",
"distance_to_seed_track",
"distance_to_seed_track_xy",
}

Names of the variables to be generated.

Definition at line 24 of file PXDResultVarSet.h.

◆ pxdStateBasicVarNames

constexpr char const* const pxdStateBasicVarNames[]
staticconstexpr

Names of the variables to be generated.

Definition at line 23 of file PXDStateBasicVarSet.h.

◆ pxdStateTruthVarNames

constexpr char const* const pxdStateTruthVarNames[]
staticconstexpr
Initial value:
= {
"truth",
"truth_position_x",
"truth_position_y",
"truth_position_z",
"truth_momentum_x",
"truth_momentum_y",
"truth_momentum_z",
"truth_event_id",
"truth_seed_number"
}

Names of the variables to be generated.

Definition at line 26 of file PXDStateTruthVarSet.h.

◆ relationSVDResultVarNames

constexpr char const* const relationSVDResultVarNames[]
staticconstexpr
Initial value:
= {
"svd_highest_layer",
"number_of_hits_related_svd_track",
}

Names of the variables to be generated.

Definition at line 23 of file RelationSVDResultVarSet.h.

◆ s_MagneticFieldFactor

DataType s_MagneticFieldFactor
static
Initial value:
= 1.5 *
0.00299710

is factor containing speed of light (c), the magnetic field (b) and the scaling factor s for conversion of meter in cm : c*b/100 = c*b*s.

The standard value assumes a magnetic field of 1.5 Tesla. Value can be changed using the resetMagneticField-Function, where a new value for the magnetic field in Tesla has to be passed. TODO WARNING hardcoded value!

Definition at line 29 of file SelectionVariableHelper.h.

◆ s_origin

VectorType s_origin = VectorType(0, 0, 0)
staticprotected

stores the origin used for some calculations, can be set here

setting the static origin to a standard value

Definition at line 55 of file AnalyzingAlgorithmBase.h.

◆ svdResultTruthNames

constexpr char const* const svdResultTruthNames[]
staticconstexpr
Initial value:
= {
"truth",
"truth_svd_cdc_relation",
"truth_number_of_correct_hits",
"truth_number_of_mc_pxd_hits",
"truth_number_of_mc_svd_hits",
"truth_number_of_mc_cdc_hits",
"truth_event_number",
"truth_seed_number",
}

Names of the variables to be generated.

Definition at line 27 of file SVDResultTruthVarSet.h.

◆ svdResultVarNames

constexpr char const* const svdResultVarNames[]
staticconstexpr
Initial value:
= {
"chi2_vxd_max",
"chi2_vxd_min",
"chi2_cdc",
"chi2",
"number_of_hits",
"pt",
"theta",
"number_of_holes",
"cdc_lowest_layer",
"last_hit_layer",
"first_hit_layer",
"weight_sum",
"has_missing_layer_1",
"has_missing_layer_2",
"has_missing_layer_3",
"has_missing_layer_4",
"has_missing_layer_5",
"has_missing_layer_6",
"distance_to_cdc_track",
"distance_to_cdc_track_xy",
}

Names of the variables to be generated.

Definition at line 24 of file SVDResultVarSet.h.

◆ svdStateBasicVarNames

constexpr char const* const svdStateBasicVarNames[]
staticconstexpr

Names of the variables to be generated.

Definition at line 23 of file SVDStateBasicVarSet.h.

◆ svdStateTruthVarNames

constexpr char const* const svdStateTruthVarNames[]
staticconstexpr
Initial value:
= {
"truth",
"truth_position_x",
"truth_position_y",
"truth_position_z",
"truth_momentum_x",
"truth_momentum_y",
"truth_momentum_z",
"truth_event_id",
"truth_seed_number"
}

Names of the variables to be generated.

Definition at line 26 of file SVDStateTruthVarSet.h.

◆ svdStateVarNames

constexpr char const* const svdStateVarNames[]
staticconstexpr

Names of the variables to be generated.

Definition at line 27 of file SVDStateVarSet.h.