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 
35 namespace reco { namespace modules {
36 
38  private:
39  public:
41  explicit MultiTrackSelector();
42  explicit MultiTrackSelector( const edm::ParameterSet & cfg ) ;
44  virtual ~MultiTrackSelector() ;
45 
46  protected:
49  virtual void produce( edm::Event& evt, const edm::EventSetup& es ) override;
51  bool select (unsigned tsNum,
52  const reco::BeamSpot &vertexBeamSpot,
53  const reco::Track &tk,
54  const std::vector<Point> &points,
55  std::vector<float> &vterr,
56  std::vector<float> &vzerr,
57  double mvaVal);
58  void selectVertices ( unsigned int tsNum,
59  const reco::VertexCollection &vtxs,
60  std::vector<Point> &points,
61  std::vector<float> &vterr,
62  std::vector<float> &vzerr);
63 
64  void processMVA(edm::Event& evt, const edm::EventSetup& es);
65 
71  bool useAnyMVA_;
73 
75  std::vector<bool> setQualityBit_;
76  std::vector<TrackBase::TrackQuality> qualityToSet_;
77 
79  std::vector<int32_t> vtxNumber_;
80  std::vector<StringCutObjectSelector<reco::Vertex> > vertexCut_;
81 
82  // parameters for adapted optimal cuts on chi2 and primary vertex compatibility
83  std::vector< std::vector<double> > res_par_;
84  std::vector< double > chi2n_par_;
85  std::vector< double > chi2n_no1Dmod_par_;
86  std::vector< std::vector<double> > d0_par1_;
87  std::vector< std::vector<double> > dz_par1_;
88  std::vector< std::vector<double> > d0_par2_;
89  std::vector< std::vector<double> > dz_par2_;
90  // Boolean indicating if adapted primary vertex compatibility cuts are to be applied.
91  std::vector<bool> applyAdaptedPVCuts_;
92 
94  std::vector<double> max_d0_;
95  std::vector<double> max_z0_;
96  std::vector<double> nSigmaZ_;
97 
99  std::vector<uint32_t> min_layers_;
100  std::vector<uint32_t> min_3Dlayers_;
101  std::vector<uint32_t> max_lostLayers_;
102  std::vector<uint32_t> min_hits_bypass_;
103 
104  // pterror and nvalid hits cuts
105  std::vector<double> max_relpterr_;
106  std::vector<uint32_t> min_nhits_;
107 
108  std::vector<int32_t> max_minMissHitOutOrIn_;
109  std::vector<int32_t> max_lostHitFraction_;
110 
111  std::vector<double> min_eta_;
112  std::vector<double> max_eta_;
113 
114  // Flag and absolute cuts if no PV passes the selection
115  std::vector<double> max_d0NoPV_;
116  std::vector<double> max_z0NoPV_;
117  std::vector<bool> applyAbsCutsIfNoPV_;
118  //if true, selector flags but does not select
119  std::vector<bool> keepAllTracks_;
120 
121  // allow one of the previous psets to be used as a prefilter
122  std::vector<unsigned int> preFilter_;
123  std::vector<std::string> name_;
124 
125  //setup mva selector
126  std::vector<bool> useMVA_;
127  //std::vector<TMVA::Reader*> mvaReaders_;
128  std::vector<double> min_MVA_;
129  std::vector<double> mvaVals_;
130  //std::vector<std::string> mvaType_;
136 
137  float tmva_ndof_;
141  float tmva_chi2n_;
143  float tmva_eta_;
145  float tmva_nhits_;
148 
149  float* gbrVals_;
150 
151  };
152 
153 } }
154 
155 #endif
std::vector< double > max_d0_
Impact parameter absolute cuts.
std::vector< std::vector< double > > dz_par1_
std::vector< std::vector< double > > d0_par1_
std::vector< std::vector< double > > d0_par2_
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
std::vector< uint32_t > min_3Dlayers_
std::vector< int32_t > vtxNumber_
vertex cuts
std::vector< std::string > name_
std::vector< std::vector< double > > res_par_
void processMVA(edm::Event &evt, const edm::EventSetup &es)
std::vector< uint32_t > min_nhits_
std::vector< unsigned int > preFilter_
std::vector< uint32_t > min_hits_bypass_
void selectVertices(unsigned int tsNum, const reco::VertexCollection &vtxs, std::vector< Point > &points, std::vector< float > &vterr, std::vector< float > &vzerr)
virtual void produce(edm::Event &evt, const edm::EventSetup &es) override
process one event
std::vector< double > chi2n_no1Dmod_par_
std::vector< StringCutObjectSelector< reco::Vertex > > vertexCut_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
edm::EDGetTokenT< reco::BeamSpot > beamspot_
edm::EDGetTokenT< reco::TrackCollection > src_
source collection label
bool select(unsigned tsNum, const reco::BeamSpot &vertexBeamSpot, const reco::Track &tk, const std::vector< Point > &points, std::vector< float > &vterr, std::vector< float > &vzerr, double mvaVal)
return class, or -1 if rejected
std::vector< TrackBase::TrackQuality > qualityToSet_
std::vector< bool > setQualityBit_
do I have to set a quality bit?
edm::EDGetTokenT< reco::VertexCollection > vertices_
std::vector< uint32_t > min_layers_
Cuts on numbers of layers with hits/3D hits/lost hits.
std::vector< uint32_t > max_lostLayers_
std::vector< std::vector< double > > dz_par2_
std::vector< int32_t > max_minMissHitOutOrIn_
std::vector< int32_t > max_lostHitFraction_