CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/RecoTracker/RoadMapMakerESProducer/interface/RoadMaker.h

Go to the documentation of this file.
00001 #ifndef RECOTRACKER_ROADMAKER_H
00002 #define RECOTRACKER_ROADMAKER_H
00003 
00004 //
00005 // Package:         RecoTracker/RoadMapMakerESProducer
00006 // Class:           RoadMaker
00007 // 
00008 // Description:     Creates a Roads object by combining all
00009 //                  inner and outer SeedRings into RoadSeeds
00010 //                  and determines all Rings of the RoadSet
00011 //                  belonging to the RoadSeeds.     
00012 //
00013 // Original Author: Oliver Gutsche, gutsche@fnal.gov
00014 // Created:         Thu Jan 12 21:00:00 UTC 2006
00015 //
00016 // $Author: noeding $
00017 // $Date: 2008/02/28 22:11:41 $
00018 // $Revision: 1.9 $
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