1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
//
// Package: FilterScrapingPixelProbability
// Class: FilterScrapingPixelProbability
//
// Original Author: Gavril Giurgiu (JHU)
//
// This filter attempts to separate scraping events from collision
// events.
//
// It loops over all tracks in the event and
// counts the number of barel pixel hits which have low probability.
// The filter is applied on the fraction of hits with low
// probability. The default "low probability" is 0 (less than
// 10^{-15}). For this choice of low probability the optimal
// cut is somewhere between 0.3 and 0.5. Default is 0.4.
//
#ifndef FilterScrapingPixelProbability_H
#define FilterScrapingPixelProbability_H
// system include files
#include <memory>
#include <vector>
#include <map>
#include <set>
// user include files
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/stream/EDFilter.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h"
#include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
class FilterScrapingPixelProbability : public edm::stream::EDFilter<> {
public:
explicit FilterScrapingPixelProbability(const edm::ParameterSet &);
~FilterScrapingPixelProbability() override;
private:
bool filter(edm::Event &, const edm::EventSetup &) override;
bool apply_filter;
bool select_collision;
bool select_pkam;
bool select_other;
double low_probability; // Default is 0 which means less than ~10^{-15}.
double low_probability_fraction_cut; // Default is 0.4.
edm::InputTag tracks_;
};
#endif
|