CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
KinematicParticleFactoryFromTransientTrack Class Reference

#include <KinematicParticleFactoryFromTransientTrack.h>

Public Member Functions

 KinematicParticleFactoryFromTransientTrack ()
 
 KinematicParticleFactoryFromTransientTrack (KinematicStatePropagator *pr)
 
RefCountedKinematicParticle particle (const KinematicState &kineState, float &chiSquared, float &ndf, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicConstraint *lastConstraint=nullptr) const
 
RefCountedKinematicParticle particle (const reco::TransientTrack &initialTrack, const ParticleMass &massGuess, float chiSquared, float degreesOfFr, const GlobalPoint &expPoint, float m_sigma) const
 
RefCountedKinematicParticle particle (const reco::TransientTrack &initialTrack, const ParticleMass &massGuess, float chiSquared, float degreesOfFr, float &m_sigma) const
 
RefCountedKinematicParticle particle (const reco::TransientTrack &initialTrack, const ParticleMass &massGuess, float chiSquared, float degreesOfFr, float &m_sigma, const FreeTrajectoryState &freestate) const
 
 ~KinematicParticleFactoryFromTransientTrack ()
 

Private Attributes

TransientTrackKinematicStateBuilder builder
 
KinematicStatePropagatorpropagator
 

Detailed Description

.Factory for KinematicParticle RefCountedPointers

Definition at line 16 of file KinematicParticleFactoryFromTransientTrack.h.

Constructor & Destructor Documentation

◆ KinematicParticleFactoryFromTransientTrack() [1/2]

KinematicParticleFactoryFromTransientTrack::KinematicParticleFactoryFromTransientTrack ( )

Default constructoru sing a TrackKinematicStatePropagator

Definition at line 3 of file KinematicParticleFactoryFromTransientTrack.cc.

3  {
5 }

References propagator.

◆ KinematicParticleFactoryFromTransientTrack() [2/2]

KinematicParticleFactoryFromTransientTrack::KinematicParticleFactoryFromTransientTrack ( KinematicStatePropagator pr)

Factory constructor taking a KinematicStatePropagator

Definition at line 7 of file KinematicParticleFactoryFromTransientTrack.cc.

7  {
8  if (pr != nullptr) {
9  propagator = pr->clone();
10  } else {
12  }
13 }

References propagator.

◆ ~KinematicParticleFactoryFromTransientTrack()

KinematicParticleFactoryFromTransientTrack::~KinematicParticleFactoryFromTransientTrack ( )
inline

Default destructor

Definition at line 31 of file KinematicParticleFactoryFromTransientTrack.h.

31 { delete propagator; }

References propagator.

Member Function Documentation

◆ particle() [1/4]

RefCountedKinematicParticle KinematicParticleFactoryFromTransientTrack::particle ( const KinematicState kineState,
float &  chiSquared,
float &  ndf,
ReferenceCountingPointer< KinematicParticle previousParticle,
KinematicConstraint lastConstraint = nullptr 
) const

Particle is consructed directly from its KinematicState, chi2 and related information. If no previous provided, initial and currnt kinemtic states of the particle will match, othereise, initial state will be taken from previous particle.

Definition at line 62 of file KinematicParticleFactoryFromTransientTrack.cc.

67  {
69  KinematicParticle* prp = &(*previousParticle);
70  // FIXME
71  // if(previousParticle.isValid()){
72  TransientTrackKinematicParticle* pr = dynamic_cast<TransientTrackKinematicParticle*>(prp);
73  if (pr == nullptr) {
74  throw VertexException(
75  "KinematicParticleFactoryFromTransientTrack::Previous particle passed is not TransientTrack based!");
76  } else {
77  track = pr->initialTransientTrack();
78  }
79  // }else{track = 0;}
81  kineState, chiSquared, degreesOfFr, lastConstraint, previousParticle, propagator, track));
82 }

References propagator, and HLT_FULL_cff::track.

◆ particle() [2/4]

RefCountedKinematicParticle KinematicParticleFactoryFromTransientTrack::particle ( const reco::TransientTrack initialTrack,
const ParticleMass massGuess,
float  chiSquared,
float  degreesOfFr,
const GlobalPoint expPoint,
float  m_sigma 
) const

Particle is constructed out of corresponding TransientTrack, mass_guess and sigma, chi2 and ndf. KinematicState is then propagated to the given point

Definition at line 46 of file KinematicParticleFactoryFromTransientTrack.cc.

52  {
53  // FreeTrajectoryState st(initialTrack.impactPointTSCP().theState());
54  KinematicState initState = builder(initialTrack.impactPointTSCP().theState(), massGuess, m_sigma, expPoint);
55  const reco::TransientTrack* track = &initialTrack;
56  KinematicConstraint* lastConstraint = nullptr;
57  ReferenceCountingPointer<KinematicParticle> previousParticle = nullptr;
59  initState, chiSquared, degreesOfFr, lastConstraint, previousParticle, propagator, track));
60 }

References builder, reco::TransientTrack::impactPointTSCP(), propagator, TrajectoryStateClosestToPoint::theState(), and HLT_FULL_cff::track.

◆ particle() [3/4]

RefCountedKinematicParticle KinematicParticleFactoryFromTransientTrack::particle ( const reco::TransientTrack initialTrack,
const ParticleMass massGuess,
float  chiSquared,
float  degreesOfFr,
float &  m_sigma 
) const

Particle constructed out of corresponding TransientTrack, mass guess and sigma, chi2 and ndf. KinematicState is created at the point where TransientTrack is defined.

Definition at line 15 of file KinematicParticleFactoryFromTransientTrack.cc.

20  {
21  // cout<<"calling the state builder"<<endl;
22  KinematicState initState = builder(initialTrack, massGuess, m_sigma);
23  const reco::TransientTrack* track = &initialTrack;
24  KinematicConstraint* lastConstraint = nullptr;
25  ReferenceCountingPointer<KinematicParticle> previousParticle = nullptr;
27  initState, chiSquared, degreesOfFr, lastConstraint, previousParticle, propagator, track));
28 }

References builder, propagator, and HLT_FULL_cff::track.

Referenced by BPHKinematicFit::addParticles(), KineExample::analyze(), PFTau3ProngReco::produce(), and ConversionVertexFinder::run().

◆ particle() [4/4]

RefCountedKinematicParticle KinematicParticleFactoryFromTransientTrack::particle ( const reco::TransientTrack initialTrack,
const ParticleMass massGuess,
float  chiSquared,
float  degreesOfFr,
float &  m_sigma,
const FreeTrajectoryState freestate 
) const

Particle constructed out of corresponding TransientTrack, mass guess and sigma, chi2 and ndf. KinematicState is created from the given FreeTrajectoryState

Definition at line 30 of file KinematicParticleFactoryFromTransientTrack.cc.

36  {
37  // cout<<"calling the state builder"<<endl;
38  KinematicState initState = builder(freestate, massGuess, m_sigma);
39  const reco::TransientTrack* track = &initialTrack;
40  KinematicConstraint* lastConstraint = nullptr;
41  ReferenceCountingPointer<KinematicParticle> previousParticle = nullptr;
43  initState, chiSquared, degreesOfFr, lastConstraint, previousParticle, propagator, track));
44 }

References builder, propagator, and HLT_FULL_cff::track.

Member Data Documentation

◆ builder

TransientTrackKinematicStateBuilder KinematicParticleFactoryFromTransientTrack::builder
private

Definition at line 83 of file KinematicParticleFactoryFromTransientTrack.h.

Referenced by particle().

◆ propagator

KinematicStatePropagator* KinematicParticleFactoryFromTransientTrack::propagator
private
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
VertexException
Common base class.
Definition: VertexException.h:12
KinematicState
Definition: KinematicState.h:17
ReferenceCountingPointer< KinematicParticle >
KinematicParticleFactoryFromTransientTrack::builder
TransientTrackKinematicStateBuilder builder
Definition: KinematicParticleFactoryFromTransientTrack.h:83
TrackKinematicStatePropagator
Definition: TrackKinematicStatePropagator.h:17
KinematicConstraint
Definition: KinematicConstraint.h:21
KinematicParticleFactoryFromTransientTrack::propagator
KinematicStatePropagator * propagator
Definition: KinematicParticleFactoryFromTransientTrack.h:82
reco::TransientTrack::impactPointTSCP
TrajectoryStateClosestToPoint impactPointTSCP() const
Definition: TransientTrack.h:96
sipixeldigitoraw
Definition: SiPixelDigiToRaw.cc:39
KinematicParticle
Definition: KinematicParticle.h:21
reco::TransientTrack
Definition: TransientTrack.h:19
TransientTrackKinematicParticle
Definition: TransientTrackKinematicParticle.h:17
TrajectoryStateClosestToPoint::theState
const FreeTrajectoryState & theState() const
Definition: TrajectoryStateClosestToPoint.h:96