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 reverseHits) 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 16 of file FastTrackerRecHitSplitter.h.

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

Definition at line 17 of file FastTrackerRecHitSplitter.h.

17 {;}

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  }
virtual FastSingleTrackerRecHit * clone() const override
void set2D(bool is2D=true)
virtual const GeomDetType & type() const
Definition: GeomDet.cc:90
bool isEndcap() const
Definition: GeomDetType.cc:18
virtual const GeomDetUnit * detUnit() const
void FastTrackerRecHitSplitter::split ( const FastTrackerRecHit hitIn,
edm::OwnVector< TrackingRecHit > &  hitsOut,
bool  reverseHits 
) const
inline

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

19  {
20 
21  if(hitIn.dimension()==1 || hitIn.isPixel())
22  hitsOut.push_back( hitIn.clone() );
23 
24  else if(hitIn.isProjected())
25  hitsOut.push_back(buildSplitStripHit(static_cast<const FastProjectedTrackerRecHit &>(hitIn).originalHit()));
26 
27  else if(hitIn.isMatched()){
28  const FastSingleTrackerRecHit & firstHit = (static_cast<const FastMatchedTrackerRecHit &>(hitIn)).firstHit();
29  const FastSingleTrackerRecHit & secondHit = (static_cast<const FastMatchedTrackerRecHit &>(hitIn)).secondHit();
30  hitsOut.push_back(buildSplitStripHit(reverseHits ? secondHit : firstHit));
31  hitsOut.push_back(buildSplitStripHit(reverseHits ? firstHit : secondHit));
32  }
33 
34  else{
35  hitsOut.push_back(buildSplitStripHit(static_cast<const FastSingleTrackerRecHit &>(hitIn)));
36  }
37  }
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