Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:41:32

0001 //
0002 // Package:   FilterScrapingPixelProbability
0003 // Class:     FilterScrapingPixelProbability
0004 //
0005 // Original Author:  Gavril Giurgiu (JHU)
0006 //
0007 // This filter attempts to separate scraping events from collision
0008 // events.
0009 //
0010 // It loops over all tracks in the event and
0011 // counts the number of barel pixel hits which have low probability.
0012 // The filter is applied on the fraction of hits with low
0013 // probability. The default "low probability" is 0 (less than
0014 // 10^{-15}). For this choice of low probability the optimal
0015 // cut is somewhere between 0.3 and 0.5. Default is 0.4.
0016 //
0017 
0018 #ifndef FilterScrapingPixelProbability_H
0019 #define FilterScrapingPixelProbability_H
0020 
0021 // system include files
0022 #include <memory>
0023 #include <vector>
0024 #include <map>
0025 #include <set>
0026 
0027 // user include files
0028 #include "FWCore/Utilities/interface/InputTag.h"
0029 #include "FWCore/Framework/interface/Frameworkfwd.h"
0030 #include "FWCore/Framework/interface/stream/EDFilter.h"
0031 #include "FWCore/Framework/interface/Event.h"
0032 #include "FWCore/Framework/interface/MakerMacros.h"
0033 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0034 #include "FWCore/Framework/interface/ESHandle.h"
0035 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0036 #include "DataFormats/TrackReco/interface/Track.h"
0037 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0038 
0039 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h"
0040 #include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
0041 
0042 class FilterScrapingPixelProbability : public edm::stream::EDFilter<> {
0043 public:
0044   explicit FilterScrapingPixelProbability(const edm::ParameterSet &);
0045   ~FilterScrapingPixelProbability() override;
0046 
0047 private:
0048   bool filter(edm::Event &, const edm::EventSetup &) override;
0049 
0050   bool apply_filter;
0051   bool select_collision;
0052   bool select_pkam;
0053   bool select_other;
0054   double low_probability;               // Default is 0 which means less than ~10^{-15}.
0055   double low_probability_fraction_cut;  // Default is 0.4.
0056 
0057   edm::InputTag tracks_;
0058 };
0059 
0060 #endif