Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:24:54

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