CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SeedingLayer.cc
Go to the documentation of this file.
2 #include "HitExtractor.h"
3 
4 
5 using namespace ctfseeding;
6 using namespace std;
7 
8 
10 public:
12  const std::string & name,
13  const DetLayer* layer,
14  const TransientTrackingRecHitBuilder * hitBuilder,
15  const HitExtractor * hitExtractor)
16  : theName(name),
17  theLayer(layer),
18  theTTRHBuilder(hitBuilder),
19  theHitExtractor(hitExtractor),
20  theHasPredefinedHitErrors(false),thePredefinedHitErrorRZ(0.),thePredefinedHitErrorRPhi(0.) { }
21 
23  const string & name,
24  const DetLayer* layer,
25  const TransientTrackingRecHitBuilder * hitBuilder,
26  const HitExtractor * hitExtractor,
27  float hitErrorRZ, float hitErrorRPhi)
28  : theName(name), theLayer(layer),
29  theTTRHBuilder(hitBuilder), theHitExtractor(hitExtractor),
30  theHasPredefinedHitErrors(true),
31  thePredefinedHitErrorRZ(hitErrorRZ), thePredefinedHitErrorRPhi(hitErrorRPhi) { }
32 
33  ~SeedingLayerImpl() { delete theHitExtractor; }
34 
36  const edm::EventSetup& es) const { return theHitExtractor->hits(sl,ev,es); }
37 
38  std::string name() const { return theName; }
39 
40  const DetLayer* detLayer() const { return theLayer; }
41  const TransientTrackingRecHitBuilder * hitBuilder() const { return theTTRHBuilder; }
42 
43  bool hasPredefinedHitErrors() const { return theHasPredefinedHitErrors; }
44  float predefinedHitErrorRZ() const { return thePredefinedHitErrorRZ; }
45  float predefinedHitErrorRPhi() const { return thePredefinedHitErrorRPhi; }
46 
47 private:
49 
50 private:
56  float thePredefinedHitErrorRZ, thePredefinedHitErrorRPhi;
57 };
58 
59 
60 
61 
63  const std::string & name,
64  const DetLayer* layer,
65  const TransientTrackingRecHitBuilder * hitBuilder,
66  const HitExtractor * hitExtractor,
67  bool usePredefinedErrors, float hitErrorRZ, float hitErrorRPhi)
68 {
69  SeedingLayerImpl * l = usePredefinedErrors ?
70  new SeedingLayerImpl(name,layer,hitBuilder,hitExtractor,hitErrorRZ,hitErrorRPhi)
71  : new SeedingLayerImpl(name,layer,hitBuilder,hitExtractor);
72  theImpl = boost::shared_ptr<SeedingLayerImpl> (l);
73 }
74 
76 {
77  return theImpl->name();
78 }
79 
81 {
82  return theImpl->detLayer();
83 }
84 
86 {
87  return theImpl->hitBuilder();
88 }
89 
91 {
92  return theImpl->hits( *this,ev,es);
93 }
94 
96 {
97  return theImpl->hasPredefinedHitErrors();
98 }
99 
101 {
102  return theImpl->predefinedHitErrorRZ();
103 }
104 
106 {
107  return theImpl->predefinedHitErrorRPhi();
108 }
float predefinedHitErrorRPhi() const
const DetLayer * detLayer() const
Definition: SeedingLayer.cc:80
const TransientTrackingRecHitBuilder * hitBuilder() const
Definition: SeedingLayer.cc:41
bool hasPredefinedHitErrors() const
Definition: SeedingLayer.cc:95
const TransientTrackingRecHitBuilder * theTTRHBuilder
Definition: SeedingLayer.cc:53
SeedingLayer::Hits hits(const SeedingLayer &sl, const edm::Event &ev, const edm::EventSetup &es) const
Definition: SeedingLayer.cc:35
SeedingLayerImpl(const string &name, const DetLayer *layer, const TransientTrackingRecHitBuilder *hitBuilder, const HitExtractor *hitExtractor, float hitErrorRZ, float hitErrorRPhi)
Definition: SeedingLayer.cc:22
void hits(const edm::Event &ev, const edm::EventSetup &es, Hits &) const
const TransientTrackingRecHitBuilder * hitBuilder() const
Definition: SeedingLayer.cc:85
SeedingLayerImpl(const std::string &name, const DetLayer *layer, const TransientTrackingRecHitBuilder *hitBuilder, const HitExtractor *hitExtractor)
Definition: SeedingLayer.cc:11
float predefinedHitErrorRZ() const
std::string name() const
Definition: SeedingLayer.cc:75
std::vector< TransientTrackingRecHit::ConstRecHitPointer > Hits
Definition: SeedingLayer.h:22