ATLAS Offline Software
Loading...
Searching...
No Matches
Trk Namespace Reference

Ensure that the ATLAS eigen extensions are properly loaded. More...

Namespaces

namespace  Error
namespace  GsfMeasurementUpdator
namespace  InvalidParam
namespace  MeasurementBaseType
namespace  MultiComponentStateAssembler
 Helper struct representing a cache of the Multicomponent state under assembly.
namespace  MultiComponentStateCombiner
namespace  MultiComponentStateHelpers
namespace  MultiComponentStateModeCalculator
namespace  ParticleMasses
namespace  ParticleSwitcher
namespace  RIO_OnTrackType
namespace  RungeKuttaUtils
namespace  TrackState
namespace  TruthClassification
namespace  TwoStateCombiner

Classes

class  AdaptiveMultiVertexFitter
class  AdaptiveMultiVertexFitterTestAlg
class  AdaptiveVertexFitter
class  AdaptiveVertexFitterTestAlg
class  AlignableTrackingVolume
 Base Class for a navigation object (active) in the Calo realm. More...
class  AlignAlg
class  AlignmentDeviation
 An object decorating a track and holding degrees of freedom reflecting alignment accuracy. More...
class  AlignmentEffectsOnTrack
 Class to represent misalignments or 'discontinuities' on tracks These have a surface where the z axis is aligned with the direction of the translation, and the angle of the rotation is with respect to this. More...
class  AlignModule
class  AlignModuleTool
class  AlignPar
class  AlignResidualCalculator
class  AlignTrack
class  AlignTrackCollSplitter
class  AlignTrackCreator
class  AlignTrackDresser
class  AlignTrackPreProcessor
class  AlignTSOS
class  AlignVertex
class  AlMat
 contains the implementation of the methods of class AlMat, for handling general NxM matrices More...
class  AlSpaMat
 contains the implementation for handling sparse matrices More...
class  AlSymMat
 contains the implementation for handling symmetric matrices in triangular representation More...
class  AlSymMatBase
 contains the base implementation for handling symmertic matrices More...
class  AlVec
class  AmbiguityProcessorBase
class  AnalyticalDerivCalcTool
class  AnnulusBounds
 Bounds for a annulus-like, planar Surface. More...
class  AnnulusBoundsPC
 Class that implements the asymmetric shape of the ITk strip endcap modules. More...
class  ApproachDescriptor
 Class to decide and return which approaching surface to be taken. More...
class  ApproachSurfaces
 just implement the delete on the objects More...
class  AreaExcluder
 Pure abstract base class. More...
class  AssociatedMaterial
 It is used in the Mapping process ( using MaterialSteps ), the validation and recostruction ( using MaterialProperties ) More...
class  AtaSurface_p1
class  baseMagFld
class  basePropagator
class  BasicTruthCollectionFilter
 BasicTruthCollectionFilter accepts all valid map entries, as determined by the isValid() call on the HepMcParticleLink. More...
class  BasicValTrkParticleNtupleTool
 This validation tool writes basic information about Trk::TrackParticleBase into an ntuple;. More...
class  BeamspotVertexPreProcessor
struct  BevelledBoundaryIntersector
class  BevelledCylinderVolumeBoundaryAccessors
 Different Accessor types for a cylindrical Volume, if returs accessors to the volume boundary surfaces to guarantee "best-guess" navigation, and follow-ups. More...
class  BevelledCylinderVolumeBounds
 Bounds for a cylindrical Volume, the decomposeToSurfaces method creates a vector of up to 6 surfaces: More...
class  BinnedArray
 Binned Array for avoiding map searches/. More...
class  BinnedArray1D
 1-dimensional binned arry based on a sorting given by the BinUtitlity. More...
class  BinnedArray1D1D
 2D dimensional binned array, where the binning grid is not symmetric. More...
class  BinnedArray1D1D1D
 Avoiding a map search, the templated BinnedArray class can help ordering geometrical objects by providing a dedicated BinUtility. More...
class  BinnedArray2D
 Avoiding a map search, the templated BinnedArray class can help ordereing geometrical objects by providing a dedicated BinUtility. More...
class  BinnedArrayArray2D
class  BinnedLayerMaterial
 It extends the LayerMaterialProperties base class. More...
class  BinnedLayerMaterial_p1
class  BinnedLayerMaterialCreator
 LayerMaterialProperties creator for BinnedLayerMaterial. More...
class  BinnedMaterial
 for description of non-homogenous dense volumes More...
class  BinningData
 This class holds all the data necessary for the bin calculation. More...
class  BinUtility
 A generic symmetric BinUtility, for fully symmetric binning in terms of binning grid and binning type. More...
class  BinUtility_p1
class  BinUtilityTest
 Test calling the internal surface intersection methods. More...
class  BitField
 A class managing bits belonging to a range of bits. More...
class  BoundaryCheck
 The BoundaryCheck class allows to steer the way surface boundaries are used for inside/outside checks of parameters. More...
class  BoundaryCylinderSurface
 BoundaryCylinderSurface description inside the tracking realm, Extends the Surface description to make a surface being a boundary of a Trk::Volume. More...
class  BoundaryDiscSurface
 BoundaryDiscSurface description inside the tracking realm, it extends the DiscSurface description to make a surface being a boundary of a Trk::Volume (used for cylindrical shape). More...
class  BoundaryPlaneSurface
 BoundaryPlaneSurface description inside the tracking realm, it extends the PlaneSurface description to make a surface being a boundary of a volume. More...
class  BoundarySubtractedCylinderSurface
 BoundarySubtractedCylinderSurface description inside the tracking realm, it extends the Surface description to make a surface being a boundary of a Trk::Volume. More...
class  BoundarySubtractedPlaneSurface
 BoundarySubtractedPlaneSurface description inside the tracking realm, it extends the SubtractedPlaneSurface description to make a surface being a boundary of a volume,. More...
class  BoundarySurface
 Description of a BoundarySurface inside the tracking realm, it extends the Surface description to make a surface being a boundary of a Trk::Volume, Trk::TrackingVolume or a Trk::MagneticFieldVolume. More...
struct  BoundaryTrackParameters
class  BoundSurface_p1
class  BoundSurface_p2
class  BremPositionNtupleHelper
 Helper tool as module for the Trk::BasicValidationNtupleTool, writing information about track state with brem-like material effects. More...
struct  Cache
class  CaloCellSelectorLayerdR
class  CaloCellSelectorMinPerp
class  CaloCellSelectorNearestdR
class  CaloCellSelectorRoughdR
class  CaloCluster_OnTrack
 Class to handle Cluster On Tracks (ROT) for CaloClusters, it inherits from the common MeasurementBase. More...
class  CaloExtension
 Tracking class to hold the extrapolation through calorimeter Layers Both the caloEntryLayerIntersection and the muonEntryLayerIntersection can return nullptr if the particle failed to reach the layer. More...
class  CaloExtensionBuilderAlg
 This algorithm creates a calo extension collection and stores it in a Gaudi Gate named "ParticleCaloExtension" to be read by other algorithms. More...
class  CascadeEvent
struct  cascadeV
class  CETmaterial
 The ExtrapolatorTest Algorithm runs a number of n test extrapolations from randomly distributed Track Parameters to geometry outer boundary and back to perigee. More...
class  Charged
 Simple helper class for defining track parameters for charged particles. More...
class  Chi2TrackCompatibilityEstimator
 This object reweights the tracks according to a chi2 value constructed according to the distance to the vertex (the error of the vertex is not considered in constructing the chi squared, because this is an apriori probability which enters the fit) More...
struct  ClusterSplitProbability_p1
class  ClusterSplitProbabilityContainer
 Container to associate Cluster with cluster splitting probabilities. More...
class  ClusterSplitProbabilityContainer_p1
class  ClusterSplitProbabilityContainerCnv_p1
class  CollinearityConstraint
class  CombinedExtrapolatorTest
 The ExtrapolatorTest Algorithm runs a number of n test extrapolations from randomly distributed Track Parameters to geometry outer boundary and back to perigee. More...
class  CombinedVolumeBounds
 Bounds for a generic combined volume, the decomposeToSurfaces method creates a vector of n surfaces (n1+n2-nshared): More...
class  CommonTruthMatchWeights
class  CompactBinnedArray
 defines common utilities needed for implementation of binned material More...
class  CompactBinnedArray1D
 1-dimensional binned arry based on a sorting given by the BinUtitlity. More...
class  CompactBinnedArray2D
 2-dimensional binned array More...
class  CompareTwoTracks
class  ComparisonFunction
 this functor is used to find the closest objects: More...
class  CompetingRIOsOnTrack
 Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase. More...
class  CompetingRIOsOnTrack_p1
struct  ComponentParameters
class  CompoundLayerMaterial
 It extends the LayerMaterialProperties base class, and has a intrinsic accuracy of about 0.5 % on the dynamic range from using unsigned char. More...
class  CompoundLayerMaterial_p1
class  CompoundLayerMaterialCreator
 LayerMaterialProperties creator for CompoundLayerMaterial (i.e. More...
class  CompressedLayerMaterial
 It extends the LayerMaterialProperties base class. More...
class  CompressedLayerMaterial_p1
class  CompressedLayerMaterialCreator
 LayerMaterialProperties creator for CompressedLayerMaterial. More...
class  ConeBounds
 Bounds for a conical Surface, the opening angle is stored in \( \tan(\alpha) \) and always positively defined. More...
class  ConeBounds_p1
class  ConeLayer
 Class to describe a cylindrical detector layer for tracking, it inhertis from both, Layer base class and ConeSurface class. More...
class  ConeSurface
 Class for a conical surface in the ATLAS detector. More...
class  ConstrainedTrackProvider
class  ConstSharedPtrSpan
struct  CovarianceMatrix
class  CrossDistancesSeedFinder
class  CuboidVolumeBounds
 Bounds for a cubical Volume, the decomposeToSurfaces method creates a vector of 6 surfaces: More...
class  CurvilinearParametersT
 The specialised class for charged and neutral track parameters in the curvilinear frame. More...
class  CurvilinearUVT
 simple class that constructs the curvilinear vectors curvU and curvV from a given momentum direction (must be unit vector). More...
class  CylinderBounds
 Bounds for a cylindrical Surface. More...
class  CylinderBounds_p1
struct  CylinderIntersector
class  CylinderLayer
 Class to describe a cylindrical detector layer for tracking, it inhertis from both, Layer base class and CylinderSurface class. More...
class  CylinderLayerAttemptsCalculator
 Simple helper class for CylinderLayer static array. More...
class  CylinderLayerSorterR
 Functor for CylinderLayer R-Sorting. More...
class  CylinderSurface
 Class for a CylinderSurface in the ATLAS detector. More...
class  CylinderVolumeBoundaryAccessors
 Different Accessor types for a cylindrical Volume, if returs accessors to the volume boundary surfaces to guarantee "best-guess" navigation, and follow-ups. More...
class  CylinderVolumeBounds
 Bounds for a cylindrical Volume, the decomposeToSurfaces method creates a vector of up to 6 surfaces: More...
class  CylinderVolumeCreator
 The concrete implementation for cylindrical TrackingVolume objects of the ITrackingVolumeCreator interface. More...
class  DAF_ValidationNtupleHelper
 This validation tool writes information about Trk::CompetingRIOsOnTrack into an ntuple. More...
class  DecayInFlyTruthTrajectoryBuilder
class  DefParamPullPlots
class  DenseEnvironmentsAmbiguityProcessorTool
class  DenseEnvironmentsAmbiguityScoreProcessorTool
struct  DestBound
class  DetachedTrackingVolume
 Base Class for a navigation object (active/passive) in the Tracking realm. More...
class  DetailedHitInfo
class  DetailedMuonPatternTruthBuilder
struct  DetailedTrackTruth_p0
class  DetailedTrackTruth_p1
class  DetailedTrackTruth_p2
class  DetailedTrackTruth_p3
class  DetailedTrackTruth_p4
class  DetailedTrackTruthBuilder
class  DetailedTrackTruthCollection_p0
class  DetailedTrackTruthCollection_p1
class  DetailedTrackTruthCollection_p2
class  DetailedTrackTruthCollection_p3
class  DetailedTrackTruthCollection_p4
class  DetAnnealingMaker
 This class implements an annealing maker. More...
class  DetElementSurface
class  DetElementSurface_p1
class  DiamondBounds
 Bounds for a double trapezoidal ("diamond"), planar Surface. More...
class  DiamondBounds_p1
class  DigitizationModule
 Class that holds the surfaces for a planar digitization detector module. More...
struct  DigitizationStep
 handling More...
class  DirectTrackNtupleWriterTool
 This validation tool writes basic information about Trk::Track into an ntuple; it is also the steering tool for all Trk::IValidationNtupleTool. More...
class  DiscBounds
 Class to describe the bounds for a planar DiscSurface. More...
class  DiscBounds_p1
class  DiscLayer
 Class to describe a disc-like detector layer for tracking, it inhertis from both, Layer base class and DiscSurface class. More...
class  DiscLayerAttemptsCalculator
 Simple helper class for DiscLAyer static array. More...
class  DiscLayerSorterZ
 simple helper function to allow sorting of DiscLayers in z More...
class  DiscSurface
 Class for a DiscSurface in the ATLAS detector. More...
class  DiscTrapezoidalBounds
 Class to describe the bounds for a planar DiscSurface. More...
class  DistanceSolution
 Access to distance solutions. More...
class  DistributedKalmanFilter
class  DoubleTrapezoidVolumeBounds
 Bounds for a double trapezoidal shaped Volume, the decomposeToSurfaces method creates a vector of 8 surfaces: More...
class  DummyAnnealingMaker
 This class implements an annealing maker but it's a DUMMY one! More...
class  DummySeedFinder
class  DummyVertexSelectionTool
class  DummyVertexSmoother
struct  EdgeCross
class  EfficiencyPlots
class  ElasticTruthTrajectoryBuilder
class  ElectronCombinedMaterialEffects
class  ElectronMaterialMixtureConvolution
class  ElementFraction
class  ElementTable
class  ElementTable_p1
 elements & fractions as unsigned char - if filled More...
class  EllipseBounds
 Class to describe the bounds for a planar EllipseSurface, i.e. More...
class  EllipseBounds_p1
 Persistent representation of the transient Trk::EllipseBounds_p1 class. More...
class  EnergyLoss
 This class describes energy loss material effects in the ATLAS tracking EDM. More...
class  EnergyLoss_p1
 Persistent representation of class EnergyLoss.h. More...
class  EnergyLossExtrapolationValidation
 The EnergyLossExtrapolationValidation Algorithm runs a number of n test extrapolations from randomly distributed Track Parameters to specific reference surfaces within the ATLAS Detector (user defined cylinder tubes which can be placed e.g. More...
class  EnergyLossMonitor
 This validation tool Energy states of partlices. More...
class  EnergyLossUpdator
 The mean Energy loss per unit length of a particle is calculated as. More...
class  ErrorMatrix
class  EstimatedBremOnTrack
 class holding information about momentum reduction and an additional noise term due to significant energy loss (bremsstrahlung) More...
class  EstimatedBremOnTrack_p1
 persistent representation of EstimatedBremOnTrack More...
class  EventCnvSuperTool
 Tool to handle TP conversions for Tracking EDM. More...
class  EventDataBase
 Base for a helper class to pass mutable storage to tools. More...
class  EventDataModelMonitor
 Prints the number of EDM objects currently in memory. More...
class  EventPropertyNtupleTool
class  EventToTrackLinkNtupleTool
class  ExtendedVxCandidate
 Extends the standard Trk::VxCandidate to store the full covariance matrix of a fitted vertex all participating tracks. More...
class  ExtendedVxCandidate_p1
class  ExtrapolationCache
class  ExtrapolationCell
 templated class as an input-output object of the extrapolation, only public members, since it is a container class More...
class  ExtrapolationCode
class  ExtrapolationConfig
class  ExtrapolationEngine
 Master extrapolation engine for extrapolation through the TrackingGeometry, it delegates the extrapolation to optimised engines, handing over the ExtrapolationCell as internal cache. More...
class  ExtrapolationEngineTest
 Test Algorithm to run test extrapolations with the new IExtrapolationEngine. More...
class  ExtrapolationMode
 enumeration to decode - for Extrapolation steering More...
class  ExtrapolationStep
 templated class to record the different possible entities during extrapolation More...
class  ExtrapolationValidation
 The ExtrapolationValidation Algorithm runs a number of n test extrapolations from randomly distributed Track Parameters to randombly distributed reference surfcas within. More...
class  Extrapolator
 Extrapolation of track parameters and their associated covariances to destination surfaces. More...
class  ExtrapolatorComparisonTest
 The ExtrapolatorComparisonTest Algorithm runs a number of n test extrapolations from randomly distributed Track Parameters to reference surfcas within. More...
class  ExtrapolatorTest
 The ExtrapolatorTest Algorithm runs a number of n test extrapolations from randomly distributed Track Parameters to reference surfcas within. More...
class  ExtrLayerPlots
class  ExtrRegionPlots
struct  ExtrUniquePtrHolder
class  FastVertexFitter
 This class implements a fast vertex fitting algorithm as proposed by P. More...
class  FitMatrices
struct  fitMatrix
class  FitMeasurement
class  FitParameters
class  FitProcedure
class  FitProcedureQuality
class  FitQuality
 Class to represent and store fit qualities from track reconstruction in terms of \(\chi^2\) and number of degrees of freedom. More...
class  FitQuality_p1
class  FitQualityImpl
 simple/trivial Implemenation class for fit the fit quality. More...
class  FitQualityOnSurface
class  FitterStatusCode
 Status codes for track fitters. More...
struct  ForCFT
struct  ForVrtClose
class  FsmwMode1dFinder
 Algotool which calculates the mode of a unidimenensional distribution using the Fraction of Sample Mode with Weights algorithm, which is an iterative Least Median estimator. More...
class  FullIntersection
 Class extension to return the object, a represenation & the result. More...
class  FullLinearizedTrackFactory
 A concrete implementation of the linearized track factory. More...
class  FullVertexFitter
 This class implements a full vertex fitting algorithm as proposed by P. More...
class  GaussianDensityTestAlg
class  GaussianSumFitter
class  GaussianTrackDensity
 Implementation of IVertexTrackDensityEstimator modeling reconstructed tracks as two-dimensional Gaussian distributions in (d0, z0) space and sampling the aggregate density distribution at user-requested points along the beam axis. More...
class  GeantFollowerHelper
class  GeantFollowerMSHelper
class  GenParticleJet
 short class to organise MC generated particles as a jet. More...
class  GenParticleJetFinder
 Durham jet clustering algorithm for MC-truth tracks. More...
class  GeoMaterialConverter
 A Simple Helper Class that convertes the GeoMaterial object used in GeoModel full detector description to an appropriate Trk::ExtendedMaterialProperties object. More...
class  GeometryAsciiDumper
 The GeometryAsciiDumper writes geometrical information of the tracking geomtetry into an Ascii file for comparison. More...
class  GeometryBuilder
 The Trk::TrackingGeometry Builder for ATLAS Geometry. More...
class  GeometryBuilderCond
 The Trk::TrackingGeometry Builder for ATLAS Geometry. More...
class  GeometryJsonDumper
 The GeometryJsonDumper writes geometrical information of the tracking geomtetry into an Ascii file for comparison. More...
class  GeometryTTreeDumper
 The GeometryTTreeDumper writes geometrical information of the tracking geomtetry into a TTree for chekcs and comparisons. More...
class  GeoShapeConverter
 A Simple Helper Class that convertes the GeoShape object used in GeoModel full detector description to an appropriate Trk::VolumeBounds (factory type) object. More...
class  GlobalChi2AlignTool
class  GlobalChi2Fitter
class  GlueVolumesDescriptor
 Descriptor class to hold GlueVolumes of a TrackingGeometry object. More...
class  GMTreeBrowser
 A Helper Class that facilitates navigation through GeoModel tree. More...
class  GsfExtrapolator
class  GXFMaterialEffects
 class that is similar to MaterialEffectsOnTrack, but has 'set' methods for more flexibility during track fitting More...
class  GXFTrackState
class  GXFTrajectory
 Internal representation of the track, used in the track fit. More...
class  HepSymMatrix_p1
struct  HitInfo
class  HitPositionNtupleHelper
 This validation tool writes information about measurement positions and their surfaces. More...
class  HitResidualPlots
class  HitTypePlots
class  HomogeneousLayerMaterial
 It extends the LayerMaterialProperties base class. More...
class  HomogeneousLayerMaterial_p1
class  IAlignableSurfaceProvider
class  IAlignModuleTool
class  IAlignResidualCalculator
class  IAlignTool
class  IAlignTrackCreator
class  IAlignTrackDresser
class  IAlignTrackPreProcessor
class  IAmbiTrackSelectionTool
 Interface for building new tracks using information about shared and already associated hits. More...
class  IApproachDescriptor
 CVirtual class to decide and return which approaching surface to be taken. More...
class  IBoundaryCheckTool
class  ICaloCellSelector
 abstract class that judge if a calo cell is to be included in a collection More...
class  ICaloTrackingVolumeBuilder
 Interface class ICaloTrackingVolumeBuilders It inherits from IAlgTool. More...
struct  IdentifiedIntersection
class  IdentifierExtractor
 Small utility to get hit Identifiers out of MeasurementBase (either in a vector or single). More...
class  IDerivCalcTool
class  IDetachedTrackingVolumeBuilder
 Interface class IDetachedTrackingVolumeBuilder, the DetachedTrackingVolumeBuilder inherits from this one. More...
class  IDetachedTrackingVolumeBuilderCond
 Interface class IDetachedTrackingVolumeBuilderCond, the DetachedTrackingVolumeBuilder inherits from this one. More...
class  IDetailedMuonPatternTruthBuilder
 Provides interface for tool to return a "detailed" track truth map. More...
class  IDetailedTrackTruthBuilder
 Provides interface for tool to return a "detailed" track truth map. More...
class  IDetailedTrackTruthSimilarity
 Interface for track-truth match quality estimator tools. More...
class  IDHitPlots
class  IDirectTrackNtupleWriter
 Interface to set up and write a TrkValidation ntuple so that it can be called for validation action 'inside' any tracking tool. More...
class  IDynamicLayerCreator
 Interface class IDynamicLayerCreator It inherits from IAlgTool. More...
class  IEnergyLossMonitor
 Very simple helper Tool to record the eneryloss steps track, this works only for single track events. More...
class  IEnergyLossUpdator
 Interface class IEnergyLossUpdator. More...
class  IEventCnvSuperTool
class  IEventPropertyNtupleTool
 provides the interface for validation tools which write special information about the whole event into ntuples. More...
class  IExtendedTrackSummaryHelperTool
class  IExtendedTrackSummaryTool
 Interface for condensing Trk::Track properties and associated hits to a (non-fittable) foot print, the Trk::TrackSummary object. More...
class  IExtrapolationEngine
 Extrapolation engine interface for Charged and Neutral parameters, it serves as the Master extrapolation interface but also as the specialized extrapolation engine ones. More...
class  IExtrapolator
 Interface class for the extrapolation AlgTool, it inherits from IAlgTool Detailed information about private members and member functions can be found in the actual implementation class Extrapolator which inherits from this one. More...
class  IFillNtupleTool
class  IGeantFollowerHelper
class  IGeantFollowerMSHelper
class  IGenParticleJetFinder
 provides the interface for determining truth jets (inside Tracking validation framework) More...
class  IGenParticleSelector
 provides the interface for tools to select generated particles More...
class  IGeometryBuilder
 Interface class IGeometryBuilders, the GeometryBuilder inherits from this one. More...
class  IGeometryBuilderCond
 Interface class IGeometryBuilderCond, the GeometryBuilder inherits from this one. More...
class  IGeometryManagerTool
class  IGeometryProcessor
 Interface class IGeometryProcessors. More...
class  IGlobalTrackFitter
 provides additional abstract interfaces for information provided from global-least-squares track fit algorithms working in the ATLAS EDM. More...
class  IImpactPoint3dEstimator
class  IIntersector
 Base class for Intersector AlgTools. More...
class  IIsoTrackSelectorTool
 The abstract interface base class for track selector tools targeted at isoloation. More...
class  IJacobianManagerTool
class  IJetTruthNtupleTool
 provides the interface for validation tools which write special information about truth particles into ntuples. More...
class  IKinematicConstraint
class  ILayerArrayCreator
 Interface class ILayerArrayCreators It inherits from IAlgTool. More...
class  ILayerBuilder
 Interface class ILayerBuilders It inherits from IAlgTool. More...
class  ILayerBuilderCond
 Interface class ILayerBuilderConds It inherits from IAlgTool. More...
class  ILayerMaterialAnalyser
 Interface class for LayerMaterial analysis. More...
class  ILayerMaterialCreator
 Interface class for LayerMaterialCreator AlgTools to create LayerMaterial properties with different strategies. More...
class  ILayerMaterialManipulator
 Interface class for LayerMaterial manipulation, it creates new LayerMaterial. More...
class  ILayerProvider
 Interface class ILayerProviders it feeds into the StagedGeometryBuilder. More...
class  ILayerProviderCond
 Interface class ILayerProviderConds it feeds into the StagedGeometryBuilder. More...
class  IMaterialAllocator
 Base class for MaterialAllocator AlgTool. More...
class  IMaterialEffectsEngine
 Material effects engine interface for charged and neutral (fast track simulation) , the update is alwyas on the: More...
class  IMaterialEffectsOnTrackProvider
 Interface class IMaterialEffectsOnTrackProvider It inherits from IAlgTool. More...
class  IMaterialEffectsUpdator
 Interface class for the updater AlgTool, it inherits from IAlgTool. More...
class  IMaterialMapper
 Interface class IMaterialMapper. More...
class  IMaterialMixtureConvolution
class  IMatrixTool
class  IMode1dFinder
 Interface class for the algotool which calculates the mode of a unidimensional distribution. More...
class  IMode3dFinder
 Interface class for the algotool which calculates the mode of a threedimensional distribution. More...
class  IMode3dInfo
 Auxillary interface for getting back additional data. More...
class  IModuleStepper
 Interface class IModuleSteppers. More...
struct  ImpactParametersAndSigma
class  ImpactPlots
class  ImpactPoint3dEstimator
 This object calculates the point of minimum distance to the vertex in 3d. More...
class  IMultipleScatteringUpdator
 Interface class IMultipleScatteringUpdator. More...
class  IMultiStateExtrapolator
class  INavigationEngine
 Extrapolation engine interface for Charged and Neutral parameters, it serves as the Master extrapolation interface but also as the specialized extrapolation engine ones. More...
class  INavigator
 Interface class for the navigation AlgTool, it inherits from IAlgTool Detailed information about private members and member functions can be found in the actual implementation class Trk::Navigator which inherits from this one. More...
class  InDetHaloSelector
 select truth halo tracks More...
class  InDetPrimaryConversionSelector
 Modular concept to select truth particles for the truth tree filling and efficiency calculation, this one selects detectable tracks in the ID. More...
class  InDetReconstructableSelector
 Modular concept to select truth particles for the truth tree filling and efficiency calculation, this one selects detectable tracks in the ID. More...
class  InDetTrackSummary_p1
class  IndexedCrossDistancesSeedFinder
struct  IndexedMaterial
class  INeutralParticleParameterCalculator
 interface for tools taking a two-track vertex and creating a neutral track from it. More...
class  InputLayerMaterialProvider
 AlgTool that assigns LayerMaterial as specified to the TrackingGeometry. More...
struct  Intersection
class  IntersectorWrapper
class  IntVec
class  InvalidBounds
 Invalid Bounds object. More...
class  InverseMultiMap
 An InverseMultiMap object built from a generic map or multimap allows for quick lookup of original (multi)map's key by original mapped value. More...
class  IParticleCaloExtensionTool
 Interface for extending Particles with calo intersections. More...
class  iPatFitter
 Main Fitter tool providing the implementation for the different fitting, extension and refitting use cases. More...
class  iPatGlobalFitter
 GlobalTrackFitter tool providing methods used during alignment. More...
class  IPatternParametersPropagator
 interface for track parameter propagation through the magnetic field, using the Trk::PatternTrackParameters data model for fast, internal use. More...
class  IPatternParametersUpdator
 Interface for updating Trk::PatternTrackParameters, the fast internal representation of track parameters in the (inner detector) pattern recognition tools, with a measurement. More...
class  IPCMat
class  IPCMatrixTool
class  IPixelToTPIDTool
 abstract interface for identification of particles based on More...
class  IPositionMomentumWriter
 Very simple helper Tool to record track states at certain positions this works only for single track events. More...
class  IPRD_AssociationTool
 Interface for handling the mapping between Trk::Track and Trk::PrepRawData. More...
class  IPRD_Provider
 Simple interface that takes an identifier and find the associated PRD from an Identifyable container. More...
class  IPRD_TruthTrajectoryBuilder
 The interface for the truth PRD trajectory finder. More...
class  IPRD_TruthTrajectoryManipulator
 The interface for the truth PRD trajectory manipulator. More...
class  IPRD_TruthTrajectorySelector
 The interface for the truth PRD trajectory selector. More...
class  IPRDtoTrackMapTool
 Interface for handling the mapping between Trk::Track and Trk::PrepRawData. More...
class  IPropagationEngine
 A propagation engine wrapping the propagator algtool it respects the path limit to stop particles if needed. More...
class  IPropagator
 Interface class IPropagators It inherits from IAlgTool. More...
class  IPVTrackCompatibilityEstimator
class  IResidualPullCalculator
 provides the interface for tools which calculate residuals and pulls. More...
class  IRIO_OnTrackCreator
 Interface class for transforming Trk::PrepRawData to Trk::RIO_OnTrack using a local track hypothesis. More...
class  ISegmentConverterTool
 Interface for tool to convert a Trk::Segment object into a Trk::Track. More...
class  ISurfaceBuilder
 Interface class ISurfaceBuilders It inherits from IAlgTool. More...
class  ITimedExtrapolator
 Interface class for the extrapolation AlgTool, it inherits from IAlgTool Detailed information about private members and member functions can be found in the actual implementation class TimedExtrapolator which inherits from this one. More...
class  ITimedMatEffUpdator
 Interface class for the updater AlgTool, it inherits from IAlgTool Detailed information about private members and member functions can be found in the actual implementation class MaterialUpdator which inherits from this one. More...
class  ITrackAmbiguityProcessorTool
 Interface for resolving hit assoication ambiguities in a given track collection. More...
class  ITrackAmbiguityScoreProcessorTool
 Interface for resolving hit association ambiguities in a given track collection. More...
class  ITrackCollectionProvider
class  ITrackDiff
 provides the interface for a track diff tool More...
class  ITrackFitter
 Provides the abstract interface for track fitting in the common ATLAS Tracking EDM. More...
class  ITrackHoleSearchTool
 interface for searching, counting and adding holes on tracks anywhere in ATLAS. More...
class  ITrackingGeometrySvc
class  ITrackingVolumeArrayCreator
 Interface class ITrackingVolumeArrayCreators It inherits from IAlgTool. More...
class  ITrackingVolumeBuilder
 Interface class ITrackingVolumeBuilders It inherits from IAlgTool. More...
class  ITrackingVolumeCreator
 Interface class ITrackingVolumeCreators It inherits from IAlgTool. More...
class  ITrackingVolumeHelper
 Interface class ITrackingVolumeHelpers It inherits from IAlgTool. More...
class  ITrackingVolumesSvc
 Service which is used to create volumes enclosing various parts of ATLAS, and which can be used e.g. More...
 An abstract class which is meant to represent an element link to the Trk::Track or Trk::TrackParticleBase. More...
class  ITrackMatchingTool
 The abstract interface base class for Track matching tools. More...
class  ITrackParticleCreatorTool
 Interface for constructing TrackParticles from complete tracks. More...
class  ITrackScoringTool
 Interface for tool to return a score from a given track. More...
class  ITrackSelectorTool
 The abstract interface base class for track selector tools. More...
class  ITrackSlimmingTool
 Interface for constructing 'slimmed' Tracks from complete tracks. More...
class  ITrackSummaryHelperTool
 Interface for structuring the summary creation into sub-detector specific tools. More...
class  ITrackSummaryTool
 Interface for condensing Trk::Track properties and associated hits to a (non-fittable) foot print, the Trk::TrackSummary object. More...
class  ITrackTimingTool
 Interface for providing time information for a track or track particle. More...
class  ITrackToVertexIPEstimator
class  ITrackTruthClassifier
 provides the interface for tools which classify gen particles More...
class  ITrackValidationNtupleTool
 provides the interface for validation tools which write special information about generated tracks into ntuples. More...
class  ITrkAlignDBTool
class  ITrkAlignmentDeviationTool
 Interface for tool to add alignmenties to a global chi2 fit. More...
class  ITrkDistanceFinder
 Interface class for the algotool which calculates the distance between two tracks. More...
class  ITrkEventCnvTool
class  ITrkMaterialProviderTool
 Interface for tool to add alignmenties to a global chi2 fit. More...
class  ITrkObserverTool
class  ITrkVKalVrtFitter
class  ITRT_ElectronPidTool
 abstract interface for identification of electrons based on information from the inner detector track (mainly TRT) More...
class  ITruthNtupleTool
 provides the interface for validation tools which write special information about truth particles into ntuples. More...
class  ITruthToTrack
 ITruthToTrack is an interface to create Trk::TrackParameters from a HepMC::GenParticle. More...
class  ITruthTrackBuilder
 The interface for the truth track finder. More...
class  ITruthTrajectoryBuilder
class  IUpdator
 Set of interfaces for methods operating on track states, mainly for Kalman filtering. More...
class  IValidationNtupleHelperTool
 provides the interface for validation helper tools which write special information about generated tracks. More...
class  IValidationNtupleTool
 provides the interface for validation tools which write special information about generated tracks into ntuples. More...
class  IVertexAnalyticSeedFinder
 An abstract base class for implementation of Linearization point finders. More...
class  IVertexAnnealingMaker
 Interface class responsible for an annealing process. More...
class  IVertexCascadeFitter
class  IVertexCollectionSortingTool
 Interface class for vertex Container Sorting. More...
class  IVertexFitter
 Interface class for vertex fitting AlgTools, for more detailed information, take a look at the header file of the actual implementation file. More...
class  IVertexLinearizedTrackFactory
 An Abstract Base Class for the LinearizedTrackFactories. More...
class  IVertexMapper
 Interface class IVertexMapper. More...
class  IVertexMergingTool
 Interface class for merging compatible vertices in a single collection. More...
class  IVertexSeedFinder
 An abstract base class for implementation of Linearization point finders. More...
class  IVertexSelectionTool
 Interface class for vertex Container Sorting. More...
class  IVertexSmoother
 An abstract base class for the vertex smoothers Update the tracks of type Trk::VxTrackAtVertex belonging to the Trk::VertexCandidate with the knowledge of the vertex position. More...
class  IVertexTrackCompatibilityEstimator
 An Abstract base class for estimators, calculating the compatibility of a track and a vertex. More...
class  IVertexTrackDensityEstimator
 An abstract base class for implementation of weight functions for seeding. More...
class  IVertexTrackUpdator
 An abstract base class for the vertex track updators Updates the track with the knowledge of the position of the production vertex. More...
class  IVertexUpdator
 An abstract base class for the vertex updators. More...
class  IVertexWeightCalculator
class  IVKalState
class  JacobianCartesianToPerigee
 Jacobian from cartesian parameters \( (p_x, p_y, p_z, E, x, y, z) \) to perigee parameters \( (d_0, z_0, \phi_0, \theta, q/p) \). More...
class  JacobianCartesianToPolar
 Jacobian for the transformation of cartesian parametes \((locX,locY,\phi,\theta, q/p)\) to polar parameters \( (locR,locPhi,\phi,\theta, q/p)\): More...
class  JacobianCotThetaPtToThetaP
 This is the 5x5 jacobian for the transformation of track parameters and errors having a momentum representation of \( (\phi, cot\theta, q/p_{T}) \) to the new standard representation of \( (\phi, \theta, q/p) \), while the first two variables that express the local position representation keep unchanged. More...
class  JacobianCurvilinearToLocal
 This class represents the jacobian for transforming from a curvilinear to a local frame. More...
class  JacobianLocalAnglesPhiTheta
 This jacobian transforms the local direction representation as given in the Trk::LocalDirection class into the corresponding polar and azimutal angle \( \phi, \theta \), therefor it is of dimension (2x2). More...
class  JacobianPerigeeToCartesian
 Jacobian for transforming perigee track parameters \((d_0, z_0, \phi_0, \theta, q/p)\) to the cartesian frame \((p_x,p_y,p_z,E,x,y,z)\). More...
class  JacobianPhiThetaLocalAngles
 This jacobian transforms the polar and azimutal angle \( \phi, \theta \) of a global momentum representation to a local momentum representation as given in the Trk::LocalMomentum class, therefor it is of dimension (2x2). More...
class  JacobianPhiThetaQoverPToPxyz
 Jacobian for the transformation of momentum in polar coordinates \( (\phi,\theta,qOverP)\) to momentum in Cartesian coordinates \((px, py, pz)\) : More...
class  JacobianPolarToCartesian
 Jacobian for the transformation of polar parameters \( (locR,locPhi,\phi,\theta, q/p)\) to cartesian parametes \((locX,locY,\phi,\theta, q/p)\) : More...
class  JacobianPxyzToPhiThetaQoverPcartesian
 Jacobian in cartesian coordinates for the transformation of momentum in Cartesian coordinates \( (px,py,pz,charge)\) to momentum in polar cordinates \((\phi,\theta,QoverP)\). More...
class  JacobianPxyzToPhiThetaQoverPspherical
 Jacobian in spherical coordinates for the transformation of momentum in Cartesian coordinates \( (px,py,pz,charge)\) to momentum in spherical cordinates \((\phi,\theta,QoverP)\). More...
class  JacobianThetaPToCotThetaPt
 This is the 5x5 jacobian for the transformation of track parameters and errors having the new standard momentum representation of \( (\phi, \theta, q/p) \) to the representation of \( (\phi, cot\theta, q/p_{T}) \), while the first two variables that express the local position representation keep unchanged. More...
class  JetFitterHelper
 Februar 2007 (c) Atlas Detector Reconstruction Software. More...
class  JetFitterInitializationHelper
 Februar 2007 (c) Atlas Detector Reconstruction Software. More...
class  JetFitterRoutines
 Februar 2007 (c) Atlas Detector Reconstruction Software. More...
class  JetRestrictedSumPtVertexWeightCalculator
class  JetTruthNtupleTool
 Tool to fill basic information about truth jets, establishing track-to-jet association indices with the truth ntuple tree. More...
struct  JetVtxParamDefsAccessor
 Simple struct to access the JetVtxParamDefs enum with ints. More...
struct  JetVtxParamDefsStrings
 Simple struct to access the strings of the JetVtxParamDefs enum names for output reasons. More...
class  KalmanUpdator
 Implementation of Trk::IUpdator based on gain formalism and Eigen. More...
class  KalmanUpdator_xk
 Trk::KalmanUpdator_xk is a set of tools for adding and removing measurements to/from the state vector using xKalman algorithms. More...
class  KalmanUpdatorSMatrix
 Implementation of Trk::IUpdator based on gain formalism and SMatrix mathlib. More...
class  KalmanVertexOnJetAxisSmoother
 ATLAS Reconstruction Software - (C) 2005 - 2007. More...
class  KalmanVertexOnJetAxisUpdator
 ATLAS Reconstruction Software - (C) 2005 - 2007. More...
class  KalmanVertexTrackUpdator
 A concrete implementation of the VertexTrackUpdator using the Kalman filter algorithm. More...
class  KalmanVertexUpdator
 A concrete implementation of the Vertex Updator using the Kalman filter algorithm. More...
struct  KDOP
class  Layer
 Base Class for a Detector Layer in the Tracking realm. More...
class  LayerArrayCreator
 The LayerArrayCreator is a simple Tool that helps to construct LayerArrays from std::vector of Trk::CylinderLayer, Trk::DiscLayer, Trk::PlaneLayer. More...
class  LayerAttemptsCalculator
 Simple helper class that allows to define different number of layer attempts in the extrapolation before throwing a veto. More...
class  LayerIndex
 LayerIndex for the identification of layers in a simplified detector geometry of Cylinders and Discs. More...
class  LayerMaterialAnalyser
 LayerMaterialProperties creator for CompoundLayerMaterial. More...
class  LayerMaterialConverter
 AlgTool that converts the layer material from one to another type. More...
class  LayerMaterialInspector
 This helper AlgTool can be called to record a dedicated tree that writes the LayerMaterialProperties into an ntuple. More...
class  LayerMaterialMap
 This class extends the DataVector<Trk::LayerMaterialProperties> by an elementTable;. More...
class  LayerMaterialMap_p1
class  LayerMaterialMap_tlp1
class  LayerMaterialProperties
 This virtual base class encapsulates the logics to build pre/post/full update material for Layer structures, it hosts 5 different MaterialProperties in the following order: More...
class  LayerMaterialProvider
 AlgTool that retrieves the LayerMaterial from COOL and loads it onto the geometry. More...
class  LayerMaterialRecord
 Helper Class to record the material during the GeantinoNtupleMappingProcess. More...
class  LayerProvider
 Wrapper around an ILayerBuilder to feed into the StagedGeometryBuilder. More...
class  LayerProviderCond
 Wrapper around an ILayerBuilderCond to feed into the StagedGeometryBuilderCond. More...
class  LayerProviderImpl
 Wrapper around an ILayerBuilderImpl to feed into the StagedGeometryBuilderImpl. More...
struct  LayerTreeObject
class  LinearizedTrack
struct  LineIntersection2D
class  LineSaggingDescriptor
 Fill in documentation. More...
class  LinkToTrack
 AUTO - An Undocumented Tracking Object. More...
class  LinkToTrackParticleBase
class  LinkToXAODNeutralParticle
 Element link to XAOD NeutralParticle. More...
class  LinkToXAODTrackParticle
 Element link to XAOD TrackParticle. More...
class  LocalDirection
 represents the three-dimensional global direction with respect to a planar surface frame. More...
class  LocalDirection_p1
class  LocalParameters
class  LocalParameters_p1
class  LocalPosition_p1
class  MagneticFieldProperties
 magnetic field properties to steer the behavior of the extrapolation More...
struct  MappedVertex
class  MappingTest
 Test to build the TrackingGeometry and try to map all points to layers. More...
class  MassConstraint
 Concrete implementation of Trk::IKinematicConstraint to formulate a mass constraint in kinematic vertex fits. More...
struct  MatchCompareByProbability
 This functor, used with TruthInverters, selects rec->mc truth map matches with higher associated probabilities. More...
class  Material
 A common object to be contained by. More...
class  Material_p1
 the persistent object is simply a std::vector<float> where More...
class  MaterialAllocator
 Main Fitter tool providing the implementation for the different fitting, extension and refitting use cases. More...
struct  MaterialComposition
class  MaterialEffectsBase
 base class to integrate material effects on Trk::Track in a flexible way. More...
class  MaterialEffectsBase_p1
class  MaterialEffectsEngine
 Material effects engine interface for charged and neutral (fast track simulation) , the update is alwyas on the: More...
class  MaterialEffectsOnTrack
 represents the full description of deflection and e-loss of a track in material. More...
class  MaterialEffectsOnTrack_p1
class  MaterialEffectsOnTrack_p2
 persistent representation v2 of MaterialEffectsOnTrack More...
class  MaterialEffectsUpdator
 Point-like (also called surface-based) update of TrackParameters and the associated covariance. More...
class  MaterialInteraction
 Collection of parametrizations used in the Tracking realm. More...
class  MaterialLayer
 A material layer is a simple helper class to attach material information to a boundary surface. More...
class  MaterialLayerNoOwnSurf
class  MaterialLayerOwnSurf
class  MaterialManipulation
 A simple algorithm that reads in the material maps and writes out a new file, allowing to manipulate the material maps. More...
class  MaterialMapper
 Implementation of the class MaterialMapper. More...
class  MaterialMapping
 A simple algorithm that throws random points through detector and associates them with the given/found layer. More...
class  MaterialOnTrackValidation
 This is for the Doxygen-Documentation. More...
class  MaterialProperties
 Material with information about thickness of material. More...
class  MaterialProperties_p1
 the persistent object is simply a std::vector<float> where More...
class  MaterialStep
 is needed for the recording of MaterialProperties from Geant4 and read them in with the mapping algorithm More...
class  MaterialStep_p1
 the persistent object is simply a std::vector<float> where More...
class  MaterialStepCollection_p1
class  MaterialValidation
struct  MatrixNtupleBranch
 This class provides a simple interface to write Matricis to a root tree The size of the Matrix cannot exceed COLMAX x ROWMAX. More...
class  MatrixTool
class  MCTrueSeedFinder
class  MeasuredAtaSurface_p1
class  MeasuredPerigee_p1
class  MeasurementBase
 This class is the pure abstract base class for all fittable tracking measurements. More...
class  MeasurementBaseComparisonFunction
 Class implementing a comparison function for sorting MeasurementBase objects. More...
class  MeasurementProcessor
class  MeasurementTypeID
 classifies a MeasurementBase into one of the known inherited flavours or one of the detector types for ROT/CompROT. More...
class  MeasurementVectorNtupleTool
 This validation tool writes basic information about Trk::Track into an ntuple; it is also the steering tool for all Trk::IValidationNtupleHelperTool. More...
class  MemoryLogger
 A small helper class looking at /proc/<PID>status. More...
class  Mode3dFromFsmw1dFinder
 modified from Mode3dFinder by Giaci.nosp@m.nto..nosp@m.Piacq.nosp@m.uadi.nosp@m.o@phy.nosp@m.sik..nosp@m.uni-f.nosp@m.reib.nosp@m.urg.d.nosp@m.e More...
class  Mode3dTo1dFinder
class  MSConstraintTracksProvider
class  MSHitDiffPlots
class  MSHitPlots
class  MultiComponentStateOnSurface
class  MultipleScatteringUpdator
 The Formula used is the highland formula for the projected scattering angle : More...
class  MuonTrackSummary
 Detailed track summary for the muon system Give access to hit counts per chamber. More...
class  MuonTrackSummary_p1
class  MuonTrackSummary_p2
class  MvfFitInfo
class  MVFVxCandidate
class  MVFVxCandidate_p1
class  MVFVxContainer_p1
class  MVFVxContainer_tlp1
class  MVFVxTrackAtVertex
class  MVFVxTrackAtVertex_p1
class  NavBinnedArray1D
 Avoiding a map search, the templated BinnedArray class can help ordereing geometrical objects by providing a dedicated BinUtility. More...
struct  NavigationCell
 useful struct for a single navigation cell More...
class  NavigationLayer
 Class to be used for gaps in Volumes as a navigational link. More...
class  Navigator
 Main AlgTool for Navigation in the TrkExtrapolation realm : It retrieves the TrackingGeometry from the DetectorStore as the reference Geometry. More...
class  NeuralNetworkToHistoTool
class  Neutral
 Simple helper class for defining track parameters for neutral particles. More...
class  NeutralParticleParameterCalculator
 Tool taking a two-track vertex and creating a neutral track from it. More...
class  NeutralTrack
class  NewtonTrkDistanceFinder
 AlgoTool which uses an iterative Newton method in two dimensions (the two points along the two tracks) in order to find their minimum distance. More...
class  NIMatEffUpdator
 Non-interacting timed material effects updator. More...
class  NoBounds
 Bounds object for a boundless surface (...) More...
class  NoiseOnSurface
class  ObjectAccessor
class  ObjectCounter
 Helper to enable counting number of instantiations in debug builds. More...
class  ObjectIntersection
 class extensions to return also the object More...
class  OverlapDescriptor
 BaseClass to be overloaded for describing overlaps and next-by elements for the sub-detector implementations. More...
class  PairOfVxVertexOnJetAxis
struct  ParamDefsAccessor
 Simple struct to access the ParamDefs enum with ints. More...
class  ParametersBase
 The base class for neutral and charged Track parameters. More...
class  ParametersCommon
 Common class for neutral, charged and Pattern Track Parameters. More...
struct  ParametersNextVolume
class  ParametersT
 Dummy class used to allow special convertors to be called for surfaces owned by a detector element. More...
class  ParamPlots
struct  ParamsNextVolume
struct  PartialMassConstraint
class  ParticleCaloExtensionTool
struct  PathLimit
class  PatternTrackParameters
class  PCutTruthCollectionFilter
 This functor accepts valid entries that have associated probability>=probabilityCut. More...
class  PdgToParticleHypothesis
 small converter from the (abs) PDG code to the particle hypothsis used in Tracking More...
class  Perigee_p1
class  Perigee_p2
class  PerigeeParametersNtupleTool
 Explain... More...
class  PerigeeSurface
 Class describing the Line to which the Perigee refers to. More...
class  PGraph
class  PlanarModuleStepper
 Module for fast, geometric. More...
class  PlaneLayer
 Class to describe a planar detector layer for tracking, it inhertis from both, Layer base class and PlaneSurface class. More...
class  PlaneLayerSorterX
 Functor for PlaneLayer X-Sorting. More...
class  PlaneLayerSorterY
 Functor for PlaneLayer Y-Sorting. More...
class  PlaneLayerSorterZ
 Functor for PlaneLayer Z-Sorting. More...
class  PlaneSurface
 Class for a planaer rectangular or trapezoidal surface in the ATLAS detector. More...
class  PointOnTrack
struct  PolygonCache
class  PositionMomentumWriter
 Position momentum writer. More...
class  PRD_AssociationTool
 Concrete Implementation of the IPRD_AssociationTool interface. More...
class  PRD_MultiTruthCollection_p1
class  PRD_MultiTruthCollection_p2
class  PRD_MultiTruthCollection_p3
class  PRD_MultiTruthCollection_p4
class  PRD_TruthTrajectory
 simple definitiion of a PRD_TruhtTrajectory More...
class  PRD_TruthTrajectoryBuilder
class  PRDtoTrackMap
class  PRDtoTrackMapTool
 Concrete Implementation of the IPRD_AssociationTool interface. More...
class  PrepRawData
class  PrepRawData_p1
class  PrepRawDataCollection
class  PrepRawDataCollectionCopyConstructorCalled
class  PrepRawDataComparisonFunction
 Class providing comparison function, or relational definition, for PrepRawData. More...
class  PrepRawDataContainer
class  PrepRawDataUndefinedVariable
 class thrown in the event of an variable not being defined. More...
class  PreselCaloExtensionBuilderAlg
 Build the calo extensions for a preselected collection of tracks. More...
class  PrimaryTruthClassifier
 modular concept to define certain categories of truth particles, this one labels primary, secondary and truncated tracks. More...
class  PrismVolumeBounds
 Bounds for the transcript of triangular prism. More...
class  ProjectionMatricesSet
 the matrices to access the variably-dimensioned local parameters and map them to the defined five track parameters. More...
class  PropagationEngine
 Wrapper around the IPropagator interface, the neutral propagation is solved by using the surface::straightLineIntersection mehtod. More...
class  PropResultRootWriterSvc
class  PseudoMeasurementOnTrack
 Class to handle pseudo-measurements in fitters and on track objects. More...
class  PseudoMeasurementOnTrack_p1
class  PseudoMeasurementOnTrack_p2
class  RandomSurfaceBuilder
 The RandomSurfaceBuilder is a simple Tool that helps to construct randomly poisitioned surfaces - mainly for validation studies. More...
struct  RealLinearEquation
 Mathematic struct for solving real linear equation. More...
struct  RealQuadraticEquation
class  RecMomentumQualityValidation
 This is for automatising the 100%, 50%, 20%, 10% tables for (indet) tracks. More...
class  RecoInfoPlots
class  RectangleBounds
 Bounds for a rectangular, planar surface. More...
class  RectangleBounds_p1
class  RectangularSegmentation
class  RecursiveGeometryProcessor
 Base class tool to step recursively through the Tracking Geometry, it starts from the TrackingGeometry, retrieves the highest volume and then processes all contained objects. More...
class  RecVertex
 Trk::RecVertex inherits from Trk::Vertex. More...
class  RecVertex_p1
class  RecVertex_p2
class  RecVertexPositions
class  ReFitTrack
 Algorithm using an instance of a ITrackFitter to refit the tracks of a given track collection. More...
class  ReFitTrackWithTruth
 Algorithm using an instance of a ITrackFitter to refit the tracks of a given pseudotrack collection after changing the cluster position to the truth particle position. More...
class  Residual
class  ResidualPull
 This class containes residual and pull information. More...
class  ResidualPullCalculator
 AlgTool to calculate the residual and pull of a measurement and the related track state independently of the detector type. More...
class  ResidualValidationNtupleHelper
 This validation helper tool writes residual data into the ntuple using the common Trk::ResidualPullCalculator. More...
class  ResolutionPlots
class  RiddersAlgorithm
 This is a test algorithm for evaluating the jacobians for the transport of Track Parameters. More...
class  RIO_OnTrack
 Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase. More...
class  RIO_OnTrack_p1
class  RIO_OnTrack_p2
class  RIO_OnTrackCreator
 general tool to converts clusters or driftcircles (Trk::PrepRawData) to fully calibrated hits (Trk::RIO_OnTrack) further use in track fits. More...
class  RoT_Extractor
 Small utility to cast MeasurementBase (either in a vector or single) into RIO_OnTrack. More...
class  RotatedDiamondBounds
 Bounds for a double trapezoidal ("diamond"), planar Surface. More...
class  RotatedDiamondBounds_p1
class  RotatedTrapezoidBounds
 Bounds for a rotated trapezoidal, planar Surface. More...
class  RotatedTrapezoidBounds_p1
class  RungeKuttaIntersector
class  RungeKuttaPropagator
 Trk::RungeKuttaPropagator is an algorithm for track parameters propagation through magnetic field. More...
class  SaggedLineSurface
 The distorted surface itself is the nominal surface. More...
class  ScatteringAngleOnTrack_p1
class  ScatteringAngles
 represents a deflection of the track caused through multiple scattering in material. More...
class  SecVertexMergingTool
class  SeedNewtonTrkDistanceFinder
 Algotool which calculates the distance between the two tracks, using: the distance finder you specify, which is an object of type NewtonTrkDistanceFinderAlgo, and using a starting position on the tracks given by Trk2dDistanceSeeder. More...
class  Segment
 Base class for all TrackSegment implementations, extends the common MeasurementBase. More...
class  Segment_p1
class  Segmentation
 Segementation class for generic pixel, strixels and strip segmentations on a rectangle shape. More...
class  SegmentCollection_p1
class  SegmentCollection_tlp1
class  SegmentCollection_tlp2
class  SegmentCollection_tlp3
class  SegmentCollection_tlp4
class  SelectedTracksInJet
class  SelectEventNumber
class  SequentialVertexFitter
 An iterative vertex fitter, updating the vertex estimate with a single at the time. More...
class  SequentialVertexSmoother
 A concrete implementation of the Vertex smoother Takes the tracks from the VxCandidates and updates them with the knowledge of the reconstructed vertex position. More...
class  ShiftingDerivCalcTool
class  SimpleAmbiguityProcessorTool
class  SimplePolygonBrepVolumeBounds
 Bounds for the exact transcript of the GeoSimplePolygonBrep; volume defined by combination of symm.trapezoids. More...
struct  sincosCache
class  SingleTrackDiffAlg
 This Validation algorithm takes two track collections and performes a diff on one track of each collection. More...
class  SlidingCylinderSurface
 Class for a Calo CylinderSurface with variable depth in the ATLAS detector. More...
class  SlidingDiscSurface
 Class for a Calo DiscSurface with variable depth in the ATLAS detector. More...
class  SolenoidalIntersector
class  SolenoidParametrization
class  SolenoidParametrizationCondAlg
class  SpacePoint
class  SpaceTimePoint
 SpaceTimePoint. More...
class  SpaceTimePointBase
 SpaceTimePointBase. More...
class  StaticEngine
 Extrapolation engine for static layer & volume setup. More...
class  StaticNavigationEngine
class  StatTruthCollectionFilter
 Works like PCutTruthCollectionFilter, but also gathers some stats about the collections. More...
class  STEP_Propagator
 STEP (Simultaneous Track and Error Propagation ) is an algorithm for track parameters propagation through magnetic field. More...
class  StraightLineIntersector
class  StraightLineSurface
 Class for a StraightLineSurface in the ATLAS detector to describe dirft tube and straw like detectors. More...
class  SubDetHitStatistics_p0
class  SubtractedCylinderLayer
 Class to describe a cylindrical detector layer for tracking, with subtraction; it inhertis from both, Layer base class and SubtractedCylinderSurface class. More...
class  SubtractedCylinderSurface
 Class for a cylinder subtracted/shared surface in the ATLAS detector. More...
class  SubtractedDiscSurface
 Class for a planar subtracted/shared surface in the ATLAS detector. More...
class  SubtractedPlaneLayer
 Class to describe a planar detector layer for tracking, with subtraction. More...
class  SubtractedPlaneSurface
 Class for a planar subtracted/shared surface in the ATLAS detector. More...
class  SubtractedVolumeBounds
 Bounds for a generic subtracted volume, the decomposeToSurfaces method creates a vector of n surfaces (n1+n2-n_subtracted): More...
class  SumPtVertexWeightCalculator
class  Surface
 Abstract Base Class for tracking surfaces. More...
class  Surface_p1
class  Surface_p2
class  SurfaceBounds
 Abstract base class for surface bounds to be specified. More...
class  SurfaceDeleter
class  SurfaceIntersectionTest
struct  SurfaceNtupleBranch
 This class provides a simple interface to write Surfaces to a root tree. More...
class  SurfacePtrHolderImpl
class  SurfacePtrHolderImplDetEl
struct  SurfaceTreeObject
class  SurfaceUniqHolderImpl
class  temp
class  TimedExtrapolator
 The TimedExtrapolator is to be used for the simulation purposes. More...
struct  TimeLimit
class  Track
 The ATLAS Track class. More...
class  Track_p1
class  Track_p12
class  Track_p2
class  Track_p4
class  TrackCollection_p1
class  TrackCollection_tlp1
class  TrackCollection_tlp2
class  TrackCollection_tlp3
class  TrackCollection_tlp4
class  TrackCollection_tlp5
class  TrackCollection_tlp6
class  TrackCollection_tlp7
class  TrackCollectionMerger
 Class-algorithm for track collection merging and removalof potential duplicate tracks. More...
class  TrackCollectionProvider
class  TrackDensitySeedFinder
class  TrackDiff
 This validation tool writes the differences between two tracks into a ntuple. More...
class  TrackError
 class returned (by exception) in case of an error in Track More...
class  TrackInfo
 Contains information about the 'fitter' of this track. More...
class  TrackInfo_p1
class  TrackInformationNtupleTool
class  TrackingGeometry
 The TrackingGeometry class is the owner of the constructed TrackingVolumes. More...
class  TrackingGeometryCondAlg
class  TrackingGeometryCondAlgTest
class  TrackingGeometrySvc
 This service builds and registers the TrackingGeometry in the detector store. More...
class  TrackingGeometryTest
 Test to build the TrackingGeometry and process it with analizers, thosw are of type IGeometryProcessor. More...
class  TrackingVolume
 Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure, such as from MaterialProperties and from MagneticFieldProperties. More...
class  TrackingVolumeArrayCreator
 The TrackingVolumeArrayCreator is a simple Tool that helps to construct binned arrays of TrackingVolumes for both, confinement in another volume and navigation issues. More...
class  TrackingVolumeDisplayer
 The TrackingVolumeDisplayer writes a root .C file which can be executed and used the OpenGL root viewer. More...
class  TrackingVolumeHelper
 The TrackingVolumeHelper is a simple Tool that helps to construct volumes mainly for gap regions in the fully connective geometry. More...
class  TrackingVolumeManipulator
 The only way to change BoundarySurfaces etc from Tracking Volumes. More...
class  TrackingVolumesSvc
class  TrackJet
 short class to organise reconstructed Trk::Track objects as a jet. More...
struct  TrackMatchingProperties
class  TrackParameters_p1
class  TrackParameters_p2
class  TrackParametersIdentificationHelper
 helper class to get the TrackParametersIdentifier from a TrackParameters More...
class  TrackParametersIdHelper
 helper class to encode and decode a TrackParametersIdentifier More...
class  TrackParticleBase
class  TrackParticleBase_p1
class  TrackParticleCreatorTool
class  TrackPositionNtupleHelper
 This validation tool writes information about track positions. More...
class  TrackPtr
class  TrackRoad
 Encapsulates the information required by the find() method of the muon segment makers. More...
class  TrackSegment
 Class for a generic track segment that holdes polymorphic Trk::MeasurementBase objects, it extends the Trk::Segment base class. More...
class  TrackSegment_p1
class  TrackSelectionProcessorTool
class  TrackSlimmer
 Simple algorithm to load tracks and use Trk::ITrackSlimmingTool to e.g. More...
class  TrackSlimmingTool
 A tool to produce 'slimmed' Tracks from a reference track. More...
class  TrackStateData
 Helper class for Trk::TrackDiff. More...
class  TrackStateOnSurface
 represents the track state (measurement, material, fit parameters and quality) at a surface. More...
class  TrackStateOnSurface_p1
class  TrackStateOnSurface_p2
class  TrackStateOnSurface_p3
class  TrackStateOnSurfaceComparisonFunction
 Class providing comparison function, or relational definition, for sorting MeasurementBase objects. More...
class  TrackSummary
 A summary of the information contained by a track. More...
class  TrackSummary_p1
class  TrackSummary_p2
class  TrackSummaryTool
class  TrackSurfaceIntersection
 An intersection with a Surface is given by. More...
class  TrackToVertexIPEstimator
 A class estimating the transverse impact parameter d0 and its error of a given track wrt to the reconstructed vertex. More...
class  TrackTruthCollection_p1
class  TrackTruthCollection_p2
class  TrackTruthCollection_p3
class  TrackTruthKey
struct  TrackTruthKey_p0
class  TrackValidationNtupleWriter
 Validation Algorithm to retrieve a Track Collection, loop over the tracks and write track information into ntuples using IValidationNtupleTool. More...
struct  TransformNtupleBranch
 This class provides a simple interface to write Transforms to a root tree. More...
class  TransportJacobian
 This class represents the jacobian for transforming initial track parameters to new track parameters after propagation to new surface. More...
class  TrapezoidBounds
 Bounds for a trapezoidal, planar Surface. More...
class  TrapezoidBounds_p1
class  TrapezoidSegmentation
class  TrapezoidVolumeBounds
 Bounds for a trapezoidal shaped Volume, the decomposeToSurfaces method creates a vector of 6 surfaces: More...
class  TriangleBounds
 Bounds for a triangular, planar surface. More...
class  TriangleBounds_p1
 Persisent representation of the transient TriangleBounds class. More...
class  Trk2DDistanceFinder
 Algotool which calculates the distance between the two tracks in 2d only, re-using the Trk2dDistanceSeeder tool, which is based on the analytic solution of the minimum distance between two circles. More...
class  Trk2dDistanceSeeder
 AlgoTool calculates the points of minimum distance between two tracks on the transverse plane, which is analytically well defined (intersection of two circles). More...
class  TrkAlignDBTool
class  TrkAmbiguityScore
class  TrkAmbiguitySolver
 Algorithm does ambiguity processing This algorithm uses the TrkAmbiguityProcessorTool AlgTool to resolve ambiguities in the passed tracks. More...
class  TrkBaseNode
class  TrkClusterNode
class  TrkCollectionAliasAlg
 This algorithm creates in StoreGate an alias name for the StoreGate container key given as property. More...
class  TrkDetDescrTPCnvTest
 Test the new TP Converter for writing and reading. More...
class  TrkDetDescrUnitTestBase
 Base class for all unit tests in the TrkDetDescr package, gives access to gaussian and flat random numbers. More...
class  TrkDetElementBase
 This is the base class for all tracking detector elements with read-out relevant information. More...
class  TrkDistanceFinderNeutralCharged
class  TrkDistanceFinderNeutralNeutral
class  TrkEndCapClusterNode
class  TrkExUnitTestBase
 Base class for all unit tests in the TrkEx package, gives access to gaussian and flat random numbers. More...
class  TrkFilteringNode1D
class  TrkFilteringNode2D
class  TrkMaterialProviderTool
class  TrkObserverTool
class  TrkPixelNode
class  TrkPlanarSurface
class  TrkPriVxPurity
 A prototype data class for primary vertex purity. More...
class  TrkPriVxPurityTool
 A tool estimating the purity of the reconstructed primary vertex. More...
class  TrkTrackDict_Dummy
class  TrkTrackState
class  TrkTrtNode
class  TrkV0VertexFitter
 This class implements a vertex fitting algorithm optimised for V0 finding. More...
class  TrkVKalVrtFitter
class  TrkVKalVrtFitterTestAlg
class  TrueVertexDistanceWeightCalculator
class  TruthInfoPlots
class  TruthMatchRatio
class  TruthMatchTanimoto
class  TruthNtupleTool
 Tool to fill basic information about the truth record. More...
class  TruthToTrack
class  TruthTrackBuilder
class  TruthTrackCreation
 Algorithm to convert PRD multi truth maps into a track collection. More...
class  TruthTrackRecordToTrack
 TruthTrackRecordToTrack is an AlgTool to create Trk::TrackParameters from a HepMC::GenParticle expressed at a "TrackRecordCollection" anywhere in ATLAS. More...
struct  TruthTrajectory_p0
class  TruthTrajectory_p1
class  TruthTrajectory_p2
class  TruthTrajectory_p3
class  TruthTrkExtrapolationPlots
class  TruthVertexSelectionTool
class  TwoTracks
class  TwoTrackVerticesInJet
class  TWRK
class  V0Candidate
class  V0Candidate_p1
class  V0Container_p1
class  V0Container_tlp1
class  V0Container_tlp2
class  V0Hypothesis
 An extension of Trk::ExtendedVxCandidate, to be used for constrained and unconstrained V0 candidates storage. More...
class  V0Hypothesis_p1
class  V0Tools
class  ValidationTrackTruthData
struct  ValueStore
struct  Vect3DF
struct  VectMOM
struct  VectorNtupleBranch
 This class provides a simple interface to write Vectors to a root tree The size of the vectors cannot exceed ROWMAX. More...
class  Vertex
 This class is a simplest representation of a vertex candidate. More...
class  Vertex_p1
class  VertexCollectionSortingTool
class  VertexMapper
 The vertex mapper transforms vertices from global coordinates into the local coordinate frame of the closest sensitive surface. More...
class  VertexMergingTool
class  VertexOnTrack
 Class to handle Vertex On Tracks, it inherits from the common MeasurementBase. More...
class  VertexOnTrack_p1
class  VertexPositions
 VertexPositions class to represent and store a vertex. More...
class  VertexSeedFinderTestAlg
class  VKalAtlasMagFld
class  VKalExtPropagator
class  vkalMagFld
class  vkalPropagator
class  VKalVrtControl
class  VKalVrtControlBase
class  VKConstraintBase
class  VKMassConstraint
class  VKPhiConstraint
class  VKPlaneConstraint
class  VKPointConstraint
class  VKRadiusConstraint
class  VKThetaConstraint
class  VKTrack
class  VKVertex
class  Volume
 Base class for all volumes inside the tracking realm, it defines the interface for inherited Volume classes regarding the geometrical information. More...
class  VolumeBounds
 Pure Absract Base Class for Volume bounds. More...
class  VolumeConverter
 A Simple Helper Class that collects methods for material simplification. More...
class  VolumeExcluder
 removes explicit dependence of Subtracted*Surface on TrkVolumes More...
struct  VolumeExit
class  VolumeIntersection
 A Simple Helper Class that collects methods for calculation of overlap of two geometrical objects. More...
 LinkUtitlity for Volumes with update possibility. More...
struct  VolumePart
struct  VolumeSpan
struct  VolumeTreeObject
 -> simple helper struct for filling the Volume objects More...
class  VxCandidate
class  VxCandidate_p1
class  VxCascadeInfo
class  VxClusteringTable
class  VxContainer_p1
class  VxContainer_tlp1
class  VxContainer_tlp2
class  VxJetCandidate
class  VxJetFitterDebugInfo
class  VxJetFitterVertexInfo
class  VxSecVertexInfo
class  VxSecVKalVertexInfo
class  VxTrackAtVertex
 The VxTrackAtVertex is a common class for all present TrkVertexFitters The VxTrackAtVertex is designed to store the information about the trajectory fitted to the VxCandidate. More...
class  VxTrackAtVertex_p1
class  VxTrackAtVertex_p2
class  VxVertexOnJetAxis
 VxVertexOnJetAxis inherits from Vertex. More...
class  WeightMatrix_p1
class  Z0PVTrackCompatibilityEstimator
 Z0PVTrackCompatibilityEstimator.h. More...
class  ZScanSeedFinder

Typedefs

typedef std::pair< std::shared_ptr< Surface >, Amg::Vector3DSurfaceOrderPosition
using TrackingVolumeOrderPosition
typedef std::pair< long int, long int > indices
typedef std::map< indices, double > datamap
typedef datamap::iterator mapiterator
typedef datamap::const_iterator const_mapiterator
typedef std::vector< AlignModule * > AlignModuleList
typedef boost::multi_array< AlignPar *, 2 > AlignParList
typedef boost::array< boost::multi_array_types::index, 2 > AlignParListDims
typedef DataVector< AlignTSOSAlignTSOSCollection
typedef DataVector< AlignTSOS >::const_iterator AlignTSOSIt
typedef std::pair< AlignModule *, std::vector< Amg::VectorX > > AlignModuleDerivatives
typedef std::vector< AlignTrack ** > AlignTrackCollection
typedef std::vector< AlignTrack ** >::const_iterator AlignTrackIt
typedef std::pair< const AlignModule *, std::vector< Amg::VectorX > > AlignModuleVertexDerivatives
typedef std::pair< Amg::Vector3D, const Trk::TrackingVolume * > PositionAtBoundary
using MaterialComponent = std::pair<Material, double>
using VolumePartVec = std::vector<VolumePart>
typedef std::vector< std::vector< const MaterialProperties * > > MaterialPropertiesMatrix
using TrackingVolumeArray = BinnedArray<TrackingVolume>
 simply for the eye
typedef std::map< Trk::LayerIndex, int > LayerIndexSampleMap
using ThreeObjectsAccessor = std::array<ObjectAccessor::value_type, 3>
using FourObjectsAccessor
using FiveObjectsAccessor = std::array<ObjectAccessor::value_type, 5>
using SixObjectsAccessor = std::array<ObjectAccessor::value_type, 6>
using EightObjectsAccessor = std::array<ObjectAccessor::value_type, 8>
typedef std::pair< std::shared_ptr< Material >, int > IdentifiedMaterial
typedef std::vector< unsigned char > ValueVector
typedef std::vector< ValueVectorValueMatrix
typedef std::map< BoundarySurfaceFace, std::vector< TrackingVolume * > >::iterator GlueVolumeIterator
typedef std::map< BoundarySurfaceFace, std::vector< TrackingVolume * > >::const_iterator GlueVolumeConstIterator
typedef ObjectIntersection< SurfaceSurfaceIntersection
typedef BinnedArray< SurfaceSurfaceArray
typedef DataVector< Trk::LayerMaterialPropertiesLayerMaterialCollection
typedef std::vector< const MaterialProperties * > MaterialPropertiesVector
 Useful typedefs.
typedef DataVector< Trk::MaterialStepMaterialStepCollection
typedef BinnedArray< LayerLayerArray
 simply for the eye
template<class T>
using ArraySpan = std::span<T>
template<class T>
using LayerIntersection = FullIntersection<Layer, Surface, T>
template<class T>
using BoundaryIntersection
typedef SurfaceUniquePtrT< Trk::SurfaceSurfaceUniquePtr
typedef SurfaceUniquePtrT< const Trk::SurfaceConstSurfaceUniquePtr
using ConeSurfacePtrHolder = SurfacePtrHolderImpl<ConeSurface>
using CylinderSurfacePtrHolder = SurfacePtrHolderImpl<CylinderSurface>
using DiscSurfacePtrHolder = SurfacePtrHolderImpl<DiscSurface>
using PerigeeSurfacePtrHolder = SurfacePtrHolderImpl<PerigeeSurface>
using PlaneSurfacePtrHolder = SurfacePtrHolderImpl<PlaneSurface>
using StraightLineSurfacePtrHolder = SurfacePtrHolderImpl<StraightLineSurface>
using SurfacePtrHolder = SurfacePtrHolderImpl<Surface>
using ConeSurfaceUniqHolder = SurfaceUniqHolderImpl<ConeSurface>
using CylinderSurfaceUniqHolder = SurfaceUniqHolderImpl<CylinderSurface>
using DiscSurfaceUniqHolder = SurfaceUniqHolderImpl<DiscSurface>
using PerigeeSurfaceUniqHolder = SurfaceUniqHolderImpl<PerigeeSurface>
using PlaneSurfaceUniqHolder = SurfaceUniqHolderImpl<PlaneSurface>
using StraightLineSurfaceUniqHolder
using SurfaceUniqHolder = SurfaceUniqHolderImpl<Surface>
using SurfacePtrHolderDetEl = Trk::SurfacePtrHolderImplDetEl<Surface>
typedef std::pair< size_t, size_t > DigitizationCell
typedef std::pair< double, ParamDefsDefinedParameter
 Typedef to of a std::pair<double, ParamDefs> to identify a passed-through double as a specific type of parameter.
template<class S>
using SurfaceUniquePtrT = std::unique_ptr<S, SurfaceDeleter<S> >
typedef float TrackScore
typedef std::multimap< const Trk::Track *, std::pair< const Trk::Track *, Trk::TrackMatchingProperties > > TrackMatchMultiMap
typedef ComparisonFunction< TrackParametersTrkParametersComparisonFunction
using NeutralParameters = ParametersBase<NeutralParametersDim, Neutral>
using NeutralCurvilinearParameters = CurvilinearParametersT<NeutralParametersDim, Neutral, PlaneSurface>
using NeutralAtaCone = ParametersT<NeutralParametersDim, Neutral, ConeSurface>
using NeutralAtaCylinder = ParametersT<NeutralParametersDim, Neutral, CylinderSurface>
using NeutralAtaDisc = ParametersT<NeutralParametersDim, Neutral, DiscSurface>
using NeutralPerigee = ParametersT<NeutralParametersDim, Neutral, PerigeeSurface>
using NeutralAtaPlane = ParametersT<NeutralParametersDim, Neutral, PlaneSurface>
using NeutralAtaStraightLine = ParametersT<NeutralParametersDim, Neutral, StraightLineSurface>
using MultiComponentState = std::vector<ComponentParameters>
using BaseParameters = ParametersCommon<TrackParametersDim, Charged>
using TrackParameters = ParametersBase<TrackParametersDim, Charged>
using CurvilinearParameters = CurvilinearParametersT<TrackParametersDim, Charged, PlaneSurface>
using AtaCone = ParametersT<TrackParametersDim, Charged, ConeSurface>
using AtaCylinder = ParametersT<TrackParametersDim, Charged, CylinderSurface>
using AtaDisc = ParametersT<TrackParametersDim, Charged, DiscSurface>
using Perigee = ParametersT<TrackParametersDim, Charged, PerigeeSurface>
using AtaPlane = ParametersT<TrackParametersDim, Charged, PlaneSurface>
using AtaStraightLine = ParametersT<TrackParametersDim, Charged, StraightLineSurface>
typedef VertexType TrackParticleOrigin
typedef DataVector< TrackParticleBaseTrackParticleBaseCollection
typedef std::multimap< Trk::PrepRawData *, RIO_OnTrack * > RIOtoROT_Multimap
typedef DataVector< Trk::TrackRoadTrackRoadCollection
typedef DataVector< Trk::SegmentSegmentCollection
using TrackStates = DataVector<const Trk::TrackStateOnSurface>
typedef std::multimap< const Trk::Track *, int > TrackSeedMap
typedef DataVector< Trk::VxSecVertexInfoVxSecVertexInfoContainer
typedef FitQuality_p1 FitQualityOnSurface_p1
using MeasuredPerigee = Perigee
typedef Surface_p1 PerigeeSurface_p1
typedef TrackTruthVector TrackTruthCollection_p0
typedef ExtrapolationCell< TrackParametersExCellCharged
typedef ExtrapolationCell< NeutralParametersExCellNeutral
typedef std::pair< int, const NavigationCell * > IdNavigationCell
typedef std::pair< const TrackParameters *, double > TrackParametersWithPath
 typedef for return type TrackParameters, pathlength
using DestSurf = std::pair<const Surface*, BoundaryCheck>
 typedef for input surfaces, boundary check
using TrackParametersUVector = std::vector<std::unique_ptr<Trk::TrackParameters>>
template<typename T>
using CacheOwnedPtr = T*
typedef std::pair< const NavigationCell *, const NavigationCell * > NavigationPair
typedef std::vector< const Trk::TrackParameters * > TrackParametersVector
typedef bool RunOutlierRemoval
 switch to toggle quality processing after fit
using PrepRawDataSet = std::vector<const PrepRawData*>
 vector of clusters and drift circles
using MeasurementSet = std::vector<const MeasurementBase*>
 vector of fittable measurements
using RIO_OnTrackSet = std::vector<const RIO_OnTrack*>
 vector of detector hits on a track
using SpacePointSet = std::vector<const SpacePoint*>
 vector of space points
typedef std::vector< std::pair< const Track *, float > > TracksScores
typedef Eigen::Matrix< double, 3, Eigen::Dynamic > AmgMatrix3X
typedef std::pair< Amg::Vector3D, double > PositionAndWeight
typedef std::pair< double, double > DoubleAndWeight
typedef std::pair< PointOnTrack, PointOnTrackTwoPointOnTrack
typedef std::pair< Amg::Vector3D, Amg::Vector3DTwoPoints
typedef void(* addrPropagator) (long int, long int, double *, double *, double *, double *, double *, double *)
template<class T>
using noinit_vector = std::vector<T, boost::noinit_adaptor<std::allocator<T> > >
 A variant on std::vector which leaves its contents uninitialized by default.
typedef void(* addrMagHandler) (double, double, double, double &, double &, double &)
typedef int VertexID
typedef std::vector< double > dvect

Enumerations

enum  ExtraLocalPosParam { distDepth = 2 }
enum  AlignModuleListType {
  L0 =0 , L1 , L2 , L3 ,
  L1_5 , L2_5 , ModulesOnTrack
}
 Type of AlignModuleList (see description above). More...
enum  AlignResidualType { HitOnly , Unbiased }
enum  AlignMesType { Measurement , Scatterer , EnergyDeposit }
enum  LayerOrder { previous = -1 , next = 1 }
 This enum is used to declare Layers as previous/next in respect of a 1-dimensional binned array. More...
enum  BinningType { equidistant , biequidistant , arbitrary }
 , BinningOption & BinningAccess More...
enum  BinningOption { open , closed }
 enum BinValue More...
enum  BinningValue {
  binX , binY , binZ , binR ,
  binPhi , binRPhi , binH , binEta
}
 how to take the global / local position More...
enum  GeometrySignature {
  Global = 0 , ID = 1 , BeamPipe = 2 , Calo = 3 ,
  MS = 4 , Cavern = 5 , HGTD = 6 , NumberOfSignatures = 7 ,
  Unsigned = 99
}
enum  GeometryType {
  Static = 0 , Dense = 1 , DenseWithLayers = 1 , Detached = 2 ,
  Master = 3 , NumberOfGeometryTypes = 3
}
enum  MaterialAssociationType { EffectiveNumSteps = 0 , EffectiveNumAtoms = 1 , RadiationLength = 2 , StepLength = 4 }
enum class  DetectorElemType {
  SolidState = 0 , Silicon = 1 , TRT = 2 , Csc = 3 ,
  Mdt = 4 , Rpc = 5 , Tgc = 6 , sTgc = 7 ,
  MM = 8
}
enum  LayerType { passive = 0 , active = 1 }
 For readability. More...
enum  MaterialConcentration { alongPre = 1 , split = 0 , oppositePre = -1 }
 Simple enum to identify when a material update on a non-structured layer should be done, options are alongPre and oppositePre. More...
enum  MagneticFieldMode { NoField = 0 , ConstantField = 1 , FastField = 2 , FullField = 3 }
 MagneticFieldMode describing the field setup within a volume. More...
enum  NavigationLevel { noNavigation = 0 , globalSearch = 1 , association = 2 }
 destinguishes an association TrackingGeometry with one for global search More...
enum  RQESolutionType {
  none = 0 , one = 1 , two = 2 , none = 0 ,
  one = 1 , two = 2
}
enum  SurfaceOwner { noOwn = 0 , TGOwn = 1 , DetElOwn = 2 , userOwn = 3 }
enum  BevelledCylinderAccessorType { BevelledCylinderZincrease = 0 , BevelledCylinderZdecrease = 1 , BevelledCylinderPositiveFace = 2 , BevelledCylinderNegativeFace = 3 }
enum  BevelledTubeAccessorType {
  BevelledTubeRincreaseZincrease = 0 , BevelledTubeRincreaseZdecrease = 1 , BevelledTubeZincreaseRincrease = 2 , BevelledTubeZdecreaseRincrease = 3 ,
  BevelledTubeRdecreaseZincrease = 4 , BevelledTubeRdecreaseZdecrease = 5 , BevelledTubeZincreaseRdecrease = 6 , BevelledTubeZdecreaseRdecrease = 7 ,
  BevelledTubeOutsideRminRdecrease = 8 , BevelledTubeOutsideRmaxRincrease = 9 , BevelledTubeOutsideZminZdecrease = 10 , BevelledTubeOutsideZmaxZincrease = 11
}
enum  SectoralBevelledCylinderAccessorType { StandardSectoralBevelledCylinder = 0 }
enum  SectoralBevelledTubeAccessorType { StandardSectoralBevelledTube = 0 }
enum  BoundarySurfaceFace {
  negativeFaceXY = 0 , positiveFaceXY = 1 , negativeFaceYZ = 2 , positiveFaceYZ = 3 ,
  negativeFaceZX = 4 , positiveFaceZX = 5 , cylinderCover = 2 , tubeInnerCover = 3 ,
  tubeOuterCover = 2 , tubeSectorNegativePhi = 4 , tubeSectorPositivePhi = 5 , tubeSectorInnerCover = 3 ,
  tubeSectorOuterCover = 2 , trapezoidFaceAlpha = 2 , trapezoidFaceBeta = 3 , index0 = 0 ,
  index1 = 1 , index2 = 2 , index3 = 3 , index4 = 4 ,
  index5 = 5 , index6 = 6 , index7 = 7 , index8 = 8 ,
  index9 = 9 , index10 = 10 , index11 = 11 , undefinedFace = 99
}
 Enum to describe the position of the BoundarySurface respectively to the frame orientatin of the volume, this is mainly ment for code readability. More...
enum  CylinderAccessorType { CylinderZincrease = 0 , CylinderZdecrease = 1 , CylinderPositiveFace = 2 , CylinderNegativeFace = 3 }
enum  TubeAccessorType {
  TubeRincreaseZincrease = 0 , TubeRincreaseZdecrease = 1 , TubeZincreaseRincrease = 2 , TubeZdecreaseRincrease = 3 ,
  TubeRdecreaseZincrease = 4 , TubeRdecreaseZdecrease = 5 , TubeZincreaseRdecrease = 6 , TubeZdecreaseRdecrease = 7 ,
  TubeOutsideRminRdecrease = 8 , TubeOutsideRmaxRincrease = 9 , TubeOutsideZminZdecrease = 10 , TubeOutsideZmaxZincrease = 11
}
enum  SectoralCylinderAccessorType { StandardSectoralCylinder = 0 }
enum  SectoralTubeAccessorType { StandardSectoralTube = 0 }
enum  DriftCircleSide { NONE , LEFT , RIGHT }
 Enumerates the 'side' of the wire on which the tracks passed (i.e. More...
enum  DriftCircleStatus { DECIDED , UNDECIDED , CORRUPT , NODRIFTTIME }
 Enumerates the 'status' of the wire on which the tracks passed (based on the TRT_Side enum, from InDet::TRT_DriftCircleOnTrack, which this should eventually replace) More...
enum  ParamDefs {
  loc1 = 0 , loc2 = 1 , locX = 0 , locY = 1 ,
  locRPhi = 0 , locPhiR = 0 , locZ = 1 , locR = 0 ,
  locPhi = 1 , iPhi = 0 , iEta = 1 , distPhi = 0 ,
  distEta = 1 , driftRadius = 0 , x = 0 , y = 1 ,
  z = 2 , px = 0 , py = 1 , pz = 2 ,
  d0 = 0 , z0 = 1 , phi0 = 2 , theta = 3 ,
  qOverP = 4 , phi = 2 , u = 0 , v = 1 ,
  trkMass = 5
}
 This file defines the parameter enums in the Trk namespace. More...
enum  ParticleHypothesis {
  nonInteracting = 0 , geantino = 0 , electron = 1 , muon = 2 ,
  pion = 3 , kaon = 4 , proton = 5 , photon = 6 ,
  neutron = 7 , pi0 = 8 , k0 = 9 , nonInteractingMuon = 10 ,
  noHypothesis = 99 , undefined = 99
}
 Enumeration for Particle hypothesis respecting the interaction with material. More...
enum  PropDirection { alongMomentum = 1 , oppositeMomentum =-1 , anyDirection = 0 , mappingMode = 2 }
 PropDirection, enum for direction of the propagation. More...
enum  SearchDirection { outside =1 , inside =-1 , bothway =0 , undefinedDirection =0 }
enum  MaterialUpdateStage { preUpdate = -1 , fullUpdate = 0 , postUpdate = 1 }
 This is a steering enum to tell which material update stage: More...
enum class  SurfaceType {
  Cone = 0 , Cylinder = 1 , Disc = 2 , Perigee = 3 ,
  Plane = 4 , Line = 5 , Curvilinear = 6 , Other = 7
}
 This enumerator simplifies the persistency & calculations,. More...
enum  VertexType {
  NoVtx = 0 , PriVtx = 1 , SecVtx = 2 , PileUp = 3 ,
  ConvVtx = 4 , V0Vtx = 5 , KinkVtx = 6 , V0Lambda = 7 ,
  V0LambdaBar = 8 , V0KShort = 9 , NotSpecified = -99
}
 This file defines the enums in the Trk namespace for the different vertex types. More...
enum  ParametersType { AtaSurface = 0 , Curvilinear = 1 , Pattern = 2 }
 Enum to avoid dynamic cast for different parameter types. More...
enum class  PrepRawDataType {
  SiCluster , PixelCluster , SCT_Cluster , TRT_DriftCircle ,
  HGTD_Cluster , PlanarCluster , MdtPrepData , CscStripPrepData ,
  CscPrepData , MMPrepData , RpcPrepData , TgcPrepData ,
  sTgcPrepData
}
enum  SummaryType {
  numberOfContribPixelLayers = 29 , numberOfBLayerHits = 0 , numberOfInnermostPixelLayerHits = 53 , numberOfNextToInnermostPixelLayerHits = 58 ,
  numberOfPixelHits = 2 , numberOfPixelHoles = 1 , numberOfGangedPixels = 14 , numberOfGangedFlaggedFakes = 32 ,
  numberOfPixelDeadSensors = 33 , numberOfPixelSpoiltHits = 35 , numberOfDBMHits = 63 , numberOfSCTHits = 3 ,
  numberOfSCTHoles = 4 , numberOfSCTDoubleHoles = 28 , numberOfSCTDeadSensors = 34 , numberOfSCTSpoiltHits = 36 ,
  numberOfTRTHits = 5 , numberOfTRTOutliers = 19 , numberOfTRTHoles = 40 , numberOfTRTHighThresholdHits = 6 ,
  numberOfTRTHighThresholdHitsTotal = 64 , numberOfTRTHitsUsedFordEdx = 65 , numberOfTRTHighThresholdOutliers = 20 , numberOfTRTDeadStraws = 37 ,
  numberOfTRTTubeHits = 38 , numberOfTRTXenonHits = 46 , numberOfMdtHits = 7 , numberOfTgcPhiHits = 8 ,
  numberOfTgcEtaHits = 9 , numberOfCscPhiHits = 10 , numberOfCscEtaHits = 11 , numberOfRpcPhiHits = 12 ,
  numberOfRpcEtaHits = 13 , numberOfCscEtaHoles = 21 , numberOfCscPhiHoles = 22 , numberOfRpcEtaHoles = 23 ,
  numberOfRpcPhiHoles = 24 , numberOfMdtHoles = 25 , numberOfTgcEtaHoles = 26 , numberOfTgcPhiHoles = 27 ,
  numberOfStgcEtaHits = 67 , numberOfStgcPhiHits = 68 , numberOfMmHits = 69 , numberOfStgcEtaHoles = 70 ,
  numberOfStgcPhiHoles = 71 , numberOfMmHoles = 72 , numberOfCscUnspoiltEtaHits = 45 , numberOfGoodMdtHits = 66 ,
  numberOfOutliersOnTrack = 15 , standardDeviationOfChi2OS = 30 , legacy_eProbabilityComb_res = 47 , legacy_eProbabilityHT_res = 48 ,
  legacy_eProbabilityToT_res = 49 , legacy_eProbabilityBrem_res = 50 , legacy_pixeldEdx_res = 51 , legacy_eProbabilityNN_res = 73 ,
  legacy_TRTTrackOccupancy_res = 74 , legacy_TRTdEdx_res = 75 , legacy_expectBLayerHit = 42 , legacy_expectInnermostPixelLayerHit = 52 ,
  legacy_expectNextToInnermostPixelLayerHit = 57 , legacy_numberOfBLayerSharedHits = 16 , legacy_numberOfPixelSharedHits = 17 , legacy_numberOfSCTSharedHits = 18 ,
  legacy_numberOfBLayerSplitHits = 43 , legacy_numberOfPixelSplitHits = 44 , legacy_numberOfInnermostPixelLayerSharedHits = 55 , legacy_numberOfInnermostLayerSplitHits = 56 ,
  legacy_numberOfNextToInnermostPixelLayerSharedHits = 60 , legacy_numberOfNextToInnermostLayerSplitHits = 61 , legacy_numberOfTRTSharedHits = 62 , legacy_numberOfBLayerOutliers = 31 ,
  legacy_numberOfInnermostPixelLayerOutliers = 54 , legacy_numberOfNextToInnermostPixelLayerOutliers = 59 , legacy_numberOfPixelOutliers = 41 , legacy_numberOfSCTOutliers = 39 ,
  numberOfTrackSummaryTypes = 76
}
 enumerates the different types of information stored in Summary. More...
enum  eProbabilityType {
  eProbabilityComb , eProbabilityHT , eProbabilityToT , eProbabilityBrem = 3 ,
  eProbabilityNN = 4 , TRTTrackOccupancy = 5 , TRTdEdx = 6 , eProbabilityNumberOfTRTHitsUsedFordEdx ,
  numberOfeProbabilityTypes = 8
}
enum  DetectorType {
  pixelBarrel0 = 0 , pixelBarrel1 = 1 , pixelBarrel2 = 2 , pixelBarrel3 = 3 ,
  pixelEndCap0 = 4 , pixelEndCap1 = 5 , pixelEndCap2 = 6 , sctBarrel0 = 7 ,
  sctBarrel1 = 8 , sctBarrel2 = 9 , sctBarrel3 = 10 , sctEndCap0 = 11 ,
  sctEndCap1 = 12 , sctEndCap2 = 13 , sctEndCap3 = 14 , sctEndCap4 = 15 ,
  sctEndCap5 = 16 , sctEndCap6 = 17 , sctEndCap7 = 18 , sctEndCap8 = 19 ,
  trtBarrel = 20 , trtEndCap = 21 , DBM0 = 22 , DBM1 = 23 ,
  DBM2 = 24 , numberOfDetectorTypes = 25
}
 enumerates the various detector types currently accessible from the isHit() method. More...
enum  JetVtxParamDefs {
  jet_xv =0 , jet_yv =1 , jet_zv =2 , jet_phi =3 ,
  jet_theta =4 , jet_dist =5
}
enum  MaterialUpdateMode { addNoise = 1 , removeNoise = -1 }
 This is a steering enum to force the material update it can be: (1) addNoise (-1) removeNoise Second is mainly for vertex reconstruction, but potentially dangeraous. More...
enum  RQESolutionType {
  none = 0 , one = 1 , two = 2 , none = 0 ,
  one = 1 , two = 2
}
enum  ExtrapolationType {
  FittedTrajectory , DeltaD0 , DeltaZ0 , DeltaPhi0 ,
  DeltaTheta0 , DeltaQOverP0 , DeltaQOverP1 , ExtrapolationTypes
}
enum  MeasurementType {
  perigeeParameters , transverseVertex , vertex , pixelCluster ,
  stripCluster , trapezoidCluster , driftCircle , pseudoMeasurement ,
  barrelScatterer , endcapScatterer , calorimeterScatterer , barrelInert ,
  endcapInert , energyDeposit , alignment , discontinuity ,
  bremPoint , hole , materialDelimiter
}
enum  ParameterType {
  D0 , Z0 , Phi0 , Theta0 ,
  QOverP0 , QOverP1 , ParameterTypes
}
enum  RangeCheckDef { absoluteCheck = 0 , differentialCheck = 1 }
enum  DetectorRegion {
  pixelBarrelFlat = 0 , pixelBarrelInclined = 1 , pixelEndcap = 2 , stripBarrel = 3 ,
  stripEndcap = 4
}
enum class  BoundaryCheckResult {
  Candidate , OnEdge , Insensitive , Outside ,
  DeadElement , Error
}
enum  TRT_ElectronPidProbability { Combined = 0 , HighThreshold = 1 , TimeOverThreshold = 2 , Bremsstrahlung = 3 }
enum class  VKConstraintType {
  Mass , Phi , Theta , Point ,
  Plane , Radius
}
enum  { NTrMaxVFit =200 }

Functions

void decomposeTransform (const Amg::Transform3D &transform, double *values)
std::string detTypeStr (AlignModule::DetectorType detType)
 returns the detector type
MsgStream & operator<< (MsgStream &sl, const AlignModule &alignModule)
 overload of << operator for MsgStream for debug output
MsgStream & operator<< (MsgStream &sl, const AlignPar &alignPar)
 overload of << operator for MsgStream for debug output
MsgStream & operator<< (MsgStream &log, Trk::AlignMesType type)
MsgStream & operator<< (MsgStream &log, Trk::AlignResidualType type)
ResidualPull::ResidualType ResidualPullType (AlignResidualType type)
MsgStream & operator<< (MsgStream &sl, const AlignTrack::AlignTrackType type)
std::ostream & operator<< (std::ostream &sl, const AlignTrack::AlignTrackType type)
std::string dumpAlignTrackType (const AlignTrack::AlignTrackType type)
MsgStream & operator<< (MsgStream &sl, const AlignTSOS &atsos)
 Overload of << operator for MsgStream for debug output.
MsgStream & operator<< (MsgStream &log, AlignResidualType type)
MsgStream & operator<< (MsgStream &sl, AlignModuleTool &alignModTool)
MsgStream & operator<< (MsgStream &sl, const BinUtility &bgen)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const BinUtility &bgen)
bool operator< (const LayerIndex &one, const LayerIndex &two)
 Overload of operator< | <= | > | >= for the usage in a map.
bool operator<= (const LayerIndex &one, const LayerIndex &two)
bool operator> (const LayerIndex &one, const LayerIndex &two)
bool operator>= (const LayerIndex &one, const LayerIndex &two)
MsgStream & operator<< (MsgStream &sl, const LayerIndex &layx)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const LayerIndex &layx)
MsgStream & operator<< (MsgStream &sl, const MemoryLogger &oac)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const MemoryLogger &oac)
MsgStream & operator<< (MsgStream &sl, const ObjectAccessor &oac)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const ObjectAccessor &oac)
MsgStream & operator<< (MsgStream &sl, const AssociatedMaterial &mstep)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const AssociatedMaterial &mstep)
MsgStream & operator<< (MsgStream &sl, const ElementTable &etab)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const ElementTable &etab)
MsgStream & operator<< (MsgStream &sl, GlueVolumesDescriptor &mprop)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, GlueVolumesDescriptor &mprop)
MsgStream & operator<< (MsgStream &sl, const LayerMaterialProperties &mprop)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const LayerMaterialProperties &mprop)
MsgStream & operator<< (MsgStream &sl, const MagneticFieldProperties &mprop)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const MagneticFieldProperties &mprop)
MsgStream & operator<< (MsgStream &sl, const MaterialProperties &mprop)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const MaterialProperties &mprop)
MsgStream & operator<< (MsgStream &sl, const MaterialStep &mstep)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const MaterialStep &mstep)
MsgStream & operator<< (MsgStream &sl, const Surface &sf)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const Surface &sf)
MsgStream & operator<< (MsgStream &sl, const SurfaceBounds &sb)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const SurfaceBounds &sb)
MsgStream & operator<< (MsgStream &sl, const Volume &vol)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const Volume &vol)
MsgStream & operator<< (MsgStream &sl, const VolumeBounds &vb)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const VolumeBounds &vb)
MsgStream & operator<< (MsgStream &sl, const Trk::LocalParameters &lp)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const Trk::LocalParameters &lp)
MsgStream & operator<< (MsgStream &sl, const CurvilinearUVT &uvt)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const CurvilinearUVT &uvt)
MsgStream & operator<< (MsgStream &sl, const FitQualityImpl &fq)
 Overload of << operator for MsgStream for debug output.
std::ostream & operator<< (std::ostream &sl, const FitQualityImpl &fq)
 Overload of << operator for std::ostream for debug output.
MsgStream & operator<< (MsgStream &sl, const JacobianCurvilinearToLocal &jac)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const JacobianCurvilinearToLocal &jac)
MsgStream & operator<< (MsgStream &sl, const LocalDirection &lomo)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const LocalDirection &lomo)
template<typename U>
bool consistentSurfaces (U)
template<typename U, typename ... T>
bool consistentSurfaces (U a, T...b)
MsgStream & operator<< (MsgStream &sl, const TransportJacobian &jac)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const TransportJacobian &jac)
template<typename T>
std::unique_ptr< T > unique_clone (const T *v)
template<typename T>
std::unique_ptr< T > unique_clone (const std::unique_ptr< T > &v)
template<class OrigMap, class CmpT>
void addToInverseMultiMap (InverseMultiMap< OrigMap, CmpT > *result, const OrigMap &rec2truth)
template<class OStream, class TruthCollection>
OStream & operator<< (OStream &os, const BasicTruthCollectionFilter< TruthCollection > &f)
template<class OStream, class TruthCollection>
OStream & operator<< (OStream &os, const PCutTruthCollectionFilter< TruthCollection > &f)
template<class OStream, class TruthCollection>
OStream & operator<< (OStream &os, const StatTruthCollectionFilter< TruthCollection > &f)
MsgStream & operator<< (MsgStream &sl, const EnergyLoss &eloss)
 Overload of << operator for MsgStream for debug output.
std::ostream & operator<< (std::ostream &sl, const EnergyLoss &eloss)
 Overload of << operator for std::ostream for debug outputstd::ostream&.
MsgStream & operator<< (MsgStream &sl, const MaterialEffectsBase &meb)
 Overload of << operator for MsgStream for debug output.
std::ostream & operator<< (std::ostream &sl, const MaterialEffectsBase &meb)
 Overload of << operator for std::ostream for debug output.
MsgStream & operator<< (MsgStream &sl, const Trk::ScatteringAngles &saos)
 Overload of << operator for MsgStream for debug output.
std::ostream & operator<< (std::ostream &sl, const Trk::ScatteringAngles &saos)
 Overload of << operator for std::ostream for debug output.
MsgStream & operator<< (MsgStream &sl, const Trk::MeasurementBase &mbase)
 Overload of << operator for MsgStream for debug output.
std::ostream & operator<< (std::ostream &sl, const Trk::MeasurementBase &mbase)
 Overload of << operator for std::ostream for debug output.
template<int DIM, class T>
MsgStream & operator<< (MsgStream &sl, const Trk::ParametersBase< DIM, T > &tp)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
template<int DIM, class T>
std::ostream & operator<< (std::ostream &sl, const Trk::ParametersBase< DIM, T > &tp)
MsgStream & operator<< (MsgStream &sl, const TrackParticleBase &trackParticleBase)
 Overload of << operator for MsgStream for debug output.
std::ostream & operator<< (std::ostream &sl, const TrackParticleBase &trackParticleBase)
 Overload of << operator for std::ostream for debug output.
std::ostream & operator<< (std::ostream &, const NoiseOnSurface &)
MsgStream & operator<< (MsgStream &, const NoiseOnSurface &)
std::ostream & operator<< (std::ostream &, const PatternTrackParameters &)
MsgStream & operator<< (MsgStream &, const PatternTrackParameters &)
MsgStream & operator<< (MsgStream &stream, const PrepRawData &prd)
std::ostream & operator<< (std::ostream &stream, const PrepRawData &prd)
template<typename T_res, typename T_src>
const T_res * ErrorScalingCast (const T_src *src)
MsgStream & operator<< (MsgStream &stream, const TrackRoad &tr)
 Dump the road into a message stream.
std::ostream & operator<< (std::ostream &stream, const TrackRoad &tr)
 Dump the road into a standard output stream.
MsgStream & operator<< (MsgStream &sl, const Trk::SpacePoint &spacePoint)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const SpacePoint &spacePoint)
 Overload of << operator for std::ostream for debug output.
MsgStream & operator<< (MsgStream &sl, const TrackStateOnSurface &tsos)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const TrackStateOnSurface &tsos)
 Overload of << operator for std::ostream for debug output.
MsgStream & operator<< (MsgStream &sl, const AlignmentEffectsOnTrack &tsos)
 Overload of << operator for MsgStream for debug output.
std::ostream & operator<< (std::ostream &sl, const AlignmentEffectsOnTrack &tsos)
 Overload of << operator for std::ostream for debug output.
 AmgSymMatrix (5) &GXFTrackState
MsgStream & operator<< (MsgStream &, const MultiComponentStateOnSurface &)
 Overload of << operator for MsgStream for debug output.
std::ostream & operator<< (std::ostream &, const MultiComponentStateOnSurface &)
 Overload of << operator for std::ostream for debug output.
MsgStream & operator<< (MsgStream &sl, const Track &track)
 Overload of << operator for MsgStream for debug output.
std::ostream & operator<< (std::ostream &sl, const Track &track)
 Overload of << operator for std::ostream for debug output.
MsgStream & operator<< (MsgStream &sl, const TrackInfo &track)
 Overload of << operator for MsgStream for debug output.
std::ostream & operator<< (std::ostream &sl, const TrackInfo &track)
 Overload of << operator for std::ostream for debug output.
MsgStream & operator<< (MsgStream &out, const MuonTrackSummary &trackSum)
 output.
std::ostream & operator<< (std::ostream &out, const MuonTrackSummary &trackSum)
 output.
MsgStream & operator<< (MsgStream &out, const TrackSummary &trackSum)
 output.
std::ostream & operator<< (std::ostream &out, const TrackSummary &trackSum)
 output.
bool operator< (const TrackTruthKey &a, const TrackTruthKey &b)
MsgStream & operator<< (MsgStream &sl, const VertexPositions &sf)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const VertexPositions &sf)
MsgStream & operator<< (MsgStream &sl, const VxClusteringTable &sf)
std::ostream & operator<< (std::ostream &sl, const VxClusteringTable &sf)
std::ostream & operator<< (std::ostream &sl, const LinearizedTrack &sf)
const AmgSymMatrix (3) &RecVertex
MsgStream & operator<< (MsgStream &sl, const Vertex &sf)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const Vertex &sf)
MsgStream & operator<< (MsgStream &sl, const VxCandidate &sf)
 Overload of << operator for both, MsgStream and std::ostream for debug output; only needed in base class?
std::ostream & operator<< (std::ostream &sl, const VxCandidate &sf)
MsgStream & operator<< (MsgStream &sl, const VxTrackAtVertex &sf)
 Overload of << operator for both, MsgStream and std::ostream for debug output; only needed in base class?
std::ostream & operator<< (std::ostream &sl, const VxTrackAtVertex &sf)
MsgStream & operator<< (MsgStream &sl, const LinearizedTrack &sf)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
bool operator< (const TrackTruthKey_p0 &a, const TrackTruthKey_p0 &b)
ATH_ALWAYS_INLINE void propJacobian (double *ATH_RESTRICT P, const double *ATH_RESTRICT H0, const double *ATH_RESTRICT H1, const double *ATH_RESTRICT H2, const double *ATH_RESTRICT A, const double *ATH_RESTRICT A0, const double *ATH_RESTRICT A3, const double *ATH_RESTRICT A4, const double *ATH_RESTRICT A6, const double S3)
 This provides an inline helper function for updating the jacobian during Runge-Kutta propagation.
MsgStream & operator<< (MsgStream &sl, const TrackSurfaceIntersection &tsfi)
 Overload of << operator for both, MsgStream and std::ostream for debug output.
std::ostream & operator<< (std::ostream &sl, const TrackSurfaceIntersection &tsfi)
MsgStream & operator<< (MsgStream &log, ExtrapolationType type)
MsgStream & operator<< (MsgStream &log, MeasurementType type)
MsgStream & operator<< (MsgStream &log, ParameterType type)
 AmgMatrix (3, 3) NeutralParticleParameterCalculator
int makeCascade (VKalVrtControl &FitCONTROL, long int NTRK, const long int *ich, double *wm, double *inp_Trk5, double *inp_CovTrk5, const std::vector< std::vector< int > > &vertexDefinition, const std::vector< std::vector< int > > &cascadeDefinition, double definedCnstAccuracy)
int setCascadeMassConstraint (CascadeEvent &cascadeEvent_, long int IV, double Mass)
int setCascadeMassConstraint (CascadeEvent &cascadeEvent_, long int IV, std::vector< int > &trkInVrt, std::vector< int > &pseudoInVrt, double Mass)
int fixPseudoTrackPt (long int NPar, double *fullMtx, double *LSide, CascadeEvent &cascadeEvent_)
VKTrackgetCombinedVTrack (VKVertex *vk)
int getCascadeNPar (CascadeEvent &cascadeEvent_, int Type)
void setFittedParameters (const double *result, std::vector< int > &matrixPnt, CascadeEvent &cascadeEvent_)
void setFittedMatrices (const double *COVFIT, long int MATRIXSIZE, std::vector< int > &matrixPnt, std::vector< std::vector< double > > &covarCascade, CascadeEvent &cascadeEvent_)
std::vector< double > transformCovar (int NPar, double **Deriv, const std::vector< double > &covarI)
void addCrossVertexDeriv (CascadeEvent &cascadeEvent_, double *ader, long int MATRIXSIZE, const std::vector< int > &matrixPnt)
void copyFullMtx (const double *Input, long int IPar, long int IDIM, double *Target, long int TStart, long int TDIM)
void getNewCov (const double *OldCov, const double *Der, double *Cov, long int DIM) noexcept
void cferpr (const long int ich, double *par, double *ref, const double s0, double *errold, double *errnew)
void cfimp (long int TrkID, long int ich, int IFL, double *par, const double *err, double *vrt, double *vcov, double *rimp, double *rcov, double *sign, VKalVrtControlBase *FitCONTROL)
void cfimpc (long int TrkID, long int ich, int IFL, double *par, const double *err, double *vrt, double *vcov, double *rimp, double *rcov, double *sign, VKalVrtControlBase *FitCONTROL)
int CFit (VKalVrtControl *FitCONTROL, int ifCovV0, int NTRK, long int *ich, double xyz0[3], double(*par0)[3], double(*inp_Trk5)[5], double(*inp_CovTrk5)[15], double xyzfit[3], double(*parfs)[3], double ptot[4], double covf[21], double &chi2, double *chi2tr)
int setVTrackMass (VKVertex *vk)
long int getVertexCharge (VKVertex *vk)
double cascadeCnstRemnants (CascadeEvent &cascadeEvent_)
int fitVertexCascade (VKVertex *vk, int Pointing)
int processCascade (CascadeEvent &cascadeEvent_)
int processCascadePV (CascadeEvent &cascadeEvent_, const double *primVrt, const double *primVrtCov)
int processCascade (CascadeEvent &cascadeEvent_, const double *primVrt, const double *primVrtCov)
int processCascade (CascadeEvent &cascadeEvent_, double *primVrt)
int translateToFittedPos (CascadeEvent &cascadeEvent_, double Step)
int restorePreviousPos (CascadeEvent &cascadeEvent_, std::vector< VKVertex > &SV)
void getFittedCascade (CascadeEvent &cascadeEvent_, std::vector< Vect3DF > &cVertices, std::vector< std::vector< double > > &covVertices, std::vector< std::vector< VectMOM > > &fittedParticles, std::vector< std::vector< double > > &cascadeCovar, std::vector< double > &particleChi2, std::vector< double > &fullCovar)
void rescaleVrtErrForPointing (double Div, CascadeEvent &cascadeEvent_)
int fitVertexCascadeScale (VKVertex *vk, double &distToVertex)
int processCascadeScale (CascadeEvent &cascadeEvent_)
void cfmasserr (VKVertex *vk, const int *list, double *MASS, double *sigM)
void vkPerigeeToP (const double *perig3, double *pp, double effectiveBMAG)
std::array< double, 4 > getFitParticleMom (const VKTrack *trk, const VKVertex *vk)
std::array< double, 4 > getFitParticleMom (const VKTrack *trk, double effectiveBMAG)
std::array< double, 4 > getIniParticleMom (const VKTrack *trk, const VKVertex *vk)
std::array< double, 4 > getIniParticleMom (const VKTrack *trk, double effectiveBMAG)
std::array< double, 4 > getCnstParticleMom (const VKTrack *trk, const VKVertex *vk)
std::array< double, 4 > getCnstParticleMom (const VKTrack *trk, double effectiveBMAG)
void cfnewp (const long int ich, double *parold, double *ref, double *s, double *parnew, double *per)
void cfnewpm (double *par, const double *xyzStart, double *xyzEnd, const double ustep, double *parn, double *closePoint, VKalVrtControlBase *CONTROL)
void cfpest (int ntrk, double *xyz, long int *ich, double(*parst)[5], double(*parf)[3])
int afterFit (VKVertex *vk, double *ader, double *dcv, double *ptot, double *VrtMomCov, const VKalVrtControlBase *CONTROL)
int afterFitWithIniPar (VKVertex *vk, double *ader, double *dcv, double *ptot, double *VrtMomCov, const VKalVrtControlBase *CONTROL)
double cfVrtDstSig (VKVertex *vk, bool UseTrkErr)
void calcMassConstraint (VKMassConstraint *cnst)
void calcPointConstraint (VKPointConstraint *cnst)
void calcPhiConstraint (VKPhiConstraint *cnst)
void calcThetaConstraint (VKThetaConstraint *cnst)
void calcPlaneConstraint (VKPlaneConstraint *cnst)
void calcRadiusConstraint (VKRadiusConstraint *cnst)
std::ostream & operator<< (std::ostream &out, const VKConstraintBase &cnst)
std::ostream & operator<< (std::ostream &out, const VKMassConstraint &cnst)
std::ostream & operator<< (std::ostream &out, const VKPhiConstraint &cnst)
std::ostream & operator<< (std::ostream &out, const VKThetaConstraint &cnst)
std::ostream & operator<< (std::ostream &out, const VKPointConstraint &cnst)
std::ostream & operator<< (std::ostream &out, const VKPlaneConstraint &cnst)
std::ostream & operator<< (std::ostream &out, const VKRadiusConstraint &cnst)
void FullMTXfill (VKVertex *vk, double *ader)
int FullMCNSTfill (VKVertex *vk, double *ader, double *LSide)
double cfSmallEigenvalue (double *cov, long int n)
int cfInv5 (double *cov, double *wgt)
int cfdinv (double *cov, double *wgt, long int NI)
void dsinv (long int n, double *a, long int DIM, long int *ifail) noexcept
int vkMSolve (double *a, double *b, long int n, double *ainv)
void vkSVDCmp (double **a, int m, int n, double w[], double **v)
void vkGetEigVal (const double ci[], double d[], int n)
void vkGetEigVect (const double ci[], double d[], double vect[], int n)
void robtest (VKVertex *vk, int ifl, int nIteration)
void applyConstraints (VKVertex *vk)
std::ostream & operator<< (std::ostream &out, const VKTrack &track)
double cfchi2 (double *xyzt, const long int ich, double *part, const double *par0, double *wgt, double *rmnd)
double cfchi2 (const double *vrtt, const double *part, VKTrack *trk)
double finter (double y0, double y1, double y2, double x0, double x1, double x2)
void tdasatVK (const double *Der, const double *CovI, double *CovF, long int M, long int N)
void cfsetdiag (long int n, double *matr, double value) noexcept
void abcCoef (double g1, double g2, double g3, double &a, double &b, double &c)
void efdCoef (double Ga0, double Gamb, double Gab, double Gw0, double Gwb, double alf, double bet, double w, double &d, double &e, double &f)
void ParaMin (double b, double c, double d, double e, double f, double &xmin, double &ymin)
void cfTrkCovarCorr (double *cov)
void vkgrkuta_ (const double charge, const double step, double *vect, double *vout, VKalVrtControlBase *CONTROL)
double vkvFastV (double *p1, double *p2, const double *vRef, double dbmag, double *out)
int vtcfit (VKVertex *vk)
int vtcfitc (VKVertex *vk)
double getCnstValues2 (VKVertex *vk) noexcept
int getFullVrtCov (VKVertex *vk, double *ader, const double *dcv, double verr[6][6])
void vpderiv (bool UseTrackErr, long int Charge, const double *pari0, double *covi, double *vrtref, double *covvrtref, double *drdpar, double *dwgt, double *rv0, VKalVrtControl *FitCONTROL)
void xyztrp (const long int ich, double *vrt0, double *pv0, double *covi, double BMAG, double *paro, double *errt)
void combinedTrack (long int ICH, double *pv0, double *covi, double BMAG, double *par, double *covo)
void cfdcopy (double *source, double *target, int n)
double cfddist3D (double *V1, double *V2)
double d_sign (double value, double sign)
int SymIndex (int it, int i, int j)

Variables

constexpr int MAXNCHAMBERS =50
constexpr int MAXNINDICES =50*6
template<typename T>
const auto do_not_delete = [](T*) {}
constexpr size_t NeutralParametersDim = 5
constexpr size_t TrackParametersDim = 5

Detailed Description

Ensure that the ATLAS eigen extensions are properly loaded.

Author: V.Kostyukhin.

An abstract base class for algorithms estimating the transverse impact parameter d0 and its error of a given track wrt to the reconstructed vertex.

IPVTrackCompatibilityEstimator.h.

A namespace for all vertexing packages and related stuff.

A first concrete implementation of the IV0VertexFitter for the purposes of V0 fitting.

A track-truth match quality estimator tool.

Code that is common to several track-truth matching tools.

These headers, as well as other headers in the TrkGlobalChi2Fitter package use modern C++11 memory ownership semantics expressed through smart pointers.

Cache for the extrapolator to keep track of the total X0 traversed and the total extended energy loss (Eloss (error) ,Ionization (error), Radiation (error))

Special internal ptr caching.

Persistent representation of class VxVertex/VxTrackAtVertex.

Persistent representation of the VxVertex/Vertex class.

Persistent representation of the VxVertex/RecVertex class.

Persistent representation of the VxVertex/ExtendedVxCandidate class.

Persistent representation of class VxMultiVertex/MVFVxTrackAtVertex.

Persistent representation of class VxMultiVertex/MVFVxCandidate.

Persistent representation of the TrkV0Vertex/V0Hypothesis class.

Persistent representation of the TrkV0Vertex/V0Candidate class.

The standard namespace for VxVertexPositions.

< include headers from the base class

multimap to be used for TrackAmbiguity/Seed validation

A namespace to enclose the new Track class, and related tools.

A namespace to enclose the Tracking classes.

This typedef represents a multimap that holds the matching chi2 of two tracks from different track collections together with a boolean that indicatges if the matching was succesful.

Convenience Helper classes SurfacePtrHolder SurfaceUniqHolder also see SurfaceUniquePtrT.h.

standard namespace for Tracking

LayerIndexSampleMap.

Define statics for Geometry in Tracking.

ConstrainedTrackProvider.

Tool used to create a collection of AlignTracks from Tracks while the tracks are being refitted with a vertex/beam-spot constraint.

namespace for general tracking tools and interfaces

forward declarations

DATABASE INCLUDES.

Name : Neutrino.h Package : offline/PhysicsAnalysis/AnalysisCommon/ParticleEvent Author : Ketevi A.

An example algorithm that reads and writes objects from the event store using handles.

A tool to be used for track preselection in conversion vertex finding.

Forward declarations.

The InDetV0FinderTool reads in the TrackParticle container from StoreGate, if useorigin = True only tracks not associated to a primary vertex are used.

There are options to use silicon tracks only (default) or include Si+TRT and TRT+TRT.

Pairs of tracks passing pre-selection (using InDetTrackSelectorTool) are fitted to a common vertex using TrkV0Fitter or TrkVKalVrtFitter (useV0Fitter = False).

InDetV0FinderTool can take as input a vertex (or a collection of vertices) w.r.t which the V0s can be selected to minimise combinatorics.

  • if such a vertex is provided, tracks are used if fabs(d0/sig_d0) > d0_cut (= 2.)
  • if useVertexCollection = True all vertices in the collection are used
  • if useVertexCollection = False
    • if trkSelPV = True either a primary vertex, if provided, or the beam spot are used
    • if trkSelPV = False (default) all track combinations are used.

The unconstrained vertex fit is attempted if the radius of the starting point is < maxsxy (= 1000 mm) and at least one invariant mass at the starting point is in the allowed range: uksmin < m(pipi) < uksmax or ulamin < m(ppi) < ulamax or ulamin < m(pip) < ulamax

V0s are kept if the cumulative chi2 probability of the unconstrained fit is > minVertProb (= 0.0001)

If doSimpleV0 = True all vertices that pass these cuts are stored in V0UnconstrVertices.

If doSimpleV0 = False (default) mass constrained fits are attempted if

  • the invariant mass of the unconstrained V0 is in the allowed range: ksmin < m(pipi) < ksmax, lamin < m(ppi), m(pip) < lamax and the error on the invariant mass is < errmass (= 100 MeV)
  • if an input vertex (collection) is provided the unconstrained V0 is required to have an impact parameter w.r.t the vertex < vert_a0xy_cut (= 3 mm) in xy and < vert_a0z_cut (= 15 mm) in z, the cosine of the angle between the V0 momentum and the direction from the input vertex to the V0 vertex is > 0, Lxy w.r.t the vertex is < vert_lxy_cut (= 500 mm) and Lxy/sigma(Lxy) > vert_lxy_sig (= 2)

Mass constrainedV0s are kept if the cumulative chi2 probability of the fit is > minVertProb (= 0.0001)

For successful mass constrained fits a conversion fit is also attempted and if successful, the corresponding unconstrained V0 is decorated with the invariant mass, its error and the vertex probability of the conversion fit.

The links between the unconstrained V0 and the successful mass constrained V0s are stored.

Thomas Koffas Thoma.nosp@m.s.Ko.nosp@m.ffas@.nosp@m.cern.nosp@m..ch June 2008

Assamagan Created : August 2004

DESCRIPTION: neutrino class for t -> bW -> b l nu construction the neutrino after solving the for the neutrino pz using the W mass constraint. There is a quadratic ambiguity leading to up to 2 solutions This class inherits from IParticle, I4Momentum and NavigableTerminalNode.

GEOMODEL INCLUDES CALORIMETER INCLUDES

The AlignTracks are filled into a collection of Tracks. The default control flow is like this: firstly do vertex constraint, if can't, then do beamspot again; if can't again, then do normal refit. if want to do vertex constraint only, set: doVertexConstraint = True and doBeamspotConstraint = False if want to do beamspot constraint only, set: doVertexConstraint = False and doBeamspotConstraint = True

Author
Jike Wang jwang.nosp@m.@cer.nosp@m.n.ch
Daniel Kollar danie.nosp@m.l.ko.nosp@m.llar@.nosp@m.cern.nosp@m..ch -> updated 2015 Matthias Danninger

Will provide a track coolection with momentum conatraint applied. A 2d histogram read and corrections (delta) are extracted as function of eta and phi. The momentum is scaled as corrected QoverP = original QoverP * (1.+ charge *pt *delta );

The strength of eth constraint can be varied as well.

instead of the CaloCell_ID (enum) a simple int is taken, so, implicit conversion is needed.

pos/neg endcap are distinguished by +/-

In the case of surfaces we do not want to take onwership when they are owned by the Tracking Geometry or a detector element.

In the other hand we want to take ownership if they are free.

As a result when we have classes with a m_associatedSurface member we need to repeat some boiler plate code.

These helpers try to make writing such code a bit easier and more uniform.

Under TrkDetDescr/TrkSurfaces :

The test : SurfaceHolder_test has a mock code on how we could use these for classes where we want to hold a ptr to a const Surface and manage it, based on if its free or owned.

The header : SurfaceHolder.h provides typedefs for most commom cases used by client code so as to hide some details of the implementation

Kirill Prokofiev Kiril.nosp@m.l.Pr.nosp@m.okofi.nosp@m.ev@c.nosp@m.ern.c.nosp@m.h

March 2007

Kirill Prokofiev Kiril.nosp@m.l.Pr.nosp@m.okofi.nosp@m.ev@c.nosp@m.ern.c.nosp@m.h

January 2006 Modified for the TP split version 2

Kirill Prokofiev Kiril.nosp@m.l.Pr.nosp@m.okofi.nosp@m.ev@c.nosp@m.ern.c.nosp@m.h

July 2006 January 2007 corrected for the new TP split schema

Kirill Prokofiev Kiril.nosp@m.l.Pr.nosp@m.okofi.nosp@m.ev@c.nosp@m.ern.c.nosp@m.h

July 2006

Kirill Prokofiev Kiril.nosp@m.l.Pr.nosp@m.okofi.nosp@m.ev@c.nosp@m.ern.c.nosp@m.h

July 2006 January 2006 Modified for the TP split version 2

During an extrapolation chain that we want to keep the parameters alive. We use a vector of unique_ptr. We can access the stored values as ptr during the extrapolation chains. By the end of the extrapolation chain they will go out of scope and get deleted. If we want to retain a ptr we need to take it before this happens

Author
Christos Anastopoulos

See GlobalChi2Fitter.h for more information.

Author
Andrei Gaponenko agapo.nosp@m.nenk.nosp@m.o@lbl.nosp@m..gov
Authors
: E. Bouhova-Thacker e.bou.nosp@m.hova.nosp@m.@cern.nosp@m..ch, R. Henderson Rob.H.nosp@m.ende.nosp@m.rson@.nosp@m.cern.nosp@m..ch
Date
: 14 December 2006

Abstract interface for tools estimating whether a given track originated from the primary vertex.

ruwie.nosp@m.del@.nosp@m.physi.nosp@m.k.un.nosp@m.i-bon.nosp@m.n.de Kiril.nosp@m.l.Pr.nosp@m.okofi.nosp@m.ev@c.nosp@m.ern.c.nosp@m.h

June 2009


Changes:

David Shope david.nosp@m..ric.nosp@m.hard..nosp@m.shop.nosp@m.e@cer.nosp@m.n.ch (2016-04-19)

EDM Migration to xAOD - Replace Trk::VxContainer with xAOD::VertexContainer

K.Prokofiev, C.Ruwiedel, June 2009.

Changes: G. Piacquadio, July 2009, add lifetime signs for b-tagging

David Shope david.nosp@m..ric.nosp@m.hard..nosp@m.shop.nosp@m.e@cer.nosp@m.n.ch (2016-04-19) EDM Migration to xAOD - Remove methods involving Trk::VxCandidate and Trk::RecVertex

Typedef Documentation

◆ addrMagHandler

typedef void(* Trk::addrMagHandler) (double, double, double, double &, double &, double &)

Definition at line 23 of file VKalVrtBMag.h.

◆ addrPropagator

typedef void(* Trk::addrPropagator) (long int, long int, double *, double *, double *, double *, double *, double *)

Definition at line 23 of file Propagator.h.

◆ AlignModuleDerivatives

typedef std::pair<AlignModule*, std::vector<Amg::VectorX> > Trk::AlignModuleDerivatives

Definition at line 39 of file AlignTrack.h.

◆ AlignModuleList

typedef std::vector<AlignModule*> Trk::AlignModuleList

Definition at line 37 of file AlignModuleList.h.

◆ AlignModuleVertexDerivatives

typedef std::pair<const AlignModule*, std::vector<Amg::VectorX> > Trk::AlignModuleVertexDerivatives

Definition at line 37 of file AlignVertex.h.

◆ AlignParList

typedef boost::multi_array<AlignPar*,2> Trk::AlignParList

Definition at line 12 of file AlignParList.h.

◆ AlignParListDims

typedef boost::array<boost::multi_array_types::index, 2> Trk::AlignParListDims

Definition at line 13 of file AlignParList.h.

◆ AlignTrackCollection

typedef std::vector<AlignTrack**> Trk::AlignTrackCollection

Definition at line 35 of file AlignVertex.h.

◆ AlignTrackIt

Definition at line 36 of file AlignVertex.h.

◆ AlignTSOSCollection

Definition at line 37 of file AlignTrack.h.

◆ AlignTSOSIt

◆ AmgMatrix3X

typedef Eigen::Matrix<double, 3, Eigen::Dynamic> Trk::AmgMatrix3X

Definition at line 49 of file KalmanVertexOnJetAxisUpdator.h.

◆ ArraySpan

template<class T>
using Trk::ArraySpan = std::span<T>

Definition at line 59 of file TrackingVolume.h.

◆ AtaCone

◆ AtaCylinder

◆ AtaDisc

◆ AtaPlane

◆ AtaStraightLine

◆ BaseParameters

◆ BoundaryIntersection

template<class T>
using Trk::BoundaryIntersection
Initial value:
Class extension to return the object, a represenation & the result.
Abstract Base Class for tracking surfaces.

Definition at line 84 of file TrackingVolume.h.

◆ CacheOwnedPtr

template<typename T>
using Trk::CacheOwnedPtr = T*

Definition at line 28 of file ExtrUniquePtrHolder.h.

◆ ConeSurfacePtrHolder

◆ ConeSurfaceUniqHolder

◆ const_mapiterator

typedef datamap::const_iterator Trk::const_mapiterator

Definition at line 30 of file AlSymMatBase.h.

◆ ConstSurfaceUniquePtr

◆ CurvilinearParameters

◆ CylinderSurfacePtrHolder

◆ CylinderSurfaceUniqHolder

◆ datamap

typedef std::map<indices, double> Trk::datamap

Definition at line 28 of file AlSymMatBase.h.

◆ DefinedParameter

typedef std::pair<double, ParamDefs> Trk::DefinedParameter

Typedef to of a std::pair<double, ParamDefs> to identify a passed-through double as a specific type of parameter.

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch

Definition at line 27 of file DefinedParameter.h.

◆ DestSurf

typedef std::pair< const Surface *, BoundaryCheck > Trk::DestSurf = std::pair<const Surface*, BoundaryCheck>

typedef for input surfaces, boundary check

Definition at line 45 of file IPropagator.h.

◆ DigitizationCell

typedef std::pair<size_t,size_t> Trk::DigitizationCell

Definition at line 18 of file DigitizationCell.h.

◆ DiscSurfacePtrHolder

◆ DiscSurfaceUniqHolder

◆ DoubleAndWeight

typedef std::pair<double,double> Trk::DoubleAndWeight

Definition at line 18 of file SeedFinderParamDefs.h.

◆ dvect

typedef std::vector<double> Trk::dvect

Definition at line 36 of file TrkVKalVrtFitter.h.

◆ EightObjectsAccessor

Definition at line 18 of file ObjectsAccessor.h.

◆ ExCellCharged

◆ ExCellNeutral

◆ FitQualityOnSurface_p1

◆ FiveObjectsAccessor

Definition at line 16 of file ObjectsAccessor.h.

◆ FourObjectsAccessor

Initial value:
std::pair<std::array<ObjectAccessor::value_type, 4>, bool>

Definition at line 14 of file ObjectsAccessor.h.

◆ GlueVolumeConstIterator

◆ GlueVolumeIterator

Definition at line 27 of file GlueVolumesDescriptor.h.

◆ IdentifiedMaterial

typedef std::pair<std::shared_ptr<Material>, int> Trk::IdentifiedMaterial

Definition at line 23 of file BinnedMaterial.h.

◆ IdNavigationCell

typedef std::pair<int, const NavigationCell*> Trk::IdNavigationCell

Definition at line 54 of file INavigator.h.

◆ indices

typedef std::pair<long int, long int> Trk::indices

Definition at line 27 of file AlSymMatBase.h.

◆ LayerArray

simply for the eye

Definition at line 55 of file TrackingVolume.h.

◆ LayerIndexSampleMap

typedef std::map<Trk::LayerIndex, int> Trk::LayerIndexSampleMap

Definition at line 29 of file LayerIndexSampleMap.h.

◆ LayerIntersection

template<class T>
using Trk::LayerIntersection = FullIntersection<Layer, Surface, T>

Definition at line 82 of file TrackingVolume.h.

◆ LayerMaterialCollection

◆ mapiterator

typedef datamap::iterator Trk::mapiterator

Definition at line 29 of file AlSymMatBase.h.

◆ MaterialComponent

using Trk::MaterialComponent = std::pair<Material, double>

Definition at line 31 of file VolumeConverter.h.

◆ MaterialPropertiesMatrix

Definition at line 25 of file ILayerMaterialAnalyser.h.

◆ MaterialPropertiesVector

Useful typedefs.

Definition at line 133 of file MaterialProperties.h.

◆ MaterialStepCollection

◆ MeasuredPerigee

Definition at line 23 of file MeasuredPerigeeCnv_p1.h.

◆ MeasurementSet

using Trk::MeasurementSet = std::vector<const MeasurementBase*>

vector of fittable measurements

Definition at line 30 of file FitterTypes.h.

◆ MultiComponentState

Definition at line 27 of file ComponentParameters.h.

◆ NavigationPair

typedef std::pair<const NavigationCell*,const NavigationCell*> Trk::NavigationPair

Definition at line 36 of file Navigator.h.

◆ NeutralAtaCone

◆ NeutralAtaCylinder

◆ NeutralAtaDisc

◆ NeutralAtaPlane

◆ NeutralAtaStraightLine

◆ NeutralCurvilinearParameters

◆ NeutralParameters

◆ NeutralPerigee

◆ noinit_vector

template<class T>
using Trk::noinit_vector = std::vector<T, boost::noinit_adaptor<std::allocator<T> > >

A variant on std::vector which leaves its contents uninitialized by default.

Definition at line 50 of file TrkVKalUtils.h.

◆ Perigee

◆ PerigeeSurface_p1

Definition at line 22 of file PerigeeSurfaceCnv_p1.h.

◆ PerigeeSurfacePtrHolder

◆ PerigeeSurfaceUniqHolder

◆ PlaneSurfacePtrHolder

◆ PlaneSurfaceUniqHolder

◆ PositionAndWeight

typedef std::pair< Amg::Vector3D , double > Trk::PositionAndWeight

Definition at line 17 of file SeedFinderParamDefs.h.

◆ PositionAtBoundary

Definition at line 28 of file MaterialValidation.h.

◆ PrepRawDataSet

using Trk::PrepRawDataSet = std::vector<const PrepRawData*>

vector of clusters and drift circles

Definition at line 26 of file FitterTypes.h.

◆ RIO_OnTrackSet

using Trk::RIO_OnTrackSet = std::vector<const RIO_OnTrack*>

vector of detector hits on a track

Definition at line 34 of file FitterTypes.h.

◆ RIOtoROT_Multimap

Definition at line 19 of file RIO_OnTrackMap.h.

◆ RunOutlierRemoval

typedef bool Trk::RunOutlierRemoval

switch to toggle quality processing after fit

Definition at line 22 of file FitterTypes.h.

◆ SegmentCollection

Definition at line 13 of file SegmentCollection.h.

◆ SixObjectsAccessor

Definition at line 17 of file ObjectsAccessor.h.

◆ SpacePointSet

using Trk::SpacePointSet = std::vector<const SpacePoint*>

vector of space points

Definition at line 38 of file FitterTypes.h.

◆ StraightLineSurfacePtrHolder

◆ StraightLineSurfaceUniqHolder

◆ SurfaceArray

Definition at line 40 of file Layer.h.

◆ SurfaceIntersection

Definition at line 39 of file Layer.h.

◆ SurfaceOrderPosition

typedef std::pair< std::shared_ptr< Surface >, Amg::Vector3D > Trk::SurfaceOrderPosition

Definition at line 37 of file HGTD_LayerBuilderCond.h.

◆ SurfacePtrHolder

◆ SurfacePtrHolderDetEl

◆ SurfaceUniqHolder

◆ SurfaceUniquePtr

◆ SurfaceUniquePtrT

template<class S>
using Trk::SurfaceUniquePtrT = std::unique_ptr<S, SurfaceDeleter<S> >

Definition at line 32 of file SurfaceUniquePtrT.h.

◆ ThreeObjectsAccessor

Definition at line 13 of file ObjectsAccessor.h.

◆ TrackingVolumeArray

◆ TrackingVolumeOrderPosition

Initial value:
std::pair<std::shared_ptr<TrackingVolume>,
Eigen::Matrix< double, 3, 1 > Vector3D

Definition at line 34 of file MuonTrackingGeometryBuilderImpl.h.

◆ TrackMatchMultiMap

typedef std::multimap<const Trk::Track*, std::pair<const Trk::Track*, Trk::TrackMatchingProperties> > Trk::TrackMatchMultiMap

Definition at line 25 of file TrackMatchingMultiMap.h.

◆ TrackParameters

◆ TrackParametersUVector

using Trk::TrackParametersUVector = std::vector<std::unique_ptr<Trk::TrackParameters>>

Definition at line 62 of file Extrapolator.h.

◆ TrackParametersVector

typedef std::vector<const Trk::TrackParameters*> Trk::TrackParametersVector

Definition at line 55 of file TimedExtrapolator.h.

◆ TrackParametersWithPath

typedef std::pair<const TrackParameters*, double> Trk::TrackParametersWithPath

typedef for return type TrackParameters, pathlength

Definition at line 42 of file IPropagator.h.

◆ TrackParticleBaseCollection

◆ TrackParticleOrigin

Definition at line 34 of file TrackParticleBase.h.

◆ TrackRoadCollection

◆ TrackScore

typedef float Trk::TrackScore

Definition at line 10 of file TrackScore.h.

◆ TrackSeedMap

typedef std::multimap<const Trk::Track* , int> Trk::TrackSeedMap

Definition at line 14 of file TrackSeedMap.h.

◆ TracksScores

typedef std::vector<std::pair<const Track*, float> > Trk::TracksScores

Definition at line 20 of file ITrackAmbiguityProcessorTool.h.

◆ TrackStates

◆ TrackTruthCollection_p0

◆ TrkParametersComparisonFunction

◆ TwoPointOnTrack

Definition at line 19 of file SeedFinderParamDefs.h.

◆ TwoPoints

Definition at line 20 of file SeedFinderParamDefs.h.

◆ ValueMatrix

typedef std::vector<ValueVector> Trk::ValueMatrix

Definition at line 30 of file CompoundLayerMaterial.h.

◆ ValueVector

typedef std::vector<unsigned char> Trk::ValueVector

Definition at line 29 of file CompoundLayerMaterial.h.

◆ VertexID

typedef int Trk::VertexID

Definition at line 25 of file IVertexCascadeFitter.h.

◆ VolumePartVec

using Trk::VolumePartVec = std::vector<VolumePart>

Definition at line 50 of file VolumeConverter.h.

◆ VxSecVertexInfoContainer

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
NTrMaxVFit 

Definition at line 35 of file TrkVKalVrtFitter.h.

35{ NTrMaxVFit=200 };

◆ AlignMesType

Enumerator
Measurement 
Scatterer 
EnergyDeposit 

Definition at line 32 of file AlignResidualType.h.

32 {
36 };

◆ AlignModuleListType

Type of AlignModuleList (see description above).

Enumerator
L0 
L1 
L2 
L3 
L1_5 
L2_5 
ModulesOnTrack 

Definition at line 32 of file AlignModuleList.h.

32 { L0=0,L1,L2,L3,
33 L1_5,L2_5,
35 };
@ ModulesOnTrack

◆ AlignResidualType

Enumerator
HitOnly 
Unbiased 

Definition at line 26 of file AlignResidualType.h.

26 {
27 HitOnly,
29// DCA
30 };

◆ BevelledCylinderAccessorType

Enumerator
BevelledCylinderZincrease 

Cylinder hit, then pos.

Z face

BevelledCylinderZdecrease 

Cylinder hit, the neg.

Z face

BevelledCylinderPositiveFace 

Pos.

Z face, Cylinder, neg. Z face

BevelledCylinderNegativeFace 

Neg.

Z face, Cylinder, pos. Z face

Definition at line 18 of file BevelledCylinderVolumeBoundaryAccessors.h.

◆ BevelledTubeAccessorType

Enumerator
BevelledTubeRincreaseZincrease 

Accessor type [ 2,1,0,3 ].

BevelledTubeRincreaseZdecrease 

Accessor type [ 2,0,1,3 ].

BevelledTubeZincreaseRincrease 

Accessor type [ 1,2,0,3 ].

BevelledTubeZdecreaseRincrease 

Accessor type [ 0,2,1,3 ].

BevelledTubeRdecreaseZincrease 

Accessor type [ 3,1,0,2 ].

BevelledTubeRdecreaseZdecrease 

Accessor type [ 3,0,1,2 ].

BevelledTubeZincreaseRdecrease 

Accessor type [ 1,3,0,2 ].

BevelledTubeZdecreaseRdecrease 

Accessor type [ 0,3,1,2 ].

BevelledTubeOutsideRminRdecrease 

Accessor type [ 3,1,0,2] - inverse case.

BevelledTubeOutsideRmaxRincrease 

Accessor type [ 2,1,0,3 ] - inverse case.

BevelledTubeOutsideZminZdecrease 

Accessor type [ 0,3,2,1 ] - inverse case.

BevelledTubeOutsideZmaxZincrease 

Accessor type [ 1,3,2,0 ] - inverse case.

Definition at line 27 of file BevelledCylinderVolumeBoundaryAccessors.h.

27 {
28
41
42 };
@ BevelledTubeOutsideRminRdecrease
Accessor type [ 3,1,0,2] - inverse case.
@ BevelledTubeOutsideZmaxZincrease
Accessor type [ 1,3,2,0 ] - inverse case.
@ BevelledTubeRincreaseZincrease
Accessor type [ 2,1,0,3 ].
@ BevelledTubeZincreaseRdecrease
Accessor type [ 1,3,0,2 ].
@ BevelledTubeRdecreaseZincrease
Accessor type [ 3,1,0,2 ].
@ BevelledTubeZdecreaseRdecrease
Accessor type [ 0,3,1,2 ].
@ BevelledTubeRdecreaseZdecrease
Accessor type [ 3,0,1,2 ].
@ BevelledTubeRincreaseZdecrease
Accessor type [ 2,0,1,3 ].
@ BevelledTubeZincreaseRincrease
Accessor type [ 1,2,0,3 ].
@ BevelledTubeOutsideZminZdecrease
Accessor type [ 0,3,2,1 ] - inverse case.
@ BevelledTubeZdecreaseRincrease
Accessor type [ 0,2,1,3 ].
@ BevelledTubeOutsideRmaxRincrease
Accessor type [ 2,1,0,3 ] - inverse case.

◆ BinningOption

enum BinValue

Enumerator
open 
closed 

Definition at line 38 of file BinningType.h.

39{
40 open,
41 closed
42};
@ open
Definition BinningType.h:40
@ closed
Definition BinningType.h:41

◆ BinningType

, BinningOption & BinningAccess

Enumerator
equidistant 
biequidistant 
arbitrary 

Definition at line 30 of file BinningType.h.

31{
35};
@ biequidistant
Definition BinningType.h:33
@ equidistant
Definition BinningType.h:32
@ arbitrary
Definition BinningType.h:34

◆ BinningValue

how to take the global / local position

Enumerator
binX 
binY 
binZ 
binR 
binPhi 
binRPhi 
binH 
binEta 

Definition at line 45 of file BinningType.h.

46{
47 binX,
48 binY,
49 binZ,
50 binR,
51 binPhi,
52 binRPhi,
53 binH,
54 binEta
55};
@ binEta
Definition BinningType.h:54
@ binR
Definition BinningType.h:50
@ binPhi
Definition BinningType.h:51
@ binRPhi
Definition BinningType.h:52
@ binX
Definition BinningType.h:47
@ binZ
Definition BinningType.h:49
@ binH
Definition BinningType.h:53
@ binY
Definition BinningType.h:48

◆ BoundaryCheckResult

enum class Trk::BoundaryCheckResult
strong
Enumerator
Candidate 
OnEdge 

within the sensitive area of an active element

Insensitive 

close to the edge of an active element

Outside 

with the insensitive area of an active element

DeadElement 

outside the element

Error 

within the nominally active area of a dead element

error-state

Definition at line 14 of file IBoundaryCheckTool.h.

14 {
15 Candidate,
16 OnEdge,
18 Outside,
20 Error
21 };
Error
The different types of error that can be flagged in the L1TopoRDO.
Definition Error.h:16
@ OnEdge
within the sensitive area of an active element
@ DeadElement
outside the element
@ Insensitive
close to the edge of an active element
@ Outside
with the insensitive area of an active element

◆ BoundarySurfaceFace

Enum to describe the position of the BoundarySurface respectively to the frame orientatin of the volume, this is mainly ment for code readability.

The different numeration sequences can be found in the documentation of the actual VolumeBounds implementations.

The order of faces is chosen to follow - as much as possible - a cycular structure.

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch
Enumerator
negativeFaceXY 
positiveFaceXY 
negativeFaceYZ 
positiveFaceYZ 
negativeFaceZX 
positiveFaceZX 
cylinderCover 
tubeInnerCover 
tubeOuterCover 
tubeSectorNegativePhi 
tubeSectorPositivePhi 
tubeSectorInnerCover 
tubeSectorOuterCover 
trapezoidFaceAlpha 
trapezoidFaceBeta 
index0 
index1 
index2 
index3 
index4 
index5 
index6 
index7 
index8 
index9 
index10 
index11 
undefinedFace 

Definition at line 31 of file BoundarySurfaceFace.h.

31 {
38 cylinderCover = 2,
47 index0 = 0,
48 index1 = 1,
49 index2 = 2,
50 index3 = 3,
51 index4 = 4,
52 index5 = 5,
53 index6 = 6,
54 index7 = 7,
55 index8 = 8,
56 index9 = 9,
57 index10 = 10,
58 index11 = 11,
59 undefinedFace = 99
60
61};
@ tubeSectorPositivePhi
@ tubeSectorInnerCover
@ tubeSectorOuterCover
@ tubeSectorNegativePhi

◆ CylinderAccessorType

Enumerator
CylinderZincrease 

Cylinder hit, then pos.

Z face

CylinderZdecrease 

Cylinder hit, the neg.

Z face

CylinderPositiveFace 

Pos.

Z face, Cylinder, neg. Z face

CylinderNegativeFace 

Neg.

Z face, Cylinder, pos. Z face

Definition at line 17 of file CylinderVolumeBoundaryAccessors.h.

17 {
22
23};
@ CylinderZincrease
Cylinder hit, then pos.
@ CylinderZdecrease
Cylinder hit, the neg.

◆ DetectorElemType

enum class Trk::DetectorElemType
strong
Enumerator
SolidState 
Silicon 
TRT 
Csc 
Mdt 
Rpc 
Tgc 
sTgc 
MM 

Definition at line 38 of file TrkDetElementBase.h.

39{
40 SolidState = 0,
41 Silicon = 1,
42 TRT = 2,
43 Csc = 3,
44 Mdt = 4,
45 Rpc = 5,
46 Tgc = 6,
47 sTgc = 7,
48 MM = 8
49};
@ MM
Definition RegSelEnums.h:38
@ TRT
Definition RegSelEnums.h:26
@ Tgc
Resitive Plate Chambers.
@ sTgc
Micromegas (NSW)
@ Rpc
Monitored Drift Tubes.
@ Csc
Thin gap champers.
@ Mdt
MuonSpectrometer.

◆ DetectorRegion

Enumerator
pixelBarrelFlat 
pixelBarrelInclined 
pixelEndcap 
stripBarrel 
stripEndcap 

Definition at line 13 of file DetailedHitInfo.h.

13 {
16 pixelEndcap = 2,
17 stripBarrel = 3,
18 stripEndcap = 4
19 };
@ pixelBarrelInclined
@ stripEndcap
@ stripBarrel
@ pixelEndcap
@ pixelBarrelFlat

◆ DetectorType

enumerates the various detector types currently accessible from the isHit() method.

Todo
work out how to add muons to this
Enumerator
pixelBarrel0 

there are three or four pixel barrel layers (R1/R2)

pixelBarrel1 
pixelBarrel2 
pixelBarrel3 
pixelEndCap0 

three pixel discs (on each side)

pixelEndCap1 
pixelEndCap2 
sctBarrel0 

four sct barrel layers

sctBarrel1 
sctBarrel2 
sctBarrel3 
sctEndCap0 

and 9 sct discs (on each side)

sctEndCap1 
sctEndCap2 
sctEndCap3 
sctEndCap4 
sctEndCap5 
sctEndCap6 
sctEndCap7 
sctEndCap8 
trtBarrel 
trtEndCap 
DBM0 
DBM1 
DBM2 
numberOfDetectorTypes 

Definition at line 230 of file Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h.

231{
232 pixelBarrel0 = 0,
233 pixelBarrel1 = 1,
234 pixelBarrel2 = 2,
235 pixelBarrel3 = 3,
236
237 pixelEndCap0 = 4,
238 pixelEndCap1 = 5,
239 pixelEndCap2 = 6,
240
241 sctBarrel0 = 7,
242 sctBarrel1 = 8,
243 sctBarrel2 = 9,
244 sctBarrel3 = 10,
245
246 sctEndCap0 = 11,
247 sctEndCap1 = 12,
248 sctEndCap2 = 13,
249 sctEndCap3 = 14,
250 sctEndCap4 = 15,
251 sctEndCap5 = 16,
252 sctEndCap6 = 17,
253 sctEndCap7 = 18,
254 sctEndCap8 = 19,
255
256 trtBarrel = 20,
257 trtEndCap = 21,
258
259 DBM0 = 22,
260 DBM1 = 23,
261 DBM2 = 24,
262
264
265}; // not complete yet
@ pixelBarrel0
there are three or four pixel barrel layers (R1/R2)
@ pixelEndCap0
three pixel discs (on each side)

◆ DriftCircleSide

Enumerates the 'side' of the wire on which the tracks passed (i.e.

resolves the amibiguity) (based on the TRT_Side enum, from InDet::TRT_DriftCircleOnTrack, which this should eventually replace)

Author
edwar.nosp@m.d.mo.nosp@m.yse@c.nosp@m.ern..nosp@m.ch
Enumerator
NONE 

it was not possible to determine the which side of the straw the track passed;

LEFT 

the drift radius is negative (see Trk::AtaStraightLine)

RIGHT 

the drift radius is positive (see Trk::AtaStraightLine)

Definition at line 15 of file DriftCircleSide.h.

16 {
18 NONE,
20 LEFT,
22 RIGHT
23 };
@ RIGHT
the drift radius is positive (see Trk::AtaStraightLine)
@ LEFT
the drift radius is negative (see Trk::AtaStraightLine)
@ NONE
it was not possible to determine the which side of the straw the track passed;

◆ DriftCircleStatus

Enumerates the 'status' of the wire on which the tracks passed (based on the TRT_Side enum, from InDet::TRT_DriftCircleOnTrack, which this should eventually replace)

Author
edwar.nosp@m.d.mo.nosp@m.yse@c.nosp@m.ern..nosp@m.ch
Enumerator
DECIDED 

sign of drift radius has been determined

UNDECIDED 

sign of drift radius has not been determined

CORRUPT 

the measurement is corrupt, but for some reason has been left on a track.

NODRIFTTIME 

drift time was not used - drift radius is 0.

Definition at line 15 of file DriftCircleStatus.h.

16 {
18 DECIDED,
20 UNDECIDED,
22 CORRUPT,
25 };
@ NODRIFTTIME
drift time was not used - drift radius is 0.
@ DECIDED
sign of drift radius has been determined
@ CORRUPT
the measurement is corrupt, but for some reason has been left on a track.
@ UNDECIDED
sign of drift radius has not been determined

◆ eProbabilityType

Enumerator
eProbabilityComb 

Electron probability from combining the below probabilities.

eProbabilityHT 

Electron probability from High Threshold (HT) information.

eProbabilityToT 

Electron probability from Time-Over-Threshold (ToT) information.

eProbabilityBrem 

Electron probability from Brem fitting (DNA).

eProbabilityNN 

Electron probability from NN.

TRTTrackOccupancy 

TRT track occupancy.

TRTdEdx 

dEdx from TRT ToT measurement.

eProbabilityNumberOfTRTHitsUsedFordEdx 

Number of TRT hits used for dEdx measurement.

numberOfeProbabilityTypes 

Definition at line 208 of file Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h.

209{
211 0,
213 1,
215 2,
216 eProbabilityBrem = 3,
217 eProbabilityNN = 4,
219 TRTdEdx = 6,
221 7,
223};
@ eProbabilityBrem
Electron probability from Brem fitting (DNA).
@ eProbabilityComb
Electron probability from combining the below probabilities.
@ eProbabilityNumberOfTRTHitsUsedFordEdx
Number of TRT hits used for dEdx measurement.
@ eProbabilityToT
Electron probability from Time-Over-Threshold (ToT) information.
@ eProbabilityHT
Electron probability from High Threshold (HT) information.

◆ ExtraLocalPosParam

Enumerator
distDepth 

Definition at line 19 of file SiLocalPosition.h.

19{distDepth = 2}; // These will be defined in Trk soon.

◆ ExtrapolationType

Enumerator
FittedTrajectory 
DeltaD0 
DeltaZ0 
DeltaPhi0 
DeltaTheta0 
DeltaQOverP0 
DeltaQOverP1 
ExtrapolationTypes 

Definition at line 18 of file ExtrapolationType.h.

◆ GeometrySignature

Enumerator
Global 
ID 
BeamPipe 
Calo 
MS 
Cavern 
HGTD 
NumberOfSignatures 
Unsigned 

Definition at line 23 of file GeometrySignature.h.

24{
25 Global = 0,
26 ID = 1,
27 BeamPipe = 2,
28 Calo = 3,
29 MS = 4,
30 Cavern = 5,
31 HGTD = 6,
33 Unsigned = 99
34};
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
@ NumberOfSignatures

◆ GeometryType

Enumerator
Static 
Dense 
DenseWithLayers 
Detached 
Master 
NumberOfGeometryTypes 

Definition at line 36 of file GeometrySignature.h.

37{
38 Static = 0,
39 Dense = 1,
41 Detached = 2,
42 Master = 3,
44};
@ DenseWithLayers
@ NumberOfGeometryTypes

◆ JetVtxParamDefs

Author
Nicol.nosp@m.a.Gi.nosp@m.acint.nosp@m.o.Pi.nosp@m.acqua.nosp@m.dio@.nosp@m.cern..nosp@m.ch
Chris.nosp@m.tian.nosp@m..Weis.nosp@m.er@c.nosp@m.ern.c.nosp@m.h
Enumerator
jet_xv 
jet_yv 
jet_zv 

position x,y,z of primary vertex

jet_phi 
jet_theta 
jet_dist 

Definition at line 25 of file JetVtxParamDefs.h.

25 {
26 // Enums for vertex position on the jet axis starting from the primary vertex
27 jet_xv=0, jet_yv=1, jet_zv=2,
28 jet_phi=3,jet_theta=4, //direction of the jet axis (flight direction of B hadron),
29 jet_dist=5 //distance of vertex on jet axis from primary vertex
30 };
@ jet_zv
position x,y,z of primary vertex

◆ LayerOrder

This enum is used to declare Layers as previous/next in respect of a 1-dimensional binned array.

Enumerator
previous 
next 

Definition at line 30 of file BinningData.h.

31{
32 previous = -1,
33 next = 1
34};
@ next
Definition BinningData.h:33
@ previous
Definition BinningData.h:32

◆ LayerType

For readability.

Enumerator
passive 
active 

Definition at line 47 of file Layer.h.

47{ passive = 0, active = 1 };
@ passive
Definition Layer.h:47
@ active
Definition Layer.h:47

◆ MagneticFieldMode

MagneticFieldMode describing the field setup within a volume.

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch
Enumerator
NoField 

Field is set to 0., 0., 0.,.

ConstantField 

Field is set to be constant.

FastField 

call the fast field access method of the FieldSvc

FullField 

Field is set to be realistic, but within a given Volume.

Definition at line 17 of file MagneticFieldMode.h.

17 {
18 NoField = 0,
19 ConstantField = 1,
20 FastField = 2,
21 FullField = 3
22};
@ FastField
call the fast field access method of the FieldSvc
@ ConstantField
Field is set to be constant.
@ NoField
Field is set to 0., 0., 0.,.
@ FullField
Field is set to be realistic, but within a given Volume.

◆ MaterialAssociationType

Enumerator
EffectiveNumSteps 
EffectiveNumAtoms 
RadiationLength 
StepLength 

Definition at line 12 of file MaterialAssociationType.h.

13{
14 EffectiveNumSteps = 0, // cout the number of steps per layer
15 EffectiveNumAtoms = 1, // compute the effective number of atoms
16 RadiationLength = 2, // weight by radiation length
17 StepLength = 4
18};

◆ MaterialConcentration

Simple enum to identify when a material update on a non-structured layer should be done, options are alongPre and oppositePre.

Enumerator
alongPre 
split 
oppositePre 

Definition at line 38 of file LayerMaterialProperties.h.

◆ MaterialUpdateMode

This is a steering enum to force the material update it can be: (1) addNoise (-1) removeNoise Second is mainly for vertex reconstruction, but potentially dangeraous.

Enumerator
addNoise 
removeNoise 

Definition at line 17 of file MaterialUpdateMode.h.

18{
19 addNoise = 1,
20 removeNoise = -1
21};

◆ MaterialUpdateStage

This is a steering enum to tell which material update stage:

  • preUpdate : when reaching a layer before layer is resolved
  • fullUpdate : just pass through the layer
  • postUpdate : when leaving the layer
Enumerator
preUpdate 
fullUpdate 
postUpdate 

Definition at line 39 of file PropDirection.h.

40 {
41
42 preUpdate = -1,
43 fullUpdate = 0,
44 postUpdate = 1
45 };
@ fullUpdate
@ postUpdate
@ preUpdate

◆ MeasurementType

Enumerator
perigeeParameters 
transverseVertex 
vertex 
pixelCluster 
stripCluster 
trapezoidCluster 
driftCircle 
pseudoMeasurement 
barrelScatterer 
endcapScatterer 
calorimeterScatterer 
barrelInert 
endcapInert 
energyDeposit 
alignment 
discontinuity 
bremPoint 
hole 
materialDelimiter 

Definition at line 18 of file MeasurementType.h.

18 {
21 vertex,
36 hole,
38};
@ endcapScatterer
@ pseudoMeasurement
@ materialDelimiter
@ stripCluster
@ transverseVertex
@ energyDeposit
@ discontinuity
@ endcapInert
@ calorimeterScatterer
@ barrelScatterer
@ pixelCluster
@ trapezoidCluster
@ barrelInert
@ driftCircle
@ perigeeParameters

◆ NavigationLevel

destinguishes an association TrackingGeometry with one for global search

Enumerator
noNavigation 
globalSearch 
association 

Definition at line 41 of file TrackingGeometry.h.

42{
43 noNavigation = 0,
44 globalSearch = 1,
45 association = 2
46};

◆ ParamDefs

This file defines the parameter enums in the Trk namespace.

Usage examples:

  • Access the y-coordinate of the cartesian local frame:
    LocalPosition locpos(2.3, 4.5);
    double x = locpos[Trk::locX];
  • Access the eta-value of a track state on a surface (Tsos):
    double theEta = Tsos[Trk::eta]
  • Access the eta-value of a track state on a surface (Tsos):
    double theEta = Tsos[Trk::eta]
Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch
Enumerator
loc1 
loc2 

generic first and second local coordinate

locX 
locY 

local cartesian

locRPhi 
locPhiR 
locZ 

local cylindrical

locR 
locPhi 

local polar

iPhi 
iEta 

(old readout) will be skipped

distPhi 
distEta 

readout for silicon

driftRadius 

trt, straws

global position (cartesian)

px 
py 
pz 

global momentum (cartesian)

d0 
z0 
phi0 
theta 
qOverP 

perigee

phi 

Enums for curvilinear frames.

trkMass 

Extended perigee: mass.

Definition at line 32 of file ParamDefs.h.

32 {
33 // Enums for LocalParameters - LocalPosition/
34 loc1 = 0,
35 loc2 = 1,
36
37 locX = 0,
38 locY = 1,
39
40 locRPhi = 0,
41 locPhiR = 0,
42 locZ = 1,
43
44 locR = 0,
45 locPhi = 1,
46
47 iPhi = 0,
48 iEta = 1,
49
50 distPhi = 0,
51 distEta = 1,
52
53 driftRadius = 0,
54 // Enums for const Amg::Vector3D & GlobalMomentum /
55 x = 0,
56 y = 1,
57 z = 2,
58
59 px = 0,
60 py = 1,
61 pz = 2,
62 // Enums for PerigParamDefsee //
63 d0 = 0,
64 z0 = 1,
65 phi0 = 2,
66 theta = 3,
67 qOverP = 4,
68 /* Enums for TrackState on Surfaces
69 The first two enums in the TrackParameters refer to the local Frame, i.e.
70 - LocalCartesian for AtanArbitraryPlane
71 - LocalCylindrical for AtaCylinder (includes line)
72 - LocalPolar for AtaDisc
73 The other three enums are standard \f$(\phi, \eta, \frac{q}{p_{T}})\f$
74 */
75 phi = 2,
77 u = 0,
78 v = 1,
79
81 trkMass = 5
82};
@ driftRadius
trt, straws
Definition ParamDefs.h:53
@ iEta
(old readout) will be skipped
Definition ParamDefs.h:48
@ locY
local cartesian
Definition ParamDefs.h:38
@ x
Definition ParamDefs.h:55
@ locX
Definition ParamDefs.h:37
@ z
global position (cartesian)
Definition ParamDefs.h:57
@ pz
global momentum (cartesian)
Definition ParamDefs.h:61
@ iPhi
Definition ParamDefs.h:47
@ locR
Definition ParamDefs.h:44
@ v
Definition ParamDefs.h:78
@ locRPhi
Definition ParamDefs.h:40
@ u
Enums for curvilinear frames.
Definition ParamDefs.h:77
@ distEta
readout for silicon
Definition ParamDefs.h:51
@ phi0
Definition ParamDefs.h:65
@ distPhi
Definition ParamDefs.h:50
@ locPhiR
Definition ParamDefs.h:41
@ theta
Definition ParamDefs.h:66
@ qOverP
perigee
Definition ParamDefs.h:67
@ y
Definition ParamDefs.h:56
@ loc2
generic first and second local coordinate
Definition ParamDefs.h:35
@ phi
Definition ParamDefs.h:75
@ loc1
Definition ParamDefs.h:34
@ locZ
local cylindrical
Definition ParamDefs.h:42
@ d0
Definition ParamDefs.h:63
@ px
Definition ParamDefs.h:59
@ z0
Definition ParamDefs.h:64
@ trkMass
Extended perigee: mass.
Definition ParamDefs.h:81
@ py
Definition ParamDefs.h:60
@ locPhi
local polar
Definition ParamDefs.h:45

◆ ParametersType

Enum to avoid dynamic cast for different parameter types.

Enumerator
AtaSurface 
Curvilinear 
Pattern 

Definition at line 29 of file ParametersCommon.h.

29{ AtaSurface = 0, Curvilinear = 1, Pattern = 2 };

◆ ParameterType

Enumerator
D0 
Z0 
Phi0 
Theta0 
QOverP0 
QOverP1 
ParameterTypes 

Definition at line 18 of file ParameterType.h.

◆ ParticleHypothesis

Enumeration for Particle hypothesis respecting the interaction with material.

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch
Enumerator
nonInteracting 
geantino 
electron 
muon 
pion 
kaon 
proton 
photon 
neutron 
pi0 
k0 
nonInteractingMuon 
noHypothesis 
undefined 

Definition at line 28 of file ParticleHypothesis.h.

28 { nonInteracting = 0,
29 geantino = 0,
30 electron = 1,
31 muon = 2,
32 pion = 3,
33 kaon = 4,
34 proton = 5,
35 photon = 6, // for Fatras usage
36 neutron = 7, // for Fatras usage
37 pi0 = 8, // for Fatras usage
38 k0 = 9, // for Fatras usage
39 nonInteractingMuon = 10, // For material collection
40 noHypothesis = 99,
41 undefined = 99};
@ nonInteractingMuon

◆ PrepRawDataType

enum class Trk::PrepRawDataType
strong
Enumerator
SiCluster 
PixelCluster 
SCT_Cluster 
TRT_DriftCircle 
HGTD_Cluster 
PlanarCluster 
MdtPrepData 
CscStripPrepData 
CscPrepData 
MMPrepData 
RpcPrepData 
TgcPrepData 
sTgcPrepData 

Definition at line 38 of file PrepRawData.h.

◆ PropDirection

PropDirection, enum for direction of the propagation.

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch
Enumerator
alongMomentum 
oppositeMomentum 
anyDirection 
mappingMode 

Definition at line 19 of file PropDirection.h.

19 {
20 alongMomentum = 1,
22 anyDirection = 0,
23 mappingMode = 2
24 };
@ oppositeMomentum
@ alongMomentum
@ anyDirection
@ mappingMode

◆ RangeCheckDef

Enumerator
absoluteCheck 
differentialCheck 

Definition at line 55 of file KalmanUpdatorSMatrix.h.

56{
57 absoluteCheck = 0,
59};

◆ RQESolutionType [1/2]

◆ RQESolutionType [2/2]

Enumerator
none 
one 
two 
none 
one 
two 

Definition at line 19 of file TrkExtrapolation/TrkExUtils/TrkExUtils/RealQuadraticEquation.h.

20{
21 none = 0,
22 one = 1,
23 two = 2
24};

◆ SearchDirection

Enumerator
outside 
inside 
bothway 
undefinedDirection 

Definition at line 29 of file PropDirection.h.

29 { outside=1, inside=-1,
@ undefinedDirection
@ bothway
@ outside

◆ SectoralBevelledCylinderAccessorType

Todo
implement correcly when needed
Enumerator
StandardSectoralBevelledCylinder 

Definition at line 47 of file BevelledCylinderVolumeBoundaryAccessors.h.

◆ SectoralBevelledTubeAccessorType

Enumerator
StandardSectoralBevelledTube 

Definition at line 54 of file BevelledCylinderVolumeBoundaryAccessors.h.

◆ SectoralCylinderAccessorType

Todo
implement correcly when needed
Enumerator
StandardSectoralCylinder 

Definition at line 46 of file CylinderVolumeBoundaryAccessors.h.

◆ SectoralTubeAccessorType

Todo
implement correcly when needed
Todo
implement correcly when needed
Enumerator
StandardSectoralTube 

Definition at line 51 of file CylinderVolumeBoundaryAccessors.h.

◆ SummaryType

enumerates the different types of information stored in Summary.

Use in get(const SummaryType type), for for example, summary.get(numOfPixelHits) When adding a new transient information type, please make sure to increase numberOfTrackSummaryTypes.

Enumerator
numberOfContribPixelLayers 

number of contributing layers of the pixel detector

these are the hits in the first pixel layer, i.e. b-layer

numberOfBLayerHits 

these are the hits in the 0th pixel layer?

numberOfInnermostPixelLayerHits 

these are the hits in the 1st pixel layer

numberOfNextToInnermostPixelLayerHits 

these are the pixel hits, including the b-layer

numberOfPixelHits 

number of pixel layers on track with absence of hits

numberOfPixelHoles 

number of pixels which have a ganged ambiguity.

numberOfGangedPixels 

number of Ganged Pixels flagged as fakes

numberOfGangedFlaggedFakes 

number of dead pixel sensors crossed

numberOfPixelDeadSensors 

number of pixel hits with broad errors (width/sqrt(12))

numberOfPixelSpoiltHits 

number of DBM Hits

numberOfDBMHits 

number of hits in SCT

numberOfSCTHits 

number of SCT holes

numberOfSCTHoles 

number of Holes in both sides of a SCT module

numberOfSCTDoubleHoles 
numberOfSCTDeadSensors 

number of TRT hits

numberOfSCTSpoiltHits 
numberOfTRTHits 

number of TRT outliers

numberOfTRTOutliers 

number of TRT holes

numberOfTRTHoles 

number of TRT hits which pass the high threshold (only xenon counted) total number of TRT hits which pass the high threshold

numberOfTRTHighThresholdHits 

total number of TRT hits which pass the high threshold

numberOfTRTHighThresholdHitsTotal 

number of TRT hits used for dE/dx computation

numberOfTRTHitsUsedFordEdx 

number of TRT high threshold outliers (only xenon counted)

numberOfTRTHighThresholdOutliers 

number of dead TRT straws crossed

numberOfTRTDeadStraws 

number of TRT tube hits

numberOfTRTTubeHits 

number of TRT hits on track in straws with xenon

numberOfTRTXenonHits 
numberOfMdtHits 

number of mdt hits

tgc, rpc and csc measure both phi and eta coordinate

numberOfTgcPhiHits 
numberOfTgcEtaHits 
numberOfCscPhiHits 
numberOfCscEtaHits 
numberOfRpcPhiHits 
numberOfRpcEtaHits 
numberOfCscEtaHoles 

number of CSC Eta measurements missing from the track

numberOfCscPhiHoles 

number of CSC Phi measurements missing from the track

numberOfRpcEtaHoles 

number of RPC Eta measurements missing from the track

numberOfRpcPhiHoles 

number of RPC Phi measurements missing from the track

numberOfMdtHoles 

number of MDT measurements missing from the track

numberOfTgcEtaHoles 

number of TGC Eta measurements missing from the track

numberOfTgcPhiHoles 

number of TGC Phi measurements missing from the track

numberOfStgcEtaHits 

number of TGC Eta measurements missing from the track

numberOfStgcPhiHits 

number of TGC Phi measurements missing from the track

numberOfMmHits 

number of TGC Eta measurements missing from the track

numberOfStgcEtaHoles 

number of TGC Eta measurements missing from the track

numberOfStgcPhiHoles 

number of TGC Phi measurements missing from the track

numberOfMmHoles 

number of TGC Eta measurements missing from the track

numberOfCscUnspoiltEtaHits 

number of unspoilt CSC eta measurements (all CSC phi measurements are by definition spoilt).

See Muon::CscClusterStatus for definitions of 'spoiled' hits.

numberOfGoodMdtHits 

number of non-deweighted MDT hits.

Only here as a placeholder, will be filled only on xAOD::Muon number of measurements flaged as outliers in TSOS

numberOfOutliersOnTrack 

100 times the standard deviation of the chi2 from the surfaces

standardDeviationOfChi2OS 
legacy_eProbabilityComb_res 
legacy_eProbabilityHT_res 
legacy_eProbabilityToT_res 
legacy_eProbabilityBrem_res 
legacy_pixeldEdx_res 
legacy_eProbabilityNN_res 
legacy_TRTTrackOccupancy_res 
legacy_TRTdEdx_res 
legacy_expectBLayerHit 
legacy_expectInnermostPixelLayerHit 
legacy_expectNextToInnermostPixelLayerHit 
legacy_numberOfBLayerSharedHits 
legacy_numberOfPixelSharedHits 
legacy_numberOfSCTSharedHits 
legacy_numberOfBLayerSplitHits 
legacy_numberOfPixelSplitHits 
legacy_numberOfInnermostPixelLayerSharedHits 
legacy_numberOfInnermostLayerSplitHits 
legacy_numberOfNextToInnermostPixelLayerSharedHits 
legacy_numberOfNextToInnermostLayerSplitHits 
legacy_numberOfTRTSharedHits 
legacy_numberOfBLayerOutliers 
legacy_numberOfInnermostPixelLayerOutliers 
legacy_numberOfNextToInnermostPixelLayerOutliers 
legacy_numberOfPixelOutliers 
legacy_numberOfSCTOutliers 
numberOfTrackSummaryTypes 

Definition at line 44 of file Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h.

45{
46 // --- Inner Detector
48
69 numberOfDBMHits = 63,
100
101 // --- Muon Spectrometer
103 numberOfMdtHits = 7,
120 numberOfMdtHoles = 25,
125
126 // New Small Wheel
132 numberOfMmHits = 69,
138 numberOfMmHoles = 72,
145 // --- all
151
152 // reserved: added to keep synchronisation with xAOD::TrackSummary in
153 // anticipation of the two being merged
154 // in the past used to store pixel and TRT PID information:
163
164 // in the past used to store expected inner layer hits
168
169 // in the past used to store shared hits
180
181 // in the past used to store pixel and SCT outliers
187
188 // -- numbers...
190};
@ numberOfTgcPhiHoles
number of TGC Phi measurements missing from the track
@ numberOfTRTHoles
number of TRT hits which pass the high threshold (only xenon counted) total number of TRT hits which ...
@ numberOfRpcEtaHoles
number of RPC Eta measurements missing from the track
@ numberOfContribPixelLayers
number of contributing layers of the pixel detector
@ numberOfGangedPixels
number of Ganged Pixels flagged as fakes
@ numberOfPixelHits
number of pixel layers on track with absence of hits
@ numberOfBLayerHits
these are the hits in the 0th pixel layer?
@ numberOfTRTHighThresholdOutliers
number of dead TRT straws crossed
@ numberOfMdtHoles
number of MDT measurements missing from the track
@ numberOfMmHits
number of TGC Eta measurements missing from the track
@ numberOfStgcEtaHits
number of TGC Eta measurements missing from the track
@ numberOfStgcPhiHoles
number of TGC Phi measurements missing from the track
@ numberOfStgcEtaHoles
number of TGC Eta measurements missing from the track
@ numberOfNextToInnermostPixelLayerHits
these are the pixel hits, including the b-layer
@ numberOfMmHoles
number of TGC Eta measurements missing from the track
@ numberOfTRTHitsUsedFordEdx
number of TRT high threshold outliers (only xenon counted)
@ numberOfInnermostPixelLayerHits
these are the hits in the 1st pixel layer
@ numberOfTRTHighThresholdHits
total number of TRT hits which pass the high threshold
@ numberOfSCTHoles
number of Holes in both sides of a SCT module
@ numberOfGangedFlaggedFakes
number of dead pixel sensors crossed
@ numberOfStgcPhiHits
number of TGC Phi measurements missing from the track
@ numberOfPixelHoles
number of pixels which have a ganged ambiguity.
@ numberOfTRTTubeHits
number of TRT hits on track in straws with xenon
@ numberOfOutliersOnTrack
100 times the standard deviation of the chi2 from the surfaces
@ numberOfGoodMdtHits
number of non-deweighted MDT hits.
@ numberOfTgcEtaHoles
number of TGC Eta measurements missing from the track
@ numberOfTRTHighThresholdHitsTotal
number of TRT hits used for dE/dx computation
@ numberOfCscUnspoiltEtaHits
number of unspoilt CSC eta measurements (all CSC phi measurements are by definition spoilt).
@ numberOfPixelDeadSensors
number of pixel hits with broad errors (width/sqrt(12))
@ numberOfCscPhiHoles
number of CSC Phi measurements missing from the track
@ numberOfRpcPhiHoles
number of RPC Phi measurements missing from the track
@ numberOfCscEtaHoles
number of CSC Eta measurements missing from the track

◆ SurfaceOwner

Enumerator
noOwn 
TGOwn 
DetElOwn 
userOwn 

Definition at line 56 of file Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h.

56 {
57 noOwn = 0, // Surface is free can be deleted at will.
58 TGOwn = 1, // Surface is owned by the Geometry and will be deleted by it.
59 DetElOwn = 2, // Surface is associated with a detector element. So can not be
60 // deleted as long this is active.
61 userOwn = 3 // Surface is owned by the user. e.g could be "static"
62};

◆ SurfaceType

enum class Trk::SurfaceType
strong

This enumerator simplifies the persistency & calculations,.

Enumerator
Cone 
Cylinder 
Disc 
Perigee 
Plane 
Line 
Curvilinear 
Other 

Definition at line 16 of file SurfaceTypes.h.

17{
18 Cone = 0,
19 Cylinder = 1,
20 Disc = 2,
21 Perigee = 3,
22 Plane = 4,
23 Line = 5,
24 Curvilinear = 6,
25 Other = 7
26};

◆ TRT_ElectronPidProbability

◆ TubeAccessorType

Enumerator
TubeRincreaseZincrease 

Accessor type [ 2,1,0,3 ].

TubeRincreaseZdecrease 

Accessor type [ 2,0,1,3 ].

TubeZincreaseRincrease 

Accessor type [ 1,2,0,3 ].

TubeZdecreaseRincrease 

Accessor type [ 0,2,1,3 ].

TubeRdecreaseZincrease 

Accessor type [ 3,1,0,2 ].

TubeRdecreaseZdecrease 

Accessor type [ 3,0,1,2 ].

TubeZincreaseRdecrease 

Accessor type [ 1,3,0,2 ].

TubeZdecreaseRdecrease 

Accessor type [ 0,3,1,2 ].

TubeOutsideRminRdecrease 

Accessor type [ 3,1,0,2] - inverse case.

TubeOutsideRmaxRincrease 

Accessor type [ 2,1,0,3 ] - inverse case.

TubeOutsideZminZdecrease 

Accessor type [ 0,3,2,1 ] - inverse case.

TubeOutsideZmaxZincrease 

Accessor type [ 1,3,2,0 ] - inverse case.

Definition at line 26 of file CylinderVolumeBoundaryAccessors.h.

26 {
27
40
41};
@ TubeOutsideZminZdecrease
Accessor type [ 0,3,2,1 ] - inverse case.
@ TubeRdecreaseZdecrease
Accessor type [ 3,0,1,2 ].
@ TubeOutsideZmaxZincrease
Accessor type [ 1,3,2,0 ] - inverse case.
@ TubeZincreaseRincrease
Accessor type [ 1,2,0,3 ].
@ TubeRincreaseZdecrease
Accessor type [ 2,0,1,3 ].
@ TubeOutsideRminRdecrease
Accessor type [ 3,1,0,2] - inverse case.
@ TubeZdecreaseRdecrease
Accessor type [ 0,3,1,2 ].
@ TubeRincreaseZincrease
Accessor type [ 2,1,0,3 ].
@ TubeZincreaseRdecrease
Accessor type [ 1,3,0,2 ].
@ TubeRdecreaseZincrease
Accessor type [ 3,1,0,2 ].
@ TubeOutsideRmaxRincrease
Accessor type [ 2,1,0,3 ] - inverse case.
@ TubeZdecreaseRincrease
Accessor type [ 0,2,1,3 ].

◆ VertexType

This file defines the enums in the Trk namespace for the different vertex types.

The VxCandidate and the TrackParticleBase class store such an enum to signal which vertex it is or from which vertex it comes from (in the case of the TrackParticleBase object).

Author
Andre.nosp@m.as.W.nosp@m.ildau.nosp@m.er@c.nosp@m.ern.c.nosp@m.h
Enumerator
NoVtx 

Dummy vertex, TrackParticle was not used in vertex fit.

PriVtx 

Primary Vertex.

SecVtx 

Secondary Vertex.

PileUp 

Pile Up Vertex.

ConvVtx 

Converstion Vertex.

V0Vtx 

Vertex from V0 Decay.

KinkVtx 

Kink Vertex.

V0Lambda 

Temporary addition for V0 Lambda.

V0LambdaBar 

Temporary addition for V0 LambdaBar.

V0KShort 

Temporary addition for KShort.

NotSpecified 

this is the default

Definition at line 24 of file VertexType.h.

25{
26 NoVtx = 0,
27 PriVtx = 1,
28 SecVtx = 2,
29 PileUp = 3,
30 ConvVtx = 4,
31 V0Vtx = 5,
32 KinkVtx = 6,
33 V0Lambda = 7,
34 V0LambdaBar = 8,
35 V0KShort = 9,
36 NotSpecified = -99
37};
@ NoVtx
Dummy vertex, TrackParticle was not used in vertex fit.
Definition VertexType.h:26
@ V0LambdaBar
Temporary addition for V0 LambdaBar.
Definition VertexType.h:34
@ NotSpecified
this is the default
Definition VertexType.h:36
@ V0Vtx
Vertex from V0 Decay.
Definition VertexType.h:31
@ KinkVtx
Kink Vertex.
Definition VertexType.h:32
@ ConvVtx
Converstion Vertex.
Definition VertexType.h:30
@ PileUp
Pile Up Vertex.
Definition VertexType.h:29
@ SecVtx
Secondary Vertex.
Definition VertexType.h:28
@ PriVtx
Primary Vertex.
Definition VertexType.h:27
@ V0KShort
Temporary addition for KShort.
Definition VertexType.h:35
@ V0Lambda
Temporary addition for V0 Lambda.
Definition VertexType.h:33

◆ VKConstraintType

enum class Trk::VKConstraintType
strong
Enumerator
Mass 
Phi 
Theta 
Point 
Plane 
Radius 

Definition at line 25 of file Derivt.h.

ChargedTracksWeightFilter::Spline::Point Point
@ Phi
Definition RPCdef.h:8

Function Documentation

◆ abcCoef()

void Trk::abcCoef ( double g1,
double g2,
double g3,
double & a,
double & b,
double & c )

Definition at line 260 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Utilities.cxx.

263{
264 a=g1;
265 c=2.*(g3-g1) - 4.*(g2-g1);
266 b=(g3-g1) - c;
267}
TList * a

◆ addCrossVertexDeriv()

void Trk::addCrossVertexDeriv ( CascadeEvent & cascadeEvent_,
double * ader,
long int MATRIXSIZE,
const std::vector< int > & matrixPnt )

Definition at line 207 of file CascadeUtils.cxx.

208{
209 int iv,ivn;
210 //for( iv=0; iv<cascadeEvent_.cascadeNV; iv++)std::cout<<matrixPnt[iv]<<", ";std::cout<<'\n';
211
212 for( iv=0; iv<cascadeEvent_.cascadeNV; iv++){
213 VKVertex *vk = cascadeEvent_.cascadeVertexList[iv].get();
214 if(!vk->nextCascadeVrt)continue; //no pointing
215 for( ivn=iv; ivn<cascadeEvent_.cascadeNV; ivn++){
216 if(vk->nextCascadeVrt == cascadeEvent_.cascadeVertexList[ivn].get()) break; //vertex found
217 }
218 if( ivn == cascadeEvent_.cascadeNV ) continue; // no found vertex
219//
220// Now we have vertex pair "from"(iv) "to"(ivn)
221 int From=matrixPnt[iv]; // start of "from" information
222 int Next=matrixPnt[iv+1]; // start of "next vertex" information. Pnt.constraints are 2 prevous param.!!!
223 int Into=matrixPnt[ivn]; // start of "to" information
224//
225// The same constraints, but derivatives are with respect to other ("to") vertex
226 ader[(0+Into) + (Next-1)*MATRIXSIZE] = - ader[(0+From) + (Next-1)*MATRIXSIZE];
227 ader[(1+Into) + (Next-1)*MATRIXSIZE] = - ader[(1+From) + (Next-1)*MATRIXSIZE];
228 ader[(2+Into) + (Next-1)*MATRIXSIZE] = - ader[(2+From) + (Next-1)*MATRIXSIZE];
229 ader[(0+Into) + (Next-2)*MATRIXSIZE] = - ader[(0+From) + (Next-2)*MATRIXSIZE];
230 ader[(1+Into) + (Next-2)*MATRIXSIZE] = - ader[(1+From) + (Next-2)*MATRIXSIZE];
231 ader[(2+Into) + (Next-2)*MATRIXSIZE] = - ader[(2+From) + (Next-2)*MATRIXSIZE];
232 ader[(0+Into)*MATRIXSIZE + (Next-1)] = - ader[(0+From) + (Next-1)*MATRIXSIZE];
233 ader[(1+Into)*MATRIXSIZE + (Next-1)] = - ader[(1+From) + (Next-1)*MATRIXSIZE];
234 ader[(2+Into)*MATRIXSIZE + (Next-1)] = - ader[(2+From) + (Next-1)*MATRIXSIZE];
235 ader[(0+Into)*MATRIXSIZE + (Next-2)] = - ader[(0+From) + (Next-2)*MATRIXSIZE];
236 ader[(1+Into)*MATRIXSIZE + (Next-2)] = - ader[(1+From) + (Next-2)*MATRIXSIZE];
237 ader[(2+Into)*MATRIXSIZE + (Next-2)] = - ader[(2+From) + (Next-2)*MATRIXSIZE];
238 }
239}
std::vector< std::unique_ptr< VKVertex > > cascadeVertexList
VKVertex * nextCascadeVrt

◆ addToInverseMultiMap()

template<class OrigMap, class CmpT>
void Trk::addToInverseMultiMap ( InverseMultiMap< OrigMap, CmpT > * result,
const OrigMap & rec2truth )

Definition at line 50 of file InverseMultiMap.h.

51 {
52 for (const auto& p : rec2truth) {
53 result->insert(std::make_pair(p.second, p.first));
54 }
55}

◆ afterFit()

int Trk::afterFit ( VKVertex * vk,
double * ader,
double * dcv,
double * ptot,
double * VrtMomCov,
const VKalVrtControlBase * CONTROL )

Definition at line 26 of file cfTotCov.cxx.

27{
28 int i,j;
29 double px,py,pz,pt,invR,cth;
30 double verr[6][6]={{0.}}; //for (i=0; i<6*6; i++) verr[i]=0;
31
32 int NTRK = vk->TrackList.size();
33 int NVar = NTRK*3+3;
34 for (i=1; i<=6; ++i) {
35 for (j=1; j<=NVar ; ++j) dcv[i + j*6 - 7] = 0.;
36 }
37 cfsetdiag( 6, VrtMomCov, 100.);
38 ptot[0] = 0.;
39 ptot[1] = 0.;
40 ptot[2] = 0.;
41
42 double vBx,vBy,vBz,constBF;
43 Trk::vkalMagFld::getMagFld(vk->refIterV[0],vk->refIterV[1],vk->refIterV[2],vBx,vBy,vBz,CONTROL);
44
45 for (i = 1; i <= NTRK; ++i) {
46 VKTrack *trk=vk->TrackList[i-1].get();
47 invR = trk->fitP[2];
48 cth = 1. / tan(trk->fitP[0]);
49 constBF=Trk::vkalMagFld::getEffField(vBx, vBy, vBz, trk->fitP[1], trk->fitP[0]) * Trk::vkalMagFld::getCnvCst();
50 pt = std::abs( constBF / invR);
51 px = pt * cos(trk->fitP[1]);
52 py = pt * sin(trk->fitP[1]);
53 pz = pt * cth;
54 ptot[0] += px;
55 ptot[1] += py;
56 ptot[2] += pz;
57 dcv[ (i*3 + 0)*6 + 5] = -pt * (cth * cth + 1); /* dPz/d(theta) */
58 dcv[ (i*3 + 1)*6 + 3] = -py; /* dPx/d(phi) */
59 dcv[ (i*3 + 1)*6 + 4] = px; /* dPy/d(phi) */
60 dcv[ (i*3 + 2)*6 + 3] = -px / invR; /* dPx/d(rho) */
61 dcv[ (i*3 + 2)*6 + 4] = -py / invR; /* dPy/d(rho) */
62 dcv[ (i*3 + 2)*6 + 5] = -pz / invR; /* dPz/d(rho) */
63 }
64 dcv[0] = 1.;
65 dcv[7] = 1.;
66 dcv[14] = 1.;
67 if(!ader)return 0;
68 int IERR=getFullVrtCov(vk, ader, dcv, verr); if (IERR) return IERR;
69 int ijk = 0;
70 for ( i=0; i<6; ++i) {
71 for (j=0; j<=i; ++j) {
72 VrtMomCov[ijk++] = verr[i][j];
73 }
74 }
75 return 0;
76}
std::vector< std::unique_ptr< VKTrack > > TrackList
static void getMagFld(const double, const double, const double, double &, double &, double &, const VKalVrtControlBase *)
static double getEffField(double bx, double by, double bz, double phi, double theta)
Definition VKalVrtBMag.h:60
static double getCnvCst()
Definition VKalVrtBMag.h:59
void cfsetdiag(long int n, double *matr, double value) noexcept
int getFullVrtCov(VKVertex *vk, double *ader, const double *dcv, double verr[6][6])
Definition VtCFitE.cxx:25

◆ afterFitWithIniPar()

int Trk::afterFitWithIniPar ( VKVertex * vk,
double * ader,
double * dcv,
double * ptot,
double * VrtMomCov,
const VKalVrtControlBase * CONTROL )

Definition at line 83 of file cfTotCov.cxx.

84{
85 int i,j;
86 double px,py,pz,pt,invR,cth;
87 double verr[6][6]={{0.}};
88
89
90 int NTRK = vk->TrackList.size();
91 int NVar = NTRK*3+3;
92 for (i=1; i<=6; ++i) {
93 for (j=1; j<=NVar ; ++j) dcv[i + j*6 - 7] = 0.;
94 }
95 cfsetdiag( 6, VrtMomCov, 10.);
96 ptot[0] = 0.;
97 ptot[1] = 0.;
98 ptot[2] = 0.;
99
100 double vBx,vBy,vBz,constBF;
101 Trk::vkalMagFld::getMagFld(vk->refIterV[0],vk->refIterV[1],vk->refIterV[2],vBx,vBy,vBz,CONTROL);
102
103 for (i = 1; i <= NTRK; ++i) {
104 VKTrack *trk=vk->TrackList[i-1].get();
105 invR = trk->iniP[2];
106 cth = 1. / tan(trk->iniP[0]);
107 constBF=Trk::vkalMagFld::getEffField(vBx, vBy, vBz, trk->fitP[1], trk->fitP[0]) * Trk::vkalMagFld::getCnvCst();
108 pt = std::abs( constBF/invR );
109 px = pt * cos(trk->iniP[1]);
110 py = pt * sin(trk->iniP[1]);
111 pz = pt * cth;
112 ptot[0] += px;
113 ptot[1] += py;
114 ptot[2] += pz;
115 dcv[ (i*3 + 0)*6 + 5] = -pt * (cth * cth + 1); /* dPz/d(theta) */
116 dcv[ (i*3 + 1)*6 + 3] = -py; /* dPx/d(phi) */
117 dcv[ (i*3 + 1)*6 + 4] = px; /* dPy/d(phi) */
118 dcv[ (i*3 + 2)*6 + 3] = -px / invR; /* dPx/d(rho) */
119 dcv[ (i*3 + 2)*6 + 4] = -py / invR; /* dPy/d(rho) */
120 dcv[ (i*3 + 2)*6 + 5] = -pz / invR; /* dPz/d(rho) */
121 }
122 dcv[0] = 1.;
123 dcv[7] = 1.;
124 dcv[14] = 1.;
125 if(!ader)return 0;
126 int IERR=getFullVrtCov(vk, ader, dcv, verr); if (IERR) return IERR;
127 int ijk = 0;
128 for ( i=0; i<6; ++i) {
129 for (j=0; j<=i; ++j) {
130 VrtMomCov[ijk++] = verr[i][j];
131 }
132 }
133 return 0;
134}

◆ AmgMatrix()

Trk::AmgMatrix ( 3 ,
3  )

Definition at line 231 of file NeutralParticleParameterCalculator.cxx.

232 {
233 AmgMatrix(3,3) transform; transform.setZero();
234 transform(0,0)=-1./fabs(qOverP)*sin(theta)*sin(phi);
235 transform(0,1)=1./fabs(qOverP)*sin(theta)*cos(phi);
236 transform(0,2)=0.;
237 transform(1,0)=1./fabs(qOverP)*cos(theta)*cos(phi);
238 transform(1,1)=1./fabs(qOverP)*cos(theta)*sin(phi);
239 transform(1,2)=-1./fabs(qOverP)*sin(theta);
240 transform(2,0)=-1./qOverP/fabs(qOverP)*sin(theta)*cos(phi);
241 transform(2,1)=-1./qOverP/fabs(qOverP)*sin(theta)*sin(phi);
242 transform(2,2)=-1./qOverP/fabs(qOverP)*cos(theta);
243 return transform.transpose().eval();
244 }
#define AmgMatrix(rows, cols)

◆ AmgSymMatrix() [1/2]

const Trk::AmgSymMatrix ( 3 ) &

Definition at line 67 of file RecVertex.cxx.

68 {return m_positionCovariance; }
69
70 void RecVertex::scaleError(float factor) {
71 //scale covariance matrix in *weight* representation
72 m_positionCovariance *= 1./factor;
73 }
void scaleError(float factor)
Error scaling method.

◆ AmgSymMatrix() [2/2]

const Trk::AmgSymMatrix ( 5 ) &
inline

Definition at line 156 of file GXFTrackState.h.

156 {
157 return m_covariancematrix;
158 }

◆ applyConstraints()

void Trk::applyConstraints ( VKVertex * vk)

Definition at line 22 of file stCnst.cxx.

22 {
23 int NCEntries = vk->ConstraintList.size();
24 int NTRK = vk->TrackList.size();
25 for (int ic = 0; ic < NCEntries; ic++) {
26 vk->ConstraintList[ic]->applyConstraint();
27 }
28 //
29 // Effect of symmetrization
30 //
31 for (int ii = 0; ii < (int)vk->ConstraintList.size(); ii++) {
32 for (int ic = 0; ic < (int)vk->ConstraintList[ii]->NCDim; ic++) {
33 vk->ConstraintList[ii]->h0t[ic].X *= 0.5;
34 vk->ConstraintList[ii]->h0t[ic].Y *= 0.5;
35 vk->ConstraintList[ii]->h0t[ic].Z *= 0.5;
36 for (int it = 0; it < NTRK; it++) {
37 vk->ConstraintList[ii]->f0t.at(it)[ic].X *= 0.5;
38 vk->ConstraintList[ii]->f0t[it][ic].Y *= 0.5;
39 vk->ConstraintList[ii]->f0t[it][ic].Z *= 0.5;
40 }
41 }
42 }
43}
std::vector< std::unique_ptr< VKConstraintBase > > ConstraintList

◆ calcMassConstraint()

void Trk::calcMassConstraint ( VKMassConstraint * cnst)

Definition at line 24 of file Derclc1.cxx.

25{
26 int it,itc;
27 double ptot[4]={0.,0.,0.,0.};
28 double cth, invR, pp2, pt;
29 VKConstraintBase * base_cnst = static_cast<VKConstraintBase*> (cnst);
30 const VKVertex * vk=cnst->getOriginVertex();
31 const std::vector<int> &usedParticles=cnst->getUsedParticles();
32 int usedNTRK = usedParticles.size();
33 VKTrack * trk;
35 for( itc=0; itc<usedNTRK; itc++){
36 it = usedParticles[itc];
37 trk = vk->TrackList.at(it).get();
38 pp[itc]=getCnstParticleMom( trk , vk);
39 ptot[0] += pp[itc][0];
40 ptot[1] += pp[itc][1];
41 ptot[2] += pp[itc][2];
42 ptot[3] += pp[itc][3];
43 }
44
45 double temp = 1.e-10;
46 int ip=0; if( std::abs(ptot[1]) > std::abs(ptot[ip]) )ip=1; if( std::abs(ptot[2]) > std::abs(ptot[ip]) )ip=2;
47 int im=0; if( std::abs(ptot[1]) < std::abs(ptot[im]) )im=1; if( std::abs(ptot[2]) < std::abs(ptot[im]) )im=2;
48 int id=4; for(int i=0;i<3;i++) if(i!=ip && i!=im)id=i;
49 if(id==4){
50 std::cout<<"ERROR in mass constraint!!!"<<'\n';
51 temp=ptot[3]*ptot[3]-ptot[0]*ptot[0]-ptot[1]*ptot[1]-ptot[2]*ptot[2];
52 } else {
53 temp = sqrt( (ptot[3]-ptot[ip])*(ptot[3]+ptot[ip]) );
54 temp = sqrt( ( temp -ptot[id])*( temp +ptot[id]) );
55 temp = ( temp -ptot[im])*( temp +ptot[im]);
56 }
57 if(temp<1.e-10)temp=1.e-10; //protection
58 temp=sqrt(temp); //system mass
59//
60//
61 int numCNST=0; //constraint number. Single constraint in this case
62//
63//Difference
64 base_cnst->aa[numCNST] = ( temp - cnst->getTargetMass() ) * ( temp + cnst->getTargetMass() );
65//
66//Derivatives Here pp[][3] - particle energy, pp[][4] - squared particle mom
67 for( itc=0; itc<usedNTRK; itc++){
68 it = usedParticles[itc];
69 trk = vk->TrackList.at(it).get();
70 invR = trk->cnstP[2];
71 cth = 1. / tan( trk->cnstP[0] );
72 pt = sqrt(pp[itc][0]*pp[itc][0] + pp[itc][1]*pp[itc][1]);
73 pp2 = pp[itc][0]*pp[itc][0] + pp[itc][1]*pp[itc][1] + pp[itc][2]*pp[itc][2];
74 base_cnst->f0t[it][numCNST].X = ptot[3] * (-pp2* cth / pp[itc][3])
75 - ptot[2] * (-pt * (cth*cth + 1.));
76 base_cnst->f0t[it][numCNST].Y = -ptot[0] * (-pp[itc][1])
77 - ptot[1] * pp[itc][0];
78 base_cnst->f0t[it][numCNST].Z = ptot[3] * (-pp2/ (invR * pp[itc][3]))
79 - ptot[0] * (-pp[itc][0] / invR)
80 - ptot[1] * (-pp[itc][1] / invR)
81 - ptot[2] * (-pp[itc][2] / invR);
82
83 }
84 base_cnst->h0t[numCNST].X = 0.;
85 base_cnst->h0t[numCNST].Y = 0.;
86 base_cnst->h0t[numCNST].Z = 0.;
87/* -- Relative normalisation. Now it is target mass (squared?) to make performance uniform */
88 double Scale=0.025/(2.*cnst->getTargetMass()+1.); //28.03.2011 wrong idea for cascade. VK 06.05.2011 actually correct!
89 //Scale=0.01;
90 for (it = 0; it < (int)vk->TrackList.size(); ++it) {
91 base_cnst->f0t[it][numCNST].X *= Scale * 2;
92 base_cnst->f0t[it][numCNST].Y *= Scale * 2;
93 base_cnst->f0t[it][numCNST].Z *= Scale * 2;
94 }
95 base_cnst->aa[numCNST] *= Scale;
96//std::cout.precision(11);
97//std::cout<<" mass="<<temp<<", "<<cnst->getTargetMass()<<", "<<base_cnst->aa[numCNST]<<'\n';
98//std::cout<<base_cnst->f0t[0][numCNST].X<<", "<<base_cnst->f0t[0][numCNST].Y<<", "
99// <<base_cnst->f0t[0][numCNST].Z<<'\n';
100//std::cout<<base_cnst->f0t[1][numCNST].X<<", "<<base_cnst->f0t[1][numCNST].Y<<", "
101// <<base_cnst->f0t[1][numCNST].Z<<'\n';
102}
const VKVertex * getOriginVertex() const
Definition Derivt.h:32
const std::vector< int > & getUsedParticles() const
Definition Derivt.h:60
double getTargetMass() const
Definition Derivt.h:59
void Scale(TH1 *h, double d=1)
std::vector< T, boost::noinit_adaptor< std::allocator< T > > > noinit_vector
A variant on std::vector which leaves its contents uninitialized by default.
std::array< double, 4 > getCnstParticleMom(const VKTrack *trk, const VKVertex *vk)

◆ calcPhiConstraint()

void Trk::calcPhiConstraint ( VKPhiConstraint * cnst)

Definition at line 22 of file DerclcAng.cxx.

23{
24 VKConstraintBase * base_cnst = static_cast<VKConstraintBase*>( cnst);
25 const VKVertex * vk=cnst->getOriginVertex();
26 int NTRK = vk->TrackList.size();
27 int i,j;
28 double Scale=1.; // Scaling for better precision VK 28.03.2011 Wrong for error matrix!!! Should always be 1.!!!
29
30 double diff=0., aa=0;
31 std::vector<double> deriv(NTRK,0);
32 for(i=0; i<NTRK-1; i++){
33 for(j=i+1; j<NTRK; j++){
34 diff = vk->TrackList[i]->cnstP[1] - vk->TrackList[j]->cnstP[1];
35 while(diff > M_PI) diff -= 2.*M_PI;
36 while(diff < -M_PI) diff += 2.*M_PI;
37 aa += diff*Scale;
38 deriv[i] += Scale;
39 deriv[j] -= Scale;
40 }
41 }
42
43 int numCNST=0; //constraint number. Single constraint in this case
44 base_cnst->h0t[numCNST].X = 0.;
45 base_cnst->h0t[numCNST].Y = 0.;
46 base_cnst->h0t[numCNST].Z = 0.;
47 for(i=0; i<NTRK; i++){
48 base_cnst->f0t[i][numCNST].X = 0.;
49 base_cnst->f0t[i][numCNST].Y = deriv[i];
50 base_cnst->f0t[i][numCNST].Z = 0.;
51 }
52 base_cnst->aa[numCNST]=aa;
53//std::cout.precision(11);
54//std::cout<<" new delta Phi="<<base_cnst->aa[numCNST]<<'\n';
55//std::cout<<base_cnst->f0t[0][numCNST].X<<", "<<base_cnst->f0t[0][numCNST].Y<<", "
56// <<base_cnst->f0t[0][numCNST].Z<<'\n';
57//std::cout<<base_cnst->f0t[1][numCNST].X<<", "<<base_cnst->f0t[1][numCNST].Y<<", "
58// <<base_cnst->f0t[1][numCNST].Z<<'\n';
59}
#define M_PI
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.
Definition Jet.cxx:631
std::vector< std::vector< Vect3DF > > f0t
Definition Derivt.h:39
std::vector< Vect3DF > h0t
Definition Derivt.h:40
std::vector< double > aa
Definition Derivt.h:38

◆ calcPlaneConstraint()

void Trk::calcPlaneConstraint ( VKPlaneConstraint * cnst)

Definition at line 99 of file DerclcAng.cxx.

100{
101 VKConstraintBase * base_cnst = static_cast<VKConstraintBase*>( cnst);
102 const VKVertex * vk=cnst->getOriginVertex();
103 int NTRK = vk->TrackList.size();
104 double curV[3] = {vk->refIterV[0]+vk->cnstV[0], vk->refIterV[1]+vk->cnstV[1],vk->refIterV[2]+vk->cnstV[2]};
105
106
107 int numCNST=0; //constraint number. Single constraint in this case
108 base_cnst->h0t[numCNST].X = cnst->getA();
109 base_cnst->h0t[numCNST].Y = cnst->getB();
110 base_cnst->h0t[numCNST].Z = cnst->getC();
111 for(int i=0; i<NTRK; i++){
112 base_cnst->f0t[i][numCNST].X = 0.;
113 base_cnst->f0t[i][numCNST].Y = 0.;
114 base_cnst->f0t[i][numCNST].Z = 0.;
115 }
116 base_cnst->aa[numCNST]=cnst->getA()*curV[0]+cnst->getB()*curV[1]+cnst->getC()*curV[2] - cnst->getD() ;
117//std::cout<<" new plane="<<base_cnst->aa[numCNST]<<'\n';
118//std::cout<<(*cnst)<<'\n';
119}
double getB() const
Definition Derivt.h:117
double getC() const
Definition Derivt.h:118
double getA() const
Definition Derivt.h:116
double getD() const
Definition Derivt.h:119

◆ calcPointConstraint()

void Trk::calcPointConstraint ( VKPointConstraint * cnst)

Definition at line 20 of file Derclc2.cxx.

21{
22 VKConstraintBase * base_cnst = static_cast<VKConstraintBase*>( cnst);
23 const VKVertex * vk=cnst->getOriginVertex();
24 // Magnetic field in fitted vertex position
25 double cnstPos[3];
26 cnstPos[0]=vk->refIterV[0]+vk->cnstV[0];
27 cnstPos[1]=vk->refIterV[1]+vk->cnstV[1];
28 cnstPos[2]=vk->refIterV[2]+vk->cnstV[2];
29 double localField = Trk::vkalMagFld::getMagFld(cnstPos,(vk->vk_fitterControl).get());
30 double magConst = localField * vkalMagCnvCst;
31 //
32 int it,Charge=0;
33 double ptot[4]={0.,0.,0.,0.};
34 int NTRK = vk->TrackList.size();
35
36 std::vector< std::array<double, 4> > pp(NTRK);
37 for( it=0; it<NTRK; it++){
38 VKTrack * trk = vk->TrackList[it].get();
39 pp[it]=getCnstParticleMom( trk, localField );
40 ptot[0] += pp[it][0];
41 ptot[1] += pp[it][1];
42 ptot[2] += pp[it][2];
43 ptot[3] += pp[it][3];
44 Charge += trk->Charge;
45 }
46 //Summary particle at fitted vertex
47 double Pt= sqrt(ptot[0]*ptot[0] + ptot[1]*ptot[1]) ;
48 double mom= sqrt(ptot[2]*ptot[2] + Pt*Pt) ;
49 double phi=atan2(ptot[1],ptot[0]);
50 double theta=acos( ptot[2]/mom );
51 if(theta<1.e-5) theta=1.e-5;
52 if(theta>M_PI-1.e-5) theta=M_PI-1.e-5;
53 double invR = magConst / Pt; if(Charge) invR *= Charge;
54 //
55 // Fitted vertex position in global reference frame
56 double curV[3] = {vk->refIterV[0]+vk->cnstV[0], vk->refIterV[1]+vk->cnstV[1],vk->refIterV[2]+vk->cnstV[2]};
57 double Px=ptot[0];
58 double Py=ptot[1];
59 double Pz=ptot[2];
60 double sinp = sin(phi);
61 double cosp = cos(phi);
62 double cott = 1./tan(theta);
63 //
64 //Derivatives
65 double dPhiDpx = -Py/Pt/Pt; //dPhi/dPx
66 double dPhiDpy = Px/Pt/Pt; //dPhi/dPy
67 //double dPhiDpz = 0; //dPhi/dPz
68 double dThetaDpx = Px*Pz/(Pt*mom*mom); //dTheta/dPx
69 double dThetaDpy = Py*Pz/(Pt*mom*mom); //dTheta/dPy
70 double dThetaDpz = -Pt/(mom*mom); //dTheta/dPz
71 double dRDpx = Px/(Pt*magConst); //dR/dPx
72 double dRDpy = Py/(Pt*magConst); //dR/dPy
73 //double dRDpz = 0; //dR/dPz
74 if(Charge){dRDpx /=Charge; dRDpy /=Charge;}
75
76// Main part
77
78 double a0,t,z0;
79 double dA0dPhi,dZdPhi,dZdTheta,dA0dR;
80 if( Charge==0 ) {
81 a0 =-sinp * (cnst->getTargetVertex()[0] - curV[0]) + //Perigee with respect to targetVertex
82 cosp * (cnst->getTargetVertex()[1] - curV[1]);
83 t = cosp * (cnst->getTargetVertex()[0] - curV[0]) +
84 sinp * (cnst->getTargetVertex()[1] - curV[1]);
85 z0 = curV[2] + t*cott - cnst->getTargetVertex()[2];
86//----------------------------------------------------------------------
87// First constraint a0=0
88//
89 dA0dPhi = -t;
90 for( it=0; it<NTRK; it++){
91 double invRi = vk->TrackList[it]->cnstP[2];
92 base_cnst->f0t[it][0].X = 0.; // dPx/dTheta==0, dPy/dTheta==0
93 base_cnst->f0t[it][0].Y = dA0dPhi * (dPhiDpx*(-pp[it][1]) + dPhiDpy*( pp[it][0])) ;
94 base_cnst->f0t[it][0].Z = dA0dPhi * (dPhiDpx*(-pp[it][0]) + dPhiDpy*(-pp[it][1]))/invRi ;
95 }
96 base_cnst->h0t[0].X = sinp; // dA0/dFitVertex==dA0/dCurV
97 base_cnst->h0t[0].Y = -cosp;
98 base_cnst->h0t[0].Z = 0.;
99//----------------------------------------------------------------------
100// Second constraint z=0
101//
102 dZdPhi = a0*cott;
103 dZdTheta = -t/(sin(theta)*sin(theta));
104 for( it=0; it<NTRK; it++){
105 double invRi = vk->TrackList[it]->cnstP[2];
106 double p2i = pp[it][0]*pp[it][0]+pp[it][1]*pp[it][1]+pp[it][2]*pp[it][2];
107 double pti = sqrt(pp[it][0]*pp[it][0]+pp[it][1]*pp[it][1]);
108 base_cnst->f0t[it][1].X = 0.; // dPx/dTheta==0, dPy/dTheta==0 // ../dTheta_i
109 base_cnst->f0t[it][1].Y = dZdPhi * (dPhiDpx*(-pp[it][1]) + dPhiDpy*( pp[it][0])) ; // ../dPhi_i
110 base_cnst->f0t[it][1].Z = dZdPhi * (dPhiDpx*(-pp[it][0]) + dPhiDpy*(-pp[it][1]))/invRi; // ../dInvR_i
111 base_cnst->f0t[it][1].X += dZdTheta * ( dThetaDpz*(-p2i/pti)); // ../dTheta_i
112 base_cnst->f0t[it][1].Y += dZdTheta * (dThetaDpx*(-pp[it][1]) + dThetaDpy*( pp[it][0]) + 0.); // ../dPhi_; dPz/dPhi_i=0
113 base_cnst->f0t[it][1].Z += dZdTheta * (dThetaDpx*(-pp[it][0]) + dThetaDpy*(-pp[it][1]) + dThetaDpz*(-pp[it][2]))/invRi;// ../dInvR_i
114 }
115 base_cnst->h0t[1].X = -cosp*cott; // dZ/dCurV
116 base_cnst->h0t[1].Y = -sinp*cott;
117 base_cnst->h0t[1].Z = 1.;
118//std::cout<<" test0="<<Charge<<", "<<a0<<", "<<z0<<", "<<t<<", "<<Px<<", "<<Py<<", "<<Pz<<'\n';
119//
120// The same for charged particle
121//
122
123 }else{
124 int Sign = 1; if(Charge<0)Sign=-1;
125 double R = 1./invR;
126 double xc = -R*sinp + curV[0]; // centre of circle
127 double yc = R*cosp + curV[1];
128 double diffx = cnst->getTargetVertex()[0] - xc;
129 double diffy = cnst->getTargetVertex()[1] - yc;
130 double diff = sqrt( diffx*diffx + diffy*diffy );
131 double sindphi = (curV[0]-xc)*diffy - (curV[1]-yc)*diffx;
132 sindphi = sindphi/std::abs(R)/diff;
133 double dphi = asin( sindphi );
134 double cosdphi=sqrt(std::abs(1.-sindphi*sindphi)); if(cosdphi<1.e-10)cosdphi=1.e-10;
135 a0 = R*(1.-diff/std::abs(R));
136 t = dphi*R;
137 z0 = curV[2] + t*cott - cnst->getTargetVertex()[2];
138 double dTdXcur = std::abs(R)/cosdphi * (cosp/diff-diffx*sindphi/(diff*diff)) * (-1.);
139 double dTdYcur = std::abs(R)/cosdphi * (sinp/diff-diffy*sindphi/(diff*diff)) * (-1.);
140//----------------------------------------------------------------------
141// First constraint a0=0
142//
143 dA0dPhi = - (diffx*cosp + diffy*sinp)/diff*std::abs(R);
144 dA0dR = 1. - (diffx*sinp - diffy*cosp)/diff*R/std::abs(R);
145 for( it=0; it<NTRK; it++){
146 double invRi = vk->TrackList[it]->cnstP[2];
147 base_cnst->f0t[it][0].X = 0.; // dPx/dTheta==0, dPy/dTheta==0
148 base_cnst->f0t[it][0].Y = dA0dPhi * (dPhiDpx*(-pp[it][1]) + dPhiDpy*( pp[it][0])) ;
149 base_cnst->f0t[it][0].Z = dA0dPhi * (dPhiDpx*(-pp[it][0]) + dPhiDpy*(-pp[it][1]))/invRi ;
150 base_cnst->f0t[it][0].X += 0.;
151 base_cnst->f0t[it][0].Y += dA0dR * (dRDpx*(-pp[it][1]) + dRDpy*( pp[it][0]));
152 base_cnst->f0t[it][0].Z += dA0dR * (dRDpx*(-pp[it][0]) + dRDpy*(-pp[it][1]))/invRi ;
153 }
154 base_cnst->h0t[0].X = Sign*diffx/diff; // dA0/dFitVertex==dA0/dCurV
155 base_cnst->h0t[0].Y = Sign*diffy/diff;
156 base_cnst->h0t[0].Z = 0.;
157//----------------------------------------------------------------------
158// Second constraint z=0
159//
160 dZdPhi = -a0*cott;
161 dZdTheta = -t/sin(theta)/sin(theta);
162 for( it=0; it<NTRK; it++){
163 double invRi = vk->TrackList[it]->cnstP[2];
164 double p2i = pp[it][0]*pp[it][0]+pp[it][1]*pp[it][1]+pp[it][2]*pp[it][2];
165 double pti = sqrt(pp[it][0]*pp[it][0]+pp[it][1]*pp[it][1]);
166 base_cnst->f0t[it][1].X = 0.; // dPx/dTheta==0, dPy/dTheta==0 // ../dTheta_i
167 base_cnst->f0t[it][1].Y = dZdPhi * (dPhiDpx*(-pp[it][1]) + dPhiDpy*( pp[it][0])) ; // ../dPhi_i
168 base_cnst->f0t[it][1].Z = dZdPhi * (dPhiDpx*(-pp[it][0]) + dPhiDpy*(-pp[it][1]))/invRi; // ../dInvR_i
169 base_cnst->f0t[it][1].X += dZdTheta * ( dThetaDpz*(-p2i/pti)); // ../dTheta_i
170 base_cnst->f0t[it][1].Y += dZdTheta * (dThetaDpx*(-pp[it][1]) + dThetaDpy*( pp[it][0]) + 0.); // ../dPhi_; dPz/dPhi_i=0
171 base_cnst->f0t[it][1].Z += dZdTheta * (dThetaDpx*(-pp[it][0]) + dThetaDpy*(-pp[it][1]) + dThetaDpz*(-pp[it][2]))/invRi;// ../dInvR_i
172 }
173 base_cnst->h0t[1].X = dTdXcur*cott; // dZ/dCurV
174 base_cnst->h0t[1].Y = dTdYcur*cott;
175 base_cnst->h0t[1].Z = 1.;
176//std::cout<<" test1="<<Charge<<", "<<a0<<", "<<z0<<" dst="<<t<<" NTRK="<<NTRK<<'\n';
177 }
178 base_cnst->aa[0]=a0;
179 base_cnst->aa[1]=z0;
180
181
182// -----------------------Check of propagation
183// double paro[5],parn[5],s,ref[3],pere[3]; long int ichg=0;
184// paro[0]=0.; paro[1]=0.; paro[2]=theta; paro[3]=phi; paro[4]=invR;
185// ref[0]=cnst->getTargetVertex()[0]-curV[0]; ref[1]=cnst->getTargetVertex()[1]-curV[1]; ref[2]=cnst->getTargetVertex()[2]-curV[2];
186// cfnewp(&ichg, paro, ref, &s, parn, pere);
187// std::cout<<" testp="<<Charge<<", "<<parn[0]<<", "<<parn[1]<<", "<<s<<'\n';
188// -----------------------Derivatives
189//std::cout<<base_cnst->f0t[0][0].X<<", "<<base_cnst->f0t[0][0].Y<<", "<<base_cnst->f0t[0][0].Z<<'\n';
190//std::cout<<base_cnst->f0t[0][1].X<<", "<<base_cnst->f0t[0][1].Y<<", "<<base_cnst->f0t[0][1].Z<<'\n';
191//std::cout<<base_cnst->f0t[1][0].X<<", "<<base_cnst->f0t[1][0].Y<<", "<<base_cnst->f0t[1][0].Z<<'\n';
192//std::cout<<base_cnst->f0t[1][1].X<<", "<<base_cnst->f0t[1][1].Y<<", "<<base_cnst->f0t[1][1].Z<<'\n';
193//std::cout<<base_cnst->h0t[0].X<<", "<<base_cnst->h0t[0].Y<<", "<<base_cnst->h0t[0].Z<<'\n';
194//std::cout<<base_cnst->h0t[1].X<<", "<<base_cnst->h0t[1].Y<<", "<<base_cnst->h0t[1].Z<<'\n';
195//std::cout<<"-------"<<'\n';
196//--------------------------------------------------------------------------------------------------
197 if( cnst->onlyZ() ) { //Z only constraint <= all Rphi ralated stuff is 0
198 for( it=0; it<NTRK; it++){
199 base_cnst->f0t[it][0].X = 0.001;
200 base_cnst->f0t[it][0].Y = 0.001;
201 base_cnst->f0t[it][0].Z = 0.001;
202 }
203 base_cnst->h0t[0].X=0.; base_cnst->h0t[0].Y=0.; base_cnst->h0t[0].Z=0.;
204 base_cnst->aa[0]=0.;
205 }
206}
#define vkalMagCnvCst
Definition CommonPars.h:23
int Sign(int in)
bool onlyZ() const
Definition Derivt.h:94
const double * getTargetVertex() const
Definition Derivt.h:100
std::unique_ptr< VKalVrtControl > vk_fitterControl
double a0
Definition globals.cxx:27
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)

◆ calcRadiusConstraint()

void Trk::calcRadiusConstraint ( VKRadiusConstraint * cnst)

Definition at line 120 of file DerclcAng.cxx.

121{
122 VKConstraintBase * base_cnst = dynamic_cast<VKConstraintBase*>( cnst);
123 const VKVertex * vk=cnst->getOriginVertex();
124 int NTRK = vk->TrackList.size();
125 double curV[3] = {vk->refIterV[0]+vk->cnstV[0], vk->refIterV[1]+vk->cnstV[1],vk->refIterV[2]+vk->cnstV[2]};
126 int numCNST=0; //constraint number. Single constraint in this case
127 base_cnst->h0t[numCNST].X = 2.*(curV[0]-cnst->getRefX());
128 base_cnst->h0t[numCNST].Y = 2.*(curV[1]-cnst->getRefY());
129 base_cnst->h0t[numCNST].Z = 0;
130 for(int i=0; i<NTRK; i++){
131 base_cnst->f0t[i][numCNST].X = 0.;
132 base_cnst->f0t[i][numCNST].Y = 0.;
133 base_cnst->f0t[i][numCNST].Z = 0.;
134 }
135 base_cnst->aa[numCNST]=cnst->getRC()*cnst->getRC() - std::pow(curV[0]-cnst->getRefX(),2.) - std::pow(curV[1]-cnst->getRefY(),2.);
136}
double getRefX() const
Definition Derivt.h:135
double getRC() const
Definition Derivt.h:134
double getRefY() const
Definition Derivt.h:136

◆ calcThetaConstraint()

void Trk::calcThetaConstraint ( VKThetaConstraint * cnst)

Definition at line 61 of file DerclcAng.cxx.

62{
63 VKConstraintBase * base_cnst = static_cast<VKConstraintBase*>( cnst);
64 const VKVertex * vk=cnst->getOriginVertex();
65 int NTRK = vk->TrackList.size();
66 int i,j;
67 double Scale=1.; // Scaling for better precision VK 28.03.2011 Wrong for error matrix!!! Should always be 1.!!!
68
69 double diff=0., der=0., aa=0;
70 std::vector<double> deriv(NTRK,0);
71 for(i=0; i<NTRK-1; i++){
72 for(j=i+1; j<NTRK; j++){
73 diff = sin(vk->TrackList[i]->cnstP[0] - vk->TrackList[j]->cnstP[0])*Scale;
74 der = Scale;
75 aa += diff;
76 deriv[i] += der;
77 deriv[j] -= der;
78 }
79 }
80
81 int numCNST=0; //constraint number. Single constraint in this case
82 base_cnst->h0t[numCNST].X = 0.;
83 base_cnst->h0t[numCNST].Y = 0.;
84 base_cnst->h0t[numCNST].Z = 0.;
85 for(i=0; i<NTRK; i++){
86 base_cnst->f0t[i][numCNST].X = deriv[i];
87 base_cnst->f0t[i][numCNST].Y = 0.;
88 base_cnst->f0t[i][numCNST].Z = 0.;
89 }
90 base_cnst->aa[numCNST]=aa;
91//std::cout.precision(11);
92//std::cout<<" new delta Theta="<<base_cnst->aa[numCNST]<<'\n';
93//std::cout<<base_cnst->f0t[0][numCNST].X<<", "<<base_cnst->f0t[0][numCNST].Y<<", "
94// <<base_cnst->f0t[0][numCNST].Z<<'\n';
95//std::cout<<base_cnst->f0t[1][numCNST].X<<", "<<base_cnst->f0t[1][numCNST].Y<<", "
96// <<base_cnst->f0t[1][numCNST].Z<<'\n';
97}

◆ cascadeCnstRemnants()

double Trk::cascadeCnstRemnants ( CascadeEvent & cascadeEvent_)

Definition at line 77 of file CFitCascade.cxx.

77 {
78 double cnstRemnants=0.;
79 for(int iv=0; iv<cascadeEvent_.cascadeNV; iv++){
80 VKVertex * vk = cascadeEvent_.cascadeVertexList[iv].get();
81 for(int ii=0; ii<(int)vk->ConstraintList.size();ii++){
82 for(int ic=0; ic<(int)vk->ConstraintList[ii]->NCDim; ic++){
83 cnstRemnants += std::abs( vk->ConstraintList[ii]->aa[ic] );
84 } }
85 }
86 return cnstRemnants;
87}

◆ cfchi2() [1/2]

double Trk::cfchi2 ( const double * vrtt,
const double * part,
VKTrack * trk )

Definition at line 80 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Utilities.cxx.

81{
82
83 double d1, d2, d3, d4, d5;
84 double theta_f = part[0];
85 double phi_f = part[1];
86 double invR_f = part[2];
87 double uu = vrtt[0] * cos(phi_f) + vrtt[1] * sin(phi_f );
88 double vv = vrtt[1] * cos(phi_f) - vrtt[0] * sin(phi_f);
89 double sr = invR_f * abs(trk->Charge); // Zero in case of zero charge
90 double epsf = -vv - (uu * uu + vv * vv) * sr / 2.;
91 double zpf = vrtt[2] - uu * (1. - vv * sr) / tan(theta_f);
92 double phif = phi_f - uu * sr;
93 d1 = epsf - trk->Perig[0];
94 d2 = zpf - trk->Perig[1];
95 d3 = theta_f - trk->Perig[2];
96 d4 = phif - trk->Perig[3];
97 d5 = invR_f - trk->Perig[4];
98 if(d4 > M_PI)d4-=2.*M_PI;
99 if(d4 < -M_PI)d4+=2.*M_PI;
100 double res = trk->WgtM[0] * (d1*d1)
101 + trk->WgtM[2] * (d2*d2)
102 + trk->WgtM[5] * (d3*d3)
103 + trk->WgtM[9] * (d4*d4)
104 + trk->WgtM[14]* (d5*d5)
105 +(d2 * d1*trk->WgtM[1]
106 + d3 * (d1*trk->WgtM[3] + d2*trk->WgtM[4])
107 + d4 * (d1*trk->WgtM[6] + d2*trk->WgtM[7] + d3*trk->WgtM[8])
108 + d5 * (d1*trk->WgtM[10] + d2*trk->WgtM[11] + d3*trk->WgtM[12] + d4*trk->WgtM[13])) * 2;
109 trk->rmnd[0] = d1;
110 trk->rmnd[1] = d2;
111 trk->rmnd[2] = d3;
112 trk->rmnd[3] = d4;
113 trk->rmnd[4] = d5;
114//std::cout<<__func__<<":"<<d1<<", "<<d2<<", "<<d3<<", "<<d4<<", "<<d5<<'\n';
115//std::cout<<trk->Perig[0]<<", "<<trk->Perig[1]<<", "<<trk->Perig[2]<<", "<<trk->Perig[3]<<", "<<trk->Perig[4]<<'\n';
116//std::cout<<theta_f<<", "<<phi_f<<", "<<invR_f<<'\n';
117//std::cout<<trk->WgtM[0]<<", "<<trk->WgtM[2]<<", "<<trk->WgtM[5]<<", "<<trk->WgtM[9]<<", "<<trk->WgtM[14]<<'\n';
118 return (std::abs(res) < 1.e12 ? std::abs(res) : 1.e12);
119}
std::pair< std::vector< unsigned int >, bool > res

◆ cfchi2() [2/2]

double Trk::cfchi2 ( double * xyzt,
const long int ich,
double * part,
const double * par0,
double * wgt,
double * rmnd )

Definition at line 27 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Utilities.cxx.

29{
30 double phif, epsf, d1, d2, d3, d4, d5, sr, uu, vv, res, zpf;
31
32 /* Parameter adjustments */
33 --wgt;
34 --part;
35 --xyzt;
36
37 uu = xyzt[1] * cos(part[2]) + xyzt[2] * sin(part[2]);
38 vv = xyzt[2] * cos(part[2]) - xyzt[1] * sin(part[2]);
39 sr = part[3] * std::abs(ich);
40 epsf = -vv - (uu * uu + vv * vv) * sr / 2.;
41 zpf = xyzt[3] - uu * (1. - vv * sr) / tan(part[1]);
42 phif = part[2] - uu * sr;
43 d1 = par0[0] - epsf;
44 d2 = par0[1] - zpf;
45 d3 = par0[2] - part[1];
46 d4 = par0[3] - phif;
47 d5 = par0[4] - part[3];
48 while(d4 > M_PI)d4-=2.*M_PI;
49 while(d4 < -M_PI)d4+=2.*M_PI;
50// -----------------------Check of propagation
51// double paro[5],parn[5],s,ref[3],peri[3];
52// paro[0]=0.; paro[1]=0.; paro[2]=part[1]; paro[3]=part[2]; paro[4]=part[3];
53// ref[0]=-xyzt[1]; ref[1]=-xyzt[2]; ref[2]=-xyzt[3];
54// cfnewp(ich, paro, ref, &s, parn, peri);
55// d1 = par0[0] - parn[0]; d2 = par0[1] - parn[1]; d3 = par0[2] - parn[2];
56// d4 = par0[3] - parn[3]; d5 = par0[4] - parn[4];
57// std::cout<<" testp0="<<parn[0]<<", "<<parn[1]<<", "<<parn[3]<<", "<<s<<'\n';
58// std::cout<<" testp1="<<(*ich)<<", "<<epsf<<", "<<zpf<<", "<<phif<<", "<<res<<'\n';
59//--------------------------------------------------------------------
60 res = wgt[1] * (d1 * d1) + wgt[3] * (d2 * d2) + wgt[6] * (d3 * d3)
61 + wgt[10] * (d4 * d4) + wgt[15] * (d5 * d5) + (d2 *
62 d1 * wgt[2] + d3 * (d1 * wgt[4] + d2 * wgt[5]) + d4 * (d1 * wgt[7]
63 + d2 * wgt[8] + d3 * wgt[9]) + d5 * (d1 * wgt[11] + d2 * wgt[12]
64 + d3 * wgt[13] + d4 * wgt[14])) * 2;
65 rmnd[0] = d1;
66 rmnd[1] = d2;
67 rmnd[2] = d3;
68 rmnd[3] = d4;
69 rmnd[4] = d5;
70 return (std::abs(res) < 1.e12 ? std::abs(res) : 1.e12);
71}
#define xyzt

◆ cfdcopy()

void Trk::cfdcopy ( double * source,
double * target,
int n )
inline

Definition at line 23 of file TrkVKalUtils.h.

24 { std::copy(source, source + n, target); }

◆ cfddist3D()

double Trk::cfddist3D ( double * V1,
double * V2 )
inline

Definition at line 26 of file TrkVKalUtils.h.

27 { return sqrt( (V2[0]-V1[0])*(V2[0]-V1[0]) + (V2[1]-V1[1])*(V2[1]-V1[1]) + (V2[2]-V1[2])*(V2[2]-V1[2]) ); }

◆ cfdinv()

int Trk::cfdinv ( double * cov,
double * wgt,
long int NI )

Definition at line 497 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Matrix.cxx.

498{
499 long int n = std::abs(NI);
500 if (n <= 1) return -1;
501 long int jerr=0;;
502
503//---Robust inversion if COV is suspected ill-defined
504 if (NI>0) {
505 jerr=vkSInvSVD(cov,NI,wgt, 1.e-18);
506 //--Check if inverted matrix is at approximately correct
507 if(!jerr){ if(checkMatrixInversion(cov, wgt, n)>0.1) jerr=-2; }
508 return jerr;
509 }
510//---If COV is believed good
511 jerr=vkcholInv(cov, wgt, n);
512 if(!jerr){ if(checkMatrixInversion(cov, wgt, n)>0.1) jerr=-2; }
513 return jerr;
514}

◆ cferpr()

void Trk::cferpr ( const long int ich,
double * par,
double * ref,
const double s0,
double * errold,
double * errnew )

Definition at line 12 of file cfErPr.cxx.

13{
14
15
16 double r__, dsphi, dseps, dsrho, cs, sn, xp, yp;
17 double derivm[25]; /* was [5][5] */
18 double ctg, dsq, dyp, d__3;
19/* ------------------------------------------ */
20/* This routine propagates the trajectory error matrix */
21/* originally evaluated at s=0 to the curved abcissa S */
22/* assuming that the track travels into VACUUM */
23/* INPUT: ICH Charge of track */
24/* PAR(5) Track parameters */
25/* REF(3) New reference point */
26/* ERROLD error matrix at (0,0,0) */
27/* S0 curved abcissa of propagation */
28/* OUTPUT: ERRNEW New error matrix */
29/* ------ */
30/* derivm(i,j)=D(X'.j)/D(X.i) */
31/* ----------------------------------------------------------- */
32/* Author: V.Kostyukhin */
33/* ------------------------------------------------------------ */
34 /* Parameter adjustments */
35 --par;
36 --ref;
37
38
39 /* --------------------------------------------------- */
40 for (int ii= 0; ii< 25; ++ii) derivm[ii] = 0.;
41/* -- */
42 cs = cos(par[4]);
43 sn = sin(par[4]);
44 xp = ref[1] * cs + ref[2] * sn; //==(*s0) for neutral particles
45 yp = ref[1] * sn - ref[2] * cs;
46 double sinp3 = sin(par[3]);
47 ctg = cos(par[3]) / sinp3;
48 derivm[6] = 1.;
49 derivm[12] = 1.;
50 derivm[24] = 1.;
51 if (ich != 0) {
52 r__ = 1. / par[5];
53 dyp = r__ - par[1] + yp;
54 dsphi = -r__ * (yp * dyp + xp * xp) / (dyp * dyp + xp * xp);
55 dseps = r__ * xp / (dyp * dyp + xp * xp);
56 dsrho = -r__ * s0 + r__ * r__ * dseps;
57 derivm[5] = dseps * ctg;
58 derivm[7] = -s0 / (sinp3 * sinp3);
59 derivm[8] = dsphi * ctg;
60 derivm[9] = dsrho * ctg;
61 derivm[15] = par[5] * dseps;
62/* Computing 2nd power */
63 d__3 = r__ - par[1];
64 dsq = sqrt(ref[1]*ref[1] + ref[2]*ref[2] + d__3*d__3 + 2.*d__3*yp);
65 derivm[4] = -(r__*r__) + d_sign(1., r__) * (r__*r__) * dyp / dsq;
66 derivm[3] = d_sign(1., r__) * (par[1] - r__) * xp / dsq;
67 derivm[19] = s0 + par[5] * dsrho;
68 derivm[0] = d_sign(1., r__) * dyp / dsq;
69 derivm[18] = par[5] * dsphi + 1.;
70 } else {
71 derivm[0] = 1.;
72 derivm[18] = 1.;
73 //derivm[3] = par[1] - xp; VK Error!!!
74 derivm[3] = - xp; //dEps/dPhi
75 derivm[7] = -xp / (sinp3 * sinp3); //dZ/dTheta
76 derivm[8] = -yp * ctg; //dZ/dPhi
77 }
78 tdasatVK(derivm, &errold[0], &errnew[0], 5, 5);
79
80}
const boost::regex ref(r_ef)
void tdasatVK(const double *Der, const double *CovI, double *CovF, long int M, long int N)
double d_sign(double value, double sign)

◆ cfimp()

void Trk::cfimp ( long int TrkID,
long int ich,
int IFL,
double * par,
const double * err,
double * vrt,
double * vcov,
double * rimp,
double * rcov,
double * sign,
VKalVrtControlBase * FitCONTROL )

Definition at line 43 of file cfImp.cxx.

46{
47 double dcov[3], errd[15], paro[5];
48 double dwgt[3], errn[15];
49 int i__, j, ij;
50
51 double cnv[6] /* was [2][3] */;
52/* --------------------------------------------------------- */
53/* Impact parameter calculation */
54/* Input: */
55/* ICH -charge(-1,0,1) */
56/* IFL = 1 contribution from VRT is added */
57/* IFL =-1 contribution from VRT is subtructed */
58/* PAR(5),ERR(15) - peregee parameters and error matrix */
59/* VRT(3),VCOV(6) - vertex and its error matrix */
60/* */
61/* SIGNIFICANCE IS CALCULATED FOR PERIGEE POINT BY DEF. */
62/* (NOT FOR THE CLOSEST POINT!!!) */
63/* */
64/* Output: */
65/* RIMP(1) - impact in XY */
66/* RIMP(2) - impact in Z */
67/* RIMP(3) - Theta at new vertex */
68/* RIMP(4) - Phi at new vertex */
69/* RIMP(5) - curvature at vertex */
70/* RCOV(3) - error matrix for RIMP */
71/* SIGN - impact significance */
72/* Author: V.Kostyukhin */
73/* --------------------------------------------------------- */
74 /* Parameter adjustments */
75 --vcov;
76
77 /* Function Body */
78 for (int ii = 0; ii < 15; ++ii) {errd[ii] = err[ii];}
79
80
81 double Ref0[3]={0.,0.,0.}; //base reference point for standard perigee
82
83 Trk::vkalPropagator::Propagate(TrkID, ich, par, errd, Ref0, vrt, paro, errn, FitCONTROL);
84
85//std::cout <<" CFImp new par R,Z="<<paro[0]<<", "<<paro[1]<<'\n';
86/* ---------- */
87 rimp[0] = paro[0];
88 rimp[1] = paro[1];
89 rimp[2] = paro[2];
90 rimp[3] = paro[3];
91 rimp[4] = paro[4];
92/* X=paro(1)*sn, Y=-paro(1)*cs */
93 double sn = sin(paro[3]);
94 double cs = cos(paro[3]);
95/* -- New error version */
96 cnv[0] = -sn;
97 cnv[2] = cs;
98 cnv[4] = 0.;
99 cnv[1] = sn / tan(paro[2]);
100 cnv[3] = cs / tan(paro[2]);
101 cnv[5] = -1.;
102 dcov[0] = 0.;
103 dcov[1] = 0.;
104 dcov[2] = 0.;
105 for (i__ = 1; i__ <= 3; ++i__) {
106 for (j = 1; j <= 3; ++j) {
107 ij = max(i__, j);
108 ij = ij * (ij - 1) / 2 + min(i__, j);
109 dcov[0] += cnv[(i__ << 1) - 2] * cnv[(j << 1) - 2] * vcov[ij];
110 dcov[2] += cnv[(i__ << 1) - 1] * cnv[(j << 1) - 1] * vcov[ij];
111 dcov[1] += cnv[(i__ << 1) - 2] * cnv[(j << 1) - 1] * vcov[ij];
112 }
113 }
114 /* --------------------------------------------------------------- */
115 if (IFL == 1) {
116 rcov[0] = errn[0] + dcov[0];
117 rcov[1] = errn[1] + dcov[1];
118 rcov[2] = errn[2] + dcov[2];
119 } else if (IFL == -1) {
120 rcov[0] = errn[0] - dcov[0];
121 rcov[1] = errn[1] - dcov[1];
122 rcov[2] = errn[2] - dcov[2];
123 } else {
124 rcov[0] = errn[0];
125 rcov[1] = errn[1];
126 rcov[2] = errn[2];
127 }
128 int jerr = cfdinv(rcov, dwgt, -2);
129 if (jerr) {jerr=cfdinv(rcov, dwgt, 2); if(jerr){dwgt[0]=dwgt[2]=1.e6; dwgt[1]=0.;}}
130 (*sign) = sqrt(std::abs(dwgt[0] * rimp[0] * rimp[0] + dwgt[1] * 2. * rimp[0] * rimp[1] +
131 dwgt[2] * rimp[1] * rimp[1]));
132}
#define min(a, b)
Definition cfImp.cxx:40
#define max(a, b)
Definition cfImp.cxx:41
static void Propagate(long int TrkID, long int Charge, double *ParOld, double *CovOld, double *RefStart, double *RefEnd, double *ParNew, double *CovNew, VKalVrtControlBase *FitControl=0)
int cfdinv(double *cov, double *wgt, long int NI)

◆ cfimpc()

void Trk::cfimpc ( long int TrkID,
long int ich,
int IFL,
double * par,
const double * err,
double * vrt,
double * vcov,
double * rimp,
double * rcov,
double * sign,
VKalVrtControlBase * FitCONTROL )

Definition at line 135 of file cfImp.cxx.

138{
139 double dcov[3], errd[15], paro[5];
140 double dwgt[3], errn[15], cnv[6]; /* was [2][3] */
141 int i__, j, ij;
142
143
144 double cs, sn;
145/* --------------------------------------------------------- */
146/* SIGNIFICANCE IS CALCULATED FOR THE CLOSEST POINT NOW!!!*/
147/* Author: V.Kostyukhin */
148/* --------------------------------------------------------- */
149 /* Parameter adjustments */
150 --vcov;
151 for (int ii = 0; ii < 15; ++ii) {errd[ii] = err[ii];}
152
153 double Ref0[3]={0.,0.,0.}; //base reference point for standard perigee
154 Trk::vkalPropagator::Propagate(TrkID, ich, par, errd, Ref0, vrt, paro, errn, FitCONTROL);
155
156 double tmpVrt[3]={0.,0.,0.}; double ClosestPnt[3];
157 cfClstPnt( paro, tmpVrt, ClosestPnt);
158 paro[0]=sqrt(ClosestPnt[0]*ClosestPnt[0] + ClosestPnt[1]*ClosestPnt[1]);
159 paro[1]=ClosestPnt[2];
160/* ---------- */
161 rimp[0] = paro[0];
162 rimp[1] = paro[1];
163 rimp[2] = paro[2];
164 rimp[3] = paro[3];
165 rimp[4] = paro[4];
166 sn = sin(paro[3]);
167 cs = cos(paro[3]);
168/* -- New error version */
169 cnv[0] = -sn;
170 cnv[2] = cs;
171 cnv[4] = 0.;
172 cnv[1] = sn / tan(paro[2]);
173 cnv[3] = cs / tan(paro[2]);
174 cnv[5] = -1.;
175 dcov[0] = 0.;
176 dcov[1] = 0.;
177 dcov[2] = 0.;
178 for (i__ = 1; i__ <= 3; ++i__) {
179 for (j = 1; j <= 3; ++j) {
180 ij = max(i__, j);
181 ij = ij * (ij - 1) / 2 + min(i__, j);
182 dcov[0] += cnv[(i__ << 1) - 2] * cnv[(j << 1) - 2] * vcov[ij];
183 dcov[2] += cnv[(i__ << 1) - 1] * cnv[(j << 1) - 1] * vcov[ij];
184 dcov[1] += cnv[(i__ << 1) - 2] * cnv[(j << 1) - 1] * vcov[ij];
185 }
186 }
187 /* --------------------------------------------------------------- */
188 if (IFL == 1) {
189 rcov[0] = errn[0] + dcov[0];
190 rcov[1] = errn[1] + dcov[1];
191 rcov[2] = errn[2] + dcov[2];
192 } else if (IFL == -1) {
193 rcov[0] = errn[0] - dcov[0];
194 rcov[1] = errn[1] - dcov[1];
195 rcov[2] = errn[2] - dcov[2];
196 } else {
197 rcov[0] = errn[0];
198 rcov[1] = errn[1];
199 rcov[2] = errn[2];
200 }
201 int jerr = cfdinv(rcov, dwgt, -2);
202 if (jerr) {
203 jerr = cfdinv(rcov, dwgt, 2);
204 if (jerr) {
205 dwgt[0] = dwgt[2] = 1.e6;
206 dwgt[1] = 0.;
207 }
208 }
209 (*sign) = sqrt(std::abs(dwgt[0] * rimp[0] * rimp[0] +
210 dwgt[1] * 2. * rimp[0] * rimp[1] +
211 dwgt[2] * rimp[1] * rimp[1]));
212 }

◆ cfInv5()

int Trk::cfInv5 ( double * cov,
double * wgt )

Definition at line 459 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Matrix.cxx.

460{
461 double dest[25];
462 long int i, j, k, N;
463/* -----------------------------------------*/
464/* Track covariance matrix inversion */
465/* stable to small value of mom. error */
466/* Author: V.Kostyukhin */
467/* -----------------------------------------*/
468
469/* -- RESTORE MATRIX 4x4 -- */
470 N = 4;
471 k = 0;
472 for (i=0; i<N; ++i) for (j=0; j<=i; ++j) {
473 dest[ i*N + j ] = dest[ j*N + i ] = cov[k]; wgt[k]=0.; k++; }
474
475 double X[4]={cov[10], cov[11], cov[12], cov[13]};
476
477 for (i = 0; i < N; ++i) {
478 for (j = 0; j < N; ++j) dest[i*N+j] -= X[i]*X[j]/cov[14];
479 }
480 long int jerr;
481 dsinv(N, dest, N, &jerr);
482 if(jerr) return jerr;
483
484 double L[4]={0.,0.,0.,0.};
485 for (i = 0; i < N; ++i) {
486 for (j = 0; j < N; ++j) L[i] -= dest[i*N+j]*X[j]/cov[14];
487 }
488 double W=1.; for (i = 0; i < N; ++i) W -= X[i]*L[i];
489 wgt[10]=L[0]; wgt[11]=L[1]; wgt[12]=L[2]; wgt[13]=L[3]; wgt[14] = W/cov[14];
490
491 k=0; for (i=0; i<N; i++) for (j=0; j<=i; j++) wgt[k++]=dest[i*N+j];
492
493 return 0;
494}
void dsinv(long int n, double *a, long int DIM, long int *ifail) noexcept

◆ CFit()

int Trk::CFit ( VKalVrtControl * FitCONTROL,
int ifCovV0,
int NTRK,
long int * ich,
double xyz0[3],
double(*) par0[3],
double(*) inp_Trk5[5],
double(*) inp_CovTrk5[15],
double xyzfit[3],
double(*) parfs[3],
double ptot[4],
double covf[21],
double & chi2,
double * chi2tr )

Definition at line 435 of file CFit.cxx.

440{
441
442 std::fill_n(ptot,4,0.);
443 std::fill_n(covf,21,0.);
444 cfdcopy(xyz0,xyzfit,3);
445 FitCONTROL->renewFullCovariance(nullptr);
446
447//
448// Create vertex
449//
450 std::unique_ptr<VKVertex> MainVRT(new VKVertex(*FitCONTROL));
451 fillVertex(MainVRT.get(), NTRK, ich, xyz0, par0, inp_Trk5, inp_CovTrk5);
452//
453// Fit vertex
454//
455 int IERR = fitVertex( MainVRT.get());
456 if(IERR) return IERR;
457//
458// if successful - save results
459//
460 for(int i=0; i<3; i++) xyzfit[i] = MainVRT->refIterV[i]+MainVRT->fitV[i]; // fitted vertex in global frame
461 MainVRT->vk_fitterControl->vk_forcft.localbmag = Trk::vkalMagFld::getMagFld(xyzfit,(MainVRT->vk_fitterControl).get());
462 chi2 = 0.;
463 for (int tk = 0; tk < NTRK; tk++) {
464 VKTrack * trk = MainVRT->TrackList[tk].get();
465 chi2 += trk->Chi2;
466 chi2tr[tk] = trk->Chi2;
467 cfdcopy( trk->fitP, &parfs[tk][0], 3);
468 std::array<double, 4> pp = getFitParticleMom( trk, MainVRT.get() );
469 ptot[0]+=pp[0]; ptot[1]+=pp[1]; ptot[2]+=pp[2]; ptot[3]+=pp[3];
470 }
471 cfdcopy(MainVRT->fitVcov, covf , 6); //fitted vertex covariance
472 double vM2=(ptot[3]-ptot[2])*(ptot[3]+ptot[2]) - ptot[1]*ptot[1] - ptot[0]*ptot[0];
473 FitCONTROL->setVertexMass(std::sqrt(vM2>0. ? vM2 : 0. ) );
474 FitCONTROL->setVrtMassError(0.);
475//
476// If required - get full covariance matrix
477//
478 if(ifCovV0){
479 double dptot[5], VrtMomCov[21];
480 IERR = afterFit(MainVRT.get(), MainVRT->ader, MainVRT->FVC.dcv, dptot, VrtMomCov, (MainVRT->vk_fitterControl).get());
481 if (IERR) return -2; /* NONINVERTIBLE COV.MATRIX */
482 if(MainVRT->existFullCov){
483 FitCONTROL->renewFullCovariance(new double[ (3*NTRK+3)*(3*NTRK+3+1)/2 ]);
484 int out=0;
485 for(int ti=0; ti<3+3*NTRK; ti++){
486 for(int tj=0; tj<=ti; tj++){
487 FitCONTROL->getFullCovariance()[out] = ARR2D_FS(MainVRT->ader, 3*vkalNTrkM+3, ti, tj);
488 out++;
489 } }
490 int activeTrk[vkalNTrkM]={0}; std::fill_n(activeTrk,NTRK,1);
491 double vrtMass=0., vrtMassError=0.;
492 cfmasserr(MainVRT.get(), activeTrk, &vrtMass, &vrtMassError);
493 FitCONTROL->setVertexMass(vrtMass);
494 FitCONTROL->setVrtMassError(vrtMassError);
495 }
496 cfdcopy( VrtMomCov, covf, 21); //XvYvZvPxPyPz covariance
497 cfdcopy( MainVRT->vk_fitterControl->vk_forcft.robres, FitCONTROL->vk_forcft.robres, NTRK); //Track weights from robust fit
498
499 }
500
501 return 0;
502}
#define ARR2D_FS(name, N, i, j)
Definition CommonPars.h:29
#define vkalNTrkM
Definition CommonPars.h:22
void renewFullCovariance(double *)
void setVertexMass(double mass)
void setVrtMassError(double error)
const double * getFullCovariance() const
double chi2(TH1 *h0, TH1 *h1)
void cfdcopy(double *source, double *target, int n)
void cfmasserr(VKVertex *vk, const int *list, double *MASS, double *sigM)
Definition cfMassErr.cxx:16
std::array< double, 4 > getFitParticleMom(const VKTrack *trk, const VKVertex *vk)
int afterFit(VKVertex *vk, double *ader, double *dcv, double *ptot, double *VrtMomCov, const VKalVrtControlBase *CONTROL)
Definition cfTotCov.cxx:26
double robres[vkalNTrkM]
Definition ForCFT.h:51

◆ cfmasserr()

void Trk::cfmasserr ( VKVertex * vk,
const int * list,
double * MASS,
double * sigM )

Definition at line 16 of file cfMassErr.cxx.

17{
18 int NTRK=vk->TrackList.size();
19 //Deliberately not using make_unique
20 std::unique_ptr < double[] > deriv(new double[3*NTRK+3]);
21 double ptot[4]={0.};
22 std::vector< std::array<double,6> > pmom(NTRK);
23 double dm2dpx, dm2dpy, dm2dpz, ee, pt, px, py, pz, cth;
24
25 double fieldPos[3];
26 fieldPos[0]=vk->refIterV[0]+vk->fitV[0];
27 fieldPos[1]=vk->refIterV[1]+vk->fitV[1];
28 fieldPos[2]=vk->refIterV[2]+vk->fitV[2];
29 double vBx,vBy,vBz;
30 Trk::vkalMagFld::getMagFld(fieldPos[0], fieldPos[1], fieldPos[2],vBx,vBy,vBz,(vk->vk_fitterControl).get());
31
32 for(int it=0; it<NTRK; it++){
33 if (list[it]) {
34 auto trk=vk->TrackList[it].get();
35 double constBF = Trk::vkalMagFld::getEffField(vBx, vBy, vBz, trk->fitP[1], trk->fitP[0]) * vkalMagCnvCst ;
36 pmom[it][4] = pt = std::abs( constBF/trk->fitP[2] );
37 pmom[it][5] = cth = 1. /tan(trk->fitP[0]);
38 pmom[it][0] = px = pt * cos(trk->fitP[1]);
39 pmom[it][1] = py = pt * sin(trk->fitP[1]);
40 pmom[it][2] = pz = pt * cth;
41 double mmm=trk->getMass();
42 pmom[it][3] = sqrt(px*px + py*py + pz*pz + mmm*mmm);
43 ptot[0] += px;
44 ptot[1] += py;
45 ptot[2] += pz;
46 ptot[3] += pmom[it][3];
47 }
48 }
49
50 for(int it = 0; it < NTRK; ++it) {
51 if (list[it]) {
52 pt = pmom[it][4];
53 cth= pmom[it][5];
54 px = pmom[it][0];
55 py = pmom[it][1];
56 pz = pmom[it][2];
57 ee = pmom[it][3];
58 dm2dpx = (ptot[3] / ee * px - ptot[0]) * 2.;
59 dm2dpy = (ptot[3] / ee * py - ptot[1]) * 2.;
60 dm2dpz = (ptot[3] / ee * pz - ptot[2]) * 2.;
61 deriv[it*3 + 0] = dm2dpz * ((-pt) * (cth * cth + 1.)); /* d(M2)/d(Theta) */
62 deriv[it*3 + 1] = -dm2dpx * py + dm2dpy * px; /* d(M2)/d(Phi) */
63 deriv[it*3 + 2] = (-dm2dpx * px - dm2dpy*py - dm2dpz*pz)/vk->TrackList[it]->fitP[2]; /* d(M2)/d(Rho) */
64 } else {
65 deriv[it*3 + 0] = deriv[it*3 + 1] = deriv[it*3 + 2] = 0.;
66 }
67 }
68//----
69 double covM2=0.;
70 for(int i=0; i<NTRK*3; i++){
71 double tmp=0.;
72 for(int j=0; j<NTRK*3; j++){
73 tmp += ARR2D_FS(vk->ader, vkalNTrkM*3+3, i+3, j+3) *deriv[j];
74 }
75 tmp *= deriv[i];
76 if(std::isnan(tmp)) {tmp=0.;}
77 if(std::isinf(tmp)) {tmp=0.;}
78 covM2 += tmp;
79 }
80 std::feclearexcept(FE_ALL_EXCEPT);
81 if(covM2<1.e-10)covM2=1.e-10;
82//----
83 (*MASS) = (ptot[3]-ptot[2])*(ptot[3]+ptot[2])-ptot[1]*ptot[1]-ptot[0]*ptot[0];
84 if((*MASS)<1.e-10) (*MASS) = 1.e-10;
85 (*MASS) = sqrt(*MASS);
86 (*sigM) = sqrt(covM2) / 2. / (*MASS);
87}
double ader[(3 *vkalNTrkM+3) *(3 *vkalNTrkM+3)]

◆ cfnewp()

void Trk::cfnewp ( const long int ich,
double * parold,
double * ref,
double * s,
double * parnew,
double * per )

Definition at line 10 of file cfNewP.cxx.

11{
12
13 double dphi, coth, hper, zper, zeps, r__, cs, xc, yc, sn, sipart, eps;
14
15/* ------------------------------------------------------------*/
16/* This routine propagates the trajectory parameters */
17/* w.r.t to a new reference point. */
18/* RETURNED POSITION IS NOT A POSITION OF CLOSEST APPROACH */
19/* BUT PERIGEE ASSUMIMG THAT REF IS */
20/* A CENTER OF COORDINATE SYSTEM */
21/* */
22/* INPUT: ICH Charge(-1,0,1) */
23/* PAROLD Initial parameters(EPS,H,THE,PHI,1./R) */
24/* REF Position of new reference point */
25/* OUTPUT: S Curved abcissa of new perigee */
26/* PARNEW Parameters evaluated at new perigee */
27/* PER Position of new perigee */
28/* Author: V.Kostyukhin */
29/* ------------------------------------------------------------*/
30 /* Parameter adjustments */
31 --per;
32 --parnew;
33 --ref;
34 --parold;
35
36 eps = parold[1];
37 sn = sin(parold[4]);
38 cs = cos(parold[4]);
39 coth = 1. / tan(parold[3]);
40 zeps = parold[2];
41
42/* Neutral track */
43 if ( ich == 0) {
44 hper = eps - ref[1] * sn + ref[2] * cs;
45 dphi = 0.;
46 (*s) = ref[1] * cs + ref[2] * sn;
47 zper = zeps + coth * (*s) - ref[3];
48 } else {
49 r__ = 1. / parold[5];
50 sipart = 1.;
51 if (r__ < 0.) sipart = -1.;
52/* -- Centre of the circle and perigee */
53 xc = (eps - r__) * sn - ref[1];
54 yc = -(eps - r__) * cs- ref[2];
55 hper = r__ - sipart * sqrt(xc*xc + yc*yc);
56/* -- Phi */
57 double tmp_prec= - eps - cs*ref[2] + sn*ref[1];
58 dphi = atan2(sipart * (ref[1]*cs + ref[2]*sn),
59 sipart * (r__ + tmp_prec) );
60 (*s) = r__*dphi;
61/* -- Z at VXOLD */
62 zper = zeps + coth * (*s) - ref[3];
63 }
64 parnew[1] = hper;
65 parnew[2] = zper;
66 parnew[3] = parold[3];
67 parnew[4] = parold[4] + dphi;
68
69/* check 2*pi period in phi */
70 while (parnew[4] > 6.2831853071794) parnew[4] -= 6.2831853071794;
71 while (parnew[4] <-6.2831853071794) parnew[4] += 6.2831853071794;
72
73
74
75 parnew[5] = parold[5];
76 per[1] = ref[1] + sin(parold[4] + dphi) * hper;
77 per[2] = ref[2] - cos(parold[4] + dphi) * hper;
78 per[3] = ref[3] + zper;
79}

◆ cfnewpm()

void Trk::cfnewpm ( double * par,
const double * xyzStart,
double * xyzEnd,
const double ustep,
double * parn,
double * closePoint,
VKalVrtControlBase * CONTROL )

Definition at line 16 of file cfNewPm.cxx.

17{
18 double d__1, d__2,dist_left;
19 double vect[7], stmg, vout[7]={0.}, dpar0[5];
20 double perig[3], dstep, xyzst[3], charge;
21 double posold, poscur, totway, dp;
22 double dX, dY, dZ;
23 long int ich;
24
25/* --------------------------------------------------------- */
26/* The same as CFNEWP but for the case on nonuniform */
27/* magnetic field */
28/* */
29/* Propagation from xyzStart reference point to xyzEnd point*/
30/* PAR - perigee parameters wrt xyzStart */
31/* PARN - perigee parameters wrt xyzEnd */
32/* Author: V.Kostyukhin */
33/* --------------------------------------------------------- */
34 /* Parameter adjustments */
35 --par;
36
37 d__1 = tan(par[3]);
38 totway = (ustep) * sqrt(1. / (d__1 * d__1) + 1.);
39
40 if (fabs(ustep) < 10. && fabs(totway) < 20.) return; // Distance(mm) is small. Simplest propagation is used
41
42 stmg = 40.; //Propagation step in mm for nonuniform field
43
44 vect[0] = sin(par[4]) * par[1] +xyzStart[0];
45 vect[1] = -cos(par[4]) * par[1] +xyzStart[1];
46 vect[2] = par[2] +xyzStart[2];
47
48 double constB = Trk::vkalMagFld::getMagFld(vect,CONTROL) * Trk::vkalMagFld::getCnvCst();
49
50 double pt = constB / fabs(par[5]);
51 double px = pt * cos(par[4]);
52 double py = pt * sin(par[4]);
53 double pz = pt / tan(par[3]);
54 double p = sqrt(pt * pt + pz * pz);
55
56 vect[3] = px / p;
57 vect[4] = py / p;
58 vect[5] = pz / p;
59 vect[6] = p;
60 charge = -d_sign( 1., par[5]);
61 poscur = 0.;
62//std::cout <<"VkGrkuta vect="<<vect[0]<<", "<<vect[1]<<", "<<vect[2]<<", "<<vect[3]<<", "
63// <<vect[4]<<", "<<vect[5]<<", "<<vect[6]<<'\n';
64 while(fabs(poscur) < fabs(totway)) {
65 posold = poscur;
66 d__1 = fabs(poscur) + stmg;
67 d__2 = fabs(totway);
68 poscur = d__1 < d__2 ? d__1 : d__2;
69 poscur = d_sign(poscur, totway);
70 dstep = poscur - posold;
71 vkgrkuta_(charge, dstep, vect, vout, CONTROL);
72 vect[0] = vout[0];
73 vect[1] = vout[1];
74 vect[2] = vout[2];
75 vect[3] = vout[3];
76 vect[4] = vout[4];
77 vect[5] = vout[5];
78// safety for strongly nonuniform field
79 dX = vect[0]-xyzEnd[0];
80 dY = vect[1]-xyzEnd[1];
81 dZ = vect[2]-xyzEnd[2];
82 dist_left = sqrt( dX*dX + dY*dY + dZ*dZ);
83 if(dist_left < stmg) break; // arrived
84 }
85
86/* --- Now we are in the new point. Calculate track parameters */
87/* at new point with new mag.field */
88
89 constB = Trk::vkalMagFld::getMagFld(xyzEnd,CONTROL) * Trk::vkalMagFld::getCnvCst() ;
90 if(std::abs(constB)<0.001)constB=0.001; //Protection against zero field
91
92 dpar0[0] = 0.;
93 dpar0[1] = 0.;
94 dpar0[2] = acos(vout[5]);
95 dpar0[3] = atan2(vout[4], vout[3]);
96// if (dpar0[3] < 0.) dpar0[3] += 6.2831853071794;
97
98 px = vect[3] * vect[6];
99 py = vect[4] * vect[6];
100 dpar0[4] = d_sign( (constB/sqrt(px*px+py*py)), par[5]); /* new value of curvature */
101 ich = (long int) charge;
102 xyzst[0] = xyzEnd[0] - vout[0];
103 xyzst[1] = xyzEnd[1] - vout[1];
104 xyzst[2] = xyzEnd[2] - vout[2];
105
106 cfnewp(ich, dpar0, xyzst, &dp, parn, perig); // Last step of propagation
107 closePoint[0] = perig[0] + vout[0]; // with simple program
108 closePoint[1] = perig[1] + vout[1];
109 closePoint[2] = perig[2] + vout[2];
110}
double charge(const T &p)
Definition AtlasPID.h:997
void cfnewp(const long int ich, double *parold, double *ref, double *s, double *parnew, double *per)
Definition cfNewP.cxx:10
void vkgrkuta_(const double charge, const double step, double *vect, double *vout, VKalVrtControlBase *CONTROL)
Definition VKgrkuta.cxx:14

◆ cfpest()

void Trk::cfpest ( int ntrk,
double * xyz,
long int * ich,
double(*) parst[5],
double(*) parf[3] )

Definition at line 10 of file cfPEst.cxx.

11 {
12 /* --------------------------------------------------- */
13 /* Subroutine for primary estimation of Theta,Phi */
14 /* and 1/R at point XYZ if they aren't known */
15 /* Author: V.Kostyukhin */
16 /* --------------------------------------------------- */
17
18 double partmp[5];
19 double Ref0[3] = {0., 0., 0.};
20
21 for (int i = 0; i < ntrk; ++i) {
22
23 long int TrkID = i;
24 Trk::vkalPropagator::Propagate(TrkID, ich[i], &parst[i][0], nullptr, Ref0,
25 xyz, partmp, nullptr);
26
27 parf[i][0] = partmp[2];
28 parf[i][1] = partmp[3];
29 parf[i][2] = partmp[4];
30 }
31}
#define xyz

◆ cfsetdiag()

void Trk::cfsetdiag ( long int n,
double * matr,
double value )
noexcept

Definition at line 236 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Utilities.cxx.

237{
238 long int i, j, ij;
239 --matr;
240
241 ij = 0;
242 for (i = 1; i <= n; ++i) {
243 for (j = 1; j <= i; ++j) {
244 ++ij;
245 matr[ij] = 0.;
246 if (i == j) {
247 matr[ij] = value;
248 }
249 }
250 }
251}

◆ cfSmallEigenvalue()

double Trk::cfSmallEigenvalue ( double * cov,
long int n )

Definition at line 450 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Matrix.cxx.

451{
452 if (n > 100 || n <= 1) return -1;
453 double eig[100];
454 vkGetEigVal(cov, eig, n);
455
456 return eig[0];
457}
void vkGetEigVal(const double ci[], double d[], int n)

◆ cfTrkCovarCorr()

void Trk::cfTrkCovarCorr ( double * cov)

Definition at line 290 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Utilities.cxx.

290 {
291// std::cout<<cov[1]*cov[1]/cov[0]/cov[2]<<'\n';
292// std::cout<<cov[3]*cov[3]/cov[0]/cov[5]<<", "<<cov[4]*cov[4]/cov[2]/cov[5]<<'\n';
293// std::cout<<cov[6]*cov[6]/cov[0]/cov[9]<<", "<<cov[7]*cov[7]/cov[2]/cov[9]<<", "<<cov[8]*cov[8]/cov[5]/cov[9]<<'\n';
294// std::cout<<cov[10]*cov[10]/cov[0]/cov[14]<<", "<<cov[11]*cov[11]/cov[2]/cov[14]<<", "<<cov[12]*cov[12]/cov[5]/cov[14]<<
295// ", "<<cov[13]*cov[13]/cov[9]/cov[14]<<'\n';
296 double Lim=0.99; double Lim2=Lim*Lim;
297 bool i0,i1,i2,i3,i4; i0=i1=i2=i3=i4=false;
298 if( std::abs(cov[1]*cov[1])/cov[0]/cov[2] > Lim2 ){ i0=true; i1=true;}
299 if( std::abs(cov[3]*cov[3])/cov[0]/cov[5] > Lim2 ){ i0=true; i2=true;}
300 if( std::abs(cov[4]*cov[4])/cov[2]/cov[5] > Lim2 ){ i1=true; i2=true;}
301 if( std::abs(cov[6]*cov[6])/cov[0]/cov[9] > Lim2 ){ i0=true; i3=true;}
302 if( std::abs(cov[7]*cov[7])/cov[2]/cov[9] > Lim2 ){ i1=true; i3=true;}
303 if( std::abs(cov[8]*cov[8])/cov[5]/cov[9] > Lim2 ){ i2=true; i3=true;}
304 if( std::abs(cov[10]*cov[10])/cov[0]/cov[14] > Lim2 ){ i0=true; i4=true;}
305 if( std::abs(cov[11]*cov[11])/cov[2]/cov[14] > Lim2 ){ i1=true; i4=true;}
306 if( std::abs(cov[12]*cov[12])/cov[5]/cov[14] > Lim2 ){ i2=true; i4=true;}
307 if( std::abs(cov[13]*cov[13])/cov[9]/cov[14] > Lim2 ){ i3=true; i4=true;}
308
309 if(i0){ cov[1]*=Lim; cov[3]*=Lim; cov[6]*=Lim; cov[10]*=Lim; }
310 if(i1){ cov[1]*=Lim; cov[4]*=Lim; cov[7]*=Lim; cov[11]*=Lim; }
311 if(i2){ cov[3]*=Lim; cov[4]*=Lim; cov[8]*=Lim; cov[12]*=Lim; }
312 if(i3){ cov[6]*=Lim; cov[7]*=Lim; cov[8]*=Lim; cov[13]*=Lim; }
313 if(i4){ cov[10]*=Lim; cov[11]*=Lim; cov[12]*=Lim; cov[13]*=Lim; }
314}

◆ cfVrtDstSig()

double Trk::cfVrtDstSig ( VKVertex * vk,
bool UseTrkErr )

Definition at line 33 of file cfVrtDst.cxx.

34{
35 int i,j,ij,it;
36 double parV0[5], covParV0[15];
37 double Signif;
38 /* ------------------------------------------------------------------- */
39
40 double ptot[3]= {0.,0.,0.};
41 int NTRK = vk->TrackList.size();
42 for ( it=0; it<NTRK; it++) {
43 std::array<double, 4> pp=getCnstParticleMom( vk->TrackList[it].get(), vk );
44 ptot[0] += pp[0];
45 ptot[1] += pp[1];
46 ptot[2] += pp[2];
47 }
48 double fittedVrt[3]={vk->refIterV[0] + vk->cnstV[0],
49 vk->refIterV[1] + vk->cnstV[1],
50 vk->refIterV[2] + vk->cnstV[2]};
51 long int Charge = 0; for ( it=0; it<NTRK; it++) Charge += vk->TrackList[it]->Charge;
52//std::cout<<" cfVrtDst ntrk="<<NTRK<<" chg="<<Charge<<'\n';
53 double localField=Trk::vkalMagFld::getMagFld(fittedVrt,(vk->vk_fitterControl).get());
54 if ( UseTrkErr){
55 combinedTrack( Charge, ptot, vk->fitCovXYZMom, localField, parV0, covParV0);
56 }else{
57 double DummyErr[21] = { 1.e-20,
58 0., 1.e-20,
59 0., 0., 1.e-20,
60 0., 0., 0., 1.e-18,
61 0., 0., 0., 0., 1.e-18,
62 0., 0., 0., 0., 0., 1.e-18};
63 combinedTrack( Charge, ptot, DummyErr, localField, parV0, covParV0);
64 }
65//
66// Propagation to constraint vertex
67//
68 double nPar[5],nCov[15];
69 long int TrkID = -999; // Abstract track propagation
70 Trk::vkalPropagator::Propagate( TrkID, Charge, parV0, covParV0, fittedVrt, vk->FVC.vrt, nPar, nCov, (vk->vk_fitterControl).get());
71//
72//
73 double cnv[2][3];
74 cnv[0][0] = -sin(nPar[3]);
75 cnv[0][1] = cos(nPar[3]);
76 cnv[0][2] = 0.;
77 cnv[1][0] = sin(nPar[3])/tan(nPar[2]);
78 cnv[1][1] = cos(nPar[3])/tan(nPar[2]);
79 cnv[1][2] = -1.;
80//--
81 double covImp[3]={0.,0.,0.};
82 for( i=0; i<3; i++){
83 for( j=0; j<3; j++){
84 if(i>=j){ ij=i*(i+1)/2+j; }else{ ij=j*(j+1)/2+i;}
85 covImp[0] += cnv[0][i]*vk->FVC.covvrt[ij]*cnv[0][j];
86 covImp[1] += cnv[0][i]*vk->FVC.covvrt[ij]*cnv[1][j];
87 covImp[2] += cnv[1][i]*vk->FVC.covvrt[ij]*cnv[1][j];
88 }
89 }
90 if ( UseTrkErr){ covImp[0] += nCov[0]; covImp[1] += nCov[1]; covImp[2] += nCov[2];}
91
92 double dwgt[3];
93 int IERR=cfdinv(covImp, dwgt, -2); if(IERR){ IERR=cfdinv(covImp, dwgt, 2); if(IERR){dwgt[0]=dwgt[2]=1.e6; dwgt[1]=0.;}}
94 Signif = sqrt(dwgt[0] * nPar[0] * nPar[0] + 2. * dwgt[1] * nPar[0] * nPar[1] +
95 dwgt[2] * nPar[1] * nPar[1]);
96
97//std::cout<<" fittedcov="<<nCov[0]<<", "<<nCov[2]<<'\n';
98//std::cout<<" cfVrtDstSig="<<Signif<<", "<<nPar[0]<<", "<<nPar[1]<<'\n';
99 return Signif;
100}
double fitCovXYZMom[21]
void combinedTrack(long int ICH, double *pv0, double *covi, double BMAG, double *par, double *covo)
Definition XYZtrp.cxx:113
double covvrt[6]
Definition ForVrtClose.h:23

◆ combinedTrack()

void Trk::combinedTrack ( long int ICH,
double * pv0,
double * covi,
double BMAG,
double * par,
double * covo )

Definition at line 113 of file XYZtrp.cxx.

114{
115
116 double cnv[36]; /* was [6][6] */
117/* ---------------------------------------------------------- */
118/* Subroutine for convertion for VKalvrtCore */
119/* Correct magnetic field BMAG at conversion point */
120/* is provided externally. */
121/* (X,Y,Z,PX,PY,PZ) --> (eps,z,theta,phi,1/r) */
122/* Input: */
123/* ICH - charge of track ( +1,0,-1 ) */
124/* PV0(3) - Momentum of particle */
125/* COVI(21) - simmetric covariance matrix */
126/* Output: */
127/* PARO(5) - (eps,z,theta,phi,1/r) */
128/* ERRT(15) - simmetric error matrix */
129/* NO PROPAGATION IS DONE!!!! */
130/* For ICH=0 PARO(5) = const/pt */
131/* Author: V.Kostyukhin */
132/* ---------------------------------------------------------- */
133
134 double constBF =BMAG * vkalMagCnvCst;
135
136 double pt = sqrt(pv0[0]*pv0[0] + pv0[1]*pv0[1]);
137 double pp = pt*pt + pv0[2]*pv0[2];
138 double cs = pv0[0] / pt;
139 double sn = pv0[1] / pt;
140 double ctg = pv0[2] / pt;
141 double rho = ICH * constBF / pt;
142 if ( ICH==0 )rho = constBF / pt;
143/* -- Output parameters */
144 par[0] = 0.; /* (-Yv*cos + Xv*sin) */
145 par[1] = 0.; /* Zv - cotth*(Xv*cos + Yv*sin) */
146 par[2] = acos(pv0[2] / sqrt(pp));
147 if(par[2]<1.e-5)par[2]=1.e-5;
148 if(par[2]>M_PI-1.e-5) par[2]=M_PI-1.e-5;
149 par[3] = atan2(pv0[1], pv0[0]);
150 par[4] = rho;
151 if ( ICH==0 )par[4] = constBF / pt;
152//
153 double dTheta_dPx = pv0[0]*pv0[2]/(pt*pp); //dTheta/dPx
154 double dTheta_dPy = pv0[1]*pv0[2]/(pt*pp); //dTheta/dPy
155 double dTheta_dPz = -pt/pp; //dTheta/dPz
156 double dPhi_dPx = -pv0[1]/(pt*pt); //dPhi/dPx
157 double dPhi_dPy = pv0[0]/(pt*pt); //dPhi/dPy
158 double dPhi_dPz = 0; //dPhi/dPz
159 double dRho_dPx = -pv0[0]/(pt*pt) * rho; //dInvR/dPx
160 double dRho_dPy = -pv0[1]/(pt*pt) * rho; //dInvR/dPy
161 double dRho_dPz = 0.; //dInvR/dPz
162//---
163 cnv_ref(1, 1) = sn;
164 cnv_ref(2, 1) = -cs;
165 cnv_ref(3, 1) = 0.;
166 cnv_ref(4, 1) = 0.;
167 cnv_ref(5, 1) = 0.;
168 cnv_ref(6, 1) = 0.;
169
170 cnv_ref(1, 2) = -cs * ctg;
171 cnv_ref(2, 2) = -sn * ctg;
172 cnv_ref(3, 2) = 1.;
173 cnv_ref(4, 2) = 0.;
174 cnv_ref(5, 2) = 0.;
175 cnv_ref(6, 2) = 0.;
176
177 cnv_ref(1, 3) = 0.;
178 cnv_ref(2, 3) = 0.;
179 cnv_ref(3, 3) = 0.;
180 cnv_ref(4, 3) = dTheta_dPx;
181 cnv_ref(5, 3) = dTheta_dPy;
182 cnv_ref(6, 3) = dTheta_dPz;
183
184 cnv_ref(1, 4) = 0.;
185 cnv_ref(2, 4) = 0.;
186 if(ICH) cnv_ref(1, 4) = -cs * rho; //For charged tracks only
187 if(ICH) cnv_ref(2, 4) = -sn * rho; //
188 cnv_ref(3, 4) = 0.;
189 cnv_ref(4, 4) = dPhi_dPx;
190 cnv_ref(5, 4) = dPhi_dPy;
191 cnv_ref(6, 4) = dPhi_dPz;
192
193 cnv_ref(1, 5) = 0.;
194 cnv_ref(2, 5) = 0.;
195 cnv_ref(3, 5) = 0.;
196 cnv_ref(4, 5) = dRho_dPx;
197 cnv_ref(5, 5) = dRho_dPy;
198 cnv_ref(6, 5) = dRho_dPz;
199 tdasatVK(cnv, covi , covo, 5, 6);
200}
#define cnv_ref(a_1, a_2)

◆ consistentSurfaces() [1/2]

template<typename U, typename ... T>
bool Trk::consistentSurfaces ( U a,
T... b )

Definition at line 23 of file SurfaceConsistencyCheck.h.

23 {
24 if (a==nullptr) return (consistentSurfaces(b...));
25 return (((b!=nullptr)?(a->associatedSurface() == b->associatedSurface()):true) and ...);
26 }
bool consistentSurfaces(U)

◆ consistentSurfaces() [2/2]

template<typename U>
bool Trk::consistentSurfaces ( U )

Definition at line 17 of file SurfaceConsistencyCheck.h.

17 {
18 return true;
19 }

◆ copyFullMtx()

void Trk::copyFullMtx ( const double * Input,
long int IPar,
long int IDIM,
double * Target,
long int TStart,
long int TDIM )

Definition at line 246 of file CascadeUtils.cxx.

248{
249 int i,j,it,jt;
250 for( i=0; i<IPar; i++){
251 for( j=0; j<IPar; j++){
252 it=i+TStart; jt=j+TStart;
253 Target[it*TDIM+jt] = Input[i*IDIM+j];
254 }
255 }
256}
NswErrorCalibData::Input Input

◆ d_sign()

double Trk::d_sign ( double value,
double sign )
inline

Definition at line 33 of file TrkVKalUtils.h.

34 {
35 if( value >= 0){
36 if (sign >=0) return value;
37 if (sign < 0) return -value;
38 }
39 if( value < 0){
40 if (sign >=0) return -value;
41 if (sign < 0) return value;
42 }
43 return value;
44 }
int sign(int a)

◆ decomposeTransform()

void Trk::decomposeTransform ( const Amg::Transform3D & transform,
double * values )

Definition at line 57 of file AlignModule.cxx.

58 {
59 Amg::Vector3D translation = transform.translation();
60 values[0]=translation.x();
61 values[1]=translation.y();
62 values[2]=translation.z();
63
64 Amg::RotationMatrix3D rotation = transform.rotation();
65
66 double sinbeta = rotation(2,0);
67 if(fabs(sinbeta) < 0.99999 ){
68
69// double invcosbeta = 1./std::sqrt(1.-sinbeta*sinbeta);
70// double sinalpha = rotation(2,1)*invcosbeta;
71// double singamma = rotation(1,0)*invcosbeta;
72// std::cout << "Alpha " << -std::asin(sinalpha) << " " << -std::atan2( -rotation(2,1), rotation(2,2) )<< std::endl;
73// std::cout << "Beta " << -std::asin(sinbeta) << " " << std::acos(1./invcosbeta) << std::endl;
74// std::cout << "Gamma " << -std::asin(singamma) << " " << -std::atan2( -rotation(1,0), rotation(0,0 )) << std::endl;
75
76 values[3]=-std::atan2( -rotation(2,1), rotation(2,2) );
77 values[4]=-std::asin(sinbeta);
78 values[5]=-std::atan2( -rotation(1,0), rotation(0,0) ) ;
79 if (values[3] == 0) values[3] = 0; // convert -0 to 0
80 if (values[5] == 0) values[5] = 0; // convert -0 to 0
81
82 } else {
83 double alphaPlusGamma = std::asin( rotation(0,1) );
84 values[3] = alphaPlusGamma;
85 values[5] = 0;
86 if( sinbeta > 0 )
87 values[4] = M_PI * 0.5;
88 else
89 values[4] = -M_PI * 0.5;
90 }
91
92 }
Eigen::Matrix< double, 3, 3 > RotationMatrix3D

◆ detTypeStr()

std::string Trk::detTypeStr ( AlignModule::DetectorType detType)

returns the detector type

Definition at line 177 of file AlignModule.cxx.

178 {
179 std::string typeStr;
180 switch (detType) {
182 typeStr="none"; break;
184 typeStr="Pixel"; break;
185 case AlignModule::SCT:
186 typeStr="SCT"; break;
187 case AlignModule::TRT:
188 typeStr="TRT"; break;
189 case AlignModule::MDT:
190 typeStr="MDT"; break;
191 case AlignModule::CSC:
192 typeStr="CSC"; break;
193 case AlignModule::RPC:
194 typeStr="RPC"; break;
195 case AlignModule::TGC:
196 typeStr="TGC"; break;
198 typeStr="NDetectorTypes"; break;
199 }
200 return typeStr;
201 }

◆ dsinv()

void Trk::dsinv ( long int n,
double * a,
long int DIM,
long int * ifail )
noexcept

Definition at line 517 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Matrix.cxx.

518{
519 long int a_dim1, a_offset, i__1, i__2, i__3;
520 long int i__, j, k, l;
521 double s1, s31, s32, s33;
522 long int jm1, jm2, jp1;
523
524
525 /* Parameter adjustments */
526 a_dim1 = DIM;
527 a_offset = a_dim1 + 1;
528 a -= a_offset;
529
530 /* Function Body */
531 jp1 = 0;
532 *ifail = 0;
533 i__1 = n;
534 for (j = 1; j <= i__1; ++j) {
535 if (a[j + j * a_dim1] <= 0.) {
536 goto L150;
537 }
538 a[j + j * a_dim1] = 1. / a[j + j * a_dim1];
539 if (j == n) {
540 goto L199;
541 }
542 jp1 = j + 1;
543 i__2 = n;
544 for (l = jp1; l <= i__2; ++l) {
545 a[j + l * a_dim1] = a[j + j * a_dim1] * a[l + j * a_dim1];
546 s1 = -a[l + (j + 1) * a_dim1];
547 i__3 = j;
548 for (i__ = 1; i__ <= i__3; ++i__) {
549 s1 = a[l + i__ * a_dim1] * a[i__ + (j + 1) * a_dim1] + s1;
550 }
551 a[l + (j + 1) * a_dim1] = -s1;
552 }
553 }
554L150:
555 *ifail = -1;
556 return;
557L199:
558
559 if (n == 1) {
560 goto L399;
561 }
562 a[(a_dim1 << 1) + 1] = -a[(a_dim1 << 1) + 1];
563 a[a_dim1 + 2] = a[(a_dim1 << 1) + 1] * a[(a_dim1 << 1) + 2];
564 if (n == 2) {
565 goto L320;
566 }
567 i__1 = n;
568 for (j = 3; j <= i__1; ++j) {
569 jm2 = j - 2;
570 i__2 = jm2;
571 for (k = 1; k <= i__2; ++k) {
572 s31 = a[k + j * a_dim1];
573 i__3 = jm2;
574 for (i__ = k; i__ <= i__3; ++i__) {
575 s31 = a[k + (i__ + 1) * a_dim1] * a[i__ + 1 + j * a_dim1] +
576 s31;
577 }
578 a[k + j * a_dim1] = -s31;
579 a[j + k * a_dim1] = -s31 * a[j + j * a_dim1];
580 }
581 a[j - 1 + j * a_dim1] = -a[j - 1 + j * a_dim1];
582 a[j + (j - 1) * a_dim1] = a[j - 1 + j * a_dim1] * a[j + j * a_dim1];
583 }
584L320:
585 j = 1;
586L323:
587 s33 = a[j + j * a_dim1];
588 if (j == n) goto L325;
589 jp1 = j + 1;
590 i__1 = n;
591 for (i__ = jp1; i__ <= i__1; ++i__) {
592 s33 = a[j + i__ * a_dim1] * a[i__ + j * a_dim1] + s33;
593 }
594L325:
595 a[j + j * a_dim1] = s33;
596 jm1 = j;
597 j = jp1;
598 i__1 = jm1;
599 for (k = 1; k <= i__1; ++k) {
600 s32 = 0.;
601 i__2 = n;
602 for (i__ = j; i__ <= i__2; ++i__) {
603 s32 = a[k + i__ * a_dim1] * a[i__ + j * a_dim1] + s32;
604 }
605 a[k + j * a_dim1] = s32;
606 a[j + k * a_dim1] = s32;
607 }
608 if (j < n) goto L323;
609L399:
610 return;
611}
l
Printing final latex table to .tex output file.

◆ dumpAlignTrackType()

std::string Trk::dumpAlignTrackType ( const AlignTrack::AlignTrackType type)

Definition at line 410 of file AlignTrack.cxx.

411 {
412 switch(type) {
413 case AlignTrack::Unknown: return "Unknown";
414 case AlignTrack::Original: return "Original";
415 case AlignTrack::NormalRefitted: return "NormalRefitted";
416 case AlignTrack::BeamspotConstrained: return "BeamspotConstrained";
417 case AlignTrack::VertexConstrained: return "VertexConstrained";
418 default: return "UNDEFINED";
419 }
420 }
@ NormalRefitted
normally refitted, without adding any pseudo-measurement
Definition AlignTrack.h:48
@ Original
not refitted, just copy constructed from original Track
Definition AlignTrack.h:47
@ Unknown
default type
Definition AlignTrack.h:46
@ BeamspotConstrained
refitted with beamspot constraint
Definition AlignTrack.h:49
@ VertexConstrained
refitted with vertex constraint
Definition AlignTrack.h:50

◆ efdCoef()

void Trk::efdCoef ( double Ga0,
double Gamb,
double Gab,
double Gw0,
double Gwb,
double alf,
double bet,
double w,
double & d,
double & e,
double & f )

Definition at line 269 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Utilities.cxx.

274{
275
276 e = (Gab + Gamb - 2.*Ga0)/bet/bet/2.;
277 f = (Gwb + Gamb - 2.*e*bet*bet - Gw0 - Ga0)/bet/(w-alf);
278 d = (Gab - Ga0 - e*bet*bet - f*alf*bet)/bet;
279}

◆ ErrorScalingCast()

template<typename T_res, typename T_src>
const T_res * Trk::ErrorScalingCast ( const T_src * src)

Definition at line 14 of file ErrorScalingCast.h.

14 {
15
16 if (T_res::s_type != src->type()) {
17 std::stringstream message;
18 message << "Invalid RIO_OnTrackErrorScaling type. Expected "
19 << T_res::s_type << " But Received " << src->type();
20
21 throw std::runtime_error(message.str());
22 }
23 return static_cast<const T_res*>(src);
24}

◆ finter()

double Trk::finter ( double y0,
double y1,
double y2,
double x0,
double x1,
double x2 )

Definition at line 128 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Utilities.cxx.

129{
130 double ret_val;
131 volatile double b1,b2; // To guarantee AMD==Intel
132
133/* ------------------------*/
134/* Function interpolation */
135/* Author: V.Kostyukhin */
136/* ------------------------*/
137 b1 = (y1 - y0) / (x1 - x0);
138 b2 = (y2 - y0 - b1 * (x2 - x0)) / (x2 - x0) / (x2 - x1);
139 if (std::abs(b2) < 1e-8) {
140 if (y2 <= y0 && y2 < y1) {
141 ret_val = x2;
142 } else if (y1 <= y0 && y1 < y2) {
143 ret_val = x1;
144 } else if (y0 < y1 && y0 < y2) {
145 ret_val = x0 + (x2 - x0) * .001;
146 } else {
147 ret_val = x2;
148 }
149 return ret_val;
150 }
151 ret_val = (x1 + x0) - ( b1 / b2 );
152//VK 14.08.2007 Check now is after call of this subroutine
153// double NegativeLim = x0 + (x2 - x0) * (-0.3);
154// if (ret_val <= x0) {
155// if (ret_val <= NegativeLim) ret_val = NegativeLim;
156// }
157 return ret_val/2.;
158}

◆ fitVertexCascade()

int Trk::fitVertexCascade ( VKVertex * vk,
int Pointing )

Definition at line 89 of file CFitCascade.cxx.

90{
91//-------------------------------------------------------------------------
92// Fits single vertex in cascade (no iterations , just a single fit!!!)
93// creates summary track after it and fills corresponding track parameters
94// in next vertex in cascade
95//
96// Procedure assumes that "included tracks"(from vertices) are already
97// recalculated in predecessor vertices fits.
98//
99// Pointing=0 (false) - for combined track FITTED at vertex parameters are used
100// ^^^^^^ better convergence
101// Pointing=1 (true) - for combined track GUESSED(ini) at GUESSED(ini) vertex
102// parameters are used together with afterfit error matrix.
103// It's needed for correct treatment of pointing
104//-------------------------------------------------------------------------
105//
106// Fit itself. First get magnetic field at iteration reference point
107//
108 vk->vk_fitterControl->vk_forcft.localbmag=Trk::vkalMagFld::getMagFld(vk->refIterV,(vk->vk_fitterControl).get());
109
110
111//
112//-------- Check if pointing constraint exists
113//
114 bool existPointingCnst=false;
115 for(int ic=0; ic<(int)vk->ConstraintList.size(); ic++){
116 if(vk->ConstraintList[ic]->getType() == VKConstraintType::Point) { existPointingCnst=true; break; }
117 }
118//
119//-------- Then fit
120//
121 applyConstraints(vk); //apply all constraints in vertex
122 int IERR = vtcfit( vk );
123 if(IERR) return IERR;
124//
125//fit vertex once more with resolved constraints to prevent oscillations
126// if(Pointing){
127// double targVrt[3]={vk->refIterV[0] + vk->fitV[0],vk->refIterV[1] + vk->fitV[1],vk->refIterV[2] + vk->fitV[2]};
128// vk->vk_fitterControl->vk_forcft.localbmag=myMagFld.getMagFld(vk->targVrt,(vk->vk_fitterControl).get());
129// vk->setRefIterV(targVrt);
130// vk->iniV[0]=vk->fitV[0]=vk->cnstV[0]=vk->iniV[1]=vk->fitV[1]=vk->cnstV[1]=vk->iniV[2]=vk->fitV[2]=vk->cnstV[2]=0.;
131// for(int it=0; it<(int)vk->TrackList.size(); it++){
132// VKTrack * trk = vk->TrackList[it];
133// trk->cnstP[0] = trk->iniP[0] = trk->fitP[0]; // for constraint calculation on next step
134// trk->cnstP[1] = trk->iniP[1] = trk->fitP[1];
135// trk->cnstP[2] = trk->iniP[2] = trk->fitP[2];
136// }
137// applyConstraints(vk); //apply all constraints in vertex
138// int IERR = vtcfit( vk );
139// if(IERR) return IERR;
140// }
141//
142// Fill fitted combined track in next vertex (if needed)
143//
144 if(vk->nextCascadeVrt){
145 FullMTXfill(vk, vk->ader);
146 VKTrack * target_trk = getCombinedVTrack(vk); // get address of combined track
147 if( target_trk == nullptr ) return -12;
148
149 long int Charge=getVertexCharge(vk);
150 if(Charge!=0) Charge=std::copysign(1,Charge);
151 target_trk->Charge=Charge;
152
153 double dptot[4],VrtMomCov[21];
154 double parV0[5],covParV0[15],tmpCov[15],fittedVrt[3];
155 if(Pointing){
156 IERR = afterFitWithIniPar( vk, vk->ader, vk->FVC.dcv, dptot, VrtMomCov, (vk->vk_fitterControl).get());
157 fittedVrt[0]=vk->refIterV[0]+vk->iniV[0];
158 fittedVrt[1]=vk->refIterV[1]+vk->iniV[1];
159 fittedVrt[2]=vk->refIterV[2]+vk->iniV[2];
160 }
161 else{
162 IERR = afterFit( vk, vk->ader, vk->FVC.dcv, dptot, VrtMomCov, (vk->vk_fitterControl).get());
163 fittedVrt[0]=vk->refIterV[0]+vk->fitV[0];
164 fittedVrt[1]=vk->refIterV[1]+vk->fitV[1];
165 fittedVrt[2]=vk->refIterV[2]+vk->fitV[2];
166 }
167 if (IERR) return -13; /* NONINVERTIBLE COV.MATRIX */
168 cfdcopy( dptot, vk->fitMom, 3); //save Momentum
169 cfdcopy(VrtMomCov, vk->fitCovXYZMom, 21); //save XYZMom covariance
170//
171//-- Solution (not ideal!) of cascade covariance problem.
172//-- Covariance of pseudo-particle must be calculated WITHOUT pointing constraint ALWAYS!.
173//
174// if(existPointingCnst){ // use saved matrix without pointing constraint
175// cfdcopy( vk->savedVrtMomCov, VrtMomCov, 21);
176// }else{ // save computed matrix for further use
177// cfdcopy( VrtMomCov, vk->savedVrtMomCov, 21);
178// }
179 if(existPointingCnst){ // add pointed vertex covariance to track
180 for(int km=0; km<6; km++) VrtMomCov[km] += vk->nextCascadeVrt->fitCovXYZMom[km];
181 if(vk->nextCascadeVrt->TrackList[0]->Id>0){ //There is at least one real track in this vertex
182 VrtMomCov[0] *= 1000.;
183 VrtMomCov[2] *= 1000.;
184 VrtMomCov[5] *= 1000.;
185 VrtMomCov[9] *= 1000.;
186 VrtMomCov[14] *= 1000.;
187 VrtMomCov[20] *= 1000.;
188 }
189 }
190//
191// Particle creation and propagation
192 double localField=Trk::vkalMagFld::getMagFld(fittedVrt,(vk->vk_fitterControl).get());
193 combinedTrack( Charge, dptot, VrtMomCov, localField, parV0, covParV0);
194 covParV0[0]=std::abs(covParV0[0]); covParV0[2]=std::abs(covParV0[2]); covParV0[5]=std::abs(covParV0[5]);
195 covParV0[9]=std::abs(covParV0[9]); covParV0[14]=std::abs(covParV0[14]); //VK protection against numerical problems
196 Trk::vkalPropagator::Propagate(-999, Charge, parV0, covParV0, fittedVrt,
197 vk->nextCascadeVrt->refIterV, target_trk->Perig, tmpCov, (vk->vk_fitterControl).get());
198// IERR=cfInv5(tmpCov, target_trk->WgtM); if (IERR) IERR=cfdinv(tmpCov, target_trk->WgtM, 5);
199// target_trk->iniP[0]=target_trk->cnstP[0]=target_trk->fitP[0]=target_trk->Perig[2]; //initial guess
200// target_trk->iniP[1]=target_trk->cnstP[1]=target_trk->fitP[1]=target_trk->Perig[3];
201// target_trk->iniP[2]=target_trk->cnstP[2]=target_trk->fitP[2]=target_trk->Perig[4];
202 if( target_trk->fitP[2] == 0.){
203 target_trk->iniP[0]=target_trk->cnstP[0]=target_trk->Perig[2]; //initial guess
204 target_trk->iniP[1]=target_trk->cnstP[1]=target_trk->Perig[3];
205 target_trk->iniP[2]=target_trk->cnstP[2]=target_trk->Perig[4];
206 }else if(Pointing){
207 target_trk->iniP[0]=target_trk->cnstP[0]=target_trk->fitP[0]; //initial guess
208 target_trk->iniP[1]=target_trk->cnstP[1]=target_trk->fitP[1];
209 target_trk->iniP[2]=target_trk->cnstP[2]=target_trk->fitP[2];
210 }else{
211 target_trk->iniP[0]=target_trk->cnstP[0]=(target_trk->fitP[0]+target_trk->Perig[2])/2.; //initial guess
212 target_trk->iniP[1]=target_trk->cnstP[1]=(target_trk->fitP[1]+target_trk->Perig[3])/2.;
213 target_trk->iniP[2]=target_trk->cnstP[2]=(target_trk->fitP[2]+target_trk->Perig[4])/2.;
214 }
215 if(tmpCov[0]>1.e12 || tmpCov[2]>1.e12) return -18; //Something is wrong in combined track creation
216 if(Pointing){tmpCov[0] += target_trk->Perig[0]*target_trk->Perig[0]; tmpCov[2] += target_trk->Perig[1]*target_trk->Perig[1];}
217 tmpCov[0] += 0.0001*0.0001; tmpCov[2] += 0.0002*0.0002; //numerical accuracy protection
218
219 IERR=cfInv5(tmpCov, target_trk->WgtM); if (IERR) IERR=cfdinv(tmpCov, target_trk->WgtM, 5);
220 if (IERR) return -15; /* NONINVERTIBLE COV.MATRIX */
221 }
222//
223// For passing near vertex constraint. Normally first(mother) vertex of cascade
224// Now used also for "close to vertex" mode for cascade
225// For last in structure (mother in cascade...) always calculate it - needed for pointing
226//
227 CascadeEvent & cascadeEvent_ = *(vk->vk_fitterControl->getCascadeEvent());
228 if( vk->passNearVertex || vk==cascadeEvent_.cascadeVertexList[cascadeEvent_.cascadeNV-1].get()){
229 double dptot[4],VrtMomCov[21];
230 IERR = afterFit( vk, vk->ader, vk->FVC.dcv, dptot, VrtMomCov, (vk->vk_fitterControl).get());
231 if (IERR) return -13; /* NONINVERTIBLE COV.MATRIX */
232 cfdcopy( dptot, vk->fitMom, 3); //save Momentum
233 cfdcopy(VrtMomCov, vk->fitCovXYZMom, 21); //save XYZMom covariance
234 }
235 return 0;
236}
void FullMTXfill(VKVertex *vk, double *ader)
Definition FullMtx.cxx:19
int cfInv5(double *cov, double *wgt)
int afterFitWithIniPar(VKVertex *vk, double *ader, double *dcv, double *ptot, double *VrtMomCov, const VKalVrtControlBase *CONTROL)
Definition cfTotCov.cxx:83
VKTrack * getCombinedVTrack(VKVertex *vk)
int vtcfit(VKVertex *vk)
Definition VtCFit.cxx:293
long int getVertexCharge(VKVertex *vk)
void applyConstraints(VKVertex *vk)
Definition stCnst.cxx:22
double dcv[6 *(vkalNTrkM *3+3)]
Definition ForVrtClose.h:31

◆ fitVertexCascadeScale()

int Trk::fitVertexCascadeScale ( VKVertex * vk,
double & distToVertex )

Definition at line 44 of file CFitCascadeScale.cxx.

45{
46//-------------------------------------------------------------------------
47// Fits single vertex in cascade (no iterations , just a single fit!!!)
48// creates summary track after it and fills corresponding track parameters
49// in next vertex in cascade
50//
51// "Near to vertex" pointing is used here with decreasing vertex errors
52//
53// Procedure assumes that "included tracks"(from vertices) are already
54// recalculated in predecessor vertices fits.
55//
56// Fit itself. First get magnetic field at iteration reference point
57//
58 distToVertex = 0.;
59 vk->vk_fitterControl->vk_forcft.localbmag=Trk::vkalMagFld::getMagFld(vk->refIterV,(vk->vk_fitterControl).get());
60
61
62//
63//-------- Then fit
64//
65 applyConstraints(vk); //apply all constraints in vertex
66 int IERR = vtcfit( vk );
67 if(IERR) return IERR;
68//
69//
70// Fill fitted combined track in next vertex (if needed)
71//
72 double dptot[4],VrtMomCov[21];
73 IERR = afterFit( vk, vk->ader, vk->FVC.dcv, dptot, VrtMomCov, (vk->vk_fitterControl).get());
74 if (IERR) return -13; /* NONINVERTIBLE COV.MATRIX */
75 cfdcopy( dptot, vk->fitMom, 3); //save Momentum
76 cfdcopy(VrtMomCov, vk->fitCovXYZMom, 21); //save XYZMom covariance
78 if(vk->FVC.Charge!=0)vk->FVC.Charge=std::copysign(1,vk->FVC.Charge);
79//
80 if(vk->nextCascadeVrt){
81 FullMTXfill(vk, vk->ader);
82 VKTrack * target_trk = getCombinedVTrack(vk); // get address of combined track
83 if( target_trk == nullptr ) return -12;
84
85 long int Charge=getVertexCharge(vk);
86 if(Charge!=0)Charge=std::copysign(1,Charge);
87 target_trk->Charge=Charge;
88
89 double parV0[5],covParV0[15],tmpCov[15],fittedVrt[3];
90 fittedVrt[0]=vk->refIterV[0]+vk->fitV[0];
91 fittedVrt[1]=vk->refIterV[1]+vk->fitV[1];
92 fittedVrt[2]=vk->refIterV[2]+vk->fitV[2];
93//
94// Particle creation and propagation
95 double localField=Trk::vkalMagFld::getMagFld(fittedVrt,(vk->vk_fitterControl).get());
96 combinedTrack( Charge, dptot, VrtMomCov, localField, parV0, covParV0);
97 covParV0[0]=std::abs(covParV0[0]); covParV0[2]=std::abs(covParV0[2]); covParV0[5]=fabs(covParV0[5]);
98 covParV0[9]=std::abs(covParV0[9]); covParV0[14]=std::abs(covParV0[14]); //VK protection against numerical problems
99 Trk::vkalPropagator::Propagate(-999, Charge, parV0, covParV0, fittedVrt,
100 vk->nextCascadeVrt->refIterV, target_trk->Perig, tmpCov, (vk->vk_fitterControl).get());
101//std::cout<<"testR,Z="<<target_trk->Perig[0]<<", "<<target_trk->Perig[1]<<'\n';
102 distToVertex = sqrt(target_trk->Perig[0]*target_trk->Perig[0]+target_trk->Perig[1]*target_trk->Perig[1]);
103 target_trk->iniP[0]=target_trk->cnstP[0]=target_trk->Perig[2]; //initial guess
104 target_trk->iniP[1]=target_trk->cnstP[1]=target_trk->Perig[3];
105 target_trk->iniP[2]=target_trk->cnstP[2]=target_trk->Perig[4];
106 IERR=cfInv5(tmpCov, target_trk->WgtM); if (IERR) IERR=cfdinv(tmpCov, target_trk->WgtM, 5);
107 if (IERR) return -15; /* NONINVERTIBLE COV.MATRIX */
108 for(int im=0; im<15; im++)target_trk->WgtM[im] /= vk->vk_fitterControl->getCascadeEvent()->getSCALE(); // Tighten pseudotrack errors
109 }
110//
111// Save refitted vertex position as target for predecessors
112 if(!vk->includedVrt.empty()){ // Save fitted vertex as target for "pass near" constraint in previous vertex
113 for(int pseu=0; pseu<(int)vk->includedVrt.size(); pseu++){
114// vk->includedVrt[pseu]->FVC.vrt[0] = (vk->refIterV[0] + vk->fitV[0] + vk->includedVrt[pseu]->FVC.vrt[0])/2.;
115// vk->includedVrt[pseu]->FVC.vrt[1] = (vk->refIterV[1] + vk->fitV[1] + vk->includedVrt[pseu]->FVC.vrt[1])/2.;
116// vk->includedVrt[pseu]->FVC.vrt[2] = (vk->refIterV[2] + vk->fitV[2] + vk->includedVrt[pseu]->FVC.vrt[2])/2.;
117 vk->includedVrt[pseu]->FVC.vrt[0] = vk->refIterV[0] + vk->fitV[0];
118 vk->includedVrt[pseu]->FVC.vrt[1] = vk->refIterV[1] + vk->fitV[1];
119 vk->includedVrt[pseu]->FVC.vrt[2] = vk->refIterV[2] + vk->fitV[2];
120 }
121 }
122 return 0;
123}
std::vector< VKVertex * > includedVrt

◆ fixPseudoTrackPt()

int Trk::fixPseudoTrackPt ( long int NPar,
double * fullMtx,
double * LSide,
CascadeEvent & cascadeEvent_ )

Definition at line 18 of file CascadeUtils.cxx.

19{
20
21 int iv,it,ivnext;
22 //Deliberately not make_unique to bypass inititalization
23 std::unique_ptr<double[]> DerivC( new double[NPar] );
24 std::unique_ptr<double[]> DerivP( new double[NPar] );
25 std::unique_ptr<double[]> DerivT( new double[NPar] );
26//
27 std::vector<double> vMagFld; double vBx,vBy,vBz;
28 for( iv=0; iv<cascadeEvent_.cascadeNV; iv++){
29 VKVertex * vk = cascadeEvent_.cascadeVertexList[iv].get();
30 Trk::vkalMagFld::getMagFld(vk->refIterV[0]+vk->iniV[0], vk->refIterV[1]+vk->iniV[1], vk->refIterV[2]+vk->iniV[2],vBx,vBy,vBz,(vk->vk_fitterControl).get());
31 vMagFld.push_back(vBz); // fill mag.fields for all vertices
32 }
33//
34 for( iv=0; iv<cascadeEvent_.cascadeNV; iv++){
35 int indCombTrk=-1;
36 int iniPosTrk=0; /* Start of track part of vertex in global matrix */
37 int posCombTrk=0; /* Conbined track position in global matrix */
38 VKVertex* vk = cascadeEvent_.cascadeVertexList[iv].get();
39 if(vk->nextCascadeVrt){ //next vertex exists
40 ivnext=-1; //index of next vertex in common structure
41 for(int ivt=0;ivt<cascadeEvent_.cascadeNV;ivt++)if(vk->nextCascadeVrt==cascadeEvent_.cascadeVertexList[ivt].get())ivnext=ivt;
42 if(ivnext<0){return -1;}; //error in cascade
43//
44 int NV=vk->nextCascadeVrt->includedVrt.size();
45 if(NV>0){
46 for(it=0; it<NV; it++)
47 if(vk->nextCascadeVrt->includedVrt[it] == vk)
48 indCombTrk=vk->nextCascadeVrt->TrackList.size() - NV + it; // index of combined track in next vertex track list
49 }
50 if(indCombTrk>=0){
51 iniPosTrk =cascadeEvent_.matrixPnt[iv]+3; /*Start of track part of vertex in global matrix */
52 posCombTrk =cascadeEvent_.matrixPnt[ivnext]+3+3*indCombTrk; /*Get position in global matrix */
53 }
54 if(posCombTrk==0 || iniPosTrk==0) {return -1;} //ERROR in cascade structure somewhere....
55//
56// Momentum of pseudo track in next vertex
57 for(int ivt=0; ivt<NPar; ivt++)DerivC[ivt]=DerivP[ivt]=DerivT[ivt]=0.;
58 DerivC[posCombTrk+2]=-1.;
59 DerivT[posCombTrk+0]=-1.;
60 DerivP[posCombTrk+1]=-1.;
61 std::array<double, 4> ppsum = getIniParticleMom( vk->nextCascadeVrt->TrackList[indCombTrk].get(), vMagFld[ivnext] ); // INI for pseudo
62 double csum=vk->nextCascadeVrt->TrackList[indCombTrk]->iniP[2]; // INI for pseudo
63 double ptsum=sqrt(ppsum[0]*ppsum[0] + ppsum[1]*ppsum[1]);
64 double sinth2sum=(ppsum[0]*ppsum[0] + ppsum[1]*ppsum[1])/(ppsum[0]*ppsum[0] + ppsum[1]*ppsum[1] + ppsum[2]*ppsum[2]);
65
66//
67// Momenta+Derivatives of tracks in vertex itself
68 for(it=0; it<(int)vk->TrackList.size(); it++){
69 std::array<double, 4> pp = getIniParticleMom( vk->TrackList[it].get(), vMagFld[iv]);
70 double curv=vk->TrackList[it]->iniP[2];
71 double pt=sqrt(pp[0]*pp[0] + pp[1]*pp[1]);
72 double cth=pp[2]/pt;
73 double sinth2=(pp[0]*pp[0] + pp[1]*pp[1])/(pp[0]*pp[0] + pp[1]*pp[1] + pp[2]*pp[2]);
74 DerivC[iniPosTrk+it*3+1] = csum/ptsum/ptsum*(ppsum[0]*pp[1]-ppsum[1]*pp[0]); // dC/dPhi_i
75 DerivC[iniPosTrk+it*3+2] = csum/ptsum/ptsum*(ppsum[0]*pp[0]+ppsum[1]*pp[1])/curv; // dC/dC_i
76 DerivP[iniPosTrk+it*3+1] = (ppsum[0]*pp[0]+ppsum[1]*pp[1])/ptsum/ptsum; // dPhi/dPhi_i
77 DerivP[iniPosTrk+it*3+2] = (ppsum[1]*pp[0]-ppsum[0]*pp[1])/ptsum/ptsum/curv; // dPhi/dC_i
78 DerivT[iniPosTrk+it*3+0] = (sinth2sum*pt)/(sinth2*ptsum); // dTheta/dTheta_i
79 DerivT[iniPosTrk+it*3+2] = (sinth2sum*pt*cth)/(curv*ptsum); // dTheta/dC_i
80 }
81// double iniV0Curv=myMagFld.getCnvCst()*vMagFld[iv]/sqrt(tpx*tpx+tpy*tpy); //initial PseudoTrack Curvature
82// if(csum<0)iniV0Curv *= -1.;
83// iniV0Curv *= vMagFld[ivnext]/vMagFld[iv]; //magnetic field correction
84//
85//fill Full Matrix and left side vector
86//
87//---- Momentum only
88// for(it=0; it<NPar; it++) fullMtx[ (NPar-1*(cascadeEvent_.cascadeNV-1)+1*iv )*NPar + it] = DerivC[it];
89// for(it=0; it<NPar; it++) fullMtx[ (NPar-1*(cascadeEvent_.cascadeNV-1)+1*iv ) + it*NPar] = DerivC[it];
90// LSide[ NPar-1*(cascadeEvent_.cascadeNV-1)+1*iv] = -iniV0Curv+csum;
91//---- Momentum+phi+theta //VK seems overshooting because direction is fixed by vertex-vertex pointing. Returns wrong error matrix
92 for(it=0; it<NPar; it++) fullMtx[ (NPar-3*(cascadeEvent_.cascadeNV-1)+3*iv )*NPar + it] = DerivT[it];
93 for(it=0; it<NPar; it++) fullMtx[ (NPar-3*(cascadeEvent_.cascadeNV-1)+3*iv+1)*NPar + it] = DerivP[it];
94 for(it=0; it<NPar; it++) fullMtx[ (NPar-3*(cascadeEvent_.cascadeNV-1)+3*iv+2)*NPar + it] = DerivC[it];
95 for(it=0; it<NPar; it++) fullMtx[ (NPar-3*(cascadeEvent_.cascadeNV-1)+3*iv ) + it*NPar] = DerivT[it];
96 for(it=0; it<NPar; it++) fullMtx[ (NPar-3*(cascadeEvent_.cascadeNV-1)+3*iv+1) + it*NPar] = DerivP[it];
97 for(it=0; it<NPar; it++) fullMtx[ (NPar-3*(cascadeEvent_.cascadeNV-1)+3*iv+2) + it*NPar] = DerivC[it];
98 VKTrack* cmbt=vk->nextCascadeVrt->TrackList[indCombTrk].get();
99 LSide[ NPar-3*(cascadeEvent_.cascadeNV-1)+3*iv ] = cmbt->iniP[0]-cmbt->Perig[2];
100 LSide[ NPar-3*(cascadeEvent_.cascadeNV-1)+3*iv+1] = cmbt->iniP[1]-cmbt->Perig[3];
101 LSide[ NPar-3*(cascadeEvent_.cascadeNV-1)+3*iv+2] = cmbt->iniP[2]-cmbt->Perig[4];
102 }
103
104 } //end of vertex cycle
105 return 0; //All ok
106}
std::vector< int > matrixPnt
std::array< double, 4 > getIniParticleMom(const VKTrack *trk, const VKVertex *vk)

◆ FullMCNSTfill()

int Trk::FullMCNSTfill ( VKVertex * vk,
double * ader,
double * LSide )

Definition at line 81 of file FullMtx.cxx.

82{
83 int i,j,k,l,ii,ic,it,jt;
84
85 int totNC=0; //total number of constraints
86 for(i=0; i<(int)vk->ConstraintList.size();i++)totNC += vk->ConstraintList[i]->NCDim;
87
88 int NTRK = vk->TrackList.size();
89 int NPar = 3*NTRK+3+totNC;
90// int NPar=3*NTrkM+3;
91
92 for (i=0; i<NPar; i++) { for (j=0; j<NPar; j++) ader[i+j*NPar]=0.; }
93 std::vector<std::vector< const Vect3DF*> > tf0t; // derivative collectors
94 std::vector< const Vect3DF* > th0t; // derivative collectors
95 std::vector< double > taa; // derivative collectors
96 std::vector< const Vect3DF* > tmpVec;
97 for(ii=0; ii<(int)vk->ConstraintList.size();ii++){
98 for(ic=0; ic<(int)vk->ConstraintList[ii]->NCDim; ic++){
99 taa.push_back( vk->ConstraintList[ii]->aa[ic] );
100 th0t.push_back( &(vk->ConstraintList[ii]->h0t[ic]) );
101 tmpVec.clear();
102 tmpVec.reserve(vk->ConstraintList[ii]->f0t.size());
103 for(it=0; it<(int)vk->ConstraintList[ii]->f0t.size(); it++){
104 tmpVec.push_back( &(vk->ConstraintList[ii]->f0t[it][ic]) );
105 }
106 tf0t.push_back( std::move(tmpVec) );
107 }
108 }
109//-----------------------------------------------------------------------------
110 ader[0*NPar+ 0] += vk->wa[0];
111 ader[0*NPar+ 1] += vk->wa[1];
112 ader[1*NPar+ 1] += vk->wa[2];
113 ader[0*NPar+ 2] += vk->wa[3];
114 ader[1*NPar+ 2] += vk->wa[4];
115 ader[2*NPar+ 2] += vk->wa[5];
116 ader[1*NPar+ 0] = ader[0*NPar+ 1];
117 ader[2*NPar+ 0] = ader[0*NPar+ 2];
118 ader[2*NPar+ 1] = ader[1*NPar+ 2];
119
120
121 for (it=0; it<NTRK; ++it) {
122 ader[0 + (it*3 + 3)*NPar] += vk->tmpArr[it]->wb[0];
123 ader[1 + (it*3 + 3)*NPar] += vk->tmpArr[it]->wb[1];
124 ader[2 + (it*3 + 3)*NPar] += vk->tmpArr[it]->wb[2];
125 ader[0 + (it*3 + 4)*NPar] += vk->tmpArr[it]->wb[3];
126 ader[1 + (it*3 + 4)*NPar] += vk->tmpArr[it]->wb[4];
127 ader[2 + (it*3 + 4)*NPar] += vk->tmpArr[it]->wb[5];
128 ader[0 + (it*3 + 5)*NPar] += vk->tmpArr[it]->wb[6];
129 ader[1 + (it*3 + 5)*NPar] += vk->tmpArr[it]->wb[7];
130 ader[2 + (it*3 + 5)*NPar] += vk->tmpArr[it]->wb[8];
131 }
132
133 for (it=0; it<NTRK; ++it) {
134 ader[(it*3 + 3) + (it*3 + 3)*NPar] += vk->tmpArr[it]->wc[0];
135 ader[(it*3 + 3) + (it*3 + 4)*NPar] += vk->tmpArr[it]->wc[1];
136 ader[(it*3 + 4) + (it*3 + 4)*NPar] += vk->tmpArr[it]->wc[2];
137 ader[(it*3 + 3) + (it*3 + 5)*NPar] += vk->tmpArr[it]->wc[3];
138 ader[(it*3 + 4) + (it*3 + 5)*NPar] += vk->tmpArr[it]->wc[4];
139 ader[(it*3 + 5) + (it*3 + 5)*NPar] += vk->tmpArr[it]->wc[5];
140 ader[(it*3 + 4) + (it*3 + 3)*NPar] += vk->tmpArr[it]->wc[1];
141 ader[(it*3 + 5) + (it*3 + 3)*NPar] += vk->tmpArr[it]->wc[3];
142 ader[(it*3 + 5) + (it*3 + 4)*NPar] += vk->tmpArr[it]->wc[4];
143 }
144/* symmetrisation */
145 for (i=0; i<NPar-1; i++) {
146 for (j=i+1; j<NPar; ++j) {
147 ader[j + i*NPar] = ader[i + j*NPar];
148 }
149 }
150//
151// For "passing near" constraint
152 if (vk->passNearVertex){
153 double drdpy[2][3],dpipj[3][3];
154 for (it = 0; it < NTRK; ++it) {
155 drdpy[0][0] = vk->tmpArr[it]->drdp[0][0] * vk->FVC.ywgt[0] + vk->tmpArr[it]->drdp[1][0] * vk->FVC.ywgt[1];
156 drdpy[1][0] = vk->tmpArr[it]->drdp[0][0] * vk->FVC.ywgt[1] + vk->tmpArr[it]->drdp[1][0] * vk->FVC.ywgt[2];
157 drdpy[0][1] = vk->tmpArr[it]->drdp[0][1] * vk->FVC.ywgt[0] + vk->tmpArr[it]->drdp[1][1] * vk->FVC.ywgt[1];
158 drdpy[1][1] = vk->tmpArr[it]->drdp[0][1] * vk->FVC.ywgt[1] + vk->tmpArr[it]->drdp[1][1] * vk->FVC.ywgt[2];
159 drdpy[0][2] = vk->tmpArr[it]->drdp[0][2] * vk->FVC.ywgt[0] + vk->tmpArr[it]->drdp[1][2] * vk->FVC.ywgt[1];
160 drdpy[1][2] = vk->tmpArr[it]->drdp[0][2] * vk->FVC.ywgt[1] + vk->tmpArr[it]->drdp[1][2] * vk->FVC.ywgt[2];
161 for (jt = 0; jt < NTRK; ++jt) { /* Matrix */
162 for (k=0; k<3; ++k) {
163 for (l=0; l<3; ++l) {
164 dpipj[k][l] = 0.;
165 for (j=0; j<2; ++j) {
166 dpipj[k][l] += vk->tmpArr[jt]->drdp[j][k] * drdpy[j][l];
167 }
168 }
169 }
170 for (k=0; k<3; ++k) {
171 for (l=0; l<3; ++l) {
172 ader[(it*3+3 +k) + (jt*3+3 +l)*NPar] += dpipj[l][k];
173 }
174 }
175 } // jt cycle
176 } // it cycle
177 }
178//
179// Part for lagrange multipliers
180//
181 int NTrP=NTRK*3 + 3; // track part of matrix
182 for(ic=0; ic<totNC; ic++){
183 ader[(0) + (NTrP+ic)*NPar] = -2.*th0t[ic]->X;
184 ader[(1) + (NTrP+ic)*NPar] = -2.*th0t[ic]->Y;
185 ader[(2) + (NTrP+ic)*NPar] = -2.*th0t[ic]->Z;
186 ader[(0)*NPar + (NTrP+ic) ] = -2.*th0t[ic]->X;
187 ader[(1)*NPar + (NTrP+ic) ] = -2.*th0t[ic]->Y;
188 ader[(2)*NPar + (NTrP+ic) ] = -2.*th0t[ic]->Z;
189 for (it=0; it<NTRK; ++it) {
190 ader[(it*3+3+0) + (NTrP+ic)*NPar] = - 2.*tf0t[ic][it]->X;
191 ader[(it*3+3+1) + (NTrP+ic)*NPar] = - 2.*tf0t[ic][it]->Y;
192 ader[(it*3+3+2) + (NTrP+ic)*NPar] = - 2.*tf0t[ic][it]->Z;
193 ader[(it*3+3+0)*NPar + (NTrP+ic)] = - 2.*tf0t[ic][it]->X;
194 ader[(it*3+3+1)*NPar + (NTrP+ic)] = - 2.*tf0t[ic][it]->Y;
195 ader[(it*3+3+2)*NPar + (NTrP+ic)] = - 2.*tf0t[ic][it]->Z;
196 }
197 }
198//
199// Left part
200//
201// double *LSide = new double[NPar];
202 LSide[0]=vk->T[0];
203 LSide[1]=vk->T[1];
204 LSide[2]=vk->T[2];
205 for (it=0; it<NTRK; ++it) {
206 LSide[it*3+3+0]=vk->tmpArr[it]->tt[0];
207 LSide[it*3+3+1]=vk->tmpArr[it]->tt[1];
208 LSide[it*3+3+2]=vk->tmpArr[it]->tt[2];
209 }
210 for(ic=0; ic<totNC; ic++){
211 LSide[NTRK*3+3+ic]=taa[ic];
212 }
213//--------------------------------------------------
214 //int IERR = vkMSolve(ader, LSide, NPar);
215 //std::cout<<"global="<<NPar<<" err="<<IERR<<'\n';
216 //std::cout<<" Vrt="<<LSide[0]<<", "<<LSide[1]<<", "<<LSide[2]<<'\n';
217 //for(it=0; it<NTRK; it++)std::cout<<" trk="<<LSide[it*3+3+0]<<", "
218 // <<LSide[it*3+3+1]<<", "<<LSide[it*3+3+2]<<'\n';
219 return NPar;
220}
std::vector< std::unique_ptr< TWRK > > tmpArr
int ic
Definition grepfile.py:33

◆ FullMTXfill()

void Trk::FullMTXfill ( VKVertex * vk,
double * ader )

Definition at line 19 of file FullMtx.cxx.

20{
21 int i,j,it;
22
23 int NTRK = vk->TrackList.size();
24 int NPar=3*NTRK+3;
25
26 for (i=0; i<NPar; i++) { for (j=0; j<NPar; j++) { ader_ref(i, j)=0.;} }
27
28 ader_ref(0, 0) += vk->wa[0];
29 ader_ref(0, 1) += vk->wa[1];
30 ader_ref(1, 1) += vk->wa[2];
31 ader_ref(0, 2) += vk->wa[3];
32 ader_ref(1, 2) += vk->wa[4];
33 ader_ref(2, 2) += vk->wa[5];
34 ader_ref(1, 0) = ader_ref(0, 1);
35 ader_ref(2, 0) = ader_ref(0, 2);
36 ader_ref(2, 1) = ader_ref(1, 2);
37
38
39 for (it=0; it<NTRK; ++it) {
40 ader_ref(0, it*3 + 3) += vk->tmpArr[it]->wb[0];
41 ader_ref(1, it*3 + 3) += vk->tmpArr[it]->wb[1];
42 ader_ref(2, it*3 + 3) += vk->tmpArr[it]->wb[2];
43 ader_ref(0, it*3 + 4) += vk->tmpArr[it]->wb[3];
44 ader_ref(1, it*3 + 4) += vk->tmpArr[it]->wb[4];
45 ader_ref(2, it*3 + 4) += vk->tmpArr[it]->wb[5];
46 ader_ref(0, it*3 + 5) += vk->tmpArr[it]->wb[6];
47 ader_ref(1, it*3 + 5) += vk->tmpArr[it]->wb[7];
48 ader_ref(2, it*3 + 5) += vk->tmpArr[it]->wb[8];
49 }
50
51 for (it=0; it<NTRK; ++it) {
52 ader_ref(it*3 + 3, it*3 + 3) += vk->tmpArr[it]->wc[0];
53 ader_ref(it*3 + 3, it*3 + 4) += vk->tmpArr[it]->wc[1];
54 ader_ref(it*3 + 4, it*3 + 4) += vk->tmpArr[it]->wc[2];
55 ader_ref(it*3 + 3, it*3 + 5) += vk->tmpArr[it]->wc[3];
56 ader_ref(it*3 + 4, it*3 + 5) += vk->tmpArr[it]->wc[4];
57 ader_ref(it*3 + 5, it*3 + 5) += vk->tmpArr[it]->wc[5];
58 ader_ref(it*3 + 4, it*3 + 3) += vk->tmpArr[it]->wc[1];
59 ader_ref(it*3 + 5, it*3 + 3) += vk->tmpArr[it]->wc[3];
60 ader_ref(it*3 + 5, it*3 + 4) += vk->tmpArr[it]->wc[4];
61 }
62/* symmetrisation */
63 for (i=0; i<NPar-1; i++) {
64 for (j=i+1; j<NPar; ++j) {
65 ader_ref(j, i) = ader_ref(i, j);
66 }
67 }
68//std::cout<<" FULLMTX NEW="<<ader_ref(0, 0)<<", "<<ader_ref(1, 1)<<", "<<ader_ref(2, 2)<<", "
69// <<ader_ref(3, 3)<<", "<<ader_ref(4, 4)<<", "<<ader_ref(5, 5)<<", "
70// <<ader_ref(0, 3)<<", "<<ader_ref(1, 4)<<", "<<ader_ref(3, 5)<<'\n';
71}
#define ader_ref(a_1, a_2)
Definition FullMtx.cxx:17

◆ getCascadeNPar()

int Trk::getCascadeNPar ( CascadeEvent & cascadeEvent_,
int Type )

Definition at line 133 of file CascadeUtils.cxx.

134{
135 int NV=cascadeEvent_.cascadeNV;
136 int NTrk=0;
137 int NCnst=0;
138 for( int iv=0; iv<cascadeEvent_.cascadeNV; iv++){
139 VKVertex *vk = cascadeEvent_.cascadeVertexList[iv].get();
140 NTrk += vk->TrackList.size();
141 for(int ic=0; ic<(int)vk->ConstraintList.size();ic++) NCnst += vk->ConstraintList[ic]->NCDim;
142 }
143 if(Type==1) return 3*(NV+NTrk); // Return amount of physics parameters
144 return 3*(NV+NTrk)+NCnst + 3*(cascadeEvent_.cascadeNV-1); //additional 3 momentum constraints
145 //return 3*(NV+NTrk)+NCnst + 1*(cascadeEvent_.cascadeNV-1); //additional 1 momentum constraints
146}

◆ getCnstParticleMom() [1/2]

std::array< double, 4 > Trk::getCnstParticleMom ( const VKTrack * trk,
const VKVertex * vk )

Definition at line 96 of file cfMomentum.cxx.

97{
98 std::array<double, 4> p{};
99 double cnstPos[3];
100 cnstPos[0]=vk->refIterV[0]+vk->cnstV[0];
101 cnstPos[1]=vk->refIterV[1]+vk->cnstV[1];
102 cnstPos[2]=vk->refIterV[2]+vk->cnstV[2];
103 double vBx,vBy,vBz,magConst;
104 Trk::vkalMagFld::getMagFld(cnstPos[0],cnstPos[1],cnstPos[2],vBx,vBy,vBz,(vk->vk_fitterControl).get());
105 magConst = Trk::vkalMagFld::getEffField(vBx, vBy, vBz, trk->cnstP[1], trk->cnstP[0]) * Trk::vkalMagFld::getCnvCst();
106
107 double cth = 1. / tan( trk->cnstP[0]);
108 double phi = trk->cnstP[1];
109 double pt = std::abs( magConst/trk->cnstP[2] );
110 double m = trk->getMass();
111 p[0] = pt * cos(phi);
112 p[1] = pt * sin(phi);
113 p[2] = pt * cth;
114 p[3] = sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2] + m*m );
115 return p;
116}
Scalar phi() const
phi method
double getMass() const

◆ getCnstParticleMom() [2/2]

std::array< double, 4 > Trk::getCnstParticleMom ( const VKTrack * trk,
double effectiveBMAG )

Definition at line 117 of file cfMomentum.cxx.

118{
119 std::array<double, 4> p{};
120 double magConst = effectiveBMAG * vkalMagCnvCst;
121
122 double cth = 1. / tan( trk->cnstP[0]);
123 double phi = trk->cnstP[1];
124 double pt = std::abs( magConst/trk->cnstP[2] );
125 double m = trk->getMass();
126 p[0] = pt * cos(phi);
127 p[1] = pt * sin(phi);
128 p[2] = pt * cth;
129 p[3] = sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2] + m*m );
130 return p;
131}

◆ getCnstValues2()

double Trk::getCnstValues2 ( VKVertex * vk)
noexcept

Definition at line 244 of file VtCFitC.cxx.

245{
246 if (vk->ConstraintList.empty()) return 0.;
247 double sumSQ=0.;
248 for(int ii=0; ii<(int)vk->ConstraintList.size();ii++){
249 for(int ic=0; ic<(int)vk->ConstraintList[ii]->NCDim; ic++){
250 sumSQ += (vk->ConstraintList[ii]->aa[ic])*(vk->ConstraintList[ii]->aa[ic]);
251 }
252 }
253 return sumSQ;
254}

◆ getCombinedVTrack()

VKTrack * Trk::getCombinedVTrack ( VKVertex * vk)

Definition at line 110 of file CascadeUtils.cxx.

111{
112 if(!vk->nextCascadeVrt) return nullptr; //nonpointing vertex
113 int NV=vk->nextCascadeVrt->includedVrt.size();
114 if(NV==0) return nullptr; //Error in structure
115
116 int itv=-1;
117 for(int it=0; it<NV; it++) if(vk->nextCascadeVrt->includedVrt[it] == vk) {itv=it; break;};
118 if(itv<0) return nullptr; // Not found in list
119
120 int totNT = vk->nextCascadeVrt->TrackList.size();
121 return vk->nextCascadeVrt->TrackList[totNT - NV + itv].get(); // pointer to combined track in next vertex
122}

◆ getFitParticleMom() [1/2]

std::array< double, 4 > Trk::getFitParticleMom ( const VKTrack * trk,
const VKVertex * vk )

Definition at line 25 of file cfMomentum.cxx.

26{
27 std::array<double, 4> p{};
28 double fieldPos[3];
29 fieldPos[0]=vk->refIterV[0]+vk->fitV[0];
30 fieldPos[1]=vk->refIterV[1]+vk->fitV[1];
31 fieldPos[2]=vk->refIterV[2]+vk->fitV[2];
32 double vBx,vBy,vBz,magConst;
33 Trk::vkalMagFld::getMagFld(fieldPos[0], fieldPos[1], fieldPos[2],vBx,vBy,vBz,(vk->vk_fitterControl).get());
34 magConst = Trk::vkalMagFld::getEffField(vBx, vBy, vBz, trk->fitP[1], trk->fitP[0]) * Trk::vkalMagFld::getCnvCst();
35
36 double cth = 1. / tan( trk->fitP[0]);
37 double phi = trk->fitP[1];
38 double pt = std::abs( magConst/trk->fitP[2] );
39 double m = trk->getMass();
40 p[0] = pt * cos(phi);
41 p[1] = pt * sin(phi);
42 p[2] = pt * cth;
43 p[3] = sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2] + m*m );
44 return p;
45}

◆ getFitParticleMom() [2/2]

std::array< double, 4 > Trk::getFitParticleMom ( const VKTrack * trk,
double effectiveBMAG )

Definition at line 46 of file cfMomentum.cxx.

47{
48 std::array<double, 4> p{};
49 double magConst = effectiveBMAG * vkalMagCnvCst;
50
51 double cth = 1. / tan( trk->fitP[0]);
52 double phi = trk->fitP[1];
53 double pt = std::abs( magConst/trk->fitP[2] );
54 double m = trk->getMass();
55 p[0] = pt * cos(phi);
56 p[1] = pt * sin(phi);
57 p[2] = pt * cth;
58 p[3] = sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2] + m*m );
59 return p;
60}

◆ getFittedCascade()

void Trk::getFittedCascade ( CascadeEvent & cascadeEvent_,
std::vector< Vect3DF > & cVertices,
std::vector< std::vector< double > > & covVertices,
std::vector< std::vector< VectMOM > > & fittedParticles,
std::vector< std::vector< double > > & cascadeCovar,
std::vector< double > & particleChi2,
std::vector< double > & fullCovar )

Definition at line 686 of file CFitCascade.cxx.

693{
694 cVertices.clear();
695 covVertices.clear();
696 fittedParticles.clear();
697 particleChi2.clear();
698//
699// Split common covariance matrix into pieces
700//
701 std::vector< std::vector<double> > cascadeCovarFit;
702 setFittedMatrices(cascadeEvent_.fullCovMatrix.get(), getCascadeNPar(cascadeEvent_), cascadeEvent_.matrixPnt, cascadeCovarFit, cascadeEvent_);
703//
704 double vBx,vBy,vBz,pp2,pt,invR;
705 int iv,it,jt, NTRK, pnt;
706//
707 int PDIM=getCascadeNPar(cascadeEvent_, 1); // number of physics parametrs
708 int ADIM=getCascadeNPar(cascadeEvent_, 0); // number of ALL parametrs
709 double **DPhys = new double*[PDIM]; for(it=0; it<PDIM; it++) DPhys[it] = new double[ADIM];
710 for(it=0;it<PDIM;it++) for(jt=0;jt<ADIM;jt++)DPhys[it][jt]=0.;
711//
712//
713 Vect3DF vrtPos;
714 VectMOM prtMom{};
715 VKVertex * vk;
716 std::vector<VectMOM> momCollector;
717 std::vector<double> tmpCov(6);
718//
719 int pntPhys=0; // Counter for physics cascade parameters
720 for( iv=0; iv<cascadeEvent_.cascadeNV; iv++){
721 vk=cascadeEvent_.cascadeVertexList[iv].get();
722 vrtPos.X=vk->refIterV[0] + vk->fitV[0]; // target vertex for extrapolation
723 vrtPos.Y=vk->refIterV[1] + vk->fitV[1];
724 vrtPos.Z=vk->refIterV[2] + vk->fitV[2];
725 cVertices.push_back(vrtPos);
726 NTRK = vk->TrackList.size(); // Number of tracks at vertex
727 momCollector.clear();
728 int DIM=3*(NTRK+1);
729 double **Deriv = new double*[DIM]; for(it=0; it<DIM; it++) Deriv[it] = new double[DIM];
730 for(it=0;it<DIM;it++) for(jt=0;jt<DIM;jt++)Deriv[it][jt]=0.;
731 Deriv[0][0]=1.;Deriv[1][1]=1.;Deriv[2][2]=1.;
732 DPhys[pntPhys+0][cascadeEvent_.matrixPnt[iv]+0]=1.;
733 DPhys[pntPhys+1][cascadeEvent_.matrixPnt[iv]+1]=1.;
734 DPhys[pntPhys+2][cascadeEvent_.matrixPnt[iv]+2]=1.;
735 Trk::vkalMagFld::getMagFld(vk->refIterV[0]+vk->fitV[0], vk->refIterV[1]+vk->fitV[1], vk->refIterV[2]+vk->fitV[2],
736 vBx,vBy,vBz,(vk->vk_fitterControl).get());
737 for(it=0; it<NTRK; it++){
738 std::array<double, 4> pp = getFitParticleMom( vk->TrackList[it].get(), vBz );
739 prtMom.Px=pp[0]; prtMom.Py=pp[1]; prtMom.Pz=pp[2]; prtMom.E=pp[3];
740 momCollector.push_back( prtMom );
741 if(vk->TrackList[it]->Id >= 0) particleChi2.push_back( vk->TrackList[it]->Chi2 ); //Only real tracks
742 pp2 = pp[0]*pp[0] + pp[1]*pp[1] +pp[2]*pp[2];
743 pt = sqrt(pp[0]*pp[0] + pp[1]*pp[1]);
744 invR = vk->TrackList[it]->fitP[2];
745
746 pnt = it*3+3;
747 DPhys[pntPhys+pnt+0][cascadeEvent_.matrixPnt[iv]+pnt+0]= Deriv[pnt+0][pnt+0]= 0 ; //dPx/dTheta
748 DPhys[pntPhys+pnt+0][cascadeEvent_.matrixPnt[iv]+pnt+1]= Deriv[pnt+0][pnt+1]= -pp[1]; //dPx/dPhi
749 DPhys[pntPhys+pnt+0][cascadeEvent_.matrixPnt[iv]+pnt+2]= Deriv[pnt+0][pnt+2]= -pp[0]/invR; //dPx/dinvR
750
751 DPhys[pntPhys+pnt+1][cascadeEvent_.matrixPnt[iv]+pnt+0]= Deriv[pnt+1][pnt+0]= 0 ; //dPy/dTheta
752 DPhys[pntPhys+pnt+1][cascadeEvent_.matrixPnt[iv]+pnt+1]= Deriv[pnt+1][pnt+1]= pp[0]; //dPy/dPhi
753 DPhys[pntPhys+pnt+1][cascadeEvent_.matrixPnt[iv]+pnt+2]= Deriv[pnt+1][pnt+2]= -pp[1]/invR; //dPy/dinvR
754
755 DPhys[pntPhys+pnt+2][cascadeEvent_.matrixPnt[iv]+pnt+0]= Deriv[pnt+2][pnt+0]= -pp2/pt; //dPz/dTheta
756 DPhys[pntPhys+pnt+2][cascadeEvent_.matrixPnt[iv]+pnt+1]= Deriv[pnt+2][pnt+1]= 0 ; //dPz/dPhi
757 DPhys[pntPhys+pnt+2][cascadeEvent_.matrixPnt[iv]+pnt+2]= Deriv[pnt+2][pnt+2]= -pp[2]/invR; //dPz/dinvR
758 }
759 pntPhys += DIM;
760 fittedParticles.push_back(momCollector);
761 cascadeCovar.push_back( transformCovar(DIM, Deriv, cascadeCovarFit[iv] ) ); //Transform covariance and save it
762 for(int kk=0; kk<6; kk++) tmpCov[kk]=cascadeCovar[iv][kk];
763 covVertices.push_back(tmpCov);
764 for(it=0; it<DIM; it++) delete[]Deriv[it];
765 delete[]Deriv;
766 }
767//
768// Get full physics covariance
769 int itn,jtn;
770 fullCovar.resize(PDIM*(PDIM+1)/2);
771 for(it=0; it<PDIM; it++){
772 for(jt=0; jt<=it; jt++){
773 double tmp=0.;
774 for(itn=0; itn<ADIM; itn++) for(jtn=0; jtn<ADIM; jtn++) tmp += DPhys[it][itn]*DPhys[jt][jtn]*cascadeEvent_.fullCovMatrix[itn*ADIM+jtn];
775 fullCovar[it*(it+1)/2+jt]=tmp; // symmetrical index formula works ONLY if it>=jt!!!
776 }
777 }
778 for(it=0; it<PDIM; it++) delete[]DPhys[it];
779 delete[]DPhys;
780}
std::unique_ptr< double[]> fullCovMatrix
void setFittedMatrices(const double *COVFIT, long int MATRIXSIZE, std::vector< int > &matrixPnt, std::vector< std::vector< double > > &covarCascade, CascadeEvent &cascadeEvent_)
int getCascadeNPar(CascadeEvent &cascadeEvent_, int Type)
std::vector< double > transformCovar(int NPar, double **Deriv, const std::vector< double > &covarI)

◆ getFullVrtCov()

int Trk::getFullVrtCov ( VKVertex * vk,
double * ader,
const double * dcv,
double verr[6][6] )

Definition at line 25 of file VtCFitE.cxx.

26{
27
28 int i,j,ic1,ic2;
29
30 long int ic, jc, it, jt;
31 double cnt = 1e8;
32
33 TWRK * t_trk=nullptr;
34 long int NTRK = vk->TrackList.size();
35 long int IERR=0;
36 long int NVar = (NTRK + 1) * 3;
37 if(vk->passNearVertex && vk->ConstraintList.empty()) {
38 /* Fit is with "pass near" constraint and then */
39 /* matrix is already present */
40 } else if ( !vk->ConstraintList.empty() && useWeightScheme ) {
41/* Full matrix inversion i */
42//
43 FullMTXfill( vk, ader);
44 if ( vk->passNearVertex ) {
45 double drdpy[2][3];
46 double dpipj[3][3];
47 for (it = 1; it <= NTRK; ++it) {
48 drdpy[0][0] = vk->tmpArr[it-1]->drdp[0][0] * vk->FVC.ywgt[0] + vk->tmpArr[it-1]->drdp[1][0] * vk->FVC.ywgt[1];
49 drdpy[1][0] = vk->tmpArr[it-1]->drdp[0][0] * vk->FVC.ywgt[1] + vk->tmpArr[it-1]->drdp[1][0] * vk->FVC.ywgt[2];
50 drdpy[0][1] = vk->tmpArr[it-1]->drdp[0][1] * vk->FVC.ywgt[0] + vk->tmpArr[it-1]->drdp[1][1] * vk->FVC.ywgt[1];
51 drdpy[1][1] = vk->tmpArr[it-1]->drdp[0][1] * vk->FVC.ywgt[1] + vk->tmpArr[it-1]->drdp[1][1] * vk->FVC.ywgt[2];
52 drdpy[0][2] = vk->tmpArr[it-1]->drdp[0][2] * vk->FVC.ywgt[0] + vk->tmpArr[it-1]->drdp[1][2] * vk->FVC.ywgt[1];
53 drdpy[1][2] = vk->tmpArr[it-1]->drdp[0][2] * vk->FVC.ywgt[1] + vk->tmpArr[it-1]->drdp[1][2] * vk->FVC.ywgt[2];
54 for (jt = 1; jt <= NTRK; ++jt) { /* Matrix */
55 for (int k = 0; k < 3; ++k) {
56 for (int l = 0; l < 3; ++l) {
57 dpipj[k][l] = 0.;
58 for (int j = 0; j < 2; ++j) {
59 dpipj[k][l] += vk->tmpArr[jt-1]->drdp[j][k] * drdpy[j][l];
60 }
61 }
62 }
63 for (int k = 1; k <= 3; ++k) {
64 for (int l = 1; l <= 3; ++l) {
65 ader_ref(it * 3 + k, jt * 3 + l) += dpipj[l-1][k-1];
66 }
67 }
68 }
69 }
70 }
71 Vect3DF th0t,tf0t;
72 for(ic1=0; ic1<(int)vk->ConstraintList.size();ic1++){
73 for(ic2=0; ic2<vk->ConstraintList[ic1]->NCDim; ic2++){
74 th0t = vk->ConstraintList[ic1]->h0t[ic2];
75 ader_ref(1, 1) += cnt * th0t.X * th0t.X;
76 ader_ref(2, 1) += cnt * th0t.Y * th0t.X;
77 ader_ref(3, 1) += cnt * th0t.Z * th0t.X;
78 ader_ref(1, 2) += cnt * th0t.X * th0t.Y;
79 ader_ref(2, 2) += cnt * th0t.Y * th0t.Y;
80 ader_ref(3, 2) += cnt * th0t.Z * th0t.Y;
81 ader_ref(1, 3) += cnt * th0t.X * th0t.Z;
82 ader_ref(2, 3) += cnt * th0t.Y * th0t.Z;
83 ader_ref(3, 3) += cnt * th0t.Z * th0t.Z;
84 for (it = 1; it <= NTRK; ++it) {
85 tf0t = vk->ConstraintList[ic1]->f0t[it-1][ic2];
86 ader_ref(1, it * 3 + 1) += cnt * th0t.X * tf0t.X;
87 ader_ref(2, it * 3 + 1) += cnt * th0t.Y * tf0t.X;
88 ader_ref(3, it * 3 + 1) += cnt * th0t.Z * tf0t.X;
89 ader_ref(1, it * 3 + 2) += cnt * th0t.X * tf0t.Y;
90 ader_ref(2, it * 3 + 2) += cnt * th0t.Y * tf0t.Y;
91 ader_ref(3, it * 3 + 2) += cnt * th0t.Z * tf0t.Y;
92 ader_ref(1, it * 3 + 3) += cnt * th0t.X * tf0t.Z;
93 ader_ref(2, it * 3 + 3) += cnt * th0t.Y * tf0t.Z;
94 ader_ref(3, it * 3 + 3) += cnt * th0t.Z * tf0t.Z;
95 }
96 }
97 }
98
99
100 for(ic1=0; ic1<(int)vk->ConstraintList.size();ic1++){
101 for(ic2=0; ic2<vk->ConstraintList[ic1]->NCDim; ic2++){
102 for (it = 1; it <= NTRK; ++it) {
103 for (jt = it; jt <= NTRK; ++jt) {
104 Vect3DF tf0ti = vk->ConstraintList[ic1]->f0t[it-1][ic2];
105 Vect3DF tf0tj = vk->ConstraintList[ic1]->f0t[jt-1][ic2];
106 ader_ref(it*3 + 1, jt*3 + 1) += cnt * tf0ti.X * tf0tj.X;
107 ader_ref(it*3 + 2, jt*3 + 1) += cnt * tf0ti.Y * tf0tj.X;
108 ader_ref(it*3 + 3, jt*3 + 1) += cnt * tf0ti.Z * tf0tj.X;
109 ader_ref(it*3 + 1, jt*3 + 2) += cnt * tf0ti.X * tf0tj.Y;
110 ader_ref(it*3 + 2, jt*3 + 2) += cnt * tf0ti.Y * tf0tj.Y;
111 ader_ref(it*3 + 3, jt*3 + 2) += cnt * tf0ti.Z * tf0tj.Y;
112 ader_ref(it*3 + 1, jt*3 + 3) += cnt * tf0ti.X * tf0tj.Z;
113 ader_ref(it*3 + 2, jt*3 + 3) += cnt * tf0ti.Y * tf0tj.Z;
114 ader_ref(it*3 + 3, jt*3 + 3) += cnt * tf0ti.Z * tf0tj.Z;
115 }
116 }
117 }
118 }
119/* symmetrisation */
120 for (i=1; i<=NVar-1; ++i) {
121 for (j = i+1; j<=NVar; ++j) {
122 ader_ref(j,i) = ader_ref(i,j);
123 }
124 }
125//-------------------------------------------------------------------------
126/* several checks for debugging */
127//std::cout.precision(12);
128// for(ic1=0; ic1<(int)vk->ConstraintList.size();ic1++){
129// for(ic2=0; ic2<vk->ConstraintList[ic1]->NCDim; ic2++){
130// th0t = vk->ConstraintList[ic1]->h0t[ic2];
131//std::cout<<"h0t="<<th0t.X<<", "<<th0t.Y<<", "<<th0t.Z<<'\n';
132// for (it = 1; it <= NTRK; ++it) {
133// tf0t = vk->ConstraintList[ic1]->f0t[it-1][ic2];
134//std::cout<<"f0t="<<tf0t.X<<", "<<tf0t.Y<<", "<<tf0t.Z<<'\n';
135// } } }
136//if(NTRK==2){
137// for(i=1; i<=NVar; i++){std::cout<<" newmtx=";
138// for(j=1; j<=NVar; j++)std::cout<<ader_ref(j,i)<<", "; std::cout<<'\n';}
139//}
140//-------------------------------------------------------------------------
141// Weight matrix ready. Invert. Beware - DSINV destroys initial matrix!
142 noinit_vector<double*> ta (NVar+1);
143 noinit_vector<double> tab ((NVar+1)*(NVar+1));
144 for(i=0; i<NVar+1; i++){ ta[i] = tab.data() + i*(NVar+1);}
145 for (i=1; i<=NVar; ++i) for (j = i; j<=NVar; ++j) ta[i][j] = ta[j][i] = ader_ref(i,j); //Make copy for failure treatment
146 dsinv(NVar, ader, vkalNTrkM*3+3, &IERR);
147 if ( IERR != 0) {
148 noinit_vector<double*> tv (NVar+1);
149 noinit_vector<double> tvb ((NVar+1)*(NVar+1));
150 noinit_vector<double*> tr (NVar+1);
151 noinit_vector<double> trb ((NVar+1)*(NVar+1));
152 noinit_vector<double> tw (NVar+1);
153 for(i=0; i<NVar+1; i++){ tv[i] = tvb.data() + i*(NVar+1); tr[i] = trb.data() + i*(NVar+1);}
154
155 vkSVDCmp( ta.data(), NVar, NVar, tw.data(), tv.data());
156
157 double tmax=0;
158 for(i=1; i<NVar+1; i++) if(fabs(tw[i])>tmax)tmax=fabs(tw[i]);
159 for(i=1; i<NVar+1; i++) if(fabs(tw[i])/tmax < 1.e-18) tw[i]=0.;
160 for(i=1; i<=NVar; i++){ for(j=1; j<=NVar; j++){
161 tr[i][j]=0.; for(int k=1; k<=NVar; k++) if(tw[k]!=0.) tr[i][j] += ta[i][k]*tv[j][k]/tw[k];
162 }}
163
164 for (i=1; i<=NVar; ++i) for (j=1; j<=NVar; ++j) ader_ref(i,j)=tr[i][j];
165
166 IERR=0; //return IERR;
167 }
168 //------ Check matrix inversion quality
169 double maxDiff=0.;
170 for( i=1; i<=NVar; i++){ for(j=i; j<=NVar; j++){
171 double mcheck=0.; for(int k=1; k<=NVar; k++) mcheck+=ta[i][k]*ader_ref(k,j);
172 if(i!=j) maxDiff = (maxDiff > std::abs(mcheck)) ? maxDiff : std::abs(mcheck);
173 if(i==j) maxDiff = (maxDiff > std::abs(1.-mcheck)) ? maxDiff : std::abs(1.-mcheck);
174 } }
175 //---------------------------------------------------------------------------------------
176 if(maxDiff>0.1)return -1;
177/* ---------------------------------------- */
178 } else {
179/* ---------------------------------------- */
180/* Simple and fast without constraints */
181 for (i=1; i<=NVar; i++) {
182 for (j=1; j<=NVar; j++) {
183 ader_ref(i,j)=0.;
184 }
185 }
186 double vcov[6]={vk->fitVcov[0],vk->fitVcov[1],vk->fitVcov[2],vk->fitVcov[3],vk->fitVcov[4],vk->fitVcov[5]};
187 ader_ref(1,1) = vcov[0];
188 ader_ref(1,2) = vcov[1];
189 ader_ref(2,2) = vcov[2];
190 ader_ref(1,3) = vcov[3];
191 ader_ref(2,3) = vcov[4];
192 ader_ref(3,3) = vcov[5];
193 ader_ref(2,1) = ader_ref(1,2);
194 ader_ref(3,1) = ader_ref(1,3);
195 ader_ref(3,2) = ader_ref(2,3);
196
197 for (it=1; it<=NTRK; it++) {
198 t_trk=vk->tmpArr[it-1].get();
199 ader_ref(1, it*3 + 1) = -vcov[0] * t_trk->wbci[0]
200 - vcov[1] * t_trk->wbci[1]
201 - vcov[3] * t_trk->wbci[2];
202 ader_ref(2, it*3 + 1) = -vcov[1] * t_trk->wbci[0]
203 - vcov[2] * t_trk->wbci[1]
204 - vcov[4] * t_trk->wbci[2];
205 ader_ref(3, it*3 + 1) = -vcov[3] * t_trk->wbci[0]
206 - vcov[4] * t_trk->wbci[1]
207 - vcov[5] * t_trk->wbci[2];
208 ader_ref(1, it*3 + 2) = -vcov[0] * t_trk->wbci[3]
209 - vcov[1] * t_trk->wbci[4]
210 - vcov[3] * t_trk->wbci[5];
211 ader_ref(2, it*3 + 2) = -vcov[1] * t_trk->wbci[3]
212 - vcov[2] * t_trk->wbci[4]
213 - vcov[4] * t_trk->wbci[5];
214 ader_ref(3, it*3 + 2) = -vcov[3] * t_trk->wbci[3]
215 - vcov[4] * t_trk->wbci[4]
216 - vcov[5] * t_trk->wbci[5];
217 ader_ref(1, it*3 + 3) = -vcov[0] * t_trk->wbci[6]
218 - vcov[1] * t_trk->wbci[7]
219 - vcov[3] * t_trk->wbci[8];
220 ader_ref(2, it*3 + 3) = -vcov[1] * t_trk->wbci[6]
221 - vcov[2] * t_trk->wbci[7]
222 - vcov[4] * t_trk->wbci[8];
223 ader_ref(3, it*3 + 3) = -vcov[3] * t_trk->wbci[6]
224 - vcov[4] * t_trk->wbci[7]
225 - vcov[5] * t_trk->wbci[8];
226 ader_ref(it*3 + 1, 1) = ader_ref(1, it*3 + 1);
227 ader_ref(it*3 + 1, 2) = ader_ref(2, it*3 + 1);
228 ader_ref(it*3 + 1, 3) = ader_ref(3, it*3 + 1);
229 ader_ref(it*3 + 2, 1) = ader_ref(1, it*3 + 2);
230 ader_ref(it*3 + 2, 2) = ader_ref(2, it*3 + 2);
231 ader_ref(it*3 + 2, 3) = ader_ref(3, it*3 + 2);
232 ader_ref(it*3 + 3, 1) = ader_ref(1, it*3 + 3);
233 ader_ref(it*3 + 3, 2) = ader_ref(2, it*3 + 3);
234 ader_ref(it*3 + 3, 3) = ader_ref(3, it*3 + 3);
235 }
236
237
238 for (it = 1; it<=NTRK; ++it) {
239 t_trk=vk->tmpArr[it-1].get();
240 for (jt=1; jt<=NTRK; ++jt) {
241 int j3 = jt*3;
242 int i3 = it*3;
243 ader_ref( i3+1, j3+1) = -t_trk->wbci[0]*ader_ref(1, j3+1) - t_trk->wbci[1]*ader_ref(2, j3+1) - t_trk->wbci[2]*ader_ref(3, j3+1);
244 ader_ref( i3+2, j3+1) = -t_trk->wbci[3]*ader_ref(1, j3+1) - t_trk->wbci[4]*ader_ref(2, j3+1) - t_trk->wbci[5]*ader_ref(3, j3+1);
245 ader_ref( i3+3, j3+1) = -t_trk->wbci[6]*ader_ref(1, j3+1) - t_trk->wbci[7]*ader_ref(2, j3+1) - t_trk->wbci[8]*ader_ref(3, j3+1);
246 ader_ref( i3+1, j3+2) = -t_trk->wbci[0]*ader_ref(1, j3+2) - t_trk->wbci[1]*ader_ref(2, j3+2) - t_trk->wbci[2]*ader_ref(3, j3+2);
247 ader_ref( i3+2, j3+2) = -t_trk->wbci[3]*ader_ref(1, j3+2) - t_trk->wbci[4]*ader_ref(2, j3+2) - t_trk->wbci[5]*ader_ref(3, j3+2);
248 ader_ref( i3+3, j3+2) = -t_trk->wbci[6]*ader_ref(1, j3+2) - t_trk->wbci[7]*ader_ref(2, j3+2) - t_trk->wbci[8]*ader_ref(3, j3+2);
249 ader_ref( i3+1, j3+3) = -t_trk->wbci[0]*ader_ref(1, j3+3) - t_trk->wbci[1]*ader_ref(2, j3+3) - t_trk->wbci[2]*ader_ref(3, j3+3);
250 ader_ref( i3+2, j3+3) = -t_trk->wbci[3]*ader_ref(1, j3+3) - t_trk->wbci[4]*ader_ref(2, j3+3) - t_trk->wbci[5]*ader_ref(3, j3+3);
251 ader_ref( i3+3, j3+3) = -t_trk->wbci[6]*ader_ref(1, j3+3) - t_trk->wbci[7]*ader_ref(2, j3+3) - t_trk->wbci[8]*ader_ref(3, j3+3);
252 if (it == jt) {
253 ader_ref( i3+1, i3+1) += t_trk->wci[0];
254 ader_ref( i3+1, i3+2) += t_trk->wci[1];
255 ader_ref( i3+2, i3+1) += t_trk->wci[1];
256 ader_ref( i3+2, i3+2) += t_trk->wci[2];
257 ader_ref( i3+1, i3+3) += t_trk->wci[3];
258 ader_ref( i3+3, i3+1) += t_trk->wci[3];
259 ader_ref( i3+2, i3+3) += t_trk->wci[4];
260 ader_ref( i3+3, i3+2) += t_trk->wci[4];
261 ader_ref( i3+3, i3+3) += t_trk->wci[5];
262 }
263 }
264 }
265//for(int ii=1; ii<=9; ii++)std::cout<<ader_ref(ii,ii)<<", "; std::cout<<__func__<<" fast full m NEW"<<'\n';
266 if( !vk->ConstraintList.empty() && !useWeightScheme ){
267//---------------------------------------------------------------------
268// Covariance matrix with constraints a la Avery.
269// ader_ref() should contain nonconstraint covariance matrix
270//---------------------------------------------------------------------
271 long int totNC=0; //total number of constraints
272 std::vector<std::vector< Vect3DF> > tf0t; // derivative collectors
273 std::vector< Vect3DF > th0t; // derivative collectors
274 std::vector< double > taa; // derivative collectors
275 std::vector< Vect3DF > tmpVec;
276 for(int ii=0; ii<(int)vk->ConstraintList.size();ii++){
277 totNC += vk->ConstraintList[ii]->NCDim;
278 for(ic=0; ic<(int)vk->ConstraintList[ii]->NCDim; ic++){
279 taa.push_back( vk->ConstraintList[ii]->aa[ic] );
280 th0t.push_back( vk->ConstraintList[ii]->h0t[ic] );
281 tmpVec.clear();
282 for(it=0; it<(int)vk->ConstraintList[ii]->f0t.size(); it++){
283 tmpVec.push_back( vk->ConstraintList[ii]->f0t[it][ic] );
284 }
285 tf0t.push_back( tmpVec );
286 }
287 }
288// R,RC[ic][i]
289 double **R =new double*[totNC]; for(ic=0; ic<totNC; ic++) R[ic]=new double[NVar];
290 double **RC=new double*[totNC]; for(ic=0; ic<totNC; ic++)RC[ic]=new double[NVar];
291 double *RCRt=new double[totNC*totNC];
292 for(ic=0; ic<totNC; ic++){
293 R[ic][0]=th0t[ic].X;
294 R[ic][1]=th0t[ic].Y;
295 R[ic][2]=th0t[ic].Z;
296 for(it=1; it<=NTRK; it++){
297 R[ic][it*3+0]=tf0t[ic][it-1].X;
298 R[ic][it*3+1]=tf0t[ic][it-1].Y;
299 R[ic][it*3+2]=tf0t[ic][it-1].Z;
300 }
301 }
302// R*Cov matrix
303 for(ic=0; ic<totNC; ic++){
304 for(j=0; j<NVar; j++){ RC[ic][j]=0;
305 for(i=0; i<NVar; i++) RC[ic][j] += R[ic][i]*ader_ref(i+1,j+1);
306 }
307 }
308// R*Cov*Rt matrix - Lagrange multiplyers errors
309 for(ic=0; ic<totNC; ic++){
310 for(jc=0; jc<totNC; jc++){ RCRt[ic*totNC + jc] =0.;
311 for(i=0; i<NVar; i++) RCRt[ic*totNC + jc] += RC[ic][i]*R[jc][i];
312 }
313 }
314 dsinv(totNC, RCRt, totNC, &IERR);
315 if ( IERR != 0) return IERR;
316// Correction matrix
317 for(i=0; i<NVar; i++){
318 for(j=0; j<NVar; j++){ double COR=0.;
319 for(ic=0; ic<totNC; ic++){
320 for(jc=0; jc<totNC; jc++){
321 COR += RC[ic][i]*RC[jc][j]*RCRt[ic*totNC +jc];
322 }
323 }
324 ader_ref(i+1, j+1) -= COR;
325 }
326 }
327// Delete temporary matrices
328 for(ic=0; ic<totNC; ic++) delete[] R[ic];
329 delete[] R;
330 for(ic=0; ic<totNC; ic++) delete[] RC[ic];
331 delete[] RC;
332 delete[] RCRt;
333//for(int ii=1; ii<=9; ii++)std::cout<<ader_ref(ii,ii)<<", "; std::cout<<__func__<<" avery full m NEW"<<'\n';
334 } //end of Avery matrix
335
336
337
338 } // End of global IF() for matrix type selection
339
340//if(NTRK==2){
341// for(i=1; i<=NVar; i++){std::cout<<__func__" new covfull=";
342// for(j=1; j<=NVar; j++)std::cout<<ader_ref(j,i)<<", "; std::cout<<'\n';}
343//}
344
345/* --Conversion to (X,Y,Z,Px,Py,Pz) form */
346 for (i = 1; i <= 6; ++i) {
347 for (j = 1; j <= 6; ++j) {
348 verr[i-1][j-1] = 0.;
349 for (ic=1; ic<=NVar; ++ic) {
350 if(dcv_ref(i, ic)==0.) continue;
351 for (jc=1; jc<=NVar; ++jc) {
352 if(dcv_ref(j, jc)==0.) continue;
353 verr[i-1][j-1] += dcv_ref(i, ic) * ader_ref(ic, jc) * dcv_ref(j, jc);
354 }
355 }
356 }
357 }
358//for(int ii=1; ii<=6; ii++)std::cout<<verr[ii-1][ii-1]<<", "; std::cout<<" final m NEW"<<'\n';
359 vk->existFullCov = 1;
360 return 0;
361}
#define useWeightScheme
Definition VtCFitE.cxx:23
#define dcv_ref(a_1, a_2)
void vkSVDCmp(double **a, int m, int n, double w[], double **v)

◆ getIniParticleMom() [1/2]

std::array< double, 4 > Trk::getIniParticleMom ( const VKTrack * trk,
const VKVertex * vk )

Definition at line 62 of file cfMomentum.cxx.

63{
64 std::array<double, 4> p{};
65 double vBx,vBy,vBz,magConst;
66 Trk::vkalMagFld::getMagFld(vk->refIterV[0],vk->refIterV[1],vk->refIterV[2],vBx,vBy,vBz,(vk->vk_fitterControl).get());
67 magConst = Trk::vkalMagFld::getEffField(vBx, vBy, vBz, trk->iniP[1], trk->iniP[0]) * Trk::vkalMagFld::getCnvCst();
68
69 double cth = 1. / tan( trk->iniP[0]);
70 double phi = trk->iniP[1];
71 double pt = std::abs( magConst/trk->iniP[2] );
72 double m = trk->getMass();
73 p[0] = pt * cos(phi);
74 p[1] = pt * sin(phi);
75 p[2] = pt * cth;
76 p[3] = sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2] + m*m );
77 return p;
78}

◆ getIniParticleMom() [2/2]

std::array< double, 4 > Trk::getIniParticleMom ( const VKTrack * trk,
double effectiveBMAG )

Definition at line 79 of file cfMomentum.cxx.

80{
81 std::array<double, 4> p{};
82 double magConst = effectiveBMAG * vkalMagCnvCst;
83
84 double cth = 1. / tan( trk->iniP[0]);
85 double phi = trk->iniP[1];
86 double pt = std::abs( magConst/trk->iniP[2] );
87 double m = trk->getMass();
88 p[0] = pt * cos(phi);
89 p[1] = pt * sin(phi);
90 p[2] = pt * cth;
91 p[3] = sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2] + m*m );
92 return p;
93}

◆ getNewCov()

void Trk::getNewCov ( const double * OldCov,
const double * Der,
double * Cov,
long int DIM )
noexcept

Definition at line 261 of file CascadeUtils.cxx.

262{
263 int i,j,it,jt;
264 for( i=0; i<DIM; i++){
265 for( j=0; j<DIM; j++){
266 Cov[i*DIM+j]=0.;
267 for( it=0; it<DIM; it++){
268 for( jt=0; jt<DIM; jt++){
269 Cov[i*DIM+j] += Der[i*DIM+it]*OldCov[it*DIM+jt]*Der[j*DIM+jt];
270 }
271 }
272 }
273 }
274}

◆ getVertexCharge()

long int Trk::getVertexCharge ( VKVertex * vk)

Definition at line 71 of file CFitCascade.cxx.

71 {
72 long int tCharge=0;
73 for(int it=0; it<(int)vk->TrackList.size(); it++) tCharge += vk->TrackList[it]->Charge;
74 return tCharge;
75}

◆ makeCascade()

int Trk::makeCascade ( VKalVrtControl & FitCONTROL,
long int NTRK,
const long int * ich,
double * wm,
double * inp_Trk5,
double * inp_CovTrk5,
const std::vector< std::vector< int > > & vertexDefinition,
const std::vector< std::vector< int > > & cascadeDefinition,
double definedCnstAccuracy )

Definition at line 116 of file CascadeDefinition.cxx.

120 {
121 long int tk;
122 int iv, it;
123 if (vertexDefinition.size() != cascadeDefinition.size()) {
124 std::cout << " WRONG INPUT!!!" << '\n';
125 return -1;
126 }
127
128 long int IERR;
129 int NV = vertexDefinition.size();
130 double xyz[3] = {0.};
131 double tmp[15] = {0.};
132 double tmpWgt[15], out[3];
133 double vBx, vBy, vBz;
134 VKTrack *trk;
135 int vEstimDone = 0;
136
137 for (iv = 0; iv < NV; iv++) {
138 auto VRT = std::make_unique<VKVertex>(FitCONTROL);
139 VRT->setRefV(xyz); // ref point
140 VRT->setRefIterV(xyz); // iteration ref. point
141 VRT->setIniV(xyz);
142 VRT->setCnstV(xyz); // initial guess. 0 of course.
143 auto arr = std::make_unique<double[]>(vertexDefinition[iv].size() * 5);
144 int NTv = vertexDefinition[iv].size();
145 for (it = 0; it < NTv; it++) {
146 tk = vertexDefinition[iv][it];
147 if (tk >= NTRK) {
148 return -1;
149 }
150 VRT->TrackList.emplace_back(new VKTrack(
151 tk, &inp_Trk5[tk * 5], &inp_CovTrk5[tk * 15], VRT.get(), wm[tk]));
152 VRT->tmpArr.emplace_back(new TWRK());
153 trk = VRT->TrackList[it].get();
154 trk->Charge = ich[tk];
155 trk->iniP[0] = trk->cnstP[0] = trk->fitP[0] =
156 inp_Trk5[tk * 5 + 2]; // initial guess
157 trk->iniP[1] = trk->cnstP[1] = trk->fitP[1] = inp_Trk5[tk * 5 + 3];
158 trk->iniP[2] = trk->cnstP[2] = trk->fitP[2] = inp_Trk5[tk * 5 + 4];
159 IERR = cfInv5(&inp_CovTrk5[tk * 15], tmpWgt);
160 if (IERR)
161 IERR = cfdinv(&inp_CovTrk5[tk * 15], tmpWgt, 5);
162 if (IERR) {
163 return -1;
164 }
165 trk->setCurrent(&inp_Trk5[tk * 5], tmpWgt);
166 arr[it * 5] = inp_Trk5[tk * 5];
167 arr[it * 5 + 1] = inp_Trk5[tk * 5 + 1];
168 arr[it * 5 + 2] = inp_Trk5[tk * 5 + 2];
169 arr[it * 5 + 3] = inp_Trk5[tk * 5 + 3];
170 arr[it * 5 + 4] = inp_Trk5[tk * 5 + 4];
171 }
172 if (NTv > 1) { // First estimation of vertex position if vertex has more
173 // than 2 tracks
174 vEstimDone = 1;
175 Trk::vkalMagFld::getMagFld(VRT->refIterV[0], VRT->refIterV[1],
176 VRT->refIterV[2], vBx, vBy, vBz,
177 (VRT->vk_fitterControl).get());
178 double aVrt[3] = {0., 0., 0.};
179 for (int i = 0; i < NTv - 1; i++)
180 for (int j = i + 1; j < NTv; j++) {
181 vkvFastV(&arr[i * 5], &arr[j * 5], xyz, vBz, out);
182 aVrt[0] += out[0];
183 aVrt[1] += out[1];
184 aVrt[2] += out[2];
185 }
186 aVrt[0] /= (NTv * (NTv - 1) / 2);
187 aVrt[1] /= (NTv * (NTv - 1) / 2);
188 aVrt[2] /= (NTv * (NTv - 1) / 2);
189 VRT->setRefIterV(aVrt); // iteration ref. point
190 }
191 if (iv == 0) { // start cascade creation
192 startCascade(std::move(VRT));
193 continue;
194 }
195 int includeNV = cascadeDefinition[iv].size();
196 if (!includeNV) { // no predecessors
197 addCascadeEntry(std::move(VRT));
198 } else {
199 auto *vrttemp = addCascadeEntry(std::move(VRT), cascadeDefinition[iv]);
200 for (it = 0; it < includeNV;
201 it++) { // tracks created out of predecessing vertices
202 vrttemp->TrackList.emplace_back(
203 new VKTrack(-999, tmp, tmp, vrttemp, 0.));
204 vrttemp->tmpArr.emplace_back(new TWRK());
205 }
206 }
207 }
208 //
209 // ---------------- If some vertex positions are different from (0,0,0) -
210 // move tracks there
211 if (vEstimDone) {
212 IERR = translateToFittedPos(*(FitCONTROL.getCascadeEvent()), 1.);
213 if (IERR)
214 return IERR;
215 for (iv = 0; iv < FitCONTROL.getCascadeEvent()->cascadeNV; iv++) {
216 auto *VRT = FitCONTROL.getCascadeEvent()->cascadeVertexList[iv].get();
217 int NTv = VRT->TrackList.size(); // Number of tracks at vertex
218 for (it = 0; it < NTv; it++) {
219 trk = VRT->TrackList[it].get();
220 if (trk->Id < 0)
221 continue; // pseudo-track from cascade vertex
222 trk->cnstP[0] = trk->iniP[0] = trk->fitP[0] = trk->Perig[2];
223 trk->cnstP[1] = trk->iniP[1] = trk->fitP[1] = trk->Perig[3];
224 trk->cnstP[2] = trk->iniP[2] = trk->fitP[2] = trk->Perig[4];
225 }
226 }
227 }
228 // ---------------- Init engine
229
230 IERR = initCascadeEngine(*FitCONTROL.getCascadeEvent());
231 FitCONTROL.getCascadeEvent()->setAccuracyConstraint(definedCnstAccuracy);
232
233 return IERR;
234}
void setAccuracyConstraint(double C)
void setCurrent(const double[], const double[])
const CascadeEvent * getCascadeEvent() const
int translateToFittedPos(CascadeEvent &cascadeEvent_, double Step)
double vkvFastV(double *p1, double *p2, const double *vRef, double dbmag, double *out)
Definition VKvFast.cxx:42

◆ operator<() [1/3]

bool Trk::operator< ( const LayerIndex & one,
const LayerIndex & two )

Overload of operator< | <= | > | >= for the usage in a map.

Definition at line 11 of file LayerIndex.cxx.

13{
14 return (one.value() < two.value());
15}

◆ operator<() [2/3]

bool Trk::operator< ( const TrackTruthKey & a,
const TrackTruthKey & b )
inline

Definition at line 45 of file TrackTruthKey.h.

45 {
46 return a.index() < b.index();
47 }

◆ operator<() [3/3]

bool Trk::operator< ( const TrackTruthKey_p0 & a,
const TrackTruthKey_p0 & b )
inline

Definition at line 29 of file TrackTruthKey_p0.h.

29 {
30 return a.m_index < b.m_index;
31 }

◆ operator<<() [1/112]

MsgStream & Trk::operator<< ( MsgStream & log,
const MultiComponentStateOnSurface &  )

Overload of << operator for MsgStream for debug output.

Definition at line 85 of file MultiComponentStateOnSurface.cxx.

87{
88 return log;
89}

◆ operator<<() [2/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const NoiseOnSurface & se )

Definition at line 24 of file NoiseOnSurface.cxx.

26{
27 return se.dump(sl);
28}

◆ operator<<() [3/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const PatternTrackParameters & se )

Definition at line 94 of file PatternTrackParameters.cxx.

96{
97 return se.dump(sl);
98}

◆ operator<<() [4/112]

MsgStream & Trk::operator<< ( MsgStream & log,
AlignResidualType type )

◆ operator<<() [5/112]

MsgStream & Trk::operator<< ( MsgStream & log,
ExtrapolationType type )

Definition at line 14 of file ExtrapolationType.cxx.

14 {
15 switch (type) {
17 return log << " FittedTrajectory";
18 case DeltaD0:
19 return log << " DeltaD0 ";
20 case DeltaZ0:
21 return log << " DeltaZ0 ";
22 case DeltaPhi0:
23 return log << " DeltaPhi0 ";
24 case DeltaTheta0:
25 return log << " DeltaTheta0 ";
26 case DeltaQOverP0:
27 return log << " DeltaQOverP0 ";
28 case DeltaQOverP1:
29 return log << " DeltaQOverP1 ";
31 return log << static_cast<int>(ExtrapolationTypes);
32 default:
33 return log << " unknown type ";
34 }
35}

◆ operator<<() [6/112]

MsgStream & Trk::operator<< ( MsgStream & log,
MeasurementType type )

Definition at line 14 of file MeasurementType.cxx.

14 {
15 switch (type) {
17 return log << " perigeeParameters";
19 return log << " transverseVertex ";
20 case vertex:
21 return log << " vertex ";
22 case pixelCluster:
23 return log << " pixelCluster ";
24 case stripCluster:
25 return log << " stripCluster ";
27 return log << " trapezoidCluster ";
28 case driftCircle:
29 return log << " driftCircle ";
31 return log << " pseudoMeas ";
32 case barrelScatterer:
33 return log << " barrelScatterer ";
34 case endcapScatterer:
35 return log << " endcapScatterer ";
37 return log << " calorimeterScat ";
38 case barrelInert:
39 return log << " barrelInert ";
40 case endcapInert:
41 return log << " endcapInert ";
42 case energyDeposit:
43 return log << " energyDeposit ";
44 case alignment:
45 return log << " alignment ";
46 case discontinuity:
47 return log << " discontinuity ";
48 case bremPoint:
49 return log << " bremPoint ";
50 case hole:
51 return log << " hole ";
53 return log << " materialDelimiter";
54
55 default:
56 return log << " unknown type ";
57 }
58}

◆ operator<<() [7/112]

MsgStream & Trk::operator<< ( MsgStream & log,
ParameterType type )

Definition at line 14 of file ParameterType.cxx.

14 {
15 switch (type) {
16 case D0:
17 return log << " D0 ";
18 case Z0:
19 return log << " Z0 ";
20 case Phi0:
21 return log << " Phi0 ";
22 case Theta0:
23 return log << " Theta0 ";
24 case QOverP0:
25 return log << " QOverP0 ";
26 case QOverP1:
27 return log << " QOverP1 ";
28 case ParameterTypes:
29 return log << static_cast<int>(ParameterTypes);
30 default:
31 return log << " unknown type ";
32 }
33}

◆ operator<<() [8/112]

MsgStream & Trk::operator<< ( MsgStream & log,
Trk::AlignMesType type )

Definition at line 11 of file AlignResidualType.cxx.

12 {
13 switch (type)
14 {
15 case Measurement:
16 return log << " measurement ";
17 case Scatterer:
18 return log << " scatterer ";
19 case EnergyDeposit:
20 return log << " energy deposit ";
21 default:
22 return log << " unknown mes type ";
23 }
24 }

◆ operator<<() [9/112]

MsgStream & Trk::operator<< ( MsgStream & log,
Trk::AlignResidualType type )

Definition at line 26 of file AlignResidualType.cxx.

27 {
28 switch (type)
29 {
30 case HitOnly:
31 return log << " HitOnly ";
32 case Unbiased:
33 return log << " Unbiased ";
34// case DCA:
35// return log << " DCA ";
36 default:
37 return log << " unknown ";
38 }
39 }

◆ operator<<() [10/112]

MsgStream & Trk::operator<< ( MsgStream & out,
const MuonTrackSummary & trackSum )

output.

This dumps the values of each of the possible summary enums

Definition at line 112 of file MuonTrackSummary.cxx.

114{
115 out << "MuonTrackSummary: Hits: eta " << trackSum.netaHits() << " phi "
116 << trackSum.nphiHits() << " holes " << trackSum.nholes() << " outliers "
117 << trackSum.noutliers() << " close hits " << trackSum.ncloseHits()
118 << endmsg;
119 if (out.level() <= MSG::VERBOSE) {
120 std::vector<MuonTrackSummary::ChamberHitSummary>::const_iterator it =
121 trackSum.chamberHitSummary().begin();
122 std::vector<MuonTrackSummary::ChamberHitSummary>::const_iterator it_end =
123 trackSum.chamberHitSummary().end();
124 for (; it != it_end; ++it) {
125 const MuonTrackSummary::ChamberHitSummary& chSum = *it;
127 chSum.etaProjection();
129 chSum.phiProjection();
130 out << " Chamber " << chSum.chamberId() << " isMdt " << chSum.isMdt()
131 << std::endl
132 << " First projection: Hits " << etaP.nhits << " holes "
133 << etaP.nholes << " outlier " << etaP.noutliers << " deltas "
134 << etaP.ndeltas << " close Hits " << etaP.ncloseHits << std::endl
135 << " Second projection: Hits " << phiP.nhits << " holes "
136 << phiP.nholes << " outlier " << phiP.noutliers << " deltas "
137 << phiP.ndeltas << " close Hits " << phiP.ncloseHits << std::endl;
138 }
139 }
140 return out;
141}
#define endmsg
unsigned int netaHits() const
number of eta hits on the track
unsigned int ncloseHits() const
number of holes on the track
unsigned int nphiHits() const
number of phi hits on the track
unsigned int noutliers() const
number of eta trigger hits on the track
const std::vector< ChamberHitSummary > & chamberHitSummary() const
access to the vector of chamber hit summaries on the track
unsigned int nholes() const
number of holes on the track
structure to hold the information for the eta/phi projection of RPC, TGC and CSC chambers and per mul...
structure to hold information per chamber in the muon system
const Projection & phiProjection() const
access to the data of the phi projection, users have to check whether this is NOT a MDT chamber first...
const Projection & etaProjection() const
access to the data of the eta projection, users have to check whether this is NOT a MDT chamber first...
const Identifier & chamberId() const
returns the chamber identifier
bool isMdt() const
returns whether this is a MDT chamber

◆ operator<<() [11/112]

MsgStream & Trk::operator<< ( MsgStream & out,
const TrackSummary & trackSum )

output.

This dumps the values of each of the possible summary enums

Definition at line 208 of file TrackSummary.cxx.

210{
211 return dumpTrackSummary(out, trackSum);
212}

◆ operator<<() [12/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
AlignModuleTool & alignModTool )

Definition at line 310 of file AlignModuleTool.cxx.

311 {
312 const AlignModuleList* modules=alignModTool.alignModules1D();
313 for (int imod=0;imod<(int)modules->size(); imod++) {
314 sl << "AML: "<<*((*modules)[imod]);
315 }
316
317 DataVector<AlignPar>* alignParList=alignModTool.alignParList1D();
318 for (int iap=0;iap<(int)alignParList->size();iap++) {
319 sl << *((*alignParList)[iap]);
320 }
321 return sl;
322 }
Derived DataVector<T>.
Definition DataVector.h:795
size_type size() const noexcept
Returns the number of elements in the collection.
virtual AlignParVec * alignParList1D() override
Returns 1-D vector of all AlignPars for all detector types.
virtual const AlignModuleList * alignModules1D() override
Returns 1-D vector of all AlignModules containing all detector types.
std::vector< AlignModule * > AlignModuleList

◆ operator<<() [13/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const AlignmentEffectsOnTrack & tsos )

Overload of << operator for MsgStream for debug output.

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 26 of file AlignmentEffectsOnTrack.cxx.

28{
29 if (sl.level() < MSG::INFO) {
30 sl << "AlignmentEffectsOnTrack:" << endmsg;
31 sl << "deltaTranslation = " << aeot.deltaTranslation() << endmsg;
32 sl << "sigmaDeltaTranslation = " << aeot.deltaTranslation() << endmsg;
33 sl << "deltaAngle = " << aeot.deltaAngle() << endmsg;
34 sl << "sigmaDeltaAngle = " << aeot.sigmaDeltaAngle() << endmsg;
35 sl << "surface = " << aeot.associatedSurface() << endmsg;
36 }
37 return sl;
38}

◆ operator<<() [14/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const AlignModule & alignModule )

overload of << operator for MsgStream for debug output

Definition at line 204 of file AlignModule.cxx.

205 {
206 sl << "AlignModule \'"<<alignModule.name()<<"\' ID: "<<alignModule.identify()
207 <<" IDHash: "<<alignModule.identifyHash()<< endmsg;
208 return sl;
209 }
Identifier identify() const
Definition AlignModule.h:97
const std::string & name() const
Definition AlignModule.h:89
IdentifierHash identifyHash() const
Set and return index of module, used by alignment classes to keep track of order of align module.
Definition AlignModule.h:92

◆ operator<<() [15/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const AlignPar & ap )

overload of << operator for MsgStream for debug output

Definition at line 10 of file AlignPar.cxx.

11 {
12 sl << "alignPar type : " << std::setw(10) << ap.dumpType()
13 << "(" << ap.paramType() << " ) : " << &ap << endmsg;
14 sl << " init par: " << std::setw(6) << std::showpos << std::fixed
15 << ap.initPar()<<" +/- "<<std::noshowpos << ap.initErr()
16 << resetiosflags(std::ios::floatfield) << endmsg;
17 sl << " par: "<< std::showpos << ap.par() << " +/- "
18 << std::noshowpos << ap.err() << endmsg;
19 sl << " final par: "<< std::showpos << ap.finalPar() << " +/- "
20 << std::noshowpos << ap.finalErr() << endmsg;
21 sl << " sigma: "<< ap.sigma() << endmsg;
22 sl << " soft-cut: "<< ap.softCut() << endmsg;
23 sl << " first drv: "<< std::showpos << ap.firstDeriv()
24 << std::noshowpos << endmsg;
25 sl << " secnd drv: "<< std::showpos << ap.secndDeriv()
26 << std::noshowpos << endmsg;
27 return sl;
28 }

◆ operator<<() [16/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const AlignTrack::AlignTrackType type )

Definition at line 372 of file AlignTrack.cxx.

373 {
374 switch(type) {
376 return sl<<"Unknown ";
378 return sl<<"Original ";
380 return sl<<"NormalRefitted ";
382 return sl<<"BeamspotConstrained ";
384 return sl<<"VertexConstrained ";
385 default:
386 return sl<<"UNDEFINED ";
387 }
388 }

◆ operator<<() [17/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const AlignTSOS & atsos )

Overload of << operator for MsgStream for debug output.

Definition at line 164 of file AlignTSOS.cxx.

165 {
166 //sl <<"\t"<<atsos.dumpType()
167 // << std::setw(11) << std::showpos<< std::scientific
168 // <<"\tres[0]="<<atsos.residual(0)<<", err[0]="<<atsos.residualErrorSq(0)
169 // <<", dchi2="<<std::noshowpos
170 // <<atsos.residual(0)*atsos.residual(0)/atsos.residualErrorSq(0)<<endmsg;
171 sl <<"\t"<<atsos.dumpType()<<" ("<<atsos.dumpMeasType()<<", direction "<<atsos.dumpMeasDir()<<")"<<endmsg;
172 sl << " --> ";
173
174 int ires(0);
175 std::vector<Residual>::const_iterator itRes = atsos.firstResidual();
176 std::vector<Residual>::const_iterator itRes_end = atsos.lastResidual();
177 for( ; itRes != itRes_end ; ++itRes, ++ires) {
178 double resnorm = itRes->residualNorm();
179 if(ires){
180 std::ios_base::fmtflags f(sl.stream().flags());
181 sl << endmsg << " --> ";
182 sl << ires << ": res="
183 << std::setw(11) << std::showpos << std::scientific
184 << itRes->residual() <<" res/err="<<resnorm
185 << ", dchi2="<<std::noshowpos<<resnorm*resnorm
186 << resetiosflags(std::ios::floatfield);
187 sl.flags(f);
188 }
189 }
190 return sl;
191 }
std::vector< Residual >::const_iterator lastResidual() const
returns last Residual iterator
Definition AlignTSOS.h:107
std::string dumpMeasDir() const
returns string corresponding to the measurement direction
std::vector< Residual >::const_iterator firstResidual() const
returns first Residual iterator
Definition AlignTSOS.h:104
std::string dumpMeasType() const
returns string corresponding to the measurement type
std::string dumpType() const
returns a string with the expanded type of the object (i.e.

◆ operator<<() [18/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const AssociatedMaterial & mstep )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 209 of file AssociatedMaterial.cxx.

210 {
211 return mstep.dump(sl);
212}
MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.

◆ operator<<() [19/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const BinUtility & bgen )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 17 of file BinUtility.cxx.

19{
20 return bgen.dump(sl);
21}
MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.
Definition BinUtility.h:251

◆ operator<<() [20/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const CurvilinearUVT & uvt )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 15 of file CurvilinearUVT.cxx.

16{
17 sl << "Trk::CuvilinearUVT - curvilinear frame (u,v,t)" << std::endl;
18 sl << " u = " << uvt.curvU() << std::endl;
19 sl << " v = " << uvt.curvV() << std::endl;
20 sl << " t = " << uvt.curvT() << std::endl;
21
22 return sl;
23}
const Amg::Vector3D & curvU() const
Access methods.
const Amg::Vector3D & curvT() const
const Amg::Vector3D & curvV() const

◆ operator<<() [21/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const ElementTable & etab )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 21 of file ElementTable.cxx.

21 {
22 std::string none = "None";
23 sl << " ------------------------- Trk::ElementTable "
24 "-------------------------- "
25 << std::endl;
26 sl << " - Listing " << etab.size() << " elements " << std::endl;
27 for (unsigned int iel = 0; iel < static_cast<unsigned int>(UCHAR_MAX); ++iel)
28 sl << " - Id : " << std::setw(3) << iel << " - Properties: "
29 << (etab.element(iel) ? etab.element(iel)->toString() : none)
30 << " - Name : " << etab.elementName(iel) << std::endl;
31 sl << " ---------------------------------------------------------------------"
32 "- "
33 << endmsg;
34 return sl;
35}
size_t size() const
Print the table size.
const Material * element(unsigned int Z) const
Get the material.
const std::string & elementName(unsigned int Z) const
Get the element name.
std::string toString() const
spit out as a string
Definition Material.h:231

◆ operator<<() [22/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const EnergyLoss & eloss )

Overload of << operator for MsgStream for debug output.

Definition at line 15 of file EnergyLoss.cxx.

17{
18 return eloss.dump(sl);
19}
virtual MsgStream & dump(MsgStream &sl) const
Interface method for output, can be overloaded by child classes.

◆ operator<<() [23/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const FitQualityImpl & fq )

Overload of << operator for MsgStream for debug output.

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 16 of file FitQuality.cxx.

17{
18 std::ostringstream os;
19 os<<fq;
20 sl<<os.str();
21 return sl;
22}

◆ operator<<() [24/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const JacobianCurvilinearToLocal & jac )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 93 of file JacobianCurvilinearToLocal.cxx.

94{
95 sl << std::setiosflags(std::ios::fixed);
96 sl << std::setprecision(6);
97 sl << MSG::DEBUG << "Trk::JacobianCurvilinearToLocal" << std::endl;
98 sl << "______________________________________________________________________" << std::endl;
99 for (int irow = 0; irow<5; irow++){
100 for (int icol =0; icol<5; icol++){
101 sl << (jac)(irow,icol);
102 if (irow < 4 || icol < 4 ) { sl << " "; }
103 }
104 sl << std::endl;
105 }
106 sl << "______________________________________________________________________";
107 return sl;
108}

◆ operator<<() [25/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const LayerIndex & layx )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 35 of file LayerIndex.cxx.

37{
38 sl << layx.value();
39 return sl;
40}
int value() const
layerIndex expressed in an integer
Definition LayerIndex.h:71

◆ operator<<() [26/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const LayerMaterialProperties & mprop )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 9 of file LayerMaterialProperties.cxx.

10 {
11 return lmp.dump(sl);
12}

◆ operator<<() [27/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const LinearizedTrack & sf )

Overload of << operator for both, MsgStream and std::ostream for debug output.

◆ operator<<() [28/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const LocalDirection & lomo )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 15 of file LocalDirection.cxx.

16{
17 ls << std::setiosflags(std::ios::fixed) << std::setprecision(3);
18// ls << "(angleXZ, angleYZ, magnitude) = ";
19 ls << "(angleXZ, angleYZ) = ";
20 ls << "(" << lom.angleXZ();
21 ls << "," << lom.angleYZ() << ")";
22 ls << std::setprecision(-1);
23 return ls;
24}

◆ operator<<() [29/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const MagneticFieldProperties & mprop )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 14 of file MagneticFieldProperties.cxx.

15 {
16 sl << "Trk::MagneticFieldProperties, configuration: "
17 << mprop.magneticFieldMode() << endmsg;
18 return sl;
19}
MagneticFieldMode magneticFieldMode() const
Returns the MagneticFieldMode as specified.

◆ operator<<() [30/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const MaterialEffectsBase & meb )

Overload of << operator for MsgStream for debug output.

Definition at line 50 of file MaterialEffectsBase.cxx.

52{
53 return meb.dump(sl);
54}
virtual MsgStream & dump(MsgStream &sl) const
Interface method for output, can be overloaded by child classes.

◆ operator<<() [31/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const MaterialProperties & mprop )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 84 of file MaterialProperties.cxx.

85 {
86 sl << "Trk::MaterialProperties: " << endmsg;
87 sl << " - thickness/X0 = " << mprop.thicknessInX0()
88 << endmsg;
89 sl << " - thickness [mm] = " << mprop.thickness()
90 << endmsg;
91 sl << " - radiation length X0 [mm] = " << mprop.x0() << endmsg;
92 sl << " - nuclear interaction length L0 [mm] = " << mprop.l0() << endmsg;
93 sl << " - average material Z/A*rho [gram/mm^3] = "
94 << mprop.zOverAtimesRho() << endmsg;
95 return sl;
96}
float thicknessInX0() const
Return the radiationlength fraction.
float zOverAtimesRho() const
Return the .
float l0() const
Return the nuclear interaction length.
float x0() const
Return the radiation length.
float thickness() const
Return the thickness in mm.

◆ operator<<() [32/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const MaterialStep & mstep )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 70 of file MaterialStep.cxx.

70 {
71 return mstep.dump(sl);
72}
MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.

◆ operator<<() [33/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const MemoryLogger & oac )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 49 of file MemoryLogger.cxx.

51{
52 sl << "[ memory usage ] in kB ( VmSize | VmRSS ) : " << mlg.vmSize() << '\t' << mlg.vmRss();
53 return sl;
54}

◆ operator<<() [34/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const ObjectAccessor & oac )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 15 of file ObjectAccessor.cxx.

17{
18 for (const ObjectAccessor::value_type& elm : oac) {
19 sl << (oac.end() - oac.begin()) << "-ObjectAccessor: | " << elm << " | ";
20 }
21 return sl;
22}

◆ operator<<() [35/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const Surface & sf )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 212 of file Surface.cxx.

214{
215 return sf.dump(sl);
216}

◆ operator<<() [36/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const SurfaceBounds & sb )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 13 of file SurfaceBounds.cxx.

15{
16 return sb.dump(sl);
17}

◆ operator<<() [37/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const Track & track )

Overload of << operator for MsgStream for debug output.

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 235 of file Tracking/TrkEvent/TrkTrack/src/Track.cxx.

235 {
236 std::string name("Track ");
237 sl << name << "Author = " << track.info().dumpInfo() << endmsg;
238 if (track.fitQuality() != nullptr) {
239 sl << *(track.fitQuality()) << endmsg;
240 }
241 if (track.trackSummary() != nullptr) {
242 sl << *(track.trackSummary()) << endmsg;
243 } else {
244 sl << "No TrackSummary available in this track." << endmsg;
245 }
246 if (track.trackStateOnSurfaces() != nullptr) {
247 sl << name << "has " << (track.trackStateOnSurfaces()->size())
248 << " trackStateOnSurface(s)" << endmsg;
249
250 // level() shows the output level, currentLevel()
251 // shows what the stream is set to
252 if (sl.level() < MSG::INFO) {
253 // loop over TrackStateOnSurfaces if verbose turned on
255 track.trackStateOnSurfaces()->cbegin();
256 int num = 0;
257 for (; it != track.trackStateOnSurfaces()->cend(); ++it) {
258 sl << " --------- Start of TrackStateOnSurface \t" << num << "\t-------"
259 << endmsg;
260 sl << (**it);
261 sl << " --------- End of TrackStateOnSurface \t" << num++
262 << "\t-------" << endmsg;
263 }
264 }
265 }
266 return sl;
267}
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838

◆ operator<<() [38/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const TrackInfo & track )

Overload of << operator for MsgStream for debug output.

Definition at line 232 of file Tracking/TrkEvent/TrkTrack/src/TrackInfo.cxx.

234{
235 sl << info.dumpInfo() << endmsg;
236 return sl;
237}

◆ operator<<() [39/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const TrackParticleBase & trackParticleBase )

Overload of << operator for MsgStream for debug output.

Definition at line 247 of file TrackParticleBase.cxx.

248 {
249 trackParticleBase.dump(sl);
250 return sl;
251 }
virtual MsgStream & dump(MsgStream &out) const
Dump methods to be used by the overloaded stream operator (inheritance!)

◆ operator<<() [40/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const TrackStateOnSurface & tsos )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Overload of << operator for MsgStream for debug output.

Definition at line 249 of file TrackStateOnSurface.cxx.

251{
252 std::string name("TrackStateOnSurface: ");
253 sl << name << "\t of type : " << tsos.dumpType() << endmsg;
254
255 if (sl.level() < MSG::INFO) {
256 sl << name << "Detailed dump of contained objects follows:" << endmsg;
257 sl << (tsos.fitQualityOnSurface()) << "\n (end of FitQualityOnSurface dump)"
258 << endmsg;
259
260 if (tsos.trackParameters() != nullptr) {
261 sl << *(tsos.trackParameters()) << "\n (end of TrackParameters dump)"
262 << endmsg;
263 }
264
265 if (tsos.measurementOnTrack() != nullptr) {
266 sl << *(tsos.measurementOnTrack()) << "\n (end of MeasurementBase dump"
267 << endmsg;
268 }
269
270 if (tsos.materialEffectsOnTrack() != nullptr) {
271 sl << *(tsos.materialEffectsOnTrack())
272 << "\n (end of MaterialEffectsBase dump)" << endmsg;
273 }
274
275 if (tsos.alignmentEffectsOnTrack() != nullptr) {
276 sl << *(tsos.alignmentEffectsOnTrack())
277 << "\n (end of AlignmentEffectsOnTrack dump)" << endmsg;
278 }
279 }
280 return sl;
281}
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
const FitQualityOnSurface & fitQualityOnSurface() const
return FitQuality On Surface const overload
const MaterialEffectsBase * materialEffectsOnTrack() const
return material effects const overload
const AlignmentEffectsOnTrack * alignmentEffectsOnTrack() const
return the the alignment effects const overload

◆ operator<<() [41/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const TrackSurfaceIntersection & tsfi )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 61 of file TrackSurfaceIntersection.cxx.

63{
64 std::ostringstream os;
65 os<<tsfi;
66 sl<<os.str();
67 return sl;
68}

◆ operator<<() [42/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const TransportJacobian & jac )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 62 of file TransportJacobian.cxx.

64{
65 sl << "|-------------|-------------|-------------|-------------|-------------"
66 "|-------------|"
67 << std::endl;
68 sl << "| Jacobian(A) | Old /dL1 | /dL2 | /dPhi | /dThe "
69 "| /dCM |"
70 << std::endl;
71 sl << "|-------------|-------------|-------------|-------------|-------------"
72 "|-------------|"
73 << std::endl;
74
75 sl << "| New dL1 / |" << std::setw(12) << std::setprecision(5) << J(0, 0)
76 << " |" << std::setw(12) << std::setprecision(5) << J(0, 1) << " |"
77 << std::setw(12) << std::setprecision(5) << J(0, 2) << " |"
78 << std::setw(12) << std::setprecision(5) << J(0, 3) << " |"
79 << std::setw(12) << std::setprecision(5) << J(0, 4) << " |" << std::endl;
80 sl << "| dL2 / |" << std::setw(12) << std::setprecision(5) << J(1, 0)
81 << " |" << std::setw(12) << std::setprecision(5) << J(1, 1) << " |"
82 << std::setw(12) << std::setprecision(5) << J(1, 2) << " |"
83 << std::setw(12) << std::setprecision(5) << J(1, 3) << " |"
84 << std::setw(12) << std::setprecision(5) << J(1, 4) << " |" << std::endl;
85 sl << "| dPhi/ |" << std::setw(12) << std::setprecision(5) << J(2, 0)
86 << " |" << std::setw(12) << std::setprecision(5) << J(2, 1) << " |"
87 << std::setw(12) << std::setprecision(5) << J(2, 2) << " |"
88 << std::setw(12) << std::setprecision(5) << J(2, 3) << " |"
89 << std::setw(12) << std::setprecision(5) << J(2, 4) << " |" << std::endl;
90 sl << "| dThe/ |" << std::setw(12) << std::setprecision(5) << J(3, 0)
91 << " |" << std::setw(12) << std::setprecision(5) << J(3, 1) << " |"
92 << std::setw(12) << std::setprecision(5) << J(3, 2) << " |"
93 << std::setw(12) << std::setprecision(5) << J(3, 3) << " |"
94 << std::setw(12) << std::setprecision(5) << J(3, 4) << " |" << std::endl;
95 sl << "| dCM / |"
96
97 << std::setw(12) << std::setprecision(5) << J(4, 0) << " |"
98 << std::setw(12) << std::setprecision(5) << J(4, 1) << " |"
99 << std::setw(12) << std::setprecision(5) << J(4, 2) << " |"
100 << std::setw(12) << std::setprecision(5) << J(4, 3) << " |"
101 << std::setw(12) << std::setprecision(5) << J(4, 4) << " |" << std::endl;
102 sl << "|-------------|-------------|-------------|-------------|-------------"
103 "|-------------|"
104 << std::endl;
105 return sl;
106}

◆ operator<<() [43/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const Trk::LocalParameters & lp )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 101 of file LocalParameters.cxx.

102{
103 std::ostringstream os;
104 os << lp;
105 sl << os.str();
106 return sl;
107}

◆ operator<<() [44/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const Trk::MeasurementBase & mbase )
inline

Overload of << operator for MsgStream for debug output.

Definition at line 116 of file MeasurementBase.h.

118{
119 return mbase.dump(sl);
120}
virtual MsgStream & dump(MsgStream &out) const =0
Interface method for output, to be overloaded by child classes*.

◆ operator<<() [45/112]

template<int DIM, class T>
MsgStream & Trk::operator<< ( MsgStream & sl,
const Trk::ParametersBase< DIM, T > & tp )

Overload of << operator for both, MsgStream and std::ostream for debug output.

◆ operator<<() [46/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const Trk::ScatteringAngles & saos )

Overload of << operator for MsgStream for debug output.

Definition at line 11 of file ScatteringAngles.cxx.

13{
14 std::string name("ScatteringAngles: ");
15 sl << name << "deltaPhi : " << saos.deltaPhi() << endmsg;
16 sl << name << "deltaTheta : " << saos.deltaTheta() << endmsg;
17 sl << name << "sigmaDeltaPhi : " << saos.sigmaDeltaPhi() << endmsg;
18 sl << name << "sigmaDeltaTheta : " << saos.sigmaDeltaTheta() << endmsg;
19 return sl;
20}

◆ operator<<() [47/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const Trk::SpacePoint & spacePoint )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Overload of << operator for MsgStream for debug output.

Definition at line 43 of file Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx.

44 {
45 return spacePoint.dump(sl);
46 }
virtual MsgStream & dump(MsgStream &out) const override=0
Interface method for output, to be overloaded by child classes*.

◆ operator<<() [48/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const Vertex & sf )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 50 of file Vertex.cxx.

52{
53 return sf.dump(sl);
54}

◆ operator<<() [49/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const VertexPositions & sf )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 73 of file VertexPositions.cxx.

75{
76 return sf.dump(sl);
77}

◆ operator<<() [50/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const Volume & vol )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 97 of file Volume.cxx.

99{
100 sl << "Trk::Volume with VolumeBounds :" << vol.volumeBounds() << endmsg;
101 return sl;
102}
const VolumeBounds & volumeBounds() const
returns the volumeBounds()
Definition Volume.h:96

◆ operator<<() [51/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const VolumeBounds & vb )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 14 of file VolumeBounds.cxx.

16{
17 return vb.dump(sl);
18}
virtual MsgStream & dump(MsgStream &sl) const =0
Output Method for MsgStream, to be overloaded by child classes.

◆ operator<<() [52/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const VxCandidate & sf )

Overload of << operator for both, MsgStream and std::ostream for debug output; only needed in base class?

Definition at line 122 of file VxCandidate.cxx.

124{
125 return sf.dump(sl);
126}

◆ operator<<() [53/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const VxClusteringTable & sf )

Definition at line 55 of file VxClusteringTable.cxx.

56 { return sf.dump(sl); }

◆ operator<<() [54/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
const VxTrackAtVertex & sf )

Overload of << operator for both, MsgStream and std::ostream for debug output; only needed in base class?

Definition at line 494 of file VxTrackAtVertex.cxx.

496{
497 return sf.dump(sl);
498}

◆ operator<<() [55/112]

MsgStream & Trk::operator<< ( MsgStream & sl,
Trk::GlueVolumesDescriptor & gvd )

Overload of << operator for both, MsgStream and std::ostream for debug output.

Definition at line 49 of file GlueVolumesDescriptor.cxx.

50 {
51 sl << "Trk::GlueVolumesDescriptor: " << std::endl;
52 const std::vector<Trk::BoundarySurfaceFace>& glueFaceVector = gvd.glueFaces();
53 sl << " has Tracking Volumes registered for : " << glueFaceVector.size()
54 << " Volume faces." << std::endl;
55 std::vector<Trk::BoundarySurfaceFace>::const_iterator glueFaceIter =
56 glueFaceVector.begin();
57 std::vector<Trk::BoundarySurfaceFace>::const_iterator glueFaceIterEnd =
58 glueFaceVector.end();
59 // loop over the faces
60 for (; glueFaceIter != glueFaceIterEnd; ++glueFaceIter) {
61 const std::vector<Trk::TrackingVolume*>& glueVolumesVector =
62 gvd.glueVolumes(*glueFaceIter);
63 auto glueVolumeIter = glueVolumesVector.begin();
64 auto glueVolumeIterEnd = glueVolumesVector.end();
65 // loop over the TrackingVolumes
66 sl << " -----> Processing Face: " << int(*glueFaceIter) << " - has ";
67 sl << glueVolumesVector.size()
68 << " TrackingVolumes marked as 'GlueVolumes' " << std::endl;
69 for (; glueVolumeIter != glueVolumeIterEnd; ++glueVolumeIter)
70 sl << " - TrackingVolume: " << (*glueVolumeIter)->volumeName()
71 << std::endl;
72 }
73 return sl;
74}
const std::vector< TrackingVolume * > & glueVolumes(BoundarySurfaceFace)
retrieve them again
const std::vector< BoundarySurfaceFace > & glueFaces() const
retrieve the available Glue Faces

◆ operator<<() [56/112]

MsgStream & Trk::operator<< ( MsgStream & stream,
const PrepRawData & prd )

Definition at line 130 of file PrepRawData.cxx.

132{
133 return prd.dump(stream);
134}
virtual MsgStream & dump(MsgStream &stream) const
dump information about the PRD object.

◆ operator<<() [57/112]

MsgStream & Trk::operator<< ( MsgStream & stream,
const TrackRoad & tr )

Dump the road into a message stream.

Definition at line 41 of file TrackRoad.cxx.

43{
44 return tr.dump(stream);
45}
MsgStream & dump(MsgStream &stream) const
Dump the road into a message stream.
Definition TrackRoad.cxx:28

◆ operator<<() [58/112]

std::ostream & Trk::operator<< ( std::ostream & log,
const MultiComponentStateOnSurface &  )

Overload of << operator for std::ostream for debug output.

Definition at line 91 of file MultiComponentStateOnSurface.cxx.

93{
94 return log;
95}

◆ operator<<() [59/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const NoiseOnSurface & se )

Definition at line 18 of file NoiseOnSurface.cxx.

20{
21 return se.dump(sl);
22}

◆ operator<<() [60/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const PatternTrackParameters & se )

Definition at line 88 of file PatternTrackParameters.cxx.

90{
91 return se.dump(sl);
92}

◆ operator<<() [61/112]

std::ostream & Trk::operator<< ( std::ostream & out,
const MuonTrackSummary & trackSum )

output.

This dumps the values of each of the possible summary enums

Definition at line 83 of file MuonTrackSummary.cxx.

85{
86 out << "MuonTrackSummary: npseudo " << trackSum.npseudoMeasurements()
87 << " nscat " << trackSum.nscatterers() << " number of chambers "
88 << trackSum.chamberHitSummary().size() << std::endl;
89 std::vector<MuonTrackSummary::ChamberHitSummary>::const_iterator it =
90 trackSum.chamberHitSummary().begin();
91 std::vector<MuonTrackSummary::ChamberHitSummary>::const_iterator it_end =
92 trackSum.chamberHitSummary().end();
93
94 for (; it != it_end; ++it) {
95 const MuonTrackSummary::ChamberHitSummary& chSum = *it;
97 chSum.etaProjection();
99 chSum.phiProjection();
100 out << " Chamber " << chSum.chamberId() << " isMdt " << chSum.isMdt()
101 << std::endl
102 << " First projection: Hits " << etaP.nhits << " holes " << etaP.nholes
103 << " outlier " << etaP.noutliers << " deltas " << etaP.ndeltas
104 << " close Hits " << etaP.ncloseHits << std::endl
105 << " Second projection: Hits " << phiP.nhits << " holes " << phiP.nholes
106 << " outlier " << phiP.noutliers << " deltas " << phiP.ndeltas
107 << " close Hits " << phiP.ncloseHits << std::endl;
108 }
109 return out;
110}
unsigned int nscatterers() const
number of scattering centres on the track
unsigned int npseudoMeasurements() const
number of pseudo measurements on the track

◆ operator<<() [62/112]

std::ostream & Trk::operator<< ( std::ostream & out,
const TrackSummary & trackSum )

output.

This dumps the values of each of the possible summary enums

Definition at line 202 of file TrackSummary.cxx.

204{
205 return dumpTrackSummary(out, trackSum);
206}

◆ operator<<() [63/112]

std::ostream & Trk::operator<< ( std::ostream & out,
const VKConstraintBase & cnst )

Definition at line 9 of file Derivt.cxx.

9 {
10 int NTRK = cnst.f0t.size();
11 out.precision(7);
12 out << std::defaultfloat;
13 out << " Base constraint derivatives for NTRK=" << NTRK
14 << " CNST dim=" << cnst.NCDim << "\n";
15 out << " Momentum derivatives " << "\n";
16 for (int ic = 0; ic < cnst.NCDim; ic++) {
17 out << " d(...)/dTheta d(...)/dPhi d(...)/dInvR NC=" << ic
18 << "\n";
19 for (int i = 0; i < NTRK; i++) {
20 out << cnst.f0t[i][ic].X << ", " << cnst.f0t[i][ic].Y << ", "
21 << cnst.f0t[i][ic].Z << "\n";
22 }
23 out << " d(...)/dXv d(...)/dYy d(...)/Zv\n";
24 out << cnst.h0t[ic].X << ", " << cnst.h0t[ic].Y << ", " << cnst.h0t[ic].Z
25 << "\n";
26 out << " aa=" << cnst.aa[ic] << std::endl;
27 }
28 out.precision(6); // restore default
29 return out;
30}

◆ operator<<() [64/112]

std::ostream & Trk::operator<< ( std::ostream & out,
const VKMassConstraint & cnst )

Definition at line 32 of file Derivt.cxx.

32 {
33 const VKVertex* vk = cnst.getOriginVertex();
34 int NP = cnst.m_usedParticles.size();
35 out.precision(7);
36 out << std::defaultfloat;
37 out << " Mass constraint (total NTRK=" << vk->TrackList.size() << ")"
38 << "\n";
39 out << " * target mass: " << cnst.getTargetMass() << "\n";
40 out << " * particle indexes: ";
41 for (int i = 0; i < NP; i++) {
42 out << cnst.m_usedParticles[i] << ", ";
43 }
44 out << "\n";
45 out << " * particle masses: ";
46 for (int i = 0; i < NP; i++) {
47 out << vk->TrackList[cnst.m_usedParticles[i]]->getMass() << ", ";
48 }
49 out << "\n";
50 out << dynamic_cast<const VKConstraintBase&>(cnst) << "\n";
51 out.precision(6); // restore default
52 return out;
53}
std::vector< int > m_usedParticles
Definition Derivt.h:63
Definition dumpNPs.cxx:34

◆ operator<<() [65/112]

std::ostream & Trk::operator<< ( std::ostream & out,
const VKPhiConstraint & cnst )

Definition at line 54 of file Derivt.cxx.

54 {
55 const VKVertex* vk = cnst.getOriginVertex();
56 out.precision(7);
57 out << std::defaultfloat;
58 out << " Phi constraint (total NTRK=" << vk->TrackList.size() << ")"
59 << "\n";
60 out << dynamic_cast<const VKConstraintBase&>(cnst) << "\n";
61 out.precision(6); // restore default
62 return out;
63}

◆ operator<<() [66/112]

std::ostream & Trk::operator<< ( std::ostream & out,
const VKPlaneConstraint & cnst )

Definition at line 95 of file Derivt.cxx.

95 {
96 const VKVertex* vk = cnst.getOriginVertex();
97 out.precision(7);
98 out << std::defaultfloat;
99 out << " Vertex in plane constraint (total NTRK=" << vk->TrackList.size()
100 << ")" << "\n";
101 out << " Plane(A,B,C,D):" << cnst.getA() << ", " << cnst.getB() << ", "
102 << cnst.getC() << ", " << cnst.getD() << "\n";
103 out << dynamic_cast<const VKConstraintBase&>(cnst) << "\n";
104 out.precision(6); // restore default
105 return out;
106}

◆ operator<<() [67/112]

std::ostream & Trk::operator<< ( std::ostream & out,
const VKPointConstraint & cnst )

Definition at line 76 of file Derivt.cxx.

76 {
77 const VKVertex* vk = cnst.getOriginVertex();
78 out.precision(7);
79 out << std::defaultfloat;
80 if (!cnst.onlyZ()) {
81 out << " Point constraint (total NTRK=" << vk->TrackList.size() << ")"
82 << "\n";
83 } else {
84 out << " Z point constraint (total NTRK=" << vk->TrackList.size() << ")"
85 << "\n";
86 }
87 out << " target vertex=" << cnst.getTargetVertex()[0] << ", "
88 << cnst.getTargetVertex()[1] << ", " << cnst.getTargetVertex()[2]
89 << "\n";
90 out << dynamic_cast<const VKConstraintBase&>(cnst) << "\n";
91 out.precision(6); // restore default
92 return out;
93}

◆ operator<<() [68/112]

std::ostream & Trk::operator<< ( std::ostream & out,
const VKRadiusConstraint & cnst )

Definition at line 108 of file Derivt.cxx.

108 {
109 const VKVertex* vk = cnst.getOriginVertex();
110 out.precision(7);
111 out << std::defaultfloat;
112 out << " Vertex in radius constraint (total NTRK=" << vk->TrackList.size()
113 << ")\n" ;
114 out << " Fixed Radius:" << cnst.getRC() << "\n";
115 out << dynamic_cast<const VKConstraintBase&>(cnst) << "\n";
116 out.precision(6); // restore default
117 return out;
118}

◆ operator<<() [69/112]

std::ostream & Trk::operator<< ( std::ostream & out,
const VKThetaConstraint & cnst )

Definition at line 65 of file Derivt.cxx.

65 {
66 const VKVertex* vk = cnst.getOriginVertex();
67 out.precision(7);
68 out << std::defaultfloat;
69 out << " Theta constraint (total NTRK=" << vk->TrackList.size() << ")"
70 << "\n";
71 out << dynamic_cast<const VKConstraintBase&>(cnst) << "\n";
72 out.precision(6); // restore default
73 return out;
74}

◆ operator<<() [70/112]

std::ostream & Trk::operator<< ( std::ostream & out,
const VKTrack & track )

Definition at line 96 of file TrkVKalVrtCoreBase.cxx.

97 {
98 //out.setf( std::ios::defaultfloat ); out.precision(5); out << std::endl;
99 out.precision(5); out << std::defaultfloat;
100 out << " Track par: Iteration <-> Ref" << std::endl;
101 out << " * a_0 : "<< track.a0() <<" "<< track.r_a0() << std::endl;
102 out << " * z_0 : "<< track.z() <<" "<< track.r_z() << std::endl;
103 out << " * theta : "<< track.theta()<<" "<< track.r_theta()<< std::endl;
104 out << " * phi : "<< track.phi() <<" "<< track.r_phi() << std::endl;
105 out << " * q/R : "<< track.invR() <<" "<< track.r_invR() << std::endl;
106 out << " * Charge: "<< track.Charge <<" Mass: "<<track.m_mass<< std::endl;
107 out << "-> with ref ErrorMatrix: " << std::endl;out.precision(5);
108 out << track.refCovar[0] <<std::endl;
109 out << track.refCovar[1] <<", "<<track.refCovar[2] <<std::endl;
110 out << track.refCovar[3] <<", "<<track.refCovar[4] <<", "<<track.refCovar[5] <<std::endl;
111 out << track.refCovar[6] <<", "<<track.refCovar[7] <<", "<<track.refCovar[8] <<", "
112 << track.refCovar[9]<<std::endl;
113 out << track.refCovar[10]<<", "<<track.refCovar[11]<<", "<<track.refCovar[12]<<", "
114 << track.refCovar[13]<<", "<<track.refCovar[14]<<std::endl;
115 out << "-> and iteration WeightMatrix: " << std::endl;
116 out << track.WgtM[0] <<std::endl;
117 out << track.WgtM[1] <<", "<<track.WgtM[2] <<std::endl;
118 out << track.WgtM[3] <<", "<<track.WgtM[4] <<", "<<track.WgtM[5] <<std::endl;
119 out << track.WgtM[6] <<", "<<track.WgtM[7] <<", "<<track.WgtM[8] <<", "
120 << track.WgtM[9]<<std::endl;
121 out << track.WgtM[10]<<", "<<track.WgtM[11]<<", "<<track.WgtM[12]<<", "
122 << track.WgtM[13]<<", "<<track.WgtM[14]<<std::endl;
123 return out;
124 }

◆ operator<<() [71/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const AlignmentEffectsOnTrack & tsos )

Overload of << operator for std::ostream for debug output.

Definition at line 40 of file AlignmentEffectsOnTrack.cxx.

42{
43 sl << "AlignmentEffectsOnTrack:" << std::endl;
44 sl << "deltaTranslation = " << aeot.deltaTranslation() << std::endl;
45 sl << "sigmaDeltaTranslation = " << aeot.deltaTranslation() << std::endl;
46 sl << "deltaAngle = " << aeot.deltaAngle() << std::endl;
47 sl << "sigmaDeltaAngle = " << aeot.sigmaDeltaAngle() << std::endl;
48 sl << "surface = " << aeot.associatedSurface() << std::endl;
49 return sl;
50}

◆ operator<<() [72/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const AlignTrack::AlignTrackType type )

Definition at line 391 of file AlignTrack.cxx.

392 {
393 switch(type) {
395 return sl<<"Unknown ";
397 return sl<<"Original ";
399 return sl<<"NormalRefitted ";
401 return sl<<"BeamspotConstrained ";
403 return sl<<"VertexConstrained ";
404 default:
405 return sl<<"UNDEFINED ";
406 }
407 }

◆ operator<<() [73/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const AssociatedMaterial & mstep )

Definition at line 214 of file AssociatedMaterial.cxx.

215 {
216 return mstep.dump(sl);
217}

◆ operator<<() [74/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const BinUtility & bgen )

Definition at line 23 of file BinUtility.cxx.

25{
26 return bgen.dump(sl);
27}

◆ operator<<() [75/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const CurvilinearUVT & uvt )

Definition at line 25 of file CurvilinearUVT.cxx.

26{
27 sl << "Trk::CuvilinearUVT - curvilinear frame (u,v,t)" << std::endl;
28 sl << " u = " << uvt.curvU() << std::endl;
29 sl << " v = " << uvt.curvV() << std::endl;
30 sl << " t = " << uvt.curvT() << std::endl;
31
32 return sl;
33}

◆ operator<<() [76/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const ElementTable & etab )

Definition at line 37 of file ElementTable.cxx.

37 {
38 std::string none = "None";
39 sl << " ------------------------- Trk::ElementTable "
40 "-------------------------- "
41 << std::endl;
42 sl << " - Listing " << etab.size() << " elements " << std::endl;
43 for (unsigned int iel = 0; iel < static_cast<unsigned int>(UCHAR_MAX); ++iel)
44 sl << " - Id : " << std::setw(3) << iel << " - Properties: "
45 << (etab.element(iel) ? etab.element(iel)->toString() : none)
46 << " - Name : " << etab.elementName(iel) << std::endl;
47 sl << " ---------------------------------------------------------------------"
48 "- "
49 << std::endl;
50 return sl;
51}

◆ operator<<() [77/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const EnergyLoss & eloss )

Overload of << operator for std::ostream for debug outputstd::ostream&.

Definition at line 22 of file EnergyLoss.cxx.

24{
25 return eloss.dump(sl);
26}

◆ operator<<() [78/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const FitQualityImpl & fq )

Overload of << operator for std::ostream for debug output.

Definition at line 24 of file FitQuality.cxx.

25{
26 const std::streamsize old_prec = sl.precision();
27 const auto old_flags = sl.flags();
28 sl << std::setiosflags(std::ios::fixed)<< std::setprecision(3);
29 sl <<"FitQuality: \t"
30 << "("<<fq.chiSquared()<<", \t"<<fq.numberDoF()<<")\t"
31 << "(chi^2, ndf)";
32 sl.flags(old_flags);
33 sl.precision(old_prec);
34 return sl;
35}
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
Definition FitQuality.h:60
double chiSquared() const
returns the of the overall track fit
Definition FitQuality.h:56

◆ operator<<() [79/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const JacobianCurvilinearToLocal & jac )

Definition at line 110 of file JacobianCurvilinearToLocal.cxx.

111{
112 sl << std::setiosflags(std::ios::fixed);
113 sl << std::setprecision(7);
114 sl << "Trk::JacobianCurvilinearToLocal " << std::endl;
115 sl << "______________________________________________________________________" << std::endl;
116 for (int irow = 0; irow<5; irow++){
117 for (int icol =0; icol<5; icol++){
118 sl << (jac)(irow,icol);
119 if (irow < 4 || icol < 4 ) { sl << " ";}
120 }
121 sl << std::endl;
122 }
123 sl << "______________________________________________________________________";
124 return sl;
125}

◆ operator<<() [80/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const LayerIndex & layx )

Definition at line 42 of file LayerIndex.cxx.

44{
45 sl << layx.value();
46 return sl;
47}

◆ operator<<() [81/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const LayerMaterialProperties & mprop )

Definition at line 14 of file LayerMaterialProperties.cxx.

15 {
16 return lmp.dump(sl);
17}

◆ operator<<() [82/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const LinearizedTrack & sf )

Definition at line 112 of file LinearizedTrack.cxx.

114{
115 return sf.dump(sl);
116}

◆ operator<<() [83/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const LocalDirection & lomo )

Definition at line 26 of file LocalDirection.cxx.

27{
28 ls << std::setiosflags(std::ios::fixed) << std::setprecision(3);
29// ls << "(angleXZ, angleYZ, magnitude) = ";
30 ls << "(angleXZ, angleYZ) = ";
31 ls << "(" << lom.angleXZ();
32 ls << "," << lom.angleYZ() << ")";
33 ls << std::setprecision(-1);
34 return ls;
35}

◆ operator<<() [84/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const MagneticFieldProperties & mprop )

Definition at line 21 of file MagneticFieldProperties.cxx.

22 {
23 sl << "Trk::MagneticFieldProperties, configuration: "
24 << mprop.magneticFieldMode() << std::endl;
25 return sl;
26}

◆ operator<<() [85/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const MaterialEffectsBase & meb )

Overload of << operator for std::ostream for debug output.

Definition at line 57 of file MaterialEffectsBase.cxx.

59{
60 return meb.dump(sl);
61}

◆ operator<<() [86/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const MaterialProperties & mprop )

Definition at line 98 of file MaterialProperties.cxx.

99 {
100 sl << "Trk::MaterialProperties: " << std::endl;
101 sl << " - thickness/X0 = " << mprop.thicknessInX0()
102 << std::endl;
103 sl << " - thickness [mm] = " << mprop.thickness()
104 << std::endl;
105 sl << " - radiation length X0 [mm] = " << mprop.x0()
106 << std::endl;
107 sl << " - nuclear interaction length L0 [mm] = " << mprop.l0()
108 << std::endl;
109 sl << " - average material Z/A*rho [gram/mm^3] = "
110 << mprop.zOverAtimesRho() << std::endl;
111 return sl;
112}

◆ operator<<() [87/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const MaterialStep & mstep )

Definition at line 74 of file MaterialStep.cxx.

75 {
76 return mstep.dump(sl);
77}

◆ operator<<() [88/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const MemoryLogger & oac )

Definition at line 56 of file MemoryLogger.cxx.

58{
59 sl << "[ memory usage ] in kB ( VmSize | VmRSS ) : " << mlg.vmSize() << '\t' << mlg.vmRss();
60 return sl;
61}

◆ operator<<() [89/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const ObjectAccessor & oac )

Definition at line 24 of file ObjectAccessor.cxx.

26{
27 for (const ObjectAccessor::value_type& elm : oac) {
28 sl << (oac.end() - oac.begin()) << "-ObjectAccessor: | " << elm << " | ";
29 }
30 return sl;
31}

◆ operator<<() [90/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const Trk::SpacePoint & spacePoint )

Overload of << operator for std::ostream for debug output.

Definition at line 50 of file Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx.

51 {
52 return spacePoint.dump(sl);
53 }

◆ operator<<() [91/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const Surface & sf )

Definition at line 218 of file Surface.cxx.

220{
221 return sf.dump(sl);
222}

◆ operator<<() [92/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const SurfaceBounds & sb )

Definition at line 19 of file SurfaceBounds.cxx.

21{
22 return sb.dump(sl);
23}

◆ operator<<() [93/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const Track & track )

Overload of << operator for std::ostream for debug output.

Definition at line 269 of file Tracking/TrkEvent/TrkTrack/src/Track.cxx.

269 {
270 std::string name("Track ");
271 sl << name << "Author = " << track.info().dumpInfo() << std::endl;
272 if (track.fitQuality() != nullptr) {
273 sl << *(track.fitQuality()) << std::endl;
274 }
275 if (track.trackSummary() != nullptr) {
276 sl << *(track.trackSummary()) << std::endl;
277 } else {
278 sl << "No TrackSummary available in this track." << std::endl;
279 }
280
281 if (track.trackStateOnSurfaces() != nullptr) {
282 sl << name << "has " << (track.trackStateOnSurfaces()->size())
283 << " trackStateOnSurface(s)" << std::endl;
285 track.trackStateOnSurfaces()->cbegin();
286 int num = 0;
287 for (; it != track.trackStateOnSurfaces()->cend(); ++it) {
288 sl << " --------- Start of TrackStateOnSurface \t" << num << "\t-------"
289 << std::endl;
290 sl << (**it);
291 sl << " --------- End of TrackStateOnSurface \t" << num++ << "\t-------"
292 << std::endl;
293 }
294 }
295 return sl;
296}

◆ operator<<() [94/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const TrackInfo & track )

Overload of << operator for std::ostream for debug output.

Definition at line 225 of file Tracking/TrkEvent/TrkTrack/src/TrackInfo.cxx.

227{
228 sl << info.dumpInfo() << std::endl;
229 return sl;
230}

◆ operator<<() [95/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const TrackParticleBase & trackParticleBase )

Overload of << operator for std::ostream for debug output.

Definition at line 253 of file TrackParticleBase.cxx.

254 {
255 trackParticleBase.dump(sl);
256 return sl;
257 }

◆ operator<<() [96/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const TrackStateOnSurface & tsos )

Overload of << operator for std::ostream for debug output.

return sl; don't return here, the next code becomes dead

Definition at line 283 of file TrackStateOnSurface.cxx.

285{
286 std::string name("TrackStateOnSurface: ");
287 sl << name << "\t of type : " << tsos.dumpType() << std::endl;
288
289 sl << "\t FitQualityOnSurface(s)." << std::endl;
290 sl << "\t \t" << (tsos.fitQualityOnSurface()) << std::endl;
291
292 if (tsos.trackParameters() != nullptr) {
293 sl << "\t HAS TrackParameter(s)." << std::endl;
294 sl << "\t \t" << *(tsos.trackParameters()) << std::endl;
295 } else {
296 sl << "\t NO TrackParameters." << std::endl;
297 }
298
299 if (tsos.measurementOnTrack() != nullptr) {
300 sl << "\t HAS MeasurementBase(s)." << std::endl;
301 sl << "\t \t" << *(tsos.measurementOnTrack()) << std::endl;
302 } else {
303 sl << "\t NO MeasurementBase." << std::endl;
304 }
305
306 if (tsos.materialEffectsOnTrack() != nullptr) {
307 sl << "\t HAS MaterialEffectsBase." << std::endl;
308 sl << "\t \t" << *(tsos.materialEffectsOnTrack()) << std::endl;
309 } else {
310 sl << "\t NO MaterialEffects." << std::endl;
311 }
312
313 if (tsos.alignmentEffectsOnTrack() != nullptr) {
314 sl << "\t HAS AlignmentEffectsOnTrack." << std::endl;
315 sl << "\t \t" << *(tsos.alignmentEffectsOnTrack()) << std::endl;
316 } else {
317 sl << "\t NO AlignmentEffectsOnTrack." << std::endl;
318 }
319 return sl;
320}

◆ operator<<() [97/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const TrackSurfaceIntersection & tsfi )

Definition at line 70 of file TrackSurfaceIntersection.cxx.

72{
73 const auto old_flags = sl.flags();
74 const auto old_prec = sl.precision();
75
76 sl.setf(std::ios::fixed, std::ios::floatfield);
77 sl.precision(7);
78
79 sl << "Trk::TrackSurfaceIntersection\n"
80 << " position [mm] = (" << tsfi.position().x() << ", "
81 << tsfi.position().y() << ", " << tsfi.position().z() << ")\n"
82 << " direction = (" << tsfi.direction().x() << ", "
83 << tsfi.direction().y() << ", " << tsfi.direction().z() << ")\n"
84 << " pathlength [mm] = " << tsfi.pathlength() << '\n';
85
86 sl.flags(old_flags);
87 sl.precision(old_prec);
88 return sl;
89}
const Amg::Vector3D & direction() const
Method to retrieve the direction at the Intersection.
const Amg::Vector3D & position() const
Method to retrieve the position of the Intersection.
double pathlength() const
Method to retrieve the pathlength propagated till the Intersection.

◆ operator<<() [98/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const TransportJacobian & jac )

Definition at line 112 of file TransportJacobian.cxx.

114{
115 sl << "|-------------|-------------|-------------|-------------|-------------"
116 "|-------------|"
117 << std::endl;
118 sl << "| Jacobian(A) | Old /dL1 | /dL2 | /dPhi | /dThe "
119 "| /dCM |"
120 << std::endl;
121 sl << "|-------------|-------------|-------------|-------------|-------------"
122 "|-------------|"
123 << std::endl;
124
125 sl << "| New dL1 / |" << std::setw(12) << std::setprecision(5) << J(0, 0)
126 << " |" << std::setw(12) << std::setprecision(5) << J(0, 1) << " |"
127 << std::setw(12) << std::setprecision(5) << J(0, 2) << " |"
128 << std::setw(12) << std::setprecision(5) << J(0, 3) << " |"
129 << std::setw(12) << std::setprecision(5) << J(0, 4) << " |" << std::endl;
130 sl << "| dL2 / |" << std::setw(12) << std::setprecision(5) << J(1, 0)
131 << " |" << std::setw(12) << std::setprecision(5) << J(1, 1) << " |"
132 << std::setw(12) << std::setprecision(5) << J(1, 2) << " |"
133 << std::setw(12) << std::setprecision(5) << J(1, 3) << " |"
134 << std::setw(12) << std::setprecision(5) << J(1, 4) << " |" << std::endl;
135 sl << "| dPhi/ |" << std::setw(12) << std::setprecision(5) << J(2, 0)
136 << " |" << std::setw(12) << std::setprecision(5) << J(2, 1) << " |"
137 << std::setw(12) << std::setprecision(5) << J(2, 2) << " |"
138 << std::setw(12) << std::setprecision(5) << J(2, 3) << " |"
139 << std::setw(12) << std::setprecision(5) << J(2, 4) << " |" << std::endl;
140 sl << "| dThe/ |" << std::setw(12) << std::setprecision(5) << J(3, 0)
141 << " |" << std::setw(12) << std::setprecision(5) << J(3, 1) << " |"
142 << std::setw(12) << std::setprecision(5) << J(3, 2) << " |"
143 << std::setw(12) << std::setprecision(5) << J(3, 3) << " |"
144 << std::setw(12) << std::setprecision(5) << J(3, 4) << " |" << std::endl;
145 sl << "| dCM / |"
146
147 << std::setw(12) << std::setprecision(5) << J(4, 0) << " |"
148 << std::setw(12) << std::setprecision(5) << J(4, 1) << " |"
149 << std::setw(12) << std::setprecision(5) << J(4, 2) << " |"
150 << std::setw(12) << std::setprecision(5) << J(4, 3) << " |"
151 << std::setw(12) << std::setprecision(5) << J(4, 4) << " |" << std::endl;
152 sl << "|-------------|-------------|-------------|-------------|-------------"
153 "|-------------|"
154 << std::endl;
155 return sl;
156}

◆ operator<<() [99/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const Trk::LocalParameters & lp )

Definition at line 109 of file LocalParameters.cxx.

110{
111 std::streamsize ss = sl.precision();
112 sl << std::setiosflags(std::ios::fixed)<< std::setprecision(3);
113 sl << "Trk::LocalParameters " <<": (";
114 for (int ipar=0; ipar<lp.dimension(); ++ipar)
115 { sl << lp(ipar);
116 if (ipar+1 < lp.dimension()) { sl << ", ";
117 } else { sl << ") - key: "<< lp.m_parameterkey << "(";}
118 }
119
120 for (int itag = 0, ipos=1; itag<5; ++itag, ipos*=2)
121 { bool bit = (lp.m_parameterkey & ipos);
122 if (bit) { sl << "1";
123 } else { sl << "0";
124 }
125 }
126 sl << ")";
127 sl.precision (ss); sl<<std::resetiosflags(std::ios::fixed);
128
129
130 return sl;
131}
int dimension() const
Dimension of this localParameters() vector.

◆ operator<<() [100/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const Trk::MeasurementBase & mbase )
inline

Overload of << operator for std::ostream for debug output.

Definition at line 123 of file MeasurementBase.h.

125{
126 return mbase.dump(sl);
127}

◆ operator<<() [101/112]

template<int DIM, class T>
std::ostream & Trk::operator<< ( std::ostream & sl,
const Trk::ParametersBase< DIM, T > & tp )

◆ operator<<() [102/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const Trk::ScatteringAngles & saos )

Overload of << operator for std::ostream for debug output.

Definition at line 22 of file ScatteringAngles.cxx.

24{
25 sl << "ScatteringAngles: " << std::endl;
26 sl << "\t deltaPhi : " << saos.deltaPhi() << std::endl;
27 sl << "\t deltaTheta : " << saos.deltaTheta() << std::endl;
28 sl << "\t sigmaDeltaPhi : " << saos.sigmaDeltaPhi() << std::endl;
29 sl << "\t sigmaDeltaTheta : " << saos.sigmaDeltaTheta() << std::endl;
30 return sl;
31}

◆ operator<<() [103/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const Vertex & sf )

Definition at line 56 of file Vertex.cxx.

58{
59 return sf.dump(sl);
60}

◆ operator<<() [104/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const VertexPositions & sf )

Definition at line 79 of file VertexPositions.cxx.

81{
82 return sf.dump(sl);
83}

◆ operator<<() [105/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const Volume & vol )

Definition at line 104 of file Volume.cxx.

106{
107 sl << "Trk::Volume with VolumeBounds :" << vol.volumeBounds() << std::endl;
108 return sl;
109}

◆ operator<<() [106/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const VolumeBounds & vb )

Definition at line 20 of file VolumeBounds.cxx.

22{
23 return vb.dump(sl);
24}

◆ operator<<() [107/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const VxCandidate & sf )

Definition at line 128 of file VxCandidate.cxx.

130{
131 return sf.dump(sl);
132}

◆ operator<<() [108/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const VxClusteringTable & sf )

Definition at line 58 of file VxClusteringTable.cxx.

59 { return sf.dump(sl); }

◆ operator<<() [109/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
const VxTrackAtVertex & sf )

Definition at line 500 of file VxTrackAtVertex.cxx.

502{
503 return sf.dump(sl);
504}

◆ operator<<() [110/112]

std::ostream & Trk::operator<< ( std::ostream & sl,
GlueVolumesDescriptor & mprop )

Definition at line 76 of file GlueVolumesDescriptor.cxx.

77 {
78 sl << "Trk::GlueVolumesDescriptor: " << std::endl;
79 const std::vector<Trk::BoundarySurfaceFace>& glueFaceVector = gvd.glueFaces();
80 sl << " has Tracking Volumes registered for : " << glueFaceVector.size()
81 << " Volume faces." << std::endl;
82 std::vector<Trk::BoundarySurfaceFace>::const_iterator glueFaceIter =
83 glueFaceVector.begin();
84 std::vector<Trk::BoundarySurfaceFace>::const_iterator glueFaceIterEnd =
85 glueFaceVector.end();
86 // loop over the faces
87 for (; glueFaceIter != glueFaceIterEnd; ++glueFaceIter) {
88 const std::vector<Trk::TrackingVolume*>& glueVolumesVector =
89 gvd.glueVolumes(*glueFaceIter);
90 auto glueVolumeIter = glueVolumesVector.begin();
91 auto glueVolumeIterEnd = glueVolumesVector.end();
92 // loop over the TrackingVolumes
93 sl << " -----> Processing Face: " << int(*glueFaceIter) << " - has ";
94 sl << glueVolumesVector.size()
95 << " TrackingVolumes marked as 'GlueVolumes' " << std::endl;
96 for (; glueVolumeIter != glueVolumeIterEnd; ++glueVolumeIter)
97 sl << " - TrackingVolume: " << (*glueVolumeIter)->volumeName()
98 << std::endl;
99 }
100 return sl;
101}

◆ operator<<() [111/112]

std::ostream & Trk::operator<< ( std::ostream & stream,
const PrepRawData & prd )

Definition at line 136 of file PrepRawData.cxx.

138{
139 return prd.dump(stream);
140}

◆ operator<<() [112/112]

std::ostream & Trk::operator<< ( std::ostream & stream,
const TrackRoad & tr )

Dump the road into a standard output stream.

Definition at line 47 of file TrackRoad.cxx.

49{
50 return tr.dump(stream);
51}

◆ operator<=()

bool Trk::operator<= ( const LayerIndex & one,
const LayerIndex & two )

Definition at line 17 of file LayerIndex.cxx.

19{
20 return (one.value() <= two.value());
21}

◆ operator>()

bool Trk::operator> ( const LayerIndex & one,
const LayerIndex & two )

Definition at line 24 of file LayerIndex.cxx.

25{
26 return (one.value() > two.value());
27}

◆ operator>=()

bool Trk::operator>= ( const LayerIndex & one,
const LayerIndex & two )

Definition at line 30 of file LayerIndex.cxx.

31{
32 return (one.value() >= two.value());
33}

◆ ParaMin()

void Trk::ParaMin ( double b,
double c,
double d,
double e,
double f,
double & xmin,
double & ymin )

Definition at line 282 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Utilities.cxx.

284{
285 ymin = (f*b-2.*c*d)/(4.*c*e - f*f);
286 if( std::abs(f) > std::abs(c) ) { xmin = - (2.*e*ymin + d)/f;}
287 else { xmin = - (f*ymin+b)/(2.*c);}
288 }
double ymin
Definition listroot.cxx:63
double xmin
Definition listroot.cxx:60

◆ processCascade() [1/3]

int Trk::processCascade ( CascadeEvent & cascadeEvent_)

Definition at line 244 of file CFitCascade.cxx.

245{
246 int translateToFittedPos(CascadeEvent &, double Step=1.);
247 int restorePreviousPos(CascadeEvent &, std::vector<VKVertex> & );
248
249 VKVertex * vk;
250 long int Iter, IERR, iv, i;
251//============================================================================================
252//
253// First without pointing to get initial estimations and resolve mass constraints
254// This initial step is needed to get initial estimation for "passing near constraint
255//
256 for(iv=0; iv<cascadeEvent_.cascadeNV; iv++){
257 vk = cascadeEvent_.cascadeVertexList[iv].get();
258 IERR = fitVertexCascade( vk, 0); if(IERR)return IERR; //fit
259 IERR = setVTrackMass(vk); if(IERR)return IERR; //mass of combined particle
260 }
261 IERR = translateToFittedPos(cascadeEvent_); if(IERR)return IERR;
262//
263// Now standard fit without pointing in cascade but WITH pointing to PV if present
264//
265
266 double Chi2Old=0.,Chi2Cur=0.;
267 for(Iter=0; Iter<100; Iter++){
268 Chi2Cur=0.;
269 for(iv=0; iv<cascadeEvent_.cascadeNV; iv++){
270 vk = cascadeEvent_.cascadeVertexList[iv].get();
271//
272//Calculate derivatives for "passing near" cnst. Initial vertex position is used for derivatives.
273//Results are saved in ForVRTClose structure
274 if(cascadeEvent_.nearPrmVertex && iv==(cascadeEvent_.cascadeNV-1)){ //only last vertex in cascade may have it
275 double dparst[6]={vk->refIterV[0]+vk->iniV[0], vk->refIterV[1]+vk->iniV[1], vk->refIterV[2]+vk->iniV[2],
276 vk->fitMom[0], vk->fitMom[1], vk->fitMom[2] };
277 vk->FVC.Charge=getVertexCharge(vk);
278 if(vk->FVC.Charge!=0)vk->FVC.Charge=std::copysign(1,vk->FVC.Charge);
279 vpderiv(true, vk->FVC.Charge, dparst, vk->fitCovXYZMom, vk->FVC.vrt, vk->FVC.covvrt,
280 vk->FVC.cvder, vk->FVC.ywgt, vk->FVC.rv0, (vk->vk_fitterControl).get());
281 }
282 IERR = fitVertexCascade( vk, 0); if(IERR)return IERR; //fit
283 IERR = setVTrackMass(vk); if(IERR)return IERR; //mass of combined particle
284 Chi2Cur += vk->Chi2;
285//std::cout<<iv<<"---Chi2="<<vk->Chi2<<", "<<vk->refIterV[0]+vk->fitV[0]<<", "<<vk->refIterV[1]+vk->fitV[1]<<", "<<vk->refIterV[2]+vk->fitV[2]<<'\n';
286 }
287 if( Chi2Cur-Chi2Old > 1. && Iter){ IERR = translateToFittedPos(cascadeEvent_,0.8);} //step limitation is case of divergence
288 else { IERR = translateToFittedPos(cascadeEvent_,1.0);} if(IERR)return IERR;
289
290//std::cout<<" free iter="<<Iter<<", "<<Chi2Cur<<", "<<Chi2Old-Chi2Cur<<"; "<<cascadeEvent_.cascadeNV<<'\n';
291 if(std::abs(Chi2Cur-Chi2Old)<0.01)break; //stable cascade position
292 if(Iter>10 && (Chi2Cur-Chi2Old)>0.)break; //oscillations. Stop preliminary fit
293 Chi2Old=Chi2Cur;
294 if(Chi2Cur>1.e6 && Iter>0) return -1; //Too bad iteration. Drop fit
295 }
296// if(Chi2Cur>3000.) return -1; // Initial solution is too bad!!!
297//-------------------------------- Check constraints status
298 double cnstRemnants=cascadeCnstRemnants(cascadeEvent_);
299 if( cnstRemnants > 10000.e0) return -2; /* Constraints are not resolved. Stop fit */
300 if(cnstRemnants==0. && Chi2Cur>3000. ) return -1; // Initial solution is too bad!!!
301 if( Chi2Cur>50000.) return -1; // Initial solution is too bad!!!
302//-------------------------------------------------------------------------
303// Attach pointing constraint to affected vertices and create working arrays
304// of correct size
305//
306 for(iv=0; iv<cascadeEvent_.cascadeNV; iv++){
307 vk = cascadeEvent_.cascadeVertexList[iv].get();
308 if(vk->nextCascadeVrt){
309 long int NTRK = vk->TrackList.size();
310 vk->ConstraintList.emplace_back(new VKPointConstraint( NTRK, vk->nextCascadeVrt->refIterV , vk, false));
311 }
312 }
313 long int fullNPar = getCascadeNPar(cascadeEvent_);
314 if (fullNPar<0) return -1;
315 double * fullMatrix = new double[fullNPar*fullNPar];
316 double * iniCovMatrix = new double[fullNPar*fullNPar];for(int ss=0; ss<fullNPar*fullNPar; ss++) iniCovMatrix[ss]=0.;
317 double * fullLSide = new double[fullNPar];
318 double * tmpLSide = new double[fullNPar];
319 //std::unique_ptr<double[]> tmpLSide = std::unique_ptr<double[]>(new double[fullNPar])
320 std::vector<VKVertex> listVCopy(cascadeEvent_.cascadeNV);
321//-------------------------------------------------------
322// Now fit with pointing constraint
323//
324 cascadeEvent_.matrixPnt.resize(cascadeEvent_.cascadeNV);
325 long int NParCur, NStart;
326 int getBack=0; // counter of oscillations
327 int fullSTOP=0; // immediate stop iteration flag
328 double Chi2Diff=0.;
329
330 int NFitIterationMax=100; // Maximal amount of iterations
331 int badStepCountMax=5; // Maximal amount of bad steps
332
333 cnstRemnants=100000.; double cnstProgr=1.; double minCnstRemnants=100000.;
334 int badStepCount=0;
335
336 for(Iter=0; Iter<=NFitIterationMax; Iter++){
337 Chi2Cur=0.;
338 NStart=0;
339 for( iv=0; iv<fullNPar*fullNPar; iv++)fullMatrix[iv]=0.; // zero full matrix
340 for( iv=0; iv<cascadeEvent_.cascadeNV; iv++){
341 vk = cascadeEvent_.cascadeVertexList[iv].get();
342//
343//Calculate derivatives for "passing near" cnst. Initial vertex position is used for derivatives.
344//Results are saved in ForVRTClose structure
345 if(cascadeEvent_.nearPrmVertex && iv==(cascadeEvent_.cascadeNV-1)){ //only last vertex in cascade may have it
346 double dparst[6]={vk->refIterV[0]+vk->iniV[0], vk->refIterV[1]+vk->iniV[1], vk->refIterV[2]+vk->iniV[2],
347 vk->fitMom[0], vk->fitMom[1], vk->fitMom[2] };
348 vk->FVC.Charge=getVertexCharge(vk);
349 if(vk->FVC.Charge!=0)vk->FVC.Charge=std::copysign(1,vk->FVC.Charge);
350 vpderiv(vk->passWithTrkCov, vk->FVC.Charge, dparst, vk->fitCovXYZMom,
351 vk->FVC.vrt, vk->FVC.covvrt, vk->FVC.cvder, vk->FVC.ywgt, vk->FVC.rv0, (vk->vk_fitterControl).get());
352 }
353 if (vk->vk_fitterControl->vk_forcft.irob != 0) {robtest(vk, 0, Iter);} // ROBUSTIFICATION new data structure
354 if (vk->vk_fitterControl->vk_forcft.irob != 0) {robtest(vk, 1, Iter);} // ROBUSTIFICATION new data structure
355 IERR = fitVertexCascade( vk, 1 ); if(IERR) break; //with passNear for last vertex in cascade if needed
356 IERR = setVTrackMass(vk); if(IERR) break; //mass of combined particle
357//
358//Get full constraint matrix and left side for vertex
359 cascadeEvent_.matrixPnt[iv]=NStart;
360 NParCur = FullMCNSTfill( vk, vk->ader, tmpLSide);
361//
362//Move them to cascade full matrix and left side
363 copyFullMtx( vk->ader, NParCur, NParCur, fullMatrix, NStart, fullNPar);
364//
365//Copy error matrix for left side vector (measured part T,U1,..,Un - see Billoir)
366// to correct place in iniCovMatrix matrix. Only at last step and without constraint part!!! CHECK IT!!!
367 if(Iter==NFitIterationMax || fullSTOP || badStepCount>=badStepCountMax)
368 copyFullMtx( vk->ader, 3+3*vk->TrackList.size(), NParCur, iniCovMatrix, NStart, fullNPar);
369//
370// Fill left part of the system
371 for(i=0; i<NParCur; i++) fullLSide[i+NStart] = tmpLSide[i];
372 NStart += NParCur;
373 Chi2Cur += vk->Chi2;
374//std::cout<<iv<<"--------Chi2="<<vk->Chi2<<", "<<cascadeEvent_.nearPrmVertex<<" nstart="<<NStart<<'\n';
375 }
376 if( (Chi2Cur>1.e8 && Iter>0) || IERR){
377 delete[] fullMatrix; delete[] fullLSide; delete[] tmpLSide; delete[] iniCovMatrix;
378 if(Chi2Cur>1.e8) return -1;
379 return IERR;
380 }
381//
382//--- Attempt to dump oscillations by returning to good position
383 cnstProgr=cascadeCnstRemnants(cascadeEvent_)/cnstRemnants;
384 if( Iter>3 && cnstProgr>4. && getBack<5 && fullSTOP==0 ) { //------ Bad previous step discovered.
385 //std::cout<<" oscillation discovered="<<Iter<<" progr="<<cnstProgr<<'\n';
386 IERR=restorePreviousPos(cascadeEvent_, listVCopy );
387 if(IERR){ delete[] fullMatrix; delete[] fullLSide; delete[] tmpLSide; delete[] iniCovMatrix; return IERR;}
388 cnstRemnants=100000.; Chi2Old+=10000; // to skip restoring on next iteration
389 if(Iter==NFitIterationMax )Iter-=2; // to give time to converge after this operation
390 if(Iter==NFitIterationMax-1)Iter-=1; // to give time to converge after this operation
391 getBack++; badStepCount=0;
392 continue;
393 } //--------- Make some copy of vertices for safety
394 cnstRemnants*=cnstProgr; cnstRemnants += 1.e-6*cascadeEvent_.getAccuracyConstraint(); //VK Protection against 0
395 if(cnstRemnants<minCnstRemnants)minCnstRemnants=cnstRemnants;
396 if(minCnstRemnants==cnstRemnants){ //--------- Make copy of vertices for safety at best point
397 for( iv=0; iv<cascadeEvent_.cascadeNV; iv++){
398 listVCopy.at(iv)=*(cascadeEvent_.cascadeVertexList[iv]); // vertex list copy
399 }
400 }
401//--------------------------------------------------------------------------
402//for( iv=0; iv<fullNPar; iv++)std::cout<<fullLSide[iv]<<", ";std::cout<<'\n';
403// std::cout<<fullLSide[3+3*2]<<", "<<fullLSide[3+3*2+1]<<", "<<
404// fullLSide[20]<<", "<<fullLSide[21]<<", "<<fullLSide[22]<<'\n';
405//---------------------------------------------------------------------------
406//
407// Add cross vertices derivatives
408 addCrossVertexDeriv(cascadeEvent_, fullMatrix, fullNPar, cascadeEvent_.matrixPnt);
409//
410// Add pseudotrack momentum fix
411//
412 int tstRet=fixPseudoTrackPt(fullNPar, fullMatrix, fullLSide, cascadeEvent_ );
413 if( tstRet ){ delete[] fullMatrix; delete[] fullLSide; delete[] tmpLSide; delete[] iniCovMatrix; return -1; }
414//
415// Resolve full cascade with constraints system
416//
417 if( Iter<NFitIterationMax && fullSTOP==0 && badStepCount<badStepCountMax){ //Normal step. Solution of system only
418 IERR = vkMSolve(fullMatrix, fullLSide, fullNPar);
419 if(IERR){ delete[] fullMatrix; delete[] fullLSide; delete[] tmpLSide; delete[] iniCovMatrix;return IERR;}
420 }else{ //Last step. Solution+full error matrix
421 cascadeEvent_.fullCovMatrix.reset( new double[fullNPar*fullNPar] ); //Create fresh matrix
422 IERR = vkMSolve(fullMatrix, fullLSide, fullNPar, cascadeEvent_.fullCovMatrix.get());
423 if(IERR){ delete[] fullMatrix; delete[] fullLSide; delete[] tmpLSide; delete[] iniCovMatrix;
424 cascadeEvent_.fullCovMatrix.reset(); return IERR;}
425//std::cout<<"fulcov="; for(int tt=0; tt<fullNPar; tt++)std::cout<<cascadeEvent_.fullCovMatrix[tt*fullNPar+tt]<<", "; std::cout<<'\n';
426 std::unique_ptr<double[]> newCov(new double[fullNPar*fullNPar]); //Check via error transfer from left side (measured values). Gives exactly the same errors - correct!!!
427 getNewCov(iniCovMatrix, cascadeEvent_.fullCovMatrix.get(), newCov.get(), fullNPar);
428 cascadeEvent_.fullCovMatrix=std::move(newCov); //Unique_ptr will handle deletion automatically
429 }
430//
431// Set fitted parameters
432//
433 setFittedParameters( fullLSide, cascadeEvent_.matrixPnt, cascadeEvent_ );
434//
435// Update pointing constraints and calculate real cascade Chi2
436//
437 double Chi2Full=0.;
438 for(iv=0; iv<cascadeEvent_.cascadeNV; iv++){
439 vk = cascadeEvent_.cascadeVertexList[iv].get();
440 for(int it=0; it<(int)vk->TrackList.size(); it++){
441 VKTrack * trk=vk->TrackList[it].get(); if(trk->Id >= 0)Chi2Full+=trk->Chi2; // real track in cascade
442 }
443 if(cascadeEvent_.nearPrmVertex && iv==(cascadeEvent_.cascadeNV-1)){ //only last vertex in cascade may have it
444 double signift = cfVrtDstSig( vk, vk->passWithTrkCov);
445 Chi2Full += signift*signift;
446 }
447 }
448 Chi2Diff=Chi2Old-Chi2Full;
449 if(Chi2Diff<0. && cnstProgr>0.99) badStepCount++;
450 if(cnstRemnants==minCnstRemnants || cnstProgr<0.9) badStepCount=0;
451//std::cout.precision(5); std::cout<<" iter="<<Iter<<" separ="<<Chi2Cur<<" full="<<Chi2Full<<" iter diff="<<Chi2Full/Chi2Cur<<
452//" cnstrem="<<cnstRemnants<<" progr="<<cnstProgr<<" lim="<<cnstRemnants/minCnstRemnants<<" bstep="<<badStepCount<<'\n';
453 bool badFullStep=false;
454 if( Iter>5 && Chi2Full/Chi2Cur>1.2) badFullStep=true; //VK 16.04.2013 New strategy
455 if( Iter==NFitIterationMax || fullSTOP ) badFullStep=false; //VK 16.04.2013 No step limitation on last iteration
456//
457// Prepare next iteration
458//
459 if(badFullStep) IERR = translateToFittedPos(cascadeEvent_,0.3);
460 else IERR = translateToFittedPos(cascadeEvent_);
461 if(IERR){ delete[] fullMatrix; delete[] fullLSide; delete[] tmpLSide; delete[] iniCovMatrix; return IERR;}
462
463 for(iv=0; iv<cascadeEvent_.cascadeNV; iv++){
464 vk = cascadeEvent_.cascadeVertexList[iv].get();
465 if(vk->nextCascadeVrt){
466 int pntCnst = vk->ConstraintList.size() - 1; // pointing constraint is always last in the list
467 VKPointConstraint * pcnst = dynamic_cast<VKPointConstraint*>(vk->ConstraintList[pntCnst].get());
469 }
470 }
471//
472
473 if(fullSTOP) break;
474 if(cnstRemnants>1.e4&&Iter>10) //no way to fulfil constraints
475 { delete[] fullMatrix; delete[] fullLSide; delete[] tmpLSide; delete[] iniCovMatrix; return -2;}
476//
477 if( Iter<NFitIterationMax && Iter>2){
478 if(std::abs(Chi2Diff)<0.001 && cnstRemnants/minCnstRemnants<10.){ //stable cascade position before end of cycling
479 NFitIterationMax=Iter+1; //then makes additional iteration to get the full error matrix
480 }
481 if(cnstRemnants<cascadeEvent_.getAccuracyConstraint()) fullSTOP++; //Good constraint accuracy is reached
482 }
483 if ( Iter>NFitIterationMax+50 ) break; //Protection - too many iterations due to whatever reason.
484 if(badStepCount>badStepCountMax)break; //Divergence discovered (in both cases the full error matrix is ready!!!)
485
486 Chi2Old=Chi2Full;
487 }
488
489 //if(tmpc0)std::cout<<(*tmpc0)<<'\n';
490 //if(tmpc1)std::cout<<(*tmpc1)<<'\n';
491
492 delete[] fullMatrix; delete[] fullLSide; delete[] tmpLSide; delete[] iniCovMatrix;
493//-------------------------------- Check constraints status
494 cnstRemnants=cascadeCnstRemnants(cascadeEvent_);
495//std::cout<<"fullcnst="<<cnstRemnants<<" lim="<<cnstRemnants/minCnstRemnants<<'\n';
496 if( cnstRemnants > 1.e0) return -2; /* Constraints are not resolved. Stop fit */
497 return 0;
498}
double getAccuracyConstraint() const
void setTargetVertex(double VRT[3])
Definition Derivt.h:95
void vpderiv(bool UseTrackErr, long int Charge, const double *pari0, double *covi, double *vrtref, double *covvrtref, double *drdpar, double *dwgt, double *rv0, VKalVrtControl *FitCONTROL)
Definition VtDeriv.cxx:16
void getNewCov(const double *OldCov, const double *Der, double *Cov, long int DIM) noexcept
void setFittedParameters(const double *result, std::vector< int > &matrixPnt, CascadeEvent &cascadeEvent_)
int fixPseudoTrackPt(long int NPar, double *fullMtx, double *LSide, CascadeEvent &cascadeEvent_)
double cascadeCnstRemnants(CascadeEvent &cascadeEvent_)
void copyFullMtx(const double *Input, long int IPar, long int IDIM, double *Target, long int TStart, long int TDIM)
int setVTrackMass(VKVertex *vk)
int FullMCNSTfill(VKVertex *vk, double *ader, double *LSide)
Definition FullMtx.cxx:81
void addCrossVertexDeriv(CascadeEvent &cascadeEvent_, double *ader, long int MATRIXSIZE, const std::vector< int > &matrixPnt)
int fitVertexCascade(VKVertex *vk, int Pointing)
int restorePreviousPos(CascadeEvent &cascadeEvent_, std::vector< VKVertex > &SV)
double cfVrtDstSig(VKVertex *vk, bool UseTrkErr)
Definition cfVrtDst.cxx:33
void robtest(VKVertex *vk, int ifl, int nIteration)
Definition RobTest.cxx:14
int vkMSolve(double *a, double *b, long int n, double *ainv)
double cvder[12]
Definition ForVrtClose.h:30

◆ processCascade() [2/3]

int Trk::processCascade ( CascadeEvent & cascadeEvent_,
const double * primVrt,
const double * primVrtCov )

Definition at line 532 of file CFitCascade.cxx.

533{
534 cascadeEvent_.nearPrmVertex=1; //setting up additional Chi2 term
535 VKVertex * vk = cascadeEvent_.cascadeVertexList[cascadeEvent_.cascadeNV-1].get(); //Main vertex
536 vk->passNearVertex =true; // For fitting machinery
537 vk->passWithTrkCov =true; // For fitting machinery
538 std::copy(primVrt, primVrt+3, vk->FVC.vrt);
539 std::copy(primVrtCov, primVrtCov+6, vk->FVC.covvrt);
540 return processCascade(cascadeEvent_);
541}
int processCascade(CascadeEvent &cascadeEvent_)

◆ processCascade() [3/3]

int Trk::processCascade ( CascadeEvent & cascadeEvent_,
double * primVrt )

Definition at line 546 of file CFitCascade.cxx.

547{
548 VKVertex * vk = cascadeEvent_.cascadeVertexList[cascadeEvent_.cascadeNV-1].get(); //Main vertex
549 long int NTRK = vk->TrackList.size();
550 vk->ConstraintList.emplace_back(new VKPointConstraint( NTRK, primVrt, vk, false));
551 cascadeEvent_.nearPrmVertex=0; //explicitly turn off additional Chi2 term
552 return processCascade(cascadeEvent_);
553}

◆ processCascadePV()

int Trk::processCascadePV ( CascadeEvent & cascadeEvent_,
const double * primVrt,
const double * primVrtCov )

Definition at line 504 of file CFitCascade.cxx.

505{
506 double aermd[6],tmpd[6]; // temporary arrays
507 VKVertex * vk = cascadeEvent_.cascadeVertexList[cascadeEvent_.cascadeNV-1].get(); //Main vertex
508
509 vk->vk_fitterControl->vk_forcft.vrt[0] = primVrt[0];
510 vk->vk_fitterControl->vk_forcft.vrt[1] = primVrt[1];
511 vk->vk_fitterControl->vk_forcft.vrt[2] = primVrt[2];
512 vk->vk_fitterControl->vk_forcft.covvrt[0] = primVrtCov[0];
513 vk->vk_fitterControl->vk_forcft.covvrt[1] = primVrtCov[1];
514 vk->vk_fitterControl->vk_forcft.covvrt[2] = primVrtCov[2];
515 vk->vk_fitterControl->vk_forcft.covvrt[3] = primVrtCov[3];
516 vk->vk_fitterControl->vk_forcft.covvrt[4] = primVrtCov[4];
517 vk->vk_fitterControl->vk_forcft.covvrt[5] = primVrtCov[5];
518
519 vk->useApriorVertex = 1;
520 cfdcopy(vk->vk_fitterControl->vk_forcft.covvrt, tmpd, 6);
521 int IERR=cfdinv(tmpd, aermd, -3); if (IERR) { IERR = -4; return IERR; }
522 cfdcopy(vk->vk_fitterControl->vk_forcft.vrt, vk->apriorV, 3);
523 cfdcopy( aermd, vk->apriorVWGT,6);
524
525 return processCascade(cascadeEvent_);
526}

◆ processCascadeScale()

int Trk::processCascadeScale ( CascadeEvent & cascadeEvent_)

Definition at line 129 of file CFitCascadeScale.cxx.

130{
131 VKVertex * vk=nullptr;
132 long int Iter, IERR, iv;
133 cascadeEvent_.setSCALE(1.); // Safety
134//============================================================================================
135//
136// First without pointing to get initial estimations and resolve mass constraints
137// This initial step is needed to get initial estimation for "passing near" constraints
138//
139 double iv_dstToVrt=0., sum_dstToVrt=0., old_dstToVrt;
140 for(iv=0; iv<cascadeEvent_.cascadeNV; iv++){
141 vk = cascadeEvent_.cascadeVertexList[iv].get();
142 vk->passNearVertex=false;
143 vk->passWithTrkCov=false;
144 IERR = fitVertexCascadeScale( vk, iv_dstToVrt ); if(IERR)return IERR; //fit
145 IERR = setVTrackMass(vk); if(IERR)return IERR; //mass of combined particle
146 }
147 IERR = translateToFittedPos(cascadeEvent_); if(IERR)return IERR;
148
149//
150// Now fit "close to vertex" pointing and cooling
151//
152 for(iv=0; iv<cascadeEvent_.cascadeNV-1; iv++) cascadeEvent_.cascadeVertexList[iv]->passNearVertex=true;
153 if(cascadeEvent_.nearPrmVertex){ // Primary vertex if needed
154 cascadeEvent_.cascadeVertexList[cascadeEvent_.cascadeNV-1]->passNearVertex=true;
155 cascadeEvent_.cascadeVertexList[cascadeEvent_.cascadeNV-1]->passWithTrkCov=true;
156 }
157//
158 double Chi2Old=0.,Chi2Cur=0;
159 double Scale=2.;
160 double limDstToVrt=0.001;
161 old_dstToVrt=100000.;
162 for(Iter=0; Iter<20; Iter++){
163
164 //*******************************************************************************
165 for(int Stabil=0; Stabil<2; Stabil++){ // Stabilization cycling for given SCALE
166 Chi2Cur=0.;
167 sum_dstToVrt=0.;
168 for(iv=0; iv<cascadeEvent_.cascadeNV; iv++){
169 vk = cascadeEvent_.cascadeVertexList[iv].get();
170//
171//Calculate derivatives for "passing near" cnst. Initial vertex position is used for derivatives.
172 if(vk->passNearVertex){
173 double dparst[6]={vk->refIterV[0]+vk->iniV[0], vk->refIterV[1]+vk->iniV[1], vk->refIterV[2]+vk->iniV[2],
174 vk->fitMom[0], vk->fitMom[1], vk->fitMom[2] };
175 vpderiv(vk->passWithTrkCov, vk->FVC.Charge, dparst, vk->fitCovXYZMom, vk->FVC.vrt, vk->FVC.covvrt,
176 vk->FVC.cvder, vk->FVC.ywgt, vk->FVC.rv0, (vk->vk_fitterControl).get());
177 }
178 IERR = fitVertexCascadeScale( vk, iv_dstToVrt); if(IERR)return IERR; //fit
179 IERR = setVTrackMass(vk); if(IERR)return IERR; //mass of combined particle
180 Chi2Cur += vk->Chi2;
181 sum_dstToVrt += iv_dstToVrt;
182 }
183 IERR = translateToFittedPos(cascadeEvent_,1.0); if(IERR)return IERR;
184 //if(Stabil>0 && sum_dstToVrt<old_dstToVrt) break;
185 }
186 //********************************************************************************
187 if(Iter>5 && Chi2Cur>1.e4) return -1; //Too bad iteration. Drop fit
188 if(cascadeEvent_.getSCALE() < 1.e-6)Scale=1.; //Enough tightening
189 if(sum_dstToVrt<old_dstToVrt){
190 rescaleVrtErrForPointing( Scale, cascadeEvent_ ); // Tighten pointing accuracy
191 if(old_dstToVrt/3. < sum_dstToVrt) { old_dstToVrt=sum_dstToVrt;} else {old_dstToVrt/=3.;}
192 }
193//std::cout<<"Cool iter="<<Iter<<" Scale="<<cascadeEvent_.getSCALE()<<", "<<Chi2Cur<<" NV="<<cascadeEvent_.cascadeNV<<
194// " dst="<<sum_dstToVrt<<'\n';
195 if(std::abs(Chi2Cur-Chi2Old)<0.01 && Iter>5 && sum_dstToVrt<limDstToVrt*(cascadeEvent_.cascadeNV-1) )break; //stable cascade position
196 Chi2Old=Chi2Cur;
197 }
198 double cnstRemnants=0. ;
199 for(iv=0; iv<cascadeEvent_.cascadeNV; iv++){
200 vk = cascadeEvent_.cascadeVertexList[iv].get();
201 for(int ii=0; ii<(int)vk->ConstraintList.size();ii++){
202 for(int ic=0; ic<(int)vk->ConstraintList[ii]->NCDim; ic++){
203 cnstRemnants += std::abs( vk->ConstraintList[ii]->aa[ic] );
204 } }
205 }
206 if( cnstRemnants > 1.e0) return -2; /* Constraints are not resolved. Stop fit */
207std::cout<<"================================================="<<sum_dstToVrt<<'\n';
208// if(sum_dstToVrt>limDstToVrt*(cascadeEvent_.cascadeNV-1) )return -2; //Pointing is not resolved
209
210 long int fullNPar = getCascadeNPar(cascadeEvent_);
211 cascadeEvent_.fullCovMatrix.reset( new double[fullNPar*fullNPar] );
212 for(int im=0; im<fullNPar*fullNPar; im++)cascadeEvent_.fullCovMatrix[im]=0.;
213 for(int im=0; im<fullNPar; im++)cascadeEvent_.fullCovMatrix[im*fullNPar + im]=1.;
214 int NStart=0;
215 cascadeEvent_.matrixPnt.resize(cascadeEvent_.cascadeNV);
216 auto tmpLSide = std::make_unique<double[]>(fullNPar);
217 for( iv=0; iv<cascadeEvent_.cascadeNV; iv++){
218 cascadeEvent_.matrixPnt[iv]=NStart;
219 NStart += FullMCNSTfill( vk, vk->ader, tmpLSide.get());
220 }
221
222 return 0;
223}
double getSCALE() const
void setSCALE(double S)
void rescaleVrtErrForPointing(double Div, CascadeEvent &cascadeEvent_)
int fitVertexCascadeScale(VKVertex *vk, double &distToVertex)

◆ propJacobian()

ATH_ALWAYS_INLINE void Trk::propJacobian ( double *ATH_RESTRICT P,
const double *ATH_RESTRICT H0,
const double *ATH_RESTRICT H1,
const double *ATH_RESTRICT H2,
const double *ATH_RESTRICT A,
const double *ATH_RESTRICT A0,
const double *ATH_RESTRICT A3,
const double *ATH_RESTRICT A4,
const double *ATH_RESTRICT A6,
const double S3 )

This provides an inline helper function for updating the jacobian during Runge-Kutta propagation.

Used in several clients, put in here to avoid code duplication Based on the existing implementation, but using vectorisation to improve speed by approximately 30%.

The mathematics behind this procedure are documented in JINST 4 (2009) P04016 also found as http://cds.cern.ch/record/1114177 / https://inspirehep.net/literature/826186

In this implementation, we preserve the conventions of client code, hence the use of array pointers rather than std constructs. P is a 42-element array containing global coordinates, direction, inverse momentum and Jacobian of transformation. Its elements are updated in-place by this method. H0, H1, and H3 represent the field at the three points eachj is a 3-element array A represents the direction vector before propagation It is a 3-vector A0, A3, A4, and A6 represent cross products of the direction with the field across the 3 points. Each is a 3-vector. S3 is a step length

now update the parameter array in the slots representing the Jacobian

Definition at line 41 of file JacobianHelper.h.

51{
52 using namespace CxxUtils;
53 using vec2 = CxxUtils::vec<double, 2>;
54
55 vec2 d23A_0{ P[24], P[31] };
56 vec2 d23A_1{ P[25], P[32] };
57 vec2 d23A_2{ P[26], P[33] };
58 const double d4A_0 = P[38];
59 const double d4A_1 = P[39];
60 const double d4A_2 = P[40];
61 // H
62 const double H0_0 = H0[0];
63 const double H0_1 = H0[1];
64 const double H0_2 = H0[2];
65 const double H1_0 = H1[0];
66 const double H1_1 = H1[1];
67 const double H1_2 = H1[2];
68 const double H2_0 = H2[0];
69 const double H2_1 = H2[1];
70 const double H2_2 = H2[2];
71 //
72 vec2 d23A0 = H0_2 * d23A_1 - H0_1 * d23A_2;
73 vec2 d23B0 = H0_0 * d23A_2 - H0_2 * d23A_0;
74 vec2 d23C0 = H0_1 * d23A_0 - H0_0 * d23A_1;
75 const double d4A0 = (A0[0] + H0_2 * d4A_1) - H0_1 * d4A_2;
76 const double d4B0 = (A0[1] + H0_0 * d4A_2) - H0_2 * d4A_0;
77 const double d4C0 = (A0[2] + H0_1 * d4A_0) - H0_0 * d4A_1;
78 //
79 vec2 d23A2 = d23A0 + d23A_0;
80 vec2 d23B2 = d23B0 + d23A_1;
81 vec2 d23C2 = d23C0 + d23A_2;
82 const double d4A2 = d4A0 + d4A_0;
83 const double d4B2 = d4B0 + d4A_1;
84 const double d4C2 = d4C0 + d4A_2;
85 const double d0 = d4A_0 - A[0];
86 const double d1 = d4A_1 - A[1];
87 const double d2 = d4A_2 - A[2];
88 //
89 vec2 d23A3 = (d23A_0 + d23B2 * H1_2) - d23C2 * H1_1;
90 vec2 d23B3 = (d23A_1 + d23C2 * H1_0) - d23A2 * H1_2;
91 vec2 d23C3 = (d23A_2 + d23A2 * H1_1) - d23B2 * H1_0;
92 const double d4A3 = ((A3[0] + d0) + d4B2 * H1_2) - d4C2 * H1_1;
93 const double d4B3 = ((A3[1] + d1) + d4C2 * H1_0) - d4A2 * H1_2;
94 const double d4C3 = ((A3[2] + d2) + d4A2 * H1_1) - d4B2 * H1_0;
95 //
96 vec2 d23A4 = (d23A_0 + d23B3 * H1_2) - d23C3 * H1_1;
97 vec2 d23B4 = (d23A_1 + d23C3 * H1_0) - d23A3 * H1_2;
98 vec2 d23C4 = (d23A_2 + d23A3 * H1_1) - d23B3 * H1_0;
99 const double d4A4 = ((A4[0] + d0) + d4B3 * H1_2) - d4C3 * H1_1;
100 const double d4B4 = ((A4[1] + d1) + d4C3 * H1_0) - d4A3 * H1_2;
101 const double d4C4 = ((A4[2] + d2) + d4A3 * H1_1) - d4B3 * H1_0;
102 //
103 vec2 d23A5 = 2. * d23A4 - d23A_0;
104 vec2 d23B5 = 2. * d23B4 - d23A_1;
105 vec2 d23C5 = 2. * d23C4 - d23A_2;
106 const double d4A5 = 2. * d4A4 - d4A_0;
107 const double d4B5 = 2. * d4B4 - d4A_1;
108 const double d4C5 = 2. * d4C4 - d4A_2;
109 //
110 vec2 d23A6 = d23B5 * H2_2 - d23C5 * H2_1;
111 vec2 d23B6 = d23C5 * H2_0 - d23A5 * H2_2;
112 vec2 d23C6 = d23A5 * H2_1 - d23B5 * H2_0;
113 double d4A6 = d4B5 * H2_2 - d4C5 * H2_1;
114 double d4B6 = d4C5 * H2_0 - d4A5 * H2_2;
115 double d4C6 = d4A5 * H2_1 - d4B5 * H2_0;
116
117 vec2 dR23_A = (d23A2 + d23A3 + d23A4) * S3;
118 vec2 dR23_B = (d23B2 + d23B3 + d23B4) * S3;
119 vec2 dR23_C = (d23C2 + d23C3 + d23C4) * S3;
120
121 vec2 res23_0 = ((d23A0 + 2. * d23A3) + (d23A5 + d23A6)) * (1. / 3.);
122 vec2 res23_1 = ((d23B0 + 2. * d23B3) + (d23B5 + d23B6)) * (1. / 3.);
123 vec2 res23_2 = ((d23C0 + 2. * d23C3) + (d23C5 + d23C6)) * (1. / 3.);
124
126 P[21] += dR23_A[0];
127 P[22] += dR23_B[0];
128 P[23] += dR23_C[0];
129 P[24] = res23_0[0];
130 P[25] = res23_1[0];
131 P[26] = res23_2[0];
132
133 P[28] += dR23_A[1];
134 P[29] += dR23_B[1];
135 P[30] += dR23_C[1];
136 P[31] = res23_0[1];
137 P[32] = res23_1[1];
138 P[33] = res23_2[1];
139
140 P[35] += (d4A2 + d4A3 + d4A4) * S3;
141 P[36] += (d4B2 + d4B3 + d4B4) * S3;
142 P[37] += (d4C2 + d4C3 + d4C4) * S3;
143 P[38] = ((d4A0 + 2. * d4A3) + (d4A5 + d4A6 + A6[0])) * (1. / 3.);
144 P[39] = ((d4B0 + 2. * d4B3) + (d4B5 + d4B6 + A6[1])) * (1. / 3.);
145 P[40] = ((d4C0 + 2. * d4C3) + (d4C5 + d4C6 + A6[2])) * (1. / 3.);
146}
#define H2(x, y, z)
Definition MD5.cxx:115
struct TBPatternUnitContext S3
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
Definition vec.h:207
std::vector< D3PDTest::MyVec2 > vec2
P_v1 P
Definition P.h:23

◆ rescaleVrtErrForPointing()

void Trk::rescaleVrtErrForPointing ( double Div,
CascadeEvent & cascadeEvent_ )

Definition at line 32 of file CFitCascadeScale.cxx.

33{
34 if(Div<1.)Div=1.;
35 cascadeEvent_.setSCALE(cascadeEvent_.getSCALE()/Div);
36 for(int iv=0; iv<cascadeEvent_.cascadeNV-1; iv++){ // Last vertex must not be touched
37 VKVertex *vk = cascadeEvent_.cascadeVertexList[iv].get();
38 for(int i=0; i<6; i++) vk->FVC.covvrt[i] /=Div;
39 }
40}

◆ ResidualPullType()

ResidualPull::ResidualType Trk::ResidualPullType ( AlignResidualType type)

Definition at line 41 of file AlignResidualType.cxx.

42 {
43 // defines mapping between residual types for the alignment and those
44 // used in the ResidualPullCalculator
45 switch(type)
46 {
47 case HitOnly:
49 case Unbiased:
50// case DCA:
52 default:
54 }
55 }
@ HitOnly
RP with biased track state, but pull from hit only.
@ Unbiased
RP with track state that has measurement not included.

◆ restorePreviousPos()

int Trk::restorePreviousPos ( CascadeEvent & cascadeEvent_,
std::vector< VKVertex > & SV )

Definition at line 640 of file CFitCascade.cxx.

641{
642 int iv,it;
643 long int NTRK;
644 VKTrack * trk; VKTrack * trks; VKVertex * vk; VKVertex * vks;
645
646 for( iv=0; iv<cascadeEvent_.cascadeNV; iv++){
647 vk=cascadeEvent_.cascadeVertexList[iv].get();
648 vks=&SV[iv];
649 NTRK = vk->TrackList.size(); // Number of tracks at vertex
650 vk->refIterV[0]=vks->refIterV[0];
651 vk->refIterV[1]=vks->refIterV[1];
652 vk->refIterV[2]=vks->refIterV[2];
653 vk->iniV[0] = vk->fitV[0] = vk->cnstV[0]=0.;
654 vk->iniV[1] = vk->fitV[1] = vk->cnstV[1]=0.;
655 vk->iniV[2] = vk->fitV[2] = vk->cnstV[2]=0.;
656 cfdcopy(vks->fitMom, vk->fitMom, 3); //saved Momentum
657 cfdcopy(vks->fitCovXYZMom, vk->fitCovXYZMom, 21); //saved XYZMom covariance
658 for(it=0; it<NTRK; it++){
659 trk =vk ->TrackList[it].get(); // working track
660 trks=vks->TrackList[it].get(); // track from saved copy
661 if(trk->Id < 0) { // pseudo-track from cascade vertex
662 //trk->fitP[2]=0.; // reset the pseudo-track parameters
663 trk->fitP[0] =(trks->iniP[0]+trks->fitP[0])/2.;
664 trk->fitP[1] = trks->iniP[1];
665 trk->fitP[2] =(trks->iniP[2]+trks->fitP[2])/2.;
666 continue;
667 }
668 cfdcopy(trks->Perig, trk->Perig, 5);
669 cfdcopy(trks->WgtM, trk->WgtM, 15);
670 cfdcopy(trks->fitP, trk->fitP, 3);
671 cfdcopy(trks->iniP, trk->iniP, 3);
672 cfdcopy(trks->cnstP, trk->cnstP, 3);
673 }
674 }
675 for(iv=0; iv<cascadeEvent_.cascadeNV; iv++){
676 vk = cascadeEvent_.cascadeVertexList[iv].get();
677 if(vk->nextCascadeVrt){
678 int pntCnst = vk->ConstraintList.size() - 1; // pointing constraint is always last in the list
679 if(vk->ConstraintList[pntCnst]->getType() != VKConstraintType::Point) return -1;
680 static_cast< VKPointConstraint* >(vk->ConstraintList[pntCnst].get())->setTargetVertex(vk->nextCascadeVrt->refIterV);
681 }
682 }
683 return 0;
684}

◆ robtest()

void Trk::robtest ( VKVertex * vk,
int ifl,
int nIteration )

Definition at line 14 of file RobTest.cxx.

15{
16 long int i, j, k, kk, it;
17 double rob, res, c[5], darg, absX, roba[5];
18
19/* ------------------------------------------------------------ */
20/* Robustification procedure for weight matrix */
21/* IROB = 0 - Standard chi^2 */
22/* = 1 - Geman-McClure function */
23/* = 2 - Welch function */
24/* = 3 - Cauchy function */
25/* = 4 - L1-L2 function */
26/* = 5 - Fair function */
27/* = 6 - Huber function */
28/* = 7 - Modified Huber function */
29/* (1,2,3) - Zero outliers */
30/* (4,5,6,7) - Downweight outliers */
31/* Author: V.Kostyukhin */
32/* ------------------------------------------------------------ */
33
34 int NTRK = vk->TrackList.size();
35
36 long int irob = vk->vk_fitterControl->vk_forcft.irob;
37 double Scl = vk->vk_fitterControl->vk_forcft.RobustScale; //Tuning constant
38 double C; // Breakdown constant
39
40 if(!vk->vk_fitterControl->m_frozenVersionForBTagging)Scl *= (1.+exp(3.-nIteration)); //Annealing
41
42 if ( ifl == 0) { /* FILLING OF EIGENVALUES AND VECTORS */
43 for (it = 0; it < NTRK ; ++it) { /* RESTORE MATRIX */
44 VKTrack *trk=vk->TrackList[it].get();
45 if(trk->Id < 0) continue; // Not a real track
46 vkGetEigVect(trk->WgtM, trk->e ,&(trk->v[0][0]), 5);
47 }
48 return;
49 }
50/* -- */
51 double halfPi=M_PI/2.;
52 for (it = 0; it < NTRK; ++it) {
53 VKTrack *trk=vk->TrackList[it].get();
54 if(trk->Id < 0) continue; // Not a real track
55 c[0]=c[1]=c[2]=c[3]=c[4]=0.;
56 for( k = 0; k < 5; k++){
57 c[0] += trk->rmnd[k] * trk->v[0][k];
58 c[1] += trk->rmnd[k] * trk->v[1][k];
59 c[2] += trk->rmnd[k] * trk->v[2][k];
60 c[3] += trk->rmnd[k] * trk->v[3][k];
61 c[4] += trk->rmnd[k] * trk->v[4][k];
62 }
63 for (k = 0; k < 5; ++k) {
64 darg = c[k]*c[k]*trk->e[k];
65 if(darg < 1.e-10) darg = 1.e-10;
66 absX = sqrt(darg); /* Abs(X) == sqrt(X)*/
67 rob = 1.; C=1;
68 if(irob == 1)C = 1.58*Scl; /* Geman-McClure Standard =1 but c^2=2.5 is better(Gem.McC) */
69 if(irob == 2)C = 2.9846*Scl; /* Welch def c^2=2.9846^2 */
70 if(irob == 3)C = 2.3849*Scl; /* Cauchy def 2.385^2=5.7 */
71 if(irob == 4)C = 1.; /* L1-L2 no tuning*/
72 if(irob == 5)C = 1.3998*Scl; /* Fair (def=1.3998)*/
73 if(irob == 6)C = 1.345 *Scl; /* Huber (def=1.345)*/
74 if(irob == 7)C = 1.2107 *Scl; /* Modified Huber (def=1.2107)*/
75/* Functionals here are divided by (X^2/2)!!!*/
76 double C2=C*C;
77 if(irob == 1)rob = 1. / (darg/C2 + 1.); /* Geman-McClure */
78 if(irob == 2)rob = C2*(1. - exp(-darg/C2) )/darg; /* Welch */
79 if(irob == 3)rob = C2*log(darg/C2 + 1.)/darg; /* Cauchy */
80 if(irob == 4)rob = 4.*(sqrt(darg / 2. + 1.) - 1.)/darg; /* L1-L2 */
81 if(irob == 5)rob = 2.*C2*(absX/C - log(absX/C + 1.))/darg; /* Fair */
82 if(irob == 6)rob = C>absX ? 1. : (2*C/absX - C*C/darg) ; /* Huber */
83 if(irob == 7)rob = halfPi>(absX/C) ? 2*C*C*(1-cos(absX/C))/darg :
84 2*(C*absX+C*C*(1.-halfPi))/darg; /* Modified Huber */
85 roba[k] = rob;
86 if(rob>0.99)roba[k] = 1.; //To improve precision
87 }
88 for (i = 0; i < 5; ++i) if(roba[i]<1.e-3)roba[i]=1.e-3;
89 kk = 0;
90 for (i = 0; i < 5; ++i) {
91 for (j = 0; j <= i; ++j) {
92 res = 0.;
93 for (k = 0; k < 5; ++k) {
94 res += trk->v[k][i] * trk->e[k] * trk->v[k][j]*roba[k];
95 }
96 trk->WgtM[kk]=res;
97 kk++;
98 }
99 }
100 vk->vk_fitterControl->vk_forcft.robres[it] = roba[0] * roba[1] * roba[2] * roba[3] * roba[4];
101 if(vk->vk_fitterControl->vk_forcft.robres[it]>1.)vk->vk_fitterControl->vk_forcft.robres[it]=1.;
102 }
103}
struct color C
void vkGetEigVect(const double ci[], double d[], double vect[], int n)

◆ setCascadeMassConstraint() [1/2]

int Trk::setCascadeMassConstraint ( CascadeEvent & cascadeEvent_,
long int IV,
double Mass )

Definition at line 241 of file CascadeDefinition.cxx.

242 {
243 if (IV > cascadeEvent_.cascadeNV - 1) {
244 return -1; // error in format
245 }
246 if (IV < 0) {
247 return -1;
248 }
249 VKVertex *vk = cascadeEvent_.cascadeVertexList[IV].get(); // target vertex
250 int NTRK = vk->TrackList.size();
251 vk->ConstraintList.emplace_back(new VKMassConstraint(NTRK, Mass, vk));
252 return 0;
253}

◆ setCascadeMassConstraint() [2/2]

int Trk::setCascadeMassConstraint ( CascadeEvent & cascadeEvent_,
long int IV,
std::vector< int > & trkInVrt,
std::vector< int > & pseudoInVrt,
double Mass )

Definition at line 260 of file CascadeDefinition.cxx.

262 {
263 std::vector<int> tmpIndex;
264 int it;
265 if (IV > cascadeEvent_.cascadeNV - 1)
266 return -1; // error in format
267 if (IV < 0)
268 return -1;
269 VKVertex *vk = cascadeEvent_.cascadeVertexList[IV].get(); // target vertex
270 int NTRK = vk->TrackList.size(); // tracks+pseudotracks
271 int nRealTrk = 0; // number of real tracks
272 for (it = 0; it < (int)trkInVrt.size(); it++) {
273 if (vk->TrackList[it]->Id >= 0) {
274 nRealTrk++;
275 }
276 }
277 //
278 //-- Real tracks
279 //
280 if ((int)trkInVrt.size() > NTRK) {
281 return -1; // checks...
282 }
283 for (it = 0; it < (int)trkInVrt.size(); it++) {
284 if (trkInVrt[it] < 0) {
285 return -1;
286 }
287 if (trkInVrt[it] >= NTRK) {
288 return -1;
289 }
290 tmpIndex.push_back(trkInVrt[it]);
291 }
292 //
293 //-- Pseudo tracks
294 //
295 if ((int)pseudoInVrt.size() > NTRK) {
296 return -1; // checks...
297 }
298 for (int it = 0; it < (int)pseudoInVrt.size(); it++) {
299 if (pseudoInVrt[it] < 0) {
300 return -1;
301 }
302 if (pseudoInVrt[it] >= NTRK) {
303 return -1;
304 }
305 tmpIndex.push_back(pseudoInVrt[it] + nRealTrk);
306 }
307
308 vk->ConstraintList.emplace_back(
309 new VKMassConstraint(NTRK, Mass, std::move(tmpIndex), vk));
310 return 0;
311}

◆ setFittedMatrices()

void Trk::setFittedMatrices ( const double * COVFIT,
long int MATRIXSIZE,
std::vector< int > & matrixPnt,
std::vector< std::vector< double > > & covarCascade,
CascadeEvent & cascadeEvent_ )

Definition at line 168 of file CascadeUtils.cxx.

172{
173 int iv, Pnt, ic, ir, vrtMtxSize, count;
174 for( iv=0; iv<cascadeEvent_.cascadeNV; iv++){
175 VKVertex *vk = cascadeEvent_.cascadeVertexList[iv].get();
176 Pnt=matrixPnt[iv]; // start of vertex parameters
177 vrtMtxSize=3+vk->TrackList.size()*3; //size of matrix for given vertex
178 std::vector<double> Res(vrtMtxSize*(vrtMtxSize+1)/2);
179 count=0;
180 for (int col=0; col<vrtMtxSize; col++){
181 for (int row=0; row<=col; row++){
182 ic=Pnt+col; ir=Pnt+row;
183 Res[count]=COVFIT[ic*MATRIXSIZE + ir]; count++;
184 }
185 }
186 covarCascade.emplace_back(std::move(Res));
187 }
188}
int ir
counter of the current depth
Definition fastadd.cxx:49
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146

◆ setFittedParameters()

void Trk::setFittedParameters ( const double * result,
std::vector< int > & matrixPnt,
CascadeEvent & cascadeEvent_ )

Definition at line 151 of file CascadeUtils.cxx.

152{
153 int iv,it,Pnt;
154 for( iv=0; iv<cascadeEvent_.cascadeNV; iv++){
155 VKVertex *vk = cascadeEvent_.cascadeVertexList[iv].get();
156 Pnt=matrixPnt[iv]; // start of vertex parameters
157 vk->fitV[0]=result[Pnt]; vk->fitV[1]=result[Pnt+1]; vk->fitV[2]=result[Pnt+2];
158 for( it=0; it<(int)vk->TrackList.size(); it++){
159 VKTrack * trk=vk->TrackList[it].get();
160 trk->fitP[0]=trk->iniP[0]+result[Pnt+3+it*3 + 0];
161 trk->fitP[1]=trk->iniP[1]+result[Pnt+3+it*3 + 1];
162 trk->fitP[2]=trk->iniP[2]+result[Pnt+3+it*3 + 2];
163 trk->Chi2 = cfchi2(vk->fitV, trk->fitP, trk );
164 }
165 }
166}
double cfchi2(double *xyzt, const long int ich, double *part, const double *par0, double *wgt, double *rmnd)

◆ setVTrackMass()

int Trk::setVTrackMass ( VKVertex * vk)

Definition at line 34 of file CFitCascade.cxx.

35{
36 double vBx,vBy,vBz;
37 int it, NTRK;
38 VectMOM totP{};
39
40 if(!vk->nextCascadeVrt)return 0; // nonpointing vertex
41
42 Trk::vkalMagFld::getMagFld(vk->refIterV[0]+vk->fitV[0], vk->refIterV[1]+vk->fitV[1], vk->refIterV[2]+vk->fitV[2],
43 vBx,vBy,vBz,(vk->vk_fitterControl).get());
44
45 NTRK = vk->TrackList.size(); // Number of tracks at vertex
46 totP.Px=0.;totP.Py=0.;totP.Pz=0.;totP.E=0.;
47 for(it=0; it<NTRK; it++){
48 std::array<double, 4> pp = getFitParticleMom( vk->TrackList[it].get(), vBz );
49 totP.Px += pp[0];
50 totP.Py += pp[1];
51 totP.Pz += pp[2];
52 totP.E += pp[3];
53 }
54 VKTrack * target_trk = getCombinedVTrack(vk);
55 if( target_trk == nullptr ) {
56 std::cout<<" ERROR in CASCADE STRUCTURE"<<'\n';
57 return -1;
58 }
59 double Pt=sqrt(totP.Px*totP.Px + totP.Py*totP.Py);
60 double Mass;
61 if(Pt > std::abs(totP.Pz)){
62 Mass = sqrt( (totP.E-Pt)*(totP.E+Pt) - totP.Pz*totP.Pz);
63 }else{
64 Mass = sqrt( (totP.E-totP.Pz)*(totP.E+totP.Pz) - Pt*Pt);
65 }
66 target_trk->setMass(Mass);
67
68 return 0;
69}

◆ SymIndex()

int Trk::SymIndex ( int it,
int i,
int j )
inline

Definition at line 271 of file TrkCascadeFitter.cxx.

271{ return (3*it+3+i)*(3*it+3+i+1)/2 + (3*it+3+j);}

◆ tdasatVK()

void Trk::tdasatVK ( const double * Der,
const double * CovI,
double * CovF,
long int M,
long int N )

Definition at line 218 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Utilities.cxx.

219{
220 int i,j,k,f;
221 for( k=0; k<M; k++) { // sycle on output index
222 for( f=0; f<=k; f++ ) { //
223 double sum=0.;
224 for( i=0; i<N; i++){
225 double tmp=0.;
226 for( j=0; j<N; j++) tmp += CovI[sIndexVK(i,j)]*Der[j+f*N];
227 sum += Der[i+k*N]*tmp;
228 }
229 CovF[sIndexVK(k,f)]=sum;
230 }
231 }
232}

◆ transformCovar()

std::vector< double > Trk::transformCovar ( int NPar,
double ** Deriv,
const std::vector< double > & covarI )

Definition at line 191 of file CascadeUtils.cxx.

192{
193 std::vector<double> covarO(NPar*(NPar+1)/2, 0.);
194 int ii,ij,oi,oj, indexO, indexI;
195 for(oi=0; oi<NPar; oi++){
196 for(oj=0; oj<=oi; oj++){
197 indexO = oi*(oi+1)/2+oj;
198 for(ii=0; ii<NPar; ii++){
199 for(ij=0; ij<NPar; ij++){
200 indexI = ii>=ij ? ii*(ii+1)/2+ij : ij*(ij+1)/2+ii;
201 covarO[indexO] += Deriv[oi][ii]*covarI[indexI]*Deriv[oj][ij];
202 } } } }
203 return covarO;
204}

◆ translateToFittedPos()

int Trk::translateToFittedPos ( CascadeEvent & cascadeEvent_,
double Step )

Definition at line 560 of file CFitCascade.cxx.

561{
562 int iv,it;
563 long int IERR,NTRK;
564 double vShift, tmpPer[5], tmpWgt[15], tmpCov[15], targetVertex[3];
565 VKTrack * trk; VKVertex * vk;
566 if(Step>1.)Step=1.;
567
568 for( iv=0; iv<cascadeEvent_.cascadeNV; iv++){
569 vk=cascadeEvent_.cascadeVertexList[iv].get();
570 NTRK = vk->TrackList.size(); // Number of tracks at vertex
571 targetVertex[0]=vk->refIterV[0] + vk->fitV[0]*Step; // target vertex for extrapolation
572 targetVertex[1]=vk->refIterV[1] + vk->fitV[1]*Step;
573 targetVertex[2]=vk->refIterV[2] + vk->fitV[2]*Step;
574 vShift = sqrt( (vk->refV[0]-targetVertex[0])*(vk->refV[0]-targetVertex[0])
575 +(vk->refV[1]-targetVertex[1])*(vk->refV[1]-targetVertex[1])
576 +(vk->refV[2]-targetVertex[2])*(vk->refV[2]-targetVertex[2]) );
577 for(auto *pvx : vk->includedVrt){ //Check space position of internal vertex
578 double dirMom=(pvx->refIterV[0]-targetVertex[0])*pvx->fitMom[0]+
579 (pvx->refIterV[1]-targetVertex[1])*pvx->fitMom[1]+
580 (pvx->refIterV[2]-targetVertex[2])*pvx->fitMom[2];
581 if(dirMom<0.)cfdcopy(pvx->refIterV,targetVertex,3);
582 }
583 bool insideGoodVolume=false;
584 if(vk->vk_fitterControl && vk->vk_fitterControl->vk_objProp)
585 { insideGoodVolume = vk->vk_fitterControl->vk_objProp->checkTarget(targetVertex, *vk->vk_fitterControl->vk_istate);}
586 else { insideGoodVolume = Trk::vkalPropagator::checkTarget(targetVertex); }
587 if(!insideGoodVolume) { return -16; } //Vertex is definitely outside working volume
588 for(it=0; it<NTRK; it++){
589 trk=vk->TrackList[it].get();
590 if(trk->Id < 0){ // pseudo-track from cascade vertex
591 trk->fitP[0] =trk->iniP[0]+ Step*(trk->fitP[0]-trk->iniP[0]);
592 trk->fitP[1] =trk->iniP[1]+ Step*(trk->fitP[1]-trk->iniP[1]);
593 trk->fitP[2] =trk->iniP[2]+ Step*(trk->fitP[2]-trk->iniP[2]);
594 continue;
595 }
596 Trk::vkalPropagator::Propagate(trk, vk->refV, targetVertex, tmpPer, tmpCov, (vk->vk_fitterControl).get());
597 //Check!!!And protection if needed.
598 double eig5=cfSmallEigenvalue(tmpCov,5 );
599 if(eig5<1.e-15 || tmpCov[0]>1.e7) { //Bad propagation with material. Try without it.
600 Trk::vkalPropagator::Propagate(-999, trk->Charge,trk->refPerig,trk->refCovar, vk->refV, targetVertex, tmpPer, tmpCov, (vk->vk_fitterControl).get());
601 if(cfSmallEigenvalue(tmpCov,5 )<1.e-15){ //Final protection
602 tmpCov[1]=0.;tmpCov[3]=0.;tmpCov[6]=0.;tmpCov[10]=0.;
603 tmpCov[4]=0.;tmpCov[7]=0.;tmpCov[11]=0.;
604 tmpCov[8]=0.;tmpCov[12]=0.;
605 tmpCov[13]=0.;
606 tmpCov[0]=std::abs(tmpCov[0]); tmpCov[2]=std::abs(tmpCov[2]);tmpCov[5]=std::abs(tmpCov[5]);
607 tmpCov[9]=std::abs(tmpCov[9]); tmpCov[14]=std::abs(tmpCov[14]);
608 }
609 }
610 if(tmpCov[0]>1.e7){ IERR=-7; return IERR; } //extremely big A0 error !!!
611 IERR=cfInv5(tmpCov, tmpWgt); if (IERR) IERR=cfdinv(tmpCov, tmpWgt, 5); if(IERR)return -8;
612 trk->setCurrent(tmpPer,tmpWgt);
613 if ( vShift > 100. ) trk->setReference( tmpPer, tmpCov ); //Change reference for big shift
614 }
615 vk->setRefIterV(targetVertex);
616 if ( vShift > 100. )vk->setRefV(targetVertex); // Change reference vertex for big shift
617 vk->iniV[0] = vk->fitV[0] = vk->cnstV[0]=0.;
618 vk->iniV[1] = vk->fitV[1] = vk->cnstV[1]=0.;
619 vk->iniV[2] = vk->fitV[2] = vk->cnstV[2]=0.;
620 for(it=0; it<NTRK; it++){
621 trk=vk->TrackList[it].get();
622 if(Step<1.){ // Step limitation for constraint calculation on next step
623 trk->cnstP[0] = trk->iniP[0] =trk->iniP[0]+ Step*(trk->fitP[0]-trk->iniP[0]);
624 trk->cnstP[1] = trk->iniP[1] =trk->iniP[1]+ Step*(trk->fitP[1]-trk->iniP[1]);
625 trk->cnstP[2] = trk->iniP[2] =trk->iniP[2]+ Step*(trk->fitP[2]-trk->iniP[2]);
626 }else{
627 trk->cnstP[0] = trk->iniP[0] = trk->fitP[0]; // for constraint calculation on next step
628 trk->cnstP[1] = trk->iniP[1] = trk->fitP[1];
629 trk->cnstP[2] = trk->iniP[2] = trk->fitP[2];
630 }
631 }
632 }
633 return 0;
634}
double refCovar[15]
void setReference(const double[], const double[])
void setRefIterV(double v[]) noexcept
void setRefV(double v[3]) noexcept
static bool checkTarget(double *RefEnd)
double cfSmallEigenvalue(double *cov, long int n)

◆ unique_clone() [1/2]

template<typename T>
std::unique_ptr< T > Trk::unique_clone ( const std::unique_ptr< T > & v)

Definition at line 18 of file unique_clone.h.

18 {
19 if (v != nullptr) {
20 return std::unique_ptr<T>(v->clone());
21 } else {
22 return nullptr;
23 }
24 }

◆ unique_clone() [2/2]

template<typename T>
std::unique_ptr< T > Trk::unique_clone ( const T * v)

Definition at line 8 of file unique_clone.h.

8 {
9 if (v != nullptr) {
10 return std::unique_ptr<T>(v->clone());
11 } else {
12 return nullptr;
13 }
14 }

◆ vkGetEigVal()

void Trk::vkGetEigVal ( const double ci[],
double d[],
int n )

Definition at line 828 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Matrix.cxx.

829{
830 int i,j,k; d--;
832 noinit_vector<double> ab ((n+1)*(n+1));
833 for(i=0; i<n+1; i++) a[i] = ab.data() + i*(n+1);
834
835 for( i=1; i<=n; i++) {
836 for( j=i; j<=n; j++) { k=(j-1)*j/2 + i; a[i][j]=a[j][i]=ci[k-1];}
837 }
838
839 vkjacobi(a.data(),n,d,nullptr);
840
841 for (i=1;i<n;i++) {
842 double p=d[k=i]; for (j=i+1;j<=n;j++) if (d[j] < p) p=d[k=j];
843 if (k != i) { d[k]=d[i]; d[i]=p; }
844 }
845}

◆ vkGetEigVect()

void Trk::vkGetEigVect ( const double ci[],
double d[],
double vect[],
int n )

Definition at line 847 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Matrix.cxx.

848{
849 int i,j,k; d--;
851 noinit_vector<double> ab ((n+1)*(n+1));
853 noinit_vector<double> vb ((n+1)*(n+1));
854 for(i=0; i<n+1; i++) a[i] = ab.data() + i*(n+1);
855 for(i=0; i<n+1; i++) v[i] = vb.data() + i*(n+1);
856
857 for( i=1; i<=n; i++) {
858 for( j=i; j<=n; j++) { k=(j-1)*j/2 + i; a[i][j]=a[j][i]=ci[k-1];}
859 }
860
861 vkjacobi(a.data(),n,d,v.data());
862
863 for (i=1;i<n;i++) {
864 double p=d[k=i]; for (j=i+1;j<=n;j++) if (d[j] < p) p=d[k=j];
865 if (k != i) { d[k]=d[i]; d[i]=p;
866 for (j=1;j<=n;j++) { p=v[j][i]; v[j][i]=v[j][k]; v[j][k]=p;}
867 }
868 }
869
870 k=0; for (i=1;i<=n;i++) for(j=1;j<=n;j++) vect[k++]=v[j][i];
871}

◆ vkgrkuta_()

void Trk::vkgrkuta_ ( const double charge,
const double step,
double * vect,
double * vout,
VKalVrtControlBase * CONTROL )

Definition at line 14 of file VKgrkuta.cxx.

15{
16 double equiv_2[3], equiv_5[3];
17 long int iter, ncut, j;
18 double cost, pinv, rest, sint, a, b, c, f[4], hst;
19 double hnorm, secxs[4], secys[4], seczs[4], f1, f2, h2, f3, h4, f4;
20 double g1, g2, g3, g4, g5, g6, at, bt, ct, ph, hp, fx, fy, fz, tl;
21 double ph2, cba, rho, est, tet, hxp[3], dxt, dyt, dzt, ang2, rho1;
22
23
24
25#define xyz (equiv_2)
26#define x (equiv_2)
27#define y (equiv_2 + 1)
28#define z (equiv_2 + 2)
29#define xyzt (equiv_5)
30#define xt (equiv_5)
31#define yt (equiv_5 + 1)
32#define zt (equiv_5 + 2)
33
34
35/* *******************************************************************/
36/* */
37/* Runge-Kutta method for tracking a particle through a magnetic */
38/* . field. Uses Nystroem algorithm (See Handbook Nat. Bur. of */
39/* . Standards, procedure 25.5.20) */
40/* . */
41/* . Input parameters */
42/* . CHARGE Particle charge */
43/* . STEP Step size */
44/* . VECT Initial co-ords,direction cosines,momentum */
45/* . Output parameters */
46/* . VOUT Output co-ords,direction cosines,momentum */
47/* . User routine called */
48/* CALL GUFLD(X,F) */
49/* Authors R.Brun, M.Hansroul ********* */
50/* V.Perevoztchikov (CUT STEP implementation) */
51/* Taken from GEANT3.21 */
52/* Modified for VKalVrt V.Kostyukhin */
53/*********************************************************************/
54/* This constant is for units CM,GEV/C and KGAUSS */
55
56 /* Parameter adjustments */
57 --vout;
58 --vect;
59
60 iter = 0;
61 ncut = 0;
62 for (j = 1; j <= 7; ++j) {vout[j] = vect[j];}
63 pinv = (charge) * 2.9979251e-2 / vect[7]; // New for MM, MEV/C and KGAUSS
64 tl = 0.;
65 hst = step;
66
67//std::cout <<" Now in grkuta="<<vect[1]<<", "<<vect[2]<<", "<<vect[3]<<'\n';
68
69L20:
70 rest = step - tl;
71 if (std::abs(hst) > std::abs(rest)) hst = rest;
72/* ***** CALL GUFLD(VOUT,F) */
73 Trk::vkalMagFld::getMagFld( vout[1], vout[2], vout[3], fx, fy, fz, CONTROL);
74 f[0] = fx*10.; //VK Convert returned field in Tesla into kGauss for old code
75 f[1] = fy*10.;
76 f[2] = fz*10.;
77
78/* Start of integration */
79
80 *x = vout[1];
81 *y = vout[2];
82 *z = vout[3];
83 a = vout[4];
84 b = vout[5];
85 c = vout[6];
86
87 h2 = hst * .5;
88 h4 = h2 * .5;
89 ph = pinv * hst;
90 ph2 = ph * .5;
91 secxs[0] = (b * f[2] - c * f[1]) * ph2;
92 secys[0] = (c * f[0] - a * f[2]) * ph2;
93 seczs[0] = (a * f[1] - b * f[0]) * ph2;
94 ang2 = secxs[0]*secxs[0] + secys[0]*secys[0] + seczs[0]*seczs[0];
95 if (ang2 > 9.86960440109) goto L40;
96 dxt = h2 * a + h4 * secxs[0];
97 dyt = h2 * b + h4 * secys[0];
98 dzt = h2 * c + h4 * seczs[0];
99 *xt = *x + dxt;
100 *yt = *y + dyt;
101 *zt = *z + dzt;
102
103/* Second intermediate point */
104
105 est = std::abs(dxt) + std::abs(dyt) + std::abs(dzt);
106 if (est > hst) goto L30;
107
108
109/* ***** CALL GUFLD(XYZT,F) */
110 Trk::vkalMagFld::getMagFld( xyzt[0], xyzt[1], xyzt[2], fx, fy, fz, CONTROL);
111 f[0] = fx*10.; //VK Convert returned field in Tesla into kGauss for old code
112 f[1] = fy*10.;
113 f[2] = fz*10.;
114 at = a + secxs[0];
115 bt = b + secys[0];
116 ct = c + seczs[0];
117
118 secxs[1] = (bt * f[2] - ct * f[1]) * ph2;
119 secys[1] = (ct * f[0] - at * f[2]) * ph2;
120 seczs[1] = (at * f[1] - bt * f[0]) * ph2;
121 at = a + secxs[1];
122 bt = b + secys[1];
123 ct = c + seczs[1];
124 secxs[2] = (bt * f[2] - ct * f[1]) * ph2;
125 secys[2] = (ct * f[0] - at * f[2]) * ph2;
126 seczs[2] = (at * f[1] - bt * f[0]) * ph2;
127 dxt = hst * (a + secxs[2]);
128 dyt = hst * (b + secys[2]);
129 dzt = hst * (c + seczs[2]);
130 *xt = *x + dxt;
131 *yt = *y + dyt;
132 *zt = *z + dzt;
133 at = a + secxs[2] * 2.;
134 bt = b + secys[2] * 2.;
135 ct = c + seczs[2] * 2.;
136
137 est = std::abs(dxt) + std::abs(dyt) + std::abs(dzt);
138 if (est > std::abs(hst) * 2.) goto L30;
139/* ***** CALL GUFLD(XYZT,F) */
140 Trk::vkalMagFld::getMagFld( xyzt[0], xyzt[1], xyzt[2], fx, fy, fz, CONTROL);
141 f[0] = fx*10.; //VK Convert returned field in Tesla into kGauss for old code
142 f[1] = fy*10.;
143 f[2] = fz*10.;
144
145 *z += (c + (seczs[0] + seczs[1] + seczs[2]) /3.) * hst;
146 *y += (b + (secys[0] + secys[1] + secys[2]) /3.) * hst;
147 *x += (a + (secxs[0] + secxs[1] + secxs[2]) /3.) * hst;
148
149 secxs[3] = (bt * f[2] - ct * f[1]) * ph2;
150 secys[3] = (ct * f[0] - at * f[2]) * ph2;
151 seczs[3] = (at * f[1] - bt * f[0]) * ph2;
152 a += (secxs[0] + secxs[3] + (secxs[1] + secxs[2]) * 2.) /3.;
153 b += (secys[0] + secys[3] + (secys[1] + secys[2]) * 2.) /3.;
154 c += (seczs[0] + seczs[3] + (seczs[1] + seczs[2]) * 2.) /3.;
155
156 est = std::abs(secxs[0] + secxs[3] - (secxs[1] + secxs[2]))
157 + std::abs(secys[0] + secys[3] - (secys[1] + secys[2]))
158 + std::abs(seczs[0] + seczs[3] - (seczs[1] + seczs[2]));
159
160 if (est > 1e-4 && std::abs(hst) > 1e-4) goto L30;
161 ++iter;
162 ncut = 0;
163
164
165/* If too many iterations, go to HELIX */
166 if (iter > 1992) goto L40;
167
168 tl += hst;
169 if (est < 3.125e-6)
170 hst *= 2.;
171 cba = 1. / sqrt(a * a + b * b + c * c);
172 vout[1] = *x;
173 vout[2] = *y;
174 vout[3] = *z;
175 vout[4] = cba * a;
176 vout[5] = cba * b;
177 vout[6] = cba * c;
178 rest = step - tl;
179 if (step < 0.) rest = -rest;
180 if (rest > std::abs(step) * 1e-5) goto L20;
181
182 return;
183
184/* * CUT STEP */
185L30:
186 ++ncut;
187/* If too many cuts , go to HELIX */
188 if (ncut > 11) {
189 goto L40;
190 }
191 hst *= .5;
192 goto L20;
193
194/* * ANGLE TOO BIG, USE HELIX */
195L40:
196 f1 = f[0];
197 f2 = f[1];
198 f3 = f[2];
199 f4 = sqrt(f1*f1 + f2*f2 + f3*f3);
200 rho = -f4 * pinv;
201 tet = rho * step;
202 if (tet != 0.) {
203 hnorm = 1. / f4;
204 f1 *= hnorm;
205 f2 *= hnorm;
206 f3 *= hnorm;
207
208 hxp[0] = f2 * vect[6] - f3 * vect[5];
209 hxp[1] = f3 * vect[4] - f1 * vect[6];
210 hxp[2] = f1 * vect[5] - f2 * vect[4];
211 hp = f1 * vect[4] + f2 * vect[5] + f3 * vect[6];
212
213 rho1 = 1. / rho;
214 sint = sin(tet);
215 cost = sin(tet/2.) * sin(tet/2.) * 2.;
216
217 g1 = sint * rho1;
218 g2 = cost * rho1;
219 g3 = (tet - sint) * hp * rho1;
220 g4 = -cost;
221 g5 = sint;
222 g6 = cost * hp;
223 vout[1] = vect[1] + (g1 * vect[4] + g2 * hxp[0] + g3 * f1);
224 vout[2] = vect[2] + (g1 * vect[5] + g2 * hxp[1] + g3 * f2);
225 vout[3] = vect[3] + (g1 * vect[6] + g2 * hxp[2] + g3 * f3);
226 vout[4] = vect[4] + (g4 * vect[4] + g5 * hxp[0] + g6 * f1);
227 vout[5] = vect[5] + (g4 * vect[5] + g5 * hxp[1] + g6 * f2);
228 vout[6] = vect[6] + (g4 * vect[6] + g5 * hxp[2] + g6 * f3);
229
230 } else {
231 vout[1] = vect[1] + step * vect[4];
232 vout[2] = vect[2] + step * vect[5];
233 vout[3] = vect[3] + step * vect[6];
234
235 }
236
237 }
#define y
#define xt
#define yt
#define x
#define zt
#define z
int cost(std::vector< std::string > &files, node &n, const std::string &directory="", bool deleteref=false, bool relocate=false)
Definition hcg.cxx:922
@ f3
fraction of energy reconstructed in 3rd sampling
Definition EgammaEnums.h:55

◆ vkMSolve()

int Trk::vkMSolve ( double * a,
double * b,
long int n,
double * ainv )

Definition at line 618 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Matrix.cxx.

619{
620 std::unique_ptr<int[]> indx(new int[n+1]);
621 std::unique_ptr<double[]> Scale(new double[n]);
622 scaleg(a,Scale.get(),n,n);
623 int ierr = vkLUdcmp( a, n, indx.get());
624 if( ierr )return -1;
625 for(int i=0;i<n;i++)b[i]*=Scale[i];
626 vkLUbksb(a, n, indx.get(), b);
627 for(int i=0;i<n;i++)b[i]*=Scale[i];
628 if(ainv){ //Also invert matrix on request
629 int i,j;
630 std::unique_ptr<double[]> tmp(new double[n]);
631 for(j=0; j<n; j++){
632 for(i=0;i<n;i++)tmp[i]=0.;
633 tmp[j]=1.;
634 vkLUbksb(a, n, indx.get(), tmp.get());
635 for(i=0;i<n;i++)ainv[i+j*n]=tmp[i];
636 }
637 for(i=0;i<n;i++) for(j=0;j<n;j++) ainv[i+j*n] *= Scale[i]*Scale[j];
638 }
639 return 0;
640}

◆ vkPerigeeToP()

void Trk::vkPerigeeToP ( const double * perig3,
double * pp,
double effectiveBMAG )

Definition at line 15 of file cfMomentum.cxx.

16{
17 double constB = effectiveBMAG * vkalMagCnvCst;
18 double phiv = perig3[1];
19 double pt = std::abs( constB/perig3[2] );
20 pp[0] = pt * cos(phiv);
21 pp[1] = pt * sin(phiv);
22 pp[2] = pt / tan(perig3[0]);
23}

◆ vkSVDCmp()

void Trk::vkSVDCmp ( double ** a,
int m,
int n,
double w[],
double ** v )

Definition at line 648 of file Tracking/TrkVertexFitter/TrkVKalVrtCore/src/Matrix.cxx.

649{
650 int flag,i,its,j,jj,k,l=0, nm=0;
651 double anorm,c,f,g,h,s,scale,x,y,z;
652
653 std::vector<double> rv1(n+1,0.);
654 g=scale=anorm=0.0;
655 for (i=1;i<=n;i++) {
656 l=i+1;
657 rv1[i]=scale*g;
658 g=s=scale=0.0;
659 if (i <= m) {
660 for (k=i;k<=m;k++) scale += std::abs(a[k][i]);
661 if (scale) {
662 for (k=i;k<=m;k++) {
663 a[k][i] /= scale;
664 s += a[k][i]*a[k][i];
665 }
666 f=a[i][i];
667 g = -SIGN(std::sqrt(s),f);
668 h=f*g-s;
669 a[i][i]=f-g;
670 for (j=l;j<=n;j++) {
671 for (s=0.0,k=i;k<=m;k++) s += a[k][i]*a[k][j];
672 f=s/h;
673 for (k=i;k<=m;k++) a[k][j] += f*a[k][i];
674 }
675 for (k=i;k<=m;k++) a[k][i] *= scale;
676 }
677 }
678 w[i]=scale *g;
679 g=s=scale=0.0;
680 if (i <= m && i != n) {
681 for (k=l;k<=n;k++) scale += std::abs(a[i][k]);
682 if (scale) {
683 for (k=l;k<=n;k++) {
684 a[i][k] /= scale;
685 s += a[i][k]*a[i][k];
686 }
687 f=a[i][l];
688 g = -SIGN(std::sqrt(s),f);
689 h=f*g-s;
690 a[i][l]=f-g;
691 for (k=l;k<=n;k++) rv1[k]=a[i][k]/h;
692 for (j=l;j<=m;j++) {
693 for (s=0.0,k=l;k<=n;k++) s += a[j][k]*a[i][k];
694 for (k=l;k<=n;k++) a[j][k] += s*rv1[k];
695 }
696 for (k=l;k<=n;k++) a[i][k] *= scale;
697 }
698 }
699 double nanorm=std::abs(w[i])+std::abs(rv1[i]);
700 if(anorm < nanorm) anorm = nanorm;
701 }
702 for (i=n;i>=1;i--) {
703 if (i < n) {
704 if (g) {
705 for (j=l;j<=n;j++)
706 v[j][i]=(a[i][j]/a[i][l])/g;
707 for (j=l;j<=n;j++) {
708 for (s=0.0,k=l;k<=n;k++) s += a[i][k]*v[k][j];
709 for (k=l;k<=n;k++) v[k][j] += s*v[k][i];
710 }
711 }
712 for (j=l;j<=n;j++) v[i][j]=v[j][i]=0.0;
713 }
714 v[i][i]=1.0;
715 g=rv1[i];
716 l=i;
717 }
718 for (i=(m<n?m:n);i>=1;i--) {
719 l=i+1;
720 g=w[i];
721 for (j=l;j<=n;j++) a[i][j]=0.0;
722 if (g) {
723 g=1.0/g;
724 for (j=l;j<=n;j++) {
725 for (s=0.0,k=l;k<=m;k++) s += a[k][i]*a[k][j];
726 f=(s/a[i][i])*g;
727 for (k=i;k<=m;k++) a[k][j] += f*a[k][i];
728 }
729 for (j=i;j<=m;j++) a[j][i] *= g;
730 } else for (j=i;j<=m;j++) a[j][i]=0.0;
731 ++a[i][i];
732 }
733 for (k=n;k>=1;k--) {
734 for (its=1;its<=300;its++) {
735 flag=1;
736 for (l=k;l>=1;l--) {
737 nm=l-1;
738 if ( (std::abs(rv1[l])+anorm) == anorm) {
739 flag=0;
740 break;
741 }
742 if ( (std::abs(w[nm])+anorm) == anorm) break;
743 }
744 if (flag) {
745 c=0.0;
746 s=1.0;
747 for (i=l;i<=k;i++) {
748 f=s*rv1[i];
749 rv1[i]=c*rv1[i];
750 if ( (std::abs(f)+anorm) == anorm) break;
751 g=w[i];
752 h=vkPythag(f,g);
753 w[i]=h;
754 h=1.0/h;
755 c=g*h;
756 s = -f*h;
757 for (j=1;j<=m;j++) {
758 y=a[j][nm];
759 z=a[j][i];
760 a[j][nm]=y*c+z*s;
761 a[j][i]=z*c-y*s;
762 }
763 }
764 }
765 z=w[k];
766 if (l == k) {
767 if (z < 0.0) {
768 w[k] = -z;
769 for (j=1;j<=n;j++) v[j][k] = -v[j][k];
770 }
771 break;
772 }
773 x=w[l];
774 nm=k-1;
775 y=w[nm];
776 g=rv1[nm];
777 h=rv1[k];
778 f=((y-z)*(y+z)+(g-h)*(g+h))/(2.0*h*y);
779 g=vkPythag(f,1.0);
780 f=((x-z)*(x+z)+h*((y/(f+SIGN(g,f)))-h))/x;
781 c=s=1.0;
782 for (j=l;j<=nm;j++) {
783 i=j+1;
784 g=rv1[i];
785 y=w[i];
786 h=s*g;
787 g=c*g;
788 z=vkPythag(f,h);
789 rv1[j]=z;
790 c=f/z;
791 s=h/z;
792 f=x*c+g*s;
793 g = g*c-x*s;
794 h=y*s;
795 y *= c;
796 for (jj=1;jj<=n;jj++) {
797 x=v[jj][j];
798 z=v[jj][i];
799 v[jj][j]=x*c+z*s;
800 v[jj][i]=z*c-x*s;
801 }
802 z=vkPythag(f,h);
803 w[j]=z;
804 if (z) {
805 z=1.0/z;
806 c=f*z;
807 s=h*z;
808 }
809 f=c*g+s*y;
810 x=c*y-s*g;
811 for (jj=1;jj<=m;jj++) {
812 y=a[jj][j];
813 z=a[jj][i];
814 a[jj][j]=y*c+z*s;
815 a[jj][i]=z*c-y*s;
816 }
817 }
818 rv1[l]=0.0;
819 rv1[k]=f;
820 w[k]=x;
821 }
822 }
823}
#define SIGN(a, b)
Header file for AthHistogramAlgorithm.
bool flag
Definition master.py:29

◆ vkvFastV()

double Trk::vkvFastV ( double * p1,
double * p2,
const double * vRef,
double dbmag,
double * out )

Definition at line 42 of file VKvFast.cxx.

43{
44 double d__1;
45 double diff, coef, cent1[2], cent2[2], angle, cross[6];/* was [3][2] */
46 double r1, r2, z1, z2, a01[3], a02[3], dc, an[2];
47 double ar1, ar2, xd1, xd2, yd1, yd2, dz1, dz2, pt1, pt2, pz1, pz2, det;
48 double loc_bmag;
49
50
51#define cross_ref(a_1,a_2) cross[(a_2)*3 + (a_1) - 4]
52
53/* ---- */
54 /* Parameter adjustments */
55 --out;
56 --p2;
57 --p1;
58
59 /* Function Body */
60 loc_bmag = dbmag;
61 if (dbmag <= .1) {loc_bmag = 0.1;} // To avoid ZERO magnetic field
62/* ---- */
63 double psum[3]={0.,0.,0.}; double ptmp[3]={0.,0.,0.};
64 vkPerigeeToP(&p1[3],ptmp,loc_bmag); psum[0]+=ptmp[0];psum[1]+=ptmp[1];psum[2]+=ptmp[2];
65 vkPerigeeToP(&p2[3],ptmp,loc_bmag); psum[0]+=ptmp[0];psum[1]+=ptmp[1];psum[2]+=ptmp[2];
66/*------*/
67 r1 = 1. / p1[5];
68 r2 = 1. / p2[5];
69 ar1 = std::abs(r1);
70 ar2 = std::abs(r2);
71// pt1 = ar1 * loc_bmag * .00299979; // For GeV and CM
72// pt2 = ar2 * loc_bmag * .00299979;
73// pt1 = ar1 * loc_bmag * .299979; // For MeV and MM
74// pt2 = ar2 * loc_bmag * .299979;
75 pt1 = ar1 * loc_bmag * vkalMagCnvCst; // from CommonPars.h
76 pt2 = ar2 * loc_bmag * vkalMagCnvCst;
77 pz1 = pt1 / tan(p1[3]);
78 pz2 = pt2 / tan(p2[3]);
79/* --- */
80 xd1 = cos(p1[4]);
81/* Need for calculation of Z of crossing point */
82 xd2 = cos(p2[4]);
83 yd1 = sin(p1[4]);
84 yd2 = sin(p2[4]);
85/* --- Point of minimal approach to the beam */
86 a01[0] = p1[1] * yd1;
87 a01[1] = -p1[1] * xd1;
88 a01[2] = p1[2];
89 a02[0] = p2[1] * yd2;
90 a02[1] = -p2[1] * xd2;
91 a02[2] = p2[2];
92/* -- coordinates of centres of trajectories */
93 cent1[0] = a01[0] - r1 * yd1;
94 cent1[1] = a01[1] + r1 * xd1;
95 cent2[0] = a02[0] - r2 * yd2;
96 cent2[1] = a02[1] + r2 * xd2;
97/* -- */
98 an[0] = cent2[0] - cent1[0];
99 an[1] = cent2[1] - cent1[1];
100 dc = sqrt(an[0]*an[0] + an[1]*an[1]);
101 an[0] /= dc;
102 an[1] /= dc;
103/* -- Single point*/
104 if (dc <= std::abs(ar1 - ar2)) {
105 if (ar1 < ar2) {
106 cross_ref(1, 1) = ar1 / dc * (cent1[0] - cent2[0]) + cent1[0];
107 cross_ref(1, 2) = ar2 / dc * (cent1[0] - cent2[0]) + cent2[0];
108 cross_ref(2, 1) = ar1 / dc * (cent1[1] - cent2[1]) + cent1[1];
109 cross_ref(2, 2) = ar2 / dc * (cent1[1] - cent2[1]) + cent2[1];
110 } else {
111 cross_ref(1, 1) = ar1 / dc * (cent2[0] - cent1[0]) + cent1[0];
112 cross_ref(1, 2) = ar2 / dc * (cent2[0] - cent1[0]) + cent2[0];
113 cross_ref(2, 1) = ar1 / dc * (cent2[1] - cent1[1]) + cent1[1];
114 cross_ref(2, 2) = ar2 / dc * (cent2[1] - cent1[1]) + cent2[1];
115 }
116 angle = vkvang_(&cross_ref(1, 1), cent1, &r1, &xd1, &yd1);
117 z1 = pz1 * r1 * angle / pt1 + a01[2];
118 angle = vkvang_(&cross_ref(1, 2), cent2, &r2, &xd2, &yd2);
119 z2 = pz2 * r2 * angle / pt2 + a02[2];
120 //diffz = std::abs(z2 - z1);
121 out[1] = (cross_ref(1, 1) + cross_ref(1, 2)) / 2.;
122 out[2] = (cross_ref(2, 1) + cross_ref(2, 2)) / 2.;
123 out[3] = (z1 + z2) / 2.;
124 return std::abs(z1 - z2);
125 }
126/* ---------------------------------------------------------- */
127 double bestZdiff=0.;
128 diff = dc - (ar1 + ar2);
129 if (diff < 0.) {
130/* 2 distinct points, A1 & A2. */
131 coef = (r1*r1 + dc*dc - r2*r2) / (dc * 2);
132 if (r1*r1 - coef*coef > 0.) {
133 det = sqrt(r1 * r1 - coef * coef);
134 } else {
135 det = 0.;
136 }
137 cross_ref(1, 1) = cent1[0] + coef * an[0] + det * an[1];
138 cross_ref(2, 1) = cent1[1] + coef * an[1] - det * an[0];
139 cross_ref(3, 1) = 0.;
140 cross_ref(1, 2) = cent1[0] + coef * an[0] - det * an[1];
141 cross_ref(2, 2) = cent1[1] + coef * an[1] + det * an[0];
142 cross_ref(3, 2) = 0.;
143/* -First cross */
144 angle = vkvang_(&cross_ref(1, 1), cent1, &r1, &xd1, &yd1);
145 z1 = pz1 * r1 * angle / pt1 + a01[2];
146 angle = vkvang_(&cross_ref(1, 1), cent2, &r2, &xd2, &yd2);
147 z2 = pz2 * r2 * angle / pt2 + a02[2];
148 dz1 = std::abs(z2 - z1);
149 cross_ref(3, 1) = (z1 + z2) / 2.;
150/* -Second cross */
151 angle = vkvang_(&cross_ref(1, 2), cent1, &r1, &xd1, &yd1);
152 z1 = pz1 * r1 * angle / pt1 + a01[2];
153 angle = vkvang_(&cross_ref(1, 2), cent2, &r2, &xd2, &yd2);
154 z2 = pz2 * r2 * angle / pt2 + a02[2];
155 dz2 = std::abs(z2 - z1);
156 cross_ref(3, 2) = (z1 + z2) / 2.;
157/* if reterence vertex is present -> check 2D mom direction -> must be avay from it*/
158 if(vRef && std::abs(dz1-dz2)<5.){
159 double dir1=ptmp[0]*(cross_ref(1,1)-vRef[0])+ptmp[1]*(cross_ref(2,1)-vRef[1]);
160 double dir2=ptmp[0]*(cross_ref(1,2)-vRef[0])+ptmp[1]*(cross_ref(2,2)-vRef[1]);
161 if(dir1*dir2<0){ // points are on different sides of ref. vertex
162 if(dir1<0) dz1+=1000.;
163 if(dir2<0) dz2+=1000.;
164 }
165 }
166/* - choice of best dz */
167
168 if (dz1 < dz2) {
169 out[1] = cross_ref(1, 1);
170 out[2] = cross_ref(2, 1);
171 out[3] = cross_ref(3, 1);
172 bestZdiff=dz1;
173 } else {
174 out[1] = cross_ref(1, 2);
175 out[2] = cross_ref(2, 2);
176 out[3] = cross_ref(3, 2);
177 bestZdiff=dz2;
178 }
179 } else {
180 cross_ref(1, 1) = (ar1 * cent2[0] + ar2 * cent1[0]) / (ar1 + ar2);
181 cross_ref(2, 1) = (ar1 * cent2[1] + ar2 * cent1[1]) / (ar1 + ar2);
182 out[1] = cross_ref(1, 1);
183 out[2] = cross_ref(2, 1);
184 out[3] = 0.;
185 d__1 = r1 * dc / (ar1 + ar2);
186 angle = vkvang_(cross, cent1, &d__1, &xd1, &yd1);
187 z1 = pz1 * r1 * angle / pt1 + a01[2];
188 d__1 = r2 * dc / (ar1 + ar2);
189 angle = vkvang_(cross, cent2, &d__1, &xd2, &yd2);
190 z2 = pz2 * r2 * angle / pt2 + a02[2];
191 out[3] = (z1 + z2) / 2.;
192 bestZdiff = std::abs(z1 - z2);
193 }
194 return bestZdiff;
195}
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
#define cross_ref(a_1, a_2)
void vkPerigeeToP(const double *perig3, double *pp, double effectiveBMAG)

◆ vpderiv()

void Trk::vpderiv ( bool UseTrackErr,
long int Charge,
const double * pari0,
double * covi,
double * vrtref,
double * covvrtref,
double * drdpar,
double * dwgt,
double * rv0,
VKalVrtControl * FitCONTROL )

Definition at line 16 of file VtDeriv.cxx.

18{
19 /* Initialized data */
20
21 double dshft[6] = { 1.e-4, 1.e-4, 1.e-4, 1.e-4, 1.e-4, 1.e-4}; //step for each parameter
22 /* Symmetric version for derivatives calculation*/
23 double DrvCoef[4] = {-2., -1., 1.,2.};
24
25 /* Local variables */
26 double pari[6], covd[15], dcov[3], rvec[50]; /* was [2][6*4+1] */
27 double paro[5];
28 int j, ij, ip, ipp, id=0;
29 double dwgt0[3]={0.,0.,0.};
30 //double deriv[6], dchi2[4*6+1]; //VK for debugging
31 double cs, pp, sn, pt, rho;
32 double covdtr[15], ctg, par[5], cnv[36]; /* was [6][6] */
33
34#define rvec_ref(a_1,a_2) rvec[(a_2)*2 + (a_1) - 1]
35#define drdpar_ref(a_1,a_2) drdpar[(a_2)*2 + (a_1)]
36#define cnv_ref(a_1,a_2) cnv[(a_2)*6 + (a_1) - 7]
37
38/* ---------------------------------------------------------- */
39/* Subroutine for derivative calculations */
40/* Input: */
41/* Charge - charge of track ( +1,0,-1 ) */
42/* PARI0(1:3) - Vertex of particle */
43/* PARI0(4:6) - Momentum of particle */
44/* COVI(21) - symmetric covariance matrix */
45/* BMAG - magnetic field */
46/* UseTrackErr =false Fitted track is assumed errorless */
47/* only vertex error is used */
48/* may be used for constraint */
49/* =true Fitted track error is added */
50/* Output: */
51/* Deriv(6) - Chi2 derivatives for debugging */
52/* drdpar - derivatives */
53/* rv0[2] - track impact vs vertex */
54/* dwgt[3] - track impact covarinance */
55/* ---------------------------------------------------------- */
56 /* Parameter adjustments */
57 drdpar -= 3;
58 --covvrtref;
59
60 /* Function Body */
61/* --------------------- */
62 double constB =FitCONTROL->vk_forcft.localbmag * vkalMagCnvCst ;
63
64 for (ip = 0; ip <= 4*6; ++ip) { // Number of points * Number of parameters
65/* -- Input parameters */
66 pari[0] = pari0[0];
67 pari[1] = pari0[1];
68 pari[2] = pari0[2];
69 pari[3] = pari0[3];
70 pari[4] = pari0[4];
71 pari[5] = pari0[5];
72// ipp - parameter number, id - number of step
73 ipp = ip; while(ipp>6)ipp-=6;
74 if(ip>=1 && ip<=6 ) id=0;
75 if(ip>=7 && ip<=12) id=1;
76 if(ip>=13 && ip<=18) id=2;
77 if(ip>=19 && ip<=24) id=3;
78 if (ip != 0) pari[ipp - 1] *= (dshft[ipp-1]*DrvCoef[id] + 1.);
79/* -- */
80 pt = sqrt(pari[3]*pari[3] + pari[4]*pari[4]);
81 pp = pt*pt + pari[5]*pari[5];
82 cs = pari[3] / pt;
83 sn = pari[4] / pt;
84 ctg = pari[5] / pt;
85 rho = Charge * constB / pt; // Sign of charge coinside with sign of curvature!!!
86/* -- Output parameters */
87 par[0] = 0.;
88 par[1] = 0.;
89 par[2] = acos(pari[5] / sqrt(pp));
90 if(par[2]<1.e-5) par[2]=1.e-5;
91 if(par[2]>M_PI-1.e-5) par[2]=M_PI-1.e-5;
92 par[3] = atan2(pari[4], pari[3]);
93 par[4] = rho;
94 if (Charge == 0) par[4] = constB / pt;
95/* -- */
96 cnv_ref(1, 1) = sn;
97 cnv_ref(2, 1) = -cs;
98 cnv_ref(3, 1) = 0.;
99 cnv_ref(4, 1) = 0.;
100 cnv_ref(5, 1) = 0.;
101 cnv_ref(6, 1) = 0.;
102/* -- */
103 cnv_ref(1, 2) = -cs * ctg;
104 cnv_ref(2, 2) = -sn * ctg;
105 cnv_ref(3, 2) = 1.;
106 cnv_ref(4, 2) = 0.;
107 cnv_ref(5, 2) = 0.;
108 cnv_ref(6, 2) = 0.;
109/* -- */
110 cnv_ref(1, 3) = 0.;
111 cnv_ref(2, 3) = 0.;
112 cnv_ref(3, 3) = 0.;
113 cnv_ref(4, 3) = pari[5] * pari[3] / pp / pt;
114 cnv_ref(5, 3) = pari[5] * pari[4] / pp / pt;
115 cnv_ref(6, 3) = -pt / pp;
116/* -- */
117 cnv_ref(1, 4) = 0.;
118 cnv_ref(2, 4) = 0.;
119 if (Charge)cnv_ref(1, 4) = -cs * rho; // For charged tracks only
120 if (Charge)cnv_ref(2, 4) = -sn * rho; //
121 cnv_ref(3, 4) = 0.;
122 cnv_ref(4, 4) = -pari[4] / (pt * pt);
123 cnv_ref(5, 4) = pari[3] / (pt * pt);
124 cnv_ref(6, 4) = 0.;
125/* -- */
126 cnv_ref(1, 5) = 0.;
127 cnv_ref(2, 5) = 0.;
128 cnv_ref(3, 5) = 0.;
129 cnv_ref(4, 5) = -pari[3] * rho / (pt * pt);
130 cnv_ref(5, 5) = -pari[4] * rho / (pt * pt);
131 if ( Charge == 0) {cnv_ref(4, 5) = -pari[3] * constB / (pt*pt*pt);}
132 if ( Charge == 0) {cnv_ref(5, 5) = -pari[4] * constB / (pt*pt*pt);}
133 cnv_ref(6, 5) = 0.;
134/* -- not needed really but... */
135 cnv_ref(1, 6) = cnv_ref(2, 6) = cnv_ref(3, 6) = cnv_ref(4, 6) = cnv_ref(5, 6) = cnv_ref(6, 6) = 0.;
136
137 tdasatVK(cnv, &covi[0], covd, 5, 6);
138
139/* -- Translation to New Reference Point */
140 Trk::vkalPropagator::Propagate(-999, Charge, par, covd, pari, vrtref, paro, covdtr, FitCONTROL);
141
142
143
144/* -- Now impact significance */
145/* X=paro(1)*sn, Y=-paro(1)*cs */
146 sn = sin(paro[3]);
147 cs = cos(paro[3]);
148/* -- New error version */
149 cnv_ref(1, 1) = -sn;
150 cnv_ref(1, 2) = cs;
151 cnv_ref(1, 3) = 0.;
152 cnv_ref(2, 1) = sn / tan(paro[2]);
153 cnv_ref(2, 2) = cs / tan(paro[2]);
154 cnv_ref(2, 3) = -1.;
155 dcov[0] = 0.;
156 dcov[1] = 0.;
157 dcov[2] = 0.;
158 for (int i = 1; i <= 3; ++i) {
159 for (j = 1; j <= 3; ++j) {
160 ij = i > j ? i : j;
161 ij = ij * (ij - 1) / 2 + ( i < j ? i : j );
162 dcov[0] += cnv_ref(1, i) * cnv_ref(1, j) * covvrtref[ij];
163 dcov[2] += cnv_ref(2, i) * cnv_ref(2, j) * covvrtref[ij];
164 dcov[1] += cnv_ref(1, i) * cnv_ref(2, j) * covvrtref[ij];
165 }
166 }
167/* --------------------------------------------------------------- */
168 if( UseTrackErr ){ // Add track error if needed
169 dcov[0] += covdtr[0];
170 dcov[1] += covdtr[1];
171 dcov[2] += covdtr[2];
172 }
173/*---------------------------------------------------------------- */
174// Weight matrix and chi2 for given shift
175//
176 int jerr=cfdinv(dcov, &dwgt[0], -2); if(jerr){jerr=cfdinv(dcov, &dwgt[0], 2); if(jerr){dwgt[0]=dwgt[2]=1.e6; dwgt[1]=0.;}};
177 //dchi2[ip] = sqrt(fabs(dwgt[0]*paro[0]*paro[0] + 2.*dwgt[1]*paro[0]*paro[1] + dwgt[2]*paro[1]*paro[1]));
178 rvec_ref(1, ip) = paro[0];
179 rvec_ref(2, ip) = paro[1];
180 if (ip == 0) { //Save weight matrix for output
181 dwgt0[0] = dwgt[0];
182 dwgt0[1] = dwgt[1];
183 dwgt0[2] = dwgt[2];
184 }
185 }
186/* ---------------------------------------------------------------- */
187// Now calculate derivatives themselves
188//
189 for (int i = 1; i <= 6; ++i) {
190 //deriv[i-1] = (dchi2[i] -8.*dchi2[i+6] +8.*dchi2[i+12]-dchi2[i+18] ) / (12.*dshft[i-1]*pari0[i-1]);
191 drdpar_ref(1,i) = (rvec_ref(1,i) -8.*rvec_ref(1,i+6) +8.*rvec_ref(1,i+12) -rvec_ref(1,i+18)) / (12.*dshft[i-1]*pari0[i-1]);
192 drdpar_ref(2,i) = (rvec_ref(2,i) -8.*rvec_ref(2,i+6) +8.*rvec_ref(2,i+12) -rvec_ref(2,i+18)) / (12.*dshft[i-1]*pari0[i-1]);
193 }
194//std::cout<<deriv[0]<<", "<<deriv[1]<<", "<<deriv[2]<<", "<<deriv[3]<<", "<<deriv[4]<<", "<<deriv[5]<<'\n';
195//std::cout<<drdpar_ref(1, 1)<<", "<<drdpar_ref(1, 2)<<", "<<drdpar_ref(1, 3)<<", "<<drdpar_ref(1, 4)<<
196// ", "<<drdpar_ref(1, 5)<<", "<<drdpar_ref(1, 6)<<'\n';
197//std::cout<<drdpar_ref(2, 1)<<", "<<drdpar_ref(2, 2)<<", "<<drdpar_ref(2, 3)<<", "<<drdpar_ref(1, 4)<<
198// ", "<<drdpar_ref(2, 5)<<", "<<drdpar_ref(2, 6)<<'\n';
199//std::cout<<"---------------------"<<'\n';
200//
201// Output parameters
202//
203
204 rv0[0] = rvec_ref(1, 0);
205 rv0[1] = rvec_ref(2, 0);
206 dwgt[0] = dwgt0[0];
207 dwgt[1] = dwgt0[1];
208 dwgt[2] = dwgt0[2];
209
210//std::cout<<" VpDerivR,Z="<<rv0[0]<<", "<<rv0[1]<<'\n';
211//std::cout<<" Ref="<<vrtref[0]<<", "<<vrtref[1]<<", "<<vrtref[2]<<'\n';
212#undef cnv_ref
213#undef drdpar_ref
214#undef rvec_ref
215}
#define rvec_ref(a_1, a_2)
#define drdpar_ref(a_1, a_2)
double localbmag
Definition ForCFT.h:29

◆ vtcfit()

int Trk::vtcfit ( VKVertex * vk)

Definition at line 293 of file VtCFit.cxx.

293 {
294
295 double dxyz[3], xyzt[3], eigv[8];
296 double dpipj[3][3] /* was [3][3] */;
297 double drdpy[2][3] /* was [2][3] */;
298 double drdvy[2][3] /* was [2][3] */;
299 double pyv[3][3] /*was [3][3]*/;
300 double vyv[3][3] /*was [3][3]*/;
301 double wa[6], stv[3], wgtvrtd[6], tv[3];
302
303 int ic, jj, it, jt, ii, kt;
304 int j, k, l;
305
306#define ader_ref(a_1,a_2) vk->ader[(a_2)*(vkalNTrkM*3+3) + (a_1) - (vkalNTrkM*3+4)]
307#define cvder_ref(a_1,a_2) vk->FVC.cvder[(a_2)*2 + (a_1) - 3]
308#define dcv_ref(a_1,a_2) vk->FVC.dcv[(a_2)*6 + (a_1) - 7]
309
310 /* ************************************************************************/
311 /* Created : 14-MAY-2008 Author : V.KOSTYUKHIN (INFN) */
312 /* ********* */
313 /* Arguments : Input : NTRK : number of tracks */
314 /* ICH(1:NTRK) : charge */
315 /* PAR(1:5,1:NTRK) : "perigee" parameters */
316 /* 1 : epsilon (impact par. in xy projection, with sign)*/
317 /* 2 : z coordinate */
318 /* 3 : theta angle */
319 /* 4 : phi angle */
320 /* 5 : 1/R (R = radius of curvature, with sign) */
321 /* 0.0029979246d0/Pt if charge=0 */
322 /* WGT(1:15,1:NTRK) : weight matrix on PAR */
323 /* :in case of zero charge WGT(15) must be */
324 /* :error of 0.0029979246d0/Pt with correlation*/
325 /* XYZ(1:3) : approximate coordinates of the vertex*/
326 /* PAR0(1:3) : approximate parameters of tracks at*/
327 /* the vertex(result of pxfvtx fit) */
328 /* Output : XYZF(1:3) : fitted coordinates of the vertex */
329 /* PARF(1:3,1:NTRK) : fitted parameters at THE vertex*/
330 /* 1 : theta */
331 /* 2 : phi */
332 /* 3 : 1/R */
333 /* CHI2 : chi2 of the fit */
334 /* CHI2TR(I)=CONTRIBUTION OF TRACK I TO THE */
335 /* TOTAL CHI2 */
336
337 /* Errors : IERR = 1 : too many tracks (NTRK > NTRMAX) */
338 /* IERR = 2 : covariance or weight matrix not positive */
339 /**************************************************************************/
340
341 /* -------------------------------------------- */
342 /* Fit results needed in other calculations */
343 /* -------------------------------------------- */
344 /* For close to vertex constraint */
345 /* For step constraint */
346 /* -- Derivatives and others for constraint */
347 /* ---------------------------------------------------------------------- */
348
349 long int IERR = 0;
350 int NTRK = vk->TrackList.size();
351 double xyz[3]={vk->iniV[0],vk->iniV[1],vk->iniV[2]};
352 double twb[9];
353 double twci[6];
354 double twbci[9];
355 double xyzf[3];
356
357 vk->truncatedStep=false;
358 if ( NTRK > vkalNTrkM ) return 1;
359
360 std::unique_ptr<double[]> dphi = std::unique_ptr<double[]>(new double[NTRK]);
361 std::unique_ptr<double[]> deps = std::unique_ptr<double[]>(new double[NTRK]);
362 std::unique_ptr<double[]> drho = std::unique_ptr<double[]>(new double[NTRK]);
363 std::unique_ptr<double[]> dtet = std::unique_ptr<double[]>(new double[NTRK]);
364 std::unique_ptr<double[]> dzp = std::unique_ptr<double[]>(new double[NTRK]);
365
366 for (int i=0; i<3; ++i) { tv[i] = 0.; stv[i] = 0.;}
367 for (int i=0; i<6; ++i) { vk->wa[i] = 0.; wa[i] = 0.;}
368 for (k=0; k<2; k++) { for(j=0; j<3; j++) drdvy[k][j] = drdpy[k][j] = 0.;};
369 for (k=0; k<3; k++) { for(j=0; j<3; j++) pyv[k][j] = vyv[k][j] = 0.;};
370
371 /* =================================================================== */
372 /* loop over the tracks */
373
374 if (vk->passNearVertex) {
375 /* dR/dV*Y and dR/dV*Y*dR/dV f */
376 drdvy[0][0]= cvder_ref(1, 1)*vk->FVC.ywgt[0] + cvder_ref(2, 1)*vk->FVC.ywgt[1];
377 drdvy[1][0]= cvder_ref(1, 1)*vk->FVC.ywgt[1] + cvder_ref(2, 1)*vk->FVC.ywgt[2];
378 drdvy[0][1]= cvder_ref(1, 2)*vk->FVC.ywgt[0] + cvder_ref(2, 2)*vk->FVC.ywgt[1];
379 drdvy[1][1]= cvder_ref(1, 2)*vk->FVC.ywgt[1] + cvder_ref(2, 2)*vk->FVC.ywgt[2];
380 drdvy[0][2]= cvder_ref(1, 3)*vk->FVC.ywgt[0] + cvder_ref(2, 3)*vk->FVC.ywgt[1];
381 drdvy[1][2]= cvder_ref(1, 3)*vk->FVC.ywgt[1] + cvder_ref(2, 3)*vk->FVC.ywgt[2];
382 for (ii = 1; ii <= 3; ++ii) { /* Matrix dR/dV*Y*dR/dV */
383 for (jj = 1; jj <= 3; ++jj) {
384 vyv[ii-1][jj-1] = drdvy[0][ii-1]*cvder_ref(1, jj) + drdvy[1][ii-1]*cvder_ref(2, jj);
385 }
386 }
387 }
388
389 double vBx,vBy,vBz;
390 Trk::vkalMagFld::getMagFld(xyz[0], xyz[1], xyz[2],vBx,vBy,vBz,(vk->vk_fitterControl).get());
391
392 for ( kt = 0; kt < NTRK; ++kt) {
393 VKTrack* trk = vk->TrackList[kt].get();
394 double theta_ini =trk->iniP[0];
395 double phi_ini =trk->iniP[1];
396 double invR_ini =trk->iniP[2];
397 /* "perigee" parameters EPS and ZP if the trajectory goes through XYZ */
398 /* and its theta,phi,1/R at perigee are equal to the values at input*/
399 double cotth = 1. / tan( theta_ini ); /* theta at vertex */
400 double cosf = cos(phi_ini);
401 double sinf = sin(phi_ini);
402 double uu = xyz[0]*cosf + xyz[1]*sinf;
403 double vv = xyz[1]*cosf - xyz[0]*sinf;
404 double phip,zp,eps;
405 double corrCz = (vBy*cosf-vBx*sinf)/Trk::vkalMagFld::getEffField(vBx, vBy, vBz, phi_ini, theta_ini);
406 if ( trk->Charge ) {
407 eps = -vv - uu*uu * invR_ini / 2.;
408 zp = -uu * (1. - vv * invR_ini) * cotth - 0.5*uu*uu*invR_ini*corrCz; //xyz[2] is added later to gain precision
409 phip = -uu * invR_ini; //phi_ini is added later to gain precision
410 } else {
411 eps = -vv;
412 zp = -uu * cotth;
413 phip = 0.;
414 }
415
416 /* contribution of this track to chi2 with initial values */
417
418 deps[kt] = trk->a0() - eps;
419 dzp[kt] = trk->z() - xyz[2]; // Precision
420 dzp[kt]-= zp;
421 dtet[kt] = trk->theta() - theta_ini;
422 dphi[kt] = trk->phi() - phi_ini; // Precision
423 dphi[kt]-= phip;
424 drho[kt] = trk->invR() - invR_ini;
425 while(dphi[kt] > M_PI)dphi[kt]-=2.*M_PI;
426 while(dphi[kt] < -M_PI)dphi[kt]+=2.*M_PI;
427
428
429 /* derivatives (deriv1) of perigee param. w.r.t. X,Y,Z (vertex) uu=Q, vv=R */
430 double d11 = sinf - ( uu*cosf *invR_ini);
431 double d12 = -cosf - ( uu*sinf *invR_ini);
432 double d21 = -cosf * cotth + ( (vv*cosf-uu*sinf)*cotth *invR_ini) - uu*cosf*invR_ini*corrCz;
433 double d22 = -sinf * cotth + ( (vv*sinf+uu*cosf)*cotth *invR_ini) - uu*sinf*invR_ini*corrCz;
434 //double d23 = 1.; //VK for reference
435 double d41 = -cosf * invR_ini;
436 double d42 = -sinf * invR_ini;
437 if (trk->Charge == 0) {
438 d11 = sinf;
439 d12 = -cosf;
440 d21 = -cosf * cotth;
441 d22 = -sinf * cotth;
442 d41 = 0.;
443 d42 = 0.;
444 }
445
446 /* matrix DW = (deriv1)t * weight */
447 double dw11 = d11 * trk->WgtM[0] + d21 * trk->WgtM[1] + d41 * trk->WgtM[6];
448 double dw12 = d11 * trk->WgtM[1] + d21 * trk->WgtM[2] + d41 * trk->WgtM[7];
449 double dw13 = d11 * trk->WgtM[3] + d21 * trk->WgtM[4] + d41 * trk->WgtM[8];
450 double dw14 = d11 * trk->WgtM[6] + d21 * trk->WgtM[7] + d41 * trk->WgtM[9];
451 double dw15 = d11 * trk->WgtM[10]+ d21 * trk->WgtM[11]+ d41 * trk->WgtM[13];
452
453
454 double dw21 = d12 * trk->WgtM[0] + d22 * trk->WgtM[1] + d42 * trk->WgtM[6];
455 double dw22 = d12 * trk->WgtM[1] + d22 * trk->WgtM[2] + d42 * trk->WgtM[7];
456 double dw23 = d12 * trk->WgtM[3] + d22 * trk->WgtM[4] + d42 * trk->WgtM[8];
457 double dw24 = d12 * trk->WgtM[6] + d22 * trk->WgtM[7] + d42 * trk->WgtM[9];
458 double dw25 = d12 * trk->WgtM[10]+ d22 * trk->WgtM[11]+ d42 * trk->WgtM[13];
459 double dw31 = trk->WgtM[1];
460 double dw32 = trk->WgtM[2];
461 double dw33 = trk->WgtM[4];
462 double dw34 = trk->WgtM[7];
463 double dw35 = trk->WgtM[11];
464
465 /* summation of DW * DPAR to vector TV */
466 tv[0] += dw11 * deps[kt] + dw12 * dzp[kt];
467 tv[1] += dw21 * deps[kt] + dw22 * dzp[kt];
468 tv[2] += dw31 * deps[kt] + dw32 * dzp[kt];
469 tv[0] += dw13 * dtet[kt] + dw14 * dphi[kt] + dw15 * drho[kt];
470 tv[1] += dw23 * dtet[kt] + dw24 * dphi[kt] + dw25 * drho[kt];
471 tv[2] += dw33 * dtet[kt] + dw34 * dphi[kt] + dw35 * drho[kt];
472
473 stv[0] += dw11 * deps[kt] + dw12 * dzp[kt];
474 stv[1] += dw21 * deps[kt] + dw22 * dzp[kt];
475 stv[2] += dw31 * deps[kt] + dw32 * dzp[kt];
476 stv[0] += dw13 * dtet[kt] + dw14 * dphi[kt] + dw15*drho[kt];
477 stv[1] += dw23 * dtet[kt] + dw24 * dphi[kt] + dw25*drho[kt];
478 stv[2] += dw33 * dtet[kt] + dw34 * dphi[kt] + dw35*drho[kt];
479
480 /* derivatives (deriv2) of perigee param. w.r.t. theta,phi,1/R (vertex) uu=Q, vv=R */
481 double e12 = uu - invR_ini * vv * uu;
482 double e13 = -uu*uu / 2.;
483 double e21 = uu *(1. - vv*invR_ini) * (cotth*cotth + 1.);
484 double e22 = -vv*cotth + (vv*vv-uu*uu)*invR_ini*cotth - uu*vv*invR_ini*corrCz;
485 double e23 = uu*vv*cotth -0.5*uu*uu*corrCz;
486 double e43 = -uu + 2.*uu*vv*invR_ini;
487 /* if straight line, set to zero derivatives w.r.t. the curvature */
488 /* and curvature terms in derivatives */
489 if (trk->Charge == 0) {
490 e12 = uu;
491 e13 = 0.;
492 e21 = uu * (cotth*cotth + 1.);
493 e22 = -vv * cotth;
494 e23 = 0.;
495 e43 = 0.;
496 }
497
498 /* matrix EW = (deriv2)t * weight */
499 double ew11 = e21 * trk->WgtM[1] + trk->WgtM[3];
500 double ew12 = e21 * trk->WgtM[2] + trk->WgtM[4];
501 double ew13 = e21 * trk->WgtM[4] + trk->WgtM[5];
502 double ew14 = e21 * trk->WgtM[7] + trk->WgtM[8];
503 double ew15 = e21 * trk->WgtM[11]+ trk->WgtM[12];
504 double ew21 = e12 * trk->WgtM[0] + e22 * trk->WgtM[1] + trk->WgtM[6];
505 double ew22 = e12 * trk->WgtM[1] + e22 * trk->WgtM[2] + trk->WgtM[7];
506 double ew23 = e12 * trk->WgtM[3] + e22 * trk->WgtM[4] + trk->WgtM[8];
507 double ew24 = e12 * trk->WgtM[6] + e22 * trk->WgtM[7] + trk->WgtM[9];
508 double ew25 = e12 * trk->WgtM[10]+ e22 * trk->WgtM[11]+ trk->WgtM[13];
509 double ew31 = e13 * trk->WgtM[0] + e23 * trk->WgtM[1] + e43 * trk->WgtM[6] + trk->WgtM[10];
510 double ew32 = e13 * trk->WgtM[1] + e23 * trk->WgtM[2] + e43 * trk->WgtM[7] + trk->WgtM[11];
511 double ew33 = e13 * trk->WgtM[3] + e23 * trk->WgtM[4] + e43 * trk->WgtM[8] + trk->WgtM[12];
512 double ew34 = e13 * trk->WgtM[6] + e23 * trk->WgtM[7] + e43 * trk->WgtM[9] + trk->WgtM[13];
513 double ew35 = e13 * trk->WgtM[10]+ e23 * trk->WgtM[11]+ e43 * trk->WgtM[13]+ trk->WgtM[14];
514
515 /* computation of vector TT = EW * DPAR */
516 TWRK* t_trk=vk->tmpArr[kt].get();
517 t_trk->tt[0] = ew11*deps[kt] + ew12*dzp[kt];
518 t_trk->tt[1] = ew21*deps[kt] + ew22*dzp[kt];
519 t_trk->tt[2] = ew31*deps[kt] + ew32*dzp[kt];
520 t_trk->tt[0] += ew13*dtet[kt] + ew14*dphi[kt] + ew15*drho[kt];
521 t_trk->tt[1] += ew23*dtet[kt] + ew24*dphi[kt] + ew25*drho[kt];
522 t_trk->tt[2] += ew33*dtet[kt] + ew34*dphi[kt] + ew35*drho[kt];
523 if ( vk->passNearVertex ) {
524 for (j = 1; j <= 2; ++j) { /* Derivatives dR/dQi */
525 int i3=(kt+1)*3;
526 t_trk->drdp[j-1][0] = cvder_ref(j,4) * dcv_ref(4,i3 + 1) + cvder_ref(j,5) * dcv_ref(5,i3 + 1);
527 t_trk->drdp[j-1][1] = cvder_ref(j,4) * dcv_ref(4,i3 + 2) + cvder_ref(j,5) * dcv_ref(5,i3 + 2);
528 t_trk->drdp[j-1][2] = cvder_ref(j,4) * dcv_ref(4,i3 + 3) + cvder_ref(j,5) * dcv_ref(5,i3 + 3);
529 t_trk->drdp[j-1][0] += cvder_ref(j, 6) * dcv_ref(6, i3 + 1);
530 t_trk->drdp[j-1][1] += cvder_ref(j, 6) * dcv_ref(6, i3 + 2);
531 t_trk->drdp[j-1][2] += cvder_ref(j, 6) * dcv_ref(6, i3 + 3);
532 }
533 /* Matrix dR/dQ */
534 drdpy[0][0] = t_trk->drdp[0][0] * vk->FVC.ywgt[0] + t_trk->drdp[1][0] * vk->FVC.ywgt[1];
535 drdpy[1][0] = t_trk->drdp[0][0] * vk->FVC.ywgt[1] + t_trk->drdp[1][0] * vk->FVC.ywgt[2];
536 drdpy[0][1] = t_trk->drdp[0][1] * vk->FVC.ywgt[0] + t_trk->drdp[1][1] * vk->FVC.ywgt[1];
537 drdpy[1][1] = t_trk->drdp[0][1] * vk->FVC.ywgt[1] + t_trk->drdp[1][1] * vk->FVC.ywgt[2];
538 drdpy[0][2] = t_trk->drdp[0][2] * vk->FVC.ywgt[0] + t_trk->drdp[1][2] * vk->FVC.ywgt[1];
539 drdpy[1][2] = t_trk->drdp[0][2] * vk->FVC.ywgt[1] + t_trk->drdp[1][2] * vk->FVC.ywgt[2];
540 t_trk->tt[0] -= drdpy[0][0]*vk->FVC.rv0[0] + drdpy[1][0]*vk->FVC.rv0[1];
541 t_trk->tt[1] -= drdpy[0][1]*vk->FVC.rv0[0] + drdpy[1][1]*vk->FVC.rv0[1];
542 t_trk->tt[2] -= drdpy[0][2]*vk->FVC.rv0[0] + drdpy[1][2]*vk->FVC.rv0[1];
543 for (ii = 1; ii <= 3; ++ii) { /* Matrix dR/dQi*Y*dR/dV */
544 for (jj = 1; jj <= 3; ++jj) {
545 pyv[jj-1][ii-1] = drdpy[0][ii-1] * cvder_ref(1, jj) + drdpy[1][ii-1] * cvder_ref(2, jj);
546 }
547 }
548 }
549
550 /* summation of (deriv1)t * weight * (deriv1) to matrix WA */
551 wa[0] += dw11 * d11 + dw12 * d21 + dw14 * d41;
552 wa[1] += dw11 * d12 + dw12 * d22 + dw14 * d42;
553 wa[2] += dw21 * d12 + dw22 * d22 + dw24 * d42;
554 wa[3] += dw12;
555 wa[4] += dw22;
556 wa[5] += dw32;
557 vk->wa[0] = vk->wa[0] + dw11 * d11 + dw12 * d21 + dw14 * d41;
558 vk->wa[1] = vk->wa[1] + dw11 * d12 + dw12 * d22 + dw14 * d42;
559 vk->wa[2] = vk->wa[2] + dw21 * d12 + dw22 * d22 + dw24 * d42;
560 vk->wa[3] += dw12;
561 vk->wa[4] += dw22;
562 vk->wa[5] += dw32;
563
564 /* computation of matrix WB = (deriv1)t * weight * (deriv2) */
565 twb[0] = dw12 * e21 + dw13;
566 twb[1] = dw22 * e21 + dw23;
567 twb[2] = dw32 * e21 + dw33;
568 twb[3] = dw11 * e12 + dw12 * e22 + dw14;
569 twb[4] = dw21 * e12 + dw22 * e22 + dw24;
570 twb[5] = dw31 * e12 + dw32 * e22 + dw34;
571 twb[6] = dw11 * e13 + dw12 * e23 + dw14 * e43 + dw15;
572 twb[7] = dw21 * e13 + dw22 * e23 + dw24 * e43 + dw25;
573 twb[8] = dw31 * e13 + dw32 * e23 + dw34 * e43 + dw35;
574 if ( vk->passNearVertex ) {
575 twb[0] += pyv[0][0];
576 twb[1] += pyv[1][0];
577 twb[2] += pyv[2][0];
578 twb[3] += pyv[0][1];
579 twb[4] += pyv[1][1];
580 twb[5] += pyv[2][1];
581 twb[6] += pyv[0][2];
582 twb[7] += pyv[1][2];
583 twb[8] += pyv[2][2];
584 }
585
586 /* computation of matrix WC = (deriv2)t * weight * (deriv2) */
587 vk->tmpArr[kt]->wc[0] = ew12 * e21 + ew13;
588 vk->tmpArr[kt]->wc[1] = ew22 * e21 + ew23;
589 vk->tmpArr[kt]->wc[3] = ew32 * e21 + ew33;
590 vk->tmpArr[kt]->wc[2] = ew21 * e12 + ew22 * e22 + ew24;
591 vk->tmpArr[kt]->wc[4] = ew31 * e12 + ew32 * e22 + ew34;
592 vk->tmpArr[kt]->wc[5] = ew31 * e13 + ew32 * e23 + ew34 * e43 + ew35;
593
594 /* computation of matrices WCI = (WC)**(-1) and WBCI = WB * WCI */
595 IERR=cfdinv(&(vk->tmpArr[kt]->wc[0]), twci, -3);
596 if (IERR) {IERR=cfdinv(&(vk->tmpArr[kt]->wc[0]), twci, 3);}
597 if (IERR) return IERR;
598
599
600 twbci[0] = twb[0]*twci[0] + twb[3]*twci[1] + twb[6]*twci[3];
601 twbci[1] = twb[1]*twci[0] + twb[4]*twci[1] + twb[7]*twci[3];
602 twbci[2] = twb[2]*twci[0] + twb[5]*twci[1] + twb[8]*twci[3];
603 twbci[3] = twb[0]*twci[1] + twb[3]*twci[2] + twb[6]*twci[4];
604 twbci[4] = twb[1]*twci[1] + twb[4]*twci[2] + twb[7]*twci[4];
605 twbci[5] = twb[2]*twci[1] + twb[5]*twci[2] + twb[8]*twci[4];
606 twbci[6] = twb[0]*twci[3] + twb[3]*twci[4] + twb[6]*twci[5];
607 twbci[7] = twb[1]*twci[3] + twb[4]*twci[4] + twb[7]*twci[5];
608 twbci[8] = twb[2]*twci[3] + twb[5]*twci[4] + twb[8]*twci[5];
609
610 /* subtraction of WBCI * (WB)t from matrix WA */
611 wa[0] = wa[0] - twbci[0]*twb[0] - twbci[3]*twb[3] - twbci[6]*twb[6];
612 wa[1] = wa[1] - twbci[0]*twb[1] - twbci[3]*twb[4] - twbci[6]*twb[7];
613 wa[2] = wa[2] - twbci[1]*twb[1] - twbci[4]*twb[4] - twbci[7]*twb[7];
614 wa[3] = wa[3] - twbci[0]*twb[2] - twbci[3]*twb[5] - twbci[6]*twb[8];
615 wa[4] = wa[4] - twbci[1]*twb[2] - twbci[4]*twb[5] - twbci[7]*twb[8];
616 wa[5] = wa[5] - twbci[2]*twb[2] - twbci[5]*twb[5] - twbci[8]*twb[8];
617
618 /* subtraction of WBCI * TT from vector TV */
619 tv[0] = tv[0] - twbci[0] * vk->tmpArr[kt]->tt[0] - twbci[3] * vk->tmpArr[kt]->tt[1] - twbci[6] * vk->tmpArr[kt]->tt[2];
620 tv[1] = tv[1] - twbci[1] * vk->tmpArr[kt]->tt[0] - twbci[4] * vk->tmpArr[kt]->tt[1] - twbci[7] * vk->tmpArr[kt]->tt[2];
621 tv[2] = tv[2] - twbci[2] * vk->tmpArr[kt]->tt[0] - twbci[5] * vk->tmpArr[kt]->tt[1] - twbci[8] * vk->tmpArr[kt]->tt[2];
622 //Save to vertex ....
623 for( int tpn=0; tpn<9; tpn++){
624 vk->tmpArr[kt]->wb[tpn] = twb[tpn];
625 if(tpn<6)vk->tmpArr[kt]->wci[tpn] = twci[tpn];
626 vk->tmpArr[kt]->wbci[tpn] = twbci[tpn];
627 }
628 }
629 if (vk->useApriorVertex) {
630 for (ic = 0; ic < 3; ++ic) { xyzt[ic] = vk->apriorV[ic] - vk->refIterV[ic] - xyz[ic];}
631 for (ic = 0; ic < 6; ++ic) {wgtvrtd[ic] = vk->apriorVWGT[ic];}
632 wa[0] += wgtvrtd[0];
633 wa[1] += wgtvrtd[1];
634 wa[2] += wgtvrtd[2];
635 wa[3] += wgtvrtd[3];
636 wa[4] += wgtvrtd[4];
637 wa[5] += wgtvrtd[5];
638 vk->wa[0] += wgtvrtd[0];
639 vk->wa[1] += wgtvrtd[1];
640 vk->wa[2] += wgtvrtd[2];
641 vk->wa[3] += wgtvrtd[3];
642 vk->wa[4] += wgtvrtd[4];
643 vk->wa[5] += wgtvrtd[5];
644 tv[0] = tv[0] + xyzt[0] * wgtvrtd[0] + xyzt[1] * wgtvrtd[1] + xyzt[2] * wgtvrtd[3];
645 tv[1] = tv[1] + xyzt[0] * wgtvrtd[1] + xyzt[1] * wgtvrtd[2] + xyzt[2] * wgtvrtd[4];
646 tv[2] = tv[2] + xyzt[0] * wgtvrtd[3] + xyzt[1] * wgtvrtd[4] + xyzt[2] * wgtvrtd[5];
647 stv[0] = stv[0] + xyzt[0] * wgtvrtd[0] + xyzt[1] * wgtvrtd[1] + xyzt[2] * wgtvrtd[3];
648 stv[1] = stv[1] + xyzt[0] * wgtvrtd[1] + xyzt[1] * wgtvrtd[2] + xyzt[2] * wgtvrtd[4];
649 stv[2] = stv[2] + xyzt[0] * wgtvrtd[3] + xyzt[1] * wgtvrtd[4] + xyzt[2] * wgtvrtd[5];
650 }
651 //Save T vector(see Billoir...)
652 vk->T[0]=stv[0]; vk->T[1]=stv[1]; vk->T[2]=stv[2];
653
654 //std::cout<<" newwa="<<wa[0]<<", "<<wa[1]<<", "<<wa[2]<<", "<<wa[3]<<", "<<wa[4]<<", "<<wa[5]<<'\n';
655
656 /* solution of the linear system */
657 if ( !vk->passNearVertex ) { /* No correction for these constraints */
658 /* because solution is calculated with full error matrix*/
659 if( vk->ConstraintList.empty()){
660 double EigThreshold = 1.e-9;
661 vkGetEigVal(wa, eigv, 3);
662 if (eigv[0] < eigv[2] * EigThreshold) {
663 wa[0] += (eigv[2] * EigThreshold - eigv[0]);
664 wa[2] += (eigv[2] * EigThreshold - eigv[0]);
665 wa[5] += (eigv[2] * EigThreshold - eigv[0]);
666 }
667 }else{
668 vkGetEigVal(vk->wa, eigv, 3);
669 wa[0] += eigv[2] * 1.e-12; //Permanent addition works better than addition
670 wa[2] += eigv[2] * 1.e-12; // for small eigenvalues only.
671 wa[5] += eigv[2] * 1.e-12;
672 vk->wa[0] += eigv[2] * 1.e-12; //Permanent addition works better than addition
673 vk->wa[2] += eigv[2] * 1.e-12; // for small eigenvalues only.
674 vk->wa[5] += eigv[2] * 1.e-12;
675 }
676 }
677
678 /* covariance matrix on vertex coordinates */
679 for(ii=0; ii<6; ii++) {if(std::isnan(wa[ii])) return -2;} // Matrix inversion failed
680 if(wa[0]<0 || wa[2]<0 || wa[5]<0) return -2; // Matrix elements must be positive!
681 IERR=cfdinv(wa, &(vk->fitVcov[0]), -3);
682 if (IERR) {IERR=cfdinv(wa, &(vk->fitVcov[0]), 3);} // last safety
683 if ( !vk->passNearVertex ) { if (IERR) return IERR; } // If nothing helps - detect failure (not for passNearVertex!!!)
684 else {vk->fitVcov[0]=1.;vk->fitVcov[1]=0;vk->fitVcov[2]=1.;vk->fitVcov[3]=0;vk->fitVcov[4]=0;vk->fitVcov[5]=1;}
685
686 /* corrections to vertex coordinates */
687 dxyz[0] = vk->fitVcov[0]*tv[0] + vk->fitVcov[1]*tv[1] + vk->fitVcov[3]*tv[2];
688 dxyz[1] = vk->fitVcov[1]*tv[0] + vk->fitVcov[2]*tv[1] + vk->fitVcov[4]*tv[2];
689 dxyz[2] = vk->fitVcov[3]*tv[0] + vk->fitVcov[4]*tv[1] + vk->fitVcov[5]*tv[2];
690 for (j = 0; j < 3; ++j) {
691 vk->dxyz0[j] = dxyz[j];
692 vk->fitV[j] = xyzf[j] = vk->iniV[j] + dxyz[j];
693 }
694 //std::cout<< "NVertex Old="<<vk->iniV[0]<<", "<<vk->iniV[1]<<", "<<vk->iniV[2]<<" CloseV="<<vk->passNearVertex<<'\n';
695 //std::cout<<__func__<<":NVertex shift="<<dxyz[0]<<", "<<dxyz[1]<<", "<<dxyz[2]<<'\n';
696
697
698
699
700
701 /*-----------------------------------------------------------*/
702 /* corrections to track parameters and covariance matrices */
703
704 for (kt = 0; kt < NTRK; ++kt) { /* variation on PAR is WCI * TT - (WBCI)t * DXYZ */
705 for( int tpn=0; tpn<9; tpn++){
706 if(tpn<6)twci[tpn] = vk->tmpArr[kt]->wci[tpn];
707 twbci[tpn] = vk->tmpArr[kt]->wbci[tpn];
708 }
709 double tt1=vk->tmpArr[kt]->tt[0];
710 double tt2=vk->tmpArr[kt]->tt[1];
711 double tt3=vk->tmpArr[kt]->tt[2];
712 vk->tmpArr[kt]->parf0[0] = twci[0]*tt1 + twci[1]*tt2 + twci[3]*tt3 - twbci[0]*dxyz[0] - twbci[1]*dxyz[1] - twbci[2]*dxyz[2];
713 if( !std::isfinite(vk->tmpArr[kt]->parf0[0]) ) return -19; // Rare FPE presumably seen in trigger
714 vk->tmpArr[kt]->parf0[1] = twci[1]*tt1 + twci[2]*tt2 + twci[4]*tt3 - twbci[3]*dxyz[0] - twbci[4]*dxyz[1] - twbci[5]*dxyz[2];
715 if( !std::isfinite(vk->tmpArr[kt]->parf0[1]) ) return -19; // Rare FPE presumably seen in trigger
716 vk->tmpArr[kt]->parf0[2] = twci[3]*tt1 + twci[4]*tt2 + twci[5]*tt3 - twbci[6]*dxyz[0] - twbci[7]*dxyz[1] - twbci[8]*dxyz[2];
717 if( !std::isfinite(vk->tmpArr[kt]->parf0[2]) ) return -19; // Rare FPE presumably seen in trigger
718 if( (vk->TrackList[kt]->iniP[2] + vk->tmpArr[kt]->parf0[2]) * vk->TrackList[kt]->iniP[2] < 0 ){
719 vk->tmpArr[kt]->parf0[2]= - vk->TrackList[kt]->iniP[2]/4.; } // VK 15.12.2009 - Protection against change of sign
720 vk->TrackList[kt]->fitP[0] = vk->TrackList[kt]->iniP[0] + vk->tmpArr[kt]->parf0[0];
721 vk->TrackList[kt]->fitP[1] = vk->TrackList[kt]->iniP[1] + vk->tmpArr[kt]->parf0[1];
722 vk->TrackList[kt]->fitP[2] = vk->TrackList[kt]->iniP[2] + vk->tmpArr[kt]->parf0[2];
723 //std::cout<<__func__<<":NTrack shift="<<vk->tmpArr[kt]->parf0[0]<<", "<<vk->tmpArr[kt]->parf0[1]<<", "
724 // <<vk->tmpArr[kt]->parf0[2]<<'\n';
725 }
726 /* ------------------------------------------------------------ */
727 /* The same solution but through full matrix */
728 /* ------------------------------------------------------------ */
729 if ( vk->passNearVertex ) {
730 //std::cout <<" Std="<<vk->dxyz0[0]<<", "<<vk->dxyz0[1]<<", "<<vk->dxyz0[2]<<'\n';
731 stv[0] = stv[0] - drdvy[0][0] * vk->FVC.rv0[0] - drdvy[1][0] * vk->FVC.rv0[1];
732 stv[1] = stv[1] - drdvy[0][1] * vk->FVC.rv0[0] - drdvy[1][1] * vk->FVC.rv0[1];
733 stv[2] = stv[2] - drdvy[0][2] * vk->FVC.rv0[0] - drdvy[1][2] * vk->FVC.rv0[1];
734 //Save T vector(see Billoir...)
735 vk->T[0]=stv[0];vk->T[1]=stv[1];vk->T[2]=stv[2];
736 //
737 vk->wa[0] += vyv[0][0];
738 vk->wa[1] += vyv[1][0];
739 vk->wa[2] += vyv[1][1];
740 vk->wa[3] += vyv[2][0];
741 vk->wa[4] += vyv[2][1];
742 vk->wa[5] += vyv[2][2];
743 FullMTXfill(vk, vk->ader);
744 if ( vk->passNearVertex ) {
745 for (it = 1; it <= NTRK; ++it) {
746 drdpy[0][0] = vk->tmpArr[it-1]->drdp[0][0] * vk->FVC.ywgt[0] + vk->tmpArr[it-1]->drdp[1][0] * vk->FVC.ywgt[1];
747 drdpy[1][0] = vk->tmpArr[it-1]->drdp[0][0] * vk->FVC.ywgt[1] + vk->tmpArr[it-1]->drdp[1][0] * vk->FVC.ywgt[2];
748 drdpy[0][1] = vk->tmpArr[it-1]->drdp[0][1] * vk->FVC.ywgt[0] + vk->tmpArr[it-1]->drdp[1][1] * vk->FVC.ywgt[1];
749 drdpy[1][1] = vk->tmpArr[it-1]->drdp[0][1] * vk->FVC.ywgt[1] + vk->tmpArr[it-1]->drdp[1][1] * vk->FVC.ywgt[2];
750 drdpy[0][2] = vk->tmpArr[it-1]->drdp[0][2] * vk->FVC.ywgt[0] + vk->tmpArr[it-1]->drdp[1][2] * vk->FVC.ywgt[1];
751 drdpy[1][2] = vk->tmpArr[it-1]->drdp[0][2] * vk->FVC.ywgt[1] + vk->tmpArr[it-1]->drdp[1][2] * vk->FVC.ywgt[2];
752 for (jt = 1; jt <= NTRK; ++jt) { /* Matrix */
753 for (k = 0; k < 3; ++k) {
754 for (l = 0; l < 3; ++l) {
755 dpipj[k][l] = 0.;
756 for (j = 0; j < 2; ++j) {
757 dpipj[k][l] += vk->tmpArr[jt-1]->drdp[j][k] * drdpy[j][l];
758 }
759 }
760 }
761 for (k = 1; k <= 3; ++k) {
762 for (l = 1; l <= 3; ++l) {
763 ader_ref(it * 3 + k, jt * 3 + l) += dpipj[l-1][k-1];
764 }
765 }
766 }
767 }
768 }
769 //VK 27-Sep-2006 Add eigenvalue limitation for 7,8,9,10,13,14 constraints
770 double ArrTmp[9]; int ktmp=0;
771 for (k=1; k<=3; ++k) {
772 for (l=1; l<=k; ++l) { ArrTmp[ktmp++] = ader_ref(k,l); }}
773 vkGetEigVal(ArrTmp, eigv, 3);
774 double EigAddon=0.;
775 if( eigv[0]<0 ){EigAddon=eigv[0];}
776 for (k = 1; k <=3; ++k) {
777 ader_ref(k,k) = ader_ref(k,k) - EigAddon + eigv[2] * 1.e-18 ;
778 }
779 //----------------------------------------------------------------------------------
780 long int NParam = NTRK*3 + 3;
781 dsinv(NParam, vk->ader, vkalNTrkM*3+3, &IERR);
782 if ( IERR) return IERR;
783 double *fortst = new double[vkalNTrkM*3+3];
784 for (j = 0; j < 3; ++j) {
785 fortst[j] = stv[j];
786 for (ii=0; ii<NTRK; ++ii) { fortst[ii*3 +3 +j] = vk->tmpArr[ii]->tt[j];}
787 }
788 for (j=0; j<3; ++j) {
789 dxyz[j] = 0.;
790 for (ii=0; ii<NParam; ++ii) {dxyz[j] += ader_ref(j+1, ii+1) * fortst[ii];}
791 vk->dxyz0[j] = dxyz [j];
792 vk->fitV[j] = vk->iniV[j] + dxyz[j];
793 }
794 double tparf0[3]={0.};
795 for (it = 1; it <= NTRK; ++it) {
796 TWRK* t_trk=vk->tmpArr[it-1].get();
797 for (j=0; j<3; ++j) {
798 tparf0[j] = 0.;
799 for (ii = 1; ii <= NParam; ++ii) { tparf0[j] += ader_ref(it*3+j+1, ii)*fortst[ii-1];}
800 }
801 for (j=0; j<3; ++j) { t_trk->parf0[j] = tparf0[j];
802 vk->TrackList[it-1]->fitP[j] = vk->TrackList[it-1]->iniP[j] + tparf0[j];}
803 }
804 vk->fitVcov[0] = ader_ref(1, 1);
805 vk->fitVcov[1] = ader_ref(2, 1);
806 vk->fitVcov[2] = ader_ref(2, 2);
807 vk->fitVcov[3] = ader_ref(3, 1);
808 vk->fitVcov[4] = ader_ref(3, 2);
809 vk->fitVcov[5] = ader_ref(3, 3);
810 delete[] fortst;
811
812 //std::cout<< "NVertex Full="<<vk->fitV[0]<<", "<<vk->fitV[1]<<", "<<vk->fitV[2]<<'\n';
813 //std::cout<< "NVertex Full shft="<<dxyz[0]<<", "<<dxyz[1]<<", "<<dxyz[2]<<'\n';
814 //double *tmpA=new double[3+3*NTRK+20];
815 //IERR = FullMCNSTfill( vk, vk->ader, tmpA);
816 //delete[] tmpA;
817 }
818 /* ------------------------------------------------------------ */
819 /* End of the solution with full matrix */
820 /* */
821 /* Now constraints */
822 /* ------------------------------------------------------------ */
823 double dCoefNorm = 0;
824 if ( !vk->ConstraintList.empty()) {
825 IERR = vtcfitc( vk );
826 if (IERR != 0) return IERR;
832 double* tmpB=new double[3+3*NTRK]; double* tmpA=new double[3+3*NTRK];
833 for (ii=0; ii<3; ++ii) {
834 tmpA[ii] = vk->fitV[ii] - vk->iniV[ii];
835 tmpB[ii] = vk->dxyz0[ii];
836 }
837 for ( it=0; it<NTRK; ++it) {
838 tmpA[0 +3*it+3] = vk->TrackList[it]->fitP[0] - vk->TrackList[it]->iniP[0];
839 tmpA[1 +3*it+3] = vk->TrackList[it]->fitP[1] - vk->TrackList[it]->iniP[1];
840 tmpA[2 +3*it+3] = vk->TrackList[it]->fitP[2] - vk->TrackList[it]->iniP[2];
841 tmpB[0 +3*it+3] = vk->tmpArr[it]->parf0[0];
842 tmpB[1 +3*it+3] = vk->tmpArr[it]->parf0[1];
843 tmpB[2 +3*it+3] = vk->tmpArr[it]->parf0[2];
844 }
845 double scalAA=0., scalAB=0.;
846 for (ii=0; ii<3+3*NTRK; ii++) scalAA += tmpA[ii]*tmpA[ii];
847 for (ii=0; ii<3+3*NTRK; ii++) scalAB += tmpA[ii]*tmpB[ii];
848 if(scalAB != 0.) dCoefNorm = -scalAA/scalAB;
849 //double scalCC;
850 //for (ii=0; ii<3+3*NTRK; ii++) scalCC += (tmpA[ii]+dCoefNorm*tmpB[ii])*(tmpA[ii]+dCoefNorm*tmpB[ii]); // Length of perp vector
851 delete[] tmpA; delete[] tmpB;
852
853 //std::cout<<"VRTOLD="<<vk->fitV[0] - vk->iniV[0]<<", "<<vk->fitV[1] - vk->iniV[1]<<", "
854 // <<vk->fitV[2] - vk->iniV[2]<<'\n';
855 //for ( it=0; it<NTRK; ++it) std::cout<<"TRKOLD="<<vk->TrackList[it]->fitP[0] - vk->TrackList[it]->iniP[0]<<", "
856 // <<vk->TrackList[it]->fitP[1] - vk->TrackList[it]->iniP[1]<<", "
857 // <<vk->TrackList[it]->fitP[2] - vk->TrackList[it]->iniP[2]<<'\n';
858 //tmpA=new double[3+3*NTRK+20];
859 //IERR = FullMCNSTfill( vk, vk->ader, tmpA);
860 //delete[] tmpA;
861 }
862
863 /* chi2 with fitted values */
864
865 for (it = 0; it < NTRK; ++it) { //Check if curvature sign is changed or change in Pt is too big
866 if(vk->TrackList[it]->Id >= 0){
867 double Ratio=vk->TrackList[it]->fitP[2]/vk->TrackList[it]->Perig[4]; if(std::abs(Ratio)<1.)Ratio=1./Ratio;
868 if(Ratio<0. || Ratio > vkalAllowedPtChange ){
869 if(std::abs(vk->TrackList[it]->fitP[2])<std::abs(vk->TrackList[it]->Perig[4]) || Ratio<0 ){
870 vk->TrackList[it]->fitP[2]=vk->TrackList[it]->Perig[4]/vkalAllowedPtChange;
871 }else{
872 vk->TrackList[it]->fitP[2]=vk->TrackList[it]->Perig[4]*vkalAllowedPtChange;
873 }
874 }
875 }
876 }
877 //--Additional iterations along shift direction
878 bool improved=makePostFit( vk , wgtvrtd, dCoefNorm);
879 if(!improved)improved=makePostFit( vk , wgtvrtd, dCoefNorm); //Step truncation doesn't help. Make second pass
880 if(!improved)vk->truncatedStep=true;
881
882 //-- If no additional iterations (for tests)
883 //makeNoPostFit( vk , wgtvrtd, dCoefNorm);
884
885
886 return 0;
887
888}
#define vkalAllowedPtChange
Definition CommonPars.h:25
#define cvder_ref(a_1, a_2)
double parf0[3]
double drdp[2][3]
double a0() const
double z() const
double invR() const
double phi() const
double theta() const
int vtcfitc(VKVertex *vk)
Definition VtCFitC.cxx:16

◆ vtcfitc()

int Trk::vtcfitc ( VKVertex * vk)

Definition at line 16 of file VtCFitC.cxx.

17{
18
19 int ii,ic,it,jc,index;
20
21 double tmp[3];
22
23/* -------------------------------------------------------- */
24/* Start of constraint treatment */
25/* -------------------------------------------------------- */
26 long int IERR = 0;
27 long int totNC=0; //total number of constraints
28 long int NTRK = vk->TrackList.size();
29 if (vk->ConstraintList.empty()) {return 0;}
30//
31 double dxyz[3]={vk->dxyz0[0],vk->dxyz0[1],vk->dxyz0[2]}; //nonconstraint vertex shift
32//
33// Extruction of derivatives
34//
35 std::vector<std::vector< const Vect3DF*> > tf0t; // derivative collectors
36 std::vector< const Vect3DF* > th0t; // derivative collectors
37 std::vector< double > taa; // derivative collectors
38 th0t.reserve(vk->ConstraintList.size() * vk->ConstraintList[0]->NCDim);
39 tf0t.reserve(vk->ConstraintList.size());
40
41 for(ii=0; ii<(int)vk->ConstraintList.size();ii++){
42 totNC += vk->ConstraintList[ii]->NCDim;
43 for(ic=0; ic<(int)vk->ConstraintList[ii]->NCDim; ic++){
44 taa.push_back( vk->ConstraintList[ii]->aa[ic] );
45 th0t.push_back( &(vk->ConstraintList[ii]->h0t[ic]) );
46 std::vector< const Vect3DF* > tmpVec;
47 tmpVec.reserve(vk->ConstraintList[ii]->f0t.size());
48 for(it=0; it<(int)vk->ConstraintList[ii]->f0t.size(); it++){
49 tmpVec.push_back( &(vk->ConstraintList[ii]->f0t[it][ic]) );
50 }
51 tf0t.push_back( std::move(tmpVec) );
52 }
53 }
54 if(totNC==0)return 0;
55//
56 std::vector< std::vector<double> > denom;
57 denom.reserve(totNC);
58 for(int ic=0; ic<totNC; ic++) denom.emplace_back( totNC, 0 );
59//
60// Start of calc
61//
62 //This is deliberately written without make_unqiue to bypass auto intialization!!
63 std::unique_ptr< Vect3DF[] > al0( new Vect3DF[ totNC ]);
64 for(ic=0;ic<totNC; ic++){ al0[ic].X=0.; al0[ic].Y=0.; al0[ic].Z=0.;}
65 std::vector<double> anum(totNC,0.);
66 for (ic=0; ic<totNC; ++ic) {
67 for (it = 0; it<NTRK; ++it) {
68
69/* summation of WBCI * F0T into vector AL0 */
70 al0[ic].X += vk->tmpArr[it]->wbci[0] * tf0t[ic][it]->X
71 + vk->tmpArr[it]->wbci[3] * tf0t[ic][it]->Y
72 + vk->tmpArr[it]->wbci[6] * tf0t[ic][it]->Z;
73 al0[ic].Y += vk->tmpArr[it]->wbci[1] * tf0t[ic][it]->X
74 + vk->tmpArr[it]->wbci[4] * tf0t[ic][it]->Y
75 + vk->tmpArr[it]->wbci[7] * tf0t[ic][it]->Z;
76 al0[ic].Z += vk->tmpArr[it]->wbci[2] * tf0t[ic][it]->X
77 + vk->tmpArr[it]->wbci[5] * tf0t[ic][it]->Y
78 + vk->tmpArr[it]->wbci[8] * tf0t[ic][it]->Z;
79
80 anum[ic] += vk->tmpArr[it]->parf0[0] * tf0t[ic][it]->X
81 + vk->tmpArr[it]->parf0[1] * tf0t[ic][it]->Y
82 + vk->tmpArr[it]->parf0[2] * tf0t[ic][it]->Z;
83
84 }
85 al0[ic].X -= th0t[ic]->X;
86 al0[ic].Y -= th0t[ic]->Y;
87 al0[ic].Z -= th0t[ic]->Z;
88 anum[ic] = 2.*anum[ic] + dxyz[0] * 2. * th0t[ic]->X
89 + dxyz[1] * 2. * th0t[ic]->Y
90 + dxyz[2] * 2. * th0t[ic]->Z
91 + taa[ic];
92 }
93
94//std::cout<<" vertex="<<dxyz[0]<<", "<<dxyz[1]<<", "<<dxyz[2]<<'\n';
95//std::cout<<" h0t="<<th0t[0].X<<", "<<th0t[0].Y<<", "<<th0t[0].Z<<'\n';
96//std::cout<<" f0t="<<tf0t[0][0].X<<", "<<tf0t[0][0].Y<<", "<<tf0t[0][0].Z<<'\n';
97//std::cout<<" f0t="<<tf0t[0][1].X<<", "<<tf0t[0][1].Y<<", "<<tf0t[0][1].Z<<'\n';
98
99
100
101/* calculation (AL0)t * VCOV * AL0 and (F0T)t * WCI * F0T */
102 for (ic=0; ic<totNC; ++ic) {
103 for (jc=0; jc<totNC; ++jc) {
104 denom[ic][jc] = al0[ic].X * vk->fitVcov[0] * al0[jc].X
105 + al0[ic].Y * vk->fitVcov[1] * al0[jc].X
106 + al0[ic].Z * vk->fitVcov[3] * al0[jc].X
107 + al0[ic].X * vk->fitVcov[1] * al0[jc].Y
108 + al0[ic].Y * vk->fitVcov[2] * al0[jc].Y
109 + al0[ic].Z * vk->fitVcov[4] * al0[jc].Y
110 + al0[ic].X * vk->fitVcov[3] * al0[jc].Z
111 + al0[ic].Y * vk->fitVcov[4] * al0[jc].Z
112 + al0[ic].Z * vk->fitVcov[5] * al0[jc].Z
113 + al0[jc].X * vk->fitVcov[0] * al0[ic].X
114 + al0[jc].Y * vk->fitVcov[1] * al0[ic].X
115 + al0[jc].Z * vk->fitVcov[3] * al0[ic].X
116 + al0[jc].X * vk->fitVcov[1] * al0[ic].Y
117 + al0[jc].Y * vk->fitVcov[2] * al0[ic].Y
118 + al0[jc].Z * vk->fitVcov[4] * al0[ic].Y
119 + al0[jc].X * vk->fitVcov[3] * al0[ic].Z
120 + al0[jc].Y * vk->fitVcov[4] * al0[ic].Z
121 + al0[jc].Z * vk->fitVcov[5] * al0[ic].Z;
122
123 for (it=0; it<NTRK; ++it) {
124 TWRK * t_trk=vk->tmpArr[it].get();
125 denom[ic][jc] += tf0t[ic][it]->X * t_trk->wci[0] * tf0t[jc][it]->X
126 + tf0t[ic][it]->Y * t_trk->wci[1] * tf0t[jc][it]->X
127 + tf0t[ic][it]->Z * t_trk->wci[3] * tf0t[jc][it]->X
128 + tf0t[ic][it]->X * t_trk->wci[1] * tf0t[jc][it]->Y
129 + tf0t[ic][it]->Y * t_trk->wci[2] * tf0t[jc][it]->Y
130 + tf0t[ic][it]->Z * t_trk->wci[4] * tf0t[jc][it]->Y
131 + tf0t[ic][it]->X * t_trk->wci[3] * tf0t[jc][it]->Z
132 + tf0t[ic][it]->Y * t_trk->wci[4] * tf0t[jc][it]->Z
133 + tf0t[ic][it]->Z * t_trk->wci[5] * tf0t[jc][it]->Z
134 + tf0t[jc][it]->X * t_trk->wci[0] * tf0t[ic][it]->X
135 + tf0t[jc][it]->Y * t_trk->wci[1] * tf0t[ic][it]->X
136 + tf0t[jc][it]->Z * t_trk->wci[3] * tf0t[ic][it]->X
137 + tf0t[jc][it]->X * t_trk->wci[1] * tf0t[ic][it]->Y
138 + tf0t[jc][it]->Y * t_trk->wci[2] * tf0t[ic][it]->Y
139 + tf0t[jc][it]->Z * t_trk->wci[4] * tf0t[ic][it]->Y
140 + tf0t[jc][it]->X * t_trk->wci[3] * tf0t[ic][it]->Z
141 + tf0t[jc][it]->Y * t_trk->wci[4] * tf0t[ic][it]->Z
142 + tf0t[jc][it]->Z * t_trk->wci[5] * tf0t[ic][it]->Z;
143 }
144 }
145 }
146
147/* Solving of system DENOM(i,j)*COEF(j)=ANUM(i) */
148/* for lagrange couplings */
149/*-------------------------------------------------*/
150 //This is deliberately written without make_unqiue to bypass auto intialization!!
151 auto coef = std::unique_ptr<double[]>(new double[totNC]);
152 if (totNC == 1) {
153 if (denom[0][0] != 0.) {
154 coef[0] = anum[0] / denom[0][0];
155 } else {
156 coef[0] = 1.e3;
157 }
158 } else {
159 //This is deliberately written without make_unqiue to bypass auto intialization!!
160 std::unique_ptr<double[]> adenom( new double[totNC*totNC] );
161
162 for (ic=0; ic<totNC; ic++) {
163 for (jc=0; jc<totNC; jc++) {
164 adenom[ic*totNC + jc] = denom[ic][jc];
165 }
166 }
167/* -- INVERT */
168 dsinv(totNC, adenom.get(), totNC, &IERR);
169 if (IERR) {
170 return IERR;
171 }
172 for (ic=0; ic<totNC; ++ic) {
173 coef[ic] = 0.;
174 for (jc=0; jc<totNC; ++jc) {
175 index = ic*totNC + jc;
176 coef[ic] += adenom[index] * anum[jc];
177 }
178 }
179 }
180
181
182/* new vertex */
183 dxyz[0] = 0.;
184 dxyz[1] = 0.;
185 dxyz[2] = 0.;
186
187 //This is deliberately written without make_unqiue to bypass auto intialization!!
188 auto tmpVec = std::unique_ptr<Vect3DF[]>(new Vect3DF[totNC]);
189 for (ic=0; ic<totNC; ++ic) {
190 tmpVec[ic].X = vk->fitVcov[0] * al0[ic].X
191 + vk->fitVcov[1] * al0[ic].Y
192 + vk->fitVcov[3] * al0[ic].Z;
193 tmpVec[ic].Y = vk->fitVcov[1] * al0[ic].X
194 + vk->fitVcov[2] * al0[ic].Y
195 + vk->fitVcov[4] * al0[ic].Z;
196 tmpVec[ic].Z = vk->fitVcov[3] * al0[ic].X
197 + vk->fitVcov[4] * al0[ic].Y
198 + vk->fitVcov[5] * al0[ic].Z;
199 dxyz[0] += coef[ic] * tmpVec[ic].X;
200 dxyz[1] += coef[ic] * tmpVec[ic].Y;
201 dxyz[2] += coef[ic] * tmpVec[ic].Z;
202 }
203 vk->fitV[0] = vk->iniV[0] + vk->dxyz0[0] + dxyz[0];
204 vk->fitV[1] = vk->iniV[1] + vk->dxyz0[1] + dxyz[1];
205 vk->fitV[2] = vk->iniV[2] + vk->dxyz0[2] + dxyz[2];
206
207//std::cout <<"New vrt="<<vk->dxyz0[0]<<", "<<vk->dxyz0[1]<<", "<<vk->dxyz0[2]<<'\n';
208//std::cout<<"Ncntvrt shift="<<dxyz[0]<<", "<<dxyz[1]<<", "<<dxyz[2]<<'\n';
209
210/* new momenta */
211 for (it=0; it<NTRK; ++it) {
212 TWRK * t_trk=vk->tmpArr[it].get();
213 tmp[0] = 0.;
214 tmp[1] = 0.;
215 tmp[2] = 0.;
216 for (ic=0; ic<totNC; ++ic) {
217 tmp[0] += coef[ic] * ( tf0t[ic][it]->X + t_trk->wb[0]*tmpVec[ic].X
218 + t_trk->wb[1]*tmpVec[ic].Y
219 + t_trk->wb[2]*tmpVec[ic].Z);
220 tmp[1] += coef[ic] * ( tf0t[ic][it]->Y + t_trk->wb[3]*tmpVec[ic].X
221 + t_trk->wb[4]*tmpVec[ic].Y
222 + t_trk->wb[5]*tmpVec[ic].Z);
223 tmp[2] += coef[ic] * ( tf0t[ic][it]->Z + t_trk->wb[6]*tmpVec[ic].X
224 + t_trk->wb[7]*tmpVec[ic].Y
225 + t_trk->wb[8]*tmpVec[ic].Z);
226 }
227
228/* calculation WCI * TMP */
229 VKTrack * trk = vk->TrackList[it].get();
230 trk->fitP[0] -= t_trk->wci[0]*tmp[0] + t_trk->wci[1]*tmp[1] + t_trk->wci[3]*tmp[2];
231 trk->fitP[1] -= t_trk->wci[1]*tmp[0] + t_trk->wci[2]*tmp[1] + t_trk->wci[4]*tmp[2];
232 double concor = t_trk->wci[3]*tmp[0] + t_trk->wci[4]*tmp[1] + t_trk->wci[5]*tmp[2];
233 if( (trk->fitP[2] - concor)*trk->fitP[2] < 0) { concor=trk->fitP[2]/4.; } // VK 15.12.2009 - Protection against change of sign
234 trk->fitP[2] -= concor;
235//std::cout<<" Npar="<<trk->fitP[0] <<", "<<trk->fitP[1]<<", "<<trk->fitP[2]<<'\n';
236 }
237/* =================================================================== */
238 return 0;
239}
str index
Definition DeMoScan.py:362
Definition index.py:1

◆ xyztrp()

void Trk::xyztrp ( const long int ich,
double * vrt0,
double * pv0,
double * covi,
double BMAG,
double * paro,
double * errt )

Definition at line 16 of file XYZtrp.cxx.

17{
18 double covd[15],par[5], cnv[36]; /* was [6][6] */
19/* ---------------------------------------------------------- */
20/* Subroutine for convertion */
21/* (X,Y,Z,PX,PY,PZ) --> (eps,z,theta,phi,1/r) */
22/* Now it's used in VKalVrtFitter only */
23/* */
24/* Input: */
25/* ICH - charge of track ( +1,0,-1 ) */
26/* VRT0(3) - Vertex of particle */
27/* PV0(3) - Momentum of particle */
28/* COVI(21) - simmetric covariance matrix */
29/* Output: */
30/* PARO(5) - (eps,z,theta,phi,1/r) */
31/* ERRT(15) - simmetric error matrix */
32/* Reference point for output is (0,0,0) */
33/* For ICH=0 PARO(5) = const/pt */
34/* Propagation is done for NEW track, */
35/* so no TrkID reference established */
36/* Author: V.Kostyukhin */
37/* ---------------------------------------------------------- */
38
39 double constBF =BMAG * vkalMagCnvCst;
40
41 double pt = sqrt(pv0[0]*pv0[0] + pv0[1]*pv0[1]);
42 double pp = pt*pt + pv0[2]*pv0[2]; // p**2
43 double cs = pv0[0] / pt;
44 double sn = pv0[1] / pt;
45 double ctg = pv0[2] / pt;
46 double rho = ich * constBF / pt;
47 if (ich == 0)rho = constBF / pt;
48/* -- Output parameters */
49 par[0] = 0.; /* (-Yv*cos + Xv*sin) */
50 par[1] = 0.; /* Zv - cotth*(Xv*cos + Yv*sin) */
51 par[2] = acos(pv0[2] / sqrt(pp));
52 if(par[2]<1.e-5)par[2]=1.e-5;
53 if(par[2]>M_PI-1.e-5) par[2]=M_PI-1.e-5;
54 par[3] = atan2(pv0[1], pv0[0]);
55 par[4] = rho;
56 if (ich == 0)par[4] = constBF / pt;
57//---
58 double dTheta_dPx = pv0[0]*pv0[2]/(pt*pp); //dTheta/dPx
59 double dTheta_dPy = pv0[1]*pv0[2]/(pt*pp); //dTheta/dPy
60 double dTheta_dPz = -pt/pp; //dTheta/dPz
61 double dPhi_dPx = -pv0[1]/(pt*pt); //dPhi/dPx
62 double dPhi_dPy = pv0[0]/(pt*pt); //dPhi/dPy
63 double dPhi_dPz = 0; //dPhi/dPz
64 double dRho_dPx = -pv0[0]/(pt*pt) * rho; //dInvR/dPx
65 double dRho_dPy = -pv0[1]/(pt*pt) * rho; //dInvR/dPy
66 double dRho_dPz = 0.; //dInvR/dPz
67//---
68 cnv_ref(1, 1) = sn;
69 cnv_ref(2, 1) = -cs;
70 cnv_ref(3, 1) = 0.;
71 cnv_ref(4, 1) = 0.;
72 cnv_ref(5, 1) = 0.;
73 cnv_ref(6, 1) = 0.;
74
75 cnv_ref(1, 2) = -cs * ctg;
76 cnv_ref(2, 2) = -sn * ctg;
77 cnv_ref(3, 2) = 1.;
78 cnv_ref(4, 2) = 0.;
79 cnv_ref(5, 2) = 0.;
80 cnv_ref(6, 2) = 0.;
81
82 cnv_ref(1, 3) = 0.;
83 cnv_ref(2, 3) = 0.;
84 cnv_ref(3, 3) = 0.;
85 cnv_ref(4, 3) = dTheta_dPx;
86 cnv_ref(5, 3) = dTheta_dPy;
87 cnv_ref(6, 3) = dTheta_dPz;
88
89 cnv_ref(1, 4) = 0.;
90 cnv_ref(2, 4) = 0.;
91 if(ich) cnv_ref(1, 4) = -cs * rho; // For charged tracks only
92 if(ich) cnv_ref(2, 4) = -sn * rho; //
93 cnv_ref(3, 4) = 0.;
94 cnv_ref(4, 4) = dPhi_dPx;
95 cnv_ref(5, 4) = dPhi_dPy;
96 cnv_ref(6, 4) = dPhi_dPz;
97
98 cnv_ref(1, 5) = 0.;
99 cnv_ref(2, 5) = 0.;
100 cnv_ref(3, 5) = 0.;
101 cnv_ref(4, 5) = dRho_dPx;
102 cnv_ref(5, 5) = dRho_dPy;
103 cnv_ref(6, 5) = dRho_dPz;
104 tdasatVK(cnv, covi , covd, 5, 6);
105
106/* -- Translation to (0,0,0) (BackPropagation) --*/
107 double Ref0[3]={0.,0.,0.};
108 Trk::vkalPropagator::Propagate(-999, ich, par, covd, vrt0, Ref0, paro, errt, nullptr);
109
110}

Variable Documentation

◆ do_not_delete

template<typename T>
const auto Trk::do_not_delete = [](T*) {}

Definition at line 15 of file SharedDoNoDelete.h.

15{};

◆ MAXNCHAMBERS

int Trk::MAXNCHAMBERS =50
constexpr

Definition at line 38 of file GlobalChi2AlignTool.cxx.

◆ MAXNINDICES

int Trk::MAXNINDICES =50*6
constexpr

Definition at line 39 of file GlobalChi2AlignTool.cxx.

◆ NeutralParametersDim

size_t Trk::NeutralParametersDim = 5
constexpr

Definition at line 24 of file NeutralParameters.h.

◆ TrackParametersDim

size_t Trk::TrackParametersDim = 5
constexpr