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, std::vector<float> & mvaVals_) const;
76 
83  bool useAnyMVA_;
85 
87  std::vector<bool> setQualityBit_;
88  std::vector<reco::TrackBase::TrackQuality> qualityToSet_;
89 
91  std::vector<int32_t> vtxNumber_;
92  //StringCutObjectSelector is not const thread safe
93  std::vector<StringCutObjectSelector<reco::Vertex> > vertexCut_;
94 
95  // parameters for adapted optimal cuts on chi2 and primary vertex compatibility
96  std::vector< std::vector<double> > res_par_;
97  std::vector< double > chi2n_par_;
98  std::vector< double > chi2n_no1Dmod_par_;
99  std::vector< std::vector<double> > d0_par1_;
100  std::vector< std::vector<double> > dz_par1_;
101  std::vector< std::vector<double> > d0_par2_;
102  std::vector< std::vector<double> > dz_par2_;
103  // Boolean indicating if adapted primary vertex compatibility cuts are to be applied.
104  std::vector<bool> applyAdaptedPVCuts_;
105 
107  std::vector<double> max_d0_;
108  std::vector<double> max_z0_;
109  std::vector<double> nSigmaZ_;
110 
112  std::vector<uint32_t> min_layers_;
113  std::vector<uint32_t> min_3Dlayers_;
114  std::vector<uint32_t> max_lostLayers_;
115  std::vector<uint32_t> min_hits_bypass_;
116 
117  // pterror and nvalid hits cuts
118  std::vector<double> max_relpterr_;
119  std::vector<uint32_t> min_nhits_;
120 
121  std::vector<int32_t> max_minMissHitOutOrIn_;
122  std::vector<int32_t> max_lostHitFraction_;
123 
124  std::vector<double> min_eta_;
125  std::vector<double> max_eta_;
126 
127  // Flag and absolute cuts if no PV passes the selection
128  std::vector<double> max_d0NoPV_;
129  std::vector<double> max_z0NoPV_;
130  std::vector<bool> applyAbsCutsIfNoPV_;
131  //if true, selector flags but does not select
132  std::vector<bool> keepAllTracks_;
133 
134  // allow one of the previous psets to be used as a prefilter
135  std::vector<unsigned int> preFilter_;
136  std::vector<std::string> name_;
137 
138  //setup mva selector
139  std::vector<bool> useMVA_;
140  //std::vector<TMVA::Reader*> mvaReaders_;
141 
142  std::vector<double> min_MVA_;
143 
144  //std::vector<std::string> mvaType_;
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< 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?
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< 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< double > max_eta_