CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
39  relpterr = 3,
41  minlost = 5,
42  nhits = 6,
43  eta = 7,
45  chi2n = 9,
47  nlayers3d = 11,
48  nlayers = 12,
49  ndof = 13,
50  etaerror = 14
51 };
52 
53 class GBRWrapperRcd;
54 
56 private:
57 public:
59  explicit HIMultiTrackSelector();
62  ~HIMultiTrackSelector() override;
63 
64 protected:
65  void beginStream(edm::StreamID) final;
66 
67  // void streamBeginRun(edm::StreamID, edm::Run const&, edm::EventSetup const&) const final {
68  // init();
69  //}
70  //void beginRun(edm::Run const&, edm::EventSetup const&) final { init(); }
71  // void init(edm::EventSetup const& es) const;
72 
75  void produce(edm::Event &evt, const edm::EventSetup &es) final { run(evt, es); }
76  virtual void run(edm::Event &evt, const edm::EventSetup &es) const;
77 
79  bool select(unsigned tsNum,
80  const reco::BeamSpot &vertexBeamSpot,
82  const reco::Track &tk,
83  const std::vector<Point> &points,
84  std::vector<float> &vterr,
85  std::vector<float> &vzerr,
86  double mvaVal) const;
87  void selectVertices(unsigned int tsNum,
88  const reco::VertexCollection &vtxs,
89  std::vector<Point> &points,
90  std::vector<float> &vterr,
91  std::vector<float> &vzerr) const;
92 
93  void processMVA(edm::Event &evt,
94  const edm::EventSetup &es,
95  std::vector<float> &mvaVals_,
96  const reco::VertexCollection &hVtx) const;
97 
98  void ParseForestVars();
107 
108  // Boolean indicating if pixel track merging related cuts are to be applied
110 
112  std::vector<bool> setQualityBit_;
113  std::vector<reco::TrackBase::TrackQuality> qualityToSet_;
114 
116  std::vector<int32_t> vtxNumber_;
117  //StringCutObjectSelector is not const thread safe
118  std::vector<StringCutObjectSelector<reco::Vertex> > vertexCut_;
119 
120  // parameters for adapted optimal cuts on chi2 and primary vertex compatibility
121  std::vector<std::vector<double> > res_par_;
122  std::vector<double> chi2n_par_;
123  std::vector<double> chi2n_no1Dmod_par_;
124  std::vector<std::vector<double> > d0_par1_;
125  std::vector<std::vector<double> > dz_par1_;
126  std::vector<std::vector<double> > d0_par2_;
127  std::vector<std::vector<double> > dz_par2_;
128  // Boolean indicating if adapted primary vertex compatibility cuts are to be applied.
129  std::vector<bool> applyAdaptedPVCuts_;
130 
132  std::vector<double> max_d0_;
133  std::vector<double> max_z0_;
134  std::vector<double> nSigmaZ_;
135 
136  // parameters for pixel track merging pT dependent chi2 cuts
137  std::vector<std::vector<double> > pixel_pTMinCut_;
138  std::vector<std::vector<double> > pixel_pTMaxCut_;
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_;
183 };
184 
185 #endif
std::vector< std::string > name_
std::vector< std::vector< double > > dz_par2_
std::vector< uint32_t > max_lostLayers_
std::vector< std::vector< double > > dz_par1_
tuple cfg
Definition: looper.py:296
std::vector< double > chi2n_no1Dmod_par_
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< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
std::vector< int32_t > max_minMissHitOutOrIn_
std::vector< uint32_t > min_3Dlayers_
void produce(edm::Event &evt, const edm::EventSetup &es) final
process one event
std::vector< double > min_eta_
std::vector< double > max_eta_
std::vector< double > max_d0NoPV_
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< std::vector< double > > d0_par1_
std::vector< int32_t > vtxNumber_
vertex cuts
std::vector< double > max_z0_
edm::EDGetTokenT< TrackingRecHitCollection > hSrc_
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
#define dso_hidden
Definition: Visibility.h:12
std::vector< std::vector< double > > d0_par2_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< std::string > forestVars_
std::vector< int32_t > max_lostHitFraction_
std::vector< double > chi2n_par_
std::vector< std::vector< double > > res_par_
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_
edm::ESGetToken< GBRForest, GBRWrapperRcd > forestToken_
std::vector< double > min_MVA_
std::vector< unsigned int > preFilter_
std::vector< reco::TrackBase::TrackQuality > qualityToSet_