CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 17 of file FastTrackerRecHitSplitter.h.

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

Definition at line 18 of file FastTrackerRecHitSplitter.h.

18 {;}

Member Function Documentation

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

Definition at line 56 of file FastTrackerRecHitSplitter.h.

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

Referenced by split().

57  {
58  FastSingleTrackerRecHit * newHit = hit.clone();
59  newHit->set2D(newHit->detUnit()->type().isEndcap());
60  return newHit;
61  }
virtual FastSingleTrackerRecHit * clone() const override
void set2D(bool is2D=true)
virtual const GeomDetType & type() const
Definition: GeomDet.cc:85
bool isEndcap() const
Definition: GeomDetType.cc:18
virtual const GeomDetUnit * detUnit() const
void FastTrackerRecHitSplitter::split ( const FastTrackerRecHit hitIn,
edm::OwnVector< TrackingRecHit > &  hitsOut,
bool  alongMomentum 
) const
inline

Definition at line 20 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().

21  {
22 
23  if(hitIn.dimension()==1 || hitIn.isPixel())
24  {
25  hitsOut.push_back( hitIn.clone() );
26  }
27 
28  else if(hitIn.isProjected())
29  {
30  hitsOut.push_back(buildSplitStripHit(static_cast<const FastProjectedTrackerRecHit &>(hitIn).originalHit()));
31  }
32 
33  else if(hitIn.isMatched())
34  {
35  if(alongMomentum)
36  {
37  hitsOut.push_back(buildSplitStripHit( (static_cast<const FastMatchedTrackerRecHit &>(hitIn)).firstHit()));
38  hitsOut.push_back(buildSplitStripHit( (static_cast<const FastMatchedTrackerRecHit &>(hitIn)).secondHit()));
39  }
40  else
41  {
42  hitsOut.push_back(buildSplitStripHit( (static_cast<const FastMatchedTrackerRecHit &>(hitIn)).secondHit()));
43  hitsOut.push_back(buildSplitStripHit( (static_cast<const FastMatchedTrackerRecHit &>(hitIn)).firstHit()));
44  }
45  }
46 
47  else
48  {
49  hitsOut.push_back(buildSplitStripHit(static_cast<const FastSingleTrackerRecHit &>(hitIn)));
50  }
51  }
virtual FastTrackerRecHit * clone() const override
void push_back(D *&d)
Definition: OwnVector.h:290
FastSingleTrackerRecHit * buildSplitStripHit(const FastSingleTrackerRecHit &hit) const
int dimension() const override
get the dimensions right
bool isPixel() const override
pixel or strip?
bool isProjected() const
bool isMatched() const