Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:27:05

0001 #ifndef MuonIsolation_TrackSelector_H
0002 #define MuonIsolation_TrackSelector_H
0003 
0004 #include "RecoMuon/MuonIsolation/interface/Range.h"
0005 #include "DataFormats/RecoCandidate/interface/IsoDepositDirection.h"
0006 #include "DataFormats/TrackReco/interface/Track.h"
0007 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0008 #include "DataFormats/Common/interface/View.h"
0009 #include <list>
0010 
0011 namespace muonisolation {
0012 
0013   class TrackSelector {
0014   public:
0015     typedef muonisolation::Range<float> Range;
0016     typedef std::list<const reco::Track*> result_type;
0017     typedef reco::TrackCollection input_type;
0018     typedef reco::TrackBase::Point BeamPoint;
0019 
0020     //!config parameters
0021     struct Parameters {
0022       Parameters()
0023           : zRange(-1e6, 1e6),
0024             rRange(-1e6, 1e6),
0025             dir(0, 0),
0026             drMax(1e3),
0027             beamPoint(0, 0, 0),
0028             nHitsMin(0),
0029             chi2NdofMax(1e64),
0030             chi2ProbMin(-1.),
0031             ptMin(-1) {}
0032       Parameters(const Range& dz,
0033                  const double d0Max,
0034                  const reco::isodeposit::Direction& dirC,
0035                  double rMax,
0036                  const BeamPoint& point = BeamPoint(0, 0, 0))
0037           : zRange(dz),
0038             rRange(Range(0, d0Max)),
0039             dir(dirC),
0040             drMax(rMax),
0041             beamPoint(point),
0042             nHitsMin(0),
0043             chi2NdofMax(1e64),
0044             chi2ProbMin(-1.),
0045             ptMin(-1) {}
0046       Range zRange;                     //! range in z
0047       Range rRange;                     //! range in d0 or dxy (abs value)
0048       reco::isodeposit::Direction dir;  //! direction of the selection cone
0049       double drMax;                     //! cone size
0050       BeamPoint beamPoint;              //! beam spot position
0051       unsigned int nHitsMin;            //! nValidHits >= nHitsMin
0052       double chi2NdofMax;               //! max value of normalized chi2
0053       double chi2ProbMin;               //! ChiSquaredProbability( chi2, ndf ) > chi2ProbMin
0054       double ptMin;                     //! tk.pt>ptMin
0055     };
0056 
0057     TrackSelector(const Parameters& pars) : thePars(pars) {}
0058 
0059     result_type operator()(const input_type& tracks) const;
0060 
0061   private:
0062     Parameters thePars;
0063   };
0064 
0065 }  // namespace muonisolation
0066 
0067 #endif