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 }
TwoBodyDecayLinearizationPointFinder
Definition: TwoBodyDecayLinearizationPointFinder.h:15
TwoBodyDecayEstimator::estimate
virtual TwoBodyDecay estimate(const std::vector< RefCountedLinearizedTrackState > &linTracks, const TwoBodyDecayParameters &linearizationPoint, const TwoBodyDecayVirtualMeasurement &vm) const
Definition: TwoBodyDecayEstimator.cc:20
TwoBodyDecayFitter::estimate
virtual const TwoBodyDecay estimate(const std::vector< reco::TransientTrack > &tracks, const TwoBodyDecayVirtualMeasurement &vm) const
Definition: TwoBodyDecayFitter.cc:16
TwoBodyDecayFitter::TwoBodyDecayFitter
TwoBodyDecayFitter(const edm::ParameterSet &config)
Definition: TwoBodyDecayFitter.cc:3
LinearizedTrackStateFactory::linearizedTrackState
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const override
Definition: LinearizedTrackStateFactory.cc:9
config
Definition: config.py:1
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
LinearizationPointFinder
Definition: LinearizationPointFinder.h:12
Point3DBase< float, GlobalTag >
TwoBodyDecayVirtualMeasurement
Definition: TwoBodyDecayVirtualMeasurement.h:19
TwoBodyDecayFitter::theLinTrackStateFactory
LinearizedTrackStateFactory theLinTrackStateFactory
Definition: TwoBodyDecayFitter.h:54
edm::ParameterSet
Definition: ParameterSet.h:47
TwoBodyDecayFitter::theLinPointFinder
DeepCopyPointerByClone< const TwoBodyDecayLinearizationPointFinder > theLinPointFinder
Definition: TwoBodyDecayFitter.h:51
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:176
TwoBodyDecayLinearizationPointFinder::getLinearizationPoint
virtual const TwoBodyDecayParameters getLinearizationPoint(const std::vector< RefCountedLinearizedTrackState > &tracks, const double primaryMass, const double secondaryMass) const
Definition: TwoBodyDecayLinearizationPointFinder.cc:6
TwoBodyDecayParameters
Definition: TwoBodyDecayParameters.h:14
TwoBodyDecayFitter::theEstimator
DeepCopyPointerByClone< const TwoBodyDecayEstimator > theEstimator
Definition: TwoBodyDecayFitter.h:52
DefaultLinearizationPointFinder
Definition: DefaultLinearizationPointFinder.h:13
TwoBodyDecayFitter::~TwoBodyDecayFitter
virtual ~TwoBodyDecayFitter(void)
Definition: TwoBodyDecayFitter.cc:14
TwoBodyDecayVirtualMeasurement::primaryMass
const double & primaryMass(void) const
Definition: TwoBodyDecayVirtualMeasurement.h:36
TwoBodyDecayVirtualMeasurement::secondaryMass
const double & secondaryMass(void) const
Definition: TwoBodyDecayVirtualMeasurement.h:38
TwoBodyDecayFitter::theVertexFinder
DeepCopyPointerByClone< const LinearizationPointFinder > theVertexFinder
Definition: TwoBodyDecayFitter.h:50
TwoBodyDecay
Definition: TwoBodyDecay.h:15
LinearizationPointFinder::getLinearizationPoint
virtual GlobalPoint getLinearizationPoint(const std::vector< reco::TransientTrack > &) const =0
TwoBodyDecayFitter.h
TwoBodyDecayEstimator
Definition: TwoBodyDecayEstimator.h:20