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 
9  const LinearizationPointFinder *vf,
11  const TwoBodyDecayEstimator *est)
12  : theVertexFinder(vf->clone()), theLinPointFinder(lpf->clone()), theEstimator(est->clone()) {}
13 
15 
16 const TwoBodyDecay TwoBodyDecayFitter::estimate(const std::vector<reco::TransientTrack> &tracks,
17  const TwoBodyDecayVirtualMeasurement &vm) const {
18  // get geometrical linearization point
20 
21  // create linearized track states
22  std::vector<RefCountedLinearizedTrackState> linTracks;
23  linTracks.push_back(theLinTrackStateFactory.linearizedTrackState(linVertex, tracks[0]));
24  linTracks.push_back(theLinTrackStateFactory.linearizedTrackState(linVertex, tracks[1]));
25 
26  // get full linearization point (geomatrical & kinematical)
27  const TwoBodyDecayParameters linPoint =
29 
30  // make the fit
31  return theEstimator->estimate(linTracks, linPoint, vm);
32 }
33 
34 const TwoBodyDecay TwoBodyDecayFitter::estimate(const std::vector<reco::TransientTrack> &tracks,
35  const std::vector<TrajectoryStateOnSurface> &tsos,
36  const TwoBodyDecayVirtualMeasurement &vm) const {
37  // get geometrical linearization point
38  std::vector<FreeTrajectoryState> freeTrajStates;
39  freeTrajStates.push_back(*tsos[0].freeState());
40  freeTrajStates.push_back(*tsos[1].freeState());
41  GlobalPoint linVertex = theVertexFinder->getLinearizationPoint(freeTrajStates);
42 
43  // create linearized track states
44  std::vector<RefCountedLinearizedTrackState> linTracks;
45  linTracks.push_back(theLinTrackStateFactory.linearizedTrackState(linVertex, tracks[0], tsos[0]));
46  linTracks.push_back(theLinTrackStateFactory.linearizedTrackState(linVertex, tracks[1], tsos[1]));
47 
48  // get full linearization point (geomatrical & kinematical)
49  const TwoBodyDecayParameters linPoint =
51 
52  // make the fit
53  return theEstimator->estimate(linTracks, linPoint, vm);
54 }
DeepCopyPointerByClone< const TwoBodyDecayLinearizationPointFinder > theLinPointFinder
DeepCopyPointerByClone< const LinearizationPointFinder > theVertexFinder
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const override
Definition: config.py:1
TwoBodyDecayFitter(const edm::ParameterSet &config)
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
LinearizedTrackStateFactory theLinTrackStateFactory
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
virtual GlobalPoint getLinearizationPoint(const std::vector< reco::TransientTrack > &) const =0
DeepCopyPointerByClone< const TwoBodyDecayEstimator > theEstimator
virtual ~TwoBodyDecayFitter(void)
virtual const TwoBodyDecay estimate(const std::vector< reco::TransientTrack > &tracks, const TwoBodyDecayVirtualMeasurement &vm) const