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

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

Referenced by split().

40  {
41  FastSingleTrackerRecHit * newHit = hit.clone();
42  newHit->set2D(newHit->detUnit()->type().isEndcap());
43  return newHit;
44  }
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
virtual FastSingleTrackerRecHit * clone() const
void FastTrackerRecHitSplitter::split ( const FastTrackerRecHit hitIn,
edm::OwnVector< TrackingRecHit > &  hitsOut 
) 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  hitsOut.push_back(buildSplitStripHit(static_cast<const FastMatchedTrackerRecHit &>(hitIn).firstHit()));
29  hitsOut.push_back(buildSplitStripHit(static_cast<const FastMatchedTrackerRecHit &>(hitIn).secondHit()));
30  }
31 
32  else{
33  hitsOut.push_back(buildSplitStripHit(static_cast<const FastSingleTrackerRecHit &>(hitIn)));
34  }
35  }
virtual FastTrackerRecHit * clone() const
int dimension() const
get the dimensions right
void push_back(D *&d)
Definition: OwnVector.h:280
FastSingleTrackerRecHit * buildSplitStripHit(const FastSingleTrackerRecHit &hit) const
bool isProjected() const
bool isPixel() const
pixel or strip?
bool isMatched() const