CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/RecoTracker/RoadSearchSeedFinder/interface/RoadSearchSeedFinderAlgorithm.h

Go to the documentation of this file.
00001 #ifndef RoadSearchSeedFinderAlgorithm_h
00002 #define RoadSearchSeedFinderAlgorithm_h
00003 
00004 //
00005 // Package:         RecoTracker/RoadSearchSeedFinder
00006 // Class:           RoadSearchSeedFinderAlgorithm
00007 // 
00008 // Description:     Loops over Roads, checks for every
00009 //                  RoadSeed if hits are in the inner and
00010 //                  outer SeedRing, applies cuts for all 
00011 //                  combinations of inner and outer SeedHits,
00012 //                  stores valid combination in TrackingSeed
00013 //
00014 // Original Author: Oliver Gutsche, gutsche@fnal.gov
00015 // Created:         Sat Jan 14 22:00:00 UTC 2006
00016 //
00017 // $Author: vlimant $
00018 // $Date: 2009/01/26 10:15:10 $
00019 // $Revision: 1.22 $
00020 //
00021 
00022 #include <string>
00023 #include <sstream>
00024 
00025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00026 #include "FWCore/Framework/interface/EventSetup.h"
00027 #include "DataFormats/Common/interface/Handle.h"
00028 
00029 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2DCollection.h"
00030 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2DCollection.h"
00031 #include "DataFormats/RoadSearchSeed/interface/RoadSearchSeedCollection.h"
00032 
00033 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
00034 
00035 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00036 
00037 #include "MagneticField/Engine/interface/MagneticField.h"
00038 
00039 #include "RecoTracker/RoadMapRecord/interface/Roads.h"
00040 
00041 #include "TrackingTools/RoadSearchHitAccess/interface/DetHitAccess.h"
00042 
00043 #include "RecoTracker/RoadSearchSeedFinder/interface/RoadSearchCircleSeed.h"
00044 
00045 class RoadSearchSeedFinderAlgorithm 
00046 {
00047  public:
00048   
00049   RoadSearchSeedFinderAlgorithm(const edm::ParameterSet& conf);
00050   ~RoadSearchSeedFinderAlgorithm();
00051 
00052   // Runs the algorithm
00053   void run(const SiStripRecHit2DCollection* rphiRecHits,
00054            const SiStripRecHit2DCollection* stereoRecHits,
00055            const SiStripMatchedRecHit2DCollection* matchedRecHits,
00056            const SiPixelRecHitCollection* pixelRecHits,
00057            const edm::EventSetup& es,
00058            RoadSearchSeedCollection &output);
00059   
00060   bool mergeCircleSeeds(std::vector<RoadSearchCircleSeed> &circleSeeds);
00061   
00062   bool calculateCircleSeedsFromHits(std::vector<RoadSearchCircleSeed> &circleSeeds,
00063                                     const Roads::RoadSeed *seed,
00064                                     const Roads::RoadSet *set,
00065                                     GlobalPoint ring1GlobalPoint,
00066                                     TrackingRecHit *ring1RecHit,
00067                                     std::vector<TrackingRecHit*> ring2RecHits,
00068                                     std::vector<TrackingRecHit*> ring3RecHits);
00069 
00070   bool calculateCircleSeedsFromHits(std::vector<RoadSearchCircleSeed> &circleSeeds,
00071                                     const Roads::RoadSeed *seed,
00072                                     const Roads::RoadSet *set,
00073                                     GlobalPoint ring1GlobalPoint,
00074                                     TrackingRecHit *ring1RecHit,
00075                                     std::vector<TrackingRecHit*> ring2RecHits);
00076 
00077   bool calculateCircleSeedsFromRingsOneInnerTwoOuter(std::vector<RoadSearchCircleSeed> &circleSeeds,
00078                                                      const Roads::RoadSeed *seed,
00079                                                      const Roads::RoadSet *set,
00080                                                      const Ring* ring1,
00081                                                      const Ring* ring2,
00082                                                      const Ring* ring3);
00083 
00084   bool calculateCircleSeedsFromRingsTwoInnerOneOuter(std::vector<RoadSearchCircleSeed> &circleSeeds,
00085                                                      const Roads::RoadSeed *seed,
00086                                                      const Roads::RoadSet *set,
00087                                                      const Ring* ring1,
00088                                                      const Ring* ring2,
00089                                                      const Ring* ring3);
00090   bool calculateCircleSeedsFromRingsOneInnerOneOuter(std::vector<RoadSearchCircleSeed> &circleSeeds,
00091                                                      const Roads::RoadSeed *seed,
00092                                                      const Roads::RoadSet *set,
00093                                                      const Ring* ring1,
00094                                                      const Ring* ring2);
00095 
00096   bool ringsOnSameLayer(const Ring *ring1, 
00097                         const Ring* ring2);
00098   bool detIdsOnSameLayer(DetId id1, 
00099                          DetId id2);
00100   
00101   unsigned int ClusterCounter(const edmNew::DetSetVector<SiStripCluster>* clusters);
00102   
00103  private:
00104 
00105   double       minPt_;
00106   double       maxBarrelImpactParameter_;
00107   double       maxEndcapImpactParameter_;
00108   double       phiRangeDetIdLookup_;
00109 
00110   double       mergeSeedsCenterCut_;
00111   double       mergeSeedsRadiusCut_;
00112   double       mergeSeedsCenterCut_A_;
00113   double       mergeSeedsRadiusCut_A_;
00114   double       mergeSeedsCenterCut_B_;
00115   double       mergeSeedsRadiusCut_B_;
00116   double       mergeSeedsCenterCut_C_;
00117   double       mergeSeedsRadiusCut_C_;
00118   unsigned int mergeSeedsDifferentHitsCut_;
00119 
00120   int          maxNumberOfSeeds_;
00121 
00122   DetHitAccess innerSeedHitVector_;
00123   DetHitAccess outerSeedHitVector_;
00124 
00125   DetHitAccess::accessMode innerSeedHitAccessMode_;
00126   bool                     innerSeedHitAccessUseRPhi_;
00127   bool                     innerSeedHitAccessUseStereo_;
00128 
00129   DetHitAccess::accessMode outerSeedHitAccessMode_;
00130   bool                     outerSeedHitAccessUseRPhi_;
00131   bool                     outerSeedHitAccessUseStereo_;
00132 
00133   const TrackerGeometry *tracker_;
00134   const Roads           *roads_;
00135   const MagneticField   *magnet_;
00136 
00137   std::ostringstream output_;
00138 
00139   double beamSpotZMagneticField_;
00140   double minRadius_;
00141 
00142   std::vector<unsigned int> usedSeedRingCombinations_;
00143 
00144   std::string mode_;
00145 
00146   std::string roadsLabel_;
00147 
00148   //***top-bottom
00149   bool allPositiveOnly;
00150   bool allNegativeOnly;
00151   //***
00152 
00153 };
00154 
00155 #endif