CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
FastTrackerRecHitSplitter Class Reference

#include <FastTrackerRecHitSplitter.h>

Public Member Functions

 FastTrackerRecHitSplitter ()
 
void split (const FastTrackerRecHit &hitIn, edm::OwnVector< TrackingRecHit > &hitsOut, bool alongMomentum) const
 
 ~FastTrackerRecHitSplitter ()
 

Private Member Functions

FastSingleTrackerRecHitbuildSplitStripHit (const FastSingleTrackerRecHit &hit) const
 

Detailed Description

Definition at line 12 of file FastTrackerRecHitSplitter.h.

Constructor & Destructor Documentation

◆ FastTrackerRecHitSplitter()

FastTrackerRecHitSplitter::FastTrackerRecHitSplitter ( )
inline

Definition at line 14 of file FastTrackerRecHitSplitter.h.

14 { ; }

◆ ~FastTrackerRecHitSplitter()

FastTrackerRecHitSplitter::~FastTrackerRecHitSplitter ( )
inline

Definition at line 15 of file FastTrackerRecHitSplitter.h.

15 { ; }

Member Function Documentation

◆ buildSplitStripHit()

FastSingleTrackerRecHit* FastTrackerRecHitSplitter::buildSplitStripHit ( const FastSingleTrackerRecHit hit) const
inlineprivate

Definition at line 42 of file FastTrackerRecHitSplitter.h.

42  {
43  FastSingleTrackerRecHit *newHit = hit.clone();
44  newHit->set2D(newHit->detUnit()->type().isEndcap());
45  return newHit;
46  }

References TrackingRecHit::detUnit(), GeomDetType::isEndcap(), FastTrackerRecHit::set2D(), and GeomDet::type().

Referenced by split().

◆ split()

void FastTrackerRecHitSplitter::split ( const FastTrackerRecHit hitIn,
edm::OwnVector< TrackingRecHit > &  hitsOut,
bool  alongMomentum 
) const
inline

Definition at line 17 of file FastTrackerRecHitSplitter.h.

17  {
18  if (hitIn.dimension() == 1 || hitIn.isPixel()) {
19  hitsOut.push_back(hitIn.clone());
20  }
21 
22  else if (hitIn.isProjected()) {
23  hitsOut.push_back(buildSplitStripHit(static_cast<const FastProjectedTrackerRecHit &>(hitIn).originalHit()));
24  }
25 
26  else if (hitIn.isMatched()) {
27  if (alongMomentum) {
28  hitsOut.push_back(buildSplitStripHit((static_cast<const FastMatchedTrackerRecHit &>(hitIn)).firstHit()));
29  hitsOut.push_back(buildSplitStripHit((static_cast<const FastMatchedTrackerRecHit &>(hitIn)).secondHit()));
30  } else {
31  hitsOut.push_back(buildSplitStripHit((static_cast<const FastMatchedTrackerRecHit &>(hitIn)).secondHit()));
32  hitsOut.push_back(buildSplitStripHit((static_cast<const FastMatchedTrackerRecHit &>(hitIn)).firstHit()));
33  }
34  }
35 
36  else {
37  hitsOut.push_back(buildSplitStripHit(static_cast<const FastSingleTrackerRecHit &>(hitIn)));
38  }
39  }

References alongMomentum, buildSplitStripHit(), FastTrackerRecHit::clone(), FastTrackerRecHit::dimension(), BaseTrackerRecHit::isMatched(), FastTrackerRecHit::isPixel(), BaseTrackerRecHit::isProjected(), and edm::OwnVector< T, P >::push_back().

Referenced by TrackCandidateProducer::produce().

BaseTrackerRecHit::isMatched
bool isMatched() const
Definition: BaseTrackerRecHit.h:39
FastTrackerRecHit::set2D
void set2D(bool is2D=true)
Definition: FastTrackerRecHit.h:110
GeomDet::type
virtual const GeomDetType & type() const
Definition: GeomDet.cc:69
FastTrackerRecHitSplitter::buildSplitStripHit
FastSingleTrackerRecHit * buildSplitStripHit(const FastSingleTrackerRecHit &hit) const
Definition: FastTrackerRecHitSplitter.h:42
FastTrackerRecHit::dimension
int dimension() const override
get the dimensions right
Definition: FastTrackerRecHit.h:86
FastSingleTrackerRecHit
Definition: FastSingleTrackerRecHit.h:7
GeomDetType::isEndcap
bool isEndcap() const
Definition: GeomDetType.cc:11
edm::OwnVector::push_back
void push_back(D *&d)
Definition: OwnVector.h:326
BaseTrackerRecHit::isProjected
bool isProjected() const
Definition: BaseTrackerRecHit.h:40
FastTrackerRecHit::isPixel
bool isPixel() const override
pixel or strip?
Definition: FastTrackerRecHit.h:104
TrackingRecHit::detUnit
virtual const GeomDetUnit * detUnit() const
Definition: TrackingRecHit.cc:29
FastTrackerRecHit::clone
FastTrackerRecHit * clone() const override
Definition: FastTrackerRecHit.h:66
alongMomentum
Definition: PropagationDirection.h:4
hit
Definition: SiStripHitEffFromCalibTree.cc:88