CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FastTrackerRecHitSplitter.h
Go to the documentation of this file.
1 #ifndef FASTSIMULATION_TRACKING_FASTTRACKERRECHITSPLITTER_H
2 #define FASTSIMULATION_TRACKING_FASTTRACKERRECHITSPLITTER_H
3 
4 #include <vector>
11 
13 
14  public:
15 
18 
19  inline void split(const FastTrackerRecHit & hitIn,edm::OwnVector<TrackingRecHit> & hitsOut) const {
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  }
36 
37 
38  private:
39 
41  FastSingleTrackerRecHit * newHit = hit.clone();
42  newHit->set2D(newHit->detUnit()->type().isEndcap());
43  return newHit;
44  }
45 
46 };
47 
48 #endif
virtual FastTrackerRecHit * clone() const
void set2D(bool is2D=true)
virtual const GeomDetType & type() const
Definition: GeomDet.cc:90
bool isEndcap() const
Definition: GeomDetType.cc:18
int dimension() const
get the dimensions right
void split(const FastTrackerRecHit &hitIn, edm::OwnVector< TrackingRecHit > &hitsOut) const
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
virtual const GeomDetUnit * detUnit() const
virtual FastSingleTrackerRecHit * clone() const