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, int seqNum,
13  const DetLayer* layer,
14  const TransientTrackingRecHitBuilder * hitBuilder,
15  const HitExtractor * hitExtractor)
16  : theName(name),
17  theSeqNum(seqNum),
18  theLayer(layer),
19  theTTRHBuilder(hitBuilder),
20  theHitExtractor(hitExtractor),
21  theHasPredefinedHitErrors(false),thePredefinedHitErrorRZ(0.),thePredefinedHitErrorRPhi(0.) { }
22 
24  const string & name, int seqNum,
25  const DetLayer* layer,
26  const TransientTrackingRecHitBuilder * hitBuilder,
27  const HitExtractor * hitExtractor,
28  float hitErrorRZ, float hitErrorRPhi)
29  : theName(name), theSeqNum(seqNum), theLayer(layer),
30  theTTRHBuilder(hitBuilder), theHitExtractor(hitExtractor),
31  theHasPredefinedHitErrors(true),
32  thePredefinedHitErrorRZ(hitErrorRZ), thePredefinedHitErrorRPhi(hitErrorRPhi) { }
33 
34  ~SeedingLayerImpl() { delete theHitExtractor; }
35 
37  const edm::EventSetup& es) const { return theHitExtractor->hits(sl,ev,es); }
38 
39  std::string name() const { return theName; }
40 
41  int seqNum() const { return theSeqNum; }
42 
43  const DetLayer* detLayer() const { return theLayer; }
44  const TransientTrackingRecHitBuilder * hitBuilder() const { return theTTRHBuilder; }
45 
46  bool hasPredefinedHitErrors() const { return theHasPredefinedHitErrors; }
47  float predefinedHitErrorRZ() const { return thePredefinedHitErrorRZ; }
48  float predefinedHitErrorRPhi() const { return thePredefinedHitErrorRPhi; }
49 
50 private:
52 
53 private:
55  int theSeqNum;
60  float thePredefinedHitErrorRZ, thePredefinedHitErrorRPhi;
61 };
62 
63 
64 
65 
67  const std::string & name, int seqNum,
68  const DetLayer* layer,
69  const TransientTrackingRecHitBuilder * hitBuilder,
70  const HitExtractor * hitExtractor,
71  bool usePredefinedErrors, float hitErrorRZ, float hitErrorRPhi)
72 {
73  SeedingLayerImpl * l = usePredefinedErrors ?
74  new SeedingLayerImpl(name,seqNum,layer,hitBuilder,hitExtractor,hitErrorRZ,hitErrorRPhi)
75  : new SeedingLayerImpl(name,seqNum,layer,hitBuilder,hitExtractor);
76  theImpl = boost::shared_ptr<SeedingLayerImpl> (l);
77 }
78 
80 {
81  return theImpl->name();
82 }
83 
85 {
86  return theImpl->seqNum();
87 }
88 
90 {
91  return theImpl->detLayer();
92 }
93 
95 {
96  return theImpl->hitBuilder();
97 }
98 
100 {
101  return theImpl->hits( *this,ev,es);
102 }
103 
105 {
106  return theImpl->hasPredefinedHitErrors();
107 }
108 
110 {
111  return theImpl->predefinedHitErrorRZ();
112 }
113 
115 {
116  return theImpl->predefinedHitErrorRPhi();
117 }
SeedingLayerImpl(const string &name, int seqNum, const DetLayer *layer, const TransientTrackingRecHitBuilder *hitBuilder, const HitExtractor *hitExtractor, float hitErrorRZ, float hitErrorRPhi)
Definition: SeedingLayer.cc:23
float predefinedHitErrorRPhi() const
const DetLayer * detLayer() const
Definition: SeedingLayer.cc:89
const TransientTrackingRecHitBuilder * hitBuilder() const
Definition: SeedingLayer.cc:44
bool hasPredefinedHitErrors() const
const TransientTrackingRecHitBuilder * theTTRHBuilder
Definition: SeedingLayer.cc:57
SeedingLayer::Hits hits(const SeedingLayer &sl, const edm::Event &ev, const edm::EventSetup &es) const
Definition: SeedingLayer.cc:36
void hits(const edm::Event &ev, const edm::EventSetup &es, Hits &) const
const TransientTrackingRecHitBuilder * hitBuilder() const
Definition: SeedingLayer.cc:94
float predefinedHitErrorRZ() const
std::string name() const
Definition: SeedingLayer.cc:79
std::vector< TransientTrackingRecHit::ConstRecHitPointer > Hits
Definition: SeedingLayer.h:22
SeedingLayerImpl(const std::string &name, int seqNum, const DetLayer *layer, const TransientTrackingRecHitBuilder *hitBuilder, const HitExtractor *hitExtractor)
Definition: SeedingLayer.cc:11
volatile std::atomic< bool > shutdown_flag false