Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:37:31

0001 #ifndef HIPixelMedianVtxProducer_H
0002 #define HIPixelMedianVtxProducer_H
0003 
0004 #include "FWCore/Framework/interface/one/EDProducer.h"
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 
0007 #include "DataFormats/TrackReco/interface/Track.h"
0008 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0009 
0010 namespace edm {
0011   class Event;
0012   class EventSetup;
0013 }  // namespace edm
0014 
0015 class HIPixelMedianVtxProducer : public edm::one::EDProducer<> {
0016 public:
0017   explicit HIPixelMedianVtxProducer(const edm::ParameterSet& ps);
0018   ~HIPixelMedianVtxProducer() override {}
0019   void produce(edm::Event& ev, const edm::EventSetup& es) override;
0020 
0021 private:
0022   void beginJob() override {}
0023 
0024   edm::EDGetTokenT<reco::TrackCollection> theTrackCollection;
0025   double thePtMin;
0026   unsigned int thePeakFindThresh;
0027   double thePeakFindMaxZ;
0028   int thePeakFindBinning;
0029   int theFitThreshold;
0030   double theFitMaxZ;
0031   int theFitBinning;
0032 };
0033 
0034 struct ComparePairs {
0035   bool operator()(const reco::Track* t1, const reco::Track* t2) { return (t1->vz() < t2->vz()); };
0036 };
0037 
0038 #endif