CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/RecoTracker/FinalTrackSelectors/interface/AnalyticalTrackSelector.h

Go to the documentation of this file.
00001 #ifndef RecoAlgos_AnalyticalTrackSelector_h
00002 #define RecoAlgos_AnalyticalTrackSelector_h
00003 
00015 #include <utility>
00016 #include <vector>
00017 #include <memory>
00018 #include <algorithm>
00019 #include <map>
00020 #include "FWCore/Framework/interface/EDProducer.h"
00021 #include "FWCore/Framework/interface/Event.h"
00022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00023 #include "FWCore/Utilities/interface/InputTag.h"
00024 
00025 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00026 #include "DataFormats/TrackReco/interface/Track.h"
00027 #include "DataFormats/TrackReco/interface/TrackExtra.h"
00028 #include "DataFormats/VertexReco/interface/VertexFwd.h"
00029 #include "DataFormats/VertexReco/interface/Vertex.h"
00030 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
00031 #include "TrackingTools/PatternTools/interface/Trajectory.h"
00032 #include "TrackingTools/PatternTools/interface/TrajTrackAssociation.h"
00033 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit1D.h"
00034 #include "CommonTools/Utils/interface/StringCutObjectSelector.h"
00035 
00036 namespace reco { namespace modules {
00037 
00038     class AnalyticalTrackSelector : public edm::EDProducer {
00039         private:
00040         public:
00042             explicit AnalyticalTrackSelector( const edm::ParameterSet & cfg ) ;
00044             virtual ~AnalyticalTrackSelector() ;
00045 
00046         private:
00047             typedef math::XYZPoint Point;
00049             void produce( edm::Event& evt, const edm::EventSetup& es ) ;
00051             bool select (const reco::BeamSpot &vertexBeamSpot, const reco::Track &tk, const std::vector<Point> &points);
00052             void selectVertices ( const reco::VertexCollection &vtxs, std::vector<Point> &points);
00054             edm::InputTag src_;
00055             edm::InputTag beamspot_;
00056             edm::InputTag vertices_;
00057             
00059             bool copyExtras_;
00061             bool copyTrajectories_;
00062 
00064             bool keepAllTracks_;
00066             bool setQualityBit_;
00067             TrackBase::TrackQuality qualityToSet_;
00068 
00070             int32_t vtxNumber_;
00071             StringCutObjectSelector<reco::Vertex> vertexCut_;
00072 
00073 
00074             //  parameters for adapted optimal cuts on chi2 and primary vertex compatibility
00075             std::vector<double> res_par_;
00076             double  chi2n_par_;
00077             std::vector<double> d0_par1_;
00078             std::vector<double> dz_par1_;
00079             std::vector<double> d0_par2_;
00080             std::vector<double> dz_par2_;
00081             // Boolean indicating if adapted primary vertex compatibility cuts are to be applied.
00082             bool applyAdaptedPVCuts_;
00083                         
00085             double max_d0_;
00086             double max_z0_;
00087             double nSigmaZ_;
00088 
00090             uint32_t min_layers_;
00091             uint32_t min_3Dlayers_;
00092             uint32_t max_lostLayers_;
00093             
00094             // Flag and absolute cuts if no PV passes the selection
00095             bool applyAbsCutsIfNoPV_;
00096             double max_d0NoPV_;
00097             double max_z0NoPV_;
00098                         
00100             std::auto_ptr<reco::TrackCollection> selTracks_;
00101             std::auto_ptr<reco::TrackExtraCollection> selTrackExtras_;
00102             std::auto_ptr< TrackingRecHitCollection>  selHits_;
00103             std::auto_ptr< std::vector<Trajectory> > selTrajs_;
00104             std::auto_ptr< std::vector<const Trajectory *> > selTrajPtrs_;
00105             std::auto_ptr< TrajTrackAssociationCollection >  selTTAss_;
00106             reco::TrackRefProd rTracks_;
00107             reco::TrackExtraRefProd rTrackExtras_;
00108             TrackingRecHitRefProd rHits_;
00109             edm::RefProd< std::vector<Trajectory> > rTrajectories_;
00110             std::vector<reco::TrackRef> trackRefs_;
00111 
00112     };
00113 
00114 } }
00115 
00116 #endif