CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MultiTrackSelector.h
Go to the documentation of this file.
1 #ifndef RecoAlgos_MultiTrackSelector_h
2 #define RecoAlgos_MultiTrackSelector_h
3 
13 #include <utility>
14 #include <vector>
15 #include <memory>
16 #include <algorithm>
17 #include <map>
22 
34 
36  private:
37  public:
39  explicit MultiTrackSelector();
40  explicit MultiTrackSelector( const edm::ParameterSet & cfg ) ;
42  virtual ~MultiTrackSelector() ;
43 
44  protected:
45  void beginStream(edm::StreamID) override final;
46 
47  // void streamBeginRun(edm::StreamID, edm::Run const&, edm::EventSetup const&) const final {
48  // init();
49  //}
50  //void beginRun(edm::Run const&, edm::EventSetup const&) final { init(); }
51  // void init(edm::EventSetup const& es) const;
52 
55  void produce(edm::Event& evt, const edm::EventSetup& es ) override final {
56  run(evt,es);
57  }
58  virtual void run( edm::Event& evt, const edm::EventSetup& es ) const;
59 
61  bool select (unsigned tsNum,
62  const reco::BeamSpot &vertexBeamSpot,
64  const reco::Track &tk,
65  const std::vector<Point> &points,
66  std::vector<float> &vterr,
67  std::vector<float> &vzerr,
68  double mvaVal) const;
69  void selectVertices ( unsigned int tsNum,
70  const reco::VertexCollection &vtxs,
71  std::vector<Point> &points,
72  std::vector<float> &vterr,
73  std::vector<float> &vzerr) const;
74 
75  void processMVA(edm::Event& evt, const edm::EventSetup& es,const reco::BeamSpot& beamspot,const reco::VertexCollection& vertices, int selIndex, std::vector<float> & mvaVals_, bool writeIt=false) const;
76  Point getBestVertex(const reco::TrackBaseRef,const reco::VertexCollection) const;
77 
84  bool useAnyMVA_;
86 
88  std::vector<bool> setQualityBit_;
89  std::vector<reco::TrackBase::TrackQuality> qualityToSet_;
90 
92  std::vector<int32_t> vtxNumber_;
93  //StringCutObjectSelector is not const thread safe
94  std::vector<StringCutObjectSelector<reco::Vertex> > vertexCut_;
95 
96  // parameters for adapted optimal cuts on chi2 and primary vertex compatibility
97  std::vector< std::vector<double> > res_par_;
98  std::vector< double > chi2n_par_;
99  std::vector< double > chi2n_no1Dmod_par_;
100  std::vector< std::vector<double> > d0_par1_;
101  std::vector< std::vector<double> > dz_par1_;
102  std::vector< std::vector<double> > d0_par2_;
103  std::vector< std::vector<double> > dz_par2_;
104  // Boolean indicating if adapted primary vertex compatibility cuts are to be applied.
105  std::vector<bool> applyAdaptedPVCuts_;
106 
108  std::vector<double> max_d0_;
109  std::vector<double> max_z0_;
110  std::vector<double> nSigmaZ_;
111 
113  std::vector<uint32_t> min_layers_;
114  std::vector<uint32_t> min_3Dlayers_;
115  std::vector<uint32_t> max_lostLayers_;
116  std::vector<uint32_t> min_hits_bypass_;
117 
118  // pterror and nvalid hits cuts
119  std::vector<double> max_relpterr_;
120  std::vector<uint32_t> min_nhits_;
121 
122  std::vector<int32_t> max_minMissHitOutOrIn_;
123  std::vector<int32_t> max_lostHitFraction_;
124 
125  std::vector<double> min_eta_;
126  std::vector<double> max_eta_;
127 
128  // Flag and absolute cuts if no PV passes the selection
129  std::vector<double> max_d0NoPV_;
130  std::vector<double> max_z0NoPV_;
131  std::vector<bool> applyAbsCutsIfNoPV_;
132  //if true, selector flags but does not select
133  std::vector<bool> keepAllTracks_;
134 
135  // allow one of the previous psets to be used as a prefilter
136  std::vector<unsigned int> preFilter_;
137  std::vector<std::string> name_;
138 
139  //setup mva selector
140  std::vector<bool> useMVA_;
141  std::vector<bool> useMVAonly_;
142 
143  std::vector<double> min_MVA_;
144 
145  std::vector<std::string> mvaType_;
146  std::vector<std::string> forestLabel_;
147  std::vector<GBRForest*> forest_;
150 
151 
152  };
153 
154 #endif
std::vector< double > chi2n_no1Dmod_par_
std::vector< uint32_t > min_nhits_
#define dso_hidden
std::vector< double > chi2n_par_
std::vector< std::vector< double > > d0_par1_
std::vector< double > max_d0NoPV_
std::vector< double > max_z0_
tuple cfg
Definition: looper.py:259
std::vector< uint32_t > min_layers_
Cuts on numbers of layers with hits/3D hits/lost hits.
std::vector< std::string > name_
std::vector< double > max_z0NoPV_
std::vector< bool > useMVA_
std::vector< bool > keepAllTracks_
std::vector< uint32_t > min_hits_bypass_
std::vector< bool > applyAdaptedPVCuts_
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
std::vector< double > nSigmaZ_
std::vector< std::string > mvaType_
std::vector< unsigned int > preFilter_
edm::EDGetTokenT< TrackingRecHitCollection > hSrc_
edm::EDGetTokenT< reco::VertexCollection > vertices_
std::vector< uint32_t > min_3Dlayers_
std::vector< uint32_t > max_lostLayers_
std::vector< int32_t > max_lostHitFraction_
edm::EDGetTokenT< reco::BeamSpot > beamspot_
std::vector< double > min_eta_
std::vector< bool > setQualityBit_
do I have to set a quality bit?
math::XYZPoint Point
std::vector< std::vector< double > > dz_par1_
std::vector< std::vector< double > > dz_par2_
std::vector< std::vector< double > > res_par_
void produce(edm::Event &evt, const edm::EventSetup &es) overridefinal
process one event
std::vector< double > max_relpterr_
std::vector< int32_t > vtxNumber_
vertex cuts
std::vector< reco::TrackBase::TrackQuality > qualityToSet_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< std::string > forestLabel_
std::vector< StringCutObjectSelector< reco::Vertex > > vertexCut_
std::vector< bool > applyAbsCutsIfNoPV_
virtual void beginStream(StreamID)
std::vector< int32_t > max_minMissHitOutOrIn_
std::vector< double > min_MVA_
math::XYZPoint Point
edm::EDGetTokenT< reco::TrackCollection > src_
source collection label
std::vector< std::vector< double > > d0_par2_
std::vector< double > max_d0_
Impact parameter absolute cuts.
std::vector< bool > useMVAonly_
std::vector< double > max_eta_
std::vector< GBRForest * > forest_