CMS 3D CMS Logo

HIMultiTrackSelector.h
Go to the documentation of this file.
1 #ifndef RecoAlgos_HIMultiTrackSelector_h
2 #define RecoAlgos_HIMultiTrackSelector_h
3 
13 #include <utility>
14 #include <vector>
15 #include <memory>
16 #include <algorithm>
17 #include <map>
22 
34 
38  relpterr = 3,
40  minlost = 5,
41  nhits = 6,
42  eta = 7,
44  chi2n = 9,
46  nlayers3d = 11,
47  nlayers = 12,
48  ndof = 13,
49  etaerror = 14 };
50 
51 
53  private:
54  public:
56  explicit HIMultiTrackSelector();
57  explicit HIMultiTrackSelector( const edm::ParameterSet & cfg ) ;
59  virtual ~HIMultiTrackSelector() ;
60 
61  protected:
62  void beginStream(edm::StreamID) override final;
63 
64  // void streamBeginRun(edm::StreamID, edm::Run const&, edm::EventSetup const&) const final {
65  // init();
66  //}
67  //void beginRun(edm::Run const&, edm::EventSetup const&) final { init(); }
68  // void init(edm::EventSetup const& es) const;
69 
72  void produce(edm::Event& evt, const edm::EventSetup& es ) override final {
73  run(evt,es);
74  }
75  virtual void run( edm::Event& evt, const edm::EventSetup& es ) const;
76 
78  bool select (unsigned tsNum,
79  const reco::BeamSpot &vertexBeamSpot,
80  const TrackingRecHitCollection & recHits,
81  const reco::Track &tk,
82  const std::vector<Point> &points,
83  std::vector<float> &vterr,
84  std::vector<float> &vzerr,
85  double mvaVal) const;
86  void selectVertices ( unsigned int tsNum,
87  const reco::VertexCollection &vtxs,
88  std::vector<Point> &points,
89  std::vector<float> &vterr,
90  std::vector<float> &vzerr) const;
91 
92  void processMVA(edm::Event& evt, const edm::EventSetup& es, std::vector<float> & mvaVals_,const reco::VertexCollection &hVtx) const;
93 
94 
95  void ParseForestVars();
104 
105 
106  // Boolean indicating if pixel track merging related cuts are to be applied
108 
110  std::vector<bool> setQualityBit_;
111  std::vector<reco::TrackBase::TrackQuality> qualityToSet_;
112 
114  std::vector<int32_t> vtxNumber_;
115  //StringCutObjectSelector is not const thread safe
116  std::vector<StringCutObjectSelector<reco::Vertex> > vertexCut_;
117 
118  // parameters for adapted optimal cuts on chi2 and primary vertex compatibility
119  std::vector< std::vector<double> > res_par_;
120  std::vector< double > chi2n_par_;
121  std::vector< double > chi2n_no1Dmod_par_;
122  std::vector< std::vector<double> > d0_par1_;
123  std::vector< std::vector<double> > dz_par1_;
124  std::vector< std::vector<double> > d0_par2_;
125  std::vector< std::vector<double> > dz_par2_;
126  // Boolean indicating if adapted primary vertex compatibility cuts are to be applied.
127  std::vector<bool> applyAdaptedPVCuts_;
128 
130  std::vector<double> max_d0_;
131  std::vector<double> max_z0_;
132  std::vector<double> nSigmaZ_;
133 
134 
135  // parameters for pixel track merging pT dependent chi2 cuts
136  std::vector<std::vector<double> > pixel_pTMinCut_;
137  std::vector<std::vector<double> > pixel_pTMaxCut_;
138 
139 
141  std::vector<uint32_t> min_layers_;
142  std::vector<uint32_t> min_3Dlayers_;
143  std::vector<uint32_t> max_lostLayers_;
144  std::vector<uint32_t> min_hits_bypass_;
145 
146  // pterror and nvalid hits cuts
147  std::vector<double> max_relpterr_;
148  std::vector<uint32_t> min_nhits_;
149 
150  std::vector<int32_t> max_minMissHitOutOrIn_;
151  std::vector<int32_t> max_lostHitFraction_;
152 
153  std::vector<double> min_eta_;
154  std::vector<double> max_eta_;
155 
156  // Flag and absolute cuts if no PV passes the selection
157  std::vector<double> max_d0NoPV_;
158  std::vector<double> max_z0NoPV_;
159  std::vector<bool> applyAbsCutsIfNoPV_;
160  //if true, selector flags but does not select
161  std::vector<bool> keepAllTracks_;
162 
163  // allow one of the previous psets to be used as a prefilter
164  std::vector<unsigned int> preFilter_;
165  std::vector<std::string> name_;
166 
167  //setup mva selector
168  std::vector<bool> useMVA_;
169  //std::vector<TMVA::Reader*> mvaReaders_;
170 
171  std::vector<int> mvavars_indices;
172 
173  std::vector<double> min_MVA_;
174 
175  //std::vector<std::string> mvaType_;
178  std::vector<std::string> forestVars_;
182 
183 
184  };
185 
186 #endif
std::vector< std::string > name_
#define dso_hidden
std::vector< uint32_t > max_lostLayers_
std::vector< uint32_t > min_hits_bypass_
std::vector< std::vector< double > > pixel_pTMaxCut_
std::vector< uint32_t > min_nhits_
std::vector< bool > useMVA_
std::vector< std::vector< double > > dz_par1_
std::vector< double > chi2n_par_
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
std::vector< std::vector< double > > res_par_
std::vector< int32_t > max_minMissHitOutOrIn_
std::vector< double > chi2n_no1Dmod_par_
std::vector< uint32_t > min_3Dlayers_
std::vector< double > min_eta_
std::vector< double > max_eta_
std::vector< std::vector< double > > d0_par2_
std::vector< double > max_d0NoPV_
void produce(edm::Event &evt, const edm::EventSetup &es) override final
process one event
std::vector< std::vector< double > > d0_par1_
edm::EDGetTokenT< reco::VertexCollection > vertices_
std::vector< StringCutObjectSelector< reco::Vertex > > vertexCut_
std::vector< bool > setQualityBit_
do I have to set a quality bit?
std::vector< int32_t > vtxNumber_
vertex cuts
std::vector< double > max_z0_
edm::EDGetTokenT< TrackingRecHitCollection > hSrc_
std::vector< std::vector< double > > dz_par2_
edm::EDGetTokenT< reco::TrackCollection > src_
source collection label
std::vector< double > nSigmaZ_
std::vector< double > max_d0_
Impact parameter absolute cuts.
std::vector< bool > applyAdaptedPVCuts_
std::vector< double > max_relpterr_
std::vector< int > mvavars_indices
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< std::string > forestVars_
std::vector< int32_t > max_lostHitFraction_
edm::EDGetTokenT< reco::BeamSpot > beamspot_
std::vector< bool > applyAbsCutsIfNoPV_
std::vector< uint32_t > min_layers_
Cuts on numbers of layers with hits/3D hits/lost hits.
std::vector< std::vector< double > > pixel_pTMinCut_
std::vector< double > max_z0NoPV_
std::vector< bool > keepAllTracks_
virtual void beginStream(StreamID)
std::vector< double > min_MVA_
std::vector< unsigned int > preFilter_
std::vector< reco::TrackBase::TrackQuality > qualityToSet_