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 
15 #include <utility>
16 #include <vector>
17 #include <memory>
18 #include <algorithm>
19 #include <map>
24 
36 
37 namespace reco { namespace modules {
38 
40  private:
41  public:
43  explicit MultiTrackSelector();
44  explicit MultiTrackSelector( const edm::ParameterSet & cfg ) ;
46  virtual ~MultiTrackSelector() ;
47 
48  protected:
51  virtual void produce( edm::Event& evt, const edm::EventSetup& es ) override;
53  bool select (unsigned tsNum,
54  const reco::BeamSpot &vertexBeamSpot,
55  const reco::Track &tk,
56  const std::vector<Point> &points,
57  std::vector<float> &vterr,
58  std::vector<float> &vzerr,
59  double mvaVal);
60  void selectVertices ( unsigned int tsNum,
61  const reco::VertexCollection &vtxs,
62  std::vector<Point> &points,
63  std::vector<float> &vterr,
64  std::vector<float> &vzerr);
65 
66  void processMVA(edm::Event& evt, const edm::EventSetup& es);
67 
73  bool useAnyMVA_;
75 
77  std::vector<bool> setQualityBit_;
78  std::vector<TrackBase::TrackQuality> qualityToSet_;
79 
81  std::vector<int32_t> vtxNumber_;
82  std::vector<StringCutObjectSelector<reco::Vertex> > vertexCut_;
83 
84  // parameters for adapted optimal cuts on chi2 and primary vertex compatibility
85  std::vector< std::vector<double> > res_par_;
86  std::vector< double > chi2n_par_;
87  std::vector< double > chi2n_no1Dmod_par_;
88  std::vector< std::vector<double> > d0_par1_;
89  std::vector< std::vector<double> > dz_par1_;
90  std::vector< std::vector<double> > d0_par2_;
91  std::vector< std::vector<double> > dz_par2_;
92  // Boolean indicating if adapted primary vertex compatibility cuts are to be applied.
93  std::vector<bool> applyAdaptedPVCuts_;
94 
96  std::vector<double> max_d0_;
97  std::vector<double> max_z0_;
98  std::vector<double> nSigmaZ_;
99 
101  std::vector<uint32_t> min_layers_;
102  std::vector<uint32_t> min_3Dlayers_;
103  std::vector<uint32_t> max_lostLayers_;
104  std::vector<uint32_t> min_hits_bypass_;
105 
106  // pterror and nvalid hits cuts
107  std::vector<double> max_relpterr_;
108  std::vector<uint32_t> min_nhits_;
109 
110  std::vector<int32_t> max_minMissHitOutOrIn_;
111  std::vector<int32_t> max_lostHitFraction_;
112 
113  std::vector<double> min_eta_;
114  std::vector<double> max_eta_;
115 
116  // Flag and absolute cuts if no PV passes the selection
117  std::vector<double> max_d0NoPV_;
118  std::vector<double> max_z0NoPV_;
119  std::vector<bool> applyAbsCutsIfNoPV_;
120  //if true, selector flags but does not select
121  std::vector<bool> keepAllTracks_;
122 
123  // allow one of the previous psets to be used as a prefilter
124  std::vector<unsigned int> preFilter_;
125  std::vector<std::string> name_;
126 
127  //setup mva selector
128  std::vector<bool> useMVA_;
129  //std::vector<TMVA::Reader*> mvaReaders_;
130  std::vector<double> min_MVA_;
131  std::vector<double> mvaVals_;
132  //std::vector<std::string> mvaType_;
138 
139  float tmva_ndof_;
143  float tmva_chi2n_;
145  float tmva_eta_;
147  float tmva_nhits_;
150 
151  float* gbrVals_;
152 
153  };
154 
155 } }
156 
157 #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)
edm::InputTag src_
source collection label
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:13
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?
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_