CMS 3D CMS Logo

MuonSeedBuilder.h

Go to the documentation of this file.
00001 #ifndef RecoMuon_MuonSeedBuilder_H
00002 #define RecoMuon_MuonSeedBuilder_H
00003 
00015 #include <FWCore/ParameterSet/interface/ParameterSet.h>
00016 #include <RecoMuon/MeasurementDet/interface/MuonDetLayerMeasurements.h>
00017 #include <DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h>
00018 
00019 //muon service
00020 #include <RecoMuon/TrackingTools/interface/MuonServiceProxy.h>
00021 
00022 #include<vector>
00023 
00024 class DetLayer; 
00025 class MuonDetLayerGeometry;
00026 class MagneticField;
00027 class MuonSeedCreator;
00028 
00029 typedef std::vector<TrajectorySeed> SeedContainer;
00030 
00031 class MuonSeedBuilder
00032 {
00033 
00034  public:
00035 
00036   typedef MuonTransientTrackingRecHit::MuonRecHitContainer SegmentContainer;
00037   typedef std::deque<bool> BoolContainer;
00038 
00040   explicit MuonSeedBuilder(const edm::ParameterSet&);
00041   
00043   ~MuonSeedBuilder();
00044   
00045   // Operations
00046 
00048   void setGeometry( const MuonDetLayerGeometry* lgeom ) {muonLayers = lgeom;}
00049 
00051   void setBField( const MagneticField* theField ) {BField = theField;}
00052 
00054   int build( edm::Event& event, const edm::EventSetup& eventSetup, TrajectorySeedCollection& seeds );
00055 
00056   std::vector<int> badSeedLayer;
00057 
00058 
00059  private:
00060 
00062   bool foundMatchingSegment( int type, SegmentContainer& protoTrack, SegmentContainer& segments,
00063        BoolContainer& usedSeg, float& eta_temp, float& phi_temp, int& lastLayer, bool& showeringBefore );
00064 
00066   std::vector<TrajectorySeed> seedCleaner(const edm::EventSetup& eventSetup, std::vector<TrajectorySeed>& seeds );   
00067 
00069   double etaError(const GlobalPoint gp, double rErr);
00070 
00072   bool IdentifyShowering( SegmentContainer& segs, BoolContainer& usedSeg, float& eta_last, float& phi_last, int layer, int& NShoweringSegments  );
00073 
00074   
00076   std::vector<SeedContainer> GroupSeeds( std::vector<TrajectorySeed>& seeds );
00078   TrajectorySeed BetterDirection( std::vector<TrajectorySeed>& seeds ) ;
00079   TrajectorySeed BetterChi2( std::vector<TrajectorySeed>& seeds );
00081   bool MomentumFilter(std::vector<TrajectorySeed>& seeds );
00083   SeedContainer LengthFilter(std::vector<TrajectorySeed>& seeds );
00085   SeedContainer SeedCandidates( std::vector<TrajectorySeed>& seeds, bool good );
00087   unsigned int OverlapSegments( TrajectorySeed seed1, TrajectorySeed seed2 );
00088 
00090   int NRecHitsFromSegment( const TrackingRecHit& rhit );
00091   int NRecHitsFromSegment( MuonTransientTrackingRecHit *rhit );
00092   //int NRecHitsFromSegment( const MuonTransientTrackingRecHit& rhit );
00093   double NChi2OfSegment( const TrackingRecHit& rhit );
00094 
00096   GlobalPoint SeedPosition( TrajectorySeed seed );
00098   GlobalVector SeedMomentum( TrajectorySeed seed );
00099 
00100   // This Producer private debug flag
00101   bool debug;
00102 
00103   // Enable the DT measurement
00104   bool enableDTMeasurement;
00105 
00106   // Enable the CSC measurement
00107   bool enableCSCMeasurement;
00108 
00109   // Minimum # of hits to consider a CSC Segment;
00110   int minCSCHitsPerSegment;
00111 
00112   // Minimum # of hits to consider a DT Segment;
00113   int minDTHitsPerSegment;
00114 
00115   // Maximum distance from initial segment
00116   float maxDeltaEtaCSC;
00117   float maxDeltaPhiCSC;
00118   float maxDeltaEtaOverlap;
00119   float maxDeltaPhiOverlap;
00120   float maxDeltaEtaDT;
00121   float maxDeltaPhiDT;
00122 
00123   // Number of Segments from a shower
00124   int NShowerSeg;
00125   SegmentContainer ShoweringSegments;   
00126   std::vector<int> ShoweringLayers; 
00128   edm::InputTag theDTSegmentLabel;
00129 
00131   edm::InputTag theCSCSegmentLabel;
00132 
00134   MuonSeedCreator* muonSeedCreate_;
00135 
00136   // Cache geometry for current event
00137   const MuonDetLayerGeometry* muonLayers;
00138 
00139   // Cache Magnetic Field for current event
00140   const MagneticField* BField;
00141  
00142   // muon service
00143   MuonServiceProxy* theService;
00144 
00145   // Minimum separation when we can distinguish between 2 muon seeds
00146   // (to suppress combinatorics)
00147   float maxEtaResolutionDT;
00148   float maxEtaResolutionCSC;
00149   float maxPhiResolutionDT;
00150   float maxPhiResolutionCSC;
00151   float theMinMomentum;
00152 
00153 };
00154 #endif
00155 

Generated on Tue Jun 9 17:44:26 2009 for CMSSW by  doxygen 1.5.4