CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RoadMaker.h
Go to the documentation of this file.
1 #ifndef RECOTRACKER_ROADMAKER_H
2 #define RECOTRACKER_ROADMAKER_H
3 
4 //
5 // Package: RecoTracker/RoadMapMakerESProducer
6 // Class: RoadMaker
7 //
8 // Description: Creates a Roads object by combining all
9 // inner and outer SeedRings into RoadSeeds
10 // and determines all Rings of the RoadSet
11 // belonging to the RoadSeeds.
12 //
13 // Original Author: Oliver Gutsche, gutsche@fnal.gov
14 // Created: Thu Jan 12 21:00:00 UTC 2006
15 //
16 // $Author: noeding $
17 // $Date: 2008/02/28 22:11:41 $
18 // $Revision: 1.9 $
19 //
20 
21 #include <vector>
22 #include <string>
23 #include <map>
24 #include <utility>
25 
28 
29 class RoadMaker {
30 
31  public:
32 
37  TIF,
43  };
44 
45  enum SeedingType {
48  };
49 
50  RoadMaker(const Rings *rings,
51  GeometryStructure structure = FullDetector,
52  SeedingType seedingType = FourRingSeeds);
53 
54  ~RoadMaker();
55 
56  void constructRoads();
57 
58  void collectInnerSeedRings();
63 
69 
75 
76  void collectOuterSeedRings();
80 
85 
86  inline Roads* getRoads() { return roads_; }
87 
88  bool RingsOnSameLayer(const Ring *ring1, const Ring* ring2);
89  bool RingsOnSameLayer(std::pair<const Ring *,const Ring *> seed1,
90  std::pair<const Ring *,const Ring *> seed2);
91  bool RingInBarrel(const Ring *ring);
92  std::vector<std::pair<double,double> > LinesThroughRingAndBS(const Ring *ring );
93  std::vector<std::pair<double,double> > LinesThroughRings(const Ring *ring1,
94  const Ring *ring2);
95  bool CompatibleWithLines(std::vector<std::pair<double,double> > lines,
96  const Ring* ring);
99  bool AddRoad(Roads::RoadSeed seed,
101  std::pair<Roads::RoadSeed, Roads::RoadSet> AddInnerSeedRing(std::pair<Roads::RoadSeed, Roads::RoadSet> input);
102  std::pair<Roads::RoadSeed, Roads::RoadSet> AddOuterSeedRing(std::pair<Roads::RoadSeed, Roads::RoadSet> input);
103  bool SameRoadSet(Roads::RoadSet set1, Roads::RoadSet set2 );
104  Roads::RoadSet SortRingsIntoLayers(std::vector<const Ring*> input);
105 
106  private:
107 
108  const Rings *rings_;
109 
113 
114  std::vector<const Ring*> innerSeedRings_;
115  std::vector<const Ring*> innerSeedRings1_;
116  std::vector<const Ring*> innerSeedRings2_;
117  std::vector<const Ring*> outerSeedRings_;
118  std::vector<const Ring*> outerSeedRings1_;
119 
120  float zBS_;
121 
122 };
123 
124 #endif
bool SameRoadSet(Roads::RoadSet set1, Roads::RoadSet set2)
Definition: RoadMaker.cc:2399
~RoadMaker()
Definition: RoadMaker.cc:76
Roads::RoadSeed CloneSeed(Roads::RoadSeed seed)
Definition: RoadMaker.cc:2212
void collectOuterTOBSeedRings1()
Definition: RoadMaker.cc:1680
void collectInnerSeedRings2()
Definition: RoadMaker.cc:930
void collectOuterTECSeedRings()
Definition: RoadMaker.cc:1439
Roads * getRoads()
Definition: RoadMaker.h:86
void collectInnerTIDSeedRings1()
Definition: RoadMaker.cc:712
bool AddRoad(Roads::RoadSeed seed, Roads::RoadSet set)
Definition: RoadMaker.cc:2234
void collectOuterSeedRings()
Definition: RoadMaker.cc:1254
GeometryStructure
Definition: RoadMaker.h:33
void collectInnerTECSeedRings()
Definition: RoadMaker.cc:413
std::vector< const Ring * > innerSeedRings2_
Definition: RoadMaker.h:116
void collectInnerTECSeedRings1()
Definition: RoadMaker.cc:764
SeedingType seedingType_
Definition: RoadMaker.h:112
void collectInnerSeedRings1()
Definition: RoadMaker.cc:613
Definition: Roads.h:34
void collectInnerTIDSeedRings2()
Definition: RoadMaker.cc:1043
std::vector< std::vector< const Ring * > > RoadSet
Definition: Roads.h:39
void collectInnerTOBSeedRings()
Definition: RoadMaker.cc:522
Roads::RoadSet SortRingsIntoLayers(std::vector< const Ring * > input)
Definition: RoadMaker.cc:2452
Definition: Ring.h:31
void collectOuterTIBSeedRings()
Definition: RoadMaker.cc:1286
std::vector< const Ring * > innerSeedRings1_
Definition: RoadMaker.h:115
float zBS_
Definition: RoadMaker.h:120
std::vector< std::pair< double, double > > LinesThroughRings(const Ring *ring1, const Ring *ring2)
Definition: RoadMaker.cc:2094
std::vector< std::pair< double, double > > LinesThroughRingAndBS(const Ring *ring)
Definition: RoadMaker.cc:2067
Definition: Rings.h:27
GeometryStructure structure_
Definition: RoadMaker.h:111
void collectOuterTOBSeedRings()
Definition: RoadMaker.cc:1318
Roads::RoadSet RingsCompatibleWithSeed(Roads::RoadSeed seed)
Definition: RoadMaker.cc:2158
std::pair< Roads::RoadSeed, Roads::RoadSet > AddInnerSeedRing(std::pair< Roads::RoadSeed, Roads::RoadSet > input)
Definition: RoadMaker.cc:2302
void collectInnerTIBSeedRings()
Definition: RoadMaker.cc:292
std::pair< std::vector< const Ring * >, std::vector< const Ring * > > RoadSeed
Definition: Roads.h:38
void collectInnerTIBSeedRings1()
Definition: RoadMaker.cc:644
void collectOuterTECSeedRings1()
Definition: RoadMaker.cc:1805
const Rings * rings_
Definition: RoadMaker.h:108
std::vector< const Ring * > outerSeedRings_
Definition: RoadMaker.h:117
void constructRoads()
Definition: RoadMaker.cc:80
void collectInnerTOBSeedRings2()
Definition: RoadMaker.cc:1178
void collectInnerTECSeedRings2()
Definition: RoadMaker.cc:1095
void collectOuterTIBSeedRings1()
Definition: RoadMaker.cc:1648
std::vector< const Ring * > innerSeedRings_
Definition: RoadMaker.h:114
std::vector< const Ring * > outerSeedRings1_
Definition: RoadMaker.h:118
bool RingsOnSameLayer(const Ring *ring1, const Ring *ring2)
Definition: RoadMaker.cc:1960
bool CompatibleWithLines(std::vector< std::pair< double, double > > lines, const Ring *ring)
Definition: RoadMaker.cc:2129
void collectInnerTIDSeedRings()
Definition: RoadMaker.cc:361
void collectInnerTOBSeedRings1()
Definition: RoadMaker.cc:847
std::pair< Roads::RoadSeed, Roads::RoadSet > AddOuterSeedRing(std::pair< Roads::RoadSeed, Roads::RoadSet > input)
Definition: RoadMaker.cc:2352
Roads * roads_
Definition: RoadMaker.h:110
bool RingInBarrel(const Ring *ring)
Definition: RoadMaker.cc:2032
void collectInnerTIBSeedRings2()
Definition: RoadMaker.cc:966
void collectInnerSeedRings()
Definition: RoadMaker.cc:258
RoadMaker(const Rings *rings, GeometryStructure structure=FullDetector, SeedingType seedingType=FourRingSeeds)
Definition: RoadMaker.cc:41
void collectOuterSeedRings1()
Definition: RoadMaker.cc:1620
void set(const std::string &name, int value)
set the flag, with a run-time name