CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/RecoHI/HiMuonAlgos/interface/DiMuonSeedGeneratorHIC.h

Go to the documentation of this file.
00001 #ifndef _HICDIMUONSEEDGENERATOR_H_
00002 #define _HICDIMUONSEEDGENERATOR_H_
00003 //
00004 // MuSeedGenerator creates track seeds from L1/L2 Muon Trigger
00005 // parametrization works up to 40 GeV tracks.
00006 //
00007 // HIC
00008 
00009 // Producer stuff
00010 #include "FWCore/Framework/interface/EventSetup.h"
00011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00012 #include "FWCore/Framework/interface/ESHandle.h"
00013 #include "FWCore/Utilities/interface/InputTag.h"
00014 #include "FWCore/Framework/interface/EDProducer.h"
00015 #include "FWCore/Framework/interface/Event.h"
00016 
00017 // Magnetic field for propagators
00018 #include "MagneticField/Engine/interface/MagneticField.h"
00019 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
00020 
00021 // TrackingTools
00022 #include "TrackingTools/MaterialEffects/interface/PropagatorWithMaterial.h"
00023 #include "TrackingTools/DetLayers/interface/BarrelDetLayer.h"
00024 #include "TrackingTools/DetLayers/interface/ForwardDetLayer.h"
00025 #include "TrackingTools/DetLayers/interface/DetLayer.h"
00026 #include "TrackingTools/PatternTools/interface/TrajectoryMeasurement.h"
00027 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
00028 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00029 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
00030 #include "TrackingTools/MeasurementDet/interface/LayerMeasurements.h"
00031 
00032 // Detector geometry
00033 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
00034 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
00035 #include "Geometry/TrackerGeometryBuilder/interface/TrackerLayerIdAccessor.h"
00036 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00037 
00038 // RecoTracker
00039 #include "RecoTracker/TkDetLayers/interface/GeometricSearchTracker.h"
00040 #include "RecoTracker/TkHitPairs/interface/LayerWithHits.h"
00041 #include "RecoTracker/MeasurementDet/interface/MeasurementTracker.h"
00042 #include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
00043 
00044 // Internal stuff 
00045 #include "RecoHI/HiMuonAlgos/interface/HICSeedMeasurementEstimator.h"
00046 #include "RecoHI/HiMuonAlgos/interface/HICConst.h"
00047 #include "RecoHI/HiMuonAlgos/interface/DiMuonTrajectorySeed.h"
00048 
00049 // HICConst
00050 #include "RecoHI/HiMuonAlgos/interface/HICConst.h"
00051 
00052 // CLHEP includes
00053 //#include "CLHEP/Units/GlobalPhysicalConstants.h"
00054 //#include "CLHEP/Vector/ThreeVector.h"
00055 //#include <CLHEP/Vector/LorentzVector.h>
00056 
00057 // System includes
00058 #include <cmath>
00059 #include <stdlib.h>
00060 #include <string>
00061 #include <iostream>
00062 #include <vector>
00063 
00064 #include <map>
00065 #include <vector>
00066 
00067 namespace cms
00068 {
00069 class DiMuonSeedGeneratorHIC  {
00070 
00071  public:
00072   typedef std::vector<DiMuonTrajectorySeed> SeedContainer;
00073   typedef SeedContainer::iterator SeedIterator;
00074   
00075   DiMuonSeedGeneratorHIC(edm::InputTag,
00076                          const MagneticField*, 
00077                          const GeometricSearchTracker*,
00078                          const HICConst*,
00079                          const std::string, 
00080                          int aMult);
00081 
00082   virtual std::map<DetLayer*,SeedContainer>  produce(const edm::Event& e, const edm::EventSetup& c,
00083                          FreeTrajectoryState&, 
00084                          TrajectoryStateOnSurface&,
00085                          FreeTrajectoryState&,
00086                     const TransientTrackingRecHitBuilder* RecHitBuilder,
00087                     const MeasurementTracker* measurementTracker,
00088                          std::vector<DetLayer*>* 
00089                        );
00090 
00091   virtual ~DiMuonSeedGeneratorHIC(){} 
00092   
00093 //  SeedContainer seeds();
00094   
00095  private:
00096   FreeTrajectoryState                        theFtsTracker;
00097   FreeTrajectoryState                        theFtsMuon;
00098   const HICConst*                            theHICConst;
00099   Propagator*                                thePropagator; 
00100   std::string                                builderName;    
00101   int                                        theLowMult;
00102   
00103   std::vector<BarrelDetLayer*>               bl;
00104   std::vector<ForwardDetLayer*>              fpos;
00105   std::vector<ForwardDetLayer*>              fneg;
00106   std::vector<const DetLayer*>               theDetLayer;
00107   
00108   std::vector<LayerWithHits*>                allLayersWithHits;
00109   bool                                       isFirstCall;
00110   TrackerLayerIdAccessor                     acc;
00111   
00112   std::pair<TrajectoryMeasurement,bool> barrelUpdateSeed(
00113                                            const FreeTrajectoryState&,
00114                                            const TrajectoryMeasurement&
00115                                          ) const;
00116   std::pair<TrajectoryMeasurement,bool> forwardUpdateSeed(
00117                                            const FreeTrajectoryState&,
00118                                            const TrajectoryMeasurement&
00119                                          ) const;
00120                                          
00121   edm::InputTag rphirecHitsTag;
00122   const TransientTrackingRecHitBuilder * TTRHbuilder;
00123   const MagneticField*                   magfield;      
00124   const GeometricSearchTracker*          theTracker;
00125   const MeasurementTracker*              theMeasurementTracker;
00126   const LayerMeasurements*               theLayerMeasurements;
00127                          
00128 };
00129 }
00130 #endif
00131