LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
genf Namespace Reference

Generic Interface to magnetic fields in GENFIT. More...

Classes

class  GeaneMCApplication
 
class  GFAbsBField
 
class  GFAbsEnergyLoss
 
class  GFAbsFinitePlane
 
class  GFAbsGeoMatManager
 
class  GFAbsRecoHit
 
class  GFAbsTrackRep
 Base Class for genfit track representations. Defines interface for track parameterizations. More...
 
class  GFBookkeeping
 
class  GFConstField
 
class  GFDaf
 
class  GFDetPlane
 
class  GFEnergyLossBetheBloch
 
class  GFEnergyLossBrems
 
class  GFEnergyLossCoulomb
 
class  GFFieldManager
 
class  GFGeoMatManager
 
class  GFKalman
 
class  GFMaterialEffects
 
class  GFPlanarHitPolicy
 
class  GFRecoHitFactory
 Factory object to create RecoHits from digitized and clustered data. More...
 
class  GFRecoHitIfc
 
class  GFRectFinitePlane
 
class  GFSpacepointHitPolicy
 
class  GFTrack
 
class  GFTrackCand
 
class  GFWireHitPolicy
 policy class for hits in wire detectors (STT and DCH) which do not measure the coordinate along the wire More...
 
class  GFWirepointHitPolicy
 
class  PointHit
 
class  RKTrackRep
 
class  SlTrackRep
 

Typedefs

typedef GFRecoHitIfc< GFSpacepointHitPolicySpacepointRecoHit
 

Functions

bool operator== (const genf::GFDetPlane &, const genf::GFDetPlane &)
 
bool operator!= (const genf::GFDetPlane &, const genf::GFDetPlane &)
 
template<class ROOTOBJ >
std::string ROOTobjectToString (const ROOTOBJ &obj)
 Shortcut to write one ROOT object into a string. More...
 
bool operator== (const genf::GFTrackCand &, const genf::GFTrackCand &)
 
template<class ROOTOBJ >
void PrintROOTobject (std::ostream &, const ROOTOBJ &)
 Small utility functions which print some ROOT objects into an output stream. More...
 
template<>
void PrintROOTobject (std::ostream &, const TVector3 &v)
 Small utility functions which print some ROOT objects into an output stream. More...
 
template<typename T >
void PrintROOTmatrix (std::ostream &out, const TMatrixT< T > &m)
 Small utility functions which print some ROOT objects into an output stream. More...
 

Detailed Description

Generic Interface to magnetic fields in GENFIT.

Track Representation module based on a Runge-Kutta algorithm including a full material model.

policy class for hits in wire detectors (STT and DCH) which can measure the coordinate along the wire

Track candidate – a list of cluster indices.

Track object for genfit. genfit algorithms work on these objects.

Policy class implementing a space point hit geometry.

Concrete implementation of finitie detector plane for rectangles.

RecoHit interface template class. Provides comfortable interface to create RecoHits.

Policy class implementing a planar hit geometry.

Handles energy loss classes. Contains stepper and energy loss/noise matrix calculation.

Generic Kalman Filter implementation.

Material and geometry interface via TGeoMaterial and gGeoManager.

Singleton which provides access to magnetic field for track representations.

Multiple scattering due to coulomb interaction.

Energy loss for electrons/positrons due to bremsstrahlung, energy loss straggeling.

Energy loss for charged particles (Bethe Bloch), energy loss straggeling.

Detector plane genfit geometry class.

Determinstic Annealing Filter (DAF) implementation.

Constant Magnetic field.

Base Class for representing a Hit in GENFIT.

Base class for material and geometry interface.

Abstract base class for implementing arbitrarily shaped finite detector planes.

Base class for energy loss and noise matrix calculation.

Author
Christian Höppner (Technische Universität München, original author)
Sebastian Neubert (Technische Universität München, original author)
Christian Höppner (Technische Universität München, original author)
Sebastian Neubert (Technische Universität München, original author)
Johannes Rauch (Technische Universität München, author)

Finite detector planes could have any shape, e.g. rectangular, trapezoidal, ... Define them by inheriting from this class. Example, see GFRectFinitePlane This is an optional feature for the GFDetPlane class for avoiding fake intersection points in the fitting of loopers.

Author
Christian Höppner (Technische Universität München, original author)
Sebastian Neubert (Technische Universität München, original author)

A hit is defined as a single measurement of a detector. Each detector can define it's own hit representation (geometry) by inherting from GFAbsRecoHit. We call such a child object a "RecoHit" to make clear that it inherits from GFAbsRecoHit. All detector specific information is handled inside the RecoHit objects. The idea behind this is that the fitting algorithms can work on different detectors simultanously.

GFAbsRecoHit defines the basic interface that is used by all genfit algorithms to access hit-measurement information. It provides:

  • the matrices to store hit coordinates and covariances
  • defines methods to access these data
  • the interface to access a hit's detector plane object

All hits have to inherit from this base class. Inheritance can be direct or through template class RecoHitIfc<GeometryPolicy>. These interface classes (defined with a specific policy) provide additional functionality for specific hit geometries, such as space points, wires, etc. For details look at the RecoHitIfc documentation.

A simple example is given in VirtSpacePointRecoHit

Background information: The main feature here is that coordinates and covariances are available as general TMatrixT<Double_t> objects. By using these general algebraic objects it is possible to abstract from the concrete measurement and thus define a unified framework to handle the data. This is a key ingredient for the separation of data and algorithms which in turn enables us to elegantly combine information from different detectors.

Author
Christian Höppner (Technische Universität München, original author)

The DAF is an iterative Kalman filter with annealing. It is capable of fitting tracks which are contaminated with noise hits. The alogrithm is taken from the references R. Fruehwirth & A. Strandlie, Computer Physics Communications 120 (199) 197-214 and CERN thesis: Dissertation by Matthias Winkler.

A detector plane is the principle object to define coordinate systems for track fitting in genfit. Since a particle trajectory is a one-dimensional object (regardless of any specific parameterization) positions with repect to the track are always meassured in a plane.

Which plane is choosen depends on the type of detector. Fixed plane detectors have their detector plane defined by their mechanical setup. While wire chambers or time projection chambers might want to define a detector plane more flexibly.

This class parameterizes a plane in terms of an origin vector o and two plane-spanning directions u and v.

Author
Christian Höppner (Technische Universität München, original author)
Sebastian Neubert (Technische Universität München, original author)

The Kalman Filter operates on genfit GFTrack objects. It is an implementation of the Kalman Filter algebra that uses the genfit interface classes GFAbsRecoHit and GFAbsTrackRep in order to be independent from the specific detector geometry and the details of the track parameterization / track extraoplation engine.

The Kalman Filter can use hits from several detectors in a single fit to estimate the parameters of several track representations in parallel.

Author
Christian Höppner (Technische Universität München, original author)
Sebastian Neubert (Technische Universität München, original author)
Johannes Rauch (Technische Universität München, author)

This class handles the different energy loss classes that inherit from GFAbsEnergyLoss. It provides functionality to limit the stepsize of an extrapolation in order not to exceed a specified maximum momentum loss. After propagation, the energy loss for the given length and (optionally) the noise matrix can be calculated.

Author
Christian Höppner (Technische Universität München, original author)
Sebastian Neubert (Technische Universität München, original author)

RecoHits for planar detectors should inherit from RecoHitIfc<GFPlanarHitPolicy>.

The main feature of this type of hit is, that the detector plane is completely defined by the detector hardware. Derived RecoHits need only to supply the physical detector plane from their geometry database.

Author
Christian Höppner (Technische Universität München, original author)
Sebastian Neubert (Technische Universität München, original author)

This class defines a comfortable interface to create hit classes in genfit. It is a template class. The template parameter is used to specify a certain basic type of hit:

  • GFRecoHitIfc<PlanarHitPolicy> a basic planar hit
  • GFRecoHitIfc<SpacepointHitPolicy> a basic space point hit
  • GFRecoHitIfc<WirepointHitPolicy> a basic hit on a wire

To create a hit for a detector simply inherit from one of the options above and fill in your data. For details look at the respective HitPolicy documentations. You can also directly inherit from GFAbsRecoHit though this is not recommended. If a new hit geometry is needed one should think about implementing a new HitPolicy for this type of hit.

See also
PlanarHitPolicy
SpacepointHitPolicy
WirepointHitPolicy

Implementation details: The actual implementations of the methods declared here can be found in the HitPolicy objects.

Author
Christian Höppner (Technische Universität München, original author)
Sebastian Neubert (Technische Universität München, original author)

RecoHits for detectors measuring 3D space points should inherit from RecoHitIfc<GFSpacepointHitPolicy>.

For a space point the detector plane has to be defined with respect to a track representation. GFSpacepointHitPolicy implements a scheme where the detectorplane is chosen perpendicular to the track. In a track fit only 2 of the three coordinates of a space point are independent (the track is a one-dimensional object). Therefore the 3D data of the hit is used to define a proper detector plane into which the hit coordinates are then projected.

Author
Christian Höppner (Technische Universität München, original author)
Sebastian Neubert (Technische Universität München, original author)

Can be used as transient (only in memory) or persistent (written to ROOT-file) object.

A GFTrack contains a collection of RecoHits plus a collection of track representations. The GFTrackCand member is a helper object to store the indices of the hits in the GFTrack.

For a GFTrack one so called "cardinal representation" can be defined. It is that track representation that is used to access the fit results. Usually one will after the fit choose the best fitting representation to be the cardinal rep.

The GFTrack takes ownership over the GFAbsRecoHit pointers it holds.

Author
Christian Höppner (Technische Universität München, original author)
Sebastian Neubert (Technische Universität München, original author)

The main task of the GFTrackCand object is to store a list of indices to cluster objects. Each cluster in the Track is identified by it's detector ID and it's index in the corresponding TClonesArray. Also there is a ordering parameter rho, to order hits. Optionally, plane indices for the hits can be stored (most importantly for fitting with the GFDaf). This information is used by the RecoHitFactory to automatically load RecoHits into a Track. Through this it is possible to define Tracks over an arbitrary number of different detectors.

In addition GFTrackCand offers members to store starting values for the fit. However this information is not autmatically used in genfit!!!

See also
RecoHitFactory
Author
Christian Höppner (Technische Universität München, original author)
Lia Lavezzi (INFN Pavia, original author)
Sebastian Neubert (Technische Universität München, original author) This policy is not valid for any kind of plane orientation choice: to use it you MUST choose a plane described by u and v axes with v coincident with the wire (and u orthogonal to it, obviously). The hit will be described by 8 coordinates: w_x1, w_y1, w_z1, w_x2, w_y2, w_z2, rdrift, zreco where w_ji (with j = x, y, z and i = 1, 2) are the wire extremities coordinates; rdrift = distance from the wire (u coordinate in the plane) and zreco = coordinate along the wire (in the plane reference frame, v coordinate).
Christian Höppner (Technische Universität München, original author)
Johannes Rauch (Technische Universität München, author)

The Runge Kutta implementation stems from GEANT3 originally (R. Brun et al.). Porting to C goes back to Igor Gavrilenko @ CERN. The code was taken from the Phast analysis package of the COMPASS experiment (Sergei Gerrassimov @ CERN).

Typedef Documentation

Function Documentation

bool genf::operator!= ( const genf::GFDetPlane lhs,
const genf::GFDetPlane rhs 
)

Definition at line 284 of file GFDetPlane.cxx.

284  {
285  return !(lhs == rhs);
286 }
bool genf::operator== ( const genf::GFDetPlane lhs,
const genf::GFDetPlane rhs 
)

this operator is called very often in Kalman filtering. It checks equality of planes by comparing the 9 double values that define them.

Definition at line 265 of file GFDetPlane.cxx.

References DETPLANE_EPSILON, genf::GFDetPlane::fO, genf::GFDetPlane::fU, and genf::GFDetPlane::fV.

265  {
266  if(
267  fabs( (lhs.fO.X()-rhs.fO.X()) ) > DETPLANE_EPSILON ||
268  fabs( (lhs.fO.Y()-rhs.fO.Y()) ) > DETPLANE_EPSILON ||
269  fabs( (lhs.fO.Z()-rhs.fO.Z()) ) > DETPLANE_EPSILON
270  ) return false;
271  else if(
272  fabs( (lhs.fU.X()-rhs.fU.X()) ) > DETPLANE_EPSILON ||
273  fabs( (lhs.fU.Y()-rhs.fU.Y()) ) > DETPLANE_EPSILON ||
274  fabs( (lhs.fU.Z()-rhs.fU.Z()) ) > DETPLANE_EPSILON
275  ) return false;
276  else if(
277  fabs( (lhs.fV.X()-rhs.fV.X()) ) > DETPLANE_EPSILON ||
278  fabs( (lhs.fV.Y()-rhs.fV.Y()) ) > DETPLANE_EPSILON ||
279  fabs( (lhs.fV.Z()-rhs.fV.Z()) ) > DETPLANE_EPSILON
280  ) return false;
281  return true;
282 }
#define DETPLANE_EPSILON
Definition: GFDetPlane.cxx:264
bool genf::operator== ( const genf::GFTrackCand lhs,
const genf::GFTrackCand rhs 
)

Definition at line 87 of file GFTrackCand.cxx.

References genf::GFTrackCand::fDetId, genf::GFTrackCand::fHitId, and genf::GFTrackCand::getNHits().

87  {
88  if(lhs.getNHits()!=rhs.getNHits()) return false;
89  bool result=std::equal(lhs.fDetId.begin(),lhs.fDetId.end(),rhs.fDetId.begin());
90  result &=std::equal(lhs.fHitId.begin(),lhs.fHitId.end(),rhs.fHitId.begin());
91  return result;
92 }
unsigned int getNHits() const
Definition: GFTrackCand.h:116
std::vector< unsigned int > fDetId
Definition: GFTrackCand.h:176
std::vector< unsigned int > fHitId
Definition: GFTrackCand.h:177
template<class ROOTOBJ >
std::string genf::ROOTobjectToString ( const ROOTOBJ &  obj)

Shortcut to write one ROOT object into a string.

Definition at line 118 of file GFException.h.

References PrintROOTobject().

Referenced by trkf::Track3DKalmanSPS::produce().

119  { std::ostringstream sstr; PrintROOTobject(sstr, obj); return sstr.str(); }
void PrintROOTobject(std::ostream &, const TVector3 &v)
Small utility functions which print some ROOT objects into an output stream.
Definition: GFException.cxx:86