CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/RecoTracker/FinalTrackSelectors/src/MultiTrackSelector.h

Go to the documentation of this file.
00001 #ifndef RecoAlgos_MultiTrackSelector_h
00002 #define RecoAlgos_MultiTrackSelector_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 MultiTrackSelector : public edm::EDProducer {
00039         private:
00040         public:
00042             explicit MultiTrackSelector() { }
00043             explicit MultiTrackSelector( const edm::ParameterSet & cfg ) ;
00045             virtual ~MultiTrackSelector() ;
00046 
00047         protected:
00048             typedef math::XYZPoint Point;
00050             virtual void produce( edm::Event& evt, const edm::EventSetup& es ) ;
00052             bool select (unsigned tsNum,
00053                          const reco::BeamSpot &vertexBeamSpot, 
00054                          const reco::Track &tk, 
00055                          const std::vector<Point> &points,
00056                          std::vector<double> &vterr,
00057                          std::vector<double> &vzerr);
00058             void selectVertices ( unsigned int tsNum,
00059                                   const reco::VertexCollection &vtxs, 
00060                                   std::vector<Point> &points,
00061                                   std::vector<double> &vterr,
00062                                   std::vector<double> &vzerr);
00064             edm::InputTag src_;
00065             edm::InputTag beamspot_;
00066             bool          useVertices_;
00067             bool          useVtxError_;
00068             edm::InputTag vertices_;
00069             
00071             std::vector<bool> setQualityBit_;
00072             std::vector<TrackBase::TrackQuality> qualityToSet_;
00073 
00075             std::vector<int32_t> vtxNumber_;
00076             std::vector<StringCutObjectSelector<reco::Vertex> > vertexCut_;
00077 
00078             //  parameters for adapted optimal cuts on chi2 and primary vertex compatibility
00079             std::vector< std::vector<double> > res_par_;
00080             std::vector< double > chi2n_par_;
00081             std::vector< double > chi2n_no1Dmod_par_;
00082             std::vector< std::vector<double> > d0_par1_;
00083             std::vector< std::vector<double> > dz_par1_;
00084             std::vector< std::vector<double> > d0_par2_;
00085             std::vector< std::vector<double> > dz_par2_;
00086             // Boolean indicating if adapted primary vertex compatibility cuts are to be applied.
00087             std::vector<bool> applyAdaptedPVCuts_;
00088                         
00090             std::vector<double> max_d0_;
00091             std::vector<double> max_z0_;
00092             std::vector<double> nSigmaZ_;
00093 
00095             std::vector<uint32_t> min_layers_;
00096             std::vector<uint32_t> min_3Dlayers_;
00097             std::vector<uint32_t> max_lostLayers_;
00098             std::vector<uint32_t> min_hits_bypass_;
00099 
00100             // pterror and nvalid hits cuts
00101             std::vector<double> max_relpterr_;
00102             std::vector<uint32_t> min_nhits_;
00103             
00104             // Flag and absolute cuts if no PV passes the selection
00105             std::vector<double> max_d0NoPV_;
00106             std::vector<double> max_z0NoPV_;
00107             std::vector<bool> applyAbsCutsIfNoPV_;
00108             //if true, selector flags but does not select 
00109             std::vector<bool> keepAllTracks_;
00110 
00111             // allow one of the previous psets to be used as a prefilter
00112             std::vector<unsigned int> preFilter_;
00113             std::vector<std::string> name_;
00114     };
00115 
00116 } }
00117 
00118 #endif