Go to the documentation of this file.00001 #ifndef RECOTRACKER_ROADMAKER_H
00002 #define RECOTRACKER_ROADMAKER_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <vector>
00022 #include <string>
00023 #include <map>
00024 #include <utility>
00025
00026 #include "RecoTracker/RoadMapRecord/interface/Roads.h"
00027 #include "RecoTracker/RingRecord/interface/Rings.h"
00028
00029 class RoadMaker {
00030
00031 public:
00032
00033 enum GeometryStructure {
00034 FullDetector,
00035 FullDetectorII,
00036 MTCC,
00037 TIF,
00038 TIFTOB,
00039 TIFTIB,
00040 TIFTIBTOB,
00041 TIFTOBTEC,
00042 P5
00043 };
00044
00045 enum SeedingType {
00046 FourRingSeeds,
00047 TwoRingSeeds
00048 };
00049
00050 RoadMaker(const Rings *rings,
00051 GeometryStructure structure = FullDetector,
00052 SeedingType seedingType = FourRingSeeds);
00053
00054 ~RoadMaker();
00055
00056 void constructRoads();
00057
00058 void collectInnerSeedRings();
00059 void collectInnerTIBSeedRings();
00060 void collectInnerTIDSeedRings();
00061 void collectInnerTECSeedRings();
00062 void collectInnerTOBSeedRings();
00063
00064 void collectInnerSeedRings1();
00065 void collectInnerTIBSeedRings1();
00066 void collectInnerTIDSeedRings1();
00067 void collectInnerTECSeedRings1();
00068 void collectInnerTOBSeedRings1();
00069
00070 void collectInnerSeedRings2();
00071 void collectInnerTIBSeedRings2();
00072 void collectInnerTIDSeedRings2();
00073 void collectInnerTECSeedRings2();
00074 void collectInnerTOBSeedRings2();
00075
00076 void collectOuterSeedRings();
00077 void collectOuterTIBSeedRings();
00078 void collectOuterTOBSeedRings();
00079 void collectOuterTECSeedRings();
00080
00081 void collectOuterSeedRings1();
00082 void collectOuterTIBSeedRings1();
00083 void collectOuterTOBSeedRings1();
00084 void collectOuterTECSeedRings1();
00085
00086 inline Roads* getRoads() { return roads_; }
00087
00088 bool RingsOnSameLayer(const Ring *ring1, const Ring* ring2);
00089 bool RingsOnSameLayer(std::pair<const Ring *,const Ring *> seed1,
00090 std::pair<const Ring *,const Ring *> seed2);
00091 bool RingInBarrel(const Ring *ring);
00092 std::vector<std::pair<double,double> > LinesThroughRingAndBS(const Ring *ring );
00093 std::vector<std::pair<double,double> > LinesThroughRings(const Ring *ring1,
00094 const Ring *ring2);
00095 bool CompatibleWithLines(std::vector<std::pair<double,double> > lines,
00096 const Ring* ring);
00097 Roads::RoadSet RingsCompatibleWithSeed(Roads::RoadSeed seed);
00098 Roads::RoadSeed CloneSeed(Roads::RoadSeed seed);
00099 bool AddRoad(Roads::RoadSeed seed,
00100 Roads::RoadSet set);
00101 std::pair<Roads::RoadSeed, Roads::RoadSet> AddInnerSeedRing(std::pair<Roads::RoadSeed, Roads::RoadSet> input);
00102 std::pair<Roads::RoadSeed, Roads::RoadSet> AddOuterSeedRing(std::pair<Roads::RoadSeed, Roads::RoadSet> input);
00103 bool SameRoadSet(Roads::RoadSet set1, Roads::RoadSet set2 );
00104 Roads::RoadSet SortRingsIntoLayers(std::vector<const Ring*> input);
00105
00106 private:
00107
00108 const Rings *rings_;
00109
00110 Roads *roads_;
00111 GeometryStructure structure_;
00112 SeedingType seedingType_;
00113
00114 std::vector<const Ring*> innerSeedRings_;
00115 std::vector<const Ring*> innerSeedRings1_;
00116 std::vector<const Ring*> innerSeedRings2_;
00117 std::vector<const Ring*> outerSeedRings_;
00118 std::vector<const Ring*> outerSeedRings1_;
00119
00120 float zBS_;
00121
00122 };
00123
00124 #endif