CMS 3D CMS Logo

TwoBodyDecayFitter.cc
Go to the documentation of this file.
2 
4  theVertexFinder( new DefaultLinearizationPointFinder() ),
5  theLinPointFinder( new TwoBodyDecayLinearizationPointFinder( config ) ),
6  theEstimator( new TwoBodyDecayEstimator( config ) ) {}
7 
8 
10  const LinearizationPointFinder* vf,
12  const TwoBodyDecayEstimator* est ) :
13  theVertexFinder( vf->clone() ),
14  theLinPointFinder( lpf->clone() ),
15  theEstimator( est->clone() ) {}
16 
17 
19 
20 
21 const TwoBodyDecay TwoBodyDecayFitter::estimate( const std::vector< reco::TransientTrack >& tracks,
22  const TwoBodyDecayVirtualMeasurement& vm ) const
23 {
24  // get geometrical linearization point
25  GlobalPoint linVertex = theVertexFinder->getLinearizationPoint( tracks );
26 
27  // create linearized track states
28  std::vector< RefCountedLinearizedTrackState > linTracks;
29  linTracks.push_back( theLinTrackStateFactory.linearizedTrackState( linVertex, tracks[0] ) );
30  linTracks.push_back( theLinTrackStateFactory.linearizedTrackState( linVertex, tracks[1] ) );
31 
32  // get full linearization point (geomatrical & kinematical)
34 
35  // make the fit
36  return theEstimator->estimate( linTracks, linPoint, vm );
37 }
38 
39 
40 const TwoBodyDecay TwoBodyDecayFitter::estimate( const std::vector< reco::TransientTrack >& tracks,
41  const std::vector< TrajectoryStateOnSurface >& tsos,
42  const TwoBodyDecayVirtualMeasurement& vm ) const
43 {
44  // get geometrical linearization point
45  std::vector< FreeTrajectoryState > freeTrajStates;
46  freeTrajStates.push_back( *tsos[0].freeState() );
47  freeTrajStates.push_back( *tsos[1].freeState() );
48  GlobalPoint linVertex = theVertexFinder->getLinearizationPoint( freeTrajStates );
49 
50  // create linearized track states
51  std::vector< RefCountedLinearizedTrackState > linTracks;
52  linTracks.push_back( theLinTrackStateFactory.linearizedTrackState( linVertex, tracks[0], tsos[0] ) );
53  linTracks.push_back( theLinTrackStateFactory.linearizedTrackState( linVertex, tracks[1], tsos[1] ) );
54 
55  // get full linearization point (geomatrical & kinematical)
57 
58  // make the fit
59  return theEstimator->estimate( linTracks, linPoint, vm );
60 }
virtual const TwoBodyDecayParameters getLinearizationPoint(const std::vector< RefCountedLinearizedTrackState > &tracks, const double primaryMass, const double secondaryMass) const
virtual TwoBodyDecay estimate(const std::vector< RefCountedLinearizedTrackState > &linTracks, const TwoBodyDecayParameters &linearizationPoint, const TwoBodyDecayVirtualMeasurement &vm) const
DeepCopyPointerByClone< const TwoBodyDecayLinearizationPointFinder > theLinPointFinder
Definition: config.py:1
virtual const TwoBodyDecay estimate(const std::vector< reco::TransientTrack > &tracks, const TwoBodyDecayVirtualMeasurement &vm) const
TwoBodyDecayFitter(const edm::ParameterSet &config)
DeepCopyPointerByClone< const LinearizationPointFinder > theVertexFinder
virtual TwoBodyDecayFitter * clone(void) const
DeepCopyPointerByClone< const TwoBodyDecayEstimator > theEstimator
virtual GlobalPoint getLinearizationPoint(const std::vector< reco::TransientTrack > &) const =0
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const override
LinearizedTrackStateFactory theLinTrackStateFactory
virtual ~TwoBodyDecayFitter(void)