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 ( )
inline

Definition at line 14 of file FastTrackerRecHitSplitter.h.

14 { ; }
FastTrackerRecHitSplitter::~FastTrackerRecHitSplitter ( )
inline

Definition at line 15 of file FastTrackerRecHitSplitter.h.

15 { ; }

Member Function Documentation

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

Definition at line 42 of file FastTrackerRecHitSplitter.h.

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

Referenced by split().

42  {
43  FastSingleTrackerRecHit *newHit = hit.clone();
44  newHit->set2D(newHit->detUnit()->type().isEndcap());
45  return newHit;
46  }
void set2D(bool is2D=true)
FastSingleTrackerRecHit * clone() const override
virtual const GeomDetType & type() const
Definition: GeomDet.cc:69
bool isEndcap() const
Definition: GeomDetType.cc:11
virtual const GeomDetUnit * detUnit() const
void FastTrackerRecHitSplitter::split ( const FastTrackerRecHit hitIn,
edm::OwnVector< TrackingRecHit > &  hitsOut,
bool  alongMomentum 
) const
inline

Definition at line 17 of file FastTrackerRecHitSplitter.h.

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

Referenced by TrackCandidateProducer::produce().

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  }
FastTrackerRecHit * clone() const override
void push_back(D *&d)
Definition: OwnVector.h:326
FastSingleTrackerRecHit * buildSplitStripHit(const FastSingleTrackerRecHit &hit) const
int dimension() const override
get the dimensions right
bool isProjected() const
bool isPixel() const override
pixel or strip?
bool isMatched() const